-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
70965b5
commit 1bba4c4
Showing
55 changed files
with
3,752 additions
and
9,883 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
124 changes: 124 additions & 0 deletions
124
frontend/components/src_components/fields/MoleculeSelector/molecules.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
export const moleculeOptionsEquimolecules = [ | ||
"C2H2", | ||
"C2H4", | ||
"C2H6", | ||
"C2N2", | ||
"C4H2", | ||
"CF4", | ||
"CH3Br", | ||
"CH3Cl", | ||
"CH3CN", | ||
"CH3OH", | ||
"CH4", | ||
"ClO", | ||
"ClONO2", | ||
"CO", | ||
"CO2", | ||
"COCl2", | ||
"COF2", | ||
"CS", | ||
"H2", | ||
"H2CO", | ||
"H2O", | ||
"H2O2", | ||
"H2S", | ||
"HBr", | ||
"HC3N", | ||
"HCl", | ||
"HCN", | ||
"HCOOH", | ||
"HF", | ||
"HI", | ||
"HNO3", | ||
"HO2", | ||
"HOBr", | ||
"HOCl", | ||
"N2", | ||
"N2O", | ||
"NH3", | ||
"NO", | ||
"NO+", | ||
"NO2", | ||
"O", | ||
"O2", | ||
"O3", | ||
"OCS", | ||
"OH", | ||
"PH3", | ||
"SF6", | ||
"SO2", | ||
"SO3", | ||
]; | ||
|
||
export const moleculeOptionsNonequimolecules = ["CO", "CO2"]; | ||
|
||
export const moleculeOptionsGesia = [ | ||
"CO2", | ||
"CO", | ||
"COF2", | ||
"CH4", | ||
"CLO", | ||
"C2H6", | ||
"CH3D", | ||
"C2H2", | ||
"C2H4", | ||
"C3H8", | ||
"C2N2", | ||
"C4H2", | ||
"CLONO2", | ||
"CH3BR", | ||
"CH3OH", | ||
"C6H6", | ||
"C2HD", | ||
"CF4", | ||
"CH3CN", | ||
"COFCL", | ||
"CH3I", | ||
"CH3F", | ||
"CH3CL", | ||
"C3H4", | ||
"H2O", | ||
"HF", | ||
"HCL", | ||
"HBR", | ||
"HI", | ||
"HNO3", | ||
"H2CO", | ||
"HCN", | ||
"HC3N", | ||
"HOCL", | ||
"H2O2", | ||
"H2S", | ||
"HCOOH", | ||
"HO2", | ||
"HNC", | ||
"HDO", | ||
"HONO", | ||
"H2C3H2", | ||
"N2O", | ||
"NO", | ||
"NH3", | ||
"NO2", | ||
"NO+", | ||
"O2", | ||
"O3", | ||
"OH", | ||
"PH3", | ||
"OCS", | ||
"GEH4", | ||
"N2", | ||
"SO2", | ||
"SF6", | ||
"SO3", | ||
"RUO4", | ||
]; | ||
export const moleculeOptionsHitemp = [ | ||
"CO2", | ||
"CO", | ||
"H2O", | ||
"NO2", | ||
"NO", | ||
"OH", | ||
"CH4", | ||
]; | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
export type Species = { | ||
molecule: string; | ||
mole_fraction: number; | ||
}; | ||
|
||
export enum Database { | ||
HITRAN = "hitran", | ||
GEISA = "geisa", | ||
HITEMP = "hitemp", | ||
} | ||
|
||
export type FormValues = { | ||
mode: string; | ||
database: Database; | ||
species: Species[]; | ||
min_wavenumber_range: number; | ||
max_wavenumber_range: number; | ||
tgas: number; | ||
tvib?: number; | ||
trot?: number; | ||
pressure: number; | ||
path_length: number; | ||
simulate_slit?: number; | ||
use_simulate_slit: boolean; | ||
wavelength_units: string; | ||
pressure_units: string; | ||
path_length_units: string; | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
export const GA_TRACKING_ID = "G-V67HS7VB4R"; | ||
|
||
// https://developers.google.com/analytics/devguides/collection/gtagjs/pages | ||
export const pageview = (url: URL): void => { | ||
window.gtag("config", GA_TRACKING_ID, { | ||
page_path: url, | ||
}); | ||
}; | ||
|
||
type GTagEvent = { | ||
action: string; | ||
category: string; | ||
label: string; | ||
value: number; | ||
}; | ||
|
||
// https://developers.google.com/analytics/devguides/collection/gtagjs/events | ||
export const event = ({ action, category, label, value }: GTagEvent): void => { | ||
window.gtag("event", action, { | ||
event_category: category, | ||
event_label: label, | ||
value, | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import type { AppProps } from 'next/app' | ||
import React from 'react' | ||
import { useRouter } from "next/router"; | ||
import { useEffect } from "react"; | ||
import * as gtag from "../lib/gtag"; | ||
import '../styles/styles.css' | ||
const isProduction = process.env.NODE_ENV === "production"; | ||
|
||
export default function MyApp({ Component, pageProps }: AppProps) { | ||
const router = useRouter(); | ||
|
||
useEffect(() => { | ||
const handleRouteChange = (url: URL) => { | ||
/* invoke analytics function only for production */ | ||
if (isProduction) gtag.pageview(url); | ||
}; | ||
router.events.on("routeChangeComplete", handleRouteChange); | ||
return () => { | ||
router.events.off("routeChangeComplete", handleRouteChange); | ||
}; | ||
}, [router.events]); | ||
return ( | ||
<> | ||
<Component {...pageProps} /> | ||
</> | ||
) | ||
} |
Oops, something went wrong.