def main(args): dist_map = extract_dist_map(args.solution) catpath = os.path.join(os.getcwd(), 'catcache') if os.path.isdir(catpath): shutil.rmtree(catpath) if not args.reduced: fname = remove_overscan_strips(args.filename) else: fname = args.filename print('Frame {} will be altered'.format(fname)) assert image_size(fname) == (2048, 2048), ("Image incorrect shape, " "should be 2048x2048, is {}".format( image_size(fname))) initialise_wcs_cache(fname, wcsref=args.wcsref, thresh=20.0, verbose=False, force=True) casu_solve_old(fname, wcsref=args.wcsref, dist_map=dist_map)
def main(args): dist_map = extract_dist_map(args.solution) catpath = os.path.join(os.getcwd(), "catcache") if os.path.isdir(catpath): shutil.rmtree(catpath) if not args.reduced: fname = remove_overscan_strips(args.filename) else: fname = args.filename print("Frame {} will be altered".format(fname)) assert image_size(fname) == (2048, 2048), "Image incorrect shape, " "should be 2048x2048, is {}".format( image_size(fname) ) initialise_wcs_cache(fname, wcsref=args.wcsref, thresh=20.0, verbose=False, force=True) casu_solve_old(fname, wcsref=args.wcsref, dist_map=dist_map)
def test_exception_for_invalid_filetype(): with pytest.raises(ValueError) as err: a.extract_dist_map('test.bad')
def test_load_fits_file(fits_file, solution): dist_map = a.extract_dist_map(fits_file) assert_same_solutions(dist_map, solution['wcs'])
def dist_map(): fname = os.path.join(TESTDIR, "fixtures", "wcs_params.json") return w.extract_dist_map(fname)