Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wcslib] Add wcslib port #31320

Merged
merged 15 commits into from
May 16, 2023
Merged

[wcslib] Add wcslib port #31320

merged 15 commits into from
May 16, 2023

Conversation

sjperkins
Copy link
Contributor

@sjperkins sjperkins commented May 8, 2023

  • Changes comply with the maintainer guide
  • The name of the port matches an existing name for this component on https://repology.org/ if possible, and/or is strongly associated with that component on search engines.
  • Optional dependencies are resolved in exactly one way. For example, if the component is built with CMake, all find_package calls are REQUIRED, are satisfied by vcpkg.json's declared dependencies, or disabled with CMAKE_DISABLE_FIND_PACKAGE_Xxx
  • The versioning scheme in vcpkg.json matches what upstream says.
  • The license declaration in vcpkg.json matches what upstream says.
  • The installed as the "copyright" file matches what upstream says.
  • The source code of the component installed comes from an authoritative source.
  • The generated "usage text" is accurate. See adding-usage for context.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is in the new port's versions file.
  • Only one version is added to each modified port's versions file.

@sjperkins sjperkins marked this pull request as draft May 8, 2023 13:34
@dg0yt
Copy link
Contributor

dg0yt commented May 8, 2023

Did you try to use the official build system? CMake may be faster to build, but the vendored build system needs to be reviewed and maintained. And long-term experience from other ports is .... mixed.

Copy link
Contributor

@dg0yt dg0yt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please let CI runs finish before pushing change, or we loose access to the failure logs.

ports/wcslib/vcpkg.json Outdated Show resolved Hide resolved
ports/wcslib/vcpkg.json Outdated Show resolved Hide resolved
@sjperkins
Copy link
Contributor Author

Did you try to use the official build system? CMake may be faster to build, but the vendored build system needs to be reviewed and maintained. And long-term experience from other ports is .... mixed.

Yes, I think this is as far as I've managed to get with it 5eaa02b.

There are two issues I've run into:

  1. Quoting from the docs, configure need -lcurl to succeed:

    ## If `./configure' fails, remove `-lcurl' and run again.
    $ ./configure LIBS="-pthread -lcurl -lm" --without-pgplot     \
            --disable-fortran CFLAGS="$CFLAGS -g0 -O3"
    

    I don't think the above is correct (LIBS should be set before ./configure). So I'm not entirely sure how cleanly pass LIBS into the configure call. Do you have any ideas here?

    vcpkg_configure_make(
      SOURCE_PATH ${src}
      COPY_SOURCE
      OPTIONS
         --disable-flex
         --disable-fortran
         --without-pgplot
         --with-libcfitsio-include=${CURRENT_INSTALLED_DIR}/include/cfitsio
         --with-libcfitsio-lib=${CURRENT_INSTALLED_DIR}/lib)
    
  2. Also wcslib.pc.in ends up with an absolute path in the prefix. Perhaps this can be fixed with a patch.

@dg0yt
Copy link
Contributor

dg0yt commented May 8, 2023

The prefix issue is trivial, just call vcpkg_fixup_pkgconfig() after the install step.

-lcurl won't be enough - at least for static builds, it takes a long list of link libraries. The solution is to use pkgconfig, both during configuration and as Requires.private in the pc file.
Maybe the same needs to be done with cfitsio, for the same reasons.
Last not least you have to deal with the fact that vcpkg builds both release and debug. These variants install libs to different directories and sometimes with different names. pkgconfig will resolve this for curl and cfitsio.

Do you feel comfortable with creating patches as needed?

@sjperkins
Copy link
Contributor Author

sjperkins commented May 8, 2023

-lcurl won't be enough - at least for static builds, it takes a long list of link libraries. The solution is to use pkgconfig, both during configuration and as Requires.private in the pc file. Maybe the same needs to be done with cfitsio, for the same reasons. Last not least you have to deal with the fact that vcpkg builds both release and debug. These variants install libs to different directories and sometimes with different names. pkgconfig will resolve this for curl and cfitsio.

Do you feel comfortable with creating patches as needed?

I think I'll be fine creating patches. Would it be possible for you to provide a snippet showing how to call pkg-config in relation to the above vcpkg_configure_make call, also showing how to point it at the relevant .pc files in the installation dirs?

@dg0yt
Copy link
Contributor

dg0yt commented May 8, 2023

All examples seem to be quite specific...
I currently work on libpq, which has this patch to configure.ac :

if test "$with_lz4" = yes ; then
- AC_CHECK_LIB(lz4, LZ4_compress_default, [], [AC_MSG_ERROR([library 'lz4' is required for LZ4 support])])
+ PKG_CHECK_MODULES([LZ4], [liblz4], [AC_DEFINE(HAVE_LIBLZ4,1,[Define to 1 if with lz4])], [AC_MSG_ERROR([library 'lz4' is required for LZ4 support])])
+ LIBS="$LZ4_LIBS $LIBS"
fi

The pattern is

  • remove or disable the original test
  • Use PKG_CHECK_MODULES
  • Put <PREFIX>_CFLAGS and <PREFIX>_LIBS into CFLAGS and LIBS

And in the pc file template, remove all -l references for the dependency and add the "module" name to Requires.private:. (It is more difficult with optional deps.)

@JonLiu1993 JonLiu1993 changed the title Add wcslib port [wcslib] Add wcslib port May 9, 2023
@JonLiu1993 JonLiu1993 added the category:new-port The issue is requesting a new library to be added; consider making a PR! label May 9, 2023
@sjperkins
Copy link
Contributor Author

I had an email discussion with the author of wcslib, Mark Callabreta
yesterday, email here.

