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

Nightqa v3 #1535

Merged
merged 13 commits into from Dec 20, 2021
Merged

Nightqa v3 #1535

merged 13 commits into from Dec 20, 2021

Conversation

araichoor
Copy link
Contributor

This PR adds few modifications to the nightqa page creation.
The principal motivation is to move away from restricting to Main tiles only.
The chosen approach now considers all OBSTYPE="SCIENCE" exposures.

For the sframesky, tileqa, skyzfiber plots, we thus now include any SCIENCE observations.
The reason is because the type of survey should not prevent to inspect the exposures quality on those plots.

For the petalnz plot, we proceed a bit differently, as we stack the n(z) per tracer, per night.
We here:

  • restrict to sv1, sv2, sv3, main (which conveniently have the same bits for the 5 plotted tracers);
  • we make a serie of plots for each survey of the night;
  • we still generate one file only.

Along the way, several changes - hopefully improvements:

  • get_surveys_night_expids(): not using NTSSURVY anymore, we now rely on the fiberassign file which should be in the same folder as the desi-EXPID.fits.fz file
  • write_nightqa_html(): look for possible nightlog filenames
  • desi_night_qa: add a --steps argument to allow to execute only some steps
  • protect against cases where no DARK exposure is found
  • replace sys.exit(1) by some raise Errors

I've run it on what is currently processed in $DESI_ROOT/spectro/redux/f3:
https://data.desi.lbl.gov/desi/users/raichoor/nightqa_v3_dev/f3
(though note that those files may change if I do further developments/tests for this PR)

From a quick random spot checking of those: https://data.desi.lbl.gov/desi/users/raichoor/nightqa_v3_dev/f3/20210511/dark-20210511.pdf => r1 has very funny/dubious masked pixels distribution.

@coveralls
Copy link

coveralls commented Dec 16, 2021

Coverage Status

Coverage decreased (-0.02%) to 25.637% when pulling c6d1fcf on nightqa_v3 into 8be844e on master.

Copy link
Contributor

@sbailey sbailey left a comment

Choose a reason for hiding this comment

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

Looks good, thanks. I think you found a cosmic ray shower in r1. I put two minor comments in line, but ok to merge whenever you are ready.

py/desispec/night_qa.py Outdated Show resolved Hide resolved
py/desispec/night_qa.py Outdated Show resolved Hide resolved
py/desispec/night_qa.py Show resolved Hide resolved
@araichoor
Copy link
Contributor Author

Good you waited to merge: I've noticed that I forgot to push my last commit last night: I've just done it (0c3bad2).
It's a simple "if enough tiles" case in the create_petalnz_pdf() function.
And I've also made the two small changes you noticed (thanks for the careful code reading!).

So I think I'm good on my side.

@sbailey sbailey merged commit 05cfa67 into master Dec 20, 2021
@sbailey sbailey deleted the nightqa_v3 branch December 20, 2021 21:27
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.

None yet

3 participants