elfo

elfo.process_down(i: int, path_out: str, wave: ndarray, flux_cube: ndarray, var_cube: ndarray, z: float, ra: float, dec: float, path_ex: str)

Fit the spectrum for a given row and generate the fitting results.

This function fits the spectrum of row i using the fitting results of the neighboring rows in the specified direction.

Parameters

iint

The row index for the current spectrum.

path_outstr

The directory path where the output results will be stored.

wavenp.ndarray

The wavelength array of the spectral data.

flux_cubenp.ndarray

The flux cube containing the spectral data.

var_cubenp.ndarray

The variance cube of the spectral data.

zfloat

The redshift value to apply to the spectral data.

rafloat

The right ascension coordinate of the target object.

decfloat

The declination coordinate of the target object.

path_exstr

The path to the external FITS file.

Returns

None

The function does not return any value but saves the results to the specified output path.

Examples

>>> process_down(5, './output/', wave_array, flux_cube, var_cube, 0.5, 150.7, -1.5, './path_to_fits/')
elfo.process_i(i: int, path_out: str, wave: ndarray, flux_cube: ndarray, var_cube: ndarray, z: float, ra: float, dec: float, path_ex: str)

Fit the spectrum for a given row and generate the fitting results.

This function fits the spectrum of row i by using the fitting parameters defined in a given parameter file.

Parameters

iint

The row index for the current spectrum.

path_outstr

The directory path where the output results will be stored.

wavenp.ndarray

The wavelength array of the spectral data.

flux_cubenp.ndarray

The flux cube containing the spectral data.

var_cubenp.ndarray

The variance cube of the spectral data.

zfloat

The redshift value to apply to the spectral data.

rafloat

The right ascension coordinate of the target object.

decfloat

The declination coordinate of the target object.

path_exstr

The path to the external FITS file.

Returns

None

The function does not return any value but saves the results to the specified output path.

Examples

>>> process_i(5, './output/', wave_array, flux_cube, var_cube, 0.5, 150.7, -1.5, './path_to_fits/')
elfo.process_i_refit(i_1: int, i_2: int, fits_file: str, z: float, scale_factor: int = 1, flux_cube_path: str = None, var_cube_path: str = None, format: str = 'muse')

Fit all spectra using the fitting results of adjacent rows.

This function applies the fitting results of neighboring rows to refit all spectra. The spectra in the range from row i_1 to row i_2 are fitted twice.

Parameters

i_1int

The starting row index for the first fitting.

i_2int

The starting row index for the second fitting.

fits_filestr

The path to the input fits file.

zfloat

The redshift of the target object.

scale_factorint, optional

The scale factor for rebinning the IFU spectra. The default is 1.

flux_cube_pathstr, optional

The file path to the flux cube of the IFU data. The default is None.

var_cube_pathstr, optional

The file path to the var cube of the IFU data. The default is None.

formatstr, optional

The format of the input fits file. The default is ‘muse’.

Returns

str

The path to the output directory where the results is saved.

Examples