Also, re pgplot, it's not required for the library itself, only the test
suite - of interest only to myself and package maintainers; it doesn't
belong in the library package, nor do the utility programs. The same
applies to cfitsio, though there is a slight wrinkle with one function,
getwcstab(), but it is only provided as a programming template - it
doesn't go into the wcslib object library. The Fortran wrappers were
really only intended for heritage packages such as AIPS and Miriad. As
maintainer of the latter at ATNF I retrofitted it to use WCSLIB some
years ago.

This means that the dependencies (especially cfitsio) are only necessary for
running the test suite and wcslib can be compiled without dependencies
(as @dg0yt noted), rendering the vcpkg_configure_make route much easier.

People have asked previously about supporting Windows but I have zero
familiarity with it (don't even know how to edit a source file) and it's
not something I can contemplate at this stage.

I think this means that it will probably be necessary to set {"supports": "!windows"}
in vcpkg.json but perhaps lets see what happens when the CI runs?

@sjperkins
Copy link
Contributor Author

@microsoft-github-policy-service agree

@sjperkins sjperkins marked this pull request as ready for review May 10, 2023 14:15
@JonLiu1993
Copy link
Member

@sjperkins, Could you please help test the usage locally? I cannot successfully install wcslib locally, and the error shows that the link timed out when downloading ftp://ftp.atnf.csiro.au/pub/software/wcslib/wcslib-7.12.tar.bz2:

test@test001:~/vcpkg$ ./vcpkg install wcslib
Computing installation plan...
The following packages will be built and installed:
    wcslib[core]:x64-linux -> 7.12
Detecting compiler hash for triplet x64-linux...
Restored 0 package(s) from /home/test/.cache/vcpkg/archives in 9.9 us. Use --debug to see more details.
Installing 1/1 wcslib:x64-linux...
Building wcslib[core]:x64-linux...
-- Downloading ftp://ftp.atnf.csiro.au/pub/software/wcslib/wcslib-7.12.tar.bz2 -> wcslib-7.12.tar.bz2...
[DEBUG] To include the environment variables in debug output, pass --debug-env
[DEBUG] Trying to load bundleconfig from /home/test/vcpkg/vcpkg-bundle.json
[DEBUG] Failed to open: /home/test/vcpkg/vcpkg-bundle.json
[DEBUG] Bundle config: readonly=false, usegitregistry=false, embeddedsha=nullopt, deployment=Git, vsversion=nullopt
[DEBUG] Metrics enabled.
[DEBUG] Feature flag 'binarycaching' unset
[DEBUG] Feature flag 'compilertracking' unset
[DEBUG] Feature flag 'registries' unset
[DEBUG] Feature flag 'versions' unset
[DEBUG] 1000: popen( curl --fail -L ftp://ftp.atnf.csiro.au/pub/software/wcslib/wcslib-7.12.tar.bz2 --create-dirs --output /home/test/vcpkg/downloads/wcslib-7.12.tar.bz2.327728.part 2>&1)
[DEBUG] 1000: cmd_execute_and_stream_data() returned 28 after 131752902 us
error: Failed to download from mirror set
error: ftp://ftp.atnf.csiro.au/pub/software/wcslib/wcslib-7.12.tar.bz2: curl failed to download with exit code 28
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

curl: (28) Failed to connect to ftp.atnf.csiro.au port 21 after 131744 ms: Connection timed out


@sjperkins
Copy link
Contributor Author

@sjperkins, Could you please help test the usage locally? I cannot successfully install wcslib locally, and the error shows that the link timed out when downloading ftp://ftp.atnf.csiro.au/pub/software/wcslib/wcslib-7.12.tar.bz2:

Thanks for trying. I get the following:

simon@LAPTOP-6HDASBBS:~/code/vcpkg$ ./vcpkg install wcslib
Computing installation plan...
The following packages will be built and installed:
    wcslib[core]:x64-linux -> 7.12
Detecting compiler hash for triplet x64-linux...
Restored 0 package(s) from /home/simon/.cache/vcpkg/archives in 644 us. Use --debug to see more details.
Installing 1/1 wcslib:x64-linux...
Building wcslib[core]:x64-linux...
-- Downloading ftp://ftp.atnf.csiro.au/pub/software/wcslib/wcslib-7.12.tar.bz2 -> wcslib-7.12.tar.bz2...
-- Extracting source /home/simon/code/vcpkg/downloads/wcslib-7.12.tar.bz2
-- Using source at /home/simon/code/vcpkg/buildtrees/wcslib/src/wcslib-7-d81e56e144.clean
-- Getting CMake variables for x64-linux-dbg
-- Getting CMake variables for x64-linux-rel
-- Configuring x64-linux-dbg
-- Configuring x64-linux-rel
-- Building x64-linux-dbg
-- Installing x64-linux-dbg
-- Building x64-linux-rel
-- Installing x64-linux-rel
-- Fixing pkgconfig file: /home/simon/code/vcpkg/packages/wcslib_x64-linux/lib/pkgconfig/wcslib.pc
-- Fixing pkgconfig file: /home/simon/code/vcpkg/packages/wcslib_x64-linux/debug/lib/pkgconfig/wcslib.pc
-- Installing: /home/simon/code/vcpkg/packages/wcslib_x64-linux/share/wcslib/copyright
-- Installing: /home/simon/code/vcpkg/packages/wcslib_x64-linux/share/wcslib/usage
-- Performing post-build validation
Stored binaries in 1 destinations.
Elapsed time to handle wcslib:x64-linux: 27 s
Total install time: 30 s
The package wcslib provides CMake targets:

    find_package(wcslib REQUIRED)
    target_link_libraries(main PRIVATE wcslib)
    target_include_directories(main PRIVATE wcslib)

Maybe your network blocks outgoing FTP requests?

@JonLiu1993
Copy link
Member

@sjperkins, I asked my colleagues to help me to try to install but failed to install, could you test the usage of this port locally? If successful, we can wait to merge this PR.

@sjperkins
Copy link
Contributor Author

@sjperkins, I asked my colleagues to help me to try to install but failed to install, could you test the usage of this port locally? If successful, we can wait to merge this PR.

Sure!

From my perspective, I'm adding wcslib in order to make a port of a larger Radio Astronomy package called casacore. I've already started on this port locally, and it's now able to depend on the wcslib port, but I haven't managed to get casacore to fully compile yet (there's an issue with the fftw3 dependency that I'll need to address separately).

That's a fairly large change. From your perspective, what would be useful for me to demonstrate success with wcslib locally?

@JonLiu1993
Copy link
Member

Use a simple cmake project to test the usage provided by this port:

    find_package(wcslib REQUIRED)
    target_link_libraries(main PRIVATE wcslib)
    target_include_directories(main PRIVATE wcslib)

ports/wcslib/vcpkg.json Outdated Show resolved Hide resolved
ports/wcslib/portfile.cmake Outdated Show resolved Hide resolved
@sjperkins
Copy link
Contributor Author

sjperkins commented May 11, 2023

Use a simple cmake project to test the usage provided by this port:

    find_package(wcslib REQUIRED)
    target_link_libraries(main PRIVATE wcslib)
    target_include_directories(main PRIVATE wcslib)

I've tried this, but I think I'm making a conceptual mistake here. As this is a make/configure project, it doesn't produce any cmake file and so find_package(wcslib REQUIRED) will always fail. If this is the correct behaviour on vcpkg's part, should I just remove the usage file?

@sjperkins
Copy link
Contributor Author

As this is a make/configure project, it doesn't produce any cmake file

For e.g. the acl port has no usage file

@dg0yt
Copy link
Contributor

dg0yt commented May 12, 2023

The usage file is just documentation, and it is desired. This project installs pkgconfig files, and it can be used from cmake in this way. Cf. ports/mujs/usage.

@sjperkins
Copy link
Contributor Author

sjperkins commented May 12, 2023

The usage file is just documentation, and it is desired. This project installs pkgconfig files, and it can be used from cmake in this way. Cf. ports/mujs/usage.

Thanks, I've updated the usage.

The following archive test.zip contains a cmake example using code from wcslib utils to compile a utility called fitshdr:

cmake_minimum_required(VERSION 3.19.1)

project(fitshdr)
add_executable(fitshdr fitshdr.c)

find_package(PkgConfig)
pkg_check_modules(wcslib REQUIRED IMPORTED_TARGET wcslib)
target_include_directories(fitshdr PRIVATE PkgConfig::wcslib)
target_link_libraries(fitshdr PRIVATE PkgConfig::wcslib)

The following compiles fitshdr with the vcpkg cmake toolchain

$ cmake -DCMAKE_TOOLCHAIN_FILE=$HOME/code/vcpkg/scripts/buildsystems/vcpkg.cmake ..

and if one downloads an example FITS file from https://fits.gsfc.nasa.gov/fits_samples.html, its possible to inspect the FITS headers as follows:

example ```bash $ ./fitshdr ../WFPC2u5780205r_c0fx.fits ================================================================================ FITS header number 1 at block number 1. -------------------------------------------------------------------------------- SIMPLE = T / file does conform to FITS standard BITPIX = -32 / number of bits per data pixel NAXIS = 3 / number of data axes NAXIS1 = 200 / length of data axis 1 NAXIS2 = 200 / length of data axis 2 NAXIS3 = 4 / length of data axis 3 EXTEND = T / FITS dataset may contain extensions COMMENT FITS (Flexible Image Transport System) format is defined in 'Astronomy COMMENT and Astrophysics', volume 376, page 359; bibcode: 2001A&A...376..359H BSCALE = 1.0E0 / REAL = TAPE*BSCALE + BZERO BZERO = 0.0E0 / OPSIZE = 2112 / PSIZE of original image ORIGIN = 'STScI-STSDAS' / Fitsio version 21-Feb-1996 FITSDATE= '2004-01-09' / Date FITS file was created FILENAME= 'u5780205r_cvt.c0h' / Original filename ALLG-MAX= 3.777701E3 / Data max in all groups ALLG-MIN= -7.319537E1 / Data min in all groups ODATTYPE= 'FLOATING' / Original datatype: Single precision real SDASMGNU= 4 / Number of groups in original image CRVAL1 = 182.6311886308 CRVAL2 = 39.39633673411 CRPIX1 = 420. CRPIX2 = 424.5 CD1_1 = -1.067040E-6 CD1_2 = -1.259580E-5 CD2_1 = -1.260160E-5 CD2_2 = 1.066550E-6 DATAMIN = -7.319537E1 / DATA MIN DATAMAX = 3.777701E3 / DATA MAX MIR_REVR= T ORIENTAT= -85.16 FILLCNT = 0 ERRCNT = 0 FPKTTIME= 51229.798574 LPKTTIME= 51229.798742 CTYPE1 = 'RA---TAN' CTYPE2 = 'DEC--TAN' DETECTOR= 1 DEZERO = 316.6452 BIASEVEN= 316.6715 BIASODD = 316.6189 GOODMIN = -5.064006 GOODMAX = 2552.17 DATAMEAN= 0.4182382 GPIXELS = 632387 SOFTERRS= 0 CALIBDEF= 1466 STATICD = 0 ATODSAT = 16 DATALOST= 0 BADPIXEL= 0 OVERLAP = 0 PHOTMODE= 'WFPC2,1,A2D7,LRF#4877.0,,CAL' PHOTFLAM= 3.447460E-16 PHOTZPT = -21.1 PHOTPLAM= 4884.258 PHOTBW = 20.20996 MEDIAN = -0.175651 MEDSHADO= -0.121681 HISTWIDE= 1.033711 SKEWNESS= -1.983727 MEANC10 = 0.12958 MEANC25 = 0.3129676 MEANC50 = 0.4577668 MEANC100= 0.3916293 MEANC200= 0.3115222 MEANC300= 0.3295493 BACKGRND= -0.3676353 ORIGIN = 'NOAO-IRAF FITS Image Kernel December 2001' / FITS file originator DATE = '2004-01-09T03:26:36' IRAF-TLM= '03:26:36 (09/01/2004)' FILETYPE= 'SCI ' / type of data found in data file

TELESCOP= 'HST' / telescope used to acquire data
INSTRUME= 'WFPC2 ' / identifier for instrument used to acquire data
EQUINOX = 2000.0 / equinox of celestial coord. system

          / WFPC-II DATA DESCRIPTOR KEYWORDS

ROOTNAME= 'u5780205r' / rootname of the observation set
PROCTIME= 5.301314019676E+04 / Pipeline processing time (MJD)
OPUS_VER= 'OPUS 14.5a ' / OPUS software system version number
CAL_VER = ' ' / CALWP2 code version

          / SCIENCE INSTRUMENT CONFIGURATION

MODE = 'FULL' / instr. mode: FULL (full res.), AREA (area int.)
SERIALS = 'OFF' / serial clocks: ON, OFF

          / IMAGE TYPE CHARACTERISTICS

IMAGETYP= 'EXT ' / DARK/BIAS/IFLAT/UFLAT/VFLAT/KSPOT/EXT/ECAL
CDBSFILE= 'NO ' / GENERIC/BIAS/DARK/PREF/FLAT/MASK/ATOD/NO
PKTFMT = 96 / packet format code

          / FILTER CONFIGURATION

FILTNAM1= 'FR533P15' / first filter name
FILTNAM2= ' ' / second filter name
FILTER1 = 69 / first filter number (0-48)
FILTER2 = 0 / second filter number (0-48)
FILTROT = 15.0 / partial filter rotation angle (degrees)
LRFWAVE = 4877.000000 / linear ramp filter wavelength

          / INSTRUMENT STATUS USED IN DATA PROCESSING

UCH1CJTM= -88.2569 / TEC cold junction #1 temperature (Celsius)
UCH2CJTM= -88.6697 / TEC cold junction #2 temperature (Celsius)
UCH3CJTM= -88.3028 / TEC cold junction #3 temperature (Celsius)
UCH4CJTM= -88.7671 / TEC cold junction #4 temperature (Celsius)
UBAY3TMP= 13.2302 / bay 3 A1 temperature (deg C)
KSPOTS = 'OFF' / Status of Kelsall spot lamps: ON, OFF
SHUTTER = 'A' / Shutter in place at beginning of the exposure
ATODGAIN= 7.0 / Analog to Digital Gain (Electrons/DN)

          / RSDP CONTROL KEYWORDS

MASKCORR= 'COMPLETE' / Do mask correction: PERFORM, OMIT, COMPLETE
ATODCORR= 'COMPLETE' / Do A-to-D correction: PERFORM, OMIT, COMPLETE
BLEVCORR= 'COMPLETE' / Do bias level correction
BIASCORR= 'COMPLETE' / Do bias correction: PERFORM, OMIT, COMPLETE
DARKCORR= 'COMPLETE' / Do dark correction: PERFORM, OMIT, COMPLETE
FLATCORR= 'SKIPPED ' / Do flat field correction
SHADCORR= 'OMIT ' / Do shaded shutter correction
DOSATMAP= 'OMIT ' / Output saturated pixel map
DOPHOTOM= 'COMPLETE' / Fill photometry keywords
DOHISTOS= 'OMIT ' / Make histograms: PERFORM, OMIT, COMPLETE
OUTDTYPE= 'REAL ' / Output image datatype: REAL, LONG, SHORT

          / CALIBRATION REFERENCE FILES

MASKFILE= 'uref$f8213081u.r0h ' / name of the input DQF of known bad pixels
ATODFILE= 'uref$dbu1405iu.r1h' / name of the A-to-D conversion file
BLEVFILE= 'ucal$u5780205r.x0h ' / Engineering file with extended register da
BLEVDFIL= 'ucal$u5780205r.q1h ' / Engineering file DQF
BIASFILE= 'uref$j9a1612mu.r2h' / name of the bias frame reference file
BIASDFIL= 'uref$j9a1612mu.b2h' / name of the bias frame reference DQF
DARKFILE= 'uref$j2g1549cu.r3h' / name of the dark reference file
DARKDFIL= 'uref$j2g1549cu.b3h' / name of the dark reference DQF
FLATFILE= 'uref$f4i1559cu.r4h' / name of the flat field reference file
FLATDFIL= 'uref$f4i1559cu.b4h' / name of the flat field reference DQF
SHADFILE= 'uref$e371355eu.r5h' / name of the reference file for shutter sha
PHOTTAB = 'u5780205r_c3t.fits' / name of the photometry calibration table
GRAPHTAB= 'mtab$n9i1408hm_tmg.fits' / the HST graph table
COMPTAB = 'mtab$nc809508m_tmc.fits' / the HST components table

          / DEFAULT KEYWORDS SET BY STSCI

SATURATE= 4095 / Data value at which saturation occurs
USCALE = 1.0 / Scale factor for output image
UZERO = 0.0 / Zero point for output image

          / READOUT DURATION INFORMATION

READTIME= 464 / Length of time for CCD readout in clock ticks

          / PLANETARY SCIENCE KEYWORDS

PA_V3 = 49.936909 / position angle of V3-axis of HST (deg)
RA_SUN = 3.337194516616E+02 / right ascension of the sun (deg)
DEC_SUN = -1.086675160382E+01 / declination of the sun (deg)
EQNX_SUN= 2000.0 / equinox of the sun
MTFLAG = F / moving target flag; T if it is a moving target
EQRADTRG= 0.000000 / equatorial radius of target (km)
FLATNTRG= 0.000000 / flattening of target
NPDECTRG= 0.000000 / north pole declination of target (deg)
NPRATRG = 0.000000 / north pole right ascension of target (deg)
ROTRTTRG= 0.000000 / rotation rate of target
LONGPMER= 0.000000 / longitude of prime meridian (deg)
EPLONGPM= 0.000000 / epoch of longitude of prime meridian (sec)
SURFLATD= 0.000000 / surface feature latitude (deg)
SURFLONG= 0.000000 / surface feature longitude (deg)
SURFALTD= 0.000000 / surface feature altitude (km)

          / PODPS FILL VALUES

PODPSFF = 0 / 0=(no podps fill); 1=(podps fill present)
STDCFFF = 0 / 0=(no st dcf fill); 1=(st dcf fill present)
STDCFFP = '0x5569' / st dcf fill pattern (hex)
RSDPFILL= -100 / bad data fill value for calibrated images

          / EXPOSURE TIME AND RELATED INFORMATION

UEXPODUR= 300 / commanded duration of exposure (sec)
NSHUTA17= 1 / Number of AP17 shutter B closes
DARKTIME= 3.000000000000E+02 / Dark time (seconds)
UEXPOTIM= 16880 / Major frame pulse time preceding exposure start
PSTRTIME= '1999.051:19:08:37 ' / predicted obs. start time (yyyy.ddd:hh:mm:ss)
PSTPTIME= '1999.051:19:16:37 ' / predicted obs. stop time (yyyy.ddd:hh:mm:ss)

          / EXPOSURE INFORMATION

SUNANGLE= 141.618347 / angle between sun and V1 axis
MOONANGL= 126.698997 / angle between moon and V1 axis
SUN_ALT = -31.523479 / altitude of the sun above Earth's limb
FGSLOCK = 'FINE ' / commanded FGS lock (FINE,COARSE,GYROS,UNKNOWN)

DATE-OBS= '1999-02-20' / UT date of start of observation (yyyy-mm-dd)
TIME-OBS= '19:03:13' / UT time of start of observation (hh:mm:ss)
EXPSTART= 5.122979390428E+04 / exposure start time (Modified Julian Date)
EXPEND = 5.122979737650E+04 / exposure end time (Modified Julian Date)
EXPTIME = 3.000000000000E+02 / exposure duration (seconds)--calculated
EXPFLAG = 'NORMAL ' / Exposure interruption indicator

          / TARGET & PROPOSAL ID

TARGNAME= 'NGC4151 ' / proposer's target name
RA_TARG = 1.826355000000E+02 / right ascension of the target (deg) (J2000)
DEC_TARG= 3.940576666667E+01 / declination of the target (deg) (J2000)
ECL_LONG= 164.096619 / ecliptic longitude of the target (deg) (J2000)
ECL_LAT = 36.623709 / ecliptic latitude of the target (deg) (J2000)
GAL_LONG= 155.079532 / galactic longitude of the target (deg) (J2000)
GAL_LAT = 75.062679 / galactic latitude of the target (deg) (J2000)

PROPOSID= 8019 / PEP proposal identifier
PEP_EXPO= '02-030 ' / PEP exposure identifier including sequence
LINENUM = '02.030 ' / PEP proposal line number
SEQLINE = ' ' / PEP line number of defined sequence
SEQNAME = ' ' / PEP define/use sequence name
HISTORY MASKFILE=uref$f8213081u.r0h MASKCORR=COMPLETED
HISTORY PEDIGREE=INFLIGHT 01/01/1994 - 15/05/1995
HISTORY DESCRIP=STATIC MASK - INCLUDES CHARGE TRANSFER TRAPS
HISTORY BIASFILE=uref$j9a1612mu.r2h BIASCORR=COMPLETED
HISTORY PEDIGREE=INFLIGHT 29/08/98 - 21/08/99
HISTORY DESCRIP=not significantly different from j6e16008u.
HISTORY DARKFILE=uref$j2g1549cu.r3h DARKCORR=COMPLETED
HISTORY PEDIGREE=INFLIGHT 16/02/1999 - 16/02/1999
HISTORY DESCRIP=Pipeline dark: 120 frame superdark with hotpixels from
HISTORY 16/02/99
HISTORY FLATFILE=uref$f4i1559cu.r4h FLATCORR=SKIPPED
HISTORY PEDIGREE=DUMMY 18/04/1995
HISTORY DESCRIP=All pixels set to value of 1. Not flat-fielded.
HISTORY PC1: bias jump level ~0.100 DN.
HISTORY The following throughput tables were used:
HISTORY crotacomp$hst_ota_007_syn.fits, crwfpc2comp$wfpc2_optics_006_syn.fits,
HISTORY crwfpc2comp$wfpc2_lrf_004_syn.fits[wave#],
HISTORY crwfpc2comp$wfpc2_dqepc1_005_syn.fits,
HISTORY crwfpc2comp$wfpc2_a2d7pc1_004_syn.fits,
HISTORY crwfpc2comp$wfpc2_flatpc1_003_syn.fits
HISTORY The following throughput tables were used:
HISTORY crotacomp$hst_ota_007_syn.fits, crwfpc2comp$wfpc2_optics_006_syn.fits,
HISTORY crwfpc2comp$wfpc2_lrf_004_syn.fits[wave#],
HISTORY crwfpc2comp$wfpc2_dqewfc2_005_syn.fits,
HISTORY crwfpc2comp$wfpc2_a2d7wf2_004_syn.fits,
HISTORY crwfpc2comp$wfpc2_flatwf2_003_syn.fits
HISTORY The following throughput tables were used:
HISTORY crotacomp$hst_ota_007_syn.fits, crwfpc2comp$wfpc2_optics_006_syn.fits,
HISTORY crwfpc2comp$wfpc2_lrf_004_syn.fits[wave#],
HISTORY crwfpc2comp$wfpc2_dqewfc3_005_syn.fits,
HISTORY crwfpc2comp$wfpc2_a2d7wf3_004_syn.fits,
HISTORY crwfpc2comp$wfpc2_flatwf3_003_syn.fits
HISTORY The following throughput tables were used:
HISTORY crotacomp$hst_ota_007_syn.fits, crwfpc2comp$wfpc2_optics_006_syn.fits,
HISTORY crwfpc2comp$wfpc2_lrf_004_syn.fits[wave#],
HISTORY crwfpc2comp$wfpc2_dqewfc4_005_syn.fits,
HISTORY crwfpc2comp$wfpc2_a2d7wf4_004_syn.fits,
HISTORY crwfpc2comp$wfpc2_flatwf4_003_syn.fits
CTYPE3 = 'GROUP_NUMBER' / Extra dimension axis name
CD3_3 = 1 /
CD3_1 = 0 /
CD1_3 = 0 /
CD2_3 = 0 /
CD3_2 = 0 /
END

Data section number 1 beginning at block number 9.
Skipped 223 blocks of data of size 2880 bytes (642240 bytes).

FITS header number 2 at block number 232.

XTENSION= 'TABLE ' / Ascii table extension
BITPIX = 8 / 8-bits per 'pixels'
NAXIS = 2 / Simple 2-D matrix
NAXIS1 = 796 / Number of characters per row
NAXIS2 = 4 / The number of rows
PCOUNT = 0 / No 'random' parameters
GCOUNT = 1 / Only one group
TFIELDS = 49 / Number of fields per row
EXTNAME = 'u5780205r_cvt.c0h.tab' / Name of table

TTYPE1 = 'CRVAL1 ' /
TBCOL1 = 1 /
TFORM1 = 'D25.17 ' /
TUNIT1 = ' ' /
TDISP1 = 'G25.16 ' / %25.16g

TTYPE2 = 'CRVAL2 ' /
TBCOL2 = 27 /
TFORM2 = 'D25.17 ' /
TUNIT2 = ' ' /
TDISP2 = 'G25.16 ' / %25.16g

TTYPE3 = 'CRPIX1 ' /
TBCOL3 = 53 /
TFORM3 = 'E15.7 ' /
TUNIT3 = ' ' /
TDISP3 = 'G15.7 ' / %15.7g

TTYPE4 = 'CRPIX2 ' /
TBCOL4 = 69 /
TFORM4 = 'E15.7 ' /
TUNIT4 = ' ' /
TDISP4 = 'G15.7 ' / %15.7g

TTYPE5 = 'CD1_1 ' /
TBCOL5 = 85 /
TFORM5 = 'E15.7 ' /
TUNIT5 = ' ' /
TDISP5 = 'G15.7 ' / %15.7g

TTYPE6 = 'CD1_2 ' /
TBCOL6 = 101 /
TFORM6 = 'E15.7 ' /
TUNIT6 = ' ' /
TDISP6 = 'G15.7 ' / %15.7g

TTYPE7 = 'CD2_1 ' /
TBCOL7 = 117 /
TFORM7 = 'E15.7 ' /
TUNIT7 = ' ' /
TDISP7 = 'G15.7 ' / %15.7g

TTYPE8 = 'CD2_2 ' /
TBCOL8 = 133 /
TFORM8 = 'E15.7 ' /
TUNIT8 = ' ' /
TDISP8 = 'G15.7 ' / %15.7g

TTYPE9 = 'DATAMIN ' /
TBCOL9 = 149 /
TFORM9 = 'E15.7 ' /
TUNIT9 = ' ' /
TDISP9 = 'G15.7 ' / %15.7g

TTYPE10 = 'DATAMAX ' /
TBCOL10 = 165 /
TFORM10 = 'E15.7 ' /
TUNIT10 = ' ' /
TDISP10 = 'G15.7 ' / %15.7g

TTYPE11 = 'MIR_REVR' /
TBCOL11 = 181 /
TFORM11 = 'A1 ' /
TUNIT11 = 'LOGICAL-' /
TDISP11 = 'L1 ' / %1b

TTYPE12 = 'ORIENTAT' /
TBCOL12 = 183 /
TFORM12 = 'E15.7 ' /
TUNIT12 = ' ' /
TDISP12 = 'G15.7 ' / %15.7g

TTYPE13 = 'FILLCNT ' /
TBCOL13 = 199 /
TFORM13 = 'I12 ' /
TUNIT13 = ' ' /
TDISP13 = 'I11 ' / %11d

TTYPE14 = 'ERRCNT ' /
TBCOL14 = 212 /
TFORM14 = 'I12 ' /
TUNIT14 = ' ' /
TDISP14 = 'I11 ' / %11d

TTYPE15 = 'FPKTTIME' /
TBCOL15 = 225 /
TFORM15 = 'D25.17 ' /
TUNIT15 = ' ' /
TDISP15 = 'G25.16 ' / %25.16g

TTYPE16 = 'LPKTTIME' /
TBCOL16 = 251 /
TFORM16 = 'D25.17 ' /
TUNIT16 = ' ' /
TDISP16 = 'G25.16 ' / %25.16g

TTYPE17 = 'CTYPE1 ' /
TBCOL17 = 277 /
TFORM17 = 'A8 ' /
TUNIT17 = 'CHARACTER*8' /
TDISP17 = 'A8 ' / %-8s

TTYPE18 = 'CTYPE2 ' /
TBCOL18 = 286 /
TFORM18 = 'A8 ' /
TUNIT18 = 'CHARACTER*8' /
TDISP18 = 'A8 ' / %-8s

TTYPE19 = 'DETECTOR' /
TBCOL19 = 295 /
TFORM19 = 'I12 ' /
TUNIT19 = ' ' /
TDISP19 = 'I11 ' / %11d

TTYPE20 = 'DEZERO ' /
TBCOL20 = 308 /
TFORM20 = 'E15.7 ' /
TUNIT20 = ' ' /
TDISP20 = 'G15.7 ' / %15.7g

TTYPE21 = 'BIASEVEN' /
TBCOL21 = 324 /
TFORM21 = 'E15.7 ' /
TUNIT21 = ' ' /
TDISP21 = 'G15.7 ' / %15.7g

TTYPE22 = 'BIASODD ' /
TBCOL22 = 340 /
TFORM22 = 'E15.7 ' /
TUNIT22 = ' ' /
TDISP22 = 'G15.7 ' / %15.7g

TTYPE23 = 'GOODMIN ' /
TBCOL23 = 356 /
TFORM23 = 'E15.7 ' /
TUNIT23 = ' ' /
TDISP23 = 'G15.7 ' / %15.7g

TTYPE24 = 'GOODMAX ' /
TBCOL24 = 372 /
TFORM24 = 'E15.7 ' /
TUNIT24 = ' ' /
TDISP24 = 'G15.7 ' / %15.7g

TTYPE25 = 'DATAMEAN' /
TBCOL25 = 388 /
TFORM25 = 'E15.7 ' /
TUNIT25 = ' ' /
TDISP25 = 'G15.7 ' / %15.7g

TTYPE26 = 'GPIXELS ' /
TBCOL26 = 404 /
TFORM26 = 'I12 ' /
TUNIT26 = ' ' /
TDISP26 = 'I11 ' / %11d

TTYPE27 = 'SOFTERRS' /
TBCOL27 = 417 /
TFORM27 = 'I12 ' /
TUNIT27 = ' ' /
TDISP27 = 'I11 ' / %11d

TTYPE28 = 'CALIBDEF' /
TBCOL28 = 430 /
TFORM28 = 'I12 ' /
TUNIT28 = ' ' /
TDISP28 = 'I11 ' / %11d

TTYPE29 = 'STATICD ' /
TBCOL29 = 443 /
TFORM29 = 'I12 ' /
TUNIT29 = ' ' /
TDISP29 = 'I11 ' / %11d

TTYPE30 = 'ATODSAT ' /
TBCOL30 = 456 /
TFORM30 = 'I12 ' /
TUNIT30 = ' ' /
TDISP30 = 'I11 ' / %11d

TTYPE31 = 'DATALOST' /
TBCOL31 = 469 /
TFORM31 = 'I12 ' /
TUNIT31 = ' ' /
TDISP31 = 'I11 ' / %11d

TTYPE32 = 'BADPIXEL' /
TBCOL32 = 482 /
TFORM32 = 'I12 ' /
TUNIT32 = ' ' /
TDISP32 = 'I11 ' / %11d

TTYPE33 = 'OVERLAP ' /
TBCOL33 = 495 /
TFORM33 = 'I12 ' /
TUNIT33 = ' ' /
TDISP33 = 'I11 ' / %11d

TTYPE34 = 'PHOTMODE' /
TBCOL34 = 508 /
TFORM34 = 'A48 ' /
TUNIT34 = 'CHARACTER*48' /
TDISP34 = 'A48 ' / %-48s

TTYPE35 = 'PHOTFLAM' /
TBCOL35 = 557 /
TFORM35 = 'E15.7 ' /
TUNIT35 = ' ' /
TDISP35 = 'G15.7 ' / %15.7g

TTYPE36 = 'PHOTZPT ' /
TBCOL36 = 573 /
TFORM36 = 'E15.7 ' /
TUNIT36 = ' ' /
TDISP36 = 'G15.7 ' / %15.7g

TTYPE37 = 'PHOTPLAM' /
TBCOL37 = 589 /
TFORM37 = 'E15.7 ' /
TUNIT37 = ' ' /
TDISP37 = 'G15.7 ' / %15.7g

TTYPE38 = 'PHOTBW ' /
TBCOL38 = 605 /
TFORM38 = 'E15.7 ' /
TUNIT38 = ' ' /
TDISP38 = 'G15.7 ' / %15.7g

TTYPE39 = 'MEDIAN ' /
TBCOL39 = 621 /
TFORM39 = 'E15.7 ' /
TUNIT39 = ' ' /
TDISP39 = 'G15.7 ' / %15.7g

TTYPE40 = 'MEDSHADO' /
TBCOL40 = 637 /
TFORM40 = 'E15.7 ' /
TUNIT40 = ' ' /
TDISP40 = 'G15.7 ' / %15.7g

TTYPE41 = 'HISTWIDE' /
TBCOL41 = 653 /
TFORM41 = 'E15.7 ' /
TUNIT41 = ' ' /
TDISP41 = 'G15.7 ' / %15.7g

TTYPE42 = 'SKEWNESS' /
TBCOL42 = 669 /
TFORM42 = 'E15.7 ' /
TUNIT42 = ' ' /
TDISP42 = 'G15.7 ' / %15.7g

TTYPE43 = 'MEANC10 ' /
TBCOL43 = 685 /
TFORM43 = 'E15.7 ' /
TUNIT43 = ' ' /
TDISP43 = 'G15.7 ' / %15.7g

TTYPE44 = 'MEANC25 ' /
TBCOL44 = 701 /
TFORM44 = 'E15.7 ' /
TUNIT44 = ' ' /
TDISP44 = 'G15.7 ' / %15.7g

TTYPE45 = 'MEANC50 ' /
TBCOL45 = 717 /
TFORM45 = 'E15.7 ' /
TUNIT45 = ' ' /
TDISP45 = 'G15.7 ' / %15.7g

TTYPE46 = 'MEANC100' /
TBCOL46 = 733 /
TFORM46 = 'E15.7 ' /
TUNIT46 = ' ' /
TDISP46 = 'G15.7 ' / %15.7g

TTYPE47 = 'MEANC200' /
TBCOL47 = 749 /
TFORM47 = 'E15.7 ' /
TUNIT47 = ' ' /
TDISP47 = 'G15.7 ' / %15.7g

TTYPE48 = 'MEANC300' /
TBCOL48 = 765 /
TFORM48 = 'E15.7 ' /
TUNIT48 = ' ' /
TDISP48 = 'G15.7 ' / %15.7g

TTYPE49 = 'BACKGRND' /
TBCOL49 = 781 /
TFORM49 = 'E15.7 ' /
TUNIT49 = ' ' /
TDISP49 = 'G15.7 ' / %15.7g

CRVAL1 = 'right ascension of reference pixel (deg)' /
CRVAL2 = 'declination of reference pixel (deg)' /
CRPIX1 = 'x-coordinate of reference pixel' /
CRPIX2 = 'y-coordinate of reference pixel' /
CD1_1 = 'partial of the right ascension w.r.t. x' /
CD1_2 = 'partial of the right ascension w.r.t. y' /
CD2_1 = 'partial of the declination w.r.t. x' /
CD2_2 = 'partial of the declination w.r.t. y' /
DATAMIN = 'minimum value of the data' /
DATAMAX = 'maximum value of the data' /
MIR_REVR= 'is the image mirror reversed?' /
ORIENTAT= 'orientation of the image (deg)' /
FILLCNT = 'number of segments containing fill' /
ERRCNT = 'number of segments containing errors' /
FPKTTIME= 'time of the first packet (Modified Julian Date)' /
LPKTTIME= 'time of the last packet (Modified Julian Date)' /
CTYPE1 = 'first coordinate type' /
CTYPE2 = 'second coordinate type' /
DETECTOR= 'CCD detector: PC 1, WFC 2-4' /
DEZERO = 'mean bias level from EED extended register' /
BIASEVEN= 'bias level for even-numbered columns' /
BIASODD = 'bias level for odd-numbered columns' /
GOODMIN = 'minimum value of the "good" pixels' /
GOODMAX = 'maximum value of the "good" pixels' /
DATAMEAN= 'mean value of the "good" pixels' /
GPIXELS = 'number of "good" pixels (DQF = 0)' /
SOFTERRS= 'number of "soft error" pixels (DQF = 1)' /
CALIBDEF= 'number of "calibration defect" pixels (DQF = 2)' /
STATICD = 'number of "static defect" pixels (DQF = 4)' /
ATODSAT = 'number of "AtoD saturated" pixels (DQF = 8)' /
DATALOST= 'number of "data lost" pixels (DQF = 16)' /
BADPIXEL= 'number of "generic bad" pixels (DQF = 32)' /
OVERLAP = 'number of "image overlap" pixels (DQF = 64)' /
PHOTMODE= 'Photometry mode' /
PHOTFLAM= 'Inverse Sensitivity' /
PHOTZPT = 'Zero point' /
PHOTPLAM= 'Pivot wavelength' /
PHOTBW = 'RMS bandwidth of the filter' /
MEDIAN = 'middle data value when good qual pixels sorted' /
MEDSHADO= 'median pixel value in shadow of pyramid edge' /
HISTWIDE= 'width of the histogram' /
SKEWNESS= 'skewness of the histogram' /
MEANC10 = 'mean of a 10x10 region at center of chip' /
MEANC25 = 'mean of a 25x25 region at center of chip' /
MEANC50 = 'mean of a 50x50 region at center of chip' /
MEANC100= 'mean of a 100x100 region at center of chip' /
MEANC200= 'mean of a 200x200 region at center of chip' /
MEANC300= 'mean of a 300x300 region at center of chip' /
BACKGRND= 'estimated background level' /
END

Data section number 2 beginning at block number 242.
Skipped 2 blocks of data of size 2880 bytes (5760 bytes).

End-of-file after 2 HDUs in 243 x 2880-byte blocks (699840 bytes).


</details>

@sjperkins
Copy link
Contributor Author

Is anything else required from my side?

@JonLiu1993
Copy link
Member

JonLiu1993 commented May 16, 2023

Tested usage tested successfully by wcslib:x64-linux:

test@test001:~/build$ /home/test/vcpkg/downloads/tools/cmake-3.25.1-linux/cmake-3.25.1-linux-x86_64/bin/cmake .. -DVCPKG_TARGET_TRIPLET=x64-linux -DCMAKE_TOOLCHAIN_FILE=/home/test/vcpkg/scripts/buildsystems/vcpkg.cmake
-- The C compiler identification is GNU 11.3.0
-- The CXX compiler identification is GNU 11.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2")
-- Checking for module 'wcslib'
--   Found wcslib, version 7.12
-- Configuring done
-- Generating done
-- Build files have been written to: /home/test/build

@JonLiu1993 JonLiu1993 added the info:reviewed Pull Request changes follow basic guidelines label May 16, 2023
@JavierMatosD JavierMatosD merged commit 4a45104 into microsoft:master May 16, 2023
@sjperkins sjperkins deleted the wcslib branch May 16, 2023 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:new-port The issue is requesting a new library to be added; consider making a PR! info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants