|
| 1 | +Selecting Targets for an Observing Facility |
| 2 | +=========================================== |
| 3 | + |
| 4 | +During observing runs, particularly at manually- or remotely-operated telescope |
| 5 | +facilities, it can often be very useful to display a selection of targets to be |
| 6 | +observed on a particular night. This needs to take into account target visibility from |
| 7 | +the telescope site, as well as any prioritization of targets that the team have made. |
| 8 | + |
| 9 | +TOMs provide support for this through the Target Selection option under the Target menu |
| 10 | +in the main navigation bar. |
| 11 | + |
| 12 | +.. image:: target_selection_menu_option.png |
| 13 | + :alt: Menu option for Target Selection view |
| 14 | + |
| 15 | +Observers can select the telescope facility that they are observing from using the form |
| 16 | +provided, indicating the date of the observing run. The selected targets will be draw |
| 17 | +from a predefined Target Grouping, which users can chose from the pulldown menu. |
| 18 | + |
| 19 | +The TOM will evaluate the visibility of the selected sidereal targets for the telescope on the |
| 20 | +night in question, and the resulting table will include all objects with a minimum |
| 21 | +airmass less than 2.0. Since this is computationally expensive, the visibility is calculated at intervals |
| 22 | +of 10min for a 24hr period from the given start time. |
| 23 | + |
| 24 | +.. image:: target_selection_table_default.png |
| 25 | + :alt: Default table output for target selection |
| 26 | + |
| 27 | +Customizing the Selected Targets Table |
| 28 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 29 | + |
| 30 | +By default, this table will include the essential parameters necessary to point a |
| 31 | +telescope at the target, but it can be easily extended to add further information |
| 32 | +from a customized target model. |
| 33 | + |
| 34 | +The columns of the table can be configured by editing the TOM's ``settings.py`` file, |
| 35 | +and adding a list called ``SELECTION_EXTRA_FIELDS``, as shown in the example below. The entries |
| 36 | +in this list can be one or more of the exact names of attributes on your custom Target model. |
| 37 | +``SELECTION_EXTRA_FIELDS`` can also include the names of methods on the custom Target model, |
| 38 | +provided that they return output that can be rendered as a string entry in the table. |
| 39 | +The list can be left empty if no additional fields should be added to the table. |
| 40 | + |
| 41 | +.. code-block:: python |
| 42 | +
|
| 43 | + # settings.py |
| 44 | + SELECTION_EXTRA_FIELDS = [ |
| 45 | + 'mag_now', |
| 46 | + 'priority1', |
| 47 | + 'priority2', |
| 48 | + ] |
| 49 | +
|
| 50 | +In this example, the custom Target model has fields named ``priority1`` |
| 51 | +and ``priority2`` and a method called ``mag_now``. Adding those fields names to |
| 52 | +the ``SELECTION_EXTRA_FIELDS`` list will cause three columns of the same names to appear |
| 53 | +in the selected targets table output, containing the priority values and the calculated output of |
| 54 | +the ``mag_now`` method. |
| 55 | + |
| 56 | +Adding Facilities to the Observing Facilities Table |
| 57 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 58 | + |
| 59 | +If you would like to record a telescope facility for the purposes of observation planning, but don't want to |
| 60 | +add code for a new facility module, you can add it to the TOM's table of observing facilities. |
| 61 | + |
| 62 | +Currently, this can be done by the TOM's administrator, by navigating to the TOM's built-in admin interface. |
| 63 | +This page can be reached by adding ``/admin/`` to the end of the TOM's root URL in your browser's navigation bar, e.g.: |
| 64 | + |
| 65 | +.. code-block:: html |
| 66 | + |
| 67 | + > https://demo.lco.global/admin/ |
| 68 | + |
| 69 | +Scrolling down the list of database tables, you will find ``Facilities`` under the tables from the ``tom_observations`` app. |
| 70 | +Clicking on this link will take you to a list of telescopes recorded in the TOM's database. Note that this list |
| 71 | +is distinct (and does not include) telescopes already known to the TOM through installed facility modules. |
| 72 | + |
| 73 | +You can record new telescopes to this table using the admin interface's ``Add Facility`` button; this will present you |
| 74 | +with the following form: |
| 75 | + |
| 76 | +.. image:: add_facility_form_admin.png |
| 77 | + :alt: Form to add a new telescope facility |
| 78 | + |
| 79 | +Fill in the form and click ``save``. Now if you return to your TOM's usual interface, and navigate to the ``Target Selection`` |
| 80 | +page, the facility you added will appear in the list of facilities for which visibilities can be calculated. |
0 commit comments