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

QL config update and fibermap conform #699

Merged
merged 19 commits into from Oct 19, 2018

Conversation

Srheft
Copy link
Contributor

@Srheft Srheft commented Oct 11, 2018

This PR:

  • updates arc configuration file
  • migrates to science config for all three science programs [dark,gray,bright]
  • moderate edits to XWSigma and SNR, calculation algorithm and few other QA calculations

@sbailey please see ticket #698.
Keeping with our general rule, this PR will be tested in QLF [with new format data] before merge.

@Srheft
Copy link
Contributor Author

Srheft commented Oct 15, 2018

@felipelm since I don't have writing privileges there please copy the new redwood data set [night 20200515] that QL/F have to work with, from this address on NERSC: /project/projectdirs/desi/datachallenge/redwood/20200515 onto desi-1.

This PR only has two changes for QLF:

  1. Exactly where it exists in the mapping for the Science exposures, XWSigma should be added to CHECK_CCD step for arc exposures processing as well.

  2. instead of having three configuration files for science exposure processing (they were called qlconfig_darksurvey.yaml, qlconfig_brightsurvey.yaml, qlconfig_graysurvey.yaml), there is now only one configuration file called qlconfig_science.yaml. QLF should just make sure to call this config file for all science processing regardless of the dark/gray/bright programs. The internal changes to this file should not affect QLF. The merged json file has the same structure and same status key names.

let me know if it would be helpful to create a PR for the changes on the qlf side. Thanks.

@felipelm
Copy link
Member

@Srheft you have the same permissions as I because we use the same quicklook user.

Ok, I'll make a PR on qlf with these changes and reference here.

@Srheft
Copy link
Contributor Author

Srheft commented Oct 16, 2018

@felipelm last time I tried to copy data on /data directory it said permission denied. Will you copy the redwood data or I should go ahead and do that?

@felipelm
Copy link
Member

@Srheft I think @sbailey protected the exposures directory to avoid changing or deleting the files.

I also don't have the permissions to change the raw exposures directory.

@Srheft
Copy link
Contributor Author

Srheft commented Oct 16, 2018

Ok Thanks for letting me know, @felipelm.
This week is the Barcelona meeting week so hopefully at some point @sbailey find some time to copy the data there. But this PR should be working with 20191001 too so please let me know if the two changes I mentioned above require me to create a PR for qlf.

@felipelm
Copy link
Member

felipelm commented Oct 16, 2018

@Srheft

Got errors running 20191001 exposure 00003578 camera b0 (log is upside down first line is the last and so on):

2018-10-16 13:19:24,153 QuickLook INFO : Running Calc_XWSigma
UnboundLocalError: local variable 'refval' referenced before assignment
    reflist=isinstance(refval,(np.ndarray,collections.Sequence))
  File "/app/desispec/py/desispec/quicklook/qas.py", line 200, in __call__
    res=qa(inp,**qargs)
  File "/app/desispec/py/desispec/quicklook/quicklook.py", line 302, in runpipeline
Traceback (most recent call last):
2018-10-16 13:19:24,126 QuickLook WARNING : Failed to run QA Count_Pixels. Got Exception local variable 'refval' referenced before assignment
2018-10-16 13:19:24,126 Count_Pixels WARNING : No reference given. Update the configuration file to include reference value for QA: Count_Pixels
2018-10-16 13:19:24,053 QuickLook INFO : Running Count_Pixels
UnboundLocalError: local variable 'refval' referenced before assignment
    reflist=isinstance(refval,(np.ndarray,collections.Sequence))
  File "/app/desispec/py/desispec/quicklook/qas.py", line 200, in __call__
    res=qa(inp,**qargs)
  File "/app/desispec/py/desispec/quicklook/quicklook.py", line 302, in runpipeline
Traceback (most recent call last):
2018-10-16 13:19:23,967 QuickLook WARNING : Failed to run QA Get_RMS. Got Exception local variable 'refval' referenced before assignment
2018-10-16 13:19:23,967 Get_RMS WARNING : No reference given. Update the configuration file to include reference value for QA: Get_RMS
2018-10-16 13:19:23,450 QuickLook INFO : Running Get_RMS
UnboundLocalError: local variable 'refval' referenced before assignment
    reflist=isinstance(refval,(np.ndarray,collections.Sequence))
  File "/app/desispec/py/desispec/quicklook/qas.py", line 200, in __call__
    res=qa(inp,**qargs)
  File "/app/desispec/py/desispec/quicklook/quicklook.py", line 302, in runpipeline
Traceback (most recent call last):
2018-10-16 13:19:23,394 QuickLook WARNING : Failed to run QA Bias_From_Overscan. Got Exception local variable 'refval' referenced before assignment
2018-10-16 13:19:23,393 Bias_From_Overscan WARNING : No reference given. Update the configuration file to include reference value for QA: Bias_From_Overscan
...

@Srheft
Copy link
Contributor Author

Srheft commented Oct 16, 2018

Yeah this is one change I had to make because of the redwood data. I'll see how can i make it to work for both. Lack of key 'PROGRAM' made me do some changes. Could you try an arc and make the change I mentioned to arc processing?

@felipelm
Copy link
Member

Arc ran fine but arc XWsigma plot didn't work so I'm trying to debug it now.

@Srheft
Copy link
Contributor Author

Srheft commented Oct 16, 2018

Yeah this PR has added xwsigma in arc. Thanks.

@felipelm
Copy link
Member

@Srheft seems like GENERAL_INFO ra and dec are null values and we expect an array size 500 for each.

@felipelm
Copy link
Member

Running 20191001 exposure 00003571 camera b0

@Srheft
Copy link
Contributor Author

Srheft commented Oct 16, 2018

calibration frames [flat and arc] are not pointed at any set of astronomical objects so the RA DEC arrays are empty. one would only look for them in a science exposure.

@felipelm
Copy link
Member

@felipeaoli care to give your input on this plot?

@Srheft
Copy link
Contributor Author

Srheft commented Oct 16, 2018

you mean the xwsigma plot for arc? the xwsigma plot for any flavor is created here: xsigma plot
This is an example of arc 00000001 camera b0 - the empty panels if exist, will be dealt with
ql-xwsigma-b0-00000001

@felipeaoli
Copy link
Contributor

Thanks @Srheft and @felipelm . I'm doing a large revision on the plots and I'll add this one.

@felipeaoli
Copy link
Contributor

@Srheft we also use reference values in color maps for some cases.

@Srheft
Copy link
Contributor Author

Srheft commented Oct 19, 2018

@felipeaoli oh not only I did not know that, I also don't know what color map in this context :)

update: upon remembering bokeh graphics, I just got what you meant :)

@felipelm is everything ok with the science exposure runs now?

@felipelm
Copy link
Member

@Srheft just finish testing and everything seems ok now.

@Srheft
Copy link
Contributor Author

Srheft commented Oct 19, 2018

@felipelm et al thank you very much! I'll proceed with the merge after @rkehoe gave his final remarks.

@felipeaoli felipeaoli merged commit 2ae6c02 into master Oct 19, 2018
@Srheft
Copy link
Contributor Author

Srheft commented Oct 19, 2018

@felipeaoli did you merge this PR?

@Srheft
Copy link
Contributor Author

Srheft commented Oct 19, 2018

@felipelm could you let me know why this merge happened?

@felipeaoli
Copy link
Contributor

sorry, I was answering another PR and made a mistake

@Srheft
Copy link
Contributor Author

Srheft commented Oct 19, 2018

@felipeaoli I don't see this being reverted. I still see this branch merged.

@felipelm
Copy link
Member

@felipeaoli @Srheft you have to merge the other PR to revert the changes on master and open a new one with this changes

@Srheft
Copy link
Contributor Author

Srheft commented Oct 19, 2018

@felipelm i don't know what is going on here.

@felipelm
Copy link
Member

felipelm commented Oct 19, 2018

@Srheft

@felipeaoli accidentally merged this pull request to master and opened a new one to revert this merge #701

To undo the merge you will have to:

  1. Merge Revert "QL config update and fibermap conform" #701 into master
  2. Open a new pull request using the branch qlconform_NewFibMap_XWSigUpdate

@rkehoe
Copy link
Contributor

rkehoe commented Oct 19, 2018

@felielm and @felipeaoli Please do not merge QL branches/PRs. These should only be merged by @Srheft or myself (or @sbailey) because we are aware of any internal reviews, tests or edits we are pursuing. PR #701 unfortunately does not retain the comment history, and I am unclear on the status of master at this point. @sbailey could you please indicate if master has still the merged code, or has been returned to the pre-merge basis?

Please do no further merge until I can finish examining the final edits. Assuming master is in a pre-merge state, we will merge the outstanding PR.

@felipeaoli
Copy link
Contributor

Sure @rkehoe . This was exclusively my fault, I accidentally merged it. I'm very sorry

@rkehoe
Copy link
Contributor

rkehoe commented Oct 19, 2018

@felipeaoli I accept your apology, but then why did you create another PR #702? I have to be clear: do not continue to try to 'fix' this situation in desispec.

@Srheft This PR (#699) looks good and accomplishes the tasks of converging science configs, evening out calibration exposure processing chains, and further improving fitting QAs like XWSigma and SNR. There appears to be another PR built to restore this one, so I am further confused as to the status of this code. I have only one suggestion before signing off on this PR as it was originally before the accidental merge: I think you can go ahead and remove the now obsolete darksurvey, brightsurvey and _graysurvey_configs. We just have science now. I have some other questions/suggestions, but aside from removing the obsolete configs, these should not hold up a final merge of this code.

If master has been restored to pre-merge status, then this PR (#699) should still be able to be remerged into master. We can chat about how to proceed offline. I will contact you this afternoon.

@Srheft
Copy link
Contributor Author

Srheft commented Oct 19, 2018

@rkehoe Thanks. given the circumstances, I prefer to withdraw from any further action on this PR until @sbailey could take a look and do what has to be done. I'll apply your suggestions in the next PR (I would add them here if Stephen confirms that it is safe to do so).

@sbailey
Copy link
Contributor

sbailey commented Oct 23, 2018

@rkehoe once a PR has been merged, it can't be re-merged. What can be done is open a new PR to undo (revert) the accidental merge changes (which @felipeaoli did with PR #701), and then when ready open a new PR to perform the same merge as the original PR when ready (which is what he prepared with PR #702, which correctly references this PR for traceability, but hasn't been merged yet).

@felipelm and @Srheft : please deploy the equivalent of PR #702 and desihub/qlf#253 on http://desi-1.kpno.noao.edu:9090 . When that is tested and it all works together we can proceed with merging those two PRs. desi-1 was offline yesterday for cooling system maintenance but it is back today.

@felipelm
Copy link
Member

@Srheft @sbailey

I've made the deploy of #702 using desihub/qlf#253 on http://desi-1.kpno.noao.edu:9090

Ran arc, flat, and three science (dark, gray, bright) exposures and seems to be working fine. All plots are showing with the changes made using the new science config file and xwsigma is now showing on arcs CHECK_CCDs.

Seems like the production database is not up so http://desi-1.kpno.noao.edu:9000/ backend is offline.

@Srheft
Copy link
Contributor Author

Srheft commented Oct 24, 2018

@felipelm great, thank you.

@rkehoe
Copy link
Contributor

rkehoe commented Oct 24, 2018

@sbailey. Thanks for the clarification. I had thought I had seen a different usage, so good to know going forward.

@Srheft Please merge the final PR #702 when any remaining updates tests are done. If you prefer to hold the original updates to #699 for a subsequent PR, that’s okay for me.

@Srheft
Copy link
Contributor Author

Srheft commented Oct 24, 2018

@rkehoe sure. Just one last check with Stephen:
@sbailey did you also want to do some high level tests on desi-1 or given that @felipelm observed no problem, we are ok to merge?

@sbailey
Copy link
Contributor

sbailey commented Oct 24, 2018

@Srheft @felipelm @rkehoe : let's merge #702 and deishub/qlf#253 and then make new tags. I have meetings for the next 2 hours, but if you haven't made the merges by then I can do it. I'll submit tickets for any problems I find on
http://desi-1.kpno.noao.edu:9090/ so that we don't further delay these PRs. Thanks.

@rkehoe from git diff, #699 and #702 have identical code changes and differ only by #702 having more recent changes.rst and _version.py updates. i.e. I don't think there are any "original updates to #699 for a subsequent PR" that are not already included in #702. If you know of something that is missing from #702, please point that out. Thanks.

Srheft added a commit that referenced this pull request Oct 24, 2018
…revert

QL config update and fibermap conform - #699 changes
@rkehoe
Copy link
Contributor

rkehoe commented Oct 24, 2018

@sbailey. There were three potential small updates, one of which was mentioned in my comment 5 days ago (eg. Removing the now obsolete dark/gray/bright Survey configuration in favor of the merged config). Two others I discussed offline w/@Srfheft, one I remember was about choice of arc-lines to look at in the configuration. None of the three were implemented yet into #699 — they were about to be before the accidental merge. They are not necessary for this PR or #702, but we agreed to do them. They can be in a subsequent PR, for sure.

@sbailey
Copy link
Contributor

sbailey commented Oct 24, 2018

@rkehoe thanks for the info. +1 for including these changes in separate smaller PRs. The code from this PR has been merged via #702 and tagged as desispec/0.25.0 .

@rkehoe rkehoe deleted the qlconform_NewFibMap_XWSigUpdate branch November 13, 2018 21:04
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

6 participants