def mosrange(images, map): with NamedTemporaryFile() as listfile: write_file_list(listfile, [image.photrim.cub for image in images]) # listfile.flush() makes sure list is in on disk listfile.flush() isis.mosrange( fromlist = listfile.name, to = map, precision = 2, projection = 'sinusoidal', londir = 'positiveeast', londom = 180 )
def project(img_from, img_to, **options): with img_from.make_child('map') as mapfile: with img_from.make_child('lis') as fromlist: write_file_list(unicode(fromlist), [unicode(img_from)]) isis.mosrange( fromlist = fromlist, to = mapfile, precision = 2, projection = 'equirectangular' ) isis.cam2map( from_ = img_from, to = img_to, pixres = 'map', map = mapfile )
def process_image(image, title, caption): image = ImageName(splitext(image)[0]) isis.lronac2isis.print_cmd(from_=image.IMG, to=image.cub) isis.lronac2isis(from_=image.IMG, to=image.cub) isis.spiceinit(from_=image.cub) #lronaccal default is IOF calibration isis.lronaccal(from_=image.cub, to=image.cal.cub) isis.trim(from_=image.cal.cub, to=image.trim.cub, left=45, right=45) write_file_list(image.map.lis, [image.trim.cub]) isis.mosrange(fromlist=image.map.lis, to=image.nac_eqr.map, precision=2, projection='equirectangular') isis.cam2map(from_=image.trim.cub, to=image.proj.cub, pixres='map', map=image.nac_eqr.map) create_yml(image, title) create_caption(image, caption)