Chimera Advanced Usage

Chimera Concepts

These are terms commonly found within the software; they represent concepts that are important to understand in order to fully exploit Chimera’s capabilities.

Manager:

This is the python class that provides every other instance with the tools to be able to function within :program:chimera: initialization, life cycle management, distributed networking capabilities.

ChimeraObject:

In order to facilitate the administration of objects, the Manager functionality among other utilities is encapsulated in a ChimeraObject class. Every object in chimera should subclass this one. More details are available in Chimera objects.

Location:

Every chimera object running somewhere is accessible via a URI style identifier that uniquely locates it in the distributed environment; it spells like: [host:port]/ClassName/instance_name[?param1=value1,…].

The host:port may be left out if the referred object is running in the localhost, and/or have been defined in the configuration file.

Advanced Chimera Configuration

Every ChimeraObject has a class attribute, a python dictionary that defines possible configuration options for the object, along with sensible defaults for each. This attribute, named __config__, can be referred to when looking for options to include in the configuration file. For example, the telescope interface default __config__:

        "aperture": 100.0,  # mm
        "focal_length": 1000.0,  # mm unit (ex., 0.5 for a half length focal reducer)
        "focal_reduction": 1.0,
        "fans": [],  # List of fans of the telescope, i.e.: ['/FakeFan/fake1', '/FakeFan/fake2']
    }


class TelescopeSlew(Telescope):
    """
    Basic interface for telescopes.
    """

    __config__ = {

can have attribute members overwritten and/or added from the plugin and from the configuration file and the others will keep their default values.

For example, on the meade plugin, besides the default options listed above, we add the configuration option on the instrument class:

__config__ = {'azimuth180Correct': True}

and, on the configuration, we can change the defaults to a different value:

# Meade telescope on serial port
telescope:
    driver: Meade
    device:/dev/ttyS1      # Overwritten from the interface
    my_custom_option: 3.0  # Added on configuration file

Default configuration parameters by interface type

  • Site

    def _get_ephem(self, date=None):
        site = ephem.Observer()
        site.lat = self["latitude"].strfcoord("%(d)d:%(m)d:%(s).2f")
        site.long = self["longitude"].strfcoord("%(d)d:%(m)d:%(s).2f")
        site.elev = self["altitude"]
        site.date = date or self.ut()
  • Auto-focus

        """
        Focus
        """

  • Autoguider


    @event
    def offset_complete(self, offset):
        """Raised after every offset is complete."""

    @event
    def guide_start(self, position):
        """Raised when a guider sequence starts."""

    @event
  • Camera


    __config__ = {
        "device": "Unknown",  # Bus address identifier for this camera. E.g. USB, LPT1, ...
        "ccd": CCD.IMAGING,  # CCD to be used when multiple ccd camera. IMAGING or TRACKING.
        "camera_model": "Unknown",  # Camera model string. To be used by metadata purposes
        "ccd_model": "Unknown",  # CCD model string. To be used by metadata purposes
        "ccd_saturation_level": None,  # CCD level at which arises saturation (in ADUs).
        # Needed by SExtractor when doing auto-focus, autoguiding...
        # WCS configuration parameters  #
        "telescope_focal_length": None,  # Telescope focal length (in millimeters)
        "rotation": 0.0,  # Angle between the North and the second axis of the image counted
        # positive to the East (in degrees)
  • Dome

    init_timeout: int = 5
    open_timeout: int = 20
    close_timeout: int = 20
    # list of fans of the dome, i.e.: fans: ['/FakeFan/fake1', '/FakeFan/fake2']
    fans: list[str] = field(default_factory=list[str])
    # list of lamps of the dome, i.e.: lamps: ['/FakeLamp/fake1']
    lamps: list[str] = field(default_factory=list[str])


class Dome(Interface):
    """
    A Roll-off or classic dome.
    """

    __config__: dict[str, Any] = {
        "device": None,
        "telescope": "/Telescope/0",
        "mode": Mode.Stand,
        "model": "Fake Domes Inc.",
        "style": Style.Classic,
        "park_position": 155.0,
  • Filter wheel

        Return the current filter.

        @return: Current filter.
        @rtype: str
        """
  • Lamp

        """
        Sets the intensity of the calibration lamp.

        @param intensity: Desired intensity.
        @type  intensity: float
        """
  • Focuser

        "move_timeout": 60,
    }

    def move_in(self, n, axis=FocuserAxis.Z):
        """
  • Point Verify

class PointVerify(Interface):

    __config__ = {
        "camera": "/Camera/0",  # Camera attached to the telescope.
        "filterwheel": "/FilterWheel/0",  # Filterwheel, if exists.
        "telescope": "/Telescope/0",  # Telescope to verify pointing.
        "exptime": 10.0,  # Exposure time.
        "filter": "R",  # Filter to expose.
        "max_fields": 100,  # Maximum number of Landlodt fields to use.
        "max_tries": 5,  # Maximum number of tries to point the telescope correctly.
        "dec_tolerance": 0.0167,  # Maximum declination error tolerance (degrees).
        "ra_tolerance": 0.0167,  # Maximum right ascension error tolerance (degrees).
    }

    def check_pointing(self, n_fields):
        """
        Check pointing choosing field and using default exposure time
        """

    @event
    def point_complete(self, position, star, frame):
        """Raised after every step in the focus sequence with
        information about the last step.
        """
  • Telescope

        "aperture": 100.0,  # mm
        "focal_length": 1000.0,  # mm unit (ex., 0.5 for a half length focal reducer)
        "focal_reduction": 1.0,
        "fans": [],  # List of fans of the telescope, i.e.: ['/FakeFan/fake1', '/FakeFan/fake2']
    }


class TelescopeSlew(Telescope):
    """
    Basic interface for telescopes.
    """

    __config__ = {
        "position_sigma_delta": 60.0,  # arcseconds
        "skip_init": False,
        "min_altitude": 20,
    }

    def slew_to_object(self, name: str) -> None:
        """
        Slew the scope to the coordinates of the given
        object. Object name will be converted to a coordinate using a
        resolver like SIMBAD or NED.

  • Weather Station


class WeatherTemperature(WeatherStation):
    """

Fake Instruments default configuration parameters

  • Camera

        self._my_readout_mode = 1 << 3

        self._ccds = {self._my_ccd: CCD.IMAGING}