Marx 5.5.1 (Dec 2020)
=====================
This is a maintainace release that just upgrades the contamination file from the 
CALDB that is shipped with |marx|. No changes are made to the |marx| source code.

Marx 5.5 (Dec 2019)
====================

Change column type of PHA and PI columns written by ``marx2fits`` to float32
to match the files that CIAO writes.

User-compiled sources (``SourceType="USER"``) have a function called
``user_create_ray`` which is called with a pointer to ray properties
(direction, time, and energy). All ray properties used to be undefined before
calling this function and the user function could return ``-1`` for energy and
time to have |marx| assign energy and time. Now, ``energy`` is initialized
*before* ``user_create_ray`` is called, to allow user code that assigns
locations based on the ray energy.  With this change, marx.par must contain a
valid specification for the source spectrum, since an energy will be drawn,
even if the user source later assigns a different value. For
backwards-compatibility, if ``user_create_ray`` sets the energy to a negative
value, |marx| will assign the energy drawn before to the variable again.

Marx 5.4 (Dec 2018)
===================
Update `CalDB`_ files that are shipped with |marx| to `CalDB`_ version 4.8.2.

HRC PSF
-------
The HRC detector PSF has some blur in it. See
https://cxc.cfa.harvard.edu/twiki/bin/view/HrcCal/DetectorPSF for how the
parameters used in previous versions of |marx| are determined. However, we
recently found that the PSFs are wider than observed. Thus, in this version we
change the values of the default `marx.par` file to use a single Gaussian
instead. This change is most important for the profile of the wings in very
bright HRC sources.  We continue to investigate this and expect another change soon.


Marx 5.3.3 (Dec 2017)
=====================
Small bug fix to the source code to allow compilation with clang
(which is the default compiler on Macs).

Marx 5.3.2 (Dec 2016)
=====================
Update `CalDB`_ files that are shipped with |marx|. No changes to the source
code.


Marx 5.3.1 (Aug 2016)
=====================
This fixes two bugs for users of SIMPUT sources; all other
runs are unaffected.


Marx 5.3 (Apr 2016)
===================

Important bug-fix for off-axis sources: Please upgrade!
-------------------------------------------------------
MARX 5.0, 5.1, and 5.2 contain a bug that affects the PSF for 
simulations of off-axis sources; this is fixed in 5.3.
The root cause for this bug was that the entrance aperture of the Chandra
mirrors was chosen to match the size of the mirror opening as seen an on-axis
source exactly. For an off-axis source that means that the generated photons
hit only part of the mirror, leading to gaps in the simulated PSF. Now, the
entrance aperture has been increased to allow sources anywhere in the
field-of-view to fill the detector. This necessarily increases the run time of
all |marx| simulations, because more photons need to be generated.
See https://github.com/Chandra-MARX/marx/issues/21 for a detailed
description of the issue.


New source type: SIMPUT
-----------------------
|marx| now supports the new `SIMPUT standard`_, which is a fits based
description of sources, which allows a large number of source with different
spectra, light curves, and shapes on the sky. This file format is supported by a
number of other simulators (e.g. for ATHENA), so integrating it in |marx|
allows users to use the same source specification for different X-ray missions.
The support in |marx| is through the `SIMPUT code`_ which needs to be installed
separately and is linked dynamically at runtime if :par:`SourceType="SIMPUT"`.

============================================================================
Marx 5.2 Release Notes
============================================================================

The changes consist only of some minor enhancements,
calibration updates, and bug fixes.  

Change in default parameters
----------------------------
Set the ``PointingOffsetX/Y`` to 0 to match the values in current Chandra 
observations.
This defines the difference between RA/DEC_NOM and RA/DEC_PNT in the 
fits headers of event files; it is not used in the code except to output 
the RA/DEC_PNT values by ``marx2fits``.

Bug Fixes
---------
Match use of long and double types in fits output to standard CIAO products.

Previously an ASOL file name > 63 characters would crash marx2fits.
Now, it cuts the pathname to shorten the string.

============================================================================
Marx 5.1 Release Notes
============================================================================

The changes consist mainly of some minor enhancements,
calibration updates, and bug fixes.  

Two major points are:

Enhanced support for dithered SAOTrace files
--------------------------------------------

Bug Fixes
---------
|marx| now compiles with ``clang``, the compiler shipped with Max OS X.
(Apple installs an alias ``gcc`` which points to ``clang``.)


============================================================================
Marx 5.0 Release Notes
============================================================================

(See <http://space.mit.edu/cxc/marx/news.html> for additional details)

The primary goal of marx 5.0 was to add detector subpixel support to
marx2fits to match that of the EDSER algorithm used by CIAO's
acis_process_events.  This change necessitated a complete rewrite of
the marx dither code and corresponding changes to marx2fits and
marxasp.  For this reason, marx 5.0 is not just an incremental release
of the 4.X series.

* The marx.par "DitherBlur" parameter has been removed and a new
  parameter called "AspectBlur" was added.  This is not simply a name
  change.  Previously, the DitherBlur value included not just the
  aspect uncertainty, but also the effects of pixel randomization.
  Pixel randomization is now handled by marx2fits, and the AspectBlur
  value includes only the contribution from the aspect uncertainty.
  One consequence of this change is that marx 4.X parameter files
  cannot be used with marx 5.0.

* marx2fits now supports 4 different types of detector pixel
  randomization methods, which are selectable using the --pixadj
  switch:

    --pixadj=EDSER       Use a subpixel algorithm (default)
    --pixadj=RANDOMIZE   Randomize within a detector pixel
    --pixadj=NONE        Do not randomize withing a detector pixel
    --pixadj=EXACT       Use exact chip coordinates

  Previously, marx2fits employed a single method: RANDOMIZE.  Now
  the default is to use the EDSER randomization algorithm.

* Use of the EDSER subpixel algorithm with SAOTrace/Chart ray files
  requires that the rays be dithered.  As of January 2012 no
  publicly released versions of SAOTrace generate dithered rays.
  However, marx 5.0 has been tested with rays produced by development
  versions of SAOTrace that can produce dithered rays.  For
  non-dithered SAOTrace rays, use `marx2fits --pixadj=RANDOMIZE`.

* The marxasp.par RA_Sigma, Dec_Sigma, and Roll_Sigma parameters have
  been removed.

* The marx HRMA blur parameters have been re-tuned to match the
  widths of the LSFs in the Chandra CALDB.  This re-calibration was
  necessary because the marx 4.X DitherBlur parameter value was
  tweaked to get the marx PSF to better match Chandra grating line
  profiles.

* The marx calibration data have been brought up to date with CALDB
  4.4.7.

============================================================================
What's NEW for marx 4.5.0?

* The MARX ACIS spatial contamination model has been updated to be
  consistent with that of the latest Chandra CALDB (specifically,
  acisD1999-08-13contamN0005.fits).

* If the marx.par parameter NumRays is set to a negative value, then
  the simulation will continue until at least |NumRays| photons have
  been detected.

* Misc bug fixes.  See the ChangeLog files for details.

What's NEW for marx 4.4.0?

* Vignetting by the HRMA support structs has been added.

* The marx calibration files have been update to be consistent with
  CALDB 4.1.1.  In particular, the HETG efficiency file was updated to
  hetgD1996-11-01greffpr001N0006.fits, and the HRMA on axis effective
  has been recalibrated to agree with hrmaD1996-12-20axeffaN0008.fits.

* The handling of the marx.par file has been changed.  The input
  marx.par file is now regarded as read-only and its contents will not
  be modified.  Instead, all parameter values, including those that
  are hidden (mode="h") are written to the marx.par file in the output
  directory.  Previously, unless a hidden parameter was marked to be
  "learned" (mode="hl"), the value used for the simulation was not
  reflected in the output marx.par file.

* It was discovered that in interpreting the acis response FEF, marx
  was using standard normalized gaussians, whereas mkrmf uses
  unnormalized gaussians.  This difference caused the marx response to
  be different away from the main peak from that of the RMF generated
  by mkrmf.  Marx 4.4.0 now uses the unnormalized form to be
  consistent with mkrmf.

What's NEW for marx 4.3.0?

* `make install` installs marx in a more traditional unix manner.  See
   the INSTALL file for more details.

* Updated the ACIS QE and Aimpoint files to match those of the latest CALDB.

* Added large file support to allow the creation of files exceeding 2 GB.

* Marx has been ported to MacOSX and Cygwin.  There were mixed results
  with these platforms in previous versions.  4.3.0 is the first version of
  marx to officially support these systems.

* The `pileup` program has been renamed `marxpileup`.
