Bandpass

class rubin_sim.phot_utils.Bandpass(wavelen=None, sb=None, wavelen_min=None, wavelen_max=None, wavelen_step=None)

Bases: object

Hold and use telescope throughput curves.

Methods Summary

calc_eff_wavelen()

Calculate effective wavelengths for filters.

calc_zp_t(photometric_parameters)

Calculate the instrumental zeropoint for a bandpass.

check_use_self(wavelen, sb)

Simple utility to check if should be using self.wavelen/sb or passed arrays.

get_bandpass()

get_wavelen_limits(wavelen_min, wavelen_max, ...)

Return appropriate wavelen limits (_min, _max, _step) if passed None values.

imsim_bandpass([imsimwavelen, wavelen_min, ...])

Populate bandpass data with sb=0 everywhere except sb=1 at imsimwavelen.

multiply_throughputs(wavelen_other, sb_other)

Multiply self.sb by another wavelen/sb pair, return wavelen/sb arrays.

need_resample([wavelen, wavelen_min, ...])

Return true/false of whether wavelen need to be resampled onto a grid.

read_throughput(filename[, wavelen_min, ...])

Populate bandpass data with data (wavelen/sb) read from file, resample onto grid.

read_throughput_list([component_list, ...])

Populate bandpass data by reading from a series of files with wavelen/Sb data.

resample_bandpass([wavelen, sb, ...])

Resamples wavelen/sb (or self.wavelen/sb) onto grid defined by min/max/step.

sb_tophi()

Calculate and set phi - the normalized system response.

set_bandpass(wavelen, sb[, wavelen_min, ...])

Populate bandpass data with wavelen/sb arrays.

set_wavelen_limits(wavelen_min, wavelen_max, ...)

Set internal records of wavelen limits, _min, _max, _step.

write_throughput(filename[, print_header, ...])

Write throughput to a file.

Methods Documentation

calc_eff_wavelen()

Calculate effective wavelengths for filters.

calc_zp_t(photometric_parameters)

Calculate the instrumental zeropoint for a bandpass.

@param [in] photometric_parameters is an instantiation of the PhotometricParameters class that carries details about the photometric response of the telescope. Defaults to LSST values.

check_use_self(wavelen, sb)

Simple utility to check if should be using self.wavelen/sb or passed arrays.

Useful for other methods in this class. Also does data integrity check on wavelen/sb if not self.

get_bandpass()
get_wavelen_limits(wavelen_min, wavelen_max, wavelen_step)

Return appropriate wavelen limits (_min, _max, _step) if passed None values.

imsim_bandpass(imsimwavelen=500.0, wavelen_min=None, wavelen_max=None, wavelen_step=None)

Populate bandpass data with sb=0 everywhere except sb=1 at imsimwavelen.

Sets wavelen/sb, with grid min/max/step as Parameters. Does NOT set phi.

multiply_throughputs(wavelen_other, sb_other)

Multiply self.sb by another wavelen/sb pair, return wavelen/sb arrays.

The returned arrays will be gridded like this bandpass. This method does not affect self.

need_resample(wavelen=None, wavelen_min=None, wavelen_max=None, wavelen_step=None)

Return true/false of whether wavelen need to be resampled onto a grid.

Given wavelen OR defaults to self.wavelen/sb - return True/False check on whether the arrays need to be resampled to match wavelen_min/max/step grid.

read_throughput(filename, wavelen_min=None, wavelen_max=None, wavelen_step=None)

Populate bandpass data with data (wavelen/sb) read from file, resample onto grid.

Sets wavelen/sb, with grid min/max/step as Parameters. Does NOT set phi.

read_throughput_list(component_list=['detector.dat', 'lens1.dat', 'lens2.dat', 'lens3.dat', 'm1.dat', 'm2.dat', 'm3.dat', 'atmos_std.dat'], root_dir='.', wavelen_min=None, wavelen_max=None, wavelen_step=None)

Populate bandpass data by reading from a series of files with wavelen/Sb data.

Multiplies throughputs (sb) from each file to give a final bandpass throughput. Sets wavelen/sb, with grid min/max/step as Parameters. Does NOT set phi.

resample_bandpass(wavelen=None, sb=None, wavelen_min=None, wavelen_max=None, wavelen_step=None)

Resamples wavelen/sb (or self.wavelen/sb) onto grid defined by min/max/step.

Either returns wavelen/sb (if given those arrays) or updates wavelen / Sb in self. If updating self, resets phi to None.

sb_tophi()

Calculate and set phi - the normalized system response.

This function only pdates self.phi.

set_bandpass(wavelen, sb, wavelen_min=None, wavelen_max=None, wavelen_step=None)

Populate bandpass data with wavelen/sb arrays.

Sets self.wavelen/sb on a grid of wavelen_min/max/step. Phi set to None.

set_wavelen_limits(wavelen_min, wavelen_max, wavelen_step)

Set internal records of wavelen limits, _min, _max, _step.

write_throughput(filename, print_header=None, write_phi=False)

Write throughput to a file.