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- 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