Skip to content

Commit

Permalink
v105.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fpavogt committed Apr 24, 2020
1 parent 8949837 commit da88aa8
Show file tree
Hide file tree
Showing 14 changed files with 246 additions and 199 deletions.
15 changes: 15 additions & 0 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Changelog |last-commit| |issues|
================================

.. todo::
- (!) figure out why the Gaia.cone_search() fails with 'Cannot parse query: Encountered "TOP". Was expecting: "SELECT" '. See fcmaker_plots, l.408 + 251
- (!) for XSHOOTER, always place the slit horizontal (i.e. do not put the chart North)
- (!) formally validate the parallactic function
- (?) check connection to the online servers ahead of time, and issue a nice error if needed
Expand All @@ -21,6 +22,20 @@ Changelog |last-commit| |issues|
- (?) make the obsdate an ``fc_params`` entry rather than a global variable
- (?) for time critical OBs, get the time from the OB

v105.0.0 September 2019, F.P.A. Vogt
- fixed `#17 <https://github.com/fpavogt/fcmaker/issues/17>`_
- implemented PR `#15 <https://github.com/fpavogt/fcmaker/pull/15>`_
- fixed bug `#16 <https://github.com/fpavogt/fcmaker/issues/16>`_
- created linked setup.py to a unique version file.
- added a proper "fcmaker" entry point
- started using pylint ... ouch!
- minor tweaks

v104.0.1 July 2019, F.P.A. Vogt
- changed "Obs. date" to "date" in plots, reduced to fontsize 10
- for MUSE NFM, renamed "TT" to "TTS" in the plots
- fixed YAML deprecation warning in ``__main__.py``

v104.0.0 July 2019, F.P.A. Vogt
- ported to P104 (checked MUSE only!)
- froze official development in favor of ``p2api.generateFindingChart()``
Expand Down
68 changes: 38 additions & 30 deletions docs/source/modules/fcmaker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,79 +8,87 @@ fcmaker.fcmaker module
----------------------

.. automodule:: fcmaker.fcmaker
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:

fcmaker.fcmaker\_espresso module
--------------------------------

.. automodule:: fcmaker.fcmaker_espresso
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:

fcmaker.fcmaker\_hawki module
-----------------------------

.. automodule:: fcmaker.fcmaker_hawki
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:

fcmaker.fcmaker\_instrument\_dispatch module
--------------------------------------------

.. automodule:: fcmaker.fcmaker_instrument_dispatch
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:

fcmaker.fcmaker\_metadata module
--------------------------------

.. automodule:: fcmaker.fcmaker_metadata
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:

fcmaker.fcmaker\_muse module
----------------------------

.. automodule:: fcmaker.fcmaker_muse
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:

fcmaker.fcmaker\_plots module
-----------------------------

.. automodule:: fcmaker.fcmaker_plots
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:

fcmaker.fcmaker\_tools module
-----------------------------

.. automodule:: fcmaker.fcmaker_tools
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:

fcmaker.fcmaker\_version module
-------------------------------

.. automodule:: fcmaker.fcmaker_version
:members:
:undoc-members:
:show-inheritance:

fcmaker.fcmaker\_xshooter module
--------------------------------

.. automodule:: fcmaker.fcmaker_xshooter
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:


Module contents
---------------

.. automodule:: fcmaker
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:
33 changes: 17 additions & 16 deletions docs/source/running.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
Usage instructions
==================

There are two main ways to use fcmaker. You can either execute the module as a script, i.e.::
There are two main ways to use fcmaker. You can either execute the module as a script using the
following entry point::

python -m fcmaker
fcmaker
or you can import the module and execute it within a script, i.e.::

Expand All @@ -30,7 +31,7 @@ too mysterious. Also, don't forget the built-in help::
In its most basic mode, fcmaker connects to `p2 <http://www.eso.org/p2>`_ and creates the
finding chart for a given OB Id. To do so, simply type in a terminal::

python -m fcmaker
fcmaker
You will be prompted for your `p2 <http://www.eso.org/p2>`_ username, password, and the
ID of the observing block to process. fcmaker will create two folders ``fcm_data`` and
Expand All @@ -43,7 +44,7 @@ the same name!**
If you get fed up with typing your p2 username and/or the OB id repeatedly, you can
specify them directly when calling fcmaker::

python -m fcmaker --p2uid jdoe --obid 12345678
fcmaker --p2uid jdoe --obid 12345678


2: creation of a finding chart for a single OB on p2demo
Expand All @@ -53,7 +54,7 @@ If you simply want to experiment with p2 and/or fcmaker, you can use the `p2demo
server to create mock OBs. In that case, simply use the ``--demo`` flag to tell fcmaker that
you want to connect to the tutorial account on the demo server::

python -m fcmaker --demo
fcmaker --demo

You will only be prompted for the ID of the observing block to process.
Expand All @@ -69,7 +70,7 @@ First, create a text file :download:`p2_2_fcm.params.txt <./examples/p2_2_fcm.pa

Then, feed it to fcmaker with the ``-f`` flag::

python -m fcmaker -f p2_2_fcm.params.txt
fcmaker -f p2_2_fcm.params.txt

In doing so, fcmaker will connect to `p2 <http://www.eso.org/p2>`_ and process all the
OBs listed. Note that for each finding chart, you will still need to manually specify
Expand All @@ -83,7 +84,7 @@ You can fully automate the creation of many finding charts if you include the
``--no-upload`` flag. In that case, fcmaker will never attempt to upload anything to
`p2 <http://www.eso.org/p2>`_, and only save the image files locally::

python -m fcmaker --no-upload -f p2_2_fcm.params.txt
fcmaker --no-upload -f p2_2_fcm.params.txt


6: specifying observing dates and times
Expand All @@ -93,9 +94,9 @@ For targets with large proper motions, one can provide the expected year, (month
day, ...!) of the observation to create an accurate finding chart, using the ``--obsdate``
flag. This also works for OBs that have Ephemeris files. For example::

python -m fcmaker -f --obsdate 2018
python -m fcmaker -f --obsdate 2018-05
python -m fcmaker -f --obsdate 2018-05-17 14:34:57 UTC
fcmaker -f --obsdate 2018
fcmaker -f --obsdate 2018-05
fcmaker -f --obsdate 2018-05-17 14:34:57 UTC
Finding charts for moving targets get automatically tagged with the symbol :math:`\leadsto`.

Expand All @@ -117,10 +118,10 @@ templates for all supported instruments:
The file is then fed to fcmaker with the ``-f`` flag, together with the ``--local`` flag to
indicate that it is a *local run*::

python -m fcmaker --local -f local_2_fcm.muse.txt
python -m fcmaker --local -f local_2_fcm.hawki.txt
python -m fcmaker --local -f local_2_fcm.xshooter.txt
python -m fcmaker --local -f local_2_fcm.espresso.txt
fcmaker --local -f local_2_fcm.muse.txt
fcmaker --local -f local_2_fcm.hawki.txt
fcmaker --local -f local_2_fcm.xshooter.txt
fcmaker --local -f local_2_fcm.espresso.txt
fcmaker will create the associated finding chart, store it where specified, and exit.

Expand Down Expand Up @@ -160,7 +161,7 @@ assuming that the FITS file is placed in the ``--data-loc`` directory (default:
The latter allows the user to specify the text to be displayed on the chart. To meet ESO's
requirements, this text should specify the wavelength of the image::

python -m fcmaker --p2uid joe --obid 12345678 --bk-image my-file.fits --bk-lam 450-550nm (HST)
fcmaker --p2uid joe --obid 12345678 --bk-image my-file.fits --bk-lam 450-550nm (HST)

See the Gallery (:ref:`examples-NFM`) for an illustration of this approach.

Expand Down Expand Up @@ -217,5 +218,5 @@ Here are all the flags that allow to fine-tune the way fcmaker works. They are:
For example, if you want to boost the aesthetic appeal of your finding charts with the
exquisite Computer Modern Bright sans-serif font (why wouldn't you?), try::

python -m fcmaker --systemtex
fcmaker --systemtex

31 changes: 29 additions & 2 deletions fcmaker/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
# -*- coding: utf-8 -*-

'''
fcmaker: a Python module to automatically create finding charts for ESO OBs in p2.\n
Copyright (C) 2017-2019, F.P.A. Vogt
--- oOo ---
This file defines what functions are accessible to the user.
Created October 2017, F.P.A. Vogt - [email protected]
--- oOo ---
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
'''
# --------------------------------------------------------------------------------------------------

from .fcmaker import * # So that users only need to do import fcmaker
from .fcmaker_metadata import __version__
#from .fcmaker_plots import *
from .fcmaker_version import __version__
Loading

0 comments on commit da88aa8

Please sign in to comment.