Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temp #8

Open
spectroscopy opened this issue Jun 6, 2022 · 0 comments
Open

Temp #8

spectroscopy opened this issue Jun 6, 2022 · 0 comments

Comments

@spectroscopy
Copy link
Member

spectroscopy commented Jun 6, 2022

For the backend the plan is to use RADIS: https://github.com/radis/radis. It will simulate infrared spectra given a bunch of parameters. I'm unsure of the best way of doing this, but I notice there is an app (https://github.com/suzil/radis-app) that already has a very nice interface; I suppose we can use the "radis-app" code as a starting point. Perhaps the 1st task should be to get this code working so we can customize it. What were initially after is a transmission spectrum of a gas sample, lets say of CO (ie carbon monoxide; that can be the test molecule)

Next we need to process this transmission spectrum to make it appear as though it has been collected with a real spectrometer (im calling this processed spectrum the "virtual spectrum"). To do that we need to (1) multiply the transmission spectrum of the gas sample by the blackbody spectrum of the source, the transmission spectrum of the beamsplitter material and windows, and the detector response spectrum. Then (2) we need to add in noise, and make that noise slowly go away with scanning time. Here's the formula for doing (1): virtual spectrum = (a) transmission spectrum of gas sample x (b) blackbody spectrum of source x (c) transmission spectrum of windows/beamsplitter x (d) detector response spectrum. Breaking this down:

(a) transmission spectrum of gas sample is generated using radis-app (?)

(b) blackbody spectrum of source: We will use Planck's law to do this. The associated spectrum is called a Planck spectrum. The user can choose one of two sources (of light): (i) Globar (which has a temperature of 1700 K); and (ii) Tungsten (3100 K). This page should be helpful to generate blackbody spectra (see https://radis.readthedocs.io/en/latest/examples/examples.html#compute-blackbody-radiation-spectrum).

(c) transmission spectrum of windows/beamsplitter: There is 9 mm of window material the light passes through: 3 mm of beamsplitter, 2x2 mm of windows that are attached to the ends of the sample cell, and a 2 mm window on the detector. The beamsplitter will be AR-ZnSe or AR-CaF2 (depending on what the user chooses; the "AR" means the window has an AntiReflective coating; without "AR" it is assumed to be uncoated); the "2x2 mm of windows" will be KBr or CaF2; the "2 mm window on the detector" will be ZnSe if MCT detector is chosen and sapphire if InSb detector is chosen.

(d) detector response spectrum: The user can choose between MCT and InSb detectors. As mentioned above, the MCT detector has a 2 mm thick ZnSe window and the InSb detector has a 2 mm Sapphire window.

Notes on (c) and (d)
Mathematical functions for the "transmission spectrum of windows/beamsplitter" and "detector response spectrum" will need to be generated by fitting various mathematical functions to actual transmission and detector response spectra. I decided to do this;

Transmission spectra:
KBr (2 mm):
y = (A) / (1 + (x0/x)^h )^s;
Parameters:
A=0.92267
x0=25.66477
h=-12.35159
s=0.17344
Valid from 0.3-30 um
x is wavelength in um (micrometers) and y is fractional transmission.
Note I fit the transmission spectrum in um for convenience.
Image

CaF2 (2 mm):
y = (A) / (1 + (x0/x)^h )^s;
Parameters:
A=0.93091
x0=11.12929
h=-12.43933
s=4.32574
Valid from 0.7-23.5 um
Image

ZnSe (2 mm):
y = (A) / (1 + (x0/x)^h )^s+A/(wsqrt(pi/(4ln(2)))) * exp(-4ln(2)(x-xc)^2/w^2);
A=0.71015
x0=20.99353
h=-19.31355
s=1.44348
xc=16.75
A=-0.13265
w=2.25051
Valid from 0.8-25 um
Image

sapphire (2 mm):
y = (A) / (1 + (x0/x)^h )^s;
Parameters:
A=0.78928
x0=11.90528
h=-12.07236
s=6569.37544
Valid from 0.3-at least 8 um
Image

