[fitswcs] WCSLIB 7.5 releaed

Mark Calabretta mark at calabretta.id.au
Sun Mar 21 04:01:30 EDT 2021


Greetings,

WCSLIB 7.5 is now available:

  ftp://ftp.atnf.csiro.au/pub/software/wcslib/wcslib.tar.bz2

Notable in this release is a new function, wcsccs(), which changes the
celestial coordinate system of a wcsprm struct.

Also a new utility, sundazel, which may be used to answer the question
"what time should I program my skylight blind to close and reopen in
order to prevent the carpet fading?".  Also potentially useful for
calculations involving solar PV collectors, shadows cast by awnings,
etc.  See below for further information.

The FITS WCS papers, WCSLIB (including the online manual), and related
resources are available from

  https://www.atnf.csiro.au/people/Mark.Calabretta/WCS/index.html

Mark Calabretta



WCSLIB version 7.5 (2021/03/20)
-------------------------------

The C code in WCSLIB is moving piecemeal to the C99 standard.  In fact,
various indispensible C99 constructs have been used in WCSLIB for many
years: the long long int data type (in fitshdr() only); stdint.h,
inttypes.h, and the use of PRI formatting control (in wcsprintf(), which
is widely used by the library); and the C99-extended library function
vsnprintf() (used by wcserr for a decade).  Flex-generated C code also
uses C99 extensions, though with workarounds if they are not available.

Except in the header prologues, which are formatted in a special way for
generating the user manual, comments were changed en masse to C99 style
in release 7.3.1, and variable declarations in code that I have occasion
to modify will transition to the more general placement allowed by C99.
However, I have no plans to use any of the more esoteric features of
C99.

* C library

  - New function, wcsccs(), changes the celestial coordinate system of a
    wcsprm struct, for example, from equatorial to galactic coordinates.
    The parameters that define the spherical coordinate transformation
    must be provided.  This allows WCSLIB to provide this functionality
    without needing to know anything about specific celestial coordinate
    systems, and has the advantage of making the routine completely
    general.  Requested by Mohammad Akhlaghi.

    Modified test program twcsfix also to test wcsccs().

  - Fixed a problem common to all of the Flex code (fitshdr, wcsbth,
    wcspih, wcsulex, and wcsutrn) that made it thread-unsafe.  Reported
    by Cyril Richard.

    Added a new test program, tpthreads, to test thread safety.  It is
    only used for code development, and not exercised as part of the
    standard test suite.

  - In fitshdr(), fixed a problem that potentially could arise on
    systems where sizeof(long long int) is greater than 8 (64 bits).

* Fortran wrappers

  - Match changes to the C library: added a wrapper for wcsccs(), and
    modified twcsfix.f.

  - Because null addresses cannot be passed to functions in Fortran,
    wcssub_() now interprets *nsub == -1 && *axes == -1 as a signal to
    do a deep copy of one wcsprm struct to another.

* Utilities

  - New utility, sundazel, computes the local time of the Sun's passage
    through the specified apparent longitude or latitude in a user-
    defined coordinate system.  It can also perform several other Solar
    related calculations.  (It is unrelated to FITS WCS, and does not
    use WCSLIB.)

* Installation

  - Added an 'uninstall' rule to the makefiles.  Suggested by
    Cyril Richard.

------------------------------------------------------------------------------

SUNDAZEL(1)                      User Commands                     SUNDAZEL(1)

NAME
       sundazel - Compute the time of Solar passage

SYNOPSIS
       sundazel [<option>] [<yyyymmdd>]

DESCRIPTION
       sundazel computes the local time of the Sun's passage through the spec‐
       ified apparent longitude or latitude in a user-defined coordinate  sys‐
       tem, for the specified location on the specified date (default today).

       The  Sun's  apparent  hour angle, azimuth, elevation, and the longitude
       and latitude in user coordinates are also printed, in degrees.  Refrac‐
       tion is accounted for.

       sundazel  may  also be used to compute the time of sunrise and set, the
       Sun's right ascension and declination, and the Equation of Time.

OPTIONS
       -p <option>

              The Solar passage required  and,  if  relevant,  the  coordinate
              value in degrees:

       sunrise
              Sunrise.

       sunset Sunset.

       lng=<lng>
              Longitude of the Sun in the user-defined coordinate system.

       lat=<lat>
              Latitude of the Sun in the user-defined coordinate system.

       -l <lng>,<lat>

              Longitude and latitude of the observer.

       -t <tz>

              The observer's time zone, positive east of Greenwich (hr).

       -u <az>,<el>,<zlng>

              Azimuth and elevation of the pole of the user-defined coordinate
              system, and the longitude of the zenith (deg).  See below.

       -n     Set the user-defined coordinate system  as  one  with  pole  due
              north on the horizon, with zero of longitude at the zenith.

       -w     Set the user-defined coordinate system as one with pole due west
              on the horizon, with zero of longitude at the zenith.

       -v     Also print the Sun's right ascension, declination (deg), and the
              Equation of Time (min).

       The  user-defined coordinate system is a right-handed spherical coordi‐
       nate system with its pole at the specified azimuth and  elevation,  and
       with zenith having the specified longitude.  If omitted, the default is
       a right-handed system with its pole at the zenith  and  prime  meridian
       due  north, i.e. similar to azimuth and elevation except that longitude
       increases in the reverse sense to azimuth, i.e. from north through west
       rather than north through east.

       Setting a range of azimuth or elevation often provides a poor criterion
       for timing the passage of the Sun, for example in determining  when  it
       shines directly through a skylight, or when an awning casts a shadow on
       a particular point on the ground.  In such cases the projection of  the
       skylight  or  awning from the ground onto the sky should be considered.
       Some other coordinate system may provide a better fit to the region  of
       the  sky thereby defined.  For example, the passage of the Sun across a
       skylight oriented at azimuth alpha might be handled  via  a  coordinate
       system  with  pole  on  the horizon at that azimuth and considering the
       Sun's passage through a range of longitude  in  this  system.   Perhaps
       better  might  be  to use a coordinate system with pole at alpha-90 and
       considering a range of latitude.

       Sunrise and sunset correspond to first/last contact of the  Sun's  limb
       on the horizon, corresponding to apparent elevation -0.27 deg (true el‐
       evation -0.79 deg).  If no options are specified,  the  default  is  to
       calculate  the time of sunset.  If more than one p option is specified,
       only the last is effective.

sundazel 7.5                      March 2021                       SUNDAZEL(1)



More information about the fitswcs mailing list