Skip to content

Commit

Permalink
vP104.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fpavogt committed Jul 18, 2019
1 parent 42d6b83 commit 8949837
Show file tree
Hide file tree
Showing 13 changed files with 90 additions and 45 deletions.
12 changes: 11 additions & 1 deletion docs/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,19 @@ 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

v104.0.0 July 2019, F.P.A. Vogt
- ported to P104 (checked MUSE only!)
- froze official development in favor of ``p2api.generateFindingChart()``
- updated docs accordingly
- fixed bug in aplpy legend call (``_ax1`` -> ``ax``)
- fixed YAML deprecation warning (by using ``Loader=yaml.SafeLoader``)

v103.2.0 January 2019, F.P.A. Vogt
- fixed a bug with new version of `astroquery.skyview.SkyView.survey_dict()`

v103.1.1 October 2018, F.P.A. Vogt
- fixed `#10 <https://github.com/fpavogt/fcmaker/issues/10>`_: added 180deg to the parallactic
angle derived by the ``UT2.parallactic_angle()`` routine, to match the screen orientation at UT2.
angle derived by the ``UT2.parallactic_angle()`` routine, to match the screen orientation at UT2

v103.1.0 October 2018, F.P.A. Vogt
- fixed a bug in the calculation of ESPRESSO left chart radius.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

# General information about the project.
project = u'fcmaker'
copyright = u'2017-2018, Frédéric P.A. Vogt'
copyright = u'2017-2019, Frédéric P.A. Vogt'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down
5 changes: 5 additions & 0 deletions docs/source/examples/run_MUSE_examples.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
python -m fcmaker -l -f local_2_fcm.muse_wfm-noao.txt --do-png --systemtex --do-pdf
python -m fcmaker -l -f local_2_fcm.muse_wfm-ao.txt --do-png --systemtex --do-pdf
python -m fcmaker -l -f local_2_fcm.muse_nfm-Gaia.txt --do-png --systemtex --do-pdf
python -m fcmaker -l -f local_2_fcm.muse_nfm-DSS.txt --do-png --systemtex --do-pdf
python -m fcmaker -l -f local_2_fcm.muse_nfm-HST.txt --do-png --systemtex --do-pdf
39 changes: 28 additions & 11 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,29 @@ fcmaker |release| |stars| |watch|
:alt: fcmaker finding chart example

*Figure 1: a typical MUSE-WFM-AO finding chart generated by fcmaker.*


.. note::
I started developing fcmaker during my ESO Fellowship in late 2017. The code is being
shared with the community, in the hope that it can be useful to others. But please note
that **fcmaker is not an official tool from the European Southern Observatory (and never
will be).**

**As of P103,** ESO implemented a Finding Chart Generation service directly into p2,
called `p2fc <https://www.eso.org/sci/observing/phase2/p2intro/p2fcFindingCharts.html>`_.
p2fc is `based on a direct fork of fcmaker (v103)
<https://github.com/fpavogt/fcmaker/issues/13#issuecomment-441762717>`_, but has since
gone its own way.

**As of P104,** a `p2fc <https://www.eso.org/sci/observing/phase2/p2intro/p2fcFindingCharts.html>`_
binding has been added to the `p2api <https://www.eso.org/copdemo/apidoc/>`_ via the
``generateFindingChart()`` function (which includes the option to use custom `FITS` files).
This implies that fcmaker has no more `raison d'être`. I have therefore decided
**to stop actively maintaining fcmaker**.


Instruments and modes currently supported
-----------------------------------------
Instruments and modes implemented
---------------------------------

* **MUSE**: all modes
* **HAWKI**: NOAO, TT-free AO, including fast photometry
Expand All @@ -54,6 +73,12 @@ Instruments and modes currently supported
* targets with proper motions, ephemeris files
* tutorial OBs on `p2demo <http://www.eso.org/p2demo>`_

.. warning::
**As of P104, the development of fcmaker has officially stopped!** I may still be
pushing updates (see the :ref:`changelog` for details) to meet some of my personal
observational needs, but will make no efforts to maintain all of the code
functionalities. You have been warned.

