UI Module

High-level convenience functions that wrap the seestarpy.raw commands. All functions in this module are also available at the top-level seestarpy namespace via from .ui import *.

seestarpy.ui.close(eq_mode=None)

Close the Seestar arm and set the mode to EQ or AzAlt.

Parameters:

eq_mode (bool or None, optional) –

  • True : explicitly set EQ mode.

  • False : explicitly set AzAlt mode.

  • None : use the current mode. Default is None.

Notes

Accepts the ips keyword for sending the command to multiple Seestars simultaneously.

Examples

>>> import seestarpy as ssp
>>> ssp.close()             # Use the current value for EQ mode
>>> ssp.close(False)        # Explicitly set the mount mode to AzAlt
seestarpy.ui.exposure(exptime=None, which='stack_l')

Get or set the exposure time.

Parameters:
  • exptime (int or None, optional) –

    • None : return the current exposure time.

    • int : set the exposure time in seconds (or milliseconds if > 100). Accepted values: 2, 5, 10, 20, 30, 60.

  • which (str, optional) – Which exposure to set. One of 'stack_l' or 'continuous'. Default is 'stack_l'.

Return type:

dict

Notes

Accepts the ips keyword for sending the command to multiple Seestars simultaneously.

Examples

>>> import seestarpy as ssp
>>> ssp.exposure()
{'stack_l': 10000, 'continuous': 500}
>>> ssp.exposure(exptime=30, which="stack_l")       # 30s exposure time
{'Event': 'Setting', 'Timestamp': '1380808.244289322', 'wide_cam': False, 'exp_ms': {'stack_l': 30000}}
>>> ssp.conn.find_available_ips(n_ip=3)
>>> ssp.exposure(exptime=5, ips="all")               # 5s exposure time for all 3 connected Seestars
seestarpy.ui.filter_wheel(pos=None)

Get or set the filter-wheel position.

Parameters:

pos (int, str, or None, optional) –

  • None : return the current filter-wheel position.

  • 1 or 'open' / 'ircut' : open (IR-cut) filter.

  • 2 or 'narrow' / 'lp' : narrow-band / light-pollution filter.

Return type:

dict

Notes

Accepts the ips keyword for sending the command to multiple Seestars simultaneously.

Examples

>>> from seestarpy import filter_wheel
>>> filter_wheel()
1
>>> filter_wheel("ircut")
>>> filter_wheel(2)
seestarpy.ui.focuser(pos=None)

Get or set the focuser position.

Parameters:

pos (int, str, or None, optional) –

  • None : return the current focuser position.

  • int : move the focuser to this position.

  • 'auto' : start the auto-focus routine.

Return type:

dict

Notes

Accepts the ips keyword for sending the command to multiple Seestars simultaneously.

Examples

>>> from seestarpy import focuser
>>> focuser()
1580
>>> focuser("auto")
>>> focuser(pos=1605)
seestarpy.ui.goto(ra_dec=())

Move the scope arm to a given position.

Accepts an (ra, dec) tuple, or the strings 'park' / 'horizon' as shortcuts.

Parameters:

ra_dec (tuple of float, or str) –

  • (ra, dec) : decimal hour angle [0, 24] and declination [-90, 90].

  • 'park' : park the scope.

  • 'horizon' : move to the horizontal position.

Return type:

dict

Notes

Accepts the ips keyword for sending the command to multiple Seestars simultaneously.

Examples

>>> import seestarpy as ssp
>>> ssp.goto((13.4, 54.8))          # Mizar
>>> ssp.goto((5.63, -69.4))         # Tarantula Nebula
>>> ssp.goto("park")
>>> ssp.goto("horizon")
seestarpy.ui.goto_target(target_name, ra=None, dec=None, lp_filter=False)

Slew to a target by name and coordinates, then start viewing.

This triggers an AutoGoto sequence: the telescope slews to the given coordinates, runs a plate-solve loop, and then enters ContinuousExposure mode.

If ra and dec are omitted, the coordinates are resolved automatically from target_name using the CDS Sesame name resolver (SIMBAD/NED/VizieR). This supports standard designations such as Messier ("M42"), NGC/IC, HD, HIP, Bayer names, etc.

Parameters:
  • target_name (str) – Name of the target (e.g. "M42", "NGC 884"). Also used as the directory name on the Seestar’s internal storage. When ra and dec are None, this name is passed to resolve_name() to look up coordinates.

  • ra (float or None, optional) – Right Ascension in decimal hours. If None (default), resolved from target_name.

  • dec (float or None, optional) – Declination in decimal degrees. If None (default), resolved from target_name.

  • lp_filter (bool, optional) – Use the light-pollution filter. Default is False.

Return type:

dict

Raises:
  • LookupError – If ra/dec are None and target_name cannot be resolved.

  • ConnectionError – If the CDS Sesame service is unreachable.

  • ValueError – If only one of ra/dec is provided.

Notes

Accepts the ips keyword for sending the command to multiple Seestars simultaneously.

Examples

>>> import seestarpy as ssp
>>> ssp.goto_target("M42")                                # name resolved
>>> ssp.goto_target("M8", lp_filter=True)                 # name + LP filter
>>> ssp.goto_target("Mizar", ra=13.4, dec=54.9)           # explicit coords
>>> ssp.goto_target("M31", ips="all")                     # all Seestars
seestarpy.ui.open()

Open the Seestar arm by moving it to the horizontal position.

This must be called before slewing to a target. You cannot goto an object directly from the parked position.

Return type:

dict

Notes

Accepts the ips keyword for sending the command to multiple Seestars simultaneously.

Examples

>>> import seestarpy as ssp
>>> ssp.open()
>>> ssp.open(ips="all")     # Open all connected Seestars
seestarpy.ui.set_eq_mode(equ_mode=True)

Park the scope and set the equatorial mode.

Parameters:

equ_mode (bool, optional) – Enable equatorial mode. Default is True.

Return type:

dict

Notes

Accepts the ips keyword for sending the command to multiple Seestars simultaneously.

Examples

>>> import seestarpy as ssp
>>> ssp.open()
>>> ssp.set_eq_mode(True)       # Park into EQ mode
>>> ssp.set_eq_mode(False)      # Park into AzAlt mode
seestarpy.ui.start_stack(restart=True)

Start stacking sub-frames on the current target.

Parameters:

restart (bool, optional) – Restart the stacking sequence from scratch. Default is True.

Return type:

dict

Notes

Accepts the ips keyword for sending the command to multiple Seestars simultaneously.

Examples

>>> import seestarpy as ssp
>>> ssp.goto_target("M31")
>>> ssp.start_stack()
>>> ssp.start_stack(ips="all")  # Start stacking on all Seestars
seestarpy.ui.stop_view()

Stop the current viewing session.

Sets the camera mode to 'none' and stops all activity.

Return type:

dict

Notes

Accepts the ips keyword for sending the command to multiple Seestars simultaneously.

Examples

>>> import seestarpy as ssp
>>> ssp.stop_view()
>>> ssp.stop_view(ips="all")    # Stop all connected Seestars
seestarpy.ui.tracking(flag=None)

Get or set the mount tracking state.

Parameters:

flag (bool or None, optional) –

  • None : return the current tracking state.

  • True / False : enable or disable tracking.

Return type:

dict

Notes

Accepts the ips keyword for sending the command to multiple Seestars simultaneously.

Examples

>>> import seestarpy as ssp
>>> ssp.tracking()
False
>>> ssp.tracking(False)     # Turn off tracking