casda_prepare ============= .. py:module:: casda_prepare .. autoapi-nested-parse:: Prepare files for CASDA upload .. !! processed by numpydoc !! Attributes ---------- .. autoapisummary:: casda_prepare.TQDM_OUT Functions --------- .. autoapisummary:: casda_prepare.cli casda_prepare.convert_pdf casda_prepare.convert_spectra casda_prepare.find_cubes casda_prepare.find_plots casda_prepare.find_spectra casda_prepare.init_polspec casda_prepare.main casda_prepare.make_thumbnail casda_prepare.update_cube casda_prepare.write_polspec Module Contents --------------- .. py:function:: cli() Command line interface .. !! processed by numpydoc !! .. py:function:: convert_pdf(pdf_file: str, plots_dir: str, spec_dir: str) -> None Convert a PDF to a PNG :Parameters: **pdf_file** (*str*) -- PDF file to convert .. !! processed by numpydoc !! .. py:function:: convert_spectra(number: int, spectrum: str, fname_polcat_hash: str, spec_dir: str = '.') -> str 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 '.'. .. !! processed by numpydoc !! .. py:function:: find_cubes(data_dir: str = '.') -> list Find Stokes I image cubelets in a directory :Parameters: **data_dir** (*str, optional*) -- Data containing cutouts directory. Defaults to ".". :returns: List of cubelets :rtype: list .. !! processed by numpydoc !! .. py:function:: find_plots(data_dir: str = '.') -> list Find plots in a directory :Parameters: **data_dir** (*str, optional*) -- Data containing cutouts directory. Defaults to ".". :returns: List of plots :rtype: list .. !! processed by numpydoc !! .. py:function:: find_spectra(data_dir: str = '.') -> list Find spectra in from cutouts directory :Parameters: **data_dir** (*str, optional*) -- Directory containing cutouts directory. Defaults to ".". :returns: List of spectra in ascii format :rtype: list .. !! processed by numpydoc !! .. py:function:: init_polspec(casda_dir: str, spectrum_table_0: str, outdir: str = '') .. py:function:: 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) Main function .. !! processed by numpydoc !! .. py:function:: make_thumbnail(cube_f: str, cube_dir: str) .. py:function:: update_cube(cube: str, cube_dir: str) -> None Update cube headers and symlink to CASDA area :Parameters: * **cube** (*str*) -- Cubelet path * **cube_dir** (*str*) -- CASDA cublet directory .. !! processed by numpydoc !! .. py:function:: write_polspec(table: astropy.table.Table, filename: str, overwrite: bool = False) 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? .. !! processed by numpydoc !! .. py:data:: TQDM_OUT