\vspace{0.5cm}
\begin{center}
{\Large Notes since Documentation release of Version 3.8, dated Jun, 23rd, 2023. \\
 -- This release 01-Sep-2025 (\imager{} version 4.6-00 / Not yet distributed) --\\
 -- Last release 15-Apr-2025 (\imager{} version 4.5-01 }
\end{center}

\subsection{Change summary for Version 4.6}
Version 4.6 is a critical release with one major bug correction and a few smaller ones.
\begin{itemize}
 \item \textbf{MAJOR:} In Version 4.5, a bug was introduced in the basic phase shifting routine for
 UV data. As a results, Mosaics could only be properly imaged if the UV data had a
 common phase center for all fields, but no error message was issued otherwise.
 Furthermore, since the basic shifting routine was the problem, there was no
 way to set a common phase center with IMAGER. 
 
 The bug escaped detection in the test suite because all test mosaics were already 
 in the proper mode.
\item Command \qom{UV\_CIRCLE} could crash if issues after command \qom{UV\_CONTINUUM}. This
was due to a lack of update of the min-max of the baseline lengths. A work-around was
to use \qom{HEADER UV}{/EXTREMA} after \qom{UV\_CONTINUUM}. 
\item Command \qom{UV\_MERGE}{/CONTINUUM} would occasionally ignore the specified
reference frequency, or even crash due to initialized value.
\end{itemize}
It also includes added and improved commands:
\begin{itemize}
 \item \qomm{MASK}{THRESHOLD} with \qom{REGION} keyword now order labelled regions by decreasing
 flux, providing an easier selection of regions of interest.
 \item Added command \com{UV\_SUBTRACT} that allows a visibility based continuum subtraction
 \item Command \com{UV\_REWEIGHT} returns weight factor as SIC variable \sicvar{UV\_WEIGHT\_SCALE}.
 \item Better error messages in \qom{UV\_FIT}
 \item Improved noise estimate in Array Simulator 
\end{itemize}
 
\subsection{Change summary for Version 4.5}
Version 4.5 was a release with two major bug corrections.
\begin{itemize}
 \item it corrects a significant bug in Version 4.4,
which prevented the \qomm{CLEAN}{/RESTART} command to operate correctly on large data sets,
and as a consequence caused the \qom{PIPELINE} to crash in some modes.\\
 \item Self-calibration of Mosaics is now working. It was only working on single-channel
 before.
\end{itemize}
It also includes a number of improvements, among which
\begin{itemize}
 \item Command \comm{SHOW}{STATISTIC} and \comm{VIEW}{STATISTIC} allow a better
 noise estimate on data cubes.
 \item A better support for the choice of methods for Mosaics. The two methods
 \qom{GUETH} and \qom{SAULT} are fully supported now. 
 \item A new engine for the \qom{MODEL} command using Clean Components. The engine
 used in \qom{UV\_RESIDUAL} is now useable.
 \item A new engine for Self-Calibration on very wide bands. Using this engine
 is controlled by \sicvar{SELF\_COMPRESS}.
 \item Additional Demos available through \script{@ gag\_demo:demo}.
 \item Command \qom{UV\_CONTINUUM} is deprecated. Use \qomm{UV\_MAP}{/CONTINUUM}
 and \qomm{UV\_FIT}{/CONTINUUM} as needed.
\end{itemize}
 

\subsection{Change summary for Version 4.4}

Version 4.4 was a major release with numerous improvements compared to Version 4.2
The most significant are
\begin{itemize}
 \item Full polarization support. See polarization section.
 \item More tools to handle non regular and/or non contiguous frequency axes:
 see commands \qom{UV\_MERGE, UV\_LINEARIZE} 
 \item Better handling for Proper Motion. A reference epoch can be specified
 in \qom{PROPER\_MOTION}
 \item Better Multiple spatial scales clean with  command \qom{GCLEAN}
 \item Improved \qom{SELFCAL} for wide band data.
 \item \qom{REPORT} command to prepare a PDF summary of an observation set,
 before and after the \qom{PIPELINE} execution.
 \item \qomm{UV\_STAT}{/PLOT} command to display beams as function of scanned
 parameters.
\end{itemize}

\subsection{Known Bugs}
\label{sub:bugs}

This section contains the list of bugs that are known as of \today\ in Released
version 4.6-00.

\subsubsection{Pending bugs or subtle issues...}
\begin{itemize}
%

\item{\casa{} issues} The \script{casagildas()} may be missing in \casa{} or 
may produce strange results when it is not uptodate. To create or update it, \textbf{two steps} are needed.\\
1) in IMAGER, use command \texttt{casa /update}\\
2) Start \casa{} again to use the updated \script{casagildas()} tool. 