Contents
---------
.. toctree::
Expand Down Expand Up @@ -98,16 +123,8 @@ fcmaker utterly fails to do something useful/elegant, `I'd be keen to know about
SGS star can be accessible in all the OB steps, it is irrelevant for the execution
of the OB itself, and would unnecessarily crowd the fcmaker finding charts.

From that perspective, fcmaker is very much complementary to the `GUideCam Tool (GUCT) <https://www.eso.org/sci/observing/phase2/SMGuidelines/GUCT.generic.html>`_.

.. warning::
fcmaker is developed by an ESO Fellow with duties on UT4 at the VLT. It is shared
with the community, in the hope that it can be useful to others.

But please note that **fcmaker is not an official tool from the European Southern
Observatory.**

As such, never blindly rely on what fcmaker does. If the finding chart generated by
Never blindly rely on what fcmaker does. If the finding chart generated by
fcmaker looks different from what you expected, this means that:

A) there is a real design flaw in your OB, or
Expand Down
4 changes: 2 additions & 2 deletions fcmaker/fcmaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

'''
fcmaker: a Python module to automatically create finding charts for ESO OBs in p2.\n
Copyright (C) 2017-2018, F.P.A. Vogt
Copyright (C) 2017-2019, F.P.A. Vogt
--- oOo ---
This file contains general functions for the fcmaker routines.
Created October 2017, F.P.A. Vogt - [email protected]
Expand Down Expand Up @@ -330,7 +330,7 @@ def make_fc_local(f,
raise Exception('Ouch! unknown file: %s' % (fn))

# Load the parameter file
inpars = yaml.load(f)
inpars = yaml.load(f, Loader=yaml.SafeLoader)

# Set the observing date (and time)
set_obsdate(obsdate)
Expand Down
4 changes: 2 additions & 2 deletions fcmaker/fcmaker_espresso.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

'''
fcmaker: a Python module to automatically create finding charts for ESO OBs in p2.\n
Copyright (C) 2017-2018, F.P.A. Vogt
Copyright (C) 2017-2019, F.P.A. Vogt
--- oOo ---
This file contains tools related to the ESPRESSO instrument.
Created September 2018, F.P.A. Vogt - [email protected]
Expand Down Expand Up @@ -445,7 +445,7 @@ def plot_field(ax1, ax2, fc_params, field):
#markersize=10,
label='PM* (track:$-$%.1f yr)' % (fcm_m.pm_track_time.to(u.yr).value))

