msr-consulting / exscalabar_server

Repository for the EXSCALABAR server.
http://www.msrconsults.com/ukmet-gh/exscalabar
0 stars 1 forks source link

Add PAS cal coefficients to ini #162

Closed JustinLangridge closed 7 years ago

JustinLangridge commented 7 years ago

Can we add an option to the .ini file to put in calibration coeficients for the five PAS cells. These will be straight line coefficients mapping absorption to integrated area.

These coefficients would then be used to calculate and visualise a rough absorption from the UI.

lo-co commented 7 years ago

I am assuming these would be linear, no? Or do you want it more flexible?

lo-co commented 7 years ago

The linear coefficients (m for slope and b for intercept) are already there in the configuration file. These are read in PAS::Configure and deposited in the property for each cell PAS Cell::Ext Param. Ext Param is a cluster that contains two variables - slope and intercept. Right now, it appears we use the slope but for some reason are not using the intercept. The calculation for rough absorption can be found in PAS Cell Data::Calculate Background IA (this VI is dual purpose and is used when the filter is on to calculate an IA background value). The calculation is as follows:

C0 = f0/Q C1 = IAbackground*C0 C2 = IA*C0 abs = (m*C0)^-1*(C2-C1)

To be frank, this equation looks meaningless to me and I am not sure what is happening here. Can you provide some input on this?

JustinLangridge commented 7 years ago

Hi Matt,

The above equation is close but not quite right I think. Here is the process that we need to follow to derive the quick look absorption data. As per the above we can include an approximate IA background correction, but need not apply a laser power correction.

Definitions:

C0 = f0/Q C1 = IA_bkg x C0 C2 = IA x C0

In analysis of the cal meaurements we'll do straight line fits of CRDS_ext vs C2-C1. This gives us a gradient (m) and intercept (c_int) value for each cell.

To calculate the quick look absorption we then need to evaluate:

abs = m(C2-C1) + c_int

c_int should generally be small, which is maybe why it was neglected above?

lo-co commented 7 years ago

I am assuming that f0/Q is the laser power correction? The calculation in the above section is now applied.

JustinLangridge commented 7 years ago

OK Matt, thinking about this more it would be worth modifying so that we include the laser power in addition to the f/Q corrections in our calibrated slopes. Hence our online absorption calculation needs some slight modification to the following (where P is the photodiode rms laser power)

Definitions:

C0 = f0/(Q x P) C1 = IA_bkg x C0 C2 = IA x C0

In analysis of the cal meaurements we'll do straight line fits of CRDS_ext vs C2-C1. This gives us a gradient (m) and intercept (c_int) value for each cell.

To calculate the quick look absorption we then need to evaluate:

abs = m(C2-C1) + c_int

lo-co commented 7 years ago

This is something that Dave should be able to easily handle. Dave , can you try to fix this and then let me know if you have any issues with this. All of the information should be provided above to make this easy for you to find your way...

datid commented 7 years ago

Seem to be doing the right thing