\item{discovered 17-Jul-2024} \casa{} can produce UV tables with 
considerable frequency shifts when merging observations made apart
due to Doppler tracking handling by CASA. Unfortunately it does not produce by default
the intersection of the spectral coverage, but the union. This leaves
data with very widely different weights, sometimes even 0, that are
poorly handled by the \qom{PIPELINE}. 
\indent
A script to trim off these incomplete band edges is provided
in case this happens: \script{@ uv\_trim-edges}. It will be implemented
in the \qomm{PIPELINE}{ORGANIZE} step at some stage.
%
\item{confirmed 04-Jan-2023} \qom{CLEAN} may stop with 0 iterations if it
already did so because of improper input parameters, even after resetting
the parameters. Probably a missing initialization of some Logical variable.
\textbf{This is most likely because of an invalid \qom{MASK}. Using \comm{DISCARD}{MASK}
should solve the issue.} If it does not, the only work-around so far is to restart \imager{}.
%
\item You may need to remove your \file{\$HOME/.gag/*.html} files to
access to the latest HTML documentation in a consistent way. Links may be broken
otherwise.
%
\item \qom{VIEW CCT} on data cubes may cause occasional crashes. 
The origin of the bug is most likely related to the pencil colour handling
in the graphic library, but yet unidentified. 
\textbf{This bug seems to have almost disappeared in more recent versions...}
%
\end{itemize}

\subsection{Recent changes in repository}
This section gives the changes and bug corrections made 
since the last \imager{} release. The changes 
are available in the working repository, but may not be distributed 
so far.


\subsection{Change History}

\subsubsection{Released in Version 4.5}
\begin{itemize}
 \item{02-Jul-2025} Re-instated the old \qom{UV\_SUBTRACT} capability
 as a command.
\item{\discovered 15-May-2025, \corrected 23-May-2025} 
    \qom{UV\_MAP} and \qom{SELFCAL} worked only on POINT-like Mosaics
    (mosaic with a common phase center), not on PHASE-like Mosaics and 
    \qom{UV\_SHIFT} was not working properly on Mosaics.
    Corrected \texttt{UV\_SHIFT} action (in memory and on disk) and 
    circumvent the \qom{UV\_MAP} and \qom{SELFCAL} issue by converting 
    at READ time all Mosaics to POINT-style offsets.
\end{itemize}

\subsubsection{Released in Version 4.5}
\begin{itemize}
\item{\discovered 06-Jan-2025, \corrected 13-Jan-2025} 
\qom{CLEAN} would occasionally SegFault in parallel mode.
The occurence was random, and the problem was tracked to an inconsistent lock of the memory 
when extending the Clean component list size. 

\item{09-Jan-2025} Improved \qom{STATISTIC} command, with support for 3-D mask.

\item{09-Jan-2025} \qom{READ} warns for UVFITS files with different telescope sizes.

\item{09-Jan-2025} \qom{AMPLITUDE} commands allows antenna gain re-scaling

\item{14-Dec-2024} Fixed the \qomm{CASA}{/UPDATE} command

\item{09-Dec-2024} \qom{UV\_FIT}{/CONTINUUM} command to avoid use
of the \qom{UV\_CONTINUUM} command, which is now deprecated and reserved
for (very) special tests.
\end{itemize}


\subsubsection{Released in Version 4.4}

No reported bug since a while from abroad, but new features and subtle issues
discovered while developping !

\begin{itemize}
 \item{30-Nov-2024} Improve behaviour of commands \qom{UV\_MERGE, UV\_LINEARIZE, UV\_PREVIEW}
  for non regular frequency axis, in particular add mode \qom{STITCH} to \qom{UV\_MERGE}
 \item{05-Nov-2024} \qom{MAP\_POLAR} improvement
 \item{21-Oct-2024} \qomm{READ}{UV} now support Stokes parameter handling.
 \item{\corrected 25-Oct-2024}  \qom{CLEAN /RESTART was broken (in some cases) 
  since 13-Jun-2024, when dynamic arrays were introduced fro Clean components.
  It was ignoring components when a MASK was used.}
  \item{\corrected 10-Oct-2024}  \qom{VIEW FileName}{/NOPAUSE} was still pausing.
 \item{\corrected 10-Oct-2024}  \qom{VIEW FileName}{/NOPAUSE} was still pausing.
 \item{\added 07-Oct-2024}  \com{PROPER\_MOTION} now accepts an optional epoch
 \item{\added 01-Oct-2024}  \comm{UV\_STAT}{/PLOT} command for a graphic display
 of results (beam shapes or weight distribution)
 \item{\added 15-Sep-2024}  \com{UV\_CHOP} command to split UV tables in several
 sub-entities (e.g. per date, per pointing, etc...)
 \item{\added 15-Sep-2024}  \com{REPORT} command to generate summary PDF reports
  after \com{PIPELINE} execution.
 \item{\added 29-Aug-2024}  \com{AMPLITUDE} command to rescale antenna gains. 
 \item{\corrected 22-Jul-2024} Ensure \com{UV\_RESTORE} works for Mosaics after command \com{GCLEAN}.
 
 \item{\discovered 17-Jul-2024, \corrected Same day} \qom{PIPELINE} 
 produced line contaminated continuum data in mode \qom{SPLIT}, in two (different)
 occasions. 1) Spectral lines not in catalog were not filtered, contrary to expectations.
 2) Because of different weights (sometimes null) at edges due to window shifts (e.g.
 Doppler correction), the filtering was including inconsistent continuum emission.
 The later case is only partially solved, and may require trimming edge channels
 of the UV tables.
 \item{\added 16-Jul-2024} Command \com{GCLEAN}, a Clean using the \texttt{GAUSS}
 method for multi-scale decomposition. For Mosaics as well as Single Fields.
 \item{\added 03-Jul-2024} Better support of FITS: \comm{SET}{FORMAT} command and associate \com{WRITE} keywords
 \item{13-Jun-2024} Use a dynamic Clean Component List to save memory, and remove
  obsolete code.
 \item{\corrected 24-May-2024} FITS files produced by Casa did not include the
 celestial frame. Although FITS mandates that J2000.0 (FK5) should be used in such case,
 ALMA actually produces data only in the ICRF reference frame. As \gildas{} and 
 \imager{} are using FK5, coordinates were not necessarily matching. Solved
 by setting the frame to ICRF when importing ALMA data (based on observatory).
 Proper solution requires a correction in Casa.
 \item{\added 07-May-2024} Simpler syntax for \com{SPECIFY} and \com{MOMENTS} commands.
\end{itemize}


\subsubsection{Released - in Version 4.0}
  
\begin{itemize}
  \item{\corrected 10-Mar-2024} \script{fits-to-uvt.ima} was no longer working with option
  \qom{/WEIGHT} due to obsolete task \texttt{uv\_casa} (probably since early 2019 !\ldots). 
  Also \qomm{UV\_REWEIGHT}{/FILE} was not working correctly.
  \item{\corrected 08-Mar-2024} \qom{UV\_PREVIEW} was occasionally incorrectly identifying
  line emission, leaving no line-free channel. This lead the \qom{PIPELINE} to crash, as no
  Continuum image could be created. Algorithm has been improved.
  \item{07-Mar-2024} \casa{} keeps producing incomplete \texttt{UVFITS} files. Allow the
    \qom{READ} command to recover what is possible in such cases. Although visibilities are
    in general complete (except perhaps the last one), these incomplete files will most likely miss
    the absolute coordinates information that must be supplied manually by \com{UV\_FIELDS}.
  \item{\corrected 05-Mar-2024, \discovered 6-Feb-2024} \qomm{PIPELINE}{/MODE SURVEY} was not working
  properly when strong lines were present in spectral window.
  \item{05-Mar-2024} Implement \qomm{STATISTIC}{/FILE} option
  \item{\corrected 22-Feb-2024} \qomm{KEPLER}{MASK} was using wrong velocity sign
  \item{\corrected 22-Feb-2024} \qom{MASK} 3-D masks were incorrectly aligned
    in Frequency: it ought to be in Velocity.
  \item{17-Feb-2024}  Implement \qom{WRITE CCT /APPEND} 
  \item{14-Feb-2024}  Protect \qom{CATALOG} from empty (or out of range) catalogs.
  \item{11-Feb-2024}  Allow use of \qom{SHOW NOISE Buffer}
  \item{06-Feb-2024}  Improve polarization scripts to handle multiple spectral windows at once
  \item{\corrected 15-Jan-2024} \qomm{UV\_FILTER}{/FILE} was crashing, due to
    incorrect handling of the Flags. \qomm{UV\_FILTER}{/ZERO} now transmit
    these flags correctly.
\end{itemize}

\subsubsection{In Version 3.9}
\begin{itemize}
  \item{\corrected 09-Jan-2024} Flagged data were not properly masked in Robust weighting scheme:
    they could affect the Robust parameter derivation. Also \qom{UV\_STAT WEIGHT} could fail
    if the weight channel ended up flagged.
  \item{04-Dec-2023, minor updates 11-Jan-2024} Display scripts now working on non-standard cubes
  \item{\corrected 13-Nov-2023} \qom{SELFCAL} could become extremely slow and produce \textit{`wrong''}
  results (not very wrong, though, mostly noisier and sub-optimal) on ALMA data that have variable integration
  times (due to flagging, etc...). Solved by implementing a better time consistency check,
  with a 0.5 seconds margin.
  \item{\corrected 13-Nov-2023} \qom{UV\_FIT} failed in case of too many functions (more than 2)
  causing some strange results.
  \item{\corrected 13-Nov-2023} \qom{MAP\_COMBINE INDEX} was bugged.
  \item{20-Oct-2023} \qomm{MASK}{/FROM} implementation. 
  \item{20-Oct-2023} \qom{MASK LABEL} implementation. 
  \item{\corrected 19-Oct-2023} \qomm{CLEAN}{/RESTART} failed with some methods, due
  to a unallocated array in call sequence.
  \item{\corrected 14-Oct-2023} \qomm{CCT\_CONVERT} used wrong flux scale (must be per pixel,
  not per beam area.
  \item{\corrected 14-Oct-2023} \qom{CLEAN} CLARK and SDI failed if more than 1 beam
  in frequency.

 \item{\corrected 05-Oct-2023, \discovered 03-Oct-2023} \qom{COMBINE} was
 crashing on Linux and/or giving wrong results when Spectral and Spatial
 resampling were needed. 
 \item{\corrected 04-Oct-2023, \discovered same day} \qomm{UV\_MERGE}{/MODE CONT} 
 was occasionally leading to corrupted UV tables when starting from Spectral line
 data.
\item{\corrected 03-Oct-2023, \discovered same day} \qomm{UV\_MERGE}{/MODE CONT} was 
 applying an incorrect scale factor to the baseline lengths. 
 \item{\corrected 29-Sep-2023, \discovered 27-Sep-2023} \qom{READ} could
 lead to delayed crashes when reading Mosaics with different number of fields.
 The \texttt{map\%centers} array was not properly re-allocated. 
 \item{\corrected 28-Sep-2023, \discovered same day} \qomm{UV\_MERGE}{/MODE CONT}
 was not evaluating the number of output visibilities when starting
 from line tables. This could lead to crashes.
 \item{26-Sep-2023} Kernel patch: make \qom{DEFINE FITS ... HEADER} tolerant
 against incomplete FITS Xtension. Combined with a similar tolerance
 in \qom{READ UV}, this allows to read incomplete UVFITS files occasionally
 produced by \casa{}. 
 \item{\corrected 26-Sep-2023, \discovered 20-Apr-2023}
 Finally fixed a bug in \qomm{UV\_MERGE}{/MODE CONCAT} that was leading
 to crash on Linux, but had no consequence on MacOS.
 \item{26-Sep-2023}  Fixed a bug in CSV Astro catalog handling. Line names
 could have a leading space, resulting in empty line idendification in 
 the \qom{PIPELINE} produced file names.
 \item{20-Sep-2023}  Fixed location of log and temporary files on Apptainer
 version. First MacPort working version.
 \item{18-Sep-2023}  \qom{CATALOG} did not scan unit properly in some cases.
 \qom{STATISTIC} output improved. (Moved to Version 3.9-05)
 \item{14-Sep-2023} Simulator was not adding Noise properly. Syntax
 error in script, and wrong calls (Moved to Version 3.9-04)
 \item{06-Sep-203} \qom{COMBINE} and \qom{MAP\_COMBINE} had a memory leak
 (Pointers are not freed in Fortran, contrary to Allocatables).
 \item{06-Sep-2023} \qom{UV\_RESTORE} was requiring too much memory.
 Implement a similar scheme for \qom{UV\_RESIDUAL}.
 \item{04-Sep-2023} Channel ranges if width smaller than \sicvar{BEAM\_GAP}
 are ignored in common beam ranges determination.
 \item{29-Jul-2023} Shaded areas were slightly off in \qom{UV\_PREVIEW}.
 \item{29-Jul-2023} Improve \qom{UV\_SHORT /RESAMPLE}: handle arbitrary blanking
 and always align in Frequency before resampling.
 \item{29-Jul-2023} Small syntax modification of \qom{SPECIFY}. Added
 \qom{SPECIFY SPECUNIT} to change unit of spectral axis and \qom{SPECIFY BLANKING}
 to change blanking value.
 \item{13-Aug-2023} \qom{READ Item FileFilter} will open a file search widget.
 \item{24-Jul-2023} Ensure \qom{SELFCAL} works for Mosaics as simply as for Single fields.
\end{itemize}
 
\subsubsection{In Version 3.8}
\begin{itemize}
 \item{13-Jul-2023} \qom{PIPELINE EXPLORE} action and related bug corrections or
 improvements in \qom{UV\_STAT}
 \item{12-Jul-2023} A number of small bug corrections: \qom{SPECIFY /FOR}
 \qom{FIND /SPECIES} were not working, and \qom{XY\_SHORT} was not setting
 the axes correctly. 
 \item{07-Jul-2023} A number of bug corrections for Mosaics, introduced
 by the implementation of the \qom{ADD\_NOISE} command, others 
 related of \qom{UV\_SHORT}, or even from the Kernel (sources at
 declinations between 0 and -1 degree)
 \item{21-Jun-2023} Introduction of simulation tools, in the \lang{SIMULATE} 
 language, and with the \qom{SIMULATE} command in the \lang{IMAGER} language. 
\end{itemize}


