Skip to content

Commit

Permalink
v103.1.0: many XSHOOTER fixes, including SLIT offsets
Browse files Browse the repository at this point in the history
  • Loading branch information
fpavogt committed Oct 23, 2018
1 parent 6f7a983 commit c31864b
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 39 deletions.
2 changes: 1 addition & 1 deletion docs/source/acknowledge.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Acknowledging fcmaker
digitized and compressed by the STScI. The digitized images are copyright (c) 1993-1995
by the Anglo-Australian Telescope Board. The ``Equatorial Red Atlas'' of the southern
sky was produced using the UK Schmidt Telescope. Plates from this survey have been
digitized and compressedby the STScI. The digitized images are copyright (c) 1992-1995,
digitized and compressed by the STScI. The digitized images are copyright (c) 1992-1995,
jointly bythe UK SERC/PPARC (Particle Physics and Astronomy Research Council, formerly
Science and Engineering Research Council) and the Anglo-Australian Telescope Board.
The compressed files of the ``Palomar Observatory - Space Telescope Science Institute
Expand Down
8 changes: 7 additions & 1 deletion docs/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Changelog |last-commit| |issues|
================================

.. todo::
- check l. 149 in fcmaker_instrument_dispatch ...
- (!) 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 @@ -22,6 +21,13 @@ 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

v103.1.0 October 2018, F.P.A. Vogt
- fixed a bug in the calculation of ESPRESSO left chart radius.
- fixed the axis of the nodding for XSHOOTER AutoNod templates.
- properly fixed issue `#7 <https://github.com/fpavogt/fcmaker/issues/7>`_
- draw the XSHOOTER slits in full lines to improve clarity
- rotated the slit "P.A." name by 180deg for XSHOOTER to match the UT2 screen

v103.0.0 October 2018, F.P.A. Vogt
- changed versioning scheme to highlight the supported Period.
- renamed 'O' and 'S' to 'Obj.' and 'Sky' in the legend, for clarity.
Expand Down
36 changes: 18 additions & 18 deletions docs/source/modules/fcmaker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,72 +4,72 @@ fcmaker package
Submodules
----------

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.. automodule:: fcmaker.fcmaker_xshooter
:members:
Expand Down
7 changes: 3 additions & 4 deletions fcmaker/fcmaker_instrument_dispatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@ def get_chart_radius(fc_params):
elif fc_params['inst'] == 'ESPRESSO':
right_radius = fcm_espresso.right_radius
# Left chart centered between Acq and Target
left_radius = fcm_espresso.left_radius + 0.5* np.sqrt( (fc_params['acq']['bos_ra']/2.)**2 +
(fc_params['acq']['bos_dec']/2.)**2)
left_radius = fcm_espresso.left_radius + 0.5* np.sqrt( (fc_params['acq']['bos_ra'])**2 +
(fc_params['acq']['bos_dec'])**2)

else:
raise Exception('Ouch! Instrument unknown ...')
Expand Down Expand Up @@ -350,8 +350,7 @@ def get_pmin(survey):
'''

if survey in ['2MASS-J', '2MASS-H', '2MASS-K']:
return 30.

return 30.
else:
return 10.

Expand Down
2 changes: 1 addition & 1 deletion fcmaker/fcmaker_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
'''

# Define the version of fcmaker
__version__ = '103.0.0'
__version__ = '103.1.0'

# Where are we located ?
fcm_dir = os.path.dirname(__file__)
Expand Down
26 changes: 13 additions & 13 deletions fcmaker/fcmaker_xshooter.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ def detector_to_sky(dx,dy,pa):

# Rotate the offsets in the Ra-Dec frame
# Issue #7: https://github.com/fpavogt/fcmaker/issues/6
ddec = - np.cos(np.radians(pa)) * dx + np.sin(np.radians(pa)) * dy
ddec = np.cos(np.radians(pa)) * dx - np.sin(np.radians(pa)) * dy
dra = np.sin(np.radians(pa)) * dx + np.cos(np.radians(pa)) * dy

# Flip the RA axis to increase along East
dra *= -1.
#dra *= -1.

return (dra, ddec)

Expand Down Expand Up @@ -291,9 +291,9 @@ def get_p2fcdata_xshooter(fc_params, ob, api):
fc_params[temp_name]['noff'] = 2
fc_params[temp_name]['obstype'] = ['O','O']
fc_params[temp_name]['coordtype'] = 'DETECTOR'
fc_params[temp_name]['off1'] = [0,0]
fc_params[temp_name]['off2'] = [-fc_params[temp_name]['slt_throw'].to(u.arcsec).value/2.,
fc_params[temp_name]['off1'] = [-fc_params[temp_name]['slt_throw'].to(u.arcsec).value/2.,
+fc_params[temp_name]['slt_throw'].to(u.arcsec).value]
fc_params[temp_name]['off2'] = [0,0]

# Now, deal with the FixedSkyOffset templates.
# Basically "converts them to a normal GenericOffset, and ignore any jitter
Expand Down Expand Up @@ -375,9 +375,10 @@ def get_localfcdata_xshooter(fc_params,inpars):
fc_params['sci1']['noff'] = 2
fc_params['sci1']['obstype'] = ['O','O']
fc_params['sci1']['coordtype'] = 'DETECTOR'
fc_params['sci1']['off1'] = [0,0]
fc_params['sci1']['off2'] = [-fc_params['sci1']['slt_throw'].to(u.arcsec).value/2.,
+fc_params['sci1']['slt_throw'].to(u.arcsec).value]
fc_params['sci1']['off1'] = [-fc_params['sci1']['slt_throw'].to(u.arcsec).value/2.,
+fc_params['sci1']['slt_throw'].to(u.arcsec).value]
fc_params['sci1']['off2'] = [0,0]


return fc_params

Expand Down Expand Up @@ -572,9 +573,9 @@ def plot_field(ax1, ax2, fc_params, field):
'Target': {'c':'darkorange', 'lwm':1, 'zorder':5, 'marker':'D',
'lw':1.5, 'ms':250, 'ls':'--', 'mc':'darkorange'},
'O':{'c':'royalblue', 'lwm':1, 'zorder':5, 'marker':'o',
'lw':0.75, 'ms':50, 'ls':':', 'mc':'royalblue'},
'lw':0.75, 'ms':50, 'ls':'-', 'mc':'royalblue'},
'S':{'c':'darkcyan', 'lwm':1, 'zorder':5, 'marker':'s',
'lw':0.75, 'ms':50, 'ls':':', 'mc':'darkcyan'},
'lw':0.75, 'ms':50, 'ls':'-', 'mc':'darkcyan'},
}

this_coords = [field[2].ra, field[2].dec]
Expand Down Expand Up @@ -646,13 +647,12 @@ def plot_field(ax1, ax2, fc_params, field):
# rotation = 90+field[3], color=skins['Acq']['mc'])
ax1.add_label(0.9,0.9, '--- p.a. ---', relative=True, horizontalalignment='center', size=10,
verticalalignment='center',
rotation = 90+field[3],
rotation = field[3]-90, # To match the UT2 screen
color=skins['Acq']['mc'],
bbox=dict(boxstyle="round4,pad=0.05", facecolor='w',ec='w', alpha=1))




# NOTE: the Acq. image on the UT2 screen has "y" up and "x" to the RIGHT,
# where "y" and "x" are the axis defined in the manual in Fig. 42, 43, 44.


# Finally, also add a legend for clarity
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='fcmaker',
version='103.0.0',
version='103.1.0',
author='F.P.A. Vogt',
author_email='[email protected]',
packages=['fcmaker',],
Expand Down

0 comments on commit c31864b

Please sign in to comment.