505. 15 May 2001 synphot$imspec Howard Modified the wimspec.x module in the imspec task so that it gives the CTYPE1 keyword a value of "LINEAR" in the output image, instead of "LAMBDA". The old value was not recognized by the IRAF MWCS and resulted in incorrect plot axis labels in tasks like "splot". 504. 26 April 2001 tables & stsdas Nadia TABLES and STSDAS were frozen on Thu Apr 26 2 p.m. 2001 for release 2.3. They were tagged as tables_2_3_beta and stsdas_2_3_beta in CVS and branched. After that the main trunk was unfrozen.All changes to the candidate release will be made on the branch and after thje official release the branch will die. All updates between numbers 444-503 will be included in version 2.3. 503. 9 April 2001 fitsio/format.mip Phil The fitsio$format.mip file gives formats for displaying information when using the short_header=yes option in catfits. The value of DIMENS was "-10.10", for printing the dimensions of an image or the number of columns and rows of a table. This was too small, resulting in truncation of large values. It was changed to "-12.12", which should be sufficient for most images and tables. 502. 6 April 2001 calstis Phil Changes were made to calstis to support prism data; see OPR 41147. Many of the changes had to do with wavecal processing. Normally for first-order data, the wavecal is 2-D rectified before running calstis4. For prism data this will not work, however, because of the huge variation in dispersion across the detector. calstis4 was therefore modified to take unrectified prism data as input. This required a change to calstis0, so it does not call calstis7 for prism wavecal data, and it passes the flat-fielded wavecal directly to calstis4. Ivo modified calstis6 to interpret the dispersion coefficients correctly for prism data, since this is quite different than for grating data. There were four unrelated changes. A typo was fixed in cs0/mkpkg. A newline was added to each of two error messages in cs1/dononlin.c. In cs6/gcrosscor.c, sigma is now initialized to zero; if none of the spectral orders is found, the value of sigma is never updated, so if sigma is not initialized it can cause a problem when it is printed. In cs7/scalewcs.c, the test for echelle data in the section for modifying the output image size for subarray data would not have worked for image data, so it was replaced by a more straightforward test that does work. The modified files are: stis.h, stisversion.h, cs0: mkpkg, calstis0.h, calstis0.c, getwavinfo.c, stisinit.c, cs1: dolores.c, cs4: mkpkg, calstis4.h, calstis4.c, findwl.c, getdisp4.c, getflags4.c, getgrpinfo4.c, getkeyinfo4.c, getlamp.c, history4.c, maketemplate.c, newtrace4.c, spatialshift.c, wavecal.c, waveshift.c, xcwave.c, cs6: absflux6.c, do1dx.c, gcrosscor.c, wave.c, cs7: absflux.c, scalewcs.c, x2dcorr7.c 501. 29 March 2001 tbtables Phil Three files were modified: tbcadd.x, tbfrsi.x, and tbzopn.x. In tbzopn.x (only called for a text table), TB_ROWLEN and TB_COLUSED are assigned a value, the sum of COL_LEN for all columns in the table; in tbcadd.x, TB_COLUSED is set equal to TB_ROWLEN (which has been updated by tbcdef) for a text table. In tbfrsi.x (only called for a FITS table), TB_ROWLEN and TB_COLUSED are assigned a value based on NAXIS1. The reason for these changes is so that tbpsta() will return reasonable numbers for row length for text tables and FITS tables. 500. 14 March 2001 stplot$histogram Phil If the input to the histogram task is a table, there was no check that the column (parameter 'colname') is actually present in the table. It appears that the original assumption was that this would result in an error, but this is not the case; if the column is missing the column pointer will be NULL. A check for this was added. 499. 08 March 2001 fitsio$catfits Phil The EXTEND macro was used in two different ways: (1) for the value of the EXTEND keyword, and (2) for the value of the XTENSION keyword. The FITS kernel copies the EXTEND keyword to an extension when inherit is true, and the presence of this keyword results in the extension type being clobbered by the value of EXTEND. This was solved by adding another macro definition in catf.h, XTENSION, to replace the second use of EXTEND. A second change was in get_tape_info in cat_rtonly.x, in this section: } else if (strmatch (card, "^ODATTYPE") != 0) { call rft_get_fits_string (card, CATV(fits,nk), SZ_OBJECT) DATATYPE(fits) = CATV(fits,nk) # Get 1st character There are two problems with this: nk hasn't been assigned a value, and if long_header = yes, it looks to me as if space for CATV hasn't been allocated. This was changed to use ext_value instead of CATV(fits,nk). The modified files are catf.h, cat_prt.x, and cat_rtonly.x. The version in catfits.par was also changed. 498. 05 March 2001 ttools$thedit Phil The help file for thedit was modified to describe the problem with a value such as "19940531:11515000". This is supposed to be a date and should be treated as a string, but thedit thinks it is a number in HH:MM format and converts it to 19940531. + 11515000./60. 497. 02 March 2001 stis$odelaytime Phil Significant changes were made to the odelaytime task (which converts times in a STIS timetag file from geocentric to solar system barycentric). Previously odelaytime wrote the barycentric times to a new column. This caused problems with using the modified timetag file as input to inttag, which wouldn't know about the new column. The new version of odelaytime modifies the TIME column in-place, and it also modifies the associated header keywords TEXPSTRT, TEXPEND, EXPSTART, and EXPEND. The new version also updates the START and STOP values in the GTI table. 496. 01 March 2001 synphot.simulators.simspec Howard Updated the synphot$data/detectors.dat and simulators$data/detectors.dat files to include data for the stis,g230lb and stis,g230mb modes. Also modified the error messages in the simspec getscale.x and otfopen.x routines so that they are more clear about what file is being searched when an obsmode entry is reported as not found. 495. 28 February 2001 synphot.simulators.simspec Howard Modified the (one) example in the simspec help page to use a valid STIS aperture name, as well as including a reference to a PSF image. 494. 31 January 2001 gflib and gilib Bernie This should be my final delivery of changes to gilib and gflib. There were two major changes to gflib. First, gflib no longer updates the NEW_COPY image header by using the fits cache header. Instead it uses the contents of the primary header spool file, which was created when the previous extension was closed. This change affected many files, but the greatest changes were to gf_opengr.x, gfsplitua.x, and gfupuser.x. The new file gfupfits.x was created and gfcopypri.x and gi_upuser.x were deleted. The second major change was to re-introduce code which adds the EXTEND keyword to the user area. It seems that the fits kernel deletes this keyword when opening the pixel file. Previously I had code which added the EXTEND keyword unconditionally. The new code first checks for the presence of EXTEND in the user area. The changes were to gfsplitua.x. There were many other small changes to the gflib library which will go unmentioned here. 493. 29 January 2001 tools$base2dec Phil An example was added to base2dec.hlp to point out that input numbers with more than ten digits must be quoted, if they are given on the command line. This is because the cl interprets numerical values as they are entered, and a huge base-two number can suffer from integer wraparound. For example, 10101111100 was read by the cl as 1511176508. 492. 26 January 2001 fos Phil The mkpkg files in fos and fos/spec_polar were modified. The previous version of fos/mkpkg called relink for the calfos and spec_polar subdirectories, which used "$checkout calfos.a ../" and "$checkin calfos.a ../" statements (and similarly for spec_polar.a). This did not work properly on an HPUX system (see CNSHD147447). The new version of fos/mkpkg uses "$update calfos.a" to update the calfos.a library. The fos/spec_polar/mkpkg used to create the object library in the fos package directory. This is not necessary, since no executable other than spec_polar uses this library, so to avoid the checkout/checkin problem, the mkpkg file was modified to create spec_polar.a in the spec_polar subdirectory. 491. 25 January 2001 stxtools$vex Bernie The not operator was incorrect in vexfunc.x. It converted non-zero to one and zero to zero. Instead it should convert non-zero to zero and zero to one. Suprising that this bug went undiscovered all this time. The bug affects imcalc, tcalc, and other software. 490. 11 January 2001 fitting$nlfit Ivo Added one element to Y array in amoeba algorithm to prevent overflow. 489. 8 January 2001 odelaytime Phil The mkpkg file in this directory was modified. The previous version used a stis.a file in the parent (stis) directory, with "$checkout stis.a ../" and "$checkin stis.a ../" statements. This did not work properly on an HPUX system (apparently just one such system); see CNSHD147447. The new version makes the object library odelaytime.a in the odelaytime directory, using no checkout/checkin. The help file was also modified to change the statement about the temporal resolution of STIS, from "125 milliseconds" to "125 microseconds". 488. 8 January 2001 gilib Bernie The procedure gi_upuser.x, which was recently added to gilib, was sometimes updating the user area incorrectly. The problem was caused by asking the fits kernel routine to update the user area in place. The routine now copies the user area to a new buffer and passes a pointer to the buffer to the fits kernel routine. 487. 5 January 2001 calstis Phil Calstis version 2.9a was installed. The modified files are as follows: stisversion.h is "2.9a (04-January-2001)". A new subscale argument was added to the calling sequence for CalStis6 in cs0/calstis0.c. This same argument was added (by Ivo) to the calls for CalStis6Std in calstis6idt.c as well. 486. 4 January 2001 tbtables Phil Changes were made in order to make it a little faster to add rows to the end of a FITS table. The modified files are tbtables.h, underscore.h, tbcdef.x, tbfwer.x, tbtopn.x, tbtopns.x, tbfxff.c. The main changes were to tbfwer.x, which writes new rows of undefined values. New interface routines to CFITSIO functions were added to tbfxff.c (and underscore.h): fsgtbb and fsptbb read or write bytes without interpretation, and these are what tbfwer now calls for new rows. For the first new row, undefined values are written to all the columns, and then that row is read back into a local buffer (the INDEF buffer); for subsequent new rows, that INDEF buffer is written to fill out the new space. This ensures that columns that have not been explicitly written to will have the appropriate undefined value, rather than zero. 485. 3 January 2001 ttools Phil Tcopy.x and tstat.x were modified to improve the handling of I/O redirection. They now make use of $nargs to help decide how to make the correspondence between command-line arguments and task parameters. The input table name can be omitted completely if the input is redirected; that is, the second argument (output table for tcopy, column name for tstat) can be given without the need for a place holder for the input table name. If tcopy.outtable is specified but the output is also redirected, the output table will be tcopy.outtable, and the redirected text will contain only the verbose output. 484. 3 January 2001 calstis Phil Calstis version 2.9 was installed (some of it on 29 Nov 2000, and the rest on 20 Dec 2000). The modified files are as follows: stisversion.h is "2.9 (18-December-2000)". lib/interp1d.c was modified so that it now uses linear interpolation instead of cubic interpolation. Mkpkg in cs0 and cs6 were modified to include a test on whether the machine type is Tru64 (MACH eq "alpha"), and if so, then -non_shared will be added to the link statement. This is needed in order to allow malloc to allocate more than 256 Mb of memory, which is now done in calstis6 for the sc2dcorr step. In cs0/calstis0.c, the new calibration switch sc2dcorr was added to the calling sequence for calstis6. This switch is now gotten by cs0/getflags.c, and if the switch is perform, cs0/sciflags.c adds seven new reference files to the list to be checked for existence. cs0/sciflags.c was modified so it does not check for the existence of the MOFFTAB for x1dcorr. In cs1/photmode.c, the value of OPT_ELEM is normally appended to the PHOTMODE string. OPT_ELEM is not appended, however, if it's equal to "MIRROR". This test was modified so that OPT_ELEM is not appended if the first three letters are "MIR". cs4/invert.c was modified to include a check on whether there are any pixels that are not flagged as bad. cs4/getgrpinfo4.c was modified to filter out DATAMASKED (behind occulting bar), HOTPIX, and SMALLBLEM from sdqflags. Spatialshift.c and waveshift.c used to remove DATAMASKED themselves, but now they no longer do so, since it is now removed in getgrpinfo4. cs4/mkpkg was modified to remove ../stisdq.h as a dependence for spatialshift.c and waveshift.c. cs6/getkeyinfo6.c and cs7/getkeyinfo7.c were modified to append "E1" to the value of the APERTURE keyword if that string was present on PROPAPER and no lamp was on (i.e. not a wavecal). This is for a CCD "pseudo-aperture." cs6/getextract.c was modified to include a test on spectral order number within the loop over rows. If sporder is equal to one, we break out of the loop after finding one matching row. This is essentially the same change that was made to cs6/getsdc6.c and cs7/getsdc.c, and it is needed for the case that the aperture is one of the CCD "pseudo-apertures." cs6/newextract.c was modified to correct an error message to refer to XTRACTAB instead of the SDC table. cs6/cs6.c passes a new sc2dcorr argument to calstis6, which was modified to accept it rather than getting the value from the header. cs6/calstis6.c was modified to include a check on whether x2dcorr had been performed on the input file; if so the function returns an error. There were a number of other changes to cs6 pertaining to optimal extraction, which should not affect regular processing. 483. 20 Dec 2000 gflib Bernie I fixed two problems in the library. Problem one is that the fits kernel does not allow a header card in the extension to duplicate a card in the primary header. Problem two is that changes made to the primary header while an extension is open are lost if other changes are made to the primary header when a subsequent extension is opened. The solution to the first problem was to modify the comment field of the duplicate keyword in the extension. This keeps the code in the fits kernel which culls cards in the primary header from removing the duplicate card in extension. A new function in gifixcmt.x adds an asterisk to the end of the comment field if not already present. Gfsplitua.x was modified to call this new function. In order to support the logic which the new version of gfsplitua requires, gfhash.x was modified by adding an integer field (the mark field) and two procedures to get and set it. The cause of the second problem is that the fits kernel updates an image opened in new copy mode with the contents of the template image when each extension is opened. This wipes out the changes to the primary header made when the previous extension was opened. The work around for this problem lies in the fact that the cache header for the image contains the updated contents of the primary header. By updating the user area with the cache header after the image is opened in new copy mode, the changes to the primary header are restored. The change requires the new procedure in gilib, gi_upuser.x and also a modification to gf_opengr.x 482. 20 Dec 2000 gilib Bernie I added the function gi_upuser.x to gilib. It restores consistency between the fits cache in the fits desciptor and the image user area in the image descriptor. It does this by calling the internal fxf library procedure fxf_merge_w_ua. This is an interface violation, but then, so is everything else in gilib. 481. 18 Dec 2000 tools/epoch JC Hsu Add three output parameters: year (int), month (int), and day of month (double, includes fraction of the day). This will make the user easier to construct date strings of custom format. Files edited: tools$epoch.par and tools$epoch/epoch_back.x 480. 18 Dec 2000 tools/epoch JC Hsu Fix a bug in from_mjd.x which gives wrong Julian calendar date for Dec 31 (OS) on leap years. For example: st> epoch 12-31-2000 cal=os 13 Jan 2001 00:00:00.00000 SAT 1 Jan 2000 00:00:00.00000 (Julian calendar) where the second line should be 31 Dec 2000. Since this option (Julian calendar) is rarely used, and it only affects one day per 4 years, it probably have caused little damage. 479. 12 Dec 2000 hst_calib$stis Ivo Added new task sc2dref in support of scattered light correction algorithm. Added new "algorithm" task parameter in x1d task. 478. 04 Dec 2000 fos$gimpcor Michele Modified all of the 'gimpcor' files which contain the CONFG1 common block. The common block had been modified (March 1997) to have an additional variable, KYDPLY, in the 'calfos' software. However, the modification was not done in the 'gimpcor' source which links to the fos.a file. 'Gimpcor' was failing during processing. Rebuilt and tested the new source. 477. 29 Nov 2000 analysis$fitting Ivo The constant used to compute Gaussian functions was in error, albeit small (about 2%). Fixed it. 476. 22 Nov 2000 stlocal/caltwp2 JC Hsu Fixed the following and relabel the new version to be 2.1.2: (1) When the LRF (linear ramp filter) is used, the PHOTMODE keyword is now correctly populated and the PHOTFLAM keyword correctly calculated/populated. (2) The *_c1f.fits file now has the correct FILENAME keyword. I also clean up some comments and indentation inconsistencies. Files been edited are: u_phot.x u_proc.x u_init.x t_caltwp2.x u_util.x 475. 17 Nov 2000 stlocal/testwfpc JC Hsu Modify u_phot.x to avoid a problem generated in the c3t table in FITS format. The problem is that the first column only has every other rows it is supposed to have, i.e. the 3rd row becoms the 2nd row, the 5th row becomes the 3rd and the bottom half rows are all zeros. This bug is from the cfitsio library and is now fixed in the newest version of cfitsio. But the newest cfitsio is not installed here yet. The modification in u_phot.x is to initialize all columns at the beginning, instead of at each extension loop. 474. 21 November 2000 stxtools Bernie A change similar to that made to gflib was made to tpparse.x. It now adds an extension to an image name without any extension by searching for an existing file with the same root name if def_count is less than or equal to zero or by using the value of the environment variable imtype if def_count is greater than zero. 473. 21 November 2000 gflib Bernie The gf library offers gf_map() as a drop in replacement for immap() that mimics its functionality while also allowing fits and geis images to be treated identically. A user reported that gf_map() was not handling image names without extensions the same as immap(). I added a new procedure in gfgetext.x that generates an extension by extracting it from the input image name or generating it when it is absent. It generates the extension by using the value of the iraf environment variable imtype if the image is opened with NEW_COPY or NEW_FILE access modes or by searching for an existing file with the same root name if the image is opened in another mode. The files gfprimary.x, gfimname.x, gfimtype.x, gf_map.x, and gfextend.x were modified to call the new function in gfgetext.x. 472. 20 November 2000 ttools$trebin Phil A test was added to trebin.x to make sure 'step' is not zero, unless 'start' and 'end' are the same. This is because we divide by the step size in order to determine how many output rows there should be. 471. 20 November 2000 cfitsio Phil CFITSIO version 2.1 was installed in tables$lib/tbtables/cfitsio/. fitsio.h and longnam.h were copied to tables$lib/, replacing the corresponding files from the previous release of CFITSIO. The following files that were previously in the CFITSIO directory have been deleted: cfitsio.dsp, cfitsio.dsw, cookbook.dsp, make.com The following files have been added to the CFITSIO directory. Note that none of these is needed for the tables package itself; they are included to make this a complete CFITSIO distribution: Licence.txt, README.MacOS, Readme.win32, cfitsiohtml.tar.gz, fitsiohtml.tar.gz, make_gfloat.com, makefile.bc, makefile.vcc, cookbook.f, testf77.std, testprog.std 470. 16 November 2000 gflib Bernie The ROOTNAME problem was not fixed with the change mentioned on 17 October. Instead I added code that checks for keywords stored in the user area more than once. I assume the first mention goes to the primary header and the second to the extension. This works for the current organization of the user area in fits files. To implement this checking, I wrote a set of procedures that implement a hash table. These are in the new file gfhash.x. The existing code was retrofitted to use hash tables as well. This eliminated the need for gfsearchdb.x, which implemented a simpler linear search. The two files gfhash.x and gfboth.x were added. Gfsearchdb.x was eliminated. Files gfcopypri.x, gfsplitua.x, gfchkkkey.x, gfmakedb.x, and gffreedb.x ere modified. 469. 8 November 2000 synphot Bernie I modified the default value of the grftable in the parameter files of grafcheck, graflist, and grafplot to agree the the value in refdata, mtab$*_tmg.fits<. 468. 8 November 2000 gflib Bernie Gf_map, the call which is intended as a drop in replacement for immap differed from it in one important respect. If opening a fits image in NEW_COPY mode, it closes and reopens the template image. This led to a nasty bug in imcalc. I have modified the code so the template image is unchanged. The affected files are gfprimary.x, gf_map.x, gfbuilddb.x and gfdb.x. 467. 8 November 2000 gilib,gflib Bernie I made modifications to gilib and gflib to fix calling sequence mismatches found by spplint. Files gi_ggpv.x and gistf_setup.x in gilib and gfmergegpb.x in gflib were affected. 466. 2 November 2000 ttools$tprint Phil The par file for tprint had an upper limit of 160 for pwidth, but there was no such limit in the code. I think this was a relic of the time when SZ_LINE was 161. This upper limit has now been removed, so a huge value of pwidth can be specified. However, there was a limit of 52 (MAXCOLS) on the number of columns that could be printed on one line. tprplain.x has been modified to remove that restriction. (The limit of 52 is still in effect for latex or tex output, however.) 465. 2 November 2000 ttools$tdump Phil The default value and lower limit for tdump.pwidth has been changed to -1, and tdump.x was modified to interpret a value less than +1 to mean that checking of the page width should be disabled, so each table row will be written to one line of the ascii output file. The description of pwidth in the help file was also modified. 464. 1 November 2000 stis.calstis Phil The files calstis$cs6/getsdc6.c and calstis$cs7/getsdc.c (and the version stisversion.h) were modified. cs7/getsdc.c now uses the APERTURE column, if it exists, as an additional selection criterion for the row. Both the cs6 and cs7 versions now quit searching for matching rows after finding one match if the grating used was first order (more than one row should match for echelle data). 463. 30 October 2000 synphot.calcphot Bernie A user reported that calcphot exited with an error exit when run with a naked observation mode string. (One without the enclosing band() function.) The problem probably originated from the rewrite in the Spetember 20th version. I fixed the problem by adding to calcphot.x a call to exp_rewrite, which encloses naked observation mode strings in a band() function. 462. 17 October 2000 gflib Bernie I updated gfcopypri.x to include TFIELDS and ROOTNAME in the list of header keywords that are always retained in the primary header even if present in the extension. 461. 13 October 2000 stis.inttag Phil The file stis$inttag/inttag.c was modified to add a function append_extension, which appends ".fits" to the output file name if the user-specified name does not end in either ".fits" or ".fit". 460. 21 September 2000 synphot.countrate Bernie Some problems were encountered when running calcphot using the acs,prism mode with a one angstrom wide emission line. The problems were caused by having a wavelength set whose sample points lay entirely within one pixel of the resampled output. This threw the synphot interpolation function a problem it could not handle. I resolved the problem by making the wavelength set the union of the bandpass and spectrum sets rather than the intersection. This required a small modification to getwavelen.x in newlib. Testing also showed that the undersampling in the acs,prism mode affected the computation of the pivot wavelength and fwhm of the bandpass. So I moved these calculations before the resampling. This affected countrate.x. 459. 20 September 2000 synphot.calcphot Bernie I modified calcphot so that the calculation of the wavelength set is computed from the observation mode expression before it is possibly broken into two parts along the minus sign. Under the new wavelength set generator, using the two parts to calculate the wavelength set gets the interesction of the wavelength set for the two observation modes. The change involved modifications to calcphot.x and photband.x. 458. 19 September 2000 ttools.tmatch Bernie Tmatch was not calculating matches correctly when the spherical correction was turned on. This was due to a problem in the stopping criterion for the search. The stopping criterion assumed that the projection of the distance between objects onto the searching axis was monotonic on either side of the closest approach. This was not true if the spherical correction was applied. The fix was to use the projection without the spherical correction as the stopping criterion. The fix affects the files getmatch.x and getnorm.x. 457. 18 September 2000 stsdaslib$synphot Bernie I added calcrange.x back to the synphot library, as it was called from the cvos library. The new version calls the functions in synwave to generate the wavelength range. A new procedure, syw_limits, was added to synwave.x to support calcrange. 456. 8 September 2000 ttools$thedit Phil The thedit task was modified (t_thedit.x, thedit.hlp, and just the Version in thedit.par). The messages printed when show=yes now include the new parameter value (and the old value, when updating an existing keyword). In order to set a keyword value to "," or ".", the value must now be specified as "\," or "\." respectively. Requiring "," to be escaped was added as protection against accidentally typing "," instead of ".", which could have very serious consequences. 455. 8 September 2000 inttag Phil Inttag.c was modified to fix a bug, and the Version parameter in inttag.cl was updated. The bug is that when integrating counts into a low-res output image, rows with AXIS1 = 0 were included. (There can be such rows because of the Doppler correction; AXIS1 is the high-res pixel coordinate in the dispersion direction.) An input AXIS1 = 0 value was changed to -1 for zero-indexing, and when that was divided by 2 to convert to low-res, it was truncated to zero, which was interpreted as being within the image. 454. 5 September 2000 stsdaslib$synphot Bernie I have rewritten the default wavelength set generation on the synphot library. The new version creates a separate wavelength set for each additive term in the synphot expression and merges the resulting sets. The result is that narrow features, such as emission lines created with the em() function are more closely sampled so that the estimate of the flux in these features are more accurate. In addition, the computation of the wavelength range for the renormalization function, rn(), has been modified so that the bandpass that the spectrum is renormalized over is forced into the output range. The bulk of the new code is in a new file, synwave.x. The old procedure, calcrange.x, has been deleted. A procedure formerly in calcrange.x but now called in synwave.x has been broken out into its own file, tabrange.x. Smaller changes have been made to waverange.x and rdwave.x. Compband.x and compspec.x, which used to call calcrange.x, have been modified to call synwave.x. Two files in the synphot package, multiwave.x and getwavelen.x, have also modified to call synwave.x instead of calcrange.x. 453. 31 August 2000 tbtables Phil The recent change (entry 450) to tbfhp.x would not have worked with the SPP/Fortran version of FITSIO, because it does not allow negative values for the precision. The solution is to have two versions of this file, one for CFITSIO (tbfhp.x) and one for SPP FITSIO (a new file tbfhp_f.x), that differ only in the values of the precision. The precision (now specified using macros) is given by positive numbers (14 and 6) in tbfhp_f.x and negative numbers (-15 and -7) in tbfhp.x. In mkpkg, both tbfhp.x and tbfhp_f.x were moved to near the end of the file, with tbfhp_f.x in the "$ifdef (SPPFITSIO)" section and tbfhp.x in the "$else" (i.e. CFITSIO) section. 452. 30 August 2000 tlinear Phil Tlinear.x was modified for the case that a column of weights was specified. If the weight in a row is exactly zero, that row will now be completely excluded when computing the coefficients and the residuals. This will not affect the values of the coefficients, but the "pts in fit" value that is printed will not include rows with zero weight, and the computation of the residuals will be affected. Note that weights are included when computing "chi2", but the "residual rms" and "residual mean" are unweighted averages. 451. 30 Aug 2000 stlocal/testdither JC Hsu Detele the following scripts since they are obsolete or redundant. (1) filename.cl The purpose of this task seems to do the same thing fparse is doing, except not as fancy. Also it does not do it properly when there are several levels of directories. It is not used in any of the cl scripts in dither, so I suggest to retire it. (2) fileroot.cl This is used in deriv.cl (once) and qzap.cl (twice). In all cases, it can be substituted with fparse. I suggest to retire this task as well. (3) backshift.cl This seems to be an older version of avshift.cl. I suggest to purge it. It is not used in any other scipt. (4) driz_bak.cl This seems to be an older version of driz_cr.cl. I suggest to purge it. It is not used in any other script. Also edit qzap.cl and deriv.cl to replace fileroot call with fparse call. 450. 29 August 2000 tbtables Phil In tbfhp.x, subroutines tbfhpd and tbfhpr were modified to change 14 and 6 to -15 and -7, so CFITSIO will use G format for writing floating point header keyword values. 449. 28 August 2000 tbtables Phil The file tbfwer.x was modified to comment out the call to fsirow. Tbfwer (called by tbtwer) appends one or more INDEF rows after the last row of a FITS table. Fsirow is for "inserting" a new row in a FITS table, and with various versions of FITSIO and CFITSIO it has been necessary to call fsirow prior to writing new rows at the end of the table. With the current version of CFITSIO (2.034), it is no longer required. Calling fsirow takes much longer than just writing to the end of the file (though I don't see any reason why this should be the case), so removing the call significantly reduces the CPU time for tasks such as tmerge for large tables. 448. 23 August 2000 calstis Phil The following files were modified: stisversion.h, cs4/spatialshift.c, cs6/do1dx.c, cs6/absflux6.c. Two problems were solved. The first was that under some circumstances calstis4 called malloc to allocate zero bytes. On most systems this was harmless, but on Tru64, malloc returned NULL, so it looked as if there was no memory left. A test was added to check for this case. The second problem (fixed by Ivo) was that the flux calibration in 1-D extraction did not take into account the binning of the input data in the dispersion direction. This factor has now been included. 447. 23 August 2000 tbtables/cfitsio Phil The file iraffits.c in the tables version of cfitsio was modified to correct a bug found by Stephen Walton (see article 2798 in sci.astro.fits). His description is: > A few words of explanation: This is in static routine blsearch, which > returns a pointer to the location of the first blank line before the > given keyword in an already-filled-in FITS header. If the keyword is > the first one in the header, the routine erroneously checked in memory > _before_ the header for 8 blanks in a row, which were there in the HP-UX > version of my test program as luck would have it. The fix: return NULL > if the keyword appears first in the header. 446. 2 Aug 2000 fitsio.strfits Bernie After recompiling fitsio with a new compiler on the Alpha, strfits crashed with a segmentation violation. The problem was traced to a call to tbpsta in tab_decode_card where the table descriptor was undefined. The error probably had not occurred before because the call was part of a compound test and the first part of the test prevented the second part from being evaluated. I modified the test to prevent it from occuring when the table descriptor is undefined. The modified files are strfits/tab_rheader.x and strfits.par, to update the version parameter. 445. 28 July 2000 synphot$data Bernie The stis,prism entries in synphot$data/wavecat.dat were missing the directory name in front of the file name. So I added it. The problem was first reported with respect to the STIS ETC simulator, which calls countrate.