-
Notifications
You must be signed in to change notification settings - Fork 8
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-4848: Measure photometric repeatability and correctness of reported errors #3
Changes from all commits
7c9e3c1
d2e3d11
883fcf0
efa36de
df653f5
7e51717
9a222dc
4e3b652
fd95e34
80282be
d7cc23f
d1f96e6
c439dff
e12538f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,15 +25,12 @@ | |
import os.path | ||
import sys | ||
|
||
from lsst.validate.drp import checkAstrometry | ||
from lsst.validate.drp import checkAstrometryPhotometry | ||
|
||
|
||
def defaultData(repo): | ||
# List of visits to be considered | ||
visits = [850587] | ||
|
||
# Reference visit (the other viisits will be compared to this one | ||
ref = 849375 | ||
visits = [849375, 850587] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This list of visits & CCDs seems to simply be a repetition of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will be done as part of DM-4901 |
||
|
||
# List of CCD to be considered (source calalogs will be concateneted) | ||
ccd = [12, 13, 14, 21, 22, 23] | ||
|
@@ -42,13 +39,12 @@ def defaultData(repo): | |
# Reference values for the median astrometric scatter and the number of matches | ||
good_mag_limit = 21.0 | ||
medianRef = 25 | ||
matchRef = 5600 | ||
matchRef = 5000 | ||
|
||
visitDataIds = [[{'visit': v, 'filter': filter, 'ccd': c} for v in visits] | ||
visitDataIds = [{'visit': v, 'filter': filter, 'ccd': c} for v in visits | ||
for c in ccd] | ||
refDataIds = [{'visit': ref, 'filter': filter, 'ccd': c} for c in ccd] | ||
|
||
return visitDataIds, refDataIds, good_mag_limit, medianRef, matchRef | ||
return visitDataIds, good_mag_limit, medianRef, matchRef | ||
|
||
if __name__ == "__main__": | ||
if len(sys.argv) != 2: | ||
|
@@ -62,5 +58,5 @@ def defaultData(repo): | |
print("Could not find repo %r" % (repo,)) | ||
sys.exit(1) | ||
|
||
visitDataIds, refDataIds, good_mag_limit, medianRef, matchRef = defaultData(repo) | ||
checkAstrometry.run(repo, visitDataIds, refDataIds, good_mag_limit, medianRef, matchRef) | ||
args = defaultData(repo) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I realise it's only being use to copy from one line to the next, but
or similar. |
||
checkAstrometryPhotometry.run(repo, *args) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
#!/usr/bin/env python | ||
|
||
# LSST Data Management System | ||
# Copyright 2008-2016 AURA/LSST. | ||
# | ||
# This product includes software developed by the | ||
# LSST Project (http://www.lsst.org/). | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the LSST License Statement and | ||
# the GNU General Public License along with this program. If not, | ||
# see <https://www.lsstcorp.org/LegalNotices/>. | ||
|
||
from __future__ import print_function | ||
|
||
import os.path | ||
import sys | ||
|
||
from lsst.validate.drp import checkAstrometryPhotometry | ||
|
||
|
||
def defaultData(repo): | ||
# List of visits to be considered | ||
visits = [176837, 176839, 176840, 176841, 176842, 176843, 176844, 176845, 176846] | ||
|
||
# List of CCD to be considered (source catalogs will be concateneted) | ||
ccd = [10, 11, 12, 13, 14, 15, 16, 17, 18] | ||
filter = 'z' | ||
|
||
# Reference values that the DECam analysis should pass | ||
# for the median astrometric scatter and the number of matches | ||
good_mag_limit = 21 # [mag] | ||
medianRef = 25 # [arcsec] | ||
matchRef = 10000 # [number of stars] | ||
|
||
visitDataIds = [{'visit': v, 'filter': filter, 'ccdnum': c} for v in visits | ||
for c in ccd] | ||
|
||
return visitDataIds, good_mag_limit, medianRef, matchRef | ||
|
||
if __name__ == "__main__": | ||
if len(sys.argv) != 2: | ||
print("""Usage: valid_cosmos repo | ||
where repo is the path to a repository containing the output of processCcd | ||
""") | ||
sys.exit(1) | ||
|
||
repo = sys.argv[1] | ||
if not os.path.isdir(repo): | ||
print("Could not find repo %r" % (repo,)) | ||
sys.exit(1) | ||
|
||
args = defaultData(repo) | ||
checkAstrometryPhotometry.run(repo, *args) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
validateCfht.py
andvalidateDecam.py
are very nearly the same thing modulo some numbers. Do they really need to be completely separate pieces of code? It would seem more natural to have aValidateTask
containing all the boilerplate and with subclasses for CFHT and DECam (and other instrumentation in future, one assumes), or even to have a single validation task with appropriate configuration parameters so it can address different instruments.(I have effectively the same comments on both pieces of code, and won't repeat them.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! Integrating and generalizing validateCfht.py and validateDecam.py and having instead a general script that reads a parameter file is DM-4901 and will tackled then.