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-35655: Remove gen2 jointcal code and tests #225

Merged
merged 4 commits into from Jul 23, 2022
Merged

Conversation

parejkoj
Copy link
Collaborator

No description provided.

Copy link
Contributor

@erykoff erykoff left a comment

Choose a reason for hiding this comment

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

A few comments, and some thoughts on how best to handle the old reference object loader task deprecation/removal.

@@ -511,11 +424,11 @@ class JointcalConfig(pipeBase.PipelineTaskConfig,
default=20,
)
astrometryRefObjLoader = pexConfig.ConfigurableField(
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should be a pexConfig.ConfigField with dtype=LoadIndexedReferenceObjectsConfig or dtype=LoadReferenceObjectsConfig. That should make the configurations work the same, and we aren't using the task via makeSubtask so the retargetable ConfigurableField isn't necessary.
As to which of the dtypes to use: If you set this to ReferenceObjectLoader (as the current PR) or LoadReferenceObjectsConfig (the config with that task) then any existing configs that set ref_dataset_name will break without first having a deprecation period. It may be that these configs have all been flushed from the system already, but I worry ... Oh, I just checked, and they haven't. Because this config wasn't previous deprecated (that was an oversight) it is currently persisted with the jointcal configs that are in recent runs. So I think this has to be dtype=LoadIndexedReferenceObjectsConfig until after 24 (assuming we can get that properly deprecated in the meantime).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, that all sounds like a good plan.

python/lsst/jointcal/jointcal.py Outdated Show resolved Hide resolved
python/lsst/jointcal/jointcal.py Outdated Show resolved Hide resolved
python/lsst/jointcal/jointcal.py Show resolved Hide resolved
@@ -1235,7 +997,7 @@ def _do_load_refcat_and_fit(self, associations, defaultFilter, center, radius,
On-sky radius to load from reference catalog.
name : `str`
Name of thing being fit: "astrometry" or "photometry".
refObjLoader : `lsst.meas.algorithms.LoadReferenceObjectsTask`
refObjLoader : `lsst.meas.algorithms.ReferenceObjectLoaderBase`
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this has to be lsst.meas.algorithms.ReferenceObjectLoader which has the actual loading code in it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah, shoot, I thought the base class defined the necessary API, but it actually doesn't. It probably should; I don't know if we plan to keep that gen2/3 compatibility base task or not (one could argue that a different gen3 refcat loader could be built using the same API).

Copy link
Contributor

Choose a reason for hiding this comment

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

The base and derived class should probably be consolidated. I don't think anything would be referring to be base on its own (because as you have noticed, it doesn't actually do anything useful).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I wrote that base class! It does something very useful: gave the gen3 loader functionality that it was missing and got rid of a lot of bugs in it! I think the problem in using it to define an API was that the gen2/gen3 loaders didn't share an API in their e.g. LoadPixelBox methods. I could see using it to define a gen3 refloader API having some utility.

Copy link
Contributor

Choose a reason for hiding this comment

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

It definitely needed to exist as long as gen2 was around. My point is that the need for a split between base and derived is probably no longer necessary and the two could be spliced together.

python/lsst/jointcal/jointcal.py Outdated Show resolved Hide resolved
python/lsst/jointcal/jointcal.py Outdated Show resolved Hide resolved
Cleanup comments referring to gen2 or gen3.

dataIds.py was only used by the gen2 test runner to identify visits to load in
each tract.
This is done via Connections in gen3, and has been marked deprecated
for years.
LoadIndexedReferenceObjectsTask and ref_dataset_name are gen2 only, but we have
to keep using the former for the ConfigField until it has followed one
deprecation cycle (`ref_dataset_name` exists in currently-used configs).
@parejkoj parejkoj merged commit fedbb5d into main Jul 23, 2022
@parejkoj parejkoj deleted the tickets/DM-35655 branch July 23, 2022 00:12
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