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

DM-19857: Update for new defects ingestion. #68

Merged
merged 5 commits into from Jun 21, 2019
Merged

Conversation

SimonKrughoff
Copy link
Contributor

In light of DM-18739, we needed to update how this package manages that.

This simplifies how defects are ingested because they now come from
a known location rather than an ad hoc one.
@SimonKrughoff SimonKrughoff requested a review from mrawls May 31, 2019 18:53
@@ -142,7 +142,7 @@ def calibLocation(self):
def defectLocation(self):
"""The directory containing defect files (`str`, read-only).
"""
return self.calibLocation
return os.path.join(getPackageDir('obs_decam_data'), 'decam', 'defects')
Copy link
Member

Choose a reason for hiding this comment

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

Please do not hard-code dependencies on specific instruments into ap_verify. If defects are no longer part of the dataset format, then removing the defectLocation member would be more appropriate.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removing defectLocation required more surgery than I had hoped to do. Do you think you could have a look and suggest how best to do that?

But I agree that what I did was not right.

Copy link
Member

@kfindeisen kfindeisen Jun 7, 2019

Choose a reason for hiding this comment

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

It looks like, outside of test code, the only place where defectLocation gets used is in your call to _doIngestDefects. So it might make more sense to make that a config field in DatasetIngestConfig, which will at least be consistent with how the inputs to IngestCalibsTask are handled.

The defect location could be configured in the dataset-specific config files, but it could also be put in an obs package config override file (already supported as datasetIngest.py). I think you need to modify those files anyway because you removed config fields.

AFAIK the only obs package overrides for DatasetIngestTask are in obs_subaru and obs_decam. There's one in obs_test, but it doesn't configure defects at all.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kfindeisen I've implemented your suggestions. I've updated obs_test and obs_decam though on a different ticket since they have to be merged together anyway: tickets/DM-18739 and tickets/DM-19730 respectively. I didn't see anything to change in obs_subaru. I hope this addresses your concerns.

@mrawls if you are happy with things as they stand, will you approve this please, or let me know what else I need to do?

self.log.info("No defects to ingest, skipping...")
self.log.info("Ingesting defects...")
self._doIngestDefects(workspace.dataRepo, workspace.calibRepo, dataset.defectLocation)
self.log.info("Defects are now ingested in {0}".format(workspace.calibRepo))
Copy link
Member

Choose a reason for hiding this comment

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

Does there need to be a way to disable defect ingestion for instruments that don't use it (e.g., HSC), or is that something IngestDefectsTask takes care of?

Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like the changes in obs_decam result in ingested defects always landing in obs_decam_data. Do we even need to deal with defects in ap_verify at all anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They do not land in obs_decam_data. They land in workspace.calibRepo.

They will need to be ingested in order to use them.

Copy link
Contributor

@mrawls mrawls left a comment

Choose a reason for hiding this comment

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

I suggest getting rid of defect ingestion in ap_verify entirely and using the ingested defects from obs_decam_data, provided that will work.

self.log.info("No defects to ingest, skipping...")
self.log.info("Ingesting defects...")
self._doIngestDefects(workspace.dataRepo, workspace.calibRepo, dataset.defectLocation)
self.log.info("Defects are now ingested in {0}".format(workspace.calibRepo))
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like the changes in obs_decam result in ingested defects always landing in obs_decam_data. Do we even need to deal with defects in ap_verify at all anymore?

@SimonKrughoff
Copy link
Contributor Author

As I say above, they are not ingested into a calib repo in obs_decam_data. They still need to be put in a calib repository to use them.

Copy link
Contributor

@mrawls mrawls left a comment

Choose a reason for hiding this comment

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

This should be good to go now! Please run Jenkins on everything before merging it all.

@kfindeisen
Copy link
Member

There's a reference to defect files in doc/lsst.ap.verify/datasets-creation.rst. Would it be possible to remove that before merging?

@SimonKrughoff SimonKrughoff merged commit 111a765 into master Jun 21, 2019
@kfindeisen kfindeisen deleted the tickets/DM-19857 branch December 10, 2020 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants