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

Add support for trigger scaling in compression mode S=0,k=0,M=7 #377

Merged
merged 2 commits into from
Dec 19, 2023

Conversation

samaloney
Copy link
Collaborator

@samaloney samaloney commented Dec 6, 2023

Unscale trigger data when compressed with mode S=0,k=0,M=7

  • QL - LC, BKG, SPECTRA
  • BSD - CPD, SCPD, VIS and SPEC

When compressed with mode 0,0,7 the trigger are scaled by the FSW according to T_s = T / (n_int * n_acc * factor) this scaling is removed by the GSW.

Closes #365

@samaloney
Copy link
Collaborator Author

This will need to be rebased on #375 once merged to fix the CI tests.

@codecov-commenter
Copy link

codecov-commenter commented Dec 7, 2023

Codecov Report

Attention: 13 lines in your changes are missing coverage. Please review.

Comparison is base (a801e54) 77.79% compared to head (b31c64a) 76.81%.
Report is 1 commits behind head on master.

Files Patch % Lines
stixcore/products/level0/quicklookL0.py 64.70% 6 Missing ⚠️
stixcore/products/level0/scienceL0.py 64.70% 6 Missing ⚠️
stixcore/products/common.py 93.75% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #377      +/-   ##
==========================================
- Coverage   77.79%   76.81%   -0.99%     
==========================================
  Files          65       66       +1     
  Lines        6777     6900     +123     
==========================================
+ Hits         5272     5300      +28     
- Misses       1505     1600      +95     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

* QL - LC, BKG, SPECTRA
* BSD - CPD, SCPD, VIS and SPEC
Copy link
Collaborator

@nicHoch nicHoch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the tolist looks like an error to me.

at the moment it looks like the factor 30 is hard coded
the idea is to have a time base lookup somehow in the future?

stixcore/products/common.py Show resolved Hide resolved
stixcore/products/common.py Outdated Show resolved Hide resolved
stixcore/products/product.py Show resolved Hide resolved
stixcore/products/level0/quicklookL0.py Outdated Show resolved Hide resolved
@samaloney
Copy link
Collaborator Author

Not to sure about the E2E test fails not related but wasn't expecting them either ...

Copy link
Collaborator

@nicHoch nicHoch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good to go
was the test with the latest AX ql-spectra data successful?

@samaloney
Copy link
Collaborator Author

Yea well I was able to produce fits files, I tried to compare the triggers from the QL lightcurve, background and spectra and they didn't match but hard to know if they should based on the different detector masks etc so until we get real data not much more can be done.

@samaloney samaloney merged commit f808732 into i4Ds:master Dec 19, 2023
2 of 3 checks passed
@samaloney samaloney deleted the feat-trigger-scaling branch March 21, 2024 14:05
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

Successfully merging this pull request may close these issues.

Support new scaling of triggers without compression.
3 participants