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-31601: Add Tasks to force photometry from DataFrames #187

Merged
merged 1 commit into from Sep 14, 2021

Conversation

yalsayyad
Copy link
Contributor

Tasks seed forced photometry with ra/decl columns from
DataFrames instead of SourceCatalogs.

def __init__(self, *, config=None):
super().__init__(config=config)
self.initInputs.remove("inputSchema")
self.inputs.remove("skyMap")
Copy link
Member

Choose a reason for hiding this comment

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

This is a sign that it'd be better to make a new ABC for both concrete implementations, instead of inheriting from the other concrete impl. I'd say that's a job for another ticket, but these are going to still show up in the config.connections for this task, and it can be a real pain to remove configs with breakage. Some copy-and-paste duplication would probably be better.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, what I'm reading is that:

  1. First choice is an ABC
  2. Second choice is a non-inherited Connections class.

Copy link
Member

Choose a reason for hiding this comment

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

Yup, exactly.

Copy link
Member

Choose a reason for hiding this comment

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

...and I'm not super confident that (1) is even better than (2); I'm just guessing that is because you chose to inherit in the first place.


def runQuantum(self, butlerQC, inputRefs, outputRefs):
inputs = butlerQC.get(inputRefs)
print([i.dataId for i in inputs['refCat']])
Copy link
Member

Choose a reason for hiding this comment

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

Debug relic.

def df2RefCat(self, dfList, exposureBBox, exposureWcs):
"""Convert list of DataFrames to reference catalog

Concatenate list of DataFrames presumable from multiple patches and
Copy link
Member

Choose a reason for hiding this comment

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

"presumable" -> "presumably"?

World coordinate system to convert sky coords in ref cat to
pixel coords with which to compare with exposureBBox


Copy link
Member

Choose a reason for hiding this comment

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

Suggested change

"""Record the transformation of the reference catalog coord.
The coord recorded in the reference catalog is tranformed to the
measurement coordinate system and stored.
Parameters
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Parameters
Parameters

catalog fields. Output fields are added to the output schema.
metadata : `lsst.daf.base.PropertySet`
Plugin metadata that will be attached to the output catalog.
Notes
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Notes
Notes

Notes
-----
This can be used as the slot centroid in forced measurement when only a
reference coord exits, allowing subsequent measurements to simply refer to
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
reference coord exits, allowing subsequent measurements to simply refer to
reference coord exists, allowing subsequent measurements to simply refer to

Tasks seed forced photometry with ra/decl columns from
DataFrames instead of SourceCatalogs.
@yalsayyad yalsayyad merged commit 63cc0c1 into master Sep 14, 2021
@yalsayyad yalsayyad deleted the tickets/DM-31601 branch September 14, 2021 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants