OSIRIS

class breads.instruments.OSIRIS(filename=None, skip_baryrv=False)[source]

Bases: Instrument

Initialize instrument

Parameters:
ins_type
verbose

Methods Summary

broaden(wvs, spectrum[, loc, mppool])

Broaden a spectrum to the resolution of this data object using the resolution attribute (self.R).

calibrate(SkyCalibObj[, allowed_range])

SkyCalibObj can be either an object of an SkyCalibration object, or the path+filename of the fits file that SkyCalibration generates.

crop_image(x_range, y_range)

read_data_file(filename[, skip_baryrv])

Read OSIRIS spectral cube, also checks validity at the end

remove_bad_pixels([chunks, mypool, ...])

set_noise([method, num_threads, wid_mov, ...])

set_reference_position(value)

trim_data(trim)

Methods Documentation

broaden(wvs, spectrum, loc=None, mppool=None)[source]

Broaden a spectrum to the resolution of this data object using the resolution attribute (self.R). LSF is assumed to be a 1D gaussian. The broadening is technically fiber dependent so you need to specify which fiber calibration to use.

Args:

wvs: Wavelength sampling of the spectrum to be broadened. spectrum: 1D spectrum to be broadened. loc: To be ignored. Could be used in the future to specify (x,y) position if field dependent resolution is

available.

mypool: Multiprocessing pool to parallelize the code. If None (default), non parallelization is applied.

E.g. mppool = mp.Pool(processes=10) # 10 is the number processes

Return:

Broadened spectrum

calibrate(SkyCalibObj, allowed_range=(-1, 1))[source]

SkyCalibObj can be either an object of an SkyCalibration object, or the path+filename of the fits file that SkyCalibration generates.

crop_image(x_range, y_range)[source]
read_data_file(filename, skip_baryrv=False)[source]

Read OSIRIS spectral cube, also checks validity at the end

remove_bad_pixels(chunks=20, mypool=None, med_spec=None, nan_mask_boxsize=3, w=5, num_threads=16, wid_mov=None, threshold=3, mask_bleeding=False)[source]
set_noise(method='sqrt_cont', num_threads=16, wid_mov=None, noise_floor=True)[source]
set_reference_position(value)[source]
trim_data(trim)[source]