Ekos

Ekos is an advanced cross-platform (Windows®, Mac® OS, Linux®) observatory control and automation tool with a particular focus on Astrophotography. It is based on a modular extensible framework to perform common astrophotography tasks. This includes highly accurate GOTOs using astrometry solver, ability to measure and correct polar alignment errors, auto-focus & auto-guide capabilities, and capture of single or stack of images with filter wheel support. Ekos is shipped with KStars.

Ekos introductory video

Features:

  • Control your telescope, Camera (& DSLRs), filter wheel, focuser, guider, adaptive optics unit, and any INDI-compatible auxiliary device from Ekos.

  • Built-in native autoguiding with support for automatic dithering between exposures and support for Adaptive Optics devices in addition to traditional guiders.

  • Extremely accurate GOTOs using astrometry.net solver (both Online and Offline solvers supported).

  • Load & Slew: Load a FITS image, slew to solved coordinates, and center the mount on the exact image coordinates in order to get the same desired frame.

  • Measure & Correct Polar Alignment errors using astromety.net solver.

  • Easy to use Polar Alignment Assistant tool. A very quick and reliable tool to polar align your German Equatorial Mount!

  • Capture and record video streams in SER format.

  • Completely automated scheduler to control all your observatory equipment, select the best targets for imaging given current conditions and constraints, monitor weather conditions, and capture your data while you are away!

  • Smart Dark Library: All your dark frames with different binning/temperature/frame settings are saved for future use. Ekos re-uses dark frames intelligently without taking unnecessary captures. You can configure how long you want to reuse all the dark frames.

  • Define multiple driver profiles for local and remote setups. Switch among them easily.

  • Auto and manual focus modes using Half-Flux-Radius (HFR) method.

  • Automated unattended meridian flip. Ekos performs post meridian flip alignment, calibration, focusing, and guiding to resume the capture session.

  • Automatic focus between exposures when a user-configurable HFR limit is exceeded.

  • Powerful sequence queue for batch capture of images with optional prefixes, timestamps, filter wheel selection, and much more!

  • Export and import sequence queue sets as Ekos Sequence Queue (.esq) files.

  • Center the telescope anywhere in a captured FITS image or any FITS with World Coordinate System (WCS) header.

  • Automatic flat field capture, just set the desired ADU and let Ekos does the rest!

  • Automatic abort and resumption of exposure tasks if guiding errors exceed a user-configurable value.

  • Support for dome slaving.

  • Complete integration with KStars Observation Planner and SkyMap.

  • Fully scriptable via D-Bus.

  • Integrate with all INDI native devices.

Ekos Setup

Ekos Summary

Ekos is a part of KStars. KStars/Ekos is already included with your StellarMate gadget. It is also available for Linux®, Mac® OS, and Windows® if you want to install on your primary machine. After you run KStars on your PC or on StellarMate (Either directly via HDMI or via VNC), Ekos can be accessed from the Tools menu or via the Ekos on the main toolbar, or by a keyboard shortcut (Ctrl+K). In addition to the Ekos window, KStars provides a more detailed INDI Control Panel where you can directly set and control the device parameters.

When running Ekos, it is not necessary to start INDI Server via StellarMate Web Manager as Ekos manages that transparently.

KStars Main Window

User Interface

Ekos Astrophotography Tool is organized into several Modules. A module is a set of functions and tasks for a particular step in astrophotography and/or data acquisition. Currently, the following modules are included with Ekos:

  • Setup & Summary Module

  • Scheduler Module

  • Capture Module

  • Focus Module

  • Alignment Module

  • Guide Module

  • Mount Module

Each module has its own tab and icon in the graphical user interface as illustrated in the screenshot below:

Ekos summary cheatsheet
Summary & Setup Module

As its name suggests, this is where you will create and manage your equipment profile, and connect to your devices. It also provides a summary view where the capture progress along with the focus & guide operations is displayed in a compact format to convey the most important information relevant to the user.

Scheduler Module

After mastering Ekos, users are encouraged to learn how to use the Scheduler module since it facilitates the complete observation process greatly. It enables you to select multiple targets, specify which conditions and requirements to be met, and what frames are required for capture. Afterwards the scheduler intelligently calculates the best observation time for each object and then proceed to control the complete observatory from startup to shutdown.

Capture Module

This is the primary module for camera & filter wheel control. Create imaging sequences, capture previews, and watch video streams. It supports rotator control and can automatically capture flat frames in a number of scenarios.

Focus Module

Measure the sharpness of your images in the focus module by calculating Half-Flux-Radius. The lower the HFR, the sharper the image becomes. You can run the focus module with or without a focuser. With an electronic focuser, you can run an autofocus operation where Ekos iterates and calculates the optical focus position.

Guide Module

To achieve long exposure astrophotography, guiding is necessary to ensure the image is locked and stabilized for the complete duration of the exposure duration. Deviations from the frame with time can lead to blurry images and star trails. In the guide module, it can automatically select a suitable guide star and then lock the mount to always keep that star in its position. If the guide module detects any deviation from this locked position, it sends correction pulses to the mount to bring it back to the original position.

Mount Module

Mount control can be either done via the Sky Map interactively or via the Mount Control Panel in the mount module. Configure telescope properties (focal length & aperture) for both your primary imaging telescope and guide scope. However, it is recommended to select the telescopes in the equipment profile and not change the values directly in the mount module.

Profile Wizard

The Profile Wizard is a handy tool to setup your equipment for the first time. It should popup automatically the first time you run KStars. Follow the guided instructions to setup your first equipment profile.

Greeting Page
Profile Wizard Welcome

The first greeting screen contains some links to learn more about Ekos & INDI. Click Next to continue.

Equipment Location Page

Next, you will be presented with the equipment location page. Your selection depends on where your equipment is connected to:

  • Equipment is attached to this device: Select this option if Ekos is running on your StellarMate (via HDMI or VNC), device (Windows®/Linux®) or Mac® OS.

  • Equipment is attached to a remote device: Select this option if Ekos is running on your device (Windows®/Linux®) or Mac® OS, and your equipment is connected to a remote computer.

  • Equipment is attached to StellarMate: Select this option if Ekos is running on your device (Windows®/Linux®) or Mac® OS, and your equipment is connected to StellarMate.

Equipment location page

Click Next to continue.

Remote Connection Page

In case selected the 2nd option in the last step, you shall be presented with the Remote Connect Page, here you will enter the hostname or IP address of the StellarMate unit. You can get the hostname from the StellarMate mobile App. Alternatively, you can construct the hostname from StellarMate HotSpot SSID. You should see the SSID when you search for WiFi networks nearby. For example, suppose the SSID is stellarmate. The hostname should be stellarmate.local. That is, if you remove the underscore, and append .local, then you will get the unit hostname. You can always use the StellarMate App to change the unit default hostname to the name of your choice.

Profile Wizard Remote page

For the INDI Manager question, always select Yes since StellarMate Web Manager is running by default on the unit. Click Next to continue.

Profile Creation Page

Now you get to name your equipment profile. Afterwards select which guider application to use. The Internal Guider is the only officially supported selection in StellarMate. You may opt to select PHD2/LinGuider but the details are out of the scope of this documentation. If additional services are desired, check the ones you want to run.

The final page of Profile Wizard

In the example above, we select Remote Astrometry, WatchDog, and SkySafari drivers. The detailed explanations for each is provided in the tooltip when you over them. Once done, click Create Profile button. You should now be presented with the Profile Editor.

Profile Editor

Profile Editor
Profiles

You can define profiles for your equipment and their connection mode using the Profile Editor. Ekos comes pre-installed with the Simulators profile which can be used to start simulator devices for demonstration purposes:

  • Connection Mode: Ekos can be started either locally or remotely. Local mode is when Ekos is running in the same machine as INDI server, i.e. all the devices are connected directly to the machine. If you run INDI server on a remote machine (for example, on a Raspberry PI), you need to set the INDI server host and port.

  • Auto Connect: Check this option to enable automatic connection to all your devices after INDI server is started. If unchecked, INDI devices are created but not automatically connected. This is useful when you want to make changes to the driver (e.g. change baud rate or IP address or any other settings) before you connect to it.

  • Port Selector: Check this option to enable Port Selector. When creating a new profile, it is checked by default. Port Selector is used to select initial serial and network communication parameters for the devices in the equipment profile. After connecting to equipment for the first time, the Port Selector popup is displayed where the communication parameters can be set before establishing connection. Once connected, the Port Selector option is turned off. It can be toggled to checked in the profile editor to enable it back.

  • Site Info: Optionally, you can check the Site Info checkbox and Ekos will load the current city and timezone whenever is Ekos is started with this profile. This can be useful when connecting to the remote geographic site so that Ekos is in sync location and time wise.

  • Guiding: Select which Guide application you want to use for guiding. By default, the Ekos internal Guide Module is utilized. External guiders include PHD2 and LinGuider.

  • INDI Web Manager: StellarMate Web Manager is a web-based tool to start and stop INDI drivers. You should always check this option when connecting remotely to a StellarMate unit.

  • Device Selection: Select your devices from each category. Please note that if you have a CCD with a guide head, you can leave the guider drop-down menu blank as Ekos will auto-detect the guide head from the CCD camera. Similarly, if your CCD includes embedded filter wheel support, then you do not need to specify the filter wheel device in the filter drop-down menu.

  • Scripts: Adjust pre-driver and post-driver delays and scripts for each driver. A rule can be defined for each driver in case there is a need to introduce delays before and/or after starting a particular driver. The fields before the driver selection dropdown are to be executed before the driver is started, whereas the fields after the driver selection dropdown are to be executed after the driver started. The script field, if specified, should include the full path to an executable script with the appropriate permissions. All drivers configured in the scripts editor would be started first and in order before the rest of the equipment profile drivers.

    Profile Editor Scripts
Start & Stop INDI

Start and Stop INDI services. Once INDI server is established, INDI Control Panel will be displayed. Here you can change some driver options such as which port the device is connected to etc.

Connect & Disconnect Devices

Connect to INDI server. Based on the devices connected, Ekos modules (CCD, Focus, Guide, etc.) will be established and available to use.

Once you are ready, click Start INDI to establish INDI server and connection to your equipment. Ekos shall create the various module icons (Mount, Capture, Focus, etc.) as the connection is established with the device.

Logs

Logging is a very important tool in order to diagnose any issues with either INDI drivers or Ekos. Before submitting any support request, the log must be attached in order to help diagnose the exact issue. Depending on the exact problem, you may need to enable logging for the feature or drivers that exhibit issues. Enabling logging for everything is not recommended as it will produce too much data that would be useful to diagnose the issue and could result in missing the root cause all other. So only enable the necessary logs.

The following short video explains how to use the Logging feature to submit logs.

Logging feature

Capture

Ekos Capture

The Capture Module is your primary image and video acquisition module in Ekos. It enables you to capture single (Preview), multiple images (Sequence Queue), or record SER videos along with a selection of filter wheel and rotator, if available.

CCD & Filter Wheel Group

Select the desired CCD/DSLR and Filter Wheel (if available) for capture. Set CCD temperature and filter settings.

  • CCD: Select the active CCD camera. If your camera has a guide head, you can select it from here as well.

  • FW: Select the active Filter Wheel device. If your camera has a built-in filter wheel, the device would be the same as the camera.

  • Cooler: Toggle Cooler On/Off. Set the desired temperature, if your camera is equipped with a cooler. Check the option to force temperature setting before any capture. Capture process is only started after the measured temperature is within requested temperature tolerance. The default tolerance is 0.1 degrees Celsius but can be adjusted in Capture options under Ekos configuration.

Capture Settings

Capture Settings

Set all capture parameters as detailed below. Once set, you can capture a preview by click on Preview or add a job to the sequence queue.

  • Exposure: Specify exposure duration in seconds.

  • Filter: Specify the desired filter.

  • Count: Number of images to capture

  • Delay: Delay in seconds between image captures.

  • Type: Specify the type of desired CCD frame. Options are Light, Dark, Bias, and Flat frames.

  • ISO: For DSLR cameras, specify the ISO value.

  • Format: Specify capture save format. For all CCDs, only FITS option is available. For DSLR cameras, you can an additional option to save in Native format (e.g. RAW or JPEG).

  • Custom Properties: Set extended properties available in the camera to the job settings.

  • Calibration: For Dark &s; Flat frames, you can set additional options explained in the Calibration Frames section below.

  • Frame: Specify the left (X), top (Y), width (W), and height (H) of the desired CCD frame. If you changed the frame dimensions, you can reset it to default values by clicking on the reset button.

  • Binning: Specify horizontal (X) and vertical (Y) binning.

Custom Properties

Many cameras offer additional properties that cannot be directly set in the capture settings using the common control. The capture controls described above represent the most common settings shared among different cameras, but each camera is unique and may offer its own extended properties. While you can use INDI Control Panel to set any property in the driver; it is important to be able to set such property for each job in the sequence. When you click Custom Properties, a dialog is shown divided into Available Properties and Job Properties. When you move an Available Properties to the Job Property list, its current value can be recorded once you click Apply. When you add a job to the Sequence Queue, the properties values selected in the Job Properties list shall be recorded and saved.

The following video explains this concept is more detail with a live example:

Custom Properties feature

File Settings

File Settings

Settings for specifying where captured images are saved to, and how to generate unique file names in addition to upload mode settings.

  • Target: The name of the celestial target to be captured e.g. M42. Can be preloaded by the Scheduler Module and by selection with KStars.

  • Format: The Format string defines the path and filename of the captured images by the use of placeholder tags that are filled in with the selected item of data at save time.

    A tag is identified by the % character. All tags have a single letter short form, and a self descriptive long form.

    Arbitrary text may also be included within the Format string, except the % and \ characters. The / path character can be used to define arbitrary directories.

    Note: Tags are case sensitive in both their short and long forms.

    Available placeholder tags:

    • %f or %filename: The name of the sequence .esq file, without extension.

    • %D or %Datetime: The current time and date when the file is saved. Only use this tag in the filename portion of the format, not in the path portion.

    • %T or %Type: The frame type e.g. 'Light', 'Bias', 'Dark', 'Flat'...

    • %e or %exposure: The exposure duration in seconds.

    • %F or %Filter: The active filter name.

    • %t or %target: The Target name.

    • %s* or %sequence*: The image sequence identifier where * is the number of digits used (1-9). This tag is mandatory and must be the last element in the format.

  • Directory Browse Button: Opens a browse dialog to allow selection of the directory location used in the Format string. Use when first defining a Capture job.

  • Preview: Shows a preview of the resulting filename according to the Format string and other job settings.

    Placeholder tags that are specified by the sequence .seq file can only be displayed once the sequence file has been saved.

    The Datetime tag is previewed with the current system time and will be replaced by the time at point of image save.

    The sequence tag is always previewed as image 1 in the sequence and will be automatically incremented when the job is in progress.

  • Upload: Select how captured images are uploaded:

    1. Client: Captured images are only uploaded to Ekos and saved to the local directory specified above.

    2. Local: Captured images are only saved locally on the remote computer.

    3. Both: Captured images are saved on the remote device and uploaded to Ekos.

    When selecting Local or Both, you must specify the remote directory where the remote images are saved to. By default, all captured images are uploaded to Ekos.

  • Remote: When selecting either Local or Both modes above, you must specify the remote directory where remote images are saved to.

  • Preview: Shows a preview of the resulting filename according the provided path job settings. The file name format for saving remotely is pre-defined, placeholder tags may not be used. The file sequence number is always previewed as image 1 in the sequence and will be automatically incremented when the job is in progress.

Limit Settings

Limit Settings

Limit settings are applicable to all the images in the sequence queue. When a limit is exceeded, Ekos shall command the appropriate action to remedy the situation as explained below.

  • Guiding Deviation: If checked, it enforces a limit of maximum allowable guiding deviation for the exposure, if autoguiding is used. If the guiding deviation exceeds this limit in arcseconds, it aborts the exposure sequence. It will automatically resume the exposure sequence again once the guiding deviation goes below this limit.

  • Autofocus if HFR >: If autofocus is enabled in the focus module and at least one autofocus operation was completed successfully, you can set the maximum acceptable HFR value. If this option is enabled then between consecutive exposures, the HFR value is recalculated, and if found to exceed the maximum acceptable HFR value, then an autofocus operation is automatically triggered. If the autofocus operation is completed successfully, the sequence queue resumes, otherwise, the job is aborted.

  • Meridian Flip: If supported by the mount, set the hour angle limit (in hours) before a meridian flip is commanded. For example, if you set the meridian flip duration to 0.1 hours, Ekos shall wait until the mount passes the meridian by 0.1 hours (6 minutes), then it commands the mount to perform a meridian flip. After the meridian flip is complete, Ekos re-aligns using astrometry.net (if the alignment was used) and resumes guiding (if it was started before) and then resumes the capture process automatically.

Sequence Queue

Sequence Queue is the primary hub of the Ekos Capture Module. This is where you can plan and execute jobs using the sequence queue built-in powerful editor. To add a job, simply select all the parameters from the capture and file settings as indicated above. Once you selected your desired parameters, click on the add button in the sequence queue to add it to the queue.

Sequence Queue

You can add as many jobs as desired. While it is not strictly necessary, it is preferable to add the dark and flat jobs after the light frames. Once you are done adding jobs, simply click Start Sequence to begin executing the jobs. A job state changes from Idle to In Progress and finally to Complete once it is done. The Sequence Queue automatically starts the next job. If a job is aborted, it may be resumed again. To pause a sequence, click the pause button and the sequence will be stopped after the current capture is complete. To reset the status of all the jobs, simply click the reset button . Please beware that all image progress counts are reset as well. To preview an image in KStars FITS Viewer, click the Preview button.

Sequence queues can be saved as an XML file with extension .esq (Ekos Sequence Queue). To load a sequence queue, click the open document button . Please note that it will replace any current sequence queues in Ekos.

Important

Job Progress: Ekos is designed to execute and resume the sequence over multiple nights if required. Therefore, if Remember Job Progress option is enabled in Ekos Options, Ekos shall scan the file system to count how many images are already completed and will resume the sequence from where it was left off. If this default behavior is not desired, simply turn off Remember Job Progress under options.

To edit a job, double click it. You will notice the add button now changed to check mark button . Make your changes on the left-hand side of the CCD module and once done, click on the check mark button. To cancel a job edit, click anywhere on the empty space within the sequence queue table.

If your camera supports live video feed, then you can click the Live Video button to start streaming. The video stream window enables recording and subframing of the video stream. For more information, check the video below:

Recording feature

Filter Settings

Filter Queue

Click the filter icon next to the filter wheel selection box to open the filter settings dialog. If you are using filters that are not parafocal with each other and require a specific amount of focus offsets in order to get them into proper then set all the relative focus offsets in the dialog.

Configure settings for each filter individually:

  1. Filter: Filter Name.

  2. Exposure: Set exposure time used when performing focus under this filter. By default, it is set to 1 second.

  3. Offset: Set relative offsets. Ekos will command a focus offset change if there is a difference between the current and target filter offsets. For example, given the values in the example image, if the current filter is set to Red and next filter is Green, then Ekos shall command the focuser to Focus In by +300 ticks. Relative positive focus offsets denote Focus Out while negative values denote Focus In.

  4. Auto Focus: Check this option to initial AutoFocus process whenever the filter is changed to this filter.

  5. Lock Filter: Set which filter should be set and locked when performing autofocus for this filter.

Let's take an example. Suppose the capture sequence is running and the current filter is Green, so the relative offset is already set to +300. The next image in the sequence uses Hydrogen Alpha (H_Alpha) so before Ekos captures the next frame, the following actions take place:

  • Since Luminosity is specified as the locked filter and auto-focus is checked, the filter is changed to Luminosity.

  • A focus offset is -300 is applied since the prior filter Green was moved +300 previously.

  • Auto Focus process is initiated.

  • Once Auto Focus is complete, the filter is changed to H_Alpha.

  • A focus offset of -1200 is applied.

  • Capture sequence is resumed.

FITS Viewer

Captured images are displayed in KStars FITS Viewer tool, and also in the summary screen. Set options related to how the images are displayed in the viewer.

  • Auto Dark: You can capture an image and auto dark subtract it by checking this option. Note that this option is only applicable when using Preview, you cannot use it in batch mode sequence queue.

  • Effects: Image enhancement filter to be applied to the image after capture.

Rotator Settings

Rotator Settings

Field Rotators are supported in INDI & Ekos. The rotator angle is the raw angle reported by the rotator and is not necessary the Position Angle. A Position Angle of zero indicates that the frame top (indicated by small arrow) is pointing directly at the pole. The position angle is expressed as E of N (East of North), so 90 degrees PA indicates the frame top points 90 degrees away (counter-clockwise) from the pole. Check examples for various PAs.

To calibrate the Position Angle (PA), capture and solve an image in the Ekos Align module. An offset and a multiplier are applied to the raw angle to produce the position angle. The Ekos Rotator dialog permits direct control of the raw angle and also the PA. The offset and multiplier can be changed manually to synchronize the rotator's raw angle with the actual PA. Check Sync FOV to PA to rotate the current Field of View (FOV) indicator on the Sky Map with the PA value as you change it in the dialog.

Rotator settings

Each capture job may be assigned different rotator angles, but be aware that this would cause guiding to abort as it would lose track of the guide star when rotating. Therefore, for most sequences, the rotator angle is kept the same for all capture jobs.

Calibration Frames

Calibration settings

For Flat Field frames, you can set calibration options in order to automate the process. The calibration options are designed to facilitate automatic unattended flat field frame capture. It can also be used for dark and bias frames if desired. If your camera is equipped with a mechanical shutter, then it is not necessary to set calibration settings unless you want to close the dust cover to ensure no light at all passes through the optical tube. For flat fields, you must specify the flat field light source, and then specify the duration of the flat field frame. The duration can be either manual or based on ADU calculations.

  1. Flat Field Source

    • Manual: The flat light source is manual.

    • Dust Cover with Built-In Flat Light: If using a dust cover with builtin light source (e.g. FlipFlat). For dark and bias frames, close the dust cap before proceeding. For flat frames, close the dust cap and turn on the light source.

    • Dust Cover with External Flat Light: If using a dust cover with an external flat light source. For dark and bias frames, close the dust cap before proceeding. For flat frames, open the dust cap and turn on the light source. The external flat light source location is presumed to be the parking location.

    • Wall: Light source is a panel on the observatory wall. Specify the Azimuth and Altitude coordinates of the panel and the mount shall slew there before capturing the flat field frames. If the light panel is controllable from INDI, Ekos shall turn it on/off as required.

    • Dawn/Dusk: Currently unsupported.

  2. Flat Field Duration

    • Manual: Duration is as specified in the Sequence Queue.

    • ADU: Duration is variable until specified ADU is met.

Before the calibration capture process is started, you can request Ekos to park the mount and/or dome. Depending on your flat source selection above, Ekos will use the appropriate flat light source before starting flat frames capture. If ADU is specified, Ekos begins by capturing a couple of preview images to establish the curve required to achieve the desired ADU count. Once an appropriate value is calculated, another capture is taken and ADU is recounted until a satisfactory value is achieved.

Video Tutorials

Capture

Filter Wheels

Focus

Theory Of Operation

Ekos Focus

In order to focus an image, Ekos needs to establish a numerical method for gauging how good your focus is. It's easy when you look at an image and can see it as unfocused, as the human eye is very good at detecting that, but how can Ekos possibly know that?

There are multiple methods. One is to calculate the Full Width at Half Maximum (FHWM) of a star profile within an image, and then adjust the focus until an optimal (narrower) FWHM is reached. The problem with FWHM is that it assumes the initial focus position to be close to the critical focus. Additionally, FWHM does not perform very well under low-intensity fluxes. An Alternative method is Half-Flux-Radius (HFR), which is a measure of the width in pixels counting from the center of the star until the accumulated intensity is half of the total flux of the star. HFR proved to be much more stable in conditions where you might have unfavorable sky conditions, when the brightness profile of the stars is low, and when the starting position of the focus is far from the optimal focus.

After Ekos processes an image, it selects either a single star and starts measuring its HFR, or it selects a set of stars matching the criteria that have been set and calculates an average HFR. It can automatically select stars, or you can select a single star manually. It is recommended to allow Ekos to select a set of stars.

Ekos supports 4 different focus algorithms: Iterative, Polynominal, Linear and Linear 1 Pass.

  • Iterative: In the Iterative algorithm, Ekos operates iteratively by moving in discrete steps, decided initially by the user-configurable step size and later by the slope of the V-Curve, to get closer to the optimal focus position where it then changes gears and performs smaller, finer moves to reach the optimal focus. The focus process stops when the measured HFR is within the configurable tolerance of the minimum recorded HFR in the process. In other words, whenever the process starts searching for a solution within a narrowly limited range, it checks if the current HFR is within % difference compared to the minimum HFR recorded, and if this condition is met then the Autofocus process is considered successful. The default value is set to 1% and is sufficient for most situations. The Step options specify the number of initial ticks the focuser has to move. If the image is severely out of focus, we set the step size high (i.e. greater than 250). On the other hand, if the focus is close to optimal focus, we set the step size to a more reasonable range (less than 50). It takes trial and error to find the best starting tick, but Ekos only uses that for the first focus motion, as all subsequent motions depend on the V-Curve slope calculations. Key features include:

    • The algorithm relies on the focuser having well controlled backlash.

    • The algorithm can be fast using a minimum number of steps.

    • The algorithm works on a "good enough" paradigm whereby it stops when the HFR is within % Tolerance of the perceived minimum.

  • Polynomial: In the Polynomial algorithm, the process starts off in Iterative mode, but once we cross to the other side of the V-Curve (once HFR values start increasing again after decreasing for a while), then Ekos performs quadratic curve fitting to find a solution that predicts the minimum possible HFR position. Key features include:

    • The algorithm relies on the focuser having well controlled backlash.

    • The algorithm can be fast using a minimum number of steps.

    • The algorithm uses curve fitting to pinpoint the optimum focus position.

  • Linear: In the Linear algorithm, Ekos steps outward from its starting point then moves inward taking regular datapoints through the point of optimum focus and then further inward, to draw a V-Curve. It then fits a quadratic curve to the datapoints and calculates the point of optimum focus. It then moves out again past the point of optimum focus, halves the stepsize and moves in again for a second pass. It looks to follow the curve from the first pass and find the minimum HFR. Due to randomness in the HFR measurements it uses the % tolerance to help decide when it has found a solution. Key features include:

    • The algorithm compensates for focuser backlash and can deal with both consistent and inconsistent backlash.

    • The algorithm is slow, taking 2 passes to identify optimum focus.

    • The algorithm uses curve fitting to pinpoint the optimum focus position in pass 1, but then uses % Tolerance to try to stop as close as possible to this HFR on pass 2.

    • The algorithm is highly configurable with user control over many parameters like step size and number of steps.

  • Linear 1 Pass: In the Linear 1 Pass algorithm, Ekos initially performs like the Linear algorithm in establishing the first pass V-Curve and fitting a curve to it to find the solution. Then, however, it moves directly to the calculated minimum. Key features include:

    • The algorithm compensates for focuser backlash, providing that backlash is consistent.

    • The algorithm is fast, taking 1 pass to identify optimum focus.

    • The algorithm uses more sophisticated curve fitting to pinpoint the optimum focus position.

    • The algorithm is highly configurable with user control over many parameters like step size and number of steps.

Optical Train Group

Optical Train Settings

The Optical Train group displays the currently selected Optical Train. By default this will be the primary imaging train, but other trains can be selected. The group consists of:

  • Train: The Optical Train currently in use by the Focus tab. Hover the mouse over this field for a more detailed description of the selected train.

  • Edit Button: Brings up the Optical Train dialog to view and potentially change the optical trains.

Focuser Group

Focuser Settings

All INDI-compatible focusers are supported. It is recommended to use absolute focusers for the best results since their absolute position is known on power up. In INDI, the focuser zero position is when the drawtube is fully retracted. When focusing outwards, the focuser position increases, while it decreases when focusing inwards. The following focuser types are supported:

  • Absolute: Absolute Position Focusers such as RoboFocus, MoonLite, ASI ZWO

  • Relative: Relative Position Focusers.

  • Time Based: Time based focusers with no position feedback that adjust focus position by moving for a certain amount of time.

Start off by selecting the Focuser from the dropdown.

For absolute focusers, you can set the ticks count in the Initial Steps Size field in the Mechanics tab. For absolute and relative focusers, the step size is in units of ticks and for simple, or time based, focusers, the step size is in milliseconds. The In and Out buttons can then be used to move the focuser by this number of ticks.

The Steps fields will initially contain the starting point in ticks for the focuser. As the focuser moves, the left field will update to reflect the focuser's current position. The right field will initially contain the starting position of the focuser but will update each time a successful Autofocus run completes, to keep a last good focus position. In addition you can set the right field to whatever value you like, and use the Goto button to move the focuser to this position.

The Goto Focus Position button moves the focuser to the position in the righthand Steps field.

The Stop Focuser Motion button stops the in-progress focuser motion.

The Auto Focus button starts an Autofocus run. The Stop button is used to stop the run.

The Capture Image button will take a frame based on the current settings in the CCD and Filter Wheel group. The Start Framing button will start repeatedly capturing frames until the Stop button is pressed.

Some of the focus algorithms will attempt to cope with being started away from the point of optimum focus, but for predictable results, it is best to start from a position of being approximately in focus. For first time setup, Start Framing can be used along with the In and Out buttons to adjust the focus position to roughly minimize the HFR of the stars in the captured images. When Framing is used in this way, the V-Curve graph changes to show a time series of frames and their associated HFRs. This makes the framing process much easier to perform.

If you are completely new to astronomy, it is always a good idea to get familiar with your equipment in daylight. This includes getting the approximate focus position on a distant object. This will provide a good starting position for focusing on stars when nighttime comes.

Camera & Filter Wheel Group

Focus Camera & Filter Wheel Group

This section of parameters deals with the Camera and Filter settings to use when focusing.

The top row of controls allows CCD parameters to be set.

  • Exp: The exposure time in seconds.

  • The Toggle Full Screen button pops the window displaying the focus frame out to a separate window. Pressing it again returns it within the focus window.

  • The Show in FITS Viewer button pops-up a separate FITS Viewer window to display the focus frame, in addition to the focus frame displayed within the focus window.

  • The Live Video button brings up the associated popup.

The next row of controls allows Camera parameters to be set. Choose a value from the binning dropdown and then set either the camera gain or ISO.

  • Binning: Increasing the binning will change the image scale as well as resulting in brighter pixels. A good place to start would be 1x1 and then see whether better results can be obtained by binning at higher levels such as 2x2 or 4x4.

  • Gain: Set the Gain for the Camera being used to focus. The value needs to be high enough to give a clear star pattern but not so high as to create too much noise to interfere with the focus operation. Some experimentation will be required to find an optimum value. If you are unsure where to start try unity gain for your camera and adjust from there.

  • ISO: Set the ISO for the Camera being used to focus. Some experimentation will be required to find an optimum value.

The third row of controls deals with the Temperature Source and Filter, if there is one:

  • TS: Select the temperature source from the dropdown. Underneath are displayed the current temperature from the selected temperature source and the change in temperature between when the last successful Autofocus run completed and the current temperature. It is common practice to redo focus after significant temperature changes that alter the telescope's focus point.

  • Filter: Select the filter to use.

    To start focusing it will probably be easier to select the filter that allows the most light through, for example the Lum filter. The Filter Settings button brings up the Filter Settings popup. This allows a number of parameters to be set per filter to be used during an Autofocus run which could be unattended so a user would not be available to set parameters at run time. Broadly these allow two types of focus runs:

    • Per Filter: When another module, for example, the Capture module requires a filter change, it is possible to automatically refocus for the new filter. The exposure to use for each filter is taken from the Filter Settings popup. This is very useful where, for example, narrowband filter require longer exposure times than broadband filters.

    • Lock Filter: It is possible to specify a Lock filter to use when it is required to focus another filter. For example, if a Red filter is used and an Autofocus run required, it is possible to run the Autofocus using the Lum filter and then, when complete, adjust the focus position by an Offset value corresponding to the predetermined focus difference between the Lum and Red filters. This is useful when, for example, it is difficult to focus some filters directly without excessively long exposure times. Note that this locked filter approach may also be used in the Alignment Module whenever it performs a capture for astrometry.

  • Reset button will reset the focusing subframe to full frame.

Focus Settings

Focus Settings

Next are 3 tabbed panes of parameters. These parameters are retained between sessions. First up is the Settings pane.

  • Auto Select Star: Allow Ekos to select the focus star(s) from the image. If not selected then the user will have to manually select a star.

  • Dark Frame: Check this option to perform dark-frame subtraction. This option can be useful in noisy images, where a pretaken dark is subtracted from the focus image before further processing.

    Dark frames are used by Focus, Alignment and Guiding. See the Dark Library feature within the Capture Module for more details on how to setup Dark Frames.

  • AF Backlash Comp: Check this option to have the Autofocus algorithm perform backlash compensation. This option is available when using the Linear and Linear 1 Pass algorithms. This field should be set together with the Backlash field. See the Focus Mechanics section for more details.

    Backlash in the focuser setup is likely to a combination of backlash in the electronic focuser itself (e.g. in the gearing mechanism), in the binding of the electronic focuser to the telescope drawtube, and in the telescope drawtube's mechanism. Thus, each setup will have its own backlash characteristic.

    There are several things to consider when working out how to deal with backlash:

    • No Backlash: If you are fortunate enough to have a setup with no backlash then it would make sense to set AF Backlash Comp off. It should work fine if AF Backlash Comp is on, but the AutoFocus routine will make unnecessary movements.

    • Backlash Managed by Focuser: If your focuser had the ability to manage backlash itself then you can use this facility and turn off AF Backlash Comp. Alternatively, if it's possible, you could turn off the focuser's backlash facility and set AF Backlash Comp on.

    • Backlash Managed by Device Driver: If your device driver had the ability to manage backlash itself then you can use this facility and turn off AF Backlash Comp. Alternatively, if it's possible, you could turn off the device driver's backlash facility and set AF Backlash Comp on.

    It is important to have backlash managed in one place to avoid conflicts.

  • Sub Frame: Either use the Full Field of the camera or select a Subframe around the focus star during the Autofocus procedure. This is only relevant if a single star is used for focusing. Enabling subframing can speed up the focus process.

  • Box: Sets the box size used to enclose the focus star when using Sub Frame. Increase if you have very large stars. For Bahtinov focus the box size can be increased even more to better enclose the Bahtinov diffraction pattern.

  • Full Field: Either use the full field of the camera or select a Sub Frame around the focus star during the Autofocus procedure. If using multiple stars then this option must be selected.

  • Annulus: Used in conjunction with Full Field, Annulus provides two input fields that together define a doughnut over the FOV of the camera. Stars falling outside of the doughnut are discounted from processing. Setting an inner value above 0% causes stars in the centre of the FOV to be discarded. This could be useful to avoid using stars in the target of the image (for example a galaxy) for focusing purposes. Setting an outer value below 100% causes stars in the edges of the FOV to be discarded during focusing. This could be useful if you do not have a flat field out to the edges of your FOV.

  • Suspend Guiding: Set this option to suspend guiding during an Autofocus run. An additional check is made to only suspend guiding if it is being carried out via the primary scope, for example when using an Off Axis Guider. The purpose of this is to prevent guiding from having problems with defocused stars during the focus process.

  • Settle: This option is used in conjunction with Suspend Guiding. It allows any vibrations in the optical train to settle by waiting this many seconds after the Autofocus process has completed, before restarting guiding.

  • Use Weights: This is an experimental option only available with the Linear 1 Pass focus algorithm and Curve Types of Hyperbola and Parabola. It requires Full Field to be selected. The option calculates the standard deviation of star HFRs and uses the square of this (mathematically the variance) as a weighting in the curve fitting process. The advantage of this is that datapoints with less reliable data and therefore larger HFR standard deviations will be given less weight than more reliable datapoints. If this option is unchecked, and for all other curve fitting where the option is not allowed, all datapoints are given equal weight in the curve fitting process.

    See the Levenberg-Marquardt Solver for more details.

  • R² Limit: This is an experimental option only available with the Linear 1 Pass focus algorithm and Curve Types of Hyperbola and Parabola. As part of the Linear 1 Pass algorithm, the degree to which the curve fits the datapoints, or Coefficient of Determination, R², is calculated. This option allows a minimum acceptable value of R² to be defined that is compared to the value obtained from the curve fitting process. If the minimum value has not been achieved then Autofocus will rerun. Only one rerun will be performed and even if the minimum R² has not been met the second time, the Autofocus run will still be deemed successful.

    Experiment to find an appropriate value but a good starting point would be 0.8 or 0.9

Focus Process

Focus Process

This is the Focus Process parameters pane.

  • Detection: Select star detection algorithm. Each algorithm has its strengths and weaknesses. It is recommended to keep the default value, SEP, unless it fails to properly detect stars. The following are available:

    • SEP: Source Extraction and Photometry built in library. This is the default value.

    • Centroid: An extraction method based on estimating star mass around signal peaks.

    • Gradient: A single source extraction model based on the Sobel filter.

    • Threshold: A single source detection algorithm based on pixel values.

    • Bahtinov: This detection method can be used when using a Bahtinov mask for focusing. First take an image, then select the star to focus on. A new image will be taken and the diffraction pattern will be analysed. Three lines will be displayed on the diffraction pattern showing how well the pattern is recognized and how good the image is in focus. When the pattern is not well recognized, the Num. of rows parameter can be adjusted to improve recognition. The line with the circles at each end is a magnified indicator for the focus. The shorter the line, the better the image is in focus.

  • SEP Profile: If the star detection algorithm is set to SEP, then choose a parameter profile to use with the algorithm. It is recommended to use the default 1-Focus-Default profile as a starting point.

  • Threshold: Threshold percentage value is used for star detection using the Threshold detection algorithm. Increase to restrict the centroid to bright cores. Decrease to enclose fuzzy stars.

  • Algorithm: Select the Autofocus process algorithm:

    • Iterative: Moves focuser by discreet steps initially decided by the step size. Once a curve slope is calculated, further step sizes are calculated to reach an optimal solution. The algorithm stops when the measured HFR is within Tolerance of the minimum HFR recorded in the procedure.

    • Polynomial: Starts with the iterative method. Upon crossing to the other side of the V-Curve, polynomial fitting coefficients along with possible minimum solution are calculated. This algorithm can be faster than a purely iterative approach given a good data set.

    • Linear: This algorithm builds a V-Curve with approximately Out step Multiple steps on each side of the minimum. Having built the V-Curve it then fits a quadratic equation to the curve (parabolic shape) and uses this to calculate the focuser position giving the minimum HFR. Having identified the minimum it then performs a 2nd pass halving the step size, recreating the curve from the 1st pass. It attempts to stop within Tolerance of the minimum HFR calculated during the 1st pass.

    • Linear 1 Pass: This algorithm starts in the same way as Linear building a V-Curve. Having built the V-Curve it then fits the Curve Fit type to the datapoints and then calculates the focuser position giving the minimum HFR. Having identified the minimum it then moves directly to that point in a way designed to neutralise backlash.

      This algorithm supports the older style Quadratic curve type as well as the newer Levenberg-Marquardt Solver for Hyperbolic and Parabolic curves. It will also weight the datapoints in the curve fitting process if Use Weights is checked.

  • Effect: You may select an Effect filter to enhance the image for preview purposes. It is highly advisable to turn off any effects during the focusing process as it may interfere with HFR calculations. For DSLR cameras, you can change the ISO settings.

  • Tolerance: The tolerance percentage value is used to help decide when the Autofocus process stops in the Iterative and Linear algorithms. During the Autofocus process, HFR values are recorded, and once the focuser is close to an optimal position, it starts measuring HFRs against the minimum recorded HFR in the sessions and stops whenever a measured HFR value is within % difference of the minimum recorded HFR. Decrease the value to narrow the optimal focus point solution radius. Increase to expand solution radius.

    Warning

    Setting the value too low might result in a repetitive loop and would most likely result in a failed Autofocus process.

  • Kernel Size: The kernel size of the gaussian blur applied to the image before applying Bahtinov edge detection. Used when Detection is Bahtinov.

  • Average over: Number of frames to capture at each datapoint. It is usually sensible to start with 1 but increasing this will result in an averaging process over the star HFRs.

  • Sigma: The sigma of the gaussian blur applied to the image before applying Bahtinov edge detection. Used when Detection is Bahtinov.

  • Num. of rows: The number of lines displayed on screen when using a Bahtinov mask. Used when Detection is Bahtinov.

  • Curve Fit: The type of curve to fit to the datapoints.

    • Quadratic: Uses a quadratic equation using a linear style least squares algorithm supplied by GSL (GNU Science Library). This is, in effect, a parabolic curve.

    • Hyperbola: Fits a Hyperbola using a non-linear least squares algorithm supplied by GSL (GNU Science Library). See Levenberg-Marquardt Solver for more details.

    • Parabola: Fits a Parabola using a non-linear least squares algorithm supplied by GSL (GNU Science Library). See Levenberg-Marquardt Solver for more details.

Focus Mechanics

Focus Mechanics

This is the Focus Mechanics parameters pane.

  • Initial Step size: This sets the step size to be used by various focus algorithms. For absolute and relative focusers this is the number of ticks; for timer based focusers this is the number of milliseconds.

  • Max Travel: Puts bounds on the amount of travel from the current focuser position that is permitted by the Autofocus algorithms. The purpose is to protect the focuser from travelling too far and potentially damaging itself. On the other hand, the value needs to be big enough to allow sufficient focuser motion to permit the auto focus runs to complete.

  • Max Step size: Used by the Iterative focus algorithm to limit the maximum step size that can be used.

  • Backlash: All mechanical devices with gears suffer from backlash. In a typical focuser there will be a dead zone where changing direction (e.g. from “in” to “out”) results in movement of the focuser by a few ticks, but no actual movement of the optical train.

    The Linear 1 Pass algorithm (like the Linear algorithm) provides backlash compensation in the 2 places during an auto focus run when the focuser moves outwards:

    • The initial outward movement of Initial Step Size * Out Step Multiple at the start of the run.

    • When the inward pass is complete and Ekos has determined the best focus position and moves outward to it.

    Linear 1 Pass will extend (by x ticks) the outward movement, and then, as a separate movement it will move inward by x ticks. So it always approaches the desired position in an inward direction.

    There are 2 schemes that can be used:

    • Set Backlash to 0. Ekos will use a value of 5 * Initial Step Size.

    • Set Backlash > 0. EKOS will use this value in its backlash calculations. There will probably be instructions with your focuser for determining the value of Backlash. It is not necessary to set an exact value for either Linear or Linear 1 Pass to work correctly; all that is required is that the value set in Backlash is >= the actual backlash value. For example, if you measure backlash and get a value around 100, any value >=100 will work equally well. For example, set Backlash = 200.

  • Settle: The number of seconds to wait, after moving the focuser, before starting the next capture. The purpose is to stop any vibrations in the optical train from affecting the next frame.

  • Out Step Multiple: Used by the Linear and Linear 1 Pass focus algorithms, this parameter specifies the initial number of outward steps the focuser takes at the start of a Autofocus run.

  • Capture Timeout: The amount of time in seconds to wait for a captured image to be received before declaring a timeout.

  • Motion Timeout: The amount of time in seconds to wait for the focuser to move to the requested position before declaring a timeout.

Focus Display

Focus Display

The focus display, displays a FITS viewer window onto the frame taken during the focus process. It displays the Annulus values superimposed on the image. All the stars detected by Ekos based on the selected parameters, have their HFR value displayed next to the associated star.

The window supports the following FITS viewer options (at the top of the window):

  • Zoom In and Zoom Out.

  • Default Zoom and Zoom to Fit.

  • Toggle Stretch: Toggle screen stretch on or off.

  • Toggle Crosshairs: Toggle crosshairs on or off.

  • Toggle Gridlines: Toggle pixel gridlines on or off.

  • Toggle Stars: Toggle star detection on or off.

V-Curve

Focus V-Curve

The V-Curve displays focuser position (x-axis) versus Half-Flux-Radius (HFR) (y-axis). Each datapoint is drawn on the graph and represented by a circle with a number representing the datapoint. How many datapoints are taken and how the focuser moves is determined by the parameters chosen.

For certain algorithms, Ekos will also draw a curve of best fit through the datapoints. If Use Weights is selected then error bars are indicated on each datapoint that correspond to the standard deviation in measured HFR value.

Under the V-Curve a number of parameters are displayed:

  • HFR: Displays the star HFR for the most recent datapoint.

  • Stars: The number of stars used for the most recent datapoint.

  • Iteration: The number of datapoints taken so far.

  • HFR: Invokes the Relative Profile popup.

  • Clear Data: Resets the V-Curve graph by clearing the displayed data.

When framing, the graph format changes to that of a "time series" where horizontal axis denotes the frame number. This is to aid you in the framing process as you can see how HFR changes between frames.

Focus V-Curve Timeseries

Relative Profile

Focus Relative Profile

The relative profile is a graph that displays the relative HFR values plotted against each other. Lower HFR values correspond to narrower shapes and vice-versa. The solid red curve is the profile of the current HFR value, while the dotted green curve is for the previous HFR value. Finally, the magenta curve denotes the first measured HFR. This enables you to judge how well the Autofocus process improved the relative focus quality.

How to Setup for an Autofocus Run

The exact settings that work best for a given astronomical setup need to be worked out by the user using trial and error, but this section gives some pointers. It uses the Linear 1 Pass algorithm:

  • Start near to focus by manually finding focus. Use the Start Framing option and manually adjust focus to get to approximate focus.

  • Select Linear 1 Pass and your curve of choice, say Hyperbola. Select Use Weights.

  • Make sure you are finding enough stars.

    • Start with the SEP star detection method and the 1-Focus-Default profile unless you have reason to use a different setup.

    • On the Settings tab, use Full Field (rather than Sub Frame) which will use many stars rather than just one. Select Auto Select Star to let the system select the stars to use.

    • Make sure Annulus is set to use a large amount of frame to make use of as many stars as possible. Note that there may be other factors that prevent you using all of the field such as issues with an un-flat field in the corners of the sensor, but don’t overdo the restriction.

    • Set the camera settings such as exposure, gain and binning such that you are getting a good number of stars. Its impossible to be prescriptive here but try for between 20 and 100 (obviously if your focal length and target can’t find that many then the process should still work but may be less optimal from a curve fitting perspective). As a suggestion start with 2 sec exposures, unity gain for your camera and 1x1 binning.

    • Upping the exposure usually finds more stars (but makes the focus process longer). You can also try taking multiple frames at the same point by setting the Average Over field > 1 frame.

  • Setup the Mechanics tab.

    • Setup Backlash. See the Backlash section for more details but if you do not know the value for your equipment then set to 0.

    • Setup Max Travel. This should be appropriate for your focuser to prevent overextending it. It needs to be big enough to support the values set in Initial Step Size and Out Step Multiple. It will need a minimum of just over Initial Step Size * Out Step Multiple. If you can, set it to, say, double this.

    • Settle. If your focuser causes vibration in the optical train then you need to set this value so that after moving, the system waits for Settle seconds before taking the next frame. Try moving the focuser then taking a few frames at the same position. If the first frame after movement has bigger HFRs than subsequent frames, then you probably need to up the value in Settle.

    • Out Step Multiple. Start with 4 or 5. This will give you 9-10 or 11-12 datapoints which is a good place to start. You need enough datapoints to form a curve, but the more you have the longer the process will take to complete.

    • Initial Step Size. The following shows a “good curve”. There is significant movement in the HFR axis to clearly demonstrate the curve, in this case max HFR is about 2.2 whilst min is 0.75 which gives a max / min of about 3.

      Good Focus Curve
    • In contrast, the next picture shows an Initial Step Size that has been set too low. The HFR varies from about 0.78 to 0.72. Which gives a max / min just over 1. The other clue that this is a poor setup is that the Error Bar range is very large compared to HFR movement which means that the curve solver is drawing a curve through a lot of noise, which means the results will not be very accurate.

      Bad Focus Curve

Coefficient of Determination, R²

The Coefficient of Determination, or R², is calculated in order to give a measure of how well the fitted curve matches the datapoints. More information is available here. This is an experimental feature that is available for the Linear 1 Pass focus algorithm. In essence, R² gives a value between 0 and 1, with 1 meaning a perfect fit where all datapoints sit on the curve, and 0 meaning that there is no correlation between the datapoints and the curve. The user should experiment with their equipment to see what values they can obtain, but as a guide, a value above, say 0.8 would be a good fit.

There is an option to set an “R² Limit” in the Settings tab of the Focus window that is compared to the calculated R² after the auto focus run has completed. If the limit value has not been achieved, then the auto focus is rerun.

Setting an R² Limit could be useful for unattended observation if the focus run produces a bad result for a 1-off reason. Obviously if the reason is not transitory then rerunning will not improve anything.

If the R² Limit is not achieved and the focus process is rerun, and again fails to achieve the R² Limit, then the focus run is marked as successful to avoid the process getting stuck rerunning auto focus forever.

This feature is turned off by setting the R² Limit to 0.

Levenberg–Marquardt Solver

The Levenberg-Marquardt (LM) algorithm is used to solve non-linear least squares problems. The GNU Science Library provides an implementation of the solver. These resources provide more details:

The Levenberg-Marquardt algorithm is a new feature added for the Linear 1 Pass focus algorithm. It is a non-linear least-squares solver and thus suitable for many different equations. The basic idea is to adjust the equation y = f(x,P) so that the computed y values are as close as possible to the y values of the datapoints provided, so that the resultant curve fits the data as best as it can. P is a set of parameters that are varied by the solver in order to find the best fit. The solver measures how far away the curve is at each data point, squares the result and adds them all up. This is the number to be minimized, let's call it S. The solver is supplied with an initial guess for the parameters, P. It calculates S, makes an adjustment to P and calculates a new S1. Provided S1 < S then we are moving in the right direction. It iterates through the procedure until:

  • the delta in S is less than a supplied limit (convergence has been reached), or

  • the maximum number of iterations has been reached, or

  • the solver encountered an error.

The solver is capable of solving either an unweighted or weighted set of datapoints. In essence, an unweighted set of data gives equal weight to each datapoint when trying to fit a curve. An alternative is to weight each datapoint with a measure that corresponds to how accurate the measurement of the datapoint actually is. In our case this is the variance of star HFRs associated with the datapoint. The variance is the standard deviation squared.

Currently the solver is used to fit either a parabolic or a hyperbolic curve.

Guide

Ekos Guide Module

Introduction

Ekos Guide Module enables autoguiding capability using either the powerful built-in guider, or at your option, external guiding via PHD2 or lin_guider. Using the internal guiding, guider CCD frames are captured and sent to Ekos for analysis. Depending on the deviations of the guide star from its lock position, guiding pulses corrections are sent to your mount Via any device that supports ST4 ports. Alternatively, you may send the corrections to your mount directly, if supported by the mount driver. Most of the GUI options in the Guide Module are well documented so just hover your mouse over an item and a tooltip will popup with helpful information.

To perform guiding, you need to select a Guider CCD in Ekos Profile Setup. The telescope aperture and focal length must be set in the telescope driver. If the Guider CCD is attached to a separate Guide Scope, you must also set the Guide Scope's Focal Length and Aperture. You can set these values under the Options tab of the telescope driver or from the Mount module. Autoguiding is a two-step process: Calibration & Guiding.

Guiding introduction

During the two processes, you must set the following:

  • Guider: Select the Guider CCD.

  • Via: Selects which device receives the autoguiding correction pulses from Ekos. Usually, guider CCDs have an ST4 port. If you are using the guider's ST4 to autoguide your telescope, set the guider driver in the Via combo box. The guider CCD will receive the correction pulses from Ekos and will relay them to the mount via the ST4 port. Alternatively, some telescopes support pulse commands and you can select the telescope to be a receiver of the Ekos correction pulses.

  • Exposure: CCD Exposure in seconds.

  • Binning: CCD Binning.

  • Box: Size of the box enclosing the guide star. Select a suitable size that is neither too large or too small for the selected star.

  • Effects: Specify filter to be applied to the image to enhance it.

Dark Frames

Dark frames are immensely helpful in reducing noises in your guide frames. It is highly recommended to take dark frames before you begin and calibration or guiding procedure. To take a dark frame, check the Dark checkbox and then click Capture. For the first time this is performed, Ekos will ask you about your camera shutter. If your camera does not have a shutter, then Ekos will warn you anytime you take a dark frame to cover your camera/telescope before proceeding with the capture. On the other hand, if the camera already includes a shutter, then Ekos will directly proceed with taking the dark frame. All dark frames are automatically saved to Ekos Dark Frame Library. By default, the Dark Library keeps reusing dark frames for 30 days after which it will capture new dark frames. This value is configurable and can be adjusted in Ekos settings in the KStars settings dialog.

Ekos Dark frames library

It is recommended to take dark frames covering several binning and exposure values so that they may be reused transparently by Ekos whenever needed.

Calibration

Calibration Settings

In the calibration phase, you need to capture an image, select a guide star, and click Guide to begin the calibration process. If calibration was already completed successfully before, then the autoguiding process shall begin immediately, otherwise, it would start the calibration process. If Auto Star is checked, then you are only required to click Capture and Ekos will automatically select the best-fit guide star in the image and continues the calibration process automatically. If Auto Star is disabled, Ekos will try to automatically highlight the best guide star in the field. You need to confirm or change the selection before you can start the calibration process. The calibration options are:

  • Pulse: The duration of pulses in milliseconds to be sent to the mount. This value should be large enough to cause a noticeable movement in the guide star. If you increase the value and you do not notice any movement of the guide star, then this suggests possible mount issues such as jamming or connection issues via the ST4 cable.

  • Two axis: Check if you want the calibration process makes calibration in both RA & DEC. If unchecked, the calibration is only performed in RA.

  • Auto Star: If checked, Ekos will attempt to select the best guide star in the frame and begins the calibration process automatically.

The reticle position is the guide star position selected by you (or by the auto selection) in the captured guider image. You should select a star that is not close to the edge. If the image is not clear, you may select different Effects to enhance it.

Ekos begins the calibration process by sending pulses to move the mount in RA and DEC. If the calibration process fails due to short drift, try increasing the pulse duration. To clear calibration, click the trash bin icon next to the Guide button.

Warning

Calibration can fail for a variety of reasons. To improve the chances of success, try the tips below.

  • Better Polar Alignment: This is critical to the success of any astrophotography session. Perform a quick polar alignment with a polar scope (if available) or by using Ekos Polar Alignment procedure in the Align module.

  • Set binning to 2x2: Binning improves SNR and is often very important to the success of the calibration and guiding procedures.

  • Prefer to use ST4 cable between guide-camera and mount over using mount pulse commands.

  • Select different filter (e.g. High contrast) and see if that makes a difference to bring down the noise.

  • Smaller Square Size.

  • Take dark frames to reduce noise.

  • Play with DEC Proportional Gain or disable DEC control completely and see the difference.

  • Leave algorithm to the default value (Smart).

Guiding

Guide Settings

Once the calibration process is completed successfully, the guiding shall begin automatically hereafter. The guiding performance is displayed in the Drift Graphics region where Green reflects deviations in RA and Blue deviations in DEC. The colors of the RA/DE lines can be changed in KStars color scheme in KStars settings dialog. The vertical axis denotes the deviation in arcsecs from the guide star central position and the horizontal axis denotes time. You can hover over the line to get the exact deviation at this particular point in time. Furthermore, you can also zoom and drag/pan the graph to inspect a specific region of the graph.

Ekos can utilize multiple algorithms to determine the center of mass of the guide star. By default, the smart algorithm is suited best for most situation. The fast algorithm is based on HFR calculations. You can try switching guiding algorithms if Ekos cannot keep of the guide star within the guiding square properly.

The info region displays information on the telescope & FOV, in addition to the deviations from the guide star along with the correction pulses sent to the mount. The RMS value for each axis is displayed along with the total RMS value in arcsecs. The internal guider employs PID controller to correct the mount tracking. Currently, the only the proportional and integral gains are utilized within the algorithm, so adjusting it should affect the length of the generated pulses sent to the mount in milliseconds.

To enable automatic dithering between frames, make sure to check the Dither checkbox. By default, Ekos should dither (i.e. move) the guiding box by up to 3 pixels after each frame captured in Ekos Capture Module. The motion duration and direction are randomized. Since the guiding performance can oscillate immediately after dithering, you can set the appropriate Settle duration to wait after dither is complete before resuming the capture process. In rare cases where the dithering process can get stuck in an endless loop, set the appropriate Timeout to abort the process. But even if dithering fails, you can select whether this failure should terminate the autoguiding process or not. Toggle Abort Autoguide on failure to select the desired behavior.

Non-guide dithering is also supported. This is useful when no guide camera is available or when performing short exposures. In this case, the mount can be commanded to dither in a random direction for up to the pulse specified in the Non-Guide Dither Pulse option.

Ekos supports multiple guiding methods: Internal, PHD2, and LinGuider. You need to select the desired guider in your Ekos equipment profile:

  • Internal Guider: Use Ekos internal guider. This is the default and recommended option.

  • PHD2: Use PHD2 as the external guider. If selected, specify the host and port of the PHD2. Leave to default values if Ekos and PHD2 are running on the same machine.

  • LinGuider: Use LinGuider as the external guider. If selected, specify the host and port of the LinGuider. Leave to default values if Ekos and LinGuider are running on the same machine.

Guiding Direction Control

Guiding Direction Control

You can fine-tune the guiding performance in the Control Section. The autoguide process works like a PID controller when sending correction commands to the mount. You can alter the Proportional and Integral gains to improve the guiding performance if necessary. By default, guiding corrective pulses are sent to both mount axis in all directions: positive and negative. You can fine-tune control by selecting which axis shall receive corrective guiding pulses and within each axis, you can indicate which direction (Positive) + or Negative (-) receives the guiding pulses. For example, for the Declination axis, the + direction is North and - is South.

Guiding Rate

Each mount has a particular guiding rate in (x15"/sec) and usually ranges from 0.1x, to 1.0x with 0.5x being a common value used by many mounts. The default guiding rate is 0.5x sidereal, which is equivalent to a proportional gain of 133.33. Therefore, set the guiding rate value to whatever value used by your mount, and Ekos shall display the recommended proportional gain value that you may set in the proportional gain field under the Control Parameters. Setting this value does not change your mount guiding rate! You must change your mount guiding rate either via the INDI driver, if supported, or via the hand controller.

Drift Graphics

Drift Graphics

The drift graphics is a very useful tool to monitor the guiding performance. It is a 2D plot of guiding deviations and corrections. By default, only the guiding deviations in RA and DE are displayed. The horizontal axis is the time in seconds since the autoguiding process was started while the vertical axis plots the guiding drift/deviation in arcsecs for each axis. Guiding corrections (pulses) can also be plotted in the same graph and you can enable them by checking the Corr checkbox below each Axis. The corrections are plotted as shaded areas in the background with the same color as that of the axis.

You can pan and zoom the plot, and when hovering the mouse over the graph, a tooltip is displayed containing information about this specific point in time. It contains the guiding drift and any corrections made, in addition to the local time, this event was recorded. A vertical slider to the right of the image can be used to adjust the height of the secondary Y-axis for pulses corrections.

The Trace horizontal slider at the bottom can be used to scroll through the guide history. Alternatively, you can click the Max checkbox to lock the graph onto the latest point so that the drift graphics autoscrolls. The buttons to the right of the slider are used for autoscaling the graphs, exporting the guide data to a CSV file, clearing all the guide data, and for scaling the target in the Drift Plot. Furthermore, the guide graph includes a label to indicate when a dither occurred so the user knows guiding was not bad at those points.

The colors of each axis can be customized in KStars Settings color scheme.

Drift Plot

A bulls-eye scatter plot can be used to gauge the accuracy of the overall guiding performance. It is composed of three concentric rings of varying radii with the central green ring having a default radius of 2 arcsecs. The last RMS value is plotted as with its color reflecting which concentric ring it falls within. You can change the radius of the innermost green circle by adjusting the drift plot accuracy.

Guiding with GPG

The internal guider can use predictive and adaptive guiding by enabling GPG guiding. This adaptively models the periodic error of the mount, and adds its predicted contribution to each guide pulse. Optionally, by enabling Dark Guiding, it can output the predicted corrections much faster than the guide camera exposure rate, effectively performing periodic error correction and allowing longer guide camera exposures.

PHD2 Support

You can opt to select external PHD2 application to perform guiding instead of the built-in guider.

Ekos Guide PHD2 settings

If PHD2 is selected, the Connect and Disconnect buttons are enabled to allow you to establish a connection with the PHD2 server. You can control PHD2 exposure and DEC guide settings. When clicking Guide, PHD2 should perform all the required actions to start the guiding process. PHD2 must be started and configured before Ekos.

After launching PHD2, select your INDI equipment and set their options. From Ekos, connect to PHD2 by clicking the Connect button. On startup, Ekos will attempt to automatically connect to PHD2. Once the connection is established, you may begin the guiding immediately by click on the Guide button. PHD2 shall perform calibration if necessary. If dithering is selected, PHD2 shall be commanded to dither given the offset pixels indicated and once guiding is settled and stable, the capture process in Ekos shall resume.

Note

Ekos saves a CSV guide log data that can be useful for analysis of the mount's performance under ~/.local/share/kstars/guide_log.txt. This log is only available when using the built-in guider.

Align

Introduction

Ekos Align Module

Ekos Alignment Module enables highly accurate GOTOs to within sub-arcseconds accuracy and can measure and correct polar alignment errors. This is possible thanks to the astrometry.net solver. Ekos begins by capturing an image of a star field, feeding that image to astrometry.net solver, and getting the central coordinates (RA, DEC) of the image. The solver essentially performs a pattern recognition against a catalog of millions of stars. Once the coordinates are determined, the true pointing of the telescope is known.

Often, there is a discrepancy between where the telescope thinks it is looking at and where it is truly pointing. The magnitude of this discrepancy can range from a few arcminutes to a couple of degrees. Ekos can then correct the discrepancy by either syncing to the new coordinates, or by slewing the mount to the desired target originally requested.

Furthermore, Ekos provides two tools to measure and correct polar alignment errors:

  • Polar Alignment Assistant Tool: A very easy tool to measure and correct polar errors. It takes three images near the celestial pole (Close to Polaris for Northern Hemisphere) and then calculates the offset between the mount axis and polar axis.

  • Legacy Polar Alignment Tool: If Polaris is not visible, this tool can be used to measure and correct polar alignment errors. It captures a couple of images near the meridian and east/west of the meridian. This will enable the user to adjust the mount until the misalignment is minimized.

At a minimum, you need a CCD/Webcam and a telescope that supports Slew & Sync commands. Most popular commercial telescope nowadays support such commands.

For the Ekos Alignment Module to work, you have an option of either utilizing the online astrometry.net solver, offline, or remote solver:

  • Online Solver: The online solver requires no configuration, and depending on your Internet bandwidth, it might take a while to upload and solve the image.

  • Offline Solver: The offline solver can be faster and requires no Internet connection. In order to use the offline solver, you must install astrometry.net in addition to the necessary index files.

  • Remote Solver: The remote solver is an offline solver the resides on a different machine (for example, you can use Astrometry solver on StellarMate). Captured images are solved on the remote machine.

Get astrometry.net

If you are planning to use Offline astrometry then you need to download astrometry.net application.

Note

Astrometry.net is already shipped with StellarMate so there is no need to install it. Index files from 16 arcminutes and above (4206 to 4019) are included with StellarMate. For any additional index files, you need to install them as necessary. To use Astrometry in StellarMate from a remote Ekos on Linux®/Windows®/Mac® OS, make sure to select Remote option in Ekos Alignment Module. Furthermore, make sure that the Astrometry driver is selected in your equipment profile.

Ekos Remote Astrometry
Windows®

To use astrometry.net under Windows®, you need to download and install the ANSVR Local Astrometry.net solver. The ANSVR mimics the astrometry.net online server on your local computer; thus the internet not required for any astrometry queries.

After installing the ANSVR server and downloading the appropriate index files for your setup, make sure ANSVR server is up and running and then go to Ekos Alignment options where you can simply change the API URL to use the ANSVR server as illustrated below:

ANSVR Parameters

In Ekos Align module, you must set the solver type to Online so that it uses the local ANSVR server for all astrometry queries. Then you can use the align module as you would normally do.

Remember as indicated above that StellarMate already includes astrometry.net. Therefore, if you would like to use StellarMate remotely to solve your images, simply change solver type to Remote and ensure that your equipment profile includes Astrometry driver which can be selected under the Auxiliary dropdown. This is applicable to all operating systems and not just Windows®.

Mac® OS

Astrometry.net is already included with KStars for Mac® OS, so no need to install it.

Linux®

Astrometry.net is already included with KStars bleeding version. But if astrometry is not installed, then you can install it by running the following command under Ubuntu™:

sudo apt-get install astrometry.net

Download Index Files

For offline (and remote) solvers, index files are necessary for the solver to work. The complete collection of index files is huge (over 30 GB), but you only need to download what is necessary for your equipment setup. Index files are sorted by the Field-Of-View (FOV) range they cover. There are two methods to fetch the necessary index files: The new download support in Align module, and the old manual way.

Automatic Download
Astrometry.net Indexes Download

Automatic download is only available for Ekos users on Linux® & Mac® OS. For Windows® users, please download ANSVR solver.

To access the download page, click the Options button in the Align module and then select Astrometry Index Files tab. The page displays the current FOV of your current setup and below it a list of available and installed index files. Three icons are used to designate the importance of index files given your current setup as follows:

  • Required

  • Recommended

  • Optional

You must download all the required files, and if you have plenty of hard drive space left, you can also download the recommended indexes. If an index file is installed, the checkmark shall be checked, otherwise check it to download the relevant index file. Please only download one file at a time, especially for larger files. You might be prompted to enter the administrator password (default in StellarMate is smate) to install the files. Once you installed all the required files, you can begin using the offline astrometry.net solver immediately.

Manual Download

You need to download and install the necessary index files suitable for your telescope+CCD field of view (FOV). You need to install index files covering 100% to 10% of your FOV. For example, if your FOV is 60 arcminutes, you need to install index files covering skymarks from 6 arcminutes (10%) to 60 arcminutes (100%). There are many online tools to calculate FOVs, such as Starizona Field of View Calculator.

Table 5.1. Index Files

Index FilenameFOV (arcminutes)Debian Package
index-4219.fits1400 - 2000astrometry-data-4208-4219
index-4218.fits1000 - 1400
index-4217.fits680 - 1000
index-4216.fits480 - 680
index-4215.fits340 - 480
index-4214.fits240 - 340
index-4213.fits170 - 240
index-4212.fits120 - 170
index-4211.fits85 - 120
index-4210.fits60 - 85
index-4209.fits42 - 60
index-4208.fits30 - 42
index-4207-*.fits22 - 30astrometry-data-4207
index-4206-*.fits16 - 22astrometry-data-4206
index-4205-*.fits11 - 16astrometry-data-4205
index-4204-*.fits8 - 11astrometry-data-4204
index-4203-*.fits5.6 - 8.0astrometry-data-4203
index-4202-*.fits4.0 - 5.6astrometry-data-4202
index-4201-*.fits2.8 - 4.0astrometry-data-4201-1 astrometry-data-4201-2 astrometry-data-4201-3 astrometry-data-4201-4
index-4200-*.fits2.0 - 2.8astrometry-data-4200-1 astrometry-data-4200-2 astrometry-data-4200-3 astrometry-data-4200-4

The Debian packages are suitable for any Debian-based distribution (Ubuntu, Mint, etc.). If you downloaded the Debian Packages above for your FOV range, you can install them from your favorite package manager, or via the following command:

sudo dpkg -i astrometry-data-*.deb

On the other hand, if you downloaded the FITS index files directly, copy them to /usr/share/astrometry directory.

Note

It is recommended to use a download manager as such DownThemAll! for Firefox to download the Debian packages as browsers' built-in download manager may have problems with download large packages.

How to Use?

Ekos Align Module offers multiple functions to aid you in achieving accurate GOTOs. Start with your mount in home position with the telescope tube looking directly at the celestial pole. For users in Northern Hemisphere, point the telescope as close as possible to Polaris. It is not necessary to perform 2 or 3 star alignments, but it can be useful for some mount types. Make sure your camera is focused and stars are resolved.

  • Capture & Solve: Capture an image and determine what region in the sky the telescope is exactly looking at. The astrometry results include the equatorial coordinates (RA & DEC) of the center of the captured image in addition to pixel scale and field rotation. Depending on the Solver Action settings, the results can be used to Sync the mount or Sync and then Slew to the target location. For example, suppose you slewed the mount to Vega then used Capture & Solve. If the actual telescope location is different from Vega, it will be first synced to the solved coordinate and then Ekos shall command the mount to slew to Vega. After slew is complete, the Alignment module will repeat Capture & Solve process again until the error between reported and actual position falls below the accuracy thresholds (30 arcseconds by default).

  • Load & Slew: Load a FITS or JPEG file, solve it, and then slew to it.

  • Polar Alignment Assistant: A simple tool to aid in polar alignment of German Equatorial Mounts.

  • Legacy Polar Alignment Tool: Measure polar alignment error when a view of the celestial pole (e.g. Polaris for Northern Hemisphere) is not available.

Warning

Never solve an image at or near the celestial pole (unless Ekos Polar Alignment Assistant Tool is used). Slew at least 20 degrees away from the celestial pole before solving the first image. Solving very close to the poles will make your mount pointing worse so avoid it.

Alignment Settings

Astrometry.net Settings

Before you begin the alignment process, select the desired CCD & Telescope. You can explore astrometry.net options that are passed to the astrometry.net solver each time an image is captured:

  • CCD: Select CCD to capture from.

  • Exposure: Exposure duration in seconds.

  • Accuracy: Acceptable difference between reported telescope coordinate and actually solved coordinate.

  • Bin X: Set horizontal binning of the CCD.

  • Bin Y: Set vertical binning of the CCD.

  • Scope: Set the active telescope in case you have different Primary and Guide scopes. FOV is re-calculated when selecting a different telescope.

  • Options: Options that are passed to the astrometry.net solver. Click the edit button to explore the options in detail.

  • Solver: Select solver type (Online, Offline, Remote). The remote solver is only available when connecting to a remote device.

By default, the solver will search all over the sky to determine the coordinates of the captured image. This can take a lot of time; therefore, in order to speed up the solver, you can restrict it to only search within a specified area in the sky designated by the RA, DEC, and Radius options above.

Astrometry.net Options

Options for offline and online solvers.

Astrometry.net Options

Most of the options are sufficient by default. If you have astrometry.net installed in a non-standard location, you can change the paths as necessary.

  • WCS: World-Coordinate-System is a system for embedding equatorial coordinate information within the image. Therefore, when you view the image, you can hover it and view the coordinate for each pixel. You can also click anywhere in the image and command to the telescope to slew there. It is highly recommended to keep this option on.

  • Verbose: If the solver repeatedly fails to solve, check this option to enable verbose output of the solver to help you identify any problems.

  • Overlay: Overlay captured images unto the sky map of KStars.

  • Upload JPG: When using online astrometry.net, upload all images are JPEGs to save bandwidth as FITS images can be large.

Solver Options

Ekos selects and updates the optimal options by default to accelerate the performance of the solver. You may opt to change the options that are passed to the solver in case the default options are not sufficient.

Solver Settings

Capture & Solve

Using Ekos Alignment Module, aligning your mount using the controller's 1, 2, or 3 star alignment is not strictly necessary, though for some mounts it is recommended to perform a rough 1 or 2 star alignment before using Ekos alignment module. If you are using EQMod, you can start using Ekos alignment module right away. A typical workflow for GOTO alignment involves the following steps:

  1. Set your mount to its home position (usually the NCP for equatorial mounts).

  2. Select Slew to Target in the Solver Action.

  3. Slew to a nearby bright star.

  4. After slew is complete, click Capture & Solve.

If the solver is successful, Ekos will sync and then slew to the star. The results are displayed in the Solution Results tab along with a bullseye diagram that shows the offset the reported telescope coordinates (i.e. where the telescope thinks it is looking at) vs. its actual position in the sky as determined by the solver.

Each time the solver is executed and returns successful results, Ekos can run on the following actions:

  • Sync: Syncs the telescope coordinates to the solution coordinates.

  • Slew to Target: Syncs the telescope coordinates to the solution coordinates and then slew to the target.

  • Nothing: Just solve the image and display the solution coordinates.

Polar Alignment

Polar Alignment Assistant

When setting up a German Equatorial Mount (GEM) for imaging, a critical aspect of capturing long-exposure images is to ensure proper polar alignment. A GEM mount has two axis: Right Ascension (RA) axis and Declination (DE) axis. Ideally, the RA axis should be aligned with the celestial sphere polar axis. A mount's job is to track the star's motion around the sky, from the moment they rise at the eastern horizon, all the way up across the median, and westward until they set.

Polar Alignment Assistant

In long exposure imaging, a camera is attached to the telescope where the image sensor captures incoming photons from a particular area in the sky. The incident photons have to strike the same photo-site over and over again if we are to gather a clear and crisp image. Of course, actual photons do not behave in this way: optics, atmosphere, seeing quality all scatter and refract photons in one way or another. Furthermore, photons do not arrive uniformly but follow a Poisson distribution. For point-like sources like stars, a point spread function describes how photons are spatially distributed across the pixels. Nevertheless, the overall idea we want to keep the source photons hitting the same pixels. Otherwise, we might end up with an image plagued with various trail artifacts.

Polar Alignment

Since mounts are not perfect, they cannot perfectly keep track of object as it transits across the sky. This can stem from many factors, one of which is the misalignment of the mount's Right Ascension axis with respect to the celestial pole axis. Polar alignment removes one of the biggest sources of tracking errors in the mount, but other sources of error still play a factor. If properly aligned, some mounts can track an object for a few minutes with the only deviation of 1-2 arcsec RMS.

However, unless you have a top of the line mount, then you'd probably want to use an autoguider to keep the same star locked in the same position over time. Despite all of this, if the axis of the mount is not properly aligned with the celestial pole, then even a mechanically-perfect mount would lose tracking with time. Tracking errors are proportional to the magnitude of the misalignment. It is therefore very important for long exposure imaging to get the mount polar aligned to reduce any residual errors as it spans across the sky.

Before starting the process, point the mount as close as possible to the celestial pole. If you are living in the Northern Hemisphere, point it as close as possible to Polaris.

The tool works by capturing and solving three images. After capturing each, the mount rotates by a fixed amount and another image is captured and solved.

Polar Alignment Assistant

After the first capture, you can rotate the mount by a specific amount (default 30 degrees) either West or East. After selecting the magnitude and direction, click Next to continue and the mount will be rotated. Once the rotation is complete you shall be asked to take another capture, unless you have checked Auto Mode. In Automated mode, the rest of the process will continue with the same settings and direction until a total of three images are captured.

Since the mount's true RA/DE are resolved by astrometry, we can construct a unique circle from the three centers found in the astrometry solutions. The circle's center is where the mount rotates about (RA Axis) and ideally, this point should coincide with the celestial pole. However, if there is a misalignment, then Ekos draws a correction vector. This correction vector can be placed anywhere in the image. Next, refresh the camera feed and make corrections to the mount's Altitude and Azimuth knobs until the star is located in the designated cross-hair. To make it easy to make corrections, expand the view by clicking on the Fullscreen button .

Polar Alignment Result

If you are away from StellarMate or PC, you can use your Tablet to monitor the camera feed while making corrections. Use the StellarMate's web-based VNC viewer or use any VNC Client on your tablet to access StellarMate. If Ekos is running on your PC, you can use applications like TeamViewer to achieve the same results. The following is a video demonstrating how to utilize the Polar Alignment Assistant tool.

Polar Alignment

Legacy Polar Alignment Workflow

Using the Polar Alignment mode, Ekos can measure and correct the polar alignment errors. To measure Azimuth error, point your mount to a star close to the meridian. If you live in the northern hemisphere, you will point the mount toward the southern meridian. Click on Measure Az Error to begin the process. Ekos will try to measure the drift between two images and calculates the error accordingly. You can ask Ekos to correct Azimuth error by clicking on the Correct Az Error button. Ekos will slew to a new location and asks you to adjust the mount's azimuth knobs until the star is in the center of the Field of View. You can use the Focus Module's Framing feature to take a look at the image as you make your adjustments.

Similarly, to measure Altitude error, click on the Measure Alt Error button. You need to point your mount either east or west and set the Altitude Direction combo box accordingly. Ekos will take two images and calculates the error. You can ask Ekos to correct Altitude error by clicking on the Correct Alt Error button. As with Azimuth correction, Ekos will slew to a new location and asks you to adjust the mount's altitude knobs until the star is in the center of the FOV.

After making a correction, it is recommended to measure the Azimuth and Altitude errors again and gauge the difference. You may need to perform the correction more than once to obtain optimal results.

Before starting the Polar Alignment tool, you must complete the GOTO Workflow above for at least one point in the sky. Once your mount is aligned, proceed with the following (assuming you live in the northern hemisphere):

  1. Slew to a bright star (4th magnitude or below) near the southern meridian (Azimuth 180). Make sure Slew to Target is selected. Capture and solve. The star should be exactly centered in your CCD field of view.

  2. Switch mode to Polar Alignment. Click Measure Az Error. It will ask you to slew to a star at the southern meridian which we already done. Click Continue. Ekos will now perform the error calculation.

  3. If all goes well, the error is displayed in the output boxes. To correct for the error, click Correct Az Error. Ekos will now slew to a different point in the sky, and you will be required to ONLY adjust the mount's azimuth knobs to center the star in the field of view. The most convenient way of monitoring the star field is by going to the Focus module and clicking Start Framing. If the azimuth error is great, the star might not be visible in the CCD field of view, and therefore you have to make blind adjustments (or simply look through the finderscope) until the star enters the CCD FOV.

  4. Begin your azimuth adjustments until the bright star you slewed to initially is as close to center as you can get it.

  5. Stop Framing in the Focus module.

  6. Repeat the Measure Az Error to ensure we indeed corrected the error. You might have to run it more than once to ensure the results are valid.

  7. Switch mode to GOTO.

  8. Now slew to a bright star either on the eastern or western horizon, preferably above 20 degrees of altitude. It has to be as close as possible to the eastern (90 azimuth) or western (270) cardinal points.

  9. After slew is complete, capture and solve. The star should be dead center in the CCD FOV now.

  10. Switch mode to Polar Alignment.

  11. Click Measure Alt Error. It will ask you to slew to a star at either the eastern (Azimuth 90) or western (Azimuth 270) horizon which we already done. Click Continue. Ekos will now perform the error calculation.

  12. To correct for the error, click Correct Alt Error. Ekos will now slew to a different point in the sky, and you will be required to ONLY adjust the mount's altitude knobs to center the star in the field of view. Start framing as done before in the focus module to help you with the centering.

  13. After centering is complete, stop framing.

  14. Repeat the Measure Alt Error to ensure we indeed corrected the error. You might have to run it more than once to ensure the results are valid.

  15. Polar alignment is now complete!

Warning

The mount may slew to a dangerous position and you might risk hitting the tripod and/or other equipment. Carefully monitor the mount's motion. Use at your own risk.

Scheduler

Ekos Scheduler Module

Introduction

Ekos Scheduler is an indispensable arsenal in building your robotic observatory. A Robotic observatory is an observatory composed of several subsystems that are orchestrated together to achieve a set of scientific objectives without human intervention. It is the only Ekos module that does not require Ekos to be started as it is utilized to start and stop Ekos. It is designed to be straightforward and intuitive. However, the scheduler should only be used after you mastered Ekos and knows all the quirks of your equipment. Since the complete process is automated, including focus, guiding, and meridian flip, all equipment should be thoroughly used with Ekos and all their parameters and settings adjusted to achieve the best result.

With Ekos, the user can utilize the powerful sequence queue to image batches of images for a particular target. In simple setups, the user is expected to focus the CCD, align the mount, frame the target, and start guiding before initiating the capture process. For more complex observatory environments, there are usually predefined custom procedures to be executed to prepare the observatory for imaging, and another set of procedures on shutdown. The user may plan to image one or more targets during the night and expects data to be ready by morning. In KStars, tools such as the Observation Planner and What's up Tonight help the user in selecting candidates for imaging. After selecting the desired candidates, the user can add them to the Ekos Scheduler list for evaluation. The user may also add the targets directly in Ekos scheduler or select a FITS file of a previous image.

Settings

Ekos Scheduler provides a simple interface to aid the user in setting the conditions and constraints required for an observation job. Each observation job is composed of the following:

  • Target name and coordinates: Select target from the Find Dialog or Add it from Observation Planner. You can also enter a custom name.

  • Optional FITS File: If a FITS file is specified, the astrometry solver shall solve the file and use the central RA/DEC as the target coordinates.

  • Sequence file: The sequence file is constructed in the Ekos Capture Module. It contains the number of images to capture, filters, temperature settings, prefixes, download directory, etc.

  • Priority: Set job priority in the range of 1 to 20 where 1 designates the highest priority and 20 the lowest priority. Priority is applied in calculating the weight used to select the next target to image.

  • Profile: Select which equipment profile to utilize when starting Ekos. If Ekos & INDI are already started and online, this selection is ignored.

  • Steps: The user selects which Ekos modules should be utilized in the observation job execution workflow.

  • Startup Conditions: Conditions that must be met before the observation job is started. Currently, the user may select to start as soon as possible, ASAP, or when the target is near or past culmination, or at a specific time.

  • Constraints: Constraints are conditions that must be met at all times during the observation job execution process. These include minimum target altitude, minimum moon separation, twilight observation, artificial horizon altitude constraints, and weather monitoring.

  • Completion Conditions: Conditions that trigger completion of the observation job. The default selection is to simply mark the observation job as complete once the sequence process is complete. Additional conditions enable the user to repeat the sequence process indefinitely or up until a specific time.

You must select the Target and Sequence before you can add a job to the Scheduler. When the scheduler starts, it evaluates all jobs in accord to the conditions and constraints specified and attempts to select the best job to execute. Selection of the job depends on a simple heuristic algorithm that scores each job given the conditions and constraints, each of which is weighted accordingly. If two targets have identical conditions and constraints, usually the higher priority target followed by higher altitude target is selected for execution. If no candidates are available at the current time, the scheduler goes into sleep mode and wakes up when the next job is ready for execution.

Scheduler + Planner

The description above only tackles the Data Acquisition stage of the observatory workflow. The overall procedure typically utilized in an observatory can be summarized in three primary stages:

  1. Startup

  2. Data Acquisition (including preprocessing and storage)

  3. Shutdown

Startup Procedure

Startup procedure is unique to each observatory but may include:

  • Turning on power to equipment

  • Running safety/sanity checks

  • Checking weather conditions

  • Turning off light

  • Fan/Light control

  • Unparking dome

  • Unparking mount

  • etc.

Ekos Scheduler only initiates the startup procedure once the startup time for the first observation job is close (default lead time is 5 minutes before startup time). Once the startup procedure is completed successfully, the scheduler picks the observation job target and starts the sequence process. If a startup script is specified, it shall be executed first.

Data Acquisition

Depending the on the user selection, the typical workflow proceeds as follows:

  • Slew mount to target. If a FITS file was specified, it first solves the files and slew to the file coordinates.

  • Auto-focus target. The autofocus process automatically selects the best star in the frame and runs the autofocus algorithm against it.

  • Perform plate solving, sync mount, and slew to target coordinates.

  • Perform post-alignment focusing since the frame might have moved during the plate solving process.

  • Perform calibration and start auto-guiding: The calibration process automatically selects the best guide star, performs calibration, and starts the autoguide process.

  • Load the sequence file in the Capture module and start the imaging process.

Shutdown

Once the observation job is completed successfully, the scheduler selects the next target. If the next target scheduled time is not due yet, the mount is parked until the target is ready. Furthermore, if the next scheduled target is not due for a user-configurable time limit, the scheduler performs a preemptive shutdown to preserve resources and performs the startup procedure again when the target is due.

If an unrecoverable error occurs, the observatory initiates shutdown procedure. If there is a shutdown script, it will be executed last.

The following video demonstrates an earlier version of the scheduler, but the basic principles still apply today:

Ekos Scheduler

Weather Monitoring

Another critical feature of any remotely operated robotic observatory is weather monitoring. For weather updates, Ekos relies on the selected INDI weather driver to continuously monitor the weather conditions. For simplicity sake, the weather conditions can be summed in three states:

  1. Ok: Weather conditions are clear and optimal for imaging.

  2. Warning: Weather conditions are not clear, seeing is subpar, or partially obstructed and not suitable for imaging. Any further imaging process is suspended until the weather improves. Warning weather status does not pose any danger to the observatory equipment so the observatory is kept operational. The exact behavior to take under Warning status can be configured.

  3. Alert: Weather conditions are detrimental to the observatory safety and shutdown must be initiated as soon as possible.

Startup & Shutdown Scripts

Due to the uniqueness of each observatory, Ekos enables the user to select startup and shutdown scripts. The scripts take care of any necessary procedures that must take place on startup and shutdown stages. On startup, Ekos executes the startup scripts and only proceeds to the remainder of the startup procedure (unpark dome/unpark mount) if the script completes successfully. Conversely, the shutdown procedure begins with parking the mount & dome before executing the shutdown script as the final procedure.

Startup and shutdown scripts can be written any language that can be executed on the local machine. It must return 0 to report success, any other exist value is considered an error indicator. The script's standard output is also directed to Ekos logger window. The following is an sample demo startup script in Python:

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import os
import time
import sys

print "Turning on observatory equipment..."
sys.stdout.flush()

time.sleep(5)

print "Checking safety switches..."
sys.stdout.flush()

time.sleep(5)

print "All systems are GO"
sys.stdout.flush()

exit(0)
        

The startup and shutdown scripts must be executable in order for Ekos to invoke them (e.g. use chmod +x startup_script.py to mark the script as executable). Ekos Scheduler enables truly simple robotic operation without the need of any human intervention in any step of the process. Without human presence, it becomes increasingly critical to gracefully recover from failures in any stage of the observation run. Using Plasma™ notifications, the user can configure audible alarms and email notifications for the various events in the scheduler.

Mosaic Planner

Mosaic Planner

Hubble-like super wide field images of galaxies and nebulae are truly awe-inspiring, and while it takes great skills to obtain such images and process them; many notable names in the field of astrophotography employ gear that is not vastly different from yours or mine. I emphasize vastly because some do indeed have impressive equipment and dedicated observatories worth tens of the thousands of dollars. Nevertheless, many amateurs can obtain stellar wide-field images by combining smaller images into a single grand mosaic.

We are often limited by our camera+telescope Field of View (FOV). By increasing FOV by means of a focal reducer or a shorter tube, we gain a larger sky coverage at the expense of spatial resolution. At the same time, many attractive wide-field targets span multiple FOVs across the sky. Without any changes to your astrophotography gear, it is possible to create a super mosaic image stitched together from several smaller images. There are two major steps to accomplish a super mosaic image:

  1. Capture multiple images spanning the target with some overlap between images. The overlap is necessary to enable the processing software from aligning and joining the sub-images.

  2. Process the images and stitch them into a super mosaic image.

The 2nd step is handled by image processing applications such as PixInsight, among others, and will not be the topic of discussion here. The first step can be accomplished in Ekos Scheduler where it creates a mosaic suitable for your equipment and in accordance with the desired field of view. Not only Ekos creates the mosaic panels for your target, but it also constructs the corresponding observatory jobs required to capture all the images. This greatly facilitates the logistics of capturing many images with different filters and calibration frames across a wide area of the sky.

The Mosaic Planner in the Ekos Scheduler will create multiple Scheduler jobs based on a central target. To toggle the planner, click on the Mosaic Planner button in Ekos Scheduler or KStars INDI toolbar as illustrated in the screenshot. The planner draws the Mosaic Panel directly unto the sky map. It is recommended to enable HiPS overlay for the best experience. The planner is composed of four stages:

  1. Confirm Equipment: Ekos attempts to load equipment settings from INDI. If unsuccessful, you need to enter your equipment settings including your telescope focal length in addition to camera's width, height, and pixel dimensions. The settings are saved for future sessions.

    Confirm Equipment
  2. Adjust Grid: Select the mosaic panel dimension and overlap percentage. The Mosaic Panel is updated accordingly on the sky map. Adjust the Position Angle to match the desired mosaic orientation in the sky. If the Position Angle is different from your camera's usual orientation, you may need to rotate the camera either manually or via a mechanized rotator when the scheduler jobs are executed. Tile transparency is automatically calculated by default but may be turned off and adjusted manually. To compute the mosaic field from the number of tiles, click the Cover FOV button. The mosaic panel can be centered in the sky map by clicking on the Recenter button.

    Select Grid

    A large overlap will make frame stitching easier during post-processing, but it requires more panes to cover the desired extent. However, if you already know the minimal amount of sub-frames your rejection algorithm will use during post-processing, you may want to increase the overlap to attain that amount on the areas covered by multiple panes. For instance, a 4x4 mosaic grid with 75% overlap has 16 sub-frames covering the central intersection, which is enough for Winsorized Sigma rejection. Although the resulting stack does not have the same height on all parts of the final frame, this method gives you control on signal-to-noise ratio and allows you to provide context to your target while exposing a relatively low number of captures.

    The large number drawn in the corner of each grid pane represents the order in which panes will be captured. The default S-shaped choice (west-east then alternating high-low/low-high moves), ensures minimal movement of the mount during observation. Uncheck Minimum mount move to revert to west-east/high-low movement only. The coordinates of each pane are rendered in their center as degrees, minutes and seconds. Finally, the angle each pane rotates from the center of the mosaic is displayed at the bottom. If your field of view is large, or if your mosaic is located close to a celestial pole, you may observe that rendered panes start rotating visibly due their horizontal position or high declination. Use the overlap to ensure panes cover the desired frame extents properly.

    Scheduler Mosaic Tool - Large rotation
  3. Adjust Grid: Adjust Grid center by manually entering the J2000 center or by dragging the center of the mosaic on the sky map.

    Adjust Grid
  4. Create Jobs: The final step is to select the sequence file and directory to store the images. Target field is automatically filled but may be changed as desired. Select the steps each scheduler job should execute in sequence (Track -> Focus -> Align -> Guide -> Capture), and adjust the frequency of automatic alignment and focus routines that must be executed during the mosaic operation. For example, if Align Every is set to 2 Scheduler Jobs, then the first job will run the astrometry alignment, while the second job will skip it. When the third job is executed, alignment is performed again and so forth.

    Create Jobs

Click Create Jobs to generate mosaic scheduler jobs and add them to the schedule queue.

Analyze

Ekos Analyze Module

Introduction

The Analyze Module records and displays what happened in an imaging session. That is, it does not control any if your imaging, but rather reviews what occurred. Sessions are stored in an analyze folder, a sister folder to the main logging folder. The .analyze files written there can be loaded into the Analyze tab to be viewed. Analyze also can display data from the current imaging session.

There are two main graphs, Timeline and Stats. They are coordinated—they always display the same time interval from the Ekos session, though the x-axis of the Timeline shows seconds elapsed from the start of the log, and Stats shows clock time. The x-axis can be zoomed in and out with the +/- button, mouse wheel, as well as with standard keyboard shortcuts (e.g. zoom-in == Ctrl++) The x-axis can be panned with the scroll bar as well as with the left and right arrow keys. You can view your current imaging session, or review old sessions by loading .analyze files using the Input dropdown. Checking Full Width displays all the data, and Latest displays the most recent data (you can control the width by zooming).

Timeline

Timeline shows the major Ekos processes, and when they were active. For instance, the Capture line shows when images were taken (green sections) and when imaging was aborted (red sections). Clicking on a green section gives information about that image, and double clicking on one brings up the image taken then in a fitsviewer, if it is available.

Note

If you have moved your captured images, you can set alternate directory in the input menu to a directory which is the base of part of the original file path.

Clicking on a Focus segment shows focus session information and displays up the position vs HFR measurements from that session. Clicking on a Guider segment shows a drift plot from that session, (if it's guiding) and the session's RMS statistics. Other timelines show status information when clicked.

Statistics

A variety of statistics can be displayed on the Stats graph. There are too many for all to be shown in a readable way, so select among them with the checkboxes. A reasonable way to start might be to use rms, snr (using the internal guider with SEP Multistar), and hfr (if you have auto-compute HFR in the FITS options). Experiment with others. The axis shown (0-5) is appropriate only for ra/dec error, drift, rms, pulses, and hfr. These may be y-axis scaled (awkwardly) using the mouse wheel, but the other graphs cannot be scaled. To reset y-axis zooming, right-click on the Stats plot. Clicking on the graph fills in the values of the displayed statistics. This graph is zoomed and panned horizontally in coordination with the timeline.

Ekos Tutorials

Viewer

StellarMate is shipped with a VNC Server. This enables you to access the whole StellarMate desktop remotely. To connect to VNC, you can either use a Desktop/Mobile VNC Client, or simply via any browser.

The VNC address is: https://stellarmate_hostname:6080/vnc.html

Where stellarmate_hostname is the actual hostname (or IP address) of your unit and 6080 is the port. If you do not know the unit hostname, you can find the hostname in your StellarMate App.

You can use Real VNC which is available on all platforms to access stellarmate.

Once you access StellarMate, you can use it like any full-fledged computer. The default username is stellarmate and the default password is smate.