fitspy.spectra_map module

Class dedicated to handle ‘Spectrum’ objects from a 2D map managed by SpectraMap

class fitspy.spectra_map.SpectraMap

Bases: Spectra

Class dedicated to handle ‘Spectrum’ objects from a 2D map

fname

Pathname associated to the loaded object

Type:

str

xy_map

Lists of x and y coordinates used in the 2D-map

Type:

tuple of 2 list

shape_map

Shape associated to the 2D-map

Type:

tuple of 2 ints

extent

bounding box in data coordinates that the image will fill specified as (xmin, xmax, ymin, ymax)

Type:

iterable of 4 floats

coords

List containing the (x,y) coordinates for each spectrum in the 2D-map

Type:

list of list of 2 floats

intensity

Array of spectra intensities (n-values) associated to the xy_map coords

Type:

numpy.ndarray(((len(shape_map[0]) * len(shape_map[1]), n))

arr

Array associated to the xy_map coords

Type:

numpy.ndarray((len(shape_map[0]), len(shape_map[1]))

ax

Axis associated to the 2D-map displaying

Type:

Matplotlib.pyplot.axis

img

Image related to the 2D-map displaying

Type:

Matplotlib.image.AxesImage

cbar

Colorbar associated to the spectra 2D-map displaying

Type:

Matplotlib.pyplot.colorbar

ax_slider

Axis associated to the RangeSlider object

Type:

Matplotlib.pyplot.axis

slider

Slider associated to the intensity integration range or to a model parameter in the 2D-map displaying

Type:

Matplotlib.widgets.RangeSlider

xrange

Range of intensity to consider in the 2D-map displaying

Type:

tuple of 2 floats

create_map(fname)

Create map

spectrum_coords(spectrum)

Return the (x, y) map coordinates associated with ‘spectrum’

spectrum_indices(spectrum)

Return the (i, j) map indices associated with ‘spectrum’

plot_map(ax)

Plot the integrated spectra map intensities on ‘ax’

plot_map_update(xrange=None, var='Intensity', label='', vmin=None, vmax=None)

Update ‘plot_map’ with intensity or models parameter passed through ‘var’ and ‘label’

export_to_csv(fname)

Export ‘arr’ class attribute in a .csv file named ‘fname’

static load_map(fname)

Return a SpectraMap object from .txt file issued from labspec files conversion