cube_cut_from_footprint
- astrocut.cube_cut_from_footprint(coordinates: Union[str, SkyCoord], cutout_size, sequence: Optional[Union[int, List[int]]] = None, product: str = 'SPOC', memory_only=False, output_dir: str = '.', verbose: bool = False) Union[List[str], List[HDUList]][source]
Generates cutouts around
coordinatesof sizecutout_sizefrom image cube files hosted on the S3 cloud.- Parameters
- coordinatesstr or
astropy.coordinates.SkyCoordobject The position around which to cutout. It may be specified as a string (“ra dec” in degrees) or as the appropriate
SkyCoordobject.- cutout_sizeint, array-like,
Quantity The size of the cutout array. If
cutout_sizeis a scalar number or a scalarQuantity, then a square cutout ofcutout_sizewill be created. Ifcutout_sizehas two elements, they should be in(ny, nx)order. Scalar numbers incutout_sizeare assumed to be in units of pixels.Quantityobjects must be in pixel or angular units.- sequenceint, List[int], optional
Default None. Sequence(s) from which to generate cutouts. Can provide a single sequence number as an int or a list of sequence numbers. If not specified, cutouts will be generated from all sequences that contain the cutout. For the TESS mission, this parameter corresponds to sectors.
- productstr, optional
Default ‘SPOC’. The product type to make the cutouts from.
- memory_onlybool, optional
Default False. If True, the cutouts are stored in memory and not written to disk.
- output_dirstr, optional
Default ‘.’. The path to which output files are saved. The current directory is default.
- verbosebool, optional
Default False. If True, intermediate information is printed.
- coordinatesstr or
- Returns
- cutout_fileslist
List of paths to the cutout files if
memory_onlyis False. Ifmemory_onlyis True, returns a list of cutouts as memory objects.
Examples
>>> from astrocut import cube_cut_from_footprint >>> cube_cut_from_footprint( ... coordinates='83.40630967798376 -62.48977125108528', ... cutout_size=64, ... sequence=[1, 2], # TESS sectors ... product='SPOC', ... output_dir='./cutouts') ['./cutouts/tess-s0001-4-4/tess-s0001-4-4_83.406310_-62.489771_64x64_astrocut.fits', './cutouts/tess-s0002-4-1/tess-s0002-4-1_83.406310_-62.489771_64x64_astrocut.fits']