tuskitoo.SpectralExtraction.spectra_extraction_results module

class spectral_extraction_results_handler(spectral_extraction_results, conditions={'rsquared': 0.7}, header=None, names=None, band='NoK', name='noname', nsigmas=10, wavelength=None, relevant_keywords_header=None)[source]

Bases: object

set_names(names)[source]
unset_names()[source]
array_to_pandas()[source]

Convert array results to pandas DataFrame.

Returns:

tuple

A tuple containing the pandas DataFrame of results and the 2D model image.

static interpolate_1d(flux, nsigmas=10)[source]

Interpolate 1D flux data.

Parameters:

fluxarray-like

1D array of flux values to be interpolated.

Returns:

array-like

Interpolated 1D flux data.

Notes:

This require more analize given the posibility of what happend when we are working with a cuted 2d image,add table with parameters

static clean_pandas(pandas_no_clean, conditions={'min': {'rsquared': 0.7}})[source]

Clean pandas DataFrame based on conditions.

Parameters:

pandas_no_cleanDataFrame

The pandas DataFrame to be cleaned.

conditionsdict, optional, default={“min”: {“rsquared”: 0.7}}

Conditions for cleaning the DataFrame. The default condition is to have rsquared >= 0.7.

Returns:

DataFrame

Cleaned pandas DataFrame.

Notes:

Here will be a good idea add the posibility of decide over what “pandas” plot the column so is more clear where could be the problem

plot_2d_image_residuals(save=False)[source]
plot_1d(n_pixel, save=None)[source]
plot_column(column_name='', **kwargs)[source]
plot_spectra(obj=None, xlim=None, ylim=None, save=False, add_lines=False, xlabel=None)[source]