API

class lvmagp.actor.commfunc.LVMCamera[source]

Bases: object

Class for the FLIR guide cameras

bias_exposure(repeat)[source]

Take a test exposure using -t option of lvmcam. The image file (Temp.fits) will be overwritten whenever this command is executed.

Parameters

repeat – The number of bias images

single_exposure(exptime)[source]

Take a single exposure

Parameters

exptime – Exposure time

status()[source]

Return status of autoguide camera (i.e. power status, exposing/reading out/idle ).

test_exposure(exptime)[source]

Take a test exposure using -t option of lvmcam. The image file (Temp.fits) will be overwritten whenever this command is executed.

Parameters

exptime – Exposure time

class lvmagp.actor.commfunc.LVMEastCamera(tel, amqpc)[source]

Bases: lvmagp.actor.commfunc.LVMCamera

Class for the FLIR guide cameras installed in east side

Parameters

tel – Telescope to which the camera belongs

class lvmagp.actor.commfunc.LVMFiberselector(tel, amqpc)[source]

Bases: object

Class for the fiber selectors

Parameters

tel – Telescope unit to which the focuser belongs

class lvmagp.actor.commfunc.LVMFocuser(tel, amqpc)[source]

Bases: object

Class for the focusers

Parameters
  • tel – Telescope unit to which the focuser belongs

  • amqpc – AMQP client to be used for actor communication

focus(value=None, temperature=None)[source]

Move focus to a particular value or a first guess from a given temperature

Parameters
  • value (float) – if provided, focus stage moves to this step value

  • temperature (float) – if ‘value’ is not provided or ‘value=None’,

  • model (focus stage moves to best guess based on focus vs temperature) –

Returns

None

focusoffset(delta_f=None)[source]

Apply a relative telescope focus offset.

Parameters

delta_f (float) – focus offset value in steps

getfocusposition(unit='STEPS')[source]

Get current position of device in given unit.

Parameters

unit – Unit of position

class lvmagp.actor.commfunc.LVMKMirror(tel, amqpc)[source]

Bases: object

Class for the K-mirros

Parameters

tel – Telescope unit to which the focuser belongs

derotate(pa)[source]

Derotate the field to correct the given field angle.

Parameters

pa – Target field angle to be corrected. The direction where pa = field angle will head up after the derotation.

class lvmagp.actor.commfunc.LVMTelescope(tel, amqpc, sitename='LCO')[source]

Bases: object

Class for the telescopes (Planewave mounts)

Parameters

tel – The name of the telescope

class lvmagp.actor.commfunc.LVMTelescopeUnit(tel, sitename='LCO', enable_pwi=True, enable_foc=True, enable_agw=True, enable_age=False, enable_fibsel=False, enable_km=True)[source]

Bases: lvmagp.actor.commfunc.LVMTelescope, lvmagp.actor.commfunc.LVMFocuser, lvmagp.actor.commfunc.LVMWestCamera, lvmagp.actor.commfunc.LVMEastCamera, lvmagp.actor.commfunc.LVMFiberselector, lvmagp.actor.commfunc.LVMKMirror

autoguide_supervisor()[source]

Manage the autoguide sequence. It starts real autoguide loop and keeps it until the break signal comes.

Parameters

tel – Telescope to autoguide

autoguiding(initposition, initflux)[source]

Expose an image, and calculate offset from the image and initial values. Compensate the offset.

Parameters
  • tel – Telescope to autoguide

  • initposition – Position of guide stars when the autoguide is started

  • initflux – Flux of guide stars when the autoguide is started

check_safety_interlock()[source]
coarse_autofocus()[source]

Find the focus coarsely by scanning whole reachable position.

dither(delta_x=None, delta_y=None, delta_pa=None)[source]

move the guider set points (guide boxes) by specified amount; used to move accurate offsets by letting the guider do the work. used, e.g., for dithering.

Parameters
  • delta_x – Offset in x direction in guide frame in pixel(+/- = R/L)

  • delta_y – Offset in y direction in guide frame in pixel (+/- = U/D)

  • delta_pa – Offset in position angle in degree (+/- = CW/CCW)

find_guide_stars(positionguess=None)[source]

Expose an image, and find three guide stars from the image. Also calculate the center coordinates and fluxes of found stars.

Parameters

positionguess – Initial guess of guidestar position. It should be given in np.ndarray as [[x1, y1], [x2, y2], …] If positionguess is not None, find_guide_stars only conduct center finding based on positionguess without finding new stars.

fine_autofocus()[source]

Find the optimal focus position which is near the current position.

