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

Can't get spectra to process on latest master branch - outputs constant values, inf error #118

Closed
tpering opened this issue Mar 18, 2024 · 7 comments · Fixed by #130
Closed
Assignees
Labels
bug Something isn't working

Comments

@tpering
Copy link
Collaborator

tpering commented Mar 18, 2024

As above, DOAS just prints out constant values, exactly the same process tried on July 2023 version of pycam and no issues, produces viable results, and processes fine. Going to try a range of different options to see what happens, but for the moment can't process the spectra on latest version.

Don't know where the issue is as no error printed out...

@tpering tpering added the bug Something isn't working label Mar 18, 2024
@ubdbra001 ubdbra001 self-assigned this May 2, 2024
@ubdbra001
Copy link
Collaborator

@tpering I haven't had this issue with the Lascar dataset.
If you can reproduce the issue again would you be able to provide info on which dataset you're working with and the config file for the settings?

@ubdbra001
Copy link
Collaborator

Current lead is to do with _start_stray_pix and _end_stray_pix.
These are in the 188-224 range in v2023.07 and in the 558-593 range in the latest version

@twVolc
Copy link
Owner

twVolc commented May 23, 2024

This sounds reasonable. Have you managed to get those spectra processing on that earlier version? As the GUI hold stray light info in wavelength-space, but the backend needs pixel-space it might be that if you load a new set of data from a different spectrometer the pixel-space isn't being correctly updated.

I wonder if moving the stray and fit window values up/down in the GUI after loading the spectra causes the backend to correctly update its pixel values and then processes properly?

@ubdbra001
Copy link
Collaborator

Looks like this was it, the stray_pix variables were not being reset on loading a new spectra directory, and so old/default values were being used. I'm not sure why it wasn't a problem in the pre-config version, possibly because the values aren't initialised until DOAS is being processed.

I wonder if moving the stray and fit window values up/down in the GUI after loading the spectra causes the backend to correctly update its pixel values and then processes properly?

Yep, that worked too!

Have you managed to get those spectra processing on that earlier version?

Yes, but the results were not the same as @tpering 's. CDs in the range of 0-3000 instead of up to 8000. Not sure why to be honest, but I'm getting consistency between the v2023.07 and the fixed version now, which is positive.

@tpering
Copy link
Collaborator Author

tpering commented May 24, 2024 via email

@twVolc
Copy link
Owner

twVolc commented May 24, 2024

This is excellent news! I'll test this on our other colleagues spectra too, which seemed to be hitting a similar thing to what Tom has found.

I'm not sure if you have, but it will be worth double checking that the same isn't happening with the fit_window values too, as these also need to be mapped from wavelength in the GUI to pixels in the backend. Would be good to be certain we're fitting where we're supposed to be before we forget about this issue.

Sidenote - There's always a chance it was a problem pre-config too but we just hadn't picked it up yet.

@ubdbra001
Copy link
Collaborator

I'm not sure if you have, but it will be worth double checking that the same isn't happening with the fit_window values too, as these also need to be mapped from wavelength in the GUI to pixels in the backend. Would be good to be certain we're fitting where we're supposed to be before we forget about this issue.

I had a look and I don't think this is a problem. The fit_window values seem to be used directly rather than converted to pixel space, and this was what was being skipped for the stray_window values. Though if you want to have a look to make sure I'm not misunderstanding something before merging the PR then another pair of eyes is always good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants