campas ====== CAMPAS (or the CAMPaign ASsistant) is a scripting library for automating repeating measurement patterns, mainly for ground-based measurements. Example ------- .. literalinclude:: ../runmacs/campas/jobs/halo.py :caption: halo.py :language: python :lines: 10-45 :emphasize-lines: 11,18 :linenos: This example shows a job which performs a scan around the sun (2 or 3 horizontal movements from top to bottom), with the shutters closed while passing the sun. In Line 11, the needed devices have to be given, they are further presented as attributes of ``self``. As shown e.g. in line 18, the ``coordinates`` object gives access to dynamic coordinates, in this case, the position of the sun in the instance in which the line is executed. .. note:: As CAMPAS will perform a dummy run, before the actual run of the job (which is needed to ensure that no invalid dimensions are given), all jobs have to be terminating. Also in stead of using ``time.sleep()``, ``self.sleep`` is prefered. It will skip the sleep during the dummy run. If you want to define a non-terminating CAMPAS job, subclass from :py:class:`DumbCampasJob`, which will not perform a dummy run. Run CAMPAS ---------- CAMPAS can be started unsing:: python -m runmacs.campas.master Where ```` is the name of the CAMPAS job as defined in ``runmacs/campas/master.py``.