throughput – Throughput server

Illumination and throughput server

Returns the illumination & throughput in the focal plane of HE for a focal plane position and a shot object containing important information about the telescope configuration

Todo

a module in pyhetdex should not depend on the structure of a class defined in code that uses pyhetdex. Here referring to shot

either pass the illumination_model option as parameters to fplaneToThroughput() or check that it is implemented when initialising ThroughputServer.

class pyhetdex.het.throughput.ThroughputServer(throughput_file, illumination_model, shot)[source]

Throughput server.

At the moment returns a dummy model for the throughput across the focal plane

Parameters:

throughput_file : string

illumination_model : string

shot : ??

Attributes

name (string) name of the server
shot (??) ??
throughput_file (string) name of the throughput file
lambdas, throughputs (nd-arrays) throughput as function of wavelength
illumination_model (string) name of the illumination model to use
fplaneToThroughput(x, y)[source]

Throughput based on focal plane position.

Now is just a dummy model.

Parameters:

x, y : float

focal plane position of the IFU in arcseconds

Returns:

r : float

illumination at the input position

Raises:

NotImplementedError

if the required illumination model is not implemented

Notes

This is also a dummy, should contain some clever model to give at the moment just falls off like a power law

loadThroughputTemplate(throughput_file)[source]

Load the throughput template

Parameters:

throughput_file : string

name of the throughput file

Returns:

lambdas, throughputs : nd arrays

throughput as function of wavelength

Raises:

IOError

re-raise after printing an error message if the input file does not exists

outputThroughputFile(ID, x, y, fname_template='throughput{id:04d}.dat')[source]

Save throughput file.

The template throughput is multiplied by a focal-plane position dependent illumination correction before saving it. This correction is returned

Parameters:

ID : int

ID to replace into the output file name template

x, y : float

focal plane position of the IFU in arcseconds

Returns:

f_illum : float

focal plane position dependent illumination