AR-ZnSe (3 mm):
y = (Amax) / (1 + (x0/x)^h )^s+A/(wsqrt(pi/(4ln(2)))) * exp(-4ln(2)(x-xc)^2/w^2)+A1/(w1sqrt(pi/(4ln(2)))) * exp(-4ln(2)(x-xc1)^2/w1^2)+A2/(w2sqrt(pi/(4ln(2)))) * exp(-4ln(2)(x-xc2)^2/w2^2) +A3/(w3sqrt(pi/(4ln(2)))) * exp(-4ln(2)(x-xc3)^2/w3^2)+A4/(w4sqrt(pi/(4ln(2)))) * exp(-4ln(2)(x-xc4)^2/w4^2)+A5/(w5sqrt(pi/(4ln(2)))) * exp(-4ln(2)(x-xc5)^2/w5^2)+A6/(w6sqrt(pi/(4ln(2)))) * exp(-4ln(2)(x-xc6)^2/w6^2)+A7/(w7sqrt(pi/(4ln(2)))) * exp(-4ln(2)(x-xc7)^2/w7^2);
Parameters:
Amax=0.82609
x0=23.1963
h=-12.31766
s=7.09616
xc=1.45
A=-0.38
w=0.55
xc1=2.88
A1=-0.019
w1=0.4
xc2=6.16
A2=-0.006
w2=0.3
xc3=16.2
A3=-0.1
w3=1
xc4=17.4
A4=-0.1
w4=1
xc5=9.5
A5=1.11724
w5=8
xc6=4.9
A6=0.14009
w6=2
xc7=2.6
A7=0.21751
w7=2
Valid from 0.95-about 23 um
Image

AR-CaF2 (3 mm):
y = (Amax) / (1 + (x0/x)^h )^s+A/(wsqrt(pi/(4ln(2)))) * exp(-4ln(2)(x-xc)^2/w^2)+A1/(w1sqrt(pi/(4ln(2)))) * exp(-4ln(2)(x-xc1)^2/w1^2)+A2/(w2sqrt(pi/(4ln(2)))) * exp(-4ln(2)(x-xc2)^2/w2^2) +A3/(w3sqrt(pi/(4ln(2)))) * exp(-4ln(2)(x-xc3)^2/w3^2)+A4/(w4sqrt(pi/(4ln(2)))) * exp(-4ln(2)(x-xc4)^2/w4^2)+A5/(w5sqrt(pi/(4ln(2)))) * exp(-4ln(2)(x-xc5)^2/w5^2)+A6/(w6sqrt(pi/(4ln(2)))) * exp(-4ln(2)(x-xc6)^2/w6^2)+A7/(w7sqrt(pi/(4ln(2)))) * exp(-4ln(2)(x-xc7)^2/w7^2);
Parameters:
Amax=0.9795
x0=18.77617
h=-6.94246
s=91.98745
xc=0.76
A=-0.06
w=0.08
xc1=1.06
A1=-0.06
w1=0.2
xc2=4.85
A2=-0.6
w2=3
xc3=9.4
A3=-0.35
w3=1
xc4=2.6
A4=0.05
w4=0.8
xc5=7.75
A5=0.04
w5=0.5
xc6=6.55
A6=-0.01
w6=0.6
xc7=1.82
A7=0.01
w7=0.5
Valid from 0.8-about 23 um
Image

Now for the detector response spectra:
InSb:
y =y0+ A*(1/(1+exp(-(x-xc+w1/2)/w2)))*(1-1/(1+exp(-(x-xc-w1/2)/w3)))
y0=8.65617E9
xc=4.94457
A=1.50056E11
w1=0.90286
w2=1.10624
w3=0.12484
Image

MCT:
y =y0+ A*(1/(1+exp(-(x-xc)/w2)))(1-1/(1+exp(-(x-xc)/w3))) + AA/(wwsqrt(pi/(4ln(2)))) * exp(-4ln(2)*(x-xxc)^2/ww^2)
y0=1.98748E9
xc=20.15819
A=2.10252E10
w2=5.73688
w3=1.11659
xxc=18.6
AA=1.3E9
ww=2
Image

Then we have to process the spectra (2) which involves adding in noise (https://radis.readthedocs.io/en/latest/auto_examples/plot_specutils_processing.html#sphx-glr-auto-examples-plot-specutils-processing-py)...


Si bolometer detector (dont show pipes on side; we show top down view which is a hexagon; should be about 1.5x size of MCT): Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant