Warning, /education/kstars/doc/ekos-scheduler.docbook is written in an unsupported language. File is not indexed.

0001 <sect1 id="ekos-scheduler">
0002     <title>Scheduler</title>
0003     <indexterm>
0004         <primary>Tools</primary>
0005         <secondary>Ekos</secondary>
0006         <tertiary>Scheduler</tertiary>
0007     </indexterm>
0008     <screenshot>
0009         <screeninfo>
0010             Ekos Scheduler Module
0011         </screeninfo>
0012         <mediaobject>
0013             <imageobject>
0014                 <imagedata fileref="ekos_scheduler.png" format="PNG"/>
0015             </imageobject>
0016             <textobject>
0017                 <phrase>Ekos Scheduler Module</phrase>
0018             </textobject>
0019         </mediaobject>
0020     </screenshot>
0021     <sect2 id="ekos-scheduler-introduction">
0022       <title>Introduction</title>
0023         <para>
0024           The Ekos Scheduler is an important component of your imaging workflow. It connects to INDI, starts and stops all the other Ekos modules, schedules jobs according to their constraints and priorities, monitors those jobs as they execute, and then safely brings down the system when jobs are done, or before dawn. Whether you are running multi-day imaging sessions for multiple targets, or simply trying to image a single target for a few hours, it is advisable to have the Scheduler control your imaging sessions.
0025         </para>
0026     </sect2>
0027     <sect2 id="scheduler-table">
0028         <title>Scheduler Table</title>
0029         <para>
0030           The heart of the Scheduler is a table displaying the list of Scheduler jobs the user wants to run. Associated with each jobs are attributes (mostly described in the settings section below). The attributes describe the name of the job, where the telescope should be pointed when imaging that job, a description of what types of images should be captured, constraints about when the jobs should run (&eg; altitude, twilight, moon, landscape blockages, &etc;), things that need to be done before and after the job is run, and strategies for dealing with errors.
0031         </para>
0032         <para>
0033           You can add, delete, modify or change the order of rows in the Scheduler table. 
0034         </para>
0035         <itemizedlist>
0036             <listitem>
0037               <para>
0038                 You can add a Scheduler job row into the table by clicking the <guilabel>+</guilabel> control above the table, if all required attributes are filled out (name, position, and sequence file).
0039                 </para>
0040             </listitem>
0041             <listitem>
0042               <para>
0043                 If you click on a row, you can then click the <guilabel>-</guilabel> control above the table to delete that row.
0044               </para>
0045             </listitem>
0046 
0047             <listitem>
0048               <para>
0049                 If you click on a row, you can then click the <guilabel>^</guilabel> or <guilabel>v</guilabel> controls to move those rows up or down in the job list.
0050               </para>
0051             </listitem>
0052 
0053             <listitem>
0054               <para>
0055                 If you double click on a row, the attributes of that job are filled in to the various settings on the Scheduler page. You can then change one or more of those attributes, and then click the checkmark above the table (after your double-click, the <guilabel>+</guilabel> became a <guilabel>checkmark</guilabel>), and the new attributes are assigned to that job.
0056               </para>
0057             </listitem>
0058         </itemizedlist>
0059 
0060     </sect2>
0061     <sect2 id="scheduling-algorithm">
0062         <title>Scheduling Algorithm</title>
0063         <para>
0064           The Scheduler table (above) lists jobs in order of priority, with higher jobs (on lower-numbered rows) having higher priority than jobs further down the list (with higher-numbered rows). 
0065         </para>
0066         <para>
0067           The Scheduler regularly plans (and re-plans) which jobs should be run, and when. It can start executing a given job, and then later preempt that job for a new one. It can become idle if no jobs can be run (&eg; in daylight), and sleep until such a time that it becomes active again. Its aim is to keep the equipment as busy as possible, while respecting the scheduler-table's priorities. Here's how it works.
0068         </para>
0069         <para>
0070           When the scheduler starts (or when it replans, which it does every second while active), it looks through the entire list of jobs, starting at the highest priority job, and working its way down to the lowest priority one if necessary. When it finds a job that can run, it starts that job, possibly preempting the currently running job. A jobs can run if its constraints are met, &eg; the target is not blocked by the local terrain, it meets the minimum altitude constraint, it has not already completed all the desired imaging, ...
0071         </para>
0072     <para>
0073       The algorithm shows its projected next start times and stop times for all job in the Scheduler table. It also shows its estimate of times jobs will run during the next 48 hours in the log panel at the bottom of the window. See the screenshot of the scheduler window at the top of this section.
0074         </para>
0075         <para>
0076           The scheduling algorithm described in the above paragraph is known as the Greedy Scheduling algorithm. It is the recommended one to use. In previous versions of Ekos, there was another "Classic scheduling algorithm" which is no longer in Ekos. That scheme could not preempt running jobs, and thus did not make as much use of the equipment as the Greedy Algorithm. 
0077         </para>
0078         <para>
0079           There is a checkbox option in the scheduler options menu called <guilabel>Use greedy scheduling</guilabel> which defaults to being checked.  The system works as described above when it is checked. When it is unchecked the scheduler is prevented from scheduling lower priority jobs when uncompleted higher priority jobs cannot run. This results in less efficient use of the system, but may give you more control over scheduling.
0080         </para>
0081     </sect2>
0082     <sect2 id="scheduler-files">
0083         <title>Scheduler Files (.esl)</title>
0084         <para>
0085           The scheduler table with its list of jobs and attributes can be saved onto disk and read back in. It writes an .esl file. Controls for writing the current Scheduler table to disk, and reading back other .esl files are located above the table to the right.
0086         </para>
0087     </sect2>
0088     <sect2 id="ekos-scheduler-settings">
0089       <title>Settings</title>
0090         <para>
0091             Ekos Scheduler provides a simple interface to aid the user in setting the conditions and constraints required for an Scheduler job. You must select the <guilabel>Target</guilabel>, its coordinates, and the <guilabel>Sequence</guilabel> before you can add a job to the Scheduler.
0092         </para>
0093         <para>
0094             Each Scheduler job is composed of the following:
0095         </para>
0096         <itemizedlist>
0097             <listitem>
0098                 <para>
0099                     <guilabel>Target name and coordinates</guilabel>: Select target from the <link linkend="findobjects">Find Dialog</link> or <guibutton>Add</guibutton> it from <link linkend="tool-obsplanner">Observation Planner</link>. You can also enter a custom name. Coordinates can also be copied from the SkyMap using the button just to the right of the coordinates.
0100                 </para>
0101             </listitem>
0102             <listitem>
0103                 <para>
0104                     Optional <guilabel>PA</guilabel>: The position angle (or image rotation) can be specified for systems with camera rotation hardware.
0105                 </para>
0106             </listitem>
0107             <listitem>
0108                 <para>
0109                     Optional <guilabel>FITS File</guilabel>: If a FITS file is specified, the astrometry solver solves the file and use the central RA/DEC as the target coordinates.
0110                 </para>
0111             </listitem>
0112             <listitem>
0113                 <para>
0114                     <guilabel>Sequence</guilabel> file: The sequence file is constructed in the Ekos <link linkend="ekos-capture">Capture Module</link>. It has a list of capture specifications, where each spec details the number of images to capture, which filter to use, the exposure length, the gain, file naming details, temperature settings, prefixes, download directory, &etc;
0115                 </para>
0116             </listitem>
0117             <listitem>
0118                 <para>
0119                     <guilabel>Profile</guilabel>: Select which equipment profile to utilize when starting Ekos. If Ekos &amp; INDI are already started and online, this selection is ignored.
0120                 </para>
0121             </listitem>
0122             <listitem>
0123                 <para>
0124                     <guilabel>Steps</guilabel>: The user selects what steps should be taken at the start of the job. The possibilities are: (1) Start mount tracking, (2) autofocus, (3) run a plate solving alignment, (4) start the auto-guider. One or more can be chosen.
0125                 </para>
0126             </listitem>
0127             <listitem>
0128                 <para>
0129                     <guilabel>Startup Conditions</guilabel>: Conditions that must be met <emphasis role="bold">before</emphasis> the Scheduler job is started. Currently, the user may select to start as soon as possible, <guimenuitem>ASAP</guimenuitem>, or when the target is near or past culmination, or at a specific time.
0130                 </para>
0131             </listitem>
0132             <listitem>
0133                 <para>
0134                     <guilabel>Constraints</guilabel>: These are conditions that must be met <emphasis role="bold">at all times</emphasis> during the Scheduler job execution process. These include minimum target altitude, minimum moon separation, twilight observation, artificial horizon altitude constraints, and weather monitoring.
0135                 </para>
0136             </listitem>
0137             <listitem>
0138                 <para>
0139                     <guilabel>Completion Conditions</guilabel>: Conditions that trigger completion of the Scheduler job. The default selection is to simply mark the Scheduler job as complete once the sequence process is complete. Additional conditions enable the user to repeat the sequence process a number of times or indefinitely, or up until a specific time.
0140                 </para>
0141             </listitem>
0142         </itemizedlist>
0143     </sect2>
0144     <sect2 id="other-options">
0145         <title>Other options</title>
0146         <para>
0147           There are several other options to control how the Scheduler behaves. These are found in the general KStars Settings menu, shown below, in its Ekos tab and Scheduler sub-tab.
0148         </para>
0149       <screenshot>
0150             <screeninfo>
0151                 Scheduler Settings
0152             </screeninfo>
0153             <mediaobject>
0154                 <imageobject>
0155                     <imagedata fileref="ekos_scheduler_settings.png" format="PNG"/>
0156                 </imageobject>
0157                 <textobject>
0158                     <phrase>Scheduler Settings</phrase>
0159                 </textobject>
0160             </mediaobject>
0161         </screenshot>
0162        <sect3 id="remember-job-progress">
0163         <title>Remember job progress</title>
0164         <para>
0165           Among the settings shown above, one important one is known as <guilabel>Remember job progress</guilabel>.  When this box is checked and a job is running, the Scheduler looks at the job's images already captured on disk, and doesn't re-capture the ones that are already there.  The benefit is that if a job is restarted, or re-run another night, or if multiple jobs are being run together, stopping and starting when they are runnable, then jobs re-start right where they left off. This works well with the <guilabel>Repeat until terminated</guilabel> job-completion option. If <guilabel>Remember job progress</guilabel> is unchecked, jobs would restart from the start of their sequence specification each time, which probably isn't what you want.  Unfortunately, if the images are not stored on the same computer that Ekos is running on, then this feature doesn't work and the jobs restart from their beginning.
0166         </para>
0167         <para>
0168 A possibly confusing side-effect of <guilabel>Remember job progress</guilabel> is that if you've run a job using the (default) Sequence Completion finish condition, and it has captured all its images, and now you want to run the job again, the Scheduler won't schedule the job because it believes that all the images have already been captured. You'd either need to move those images elsewhere on disk, or change the finish condition to Repeat for N Times, or Repeat Until Terminated.
0169         </para>
0170        </sect3>
0171        <sect3 id="group-repeats">
0172         <title>Group repeats</title>
0173         <para>
0174           This feature allows you to run two or more scheduler jobs at roughly the same priority, such that if they were both runnable, they would progress at roughly the same rate.  This may be applicable, for example, to jobs imaging the multiple tiles in a mosaic, but is generally applicable to any set of jobs.
0175         </para>
0176         <para>
0177           Normally the (Greedy) scheduler's job priority is set by the row the job is listed in the Scheduler's job table. Jobs on rows closer to the top run with higher priority than jobs lower down. Thus, if a job on row 2 (Job2) uses <guilabel>Repeat Until Terminated</guilabel>, and that job's running constraints are satisfied, a lower down job (&eg; Job3) will not be scheduled to run.
0178         </para>
0179         <para>If you wish to alternate jobs, you can assign each of the jobs the same <guilabel>group</guilabel> name, and give the jobs one of the repeating finish conditions (&eg; Repeat for N times, or Repeat Until Terminated). With that setup, jobs in the same group will cede to each other if they have completed more 'Repeat Iterations' than the other job. So, if Job2 with group "MyGroup" completes its 2nd iteration, and Job3 with the same group name has only completed 0 or 1 iterations, when the time comes to schedule Job2, Job3 will run instead.
0180         </para>
0181         <para>
0182 Practically speaking, imagine you had a 6-panel mosaic you wanted to alternate.  You might give all of those jobs the same group name, make them all &eg; "Repeat for 5 times". Then, they would run in lock-step. The cadence of job switching would be controlled by the length of the sequence file assigned to each of those jobs. You wouldn't want to make the cadence too short (&eg; capturing one 2-minute image), as there is overhead in switching jobs. For instance, starting jobs may involved aligning, starting guiding, and even focusing.          
0183         </para>
0184        </sect3>
0185        <sect3 id="repeat-all-jobs">
0186         <title>Repeat all jobs</title>
0187         <para>
0188 There is a checkbox and number input right below the Scheduler jobs table that allows you to repeat the entire schedule N times.  This can be used to alternate a few jobs. You can just list the jobs on the scheduler, set it to repeat N times, and the jobs will repeat. However, this change is incompatible with 'Remember job progress (above) and unavailable if Remember Job Progress is checked. (Note: Remember Job Progress is recommended.)
0189         </para>
0190        </sect3>
0191     </sect2>
0192     <sect2 id="editing-running-jobs">
0193         <title>Editing running jobs</title>
0194         <para>
0195           It is possible to edit the scheduler's job table, and attributes of individual jobs, while the scheduler is running. As always, you double click on a job, change the desired attributes, and click the checkbox to finalize the change. If you edit the running job it will be restarted (i.e. the startup steps (slew, focus, align, guide) will be re-done. You can also move jobs up and down in priority, add new jobs, or deleted existing ones. You cannot delete the running job.
0196         </para>
0197         <para>
0198           One important attribute of scheduler jobs is their sequence file (.esq) which controls the capture module while the job is running. For example, it sets number of captures, filters used, gain/ISO, etc. The .esq is normally created and edited in the capture tab, but that cannot be done while the scheduler is running. If you desire to make changes to a .esq file while the scheduler is running, or create a new one, the scheduler provides a tool called the Capture Sequence Editor.
0199           </para>
0200        <sect3 id="capture-sequence-editor">
0201         <title>Capture Sequence Editor</title>
0202         <para>
0203            The Capture Sequence Editor is a tool to create and edit capture sequence files (.esq) which can be started by clicking the edit (pencil) icon just above the scheduler table. A screenshot is shown below.
0204         </para>
0205       <screenshot>
0206             <screeninfo>
0207                 Capture Sequence Editor
0208             </screeninfo>
0209             <mediaobject>
0210                 <imageobject>
0211                     <imagedata fileref="ekos_capture_sequence_editor.png" format="PNG"/>
0212                 </imageobject>
0213                 <textobject>
0214                     <phrase>Capture Sequence Editor</phrase>
0215                 </textobject>
0216             </mediaobject>
0217         </screenshot>
0218         <para>
0219           The editor is very similar in use and layout to the capture tab--though it is missing all the controls to actually capture image. You edit jobs the same way you do in capture, and load or save sequence queues the same way too (though there are additional Load and Save-To buttons provided in the editor).
0220         </para>
0221         <important>
0222         <para>It is important to understand that capture sequences rely to some extent on the filterwheel and camera being used (e.g. the filter names, the possible ISO values, ...). The Capture Sequence Editor, which is not connected to the device drivers, does not have direct access to this information. Instead, the editor uses the values from the last time the capture tab connected to its devices. Thus, it may not make sense to try and create a .esq file for a different camera or filterwheel than the last one connected-to. You may need to wait until your scheduler job is completed and edit that .esq directly in the capture tab.
0223         </para>
0224         <para>
0225           It is also recommended that you don't overwrite .esq files when scheduler jobs are currently using those same files. (It is OK if the scheduler is running, but not running that job.) This can get the scheduler and capture modules out of sync, as they read the files at different times. Instead, you can save to a different filename and then edit the scheduler job to use the new .esq filename.
0226         </para>
0227         </important>
0228      </sect3>          
0229     </sect2>
0230     <sect2 id="workflow">
0231         <title>Workflow</title>
0232 
0233       <screenshot>
0234             <screeninfo>
0235                 Scheduler + Planner
0236             </screeninfo>
0237             <mediaobject>
0238                 <imageobject>
0239                     <imagedata fileref="scheduler_planner.png" format="PNG"/>
0240                 </imageobject>
0241                 <textobject>
0242                     <phrase>Scheduler + Planner</phrase>
0243                 </textobject>
0244             </mediaobject>
0245         </screenshot>
0246         <para>
0247             The description above only tackles the <emphasis role="bold">Data Acquisition</emphasis> stage of the observatory workflow. The overall procedure typically utilized in an observatory can be summarized in three primary stages:
0248         </para>
0249         <orderedlist>
0250             <listitem>
0251                 <para>
0252                     Startup
0253                 </para>
0254             </listitem>
0255             <listitem>
0256                 <para>
0257                     Data Acquisition (including preprocessing and storage)
0258                 </para>
0259             </listitem>
0260             <listitem>
0261                 <para>
0262                     Shutdown
0263                 </para>
0264             </listitem>
0265         </orderedlist>
0266     </sect2>
0267 
0268     <sect2 id="ekos-scheduler-startup-procedure">
0269         <title>Startup Procedure</title>
0270         <para>
0271             Startup procedure is unique to each observatory but may include:
0272         </para>
0273         <itemizedlist>
0274             <listitem>
0275                 <para>
0276                     Turning on power to equipment
0277                 </para>
0278             </listitem>
0279             <listitem>
0280                 <para>
0281                     Running safety/sanity checks
0282                 </para>
0283             </listitem>
0284             <listitem>
0285                 <para>
0286                     Checking weather conditions
0287                 </para>
0288             </listitem>
0289             <listitem>
0290                 <para>
0291                     Turning off light
0292                 </para>
0293             </listitem>
0294             <listitem>
0295                 <para>
0296                     Fan/Light control
0297                 </para>
0298             </listitem>
0299             <listitem>
0300                 <para>
0301                     Unparking dome
0302                 </para>
0303             </listitem>
0304             <listitem>
0305                 <para>
0306                     Unparking mount
0307                 </para>
0308             </listitem>
0309             <listitem>
0310                 <para>
0311                     &etc;
0312                 </para>
0313             </listitem>
0314         </itemizedlist>
0315         <para>
0316             Ekos Scheduler only initiates the startup procedure once the startup time for the first Scheduler job is close (default <emphasis>lead</emphasis> time is 5 minutes before <emphasis>startup</emphasis> time). Once the startup procedure is completed successfully, the scheduler picks the Scheduler job target and starts the sequence process. If a startup script is specified, it shall be executed first.
0317         </para>
0318     </sect2>
0319 
0320     <sect2 id="ekos-scheduler-data-acquisition">
0321         <title>Data Acquisition</title>
0322         <para>
0323             Depending the on the user selection, the typical workflow proceeds as follows:
0324         </para>
0325         <itemizedlist>
0326             <listitem>
0327                 <para>
0328                     Slew mount to target. If a FITS file was specified, it first solves the files and slew to the file coordinates.
0329                 </para>
0330             </listitem>
0331             <listitem>
0332                 <para>
0333                     Auto-focus target. The autofocus process automatically selects the best star in the frame and runs the autofocus algorithm against it.
0334                 </para>
0335             </listitem>
0336             <listitem>
0337                 <para>
0338                     Perform plate solving, sync mount, and slew to target coordinates.
0339                 </para>
0340             </listitem>
0341             <listitem>
0342                 <para>
0343                     Perform post-alignment focusing since the frame might have moved during the plate solving process.
0344                 </para>
0345             </listitem>
0346             <listitem>
0347                 <para>
0348                     Perform calibration and start auto-guiding: The calibration process automatically selects the best guide star, performs calibration, and starts the autoguide process.
0349                 </para>
0350             </listitem>
0351             <listitem>
0352                 <para>
0353                     Load the sequence file in the <link linkend="ekos-capture">Capture module</link> and start the imaging process.
0354                 </para>
0355             </listitem>
0356             <listitem>
0357                 <para>
0358                     Coordinate module issues, such as failures in guiding or alignment. They may result is Scheduler job suspensions and rescheduling.
0359                 </para>
0360             </listitem>
0361             <listitem>
0362                 <para>
0363                     Note--some of the inter-module interactions are initiated by the modules themselves, but are monitored by the Scheduler. These include meridian flips, autofocus runs initiated by temperature change or timer expiration, and minimum guiding deviation requirements for capture.
0364                 </para>
0365             </listitem>
0366         </itemizedlist>
0367     </sect2>
0368 
0369     <sect2 id="ekos-scheduler-shutdown">
0370         <title>Shutdown</title>
0371         <para>
0372             Once the Scheduler job is completed successfully, the scheduler selects the next Scheduler job. If no job can be scheduled at this time, the mount is parked until a next job can run. Furthermore, if the next job is not due for a user-configurable time limit, the scheduler performs a <emphasis>preemptive</emphasis> shutdown to preserve resources and performs the startup procedure again when the target is due.
0373         </para>
0374         <para>
0375             If an unrecoverable error occurs, the observatory initiates shutdown procedure. If there is a shutdown script, it will be executed last.
0376         </para>
0377         <para>
0378             The following video demonstrates an earlier version of the scheduler, but the basic principles still apply today:
0379         </para>
0380         <mediaobject>
0381             <videoobject>
0382                 <videodata contentdepth="315" contentwidth="560" fileref="https://www.youtube.com/embed/v8vIXD1kois"/>
0383             </videoobject>
0384             <caption>
0385                 <para>
0386                     <phrase>Ekos Scheduler</phrase>
0387                 </para>
0388             </caption>
0389         </mediaobject>
0390     </sect2>
0391 
0392     <sect2 id="ekos-scheduler-weather-monitoring">
0393         <title>Weather Monitoring</title>
0394         <para>
0395             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:
0396         </para>
0397         <orderedlist>
0398             <listitem>
0399                 <para>
0400                     <emphasis role="bold">Ok</emphasis>: Weather conditions are clear and optimal for imaging.
0401                 </para>
0402             </listitem>
0403             <listitem>
0404                 <para>
0405                     <emphasis role="bold">Warning</emphasis>: 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.
0406                 </para>
0407             </listitem>
0408             <listitem>
0409                 <para>
0410                     <emphasis role="bold">Alert</emphasis>: Weather conditions are detrimental to the observatory safety and shutdown must be initiated as soon as possible.
0411                 </para>
0412             </listitem>
0413         </orderedlist>
0414     </sect2>
0415 
0416     <sect2 id="ekos-scheduler-startup-and-shutdown-scripts">
0417         <title>Startup &amp; Shutdown Scripts</title>
0418         <para>
0419             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 &amp; dome before executing the shutdown script as the final procedure.
0420         </para>
0421         <para>
0422             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:
0423         </para>
0424         <programlisting language="python">
0425 #!/usr/bin/env python
0426 # -*- coding: utf-8 -*-
0427 
0428 import os
0429 import time
0430 import sys
0431 
0432 print "Turning on observatory equipment..."
0433 sys.stdout.flush()
0434 
0435 time.sleep(5)
0436 
0437 print "Checking safety switches..."
0438 sys.stdout.flush()
0439 
0440 time.sleep(5)
0441 
0442 print "All systems are GO"
0443 sys.stdout.flush()
0444 
0445 exit(0)
0446         </programlisting>
0447         <para>
0448             The startup and shutdown scripts must be <emphasis>executable</emphasis> in order for Ekos to invoke them (&eg; use <userinput>chmod +x startup_script.py</userinput> 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.
0449         </para>
0450     </sect2>
0451 
0452     <sect2 id="ekos-scheduler-mosaic-Planner">
0453         <title>Mosaic Planner</title>
0454         <screenshot>
0455             <screeninfo>
0456                 Mosaic Planner
0457             </screeninfo>
0458             <mediaobject>
0459                 <imageobject>
0460                     <imagedata fileref="mosaic_planner.png" format="PNG"/>
0461                 </imageobject>
0462                 <textobject>
0463                     <phrase>Mosaic Planner</phrase>
0464                 </textobject>
0465             </mediaobject>
0466         </screenshot>
0467         <para>
0468             Hubble-like super wide field images of <ulink url="http://darkskyart.com/?page_id=96">galaxies</ulink> 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 <emphasis>vastly</emphasis> different from yours or mine. I emphasize <emphasis>vastly</emphasis> 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.
0469         </para>
0470         <para>
0471             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 <emphasis>stitched</emphasis> together from several smaller images. There are two major steps to accomplish a super mosaic image:
0472         </para>
0473         <orderedlist>
0474             <listitem>
0475                 <para>
0476                     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.
0477                 </para>
0478             </listitem>
0479             <listitem>
0480                 <para>
0481                     Process the images and <emphasis>stitch</emphasis> them into a super mosaic image.
0482                 </para>
0483             </listitem>
0484         </orderedlist>
0485         <para>
0486             The 2nd step is handled by image processing applications such as <ulink url="https://pixinsight.com">PixInsight</ulink>, 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.
0487         </para>
0488         <para>
0489             The <guilabel>Mosaic Planner</guilabel> in the Ekos Scheduler will create multiple Scheduler jobs based on a central target. To toggle the planner, click on the <guibutton>Mosaic Planner</guibutton> 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:
0490         </para>
0491         <orderedlist>
0492             <listitem>
0493                 <para>
0494                     <emphasis role="bold">Confirm Equipment</emphasis>: 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.
0495                 </para>
0496             <screenshot>
0497             <screeninfo>
0498             Confirm Equipment
0499             </screeninfo>
0500             <mediaobject>
0501                 <imageobject>
0502                     <imagedata fileref="mosaic_confirm_equipment.png" format="PNG"/>
0503                 </imageobject>
0504                 <textobject>
0505                     <phrase>Confirm Equipment</phrase>
0506                 </textobject>
0507             </mediaobject>
0508         </screenshot>
0509             </listitem>
0510             <listitem>
0511                 <para>
0512                     <emphasis role="bold">Adjust Grid</emphasis>: 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 <guibutton>Cover FOV</guibutton> button. The mosaic panel can be centered in the sky map by clicking on the <guibutton>Recenter</guibutton> button.
0513                 </para>
0514                 <screenshot>
0515             <screeninfo>
0516             Select Grid
0517             </screeninfo>
0518             <mediaobject>
0519                 <imageobject>
0520                     <imagedata fileref="mosaic_select_grid.png" format="PNG"/>
0521                 </imageobject>
0522                 <textobject>
0523                     <phrase>Select Grid</phrase>
0524                 </textobject>
0525             </mediaobject>
0526         </screenshot>
0527         <para>
0528             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.
0529         </para>
0530         <para>
0531             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 <guilabel>Minimum mount move</guilabel> 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 <guilabel>overlap</guilabel> to ensure panes cover the desired frame extents properly.
0532         </para>
0533         <screenshot>
0534             <screeninfo>
0535                 Scheduler Mosaic Tool - Large rotation
0536             </screeninfo>
0537             <mediaobject>
0538                 <imageobject>
0539                     <imagedata fileref="mosaic_close_pole.png" format="PNG"/>
0540                 </imageobject>
0541                 <textobject>
0542                     <phrase>Scheduler Mosaic Tool - Large rotation</phrase>
0543                 </textobject>
0544             </mediaobject>
0545         </screenshot>
0546             </listitem>
0547             <listitem>
0548                 <para>
0549                     <emphasis role="bold">Adjust Grid</emphasis>: Adjust Grid center by manually entering the J2000 center or by dragging the center of the mosaic on the sky map.
0550                 </para>
0551             <screenshot>
0552             <screeninfo>
0553             Adjust Grid
0554             </screeninfo>
0555             <mediaobject>
0556                 <imageobject>
0557                     <imagedata fileref="mosaic_adjust_grid.png" format="PNG"/>
0558                 </imageobject>
0559                 <textobject>
0560                     <phrase>Adjust Grid</phrase>
0561                 </textobject>
0562             </mediaobject>
0563         </screenshot>
0564             </listitem>
0565             <listitem>
0566                 <para>
0567                     <emphasis role="bold">Create Jobs</emphasis>: The final step is to select the sequence file and directory to store the images. Target field may be 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 <guilabel>Align Every</guilabel> 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.
0568                 </para>
0569                 <para>
0570                   If you want the different mosaic tile jobs to alternate, then fill in the group name with an identifier that all the tile jobs will share, and select a repeating completion condition.
0571                 </para>
0572             <screenshot>
0573             <screeninfo>
0574             Create Jobs
0575             </screeninfo>
0576             <mediaobject>
0577                 <imageobject>
0578                     <imagedata fileref="mosaic_create_jobs.png" format="PNG"/>
0579                 </imageobject>
0580                 <textobject>
0581                     <phrase>Create Jobs</phrase>
0582                 </textobject>
0583             </mediaobject>
0584         </screenshot>
0585             </listitem>
0586         </orderedlist>                
0587         <para>
0588             Click <guibutton>Create Jobs</guibutton> to generate mosaic scheduler jobs and add them to the schedule queue. You can further edit the jobs individually, as you would normal Scheduler jobs.
0589         </para>
0590     </sect2>
0591 </sect1>