ax2._ax1.legend(handles=[acq_legend, target_legend, calsource_legend, ucac2_legend, PM_legend],
ax2.ax.legend(handles=[acq_legend, target_legend, calsource_legend, ucac2_legend, PM_legend],
bbox_to_anchor=(0., 1.02, 1., .102), loc=3,
ncol=6, mode="expand", borderaxespad=0., fontsize=10, borderpad=0.7,
handletextpad=0.2, handlelength=2.0)
Expand Down
4 changes: 2 additions & 2 deletions fcmaker/fcmaker_hawki.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

'''
fcmaker: a Python module to automatically create finding charts for ESO OBs in p2.\n
Copyright (C) 2017-2018, F.P.A. Vogt
Copyright (C) 2017-2019, F.P.A. Vogt
--- oOo ---
This file contains tools related to the HAWKI instrument.
Created October 2017, F.P.A. Vogt - [email protected]
Expand Down Expand Up @@ -698,7 +698,7 @@ def plot_field(ax1, ax2, fc_params, field):
#markersize=10,
label='PM* (track:$-$%.1f yr)' % (fcm_m.pm_track_time.to(u.yr).value))

ax2._ax1.legend(handles=[acq_legend,O_legend,S_legend, ucac2_legend, PM_legend],
ax2.ax.legend(handles=[acq_legend,O_legend,S_legend, ucac2_legend, PM_legend],
bbox_to_anchor=(0., 1.02, 1., .102), loc=3,
ncol=5, mode="expand", borderaxespad=0., fontsize=10, borderpad=0.7,
handletextpad=0.2, handlelength=2.0)
Expand Down
6 changes: 3 additions & 3 deletions fcmaker/fcmaker_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@

'''
fcmaker: a Python module to automatically create finding charts for ESO OBs in p2.\n
Copyright (C) 2017-2018, F.P.A. Vogt
Copyright (C) 2017-2019, F.P.A. Vogt
--- oOo ---
This file contains some generic metadata used throughout the fcmaker module, including
the version number, etc ...
Created October 2017, F.P.A. Vogt - [email protected]
'''

# Define the version of fcmaker
__version__ = '103.1.1'
__version__ = '104.0.0'

# Where are we located ?
fcm_dir = os.path.dirname(__file__)
Expand All @@ -42,7 +42,7 @@
set_North = True

# Default date (and time) at which the observations will take place.
obsdate = dup.parse("2018 07 01 00:00:00 UTC")
obsdate = dup.parse("2019 12 01 00:00:00 UTC")

# VLT Guide star nominal magnitude range (in UCAC2 UCmag system)
gs_mag = [11.,14.]
Expand Down
4 changes: 2 additions & 2 deletions fcmaker/fcmaker_muse.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

'''
fcmaker: a Python module to automatically create finding charts for ESO OBs in p2.\n
Copyright (C) 2017, F.P.A. Vogt
Copyright (C) 2017-2019, F.P.A. Vogt
--- oOo ---
This file contains tools related to the MUSE instrument.
Created October 2017, F.P.A. Vogt - [email protected]
Expand Down Expand Up @@ -799,7 +799,7 @@ def plot_field(ax1, ax2, fc_params, field):
#markersize=10,
label='PM* (track:$-$%.1f yr)' % (fcm_m.pm_track_time.to(u.yr).value))

ax2._ax1.legend(handles=[acq_legend, target_legend,O_legend,S_legend,ucac2_legend, PM_legend],
ax2.ax.legend(handles=[acq_legend, target_legend,O_legend,S_legend,ucac2_legend, PM_legend],
bbox_to_anchor=(0., 1.02, 1., .102), loc=3,
ncol=6, mode="expand", borderaxespad=0., fontsize=10, borderpad=0.7,
handletextpad=0.2, handlelength=2.0)
Expand Down
13 changes: 7 additions & 6 deletions fcmaker/fcmaker_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def get_bk_image(bk_image, bk_lam, center, radius, fc_params):

if not(bk_image in [None,'None']):
# Has the user provided his/her own FITS file ?
if not(bk_image in SkyView.survey_dict['overlay_blue']) and not(bk_image=='Gaia'):
if not(bk_image in fcm_t.all_surveys()) and not(bk_image=='Gaia'):
# Very well, I guess I have a custom FITS file.
fn_bk_image = os.path.join(fcm_m.data_loc, bk_image)

Expand Down Expand Up @@ -359,7 +359,8 @@ def draw_fc(fc_params, bk_image = None, bk_lam = None, do_pdf = False, do_png =

ax1 = aplpy.FITSFigure(fn_bk_image_L, figure=fig1, north=fcm_m.set_North,
subplot=[0.12,0.12,0.35,0.76])
ax1.show_grayscale(invert = True, stretch='linear', pmin = fcm_id.get_pmin(survey_L))
ax1.show_grayscale(invert = True, stretch='linear', pmin = fcm_id.get_pmin(survey_L),
pmax=99.9)

ax2 = aplpy.FITSFigure(fn_bk_image_R, figure=fig1, north=fcm_m.set_North,
subplot=[0.59,0.12,0.38,0.8])
Expand Down Expand Up @@ -555,12 +556,12 @@ def draw_fc(fc_params, bk_image = None, bk_lam = None, do_pdf = False, do_png =
ax.tick_labels.set_xformat('hh:mm:ss')
ax.axis_labels.set_xpad(10)
ax.ticks.set_linewidth(1.5)
ax.set_tick_size(10)
ax.set_tick_color('k')
ax.ticks.set_length(10)
ax.ticks.set_color('k')
ax.axis_labels.set_xtext('R.A. [J2000]')

ax1.axis_labels.set_ytext('Dec. [J2000]')
ax1.axis_labels.set_ypad(-10)
#ax1.axis_labels.set_ypad(-10)
ax2.axis_labels.set_ytext('')

# Add the required OB information to comply with ESO requirements ...
Expand Down Expand Up @@ -589,7 +590,7 @@ def draw_fc(fc_params, bk_image = None, bk_lam = None, do_pdf = False, do_png =

# Add a legend (if warranted) for the left plot
if len(ax1_legend_items) >0:
ax1._ax1.legend(handles=ax1_legend_items,
ax1.ax.legend(handles=ax1_legend_items,
bbox_to_anchor=(-0.03, 0.82, 0.4, .1), #loc='lower right',
ncol=1, #mode="expand",
borderaxespad=0., fontsize=10, borderpad=0.3,
Expand Down
12 changes: 12 additions & 0 deletions fcmaker/fcmaker_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from astropy.coordinates.sky_coordinate import SkyCoord
from astropy import units as u
from astropy.time import Time
from astroquery.skyview import SkyView

import matplotlib as mpl

Expand All @@ -19,6 +20,17 @@
This file contains general tools for the fcmaker routines.
Created October 2017, F.P.A. Vogt - [email protected]
'''
# ----------------------------------------------------------------------------------------
# Gets me all the surveys that I support from SkyView
def all_surveys():

surv = SkyView.survey_dict['IR:2MASS class=']
surv += SkyView.survey_dict['IR:UKIDSS class=']
surv += SkyView.survey_dict['Optical:DSS class=']
surv += SkyView.survey_dict['Optical:SDSS']
surv += SkyView.survey_dict['OtherOptical']

return surv

# ----------------------------------------------------------------------------------------
# Design a crosshair custom marker that is sadly missing from maplotlib
Expand Down
2 changes: 1 addition & 1 deletion fcmaker/fcmaker_xshooter.py
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ def plot_field(ax1, ax2, fc_params, field):
#markersize=10,
label='PM* (track:$-$%.1f yr)' % (fcm_m.pm_track_time.to(u.yr).value))

ax2._ax1.legend(handles=[acq_legend, target_legend,O_legend,S_legend,ucac2_legend, PM_legend],
ax2.ax.legend(handles=[acq_legend, target_legend,O_legend,S_legend,ucac2_legend, PM_legend],
bbox_to_anchor=(0., 1.02, 1., .102), loc=3,
ncol=6, mode="expand", borderaxespad=0., fontsize=10, borderpad=0.7,
handletextpad=0.2, handlelength=2.0)
Expand Down
28 changes: 14 additions & 14 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='fcmaker',
version='103.1.1',
version='104.0.0',
author='F.P.A. Vogt',
author_email='[email protected]',
packages=['fcmaker',],
Expand All @@ -13,17 +13,17 @@
long_description=open('README').read(),
python_requires='>=3',
install_requires=[
"numpy >= 1.14.3",
"scipy >= 1.1.0",
"matplotlib >= 3.0.0",
"astropy >=3.0",
"aplpy >=1.1.1",
"astroquery >= 0.3.4",
"p2api >= 0.92",
"PyYAML >=3.12",
"pytz >= 2018",
"astroplan",
"pillow >=5.2.0",
"numpy >= 1.16.2",
"scipy >= 1.2.1",
"matplotlib >= 3.0.3",
"astropy >=3.1.2",
"aplpy >=2.0.3",
"astroquery >= 0.3.9",
"p2api >= 0.94",
"PyYAML >=5.1",
"pytz >= 2018.9",
"astroplan >=0.4",
"pillow >=5.4.1",
#"montage-wrapper >= 0.9.9",
],

Expand All @@ -32,7 +32,7 @@
# 3 - Alpha
# 4 - Beta
# 5 - Production/Stable
'Development Status :: 3 - Alpha',
'Development Status :: 4 - Beta',

# Indicate who your project is intended for
'Intended Audience :: Science/Research',
Expand All @@ -43,7 +43,7 @@

# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
],

include_package_data=True, # So that non .py files make it onto pypi, and then back !
Expand Down

0 comments on commit 8949837

Please sign in to comment.