goto_aa(target_alt_d, target_az_d, target_pa_d=0, target='optical_axis', deg=True)[source]

Point telescope to position using alt/az (i.e. point to screen or manually park) It does not run additional compensation based on astrometry.

Comments and desired actions:

Check dome safety interlock: if interlock is engaged, do not move the telescope. Return error message (assume people are inside dome)

run status (LVMI_interface) to check instrument status: if not idle (i.e. carrying out any observations or calibrations), repeat status command regularly until it returns idle, then move telescope. Regularly give updates (i.e. “waiting for instrument to become idle before moving telescope”)

Parameters
  • target_alt_d – Target altitude in degree

  • target_az_d – Target azimuth in degree

  • target_pa_d – Target position angle in degree

  • target

    ???

  • deg

    ???

goto_eq(target_ra_h, target_dec_d, target_pa_d=0, ra_d=False)[source]

Point telescope to position using RA and dec (J2000).

Comments and desired actions:

Check dome safety interlock: if interlock is engaged, do not move the telescope. Return error message (assume people are inside dome)

run status (LVMI_interface) to check instrument status: if not idle (i.e. carrying out any observations or calibrations), repeat status command regularly until it returns idle, then move telescope. Regularly give updates (i.e. “waiting for instrument to become idle before moving telescope”)

Parameters
  • target_ra_h – The right ascension (J2000) of the target in hours

  • target_dec_d – The declination (J2000) of the target in degrees

  • target_pa_d – Desired position angle of the image

  • ra_d – If True, the RA of target should be given in degrees.

goto_park()[source]

Move telescope to safe park position.

Comments and desired actions:

Check dome safety interlock: if interlock is engaged, do not move the telescope. Return error message (assume people are inside dome)

run status (LVMI_interface) to check instrument status: if not idle (i.e. carrying out any observations or calibrations), abort observation (halt in LVMI_interface) and park telescope (in this case, we assume user wants to park due to an emergency)

goto_screen()[source]

Point telescope to screen for dome flats

Comments and desired actions:

Check dome safety interlock: if interlock is engaged, do not move the telescope. Return error message (assume people are inside dome)

run status (LVMI_interface) to check instrument status: if not idle (i.e. carrying out any observations or calibrations), repeat status command regularly until it returns idle, then move telescope. Regularly give updates (i.e. “waiting for instrument to become idle before moving telescope”)

goto_zenith()[source]

Point telescope to zenith

Comments and desired actions:

Check dome safety interlock: if interlock is engaged, do not move the telescope. Return error message (assume people are inside dome)

run status (LVMI_interface) to check instrument status: if not idle (i.e. carrying out any observations or calibrations), repeat status command regularly until it returns idle, then move telescope. Regularly give updates (i.e. “waiting for instrument to become idle before moving telescope”)

guide_off()[source]

Turn off guiding, revert to tracking (track_on).

guide_on(guide_parameters=None, ra_h=None, dec_d=None)[source]

Start guiding, or modify parameters of running guide loop. <— modify???? guide_parameters is a dictionary containing additional parameters for the guiders, e.g. exposure times, cadence, PID parameters, readout or window modes, …

Parameters
  • useteldata – If useteldata is flagged, the sequence will use the pixel scale and rotation angle from LVMTelescope. Otherwise, the sequence will get pixel scale from LVMCamera, and it assumes that the camera is north-oriented.

  • guide_parameters – exposure times, cadence, PID parameters, readout or window modes, … ???

offset(delta_ra=None, delta_dec=None, delta_x=None, delta_y=None, delta_pa=None)[source]

Normal offset (for guiding): do NOT change track rates It returns applied offset values.

Parameters
  • delta_ra – Offset in ra direction in arcsecond (+/- = E/W)

  • delta_dec – Offset in dec direction in arcsecond(+/- = N/S)

  • delta_x – Offset in x direction in guide frame in pixel(+/- = R/L)

  • delta_y – Offset in y direction in guide frame in pixel (+/- = U/D)

  • delta_pa – Offset in position angle in degree (+/- = CW/CCW)

track_off()[source]

Turn off mount tracking and field derotating.

track_on(derotator=True)[source]

Turn on tracking, optionally track in rotation, optionally supply non-sidereal track rates.

Parameters

derotator – If True, derotator will work to compensate the field rotation.

zero_coordinates()[source]

Zero-out mount model once pointing is verified.

class lvmagp.actor.commfunc.LVMWestCamera(tel, amqpc)[source]

Bases: lvmagp.actor.commfunc.LVMCamera

Class for the FLIR guide cameras installed in west side

Parameters

tel – Telescope to which the camera belongs