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-31062: Use the plugin name by default #15

Merged
merged 1 commit into from
Jul 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/lsst/meas/extensions/gaap/_gaap.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def _getGaapResultName(scalingFactor: float, sigma: Union[float, str], name: Opt
return suffix
return "_".join((name, suffix))

def getAllGaapResultNames(self, name: Optional[str] = None) -> Generator[str]:
def getAllGaapResultNames(self, name: Optional[str] = PLUGIN_NAME) -> Generator[str]:
"""Generate the base names for all of the GAaP fields.

For example, if the plugin is configured with `scalingFactors` = [1.15]
Expand Down
2 changes: 1 addition & 1 deletion tests/test_gaap.py
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ def testMonteCarlo(self, noise, recordId=1, sigmas=[0.7, 1.0, 1.25],
catalog.append(record)

catalog = catalog.copy(deep=True)
for baseName in gaapConfig.getAllGaapResultNames(name="ext_gaap_GaapFlux"):
for baseName in gaapConfig.getAllGaapResultNames():
instFluxKey = schema.join(baseName, "instFlux")
instFluxErrKey = schema.join(baseName, "instFluxErr")
instFluxMean = catalog[instFluxKey].mean()
Expand Down