gemini_instruments package



gemini_instruments.common module

Structures and functions that can be shared across instrument code.

When should you add something here? Here’s some criteria: the code that belongs in here is not generally useful outside of gemini_instruments, and:

  • more than one instrument share the code to override a method that provides default behaviour, meaning that there’s no common ancestor where you can put this; or,

  • it doesn’t make sense to put the code in a method, as it doesn’t rely on internal knowledge of a class.

class gemini_instruments.common.Section(x1, x2, y1, y2)

Bases: tuple

property x1

Alias for field number 0

property x2

Alias for field number 1

property y1

Alias for field number 2

property y2

Alias for field number 3

gemini_instruments.gmu module

gemini_instruments.gmu.convert_units(input_units, input_value, output_units)[source]
  • input_units (string) – the units of the value specified by input_value. Possible values are ‘meters’, ‘micrometers’, ‘nanometers’ and ‘angstroms’.

  • input_value (float) – the input value to be converted from the input_units to the output_units

  • output_units (string) – the units of the returned value. Possible values are ‘meters’, ‘micrometers’, ‘nanometers’ and ‘angstroms’.

Return type



the converted value of input_value from input_units to output_units

gemini_instruments.gmu.detsec_to_pixels(ad, detx, dety)[source]

Remove a component ID from a filter name :param instr: the filter name :type instr: string :rtype: string :return: the filter name with the component ID removed, or None if the input is not a valid string


Convert the input section in the form ‘[x1:x2,y1:y2]’ to a tuple in the form (x1 - 1, x2, y1 - 1, y2), where x1, x2, y1 and y2 are integers. The values in the output tuple are converted to use 0-based and non-inclusive indexing, making it compatible with numpy.


section (str) – The section (in the form [x1:x2,y1:y2]) to be converted to a tuple.


tuple – non-inclusive in the form (x1 - 1, x2, y1 - 1, y2).

Return type

the converted section as a tuple that uses 0-based and

gemini_instruments.gmu.toicrs(frame, ra, dec, equinox=2000.0, ut_datetime=None)[source]