casda_prepare
Prepare files for CASDA upload
Attributes
Functions
|
Command line interface |
|
Convert a PDF to a PNG |
|
Convert a ascii spectrum to FITS |
|
Find Stokes I image cubelets in a directory |
|
Find plots in a directory |
|
Find spectra in from cutouts directory |
|
|
|
Main function |
|
|
|
Update cube headers and symlink to CASDA area |
|
Write the polspectra to a FITS file. |
Module Contents
- casda_prepare.convert_pdf(pdf_file: str, plots_dir: str, spec_dir: str) None [source]
Convert a PDF to a PNG
- Parameters:
pdf_file (str) – PDF file to convert
- casda_prepare.convert_spectra(number: int, spectrum: str, fname_polcat_hash: str, spec_dir: str = '.') str [source]
Convert a ascii spectrum to FITS
- Parameters:
spectrum (str) – Name of ASCII spectrum file
spec_dir (str, optional) – Directory to save FITS spectrum. Defaults to ‘.’.
- casda_prepare.find_cubes(data_dir: str = '.') list [source]
Find Stokes I image cubelets in a directory
- Parameters:
data_dir (str, optional) – Data containg cutouts directory. Defaults to “.”.
- Returns:
List of cubelets
- Return type:
list
- casda_prepare.find_plots(data_dir: str = '.') list [source]
Find plots in a directory
- Parameters:
data_dir (str, optional) – Data containg cutouts directory. Defaults to “.”.
- Returns:
List of plots
- Return type:
list
- casda_prepare.find_spectra(data_dir: str = '.') list [source]
Find spectra in from cutouts directory
- Parameters:
data_dir (str, optional) – Directory containing cutouts directory. Defaults to “.”.
- Returns:
List of spectra in ascii format
- Return type:
list
- casda_prepare.main(polcatf: str, data_dir: str = '.', prep_type: str = 'test', do_update_cubes: bool = False, do_convert_spectra: bool = False, do_convert_plots: bool = False, verbose: bool = False, batch_size: int = 10, outdir=None)[source]
Main function
- casda_prepare.update_cube(cube: str, cube_dir: str) None [source]
Update cube headers and symlink to CASDA area
- Parameters:
cube (str) – Cubelet path
cube_dir (str) – CASDA cublet directory
- casda_prepare.write_polspec(table: astropy.table.Table, filename: str, overwrite: bool = False)[source]
Write the polspectra to a FITS file. :Parameters: * table – astropy.table.Table
filename – str Name and relative path of the file to save to.
overwrite – bool [False] Overwrite the file if it already exists?