>>> process_i_refit(80, 90, 2, 'mmt_1.fits', 0.02, 2, 'reduced2_flux.npy', 'reduced2_var.npy, 'muse')
elfo.process_j(j: int, path_out: str, wave: ndarray, flux_cube: ndarray, var_cube: ndarray, z: float, ra: float, dec: float, path_ex: str)

Fit the spectrum for a given column and generate the fitting results.

This function fits the spectrum of column j by using the fitting parameters defined in a given parameter file.

Parameters

jint

The column index for the current spectrum.

path_outstr

The directory path where the output results will be stored.

wavenp.ndarray

The wavelength array of the spectral data.

flux_cubenp.ndarray

The flux cube containing the spectral data.

var_cubenp.ndarray

The variance cube of the spectral data.

zfloat

The redshift value to apply to the spectral data.

rafloat

The right ascension coordinate of the target object.

decfloat

The declination coordinate of the target object.

path_exstr

The path to the external FITS file.

Returns

None

The function does not return any value but saves the results to the specified output path.

Examples

>>> process_j(5, './output/', wave_array, flux_cube, var_cube, 0.5, 150.7, -1.5, './path_to_fits/')
elfo.process_j_refit(j_1: int, j_2: int, fits_file: str, z: float, scale_factor: int = 1, flux_cube_path: str = None, var_cube_path: str = None, format: str = 'muse')

Fit all spectra using the fitting results of adjacent columns.

This function applies the fitting results of neighboring columns to refit all spectra. The spectra in the range from column j_1 to column j_2 are fitted twice.

Parameters

j_1int

The starting column index for the first fitting.

j_2int

The starting column index for the second fitting.

fits_filestr

The path to the input fits file.

zfloat

The redshift of the target object.

scale_factorint, optional

The scale factor for rebinning the IFU spectra. The default is 1.

flux_cube_pathstr, optional

The file path to the flux cube of the IFU data. The default is None.

var_cube_pathstr, optional

The file path to the var cube of the IFU data. The default is None.

formatstr, optional

The format of the input fits file. The default is ‘muse’.

Returns

str

The path to the output directory where the results is saved.

Examples

>>> process_i_refit(80, 90, 2, 'mmt_1.fits', 0.02, 2, 'reduced2_flux.npy', 'reduced2_var.npy, 'csst')
elfo.process_left(j: int, path_out: str, wave: ndarray, flux_cube: ndarray, var_cube: ndarray, z: float, ra: float, dec: float, path_ex: str)

Fit the spectrum for a given column and generate the fitting results.

This function fits the spectrum of column j using the fitting results of the neighboring columns in the specified direction.

Parameters

jint

The column index for the current spectrum.

path_outstr

The directory path where the output results will be stored.

wavenp.ndarray

The wavelength array of the spectral data.

flux_cubenp.ndarray

The flux cube containing the spectral data.

var_cubenp.ndarray

The variance cube of the spectral data.

zfloat

The redshift value to apply to the spectral data.

rafloat

The right ascension coordinate of the target object.

decfloat

The declination coordinate of the target object.

path_exstr

The path to the external FITS file.

Returns

None

The function does not return any value but saves the results to the specified output path.

Examples

>>> process_left(5, './output/', wave_array, flux_cube, var_cube, 0.5, 150.7, -1.5, './path_to_fits/')
elfo.process_right(j: int, path_out: str, wave: ndarray, flux_cube: ndarray, var_cube: ndarray, z: float, ra: float, dec: float, path_ex: str)

Fit the spectrum for a given column and generate the fitting results.

This function fits the spectrum of column j using the fitting results of the neighboring columns in the specified direction.

Parameters

jint

The column index for the current spectrum.

path_outstr

The directory path where the output results will be stored.

wavenp.ndarray

The wavelength array of the spectral data.

flux_cubenp.ndarray

The flux cube containing the spectral data.

var_cubenp.ndarray

The variance cube of the spectral data.

zfloat

The redshift value to apply to the spectral data.

rafloat

The right ascension coordinate of the target object.

decfloat

The declination coordinate of the target object.

path_exstr

The path to the external FITS file.

Returns

None

The function does not return any value but saves the results to the specified output path.

Examples

>>> process_right(5, './output/', wave_array, flux_cube, var_cube, 0.5, 150.7, -1.5, './path_to_fits/')
elfo.process_up(i: int, path_out: str, wave: ndarray, flux_cube: ndarray, var_cube: ndarray, z: float, ra: float, dec: float, path_ex: str)

Fit the spectrum for a given row and generate the fitting results.

This function fits the spectrum of row i using the fitting results of the neighboring rows in the specified direction.

Parameters

iint

The row index for the current spectrum.

path_outstr

The directory path where the output results will be stored.

wavenp.ndarray

The wavelength array of the spectral data.

flux_cubenp.ndarray

The flux cube containing the spectral data.

var_cubenp.ndarray

The variance cube of the spectral data.

zfloat

The redshift value to apply to the spectral data.

rafloat

The right ascension coordinate of the target object.

decfloat

The declination coordinate of the target object.

path_exstr

The path to the external FITS file.

Returns

None

The function does not return any value but saves the results to the specified output path.

Examples

>>> process_up(5, './output/', wave_array, flux_cube, var_cube, 0.5, 150.7, -1.5, './path_to_fits/')