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

Add lsstSim PA1 test and serious bugfix tickets/DM-8551 #24

Merged
merged 1 commit into from
Jan 13, 2017
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
10 changes: 6 additions & 4 deletions bin.src/plot_jointcal_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,19 @@ def main():
help="Radius (degrees) of sources to load from reference catalog.")
parser.add_argument("-i", "--interactive", action="store_true",
help="Use interactive matplotlib backend and set ion(), in addition to saving files.")
parser.add_argument("-o", "--outdir", default=".plots",
parser.add_argument("-o", "--outdir", default="plots",
help="output directory for plots (default: $(default)s)")
parser.add_argument("-v", "--verbose", action="store_true",
help="Print extra things during calculations.")
args = parser.parse_args()

if not os.path.isdir(args.outdir):
os.mkdir(args.outdir)

butler = lsst.daf.persistence.Butler(inputs=args.repo)
dataIds = get_valid_dataIds(butler)

data_refs = [butler.dataRef('wcs', dataId=dataId) for dataId in dataIds]
visits = [data_ref.dataId['visit'] for data_ref in data_refs]
old_wcs_list = get_old_wcs_list(data_refs)

os.environ['ASTROMETRY_NET_DATA_DIR'] = args.refcat
Expand All @@ -89,10 +91,10 @@ def main():
reference = prep_reference_loader(center, args.radius*degrees)

jointcalStatistics = utils.JointcalStatistics(verbose=args.verbose)
jointcalStatistics.compute_rms(data_refs, visits, reference)
jointcalStatistics.compute_rms(data_refs, reference)

name = os.path.basename(os.path.normpath(args.repo))
jointcalStatistics.make_plots(data_refs, visits, old_wcs_list, name=name,
jointcalStatistics.make_plots(data_refs, old_wcs_list, name=name,
interactive=args.interactive, outdir=args.outdir)


Expand Down