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-48019: Some drp_pipe pipelines use sourceTable_visit in the analyzePreSourceTableCore task instead of preSourceTable_visit #190

Merged
merged 3 commits into from
Dec 24, 2024

Conversation

enourbakhsh
Copy link
Contributor

No description provided.

@@ -12,7 +12,6 @@ tasks:
analyzePreSourceTableCore:
class: lsst.analysis.tools.tasks.SourceTableVisitAnalysisTask
config:
connections.data: preSourceTable_visit
connections.inputName: preSourceTable_visit
Copy link
Contributor Author

@enourbakhsh enourbakhsh Dec 7, 2024

Choose a reason for hiding this comment

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

I don't think we need to provide data here, right? Isn't inputName enough? Here is where the connections are defined for this task:
https://github.com/lsst/analysis_tools/blob/e452f7d79f336b7d8be42b4ac7a24ac7647eb724/python/lsst/analysis/tools/tasks/sourceTableVisitAnalysis.py#L35

class SourceTableVisitAnalysisConnections(
    AnalysisBaseConnections,
    dimensions=("visit", "band"),
    defaultTemplates={"inputName": "sourceTable_visit"},
):
    data = ct.Input(
        doc="Visit based source table to load from the butler",
        name="sourceTable_visit",
        storageClass="ArrowAstropy",
        dimensions=("visit", "band"),
        deferLoad=True,
    )

    camera = ct.PrerequisiteInput(
        doc="Input camera to use for focal plane geometry.",
        name="camera",
        storageClass="Camera",
        dimensions=("instrument",),
        isCalibration=True,
    )

Copy link
Contributor Author

@enourbakhsh enourbakhsh Dec 20, 2024

Choose a reason for hiding this comment

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

Changed the analysis_tools connection class to the following on this ticket:

class SourceTableVisitAnalysisConnections(
    AnalysisBaseConnections,
    dimensions=("visit", "band"),
    defaultTemplates={"inputName": "sourceTable_visit"},
):
    data = ct.Input(
        doc="Visit based source table to load from the butler",
        name="{inputName}",  # Changed this line!
        storageClass="ArrowAstropy",
        dimensions=("visit", "band"),
        deferLoad=True,
    )

    camera = ct.PrerequisiteInput(
        doc="Input camera to use for focal plane geometry.",
        name="camera",
        storageClass="Camera",
        dimensions=("instrument",),
        isCalibration=True,
    )

Copy link
Contributor

Choose a reason for hiding this comment

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

Right, the only reason we'd need to define data is if it was involved in a contract at the end of the pipeline yaml.

@@ -12,7 +12,6 @@ tasks:
analyzePreSourceTableCore:
class: lsst.analysis.tools.tasks.SourceTableVisitAnalysisTask
config:
connections.data: preSourceTable_visit
connections.inputName: preSourceTable_visit
Copy link
Contributor

Choose a reason for hiding this comment

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

Right, the only reason we'd need to define data is if it was involved in a contract at the end of the pipeline yaml.

@yalsayyad
Copy link
Contributor

Please also delete the unnecessary overrides:

@enourbakhsh
Copy link
Contributor Author

@enourbakhsh enourbakhsh merged commit 1350552 into main Dec 24, 2024
3 checks passed
@enourbakhsh enourbakhsh deleted the tickets/DM-48019 branch December 24, 2024 16:22
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.

2 participants