aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore9
-rw-r--r--Makefile.am2
-rw-r--r--Makefile.in813
-rw-r--r--aclocal.m41157
-rw-r--r--bin/.trailer12
-rwxr-xr-xbin/calfuse.csh165
-rwxr-xr-xbin/calfuse.sh142
-rwxr-xr-xbin/calfuse.wavecal130
-rwxr-xr-xbin/cf_make_900_obs.csh193
-rwxr-xr-xbin/cf_make_all.csh487
-rwxr-xr-xbin/cf_make_all_obs.csh555
-rw-r--r--bin/cfsetup.csh31
-rw-r--r--bin/cfsetup.sh20
-rwxr-xr-xbin/idl_obsplot.pl48
-rwxr-xr-xbin/idlplot_rate.pl48
-rwxr-xr-xbin/idlplot_spex.pl48
-rwxr-xr-xbin/listheadbin0 -> 573860 bytes
-rwxr-xr-xbin/listtrabin0 -> 598468 bytes
-rwxr-xr-xcompile347
-rwxr-xr-xconfig.guess1421
-rw-r--r--config.h.in142
-rwxr-xr-xconfig.sub1807
-rwxr-xr-xconfigure18886
-rw-r--r--configure.ac32
-rw-r--r--docs/FIXING_SELINUX_ISSUES84
-rw-r--r--docs/INSTALLING_A_FORTRAN_COMPILER259
-rw-r--r--docs/INSTALLING_CalFUSEv3.2.3215
-rw-r--r--docs/INTRO_TO_CalFUSEv3.2.3385
-rw-r--r--docs/pipeline_status.html3515
-rw-r--r--idl/cf_obsplot.pro334
-rw-r--r--idl/cf_plot_extract3.pro210
-rw-r--r--idl/cf_plot_rate3.pro227
-rw-r--r--idl/cf_plot_rate_linear.pro175
-rw-r--r--idl/fuse_extract.pro154
-rw-r--r--idl/fuse_sic_only.pro159
-rw-r--r--include/calfitsio.h157
-rw-r--r--include/calfuse.h536
-rw-r--r--include/cfitsio/cfortran.h2149
-rw-r--r--include/cfitsio/compress.h212
-rw-r--r--include/cfitsio/drvrsmem.h178
-rw-r--r--include/cfitsio/eval_defs.h147
-rw-r--r--include/cfitsio/eval_tab.h37
-rw-r--r--include/cfitsio/f77_wrap.h277
-rw-r--r--include/cfitsio/fitsio.h1355
-rw-r--r--include/cfitsio/fitsio2.h870
-rw-r--r--include/cfitsio/group.h65
-rw-r--r--include/cfitsio/grparser.h181
-rw-r--r--include/cfitsio/imcompress.h56
-rw-r--r--include/cfitsio/longnam.h476
-rw-r--r--include/cfitsio/pctype.h155
-rw-r--r--include/cfitsio/region.h80
-rw-r--r--include/cfitsio/ricecomp.h107
-rw-r--r--include/cfortran.doc2051
-rw-r--r--include/cfortran.h2363
-rw-r--r--include/cfortran.h.3.92149
-rw-r--r--include/compress.h212
-rw-r--r--include/drvrsmem.h178
-rw-r--r--include/eval_defs.h147
-rw-r--r--include/eval_tab.h37
-rw-r--r--include/f77_wrap.h277
-rw-r--r--include/fitsio.h1355
-rw-r--r--include/fitsio2.h870
-rw-r--r--include/fusebuf.h34
-rw-r--r--include/group.h65
-rw-r--r--include/grparser.h181
-rw-r--r--include/imcompress.h56
-rw-r--r--include/longnam.h476
-rw-r--r--include/pctype.h155
-rw-r--r--include/region.h80
-rw-r--r--include/ricecomp.h107
-rw-r--r--include/sgp4.h62
-rw-r--r--include/slalib.h418
-rw-r--r--include/slamac.h100
-rwxr-xr-xinstall-sh501
-rw-r--r--ltmain.sh11140
l---------m4/libtool.m41
l---------m4/ltoptions.m41
l---------m4/ltsugar.m41
l---------m4/ltversion.m41
l---------m4/lt~obsolete.m41
-rwxr-xr-xmissing215
-rw-r--r--parmfiles/bchr1a003.fitbin0 -> 14400 bytes
-rw-r--r--parmfiles/bchr1b003.fitbin0 -> 14400 bytes
-rw-r--r--parmfiles/bchr2a003.fitbin0 -> 14400 bytes
-rw-r--r--parmfiles/bchr2b003.fitbin0 -> 14400 bytes
-rw-r--r--parmfiles/master_calib_file.dat453
-rw-r--r--parmfiles/parm1a015.fit1
-rw-r--r--parmfiles/parm1b015.fit1
-rw-r--r--parmfiles/parm2a015.fit1
-rw-r--r--parmfiles/parm2b015.fit1
-rw-r--r--parmfiles/scrn1a015.fit1
-rw-r--r--parmfiles/scrn1b015.fit1
-rw-r--r--parmfiles/scrn2a015.fit1
-rw-r--r--parmfiles/scrn2b015.fit1
-rw-r--r--src/Makefile.Linux.orig138
-rw-r--r--src/Makefile.Linux64.orig113
-rw-r--r--src/Makefile.MacOSX.orig143
-rw-r--r--src/Makefile.Solaris.orig137
-rw-r--r--src/Makefile.am1
-rw-r--r--src/Makefile.in619
-rw-r--r--src/Makefile.orig.orig137
-rw-r--r--src/analysis/Makefile.Linux.orig142
-rw-r--r--src/analysis/Makefile.Linux64.orig141
-rw-r--r--src/analysis/Makefile.MacOSX.orig145
-rw-r--r--src/analysis/Makefile.Solaris.orig147
-rw-r--r--src/analysis/Makefile.orig.orig147
-rw-r--r--src/analysis/bpm_combine.c548
-rw-r--r--src/analysis/cf_arith.c2154
-rw-r--r--src/analysis/cf_coadd.c192
-rw-r--r--src/analysis/cf_combine.c544
-rwxr-xr-xsrc/analysis/cf_make_900_obs.csh193
-rw-r--r--src/analysis/cf_make_all_exp.c91
-rwxr-xr-xsrc/analysis/cf_make_all_obs.csh555
-rw-r--r--src/analysis/cf_nvo.c497
-rw-r--r--src/analysis/cf_pack.c270
-rw-r--r--src/analysis/cf_reflux.c148
-rw-r--r--src/analysis/cf_ttag_to_hist.c463
-rw-r--r--src/analysis/cf_wrspec7.c58
-rw-r--r--src/analysis/cf_wrspec_cf2.c120
-rw-r--r--src/analysis/cf_xcorr.c303
-rw-r--r--src/analysis/extract_jitter.c198
-rw-r--r--src/analysis/get_shift.c164
-rw-r--r--src/analysis/gethmjd.c98
-rw-r--r--src/analysis/idf_combine.c945
-rw-r--r--src/analysis/idf_cut.c977
-rw-r--r--src/analysis/idf_screen.c339
-rw-r--r--src/analysis/mjd2hjd.c129
-rw-r--r--src/analysis/modhead.c114
-rw-r--r--src/analysis/remove_target_orbital_motion.c503
-rw-r--r--src/analysis/ttag_combine.c520
-rw-r--r--src/analysis/ttag_lightcurve.c398
-rw-r--r--src/analysis/ttag_lightcurve_channel_sum.c183
-rw-r--r--src/analysis/ttag_lightcurve_combine.c182
-rw-r--r--src/analysis/ttag_lightcurve_mjd2hmjd.c151
-rw-r--r--src/analysis/ttag_lightcurve_periodogram.c294
-rw-r--r--src/cal/geom/Makefile.orig.orig43
-rwxr-xr-xsrc/cal/geom/make_geom_filebin0 -> 35004 bytes
-rw-r--r--src/cal/geom/make_geom_file.c185
-rw-r--r--src/cal/get_tle/GetTLE.classbin0 -> 2897 bytes
-rw-r--r--src/cal/get_tle/GetTLE.java110
-rwxr-xr-xsrc/cal/get_tle/add_tle.pl182
-rw-r--r--src/cal/get_tle/check_tle.dat266
-rwxr-xr-xsrc/cal/get_tle/check_tle.pl100
-rw-r--r--src/cal/get_tle/check_tle.pro73
-rwxr-xr-xsrc/cal/get_tle/get_tle.pl148
-rwxr-xr-xsrc/cal/get_tle/get_tle.pl.OIG148
-rwxr-xr-xsrc/cal/get_tle/get_tle.pl.orig144
-rwxr-xr-xsrc/cal/get_tle/get_tle.pl.space-track148
-rwxr-xr-xsrc/cal/get_tle/make_cvzramtool.pl215
-rwxr-xr-xsrc/cal/get_tle/make_orbit.pl233
-rwxr-xr-xsrc/cal/get_tle/test_get_tle.pl148
-rwxr-xr-xsrc/cal/get_tle/test_tle.csh50
-rw-r--r--src/cal/get_tle/tmp/FUSE.OLD5205
-rw-r--r--src/cal/get_tle/tmp/FUSE.TLE5205
-rw-r--r--src/cal/get_tle/tmp/FUSE.TLE.NEW15
-rw-r--r--src/cal/get_tle/tmp/FUSE.TLE.awf4419
-rw-r--r--src/cal/get_tle/tmp/FUSE.TLE.kruk4578
-rwxr-xr-xsrc/cal/get_tle/tmp/add_tle.pl182
-rwxr-xr-xsrc/cal/get_tle/tmp/check_tle.pl100
-rw-r--r--src/cal/get_tle/tmp/five.tle.orig17
-rw-r--r--src/cal/get_tle/tmp/get_tle.logfile122
-rwxr-xr-xsrc/cal/get_tle/tmp/get_tle.pl148
-rwxr-xr-xsrc/cal/get_tle/tmp/make_cvzramtool.pl215
-rwxr-xr-xsrc/cal/get_tle/tmp/make_orbit.pl233
-rwxr-xr-xsrc/cal/get_tle/tmp/test_get_tle.pl148
-rwxr-xr-xsrc/cal/get_tle/tmp/test_tle.csh50
-rwxr-xr-xsrc/cal/get_tle/tmp/update_tle.csh55
-rwxr-xr-xsrc/cal/get_tle/update_tle.csh57
-rw-r--r--src/cal/jitter/Makefile.Linux.orig43
-rw-r--r--src/cal/jitter/Makefile.Linux64.orig42
-rw-r--r--src/cal/jitter/Makefile.MacOSX.orig46
-rw-r--r--src/cal/jitter/Makefile.Solaris.orig50
-rw-r--r--src/cal/jitter/Makefile.orig.orig50
-rw-r--r--src/cal/jitter/cf_jitter.c1239
-rw-r--r--src/cal/jitter/cf_jitter_diag.c916
-rw-r--r--src/cal/parm/Makefile.orig.orig52
-rw-r--r--src/cal/parm/make_parm_file.c109
-rw-r--r--src/cal/saa/Makefile.orig.orig19
-rw-r--r--src/cal/saa/make_saa_file.c81
-rw-r--r--src/cal/screen/Makefile.orig.orig28
-rwxr-xr-xsrc/cal/screen/make_screen_filebin0 -> 11700 bytes
-rw-r--r--src/cal/screen/make_screen_file.c122
-rwxr-xr-xsrc/configure.linux.orig68
-rwxr-xr-xsrc/configure.linux64.orig74
-rwxr-xr-xsrc/configure.macosx.orig78
-rwxr-xr-xsrc/configure.solaris.orig98
-rw-r--r--src/fes/Makefile.Linux.orig44
-rw-r--r--src/fes/Makefile.Linux64.orig43
-rw-r--r--src/fes/Makefile.Solaris.orig44
-rw-r--r--src/fes/Makefile.orig.orig44
-rw-r--r--src/fes/cf_calfes.c151
-rw-r--r--src/fes/cf_calfes.h10
-rw-r--r--src/fes/cf_cp_hdr.c71
-rw-r--r--src/fes/cf_fes_apply_bias.c98
-rw-r--r--src/fes/cf_fes_apply_flat.c67
-rw-r--r--src/fes/cf_fes_apply_mask.c56
-rw-r--r--src/fes/cf_fes_cal.c115
-rw-r--r--src/fes/cf_fes_get_cal_image.c71
-rw-r--r--src/fes/cf_fes_init.c294
-rw-r--r--src/fes/cf_fes_read.c76
-rw-r--r--src/fes/cf_fes_write.c60
-rw-r--r--src/fes/cf_limbang.c100
-rw-r--r--src/fuv/Makefile.Linux.orig75
-rw-r--r--src/fuv/Makefile.Linux64.orig74
-rw-r--r--src/fuv/Makefile.MacOSX.orig76
-rw-r--r--src/fuv/Makefile.Solaris.orig75
-rw-r--r--src/fuv/Makefile.orig.orig75
-rw-r--r--src/fuv/cf_assign_wavelength.c178
-rw-r--r--src/fuv/cf_bad_pixels.c1001
-rw-r--r--src/fuv/cf_convert_to_farf.c268
-rw-r--r--src/fuv/cf_countmap.c541
-rw-r--r--src/fuv/cf_extract_spectra.c336
-rw-r--r--src/fuv/cf_flux_calibrate.c173
-rw-r--r--src/fuv/cf_gainmap.c610
-rw-r--r--src/fuv/cf_hist_init.c653
-rw-r--r--src/fuv/cf_remove_motions.c316
-rw-r--r--src/fuv/cf_screen_photons.c298
-rw-r--r--src/fuv/cf_ttag_init.c594
-rw-r--r--src/libcf/Makefile.Linux.orig152
-rw-r--r--src/libcf/Makefile.Linux64.orig151
-rw-r--r--src/libcf/Makefile.MacOSX.orig152
-rw-r--r--src/libcf/Makefile.Solaris.orig152
-rw-r--r--src/libcf/Makefile.orig.orig152
-rw-r--r--src/libcf/calfits.c658
-rw-r--r--src/libcf/cf_active_region.c90
-rw-r--r--src/libcf/cf_apply_dead_time.c142
-rw-r--r--src/libcf/cf_apply_filters.c177
-rw-r--r--src/libcf/cf_astig_farf.c144
-rw-r--r--src/libcf/cf_astigmatism.c198
-rw-r--r--src/libcf/cf_cal_file.c84
-rw-r--r--src/libcf/cf_calculate_y_centroid.c289
-rw-r--r--src/libcf/cf_calculate_ycent_motion.c152
-rw-r--r--src/libcf/cf_check_digitizer.c101
-rw-r--r--src/libcf/cf_convert_to_ergs.c182
-rw-r--r--src/libcf/cf_count_rate_y_distort.c157
-rw-r--r--src/libcf/cf_dispersion.c85
-rw-r--r--src/libcf/cf_doppler_and_heliocentric.c87
-rw-r--r--src/libcf/cf_electronics_dead_time.c104
-rw-r--r--src/libcf/cf_error_msg.c263
-rw-r--r--src/libcf/cf_extraction_limits.c137
-rw-r--r--src/libcf/cf_fes_proc_check.c94
-rw-r--r--src/libcf/cf_fes_proc_update.c68
-rw-r--r--src/libcf/cf_fifo_dead_time.c164
-rw-r--r--src/libcf/cf_find_spectra.c396
-rw-r--r--src/libcf/cf_fpa_position.c231
-rw-r--r--src/libcf/cf_fuv_init.c592
-rw-r--r--src/libcf/cf_geometric_distort.c145
-rw-r--r--src/libcf/cf_grating_motion.c432
-rw-r--r--src/libcf/cf_header_io.c110
-rw-r--r--src/libcf/cf_identify_channel.c201
-rw-r--r--src/libcf/cf_idf_io.c161
-rw-r--r--src/libcf/cf_ids_dead_time.c109
-rw-r--r--src/libcf/cf_init_support.c1344
-rw-r--r--src/libcf/cf_make_mask.c175
-rw-r--r--src/libcf/cf_make_wave_array.c147
-rw-r--r--src/libcf/cf_mirror_motion.c189
-rw-r--r--src/libcf/cf_modify_hist_pha.c91
-rw-r--r--src/libcf/cf_modify_hist_times.c83
-rw-r--r--src/libcf/cf_nint.c47
-rw-r--r--src/libcf/cf_optimal_extraction.c551
-rw-r--r--src/libcf/cf_pha_x_distort.c107
-rw-r--r--src/libcf/cf_proc_check.c124
-rw-r--r--src/libcf/cf_proc_update.c97
-rw-r--r--src/libcf/cf_read_fpa_pos.c82
-rw-r--r--src/libcf/cf_rebin_background.c211
-rw-r--r--src/libcf/cf_rebin_probability_array.c180
-rw-r--r--src/libcf/cf_satellite_jitter.c245
-rw-r--r--src/libcf/cf_scale_bkgd.c956
-rw-r--r--src/libcf/cf_screen_airglow.c70
-rw-r--r--src/libcf/cf_screen_bad_pixels.c122
-rw-r--r--src/libcf/cf_screen_burst.c758
-rw-r--r--src/libcf/cf_screen_high_voltage.c146
-rw-r--r--src/libcf/cf_screen_jitter.c246
-rw-r--r--src/libcf/cf_screen_limb_angle.c87
-rw-r--r--src/libcf/cf_screen_pulse_height.c79
-rw-r--r--src/libcf/cf_screen_saa.c83
-rw-r--r--src/libcf/cf_set_good_time_intervals.c157
-rw-r--r--src/libcf/cf_set_photon_flags.c425
-rw-r--r--src/libcf/cf_set_user_gtis.c100
-rw-r--r--src/libcf/cf_source_aper.c67
-rw-r--r--src/libcf/cf_standard_or_optimal_extraction.c75
-rw-r--r--src/libcf/cf_target_count_rate.c112
-rw-r--r--src/libcf/cf_thermal_distort.c258
-rw-r--r--src/libcf/cf_time_xy_distort.c171
-rw-r--r--src/libcf/cf_timestamp.c78
-rw-r--r--src/libcf/cf_velang.c147
-rw-r--r--src/libcf/cf_write_extracted_spectrum.c226
-rw-r--r--src/libcf/eclipse.c148
-rw-r--r--src/libcf/geod_mag.c40
-rw-r--r--src/libcf/helio_vel.c82
-rw-r--r--src/libcf/lsrd_vel.c51
-rw-r--r--src/libcf/lsrk_vel.c52
-rw-r--r--src/libcf/month_day.c19
-rw-r--r--src/libcf/pole_ang.c64
-rw-r--r--src/libcf/read_tle.c303
-rw-r--r--src/libcf/saa.c74
-rw-r--r--src/libcf/set_orbit_parms.c86
-rw-r--r--src/libcf/sgp4.c426
-rw-r--r--src/libcf/solar_ang.c90
-rw-r--r--src/libcf/space_vel.c46
-rw-r--r--src/libcf/state_geod.c107
-rw-r--r--src/libcf/state_limb.c159
-rw-r--r--src/slalib/Makefile.am187
-rw-r--r--src/slalib/Makefile.in830
-rw-r--r--src/slalib/addet.f67
-rw-r--r--src/slalib/afin.f102
-rw-r--r--src/slalib/airmas.f58
-rw-r--r--src/slalib/altaz.f145
-rw-r--r--src/slalib/amp.f68
-rw-r--r--src/slalib/ampqk.f127
-rw-r--r--src/slalib/aop.f174
-rw-r--r--src/slalib/aoppa.f176
-rw-r--r--src/slalib/aoppat.f45
-rw-r--r--src/slalib/aopqk.f242
-rw-r--r--src/slalib/atmdsp.f121
-rw-r--r--src/slalib/atms.f40
-rw-r--r--src/slalib/atmt.f54
-rw-r--r--src/slalib/av2m.f68
-rw-r--r--src/slalib/bear.f42
-rw-r--r--src/slalib/caf2r.f57
-rw-r--r--src/slalib/caldj.f57
-rw-r--r--src/slalib/calyd.f65
-rw-r--r--src/slalib/cc2s.f53
-rw-r--r--src/slalib/cc62s.f82
-rw-r--r--src/slalib/cd2tf.f55
-rw-r--r--src/slalib/cldj.f78
-rw-r--r--src/slalib/clyd.f101
-rw-r--r--src/slalib/combn.f142
-rw-r--r--src/slalib/cr2af.f58
-rw-r--r--src/slalib/cr2tf.f58
-rwxr-xr-xsrc/slalib/create.com140
-rw-r--r--src/slalib/cs2c.f41
-rw-r--r--src/slalib/cs2c6.f56
-rw-r--r--src/slalib/ctf2d.f56
-rw-r--r--src/slalib/ctf2r.f54
-rw-r--r--src/slalib/daf2r.f55
-rw-r--r--src/slalib/dafin.f163
-rw-r--r--src/slalib/dat.f219
-rw-r--r--src/slalib/dav2m.f67
-rw-r--r--src/slalib/dbear.f42
-rw-r--r--src/slalib/dbjin.f113
-rw-r--r--src/slalib/dc62s.f82
-rw-r--r--src/slalib/dcc2s.f53
-rw-r--r--src/slalib/dcmpf.f140
-rw-r--r--src/slalib/dcs2c.f41
-rw-r--r--src/slalib/dd2tf.f89
-rw-r--r--src/slalib/de2h.f89
-rw-r--r--src/slalib/deuler.f163
-rw-r--r--src/slalib/dfltin.f280
-rw-r--r--src/slalib/dh2e.f83
-rw-r--r--src/slalib/dimxv.f51
-rw-r--r--src/slalib/djcal.f77
-rw-r--r--src/slalib/djcl.f68
-rw-r--r--src/slalib/dm2av.f59
-rw-r--r--src/slalib/dmat.f140
-rw-r--r--src/slalib/dmoon.f641
-rw-r--r--src/slalib/dmxm.f56
-rw-r--r--src/slalib/dmxv.f47
-rw-r--r--src/slalib/dpav.f72
-rw-r--r--src/slalib/dr2af.f58
-rw-r--r--src/slalib/dr2tf.f58
-rw-r--r--src/slalib/drange.f32
-rw-r--r--src/slalib/dranrm.f31
-rw-r--r--src/slalib/ds2c6.f57
-rw-r--r--src/slalib/ds2tp.f67
-rw-r--r--src/slalib/dsep.f48
-rw-r--r--src/slalib/dt.f79
-rw-r--r--src/slalib/dtf2d.f55
-rw-r--r--src/slalib/dtf2r.f53
-rw-r--r--src/slalib/dtp2s.f42
-rw-r--r--src/slalib/dtp2v.f56
-rw-r--r--src/slalib/dtps2c.f91
-rw-r--r--src/slalib/dtpv2c.f83
-rw-r--r--src/slalib/dtt.f46
-rw-r--r--src/slalib/dv2tp.f78
-rw-r--r--src/slalib/dvdv.f27
-rw-r--r--src/slalib/dvn.f46
-rw-r--r--src/slalib/dvxv.f39
-rw-r--r--src/slalib/e2h.f89
-rw-r--r--src/slalib/earth.f111
-rw-r--r--src/slalib/ecleq.f55
-rw-r--r--src/slalib/ecmat.f52
-rw-r--r--src/slalib/ecor.f78
-rw-r--r--src/slalib/eg50.f90
-rw-r--r--src/slalib/el2ue.f301
-rw-r--r--src/slalib/epb.f30
-rw-r--r--src/slalib/epb2d.f30
-rw-r--r--src/slalib/epco.f51
-rw-r--r--src/slalib/epj.f29
-rw-r--r--src/slalib/epj2d.f29
-rw-r--r--src/slalib/eqecl.f55
-rw-r--r--src/slalib/eqeqx.f57
-rw-r--r--src/slalib/eqgal.f79
-rw-r--r--src/slalib/etrms.f62
-rw-r--r--src/slalib/euler.f68
-rw-r--r--src/slalib/evp.f441
-rw-r--r--src/slalib/fitxy.f300
-rw-r--r--src/slalib/fk425.f249
-rw-r--r--src/slalib/fk45z.f165
-rw-r--r--src/slalib/fk524.f257
-rw-r--r--src/slalib/fk52h.f105
-rw-r--r--src/slalib/fk54z.f69
-rw-r--r--src/slalib/fk5hz.f107
-rw-r--r--src/slalib/flotin.f128
-rw-r--r--src/slalib/galeq.f79
-rw-r--r--src/slalib/galsup.f79
-rw-r--r--src/slalib/ge50.f90
-rw-r--r--src/slalib/geoc.f57
-rw-r--r--src/slalib/gmst.f60
-rw-r--r--src/slalib/gmsta.f80
-rw-r--r--src/slalib/gresid.f_alpha_OSF176
-rw-r--r--src/slalib/gresid.f_convex80
-rw-r--r--src/slalib/gresid.f_ix86_Linux74
-rw-r--r--src/slalib/gresid.f_mips74
-rw-r--r--src/slalib/gresid.f_pcm73
-rw-r--r--src/slalib/gresid.f_sun480
-rw-r--r--src/slalib/gresid.f_sun4_Solaris80
-rw-r--r--src/slalib/gresid.f_vax72
-rw-r--r--src/slalib/gresid.f_x86_6474
-rw-r--r--src/slalib/h2e.f83
-rw-r--r--src/slalib/h2fk5.f109
-rw-r--r--src/slalib/hfk5z.f122
-rw-r--r--src/slalib/idchf.f94
-rw-r--r--src/slalib/idchi.f91
-rw-r--r--src/slalib/imxv.f51
-rw-r--r--src/slalib/intin.f176
-rw-r--r--src/slalib/invf.f90
-rw-r--r--src/slalib/kbj.f56
-rw-r--r--src/slalib/m2av.f59
-rw-r--r--src/slalib/makefile.orig1426
-rw-r--r--src/slalib/map.f75
-rw-r--r--src/slalib/mappa.f107
-rw-r--r--src/slalib/mapqk.f143
-rw-r--r--src/slalib/mapqkz.f113
-rwxr-xr-xsrc/slalib/mk437
-rwxr-xr-xsrc/slalib/mk.sv437
-rw-r--r--src/slalib/moon.f362
-rw-r--r--src/slalib/mxm.f55
-rw-r--r--src/slalib/mxv.f47
-rw-r--r--src/slalib/nut.f44
-rw-r--r--src/slalib/nutc.f442
-rw-r--r--src/slalib/oap.f172
-rw-r--r--src/slalib/oapqk.f233
-rw-r--r--src/slalib/obs.f844
-rw-r--r--src/slalib/pa.f46
-rw-r--r--src/slalib/pav.f53
-rwxr-xr-xsrc/slalib/pc.bat75
-rw-r--r--src/slalib/pcd.f59
-rw-r--r--src/slalib/pda2h.f100
-rw-r--r--src/slalib/pdq2h.f98
-rw-r--r--src/slalib/permut.f141
-rw-r--r--src/slalib/pertel.f159
-rw-r--r--src/slalib/pertue.f535
-rw-r--r--src/slalib/planel.f117
-rw-r--r--src/slalib/planet.f707
-rw-r--r--src/slalib/plante.f157
-rw-r--r--src/slalib/pm.f74
-rw-r--r--src/slalib/polmo.f133
-rw-r--r--src/slalib/prebn.f62
-rw-r--r--src/slalib/prec.f79
-rw-r--r--src/slalib/preces.f84
-rw-r--r--src/slalib/precl.f125
-rw-r--r--src/slalib/prenut.f48
-rwxr-xr-xsrc/slalib/put.com38
-rw-r--r--src/slalib/pv2el.f351
-rw-r--r--src/slalib/pv2ue.f150
-rw-r--r--src/slalib/pvobs.f59
-rw-r--r--src/slalib/pxy.f92
-rw-r--r--src/slalib/random.f_alpha_OSF156
-rw-r--r--src/slalib/random.f_convex56
-rw-r--r--src/slalib/random.f_ix86_Linux54
-rw-r--r--src/slalib/random.f_mips54
-rw-r--r--src/slalib/random.f_pcm42
-rw-r--r--src/slalib/random.f_sun456
-rw-r--r--src/slalib/random.f_sun4_Solaris56
-rw-r--r--src/slalib/random.f_vax52
-rw-r--r--src/slalib/random.f_x86_6454
-rw-r--r--src/slalib/range.f33
-rw-r--r--src/slalib/ranorm.f31
-rw-r--r--src/slalib/rcc.f1063
-rw-r--r--src/slalib/rdplan.f183
-rw-r--r--src/slalib/read.me441
-rw-r--r--src/slalib/refco.f70
-rw-r--r--src/slalib/refcoq.f208
-rw-r--r--src/slalib/refro.f374
-rw-r--r--src/slalib/refv.f106
-rw-r--r--src/slalib/refz.f139
-rwxr-xr-xsrc/slalib/rep.bat21
-rw-r--r--src/slalib/rtl_random.c33
-rw-r--r--src/slalib/rverot.f48
-rw-r--r--src/slalib/rvgalc.f69
-rw-r--r--src/slalib/rvlg.f64
-rw-r--r--src/slalib/rvlsrd.f78
-rw-r--r--src/slalib/rvlsrk.f77
-rw-r--r--src/slalib/s2tp.f67
-rw-r--r--src/slalib/sep.f48
-rw-r--r--src/slalib/sla.news40
-rwxr-xr-xsrc/slalib/sla_link1
-rwxr-xr-xsrc/slalib/sla_link_adam1
-rw-r--r--src/slalib/sla_test.f28
-rw-r--r--src/slalib/smat.f141
-rw-r--r--src/slalib/subet.f66
-rw-r--r--src/slalib/sun67.htx/blueball.gifbin0 -> 398 bytes
-rw-r--r--src/slalib/sun67.htx/change_begin.gifbin0 -> 133 bytes
-rw-r--r--src/slalib/sun67.htx/change_begin_right.gifbin0 -> 128 bytes
-rw-r--r--src/slalib/sun67.htx/change_delete.gifbin0 -> 257 bytes
-rw-r--r--src/slalib/sun67.htx/change_delete_right.gifbin0 -> 257 bytes
-rw-r--r--src/slalib/sun67.htx/change_end.gifbin0 -> 135 bytes
-rw-r--r--src/slalib/sun67.htx/change_end_right.gifbin0 -> 127 bytes
-rw-r--r--src/slalib/sun67.htx/contents.xbm12
-rw-r--r--src/slalib/sun67.htx/contents_motif.gifbin0 -> 225 bytes
-rw-r--r--src/slalib/sun67.htx/cross_ref_motif.gifbin0 -> 78 bytes
-rw-r--r--src/slalib/sun67.htx/foot_motif.gifbin0 -> 87 bytes
-rw-r--r--src/slalib/sun67.htx/footnode.html224
-rw-r--r--src/slalib/sun67.htx/greenball.gifbin0 -> 398 bytes
-rw-r--r--src/slalib/sun67.htx/icons.html42
-rw-r--r--src/slalib/sun67.htx/image.gifbin0 -> 195 bytes
-rw-r--r--src/slalib/sun67.htx/images.aux1
-rw-r--r--src/slalib/sun67.htx/images.log1727
-rw-r--r--src/slalib/sun67.htx/images.pl1686
-rw-r--r--src/slalib/sun67.htx/images.tex2852
-rw-r--r--src/slalib/sun67.htx/img1.gifbin0 -> 164 bytes
-rw-r--r--src/slalib/sun67.htx/img10.gifbin0 -> 129 bytes
-rw-r--r--src/slalib/sun67.htx/img100.gifbin0 -> 144 bytes
-rw-r--r--src/slalib/sun67.htx/img101.gifbin0 -> 137 bytes
-rw-r--r--src/slalib/sun67.htx/img102.gifbin0 -> 168 bytes
-rw-r--r--src/slalib/sun67.htx/img103.gifbin0 -> 173 bytes
-rw-r--r--src/slalib/sun67.htx/img104.gifbin0 -> 255 bytes
-rw-r--r--src/slalib/sun67.htx/img105.gifbin0 -> 160 bytes
-rw-r--r--src/slalib/sun67.htx/img106.gifbin0 -> 416 bytes
-rw-r--r--src/slalib/sun67.htx/img107.gifbin0 -> 454 bytes
-rw-r--r--src/slalib/sun67.htx/img108.gifbin0 -> 367 bytes
-rw-r--r--src/slalib/sun67.htx/img109.gifbin0 -> 507 bytes
-rw-r--r--src/slalib/sun67.htx/img11.gifbin0 -> 939 bytes
-rw-r--r--src/slalib/sun67.htx/img110.gifbin0 -> 470 bytes
-rw-r--r--src/slalib/sun67.htx/img111.gifbin0 -> 370 bytes
-rw-r--r--src/slalib/sun67.htx/img112.gifbin0 -> 260 bytes
-rw-r--r--src/slalib/sun67.htx/img113.gifbin0 -> 362 bytes
-rw-r--r--src/slalib/sun67.htx/img114.gifbin0 -> 327 bytes
-rw-r--r--src/slalib/sun67.htx/img115.gifbin0 -> 144 bytes
-rw-r--r--src/slalib/sun67.htx/img116.gifbin0 -> 291 bytes
-rw-r--r--src/slalib/sun67.htx/img117.gifbin0 -> 186 bytes
-rw-r--r--src/slalib/sun67.htx/img118.gifbin0 -> 190 bytes
-rw-r--r--src/slalib/sun67.htx/img119.gifbin0 -> 406 bytes
-rw-r--r--src/slalib/sun67.htx/img12.gifbin0 -> 980 bytes
-rw-r--r--src/slalib/sun67.htx/img120.gifbin0 -> 415 bytes
-rw-r--r--src/slalib/sun67.htx/img121.gifbin0 -> 260 bytes
-rw-r--r--src/slalib/sun67.htx/img122.gifbin0 -> 177 bytes
-rw-r--r--src/slalib/sun67.htx/img123.gifbin0 -> 185 bytes
-rw-r--r--src/slalib/sun67.htx/img124.gifbin0 -> 252 bytes
-rw-r--r--src/slalib/sun67.htx/img125.gifbin0 -> 239 bytes
-rw-r--r--src/slalib/sun67.htx/img126.gifbin0 -> 229 bytes
-rw-r--r--src/slalib/sun67.htx/img127.gifbin0 -> 164 bytes
-rw-r--r--src/slalib/sun67.htx/img128.gifbin0 -> 467 bytes
-rw-r--r--src/slalib/sun67.htx/img129.gifbin0 -> 142 bytes
-rw-r--r--src/slalib/sun67.htx/img13.gifbin0 -> 319 bytes
-rw-r--r--src/slalib/sun67.htx/img130.gifbin0 -> 147 bytes
-rw-r--r--src/slalib/sun67.htx/img131.gifbin0 -> 155 bytes
-rw-r--r--src/slalib/sun67.htx/img132.gifbin0 -> 163 bytes
-rw-r--r--src/slalib/sun67.htx/img133.gifbin0 -> 226 bytes
-rw-r--r--src/slalib/sun67.htx/img134.gifbin0 -> 231 bytes
-rw-r--r--src/slalib/sun67.htx/img135.gifbin0 -> 242 bytes
-rw-r--r--src/slalib/sun67.htx/img136.gifbin0 -> 271 bytes
-rw-r--r--src/slalib/sun67.htx/img137.gifbin0 -> 210 bytes
-rw-r--r--src/slalib/sun67.htx/img138.gifbin0 -> 771 bytes
-rw-r--r--src/slalib/sun67.htx/img139.gifbin0 -> 242 bytes
-rw-r--r--src/slalib/sun67.htx/img14.gifbin0 -> 272 bytes
-rw-r--r--src/slalib/sun67.htx/img140.gifbin0 -> 133 bytes
-rw-r--r--src/slalib/sun67.htx/img141.gifbin0 -> 222 bytes
-rw-r--r--src/slalib/sun67.htx/img142.gifbin0 -> 251 bytes
-rw-r--r--src/slalib/sun67.htx/img143.gifbin0 -> 251 bytes
-rw-r--r--src/slalib/sun67.htx/img144.gifbin0 -> 349 bytes
-rw-r--r--src/slalib/sun67.htx/img145.gifbin0 -> 331 bytes
-rw-r--r--src/slalib/sun67.htx/img146.gifbin0 -> 146 bytes
-rw-r--r--src/slalib/sun67.htx/img147.gifbin0 -> 192 bytes
-rw-r--r--src/slalib/sun67.htx/img148.gifbin0 -> 688 bytes
-rw-r--r--src/slalib/sun67.htx/img149.gifbin0 -> 143 bytes
-rw-r--r--src/slalib/sun67.htx/img15.gifbin0 -> 277 bytes
-rw-r--r--src/slalib/sun67.htx/img150.gifbin0 -> 201 bytes
-rw-r--r--src/slalib/sun67.htx/img151.gifbin0 -> 252 bytes
-rw-r--r--src/slalib/sun67.htx/img152.gifbin0 -> 290 bytes
-rw-r--r--src/slalib/sun67.htx/img153.gifbin0 -> 246 bytes
-rw-r--r--src/slalib/sun67.htx/img154.gifbin0 -> 198 bytes
-rw-r--r--src/slalib/sun67.htx/img155.gifbin0 -> 261 bytes
-rw-r--r--src/slalib/sun67.htx/img156.gifbin0 -> 243 bytes
-rw-r--r--src/slalib/sun67.htx/img157.gifbin0 -> 334 bytes
-rw-r--r--src/slalib/sun67.htx/img158.gifbin0 -> 227 bytes
-rw-r--r--src/slalib/sun67.htx/img159.gifbin0 -> 326 bytes
-rw-r--r--src/slalib/sun67.htx/img16.gifbin0 -> 233 bytes
-rw-r--r--src/slalib/sun67.htx/img160.gifbin0 -> 312 bytes
-rw-r--r--src/slalib/sun67.htx/img161.gifbin0 -> 247 bytes
-rw-r--r--src/slalib/sun67.htx/img162.gifbin0 -> 203 bytes
-rw-r--r--src/slalib/sun67.htx/img163.gifbin0 -> 206 bytes
-rw-r--r--src/slalib/sun67.htx/img164.gifbin0 -> 198 bytes
-rw-r--r--src/slalib/sun67.htx/img165.gifbin0 -> 221 bytes
-rw-r--r--src/slalib/sun67.htx/img166.gifbin0 -> 263 bytes
-rw-r--r--src/slalib/sun67.htx/img167.gifbin0 -> 252 bytes
-rw-r--r--src/slalib/sun67.htx/img168.gifbin0 -> 256 bytes
-rw-r--r--src/slalib/sun67.htx/img169.gifbin0 -> 455 bytes
-rw-r--r--src/slalib/sun67.htx/img17.gifbin0 -> 409 bytes
-rw-r--r--src/slalib/sun67.htx/img170.gifbin0 -> 153 bytes
-rw-r--r--src/slalib/sun67.htx/img171.gifbin0 -> 217 bytes
-rw-r--r--src/slalib/sun67.htx/img172.gifbin0 -> 505 bytes
-rw-r--r--src/slalib/sun67.htx/img173.gifbin0 -> 160 bytes
-rw-r--r--src/slalib/sun67.htx/img174.gifbin0 -> 199 bytes
-rw-r--r--src/slalib/sun67.htx/img175.gifbin0 -> 243 bytes
-rw-r--r--src/slalib/sun67.htx/img176.gifbin0 -> 215 bytes
-rw-r--r--src/slalib/sun67.htx/img177.gifbin0 -> 247 bytes
-rw-r--r--src/slalib/sun67.htx/img178.gifbin0 -> 190 bytes
-rw-r--r--src/slalib/sun67.htx/img179.gifbin0 -> 215 bytes
-rw-r--r--src/slalib/sun67.htx/img18.gifbin0 -> 243 bytes
-rw-r--r--src/slalib/sun67.htx/img180.gifbin0 -> 385 bytes
-rw-r--r--src/slalib/sun67.htx/img181.gifbin0 -> 371 bytes
-rw-r--r--src/slalib/sun67.htx/img182.gifbin0 -> 205 bytes
-rw-r--r--src/slalib/sun67.htx/img183.gifbin0 -> 299 bytes
-rw-r--r--src/slalib/sun67.htx/img184.gifbin0 -> 219 bytes
-rw-r--r--src/slalib/sun67.htx/img185.gifbin0 -> 205 bytes
-rw-r--r--src/slalib/sun67.htx/img186.gifbin0 -> 191 bytes
-rw-r--r--src/slalib/sun67.htx/img187.gifbin0 -> 218 bytes
-rw-r--r--src/slalib/sun67.htx/img188.gifbin0 -> 209 bytes
-rw-r--r--src/slalib/sun67.htx/img189.gifbin0 -> 193 bytes
-rw-r--r--src/slalib/sun67.htx/img19.gifbin0 -> 140 bytes
-rw-r--r--src/slalib/sun67.htx/img190.gifbin0 -> 214 bytes
-rw-r--r--src/slalib/sun67.htx/img191.gifbin0 -> 206 bytes
-rw-r--r--src/slalib/sun67.htx/img192.gifbin0 -> 149 bytes
-rw-r--r--src/slalib/sun67.htx/img193.gifbin0 -> 209 bytes
-rw-r--r--src/slalib/sun67.htx/img194.gifbin0 -> 216 bytes
-rw-r--r--src/slalib/sun67.htx/img195.gifbin0 -> 249 bytes
-rw-r--r--src/slalib/sun67.htx/img196.gifbin0 -> 204 bytes
-rw-r--r--src/slalib/sun67.htx/img197.gifbin0 -> 229 bytes
-rw-r--r--src/slalib/sun67.htx/img198.gifbin0 -> 206 bytes
-rw-r--r--src/slalib/sun67.htx/img199.gifbin0 -> 248 bytes
-rw-r--r--src/slalib/sun67.htx/img2.gifbin0 -> 165 bytes
-rw-r--r--src/slalib/sun67.htx/img20.gifbin0 -> 288 bytes
-rw-r--r--src/slalib/sun67.htx/img200.gifbin0 -> 217 bytes
-rw-r--r--src/slalib/sun67.htx/img201.gifbin0 -> 254 bytes
-rw-r--r--src/slalib/sun67.htx/img202.gifbin0 -> 248 bytes
-rw-r--r--src/slalib/sun67.htx/img203.gifbin0 -> 191 bytes
-rw-r--r--src/slalib/sun67.htx/img204.gifbin0 -> 267 bytes
-rw-r--r--src/slalib/sun67.htx/img205.gifbin0 -> 209 bytes
-rw-r--r--src/slalib/sun67.htx/img206.gifbin0 -> 281 bytes
-rw-r--r--src/slalib/sun67.htx/img207.gifbin0 -> 304 bytes
-rw-r--r--src/slalib/sun67.htx/img208.gifbin0 -> 318 bytes
-rw-r--r--src/slalib/sun67.htx/img209.gifbin0 -> 315 bytes
-rw-r--r--src/slalib/sun67.htx/img21.gifbin0 -> 211 bytes
-rw-r--r--src/slalib/sun67.htx/img210.gifbin0 -> 2211 bytes
-rw-r--r--src/slalib/sun67.htx/img211.gifbin0 -> 493 bytes
-rw-r--r--src/slalib/sun67.htx/img212.gifbin0 -> 189 bytes
-rw-r--r--src/slalib/sun67.htx/img213.gifbin0 -> 207 bytes
-rw-r--r--src/slalib/sun67.htx/img214.gifbin0 -> 212 bytes
-rw-r--r--src/slalib/sun67.htx/img215.gifbin0 -> 215 bytes
-rw-r--r--src/slalib/sun67.htx/img216.gifbin0 -> 193 bytes
-rw-r--r--src/slalib/sun67.htx/img217.gifbin0 -> 233 bytes
-rw-r--r--src/slalib/sun67.htx/img218.gifbin0 -> 234 bytes
-rw-r--r--src/slalib/sun67.htx/img219.gifbin0 -> 257 bytes
-rw-r--r--src/slalib/sun67.htx/img22.gifbin0 -> 206 bytes
-rw-r--r--src/slalib/sun67.htx/img220.gifbin0 -> 262 bytes
-rw-r--r--src/slalib/sun67.htx/img221.gifbin0 -> 238 bytes
-rw-r--r--src/slalib/sun67.htx/img222.gifbin0 -> 327 bytes
-rw-r--r--src/slalib/sun67.htx/img223.gifbin0 -> 325 bytes
-rw-r--r--src/slalib/sun67.htx/img224.gifbin0 -> 704 bytes
-rw-r--r--src/slalib/sun67.htx/img225.gifbin0 -> 572 bytes
-rw-r--r--src/slalib/sun67.htx/img226.gifbin0 -> 192 bytes
-rw-r--r--src/slalib/sun67.htx/img227.gifbin0 -> 278 bytes
-rw-r--r--src/slalib/sun67.htx/img228.gifbin0 -> 258 bytes
-rw-r--r--src/slalib/sun67.htx/img229.gifbin0 -> 307 bytes
-rw-r--r--src/slalib/sun67.htx/img23.gifbin0 -> 138 bytes
-rw-r--r--src/slalib/sun67.htx/img230.gifbin0 -> 443 bytes
-rw-r--r--src/slalib/sun67.htx/img231.gifbin0 -> 248 bytes
-rw-r--r--src/slalib/sun67.htx/img232.gifbin0 -> 206 bytes
-rw-r--r--src/slalib/sun67.htx/img233.gifbin0 -> 197 bytes
-rw-r--r--src/slalib/sun67.htx/img234.gifbin0 -> 204 bytes
-rw-r--r--src/slalib/sun67.htx/img235.gifbin0 -> 193 bytes
-rw-r--r--src/slalib/sun67.htx/img236.gifbin0 -> 189 bytes
-rw-r--r--src/slalib/sun67.htx/img237.gifbin0 -> 563 bytes
-rw-r--r--src/slalib/sun67.htx/img238.gifbin0 -> 314 bytes
-rw-r--r--src/slalib/sun67.htx/img239.gifbin0 -> 507 bytes
-rw-r--r--src/slalib/sun67.htx/img24.gifbin0 -> 138 bytes
-rw-r--r--src/slalib/sun67.htx/img240.gifbin0 -> 143 bytes
-rw-r--r--src/slalib/sun67.htx/img241.gifbin0 -> 183 bytes
-rw-r--r--src/slalib/sun67.htx/img242.gifbin0 -> 212 bytes
-rw-r--r--src/slalib/sun67.htx/img243.gifbin0 -> 412 bytes
-rw-r--r--src/slalib/sun67.htx/img244.gifbin0 -> 414 bytes
-rw-r--r--src/slalib/sun67.htx/img245.gifbin0 -> 202 bytes
-rw-r--r--src/slalib/sun67.htx/img246.gifbin0 -> 461 bytes
-rw-r--r--src/slalib/sun67.htx/img247.gifbin0 -> 360 bytes
-rw-r--r--src/slalib/sun67.htx/img248.gifbin0 -> 353 bytes
-rw-r--r--src/slalib/sun67.htx/img249.gifbin0 -> 303 bytes
-rw-r--r--src/slalib/sun67.htx/img25.gifbin0 -> 187 bytes
-rw-r--r--src/slalib/sun67.htx/img250.gifbin0 -> 487 bytes
-rw-r--r--src/slalib/sun67.htx/img251.gifbin0 -> 91 bytes
-rw-r--r--src/slalib/sun67.htx/img252.gifbin0 -> 473 bytes
-rw-r--r--src/slalib/sun67.htx/img253.gifbin0 -> 233 bytes
-rw-r--r--src/slalib/sun67.htx/img254.gifbin0 -> 352 bytes
-rw-r--r--src/slalib/sun67.htx/img255.gifbin0 -> 9320 bytes
-rw-r--r--src/slalib/sun67.htx/img256.gifbin0 -> 253 bytes
-rw-r--r--src/slalib/sun67.htx/img257.gifbin0 -> 115 bytes
-rw-r--r--src/slalib/sun67.htx/img258.gifbin0 -> 286 bytes
-rw-r--r--src/slalib/sun67.htx/img259.gifbin0 -> 335 bytes
-rw-r--r--src/slalib/sun67.htx/img26.gifbin0 -> 312 bytes
-rw-r--r--src/slalib/sun67.htx/img260.gifbin0 -> 209 bytes
-rw-r--r--src/slalib/sun67.htx/img261.gifbin0 -> 255 bytes
-rw-r--r--src/slalib/sun67.htx/img262.gifbin0 -> 530 bytes
-rw-r--r--src/slalib/sun67.htx/img263.gifbin0 -> 489 bytes
-rw-r--r--src/slalib/sun67.htx/img264.gifbin0 -> 398 bytes
-rw-r--r--src/slalib/sun67.htx/img265.gifbin0 -> 306 bytes
-rw-r--r--src/slalib/sun67.htx/img266.gifbin0 -> 232 bytes
-rw-r--r--src/slalib/sun67.htx/img267.gifbin0 -> 404 bytes
-rw-r--r--src/slalib/sun67.htx/img268.gifbin0 -> 396 bytes
-rw-r--r--src/slalib/sun67.htx/img269.gifbin0 -> 286 bytes
-rw-r--r--src/slalib/sun67.htx/img27.gifbin0 -> 165 bytes
-rw-r--r--src/slalib/sun67.htx/img270.gifbin0 -> 376 bytes
-rw-r--r--src/slalib/sun67.htx/img271.gifbin0 -> 468 bytes
-rw-r--r--src/slalib/sun67.htx/img272.gifbin0 -> 352 bytes
-rw-r--r--src/slalib/sun67.htx/img273.gifbin0 -> 272 bytes
-rw-r--r--src/slalib/sun67.htx/img274.gifbin0 -> 378 bytes
-rw-r--r--src/slalib/sun67.htx/img275.gifbin0 -> 452 bytes
-rw-r--r--src/slalib/sun67.htx/img276.gifbin0 -> 263 bytes
-rw-r--r--src/slalib/sun67.htx/img277.gifbin0 -> 379 bytes
-rw-r--r--src/slalib/sun67.htx/img278.gifbin0 -> 342 bytes
-rw-r--r--src/slalib/sun67.htx/img279.gifbin0 -> 343 bytes
-rw-r--r--src/slalib/sun67.htx/img28.gifbin0 -> 383 bytes
-rw-r--r--src/slalib/sun67.htx/img280.gifbin0 -> 354 bytes
-rw-r--r--src/slalib/sun67.htx/img281.gifbin0 -> 267 bytes
-rw-r--r--src/slalib/sun67.htx/img282.gifbin0 -> 349 bytes
-rw-r--r--src/slalib/sun67.htx/img283.gifbin0 -> 337 bytes
-rw-r--r--src/slalib/sun67.htx/img284.gifbin0 -> 242 bytes
-rw-r--r--src/slalib/sun67.htx/img285.gifbin0 -> 165 bytes
-rw-r--r--src/slalib/sun67.htx/img286.gifbin0 -> 525 bytes
-rw-r--r--src/slalib/sun67.htx/img287.gifbin0 -> 168 bytes
-rw-r--r--src/slalib/sun67.htx/img288.gifbin0 -> 522 bytes
-rw-r--r--src/slalib/sun67.htx/img289.gifbin0 -> 215 bytes
-rw-r--r--src/slalib/sun67.htx/img29.gifbin0 -> 279 bytes
-rw-r--r--src/slalib/sun67.htx/img290.gifbin0 -> 354 bytes
-rw-r--r--src/slalib/sun67.htx/img291.gifbin0 -> 220 bytes
-rw-r--r--src/slalib/sun67.htx/img292.gifbin0 -> 342 bytes
-rw-r--r--src/slalib/sun67.htx/img293.gifbin0 -> 288 bytes
-rw-r--r--src/slalib/sun67.htx/img294.gifbin0 -> 224 bytes
-rw-r--r--src/slalib/sun67.htx/img295.gifbin0 -> 241 bytes
-rw-r--r--src/slalib/sun67.htx/img296.gifbin0 -> 203 bytes
-rw-r--r--src/slalib/sun67.htx/img297.gifbin0 -> 292 bytes
-rw-r--r--src/slalib/sun67.htx/img298.gifbin0 -> 143 bytes
-rw-r--r--src/slalib/sun67.htx/img299.gifbin0 -> 308 bytes
-rw-r--r--src/slalib/sun67.htx/img3.gifbin0 -> 281 bytes
-rw-r--r--src/slalib/sun67.htx/img30.gifbin0 -> 135 bytes
-rw-r--r--src/slalib/sun67.htx/img300.gifbin0 -> 400 bytes
-rw-r--r--src/slalib/sun67.htx/img301.gifbin0 -> 209 bytes
-rw-r--r--src/slalib/sun67.htx/img302.gifbin0 -> 1014 bytes
-rw-r--r--src/slalib/sun67.htx/img303.gifbin0 -> 210 bytes
-rw-r--r--src/slalib/sun67.htx/img304.gifbin0 -> 264 bytes
-rw-r--r--src/slalib/sun67.htx/img305.gifbin0 -> 285 bytes
-rw-r--r--src/slalib/sun67.htx/img306.gifbin0 -> 1785 bytes
-rw-r--r--src/slalib/sun67.htx/img307.gifbin0 -> 324 bytes
-rw-r--r--src/slalib/sun67.htx/img308.gifbin0 -> 516 bytes
-rw-r--r--src/slalib/sun67.htx/img309.gifbin0 -> 431 bytes
-rw-r--r--src/slalib/sun67.htx/img31.gifbin0 -> 208 bytes
-rw-r--r--src/slalib/sun67.htx/img310.gifbin0 -> 371 bytes
-rw-r--r--src/slalib/sun67.htx/img311.gifbin0 -> 316 bytes
-rw-r--r--src/slalib/sun67.htx/img312.gifbin0 -> 304 bytes
-rw-r--r--src/slalib/sun67.htx/img313.gifbin0 -> 301 bytes
-rw-r--r--src/slalib/sun67.htx/img314.gifbin0 -> 446 bytes
-rw-r--r--src/slalib/sun67.htx/img315.gifbin0 -> 184 bytes
-rw-r--r--src/slalib/sun67.htx/img316.gifbin0 -> 154 bytes
-rw-r--r--src/slalib/sun67.htx/img317.gifbin0 -> 253 bytes
-rw-r--r--src/slalib/sun67.htx/img318.gifbin0 -> 139 bytes
-rw-r--r--src/slalib/sun67.htx/img319.gifbin0 -> 162 bytes
-rw-r--r--src/slalib/sun67.htx/img32.gifbin0 -> 212 bytes
-rw-r--r--src/slalib/sun67.htx/img320.gifbin0 -> 287 bytes
-rw-r--r--src/slalib/sun67.htx/img321.gifbin0 -> 364 bytes
-rw-r--r--src/slalib/sun67.htx/img322.gifbin0 -> 372 bytes
-rw-r--r--src/slalib/sun67.htx/img323.gifbin0 -> 306 bytes
-rw-r--r--src/slalib/sun67.htx/img324.gifbin0 -> 214 bytes
-rw-r--r--src/slalib/sun67.htx/img325.gifbin0 -> 399 bytes
-rw-r--r--src/slalib/sun67.htx/img326.gifbin0 -> 349 bytes
-rw-r--r--src/slalib/sun67.htx/img327.gifbin0 -> 379 bytes
-rw-r--r--src/slalib/sun67.htx/img328.gifbin0 -> 413 bytes
-rw-r--r--src/slalib/sun67.htx/img329.gifbin0 -> 255 bytes
-rw-r--r--src/slalib/sun67.htx/img33.gifbin0 -> 201 bytes
-rw-r--r--src/slalib/sun67.htx/img330.gifbin0 -> 376 bytes
-rw-r--r--src/slalib/sun67.htx/img34.gifbin0 -> 309 bytes
-rw-r--r--src/slalib/sun67.htx/img35.gifbin0 -> 314 bytes
-rw-r--r--src/slalib/sun67.htx/img36.gifbin0 -> 211 bytes
-rw-r--r--src/slalib/sun67.htx/img37.gifbin0 -> 247 bytes
-rw-r--r--src/slalib/sun67.htx/img38.gifbin0 -> 436 bytes
-rw-r--r--src/slalib/sun67.htx/img39.gifbin0 -> 179 bytes
-rw-r--r--src/slalib/sun67.htx/img4.gifbin0 -> 468 bytes
-rw-r--r--src/slalib/sun67.htx/img40.gifbin0 -> 297 bytes
-rw-r--r--src/slalib/sun67.htx/img41.gifbin0 -> 316 bytes
-rw-r--r--src/slalib/sun67.htx/img42.gifbin0 -> 305 bytes
-rw-r--r--src/slalib/sun67.htx/img43.gifbin0 -> 152 bytes
-rw-r--r--src/slalib/sun67.htx/img44.gifbin0 -> 316 bytes
-rw-r--r--src/slalib/sun67.htx/img45.gifbin0 -> 286 bytes
-rw-r--r--src/slalib/sun67.htx/img46.gifbin0 -> 290 bytes
-rw-r--r--src/slalib/sun67.htx/img47.gifbin0 -> 178 bytes
-rw-r--r--src/slalib/sun67.htx/img48.gifbin0 -> 87 bytes
-rw-r--r--src/slalib/sun67.htx/img49.gifbin0 -> 169 bytes
-rw-r--r--src/slalib/sun67.htx/img5.gifbin0 -> 122 bytes
-rw-r--r--src/slalib/sun67.htx/img50.gifbin0 -> 352 bytes
-rw-r--r--src/slalib/sun67.htx/img51.gifbin0 -> 541 bytes
-rw-r--r--src/slalib/sun67.htx/img52.gifbin0 -> 171 bytes
-rw-r--r--src/slalib/sun67.htx/img53.gifbin0 -> 250 bytes
-rw-r--r--src/slalib/sun67.htx/img54.gifbin0 -> 446 bytes
-rw-r--r--src/slalib/sun67.htx/img55.gifbin0 -> 325 bytes
-rw-r--r--src/slalib/sun67.htx/img56.gifbin0 -> 350 bytes
-rw-r--r--src/slalib/sun67.htx/img57.gifbin0 -> 434 bytes
-rw-r--r--src/slalib/sun67.htx/img58.gifbin0 -> 448 bytes
-rw-r--r--src/slalib/sun67.htx/img59.gifbin0 -> 382 bytes
-rw-r--r--src/slalib/sun67.htx/img6.gifbin0 -> 1072 bytes
-rw-r--r--src/slalib/sun67.htx/img60.gifbin0 -> 410 bytes
-rw-r--r--src/slalib/sun67.htx/img61.gifbin0 -> 1250 bytes
-rw-r--r--src/slalib/sun67.htx/img62.gifbin0 -> 1276 bytes
-rw-r--r--src/slalib/sun67.htx/img63.gifbin0 -> 1246 bytes
-rw-r--r--src/slalib/sun67.htx/img64.gifbin0 -> 1302 bytes
-rw-r--r--src/slalib/sun67.htx/img65.gifbin0 -> 219 bytes
-rw-r--r--src/slalib/sun67.htx/img66.gifbin0 -> 248 bytes
-rw-r--r--src/slalib/sun67.htx/img67.gifbin0 -> 241 bytes
-rw-r--r--src/slalib/sun67.htx/img68.gifbin0 -> 356 bytes
-rw-r--r--src/slalib/sun67.htx/img69.gifbin0 -> 233 bytes
-rw-r--r--src/slalib/sun67.htx/img7.gifbin0 -> 1121 bytes
-rw-r--r--src/slalib/sun67.htx/img70.gifbin0 -> 143 bytes
-rw-r--r--src/slalib/sun67.htx/img71.gifbin0 -> 170 bytes
-rw-r--r--src/slalib/sun67.htx/img72.gifbin0 -> 73 bytes
-rw-r--r--src/slalib/sun67.htx/img73.gifbin0 -> 237 bytes
-rw-r--r--src/slalib/sun67.htx/img74.gifbin0 -> 236 bytes
-rw-r--r--src/slalib/sun67.htx/img75.gifbin0 -> 160 bytes
-rw-r--r--src/slalib/sun67.htx/img76.gifbin0 -> 207 bytes
-rw-r--r--src/slalib/sun67.htx/img77.gifbin0 -> 206 bytes
-rw-r--r--src/slalib/sun67.htx/img78.gifbin0 -> 211 bytes
-rw-r--r--src/slalib/sun67.htx/img79.gifbin0 -> 241 bytes
-rw-r--r--src/slalib/sun67.htx/img8.gifbin0 -> 305 bytes
-rw-r--r--src/slalib/sun67.htx/img80.gifbin0 -> 243 bytes
-rw-r--r--src/slalib/sun67.htx/img81.gifbin0 -> 246 bytes
-rw-r--r--src/slalib/sun67.htx/img82.gifbin0 -> 261 bytes
-rw-r--r--src/slalib/sun67.htx/img83.gifbin0 -> 208 bytes
-rw-r--r--src/slalib/sun67.htx/img84.gifbin0 -> 139 bytes
-rw-r--r--src/slalib/sun67.htx/img85.gifbin0 -> 290 bytes
-rw-r--r--src/slalib/sun67.htx/img86.gifbin0 -> 201 bytes
-rw-r--r--src/slalib/sun67.htx/img87.gifbin0 -> 219 bytes
-rw-r--r--src/slalib/sun67.htx/img88.gifbin0 -> 334 bytes
-rw-r--r--src/slalib/sun67.htx/img89.gifbin0 -> 217 bytes
-rw-r--r--src/slalib/sun67.htx/img9.gifbin0 -> 428 bytes
-rw-r--r--src/slalib/sun67.htx/img90.gifbin0 -> 226 bytes
-rw-r--r--src/slalib/sun67.htx/img91.gifbin0 -> 218 bytes
-rw-r--r--src/slalib/sun67.htx/img92.gifbin0 -> 151 bytes
-rw-r--r--src/slalib/sun67.htx/img93.gifbin0 -> 278 bytes
-rw-r--r--src/slalib/sun67.htx/img94.gifbin0 -> 294 bytes
-rw-r--r--src/slalib/sun67.htx/img95.gifbin0 -> 403 bytes
-rw-r--r--src/slalib/sun67.htx/img96.gifbin0 -> 246 bytes
-rw-r--r--src/slalib/sun67.htx/img97.gifbin0 -> 224 bytes
-rw-r--r--src/slalib/sun67.htx/img98.gifbin0 -> 425 bytes
-rw-r--r--src/slalib/sun67.htx/img99.gifbin0 -> 157 bytes
-rw-r--r--src/slalib/sun67.htx/index_motif.gifbin0 -> 180 bytes
-rw-r--r--src/slalib/sun67.htx/internals.pl1482
-rw-r--r--src/slalib/sun67.htx/invis_anchor.xbm4
-rw-r--r--src/slalib/sun67.htx/labels.pl1482
-rw-r--r--src/slalib/sun67.htx/next_group_motif.gifbin0 -> 259 bytes
-rw-r--r--src/slalib/sun67.htx/next_group_motif_gr.gifbin0 -> 259 bytes
-rw-r--r--src/slalib/sun67.htx/next_motif.gifbin0 -> 172 bytes
-rw-r--r--src/slalib/sun67.htx/next_motif_gr.gifbin0 -> 172 bytes
-rw-r--r--src/slalib/sun67.htx/node1.html65
-rw-r--r--src/slalib/sun67.htx/node10.html75
-rw-r--r--src/slalib/sun67.htx/node100.html110
-rw-r--r--src/slalib/sun67.htx/node101.html132
-rw-r--r--src/slalib/sun67.htx/node102.html149
-rw-r--r--src/slalib/sun67.htx/node103.html170
-rw-r--r--src/slalib/sun67.htx/node104.html208
-rw-r--r--src/slalib/sun67.htx/node105.html166
-rw-r--r--src/slalib/sun67.htx/node106.html207
-rw-r--r--src/slalib/sun67.htx/node107.html188
-rw-r--r--src/slalib/sun67.htx/node108.html156
-rw-r--r--src/slalib/sun67.htx/node109.html168
-rw-r--r--src/slalib/sun67.htx/node11.html102
-rw-r--r--src/slalib/sun67.htx/node110.html200
-rw-r--r--src/slalib/sun67.htx/node111.html104
-rw-r--r--src/slalib/sun67.htx/node112.html107
-rw-r--r--src/slalib/sun67.htx/node113.html109
-rw-r--r--src/slalib/sun67.htx/node114.html107
-rw-r--r--src/slalib/sun67.htx/node115.html115
-rw-r--r--src/slalib/sun67.htx/node116.html116
-rw-r--r--src/slalib/sun67.htx/node117.html92
-rw-r--r--src/slalib/sun67.htx/node118.html146
-rw-r--r--src/slalib/sun67.htx/node119.html188
-rw-r--r--src/slalib/sun67.htx/node12.html75
-rw-r--r--src/slalib/sun67.htx/node120.html190
-rw-r--r--src/slalib/sun67.htx/node121.html118
-rw-r--r--src/slalib/sun67.htx/node122.html170
-rw-r--r--src/slalib/sun67.htx/node123.html122
-rw-r--r--src/slalib/sun67.htx/node124.html104
-rw-r--r--src/slalib/sun67.htx/node125.html107
-rw-r--r--src/slalib/sun67.htx/node126.html157
-rw-r--r--src/slalib/sun67.htx/node127.html159
-rw-r--r--src/slalib/sun67.htx/node128.html187
-rw-r--r--src/slalib/sun67.htx/node129.html175
-rw-r--r--src/slalib/sun67.htx/node13.html489
-rw-r--r--src/slalib/sun67.htx/node130.html140
-rw-r--r--src/slalib/sun67.htx/node131.html106
-rw-r--r--src/slalib/sun67.htx/node132.html117
-rw-r--r--src/slalib/sun67.htx/node133.html111
-rw-r--r--src/slalib/sun67.htx/node134.html102
-rw-r--r--src/slalib/sun67.htx/node135.html319
-rw-r--r--src/slalib/sun67.htx/node136.html258
-rw-r--r--src/slalib/sun67.htx/node137.html247
-rw-r--r--src/slalib/sun67.htx/node138.html116
-rw-r--r--src/slalib/sun67.htx/node139.html117
-rw-r--r--src/slalib/sun67.htx/node14.html112
-rw-r--r--src/slalib/sun67.htx/node140.html148
-rw-r--r--src/slalib/sun67.htx/node141.html107
-rw-r--r--src/slalib/sun67.htx/node142.html108
-rw-r--r--src/slalib/sun67.htx/node143.html133
-rw-r--r--src/slalib/sun67.htx/node144.html310
-rw-r--r--src/slalib/sun67.htx/node145.html279
-rw-r--r--src/slalib/sun67.htx/node146.html255
-rw-r--r--src/slalib/sun67.htx/node147.html278
-rw-r--r--src/slalib/sun67.htx/node148.html256
-rw-r--r--src/slalib/sun67.htx/node149.html135
-rw-r--r--src/slalib/sun67.htx/node15.html230
-rw-r--r--src/slalib/sun67.htx/node150.html202
-rw-r--r--src/slalib/sun67.htx/node151.html111
-rw-r--r--src/slalib/sun67.htx/node152.html145
-rw-r--r--src/slalib/sun67.htx/node153.html120
-rw-r--r--src/slalib/sun67.htx/node154.html131
-rw-r--r--src/slalib/sun67.htx/node155.html110
-rw-r--r--src/slalib/sun67.htx/node156.html323
-rw-r--r--src/slalib/sun67.htx/node157.html203
-rw-r--r--src/slalib/sun67.htx/node158.html102
-rw-r--r--src/slalib/sun67.htx/node159.html145
-rw-r--r--src/slalib/sun67.htx/node16.html121
-rw-r--r--src/slalib/sun67.htx/node160.html98
-rw-r--r--src/slalib/sun67.htx/node161.html93
-rw-r--r--src/slalib/sun67.htx/node162.html93
-rw-r--r--src/slalib/sun67.htx/node163.html166
-rw-r--r--src/slalib/sun67.htx/node164.html184
-rw-r--r--src/slalib/sun67.htx/node165.html176
-rw-r--r--src/slalib/sun67.htx/node166.html428
-rw-r--r--src/slalib/sun67.htx/node167.html232
-rw-r--r--src/slalib/sun67.htx/node168.html276
-rw-r--r--src/slalib/sun67.htx/node169.html275
-rw-r--r--src/slalib/sun67.htx/node17.html205
-rw-r--r--src/slalib/sun67.htx/node170.html111
-rw-r--r--src/slalib/sun67.htx/node171.html115
-rw-r--r--src/slalib/sun67.htx/node172.html101
-rw-r--r--src/slalib/sun67.htx/node173.html121
-rw-r--r--src/slalib/sun67.htx/node174.html126
-rw-r--r--src/slalib/sun67.htx/node175.html129
-rw-r--r--src/slalib/sun67.htx/node176.html100
-rw-r--r--src/slalib/sun67.htx/node177.html152
-rw-r--r--src/slalib/sun67.htx/node178.html111
-rw-r--r--src/slalib/sun67.htx/node179.html107
-rw-r--r--src/slalib/sun67.htx/node18.html135
-rw-r--r--src/slalib/sun67.htx/node180.html184
-rw-r--r--src/slalib/sun67.htx/node181.html122
-rw-r--r--src/slalib/sun67.htx/node182.html201
-rw-r--r--src/slalib/sun67.htx/node183.html109
-rw-r--r--src/slalib/sun67.htx/node184.html117
-rw-r--r--src/slalib/sun67.htx/node185.html168
-rw-r--r--src/slalib/sun67.htx/node186.html144
-rw-r--r--src/slalib/sun67.htx/node187.html378
-rw-r--r--src/slalib/sun67.htx/node188.html220
-rw-r--r--src/slalib/sun67.htx/node189.html160
-rw-r--r--src/slalib/sun67.htx/node19.html160
-rw-r--r--src/slalib/sun67.htx/node190.html137
-rw-r--r--src/slalib/sun67.htx/node191.html91
-rw-r--r--src/slalib/sun67.htx/node192.html95
-rw-r--r--src/slalib/sun67.htx/node193.html93
-rw-r--r--src/slalib/sun67.htx/node194.html91
-rw-r--r--src/slalib/sun67.htx/node195.html114
-rw-r--r--src/slalib/sun67.htx/node196.html137
-rw-r--r--src/slalib/sun67.htx/node197.html171
-rw-r--r--src/slalib/sun67.htx/node198.html167
-rw-r--r--src/slalib/sun67.htx/node199.html174
-rw-r--r--src/slalib/sun67.htx/node2.html85
-rw-r--r--src/slalib/sun67.htx/node20.html320
-rw-r--r--src/slalib/sun67.htx/node200.html168
-rw-r--r--src/slalib/sun67.htx/node201.html215
-rw-r--r--src/slalib/sun67.htx/node202.html254
-rw-r--r--src/slalib/sun67.htx/node203.html187
-rw-r--r--src/slalib/sun67.htx/node204.html127
-rw-r--r--src/slalib/sun67.htx/node205.html92
-rw-r--r--src/slalib/sun67.htx/node206.html125
-rw-r--r--src/slalib/sun67.htx/node207.html119
-rw-r--r--src/slalib/sun67.htx/node208.html92
-rw-r--r--src/slalib/sun67.htx/node209.html147
-rw-r--r--src/slalib/sun67.htx/node21.html264
-rw-r--r--src/slalib/sun67.htx/node210.html177
-rw-r--r--src/slalib/sun67.htx/node211.html232
-rw-r--r--src/slalib/sun67.htx/node212.html171
-rw-r--r--src/slalib/sun67.htx/node213.html181
-rw-r--r--src/slalib/sun67.htx/node214.html189
-rw-r--r--src/slalib/sun67.htx/node215.html87
-rw-r--r--src/slalib/sun67.htx/node216.html110
-rw-r--r--src/slalib/sun67.htx/node217.html92
-rw-r--r--src/slalib/sun67.htx/node218.html91
-rw-r--r--src/slalib/sun67.htx/node219.html184
-rw-r--r--src/slalib/sun67.htx/node22.html119
-rw-r--r--src/slalib/sun67.htx/node220.html96
-rw-r--r--src/slalib/sun67.htx/node221.html158
-rw-r--r--src/slalib/sun67.htx/node222.html113
-rw-r--r--src/slalib/sun67.htx/node223.html139
-rw-r--r--src/slalib/sun67.htx/node224.html617
-rw-r--r--src/slalib/sun67.htx/node225.html143
-rw-r--r--src/slalib/sun67.htx/node226.html212
-rw-r--r--src/slalib/sun67.htx/node227.html230
-rw-r--r--src/slalib/sun67.htx/node228.html696
-rw-r--r--src/slalib/sun67.htx/node229.html65
-rw-r--r--src/slalib/sun67.htx/node23.html278
-rw-r--r--src/slalib/sun67.htx/node24.html213
-rw-r--r--src/slalib/sun67.htx/node25.html103
-rw-r--r--src/slalib/sun67.htx/node26.html123
-rw-r--r--src/slalib/sun67.htx/node27.html122
-rw-r--r--src/slalib/sun67.htx/node28.html128
-rw-r--r--src/slalib/sun67.htx/node29.html140
-rw-r--r--src/slalib/sun67.htx/node3.html76
-rw-r--r--src/slalib/sun67.htx/node30.html103
-rw-r--r--src/slalib/sun67.htx/node31.html114
-rw-r--r--src/slalib/sun67.htx/node32.html115
-rw-r--r--src/slalib/sun67.htx/node33.html128
-rw-r--r--src/slalib/sun67.htx/node34.html129
-rw-r--r--src/slalib/sun67.htx/node35.html142
-rw-r--r--src/slalib/sun67.htx/node36.html122
-rw-r--r--src/slalib/sun67.htx/node37.html121
-rw-r--r--src/slalib/sun67.htx/node38.html99
-rw-r--r--src/slalib/sun67.htx/node39.html114
-rw-r--r--src/slalib/sun67.htx/node4.html131
-rw-r--r--src/slalib/sun67.htx/node40.html125
-rw-r--r--src/slalib/sun67.htx/node41.html125
-rw-r--r--src/slalib/sun67.htx/node42.html122
-rw-r--r--src/slalib/sun67.htx/node43.html229
-rw-r--r--src/slalib/sun67.htx/node44.html109
-rw-r--r--src/slalib/sun67.htx/node45.html103
-rw-r--r--src/slalib/sun67.htx/node46.html123
-rw-r--r--src/slalib/sun67.htx/node47.html157
-rw-r--r--src/slalib/sun67.htx/node48.html110
-rw-r--r--src/slalib/sun67.htx/node49.html103
-rw-r--r--src/slalib/sun67.htx/node5.html83
-rw-r--r--src/slalib/sun67.htx/node50.html166
-rw-r--r--src/slalib/sun67.htx/node51.html99
-rw-r--r--src/slalib/sun67.htx/node52.html115
-rw-r--r--src/slalib/sun67.htx/node53.html145
-rw-r--r--src/slalib/sun67.htx/node54.html127
-rw-r--r--src/slalib/sun67.htx/node55.html200
-rw-r--r--src/slalib/sun67.htx/node56.html146
-rw-r--r--src/slalib/sun67.htx/node57.html118
-rw-r--r--src/slalib/sun67.htx/node58.html112
-rw-r--r--src/slalib/sun67.htx/node59.html117
-rw-r--r--src/slalib/sun67.htx/node6.html116
-rw-r--r--src/slalib/sun67.htx/node60.html107
-rw-r--r--src/slalib/sun67.htx/node61.html152
-rw-r--r--src/slalib/sun67.htx/node62.html154
-rw-r--r--src/slalib/sun67.htx/node63.html106
-rw-r--r--src/slalib/sun67.htx/node64.html115
-rw-r--r--src/slalib/sun67.htx/node65.html117
-rw-r--r--src/slalib/sun67.htx/node66.html122
-rw-r--r--src/slalib/sun67.htx/node67.html121
-rw-r--r--src/slalib/sun67.htx/node68.html93
-rw-r--r--src/slalib/sun67.htx/node69.html93
-rw-r--r--src/slalib/sun67.htx/node7.html76
-rw-r--r--src/slalib/sun67.htx/node70.html114
-rw-r--r--src/slalib/sun67.htx/node71.html129
-rw-r--r--src/slalib/sun67.htx/node72.html100
-rw-r--r--src/slalib/sun67.htx/node73.html131
-rw-r--r--src/slalib/sun67.htx/node74.html125
-rw-r--r--src/slalib/sun67.htx/node75.html125
-rw-r--r--src/slalib/sun67.htx/node76.html109
-rw-r--r--src/slalib/sun67.htx/node77.html117
-rw-r--r--src/slalib/sun67.htx/node78.html168
-rw-r--r--src/slalib/sun67.htx/node79.html144
-rw-r--r--src/slalib/sun67.htx/node8.html85
-rw-r--r--src/slalib/sun67.htx/node80.html111
-rw-r--r--src/slalib/sun67.htx/node81.html137
-rw-r--r--src/slalib/sun67.htx/node82.html91
-rw-r--r--src/slalib/sun67.htx/node83.html95
-rw-r--r--src/slalib/sun67.htx/node84.html93
-rw-r--r--src/slalib/sun67.htx/node85.html145
-rw-r--r--src/slalib/sun67.htx/node86.html124
-rw-r--r--src/slalib/sun67.htx/node87.html97
-rw-r--r--src/slalib/sun67.htx/node88.html106
-rw-r--r--src/slalib/sun67.htx/node89.html140
-rw-r--r--src/slalib/sun67.htx/node9.html75
-rw-r--r--src/slalib/sun67.htx/node90.html106
-rw-r--r--src/slalib/sun67.htx/node91.html330
-rw-r--r--src/slalib/sun67.htx/node92.html91
-rw-r--r--src/slalib/sun67.htx/node93.html91
-rw-r--r--src/slalib/sun67.htx/node94.html110
-rw-r--r--src/slalib/sun67.htx/node95.html91
-rw-r--r--src/slalib/sun67.htx/node96.html91
-rw-r--r--src/slalib/sun67.htx/node97.html98
-rw-r--r--src/slalib/sun67.htx/node98.html111
-rw-r--r--src/slalib/sun67.htx/node99.html105
-rw-r--r--src/slalib/sun67.htx/orangeball.gifbin0 -> 398 bytes
-rw-r--r--src/slalib/sun67.htx/pinkball.gifbin0 -> 398 bytes
-rw-r--r--src/slalib/sun67.htx/previous_group_motif.gifbin0 -> 303 bytes
-rw-r--r--src/slalib/sun67.htx/previous_group_motif_gr.gifbin0 -> 303 bytes
-rw-r--r--src/slalib/sun67.htx/previous_motif.gifbin0 -> 220 bytes
-rw-r--r--src/slalib/sun67.htx/previous_motif_gr.gifbin0 -> 220 bytes
-rw-r--r--src/slalib/sun67.htx/purpleball.gifbin0 -> 398 bytes
-rw-r--r--src/slalib/sun67.htx/redball.gifbin0 -> 398 bytes
-rwxr-xr-xsrc/slalib/sun67.htx/source.gifbin0 -> 979 bytes
-rw-r--r--src/slalib/sun67.htx/sun67.css10
-rw-r--r--src/slalib/sun67.htx/sun67.html610
-rw-r--r--src/slalib/sun67.htx/up_motif.gifbin0 -> 145 bytes
-rw-r--r--src/slalib/sun67.htx/up_motif_gr.gifbin0 -> 145 bytes
-rw-r--r--src/slalib/sun67.htx/whiteball.gifbin0 -> 275 bytes
-rw-r--r--src/slalib/sun67.htx/yellowball.gifbin0 -> 398 bytes
-rw-r--r--src/slalib/sun67.htx_tarbin0 -> 2293760 bytes
-rw-r--r--src/slalib/sun67.tex12430
-rw-r--r--src/slalib/supgal.f79
-rw-r--r--src/slalib/svd.f379
-rw-r--r--src/slalib/svdcov.f60
-rw-r--r--src/slalib/svdsol.f109
-rw-r--r--src/slalib/tp2s.f42
-rw-r--r--src/slalib/tp2v.f56
-rw-r--r--src/slalib/tps2c.f91
-rw-r--r--src/slalib/tpv2c.f83
-rw-r--r--src/slalib/ue2el.f194
-rw-r--r--src/slalib/ue2pv.f215
-rw-r--r--src/slalib/unpcd.f68
-rw-r--r--src/slalib/v2tp.f78
-rw-r--r--src/slalib/vdv.f27
-rw-r--r--src/slalib/vn.f46
-rw-r--r--src/slalib/vxv.f39
-rw-r--r--src/slalib/wait.f_alpha_OSF132
-rw-r--r--src/slalib/wait.f_convex32
-rw-r--r--src/slalib/wait.f_ix86_Linux32
-rw-r--r--src/slalib/wait.f_mips32
-rw-r--r--src/slalib/wait.f_pcm66
-rw-r--r--src/slalib/wait.f_sun432
-rw-r--r--src/slalib/wait.f_sun4_Solaris32
-rw-r--r--src/slalib/wait.f_vax43
-rw-r--r--src/slalib/wait.f_x86_6432
-rw-r--r--src/slalib/xy2xy.f49
-rw-r--r--src/slalib/zd.f62
1131 files changed, 209453 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..c707584
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,9 @@
+*~
+Makefile
+autom4te.cache
+*.o
+*.dylib
+*.la
+*.a
+calfiles/
+!calfiles/.gitkeep
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..0f7cbee
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,2 @@
+ACLOCAL_AMFLAGS = -I m4
+SUBDIRS = . src
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..1911b2d
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,813 @@
+# Makefile.in generated by automake 1.15 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
+ $(am__configure_deps) $(am__DIST_COMMON)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-recursive dvi-recursive html-recursive info-recursive \
+ install-data-recursive install-dvi-recursive \
+ install-exec-recursive install-html-recursive \
+ install-info-recursive install-pdf-recursive \
+ install-ps-recursive install-recursive installcheck-recursive \
+ installdirs-recursive pdf-recursive ps-recursive \
+ tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+ cscope distdir dist dist-all distcheck
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
+ $(LISP)config.h.in
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+CSCOPE = cscope
+DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in compile \
+ config.guess config.sub install-sh ltmain.sh missing
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+ if test -d "$(distdir)"; then \
+ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -rf "$(distdir)" \
+ || { sleep 5 && rm -rf "$(distdir)"; }; \
+ else :; fi
+am__post_remove_distdir = $(am__remove_distdir)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+DIST_TARGETS = dist-gzip
+distuninstallcheck_listfiles = find . -type f -print
+am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
+ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+ACLOCAL_AMFLAGS = -I m4
+SUBDIRS = . src
+all: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+am--refresh: Makefile
+ @:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ $(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+config.h: stamp-h1
+ @test -f $@ || rm -f stamp-h1
+ @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
+
+stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
+ @rm -f stamp-h1
+ cd $(top_builddir) && $(SHELL) ./config.status config.h
+$(srcdir)/config.h.in: $(am__configure_deps)
+ ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
+ rm -f stamp-h1
+ touch $@
+
+distclean-hdr:
+ -rm -f config.h stamp-h1
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool config.lt
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscope: cscope.files
+ test ! -s cscope.files \
+ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
+clean-cscope:
+ -rm -f cscope.files
+cscope.files: clean-cscope cscopelist
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+ -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
+
+distdir: $(DISTFILES)
+ $(am__remove_distdir)
+ test -d "$(distdir)" || mkdir "$(distdir)"
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+ -test -n "$(am__skip_mode_fix)" \
+ || find "$(distdir)" -type d ! -perm -755 \
+ -exec chmod u+rwx,go+rx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r "$(distdir)"
+dist-gzip: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__post_remove_distdir)
+
+dist-bzip2: distdir
+ tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+ $(am__post_remove_distdir)
+
+dist-lzip: distdir
+ tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
+ $(am__post_remove_distdir)
+
+dist-xz: distdir
+ tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
+ $(am__post_remove_distdir)
+
+dist-tarZ: distdir
+ @echo WARNING: "Support for distribution archives compressed with" \
+ "legacy program 'compress' is deprecated." >&2
+ @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
+ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+ $(am__post_remove_distdir)
+
+dist-shar: distdir
+ @echo WARNING: "Support for shar distribution archives is" \
+ "deprecated." >&2
+ @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
+ shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+ $(am__post_remove_distdir)
+
+dist-zip: distdir
+ -rm -f $(distdir).zip
+ zip -rq $(distdir).zip $(distdir)
+ $(am__post_remove_distdir)
+
+dist dist-all:
+ $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
+ $(am__post_remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ case '$(DIST_ARCHIVES)' in \
+ *.tar.gz*) \
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+ *.tar.bz2*) \
+ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+ *.tar.lz*) \
+ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
+ *.tar.xz*) \
+ xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+ *.tar.Z*) \
+ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+ *.shar.gz*) \
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+ *.zip*) \
+ unzip $(distdir).zip ;;\
+ esac
+ chmod -R a-w $(distdir)
+ chmod u+w $(distdir)
+ mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
+ chmod a-w $(distdir)
+ test -d $(distdir)/_build || exit 0; \
+ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+ && am__cwd=`pwd` \
+ && $(am__cd) $(distdir)/_build/sub \
+ && ../../configure \
+ $(AM_DISTCHECK_CONFIGURE_FLAGS) \
+ $(DISTCHECK_CONFIGURE_FLAGS) \
+ --srcdir=../.. --prefix="$$dc_install_base" \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+ distuninstallcheck \
+ && chmod -R a-w "$$dc_install_base" \
+ && ({ \
+ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
+ && rm -rf "$$dc_destdir" \
+ && $(MAKE) $(AM_MAKEFLAGS) dist \
+ && rm -rf $(DIST_ARCHIVES) \
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+ && cd "$$am__cwd" \
+ || exit 1
+ $(am__post_remove_distdir)
+ @(echo "$(distdir) archives ready for distribution: "; \
+ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+ @test -n '$(distuninstallcheck_dir)' || { \
+ echo 'ERROR: trying to run $@ with an empty' \
+ '$$(distuninstallcheck_dir)' >&2; \
+ exit 1; \
+ }; \
+ $(am__cd) '$(distuninstallcheck_dir)' || { \
+ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
+ exit 1; \
+ }; \
+ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left after uninstall:" ; \
+ if test -n "$(DESTDIR)"; then \
+ echo " (check DESTDIR support)"; \
+ fi ; \
+ $(distuninstallcheck_listfiles) ; \
+ exit 1; } >&2
+distcleancheck: distclean
+ @if test '$(srcdir)' = . ; then \
+ echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+ exit 1 ; \
+ fi
+ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left in build directory after distclean:" ; \
+ $(distcleancheck_listfiles) ; \
+ exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile config.h
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-hdr \
+ distclean-libtool distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(am__recursive_targets) all install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
+ am--refresh check check-am clean clean-cscope clean-generic \
+ clean-libtool cscope cscopelist-am ctags ctags-am dist \
+ dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
+ dist-xz dist-zip distcheck distclean distclean-generic \
+ distclean-hdr distclean-libtool distclean-tags distcleancheck \
+ distdir distuninstallcheck dvi dvi-am html html-am info \
+ info-am install install-am install-data install-data-am \
+ install-dvi install-dvi-am install-exec install-exec-am \
+ install-html install-html-am install-info install-info-am \
+ install-man install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
+ uninstall-am
+
+.PRECIOUS: Makefile
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644
index 0000000..3253aa3
--- /dev/null
+++ b/aclocal.m4
@@ -0,0 +1,1157 @@
+# generated automatically by aclocal 1.15 -*- Autoconf -*-
+
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
+[m4_warning([this file was generated for autoconf 2.69.
+You have another version of autoconf. It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically 'autoreconf'.])])
+
+# Copyright (C) 2002-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.15'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version. Point them to the right macro.
+m4_if([$1], [1.15], [],
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too. Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.15])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
+# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is '.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ([2.52])dnl
+ m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+
+# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
+ [$1], [CXX], [depcc="$CXX" am_compiler_list=],
+ [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
+ [$1], [UPC], [depcc="$UPC" am_compiler_list=],
+ [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ am__universal=false
+ m4_case([$1], [CC],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac],
+ [CXX],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac])
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok '-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE([dependency-tracking], [dnl
+AS_HELP_STRING(
+ [--enable-dependency-tracking],
+ [do not reject slow dependency extractors])
+AS_HELP_STRING(
+ [--disable-dependency-tracking],
+ [speeds up one-time build])])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+ # Older Autoconf quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named 'Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running 'make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "$am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each '.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
+m4_define([AC_PROG_CC],
+m4_defn([AC_PROG_CC])
+[_AM_PROG_CC_C_O
+])
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.65])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[AC_DIAGNOSE([obsolete],
+ [$0: two- and three-arguments forms are deprecated.])
+m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(
+ m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
+ [ok:ok],,
+ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
+ AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
+AM_MISSING_PROG([AUTOCONF], [autoconf])
+AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
+AM_MISSING_PROG([AUTOHEADER], [autoheader])
+AM_MISSING_PROG([MAKEINFO], [makeinfo])
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+# For better backward compatibility. To be removed once Automake 1.9.x
+# dies out for good. For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
+# We need awk for the "check" target (and possibly the TAP driver). The
+# system "awk" is bad on some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES([CC])],
+ [m4_define([AC_PROG_CC],
+ m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES([CXX])],
+ [m4_define([AC_PROG_CXX],
+ m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES([OBJC])],
+ [m4_define([AC_PROG_OBJC],
+ m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
+ [_AM_DEPENDENCIES([OBJCXX])],
+ [m4_define([AC_PROG_OBJCXX],
+ m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
+])
+AC_REQUIRE([AM_SILENT_RULES])dnl
+dnl The testsuite driver may need to know about EXEEXT, so add the
+dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
+dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+ [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes. So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+ cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present. This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message. This
+can help us improve future automake versions.
+
+END
+ if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+ echo 'Configuration will proceed anyway, since you have set the' >&2
+ echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+ echo >&2
+ else
+ cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+ AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
+ fi
+fi
+dnl The trailing newline in this macro's definition is deliberate, for
+dnl backward compatibility and to allow trailing 'dnl'-style comments
+dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
+])
+
+dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+AC_SUBST([install_sh])])
+
+# Copyright (C) 2003-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from 'make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it is modern enough.
+# If it is, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --is-lightweight"; then
+ am_missing_run="$MISSING "
+else
+ am_missing_run=
+ AC_MSG_WARN(['missing' script is too old or missing])
+fi
+])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# --------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_PROG_CC_C_O
+# ---------------
+# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
+# to automatically call this.
+AC_DEFUN([_AM_PROG_CC_C_O],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+AC_LANG_PUSH([C])dnl
+AC_CACHE_CHECK(
+ [whether $CC understands -c and -o together],
+ [am_cv_prog_cc_c_o],
+ [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
+ # Make sure it works both with $CC and with simple cc.
+ # Following AC_PROG_CC_C_O, we do the test twice because some
+ # compilers refuse to overwrite an existing .o file with -o,
+ # though they will create one.
+ am_cv_prog_cc_c_o=yes
+ for am_i in 1 2; do
+ if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
+ && test -f conftest2.$ac_objext; then
+ : OK
+ else
+ am_cv_prog_cc_c_o=no
+ break
+ fi
+ done
+ rm -f core conftest*
+ unset am_i])
+if test "$am_cv_prog_cc_c_o" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+AC_LANG_POP([C])])
+
+# For backward compatibility.
+AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
+
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_RUN_LOG(COMMAND)
+# -------------------
+# Run COMMAND, save the exit status in ac_status, and log it.
+# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
+AC_DEFUN([AM_RUN_LOG],
+[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
+ ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ (exit $ac_status); }])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[[\\\"\#\$\&\'\`$am_lf]]*)
+ AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+ *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
+ AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
+esac
+
+# Do 'set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ am_has_slept=no
+ for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+ alias in your environment])
+ fi
+ if test "$[2]" = conftest.file || test $am_try -eq 2; then
+ break
+ fi
+ # Just in case.
+ sleep 1
+ am_has_slept=yes
+ done
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT([yes])
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+AC_CONFIG_COMMANDS_PRE(
+ [AC_MSG_CHECKING([that generated files are newer than configure])
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ AC_MSG_RESULT([done])])
+rm -f conftest.file
+])
+
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# ("yes" being less verbose, "no" or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules], [dnl
+AS_HELP_STRING(
+ [--enable-silent-rules],
+ [less verbose build output (undo: "make V=1")])
+AS_HELP_STRING(
+ [--disable-silent-rules],
+ [verbose build output (undo: "make V=0")])dnl
+])
+case $enable_silent_rules in @%:@ (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+ *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+dnl
+dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
+dnl do not support nested variable expansions.
+dnl See automake bug#9928 and bug#10237.
+am_make=${MAKE-make}
+AC_CACHE_CHECK([whether $am_make supports nested variables],
+ [am_cv_make_support_nested_variables],
+ [if AS_ECHO([['TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+ @$(TRUE)
+.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
+ am_cv_make_support_nested_variables=yes
+else
+ am_cv_make_support_nested_variables=no
+fi])
+if test $am_cv_make_support_nested_variables = yes; then
+ dnl Using '$V' instead of '$(V)' breaks IRIX make.
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AC_SUBST([AM_V])dnl
+AM_SUBST_NOTMAKE([AM_V])dnl
+AC_SUBST([AM_DEFAULT_V])dnl
+AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
+
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor 'install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in "make install-strip", and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip". However 'strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the 'STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# --------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of 'v7', 'ustar', or 'pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+#
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+
+m4_if([$1], [v7],
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+
+ [m4_case([$1],
+ [ustar],
+ [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
+ # There is notably a 21 bits limit for the UID and the GID. In fact,
+ # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
+ # and bug#13588).
+ am_max_uid=2097151 # 2^21 - 1
+ am_max_gid=$am_max_uid
+ # The $UID and $GID variables are not portable, so we need to resort
+ # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
+ # below are definitely unexpected, so allow the users to see them
+ # (that is, avoid stderr redirection).
+ am_uid=`id -u || echo unknown`
+ am_gid=`id -g || echo unknown`
+ AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
+ if test $am_uid -le $am_max_uid; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ _am_tools=none
+ fi
+ AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
+ if test $am_gid -le $am_max_gid; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ _am_tools=none
+ fi],
+
+ [pax],
+ [],
+
+ [m4_fatal([Unknown tar format])])
+
+ AC_MSG_CHECKING([how to create a $1 tar archive])
+
+ # Go ahead even if we have the value already cached. We do so because we
+ # need to set the values for the 'am__tar' and 'am__untar' variables.
+ _am_tools=${am_cv_prog_tar_$1-$_am_tools}
+
+ for _am_tool in $_am_tools; do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar; do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ AM_RUN_LOG([cat conftest.dir/file])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+ done
+ rm -rf conftest.dir
+
+ AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+ AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+m4_include([m4/libtool.m4])
+m4_include([m4/ltoptions.m4])
+m4_include([m4/ltsugar.m4])
+m4_include([m4/ltversion.m4])
+m4_include([m4/lt~obsolete.m4])
diff --git a/bin/.trailer b/bin/.trailer
new file mode 100644
index 0000000..deaf46a
--- /dev/null
+++ b/bin/.trailer
@@ -0,0 +1,12 @@
+************************************************************
+##### CALFUSE PIPELINE-1.8.7: Begin Processing Wed Aug 29 09:38:49 2001
+
+##### cf_ttag_init-1.15: Started execution. Wed Aug 29 09:38:49 2001
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+CalFUSE ERROR in cf_ttag_init-1.15: Wed Aug 29 09:38:49 2001
+ Incorrect number of program arguments
+ Exiting ...
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+##### CALFUSE PIPELINE-1.8.7: Abnormal termination Wed Aug 29 09:38:49 2001
+************************************************************
diff --git a/bin/calfuse.csh b/bin/calfuse.csh
new file mode 100755
index 0000000..4a828d1
--- /dev/null
+++ b/bin/calfuse.csh
@@ -0,0 +1,165 @@
+#!/usr/local/bin/tcsh -f
+#******************************************************************************
+#* Johns Hopkins University
+#* Center For Astrophysical Sciences
+#* FUSE
+#******************************************************************************
+#*
+#* Synopsis: calfuse.csh file_name
+#*
+#* Description: Shell script for processing FUSE Ver 3.0 time-tagged exposures.
+#* All messages are written to stdout or stderr.
+#*
+#* Arguments: char file_name File name to process is 1st command-
+#* line argument
+#*
+#* Returns: Exit codes:
+#* 0 Successful execution
+#*
+#*
+#* Environment variables: CF_CALDIR Path to directory which contains the
+#* calibration files.
+#* CF_IDLDIR Path to CalFUSE IDL directory
+#* CF_PIPELINE Flag to determine if CALFUSE
+#* is running as part of the JHU
+#* pipeline.
+#*
+#* History: 02/26/03 1.1 peb Begin work on V3.0
+#* 03/19/03 1.2 wvd Add IDL plots
+#* 03/31/03 1.3 peb Add cf_ttag_countmap/gainmap programs
+#* and changed the timestamp format to be
+#* similar to cf_timestamp
+#* 05/16/03 1.4 wvd Distinguish between TTAG and HIST files.
+#* Changed name to calfuse.csh
+#* 05/22/03 1.5 wvd Direct STDERR to trailer file.
+#* 06/03/03 1.6 rdr Incorporated bad pixel map
+#* 06/09/03 1.7 rdr Do not screen on timing flags for HIST
+#* data processed behind the firewall
+#* 07/31/03 1.8 wvd Check error status before exiting.
+#* 09/15/03 1.9 wvd Write BEGIN and END stmts to logfile.
+#* 12/08/03 1.10 wvd For HIST data, always call
+#* cf_extract_spectra and cf_bad_pixels
+#* with -s option.
+#* 12/21/03 1.13 wvd Remove underscore from idf and bpm
+#* filenames.
+#* 04/22/04 1.12 wvd Change name of trailer file to
+#* {$froot}.trl
+#* 05/12/04 1.13 wvd Remove cf_ttag_countmap and
+#* cf_ttag_gainmap from pipeline.
+#* 06/01/04 1.14 wvd For HIST data, no longer need to call
+#* cf_extract_spectra with -s option.
+#* 06/03/04 1.15 wvd Screening step now follows "Convert
+#* to FARF."
+#*
+#*****************************************************************************/
+
+# Delete files after processing? (Default is no.)
+#set DELETE_IDF # Delete intermediate data file
+#set DELETE_BPM # Delete bad-pixel map
+
+set idf = ${1:s/raw/idf/}
+set froot = ${1:s/raw.fit//}
+set logfile = {$froot}.trl
+set ttag = `echo $froot | grep -c ttag`
+
+# Put a timestamp in the log file (the OPUS trailer file).
+if $ttag then
+ echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: Begin TTAG file $1"
+ echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: Begin TTAG file $1" >>& $logfile
+else
+ echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: Begin HIST file $1"
+ echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: Begin HIST file $1" >>& $logfile
+endif
+
+set cfstat=0
+
+# Step 1 -- Generate Intermediate Data File
+if $ttag then
+ cf_ttag_init $1 $idf >>& $logfile
+ set cfstat=$status
+else
+ cf_hist_init $1 $idf >>& $logfile
+ set cfstat=$status
+endif
+
+# Step 2 -- Convert to FARF
+if ! $cfstat then
+ cf_convert_to_farf $idf >>& $logfile
+ set cfstat=$status
+endif
+
+# Step 3 -- Screen photons
+if ! $cfstat then
+ cf_screen_photons $idf >>& $logfile
+ set cfstat=$status
+endif
+
+# Step 4 -- Remove motions
+if ! $cfstat then
+ cf_remove_motions $idf >>& $logfile
+ set cfstat=$status
+endif
+
+if ! $cfstat then
+ if ($?CF_IDLDIR) then
+ idlplot_rate.pl {$froot} >>& $logfile
+ idlplot_spex.pl {$froot} >>& $logfile
+ endif
+endif
+
+# Step 5 -- Assign wavelength
+if ! $cfstat then
+ cf_assign_wavelength $idf >>& $logfile
+ set cfstat=$status
+endif
+
+# Step 6 -- Flux calibrate
+if ! $cfstat then
+ cf_flux_calibrate $idf >>& $logfile
+ set cfstat=$status
+endif
+
+# Step 7 -- Create a bad-pixel file
+if ! $cfstat then
+ cf_bad_pixels $idf >>& $logfile
+ set cfstat=$status
+endif
+
+# Step 8 -- Extract spectra
+if ! $cfstat then
+ cf_extract_spectra $idf >>& $logfile
+ set cfstat=$status
+endif
+
+# Step 8a -- Delete _bursts.dat file
+if ! $?CF_PIPELINE then
+ rm -f ${1:r:s/ttagfraw/_bursts/}.dat
+endif
+
+# Step 8b -- Delete IDF file
+if $?DELETE_IDF then
+ echo "NOTE: Deleting intermediate data file."
+ rm $idf
+endif
+
+# Step 8c -- Delete bad pixel map (bpm) file
+if $?DELETE_BPM then
+ echo "NOTE: Deleting bad pixel map (bpm) file."
+ rm -f ${1:s/raw/bpm/}
+endif
+
+if ! $cfstat then
+ if $ttag then
+ echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: End TTAG file $1"
+ echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: End TTAG file $1" >>& $logfile
+ else
+ echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: End HIST file $1"
+ echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: End HIST file $1" >>& $logfile
+ endif
+else
+ echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: Error processing $1"
+ echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: Error processing $1" >>& $logfile
+endif
+exit($cfstat)
+
+#******************************************************************************
diff --git a/bin/calfuse.sh b/bin/calfuse.sh
new file mode 100755
index 0000000..0cd23a9
--- /dev/null
+++ b/bin/calfuse.sh
@@ -0,0 +1,142 @@
+#!/bin/sh
+#******************************************************************************
+#* Johns Hopkins University
+#* Center For Astrophysical Sciences
+#* FUSE
+#******************************************************************************
+#*
+#* Synopsis: calfuse.sh file_name
+#*
+#* Description: Shell script for processing FUSE Ver 3.2 time-tagged exposures.
+#* All messages are written to stdout or stderr.
+#*
+#* Arguments: char file_name File name to process is 1st command-
+#* line argument
+#*
+#* Returns: Exit codes:
+#* 0 Successful execution
+#*
+#*
+#* Environment variables: CF_CALDIR Path to directory which contains the
+#* calibration files.
+#* CF_IDLDIR Path to CalFUSE IDL directory
+#* CF_PIPELINE Flag to determine if CALFUSE
+#* is running as part of the JHU
+#* pipeline.
+#*
+#* History: 09/05/07 1.1 bot Adapted from tcsh script
+#*
+#*****************************************************************************/
+
+# Delete files after processing? (Default is no.)
+#DELETE_IDF=1 # Delete intermediate data file
+#DELETE_BPM=1 # Delete bad-pixel map
+
+idf=`echo $1 | sed -e "s/raw/idf/g"`
+froot=`echo $1 | sed -e "s/raw.fit//g"`
+logfile=${froot}.trl
+ttag=`echo $froot | grep -c ttag`
+
+
+# Put a timestamp in the log file (the OPUS trailer file).
+if [ $ttag = 1 ]; then
+ echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: Begin TTAG file $1"
+ echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: Begin TTAG file $1" >> $logfile 2>&1
+else
+ echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: Begin HIST file $1"
+ echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: Begin HIST file $1" >> $logfile 2>&1
+fi
+
+cfstat=1
+
+# Step 1 -- Generate Intermediate Data File
+if [ $ttag = 1 ]; then
+ cf_ttag_init $1 $idf >> $logfile 2>&1
+ cfstat=$?
+else
+ cf_hist_init $1 $idf >> $logfile 2>&1
+ cfstat=$?
+fi
+
+# Step 2 -- Convert to FARF
+if [ $cfstat = 0 ]; then
+ cf_convert_to_farf $idf >> $logfile 2>&1
+ cfstat=$?
+fi
+
+# Step 3 -- Screen photons
+if [ $cfstat = 0 ]; then
+ cf_screen_photons $idf >> $logfile 2>&1
+ cfstat=$?
+fi
+
+# Step 4 -- Remove motions
+if [ $cfstat = 0 ]; then
+ cf_remove_motions $idf >> $logfile 2>&1
+ cfstat=$?
+fi
+
+if [ $cfstat = 0 ]; then
+ if [ ${CF_IDLDIR:-""} != "" ]; then
+ idlplot_rate.pl $froot >> $logfile 2>&1
+ idlplot_spex.pl $froot >> $logfile 2>&1
+ fi
+fi
+
+# Step 5 -- Assign wavelength
+if [ $cfstat = 0 ]; then
+ cf_assign_wavelength $idf >> $logfile 2>&1
+ cfstat=$?
+fi
+
+# Step 6 -- Flux calibrate
+if [ $cfstat = 0 ]; then
+ cf_flux_calibrate $idf >> $logfile 2>&1
+ cfstat=$?
+fi
+
+# Step 7 -- Create a bad-pixel file
+if [ $cfstat = 0 ]; then
+ cf_bad_pixels $idf >> $logfile 2>&1
+ cfstat=$?
+fi
+
+# Step 8 -- Extract spectra
+if [ $cfstat = 0 ]; then
+ cf_extract_spectra $idf >> $logfile 2>&1
+ cfstat=$?
+fi
+
+# Step 8a -- Delete _bursts.dat file
+if [ ${CF_PIPELINE:-""} = "" ]; then
+ rm -f `echo $1 | sed -e "s/ttagfraw.fit/_bursts.dat/g"`
+fi
+
+# Step 8b -- Delete IDF file
+if [ ${DELETE_IDF:-""} != "" ]; then
+ echo "NOTE: Deleting intermediate data file."
+ rm -f $idf
+fi
+
+# Step 8c -- Delete bad pixel map (bpm) file
+if [ ${DELETE_BPM:-""} != "" ]; then
+ echo "NOTE: Deleting bad pixel map (bpm) file."
+ rm -f `echo $1 | sed -e "s/raw/bpm/g"`
+fi
+
+if [ $cfstat = 0 ]; then
+ if [ $ttag = 1 ]; then
+ echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: End TTAG file $1"
+ echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: End TTAG file $1" >> $logfile 2>&1
+ else
+ echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: End HIST file $1"
+ echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: End HIST file $1" >> $logfile 2>&1
+ fi
+else
+ echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: Error processing $1"
+ echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: Error processing $1" >> $logfile 2>&1
+fi
+
+exit $cfstat
+
+#******************************************************************************
diff --git a/bin/calfuse.wavecal b/bin/calfuse.wavecal
new file mode 100755
index 0000000..eae4653
--- /dev/null
+++ b/bin/calfuse.wavecal
@@ -0,0 +1,130 @@
+#!/usr/local/bin/tcsh -f
+#******************************************************************************
+#* Johns Hopkins University
+#* Center For Astrophysical Sciences
+#* FUSE
+#******************************************************************************
+#*
+#* Synopsis: calfuse.wavecal file_name
+#*
+#* Description: Shell script for processing FUSE Ver 3.0 time-tagged exposures.
+#* All messages are written to stdout or stderr.
+#*
+#* WARNING: THIS VERSION IS OPTIMIZED FOR PROCESSING WAVELENGTH
+#* CALIBRATION DATA!!!
+#*
+#* Arguments: char file_name File name to process is 1st command-
+#* line argument
+#*
+#* Returns: Exit codes:
+#* 0 Successful execution
+#*
+#*
+#* Environment variables: CF_CALDIR Path to directory which contains the
+#* calibration files.
+#* CF_IDLDIR Path to CalFUSE IDL directory
+#* CF_PIPELINE Flag to determine if CALFUSE
+#* is running as part of the JHU
+#* pipeline.
+#*
+#* History: 02/26/03 1.1 peb Begin work on V3.0
+#* 03/19/03 1.2 wvd Add IDL plots
+#* 03/31/03 1.3 peb Add cf_ttag_countmap/gainmap programs
+#* and changed the timestamp format to be
+#* similar to cf_timestamp
+#* 05/16/03 1.4 wvd Distinguish between TTAG and HIST files.
+#* Changed name to calfuse.csh
+#* 05/22/03 1.5 wvd Direct STDERR to trailer file.
+#* 06/03/03 1.6 rdr Incorporated bad pixel map
+#* 06/09/03 1.7 rdr Do not screen on timing flags for HIST
+#* data processed behind the firewall
+#* 07/31/03 1.8 wvd Check error status before exiting.
+#* 09/15/03 1.9 wvd Write BEGIN and END stmts to logfile.
+#* 12/08/03 1.10 wvd For HIST data, always call
+#* cf_extract_spectra and cf_bad_pixels
+#* with -s option.
+#* 12/21/03 1.13 wvd Remove underscore from idf and bpm
+#* filenames.
+#* 04/22/04 1.12 wvd Change name of trailer file to
+#* {$froot}.trl
+#* 05/12/04 1.13 wvd Remove cf_ttag_countmap and
+#* cf_ttag_gainmap from pipeline.
+#* 06/01/04 1.14 wvd For HIST data, no longer need to call
+#* cf_extract_spectra with -s option.
+#* 06/03/04 1.15 wvd Screening step now follows "Convert
+#* to FARF."
+#*
+#*****************************************************************************/
+
+set idf = ${1:s/raw/idf/}
+set froot = ${1:s/raw.fit//}
+set logfile = {$froot}.trl
+set ttag = `echo $froot | grep -c ttag`
+
+# Put a time stamp in the log file (the OPUS trailer file).
+if $ttag then
+ echo `date '+%Y %b %e %T'` "calfuse.wavecal-1.15: Begin TTAG file $1"
+ echo `date '+%Y %b %e %T'` "calfuse.wavecal-1.15: Begin TTAG file $1" >>& $logfile
+else
+ echo `date '+%Y %b %e %T'` "calfuse.wavecal-1.15: Begin HIST file $1"
+ echo `date '+%Y %b %e %T'` "calfuse.wavecal-1.15: Begin HIST file $1" >>& $logfile
+endif
+
+set cfstat=0
+
+# Step 1 -- Generate Intermediate Data File
+if $ttag then
+ cf_ttag_init $1 $idf >>& $logfile
+ set cfstat=$status
+else
+ cf_hist_init $1 $idf >>& $logfile
+ set cfstat=$status
+endif
+
+# Step 2 -- Convert to FARF
+if ! $cfstat then
+ cf_convert_to_farf $idf >>& $logfile
+ set cfstat=$status
+endif
+
+# Step 3 -- Screen photons
+if ! $cfstat then
+ cf_screen_photons $idf >>& $logfile
+ set cfstat=$status
+endif
+
+# Step 4 -- Remove motions
+if ! $cfstat then
+ cf_remove_motions $idf >>& $logfile
+ set cfstat=$status
+endif
+
+# Step 5 -- Assign wavelength - SAVE ASTIG-CORRECTED X ARRAY
+if ! $cfstat then
+ cf_assign_wavelength -w $idf >>& $logfile
+ set cfstat=$status
+endif
+
+if ! $cfstat then
+ if ($?CF_IDLDIR) then
+ idlplot_rate.pl {$froot} >>& $logfile
+ idlplot_spex.pl {$froot} >>& $logfile
+ endif
+endif
+
+# Step 6 -- Flux calibrate
+if ! $cfstat then
+ cf_flux_calibrate $idf >>& $logfile
+ set cfstat=$status
+endif
+
+if ! $cfstat then
+ echo `date '+%Y %b %e %T'` "calfuse.wavecal-1.15: Finish data file $1"
+ echo `date '+%Y %b %e %T'` "calfuse.wavecal-1.15: Finish data file $1" >>& $logfile
+else
+ echo `date '+%Y %b %e %T'` "calfuse.wavecal-1.15: Error processing $1"
+ echo `date '+%Y %b %e %T'` "calfuse.wavecal-1.15: Error processing $1" >>& $logfile
+endif
+exit($cfstat)
+
+#******************************************************************************
diff --git a/bin/cf_make_900_obs.csh b/bin/cf_make_900_obs.csh
new file mode 100755
index 0000000..9edbc70
--- /dev/null
+++ b/bin/cf_make_900_obs.csh
@@ -0,0 +1,193 @@
+#!/usr/local/bin/tcsh -f
+
+#******************************************************************************
+#* Johns Hopkins University
+#* Center For Astrophysical Sciences
+#* FUSE
+#******************************************************************************
+#*
+#* Synopsis: cf_make_900_obs.csh association_file
+#*
+#* Description: This routine is derived from cf_make_all_obs.csh, but modified
+#* to consider only 900+ (airglow) files. Output is a single
+#* quick-look image of the airglow spactrum.
+#*
+#* Extracted spectra are combined, not IDF files.
+#*
+#* When an expected data set is missing, the script stops, cleans
+#* the directory, and returns 1.
+#*
+#* History: 08/08/08 1.00 wvd Create separate quick-look image
+#* for 900+ (airglow) exposures.
+#* Always combine extracted spectra. If
+#* cf_xcorr fails, combine with no shift.
+#* 08/08/08 1.01 wvd Rename airglow quick-look file to
+#* M112580100000airgttagf.gif
+#*
+#*****************************************************************************/
+
+# Delete files after processing? (Default is no.)
+#set DELETE_IDF # Delete intermediate data files
+set DELETE_BPM # Delete bad-pixel map files
+
+# Set program path
+set rm = "/bin/rm -f"
+
+set cf_xcorr = cf_xcorr
+set cf_combine = cf_combine
+set cf_pack = cf_pack
+set cf_nvo = cf_nvo
+set idl_obsplot = idl_obsplot.pl
+set modhead = modhead
+
+# Init var list
+set detector = (1a 2b)
+set channel = (lif sic)
+set resolution = (2 3 4)
+set obsmod = (hist ttag)
+
+# Determine the root name and the program ID
+set asnf = $1
+set rn = ${asnf:s/000asnf.fit//}
+set pid = `echo $rn | awk '{print substr($1, 1, 4)}'`
+
+# Determine the object class
+set tmp_file = `ls ${rn}*fcal.fit | awk '{if (NR == 1) print}'`
+set tmp_buf = `$modhead $tmp_file OBJCLASS`
+set objclass = $tmp_buf[2]
+
+# Clean tmp files that the script will create (safe)
+$rm tmp_xcorr.res tmp_combine.lis
+$rm tmp_good_exp.lis tmp_exp.lis tmp_seg_dn.lis
+$rm DN_${rn}*.fit
+
+foreach om ($obsmod)
+ foreach res ($resolution)
+ foreach chan ($channel)
+ foreach det ($detector)
+
+ set ignore_exp_stat = ''
+ if ($om == hist) set ignore_exp_stat = -a
+ if ($pid == S100) set ignore_exp_stat = -a
+ if ($pid == M106) set ignore_exp_stat = -a
+
+ # Find exposures that match the current segment
+ set seg = $det$chan$res$om
+ set readfiles = 0
+ ls ${rn}9[0-9][0-9]${seg}fcal.fit |& grep -v 000${seg} > tmp_exp.lis # Keep only "9xx" exposures
+ if ($? == 0) then
+ set readfiles = 2
+ set ignore_exp_stat = -a
+ endif
+
+ if ($readfiles >= 1) then # There are one or more exposures
+
+ echo " "
+ echo "*** Processing: $seg ***"
+ # [1a][lif] -> [1b][lif], [2b][lif] -> [2a][lif] etc...
+ if ($det == 1a) set det2 = 1b
+ if ($det == 2b) set det2 = 2a
+ set seg2 = $det2$chan$res$om
+
+ echo "----- cf_xcorr input -----"
+ cat tmp_exp.lis
+ echo "----------------------------"
+ $cf_xcorr tmp_exp.lis tmp_xcorr.res # Compute shift and sigma_shift
+ echo "----- cf_xcorr results -----"
+ cat tmp_xcorr.res
+ echo "----------------------------"
+
+ awk '{if ($3 >= 0) {print $6, $2} else {print $6}}' tmp_xcorr.res > tmp_good_exp.lis
+
+ #
+ # --- Path 1: Optimize resolution ---
+ #
+
+ echo "Optimize resolution..."
+ set n_good = `cat tmp_good_exp.lis | wc -l`
+
+ # Extract [Day + Night] spectra
+ set s = DN_${rn}900${seg}fcal.fit
+ awk '{print "'$rn'"$1"'$seg'fcal.fit",$2}' tmp_good_exp.lis > tmp_combine.lis # Combine $seg [dn]
+ # echo "----- Combining Files ----- "
+ # cat tmp_combine.lis
+ # echo "Output: " $s
+ $cf_combine -k $ignore_exp_stat tmp_combine.lis $s
+ # $modhead "${s}[1]" NUM_EXP $n_good
+ $modhead "${s}[1]" COMBMETH XCORR
+ echo $s >> tmp_seg_dn.lis
+
+ set s = DN_${rn}900${seg2}fcal.fit
+ awk '{print "'$rn'"$1"'$seg2'fcal.fit",$2}' tmp_good_exp.lis > tmp_combine.lis # Combine $seg2 [dn]
+ # echo "----- Combining Files ----- "
+ # cat tmp_combine.lis
+ # echo "Output: " $s
+ $cf_combine -k $ignore_exp_stat tmp_combine.lis $s
+ # $modhead "${s}[1]" NUM_EXP $n_good
+ $modhead "${s}[1]" COMBMETH XCORR
+ echo $s >> tmp_seg_dn.lis
+
+ endif
+ end
+
+ $rm tmp_xcorr.res tmp_combine.lis
+ $rm tmp_good_exp.lis tmp_exp.lis
+
+ end
+
+ # Pack the 8 [detector][channel] pairs together
+ if (-e tmp_seg_dn.lis) then
+
+ set fcal_all = ${rn}00900all$res${om}fcal.fit # Final output name
+ $rm $fcal_all # Clean (safe)
+ set n_segs = `cat tmp_seg_dn.lis | wc -l`
+
+ if (!($n_segs == 8)) then
+
+ @ mseg = 8 - $n_segs
+ echo "ERROR: $mseg (day + night) segments are missing"
+ $rm tmp_seg_dn.lis
+ goto crash
+
+ else
+
+ $cf_pack tmp_seg_dn.lis $fcal_all
+ $rm tmp_seg_dn.lis
+
+ # Plot figures, delete unwanted files
+ $idl_obsplot {$rn} airglow
+ mv ${rn}00900spec${om}f.gif ${rn}00000airg${om}f.gif
+ $rm ${rn}00900lif*.gif ${rn}00900sic*.gif
+ $rm $fcal_all
+
+ endif
+ endif
+ end
+end
+
+# Clean [dn] files.
+$rm DN_${rn}*.fit
+
+# Delete IDF files
+if $?DELETE_IDF then
+ echo "NOTE: Deleting intermediate data files."
+ $rm ${rn}*idf.fit
+endif
+
+# Delete bad-pixel-map (bpm) files
+if $?DELETE_BPM then
+ echo "NOTE: Deleting bad pixel map (bpm) files."
+ $rm ${rn}*bpm.fit
+endif
+
+exit(0)
+
+crash: # Procedure when script crashes
+
+# Clean directory
+$rm tmp_xcorr.res tmp_combine.lis
+$rm tmp_good_exp.lis tmp_exp.lis tmp_seg_dn.lis
+$rm DN_*.fit
+
+# Return 1
+exit(1)
diff --git a/bin/cf_make_all.csh b/bin/cf_make_all.csh
new file mode 100755
index 0000000..2cfbc46
--- /dev/null
+++ b/bin/cf_make_all.csh
@@ -0,0 +1,487 @@
+#!/usr/local/bin/tcsh -f
+
+#******************************************************************************
+#* Johns Hopkins University
+#* Center For Astrophysical Sciences
+#* FUSE
+#******************************************************************************
+#*
+#* Synopsis: cf_make_all.csh
+#*
+#* Description: Creates 3 files from a Calfuse output (properly run):
+#*
+#* 1) An "all" file containing 1 extension per detector (= 8).
+#* Each extension contains a combined spectrum from the set
+#* of exposures, using "Xcorr" or "Background" method.
+#* 2) In the case of TTAG data, creates an "ano" file. Same as
+#* the "all" file but considering "night only" exposure time.
+#* 3) A National Virtual Observatory "nvo" file. One extension
+#* containing wavelengths that span the whole FUSE range.
+#*
+#* The Xcorr method consists in co-adding spectra, the latter
+#* being corrected for a possible shift. The Background method
+#* consists in combining all the IDF files.
+#*
+#* The Xcorr test is performed on 4 (detector, channel) pairs, the
+#* method of other pairs are given by them:
+#* LiF 1a -> Lif 1b
+#* LiF 2b -> LiF 2a
+#* SiC 1a -> Sic 1b
+#* Sic 2b -> Sic 2a
+#* In the script, the left segments are referred as to $seg (or
+#* $det) and the right segments are referred as to $seg2 (or
+#* $det2).
+#*
+#* When an expected data set is missing, the script stops, cleans
+#* directory, and returns 1.
+#*
+#* History: 04/15/05 1.0 tc First release
+#*
+#*****************************************************************************/
+
+# Set program path
+set rm = "/bin/rm -f"
+
+set cf_xcorr = cf_xcorr
+set cf_combine = cf_combine
+set cf_pack = cf_pack
+set cf_nvo = cf_nvo
+set modhead = modhead
+
+#set cf_xcorr = /home/vela/civeit/Work/CalFuse/Xcorr/New/cf_xcorr
+#set cf_combine = /home/vela/civeit/Work/CalFuse/Shiftexp/cf_combine
+#set cf_pack = /home/vela/civeit/Work/CalFuse/Pack/cf_pack
+#set cf_nvo = /home/vela/civeit/Work/CalFuse/Nvo/cf_nvo
+#set modhead = /home/vela/civeit/local/bin/modhead
+
+set cf_obsplot = /data1/fuse/calfuse/v3.1/idl/cf_obsplot.pro
+
+
+# Init var list
+set detector = (1a 2b)
+set channel = (lif sic)
+set resolution = (2 3 4)
+set obsmod = (hist ttag)
+
+# Determine the root name
+ls [A-Z][0-9][0-9][0-9][0-9][0-9][0-9][0-9]000asnf.fit >& tmp_asnf
+if ($? == 0) then
+ set asnf = `cat tmp_asnf`
+ set rn = ${asnf:s/000asnf.fit//}
+ $rm tmp_asnf
+else
+ echo "ERROR: asnf file is missing"
+ $rm tmp_asnf
+ goto crash
+endif
+
+# Clean tmp files that the script will create (safe)
+$rm tmp_xcorr.res tmp_bpm1.lis tmp_bpm2.lis tmp_combine.lis tmp_night_exp.lis
+$rm tmp_all_night_exp.lis tmp_good_exp.lis tmp_exp.lis tmp_seg_dn.lis tmp_seg_no.lis
+$rm DN_${rn}*.fit NO_${rn}*.fit
+
+foreach om ($obsmod)
+ foreach res ($resolution)
+ foreach chan ($channel)
+ foreach det ($detector)
+
+ # Find exposures that match the current segment
+ set seg = $det$chan$res$om
+ ls ${rn}[0-8][0-9][0-9]${seg}fcal.fit |& grep -v 000 > tmp_exp.lis # Reject EXP "9xx" and "000"
+
+ if ($? == 0) then # There are one or more exposures
+
+ echo " "
+ echo "*** Processing: $seg ***"
+ # [1a][lif] -> [1b][lif], [2b][lif] -> [2a][lif] etc...
+ if ($det == 1a) set det2 = 1b
+ if ($det == 2b) set det2 = 2a
+ set seg2 = $det2$chan$res$om
+
+ echo "----- cf_xcorr input -----"
+ cat tmp_exp.lis
+ echo "----------------------------"
+ $cf_xcorr tmp_exp.lis tmp_xcorr.res # Compute shift and sigma_shift
+ echo "----- cf_xcorr results -----"
+ cat tmp_xcorr.res
+ echo "----------------------------"
+
+ awk '{if ($5 > 0) print $6, $4, $5}' tmp_xcorr.res > tmp_all_night_exp.lis
+ awk '{if ($3 >= 0) print $6,$2}' tmp_xcorr.res > tmp_good_exp.lis
+ awk '{if (($3 >= 0) && ($5 > 0)) print $6,$2, $4, $5}' tmp_xcorr.res > tmp_night_exp.lis
+ set time_good = `awk 'BEGIN{$t = 0} {if ($3 >= 0) $t = $t + $4} END{print $t}' tmp_xcorr.res`
+ set time_bad = `awk 'BEGIN{$t = 0} {if ($3 < 0) $t = $t + $4} END{print $t}' tmp_xcorr.res`
+ echo "Xcorr time: $time_good - Background time: $time_bad"
+
+ if ($time_good > 2 * $time_bad) then
+
+ #
+ # --- Path 1: Optimize resolution ---
+ #
+
+ echo "Optimize resolution..."
+ set n_good = `cat tmp_good_exp.lis | wc -l`
+
+ # Extract [Day + Night] spectra
+ set s = DN_${rn}000${seg}fcal.fit
+ awk '{print "'$rn'"$1"'$seg'fcal.fit",$2}' tmp_good_exp.lis > tmp_combine.lis # Combine $seg [dn]
+ $cf_combine tmp_combine.lis $s -k
+ # $modhead "${s}[1]" NUM_EXP $n_good
+ $modhead "${s}[1]" COMBMETH XCORR
+ echo $s >> tmp_seg_dn.lis
+
+ set s = DN_${rn}000${seg2}fcal.fit
+ awk '{print "'$rn'"$1"'$seg2'fcal.fit",$2}' tmp_good_exp.lis > tmp_combine.lis # Combine $seg2 [dn]
+ $cf_combine tmp_combine.lis $s -k
+ # $modhead "${s}[1]" NUM_EXP $n_good
+ $modhead "${s}[1]" COMBMETH XCORR
+ echo $s >> tmp_seg_dn.lis
+
+ set n_night = `cat tmp_night_exp.lis | wc -l`
+ if ($om == ttag && $n_night > 0) then # Create and combine night only files
+
+ echo "*** Creating night only files ***"
+ set exp_nums = `awk '{print $1}' tmp_night_exp.lis`
+
+ foreach exp ($exp_nums)
+
+ # Create night-only BPM and FCAL files if they do not already exist.
+ set bno1 = NO_$rn$exp$det${om}fbpm.fit # Bad-pixel maps
+ set bno2 = NO_$rn$exp$det2${om}fbpm.fit
+ set cno1 = NO_$rn$exp${seg}fcal.fit # Extracted spectra
+ set cno2 = NO_$rn$exp${seg2}fcal.fit
+
+ set etime = `egrep "^$exp" tmp_night_exp.lis | awk '{print $3}'`
+ set ntime = `egrep "^$exp" tmp_night_exp.lis | awk '{print $4}'`
+ set ratio = `egrep "^$exp" tmp_night_exp.lis | awk '{printf "%.0f", 0.5+$4/$3*10.}'`
+
+ if (!(-e $cno1)) then
+ if ($etime == $ntime) then
+ echo "$cno1 is a symbolic link to $rn$exp${seg}fcal.fit"
+ ln -s $rn$exp${seg}fcal.fit $cno1
+ else
+
+ set idf_file = $rn$exp$det${om}fidf.fit
+ if (!(-e $bno1)) then
+ if ($ratio > 9) then
+ echo "$bno1 is a symbolic link to $rn$exp$det${om}fbpm.fit"
+ ln -s $rn$exp$det${om}fbpm.fit $bno1
+ else
+ echo "Creating BPM: $bno1 ..."
+ cf_bad_pixels -n $bno1 $idf_file
+ endif
+ endif
+
+ echo "Creating (LiF + SiC) FCAL: $cno1 ..."
+ cf_extract_spectra -n $bno1 -r NO_$rn$exp $idf_file # Existence of $bno1 is not required
+ endif
+ endif
+
+ if (!(-e $cno2)) then
+ if ($etime == $ntime) then
+ echo "Using a symbolic link to $cno2"
+ ln -s $rn$exp${seg2}fcal.fit NO_$rn$exp${seg2}fcal.fit
+ else
+
+ set idf_file = $rn$exp$det2${om}fidf.fit
+ if (!(-e $bno2)) then
+ if ($ratio > 9) then
+ echo "Using a symbolic link to $bno2"
+ ln -s $rn$exp$det2${om}fbpm.fit NO_$rn$exp$det2${om}fbpm.fit
+ else
+ echo "Creating BPM: $bno2 ..."
+ cf_bad_pixels -n $bno2 $idf_file
+ endif
+ endif
+
+ echo "Creating (LiF + SiC) FCAL: $cno2 ..."
+ cf_extract_spectra -n $bno2 -r NO_$rn$exp $idf_file # Existence of $bno2 is not required
+ endif
+ endif
+
+ end
+
+ # Combine exposures into a single spectrum.
+ set s = NO_${rn}000${seg}fcal.fit
+ awk '{print "NO_'$rn'"$1"'$seg'fcal.fit",$2}' tmp_night_exp.lis > tmp_combine.lis # Combine $seg [no]
+ $cf_combine tmp_combine.lis $s -k
+ # $modhead "${s}[1]" NUM_EXP $n_night
+ $modhead "${s}[0]" DAYNIGHT NIGHT
+ $modhead "${s}[1]" COMBMETH XCORR
+ echo $s >> tmp_seg_no.lis
+
+ set s = NO_${rn}000${seg2}fcal.fit
+ awk '{print "NO_'$rn'"$1"'$seg2'fcal.fit",$2}' tmp_night_exp.lis > tmp_combine.lis # Combine $seg2 [no]
+ $cf_combine tmp_combine.lis $s -k
+ # $modhead "${s}[1]" NUM_EXP $n_night
+ $modhead "${s}[0]" DAYNIGHT NIGHT
+ $modhead "${s}[1]" COMBMETH XCORR
+ echo $s >> tmp_seg_no.lis
+
+ endif
+
+ else
+
+ #
+ # --- Path 2: Optimize background ---
+ #
+
+ echo "Optimize background..."
+
+ # Combine IDF files
+ set idf1_all = DN_${rn}000$det${om}fidf.fit # Same for [dn] and [no]
+ set idf2_all = DN_${rn}000$det2${om}fidf.fit
+
+ if (!(-e $idf1_all)) then
+ echo "Creating IDF: $idf1_all ..."
+ ls ${rn}[0-8][0-9][0-9]$det${om}fidf.fit |& grep -v 000 > tmp_idf.lis # Reject EXP "9xx" and "000"
+ if ($? == 0) then # IDF files exist
+
+ set idf_lis = `awk '{printf "%s ",$1}' tmp_idf.lis`
+ idf_combine -c $idf1_all $idf_lis # Create combined IDF file for $seg
+ $rm tmp_idf.lis
+
+ else
+
+ echo "ERROR: IDF files are missing"
+ $rm -f tmp_idf.lis
+ goto crash
+
+ endif
+ endif
+
+ if (!(-e $idf2_all)) then
+ echo "Creating IDF: $idf2_all ..."
+ ls ${rn}[0-8][0-9][0-9]$det2${om}fidf.fit |& grep -v 000 > tmp_idf.lis # Reject EXP "9xx" and "000"
+ if ($? == 0) then # IDF files exist
+
+ set idf_lis = `awk '{printf "%s ",$1}' tmp_idf.lis`
+ idf_combine $idf2_all $idf_lis # Create combined IDF file for $seg2
+ $rm tmp_idf.lis
+
+ else
+
+ echo "ERROR: IDF files are missing"
+ $rm -f tmp_idf.lis
+ goto crash
+
+ endif
+ endif
+
+ # Get the number of (valid) combined IDF files
+ set tmp_buf = `$modhead $idf1_all NSPEC`
+ set n_comb1 = $tmp_buf[3]
+ set tmp_buf = `$modhead $idf1_all SPEC001`
+ set idf1_1 = $tmp_buf[3]
+ set tmp_buf = `$modhead $idf2_all NSPEC`
+ set n_comb2 = $tmp_buf[3]
+ set tmp_buf = `$modhead $idf2_all SPEC001`
+ set idf2_1 = $tmp_buf[3]
+
+ # Combine BPM files
+ set bpm1_all = DN_${rn}000$det${om}fbpm.fit
+ set bpm2_all = DN_${rn}000$det2${om}fbpm.fit
+
+ if (!(-e $bpm1_all)) then
+ echo "Combine all BPM (from IDF): $bpm1_all ..."
+ bpm_combine $bpm1_all $idf1_all # Create combined BPM file [dn] for $seg
+ endif
+
+ if (!(-e $bpm2_all)) then
+ echo "Combine all BPM (from IDF): $bpm2_all ..."
+ bpm_combine $bpm2_all $idf2_all # Idem for $seg2
+ endif
+
+ # Extract [Day + Night] spectra
+ set s = DN_${rn}000${seg}fcal.fit
+ set xxx = DN_${rn}xxx${seg}fcal.fit
+ if (!(-e $xxx)) cf_extract_spectra -r DN_${rn}xxx $idf1_all # Avoid overwrite LiF | SiC
+ echo $xxx > tmp_combine.lis
+ $cf_combine tmp_combine.lis $s -k # Does not combine, just update keywords
+ $modhead "${s}[0]" NSPEC $n_comb1
+ $modhead "${s}[0]" SPEC001 $idf1_1
+ $modhead "${s}[1]" COMBMETH BACKGRND
+ echo $s >> tmp_seg_dn.lis
+
+ set s = DN_${rn}000${seg2}fcal.fit
+ set xxx = DN_${rn}xxx${seg2}fcal.fit
+ if (!(-e $xxx)) cf_extract_spectra -r DN_${rn}xxx $idf2_all # Avoid overwrite LiF | SiC
+ echo $xxx > tmp_combine.lis
+ $cf_combine tmp_combine.lis $s -k # Does not combine, just update keywords
+ $modhead "${s}[0]" NSPEC $n_comb2
+ $modhead "${s}[0]" SPEC001 $idf2_1
+ $modhead "${s}[1]" COMBMETH BACKGRND
+ echo $s >> tmp_seg_dn.lis
+
+ set n_night = `cat tmp_all_night_exp.lis | wc -l`
+ if ($om == ttag && $n_night > 0) then # Create and combine night only files
+
+ echo "*** Creating night only files ***"
+ set exp_nums = `awk '{print $1}' tmp_all_night_exp.lis`
+ $rm tmp_bpm1.lis tmp_bpm2.lis
+
+ foreach exp ($exp_nums)
+
+ # Create bpm night only files (if they do not exist yet)
+ set bno1 = NO_$rn$exp$det${om}fbpm.fit
+ set bno2 = NO_$rn$exp$det2${om}fbpm.fit
+
+ set idf_file = $rn$exp$det${om}fidf.fit
+ if (!(-e $bno1)) then
+ echo "Creating BPM: $bno1 ..."
+ cf_bad_pixels -n $bno1 $idf_file
+ endif
+ if (-e $bno1) echo $bno1 >> tmp_bpm1.lis # If valid, add in $seg list
+
+ set idf_file = $rn$exp$det2${om}fidf.fit
+ if (!(-e $bno2)) then
+ echo "Creating BPM: $bno2 ..."
+ cf_bad_pixels -n $bno2 $idf_file
+ endif
+ if (-e $bno2) echo $bno2 >> tmp_bpm2.lis # If valid, add in $seg2 list
+
+ end
+
+
+ # Combine BPM for $seg and extract spectra
+
+ set bpm1_all = NO_${rn}000$det${om}fbpm.fit
+ set n_bpm = `cat tmp_bpm1.lis | wc -l`
+ echo "Number of valid BPM files: $n_bpm"
+
+ if ($n_bpm > 0) then
+
+ echo $n_bpm > tmp_bpm.lis
+ cat tmp_bpm1.lis >> tmp_bpm.lis
+
+ if (!(-e $bpm1_all)) then
+ echo "Combine all BPM (from list): $bpm1_all ..."
+ bpm_combine $bpm1_all tmp_bpm.lis # Create combined BPM file [no] for $seg
+ endif
+ $rm tmp_bpm.lis
+
+ endif
+
+ # Extract [Night only] spectra. The existence of $bpm1_all is not required
+ set s = NO_${rn}000${seg}fcal.fit
+ set xxx = NO_${rn}xxx${seg}fcal.fit
+ if (!(-e $xxx)) cf_extract_spectra -n $bpm1_all -r NO_${rn}xxx $idf1_all # Avoid overwrite LiF | SiC
+ echo $xxx > tmp_combine.lis
+ $cf_combine tmp_combine.lis $s -k # Does not combine, just update keywords
+ $modhead "${s}[0]" NSPEC $n_comb1
+ $modhead "${s}[0]" SPEC001 $idf1_1
+ $modhead "${s}[1]" COMBMETH BACKGRND
+ echo $s >> tmp_seg_no.lis
+
+
+ # Combine BPM for $seg2 and extract spectra
+
+ set bpm2_all = NO_${rn}000$det2${om}fbpm.fit
+ set n_bpm = `cat tmp_bpm2.lis | wc -l`
+ echo "Number of valid BPM files: $n_bpm"
+
+ if ($n_bpm > 0) then
+
+ echo $n_bpm > tmp_bpm.lis
+ cat tmp_bpm2.lis >> tmp_bpm.lis
+
+ if (!(-e $bpm2_all)) then
+ echo "Combine all BPM (from list): $bpm2_all ..."
+ bpm_combine $bpm2_all tmp_bpm.lis # Create combined BPM file [no] for $seg2
+ endif
+ $rm tmp_bpm.lis
+
+ endif
+
+ # Extract [Night only] spectra. The existence of $bpm2_all is not required
+ set s = NO_${rn}000${seg2}fcal.fit
+ set xxx = NO_${rn}xxx${seg2}fcal.fit
+ if (!(-e $xxx)) cf_extract_spectra -n $bpm2_all -r NO_${rn}xxx $idf2_all # Avoid overwrite LiF | SiC
+ echo $xxx > tmp_combine.lis
+ $cf_combine tmp_combine.lis $s -k # Does not combine, just update keywords
+ $modhead "${s}[0]" NSPEC $n_comb2
+ $modhead "${s}[0]" SPEC001 $idf2_1
+ $modhead "${s}[1]" COMBMETH BACKGRND
+ echo $s >> tmp_seg_no.lis
+
+ endif
+ endif
+ endif
+ end
+
+ $rm tmp_xcorr.res tmp_bpm1.lis tmp_bpm2.lis tmp_combine.lis
+ $rm tmp_all_night_exp.lis tmp_good_exp.lis tmp_exp.lis tmp_night_exp.lis
+
+ end
+
+ # Pack the 8 [detector][channel] pairs together ([dn] and [no] for ttag)
+ if (-e tmp_seg_dn.lis) then
+
+ set fcal_all = ${rn}00000all$res${om}fcal.fit # Final output name
+ $rm $fcal_all # Clean (safe)
+ set n_segs = `cat tmp_seg_dn.lis | wc -l`
+
+ if (!($n_segs == 8)) then
+
+ @ mseg = 8 - $n_segs
+ echo "ERROR: $mseg (day + night) segments are missing"
+ $rm tmp_seg_dn.lis
+ goto crash
+
+ else
+
+ $cf_pack tmp_seg_dn.lis $fcal_all
+ $rm tmp_seg_dn.lis
+
+ # Plot figures
+ echo ".compile '$cf_obsplot'" > tmp_idl_batch
+ echo "cf_obsplot, '$rn'" >> tmp_idl_batch
+ echo "exit" >> tmp_idl_batch
+ idl tmp_idl_batch
+ $rm tmp_idl_batch
+
+ # Create National Virtual Observatory file
+ set nvo_file = ${rn}00000nvo$res${om}fcal.fit
+ $rm $nvo_file # Clean (safe)
+ $cf_nvo $fcal_all $nvo_file # Create file
+
+ if (-e tmp_seg_no.lis) then
+
+ set fcal_all = ${rn}00000ano$res${om}fcal.fit # Final output name
+ $rm $fcal_all # Clean (safe)
+ set n_segs = `cat tmp_seg_no.lis | wc -l`
+
+ if (!($n_segs == 8)) then
+
+ @ mseg = 8 - $n_segs
+ echo "ERROR: $mseg (night only) segments are missing"
+ $rm tmp_seg_no.lis
+ goto crash
+
+ else
+
+ $cf_pack tmp_seg_no.lis $fcal_all
+ $rm tmp_seg_no.lis
+
+ endif
+
+ endif
+ endif
+ endif
+ end
+end
+
+# Clean [dn] and [no] files. Just keep: all, (ano) and nvo
+$rm DN_${rn}*.fit NO_${rn}*.fit
+exit(0)
+
+
+crash: # Procedure when script crashes
+
+# Clean directory
+$rm tmp_xcorr.res tmp_bpm1.lis tmp_bpm2.lis tmp_combine.lis tmp_night_exp.lis
+$rm tmp_all_night_exp.lis tmp_good_exp.lis tmp_exp.lis tmp_seg_dn.lis tmp_seg_no.lis
+$rm DN_*.fit NO_*.fit
+
+# Return 1
+exit(1)
diff --git a/bin/cf_make_all_obs.csh b/bin/cf_make_all_obs.csh
new file mode 100755
index 0000000..2a97247
--- /dev/null
+++ b/bin/cf_make_all_obs.csh
@@ -0,0 +1,555 @@
+#!/usr/local/bin/tcsh -f
+
+#******************************************************************************
+#* Johns Hopkins University
+#* Center For Astrophysical Sciences
+#* FUSE
+#******************************************************************************
+#*
+#* Synopsis: cf_make_all_obs.csh association_file
+#*
+#* Description: Creates 3 files from Calfuse output (properly run):
+#*
+#* 1) An "all" file containing 1 extension per detector (= 8).
+#* Each extension contains a combined spectrum from the set
+#* of exposures, using "Xcorr" or "Background" method.
+#* 2) In the case of TTAG data, creates an "ano" file. Same as
+#* the "all" file but considering "night only" exposure time.
+#* 3) A National Virtual Observatory "nvo" file. One extension
+#* containing wavelengths that span the whole FUSE range.
+#*
+#* The Xcorr method consists of co-adding spectra, the latter
+#* being corrected for a possible shift. The Background method
+#* consists of combining all the IDF files.
+#*
+#* The Xcorr test is performed on 4 (detector, channel) pairs, the
+#* method of other pairs are given by them:
+#* LiF 1a -> Lif 1b
+#* LiF 2b -> LiF 2a
+#* SiC 1a -> Sic 1b
+#* Sic 2b -> Sic 2a
+#* In the script, the left segments are referred as to $seg (or
+#* $det) and the right segments are referred as to $seg2 (or
+#* $det2).
+#*
+#* When an expected data set is missing, the script stops, cleans
+#* the directory, and returns 1.
+#*
+#* History: 04/15/05 1.0 tc First release
+#* 08/22/05 1.1 wvd Argument is name of association file.
+#* 10/20/05 1.2 wvd Use idl_obsplot.pl to call cf_obsplot.
+#* 10/25/05 1.3 wvd Add option to delete BPM or IDF files.
+#* 03/21/06 1.4 wvd If there's only one exposure, always
+#* follow the cross-correlation path.
+#* Don't check the number of night-only
+#* spectra before calling cf_pack.
+#* 03/28/06 1.5 wvd If there's no good time in any exposure,
+#* follow the cross-correlation path.
+#* 04/27/06 1.6 wvd Be smarter when discarding 000 files.
+#* Always use cross-corr for HIST data.
+#* 05/23/06 1.7 wvd Move -k to proper spot after cf_combine.
+#* 06/02/06 1.8 wvd If OBJCLASS = 7 (Sky Background)
+#* always combine IDF files.
+#* 06/22/06 1.9 wvd Call idf_combine with -z flag.
+#* 05/24/07 1.10 bot If only 900+ spectra are available,
+#* use them.
+#* 04/04/08 1.11 bot Ignore EXP_STAT in cf_combine for HIST
+#* data.
+#* 07/25/08 1.12 wvd Ignore EXP_STAT in cf_combine and
+#* idf_combine for BR-EARTH observations
+#* (S100, M106, and 900+ exposures).
+#* 08/08/08 1.13 wvd Don't ignore EXP_STAT for 900+ exposures.
+#* 08/15/08 1.14 wvd Call cf_make_900_obs.csh
+#* to make quick-look airglow plot.
+#*
+#*****************************************************************************/
+
+# Delete files after processing? (Default is no.)
+#set DELETE_IDF # Delete intermediate data files
+#set DELETE_BPM # Delete bad-pixel map files
+
+# Set program path
+set rm = "/bin/rm -f"
+
+set cf_xcorr = cf_xcorr
+set cf_combine = cf_combine
+set cf_pack = cf_pack
+set cf_nvo = cf_nvo
+set idl_obsplot = idl_obsplot.pl
+set modhead = modhead
+
+#set cf_xcorr = /home/vela/civeit/Work/CalFuse/Xcorr/New/cf_xcorr
+#set cf_combine = /home/vela/civeit/Work/CalFuse/Shiftexp/cf_combine
+#set cf_pack = /home/vela/civeit/Work/CalFuse/Pack/cf_pack
+#set cf_nvo = /home/vela/civeit/Work/CalFuse/Nvo/cf_nvo
+#set modhead = /home/vela/civeit/local/bin/modhead
+
+#set cf_obsplot = /data1/fuse/calfuse/v3.1/idl/cf_obsplot.pro
+
+# Init var list
+set detector = (1a 2b)
+set channel = (lif sic)
+set resolution = (2 3 4)
+set obsmod = (hist ttag)
+
+# Determine the root name and the program ID
+set asnf = $1
+set rn = ${asnf:s/000asnf.fit//}
+set pid = `echo $rn | awk '{print substr($1, 1, 4)}'`
+
+# Determine the object class
+set tmp_file = `ls ${rn}*fcal.fit | awk '{if (NR == 1) print}'`
+set tmp_buf = `$modhead $tmp_file OBJCLASS`
+set objclass = $tmp_buf[2]
+
+# Clean tmp files that the script will create (safe)
+$rm tmp_xcorr.res tmp_bpm1.lis tmp_bpm2.lis tmp_combine.lis tmp_night_exp.lis
+$rm tmp_all_night_exp.lis tmp_good_exp.lis tmp_exp.lis tmp_seg_dn.lis tmp_seg_no.lis
+$rm DN_${rn}*.fit NO_${rn}*.fit
+
+foreach om ($obsmod)
+ foreach res ($resolution)
+ foreach chan ($channel)
+ foreach det ($detector)
+
+ set ignore_exp_stat = ''
+ if ($om == hist) set ignore_exp_stat = -a
+ if ($pid == S100) set ignore_exp_stat = -a
+ if ($pid == M106) set ignore_exp_stat = -a
+
+ # Find exposures that match the current segment
+ set seg = $det$chan$res$om
+ set readfiles = 0
+ ls ${rn}[0-8][0-9][0-9]${seg}fcal.fit |& grep -v 000${seg} > tmp_exp.lis # Reject EXP "9xx" and "000"
+
+ if ($? == 0) then
+ set readfiles = 1
+ else
+ ls ${rn}9[0-9][0-9]${seg}fcal.fit |& grep -v 000${seg} > tmp_exp.lis # Keep only "9xx" exposures
+ if ($? == 0) set readfiles = 2
+ endif
+
+ if ($readfiles >= 1) then # There are one or more exposures
+
+ echo " "
+ echo "*** Processing: $seg ***"
+ # [1a][lif] -> [1b][lif], [2b][lif] -> [2a][lif] etc...
+ if ($det == 1a) set det2 = 1b
+ if ($det == 2b) set det2 = 2a
+ set seg2 = $det2$chan$res$om
+
+ echo "----- cf_xcorr input -----"
+ cat tmp_exp.lis
+ echo "----------------------------"
+ $cf_xcorr tmp_exp.lis tmp_xcorr.res # Compute shift and sigma_shift
+ echo "----- cf_xcorr results -----"
+ cat tmp_xcorr.res
+ echo "----------------------------"
+
+ awk '{if ($5 > 0) print $6, $4, $5}' tmp_xcorr.res > tmp_all_night_exp.lis
+ awk '{if ($3 >= 0) print $6, $2}' tmp_xcorr.res > tmp_good_exp.lis
+ awk '{if (($3 >= 0) && ($5 > 0)) print $6, $2, $4, $5}' tmp_xcorr.res > tmp_night_exp.lis
+ set time_good = `awk 'BEGIN{$t = 0} {if ($3 >= 0) $t = $t + $4} END{print $t}' tmp_xcorr.res`
+ set time_bad = `awk 'BEGIN{$t = 0} {if ($3 < 0) $t = $t + $4} END{print $t}' tmp_xcorr.res`
+ echo "Xcorr time: $time_good - Background time: $time_bad"
+ set n_exp = `cat tmp_xcorr.res | wc -l`
+
+ if (($time_good > 2 * $time_bad && $objclass != 7) || ($time_good == 0 && $time_bad == 0) || $n_exp == 1 || $om == hist) then
+
+ #
+ # --- Path 1: Optimize resolution ---
+ #
+
+ echo "Optimize resolution..."
+ set n_good = `cat tmp_good_exp.lis | wc -l`
+
+ # Extract [Day + Night] spectra
+ set s = DN_${rn}000${seg}fcal.fit
+ awk '{print "'$rn'"$1"'$seg'fcal.fit",$2}' tmp_good_exp.lis > tmp_combine.lis # Combine $seg [dn]
+ # echo "----- Combining Files ----- "
+ # cat tmp_combine.lis
+ # echo "Output: " $s
+ $cf_combine -k $ignore_exp_stat tmp_combine.lis $s
+ # $modhead "${s}[1]" NUM_EXP $n_good
+ $modhead "${s}[1]" COMBMETH XCORR
+ echo $s >> tmp_seg_dn.lis
+
+ set s = DN_${rn}000${seg2}fcal.fit
+ awk '{print "'$rn'"$1"'$seg2'fcal.fit",$2}' tmp_good_exp.lis > tmp_combine.lis # Combine $seg2 [dn]
+ # echo "----- Combining Files ----- "
+ # cat tmp_combine.lis
+ # echo "Output: " $s
+ $cf_combine -k $ignore_exp_stat tmp_combine.lis $s
+ # $modhead "${s}[1]" NUM_EXP $n_good
+ $modhead "${s}[1]" COMBMETH XCORR
+ echo $s >> tmp_seg_dn.lis
+
+ set n_night = `cat tmp_night_exp.lis | wc -l`
+ if ($om == ttag && $n_night > 0) then # Create and combine night only files
+
+ echo "*** Creating night only files ***"
+ set exp_nums = `awk '{print $1}' tmp_night_exp.lis`
+
+ foreach exp ($exp_nums)
+
+ # Create night-only BPM and FCAL files if they do not already exist.
+ set bno1 = NO_$rn$exp$det${om}fbpm.fit # Bad-pixel maps
+ set bno2 = NO_$rn$exp$det2${om}fbpm.fit
+ set cno1 = NO_$rn$exp${seg}fcal.fit # Extracted spectra
+ set cno2 = NO_$rn$exp${seg2}fcal.fit
+
+ set etime = `egrep "^$exp" tmp_night_exp.lis | awk '{print $3}'`
+ set ntime = `egrep "^$exp" tmp_night_exp.lis | awk '{print $4}'`
+ set ratio = `egrep "^$exp" tmp_night_exp.lis | awk '{printf "%.0f", 0.5+$4/$3*10.}'`
+
+ if (!(-e $cno1)) then
+ if ($etime == $ntime) then
+ echo "$cno1 is a symbolic link to $rn$exp${seg}fcal.fit"
+ ln -s $rn$exp${seg}fcal.fit $cno1
+ else
+
+ set idf_file = $rn$exp$det${om}fidf.fit
+ if (!(-e $bno1)) then
+ if ($ratio > 9) then
+ echo "$bno1 is a symbolic link to $rn$exp$det${om}fbpm.fit"
+ ln -s $rn$exp$det${om}fbpm.fit $bno1
+ else
+ echo "Creating BPM: $bno1 ..."
+ cf_bad_pixels -n $bno1 $idf_file
+ endif
+ endif
+
+ echo "Creating (LiF + SiC) FCAL: $cno1 ..."
+ cf_extract_spectra -n $bno1 -r NO_$rn$exp $idf_file # Existence of $bno1 is not required
+ endif
+ endif
+
+ if (!(-e $cno2)) then
+ if ($etime == $ntime) then
+ echo "Using a symbolic link to $cno2"
+ ln -s $rn$exp${seg2}fcal.fit NO_$rn$exp${seg2}fcal.fit
+ else
+
+ set idf_file = $rn$exp$det2${om}fidf.fit
+ if (!(-e $bno2)) then
+ if ($ratio > 9) then
+ echo "Using a symbolic link to $bno2"
+ ln -s $rn$exp$det2${om}fbpm.fit NO_$rn$exp$det2${om}fbpm.fit
+ else
+ echo "Creating BPM: $bno2 ..."
+ cf_bad_pixels -n $bno2 $idf_file
+ endif
+ endif
+
+ echo "Creating (LiF + SiC) FCAL: $cno2 ..."
+ cf_extract_spectra -n $bno2 -r NO_$rn$exp $idf_file # Existence of $bno2 is not required
+ endif
+ endif
+
+ end
+
+ # Combine exposures into a single spectrum.
+ set s = NO_${rn}000${seg}fcal.fit
+ awk '{print "NO_'$rn'"$1"'$seg'fcal.fit",$2}' tmp_night_exp.lis > tmp_combine.lis # Combine $seg [no]
+ $cf_combine -k $ignore_exp_stat tmp_combine.lis $s
+ # $modhead "${s}[1]" NUM_EXP $n_night
+ $modhead "${s}[0]" DAYNIGHT NIGHT
+ $modhead "${s}[1]" COMBMETH XCORR
+ echo $s >> tmp_seg_no.lis
+
+ set s = NO_${rn}000${seg2}fcal.fit
+ awk '{print "NO_'$rn'"$1"'$seg2'fcal.fit",$2}' tmp_night_exp.lis > tmp_combine.lis # Combine $seg2 [no]
+ $cf_combine -k $ignore_exp_stat tmp_combine.lis $s
+ # $modhead "${s}[1]" NUM_EXP $n_night
+ $modhead "${s}[0]" DAYNIGHT NIGHT
+ $modhead "${s}[1]" COMBMETH XCORR
+ echo $s >> tmp_seg_no.lis
+
+ endif
+
+ else
+
+ #
+ # --- Path 2: Optimize background ---
+ #
+
+ echo "Optimize background..."
+
+ # Combine IDF files
+ set idf1_all = DN_${rn}000$det${om}fidf.fit # Same for [dn] and [no]
+ set idf2_all = DN_${rn}000$det2${om}fidf.fit
+
+ if (!(-e $idf1_all)) then
+ echo "Creating IDF: $idf1_all ..."
+ if ($readfiles == 1) then
+ ls ${rn}[0-8][0-9][0-9]$det${om}fidf.fit |& grep -v 000${det} > tmp_idf.lis # Reject EXP "9xx" and "000"
+ else
+ ls ${rn}9[0-9][0-9]$det${om}fidf.fit |& grep -v 000${det} > tmp_idf.lis # Consider only airglow
+ endif
+ if ($? == 0) then # IDF files exist
+
+ set idf_lis = `awk '{printf "%s ",$1}' tmp_idf.lis`
+ # echo "Combining IDF files: " $idf_lis
+ idf_combine -cz $ignore_exp_stat $idf1_all $idf_lis # Create combined IDF file for $seg
+ $rm tmp_idf.lis
+
+ else
+
+ echo "ERROR: IDF files are missing"
+ $rm tmp_idf.lis
+ goto crash
+
+ endif
+ endif
+
+ if (!(-e $idf2_all)) then
+ echo "Creating IDF: $idf2_all ..."
+ if ($readfiles == 1) then
+ ls ${rn}[0-8][0-9][0-9]$det2${om}fidf.fit |& grep -v 000${det2} > tmp_idf.lis # Reject EXP "9xx" and "000"
+ else
+ ls ${rn}9[0-9][0-9]$det2${om}fidf.fit |& grep -v 000${det2} > tmp_idf.lis # Consider only airglow
+ endif
+ if ($? == 0) then # IDF files exist
+
+ set idf_lis = `awk '{printf "%s ",$1}' tmp_idf.lis`
+ # echo "Combining IDF files: " $idf_lis
+ idf_combine -cz $ignore_exp_stat $idf2_all $idf_lis # Create combined IDF file for $seg2
+ $rm tmp_idf.lis
+
+ else
+
+ echo "ERROR: IDF files are missing"
+ $rm tmp_idf.lis
+ goto crash
+
+ endif
+ endif
+
+ # Get the number of (valid) combined IDF files
+ set tmp_buf = `$modhead $idf1_all NSPEC`
+ set n_comb1 = $tmp_buf[3]
+ set tmp_buf = `$modhead $idf1_all SPEC001`
+ set idf1_1 = $tmp_buf[3]
+ set tmp_buf = `$modhead $idf2_all NSPEC`
+ set n_comb2 = $tmp_buf[3]
+ set tmp_buf = `$modhead $idf2_all SPEC001`
+ set idf2_1 = $tmp_buf[3]
+
+ # Combine BPM files
+ set bpm1_all = DN_${rn}000$det${om}fbpm.fit
+ set bpm2_all = DN_${rn}000$det2${om}fbpm.fit
+
+ if (!(-e $bpm1_all)) then
+ echo "Combine all BPM (from IDF): $bpm1_all ..."
+ bpm_combine $bpm1_all $idf1_all # Create combined BPM file [dn] for $seg
+ endif
+
+ if (!(-e $bpm2_all)) then
+ echo "Combine all BPM (from IDF): $bpm2_all ..."
+ bpm_combine $bpm2_all $idf2_all # Idem for $seg2
+ endif
+
+ # Extract [Day + Night] spectra
+ set s = DN_${rn}000${seg}fcal.fit
+ set xxx = DN_${rn}xxx${seg}fcal.fit
+ if (!(-e $xxx)) cf_extract_spectra -r DN_${rn}xxx $idf1_all # Avoid overwrite LiF | SiC
+ echo $xxx > tmp_combine.lis
+ $cf_combine -k $ignore_exp_stat tmp_combine.lis $s
+ $modhead "${s}[0]" NSPEC $n_comb1
+ $modhead "${s}[0]" SPEC001 $idf1_1
+ $modhead "${s}[1]" COMBMETH BACKGRND
+ echo $s >> tmp_seg_dn.lis
+
+ set s = DN_${rn}000${seg2}fcal.fit
+ set xxx = DN_${rn}xxx${seg2}fcal.fit
+ if (!(-e $xxx)) cf_extract_spectra -r DN_${rn}xxx $idf2_all # Avoid overwrite LiF | SiC
+ echo $xxx > tmp_combine.lis
+ $cf_combine -k $ignore_exp_stat tmp_combine.lis $s
+ $modhead "${s}[0]" NSPEC $n_comb2
+ $modhead "${s}[0]" SPEC001 $idf2_1
+ $modhead "${s}[1]" COMBMETH BACKGRND
+ echo $s >> tmp_seg_dn.lis
+
+ set n_night = `cat tmp_all_night_exp.lis | wc -l`
+ if ($om == ttag && $n_night > 0) then # Create and combine night only files
+
+ echo "*** Creating night only files ***"
+ set exp_nums = `awk '{print $1}' tmp_all_night_exp.lis`
+ $rm tmp_bpm1.lis tmp_bpm2.lis
+
+ foreach exp ($exp_nums)
+
+ # Create bpm night only files (if they do not exist yet)
+ set bno1 = NO_$rn$exp$det${om}fbpm.fit
+ set bno2 = NO_$rn$exp$det2${om}fbpm.fit
+
+ set idf_file = $rn$exp$det${om}fidf.fit
+ if (!(-e $bno1)) then
+ echo "Creating BPM: $bno1 ..."
+ cf_bad_pixels -n $bno1 $idf_file
+ endif
+ if (-e $bno1) echo $bno1 >> tmp_bpm1.lis # If valid, add in $seg list
+
+ set idf_file = $rn$exp$det2${om}fidf.fit
+ if (!(-e $bno2)) then
+ echo "Creating BPM: $bno2 ..."
+ cf_bad_pixels -n $bno2 $idf_file
+ endif
+ if (-e $bno2) echo $bno2 >> tmp_bpm2.lis # If valid, add in $seg2 list
+
+ end
+
+
+ # Combine BPM for $seg and extract spectra
+
+ set bpm1_all = NO_${rn}000$det${om}fbpm.fit
+ set n_bpm = `cat tmp_bpm1.lis | wc -l`
+ echo "Number of valid BPM files: $n_bpm"
+
+ if ($n_bpm > 0) then
+
+ echo $n_bpm > tmp_bpm.lis
+ cat tmp_bpm1.lis >> tmp_bpm.lis
+
+ if (!(-e $bpm1_all)) then
+ echo "Combine all BPM (from list): $bpm1_all ..."
+ bpm_combine $bpm1_all tmp_bpm.lis # Create combined BPM file [no] for $seg
+ endif
+ $rm tmp_bpm.lis
+
+ endif
+
+ # Extract [Night only] spectra. The existence of $bpm1_all is not required
+ set s = NO_${rn}000${seg}fcal.fit
+ set xxx = NO_${rn}xxx${seg}fcal.fit
+ if (!(-e $xxx)) cf_extract_spectra -n $bpm1_all -r NO_${rn}xxx $idf1_all # Avoid overwrite LiF | SiC
+ echo $xxx > tmp_combine.lis
+ $cf_combine -k $ignore_exp_stat tmp_combine.lis $s
+ $modhead "${s}[0]" NSPEC $n_comb1
+ $modhead "${s}[0]" SPEC001 $idf1_1
+ $modhead "${s}[1]" COMBMETH BACKGRND
+ echo $s >> tmp_seg_no.lis
+
+
+ # Combine BPM for $seg2 and extract spectra
+
+ set bpm2_all = NO_${rn}000$det2${om}fbpm.fit
+ set n_bpm = `cat tmp_bpm2.lis | wc -l`
+ echo "Number of valid BPM files: $n_bpm"
+
+ if ($n_bpm > 0) then
+
+ echo $n_bpm > tmp_bpm.lis
+ cat tmp_bpm2.lis >> tmp_bpm.lis
+
+ if (!(-e $bpm2_all)) then
+ echo "Combine all BPM (from list): $bpm2_all ..."
+ bpm_combine $bpm2_all tmp_bpm.lis # Create combined BPM file [no] for $seg2
+ endif
+ $rm tmp_bpm.lis
+
+ endif
+
+ # Extract [Night only] spectra. The existence of $bpm2_all is not required
+ set s = NO_${rn}000${seg2}fcal.fit
+ set xxx = NO_${rn}xxx${seg2}fcal.fit
+ if (!(-e $xxx)) cf_extract_spectra -n $bpm2_all -r NO_${rn}xxx $idf2_all # Avoid overwrite LiF | SiC
+ echo $xxx > tmp_combine.lis
+ $cf_combine -k $ignore_exp_stat tmp_combine.lis $s
+ $modhead "${s}[0]" NSPEC $n_comb2
+ $modhead "${s}[0]" SPEC001 $idf2_1
+ $modhead "${s}[1]" COMBMETH BACKGRND
+ echo $s >> tmp_seg_no.lis
+
+ endif
+ endif
+ endif
+ end
+
+ $rm tmp_xcorr.res tmp_bpm1.lis tmp_bpm2.lis tmp_combine.lis
+ $rm tmp_all_night_exp.lis tmp_good_exp.lis tmp_exp.lis tmp_night_exp.lis
+
+ end
+
+ # Pack the 8 [detector][channel] pairs together ([dn] and [no] for ttag)
+ if (-e tmp_seg_dn.lis) then
+
+ set fcal_all = ${rn}00000all$res${om}fcal.fit # Final output name
+ $rm $fcal_all # Clean (safe)
+ set n_segs = `cat tmp_seg_dn.lis | wc -l`
+
+ if (!($n_segs == 8)) then
+
+ @ mseg = 8 - $n_segs
+ echo "ERROR: $mseg (day + night) segments are missing"
+ $rm tmp_seg_dn.lis
+ goto crash
+
+ else
+
+ $cf_pack tmp_seg_dn.lis $fcal_all
+ $rm tmp_seg_dn.lis
+
+ # Plot figures
+ $idl_obsplot {$rn}
+
+ # Create National Virtual Observatory file
+ set nvo_file = ${rn}00000nvo$res${om}fcal.fit
+ $rm $nvo_file # Clean (safe)
+ $cf_nvo $fcal_all $nvo_file # Create file
+
+ if (-e tmp_seg_no.lis) then
+
+ set fcal_all = ${rn}00000ano$res${om}fcal.fit # Final output name
+ $rm $fcal_all # Clean (safe)
+ set n_segs = `cat tmp_seg_no.lis | wc -l`
+
+ # if (!($n_segs == 8)) then
+ #
+ # @ mseg = 8 - $n_segs
+ # echo "ERROR: $mseg (night only) segments are missing"
+ # $rm tmp_seg_no.lis
+ # # goto crash
+ #
+ # else
+
+ $cf_pack tmp_seg_no.lis $fcal_all
+ $rm tmp_seg_no.lis
+
+ # endif
+
+ endif
+ endif
+ endif
+ end
+end
+
+# Clean [dn] and [no] files. Just keep all, (ano) and nvo
+$rm DN_${rn}*.fit NO_${rn}*.fit
+
+# Delete IDF files
+if $?DELETE_IDF then
+ echo "NOTE: Deleting intermediate data files."
+ $rm ${rn}*idf.fit
+endif
+
+# Delete bad-pixel-map (bpm) files
+if $?DELETE_BPM then
+ echo "NOTE: Deleting bad pixel map (bpm) files."
+ $rm ${rn}*bpm.fit
+endif
+
+# Call routine to make quick-look airglow plot.
+cf_make_900_obs.csh $1
+
+exit(0)
+
+crash: # Procedure when script crashes
+
+# Clean directory
+$rm tmp_xcorr.res tmp_bpm1.lis tmp_bpm2.lis tmp_combine.lis tmp_night_exp.lis
+$rm tmp_all_night_exp.lis tmp_good_exp.lis tmp_exp.lis tmp_seg_dn.lis tmp_seg_no.lis
+$rm DN_*.fit NO_*.fit
+
+# Return 1
+exit(1)
diff --git a/bin/cfsetup.csh b/bin/cfsetup.csh
new file mode 100644
index 0000000..94dc3aa
--- /dev/null
+++ b/bin/cfsetup.csh
@@ -0,0 +1,31 @@
+# To execute, type "source cfsetup.csh"
+#
+set CF_DIR="${HOME}/calfuse"
+set CF_VERSION="v3.2"
+setenv PATH "${CF_DIR}/${CF_VERSION}/bin:${PATH}"
+setenv CF_CALDIR "${CF_DIR}/${CF_VERSION}/calfiles"
+setenv CF_PARMDIR "${CF_DIR}/${CF_VERSION}/parmfiles"
+setenv CF_IDLDIR "${CF_DIR}/${CF_VERSION}/idl"
+#
+if ( `uname -s` !~ Darwin ) then
+ if ( $?LD_LIBRARY_PATH ) then
+ setenv LD_LIBRARY_PATH "${CF_DIR}/${CF_VERSION}/lib:${LD_LIBRARY_PATH}"
+ else
+ setenv LD_LIBRARY_PATH "${CF_DIR}/${CF_VERSION}/lib"
+ endif
+else
+ if ( $?DYLD_LIBRARY_PATH ) then
+ setenv DYLD_LIBRARY_PATH "${CF_DIR}/${CF_VERSION}/lib:${DYLD_LIBRARY_PATH}"
+ else
+ setenv DYLD_LIBRARY_PATH "${CF_DIR}/${CF_VERSION}/lib"
+ endif
+endif
+
+set tcsh_path=`which tcsh`
+if ( $tcsh_path != '/usr/local/bin/tcsh' ) then
+ cp ${CF_DIR}/${CF_VERSION}/bin/calfuse.csh ${CF_DIR}/${CF_VERSION}/bin/calfuse_sv.csh
+ sed -e "s#/usr/local/bin/tcsh#${tcsh_path}#g" ${CF_DIR}/${CF_VERSION}/bin/calfuse_sv.csh > ${CF_DIR}/${CF_VERSION}/bin/calfuse.csh
+endif
+
+rm -f ${CF_DIR}/${CF_VERSION}/bin/calfuse
+ln -sf ${CF_DIR}/${CF_VERSION}/bin/calfuse.csh ${CF_DIR}/${CF_VERSION}/bin/calfuse
diff --git a/bin/cfsetup.sh b/bin/cfsetup.sh
new file mode 100644
index 0000000..b2f5bb1
--- /dev/null
+++ b/bin/cfsetup.sh
@@ -0,0 +1,20 @@
+# To execute, type "source cfsetup.sh"
+#
+CF_DIR="${HOME}/calfuse"
+CF_VERSION="v3.2"
+export PATH="${CF_DIR}/${CF_VERSION}/bin:${PATH}"
+export LD_LIBRARY_PATH="${CF_DIR}/${CF_VERSION}/lib:${LD_LIBRARY_PATH}"
+export DYLD_LIBRARY_PATH="${CF_DIR}/${CF_VERSION}/lib:${DYLD_LIBRARY_PATH}"
+export CF_CALDIR="${CF_DIR}/${CF_VERSION}/calfiles"
+export CF_PARMDIR="${CF_DIR}/${CF_VERSION}/parmfiles"
+export CF_IDLDIR="${CF_DIR}/${CF_VERSION}/idl"
+export CF_HISTDIR=`pwd`
+
+sh_path=`which sh`
+if [ $sh_path != '/bin/sh' ]; then
+ cp ${CF_DIR}/${CF_VERSION}/bin/calfuse.sh ${CF_DIR}/${CF_VERSION}/bin/calfuse_sv.sh
+ sed -e "s#/bin/sh#${sh_path}#g" ${CF_DIR}/${CF_VERSION}/bin/calfuse_sv.sh > ${CF_DIR}/${CF_VERSION}/bin/calfuse.sh
+fi
+
+rm -f ${CF_DIR}/${CF_VERSION}/bin/calfuse
+ln -sf ${CF_DIR}/${CF_VERSION}/bin/calfuse.sh ${CF_DIR}/${CF_VERSION}/bin/calfuse
diff --git a/bin/idl_obsplot.pl b/bin/idl_obsplot.pl
new file mode 100755
index 0000000..1954936
--- /dev/null
+++ b/bin/idl_obsplot.pl
@@ -0,0 +1,48 @@
+#!/usr/bin/env perl
+use FileHandle;
+
+# ******************************************************
+# idlplot_corr.pl
+#
+# This Perl module will run the idl script "cf_obsplot.pro"
+#
+# Author: Van Dixon
+#
+# History: Written July 3, 2001
+#
+# 10/20/05 wvd Add call to .run cf_obsplot.pro
+# 11/21/06 wvd Add process ID ($$) to name of
+# batch file.
+# 08/08/08 wvd Add airglow argument for 900+
+# files.
+#
+# ******************************************************
+
+if (@ARGV == 0) {
+ print "You must enter the rootname of the observation.\n";
+ print "Exiting.\n";
+
+ } else {
+
+ $batch_filename = $ARGV[0] . $$."_idl.bat";
+
+ # Open the output batch file.
+ open (BAT_OUTFILE, ">$batch_filename") || die "Cannot open $batch_filename";
+ print BAT_OUTFILE "!path='$ENV{CF_IDLDIR}:'+!path\n";
+ print BAT_OUTFILE ".run cf_obsplot.pro\n";
+ if (@ARGV == 2) {
+ print BAT_OUTFILE "cf_obsplot,'" . $ARGV[0] . "', airglow=1\n";
+ } else {
+ print BAT_OUTFILE "cf_obsplot,'" . $ARGV[0] . "'\n";
+ }
+ print BAT_OUTFILE "exit\n";
+
+ close (BAT_OUTFILE);
+
+ system("idl $batch_filename > /dev/null");
+
+ system("rm $batch_filename");
+
+ }
+
+### end of Perl script
diff --git a/bin/idlplot_rate.pl b/bin/idlplot_rate.pl
new file mode 100755
index 0000000..9e33bed
--- /dev/null
+++ b/bin/idlplot_rate.pl
@@ -0,0 +1,48 @@
+#!/usr/bin/env perl
+use FileHandle;
+
+# ***************************************************
+# add_tle.pl
+#
+# This Perl module will read in the latest five orbital elements
+# from the file five.tle (which was created by get_tle.pl) and
+# add any new orbital elements to the file FUSE.TLE. The file
+# FUSE.TLE is in descending order (i.e. the most recent elements
+# are first). In order to prepend the new TLE onto the old list
+# I found it was easiest to store everything in a temporary file
+# TEMP.TLE and rewrite FUSE.TLE.
+#
+# Author: Ed Murphy
+#
+# History: Written July 27, 1999
+# 11/21/06 wvd Add process ID ($$) to name of
+# batch file.
+#
+# ***************************************************
+
+# Define the file names. old_maintle_filename is not actually opened,
+# but is used in a system call at the end of the program.
+
+if (@ARGV == 0) {
+ print "You must enter the rootname of the observation.\n";
+ print "Exiting.\n";
+
+ } else {
+
+ $batch_filename = $ARGV[0] . $$."_idl.bat";
+
+ # Open the output batch file.
+ open (BAT_OUTFILE, ">$batch_filename") || die "Cannot open $batch_filename";
+ print BAT_OUTFILE "!path='$ENV{CF_IDLDIR}:'+!path\n";
+ print BAT_OUTFILE "cf_plot_rate3,'" . $ARGV[0] . "'\n";
+ print BAT_OUTFILE "exit\n";
+
+ close (BAT_OUTFILE);
+
+ system("idl $batch_filename > /dev/null");
+
+ system("rm $batch_filename");
+
+ }
+
+### end of Perl script
diff --git a/bin/idlplot_spex.pl b/bin/idlplot_spex.pl
new file mode 100755
index 0000000..701d2f7
--- /dev/null
+++ b/bin/idlplot_spex.pl
@@ -0,0 +1,48 @@
+#!/usr/bin/env perl
+use FileHandle;
+
+# ***************************************************
+# add_tle.pl
+#
+# This Perl module will read in the latest five orbital elements
+# from the file five.tle (which was created by get_tle.pl) and
+# add any new orbital elements to the file FUSE.TLE. The file
+# FUSE.TLE is in descending order (i.e. the most recent elements
+# are first). In order to prepend the new TLE onto the old list
+# I found it was easiest to store everything in a temporary file
+# TEMP.TLE and rewrite FUSE.TLE.
+#
+# Author: Ed Murphy
+#
+# History: Written July 27, 1999
+# 11/21/06 wvd Add process ID ($$) to name of
+# batch file.
+#
+# ***************************************************
+
+# Define the file names. old_maintle_filename is not actually opened,
+# but is used in a system call at the end of the program.
+
+if (@ARGV == 0) {
+ print "You must enter the rootname of the observation.\n";
+ print "Exiting.\n";
+
+ } else {
+
+ $batch_filename = $ARGV[0] . $$."_idl.bat";
+
+ # Open the output batch file.
+ open (BAT_OUTFILE, ">$batch_filename") || die "Cannot open $batch_filename";
+ print BAT_OUTFILE "!path='$ENV{CF_IDLDIR}:'+!path\n";
+ print BAT_OUTFILE "cf_plot_extract3,'" . $ARGV[0] . "'\n";
+ print BAT_OUTFILE "exit\n";
+
+ close (BAT_OUTFILE);
+
+ system("idl $batch_filename > /dev/null");
+
+ system("rm $batch_filename");
+
+ }
+
+### end of Perl script
diff --git a/bin/listhead b/bin/listhead
new file mode 100755
index 0000000..390f00e
--- /dev/null
+++ b/bin/listhead
Binary files differ
diff --git a/bin/listtra b/bin/listtra
new file mode 100755
index 0000000..4c23921
--- /dev/null
+++ b/bin/listtra
Binary files differ
diff --git a/compile b/compile
new file mode 100755
index 0000000..a85b723
--- /dev/null
+++ b/compile
@@ -0,0 +1,347 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand '-c -o'.
+
+scriptversion=2012-10-14.11; # UTC
+
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Written by Tom Tromey <tromey@cygnus.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+nl='
+'
+
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent tools from complaining about whitespace usage.
+IFS=" "" $nl"
+
+file_conv=
+
+# func_file_conv build_file lazy
+# Convert a $build file to $host form and store it in $file
+# Currently only supports Windows hosts. If the determined conversion
+# type is listed in (the comma separated) LAZY, no conversion will
+# take place.
+func_file_conv ()
+{
+ file=$1
+ case $file in
+ / | /[!/]*) # absolute file, and not a UNC file
+ if test -z "$file_conv"; then
+ # lazily determine how to convert abs files
+ case `uname -s` in
+ MINGW*)
+ file_conv=mingw
+ ;;
+ CYGWIN*)
+ file_conv=cygwin
+ ;;
+ *)
+ file_conv=wine
+ ;;
+ esac
+ fi
+ case $file_conv/,$2, in
+ *,$file_conv,*)
+ ;;
+ mingw/*)
+ file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
+ ;;
+ cygwin/*)
+ file=`cygpath -m "$file" || echo "$file"`
+ ;;
+ wine/*)
+ file=`winepath -w "$file" || echo "$file"`
+ ;;
+ esac
+ ;;
+ esac
+}
+
+# func_cl_dashL linkdir
+# Make cl look for libraries in LINKDIR
+func_cl_dashL ()
+{
+ func_file_conv "$1"
+ if test -z "$lib_path"; then
+ lib_path=$file
+ else
+ lib_path="$lib_path;$file"
+ fi
+ linker_opts="$linker_opts -LIBPATH:$file"
+}
+
+# func_cl_dashl library
+# Do a library search-path lookup for cl
+func_cl_dashl ()
+{
+ lib=$1
+ found=no
+ save_IFS=$IFS
+ IFS=';'
+ for dir in $lib_path $LIB
+ do
+ IFS=$save_IFS
+ if $shared && test -f "$dir/$lib.dll.lib"; then
+ found=yes
+ lib=$dir/$lib.dll.lib
+ break
+ fi
+ if test -f "$dir/$lib.lib"; then
+ found=yes
+ lib=$dir/$lib.lib
+ break
+ fi
+ if test -f "$dir/lib$lib.a"; then
+ found=yes
+ lib=$dir/lib$lib.a
+ break
+ fi
+ done
+ IFS=$save_IFS
+
+ if test "$found" != yes; then
+ lib=$lib.lib
+ fi
+}
+
+# func_cl_wrapper cl arg...
+# Adjust compile command to suit cl
+func_cl_wrapper ()
+{
+ # Assume a capable shell
+ lib_path=
+ shared=:
+ linker_opts=
+ for arg
+ do
+ if test -n "$eat"; then
+ eat=
+ else
+ case $1 in
+ -o)
+ # configure might choose to run compile as 'compile cc -o foo foo.c'.
+ eat=1
+ case $2 in
+ *.o | *.[oO][bB][jJ])
+ func_file_conv "$2"
+ set x "$@" -Fo"$file"
+ shift
+ ;;
+ *)
+ func_file_conv "$2"
+ set x "$@" -Fe"$file"
+ shift
+ ;;
+ esac
+ ;;
+ -I)
+ eat=1
+ func_file_conv "$2" mingw
+ set x "$@" -I"$file"
+ shift
+ ;;
+ -I*)
+ func_file_conv "${1#-I}" mingw
+ set x "$@" -I"$file"
+ shift
+ ;;
+ -l)
+ eat=1
+ func_cl_dashl "$2"
+ set x "$@" "$lib"
+ shift
+ ;;
+ -l*)
+ func_cl_dashl "${1#-l}"
+ set x "$@" "$lib"
+ shift
+ ;;
+ -L)
+ eat=1
+ func_cl_dashL "$2"
+ ;;
+ -L*)
+ func_cl_dashL "${1#-L}"
+ ;;
+ -static)
+ shared=false
+ ;;
+ -Wl,*)
+ arg=${1#-Wl,}
+ save_ifs="$IFS"; IFS=','
+ for flag in $arg; do
+ IFS="$save_ifs"
+ linker_opts="$linker_opts $flag"
+ done
+ IFS="$save_ifs"
+ ;;
+ -Xlinker)
+ eat=1
+ linker_opts="$linker_opts $2"
+ ;;
+ -*)
+ set x "$@" "$1"
+ shift
+ ;;
+ *.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
+ func_file_conv "$1"
+ set x "$@" -Tp"$file"
+ shift
+ ;;
+ *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
+ func_file_conv "$1" mingw
+ set x "$@" "$file"
+ shift
+ ;;
+ *)
+ set x "$@" "$1"
+ shift
+ ;;
+ esac
+ fi
+ shift
+ done
+ if test -n "$linker_opts"; then
+ linker_opts="-link$linker_opts"
+ fi
+ exec "$@" $linker_opts
+ exit 1
+}
+
+eat=
+
+case $1 in
+ '')
+ echo "$0: No command. Try '$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand '-c -o'.
+Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file 'INSTALL'.
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "compile $scriptversion"
+ exit $?
+ ;;
+ cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
+ func_cl_wrapper "$@" # Doesn't return...
+ ;;
+esac
+
+ofile=
+cfile=
+
+for arg
+do
+ if test -n "$eat"; then
+ eat=
+ else
+ case $1 in
+ -o)
+ # configure might choose to run compile as 'compile cc -o foo foo.c'.
+ # So we strip '-o arg' only if arg is an object.
+ eat=1
+ case $2 in
+ *.o | *.obj)
+ ofile=$2
+ ;;
+ *)
+ set x "$@" -o "$2"
+ shift
+ ;;
+ esac
+ ;;
+ *.c)
+ cfile=$1
+ set x "$@" "$1"
+ shift
+ ;;
+ *)
+ set x "$@" "$1"
+ shift
+ ;;
+ esac
+ fi
+ shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+ # If no '-o' option was seen then we might have been invoked from a
+ # pattern rule where we don't need one. That is ok -- this is a
+ # normal compilation that the losing compiler can handle. If no
+ # '.c' file was seen then we are probably linking. That is also
+ # ok.
+ exec "$@"
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use '[/\\:.-]' here to ensure that we don't use the same name
+# that we are using for the .o file. Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
+while true; do
+ if mkdir "$lockdir" >/dev/null 2>&1; then
+ break
+ fi
+ sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir '$lockdir'; exit 1" 1 2 15
+
+# Run the compile.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+ test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+ test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/config.guess b/config.guess
new file mode 100755
index 0000000..6c32c86
--- /dev/null
+++ b/config.guess
@@ -0,0 +1,1421 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright 1992-2014 Free Software Foundation, Inc.
+
+timestamp='2014-11-04'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+#
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
+#
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+#
+# Please send patches to <config-patches@gnu.org>.
+
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright 1992-2014 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+case "${UNAME_SYSTEM}" in
+Linux|GNU|GNU/*)
+ # If the system lacks a compiler, then just pick glibc.
+ # We could probably try harder.
+ LIBC=gnu
+
+ eval $set_cc_for_build
+ cat <<-EOF > $dummy.c
+ #include <features.h>
+ #if defined(__UCLIBC__)
+ LIBC=uclibc
+ #elif defined(__dietlibc__)
+ LIBC=dietlibc
+ #else
+ LIBC=gnu
+ #endif
+ EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+ ;;
+esac
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ELF__
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit ;;
+ *:Bitrig:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE="alpha" ;;
+ "EV5 (21164)")
+ UNAME_MACHINE="alphaev5" ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE="alphaev56" ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE="alphapca56" ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE="alphapca57" ;;
+ "EV6 (21264)")
+ UNAME_MACHINE="alphaev6" ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE="alphaev67" ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE="alphaev69" ;;
+ "EV7 (21364)")
+ UNAME_MACHINE="alphaev7" ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+ exitcode=$?
+ trap '' 0
+ exit $exitcode ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+ arm*:riscos:*:*|arm*:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ s390x:SunOS:*:*)
+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+ echo i386-pc-auroraux${UNAME_RELEASE}
+ exit ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ eval $set_cc_for_build
+ SUN_ARCH="i386"
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH="x86_64"
+ fi
+ fi
+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c &&
+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`$dummy $dummyarg` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+ *:AIX:*:[4567])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/lslpp ] ; then
+ IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
+ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ eval $set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep -q __LP64__
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo unknown-hitachi-hiuxwe2
+ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:FreeBSD:*:*)
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ case ${UNAME_PROCESSOR} in
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
+ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
+ *:MINGW64*:*)
+ echo ${UNAME_MACHINE}-pc-mingw64
+ exit ;;
+ *:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+ *:MSYS*:*)
+ echo ${UNAME_MACHINE}-pc-msys
+ exit ;;
+ i*:windows32*:*)
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit ;;
+ *:Interix*:*)
+ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ authenticamd | genuineintel | EM64T)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ IA64)
+ echo ia64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ esac ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit ;;
+ 8664:Windows_NT:*)
+ echo x86_64-pc-mks
+ exit ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+ exit ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
+ aarch64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ arc:Linux:*:* | arceb:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ else
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
+ fi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ cris:Linux:*:*)
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ exit ;;
+ crisv32:Linux:*:*)
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ exit ;;
+ frv:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ hexagon:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ i*86:Linux:*:*)
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+ exit ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ mips:Linux:*:* | mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef ${UNAME_MACHINE}
+ #undef ${UNAME_MACHINE}el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=${UNAME_MACHINE}el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=${UNAME_MACHINE}
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+ ;;
+ openrisc*:Linux:*:*)
+ echo or1k-unknown-linux-${LIBC}
+ exit ;;
+ or32:Linux:*:* | or1k*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-${LIBC}
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-${LIBC}
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+ *) echo hppa-unknown-linux-${LIBC} ;;
+ esac
+ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-${LIBC}
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-${LIBC}
+ exit ;;
+ ppc64le:Linux:*:*)
+ echo powerpc64le-unknown-linux-${LIBC}
+ exit ;;
+ ppcle:Linux:*:*)
+ echo powerpcle-unknown-linux-${LIBC}
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
+ exit ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ tile*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+ exit ;;
+ x86_64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ xtensa*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+ # prints for the "djgpp" host, or else GDB configury will decide that
+ # this is a cross-build.
+ echo i586-pc-msdosdjgpp
+ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
+ exit ;;
+ x86_64:Haiku:*:*)
+ echo x86_64-unknown-haiku
+ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ eval $set_cc_for_build
+ if test "$UNAME_PROCESSOR" = unknown ; then
+ UNAME_PROCESSOR=powerpc
+ fi
+ if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
+ fi
+ elif test "$UNAME_PROCESSOR" = i386 ; then
+ # Avoid executing cc on OS X 10.9, as it ships with a stub
+ # that puts up a graphical alert prompting to install
+ # developer tools. Any system running Mac OS X 10.7 or
+ # later (Darwin 11 and later) is required to have a 64-bit
+ # processor. This is not true of the ARM version of Darwin
+ # that Apple uses in portable devices.
+ UNAME_PROCESSOR=x86_64
+ fi
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+ NEO-?:NONSTOP_KERNEL:*:*)
+ echo neo-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSE-*:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "$cputype" = "386"; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+ exit ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
+ i*86:AROS:*:*)
+ echo ${UNAME_MACHINE}-pc-aros
+ exit ;;
+ x86_64:VMkernel:*:*)
+ echo ${UNAME_MACHINE}-unknown-esx
+ exit ;;
+esac
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/config.h.in b/config.h.in
new file mode 100644
index 0000000..de878e8
--- /dev/null
+++ b/config.h.in
@@ -0,0 +1,142 @@
+/* config.h.in. Generated from configure.ac by autoheader. */
+
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+ systems. This function is required for `alloca.c' support on those systems.
+ */
+#undef CRAY_STACKSEG_END
+
+/* Define to 1 if using `alloca.c'. */
+#undef C_ALLOCA
+
+/* Define to 1 if you have `alloca', as a function or macro. */
+#undef HAVE_ALLOCA
+
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+ */
+#undef HAVE_ALLOCA_H
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
+/* Define to 1 if you have the `floor' function. */
+#undef HAVE_FLOOR
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
+/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
+ to 0 otherwise. */
+#undef HAVE_MALLOC
+
+/* Define to 1 if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
+
+/* Define to 1 if you have the `memchr' function. */
+#undef HAVE_MEMCHR
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the `memset' function. */
+#undef HAVE_MEMSET
+
+/* Define to 1 if you have the `modf' function. */
+#undef HAVE_MODF
+
+/* Define to 1 if you have the `pow' function. */
+#undef HAVE_POW
+
+/* Define to 1 if you have the `sqrt' function. */
+#undef HAVE_SQRT
+
+/* Define to 1 if you have the <stddef.h> header file. */
+#undef HAVE_STDDEF_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the `strcasecmp' function. */
+#undef HAVE_STRCASECMP
+
+/* Define to 1 if you have the `strerror' function. */
+#undef HAVE_STRERROR
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the `strncasecmp' function. */
+#undef HAVE_STRNCASECMP
+
+/* Define to 1 if you have the `strrchr' function. */
+#undef HAVE_STRRCHR
+
+/* Define to 1 if you have the `strtol' function. */
+#undef HAVE_STRTOL
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if the system has the type `_Bool'. */
+#undef HAVE__BOOL
+
+/* Define to the sub-directory where libtool stores uninstalled libraries. */
+#undef LT_OBJDIR
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* If using the C implementation of alloca, define if you know the
+ direction of stack growth for your system; otherwise it will be
+ automatically deduced at runtime.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown */
+#undef STACK_DIRECTION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
+
+/* Define to rpl_malloc if the replacement function should be used. */
+#undef malloc
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+#undef size_t
diff --git a/config.sub b/config.sub
new file mode 100755
index 0000000..7ffe373
--- /dev/null
+++ b/config.sub
@@ -0,0 +1,1807 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright 1992-2014 Free Software Foundation, Inc.
+
+timestamp='2014-12-03'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+
+
+# Please send patches to <config-patches@gnu.org>.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+ $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright 1992-2014 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help"
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+ exit ;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ knetbsd*-gnu* | netbsd*-gnu* | \
+ kopensolaris*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ android-linux)
+ os=-linux-android
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple | -axis | -knuth | -cray | -microblaze*)
+ os=
+ basic_machine=$1
+ ;;
+ -bluegene*)
+ os=-cnk
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*178)
+ os=-lynxos178
+ ;;
+ -lynx*5)
+ os=-lynxos5
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
+ | aarch64 | aarch64_be \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arceb \
+ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+ | avr | avr32 \
+ | be32 | be64 \
+ | bfin \
+ | c4x | c8051 | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | epiphany \
+ | fido | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | hexagon \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+ | k1om \
+ | le32 | le64 \
+ | lm32 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa32r6 | mipsisa32r6el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64r6 | mipsisa64r6el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipsr5900 | mipsr5900el \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+ | msp430 \
+ | nds32 | nds32le | nds32be \
+ | nios | nios2 | nios2eb | nios2el \
+ | ns16k | ns32k \
+ | open8 | or1k | or1knd | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle \
+ | pyramid \
+ | riscv32 | riscv64 \
+ | rl78 | rx \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu \
+ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+ | ubicom32 \
+ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+ | visium \
+ | we32k \
+ | x86 | xc16x | xstormy16 | xtensa \
+ | z8k | z80)
+ basic_machine=$basic_machine-unknown
+ ;;
+ c54x)
+ basic_machine=tic54x-unknown
+ ;;
+ c55x)
+ basic_machine=tic55x-unknown
+ ;;
+ c6x)
+ basic_machine=tic6x-unknown
+ ;;
+ leon|leon[3-9])
+ basic_machine=sparc-$basic_machine
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
+
+ strongarm | thumb | xscale)
+ basic_machine=arm-unknown
+ ;;
+ xgate)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ xscaleeb)
+ basic_machine=armeb-unknown
+ ;;
+
+ xscaleel)
+ basic_machine=armel-unknown
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+ | aarch64-* | aarch64_be-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* | avr32-* \
+ | be32-* | be64-* \
+ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* \
+ | c8051-* | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | hexagon-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+ | k1om-* \
+ | le32-* | le64-* \
+ | lm32-* \
+ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+ | microblaze-* | microblazeel-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64octeon-* | mips64octeonel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64r5900-* | mips64r5900el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa32r6-* | mipsisa32r6el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64r6-* | mipsisa64r6el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipsr5900-* | mipsr5900el-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | mt-* \
+ | msp430-* \
+ | nds32-* | nds32le-* | nds32be-* \
+ | nios-* | nios2-* | nios2eb-* | nios2el-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | open8-* \
+ | or1k*-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+ | pyramid-* \
+ | rl78-* | romp-* | rs6000-* | rx-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+ | tahoe-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tile*-* \
+ | tron-* \
+ | ubicom32-* \
+ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+ | vax-* \
+ | visium-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* \
+ | xstormy16-* | xtensa*-* \
+ | ymp-* \
+ | z8k-* | z80-*)
+ ;;
+ # Recognize the basic CPU types without company name, with glob match.
+ xtensa*)
+ basic_machine=$basic_machine-unknown
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
+ amd64-*)
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aros)
+ basic_machine=i386-pc
+ os=-aros
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=-linux
+ ;;
+ blackfin-*)
+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ bluegene*)
+ basic_machine=powerpc-ibm
+ os=-cnk
+ ;;
+ c54x-*)
+ basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c55x-*)
+ basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c6x-*)
+ basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=-cegcc
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+ cr16 | cr16-*)
+ basic_machine=cr16-unknown
+ os=-elf
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ os=-dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ leon-*|leon[3-9]-*)
+ basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=-linux
+ ;;
+ m68knommu-*)
+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ microblaze*)
+ basic_machine=microblaze-xilinx
+ ;;
+ mingw64)
+ basic_machine=x86_64-pc
+ os=-mingw64
+ ;;
+ mingw32)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=-mingw32ce
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ moxiebox)
+ basic_machine=moxie-unknown
+ os=-moxiebox
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
+ msys)
+ basic_machine=i686-pc
+ os=-msys
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ nacl)
+ basic_machine=le32-unknown
+ os=-nacl
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ neo-tandem)
+ basic_machine=neo-tandem
+ ;;
+ nse-tandem)
+ basic_machine=nse-tandem
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ openrisc | openrisc-*)
+ basic_machine=or32-unknown
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=-linux
+ ;;
+ parisc-*)
+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2 | pentiumiii | pentium3)
+ basic_machine=i686-pc
+ ;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc | ppcbe) basic_machine=powerpc-unknown
+ ;;
+ ppc-* | ppcbe-*)
+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rdos | rdos64)
+ basic_machine=x86_64-pc
+ os=-rdos
+ ;;
+ rdos32)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sh5el)
+ basic_machine=sh5le-unknown
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ strongarm-* | thumb-*)
+ basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+ tile*)
+ basic_machine=$basic_machine-unknown
+ os=-linux-gnu
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=-tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ xscale-* | xscalee[bl]-*)
+ basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ z80-*-coff)
+ basic_machine=z80-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -auroraux)
+ os=-auroraux
+ ;;
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+ | -sym* | -kopensolaris* | -plan9* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* | -aros* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -bitrig* | -openbsd* | -solidbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* | -cegcc* \
+ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-musl* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto-qnx*)
+ ;;
+ -nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux-dietlibc)
+ os=-linux-dietlibc
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -syllable*)
+ os=-syllable
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -tpf*)
+ os=-tpf
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -aros*)
+ os=-aros
+ ;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
+ -dicos*)
+ os=-dicos
+ ;;
+ -nacl*)
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ score-*)
+ os=-elf
+ ;;
+ spu-*)
+ os=-elf
+ ;;
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ c8051-*)
+ os=-elf
+ ;;
+ hexagon-*)
+ os=-elf
+ ;;
+ tic54x-*)
+ os=-coff
+ ;;
+ tic55x-*)
+ os=-coff
+ ;;
+ tic6x-*)
+ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mep-*)
+ os=-elf
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ or32-*)
+ os=-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-haiku)
+ os=-haiku
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-knuth)
+ os=-mmixware
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -cnk*|-aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -os400*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -tpf*)
+ vendor=ibm
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ -vos*)
+ vendor=stratus
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/configure b/configure
new file mode 100755
index 0000000..38ec42b
--- /dev/null
+++ b/configure
@@ -0,0 +1,18886 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.69 for calfuse 3.2.3.
+#
+# Report bugs to <archive@stsci.edu>.
+#
+#
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+
+ test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
+ ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
+ ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
+ PATH=/empty FPATH=/empty; export PATH FPATH
+ test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
+ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+fi
+
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ $as_echo "$0: Please tell bug-autoconf@gnu.org and archive@stsci.edu
+$0: about your system, including any error possibly output
+$0: before this message. Then install a modern shell, or
+$0: manually run the script under such a shell if you do
+$0: have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -pR'
+ fi
+else
+ as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='calfuse'
+PACKAGE_TARNAME='calfuse'
+PACKAGE_VERSION='3.2.3'
+PACKAGE_STRING='calfuse 3.2.3'
+PACKAGE_BUGREPORT='archive@stsci.edu'
+PACKAGE_URL=''
+
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_unique_file="include/calfitsio.h"
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+LIBOBJS
+ALLOCA
+ac_ct_F77
+FFLAGS
+F77
+CPP
+LT_SYS_LIBRARY_PATH
+OTOOL64
+OTOOL
+LIPO
+NMEDIT
+DSYMUTIL
+MANIFEST_TOOL
+RANLIB
+ac_ct_AR
+AR
+DLLTOOL
+OBJDUMP
+LN_S
+NM
+ac_ct_DUMPBIN
+DUMPBIN
+LD
+FGREP
+EGREP
+GREP
+SED
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+am__nodep
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+LIBTOOL
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+AM_DEFAULT_V
+AM_V
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_silent_rules
+enable_shared
+enable_static
+with_pic
+enable_fast_install
+with_aix_soname
+enable_dependency_tracking
+with_gnu_ld
+with_sysroot
+enable_libtool_lock
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+LT_SYS_LIBRARY_PATH
+CPP
+F77
+FFLAGS'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures calfuse 3.2.3 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking ...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/calfuse]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of calfuse 3.2.3:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-silent-rules less verbose build output (undo: "make V=1")
+ --disable-silent-rules verbose build output (undo: "make V=0")
+ --enable-shared[=PKGS] build shared libraries [default=yes]
+ --enable-static[=PKGS] build static libraries [default=yes]
+ --enable-fast-install[=PKGS]
+ optimize for fast installation [default=yes]
+ --enable-dependency-tracking
+ do not reject slow dependency extractors
+ --disable-dependency-tracking
+ speeds up one-time build
+ --disable-libtool-lock avoid locking (might break parallel builds)
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
+ both]
+ --with-aix-soname=aix|svr4|both
+ shared library versioning (aka "SONAME") variant to
+ provide on AIX, [default=aix].
+ --with-gnu-ld assume the C compiler uses GNU ld [default=no]
+ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the
+ compiler's sysroot if not specified).
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ LIBS libraries to pass to the linker, e.g. -l<library>
+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+ you have headers in a nonstandard directory <include dir>
+ LT_SYS_LIBRARY_PATH
+ User-defined run-time library search path.
+ CPP C preprocessor
+ F77 Fortran 77 compiler command
+ FFLAGS Fortran 77 compiler flags
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <archive@stsci.edu>.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+calfuse configure 3.2.3
+generated by GNU Autoconf 2.69
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ test -x conftest$ac_exeext
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } > conftest.i && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=$ac_status
+fi
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $2 (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_func
+
+# ac_fn_f77_try_compile LINENO
+# ----------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_f77_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_f77_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_f77_try_compile
+
+# ac_fn_f77_try_link LINENO
+# -------------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_f77_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_f77_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ test -x conftest$ac_exeext
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_f77_try_link
+
+# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
+# -------------------------------------------
+# Tests whether TYPE exists after having included INCLUDES, setting cache
+# variable VAR accordingly.
+ac_fn_c_check_type ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=no"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+if (sizeof ($2))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+if (sizeof (($2)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ eval "$3=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_type
+
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if eval \${$3+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_header_compiler=yes
+else
+ ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ ac_header_preproc=yes
+else
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+ yes:no: )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+( $as_echo "## -------------------------------- ##
+## Report this to archive@stsci.edu ##
+## -------------------------------- ##"
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_mongrel
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by calfuse $as_me 3.2.3, which was
+generated by GNU Autoconf 2.69. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ $as_echo "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
+ as_fn_append ac_configure_args1 " '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+am__api_version='1.15'
+
+ac_aux_dir=
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if ${ac_cv_path_install+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+ ./ | .// | /[cC]/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[\\\"\#\$\&\'\`$am_lf]*)
+ as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+ *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
+ as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
+esac
+
+# Do 'set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ am_has_slept=no
+ for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
+ alias in your environment" "$LINENO" 5
+ fi
+ if test "$2" = conftest.file || test $am_try -eq 2; then
+ break
+ fi
+ # Just in case.
+ sleep 1
+ am_has_slept=yes
+ done
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+
+rm -f conftest.file
+
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
+
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --is-lightweight"; then
+ am_missing_run="$MISSING "
+else
+ am_missing_run=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip". However 'strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the 'STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+ if ${ac_cv_path_mkdir+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
+ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir (GNU coreutils) '* | \
+ 'mkdir (coreutils) '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+ done
+IFS=$as_save_IFS
+
+fi
+
+ test -d ./--version && rmdir ./--version
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AWK="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+ enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in # (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+ *) AM_DEFAULT_VERBOSITY=1;;
+esac
+am_make=${MAKE-make}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
+if ${am_cv_make_support_nested_variables+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if $as_echo 'TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+ @$(TRUE)
+.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
+ am_cv_make_support_nested_variables=yes
+else
+ am_cv_make_support_nested_variables=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+$as_echo "$am_cv_make_support_nested_variables" >&6; }
+if test $am_cv_make_support_nested_variables = yes; then
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AM_BACKSLASH='\'
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ am__isrc=' -I$(srcdir)'
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='calfuse'
+ VERSION='3.2.3'
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# For better backward compatibility. To be removed once Automake 1.9.x
+# dies out for good. For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+mkdir_p='$(MKDIR_P)'
+
+# We need awk for the "check" target (and possibly the TAP driver). The
+# system "awk" is bad on some platforms.
+# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
+
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar pax cpio none'
+
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+
+
+
+
+
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes. So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+ cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present. This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message. This
+can help us improve future automake versions.
+
+END
+ if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+ echo 'Configuration will proceed anyway, since you have set the' >&2
+ echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+ echo >&2
+ else
+ cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+ as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
+ fi
+fi
+
+case `pwd` in
+ *\ * | *\ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
+$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
+esac
+
+
+
+macro_version='2.4.5'
+macro_revision='2.4.5'
+
+
+
+
+
+
+
+
+
+
+
+
+
+ltmain=$ac_aux_dir/ltmain.sh
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+# Backslashify metacharacters that are still active within
+# double-quoted strings.
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
+$as_echo_n "checking how to print strings... " >&6; }
+# Test print first, because it will be a builtin if present.
+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
+ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
+ ECHO='print -r --'
+elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
+ ECHO='printf %s\n'
+else
+ # Use this function as a fallback that always works.
+ func_fallback_echo ()
+ {
+ eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+ }
+ ECHO='func_fallback_echo'
+fi
+
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+ $ECHO ""
+}
+
+case $ECHO in
+ printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
+$as_echo "printf" >&6; } ;;
+ print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
+$as_echo "print -r" >&6; } ;;
+ *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
+$as_echo "cat" >&6; } ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from 'make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+ enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link_default") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
+ break;;
+ * )
+ break;;
+ esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+ ac_file=''
+fi
+if test -z "$ac_file"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+ { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if { ac_try='./conftest$ac_cv_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if ${ac_cv_objext+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+else
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+struct stat;
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
+$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
+if ${am_cv_prog_cc_c_o+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ # Make sure it works both with $CC and with simple cc.
+ # Following AC_PROG_CC_C_O, we do the test twice because some
+ # compilers refuse to overwrite an existing .o file with -o,
+ # though they will create one.
+ am_cv_prog_cc_c_o=yes
+ for am_i in 1 2; do
+ if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
+ ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } \
+ && test -f conftest2.$ac_objext; then
+ : OK
+ else
+ am_cv_prog_cc_c_o=no
+ break
+ fi
+ done
+ rm -f core conftest*
+ unset am_i
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
+$as_echo "$am_cv_prog_cc_c_o" >&6; }
+if test "$am_cv_prog_cc_c_o" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok '-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if ${ac_cv_path_SED+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for ac_i in 1 2 3 4 5 6 7; do
+ ac_script="$ac_script$as_nl$ac_script"
+ done
+ echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+ { ac_script=; unset ac_script;}
+ if test -z "$SED"; then
+ ac_path_SED_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_SED" || continue
+# Check for GNU ac_path_SED and select it if it is found.
+ # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+ ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo '' >> "conftest.nl"
+ "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_SED_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_SED="$ac_path_SED"
+ ac_path_SED_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_SED_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_SED"; then
+ as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+ fi
+else
+ ac_cv_path_SED=$SED
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+ rm -f conftest.sed
+
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if ${ac_cv_path_GREP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_GREP" || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_GREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if ${ac_cv_path_EGREP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_EGREP" || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
+$as_echo_n "checking for fgrep... " >&6; }
+if ${ac_cv_path_FGREP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
+ then ac_cv_path_FGREP="$GREP -F"
+ else
+ if test -z "$FGREP"; then
+ ac_path_FGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in fgrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_FGREP" || continue
+# Check for GNU ac_path_FGREP and select it if it is found.
+ # Check for GNU $ac_path_FGREP
+case `"$ac_path_FGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'FGREP' >> "conftest.nl"
+ "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_FGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_FGREP="$ac_path_FGREP"
+ ac_path_FGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_FGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_FGREP"; then
+ as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_FGREP=$FGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
+$as_echo "$ac_cv_path_FGREP" >&6; }
+ FGREP="$ac_cv_path_FGREP"
+
+
+test -z "$GREP" && GREP=grep
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then :
+ withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test yes = "$GCC"; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return, which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [\\/]* | ?:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD=$ac_prog
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test yes = "$with_gnu_ld"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if ${lt_cv_path_LD+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$LD"; then
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS=$lt_save_ifs
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD=$ac_dir/$ac_prog
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test no != "$with_gnu_ld" && break
+ ;;
+ *)
+ test yes != "$with_gnu_ld" && break
+ ;;
+ esac
+ fi
+ done
+ IFS=$lt_save_ifs
+else
+ lt_cv_path_LD=$LD # Let the user override the test with a path.
+fi
+fi
+
+LD=$lt_cv_path_LD
+if test -n "$LD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if ${lt_cv_prog_gnu_ld+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
+$as_echo "$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
+$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
+if ${lt_cv_path_NM+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$NM"; then
+ # Let the user override the test.
+ lt_cv_path_NM=$NM
+else
+ lt_nm_to_check=${ac_tool_prefix}nm
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ lt_nm_to_check="$lt_nm_to_check nm"
+ fi
+ for lt_tmp_nm in $lt_nm_to_check; do
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+ IFS=$lt_save_ifs
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm=$ac_dir/$lt_tmp_nm
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ # Tru64's nm complains that /dev/null is an invalid object file
+ # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
+ case $build_os in
+ mingw*) lt_bad_file=conftest.nm/nofile ;;
+ *) lt_bad_file=/dev/null ;;
+ esac
+ case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
+ *$lt_bad_file* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break 2
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break 2
+ ;;
+ *)
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ done
+ IFS=$lt_save_ifs
+ done
+ : ${lt_cv_path_NM=no}
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
+$as_echo "$lt_cv_path_NM" >&6; }
+if test no != "$lt_cv_path_NM"; then
+ NM=$lt_cv_path_NM
+else
+ # Didn't find any BSD compatible name lister, look for dumpbin.
+ if test -n "$DUMPBIN"; then :
+ # Let the user override the test.
+ else
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in dumpbin "link -dump"
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_DUMPBIN+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DUMPBIN"; then
+ ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DUMPBIN=$ac_cv_prog_DUMPBIN
+if test -n "$DUMPBIN"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
+$as_echo "$DUMPBIN" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$DUMPBIN" && break
+ done
+fi
+if test -z "$DUMPBIN"; then
+ ac_ct_DUMPBIN=$DUMPBIN
+ for ac_prog in dumpbin "link -dump"
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DUMPBIN"; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
+if test -n "$ac_ct_DUMPBIN"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
+$as_echo "$ac_ct_DUMPBIN" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_DUMPBIN" && break
+done
+
+ if test "x$ac_ct_DUMPBIN" = x; then
+ DUMPBIN=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DUMPBIN=$ac_ct_DUMPBIN
+ fi
+fi
+
+ case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
+ *COFF*)
+ DUMPBIN="$DUMPBIN -symbols -headers"
+ ;;
+ *)
+ DUMPBIN=:
+ ;;
+ esac
+ fi
+
+ if test : != "$DUMPBIN"; then
+ NM=$DUMPBIN
+ fi
+fi
+test -z "$NM" && NM=nm
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
+$as_echo_n "checking the name lister ($NM) interface... " >&6; }
+if ${lt_cv_nm_interface+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+ (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:$LINENO: output\"" >&5)
+ cat conftest.out >&5
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+ fi
+ rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
+$as_echo "$lt_cv_nm_interface" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+$as_echo_n "checking whether ln -s works... " >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+$as_echo "no, using $LN_S" >&6; }
+fi
+
+# find the maximum length of command line arguments
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
+$as_echo_n "checking the maximum length of command line arguments... " >&6; }
+if ${lt_cv_sys_max_cmd_len+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ i=0
+ teststring=ABCD
+
+ case $build_os in
+ msdosdjgpp*)
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
+ # during glob expansion). Even if it were fixed, the result of this
+ # check would be larger than it should be.
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+ cygwin* | mingw* | cegcc*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+ # you end up with a "frozen" computer, even though with patience
+ # the test eventually succeeds (with a max line length of 256k).
+ # Instead, let's just punt: use the minimum linelength reported by
+ # all of the supported platforms: 8192 (on NT/2K/XP).
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ mint*)
+ # On MiNT this can take a long time and run out of memory.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ amigaos*)
+ # On AmigaOS with pdksh, this test takes hours, literally.
+ # So we just punt and use a minimum line length of 8192.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
+ # This has been around since 386BSD, at least. Likely further.
+ if test -x /sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+ elif test -x /usr/sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+ else
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
+ fi
+ # And add a safety zone
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ ;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
+ os2*)
+ # The test takes a long time on OS/2.
+ lt_cv_sys_max_cmd_len=8192
+ ;;
+
+ osf*)
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+ # nice to cause kernel panics so lets avoid the loop below.
+ # First set a reasonable default.
+ lt_cv_sys_max_cmd_len=16384
+ #
+ if test -x /sbin/sysconfig; then
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
+ esac
+ fi
+ ;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
+ *)
+ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+ if test -n "$lt_cv_sys_max_cmd_len" && \
+ test undefined != "$lt_cv_sys_max_cmd_len"; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ # Make teststring a little bigger before we do anything with it.
+ # a 1K string should be a reasonable start.
+ for i in 1 2 3 4 5 6 7 8; do
+ teststring=$teststring$teststring
+ done
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while { test X`env echo "$teststring$teststring" 2>/dev/null` \
+ = "X$teststring$teststring"; } >/dev/null 2>&1 &&
+ test 17 != "$i" # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ # Only check the string length outside the loop.
+ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on
+ # massive amounts of additional arguments before passing them to the
+ # linker. It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
+ ;;
+ esac
+
+fi
+
+if test -n "$lt_cv_sys_max_cmd_len"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
+$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
+$as_echo "none" >&6; }
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+
+
+
+
+
+: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ lt_unset=unset
+else
+ lt_unset=false
+fi
+
+
+
+
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+ lt_SP2NL='tr \040 \012'
+ lt_NL2SP='tr \015\012 \040\040'
+ ;;
+ *) # EBCDIC based system
+ lt_SP2NL='tr \100 \n'
+ lt_NL2SP='tr \r\n \100\100'
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
+$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
+if ${lt_cv_to_host_file_cmd+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $host in
+ *-*-mingw* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+ ;;
+ *-*-cygwin* )
+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+ ;;
+ * ) # otherwise, assume *nix
+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
+ ;;
+ esac
+ ;;
+ *-*-cygwin* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+ ;;
+ *-*-cygwin* )
+ lt_cv_to_host_file_cmd=func_convert_file_noop
+ ;;
+ * ) # otherwise, assume *nix
+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
+ ;;
+ esac
+ ;;
+ * ) # unhandled hosts (and "normal" native builds)
+ lt_cv_to_host_file_cmd=func_convert_file_noop
+ ;;
+esac
+
+fi
+
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
+$as_echo "$lt_cv_to_host_file_cmd" >&6; }
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
+if ${lt_cv_to_tool_file_cmd+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ #assume ordinary cross tools, or native build.
+lt_cv_to_tool_file_cmd=func_convert_file_noop
+case $host in
+ *-*-mingw* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
+ ;;
+ esac
+ ;;
+esac
+
+fi
+
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
+$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
+$as_echo_n "checking for $LD option to reload object files... " >&6; }
+if ${lt_cv_ld_reload_flag+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ld_reload_flag='-r'
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
+$as_echo "$lt_cv_ld_reload_flag" >&6; }
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ if test yes != "$GCC"; then
+ reload_cmds=false
+ fi
+ ;;
+ darwin*)
+ if test yes = "$GCC"; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
+set dummy ${ac_tool_prefix}objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OBJDUMP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OBJDUMP"; then
+ ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+$as_echo "$OBJDUMP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OBJDUMP"; then
+ ac_ct_OBJDUMP=$OBJDUMP
+ # Extract the first word of "objdump", so it can be a program name with args.
+set dummy objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OBJDUMP"; then
+ ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_OBJDUMP="objdump"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+$as_echo "$ac_ct_OBJDUMP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OBJDUMP" = x; then
+ OBJDUMP="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OBJDUMP=$ac_ct_OBJDUMP
+ fi
+else
+ OBJDUMP="$ac_cv_prog_OBJDUMP"
+fi
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
+$as_echo_n "checking how to recognize dependent libraries... " >&6; }
+if ${lt_cv_deplibs_check_method+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# 'unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# that responds to the $file_magic_cmd with a given extended regex.
+# If you have 'file' or equivalent on your system and you're not sure
+# whether 'pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[4-9]*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi[45]*)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ ;;
+
+mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ if ( file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ # Keep this pattern in sync with the one in func_win32_libid.
+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
+ ;;
+
+cegcc*)
+ # use the weaker test based on 'objdump'. See mingw*.
+ lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+freebsd* | dragonfly*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ case $host_cpu in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+ # Let's accept both of them until this is cleared up.
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=pass_all
+ fi
+ ;;
+
+haiku*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ case $host_cpu in
+ ia64*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
+ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+ ;;
+ hppa*64*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+ ;;
+ *)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
+ ;;
+ esac
+ ;;
+
+interix[3-9]*)
+ # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
+ fi
+ ;;
+
+newos6*)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
+ ;;
+
+*nto* | *qnx*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+openbsd* | bitrig*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+rdos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv4 | sysv4.3*)
+ case $host_vendor in
+ motorola)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ ;;
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ sequent)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+ ;;
+ sni)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+ siemens)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ pc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ esac
+ ;;
+
+tpf*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+os2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
+$as_echo "$lt_cv_deplibs_check_method" >&6; }
+
+file_magic_glob=
+want_nocaseglob=no
+if test "$build" = "$host"; then
+ case $host_os in
+ mingw* | pw32*)
+ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
+ want_nocaseglob=yes
+ else
+ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
+ fi
+ ;;
+ esac
+fi
+
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_DLLTOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DLLTOOL"; then
+ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DLLTOOL=$ac_cv_prog_DLLTOOL
+if test -n "$DLLTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
+$as_echo "$DLLTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DLLTOOL"; then
+ ac_ct_DLLTOOL=$DLLTOOL
+ # Extract the first word of "dlltool", so it can be a program name with args.
+set dummy dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DLLTOOL"; then
+ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_DLLTOOL="dlltool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
+if test -n "$ac_ct_DLLTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
+$as_echo "$ac_ct_DLLTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_DLLTOOL" = x; then
+ DLLTOOL="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DLLTOOL=$ac_ct_DLLTOOL
+ fi
+else
+ DLLTOOL="$ac_cv_prog_DLLTOOL"
+fi
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
+$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
+if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_sharedlib_from_linklib_cmd='unknown'
+
+case $host_os in
+cygwin* | mingw* | pw32* | cegcc*)
+ # two different shell functions defined in ltmain.sh;
+ # decide which one to use based on capabilities of $DLLTOOL
+ case `$DLLTOOL --help 2>&1` in
+ *--identify-strict*)
+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
+ ;;
+ *)
+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
+ ;;
+ esac
+ ;;
+*)
+ # fallback: assume linklib IS sharedlib
+ lt_cv_sharedlib_from_linklib_cmd=$ECHO
+ ;;
+esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
+$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ for ac_prog in ar
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AR" && break
+ done
+fi
+if test -z "$AR"; then
+ ac_ct_AR=$AR
+ for ac_prog in ar
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_AR="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_AR" && break
+done
+
+ if test "x$ac_ct_AR" = x; then
+ AR="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+fi
+
+: ${AR=ar}
+: ${AR_FLAGS=cru}
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
+$as_echo_n "checking for archiver @FILE support... " >&6; }
+if ${lt_cv_ar_at_file+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ar_at_file=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ echo conftest.$ac_objext > conftest.lst
+ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
+ (eval $lt_ar_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if test 0 -eq "$ac_status"; then
+ # Ensure the archiver fails upon bogus file names.
+ rm -f conftest.$ac_objext libconftest.a
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
+ (eval $lt_ar_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if test 0 -ne "$ac_status"; then
+ lt_cv_ar_at_file=@
+ fi
+ fi
+ rm -f conftest.* libconftest.a
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
+$as_echo "$lt_cv_ar_at_file" >&6; }
+
+if test no = "$lt_cv_ar_at_file"; then
+ archiver_list_spec=
+else
+ archiver_list_spec=$lt_cv_ar_at_file
+fi
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+test -z "$STRIP" && STRIP=:
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+test -z "$RANLIB" && RANLIB=:
+
+
+
+
+
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+ case $host_os in
+ bitrig* | openbsd*)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
+ ;;
+ *)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
+fi
+
+case $host_os in
+ darwin*)
+ lock_old_archive_extraction=yes ;;
+ *)
+ lock_old_archive_extraction=no ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
+$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
+if ${lt_cv_sys_global_symbol_pipe+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[BCDEGRST]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+ symcode='[BCDT]'
+ ;;
+cygwin* | mingw* | pw32* | cegcc*)
+ symcode='[ABCDGISTW]'
+ ;;
+hpux*)
+ if test ia64 = "$host_cpu"; then
+ symcode='[ABCDEGRST]'
+ fi
+ ;;
+irix* | nonstopux*)
+ symcode='[BCDEGRST]'
+ ;;
+osf*)
+ symcode='[BCDEGQRST]'
+ ;;
+solaris*)
+ symcode='[BDRT]'
+ ;;
+sco3.2v5*)
+ symcode='[DT]'
+ ;;
+sysv4.2uw2*)
+ symcode='[DT]'
+ ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+ symcode='[ABDT]'
+ ;;
+sysv4)
+ symcode='[DFNSTU]'
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[ABCDGIRSTW]' ;;
+esac
+
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Gets list of data symbols to import.
+ lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
+ # Adjust the below global symbol transforms to fixup imported variables.
+ lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
+ lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
+ lt_c_name_lib_hook="\
+ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
+ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
+else
+ # Disable hooks by default.
+ lt_cv_sys_global_symbol_to_import=
+ lt_cdecl_hook=
+ lt_c_name_hook=
+ lt_c_name_lib_hook=
+fi
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n"\
+$lt_cdecl_hook\
+" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
+$lt_c_name_hook\
+" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
+
+# Transform an extracted symbol line into symbol name with lib prefix and
+# symbol address.
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
+$lt_c_name_lib_hook\
+" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+ opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+ ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+ symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+ # Write the raw and C identifiers.
+ if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Fake it for dumpbin and say T for any non-static function,
+ # D for any global variable and I for any imported variable.
+ # Also find C++ and __fastcall symbols from MSVC++,
+ # which start with @ or ?.
+ lt_cv_sys_global_symbol_pipe="$AWK '"\
+" {last_section=section; section=\$ 3};"\
+" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
+" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
+" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
+" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
+" \$ 0!~/External *\|/{next};"\
+" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+" {if(hide[section]) next};"\
+" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
+" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
+" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
+" ' prfx=^$ac_symprfx"
+ else
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ fi
+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
+
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+
+ rm -f conftest*
+ cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
+ (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s "$nlist"; then
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<_LT_EOF > conftest.$ac_ext
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
+#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
+/* DATA imports from DLLs on WIN32 can't be const, because runtime
+ relocations are performed -- see ld's documentation on pseudo-relocs. */
+# define LT_DLSYM_CONST
+#elif defined __osf__
+/* This system does not cope well with relocations in const data. */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+ cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols. */
+LT_DLSYM_CONST struct {
+ const char *name;
+ void *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[] =
+{
+ { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+ $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ cat <<\_LT_EOF >> conftest.$ac_ext
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ lt_globsym_save_LIBS=$LIBS
+ lt_globsym_save_CFLAGS=$CFLAGS
+ LIBS=conftstm.$ac_objext
+ CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ pipe_works=yes
+ fi
+ LIBS=$lt_globsym_save_LIBS
+ CFLAGS=$lt_globsym_save_CFLAGS
+ else
+ echo "cannot find nm_test_func in $nlist" >&5
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&5
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
+ fi
+ else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ fi
+ rm -rf conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test yes = "$pipe_works"; then
+ break
+ else
+ lt_cv_sys_global_symbol_pipe=
+ fi
+done
+
+fi
+
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+$as_echo "failed" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+fi
+
+# Response file support.
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ nm_file_list_spec='@'
+elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
+ nm_file_list_spec='@'
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
+$as_echo_n "checking for sysroot... " >&6; }
+
+# Check whether --with-sysroot was given.
+if test "${with_sysroot+set}" = set; then :
+ withval=$with_sysroot;
+else
+ with_sysroot=no
+fi
+
+
+lt_sysroot=
+case $with_sysroot in #(
+ yes)
+ if test yes = "$GCC"; then
+ lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+ fi
+ ;; #(
+ /*)
+ lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+ ;; #(
+ no|'')
+ ;; #(
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
+$as_echo "$with_sysroot" >&6; }
+ as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
+ ;;
+esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
+$as_echo "${lt_sysroot:-no}" >&6; }
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
+$as_echo_n "checking for a working dd... " >&6; }
+if ${ac_cv_path_lt_DD+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ printf 0123456789abcdef0123456789abcdef >conftest.i
+cat conftest.i conftest.i >conftest2.i
+: ${lt_DD:=$DD}
+if test -z "$lt_DD"; then
+ ac_path_lt_DD_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in dd; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_lt_DD" || continue
+if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
+ cmp -s conftest.i conftest.out \
+ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
+fi
+ $ac_path_lt_DD_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_lt_DD"; then
+ :
+ fi
+else
+ ac_cv_path_lt_DD=$lt_DD
+fi
+
+rm -f conftest.i conftest2.i conftest.out
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
+$as_echo "$ac_cv_path_lt_DD" >&6; }
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
+$as_echo_n "checking how to truncate binary pipes... " >&6; }
+if ${lt_cv_truncate_bin+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ printf 0123456789abcdef0123456789abcdef >conftest.i
+cat conftest.i conftest.i >conftest2.i
+lt_cv_truncate_bin=
+if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
+ cmp -s conftest.i conftest.out \
+ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
+fi
+rm -f conftest.i conftest2.i conftest.out
+test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
+$as_echo "$lt_cv_truncate_bin" >&6; }
+
+
+
+
+
+
+
+# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
+func_cc_basename ()
+{
+ for cc_temp in $*""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+ done
+ func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+}
+
+# Check whether --enable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then :
+ enableval=$enable_libtool_lock;
+fi
+
+test no = "$enable_libtool_lock" || enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+ # Find out what ABI is being produced by ac_compile, and set mode
+ # options accordingly.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *ELF-32*)
+ HPUX_IA64_MODE=32
+ ;;
+ *ELF-64*)
+ HPUX_IA64_MODE=64
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+*-*-irix6*)
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly.
+ echo '#line '$LINENO' "configure"' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ if test yes = "$lt_cv_prog_gnu_ld"; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ fi
+ rm -rf conftest*
+ ;;
+
+mips64*-*linux*)
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly.
+ echo '#line '$LINENO' "configure"' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ emul=elf
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ emul="${emul}32"
+ ;;
+ *64-bit*)
+ emul="${emul}64"
+ ;;
+ esac
+ case `/usr/bin/file conftest.$ac_objext` in
+ *MSB*)
+ emul="${emul}btsmip"
+ ;;
+ *LSB*)
+ emul="${emul}ltsmip"
+ ;;
+ esac
+ case `/usr/bin/file conftest.$ac_objext` in
+ *N32*)
+ emul="${emul}n32"
+ ;;
+ esac
+ LD="${LD-ld} -m $emul"
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly. Note that the listed cases only cover the
+ # situations where additional linker options are needed (such as when
+ # doing 32-bit compilation for a host where ld defaults to 64-bit, or
+ # vice versa); the common cases where no linker options are needed do
+ # not appear in the list.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.o` in
+ *32-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
+ x86_64-*linux*)
+ case `/usr/bin/file conftest.o` in
+ *x86-64*)
+ LD="${LD-ld} -m elf32_x86_64"
+ ;;
+ *)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ esac
+ ;;
+ powerpc64le-*linux*)
+ LD="${LD-ld} -m elf32lppclinux"
+ ;;
+ powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ powerpcle-*linux*)
+ LD="${LD-ld} -m elf64lppc"
+ ;;
+ powerpc-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS -belf"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
+$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
+if ${lt_cv_cc_needs_belf+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ lt_cv_cc_needs_belf=yes
+else
+ lt_cv_cc_needs_belf=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
+$as_echo "$lt_cv_cc_needs_belf" >&6; }
+ if test yes != "$lt_cv_cc_needs_belf"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS=$SAVE_CFLAGS
+ fi
+ ;;
+*-*solaris*)
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.o` in
+ *64-bit*)
+ case $lt_cv_prog_gnu_ld in
+ yes*)
+ case $host in
+ i?86-*-solaris*|x86_64-*-solaris*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ sparc*-*-solaris*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
+ if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
+ LD=${LD-ld}_sol2
+ fi
+ ;;
+ *)
+ if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+ LD="${LD-ld} -64"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+esac
+
+need_locks=$enable_libtool_lock
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
+set dummy ${ac_tool_prefix}mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$MANIFEST_TOOL"; then
+ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
+if test -n "$MANIFEST_TOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
+$as_echo "$MANIFEST_TOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
+ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
+ # Extract the first word of "mt", so it can be a program name with args.
+set dummy mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_MANIFEST_TOOL"; then
+ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
+if test -n "$ac_ct_MANIFEST_TOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
+$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_MANIFEST_TOOL" = x; then
+ MANIFEST_TOOL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
+ fi
+else
+ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
+fi
+
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
+$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
+if ${lt_cv_path_mainfest_tool+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_path_mainfest_tool=no
+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
+ cat conftest.err >&5
+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then
+ lt_cv_path_mainfest_tool=yes
+ fi
+ rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
+$as_echo "$lt_cv_path_mainfest_tool" >&6; }
+if test yes != "$lt_cv_path_mainfest_tool"; then
+ MANIFEST_TOOL=:
+fi
+
+
+
+
+
+
+ case $host_os in
+ rhapsody* | darwin*)
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_DSYMUTIL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DSYMUTIL"; then
+ ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DSYMUTIL=$ac_cv_prog_DSYMUTIL
+if test -n "$DSYMUTIL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
+$as_echo "$DSYMUTIL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DSYMUTIL"; then
+ ac_ct_DSYMUTIL=$DSYMUTIL
+ # Extract the first word of "dsymutil", so it can be a program name with args.
+set dummy dsymutil; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DSYMUTIL"; then
+ ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
+if test -n "$ac_ct_DSYMUTIL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
+$as_echo "$ac_ct_DSYMUTIL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_DSYMUTIL" = x; then
+ DSYMUTIL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DSYMUTIL=$ac_ct_DSYMUTIL
+ fi
+else
+ DSYMUTIL="$ac_cv_prog_DSYMUTIL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
+set dummy ${ac_tool_prefix}nmedit; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_NMEDIT+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$NMEDIT"; then
+ ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+NMEDIT=$ac_cv_prog_NMEDIT
+if test -n "$NMEDIT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
+$as_echo "$NMEDIT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_NMEDIT"; then
+ ac_ct_NMEDIT=$NMEDIT
+ # Extract the first word of "nmedit", so it can be a program name with args.
+set dummy nmedit; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_NMEDIT"; then
+ ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_NMEDIT="nmedit"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
+if test -n "$ac_ct_NMEDIT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
+$as_echo "$ac_ct_NMEDIT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_NMEDIT" = x; then
+ NMEDIT=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ NMEDIT=$ac_ct_NMEDIT
+ fi
+else
+ NMEDIT="$ac_cv_prog_NMEDIT"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
+set dummy ${ac_tool_prefix}lipo; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_LIPO+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$LIPO"; then
+ ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+LIPO=$ac_cv_prog_LIPO
+if test -n "$LIPO"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
+$as_echo "$LIPO" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_LIPO"; then
+ ac_ct_LIPO=$LIPO
+ # Extract the first word of "lipo", so it can be a program name with args.
+set dummy lipo; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_LIPO"; then
+ ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_LIPO="lipo"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
+if test -n "$ac_ct_LIPO"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
+$as_echo "$ac_ct_LIPO" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_LIPO" = x; then
+ LIPO=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ LIPO=$ac_ct_LIPO
+ fi
+else
+ LIPO="$ac_cv_prog_LIPO"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OTOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OTOOL"; then
+ ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OTOOL=$ac_cv_prog_OTOOL
+if test -n "$OTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
+$as_echo "$OTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OTOOL"; then
+ ac_ct_OTOOL=$OTOOL
+ # Extract the first word of "otool", so it can be a program name with args.
+set dummy otool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OTOOL"; then
+ ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_OTOOL="otool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
+if test -n "$ac_ct_OTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
+$as_echo "$ac_ct_OTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OTOOL" = x; then
+ OTOOL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OTOOL=$ac_ct_OTOOL
+ fi
+else
+ OTOOL="$ac_cv_prog_OTOOL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool64; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OTOOL64+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OTOOL64"; then
+ ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OTOOL64=$ac_cv_prog_OTOOL64
+if test -n "$OTOOL64"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
+$as_echo "$OTOOL64" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OTOOL64"; then
+ ac_ct_OTOOL64=$OTOOL64
+ # Extract the first word of "otool64", so it can be a program name with args.
+set dummy otool64; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OTOOL64"; then
+ ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_OTOOL64="otool64"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
+if test -n "$ac_ct_OTOOL64"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
+$as_echo "$ac_ct_OTOOL64" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OTOOL64" = x; then
+ OTOOL64=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OTOOL64=$ac_ct_OTOOL64
+ fi
+else
+ OTOOL64="$ac_cv_prog_OTOOL64"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
+$as_echo_n "checking for -single_module linker flag... " >&6; }
+if ${lt_cv_apple_cc_single_mod+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_apple_cc_single_mod=no
+ if test -z "$LT_MULTI_MODULE"; then
+ # By default we will add the -single_module flag. You can override
+ # by either setting the environment variable LT_MULTI_MODULE
+ # non-empty at configure time, or by adding -multi_module to the
+ # link flags.
+ rm -rf libconftest.dylib*
+ echo "int foo(void){return 1;}" > conftest.c
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&5
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+ _lt_result=$?
+ # If there is a non-empty error log, and "single_module"
+ # appears in it, assume the flag caused a linker warning
+ if test -s conftest.err && $GREP single_module conftest.err; then
+ cat conftest.err >&5
+ # Otherwise, if the output was created with a 0 exit code from
+ # the compiler, it worked.
+ elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
+ lt_cv_apple_cc_single_mod=yes
+ else
+ cat conftest.err >&5
+ fi
+ rm -rf libconftest.dylib*
+ rm -f conftest.*
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
+$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
+$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
+if ${lt_cv_ld_exported_symbols_list+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ld_exported_symbols_list=no
+ save_LDFLAGS=$LDFLAGS
+ echo "_main" > conftest.sym
+ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ lt_cv_ld_exported_symbols_list=yes
+else
+ lt_cv_ld_exported_symbols_list=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
+$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
+$as_echo_n "checking for -force_load linker flag... " >&6; }
+if ${lt_cv_ld_force_load+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ld_force_load=no
+ cat > conftest.c << _LT_EOF
+int forced_loaded() { return 2;}
+_LT_EOF
+ echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
+ $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
+ echo "$AR cru libconftest.a conftest.o" >&5
+ $AR cru libconftest.a conftest.o 2>&5
+ echo "$RANLIB libconftest.a" >&5
+ $RANLIB libconftest.a 2>&5
+ cat > conftest.c << _LT_EOF
+int main() { return 0;}
+_LT_EOF
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
+ $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
+ _lt_result=$?
+ if test -s conftest.err && $GREP force_load conftest.err; then
+ cat conftest.err >&5
+ elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
+ lt_cv_ld_force_load=yes
+ else
+ cat conftest.err >&5
+ fi
+ rm -f conftest.err libconftest.a conftest conftest.c
+ rm -rf conftest.dSYM
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
+$as_echo "$lt_cv_ld_force_load" >&6; }
+ case $host_os in
+ rhapsody* | darwin1.[012])
+ _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
+ darwin1.*)
+ _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
+ darwin*) # darwin 5.x on
+ # if running on 10.5 or later, the deployment target defaults
+ # to the OS version, if on x86, and 10.4, the deployment
+ # target defaults to 10.4. Don't you love it?
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+ 10.[012][,.]*)
+ _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
+ 10.*)
+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+ esac
+ ;;
+ esac
+ if test yes = "$lt_cv_apple_cc_single_mod"; then
+ _lt_dar_single_mod='$single_module'
+ fi
+ if test yes = "$lt_cv_ld_exported_symbols_list"; then
+ _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
+ else
+ _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
+ fi
+ if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
+ _lt_dsymutil='~$DSYMUTIL $lib || :'
+ else
+ _lt_dsymutil=
+ fi
+ ;;
+ esac
+
+# func_munge_path_list VARIABLE PATH
+# -----------------------------------
+# VARIABLE is name of variable containing _space_ separated list of
+# directories to be munged by the contents of PATH, which is string
+# having a format:
+# "DIR[:DIR]:"
+# string "DIR[ DIR]" will be prepended to VARIABLE
+# ":DIR[:DIR]"
+# string "DIR[ DIR]" will be appended to VARIABLE
+# "DIRP[:DIRP]::[DIRA:]DIRA"
+# string "DIRP[ DIRP]" will be prepended to VARIABLE and string
+# "DIRA[ DIRA]" will be appended to VARIABLE
+# "DIR[:DIR]"
+# VARIABLE will be replaced by "DIR[ DIR]"
+func_munge_path_list ()
+{
+ case x$2 in
+ x)
+ ;;
+ *:)
+ eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \S|@1\"
+ ;;
+ x:*)
+ eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
+ ;;
+ *::*)
+ eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
+ eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
+ ;;
+ *)
+ eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
+ ;;
+ esac
+}
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if ${ac_cv_prog_CPP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_stdc=yes
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in dlfcn.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_dlfcn_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DLFCN_H 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+# Set options
+
+
+
+ enable_dlopen=no
+
+
+ enable_win32_dll=no
+
+
+ # Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then :
+ enableval=$enable_shared; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for pkg in $enableval; do
+ IFS=$lt_save_ifs
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac
+else
+ enable_shared=yes
+fi
+
+
+
+
+
+
+
+
+
+ # Check whether --enable-static was given.
+if test "${enable_static+set}" = set; then :
+ enableval=$enable_static; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for pkg in $enableval; do
+ IFS=$lt_save_ifs
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac
+else
+ enable_static=yes
+fi
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-pic was given.
+if test "${with_pic+set}" = set; then :
+ withval=$with_pic; lt_p=${PACKAGE-default}
+ case $withval in
+ yes|no) pic_mode=$withval ;;
+ *)
+ pic_mode=default
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for lt_pkg in $withval; do
+ IFS=$lt_save_ifs
+ if test "X$lt_pkg" = "X$lt_p"; then
+ pic_mode=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac
+else
+ pic_mode=default
+fi
+
+
+
+
+
+
+
+
+ # Check whether --enable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then :
+ enableval=$enable_fast_install; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for pkg in $enableval; do
+ IFS=$lt_save_ifs
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac
+else
+ enable_fast_install=yes
+fi
+
+
+
+
+
+
+
+
+ shared_archive_member_spec=
+case $host,$enable_shared in
+power*-*-aix[5-9]*,yes)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
+$as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
+
+# Check whether --with-aix-soname was given.
+if test "${with_aix_soname+set}" = set; then :
+ withval=$with_aix_soname; case $withval in
+ aix|svr4|both)
+ ;;
+ *)
+ as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
+ ;;
+ esac
+ lt_cv_with_aix_soname=$with_aix_soname
+else
+ if ${lt_cv_with_aix_soname+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_with_aix_soname=aix
+fi
+
+ with_aix_soname=$lt_cv_with_aix_soname
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
+$as_echo "$with_aix_soname" >&6; }
+ if test aix != "$with_aix_soname"; then
+ # For the AIX way of multilib, we name the shared archive member
+ # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
+ # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
+ # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
+ # the AIX toolchain works better with OBJECT_MODE set (default 32).
+ if test 64 = "${OBJECT_MODE-32}"; then
+ shared_archive_member_spec=shr_64
+ else
+ shared_archive_member_spec=shr
+ fi
+ fi
+ ;;
+*)
+ with_aix_soname=aix
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS=$ltmain
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+test -z "$LN_S" && LN_S="ln -s"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "${ZSH_VERSION+set}"; then
+ setopt NO_GLOB_SUBST
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
+$as_echo_n "checking for objdir... " >&6; }
+if ${lt_cv_objdir+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ lt_cv_objdir=.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
+$as_echo "$lt_cv_objdir" >&6; }
+objdir=$lt_cv_objdir
+
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define LT_OBJDIR "$lt_cv_objdir/"
+_ACEOF
+
+
+
+
+case $host_os in
+aix3*)
+ # AIX sometimes has problems with the GCC collect2 program. For some
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
+ # vanish in a puff of smoke.
+ if test set != "${COLLECT_NAMES+set}"; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a '.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+old_CC=$CC
+old_CFLAGS=$CFLAGS
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+func_cc_basename $compiler
+cc_basename=$func_cc_basename_result
+
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
+$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
+if ${lt_cv_path_MAGIC_CMD+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $MAGIC_CMD in
+[\\/*] | ?:[\\/]*)
+ lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD=$MAGIC_CMD
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+ for ac_dir in $ac_dummy; do
+ IFS=$lt_save_ifs
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/${ac_tool_prefix}file"; then
+ lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD=$lt_cv_path_MAGIC_CMD
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS=$lt_save_ifs
+ MAGIC_CMD=$lt_save_MAGIC_CMD
+ ;;
+esac
+fi
+
+MAGIC_CMD=$lt_cv_path_MAGIC_CMD
+if test -n "$MAGIC_CMD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
+$as_echo_n "checking for file... " >&6; }
+if ${lt_cv_path_MAGIC_CMD+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $MAGIC_CMD in
+[\\/*] | ?:[\\/]*)
+ lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD=$MAGIC_CMD
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+ for ac_dir in $ac_dummy; do
+ IFS=$lt_save_ifs
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/file"; then
+ lt_cv_path_MAGIC_CMD=$ac_dir/"file"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD=$lt_cv_path_MAGIC_CMD
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS=$lt_save_ifs
+ MAGIC_CMD=$lt_save_MAGIC_CMD
+ ;;
+esac
+fi
+
+MAGIC_CMD=$lt_cv_path_MAGIC_CMD
+if test -n "$MAGIC_CMD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ else
+ MAGIC_CMD=:
+ fi
+fi
+
+ fi
+ ;;
+esac
+
+# Use C for the default configuration in the libtool script
+
+lt_save_CC=$CC
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+objext=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+
+lt_prog_compiler_no_builtin_flag=
+
+if test yes = "$GCC"; then
+ case $cc_basename in
+ nvcc*)
+ lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
+ *)
+ lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
+ esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
+if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_rtti_exceptions=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_rtti_exceptions=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+
+if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
+ lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
+else
+ :
+fi
+
+fi
+
+
+
+
+
+
+ lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
+
+
+ if test yes = "$GCC"; then
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_static='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the '-m68020' flag to GCC prevents building anything better,
+ # like '-m68040'.
+ lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ case $host_os in
+ os2*)
+ lt_prog_compiler_static='$wl-static'
+ ;;
+ esac
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic='-fno-common'
+ ;;
+
+ haiku*)
+ # PIC is the default for Haiku.
+ # The "-static" flag exists, but is broken.
+ lt_prog_compiler_static=
+ ;;
+
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+ ;;
+
+ interix[3-9]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ lt_prog_compiler_can_build_shared=no
+ enable_shared=no
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic=-Kconform_pic
+ fi
+ ;;
+
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+
+ case $cc_basename in
+ nvcc*) # Cuda Compiler Driver 2.2
+ lt_prog_compiler_wl='-Xlinker '
+ if test -n "$lt_prog_compiler_pic"; then
+ lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
+ fi
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ lt_prog_compiler_wl='-Wl,'
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ else
+ lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic='-fno-common'
+ case $cc_basename in
+ nagfor*)
+ # NAG Fortran compiler
+ lt_prog_compiler_wl='-Wl,-Wl,,'
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ esac
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ case $host_os in
+ os2*)
+ lt_prog_compiler_static='$wl-static'
+ ;;
+ esac
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ lt_prog_compiler_static='$wl-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC (with -KPIC) is the default.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ case $cc_basename in
+ # old Intel for x86_64, which still supported -KPIC.
+ ecc*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ # icc used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ icc* | ifort*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ # Lahey Fortran 8.1.
+ lf95*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='--shared'
+ lt_prog_compiler_static='--static'
+ ;;
+ nagfor*)
+ # NAG Fortran compiler
+ lt_prog_compiler_wl='-Wl,-Wl,,'
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ tcc*)
+ # Fabrice Bellard et al's Tiny C Compiler
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fpic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ ccc*)
+ lt_prog_compiler_wl='-Wl,'
+ # All Alpha code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+ xl* | bgxl* | bgf* | mpixl*)
+ # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-qpic'
+ lt_prog_compiler_static='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl=''
+ ;;
+ *Sun\ F* | *Sun*Fortran*)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Qoption ld '
+ ;;
+ *Sun\ C*)
+ # Sun C 5.9
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Wl,'
+ ;;
+ *Intel*\ [CF]*Compiler*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ *Portland\ Group*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fpic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ newsos6)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ osf3* | osf4* | osf5*)
+ lt_prog_compiler_wl='-Wl,'
+ # All OSF/1 code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ rdos*)
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ solaris*)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
+ lt_prog_compiler_wl='-Qoption ld ';;
+ *)
+ lt_prog_compiler_wl='-Wl,';;
+ esac
+ ;;
+
+ sunos4*)
+ lt_prog_compiler_wl='-Qoption ld '
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic='-Kconform_pic'
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ ;;
+
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ unicos*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_can_build_shared=no
+ ;;
+
+ uts4*)
+ lt_prog_compiler_pic='-pic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *)
+ lt_prog_compiler_can_build_shared=no
+ ;;
+ esac
+ fi
+
+case $host_os in
+ # For platforms that do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ lt_prog_compiler_pic=
+ ;;
+ *)
+ lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+ ;;
+esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+if ${lt_cv_prog_compiler_pic+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
+$as_echo "$lt_cv_prog_compiler_pic" >&6; }
+lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
+if ${lt_cv_prog_compiler_pic_works+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_pic_works=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_pic_works=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
+
+if test yes = "$lt_cv_prog_compiler_pic_works"; then
+ case $lt_prog_compiler_pic in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+ esac
+else
+ lt_prog_compiler_pic=
+ lt_prog_compiler_can_build_shared=no
+fi
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if ${lt_cv_prog_compiler_static_works+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_static_works=no
+ save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_static_works=yes
+ fi
+ else
+ lt_cv_prog_compiler_static_works=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS=$save_LDFLAGS
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
+$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
+
+if test yes = "$lt_cv_prog_compiler_static_works"; then
+ :
+else
+ lt_prog_compiler_static=
+fi
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if ${lt_cv_prog_compiler_c_o+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if ${lt_cv_prog_compiler_c_o+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+hard_links=nottested
+if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
+ # do not overwrite the value of need_locks provided by the user
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
+ hard_links=yes
+ $RM conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
+ if test no = "$hard_links"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+
+ runpath_var=
+ allow_undefined_flag=
+ always_export_symbols=no
+ archive_cmds=
+ archive_expsym_cmds=
+ compiler_needs_object=no
+ enable_shared_with_static_runtimes=no
+ export_dynamic_flag_spec=
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ hardcode_automatic=no
+ hardcode_direct=no
+ hardcode_direct_absolute=no
+ hardcode_libdir_flag_spec=
+ hardcode_libdir_separator=
+ hardcode_minus_L=no
+ hardcode_shlibpath_var=unsupported
+ inherit_rpath=no
+ link_all_deplibs=unknown
+ module_cmds=
+ module_expsym_cmds=
+ old_archive_from_new_cmds=
+ old_archive_from_expsyms_cmds=
+ thread_safe_flag_spec=
+ whole_archive_flag_spec=
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ include_expsyms=
+ # exclude_expsyms can be an extended regexp of symbols to exclude
+ # it will be wrapped by ' (' and ')$', so one must not match beginning or
+ # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
+ # as well as any symbol that contains 'd'.
+ exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+ # platforms (ab)use it in PIC code, but their linkers get confused if
+ # the symbol is explicitly referenced. Since portable code cannot
+ # rely on this symbol name, it's probably fine to never include it in
+ # preloaded symbol tables.
+ # Exclude shared library initialization/finalization symbols.
+ extract_expsyms_cmds=
+
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test yes != "$GCC"; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd* | bitrig*)
+ with_gnu_ld=no
+ ;;
+ esac
+
+ ld_shlibs=yes
+
+ # On some targets, GNU ld is compatible enough with the native linker
+ # that we're better off using the native interface for both.
+ lt_use_gnu_ld_interface=no
+ if test yes = "$with_gnu_ld"; then
+ case $host_os in
+ aix*)
+ # The AIX port of GNU ld has always aspired to compatibility
+ # with the native linker. However, as the warning in the GNU ld
+ # block says, versions before 2.19.5* couldn't really create working
+ # shared libraries, regardless of the interface used.
+ case `$LD -v 2>&1` in
+ *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
+ *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
+ *\ \(GNU\ Binutils\)\ [3-9]*) ;;
+ *)
+ lt_use_gnu_ld_interface=yes
+ ;;
+ esac
+ ;;
+ *)
+ lt_use_gnu_ld_interface=yes
+ ;;
+ esac
+ fi
+
+ if test yes = "$lt_use_gnu_ld_interface"; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='$wl'
+
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ runpath_var=LD_RUN_PATH
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ export_dynamic_flag_spec='$wl--export-dynamic'
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+ whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
+ else
+ whole_archive_flag_spec=
+ fi
+ supports_anon_versioning=no
+ case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
+ *GNU\ gold*) supports_anon_versioning=yes ;;
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+ aix[3-9]*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test ia64 != "$host_cpu"; then
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.19, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to install binutils
+*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
+*** You will then need to restart the configuration process.
+
+_LT_EOF
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds=''
+ ;;
+ m68k)
+ archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ esac
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ allow_undefined_flag=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+ # as there is no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ export_dynamic_flag_spec='$wl--export-all-symbols'
+ allow_undefined_flag=unsupported
+ always_export_symbols=no
+ enable_shared_with_static_runtimes=yes
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
+ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file, use it as
+ # is; otherwise, prepend EXPORTS...
+ archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ haiku*)
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ link_all_deplibs=yes
+ ;;
+
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ allow_undefined_flag=unsupported
+ shrext_cmds=.dll
+ archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ prefix_cmds="$SED"~
+ if test EXPORTS = "`$SED 1q $export_symbols`"; then
+ prefix_cmds="$prefix_cmds -e 1d";
+ fi~
+ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ enable_shared_with_static_runtimes=yes
+ ;;
+
+ interix[3-9]*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='$wl-rpath,$libdir'
+ export_dynamic_flag_spec='$wl-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+ tmp_diet=no
+ if test linux-dietlibc = "$host_os"; then
+ case $cc_basename in
+ diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
+ esac
+ fi
+ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+ && test no = "$tmp_diet"
+ then
+ tmp_addflag=' $pic_flag'
+ tmp_sharedflag='-shared'
+ case $cc_basename,$host_cpu in
+ pgcc*) # Portland Group C compiler
+ whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+ pgf77* | pgf90* | pgf95* | pgfortran*)
+ # Portland Group f77 and f90 compilers
+ whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ tmp_addflag=' $pic_flag -Mnomain' ;;
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+ tmp_addflag=' -i_dynamic' ;;
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ lf95*) # Lahey Fortran 8.1
+ whole_archive_flag_spec=
+ tmp_sharedflag='--shared' ;;
+ nagfor*) # NAGFOR 5.3
+ tmp_sharedflag='-Wl,-shared' ;;
+ xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+ tmp_sharedflag='-qmkshrobj'
+ tmp_addflag= ;;
+ nvcc*) # Cuda Compiler Driver 2.2
+ whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ compiler_needs_object=yes
+ ;;
+ esac
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ compiler_needs_object=yes
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ esac
+ archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+
+ if test yes = "$supports_anon_versioning"; then
+ archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
+ fi
+
+ case $cc_basename in
+ tcc*)
+ export_dynamic_flag_spec='-rdynamic'
+ ;;
+ xlf* | bgf* | bgxlf* | mpixlf*)
+ # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+ whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
+ if test yes = "$supports_anon_versioning"; then
+ archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ esac
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
+ ;;
+
+ solaris*)
+ if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
+*** reliably create shared libraries on SCO systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ ;;
+ *)
+ # For security reasons, it is highly recommended that you always
+ # use absolute paths for naming shared libraries, and exclude the
+ # DT_RUNPATH tag from executables and libraries. But doing so
+ # requires that you compile everything twice, which is a pain.
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ ;;
+
+ sunos4*)
+ archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+
+ if test no = "$ld_shlibs"; then
+ runpath_var=
+ hardcode_libdir_flag_spec=
+ export_dynamic_flag_spec=
+ whole_archive_flag_spec=
+ fi
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ allow_undefined_flag=unsupported
+ always_export_symbols=yes
+ archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=yes
+ if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=unsupported
+ fi
+ ;;
+
+ aix[4-9]*)
+ if test ia64 = "$host_cpu"; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=
+ else
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to GNU nm, but means don't demangle to AIX nm.
+ # Without the "-l" option, or with the "-B" option, AIX nm treats
+ # weak defined symbols like other global defined symbols, whereas
+ # GNU nm marks them as "W".
+ # While the 'weak' keyword is ignored in the Export File, we need
+ # it in the Import File for the 'aix-soname' feature, so we have
+ # to replace the "-B" option with "-P" for AIX nm.
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
+ else
+ export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+ fi
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # have runtime linking enabled, and use it for executables.
+ # For shared libraries, we enable/disable runtime linking
+ # depending on the kind of the shared library created -
+ # when "with_aix_soname,aix_use_runtimelinking" is:
+ # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
+ # "aix,yes" lib.so shared, rtl:yes, for executables
+ # lib.a static archive
+ # "both,no" lib.so.V(shr.o) shared, rtl:yes
+ # lib.a(lib.so.V) shared, rtl:no, for executables
+ # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
+ # lib.a(lib.so.V) shared, rtl:no
+ # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
+ # lib.a static archive
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+ for ld_flag in $LDFLAGS; do
+ if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
+ # With aix-soname=svr4, we create the lib.so.V shared archives only,
+ # so we don't have lib.a shared libs to link our executables.
+ # We have to force runtime linking in this case.
+ aix_use_runtimelinking=yes
+ LDFLAGS="$LDFLAGS -Wl,-brtl"
+ fi
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ archive_cmds=''
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ file_list_spec='$wl-f,'
+ case $with_aix_soname,$aix_use_runtimelinking in
+ aix,*) ;; # traditional, no import file
+ svr4,* | *,yes) # use import file
+ # The Import File defines what to hardcode.
+ hardcode_direct=no
+ hardcode_direct_absolute=no
+ ;;
+ esac
+
+ if test yes = "$GCC"; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`$CC -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ hardcode_direct=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ hardcode_minus_L=yes
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_libdir_separator=
+ fi
+ ;;
+ esac
+ shared_flag='-shared'
+ if test yes = "$aix_use_runtimelinking"; then
+ shared_flag="$shared_flag "'$wl-G'
+ fi
+ # Need to ensure runtime linking is disabled for the traditional
+ # shared library, or the linker may eventually find shared libraries
+ # /with/ Import File - we do not want to mix them.
+ shared_flag_aix='-shared'
+ shared_flag_svr4='-shared $wl-G'
+ else
+ # not using gcc
+ if test ia64 = "$host_cpu"; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test yes = "$aix_use_runtimelinking"; then
+ shared_flag='$wl-G'
+ else
+ shared_flag='$wl-bM:SRE'
+ fi
+ shared_flag_aix='$wl-bM:SRE'
+ shared_flag_svr4='$wl-G'
+ fi
+ fi
+
+ export_dynamic_flag_spec='$wl-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to export.
+ always_export_symbols=yes
+ if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ allow_undefined_flag='-berok'
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ if test set = "${lt_cv_aix_libpath+set}"; then
+ aix_libpath=$lt_cv_aix_libpath
+else
+ if ${lt_cv_aix_libpath_+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+ lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\([^ ]*\) *$/\1/
+ p
+ }
+ }'
+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ # Check for a 64-bit object if we didn't find anything.
+ if test -z "$lt_cv_aix_libpath_"; then
+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test -z "$lt_cv_aix_libpath_"; then
+ lt_cv_aix_libpath_=/usr/lib:/lib
+ fi
+
+fi
+
+ aix_libpath=$lt_cv_aix_libpath_
+fi
+
+ hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
+ archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
+ else
+ if test ia64 = "$host_cpu"; then
+ hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
+ allow_undefined_flag="-z nodefs"
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ if test set = "${lt_cv_aix_libpath+set}"; then
+ aix_libpath=$lt_cv_aix_libpath
+else
+ if ${lt_cv_aix_libpath_+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+ lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\([^ ]*\) *$/\1/
+ p
+ }
+ }'
+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ # Check for a 64-bit object if we didn't find anything.
+ if test -z "$lt_cv_aix_libpath_"; then
+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test -z "$lt_cv_aix_libpath_"; then
+ lt_cv_aix_libpath_=/usr/lib:/lib
+ fi
+
+fi
+
+ aix_libpath=$lt_cv_aix_libpath_
+fi
+
+ hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ no_undefined_flag=' $wl-bernotok'
+ allow_undefined_flag=' $wl-berok'
+ if test yes = "$with_gnu_ld"; then
+ # We only use this code for GNU lds that support --whole-archive.
+ whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
+ else
+ # Exported symbols can be pulled into shared objects from archives
+ whole_archive_flag_spec='$convenience'
+ fi
+ archive_cmds_need_lc=yes
+ archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
+ # -brtl affects multiple linker settings, -berok does not and is overridden later
+ compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
+ if test svr4 != "$with_aix_soname"; then
+ # This is similar to how AIX traditionally builds its shared libraries.
+ archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
+ fi
+ if test aix != "$with_aix_soname"; then
+ archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
+ else
+ # used by -dlpreopen to get the symbols
+ archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
+ fi
+ archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds=''
+ ;;
+ m68k)
+ archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ esac
+ ;;
+
+ bsdi[45]*)
+ export_dynamic_flag_spec=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ case $cc_basename in
+ cl*)
+ # Native MSVC
+ hardcode_libdir_flag_spec=' '
+ allow_undefined_flag=unsupported
+ always_export_symbols=yes
+ file_list_spec='@'
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=.dll
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+ archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
+ cp "$export_symbols" "$output_objdir/$soname.def";
+ echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
+ else
+ $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
+ # The linker will not automatically build a static lib if we build a DLL.
+ # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
+ enable_shared_with_static_runtimes=yes
+ exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+ # Don't use ranlib
+ old_postinstall_cmds='chmod 644 $oldlib'
+ postlink_cmds='lt_outputfile="@OUTPUT@"~
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile=$lt_outputfile.exe
+ lt_tool_outputfile=$lt_tool_outputfile.exe
+ ;;
+ esac~
+ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
+ ;;
+ *)
+ # Assume MSVC wrapper
+ hardcode_libdir_flag_spec=' '
+ allow_undefined_flag=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=.dll
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ old_archive_from_new_cmds='true'
+ # FIXME: Should let the user specify the lib program.
+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ enable_shared_with_static_runtimes=yes
+ ;;
+ esac
+ ;;
+
+ darwin* | rhapsody*)
+
+
+ archive_cmds_need_lc=no
+ hardcode_direct=no
+ hardcode_automatic=yes
+ hardcode_shlibpath_var=unsupported
+ if test yes = "$lt_cv_ld_force_load"; then
+ whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+
+ else
+ whole_archive_flag_spec=''
+ fi
+ link_all_deplibs=yes
+ allow_undefined_flag=$_lt_dar_allow_undefined
+ case $cc_basename in
+ ifort*|nagfor*) _lt_dar_can_shared=yes ;;
+ *) _lt_dar_can_shared=$GCC ;;
+ esac
+ if test yes = "$_lt_dar_can_shared"; then
+ output_verbose_link_cmd=func_echo_all
+ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
+ module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
+ archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+ module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
+
+ else
+ ld_shlibs=no
+ fi
+
+ ;;
+
+ dgux*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2.*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | dragonfly*)
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ hpux9*)
+ if test yes = "$GCC"; then
+ archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
+ else
+ archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
+ fi
+ hardcode_libdir_flag_spec='$wl+b $wl$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ export_dynamic_flag_spec='$wl-E'
+ ;;
+
+ hpux10*)
+ if test yes,no = "$GCC,$with_gnu_ld"; then
+ archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ if test no = "$with_gnu_ld"; then
+ hardcode_libdir_flag_spec='$wl+b $wl$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='$wl-E'
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ fi
+ ;;
+
+ hpux11*)
+ if test yes,no = "$GCC,$with_gnu_ld"; then
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ else
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+
+ # Older versions of the 11.00 compiler do not understand -b yet
+ # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
+$as_echo_n "checking if $CC understands -b... " >&6; }
+if ${lt_cv_prog_compiler__b+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler__b=no
+ save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS -b"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler__b=yes
+ fi
+ else
+ lt_cv_prog_compiler__b=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS=$save_LDFLAGS
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
+$as_echo "$lt_cv_prog_compiler__b" >&6; }
+
+if test yes = "$lt_cv_prog_compiler__b"; then
+ archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+else
+ archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+fi
+
+ ;;
+ esac
+ fi
+ if test no = "$with_gnu_ld"; then
+ hardcode_libdir_flag_spec='$wl+b $wl$libdir'
+ hardcode_libdir_separator=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ ;;
+ *)
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='$wl-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test yes = "$GCC"; then
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ # Try to use the -exported_symbol ld option, if it does not
+ # work, assume that -exports_file does not work either and
+ # implicitly export all symbols.
+ # This should be the same for all languages, so no per-tag cache variable.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
+if ${lt_cv_irix_exported_symbol+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo (void) { return 0; }
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ lt_cv_irix_exported_symbol=yes
+else
+ lt_cv_irix_exported_symbol=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
+$as_echo "$lt_cv_irix_exported_symbol" >&6; }
+ if test yes = "$lt_cv_irix_exported_symbol"; then
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
+ fi
+ else
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ hardcode_libdir_separator=:
+ inherit_rpath=yes
+ link_all_deplibs=yes
+ ;;
+
+ linux*)
+ case $cc_basename in
+ tcc*)
+ # Fabrice Bellard et al's Tiny C Compiler
+ ld_shlibs=yes
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ else
+ archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ newsos6)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ hardcode_libdir_separator=:
+ hardcode_shlibpath_var=no
+ ;;
+
+ *nto* | *qnx*)
+ ;;
+
+ openbsd* | bitrig*)
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ hardcode_direct_absolute=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
+ hardcode_libdir_flag_spec='$wl-rpath,$libdir'
+ export_dynamic_flag_spec='$wl-E'
+ else
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='$wl-rpath,$libdir'
+ fi
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ allow_undefined_flag=unsupported
+ shrext_cmds=.dll
+ archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ prefix_cmds="$SED"~
+ if test EXPORTS = "`$SED 1q $export_symbols`"; then
+ prefix_cmds="$prefix_cmds -e 1d";
+ fi~
+ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ enable_shared_with_static_runtimes=yes
+ ;;
+
+ osf3*)
+ if test yes = "$GCC"; then
+ allow_undefined_flag=' $wl-expect_unresolved $wl\*'
+ archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ hardcode_libdir_separator=:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test yes = "$GCC"; then
+ allow_undefined_flag=' $wl-expect_unresolved $wl\*'
+ archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
+
+ # Both c and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec='-rpath $libdir'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_separator=:
+ ;;
+
+ solaris*)
+ no_undefined_flag=' -z defs'
+ if test yes = "$GCC"; then
+ wlarc='$wl'
+ archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ else
+ case `$CC -V 2>&1` in
+ *"Compilers 5.0"*)
+ wlarc=''
+ archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ ;;
+ *)
+ wlarc='$wl'
+ archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ ;;
+ esac
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_shlibpath_var=no
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands '-z linker_flag'. GCC discards it without '$wl',
+ # but is careful enough not to reorder.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ if test yes = "$GCC"; then
+ whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
+ else
+ whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
+ esac
+ link_all_deplibs=yes
+ ;;
+
+ sunos4*)
+ if test sequent = "$host_vendor"; then
+ # Use $CC to link under sequent, because it throws in some extra .o
+ # files that make .init and .fini sections work.
+ archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ reload_cmds='$CC -r -o $output$reload_objs'
+ hardcode_direct=no
+ ;;
+ motorola)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4.3*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ export_dynamic_flag_spec='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ ld_shlibs=yes
+ fi
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+ no_undefined_flag='$wl-z,text'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ runpath_var='LD_RUN_PATH'
+
+ if test yes = "$GCC"; then
+ archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We CANNOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ no_undefined_flag='$wl-z,text'
+ allow_undefined_flag='$wl-z,nodefs'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='$wl-R,$libdir'
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ export_dynamic_flag_spec='$wl-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ if test yes = "$GCC"; then
+ archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ uts4*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+
+ if test sni = "$host_vendor"; then
+ case $host in
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ export_dynamic_flag_spec='$wl-Blargedynsym'
+ ;;
+ esac
+ fi
+ fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
+$as_echo "$ld_shlibs" >&6; }
+test no = "$ld_shlibs" && can_build_shared=no
+
+with_gnu_ld=$with_gnu_ld
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc" in
+x|xyes)
+ # Assume -lc should be added
+ archive_cmds_need_lc=yes
+
+ if test yes,yes = "$GCC,$enable_shared"; then
+ case $archive_cmds in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
+if ${lt_cv_archive_cmds_need_lc+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ $RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$lt_prog_compiler_wl
+ pic_flag=$lt_prog_compiler_pic
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$allow_undefined_flag
+ allow_undefined_flag=
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+ (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ then
+ lt_cv_archive_cmds_need_lc=no
+ else
+ lt_cv_archive_cmds_need_lc=yes
+ fi
+ allow_undefined_flag=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
+$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
+ archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
+
+if test yes = "$GCC"; then
+ case $host_os in
+ darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
+ *) lt_awk_arg='/^libraries:/' ;;
+ esac
+ case $host_os in
+ mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
+ *) lt_sed_strip_eq='s|=/|/|g' ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
+ case $lt_search_path_spec in
+ *\;*)
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
+ ;;
+ *)
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
+ ;;
+ esac
+ # Ok, now we have the path, separated by spaces, we can step through it
+ # and add multilib dir if necessary...
+ lt_tmp_lt_search_path_spec=
+ lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ # ...but if some path component already ends with the multilib dir we assume
+ # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
+ case "$lt_multi_os_dir; $lt_search_path_spec " in
+ "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
+ lt_multi_os_dir=
+ ;;
+ esac
+ for lt_sys_path in $lt_search_path_spec; do
+ if test -d "$lt_sys_path$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
+ elif test -n "$lt_multi_os_dir"; then
+ test -d "$lt_sys_path" && \
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+ fi
+ done
+ lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
+BEGIN {RS = " "; FS = "/|\n";} {
+ lt_foo = "";
+ lt_count = 0;
+ for (lt_i = NF; lt_i > 0; lt_i--) {
+ if ($lt_i != "" && $lt_i != ".") {
+ if ($lt_i == "..") {
+ lt_count++;
+ } else {
+ if (lt_count == 0) {
+ lt_foo = "/" $lt_i lt_foo;
+ } else {
+ lt_count--;
+ }
+ }
+ }
+ }
+ if (lt_foo != "") { lt_freq[lt_foo]++; }
+ if (lt_freq[lt_foo] == 1) { print lt_foo; }
+}'`
+ # AWK program above erroneously prepends '/' to C:/dos/paths
+ # for these hosts.
+ case $host_os in
+ mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
+ $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
+ esac
+ sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=.so
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+
+
+case $host_os in
+aix3*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='$libname$release$shared_ext$major'
+ ;;
+
+aix[4-9]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 supports IA64
+ library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line '#! .'. This would cause the generated library to
+ # depend on '.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[01] | aix4.[01].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # Using Import Files as archive members, it is possible to support
+ # filename-based versioning of shared library archives on AIX. While
+ # this would work for both with and without runtime linking, it will
+ # prevent static linking of such archives. So we do filename-based
+ # shared library versioning with .so extension only, which is used
+ # when both runtime linking and shared linking is enabled.
+ # Unfortunately, runtime linking may impact performance, so we do
+ # not want this to be the default eventually. Also, we use the
+ # versioned .so libs for executables only if there is the -brtl
+ # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
+ # To allow for filename-based versioning support, we need to create
+ # libNAME.so.V as an archive file, containing:
+ # *) an Import File, referring to the versioned filename of the
+ # archive as well as the shared archive member, telling the
+ # bitwidth (32 or 64) of that shared object, and providing the
+ # list of exported symbols of that shared object, eventually
+ # decorated with the 'weak' keyword
+ # *) the shared object with the F_LOADONLY flag set, to really avoid
+ # it being seen by the linker.
+ # At run time we better use the real file rather than another symlink,
+ # but for link time we create the symlink libNAME.so -> libNAME.so.V
+
+ case $with_aix_soname,$aix_use_runtimelinking in
+ # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ aix,yes) # traditional libtool
+ dynamic_linker='AIX unversionable lib.so'
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ ;;
+ aix,no) # traditional AIX only
+ dynamic_linker='AIX lib.a(lib.so.V)'
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='$libname$release.a $libname.a'
+ soname_spec='$libname$release$shared_ext$major'
+ ;;
+ svr4,*) # full svr4 only
+ dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
+ library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+ # We do not specify a path in Import Files, so LIBPATH fires.
+ shlibpath_overrides_runpath=yes
+ ;;
+ *,yes) # both, prefer svr4
+ dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
+ library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+ # unpreferred sharedlib libNAME.a needs extra handling
+ postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
+ postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
+ # We do not specify a path in Import Files, so LIBPATH fires.
+ shlibpath_overrides_runpath=yes
+ ;;
+ *,no) # both, prefer aix
+ dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
+ library_names_spec='$libname$release.a $libname.a'
+ soname_spec='$libname$release$shared_ext$major'
+ # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
+ postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
+ postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
+ ;;
+ esac
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ case $host_cpu in
+ powerpc)
+ # Since July 2007 AmigaOS4 officially supports .so libraries.
+ # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ ;;
+ m68k)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ ;;
+ esac
+ ;;
+
+beos*)
+ library_names_spec='$libname$shared_ext'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[45]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+ version_type=windows
+ shrext_cmds=.dll
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$cc_basename in
+ yes,*)
+ # gcc
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
+ ;;
+ mingw* | cegcc*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ ;;
+
+ *,cl*)
+ # Native MSVC
+ libname_spec='$name'
+ soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ library_names_spec='$libname.dll.lib'
+
+ case $build_os in
+ mingw*)
+ sys_lib_search_path_spec=
+ lt_save_ifs=$IFS
+ IFS=';'
+ for lt_path in $LIB
+ do
+ IFS=$lt_save_ifs
+ # Let DOS variable expansion print the short 8.3 style file name.
+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+ done
+ IFS=$lt_save_ifs
+ # Convert to MSYS style.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
+ ;;
+ cygwin*)
+ # Convert to unix form, then to dos form, then back to unix form
+ # but this time dos style (no spaces!) so that the unix form looks
+ # like /cygdrive/c/PROGRA~1:/cygdr...
+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ ;;
+ *)
+ sys_lib_search_path_spec=$LIB
+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+ # It is most probably a Windows format PATH.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # FIXME: find the short name or the path components, as spaces are
+ # common. (e.g. "Program Files" -> "PROGRA~1")
+ ;;
+ esac
+
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+ dynamic_linker='Win32 link.exe'
+ ;;
+
+ *)
+ # Assume MSVC wrapper
+ library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
+ dynamic_linker='Win32 ld.exe'
+ ;;
+ esac
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
+ soname_spec='$libname$release$major$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[23].*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2.*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+haiku*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ dynamic_linker="$host_os runtime_loader"
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ if test 32 = "$HPUX_IA64_MODE"; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ sys_lib_dlsearch_path_spec=/usr/lib/hpux32
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ sys_lib_dlsearch_path_spec=/usr/lib/hpux64
+ fi
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
+ postinstall_cmds='chmod 555 $lib'
+ # or fails outright, so override atomically:
+ install_override_mode=555
+ ;;
+
+interix[3-9]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test yes = "$lt_cv_prog_gnu_ld"; then
+ version_type=linux # correct to gnu/linux during the next big refactor
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
+ sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+linux*android*)
+ version_type=none # Android doesn't support versioned libraries.
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext'
+ soname_spec='$libname$release$shared_ext'
+ finish_cmds=
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ dynamic_linker='Android linker'
+ # Don't embed -rpath directories since the linker doesn't support them.
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+
+ # Some binutils ld are patched to set DT_RUNPATH
+ if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_shlibpath_overrides_runpath=no
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
+ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
+ lt_cv_shlibpath_overrides_runpath=yes
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+
+fi
+
+ shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Ideally, we could use ldconfig to report *all* directores which are
+ # searched for libraries, however this is still not possible. Aside from not
+ # being certain /sbin/ldconfig is available, command
+ # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
+ # even though it is searched at run-time. Try to do the best guess by
+ # appending ld.so.conf contents (and includes) to the search path.
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd* | bitrig*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec=/usr/lib
+ need_lib_prefix=no
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+ need_version=no
+ else
+ need_version=yes
+ fi
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+os2*)
+ libname_spec='$name'
+ version_type=windows
+ shrext_cmds=.dll
+ need_version=no
+ need_lib_prefix=no
+ # OS/2 can only load a DLL with a base name of 8 characters or less.
+ soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
+ v=$($ECHO $release$versuffix | tr -d .-);
+ n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
+ $ECHO $n$v`$shared_ext'
+ library_names_spec='${libname}_dll.$libext'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=BEGINLIBPATH
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test yes = "$with_gnu_ld"; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec; then
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
+ soname_spec='$libname$shared_ext.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=sco
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test yes = "$with_gnu_ld"; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
+test no = "$dynamic_linker" && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test yes = "$GCC"; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
+ sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
+fi
+
+if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
+ sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
+fi
+
+# lt_cv_sys_lib... is unaugmented for libtool script decls...
+lt_cv_sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec
+
+# ..but sys_lib_... needs LT_SYS_LIBRARY_PATH munging for
+# LT_SYS_DLSEARCH_PATH macro in ltdl.m4 to work with the correct paths:
+func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" ||
+ test -n "$runpath_var" ||
+ test yes = "$hardcode_automatic"; then
+
+ # We can hardcode non-existent directories.
+ if test no != "$hardcode_direct" &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
+ test no != "$hardcode_minus_L"; then
+ # Linking always hardcodes the temporary library directory.
+ hardcode_action=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ hardcode_action=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ hardcode_action=unsupported
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
+$as_echo "$hardcode_action" >&6; }
+
+if test relink = "$hardcode_action" ||
+ test yes = "$inherit_rpath"; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test yes = "$shlibpath_overrides_runpath" ||
+ test no = "$enable_shared"; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+
+
+
+
+
+
+ if test yes != "$enable_dlopen"; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+ lt_cv_dlopen=no
+ lt_cv_dlopen_libs=
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen=load_add_on
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+ mingw* | pw32* | cegcc*)
+ lt_cv_dlopen=LoadLibrary
+ lt_cv_dlopen_libs=
+ ;;
+
+ cygwin*)
+ lt_cv_dlopen=dlopen
+ lt_cv_dlopen_libs=
+ ;;
+
+ darwin*)
+ # if libdl is installed we need to link against it
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if ${ac_cv_lib_dl_dlopen+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dl_dlopen=yes
+else
+ ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
+ lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
+else
+
+ lt_cv_dlopen=dyld
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+
+fi
+
+ ;;
+
+ tpf*)
+ # Don't try to run any link tests for TPF. We know it's impossible
+ # because TPF is a cross-compiler, and we know how we open DSOs.
+ lt_cv_dlopen=dlopen
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=no
+ ;;
+
+ *)
+ ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
+if test "x$ac_cv_func_shl_load" = xyes; then :
+ lt_cv_dlopen=shl_load
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
+$as_echo_n "checking for shl_load in -ldld... " >&6; }
+if ${ac_cv_lib_dld_shl_load+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+int
+main ()
+{
+return shl_load ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dld_shl_load=yes
+else
+ ac_cv_lib_dld_shl_load=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
+$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
+ lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
+else
+ ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
+if test "x$ac_cv_func_dlopen" = xyes; then :
+ lt_cv_dlopen=dlopen
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if ${ac_cv_lib_dl_dlopen+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dl_dlopen=yes
+else
+ ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
+ lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
+$as_echo_n "checking for dlopen in -lsvld... " >&6; }
+if ${ac_cv_lib_svld_dlopen+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_svld_dlopen=yes
+else
+ ac_cv_lib_svld_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
+$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
+if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
+ lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
+$as_echo_n "checking for dld_link in -ldld... " >&6; }
+if ${ac_cv_lib_dld_dld_link+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dld_link ();
+int
+main ()
+{
+return dld_link ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dld_dld_link=yes
+else
+ ac_cv_lib_dld_dld_link=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
+$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
+if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
+ lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+ ;;
+ esac
+
+ if test no = "$lt_cv_dlopen"; then
+ enable_dlopen=no
+ else
+ enable_dlopen=yes
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS=$CPPFLAGS
+ test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+ save_LDFLAGS=$LDFLAGS
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS=$LIBS
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
+$as_echo_n "checking whether a program can dlopen itself... " >&6; }
+if ${lt_cv_dlopen_self+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test yes = "$cross_compiling"; then :
+ lt_cv_dlopen_self=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+/* When -fvisibility=hidden is used, assume the code has been annotated
+ correspondingly for the symbols needed. */
+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 42; }
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else
+ {
+ if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ else puts (dlerror ());
+ }
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}
+_LT_EOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self=no
+ fi
+fi
+rm -fr conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
+$as_echo "$lt_cv_dlopen_self" >&6; }
+
+ if test yes = "$lt_cv_dlopen_self"; then
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
+$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
+if ${lt_cv_dlopen_self_static+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test yes = "$cross_compiling"; then :
+ lt_cv_dlopen_self_static=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+/* When -fvisibility=hidden is used, assume the code has been annotated
+ correspondingly for the symbols needed. */
+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 42; }
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else
+ {
+ if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ else puts (dlerror ());
+ }
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}
+_LT_EOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self_static=no
+ fi
+fi
+rm -fr conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
+$as_echo "$lt_cv_dlopen_self_static" >&6; }
+ fi
+
+ CPPFLAGS=$save_CPPFLAGS
+ LDFLAGS=$save_LDFLAGS
+ LIBS=$save_LIBS
+ ;;
+ esac
+
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+striplib=
+old_striplib=
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
+$as_echo_n "checking whether stripping libraries is possible... " >&6; }
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+ case $host_os in
+ darwin*)
+ if test -n "$STRIP"; then
+ striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ fi
+ ;;
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ ;;
+ esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+ # Report what library types will actually be built
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
+$as_echo_n "checking if libtool supports shared libraries... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
+$as_echo "$can_build_shared" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
+$as_echo_n "checking whether to build shared libraries... " >&6; }
+ test no = "$can_build_shared" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test yes = "$enable_shared" && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+ aix[4-9]*)
+ if test ia64 != "$host_cpu"; then
+ case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
+ yes,aix,yes) ;; # shared object as lib.so file only
+ yes,svr4,*) ;; # shared object as lib.so archive member only
+ yes,*) enable_static=no ;; # shared object in lib.a archive as well
+ esac
+ fi
+ ;;
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
+$as_echo "$enable_shared" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
+$as_echo_n "checking whether to build static libraries... " >&6; }
+ # Make sure either enable_shared or enable_static is yes.
+ test yes = "$enable_shared" || enable_static=yes
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
+$as_echo "$enable_static" >&6; }
+
+
+
+
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC=$lt_save_CC
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ac_config_commands="$ac_config_commands libtool"
+
+
+
+
+# Only expand once:
+
+
+
+
+ac_config_headers="$ac_config_headers config.h"
+
+
+# Checks for programs.
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+else
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+struct stat;
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
+$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
+if ${am_cv_prog_cc_c_o+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ # Make sure it works both with $CC and with simple cc.
+ # Following AC_PROG_CC_C_O, we do the test twice because some
+ # compilers refuse to overwrite an existing .o file with -o,
+ # though they will create one.
+ am_cv_prog_cc_c_o=yes
+ for am_i in 1 2; do
+ if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
+ ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } \
+ && test -f conftest2.$ac_objext; then
+ : OK
+ else
+ am_cv_prog_cc_c_o=no
+ break
+ fi
+ done
+ rm -f core conftest*
+ unset am_i
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
+$as_echo "$am_cv_prog_cc_c_o" >&6; }
+if test "$am_cv_prog_cc_c_o" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok '-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+ac_ext=f
+ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
+ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_f77_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_F77+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$F77"; then
+ ac_cv_prog_F77="$F77" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+F77=$ac_cv_prog_F77
+if test -n "$F77"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $F77" >&5
+$as_echo "$F77" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$F77" && break
+ done
+fi
+if test -z "$F77"; then
+ ac_ct_F77=$F77
+ for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_F77+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_F77"; then
+ ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_F77="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_F77=$ac_cv_prog_ac_ct_F77
+if test -n "$ac_ct_F77"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_F77" >&5
+$as_echo "$ac_ct_F77" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_F77" && break
+done
+
+ if test "x$ac_ct_F77" = x; then
+ F77=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ F77=$ac_ct_F77
+ fi
+fi
+
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+rm -f a.out
+
+# If we don't use `.F' as extension, the preprocessor is not run on the
+# input file. (Note that this only needs to work for GNU compilers.)
+ac_save_ext=$ac_ext
+ac_ext=F
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran 77 compiler" >&5
+$as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; }
+if ${ac_cv_f77_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat > conftest.$ac_ext <<_ACEOF
+ program main
+#ifndef __GNUC__
+ choke me
+#endif
+
+ end
+_ACEOF
+if ac_fn_f77_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_f77_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_compiler_gnu" >&5
+$as_echo "$ac_cv_f77_compiler_gnu" >&6; }
+ac_ext=$ac_save_ext
+ac_test_FFLAGS=${FFLAGS+set}
+ac_save_FFLAGS=$FFLAGS
+FFLAGS=
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -g" >&5
+$as_echo_n "checking whether $F77 accepts -g... " >&6; }
+if ${ac_cv_prog_f77_g+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ FFLAGS=-g
+cat > conftest.$ac_ext <<_ACEOF
+ program main
+
+ end
+_ACEOF
+if ac_fn_f77_try_compile "$LINENO"; then :
+ ac_cv_prog_f77_g=yes
+else
+ ac_cv_prog_f77_g=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_g" >&5
+$as_echo "$ac_cv_prog_f77_g" >&6; }
+if test "$ac_test_FFLAGS" = set; then
+ FFLAGS=$ac_save_FFLAGS
+elif test $ac_cv_prog_f77_g = yes; then
+ if test "x$ac_cv_f77_compiler_gnu" = xyes; then
+ FFLAGS="-g -O2"
+ else
+ FFLAGS="-g"
+ fi
+else
+ if test "x$ac_cv_f77_compiler_gnu" = xyes; then
+ FFLAGS="-O2"
+ else
+ FFLAGS=
+ fi
+fi
+
+if test $ac_compiler_gnu = yes; then
+ G77=yes
+else
+ G77=
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ ac_ext=f
+ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
+ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_f77_compiler_gnu
+
+if test -z "$F77" || test no = "$F77"; then
+ _lt_disable_F77=yes
+fi
+
+archive_cmds_need_lc_F77=no
+allow_undefined_flag_F77=
+always_export_symbols_F77=no
+archive_expsym_cmds_F77=
+export_dynamic_flag_spec_F77=
+hardcode_direct_F77=no
+hardcode_direct_absolute_F77=no
+hardcode_libdir_flag_spec_F77=
+hardcode_libdir_separator_F77=
+hardcode_minus_L_F77=no
+hardcode_automatic_F77=no
+inherit_rpath_F77=no
+module_cmds_F77=
+module_expsym_cmds_F77=
+link_all_deplibs_F77=unknown
+old_archive_cmds_F77=$old_archive_cmds
+reload_flag_F77=$reload_flag
+reload_cmds_F77=$reload_cmds
+no_undefined_flag_F77=
+whole_archive_flag_spec_F77=
+enable_shared_with_static_runtimes_F77=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+objext_F77=$objext
+
+# No sense in running all these tests if we already determined that
+# the F77 compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test yes != "$_lt_disable_F77"; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="\
+ subroutine t
+ return
+ end
+"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code="\
+ program t
+ end
+"
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+ # save warnings/boilerplate of simple test code
+ ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+ ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC=$CC
+ lt_save_GCC=$GCC
+ lt_save_CFLAGS=$CFLAGS
+ CC=${F77-"f77"}
+ CFLAGS=$FFLAGS
+ compiler=$CC
+ compiler_F77=$CC
+ func_cc_basename $compiler
+cc_basename=$func_cc_basename_result
+
+ GCC=$G77
+ if test -n "$compiler"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
+$as_echo_n "checking if libtool supports shared libraries... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
+$as_echo "$can_build_shared" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
+$as_echo_n "checking whether to build shared libraries... " >&6; }
+ test no = "$can_build_shared" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test yes = "$enable_shared" && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+ aix[4-9]*)
+ if test ia64 != "$host_cpu"; then
+ case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
+ yes,aix,yes) ;; # shared object as lib.so file only
+ yes,svr4,*) ;; # shared object as lib.so archive member only
+ yes,*) enable_static=no ;; # shared object in lib.a archive as well
+ esac
+ fi
+ ;;
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
+$as_echo "$enable_shared" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
+$as_echo_n "checking whether to build static libraries... " >&6; }
+ # Make sure either enable_shared or enable_static is yes.
+ test yes = "$enable_shared" || enable_static=yes
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
+$as_echo "$enable_static" >&6; }
+
+ GCC_F77=$G77
+ LD_F77=$LD
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ lt_prog_compiler_wl_F77=
+lt_prog_compiler_pic_F77=
+lt_prog_compiler_static_F77=
+
+
+ if test yes = "$GCC"; then
+ lt_prog_compiler_wl_F77='-Wl,'
+ lt_prog_compiler_static_F77='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static_F77='-Bstatic'
+ fi
+ lt_prog_compiler_pic_F77='-fPIC'
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ lt_prog_compiler_pic_F77='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the '-m68020' flag to GCC prevents building anything better,
+ # like '-m68040'.
+ lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ lt_prog_compiler_pic_F77='-DDLL_EXPORT'
+ case $host_os in
+ os2*)
+ lt_prog_compiler_static_F77='$wl-static'
+ ;;
+ esac
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic_F77='-fno-common'
+ ;;
+
+ haiku*)
+ # PIC is the default for Haiku.
+ # The "-static" flag exists, but is broken.
+ lt_prog_compiler_static_F77=
+ ;;
+
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic_F77='-fPIC'
+ ;;
+ esac
+ ;;
+
+ interix[3-9]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ lt_prog_compiler_can_build_shared_F77=no
+ enable_shared=no
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic_F77='-fPIC -shared'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic_F77=-Kconform_pic
+ fi
+ ;;
+
+ *)
+ lt_prog_compiler_pic_F77='-fPIC'
+ ;;
+ esac
+
+ case $cc_basename in
+ nvcc*) # Cuda Compiler Driver 2.2
+ lt_prog_compiler_wl_F77='-Xlinker '
+ if test -n "$lt_prog_compiler_pic_F77"; then
+ lt_prog_compiler_pic_F77="-Xcompiler $lt_prog_compiler_pic_F77"
+ fi
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ lt_prog_compiler_wl_F77='-Wl,'
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static_F77='-Bstatic'
+ else
+ lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic_F77='-fno-common'
+ case $cc_basename in
+ nagfor*)
+ # NAG Fortran compiler
+ lt_prog_compiler_wl_F77='-Wl,-Wl,,'
+ lt_prog_compiler_pic_F77='-PIC'
+ lt_prog_compiler_static_F77='-Bstatic'
+ ;;
+ esac
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ lt_prog_compiler_pic_F77='-DDLL_EXPORT'
+ case $host_os in
+ os2*)
+ lt_prog_compiler_static_F77='$wl-static'
+ ;;
+ esac
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ lt_prog_compiler_wl_F77='-Wl,'
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic_F77='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ lt_prog_compiler_static_F77='$wl-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ lt_prog_compiler_wl_F77='-Wl,'
+ # PIC (with -KPIC) is the default.
+ lt_prog_compiler_static_F77='-non_shared'
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ case $cc_basename in
+ # old Intel for x86_64, which still supported -KPIC.
+ ecc*)
+ lt_prog_compiler_wl_F77='-Wl,'
+ lt_prog_compiler_pic_F77='-KPIC'
+ lt_prog_compiler_static_F77='-static'
+ ;;
+ # icc used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ icc* | ifort*)
+ lt_prog_compiler_wl_F77='-Wl,'
+ lt_prog_compiler_pic_F77='-fPIC'
+ lt_prog_compiler_static_F77='-static'
+ ;;
+ # Lahey Fortran 8.1.
+ lf95*)
+ lt_prog_compiler_wl_F77='-Wl,'
+ lt_prog_compiler_pic_F77='--shared'
+ lt_prog_compiler_static_F77='--static'
+ ;;
+ nagfor*)
+ # NAG Fortran compiler
+ lt_prog_compiler_wl_F77='-Wl,-Wl,,'
+ lt_prog_compiler_pic_F77='-PIC'
+ lt_prog_compiler_static_F77='-Bstatic'
+ ;;
+ tcc*)
+ # Fabrice Bellard et al's Tiny C Compiler
+ lt_prog_compiler_wl_F77='-Wl,'
+ lt_prog_compiler_pic_F77='-fPIC'
+ lt_prog_compiler_static_F77='-static'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ lt_prog_compiler_wl_F77='-Wl,'
+ lt_prog_compiler_pic_F77='-fpic'
+ lt_prog_compiler_static_F77='-Bstatic'
+ ;;
+ ccc*)
+ lt_prog_compiler_wl_F77='-Wl,'
+ # All Alpha code is PIC.
+ lt_prog_compiler_static_F77='-non_shared'
+ ;;
+ xl* | bgxl* | bgf* | mpixl*)
+ # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
+ lt_prog_compiler_wl_F77='-Wl,'
+ lt_prog_compiler_pic_F77='-qpic'
+ lt_prog_compiler_static_F77='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ lt_prog_compiler_pic_F77='-KPIC'
+ lt_prog_compiler_static_F77='-Bstatic'
+ lt_prog_compiler_wl_F77=''
+ ;;
+ *Sun\ F* | *Sun*Fortran*)
+ lt_prog_compiler_pic_F77='-KPIC'
+ lt_prog_compiler_static_F77='-Bstatic'
+ lt_prog_compiler_wl_F77='-Qoption ld '
+ ;;
+ *Sun\ C*)
+ # Sun C 5.9
+ lt_prog_compiler_pic_F77='-KPIC'
+ lt_prog_compiler_static_F77='-Bstatic'
+ lt_prog_compiler_wl_F77='-Wl,'
+ ;;
+ *Intel*\ [CF]*Compiler*)
+ lt_prog_compiler_wl_F77='-Wl,'
+ lt_prog_compiler_pic_F77='-fPIC'
+ lt_prog_compiler_static_F77='-static'
+ ;;
+ *Portland\ Group*)
+ lt_prog_compiler_wl_F77='-Wl,'
+ lt_prog_compiler_pic_F77='-fpic'
+ lt_prog_compiler_static_F77='-Bstatic'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ newsos6)
+ lt_prog_compiler_pic_F77='-KPIC'
+ lt_prog_compiler_static_F77='-Bstatic'
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic_F77='-fPIC -shared'
+ ;;
+
+ osf3* | osf4* | osf5*)
+ lt_prog_compiler_wl_F77='-Wl,'
+ # All OSF/1 code is PIC.
+ lt_prog_compiler_static_F77='-non_shared'
+ ;;
+
+ rdos*)
+ lt_prog_compiler_static_F77='-non_shared'
+ ;;
+
+ solaris*)
+ lt_prog_compiler_pic_F77='-KPIC'
+ lt_prog_compiler_static_F77='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
+ lt_prog_compiler_wl_F77='-Qoption ld ';;
+ *)
+ lt_prog_compiler_wl_F77='-Wl,';;
+ esac
+ ;;
+
+ sunos4*)
+ lt_prog_compiler_wl_F77='-Qoption ld '
+ lt_prog_compiler_pic_F77='-PIC'
+ lt_prog_compiler_static_F77='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ lt_prog_compiler_wl_F77='-Wl,'
+ lt_prog_compiler_pic_F77='-KPIC'
+ lt_prog_compiler_static_F77='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic_F77='-Kconform_pic'
+ lt_prog_compiler_static_F77='-Bstatic'
+ fi
+ ;;
+
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ lt_prog_compiler_wl_F77='-Wl,'
+ lt_prog_compiler_pic_F77='-KPIC'
+ lt_prog_compiler_static_F77='-Bstatic'
+ ;;
+
+ unicos*)
+ lt_prog_compiler_wl_F77='-Wl,'
+ lt_prog_compiler_can_build_shared_F77=no
+ ;;
+
+ uts4*)
+ lt_prog_compiler_pic_F77='-pic'
+ lt_prog_compiler_static_F77='-Bstatic'
+ ;;
+
+ *)
+ lt_prog_compiler_can_build_shared_F77=no
+ ;;
+ esac
+ fi
+
+case $host_os in
+ # For platforms that do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ lt_prog_compiler_pic_F77=
+ ;;
+ *)
+ lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77"
+ ;;
+esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+if ${lt_cv_prog_compiler_pic_F77+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_pic_F77=$lt_prog_compiler_pic_F77
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_F77" >&5
+$as_echo "$lt_cv_prog_compiler_pic_F77" >&6; }
+lt_prog_compiler_pic_F77=$lt_cv_prog_compiler_pic_F77
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_F77"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... " >&6; }
+if ${lt_cv_prog_compiler_pic_works_F77+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_pic_works_F77=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$lt_prog_compiler_pic_F77" ## exclude from sc_useless_quotes_in_assignment
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_pic_works_F77=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_F77" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works_F77" >&6; }
+
+if test yes = "$lt_cv_prog_compiler_pic_works_F77"; then
+ case $lt_prog_compiler_pic_F77 in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;;
+ esac
+else
+ lt_prog_compiler_pic_F77=
+ lt_prog_compiler_can_build_shared_F77=no
+fi
+
+fi
+
+
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if ${lt_cv_prog_compiler_static_works_F77+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_static_works_F77=no
+ save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_static_works_F77=yes
+ fi
+ else
+ lt_cv_prog_compiler_static_works_F77=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS=$save_LDFLAGS
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_F77" >&5
+$as_echo "$lt_cv_prog_compiler_static_works_F77" >&6; }
+
+if test yes = "$lt_cv_prog_compiler_static_works_F77"; then
+ :
+else
+ lt_prog_compiler_static_F77=
+fi
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if ${lt_cv_prog_compiler_c_o_F77+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_c_o_F77=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o_F77=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_F77" >&5
+$as_echo "$lt_cv_prog_compiler_c_o_F77" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if ${lt_cv_prog_compiler_c_o_F77+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_c_o_F77=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o_F77=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_F77" >&5
+$as_echo "$lt_cv_prog_compiler_c_o_F77" >&6; }
+
+
+
+
+hard_links=nottested
+if test no = "$lt_cv_prog_compiler_c_o_F77" && test no != "$need_locks"; then
+ # do not overwrite the value of need_locks provided by the user
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
+ hard_links=yes
+ $RM conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
+ if test no = "$hard_links"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+
+ runpath_var=
+ allow_undefined_flag_F77=
+ always_export_symbols_F77=no
+ archive_cmds_F77=
+ archive_expsym_cmds_F77=
+ compiler_needs_object_F77=no
+ enable_shared_with_static_runtimes_F77=no
+ export_dynamic_flag_spec_F77=
+ export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ hardcode_automatic_F77=no
+ hardcode_direct_F77=no
+ hardcode_direct_absolute_F77=no
+ hardcode_libdir_flag_spec_F77=
+ hardcode_libdir_separator_F77=
+ hardcode_minus_L_F77=no
+ hardcode_shlibpath_var_F77=unsupported
+ inherit_rpath_F77=no
+ link_all_deplibs_F77=unknown
+ module_cmds_F77=
+ module_expsym_cmds_F77=
+ old_archive_from_new_cmds_F77=
+ old_archive_from_expsyms_cmds_F77=
+ thread_safe_flag_spec_F77=
+ whole_archive_flag_spec_F77=
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ include_expsyms_F77=
+ # exclude_expsyms can be an extended regexp of symbols to exclude
+ # it will be wrapped by ' (' and ')$', so one must not match beginning or
+ # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
+ # as well as any symbol that contains 'd'.
+ exclude_expsyms_F77='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+ # platforms (ab)use it in PIC code, but their linkers get confused if
+ # the symbol is explicitly referenced. Since portable code cannot
+ # rely on this symbol name, it's probably fine to never include it in
+ # preloaded symbol tables.
+ # Exclude shared library initialization/finalization symbols.
+ extract_expsyms_cmds=
+
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test yes != "$GCC"; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd* | bitrig*)
+ with_gnu_ld=no
+ ;;
+ esac
+
+ ld_shlibs_F77=yes
+
+ # On some targets, GNU ld is compatible enough with the native linker
+ # that we're better off using the native interface for both.
+ lt_use_gnu_ld_interface=no
+ if test yes = "$with_gnu_ld"; then
+ case $host_os in
+ aix*)
+ # The AIX port of GNU ld has always aspired to compatibility
+ # with the native linker. However, as the warning in the GNU ld
+ # block says, versions before 2.19.5* couldn't really create working
+ # shared libraries, regardless of the interface used.
+ case `$LD -v 2>&1` in
+ *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
+ *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
+ *\ \(GNU\ Binutils\)\ [3-9]*) ;;
+ *)
+ lt_use_gnu_ld_interface=yes
+ ;;
+ esac
+ ;;
+ *)
+ lt_use_gnu_ld_interface=yes
+ ;;
+ esac
+ fi
+
+ if test yes = "$lt_use_gnu_ld_interface"; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='$wl'
+
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ runpath_var=LD_RUN_PATH
+ hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir'
+ export_dynamic_flag_spec_F77='$wl--export-dynamic'
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+ whole_archive_flag_spec_F77=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
+ else
+ whole_archive_flag_spec_F77=
+ fi
+ supports_anon_versioning=no
+ case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
+ *GNU\ gold*) supports_anon_versioning=yes ;;
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+ aix[3-9]*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test ia64 != "$host_cpu"; then
+ ld_shlibs_F77=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.19, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to install binutils
+*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
+*** You will then need to restart the configuration process.
+
+_LT_EOF
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds_F77=''
+ ;;
+ m68k)
+ archive_cmds_F77='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec_F77='-L$libdir'
+ hardcode_minus_L_F77=yes
+ ;;
+ esac
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ allow_undefined_flag_F77=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ else
+ ld_shlibs_F77=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless,
+ # as there is no search path for DLLs.
+ hardcode_libdir_flag_spec_F77='-L$libdir'
+ export_dynamic_flag_spec_F77='$wl--export-all-symbols'
+ allow_undefined_flag_F77=unsupported
+ always_export_symbols_F77=no
+ enable_shared_with_static_runtimes_F77=yes
+ export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
+ exclude_expsyms_F77='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file, use it as
+ # is; otherwise, prepend EXPORTS...
+ archive_expsym_cmds_F77='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ ld_shlibs_F77=no
+ fi
+ ;;
+
+ haiku*)
+ archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ link_all_deplibs_F77=yes
+ ;;
+
+ os2*)
+ hardcode_libdir_flag_spec_F77='-L$libdir'
+ hardcode_minus_L_F77=yes
+ allow_undefined_flag_F77=unsupported
+ shrext_cmds=.dll
+ archive_cmds_F77='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ archive_expsym_cmds_F77='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ prefix_cmds="$SED"~
+ if test EXPORTS = "`$SED 1q $export_symbols`"; then
+ prefix_cmds="$prefix_cmds -e 1d";
+ fi~
+ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ old_archive_From_new_cmds_F77='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ enable_shared_with_static_runtimes_F77=yes
+ ;;
+
+ interix[3-9]*)
+ hardcode_direct_F77=no
+ hardcode_shlibpath_var_F77=no
+ hardcode_libdir_flag_spec_F77='$wl-rpath,$libdir'
+ export_dynamic_flag_spec_F77='$wl-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds_F77='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+ tmp_diet=no
+ if test linux-dietlibc = "$host_os"; then
+ case $cc_basename in
+ diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
+ esac
+ fi
+ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+ && test no = "$tmp_diet"
+ then
+ tmp_addflag=' $pic_flag'
+ tmp_sharedflag='-shared'
+ case $cc_basename,$host_cpu in
+ pgcc*) # Portland Group C compiler
+ whole_archive_flag_spec_F77='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+ pgf77* | pgf90* | pgf95* | pgfortran*)
+ # Portland Group f77 and f90 compilers
+ whole_archive_flag_spec_F77='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ tmp_addflag=' $pic_flag -Mnomain' ;;
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+ tmp_addflag=' -i_dynamic' ;;
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ lf95*) # Lahey Fortran 8.1
+ whole_archive_flag_spec_F77=
+ tmp_sharedflag='--shared' ;;
+ nagfor*) # NAGFOR 5.3
+ tmp_sharedflag='-Wl,-shared' ;;
+ xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+ tmp_sharedflag='-qmkshrobj'
+ tmp_addflag= ;;
+ nvcc*) # Cuda Compiler Driver 2.2
+ whole_archive_flag_spec_F77='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ compiler_needs_object_F77=yes
+ ;;
+ esac
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ whole_archive_flag_spec_F77='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ compiler_needs_object_F77=yes
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ esac
+ archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+
+ if test yes = "$supports_anon_versioning"; then
+ archive_expsym_cmds_F77='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
+ fi
+
+ case $cc_basename in
+ tcc*)
+ export_dynamic_flag_spec_F77='-rdynamic'
+ ;;
+ xlf* | bgf* | bgxlf* | mpixlf*)
+ # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+ whole_archive_flag_spec_F77='--whole-archive$convenience --no-whole-archive'
+ hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir'
+ archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
+ if test yes = "$supports_anon_versioning"; then
+ archive_expsym_cmds_F77='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ esac
+ else
+ ld_shlibs_F77=no
+ fi
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
+ ;;
+
+ solaris*)
+ if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+ ld_shlibs_F77=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs_F77=no
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+ ld_shlibs_F77=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
+*** reliably create shared libraries on SCO systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ ;;
+ *)
+ # For security reasons, it is highly recommended that you always
+ # use absolute paths for naming shared libraries, and exclude the
+ # DT_RUNPATH tag from executables and libraries. But doing so
+ # requires that you compile everything twice, which is a pain.
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir'
+ archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs_F77=no
+ fi
+ ;;
+ esac
+ ;;
+
+ sunos4*)
+ archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ hardcode_direct_F77=yes
+ hardcode_shlibpath_var_F77=no
+ ;;
+
+ *)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs_F77=no
+ fi
+ ;;
+ esac
+
+ if test no = "$ld_shlibs_F77"; then
+ runpath_var=
+ hardcode_libdir_flag_spec_F77=
+ export_dynamic_flag_spec_F77=
+ whole_archive_flag_spec_F77=
+ fi
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ allow_undefined_flag_F77=unsupported
+ always_export_symbols_F77=yes
+ archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L_F77=yes
+ if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct_F77=unsupported
+ fi
+ ;;
+
+ aix[4-9]*)
+ if test ia64 = "$host_cpu"; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=
+ else
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to GNU nm, but means don't demangle to AIX nm.
+ # Without the "-l" option, or with the "-B" option, AIX nm treats
+ # weak defined symbols like other global defined symbols, whereas
+ # GNU nm marks them as "W".
+ # While the 'weak' keyword is ignored in the Export File, we need
+ # it in the Import File for the 'aix-soname' feature, so we have
+ # to replace the "-B" option with "-P" for AIX nm.
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
+ else
+ export_symbols_cmds_F77='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+ fi
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # have runtime linking enabled, and use it for executables.
+ # For shared libraries, we enable/disable runtime linking
+ # depending on the kind of the shared library created -
+ # when "with_aix_soname,aix_use_runtimelinking" is:
+ # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
+ # "aix,yes" lib.so shared, rtl:yes, for executables
+ # lib.a static archive
+ # "both,no" lib.so.V(shr.o) shared, rtl:yes
+ # lib.a(lib.so.V) shared, rtl:no, for executables
+ # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
+ # lib.a(lib.so.V) shared, rtl:no
+ # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
+ # lib.a static archive
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+ for ld_flag in $LDFLAGS; do
+ if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
+ # With aix-soname=svr4, we create the lib.so.V shared archives only,
+ # so we don't have lib.a shared libs to link our executables.
+ # We have to force runtime linking in this case.
+ aix_use_runtimelinking=yes
+ LDFLAGS="$LDFLAGS -Wl,-brtl"
+ fi
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ archive_cmds_F77=''
+ hardcode_direct_F77=yes
+ hardcode_direct_absolute_F77=yes
+ hardcode_libdir_separator_F77=':'
+ link_all_deplibs_F77=yes
+ file_list_spec_F77='$wl-f,'
+ case $with_aix_soname,$aix_use_runtimelinking in
+ aix,*) ;; # traditional, no import file
+ svr4,* | *,yes) # use import file
+ # The Import File defines what to hardcode.
+ hardcode_direct_F77=no
+ hardcode_direct_absolute_F77=no
+ ;;
+ esac
+
+ if test yes = "$GCC"; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`$CC -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ hardcode_direct_F77=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ hardcode_minus_L_F77=yes
+ hardcode_libdir_flag_spec_F77='-L$libdir'
+ hardcode_libdir_separator_F77=
+ fi
+ ;;
+ esac
+ shared_flag='-shared'
+ if test yes = "$aix_use_runtimelinking"; then
+ shared_flag="$shared_flag "'$wl-G'
+ fi
+ # Need to ensure runtime linking is disabled for the traditional
+ # shared library, or the linker may eventually find shared libraries
+ # /with/ Import File - we do not want to mix them.
+ shared_flag_aix='-shared'
+ shared_flag_svr4='-shared $wl-G'
+ else
+ # not using gcc
+ if test ia64 = "$host_cpu"; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test yes = "$aix_use_runtimelinking"; then
+ shared_flag='$wl-G'
+ else
+ shared_flag='$wl-bM:SRE'
+ fi
+ shared_flag_aix='$wl-bM:SRE'
+ shared_flag_svr4='$wl-G'
+ fi
+ fi
+
+ export_dynamic_flag_spec_F77='$wl-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to export.
+ always_export_symbols_F77=yes
+ if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ allow_undefined_flag_F77='-berok'
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ if test set = "${lt_cv_aix_libpath+set}"; then
+ aix_libpath=$lt_cv_aix_libpath
+else
+ if ${lt_cv_aix_libpath__F77+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat > conftest.$ac_ext <<_ACEOF
+ program main
+
+ end
+_ACEOF
+if ac_fn_f77_try_link "$LINENO"; then :
+
+ lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\([^ ]*\) *$/\1/
+ p
+ }
+ }'
+ lt_cv_aix_libpath__F77=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ # Check for a 64-bit object if we didn't find anything.
+ if test -z "$lt_cv_aix_libpath__F77"; then
+ lt_cv_aix_libpath__F77=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test -z "$lt_cv_aix_libpath__F77"; then
+ lt_cv_aix_libpath__F77=/usr/lib:/lib
+ fi
+
+fi
+
+ aix_libpath=$lt_cv_aix_libpath__F77
+fi
+
+ hardcode_libdir_flag_spec_F77='$wl-blibpath:$libdir:'"$aix_libpath"
+ archive_expsym_cmds_F77='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
+ else
+ if test ia64 = "$host_cpu"; then
+ hardcode_libdir_flag_spec_F77='$wl-R $libdir:/usr/lib:/lib'
+ allow_undefined_flag_F77="-z nodefs"
+ archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ if test set = "${lt_cv_aix_libpath+set}"; then
+ aix_libpath=$lt_cv_aix_libpath
+else
+ if ${lt_cv_aix_libpath__F77+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat > conftest.$ac_ext <<_ACEOF
+ program main
+
+ end
+_ACEOF
+if ac_fn_f77_try_link "$LINENO"; then :
+
+ lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\([^ ]*\) *$/\1/
+ p
+ }
+ }'
+ lt_cv_aix_libpath__F77=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ # Check for a 64-bit object if we didn't find anything.
+ if test -z "$lt_cv_aix_libpath__F77"; then
+ lt_cv_aix_libpath__F77=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test -z "$lt_cv_aix_libpath__F77"; then
+ lt_cv_aix_libpath__F77=/usr/lib:/lib
+ fi
+
+fi
+
+ aix_libpath=$lt_cv_aix_libpath__F77
+fi
+
+ hardcode_libdir_flag_spec_F77='$wl-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ no_undefined_flag_F77=' $wl-bernotok'
+ allow_undefined_flag_F77=' $wl-berok'
+ if test yes = "$with_gnu_ld"; then
+ # We only use this code for GNU lds that support --whole-archive.
+ whole_archive_flag_spec_F77='$wl--whole-archive$convenience $wl--no-whole-archive'
+ else
+ # Exported symbols can be pulled into shared objects from archives
+ whole_archive_flag_spec_F77='$convenience'
+ fi
+ archive_cmds_need_lc_F77=yes
+ archive_expsym_cmds_F77='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
+ # -brtl affects multiple linker settings, -berok does not and is overridden later
+ compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
+ if test svr4 != "$with_aix_soname"; then
+ # This is similar to how AIX traditionally builds its shared libraries.
+ archive_expsym_cmds_F77="$archive_expsym_cmds_F77"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
+ fi
+ if test aix != "$with_aix_soname"; then
+ archive_expsym_cmds_F77="$archive_expsym_cmds_F77"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
+ else
+ # used by -dlpreopen to get the symbols
+ archive_expsym_cmds_F77="$archive_expsym_cmds_F77"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
+ fi
+ archive_expsym_cmds_F77="$archive_expsym_cmds_F77"'~$RM -r $output_objdir/$realname.d'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds_F77=''
+ ;;
+ m68k)
+ archive_cmds_F77='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec_F77='-L$libdir'
+ hardcode_minus_L_F77=yes
+ ;;
+ esac
+ ;;
+
+ bsdi[45]*)
+ export_dynamic_flag_spec_F77=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ case $cc_basename in
+ cl*)
+ # Native MSVC
+ hardcode_libdir_flag_spec_F77=' '
+ allow_undefined_flag_F77=unsupported
+ always_export_symbols_F77=yes
+ file_list_spec_F77='@'
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=.dll
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds_F77='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+ archive_expsym_cmds_F77='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
+ cp "$export_symbols" "$output_objdir/$soname.def";
+ echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
+ else
+ $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
+ # The linker will not automatically build a static lib if we build a DLL.
+ # _LT_TAGVAR(old_archive_from_new_cmds, F77)='true'
+ enable_shared_with_static_runtimes_F77=yes
+ exclude_expsyms_F77='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+ export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+ # Don't use ranlib
+ old_postinstall_cmds_F77='chmod 644 $oldlib'
+ postlink_cmds_F77='lt_outputfile="@OUTPUT@"~
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile=$lt_outputfile.exe
+ lt_tool_outputfile=$lt_tool_outputfile.exe
+ ;;
+ esac~
+ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
+ ;;
+ *)
+ # Assume MSVC wrapper
+ hardcode_libdir_flag_spec_F77=' '
+ allow_undefined_flag_F77=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=.dll
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ old_archive_from_new_cmds_F77='true'
+ # FIXME: Should let the user specify the lib program.
+ old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ enable_shared_with_static_runtimes_F77=yes
+ ;;
+ esac
+ ;;
+
+ darwin* | rhapsody*)
+
+
+ archive_cmds_need_lc_F77=no
+ hardcode_direct_F77=no
+ hardcode_automatic_F77=yes
+ hardcode_shlibpath_var_F77=unsupported
+ if test yes = "$lt_cv_ld_force_load"; then
+ whole_archive_flag_spec_F77='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+ compiler_needs_object_F77=yes
+ else
+ whole_archive_flag_spec_F77=''
+ fi
+ link_all_deplibs_F77=yes
+ allow_undefined_flag_F77=$_lt_dar_allow_undefined
+ case $cc_basename in
+ ifort*|nagfor*) _lt_dar_can_shared=yes ;;
+ *) _lt_dar_can_shared=$GCC ;;
+ esac
+ if test yes = "$_lt_dar_can_shared"; then
+ output_verbose_link_cmd=func_echo_all
+ archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
+ module_cmds_F77="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
+ archive_expsym_cmds_F77="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+ module_expsym_cmds_F77="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
+
+ else
+ ld_shlibs_F77=no
+ fi
+
+ ;;
+
+ dgux*)
+ archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec_F77='-L$libdir'
+ hardcode_shlibpath_var_F77=no
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ hardcode_libdir_flag_spec_F77='-R$libdir'
+ hardcode_direct_F77=yes
+ hardcode_shlibpath_var_F77=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2.*)
+ archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct_F77=yes
+ hardcode_minus_L_F77=yes
+ hardcode_shlibpath_var_F77=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | dragonfly*)
+ archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec_F77='-R$libdir'
+ hardcode_direct_F77=yes
+ hardcode_shlibpath_var_F77=no
+ ;;
+
+ hpux9*)
+ if test yes = "$GCC"; then
+ archive_cmds_F77='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
+ else
+ archive_cmds_F77='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
+ fi
+ hardcode_libdir_flag_spec_F77='$wl+b $wl$libdir'
+ hardcode_libdir_separator_F77=:
+ hardcode_direct_F77=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L_F77=yes
+ export_dynamic_flag_spec_F77='$wl-E'
+ ;;
+
+ hpux10*)
+ if test yes,no = "$GCC,$with_gnu_ld"; then
+ archive_cmds_F77='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ if test no = "$with_gnu_ld"; then
+ hardcode_libdir_flag_spec_F77='$wl+b $wl$libdir'
+ hardcode_libdir_separator_F77=:
+ hardcode_direct_F77=yes
+ hardcode_direct_absolute_F77=yes
+ export_dynamic_flag_spec_F77='$wl-E'
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L_F77=yes
+ fi
+ ;;
+
+ hpux11*)
+ if test yes,no = "$GCC,$with_gnu_ld"; then
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds_F77='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds_F77='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds_F77='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ else
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds_F77='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds_F77='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds_F77='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ fi
+ if test no = "$with_gnu_ld"; then
+ hardcode_libdir_flag_spec_F77='$wl+b $wl$libdir'
+ hardcode_libdir_separator_F77=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ hardcode_direct_F77=no
+ hardcode_shlibpath_var_F77=no
+ ;;
+ *)
+ hardcode_direct_F77=yes
+ hardcode_direct_absolute_F77=yes
+ export_dynamic_flag_spec_F77='$wl-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L_F77=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test yes = "$GCC"; then
+ archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ # Try to use the -exported_symbol ld option, if it does not
+ # work, assume that -exports_file does not work either and
+ # implicitly export all symbols.
+ # This should be the same for all languages, so no per-tag cache variable.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
+if ${lt_cv_irix_exported_symbol+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
+ cat > conftest.$ac_ext <<_ACEOF
+
+ subroutine foo
+ end
+_ACEOF
+if ac_fn_f77_try_link "$LINENO"; then :
+ lt_cv_irix_exported_symbol=yes
+else
+ lt_cv_irix_exported_symbol=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
+$as_echo "$lt_cv_irix_exported_symbol" >&6; }
+ if test yes = "$lt_cv_irix_exported_symbol"; then
+ archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
+ fi
+ else
+ archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
+ fi
+ archive_cmds_need_lc_F77='no'
+ hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir'
+ hardcode_libdir_separator_F77=:
+ inherit_rpath_F77=yes
+ link_all_deplibs_F77=yes
+ ;;
+
+ linux*)
+ case $cc_basename in
+ tcc*)
+ # Fabrice Bellard et al's Tiny C Compiler
+ ld_shlibs_F77=yes
+ archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ else
+ archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ fi
+ hardcode_libdir_flag_spec_F77='-R$libdir'
+ hardcode_direct_F77=yes
+ hardcode_shlibpath_var_F77=no
+ ;;
+
+ newsos6)
+ archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct_F77=yes
+ hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir'
+ hardcode_libdir_separator_F77=:
+ hardcode_shlibpath_var_F77=no
+ ;;
+
+ *nto* | *qnx*)
+ ;;
+
+ openbsd* | bitrig*)
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct_F77=yes
+ hardcode_shlibpath_var_F77=no
+ hardcode_direct_absolute_F77=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+ archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
+ hardcode_libdir_flag_spec_F77='$wl-rpath,$libdir'
+ export_dynamic_flag_spec_F77='$wl-E'
+ else
+ archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec_F77='$wl-rpath,$libdir'
+ fi
+ else
+ ld_shlibs_F77=no
+ fi
+ ;;
+
+ os2*)
+ hardcode_libdir_flag_spec_F77='-L$libdir'
+ hardcode_minus_L_F77=yes
+ allow_undefined_flag_F77=unsupported
+ shrext_cmds=.dll
+ archive_cmds_F77='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ archive_expsym_cmds_F77='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ prefix_cmds="$SED"~
+ if test EXPORTS = "`$SED 1q $export_symbols`"; then
+ prefix_cmds="$prefix_cmds -e 1d";
+ fi~
+ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ old_archive_From_new_cmds_F77='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ enable_shared_with_static_runtimes_F77=yes
+ ;;
+
+ osf3*)
+ if test yes = "$GCC"; then
+ allow_undefined_flag_F77=' $wl-expect_unresolved $wl\*'
+ archive_cmds_F77='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ else
+ allow_undefined_flag_F77=' -expect_unresolved \*'
+ archive_cmds_F77='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ fi
+ archive_cmds_need_lc_F77='no'
+ hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir'
+ hardcode_libdir_separator_F77=:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test yes = "$GCC"; then
+ allow_undefined_flag_F77=' $wl-expect_unresolved $wl\*'
+ archive_cmds_F77='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir'
+ else
+ allow_undefined_flag_F77=' -expect_unresolved \*'
+ archive_cmds_F77='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
+
+ # Both c and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec_F77='-rpath $libdir'
+ fi
+ archive_cmds_need_lc_F77='no'
+ hardcode_libdir_separator_F77=:
+ ;;
+
+ solaris*)
+ no_undefined_flag_F77=' -z defs'
+ if test yes = "$GCC"; then
+ wlarc='$wl'
+ archive_cmds_F77='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_F77='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ else
+ case `$CC -V 2>&1` in
+ *"Compilers 5.0"*)
+ wlarc=''
+ archive_cmds_F77='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ archive_expsym_cmds_F77='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ ;;
+ *)
+ wlarc='$wl'
+ archive_cmds_F77='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_F77='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ ;;
+ esac
+ fi
+ hardcode_libdir_flag_spec_F77='-R$libdir'
+ hardcode_shlibpath_var_F77=no
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands '-z linker_flag'. GCC discards it without '$wl',
+ # but is careful enough not to reorder.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ if test yes = "$GCC"; then
+ whole_archive_flag_spec_F77='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
+ else
+ whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
+ esac
+ link_all_deplibs_F77=yes
+ ;;
+
+ sunos4*)
+ if test sequent = "$host_vendor"; then
+ # Use $CC to link under sequent, because it throws in some extra .o
+ # files that make .init and .fini sections work.
+ archive_cmds_F77='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ hardcode_libdir_flag_spec_F77='-L$libdir'
+ hardcode_direct_F77=yes
+ hardcode_minus_L_F77=yes
+ hardcode_shlibpath_var_F77=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct_F77=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ reload_cmds_F77='$CC -r -o $output$reload_objs'
+ hardcode_direct_F77=no
+ ;;
+ motorola)
+ archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ hardcode_shlibpath_var_F77=no
+ ;;
+
+ sysv4.3*)
+ archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var_F77=no
+ export_dynamic_flag_spec_F77='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var_F77=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ ld_shlibs_F77=yes
+ fi
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+ no_undefined_flag_F77='$wl-z,text'
+ archive_cmds_need_lc_F77=no
+ hardcode_shlibpath_var_F77=no
+ runpath_var='LD_RUN_PATH'
+
+ if test yes = "$GCC"; then
+ archive_cmds_F77='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_F77='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds_F77='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_F77='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We CANNOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ no_undefined_flag_F77='$wl-z,text'
+ allow_undefined_flag_F77='$wl-z,nodefs'
+ archive_cmds_need_lc_F77=no
+ hardcode_shlibpath_var_F77=no
+ hardcode_libdir_flag_spec_F77='$wl-R,$libdir'
+ hardcode_libdir_separator_F77=':'
+ link_all_deplibs_F77=yes
+ export_dynamic_flag_spec_F77='$wl-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ if test yes = "$GCC"; then
+ archive_cmds_F77='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_F77='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds_F77='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_F77='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ uts4*)
+ archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec_F77='-L$libdir'
+ hardcode_shlibpath_var_F77=no
+ ;;
+
+ *)
+ ld_shlibs_F77=no
+ ;;
+ esac
+
+ if test sni = "$host_vendor"; then
+ case $host in
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ export_dynamic_flag_spec_F77='$wl-Blargedynsym'
+ ;;
+ esac
+ fi
+ fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_F77" >&5
+$as_echo "$ld_shlibs_F77" >&6; }
+test no = "$ld_shlibs_F77" && can_build_shared=no
+
+with_gnu_ld_F77=$with_gnu_ld
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_F77" in
+x|xyes)
+ # Assume -lc should be added
+ archive_cmds_need_lc_F77=yes
+
+ if test yes,yes = "$GCC,$enable_shared"; then
+ case $archive_cmds_F77 in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
+if ${lt_cv_archive_cmds_need_lc_F77+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ $RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$lt_prog_compiler_wl_F77
+ pic_flag=$lt_prog_compiler_pic_F77
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$allow_undefined_flag_F77
+ allow_undefined_flag_F77=
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_F77 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+ (eval $archive_cmds_F77 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ then
+ lt_cv_archive_cmds_need_lc_F77=no
+ else
+ lt_cv_archive_cmds_need_lc_F77=yes
+ fi
+ allow_undefined_flag_F77=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_F77" >&5
+$as_echo "$lt_cv_archive_cmds_need_lc_F77" >&6; }
+ archive_cmds_need_lc_F77=$lt_cv_archive_cmds_need_lc_F77
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
+
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=.so
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+
+
+case $host_os in
+aix3*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='$libname$release$shared_ext$major'
+ ;;
+
+aix[4-9]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 supports IA64
+ library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line '#! .'. This would cause the generated library to
+ # depend on '.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[01] | aix4.[01].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # Using Import Files as archive members, it is possible to support
+ # filename-based versioning of shared library archives on AIX. While
+ # this would work for both with and without runtime linking, it will
+ # prevent static linking of such archives. So we do filename-based
+ # shared library versioning with .so extension only, which is used
+ # when both runtime linking and shared linking is enabled.
+ # Unfortunately, runtime linking may impact performance, so we do
+ # not want this to be the default eventually. Also, we use the
+ # versioned .so libs for executables only if there is the -brtl
+ # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
+ # To allow for filename-based versioning support, we need to create
+ # libNAME.so.V as an archive file, containing:
+ # *) an Import File, referring to the versioned filename of the
+ # archive as well as the shared archive member, telling the
+ # bitwidth (32 or 64) of that shared object, and providing the
+ # list of exported symbols of that shared object, eventually
+ # decorated with the 'weak' keyword
+ # *) the shared object with the F_LOADONLY flag set, to really avoid
+ # it being seen by the linker.
+ # At run time we better use the real file rather than another symlink,
+ # but for link time we create the symlink libNAME.so -> libNAME.so.V
+
+ case $with_aix_soname,$aix_use_runtimelinking in
+ # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ aix,yes) # traditional libtool
+ dynamic_linker='AIX unversionable lib.so'
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ ;;
+ aix,no) # traditional AIX only
+ dynamic_linker='AIX lib.a(lib.so.V)'
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='$libname$release.a $libname.a'
+ soname_spec='$libname$release$shared_ext$major'
+ ;;
+ svr4,*) # full svr4 only
+ dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
+ library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+ # We do not specify a path in Import Files, so LIBPATH fires.
+ shlibpath_overrides_runpath=yes
+ ;;
+ *,yes) # both, prefer svr4
+ dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
+ library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+ # unpreferred sharedlib libNAME.a needs extra handling
+ postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
+ postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
+ # We do not specify a path in Import Files, so LIBPATH fires.
+ shlibpath_overrides_runpath=yes
+ ;;
+ *,no) # both, prefer aix
+ dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
+ library_names_spec='$libname$release.a $libname.a'
+ soname_spec='$libname$release$shared_ext$major'
+ # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
+ postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
+ postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
+ ;;
+ esac
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ case $host_cpu in
+ powerpc)
+ # Since July 2007 AmigaOS4 officially supports .so libraries.
+ # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ ;;
+ m68k)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ ;;
+ esac
+ ;;
+
+beos*)
+ library_names_spec='$libname$shared_ext'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[45]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+ version_type=windows
+ shrext_cmds=.dll
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$cc_basename in
+ yes,*)
+ # gcc
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+
+ ;;
+ mingw* | cegcc*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ ;;
+
+ *,cl*)
+ # Native MSVC
+ libname_spec='$name'
+ soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ library_names_spec='$libname.dll.lib'
+
+ case $build_os in
+ mingw*)
+ sys_lib_search_path_spec=
+ lt_save_ifs=$IFS
+ IFS=';'
+ for lt_path in $LIB
+ do
+ IFS=$lt_save_ifs
+ # Let DOS variable expansion print the short 8.3 style file name.
+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+ done
+ IFS=$lt_save_ifs
+ # Convert to MSYS style.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
+ ;;
+ cygwin*)
+ # Convert to unix form, then to dos form, then back to unix form
+ # but this time dos style (no spaces!) so that the unix form looks
+ # like /cygdrive/c/PROGRA~1:/cygdr...
+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ ;;
+ *)
+ sys_lib_search_path_spec=$LIB
+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+ # It is most probably a Windows format PATH.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # FIXME: find the short name or the path components, as spaces are
+ # common. (e.g. "Program Files" -> "PROGRA~1")
+ ;;
+ esac
+
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+ dynamic_linker='Win32 link.exe'
+ ;;
+
+ *)
+ # Assume MSVC wrapper
+ library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
+ dynamic_linker='Win32 ld.exe'
+ ;;
+ esac
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
+ soname_spec='$libname$release$major$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[23].*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2.*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+haiku*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ dynamic_linker="$host_os runtime_loader"
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ if test 32 = "$HPUX_IA64_MODE"; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ sys_lib_dlsearch_path_spec=/usr/lib/hpux32
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ sys_lib_dlsearch_path_spec=/usr/lib/hpux64
+ fi
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
+ postinstall_cmds='chmod 555 $lib'
+ # or fails outright, so override atomically:
+ install_override_mode=555
+ ;;
+
+interix[3-9]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test yes = "$lt_cv_prog_gnu_ld"; then
+ version_type=linux # correct to gnu/linux during the next big refactor
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
+ sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+linux*android*)
+ version_type=none # Android doesn't support versioned libraries.
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext'
+ soname_spec='$libname$release$shared_ext'
+ finish_cmds=
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ dynamic_linker='Android linker'
+ # Don't embed -rpath directories since the linker doesn't support them.
+ hardcode_libdir_flag_spec_F77='-L$libdir'
+ ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+
+ # Some binutils ld are patched to set DT_RUNPATH
+ if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_shlibpath_overrides_runpath=no
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_F77\"; \
+ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_F77\""
+ cat > conftest.$ac_ext <<_ACEOF
+ program main
+
+ end
+_ACEOF
+if ac_fn_f77_try_link "$LINENO"; then :
+ if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
+ lt_cv_shlibpath_overrides_runpath=yes
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+
+fi
+
+ shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Ideally, we could use ldconfig to report *all* directores which are
+ # searched for libraries, however this is still not possible. Aside from not
+ # being certain /sbin/ldconfig is available, command
+ # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
+ # even though it is searched at run-time. Try to do the best guess by
+ # appending ld.so.conf contents (and includes) to the search path.
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd* | bitrig*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec=/usr/lib
+ need_lib_prefix=no
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+ need_version=no
+ else
+ need_version=yes
+ fi
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+os2*)
+ libname_spec='$name'
+ version_type=windows
+ shrext_cmds=.dll
+ need_version=no
+ need_lib_prefix=no
+ # OS/2 can only load a DLL with a base name of 8 characters or less.
+ soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
+ v=$($ECHO $release$versuffix | tr -d .-);
+ n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
+ $ECHO $n$v`$shared_ext'
+ library_names_spec='${libname}_dll.$libext'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=BEGINLIBPATH
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test yes = "$with_gnu_ld"; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec; then
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
+ soname_spec='$libname$shared_ext.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=sco
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test yes = "$with_gnu_ld"; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
+test no = "$dynamic_linker" && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test yes = "$GCC"; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
+ sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
+fi
+
+if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
+ sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
+fi
+
+# lt_cv_sys_lib... is unaugmented for libtool script decls...
+lt_cv_sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec
+
+# ..but sys_lib_... needs LT_SYS_LIBRARY_PATH munging for
+# LT_SYS_DLSEARCH_PATH macro in ltdl.m4 to work with the correct paths:
+func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+hardcode_action_F77=
+if test -n "$hardcode_libdir_flag_spec_F77" ||
+ test -n "$runpath_var_F77" ||
+ test yes = "$hardcode_automatic_F77"; then
+
+ # We can hardcode non-existent directories.
+ if test no != "$hardcode_direct_F77" &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, F77)" &&
+ test no != "$hardcode_minus_L_F77"; then
+ # Linking always hardcodes the temporary library directory.
+ hardcode_action_F77=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ hardcode_action_F77=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ hardcode_action_F77=unsupported
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_F77" >&5
+$as_echo "$hardcode_action_F77" >&6; }
+
+if test relink = "$hardcode_action_F77" ||
+ test yes = "$inherit_rpath_F77"; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test yes = "$shlibpath_overrides_runpath" ||
+ test no = "$enable_shared"; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+
+
+
+
+
+
+
+ fi # test -n "$compiler"
+
+ GCC=$lt_save_GCC
+ CC=$lt_save_CC
+ CFLAGS=$lt_save_CFLAGS
+fi # test yes != "$_lt_disable_F77"
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+$as_echo_n "checking whether ln -s works... " >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+$as_echo "no, using $LN_S" >&6; }
+fi
+
+
+# Checks for libraries.
+
+# Checks for header files.
+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = xyes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned int
+_ACEOF
+
+fi
+
+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+# for constant arguments. Useless!
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
+$as_echo_n "checking for working alloca.h... " >&6; }
+if ${ac_cv_working_alloca_h+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <alloca.h>
+int
+main ()
+{
+char *p = (char *) alloca (2 * sizeof (int));
+ if (p) return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_working_alloca_h=yes
+else
+ ac_cv_working_alloca_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
+$as_echo "$ac_cv_working_alloca_h" >&6; }
+if test $ac_cv_working_alloca_h = yes; then
+
+$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
+$as_echo_n "checking for alloca... " >&6; }
+if ${ac_cv_func_alloca_works+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#else
+# ifdef _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
+# else
+# ifdef HAVE_ALLOCA_H
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca /* predefined by HP cc +Olibcalls */
+void *alloca (size_t);
+# endif
+# endif
+# endif
+# endif
+#endif
+
+int
+main ()
+{
+char *p = (char *) alloca (1);
+ if (p) return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_func_alloca_works=yes
+else
+ ac_cv_func_alloca_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
+$as_echo "$ac_cv_func_alloca_works" >&6; }
+
+if test $ac_cv_func_alloca_works = yes; then
+
+$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
+
+else
+ # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+# that cause trouble. Some versions do not even contain alloca or
+# contain a buggy version. If you still want to use their alloca,
+# use ar to extract alloca.o from them instead of compiling alloca.c.
+
+ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
+
+$as_echo "#define C_ALLOCA 1" >>confdefs.h
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
+$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
+if ${ac_cv_os_cray+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined CRAY && ! defined CRAY2
+webecray
+#else
+wenotbecray
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "webecray" >/dev/null 2>&1; then :
+ ac_cv_os_cray=yes
+else
+ ac_cv_os_cray=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
+$as_echo "$ac_cv_os_cray" >&6; }
+if test $ac_cv_os_cray = yes; then
+ for ac_func in _getb67 GETB67 getb67; do
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+
+cat >>confdefs.h <<_ACEOF
+#define CRAY_STACKSEG_END $ac_func
+_ACEOF
+
+ break
+fi
+
+ done
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
+$as_echo_n "checking stack direction for C alloca... " >&6; }
+if ${ac_cv_c_stack_direction+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ ac_cv_c_stack_direction=0
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+find_stack_direction (int *addr, int depth)
+{
+ int dir, dummy = 0;
+ if (! addr)
+ addr = &dummy;
+ *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
+ dir = depth ? find_stack_direction (addr, depth - 1) : 0;
+ return dir + dummy;
+}
+
+int
+main (int argc, char **argv)
+{
+ return find_stack_direction (0, argc + !argv + 20) < 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_c_stack_direction=1
+else
+ ac_cv_c_stack_direction=-1
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
+$as_echo "$ac_cv_c_stack_direction" >&6; }
+cat >>confdefs.h <<_ACEOF
+#define STACK_DIRECTION $ac_cv_c_stack_direction
+_ACEOF
+
+
+fi
+
+for ac_header in fcntl.h limits.h malloc.h stddef.h stdlib.h string.h strings.h unistd.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+# Checks for typedefs, structures, and compiler characteristics.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
+$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
+if ${ac_cv_header_stdbool_h+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <stdbool.h>
+ #ifndef bool
+ "error: bool is not defined"
+ #endif
+ #ifndef false
+ "error: false is not defined"
+ #endif
+ #if false
+ "error: false is not 0"
+ #endif
+ #ifndef true
+ "error: true is not defined"
+ #endif
+ #if true != 1
+ "error: true is not 1"
+ #endif
+ #ifndef __bool_true_false_are_defined
+ "error: __bool_true_false_are_defined is not defined"
+ #endif
+
+ struct s { _Bool s: 1; _Bool t; } s;
+
+ char a[true == 1 ? 1 : -1];
+ char b[false == 0 ? 1 : -1];
+ char c[__bool_true_false_are_defined == 1 ? 1 : -1];
+ char d[(bool) 0.5 == true ? 1 : -1];
+ /* See body of main program for 'e'. */
+ char f[(_Bool) 0.0 == false ? 1 : -1];
+ char g[true];
+ char h[sizeof (_Bool)];
+ char i[sizeof s.t];
+ enum { j = false, k = true, l = false * true, m = true * 256 };
+ /* The following fails for
+ HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
+ _Bool n[m];
+ char o[sizeof n == m * sizeof n[0] ? 1 : -1];
+ char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
+ /* Catch a bug in an HP-UX C compiler. See
+ http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+ http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+ */
+ _Bool q = true;
+ _Bool *pq = &q;
+
+int
+main ()
+{
+
+ bool e = &s;
+ *pq |= q;
+ *pq |= ! q;
+ /* Refer to every declared value, to avoid compiler optimizations. */
+ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
+ + !m + !n + !o + !p + !q + !pq);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_stdbool_h=yes
+else
+ ac_cv_header_stdbool_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
+$as_echo "$ac_cv_header_stdbool_h" >&6; }
+ ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
+if test "x$ac_cv_type__Bool" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE__BOOL 1
+_ACEOF
+
+
+fi
+
+
+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = xyes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned int
+_ACEOF
+
+fi
+
+
+# Checks for library functions.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
+$as_echo_n "checking for error_at_line... " >&6; }
+if ${ac_cv_lib_error_at_line+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <error.h>
+int
+main ()
+{
+error_at_line (0, 0, "", 0, "an error occurred");
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_error_at_line=yes
+else
+ ac_cv_lib_error_at_line=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
+$as_echo "$ac_cv_lib_error_at_line" >&6; }
+if test $ac_cv_lib_error_at_line = no; then
+ case " $LIBOBJS " in
+ *" error.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS error.$ac_objext"
+ ;;
+esac
+
+fi
+
+for ac_header in stdlib.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdlib_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_STDLIB_H 1
+_ACEOF
+
+fi
+
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
+$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
+if ${ac_cv_func_malloc_0_nonnull+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ ac_cv_func_malloc_0_nonnull=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined STDC_HEADERS || defined HAVE_STDLIB_H
+# include <stdlib.h>
+#else
+char *malloc ();
+#endif
+
+int
+main ()
+{
+return ! malloc (0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_func_malloc_0_nonnull=yes
+else
+ ac_cv_func_malloc_0_nonnull=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
+$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
+if test $ac_cv_func_malloc_0_nonnull = yes; then :
+
+$as_echo "#define HAVE_MALLOC 1" >>confdefs.h
+
+else
+ $as_echo "#define HAVE_MALLOC 0" >>confdefs.h
+
+ case " $LIBOBJS " in
+ *" malloc.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
+ ;;
+esac
+
+
+$as_echo "#define malloc rpl_malloc" >>confdefs.h
+
+fi
+
+
+for ac_func in floor memchr memset modf pow sqrt strcasecmp strerror strncasecmp strrchr strtol
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+ac_config_files="$ac_config_files Makefile src/Makefile src/slalib/Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ if test "x$cache_file" != "x/dev/null"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
+$as_echo_n "checking that generated files are newer than configure... " >&6; }
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
+$as_echo "done" >&6; }
+ if test -n "$EXEEXT"; then
+ am__EXEEXT_TRUE=
+ am__EXEEXT_FALSE='#'
+else
+ am__EXEEXT_TRUE='#'
+ am__EXEEXT_FALSE=
+fi
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -pR'
+ fi
+else
+ as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by calfuse $as_me 3.2.3, which was
+generated by GNU Autoconf 2.69. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <archive@stsci.edu>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+calfuse config.status 3.2.3
+configured by $0, generated by GNU Autoconf 2.69,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h)
+ # Conflict between --help and --header
+ as_fn_error $? "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+ --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
+macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
+enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
+enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
+pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
+enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
+shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
+SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
+ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
+PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
+host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
+host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
+host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
+build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
+build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
+build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
+SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
+Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
+GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
+EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
+FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
+LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
+NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
+LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
+max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
+ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
+exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
+lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
+lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
+lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
+lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
+reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
+reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
+OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
+deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
+file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
+file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
+want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
+DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
+sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
+AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
+AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
+archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
+STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
+RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
+old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
+old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
+old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
+lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
+CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
+CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
+compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
+GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
+lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
+lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
+lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
+objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
+MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
+need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
+MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
+DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
+NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
+LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
+OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
+OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
+libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
+shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
+extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
+archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
+export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
+whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
+compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
+old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
+archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
+archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
+module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
+module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
+with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
+allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
+no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
+hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
+hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
+hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
+hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
+inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
+link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
+always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
+export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
+exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
+include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
+prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
+postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
+file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
+variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
+need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
+need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
+version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
+runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
+shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
+shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
+libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
+library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
+soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
+install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
+postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
+postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
+finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
+finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
+hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
+sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_lib_dlsearch_path_spec='`$ECHO "$lt_cv_sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
+hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
+enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
+enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
+enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
+old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
+striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
+LD_F77='`$ECHO "$LD_F77" | $SED "$delay_single_quote_subst"`'
+reload_flag_F77='`$ECHO "$reload_flag_F77" | $SED "$delay_single_quote_subst"`'
+reload_cmds_F77='`$ECHO "$reload_cmds_F77" | $SED "$delay_single_quote_subst"`'
+old_archive_cmds_F77='`$ECHO "$old_archive_cmds_F77" | $SED "$delay_single_quote_subst"`'
+compiler_F77='`$ECHO "$compiler_F77" | $SED "$delay_single_quote_subst"`'
+GCC_F77='`$ECHO "$GCC_F77" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag_F77='`$ECHO "$lt_prog_compiler_no_builtin_flag_F77" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_pic_F77='`$ECHO "$lt_prog_compiler_pic_F77" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_wl_F77='`$ECHO "$lt_prog_compiler_wl_F77" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_static_F77='`$ECHO "$lt_prog_compiler_static_F77" | $SED "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o_F77='`$ECHO "$lt_cv_prog_compiler_c_o_F77" | $SED "$delay_single_quote_subst"`'
+archive_cmds_need_lc_F77='`$ECHO "$archive_cmds_need_lc_F77" | $SED "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes_F77='`$ECHO "$enable_shared_with_static_runtimes_F77" | $SED "$delay_single_quote_subst"`'
+export_dynamic_flag_spec_F77='`$ECHO "$export_dynamic_flag_spec_F77" | $SED "$delay_single_quote_subst"`'
+whole_archive_flag_spec_F77='`$ECHO "$whole_archive_flag_spec_F77" | $SED "$delay_single_quote_subst"`'
+compiler_needs_object_F77='`$ECHO "$compiler_needs_object_F77" | $SED "$delay_single_quote_subst"`'
+old_archive_from_new_cmds_F77='`$ECHO "$old_archive_from_new_cmds_F77" | $SED "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds_F77='`$ECHO "$old_archive_from_expsyms_cmds_F77" | $SED "$delay_single_quote_subst"`'
+archive_cmds_F77='`$ECHO "$archive_cmds_F77" | $SED "$delay_single_quote_subst"`'
+archive_expsym_cmds_F77='`$ECHO "$archive_expsym_cmds_F77" | $SED "$delay_single_quote_subst"`'
+module_cmds_F77='`$ECHO "$module_cmds_F77" | $SED "$delay_single_quote_subst"`'
+module_expsym_cmds_F77='`$ECHO "$module_expsym_cmds_F77" | $SED "$delay_single_quote_subst"`'
+with_gnu_ld_F77='`$ECHO "$with_gnu_ld_F77" | $SED "$delay_single_quote_subst"`'
+allow_undefined_flag_F77='`$ECHO "$allow_undefined_flag_F77" | $SED "$delay_single_quote_subst"`'
+no_undefined_flag_F77='`$ECHO "$no_undefined_flag_F77" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_F77='`$ECHO "$hardcode_libdir_flag_spec_F77" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_separator_F77='`$ECHO "$hardcode_libdir_separator_F77" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_F77='`$ECHO "$hardcode_direct_F77" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_absolute_F77='`$ECHO "$hardcode_direct_absolute_F77" | $SED "$delay_single_quote_subst"`'
+hardcode_minus_L_F77='`$ECHO "$hardcode_minus_L_F77" | $SED "$delay_single_quote_subst"`'
+hardcode_shlibpath_var_F77='`$ECHO "$hardcode_shlibpath_var_F77" | $SED "$delay_single_quote_subst"`'
+hardcode_automatic_F77='`$ECHO "$hardcode_automatic_F77" | $SED "$delay_single_quote_subst"`'
+inherit_rpath_F77='`$ECHO "$inherit_rpath_F77" | $SED "$delay_single_quote_subst"`'
+link_all_deplibs_F77='`$ECHO "$link_all_deplibs_F77" | $SED "$delay_single_quote_subst"`'
+always_export_symbols_F77='`$ECHO "$always_export_symbols_F77" | $SED "$delay_single_quote_subst"`'
+export_symbols_cmds_F77='`$ECHO "$export_symbols_cmds_F77" | $SED "$delay_single_quote_subst"`'
+exclude_expsyms_F77='`$ECHO "$exclude_expsyms_F77" | $SED "$delay_single_quote_subst"`'
+include_expsyms_F77='`$ECHO "$include_expsyms_F77" | $SED "$delay_single_quote_subst"`'
+prelink_cmds_F77='`$ECHO "$prelink_cmds_F77" | $SED "$delay_single_quote_subst"`'
+postlink_cmds_F77='`$ECHO "$postlink_cmds_F77" | $SED "$delay_single_quote_subst"`'
+file_list_spec_F77='`$ECHO "$file_list_spec_F77" | $SED "$delay_single_quote_subst"`'
+hardcode_action_F77='`$ECHO "$hardcode_action_F77" | $SED "$delay_single_quote_subst"`'
+
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+\$1
+_LTECHO_EOF'
+}
+
+# Quote evaled strings.
+for var in SHELL \
+ECHO \
+PATH_SEPARATOR \
+SED \
+GREP \
+EGREP \
+FGREP \
+LD \
+NM \
+LN_S \
+lt_SP2NL \
+lt_NL2SP \
+reload_flag \
+OBJDUMP \
+deplibs_check_method \
+file_magic_cmd \
+file_magic_glob \
+want_nocaseglob \
+DLLTOOL \
+sharedlib_from_linklib_cmd \
+AR \
+AR_FLAGS \
+archiver_list_spec \
+STRIP \
+RANLIB \
+CC \
+CFLAGS \
+compiler \
+lt_cv_sys_global_symbol_pipe \
+lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_import \
+lt_cv_sys_global_symbol_to_c_name_address \
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
+lt_cv_nm_interface \
+nm_file_list_spec \
+lt_cv_truncate_bin \
+lt_prog_compiler_no_builtin_flag \
+lt_prog_compiler_pic \
+lt_prog_compiler_wl \
+lt_prog_compiler_static \
+lt_cv_prog_compiler_c_o \
+need_locks \
+MANIFEST_TOOL \
+DSYMUTIL \
+NMEDIT \
+LIPO \
+OTOOL \
+OTOOL64 \
+shrext_cmds \
+export_dynamic_flag_spec \
+whole_archive_flag_spec \
+compiler_needs_object \
+with_gnu_ld \
+allow_undefined_flag \
+no_undefined_flag \
+hardcode_libdir_flag_spec \
+hardcode_libdir_separator \
+exclude_expsyms \
+include_expsyms \
+file_list_spec \
+variables_saved_for_relink \
+libname_spec \
+library_names_spec \
+soname_spec \
+install_override_mode \
+finish_eval \
+old_striplib \
+striplib \
+LD_F77 \
+reload_flag_F77 \
+compiler_F77 \
+lt_prog_compiler_no_builtin_flag_F77 \
+lt_prog_compiler_pic_F77 \
+lt_prog_compiler_wl_F77 \
+lt_prog_compiler_static_F77 \
+lt_cv_prog_compiler_c_o_F77 \
+export_dynamic_flag_spec_F77 \
+whole_archive_flag_spec_F77 \
+compiler_needs_object_F77 \
+with_gnu_ld_F77 \
+allow_undefined_flag_F77 \
+no_undefined_flag_F77 \
+hardcode_libdir_flag_spec_F77 \
+hardcode_libdir_separator_F77 \
+exclude_expsyms_F77 \
+include_expsyms_F77 \
+file_list_spec_F77; do
+ case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Double-quote double-evaled strings.
+for var in reload_cmds \
+old_postinstall_cmds \
+old_postuninstall_cmds \
+old_archive_cmds \
+extract_expsyms_cmds \
+old_archive_from_new_cmds \
+old_archive_from_expsyms_cmds \
+archive_cmds \
+archive_expsym_cmds \
+module_cmds \
+module_expsym_cmds \
+export_symbols_cmds \
+prelink_cmds \
+postlink_cmds \
+postinstall_cmds \
+postuninstall_cmds \
+finish_cmds \
+sys_lib_search_path_spec \
+lt_cv_sys_lib_dlsearch_path_spec \
+reload_cmds_F77 \
+old_archive_cmds_F77 \
+old_archive_from_new_cmds_F77 \
+old_archive_from_expsyms_cmds_F77 \
+archive_cmds_F77 \
+archive_expsym_cmds_F77 \
+module_cmds_F77 \
+module_expsym_cmds_F77 \
+export_symbols_cmds_F77 \
+prelink_cmds_F77 \
+postlink_cmds_F77; do
+ case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+ac_aux_dir='$ac_aux_dir'
+
+# See if we are running on zsh, and set the options that allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}"; then
+ setopt NO_GLOB_SUBST
+fi
+
+
+ PACKAGE='$PACKAGE'
+ VERSION='$VERSION'
+ RM='$RM'
+ ofile='$ofile'
+
+
+
+
+
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+ "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+ "src/slalib/Makefile") CONFIG_FILES="$CONFIG_FILES src/slalib/Makefile" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp= ac_tmp=
+ trap 'exit_status=$?
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+ ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+ if test -z "$ac_tt"; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any. Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[ ]*#[ ]*define[ ][ ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ for (key in D) D_is_set[key] = 1
+ FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+ line = \$ 0
+ split(line, arg, " ")
+ if (arg[1] == "#") {
+ defundef = arg[2]
+ mac1 = arg[3]
+ } else {
+ defundef = substr(arg[1], 2)
+ mac1 = arg[2]
+ }
+ split(mac1, mac2, "(") #)
+ macro = mac2[1]
+ prefix = substr(line, 1, index(line, defundef) - 1)
+ if (D_is_set[macro]) {
+ # Preserve the white space surrounding the "#".
+ print prefix "define", macro P[macro] D[macro]
+ next
+ } else {
+ # Replace #undef with comments. This is necessary, for example,
+ # in the case of _POSIX_SOURCE, which is predefined and required
+ # on some systems where configure will not decide to define it.
+ if (defundef == "undef") {
+ print "/*", prefix defundef, macro, "*/"
+ next
+ }
+ }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$ac_tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$ac_tmp/stdin"
+ case $ac_file in
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+ :H)
+ #
+ # CONFIG_HEADER
+ #
+ if test x"$ac_file" != x-; then
+ {
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+ } >"$ac_tmp/config.h" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ rm -f "$ac_file"
+ mv "$ac_tmp/config.h" "$ac_file" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ fi
+ else
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+ || as_fn_error $? "could not create -" "$LINENO" 5
+ fi
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$_am_arg" : 'X\(//\)[^/]' \| \
+ X"$_am_arg" : 'X\(//\)$' \| \
+ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+
+ :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+ # Older Autoconf quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named 'Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running 'make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "$am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir=$dirpart/$fdir; as_fn_mkdir_p
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+ ;;
+ "libtool":C)
+
+ # See if we are running on zsh, and set the options that allow our
+ # commands through without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}"; then
+ setopt NO_GLOB_SUBST
+ fi
+
+ cfgfile=${ofile}T
+ trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+ $RM "$cfgfile"
+
+ cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+# Generated automatically by $as_me ($PACKAGE) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+
+# Provide generalized library-building support services.
+# Written by Gordon Matzigkeit, 1996
+
+# Copyright (C) 2014 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of of the License, or
+# (at your option) any later version.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program or library that is built
+# using GNU Libtool, you may include this file under the same
+# distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+# The names of the tagged configurations supported by this script.
+available_tags='F77 '
+
+# Configured defaults for sys_lib_dlsearch_path munging.
+: \${LT_SYS_LIBRARY_PATH="$LT_SYS_LIBRARY_PATH"}
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# What type of objects to build.
+pic_mode=$pic_mode
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# Shared archive member basename,for filename based shared library versioning on AIX.
+shared_archive_member_spec=$shared_archive_member_spec
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# An echo program that protects backslashes.
+ECHO=$lt_ECHO
+
+# The PATH separator for the build system.
+PATH_SEPARATOR=$lt_PATH_SEPARATOR
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="\$SED -e 1s/^X//"
+
+# A grep program that handles long lines.
+GREP=$lt_GREP
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# A literal string matcher.
+FGREP=$lt_FGREP
+
+# A BSD- or MS-compatible name lister.
+NM=$lt_NM
+
+# Whether we need soft or hard links.
+LN_S=$lt_LN_S
+
+# What is the maximum length of a command?
+max_cmd_len=$max_cmd_len
+
+# Object file suffix (normally "o").
+objext=$ac_objext
+
+# Executable file suffix (normally "").
+exeext=$exeext
+
+# whether the shell understands "unset".
+lt_unset=$lt_unset
+
+# turn spaces into newlines.
+SP2NL=$lt_lt_SP2NL
+
+# turn newlines into spaces.
+NL2SP=$lt_lt_NL2SP
+
+# convert \$build file names to \$host format.
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+
+# convert \$build files to toolchain format.
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+
+# An object symbol dumper.
+OBJDUMP=$lt_OBJDUMP
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method = "file_magic".
+file_magic_cmd=$lt_file_magic_cmd
+
+# How to find potential files when deplibs_check_method = "file_magic".
+file_magic_glob=$lt_file_magic_glob
+
+# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
+want_nocaseglob=$lt_want_nocaseglob
+
+# DLL creation program.
+DLLTOOL=$lt_DLLTOOL
+
+# Command to associate shared and link libraries.
+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
+
+# The archiver.
+AR=$lt_AR
+
+# Flags to create an archive.
+AR_FLAGS=$lt_AR_FLAGS
+
+# How to feed a file listing to the archiver.
+archiver_list_spec=$lt_archiver_list_spec
+
+# A symbol stripping program.
+STRIP=$lt_STRIP
+
+# Commands used to install an old-style archive.
+RANLIB=$lt_RANLIB
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Whether to use a lock for old archive extraction.
+lock_old_archive_extraction=$lock_old_archive_extraction
+
+# A C compiler.
+LTCC=$lt_CC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_CFLAGS
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration.
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm into a list of symbols to manually relocate.
+global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
+
+# Transform the output of nm in a C name address pair.
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# Transform the output of nm in a C name address pair when lib prefix is needed.
+global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
+
+# The name lister interface.
+nm_interface=$lt_lt_cv_nm_interface
+
+# Specify filename containing input files for \$NM.
+nm_file_list_spec=$lt_nm_file_list_spec
+
+# The root where to search for dependent libraries,and where our libraries should be installed.
+lt_sysroot=$lt_sysroot
+
+# Command to truncate a binary pipe.
+lt_truncate_bin=$lt_lt_cv_truncate_bin
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# Used to examine libraries when file_magic_cmd begins with "file".
+MAGIC_CMD=$MAGIC_CMD
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Manifest tool.
+MANIFEST_TOOL=$lt_MANIFEST_TOOL
+
+# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
+DSYMUTIL=$lt_DSYMUTIL
+
+# Tool to change global to local symbols on Mac OS X.
+NMEDIT=$lt_NMEDIT
+
+# Tool to manipulate fat objects and archives on Mac OS X.
+LIPO=$lt_LIPO
+
+# ldd/readelf like tool for Mach-O binaries on Mac OS X.
+OTOOL=$lt_OTOOL
+
+# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
+OTOOL64=$lt_OTOOL64
+
+# Old archive suffix (normally "a").
+libext=$libext
+
+# Shared library suffix (normally ".so").
+shrext_cmds=$lt_shrext_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at link time.
+variables_saved_for_relink=$lt_variables_saved_for_relink
+
+# Do we need the "lib" prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Library versioning type.
+version_type=$version_type
+
+# Shared library runtime path variable.
+runpath_var=$runpath_var
+
+# Shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names. First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Permission mode override for installation of shared libraries.
+install_override_mode=$lt_install_override_mode
+
+# Command to use after installation of a shared archive.
+postinstall_cmds=$lt_postinstall_cmds
+
+# Command to use after uninstallation of a shared archive.
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# As "finish_cmds", except a single script fragment to be evaled but
+# not shown.
+finish_eval=$lt_finish_eval
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Compile-time system search path for libraries.
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_lt_cv_sys_lib_dlsearch_path_spec
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+
+# The linker used to build libraries.
+LD=$lt_LD
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds
+
+# A language specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \$shlibpath_var if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds
+
+# Commands necessary for finishing linking programs.
+postlink_cmds=$lt_postlink_cmds
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+ cat <<'_LT_EOF' >> "$cfgfile"
+## -------------------------------------- ##
+## Shell functions shared with configure. ##
+## -------------------------------------- ##
+
+# func_munge_path_list VARIABLE PATH
+# -----------------------------------
+# VARIABLE is name of variable containing _space_ separated list of
+# directories to be munged by the contents of PATH, which is string
+# having a format:
+# "DIR[:DIR]:"
+# string "DIR[ DIR]" will be prepended to VARIABLE
+# ":DIR[:DIR]"
+# string "DIR[ DIR]" will be appended to VARIABLE
+# "DIRP[:DIRP]::[DIRA:]DIRA"
+# string "DIRP[ DIRP]" will be prepended to VARIABLE and string
+# "DIRA[ DIRA]" will be appended to VARIABLE
+# "DIR[:DIR]"
+# VARIABLE will be replaced by "DIR[ DIR]"
+func_munge_path_list ()
+{
+ case x$2 in
+ x)
+ ;;
+ *:)
+ eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \S|@1\"
+ ;;
+ x:*)
+ eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
+ ;;
+ *::*)
+ eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
+ eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
+ ;;
+ *)
+ eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
+ ;;
+ esac
+}
+
+
+# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
+func_cc_basename ()
+{
+ for cc_temp in $*""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+ done
+ func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+}
+
+
+_LT_EOF
+
+ case $host_os in
+ aix3*)
+ cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test set != "${COLLECT_NAMES+set}"; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+_LT_EOF
+ ;;
+ esac
+
+
+ltmain=$ac_aux_dir/ltmain.sh
+
+
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+ sed '$q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+
+
+ cat <<_LT_EOF >> "$ofile"
+
+# ### BEGIN LIBTOOL TAG CONFIG: F77
+
+# The linker used to build libraries.
+LD=$lt_LD_F77
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag_F77
+reload_cmds=$lt_reload_cmds_F77
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds_F77
+
+# A language specific compiler.
+CC=$lt_compiler_F77
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC_F77
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_F77
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_F77
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_F77
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_F77
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object_F77
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds_F77
+archive_expsym_cmds=$lt_archive_expsym_cmds_F77
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds_F77
+module_expsym_cmds=$lt_module_expsym_cmds_F77
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld_F77
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_F77
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_F77
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77
+
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct_F77
+
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \$shlibpath_var if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute_F77
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L_F77
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_F77
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic_F77
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath_F77
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_F77
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols_F77
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_F77
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_F77
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_F77
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds_F77
+
+# Commands necessary for finishing linking programs.
+postlink_cmds=$lt_postlink_cmds_F77
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec_F77
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_F77
+
+# ### END LIBTOOL TAG CONFIG: F77
+_LT_EOF
+
+ ;;
+
+ esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..40e0559
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,32 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ([2.69])
+AC_INIT([calfuse], [3.2.3], [archive@stsci.edu])
+AM_INIT_AUTOMAKE([foreign])
+LT_INIT
+AC_CONFIG_MACRO_DIRS([m4])
+AC_CONFIG_SRCDIR([include/calfitsio.h])
+AC_CONFIG_HEADERS([config.h])
+
+# Checks for programs.
+AC_PROG_CC
+AC_PROG_F77
+AC_PROG_LN_S
+
+# Checks for libraries.
+
+# Checks for header files.
+AC_FUNC_ALLOCA
+AC_CHECK_HEADERS([fcntl.h limits.h malloc.h stddef.h stdlib.h string.h strings.h unistd.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_CHECK_HEADER_STDBOOL
+AC_TYPE_SIZE_T
+
+# Checks for library functions.
+AC_FUNC_ERROR_AT_LINE
+AC_FUNC_MALLOC
+AC_CHECK_FUNCS([floor memchr memset modf pow sqrt strcasecmp strerror strncasecmp strrchr strtol])
+
+AC_OUTPUT([Makefile src/Makefile src/slalib/Makefile])
diff --git a/docs/FIXING_SELINUX_ISSUES b/docs/FIXING_SELINUX_ISSUES
new file mode 100644
index 0000000..548077b
--- /dev/null
+++ b/docs/FIXING_SELINUX_ISSUES
@@ -0,0 +1,84 @@
+
+-------------------------------------------------------------------------------
+ Fixing issues due to SELinux
+-------------------------------------------------------------------------------
+
+While installing CalFUSE 3.2.0 on Scientific Linux V 5.0 the following
+SELinux issues came up. SELinux points to these web pages for a more
+detailed explanation of the issues:
+http://people.redhat.com/drepper/selinux-mem.html and
+http://people.redhat.com/drepper/textrelocs.html
+
+A suggestion from the http://people.redhat.com/drepper/textrelocs.html
+web page is to compile the c libraries with -fpic or -fPIC.
+
+The first SELinux issue maybe related to this being a new install of Scientific Linux and
+not truly related to CalFUSE.
+
+
+Summary
+-------
+
+SELinux is preventing access to files with the label, file_t.
+
+Detailed Description
+
+SELinux permission checks on files labeled file_t are being
+denied. file_t is the context the SELinux kernel gives to files that do not have a label.
+This indicates a serious labeling problem. No files on an SELinux box should ever be
+labeled file_t. If you have just
+added a new disk drive to the system you can relabel it using the restorecon command.
+Otherwise you should relabel the entire files system.
+
+Allowing Access
+
+You can execute the following command as root to relabel your computer
+system:
+
+touch /.autorelabel; reboot
+
+Note that this will reboot your computer system.
+
+
+Summary
+-------
+
+SELinux is preventing /calfuse/v3.2/bin/cf_hist_init from loading
+/calfuse/v3.2/lib/libcf.so,
+/calfuse/v3.2/lib/libsla.so, and
+/calfuse/v3.2/lib/libcfitsio-2.470.so
+which require text relocation.
+
+
+Detailed Description
+
+The /calfuse/v3.2/bin/cf_hist_init application attempted to load
+/calfuse/v3.2/lib/libcf.so,
+/calfuse/v3.2/lib/libsla.so, and
+/calfuse/v3.2/lib/libcfitsio-2.470.so
+which require text relocation. This is a potential security problem. Most libraries do
+not need this permission. Libraries are sometimes coded incorrectly and request this
+permission. The SELinux Memory Protection Tests web page explains how to remove this
+requirement. You can configure SELinux temporarily to allow
+/calfuse/v3.2/lib/libcf.so,
+/calfuse/v3.2/lib/libsla.so, and
+/calfuse/v3.2/lib/libcfitsio-2.470.so
+to use relocation as a workaround, until the libraries are fixed.
+Please file a bug report against this package.
+
+Allowing Access
+
+If you trust
+/calfuse/v3.2/lib/libcf.so,
+/calfuse/v3.2/lib/libsla.so, and
+/calfuse/v3.2/lib/libcfitsio-2.470.so
+to run correctly, you can change the file context to textrel_shlib_t.
+
+The following commands will allow this access:
+
+chcon -t textrel_shlib_t /calfuse/v3.2/lib/libcf.so
+chcon -t textrel_shlib_t /calfuse/v3.2/lib/libsla.so
+chcon -t textrel_shlib_t /calfuse/v3.2/lib/libcfitsio-2.470.so
+
+
+- Michael E. Van Steenberg
diff --git a/docs/INSTALLING_A_FORTRAN_COMPILER b/docs/INSTALLING_A_FORTRAN_COMPILER
new file mode 100644
index 0000000..9af64ff
--- /dev/null
+++ b/docs/INSTALLING_A_FORTRAN_COMPILER
@@ -0,0 +1,259 @@
+
+-------------------------------------------------------------------------------
+ INSTALLING A FORTRAN COMPILER
+-------------------------------------------------------------------------------
+
+Please note that these are solutions that we tried and therefore recommend,
+especially since they worked on every machine we tried, but there might be other
+solutions if none of this works for you. Just google fortran and your machine
+specs and you should find some ideas.
+
+
+FORTRAN for Solaris:
+--------------------
+
+ CalFUSE has been compiled and tested on Solaris with the Fortran
+ compilers provided by SUN (f77 and f90) and GNU (g77 and gfortran).
+ Both are available for free, so even if you already have another fortran
+ compiler, you should get one of these. Other Fortran compilers may
+ work, but we cannot guarantee your results.
+
+ -> We recommend that you first try the Sun Studio Compilers from Sun's
+ development website:
+ http://developers.sun.com/sunstudio/downloads/index.jsp
+ CalFUSE compiles properly with version 12.
+
+ -> An old version of Fortran may already exist on your machine. Look for
+ the old 'libF77.so' and 'libM77.so' libraries in one of these
+ directories: '/usr/4lib' and '/opt/SUNWspro/lib/'. They would probably
+ have a name with a version number at the end. If so, you can try to
+ create symbolic links to these two (with the command 'ln -s <library>
+ <link>') using their exact names 'libF77.so' and 'libM77.so'. Then add
+ to your LD_LIBRARY_PATH environment variable the directory in which you
+ created the two links. Also add '/opt/SUNWspro/bin/' to your PATH and
+ try again to run the CalFUSE configure routine.
+
+ -> Otherwise, you can try to install 'g77' from the GNU compilers by
+ installing the package 'gcc-3.4.6'. (We were unable to make 'gfortran'
+ from GCC version 4 and higher work on Solaris.) You will need root
+ access to do so.
+
+ First type the command 'iconv' in your shell. If it returns "command
+ not found", then you must first install the package libiconv as well.
+
+ You can retrieve packages for various versions of Solaris (7 to 10) and
+ different CPU architectures (Sparc or Intel) from this website (select
+ the appropriate system/CPU combination in the menu on the right side):
+ http://www.sunfreeware.com
+
+ If the web page download fails, you can access the packages by ftp
+ ( where <CPU> = sparc or intel and <V> = 7, 8, 9 or 10 ):
+ ftp ftp.sunfreeware.com
+ login: anonymous
+ password: <your_email_address>
+ binary
+ cd pub/freeware/<CPU>/<V>/
+ get gcc-3.4.6-sol<V>-<CPU>-local.gz
+ get libiconv-1.11-sol<V>-<CPU>-local.gz (if iconv is missing)
+ bye
+
+ When you have the necessary packages, first add '/usr/local/bin' to your
+ PATH environment variable and '/usr/local/man' to your MANPATH. Then
+ unzip the packages with 'gunzip' and, as root, type the following
+ commands:
+ > pkgadd -d libiconv-1.9.2-sol<V>-<CPU>-local (if iconv is missing)
+ > pkgadd -d gcc-3.4.6-sol<V>-<CPU>-local
+
+ -> You can also try to recompile the GCC compilers yourself from the source
+ available on the GNU website:
+ http://ftp.gnu.org/gnu/gcc/
+ But this is a very long (it took us 10 hours) and complicated process,
+ and we recommend that you install the package as described above.
+
+ If you really have to compile the code by hand, for example because
+ you cannot get root permission, follow these instructions:
+ - Choose the latest 3.x.x version available. (We were unable to
+ install fortran version 4.x.x because the necessary libraries were
+ missing.)
+ - Create three directories, none of them a subdirectory of another:
+ srcdir - to contain the source archive
+ bindir - where the binaries will be installed
+ insdir - from which you will do the install
+ For example, I had respectively '/home/ooghe/gcc/src/',
+ '/home/ooghe/gcc/bin/' and '/home/ooghe/gcc/install/'.
+ - Unzip and untar the downloaded archive in 'srcdir'
+ - Echo your 'PATH' environment variable and remove '/usr/ucb/bin'
+ from it if it is present. Add '/usr/sfw/bin' if it is not.
+ For example:
+ > export PATH=/usr/bin:/etc:/usr/sbin:/usr/sfw/bin:/usr/ccs/bin:.
+ - Do the following:
+ > export CONFIG_SHELL=/bin/ksh
+ - Go to 'insdir' and do the following:
+ > 'srcdir'/configure --prefix='bindir' --enable-languages=c,fortran
+ where 'srcdir' and 'gccdir' should be complete path directories, e.g.,
+ '/home/username/gcc/src' and '/home/username/gcc/bin'
+ - Bootstrap and finally install the compiler:
+ > gmake bootstrap
+ > gmake install
+ - Add 'bindir'/bin to your PATH environment variable, and
+ 'bindir'/lib to your LD_LIBRARY_PATH one.
+
+
+===============================================================================
+
+FORTRAN for Linux:
+------------------
+
+ CalFUSE has been compiled and tested on Linux with the Fortran compilers
+ provided by GNU (g77 and gfortran). They are available for free, so
+ even if you already have another fortran compiler, you should get one of
+ these. You can try to make CalFUSE work with another compiler, but we
+ cannot guarantee your results.
+
+ Most Linux distributions include one of the GNU Fortran compilers, but
+ if it is not on yours, you should first try to get a binary for your
+ machine.
+
+ -> If your Linux is based on a distribution like Debian, Fedora or SUSE,
+ look for a binary on this web page:
+ http://gcc.gnu.org/wiki/GFortranDistros
+
+ -> Otherwise, you can try to install the latest binary from this web page,
+ but we do not recommend it because the latest compilers may still contain
+ some bugs:
+ http://gcc.gnu.org/wiki/GFortranBinaries
+
+ -> If you do not have any other solution, you should recompile GCC from the
+ source by following the instructions available on
+ http://gcc.gnu.org/wiki/GFortranBinaries
+
+
+===============================================================================
+
+FORTRAN for MAC OS X:
+---------------------
+
+
+ CalFUSE has been compiled and tested on MAC OS X with the Fortran
+ compilers provided by GNU (g77 and gfortran). They are available for
+ free, so even if you already have another Fortran compiler (like ifort
+ from Intel or f77 from ABSoft), you should get one of these. You can
+ try to make CalFUSE work with another compiler, but we cannot guarantee
+ your results.
+
+ There are many ways to install the GNU compilers on a MAC;
+ here are some suggestions:
+
+ -> For Mac OS X 10.4 (Tiger) or higher, we know that the installation
+ provided on this web page works well:
+ http://www.macresearch.org/xcode_gfortran_contest_winner_damien_bobillot
+ Just download the gfortran compiler corresponding to your CPU
+ architecture (Intel or PowerPC) and follow the "gfortran compiler
+ instructions".
+
+ If this web page is down, you can get the same archives from the
+ CalFUSE FTP site:
+
+ ftp fuse.pha.jhu.edu
+ login: anonymous
+ password: <your_email_address>
+
+ cd fuseftp/calfuse
+ binary
+ (PPC) get macos-gfortran-intel-bin.tar.gz
+ (Intel) get macos-gfortran-ppc-bin.tar.gz
+ bye
+
+ When you have the appropriate package, install the compiler
+ using the following command:
+ (PPC) sudo tar -zxvf macos-gfortran-ppc-bin.tar.gz -C /
+ (Intel) sudo tar -zxvf macos-gfortran-intel-bin.tar.gz -C /
+
+ Note: It is possible that /usr/local/bin is not in your default
+ PATH environment variable. If the command 'gfortran' does not work,
+ then, assuming you're using the default bash shell, type
+ (or include in /etc/profile):
+ > export PATH=/usr/local/bin:$PATH
+
+ -> Otherwise, you can try to find more recent versions of these
+ packages on these different websites, but we don't recommend them
+ because they usually still have a few development bugs:
+ http://hpc.sourceforge.net/
+ http://www.macresearch.org/xcode_gfortran_plugin_update
+ http://gcc.gnu.org/wiki/GFortranBinariesMacOS
+
+ -> You can also try to install yourself a version of gfortran or
+ g77 from one of GCC releases at this address:
+ http://ftp.gnu.org/gnu/gcc/
+ This might be the only solution if you are using Mac OS X 10.3
+ or lower.
+ In this specific case, we recommend that you try first to install
+ 'g77' from 'gcc-3.3.3', following Jeff's instructions as follows:
+
+-------------------------------------------------------------------------------
+Jeff Kruk
+31 May 2004
+
+Hi All-
+
+I have successfully installed GNU fortran on my Mac laptop.
+It is not part of the Apple Developer tools (at least not anymore),
+so you have to get it directly from GNU. The instructions from GNU
+state that you need the whole source tree to compile the compilers,
+so you have to ignore the portions of the GCC package that are provided
+by Apple with their developers toolkit.
+
+After reading through lots of instructions, I concluded that all the
+default options were just fine. So, here is a boiled-down set of
+instructions.
+
+You will need 3 different directories:
+srcdir: where you put all the files from GNU
+objdir: where you do the build
+installdir: this defaults to /usr/local, which is what I used.
+(You may have to do this as root to put things in /usr/local)
+
+The one complication is that GNU "strongly recommends" that none of
+these directories be subdirectories of one another.
+So I put the downloaded files in /Users/kruk/Desktop/gcc-3.3.3
+and I did the build in /Users/kruk/gcc/bin.
+
+Here's the sequence of commands needed:
+
+1) Use your browser to go to
+http://ftp.gnu.org/gnu/gcc/releases/gcc-3.3.3
+click on gcc-3.3.3.tar.gz
+unpack this in 'srcdir' (in my case this was ~/Desktop/gcc-3.3.3)
+
+2) Make the directory where you will do the build. In my case this was:
+> cd ~
+> mkdir gcc
+> mkdir bin
+> cd gcc/bin
+
+3) Configure all the files:
+> ~/Desktop/gcc-3.3.3/configure
+
+4) Make the compilers:
+> gnumake bootstrap
+(I think the default 'make' is the same as gnumake, but I wasn't taking
+any chances)
+When this completes, there are no files in /usr/local yet!
+
+5) Do the actual install:
+> gnumake install
+
+[This can take a long time -- up to 90 minutes. - Ed.]
+
+That's it!
+
+Note: If you are using an Intel-based Mac, also follow these instructions
+ from Vincent Hénault-Brunet: "I recently compiled CalFUSE on my Mac
+ Intel laptop. The problem had to do with g77. I didn't know, but g77
+ doesn't work on Mac Intel. It will compile but doesn't work properly.
+ I had to patch the power-pcc version of g77 (patch found at
+ http://www1.gly.bris.ac.uk/~wookey/MEFTLG/g77.htm ), and CalFUSE
+ compiled without any problem."
+
+
+- Van Dixon, Bernard Godard, Jeff Kruk and Benjamin Ooghe-Tabanou
diff --git a/docs/INSTALLING_CalFUSEv3.2.3 b/docs/INSTALLING_CalFUSEv3.2.3
new file mode 100644
index 0000000..9579254
--- /dev/null
+++ b/docs/INSTALLING_CalFUSEv3.2.3
@@ -0,0 +1,215 @@
+#
+# Note: Before downloading CalFUSE, please send a blank e-mail to
+# fuse_support@pha.jhu.edu with the subject line "GOT CALFUSE".
+# We'll save your address and send you information about future
+# software updates or bug reports. Thanks!
+#
+
+-------------------------------------------------------------------------------
+ INSTALLING CalFUSE v3.2.3
+-------------------------------------------------------------------------------
+
+These instructions cover Solaris, Linux, Linux 64, and Mac OS X
+installations.
+
+You will need at least 1.6 GB of disk space to install the pipeline and
+its associated calibration files.
+
+The software is in the tar file cfv3.2.3.sw.tar.gz
+
+The calibration files are divided among three tar files:
+
+cfv3.2.3.cala.tar.gz <-- Cal files that start with letter a
+cfv3.2.3.calg.tar.gz <-- Cal files that start with letter g
+cfv3.2.3.calz.tar.gz <-- All other cal files
+
+
+A. DOWNLOADING THE CALFUSE SOFTWARE AND ASSOCIATED CALIBRATION FILES:
+---------------------------------------------------------------------
+
+ Obtain the compressed tar files:
+
+ prompt> ftp fuse.pha.jhu.edu
+ login: anonymous
+ password: <your_email_address>
+
+ cd fuseftp/calfuse
+ binary
+ get cfv3.2.3.sw.tar.gz
+ get cfv3.2.3.cala.tar.gz
+ get cfv3.2.3.calg.tar.gz
+ get cfv3.2.3.calz.tar.gz
+ bye
+
+ Uncompress and extract all tarfiles in your calfuse directory.
+
+
+B. INSTALLATION INSTRUCTIONS:
+-----------------------------
+
+0) Note for all systems:
+
+ You need to type "make -e install" only once, not in each
+ subdirectory.
+
+
+1) SOLARIS
+
+ First check whether '/opt/SUNWspro/lib' is in your
+ 'LD_LIBRARY_PATH' environment variable. If it is not, be
+ sure to add it.
+
+ In [calfuse_directory]/v3.2/src, type:
+
+ make distclean
+ chmod +x configure.solaris
+ ./configure.solaris
+ make clean
+ make -e install
+
+ The Solaris operating system should come with a Fortran
+ compiler; however, if the configure routine returns an error
+ message about Fortran, it is probably missing, and you will
+ have to install it. To do so, follow the instructions for
+ Solaris in the file INSTALLING_A_FORTRAN_COMPILER.
+
+
+2) LINUX and LINUX 64
+
+ If you are running Linux on a 64-bit machine, you must also
+ install a 64-bit version of the CFITSIO library. You
+ can skip this step if your machine is running in 32-bit
+ mode. The operation may require root access to your system,
+ so you may have to ask for help from your system manager.
+ First use your 'Applications/Add-Remove Software'
+ tool to see whether CFITSIO is available by default on
+ your system (as it is for Scientific Linux version 5.0).
+ If so, install it; if not, you can download the release
+ corresponding to your operating system from the Internet.
+ Search for 'cfitsio' on the web page http://rpm.pbone.net/.
+ If this page is not available, search the FITSIO webpage
+ (http://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html)
+ for RPM format distributions.
+
+ Once the necessary libraries are installed, move to the
+ directory [calfuse_directory]/v3.2/src and type
+
+ make distclean
+ chmod +x configure.linux or chmod +x configure.linux64
+ ./configure.linux or ./configure.linux64
+ make clean
+ make -e install
+
+ Notes:
+
+ a) GCC should come with a Fortran compiler; however, if the
+ configure routine returns an error message about Fortran,
+ it is probably missing, and you will have to install it.
+ To do so, follow the instructions for Linux in the file
+ INSTALLING_A_FORTRAN_COMPILER.
+
+ b) If the compilation fails with an error such as:
+ "undefined reference to '_gfortran_pow_i4_i4'" or similar,
+ it probably means you have both g77 and gfortran installed.
+ In this case we recommand that you try to remove the gfortran
+ package from your Linux distribution (using synaptic, apt-get
+ or aptitude, for example).
+
+ c) Linux64 users: If you installed cfitsio in a directory
+ other than the usual '/usr/include/cfitsio', determine the
+ path you used, for example '/usr/local/cfitsio64' and, in
+ [calfuse_directory]/v3.2/src, type the following commands,
+ where <new_path> is the path identified above:
+
+ cp configure.linux64 configure.linux64.sv
+ sed -e "s#/usr/include/cfitsio#<new_path>#g#" \
+ configure.linux64.sv > configure.linux64.sv2
+ sed -e "s/#cfit/ /g" \
+ configure.linux64.sv2 > configure.linux64
+
+ Then restart the installation procedure.
+
+ d) If you encounter trouble with SELinux while installing
+ CalFUSE, you should read the informations from Michael Van
+ Steenberg in the file FIXING_SELINUX_ISSUES.
+
+
+3) MAC OS X
+
+ In [calfuse_directory]/v3.2/src type
+
+ make distclean
+ chmod +x configure.macosx
+ ./configure.macosx
+ make clean
+ make -e install
+
+ Notes:
+
+ a) CalFUSE requires Mac OS X 10.2 or higher.
+
+ b) CalFUSE uses both the C and Fortran compilers. If you
+ are running OS X 10.3 or above, you probably have a C
+ compiler. If not, retrieve the Xcode suite of developer
+ tools from the Apple Developer Connection website
+ (developer.apple.com). To obtain the Fortran compiler,
+ follow the instructions for MacOS in the file
+ INSTALLING_A_FORTRAN_COMPILER.
+
+ c) If the linker complains about missing library routines,
+ you may need to modify the definition of LIBS in the various
+ Makefiles. For example, you may need to replace "-L/usr/local/lib"
+ with "-L/sw/lib".
+
+ d) For best results, run CalFUSE in an X11 window; otherwise,
+ your trailer files will be full of warning messages from IDL.
+
+ e) FYI: the environment variable called 'LD_LIBRARY_PATH'
+ on other systems is called 'DYLD_LIBRARY_PATH' by Mac OS.
+
+
+C. SETTING THE ENVIRONMENT VARIABLES:
+-------------------------------------
+
+ The directory '[calfuse_directory]/v3.2/bin' contains the
+ scripts 'cfsetup.sh' and 'cfsetup.csh', which define the
+ environment variables needed by CalFUSE. You will run one
+ of these two depending on the shell you are using.
+
+ Usually, if you are on a Solaris machine or on a Mac running
+ OS X 10.2, you will use the '.csh' script. On Linux and
+ more recent versions of MAC OS X, you should probably use
+ the '.sh' script. If one gives you an error message, try
+ the other.
+
+ The scripts assume that you have installed the pipeline in
+ your home directory. If you have installed it elsewhere,
+ you must edit the script, changing the root CalFUSE directory
+ ('CF_DIR') defined at the beginning.
+
+ If you are using the '.csh' script, do the following:
+ source cfsetup.csh
+ rehash
+ If you are using the '.sh' script, do the following:
+ source cfsetup.sh
+ hash -r
+
+ You can also insert the whole script into your '.login'
+ file, in which case the environment variables will be set
+ each time you log in.
+
+
+D. RUNNING THE PIPELINE:
+------------------------
+
+ To run the pipeline on either timetag or histogram
+ data, just type 'calfuse' followed by the name of the raw
+ data file. For example:
+
+ calfuse P99901010011attagfraw.fit
+ calfuse P99901010011ahistfraw.fit
+
+
+Address questions or concerns to fuse_support@pha.jhu.edu.
+
+- Van Dixon, Bernard Godard, and Benjamin Ooghe-Tabanou
diff --git a/docs/INTRO_TO_CalFUSEv3.2.3 b/docs/INTRO_TO_CalFUSEv3.2.3
new file mode 100644
index 0000000..0408121
--- /dev/null
+++ b/docs/INTRO_TO_CalFUSEv3.2.3
@@ -0,0 +1,385 @@
+# Documentation for CalFUSE, the FUSE Calibration Pipeline
+#
+# Introduction to CalFUSE v3.2
+#
+# Created 02/03/2004
+# Van Dixon
+#
+# History:
+# 03/05/2004 Update for v3.0.5.
+# Change name of POTHOLE column to QUALITY.
+# 04/01/2004 Update for v3.0.6.
+# Pipeline now runs on Linux and works on HIST data.
+# Default output binning reduced to 0.013 A.
+# 05/05/2004 Update for v3.0.7.
+# Fixed bug in initial spectral-centroiding routine.
+# Extraction routine now uses the same algorithm to
+# compute the spectral, weights, and bkgd arrays.
+# Modified boxcar extraction to improve background
+# estimate.
+# 08/20/2004 Update for v3.0.7 release.
+# Pipeline now runs on Mac OS X 10.2 and higher.
+# Screening now preceeds aperture centroiding.
+# Raised minimum pulse height to 2 for all segments.
+# 01/21/2005 Add a note about reading the new extracted
+# spectral files into IDL.
+# 04/19/2005 Update for v3.1.0 release.
+# 06/06/2005 Update for v3.1.1 release.
+# 06/10/2005 Clarify discussion of spectral file format.
+# 06/15/2005 Update for v3.1.2 release.
+# 06/24/2005 Add instructions for generating new jitter files.
+# 07/12/2005 Modify instructions for generating new jitter files.
+# 07/21/2005 Add information about post-processing tools.
+# 09/07/2005 Update for v3.1.3 release.
+# 12/02/2005 Update for v3.1.5 release.
+# 12/03/2005 New changes to cf_mirror_motion and cf_grating_motion
+# 01/24/2006 Update for v3.1.6 release.
+# 02/02/2006 Update for v3.1.7.
+# 05/24/2006 Update for v3.1.8.
+# 11/08/2006 Update for v3.2.0.
+# 01/15/2007 Move FIFO-overflow correction to cf_convert_to_farf.
+# 08/24/2007 Update for v3.2.1.
+# 02/15/2008 Update for v3.2.2.
+# 12/05/2008 Update for v3.2.3.
+#
+
+
+I. Introduction
+
+ CalFUSE v3.2.3 is the latest version of the FUSE data-reduction
+ pipeline. This package includes a new set of calibration files and
+ support for Linux 64-bit and Solaris 10 machines.
+
+ For complete details about the program, see the paper,
+ "CalFUSE v3: A Data-Reduction Pipeline for the Far Ultraviolet
+ Spectroscopic Explorer" by Dixon et al. (2007)
+ (http://adsabs.harvard.edu/abs/2007PASP..119..527D). It describes
+ the CalFUSE pipeline, the instrument calibrations upon which it is
+ based, and the format of the resulting calibrated data files.
+
+
+II. Recent Improvements
+
+ New in CalFUSE v3.1.5
+
+ Bad-Pixel Correction: A new routine, cf_screen_bad_pixels, flags
+ photon events falling in known bad-pixel regions.
+
+ Histogram Mode: For data obtained in HIST mode,
+ cf_count_rate_y_distort must use a single count-rate value for
+ the entire exposure. To better estimate it, we replace the
+ time-dependent FEC-rate array with its weighted mean value.
+ Rather than using different HIST_PAD values for each aperture,
+ cf_extraction_limits now pads apertures by 8 pixels (top and
+ bottom).
+
+ Jitter Correction: To improve the jitter-correction algorithm, we
+ removed the data-screening functions from cf_satellite_jitter and
+ moved them to a new routine, cf_screen_jitter.
+
+ New in CalFUSE v3.1.6
+
+ Burst Correction: Because cf_screen_bursts attempts to exclude
+ airglow photons from the calculated background, these photons must
+ be flagged before the routine is called. To this end,
+ cf_screen_airglow is now the first of the screening routines.
+
+ Background Models: The model background consists of a
+ spatially-uniform component and a scattered-light image. As a
+ result of changes introduced in CalFUSE v3.1.3, the scattered-light
+ component was over-estimated, because the data were summed over a
+ larger region of the detector than the scattered-light image. Now,
+ the same limits are applied to both data and models.
+
+ New in CalFUSE v3.1.7
+
+ Spectral Centroids: We tightened the limits over which
+ cf_find_spectra computes the spectral centroid to prevent a bright
+ star in a nearby aperture or the enhanced background near the
+ detector edge from pulling the extraction window off center. In
+ both cf_compute_y_centroid and cf_find_spectra, we returned the
+ parameter-file keywords EMAX_LIF and EMAX_SIC to their original
+ behavior: if the centroid differs from the default value by more
+ than this limit, the default value is used.
+
+ New in CalFUSE v3.1.8
+
+ Astigmatism and Dispersion: The routine
+ cf_astigmatism_and_dispersion was divided into two programs,
+ cf_astigmatism and cf_dispersion.
+
+ Fewer Warnings: The pipeline no longer issues WARNING messages
+ when a raw or intermediate data file is empty, when the jitter file
+ is missing, when the detector voltage is low, or when it cannot
+ perform optimal extraction.
+
+ Fewer Bad Spectra: The program cf_extract_spectra no longer
+ discards (that is, sets to zero the flux and error arrays of)
+ spectra with non-zero values of EXP_STAT.
+
+ New in CalFUSE v3.2.0
+
+ Time-Dependent X and Y Distortions: It turns out that the X and Y
+ coordinates computed by the detector electronics for a particular
+ spectral feature drift slowly with time. The new routine
+ cf_time_xy_distort corrects for this effect.
+
+ Grating Motion: The grating-motion correction has been revised to
+ better correct the zero point of the wavelength scale.
+
+ Jitter Files: Over the years, FUSE engineers have repeatedly
+ modified the spacecraft-control software, but the routine that
+ generates jitter files has not been kept up to date. As a result,
+ the program was not using all available information to determine
+ the quality and value of pointing errors. We have modified the
+ code to make use of this information. As a result, the meaning of
+ the jitter-file TRKFLG array has changed: values between 1 and 5
+ reflect increasing levels of confidence in the quality of reported
+ pointing errors, a value of 0 indicates that pointing telemetry is
+ missing, and a value of -1 says that the pointing is unknown but
+ likely to be bad. Jitter files generated with the new routine
+ receive a version number >= 3.0. The use of old jitter files with
+ the new software is likely to yield unsatisfactory results. If you
+ have the housekeeping files, you can generate jitter files that are
+ consistent with the new pipeline. To do it, delete (or hide) the
+ old jitter files, then type
+
+ prompt> cf_jitter P9990101001hskpf.fit P9990101001jitrf.fit
+
+ for each exposure. Run the pipeline as usual.
+
+ Jitter Correction: The jitter routines cf_screen_jitter and
+ cf_satellite_jitter have been updated to take advantage of the
+ information present in the new jitter files, and three new keywords
+ have been added to the parameter file. Times for which the X or Y
+ pointing errors are greater than DX_MAX or DY_MAX (default is 30")
+ are flagged as bad. Only pointing errors with associated tracking
+ flag values >= TRKFLG (default is 3) are considered reliable.
+
+ FIFO Overflow: Before, the screening routines flagged times when
+ the detector count rate went to zero because of FIFO overflows.
+ This technique underestimated the actual target flux. Now, we
+ modify the IDS dead-time correction to account for photon losses
+ due to FIFO overflows.
+
+ New in CalFUSE v3.2.1
+
+ Jitter Correction: We have modified the program cf_jitter, which
+ constructs jitter files, to be more robust when presented with
+ weird pointing data.
+
+ SAA Contours: The size of the South Atlantic Anomaly varies on
+ timescales of weeks. If you find that the default contours (in the
+ file saac004.fit) are too small, causing times with elevated
+ background rates to be flagged as good, you can switch to the
+ smaller set of contours in the file saac005.fit by modifying the
+ file master_calib_file.dat.
+
+ New in CalFUSE v3.2.2
+
+ New Platforms: CalFUSE now runs on 64-bit machines running Linux
+ and Sun workstations running Solaris v10. See the file
+ INSTALLING_CalFUSEv3.2.2 for installation details.
+
+ We have used data from the last few months of the mission to
+ produce final versions of the PHAH_CAL, STIM_CAL, and PHAX_CAL
+ files.
+
+ New in CalFUSE v3.2.3
+
+ The final version of the pipeline includes updates needed for the
+ final processing of the FUSE archive. First, airglow exposures get
+ special treatment: data taken close to the earth limb are flagged
+ but not rejected. Airglow exposures are ignored by cf_combine and
+ idf_combine unless the -a flag is set. Second, the usual limits on
+ the spectral centroids are not applied to HIST data, because
+ spectra from other apertures are not present to confuse the
+ centroiding algorithm.
+
+
+III. Overview of Pipeline
+
+ The following modules are called by the shell script calfuse.csh:
+
+ cf_ttag_init, cf_hist_init
+ Converts raw-data file into an IDF containing photon-event
+ list, GTI's, and timeline table. Histogram data are converted
+ to a pseudo-time-tag format.
+
+ cf_convert_to_farf
+ Corrects for detector deadtime. Transforms photon coordinates
+ into the FARF (flight alignment reference frame).
+
+ cf_screen_photons
+ Checks data quality. Assigns status flag to each photon.
+
+ cf_remove_motions
+ Corrects for mirror, grating, FPA, and spacecraft motions.
+
+ cf_assign_wavelength
+ Applies astigmatism and Doppler corrections.
+ Assigns wavelength to each photon.
+
+ cf_flux_calibrate
+ Converts WEIGHT to ERG/CM2 for each photon.
+
+ cf_bad_pixels
+ Applies image-motion corrections to bad-pixel map.
+
+ cf_extract_spectra
+ Extracts LiF and SiC spectra only for target aperture.
+ Wavelength array is user defined; default spacing is 0.013 A.
+
+
+IV. Installing and Running the Pipeline
+
+ CalFUSE is now available for Macs running OS X 10.2 and higher,
+ 64-bit Linux machines, and Sun workstations running Solaris 10.
+
+ Please see the document INSTALLING_CalFUSEv3.2.2 for instructions.
+
+ For both TTAG and HIST data, the command is
+
+ prompt> calfuse P99901010011attagfraw.fit
+ prompt> calfuse P99901010011ahistfraw.fit
+
+ The pipeline expects to find all data files (*raw.fit, *jitrf.fit,
+ *hskpf.fit) in the current directory. It operates on one detector
+ segment at a time.
+
+ CalFUSE v3 produces the following output files: an intermediate
+ data file (IDF), discussed below; a bad-pixel map (BPM), with a
+ format similar to the IDF; two extracted spectral files, one for
+ each of the LiF and SiC channels; and (if IDL is installed on your
+ machine) a pair of GIF or JPEG files, one an image of the detector
+ and the other a count-rate plot.
+
+
+V. The Intermediate Data File (IDF)
+
+ The photon-list files consist of three FITS binary tables. The
+ first contains the photon events themselves. The pipeline does not
+ discard any events, but uses a series of flags to indicate whether
+ particular photons violate pulse-height limits, limb-angle
+ constraints, etc. The IDL tool cf_edit (discussed below) allows
+ users to modify these flags and combine IDF files from multiple
+ exposures.
+
+ The second extension to the data files is a list of good-time
+ intervals (GTI's). They are not used by the extraction routine,
+ but may prove helpful to pipeline users.
+
+ The third extension is called a timeline table. For each second
+ during the exposure, it lists a dozen parameters, including count
+ rate, day-night status, and detector voltage. The pipeline uses
+ this list to set the status flags for each photon.
+
+ Note: because of the new file format employed by IDF files,
+ extensions 1 and 3 must be read using the /fscale keyword.
+
+ idl> a=mrdfits('P99901010011attagfidf.fit',1,/fscale)
+ idl> help,a,/str
+
+ Elements of individual arrays must be addressed using the syntax
+
+ idl> print,a.time[3:30] -- not a[3:30].time
+
+ For details about the format of the IDF, please see the document
+
+ [calfuse_directory]/v3.1/src/README_FILES/IDF_Format.txt
+
+
+VI. Manipulating the IDF with cf_edit
+
+ CF_EDIT is an Interactive Data Language (IDL) visualization tool
+ for the examination and modification of FUSE IDF files containing
+ flux- and wavelength-calibrated photon-event lists. Users without
+ IDL licenses may use the IDL "Virtual Machine" version of the
+ tool for free. Complete instructions for installing and using
+ cf_edit are available at this URL:
+
+ http://fuse.pha.jhu.edu/analysis/fuse_idl_tools.html
+
+ More information on the IDL Virtual Machine is available here:
+
+ http://www.rsinc.com/idlvm/index.asp
+
+
+VII. The Output Spectral File
+
+ The format of the output spectral files is somewhat changed from
+ earlier versions of CalFUSE.
+
+ float WAVE Wavelength (Angstroms)
+ float FLUX Flux (erg/cm2/s/A)
+ float ERROR Gaussian errors (erg/cm2/s/A)
+ int COUNTS Raw counts in extraction window
+ float WEIGHTS Raw counts corrected for deadtime, etc.
+ float BKGD Estimated background in extraction window
+ short QUALITY Percentage of window used for extraction
+
+ Note that the QUALITY array no longer lists the number of Y pixels
+ that contribute to each output X pixel. Instead, it is the fraction
+ of the extraction window considered to contain valid data, expressed
+ as a percentage (0 is all bad; 100 is all good).
+
+ Do-it-yourself-ers can use the following recipe to generate a
+ flux-calibrated spectrum:
+
+ TARGET_COUNTS = WEIGHTS - BKGD
+ TARGET_FLUX = TARGET_COUNTS * HC / LAMBDA / AEFF / EXPTIME / WPC
+
+ where AEFF = effective area in cm^2 and WPC = size of output pixel in
+ Angstroms.
+
+VIII. Additional Files Available from MAST
+
+ CalFUSE produces eight extracted spectral (*fcal.fit) files for
+ each exposure. We combine them into a set of three
+ observation-level files for submission to the MAST archive.
+ Depending on the target and the questions that you are trying to
+ answer, you may find that these files are of sufficient fidelity
+ for scientific investigation. Here's a brief description of their
+ contents:
+
+ ALL: For each channel (LiF 1A, SiC 1A, etc.), we combine data from
+ all exposures in the observation into a single spectrum. If the
+ individual spectra are bright enough, we cross correlate and shift
+ before combining them. If the spectra are too faint, we combine the
+ individual IDF files and extract a single spectrum to optimize the
+ background model. The combined spectrum for each channel is stored
+ in a separate extension.
+
+ Note: The cataloging software used by MAST requires the presence of
+ an ALL file for each exposure, not just for the entire observation.
+ We now generate such a file, but it contains no data, only a FITS
+ file header. The observation-level ALL files discussed above can be
+ identified by the string "00000all" in their names.
+
+ ANO (all, night-only): Same format as the ALL files, but using only
+ data obtained during the night-time portion of each exposure. These
+ files are generated only for TTAG data, and only if EXPNIGHT > 0.
+
+ NVO (National Virtual Observatory): Contains a single spectrum
+ spanning the entire FUSE wavelength range. The spectrum is
+ assembled by cutting and pasting segments from the most sensitive
+ channel at each wavelength. Segments are shifted to match LiF 1A
+ between 1045 and 1070 E. Columns are WAVE, FLUX, and ERROR and are
+ stored in a single binary table extension.
+
+IX. Data-Analysis Tools
+
+ A variety of IDL routines to display and manipulate FUSE data are
+ available from the FUSE IDL Tools Reference Page:
+
+ http://fuse.pha.jhu.edu/analysis/fuse_idl_tools.html
+
+ Data-analysis tools distributed with the CalFUSE pipeline are
+ reviewed in the document FUSE Tools in C:
+
+ http://fuse.pha.jhu.edu/analysis/fuse_toolbox.html
+
+ A subset of these programs, designed specifically for the
+ manipulation of IDF files, is described in the IDF Cookbook:
+
+ http://fuse.pha.jhu.edu/analysis/idfcook/index.html
diff --git a/docs/pipeline_status.html b/docs/pipeline_status.html
new file mode 100644
index 0000000..be15d28
--- /dev/null
+++ b/docs/pipeline_status.html
@@ -0,0 +1,3515 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="GENERATOR" content="Mozilla/4.6 [en] (X11; U; SunOS 5.7 sun4u) [Netscape]">
+ <meta name="CREATED" content="20000121;18144100">
+ <meta name="CHANGED" content="20000124;16081300">
+ <title>CALFUSE Pipeline Status</title>
+</head>
+<body bgcolor="#FFFFFF">
+
+<h1>
+CalFUSE Pipeline Status</h1>
+<b>Final pipeline version is 3.2.3, dated December 5, 2008.</b>
+
+<p STYLE="margin-bottom: 0in">Latest updates:
+
+<p>December 5, 2008
+<br>Van Dixon
+<BR>v3.2/src/libcf/cf_calculate_y_centroid.c
+<BR>v3.2/src/libcf/cf_find_spectra.c
+<BR>v3.2/src/libcf/cf_screen_jitter.c
+
+<P>
+In HIST mode, there are no spectra in other apertures to cause
+confusion, so we need not require that the target centroid lie within X
+pixels of either the airglow centroid or the tabulated centroid. Both
+cf_find_spectra.c and cf_calculate_y_centroid.c were modified to effect
+this change.
+
+<P>
+Modified cf_screen_jitter.c so that the jitter correction is not
+applied to ERO observations of Jupiter (program X006).
+
+<P>
+<hr WIDTH="100%">
+
+<p>August 22, 2008
+<br>Van Dixon
+
+<P>
+<BR>v3.2/include/calfuse.h
+<BR>v3.2/src/fuv/cf_bad_pixels.c
+<BR>v3.2/src/fuv/cf_screen_photons.c
+<BR>v3.2/src/libcf/cf_apply_filters.c
+<BR>v3.2/src/libcf/cf_fuv_init.c
+<BR>v3.2/src/libcf/cf_screen_jitter.c
+<BR>v3.2/src/libcf/cf_set_photon_flags.c
+<BR>v3.2/src/analysis/cf_combine.c
+<BR>v3.2/src/analysis/cf_xcorr.c
+<BR>v3.2/src/analysis/idf_combine.c
+<BR>v3.2/src/analysis/cf_make_all_obs.csh
+<BR>v3.2/src/analysis/cf_make_900_obs.csh
+
+<P>
+I've modified CalFUSE to treat bright-earth and airglow observations
+differently than before. Here are the details:
+<P>
+When creating the IDF files for bright-earth observations (programs
+M106 and S100) or 900-level airglow exposures, CalFUSE sets the header
+keyword EXP_STAT = 2. For 900-level exposures, the SRC_TYPE is set to
+EE, and the following warning is written to the file header:
+"Airglow exposure. Not an astrophysical target."
+<P>
+The pipeline then processes the file as usual. In particular, the
+limb-angle flag is set in the timeline table (extension 3 of the IDF),
+and the "Time with low limb angle" is written to the file header.
+However, if EXP_STAT = 2, the following things change:
+
+<UL>
+<LI>no jitter correction is performed;
+<LI>when the time-dependent flags are copied from the timeline
+ table to the individual photons, the limb-angle flag is masked
+ out;
+<LI>when the good-time intervals and exposure time are
+ calculated, the limb-angle flag is ignored.
+</UL>
+
+<P>
+The extracted spectra include photons obtained at low limb angles. The
+detector-image plots do, too. But the count-rate plots indicate times
+when the line of sight passes below the limb-angle limit.
+<P>
+For programs M106 and S100, all of the data are included in the
+observation-level ALL, ANO, and NVO files. For all other programs,
+900-level airglow exposures are excluded from the sum. A new
+observation-level file is produced: a single quick-look (gif) plot
+showing the summed spectrum from all of the 900-level exposures in the
+observation. It has a name like M112580100900specttagf.gif.
+
+<P>
+Update version number to v3.2.3.
+
+<P>
+<hr WIDTH="100%">
+
+<p>April 11, 2008
+<br>Van Dixon
+<BR>v3.2/src/analysis/cf_xcorr.c
+<BR>v3.2/src/analysis/cf_combine.c
+<BR>v3.2/src/analysis/cf_make_all_obs.csh
+
+<P>
+We've changed the logic used to combine individual exposures into
+observation-level files for data obtained in HIST mode. If the target
+is too faint to perform a cross-correlation, but is still in the slit
+(i.e., its flux is within 50% of the reference spectrum), add the
+spectra using a shift of zero. If an exposure suffers a limb-angle or
+SAA violation, include it anyway, assuming that HIST targets are
+bright enough that the additional background flux is not a problem.
+
+<P>
+<hr WIDTH="100%">
+
+<p>March 21, 2008
+<br>Van Dixon
+<BR>v3.2/src/libcf/cf_find_spectra.c
+
+<P>
+In HIST mode, there are no spectra in other apertures to cause
+confusion, so we need not require that the target centroid lie
+within 30 pixels of the expected value.
+
+<P>
+<hr WIDTH="100%">
+
+<p>Feb 22, 2008
+<br>Benjamin Ooghe
+<BR>INSTALLING_CalFUSEv3.2.2
+<BR>INSTALLING_A_FORTRAN_COMPILER
+<BR>FIXING_SELINUX_ISSUES
+
+<P>Updated installation information.
+
+<P>
+<BR>v3.2/bin/calfuse.sh
+<BR>v3.2/bin/cfsetup.sh
+<BR>v3.2/bin/cfsetup.csh
+
+<P>Added scripts to set environment variables in Bourne-based shells
+(sh and bash) for systems without CSH and automated the setting of the
+shell path.
+
+<P>
+<BR>v3.2/src/configure.linux
+<BR>v3.2/src/configure.linux64
+<BR>v3.2/src/configure.macosx
+<BR>v3.2/src/configure.solaris
+<BR>v3.2/src/cfitsio/configure
+<BR>v3.2/src/Makefile.Linux
+<BR>v3.2/src/Makefile.Linux64
+<BR>v3.2/src/Makefile.MacOSX
+<BR>v3.2/src/analysis/Makefile.Linux
+<BR>v3.2/src/analysis/Makefile.Linux64
+<BR>v3.2/src/analysis/Makefile.MacOSX
+<BR>v3.2/src/analysis/idf_combine.c
+<BR>v3.2/src/analysis/cf_coadd.c
+<BR>v3.2/src/analysis/cf_arith.c
+<BR>v3.2/src/analysis/cf_combine.c
+<BR>v3.2/src/analysis/cf_pack.c
+<BR>v3.2/src/cal/jitter/Makefile.Linux
+<BR>v3.2/src/cal/jitter/Makefile.Linux64
+<BR>v3.2/src/cal/jitter/Makefile.MacOSX
+<BR>v3.2/src/cal/jitter/cf_jitter.c
+<BR>v3.2/src/cal/jitter/cf_jitter_diag.c
+<BR>v3.2/src/fes/Makefile.Linux
+<BR>v3.2/src/fes/Makefile.Linux64
+<BR>v3.2/src/fuv/Makefile.Linux
+<BR>v3.2/src/fuv/Makefile.Linux64
+<BR>v3.2/src/fuv/Makefile.MacOSX
+<BR>v3.2/src/fuv/cf_gainmap.c
+<BR>v3.2/src/fuv/cf_countmap.c
+<BR>v3.2/src/libcf/Makefile.Linux
+<BR>v3.2/src/libcf/Makefile.Linux64
+<BR>v3.2/src/libcf/Makefile.MacOSX
+<BR>v3.2/src/libcf/cf_idf_io.c
+<BR>v3.2/src/slalib/mk
+<BR>v3.2/src/slalib/mk.sv
+<BR>v3.2/src/slalib/sla_source.tar
+
+<P>Updated configure files and Makefiles for all systems in order to
+compile with more different fortran compilers (f77, f90, g77, gfortran)
+and on recent systems (Solaris 10, recent Linux, Mac OS X 10.4)
+including 64-bit architecture machines. This required the modification
+of source files to correct bad int/long declarations that cause
+problems on 64-bit architectures, on Solaris 10 systems, and on some
+fortran compilers.
+
+<P>
+<BR>v3.2/include/calfuse.h
+<BR>v3.2/src/libcf/cf_fes_proc_update.c
+<BR>v3.2/src/libcf/cf_fes_proc_check.c
+
+<P>Fixed warning messages from GCC compiler (missing brackets and
+unused symbols).
+
+<P>
+<BR>v3.2/src/analysis/cf_make_all_obs.csh
+
+<P>Use airglow spectra when they are the only ones available.
+
+<P>
+<BR>v3.2/src/analysis/cf_nvo.c
+
+<P>Fixed memory problem causing occasional bad values in the NVO flux arrays.
+In copy_spec, the shift+start value was sometimes negative, causing the
+routine to read negative indexes in the flux and error arrays. Also,
+the final values of the flux_nvo and error_nvo arrays weren't always
+written.
+
+<P>
+<BR>v3.2/src/fuv/cf_bad_pixels.c
+
+<P>In cf_generate_pseudo_photons, verify for each fill-data event that
+the LOCATION_SHLD flag is not set to ensure that it does not
+fall outside of the active area of the detector.
+
+<P>
+<BR>v3.2/src/libcf/cf_thermal_distort.c
+
+<P>In cf_estimate_drift_coefficients, set max value of index to jmax-1
+rather than jmax.
+
+
+<P>
+<hr WIDTH="100%">
+
+<p>February 22, 2008
+<br>Van Dixon
+<BR>v3.2/src/fuv/cf_convert_to_farf.c
+<BR>v3.2/src/fuv/cf_flux_calibrate.c
+<BR>v3.2/src/fuv/cf_ttag_init.c
+<BR>v3.2/src/libcf/cf_modify_hist_pha.c
+<BR>v3.2/src/libcf/cf_screen_jitter.c
+<BR>v3.2/src/libcf/cf_set_good_time_intervals.c
+
+<P>
+Modified cf_convert_to_farf to write out the new PHA values assigned
+by cf_modify_hist_pha.
+
+<P>
+Cleaned up i/o in cf_flux_calibrate.
+
+<P>
+Added -e flag to cf_ttag_init. It sets the header keyword HKEXISTS
+to YES in the output IDF file.
+
+<P>
+In cf_modify_hist_pha, fixed bug in loop through MJD array.
+
+<P>
+In cf_screen_jitter, don't apply jitter correction to observations
+taken after the spacecraft lost pointing control.
+
+<P>
+Changed malloc to cf_malloc in cf_set_good_time_intervals.
+
+<P>
+Update version number to v3.2.2.
+
+<P>
+<hr WIDTH="100%">
+
+<br>
+<p>May 18, 2007
+<br>Van Dixon
+<BR>v3.2/src/libcf/cf_init_support.c
+
+<P>
+If HV array in HSKP file consists of a single 0 followed by all -1's,
+use header info to populate timeline table. Change name of subroutine
+fill_hv_array to hv_from_hskp and add hv_from_header.
+
+<P>
+Update version number to v3.2.1.
+
+<P>
+<hr WIDTH="100%">
+
+<p>April 7, 2007
+<br>Van Dixon
+<BR>v3.2/src/fuv/cf_bad_pixels.c
+
+<P>
+Within cf_bad_pixels, we scale nmax, the program's guess at the number
+of bad pixels it will have to deal with, by 1.5 to help prevent array
+overflows. To make warning messages more meaningful, we call
+cf_error_init after each call to cf_extraction_limits and make
+CF_PRGM_ID and CF_VER_NUM static variables.
+
+<P>
+This is the release version of CalFUSE v3.2.0.
+
+<P>
+<hr WIDTH="100%">
+
+<p>March 29, 2007
+<br>Van Dixon
+<BR>v3.2/src/libcf/cf_init_support.c
+<BR>v3.2/src/cal/jitter/cf_jitter.c
+
+<P>
+On error, cf_check_digitizer now sets EXP_STAT flag to -2, rather than
+-999, to be more consistent with cf_hist_init.
+
+<P>
+We modified cf_jitter to handle the time period (in March 2007) when
+the ACS telemetry rate was cut in half and generally made the code
+more robust.
+
+<P>
+<hr WIDTH="100%">
+
+<br>
+<p>March 23, 2007
+<br>Van Dixon
+<BR>v3.2/src/fuv/cf_hist_init.c
+<BR>v3.2/src/libcf/cf_init_support.c
+<BR>v3.2/src/libcf/cf_screen_jitter.c
+<BR>v3.2/src/libcf/cf_satellite_jitter.c
+
+<P>
+In cf_hist_init, set EXP_STAT to -1 if a raw hist file contains no
+extensions. Treat the limits of the active area as good pixels.
+
+<P>
+In cf_init_support, give a more detailed error message if the
+housekeeping file is not usable.
+
+<P>
+In cf_screen_jitter and cf_satellite_jitter, calculate time_diff (the
+offset between the jitter and IDF versions of EXPSTART) once, rather
+than each time it's used.
+
+<br>
+<p>March 20, 2007
+<br>Van Dixon
+<BR>v3.2/src/fuv/cf_bad_pixels.c
+
+<P>
+In the subroutine cf_combine_pothole_data, if an entire dead spot falls
+outside of the aperture, skip it and move on to the next one.
+
+<P>
+<hr WIDTH="100%">
+
+<p>March 7, 2007
+<br>Van Dixon
+<BR>v3.2/src/libcf/cf_init_support.c
+<BR>v3.2/src/libcf/cf_velang.c
+<BR>v3.2/src/libcf/space_vel.c
+<BR>v3.2/include/calfuse.h v1.81
+
+<P>
+The subroutine space_vel used a convoluted scheme to compute what
+is essentially a dot product. I simplified the code, deleted an
+argument, and modified the subroutines that call it.
+
+<P>
+This is version 3.2.0 of the CalFUSE pipeline.
+
+<P>
+<hr WIDTH="100%">
+
+<p>February 13, 2007
+<br>Van Dixon
+<BR>v3.2/src/fuv/cf_remove_motions.c
+
+<BR>v3.2/src/libcf/cf_fifo_dead_time.c
+<BR>v3.2/src/libcf/cf_init_support.c
+
+<P>
+When writing the LiF and SiC count rate arrays to the IDF file,
+cf_remove_motions crashed if the array values were too large to be
+stored as unsigned integers. As such enormous values are always wrong,
+they are now set to zero.
+
+<P>
+Sometimes, the header keyword TTPERIOD is erroneously set to 0.
+If so, cf_init_support and cf_fifo_dead_time now set it to 1.0,
+the most likely value.
+
+<P>
+<hr WIDTH="100%">
+
+<p>January 2, 2007
+<br>Van Dixon
+<BR>v3.2/src/fuv/cf_screen_photons.c
+<BR>v3.2/src/fuv/cf_convert_to_farf.c
+<BR>v3.2/src/fuv/cf_remove_motions.c
+
+<BR>v3.2/src/libcf/cf_apply_dead_time.c
+<BR>v3.2/src/libcf/cf_fifo_dead_time.c
+<BR>v3.2/src/libcf/cf_target_count_rate.c
+<BR>v3.2/src/libcf/pole_ang.c
+<BR>v3.2/src/libcf/cf_velang.c
+<BR>v3.2/src/libcf/cf_screen_high_voltage.c
+<BR>v3.2/src/libcf/cf_satellite_jitter.c
+<BR>v3.2/src/libcf/cf_grating_motion.c
+<BR>v3.2/src/libcf/cf_time_xy_distort.c
+<BR>v3.2/src/libcf/cf_init_support.c
+<BR>v3.2/src/libcf/cf_set_photon_flags.c
+
+<BR>v3.2/src/cal/jitter/cf_jitter.c
+
+<BR>v3.2/src/analysis/cf_combine.c
+<BR>v3.2/src/analysis/cf_nvo.c
+<BR>v3.2/src/analysis/cf_pack.c
+<BR>v3.2/src/analysis/idf_combine.c
+
+
+<P>
+To fix a bug in our correction for photon-event losses to FIFO
+overflows, we modified the subroutine cf_screen_fifo_overflow, renamed
+it cf_fifo_dead_time, and moved it from cf_screen_photons to
+cf_convert_to_farf. The subroutine cf_apply_dead_time issues a warning
+if DET_DEAD > 1.5, rather than TOT_DEAD. Because we no longer use
+the HV status flag to denote FIFO overflows, mention of the FIFO flag
+was removed from cf_set_photon_flags. Within cf_convert_to_farf, we
+now set the header keywords DET_DEAD, IDS_DEAD, and TOT_DEAD to unity
+by default.
+
+<P>
+Within cf_remove_motions, we now treat the LiF and SiC count-rate
+arrays as floats. We pass the WEIGHT array to cf_target_count_rate,
+so that it returns dead-time corrected count rates. If these count
+rates are too large to store as shorts, we use the TSCALE and TZERO
+keywords to store them as unsigned shorts. For HIST data, we scale
+the default LiF and SiC rates (read from the housekeeping file) by
+the value of DET_DEAD to account for detector dead-time losses.
+
+<P>
+The new subroutine pole_ang returns the angle between the orbit pole
+and a given RA and DEC. It is called by cf_velang, which populates
+the POLEANGL keyword.
+
+<P>
+The subroutine cf_screen_high_voltage no longer sets the EXP_STAT keyword.
+
+<P>
+The subroutine cf_find_spectra has been modified: if the new argument
+airglow_centroid is TRUE, then the program uses the airglow lines to
+compute the centroid of the target spectrum. To invoke this option,
+call cf_remove_motions with the -a flag.
+
+<P>
+The program cf_jitter has been extensively modified. Among other
+changes, it can (if necessary) compute the commanded quaternion from
+the target coordinates in the housekeeping file header. Values of the
+TRKFLG array now range from -1 to 5, with -1 meaning that tracking is
+bad, 0 that no information is available, and 1 to 5 representing
+increasingly reliable tracking estimates. The subroutines
+cf_satellite_jitter and cf_screen_jitter have been modified
+accordingly. In particular, the minimum value of TRKFLG that is to be
+considered reliable and the X and Y aperture limits are read from the
+pipeline parameter file.
+
+<P>
+Both the subroutine cf_grating_motion and the grating-motion
+calibration file have been completely revised. The new model depends
+on the target's beta and pole angles. An additional set of corrections
+tracks long-term drifts in the spectra's X and Y positions.
+
+<P>
+A new subroutine, cf_time_xy_distort, corrects for long-term drifts
+in the detector X and Y coordinate scales. It is called by
+cf_convert_to_farf.
+
+<P>
+We fixed a bug in the way that cf_init_support constructs the AIC
+count-rate array.
+
+<P>
+Lots of little changes in the analysis routines: When selecting which
+detector segment to include in the composite spectrum, cf_nvo now
+rejects segments with OBSTIME < 10 sec if the entire exposure is > 100
+s. The program idf_combine adds comment fields to the header keywords
+WOFFS and WOFFL. The program cf_combine now counts SPEC### and WAVE###
+using the variable ngood, rather than nfiles. Finally, we made small
+changes to the way that cf_pack copies the SPEC keywords to the output
+file header.
+
+
+<P>
+<hr WIDTH="100%">
+
+<p>June 22, 2006
+<br>Van Dixon
+<BR>v3.2/src/fuv/cf_hist_init.c
+<BR>v3.2/src/fuv/cf_extract_spectra.c
+<BR>v3.2/src/fuv/cf_ttag_init.c
+<BR>v3.2/src/libcf/cf_screen_jitter.c
+<BR>v3.2/src/libcf/cf_screen_burst.c
+<BR>v3.2/src/libcf/cf_optimal_extraction.c
+<BR>v3.2/src/libcf/cf_fuv_init.c
+<BR>v3.2/src/libcf/cf_error_msg.c
+
+<P>
+The pipeline no longer issues WARNING messages when a raw or
+intermediate data file is empty, either because it contains no photons
+or because the entire exposure has been flagged as bad; when the jitter
+file is missing (though out-of-date jitter files inspire a WARNING);
+when the detector voltage is low; and when the pipeline cannot perform
+optimal extraction. It issues level 1 verbose messages instead.
+
+<P>
+Now that OPUS has been updated, the variable morekeys has been set to
+zero in both cf_hist_init and cf_ttag_init.
+
+<P>
+This is version 3.1.8 of the CalFUSE pipeline.
+
+<P>
+<hr WIDTH="100%">
+
+<br>
+<p>May 24, 2006
+<br>Van Dixon
+<BR>v3.2/src/fuv/cf_extract_spectra.c
+<BR>v3.2/src/analysis/cf_combine.c
+<BR>v3.2/src/analysis/cf_nvo.c
+<BR>v3.2/src/analysis/cf_pack.c
+<BR>v3.2/src/analysis/cf_xcorr.c
+<BR>v3.2/src/analysis/idf_combine.c
+<BR>v3.2/idl/cf_obsplot.pro
+
+<P>
+We modified cf_extract_spectra so that it will no longer discard (that
+is, set to zero the flux and errors arrays of) spectra with non-zero
+values of EXP_STAT. Those spectra are now rejected by cf_combine,
+instead.
+
+<P>
+The program cf_combine has been extensively revised:
+it now runs through the input files with a single loop;
+it supports the same command-line options as idf_combine; and
+it ignores spectra with EXP_STAT != 0 (unless the -a flag is set).
+
+<P>
+Both cf_nvo and cf_xcorr now use the Lyman beta line to align the
+spectra of background observations. They use the interstellar O VI and
+C II lines to align white dwarf spectra. For BKGD targets, cf_nvo
+always selects the channel with the highest effective area, regardless
+of its observed flux. The mean flux, used when deciding which segment
+to use, is now calculated using the same wavelength regions for each
+channel. For PC targets, the O VI lines are not included in the mean
+flux calculation.
+
+<P>
+The program cf_pack now writes an index to the various file extensions
+to the primary HDU of the output *000all* file.
+
+<P>
+Both cf_combine and idf_combine now write a number of header keywords
+as longs, rather than floats.
+
+<P>
+Three changes to cf_obsplot.pro: For BKGD targets, omit flux
+comparison when selecting which detector segments to use. Compute mean
+flux using same wavelength intervals for each band. For PC targets,
+don't include O VI in the calculation of the mean flux.
+
+<P>
+<hr WIDTH="100%">
+
+<br>Van Dixon
+<BR>v3.2/src/fuv/cf_assign_wavelength.c
+<BR>v3.2/src/fuv/cf_bad_pixels.c
+<BR>v3.2/src/libcf/cf_astigmatism.c
+<BR>v3.2/src/libcf/cf_dispersion.c
+<BR>v3.2/src/libcf/cf_apply_dead_time.c
+<BR>v3.2/src/libcf/cf_extraction_limits.c
+<BR>v3.2/src/libcf/cf_init_support.c
+<BR>v3.2/src/libcf/cf_screen_burst.c
+<BR>v3.2/src/libcf/cf_screen_fifo_overflow.c
+<BR>v3.2/src/libcf/cf_screen_jitter.c
+<BR>v3.2/src/libcf/cf_set_photon_flags.c
+<BR>v3.2/src/analysis/cf_make_all_obs.csh
+<BR>v3.2/src/analysis/cf_nvo.c
+<BR>v3.2/src/analysis/cf_pack.c
+<BR>v3.2/src/analysis/cf_xcorr.c
+
+<P>
+Divided cf_astigmatism_and_dispersion into two routines, incorporating
+astig_check_input_image into the new program cf_astigmatism and
+cf_x2lambda into cf_dispersion. Modified cf_assign_wavelength and
+cf_bad_pixels to call the new routines. Because cf_astig_farf is not
+used, it is no longer defined in calfuse.h or compiled by the
+Makefile.
+
+<P>
+Cleaned up i/o in cf_apply_dead_time.
+
+<P>
+For targets observed in HIST mode, cf_extraction_limits.c now pads
+apertures by SPECBINY pixels.
+
+<P>
+In cf_init_support, flag as bad all times after final OPUS GTI.
+
+<P>
+In cf_screen_burst, require that the number of windows in subroutine
+median_filter be >= 1.
+In cf_screen_fifo_overflow, changed length of data_rate array from
+nevents to nseconds.
+In cf_screen_jitter, screening is now applied to targets observed with
+APERTURE = RFPT.
+In cf_set_photon_flags, modify header keyword EXP_STAT only if was initially 0.
+
+<P>
+In the analysis directory, modified cf_make_all_obs.csh to be smarter
+when deciding whether to cross-correlate spectra or combine IDF files.
+Also modified logic for discarding 000 files. In cf_nvo, ignore
+segments with OBS_TIME = 0 and allow use of SiC data for 1000-1100 A
+region. (Sometimes the LiF channels are not used.) In cf_pack, if a
+segment is missing, write an empty image extension to the combined data
+file. In cf_xcorr, scale each spectrum to the mean flux of the
+reference spectrum.
+
+<P>
+This is version 3.1.8 of the CalFUSE pipeline.
+
+<P>
+<hr WIDTH="100%">
+
+<p>February 3, 2006
+<br>Van Dixon
+<BR>v3.2/src/fuv/cf_compute_y_centroid.c
+<BR>v3.2/src/fuv/cf_find_spectra.c
+<BR>v3.2/src/libcf/cf_scale_bkgd.c
+<BR>v3.2/src/fuv/cf_extract_spectra.c
+
+<P>
+We tightened the limits over which cf_find_spectra computes the
+spectral centroid to prevent a bright star in a nearby aperture or the
+enhanced background near the detector edge from pulling the extraction
+window off center. In both cf_compute_y_centroid and cf_find_spectra,
+we returned the EMAX_LIF and EMAX_SIC keywords to their original
+behavior: if the centroid differs from the default value by more than
+this limit, the default value is used.
+
+<P>
+We fixed a bug introduced in the last modification of cf_scale_bkgd
+that essentially turned off the background subtraction.
+
+<P>
+We added a command-line flag to cf_extract_spectra that forces the use
+of optimal extraction, even for extended sources.
+
+<P>
+This is version 3.1.7 of the CalFUSE pipeline.
+
+<P>
+<hr WIDTH="100%">
+
+<p>January 24, 2006
+<br>Van Dixon
+<BR>v3.2/src/fuv/cf_screen_photons.c
+<BR>v3.2/src/libcf/cf_scale_bkgd.c
+
+<P>
+Because cf_screen_burst wants to exclude airglow photons from the
+calculated background, we must identify them before calling the
+routine. To that end, I've made cf_screen_airglow the first of the
+screening routines.
+
+<P>
+The model background consists of a spatially-uniform component and a
+scattered-light image. The scattered-light component was
+over-estimated, because the data count totals were computed using a
+larger region of the detector than the scattered-light model totals.
+Now, we apply the same limits to both data and models.
+
+<P>
+The program returns a slice of the background that is supposed to match
+that covered by the probability array. Limit checks in the subroutine
+get_limits prevented the background slice from falling off of the
+detector. Sometimes, you want to background slice to fall off of the
+detector. In such cases, the limit checks could introduce an unwanted
+offset in the model background. We've deleted the limit checks and use
+other means to avoid bad index values.
+
+<P>
+This is version 3.1.6 of the CalFUSE pipeline.
+
+<P>
+<hr WIDTH="100%">
+
+<p>January 3, 2006
+<br>Van Dixon
+<BR>v3.2/src/libcf/cf_grating_motion.c
+
+<P>
+Correct LiF 1 data for residual zero-point errors in the wavelength scale.
+
+<P>
+<hr WIDTH="100%">
+
+<p>December 2, 2005
+<br>Van Dixon
+<BR>v3.2/src/libcf/cf_mirror_motion.c
+
+<P>
+cf_mirror_motion now exits without modifying the data if target is an
+extended source.
+
+<P>
+<hr WIDTH="100%">
+
+<p>December 2, 2005
+<br>Van Dixon
+<BR>v3.2/src/libcf/cf_astigmatism_and_dispersion.c
+<BR>v3.2/src/libcf/cf_apply_dead_time.c
+<BR>v3.2/src/libcf/cf_convert_to_ergs.c
+<BR>v3.2/src/libcf/cf_count_rate_y_distort.c
+<BR>v3.2/src/libcf/cf_doppler_and_heliocentric.c
+<BR>v3.2/src/libcf/cf_extraction_limits.c
+<BR>v3.2/src/libcf/cf_fpa_position.c
+<BR>v3.2/src/libcf/cf_init_support.c
+<BR>v3.2/src/libcf/cf_make_mask.c
+<BR>v3.2/src/libcf/cf_optimal_extraction.c
+<BR>v3.2/src/libcf/cf_satellite_jitter.c
+<BR>v3.2/src/libcf/cf_screen_bad_pixels.c (NEW)
+<BR>v3.2/src/libcf/cf_screen_fifo_overflow.c
+<BR>v3.2/src/libcf/cf_screen_jitter.c (NEW)
+<BR>v3.2/src/fuv/cf_bad_pixels.c
+<BR>v3.2/src/fuv/cf_extract_spectra.c
+<BR>v3.2/src/fuv/cf_remove_motions.c
+<BR>v3.2/src/fuv/cf_screen_photons.c
+
+<P>
+To improve our bad-pixel correction, we've added a new routine,
+cf_screen_bad_pixels, which flags photon events falling in known
+pothole regions. cf_make_mask now fills gaps in the bad-pixel mask
+that open when it is converted from pixels to wavelengths. In the
+optimal-extraction algorithm, cf_optimal_extraction now scales the
+variance estimate by the bad-pixel mask to better approximate the
+observed counts. The main pothole routine, cf_bad_pixels, now uses
+cf_x2lambda() and cf_get_potholes(), rather than its own subroutines
+that do the same job. Also, it no longer adds random numbers to the
+output pixel coordinates -- that's no longer necessary. Finally,
+cf_bad_pixels no longer trims potholes at the edges of the
+extraction windows. We modified cf_astigmatism_and_dispersion so that
+it would not complain when events fall outside of the astig images.
+
+<P>
+We added a test to cf_apply_dead_time to catch bad dead-time values: If
+there is no housekeeping file, AND the engineering snapshot times are
+bad, AND the mean value of either dead-time array is > 1.5, set the
+array to unity and issue a warning.
+
+<P>
+In cf_convert_to_ergs, we changed the effective-area arrays to type
+double to match the AEFF_CAL files.
+
+<P>
+For histogram data, cf_count_rate_y_distort must use a single count
+rate value for all of the data. To better estimate it, we replace the
+time-dependent FEC-rate array with its weighted mean value.
+
+<P>
+To improve our calculation of the Doppler correction, we changed the
+variables velocity and doppler to doubles in cf_doppler_and_heliocentric.
+
+<P>
+Rather than using different HIST_PAD values for each aperture,
+cf_extraction_limits now always pads the apertures by 8 pixels (top and
+bottom) when in HIST mode.
+
+<P>
+We deleted unused variables in cf_fpa_position.
+
+<P>
+More efforts to catch corrupted keywords in cf_init_support: When
+the housekeeping file is missing and the engineering snapshot times are
+corrupted, we use EXPSTART and EXPEND to estimate eng_time. If EXPEND is
+corrupted, we use EXPTIME.
+
+<P>
+To improve the jitter-correction algorithm, we've removed the
+data-screening functions from cf_satellite_jitter and moved them to a
+new routine, cf_screen_jitter. The modules cf_remove_motions and
+cf_screen_photons have been modified accordingly.
+
+<P>
+We caught a bug in cf_screen_fifo_overflow: It was using the
+RATE_LIF and RATE_SIC arrays to estimate the raw count rate, but those
+arrays are populated from the housekeeping file and do not reflect data
+losses due to FIFO overflows. Now we calculate the count rate across
+the entire detector directly from the photon-event data.
+
+<P>
+We added a flag to cf_extract_spectra that allows the user to disable
+optimal extraction from the command line.
+
+<P>
+This is version 3.1.5 of the CalFUSE pipeline.
+
+<P>
+<hr WIDTH="100%">
+
+<p>September 19, 2005
+<br>Van Dixon
+<BR>v3.1/src/libcf/cf_read_fpa_pos.c (RESTORED)
+
+<P>
+Had to restore cf_read_fpa_pos, as it's called by ttag_combine.
+
+<P>
+This is version 3.1.3 of the CalFUSE pipeline.
+
+<P>
+<hr WIDTH="100%">
+
+<p>September 7, 2005
+<br>Van Dixon
+<BR>v3.1/src/analysis/cf_arith.c (RENAMED)
+<BR>v3.1/src/analysis/cf_coadd.c
+<BR>v3.1/src/analysis/cf_combine.c
+<BR>v3.1/src/analysis/cf_make_all_exp.c (NEW)
+<BR>v3.1/src/analysis/cf_nvo.c
+<BR>v3.1/src/analysis/cf_pack.c
+<BR>v3.1/src/analysis/cf_xcorr.c
+<BR>v3.1/src/analysis/getshift.c
+<BR>v3.1/src/analysis/modhead.c
+<BR>v3.1/src/libcf/cf_init_support.c
+<BR>v3.1/src/libcf/cf_fpa_position.c
+<BR>v3.1/src/libcf/cf_read_fpa_pos.c (DELETED)
+<BR>v3.1/src/libcf/cf_screen_burst.c
+<BR>v3.1/src/libcf/cf_write_extracted_spectrum.c
+
+<P>
+We are required to provide MAST an <b>all</b> file for each exposure and
+one set of <b>all</b>, <b>ano</b>, and <b>nvo</b> files per observation.
+These files are created by cf_coadd, which has been completely re-written.
+It calls cf_make_all_exp for each exposure and cf_make_all_obs.csh once
+per observation. The new program cf_make_all_exp copies the primary HDU
+of the channel with the longest EXPTIME into an otherwise empty file.
+cf_nvo now sets the keyword NEXTEND back to 1.
+In cf_pack, the keyword COMB_COR is set to COMPLETE.
+
+<P>
+The name of cf_arith3 has been changed back to cf_arith.
+If called with no arguments, cf_arith, cf_combine, cf_xcorr, and getshift
+don't return an error, just a "usage" message.
+If the input list given to cf_combine contains only file names (no shifts),
+the program assumes that all shifts are zero.
+The programs cf_xcorr and cf_combine have been modified
+to use the same sign convention for spectral shifts as FUSE_REGISTER.
+The program modhead now accepts multi-word strings as keyword values.
+
+<P>
+In cf_init_support, use LWRS background limits for RFPT observations.
+In cf_fpa_position, correct for both X and Z displacement of FPA's.
+Delete call to cf_read_fpa_pos.
+In cf_screen_burst, ignore photons with arrival times greater than MAX_EXPTIME.
+In cf_write_extracted_spectrum, delete FITS_write_date from cf_copy_hist_header.
+
+<P>
+<hr WIDTH="100%">
+
+<p>July 12, 2005
+<br>Van Dixon
+<BR>v3.1/src/analysis/cf_combine.c
+<BR>v3.1/src/analysis/cf_nvo.c
+<BR>v3.1/src/analysis/cf_pack.c
+<BR>v3.1/src/cal/jitter/cf_jitter.c
+<BR>v3.1/src/libcf/cf_satellite_jitter.c
+
+<P>
+In cf_combine, we use fgets to read the input file and assume that pix_shift
+is an integer.
+In cf_nvo, we modify the cross-correlation routine to use LiF 2B as the
+wavelength standard if header keyword FESCENT is set to FES B.
+In cf_pack, we set the header keyword COMB_COR to COMPLETE.
+
+<P>
+cf_jitter writes a new keyword, JIT_VERS, to the header of each jitter
+file. If this keyword is missing or is less than 2,
+cf_satellite_jitter now warns that the jitter file format is out
+of date, which may result in the rejection of good data.
+
+<P>
+<hr WIDTH="100%">
+
+<p>June 16, 2005
+<br>Van Dixon
+<BR>v3.1/src/libcf/cf_rebin_probability_array.c
+<BR>v3.1/src/libcf/cf_scale_bkgd.c
+<BR>v3.1/src/fuv/cf_extract_spectra.c
+<BR>v3.1/include/calfuse.h v1.71
+
+<P>
+A bug in the spectral-extraction subroutines caused CalFUSE always to
+use the smaller, point-source extraction window, even for extended
+sources. This could lead to an underestimate of the flux for extended
+sources. The pipeline now uses either the point-source or
+extended-source aperture, as appropriate.
+
+<P>
+This is version 3.1.2 of the CalFUSE pipeline.
+
+<P>
+<hr WIDTH="100%">
+
+<p>June 8, 2005
+<br>Van Dixon
+<BR>v3.1/src/analysis/cf_combine.c
+<BR>v3.1/src/analysis/cf_make_all.csh
+<BR>v3.1/src/analysis/cf_nvo.c
+<BR>v3.1/src/analysis/cf_pack.c
+<BR>v3.1/src/analysis/cf_xcorr.c
+<BR>v3.1/src/analysis/extract_jitter.c
+<BR>v3.1/src/analysis/idf_combine.c
+<BR>v3.1/src/libcf/cf_calculate_y_centroid.c
+<BR>v3.1/src/libcf/cf_find_spectra.c
+<BR>v3.1/src/libcf/cf_idf_io.c
+<BR>v3.1/src/libcf/cf_modify_hist_pha.c
+<BR>v3.1/src/libcf/cf_rebin_probability_array.c
+
+<BR>v3.1/include/calfuse.h v1.70
+
+<P>
+We modified cf_combine to support the generation of our new
+observation-level spectral files. It now writes the keywords NSPEC,
+SPEC###, and WOFF### to the primary HDU of the output file.
+
+<P>
+Three C routines and a shell script generate a new set of
+observation-level spectral files. For targets that are bright enough,
+we cross-correlate and combine the extracted spectra from each
+exposure. For fainter targets, we combine the IDF files from each
+exposure and extract a single spectrum for the whole observation. Then
+we repeat this exercise for the night-only data. Finally, we combine
+observation-level spectra from the various channels into a single
+spectral file for submission to the National Virtual Observatory.
+
+<P>
+cf_make_all is the shell script that calls these routines.
+<br>
+cf_xcorr determines the relative wavelength offset of each exposure.
+<br>
+cf_pack combines the observation-level spectra from each channel into
+a single ALL or ANO (all data, night-only) file.
+<br>
+cf_nvo selects data from the best channel for each waveband, shifts
+it to a common wavelengh scale, and generates the NVO file.
+
+<P>
+In extract_jitter, fixed a bug that set EXPSTART equal to EXPEND.
+
+<P>
+In idf_combine, comment out warning when FPA motion is detected.
+The pipeline corrects for this.
+
+<P>
+In cf_calculate_y_centroid, don't override user-specified centroid,
+even if it is far from the expected value. Fixed bug in tabulation of
+the expected Y centroids.
+
+<P>
+In cf_find_spectra, use airglow centroid of LWRS aperture to constrain
+airglow centroids of smaller apertures. Use airglow centroid of
+target aperture to constrain search for centroid of target spectrum.
+
+<P>
+In cf_idf_io, allow arrays of floats to be read as doubles.
+
+<P>
+In cf_modify_hist_pha, fixed bug in loop through MJD array.
+
+<P>
+In cf_rebin_probability_array, rounding errors left non-zero
+probabilities in regions beyond the ends of the extraction windows.
+Re-normalization raised these probabilities to unity. Now, if total
+probability in a column is less than 0.1, it is set to zero.
+
+<P>
+<hr WIDTH="100%">
+
+<p>April 19, 2005
+<br>Van Dixon
+
+<BR>v3.0/include/calfuse.h v1.66, v1.67, v1.68, v1.69
+
+<P>
+Between August and December of 2004, pipeline modifications were
+limited to bug fixes and a few new data-analysis routines. Since
+January of 2005, we made extensive modifications to the code, both to
+correct errors and to add new capabilities. All changes are documented
+in the headers of the individual modules and subroutines. Rather than
+repeat that information, we list here only the principal changes to the
+pipeline's capabilities.
+
+<P>
+In v3.0, data obtained during periods of uncertain pointing information
+were often flagged as bad. Now, the jitter files are generated using a
+simpler, more robust algorithm to determine when pointing information
+is reliable. If it's not, the pipeline does nothing, rather than
+flagging the data as bad.
+
+<P>
+In v3.0, data obtained when the detector voltage was less than 95% of
+the expected value were flagged as bad. Now, for detectors 1A, 1B, and
+2B, the level is 85%. For detector 2A, data with HV > 90% of full is
+processed without comment, data with HV > 80% of full generates a
+warning message, and data with HV < 80% of full is flagged as bad.
+(These limits are stored in the VOLT_CAL file.) For detector 2A data
+in the 80-90% range, the user should examine the pulse-hight
+distribution of photon events in the target aperture to ensure that the
+peak of the distribution is well separated from the background.
+
+<P>
+In v3.0, the geometric-distortion correction moved small segments of the
+HIST spectra out of their extraction windows. The solution was to
+increase the size of the HIST extraction windows in Y. A new keyword,
+HIST_PAD, which depends on both the detector and the aperture, is read
+from the header of the corresponding extension of the CHID_CAL file.
+While making this change, we found and corrected a bug in the
+calculation of the spectral Y centroid that affected both TTAG and
+HIST data.
+
+<P>
+In v3.0, the HIST and TTAG wavelength scales did not agree. This was a
+result of the walk correction, which was applied to TTAG but not HIST
+data. Since the walk correction is never zero, HIST data were never
+fully converted to the FARF. We now assign a pulse height (the mean
+for a particular date and aperture) to each HIST photon and apply the
+walk correction to all data.
+
+<P>
+When scaling the model background image to match the data, the
+subroutine cf_scale_bkgd (formerly cf_ttag_bkgd) did not properly
+account for regions of the detector excluded because of airglow
+contamination. As a result, it underestimated the total background.
+The program has been extensively revised.
+
+<P>
+The final extracted spectral (*fcal.fit) files now have the standard
+FITS binary table format that was employed in old (v2.4.3 and earlier)
+versions of the pipeline.
+
+<P>
+Errors in the calculation of TIME_SUNRISE and TIME_SUNSET have been
+corrected. As these values are never greater than 6000 s, they are
+now stored (and treated) as SHORTs.
+
+<P>
+If the pipeline cannot compute the centroids of the detector stim
+pulses, it now reads a new calibration file (STIM_CAL), in which the
+time-dependent average values of the drift coefficients are tabulated.
+
+<P>
+The burst-detection algorithm computes the mean count rate on the
+unilluminated regions of the detector and writes it to the IDF. It now
+does so for the entire exposure, not just for times previously
+identified as good.
+
+<P>
+Several keywords have been added to the IDF file headers, including
+the limb-angle limits BRITLIMB and DARKLIMB from the SCRN_CAL file
+and the calculated orbital period (ORBPERID).
+
+<P>
+The AIRG_CAL files, which identify regions of each detector likely
+to be contaminated by airglow features, are now expressed in FARF,
+rather than RAW, coordinates. This change allows us to use smaller
+airglow windows and thus to throw away less data.
+
+<P>
+The default pulse-height limits (both upper and lower) have been
+modified for all four detectors.
+
+<P>
+<hr WIDTH="100%">
+
+<p>August 24, 2004
+<br>Van Dixon
+<BR>v3.0/src/libcf/cf_fes_proc_update.c
+<BR>v3.0/src/libcf/cf_fes_proc_check.c
+<BR>v3.0/src/libcf/cf_count_rate_y_distort.c
+<BR>v3.0/src/libcf/cf_calculate_y_centroid.c
+<BR>v3.0/src/libcf/cf_optimal_extraction.c
+
+<BR>v3.0/include/calfuse.h v1.65
+
+<P>
+Installed two subroutines needed to process FES files. Modified calfuse.h
+to support them.
+
+<P>
+In cf_count_rate_y_distort, interpolate stretch correction among
+tabulated Y values to prevent counts from piling up at 10-pixel
+boundaries.
+
+<P>
+In cf_calculate_y_centroid, confirm that all spectral centroids, not
+just that of the target aperture, are within bounds.
+
+<P>
+In cf_optimal_extraction, use QUALITY array to set X limits of
+extraction region. Insure that sigma_out array is non-zero.
+
+<P>
+<hr WIDTH="100%">
+
+<p>August 12, 2004
+<br>Van Dixon
+<BR>v3.0/src/fuv/cf_assign_wavelength.c
+<BR>v3.0/src/fuv/cf_bad_pixels.c
+<BR>v3.0/src/fuv/cf_extract_spectra.c
+<BR>v3.0/src/fuv/cf_remove_motions.c
+<BR>v3.0/src/fuv/cf_screen_photons.c
+<BR>v3.0/src/libcf/cf_astigmatism_and_dispersion.c
+<BR>v3.0/src/libcf/cf_apply_filters.c
+<BR>v3.0/src/libcf/cf_calculate_y_centroid.c
+<BR>v3.0/src/libcf/cf_fuv_init.c
+<BR>v3.0/src/libcf/cf_find_spectra.c
+<BR>v3.0/src/libcf/cf_grating_motion.c
+<BR>v3.0/src/libcf/cf_identify_channel.c
+<BR>v3.0/src/libcf/cf_init_support.c
+<BR>v3.0/src/libcf/cf_make_mask.c
+<BR>v3.0/src/libcf/cf_mirror_motion.c
+<BR>v3.0/src/libcf/cf_modify_hist_times.c
+<BR>v3.0/src/libcf/cf_optimal_extraction.c
+<BR>v3.0/src/libcf/cf_proc_check.c
+<BR>v3.0/src/libcf/cf_rebin_background.c
+<BR>v3.0/src/libcf/cf_satellite_jitter.c
+<BR>v3.0/src/libcf/cf_screen_burst.c
+<BR>v3.0/src/libcf/cf_screen_high_voltage.c
+<BR>v3.0/src/libcf/cf_screen_limb_angle.c
+<BR>v3.0/src/libcf/cf_set_photon_flags.c
+<BR>v3.0/src/libcf/cf_thermal_distort.c
+<BR>v3.0/src/libcf/cf_ttag_bkgd.c
+<BR>v3.0/src/libcf/cf_write_extracted_spectrum.c
+<BR>v3.0/src/libcf/eclipse.c
+<BR>v3.0/src/libcf/solar_ang.c
+<BR>v3.0/src/libcf/space_vel.c
+<BR>v3.0/src/libcf/state_geod.c
+<BR>v3.0/src/libcf/state_limb.c
+
+<BR>v3.0/include/calfuse.h v1.64
+
+<P>
+Re-organized the pipeline, moving cf_screen_photons before
+cf_remove_motions. This required changes to both programs, as well as
+a number of subroutines.
+
+<P>
+Numerous modifications to cf_fuv_init: We now allow for the possibility
+that the time associated with a calibration file exactly equals
+EXPSTART. If the BRIT_OBJ keyword is set to DEFOCUS, we modify
+SRC_TYPE to E. Write CF_VERS to trailer file. Set ASTG_COR to
+PERFORM, as the pipeline doesn't do it automatically.
+
+<P>
+Changes to routines in cf_init_support: Add BRIT_OBJ keyword to header.
+Rewrite fill_hv_array() to make it more robust. If HV values in header
+are good, use them to determine whether HV arrays for 2A and 2B are
+swapped.
+
+<P>
+In both eclipse and state_geod, we corrected the FORTRAN call to sla_preces.
+To address warnings from the Mac OS X compiler, we made minor
+modifications to month_day.
+
+<P>
+If more than 90% of an exposure is lost to a burst, jitter, etc.,
+cf_set_photon_flags will write the cause to the trailer file.
+
+<P>
+Changes to cf_identify_channel: Don't bother shifting extraction
+windows to correct for FPA position. If shift is known, it is not needed.
+Because the extraction windows don't quite match the WGTS arrays, pad
+windows by XPAD pixels in X. Change i (which steps through targ_ap
+array) from long to int.
+
+<P>
+Corrected bug in cf_mirror_motion that caused it to swap motion corrections
+for sides 1 and 2. (This routine also got a new calibration file.)
+
+<P>
+In cf_grating_motion, we estimate the time between sunrises using the
+orbit period in the file header, rather than assuming a 6000-second orbit.
+
+<P>
+In cf_satellite_jitter, we skip the jitter correction if the jitter
+file lacks the JIT_STAT keyword. The program returns EXP_JITR
+to the calling routine.
+
+<P>
+Both cf_find_spectra and cf_calculate_y_centroid now use the photon
+flags to exclude events arriving during bursts, etc., from their
+centroid calculations.
+
+<P>
+In cf_astigmatism_and_dispersion, must change ASTG_COR to COMPLETE or
+SKIPPED by hand, as the pipeline won't do it automatically.
+
+<P>
+Changes to bad-pixel routines: Fixed bug in cf_make_mask, changing & to &&.
+
+<P>
+Changes to extraction subroutines:
+Fixed bug in cf_ttag_bkgd: nxb was undefined if RUN_BKGD = NO.
+Don't bother shifting the weights array to account for FPA motions, as
+this should already have been corrected in the conversion to the FARF.
+In cf_optimal_extraction: If weights_out[j] = 0, set variance = bkgd.
+Iterate optimal extraction to accuracy of 0.01 counts. In the boxcar
+extraction algorithm, we reduced the parray limit to 1E-4 to better
+match fluxes from optimal extraction for bright stars.
+The routine cf_write_extracted_spectrum now has an option (-o)
+to override the default root name for the extracted spectra.
+
+<P>
+Removed unused variables from the following routines: state_limb,
+cf_rebin_background, cf_screen_high_voltage, cf_screen_limb_angle,
+cf_thermal_distort, solar_ang, space_vel, and cf_bad_pixels.
+
+<P>
+Made minor i/o changes to cf_screen_burst. The routine cf_proc_check
+now calls cf_verbose rather than cf_if_warning when a pipeline step is
+inappropriate for TTAG data.
+
+<P>
+We made a lot of changes to the way that we deal with time for HIST
+data: In cf_apply_filters, we mask the BRST, SAA, and LIMB flags when
+calculating exposure time. In cf_set_photon_flags, we set only DAY
+flag; we all write other flags to EXP_STAT keyword. A new routine,
+cf_modify_hist_times, sets the photon-arrival times of photons in HIST
+files to the midpoint of the longest good-time interval.
+
+<P>
+This is the release version 3.0.7 of the CalFUSE pipeline.
+
+<P>
+<hr WIDTH="100%">
+
+<p>June 4, 2004
+<br>Van Dixon
+<BR>v2.4/src/fuv/cf_fuv_init.c
+<BR>v2.4/include/calfuse.h v1.175
+
+<P>
+Modified cf_fuv_init to allow for the possibility that the MJD for a
+calibration file equals EXPSTART for an exposure.
+
+<P>
+This is version 2.4.4 of the CalFUSE pipeline.
+
+<P>
+<hr WIDTH="100%">
+
+<p>May 13, 2004
+<br>Van Dixon
+<BR>v2.4/src/fuv/cf_update_qual.c
+<BR>v2.4/src/fuv/cf_dtcor.c
+<BR>v2.4/include/calfuse.h v1.174
+
+<P>
+Modified cf_update_qual and cf_dtcor to deal gracefully with bad
+counters in the data file headers.
+
+<P>
+This is version 2.4.3 of the CalFUSE pipeline.
+
+<P>
+<hr WIDTH="100%">
+
+<p>May 4, 2004
+<br>Van Dixon
+<BR>v3.0/src/fuv/cf_assign_wavelength.c
+<BR>v3.0/src/fuv/cf_countmap.c
+<BR>v3.0/src/fuv/cf_extract_spectra.c
+<BR>v3.0/src/fuv/cf_gainmap.c
+<BR>v3.0/src/fuv/cf_hist_init.c
+<BR>v3.0/src/fuv/cf_remove_motions.c
+<BR>v3.0/src/fuv/cf_ttag_init.c
+<BR>v3.0/src/libcf/cf_apply_dead_time.c
+<BR>v3.0/src/libcf/cf_calculate_y_centroid.c
+<BR>v3.0/src/libcf/cf_convert_to_ergs.c
+<BR>v3.0/src/libcf/cf_doppler_and_heliocentric.c.c
+<BR>v3.0/src/libcf/cf_error_msg.c
+<BR>v3.0/src/libcf/cf_find_spectra.c
+<BR>v3.0/src/libcf/cf_fuv_init.c
+<BR>v3.0/src/libcf/cf_init_support.c
+<BR>v3.0/src/libcf/cf_rebin_background.c
+<BR>v3.0/src/libcf/cf_set_good_time_intervals.c
+<BR>v3.0/src/libcf/cf_set_photon_flags.c
+<BR>v3.0/src/libcf/cf_set_user_gtis.c
+<BR>v3.0/src/libcf/cf_source_aper.c
+<BR>v3.0/src/libcf/cf_ttag_bkgd.c
+<BR>v3.0/src/libcf/cf_write_extracted_spectrum.c
+
+<BR>v3.0/include/calfuse.h v1.61, v1.62, v1.63
+
+<P>
+Bernard performed housecleaning (removing unused variables, changing
+variable types to match subroutine definitions, etc.) on the following
+routines: cf_assign_wavelength, cf_hist_init, cf_ttag_init, cf_countmap,
+and cf_bad_pixels.c. Also these subroutines: cf_apply_dead_time,
+cf_calculate_y_centroid, cf_doppler_and_heliocentric.c,
+cf_error_msg, cf_init_support, cf_set_good_time_intervals,
+cf_set_photon_flags, cf_set_user_gtis, and cf_source_aper.
+
+In addition, he modified cf_ttag_init to create a photon list
+containing a single dummy event when the raw file is empty and
+cf_init_support to better catch errors in the header counter keywords.
+
+<P>
+We made significant modifications to cf_extract_spectra, replacing
+cf_rebin_and_flux_calibrate_background with cf_rebin_background.
+cf_optimal_extraction now performs all calculations with the weights
+array, rather than ergcm2. It returns counts and sigma arrays, rather
+than flux and variance as before; cf_extract_spectra must
+flux-calibrate each array, and cf_write_extracted_spectrum no longer
+converts from variance to sigma. The boxcar algorithm now uses the
+probability (weights) array to set the limits of the extraction window,
+better replicating the results of optimal extraction. Optimal
+extraction now iterates to 10% accuracy. The output weights and bkgd
+arrays are calculated by the optimal-extraction routine, so better
+match the final flux-calibrated spectra.
+
+<P>
+In verbose mode, cf_convert_to_ergs prints out the relative weighting of
+the two effective-area files.
+
+<P>
+The first call to cf_identify_channel was moved from cf_find_spectra to
+cf_remove_motions. The documentation of cf_remove_motions was improved.
+
+<P>
+The keywords MKBK_COR and BKGD_COR are gone, so cf_fuv_init no longer
+populates them.
+
+<P>
+The routine cf_rebin_and_flux_calibrate_background was replaced by
+cf_rebin_background. Flux calibration is now performed by
+cf_extract_spectra. cf_ttag_bkgd returns a null-valued background
+image if RUN_BKGD = NO.
+
+<P>
+This is version 3.0.7 of the CalFUSE pipeline.
+
+<P>
+<hr WIDTH="100%">
+
+<p>April 5, 2004
+<br>Van Dixon
+<BR>v3.0/src/libcf/cf_geometric_distort.c
+<BR>v3.0/include/calfuse.h v1.60
+
+<P>
+Rescale SPECBINY only if it is > 1.
+
+<P>
+<hr WIDTH="100%">
+
+<p>April 1,2004
+<br>Van Dixon
+<BR>v3.0/src/fuv/cf_extract_spectra.c
+<BR>v3.0/src/libcf/cf_geometric_distort.c
+<BR>v3.0/src/libcf/cf_hist_init.c
+<BR>v3.0/src/libcf/cf_init_support.c
+<BR>v3.0/src/libcf/cf_optimal_extraction.c
+<BR>v3.0/src/libcf/cf_proc_check.c
+<BR>v3.0/src/libcf/cf_rebin_probability_array.c
+<BR>v3.0/src/libcf/cf_ttag_bkgd.c
+<BR>v3.0/src/libcf/cf_write_extracted_spectrum.c
+<BR>v3.0/include/calfuse.h v1.59
+
+<P>
+Abandon use of WPC array throughout the pipeline. Instead, modify
+cf_optimal_extraction to evenly distribute photon events across
+one X pixel when in HIST mode. If optimal-extraction loop does not
+converge within 50 iterations, exit and use results from boxcar extraction.
+<p>
+In cf_proc_check, call cf_verbose rather than cf_if_warning if program
+not appropriate for HIST data.
+<p>
+Change the way that routines deal with empty data files. In
+cf_hist_init, issue a warning -- but continue
+processing -- if NEVENTS = 0. (A similar change for cf_ttag_init
+will have to wait for the next version of the pipeline.)
+In cf_extract_spectra, write null-valued
+output spectra if either EXPTIME or NEVENTS = 0. In
+cf_write_extracted_spectrum, if valid_spectrum = FALSE, write warning
+message to file header.
+<p>
+Include math.h in cf_hist_init to define fmod(). This solves the
+long-standing problem of the program crashing on Linux machines.
+<p>
+Modify cf_init_support to better deal with counter errors.
+<p>
+In cf_geometric_distort, modify header keyword SPECBINY to reflect
+Y spacing in the FARF.
+<p>
+In cf_ttag_bkgd, set Y limits of 2-D background arrays equal to those
+of the probability (weights) array. Since the sizes are now equal,
+cf_optimal_extraction does not need to test them. Make centroid of
+probability array a float in cf_extract_spectra and associated
+subroutines.
+<p>
+In cf_rebin_probability_array, shift probability array to account
+for position of FPA.
+
+<P>
+This is version 3.0.6 of the CalFUSE pipeline.
+
+<P>
+<hr WIDTH="100%">
+
+<p>March 30, 2004
+<br>Van Dixon
+<BR>v2.4/src/fuv/cf_hist_init.c
+<BR>v2.4/include/calfuse.h v1.173
+
+<P>
+Modified cf_hist_init to produce
+null-valued data file if NEVENTS=0.
+
+<P>
+This is version 2.4.2 of the CalFUSE pipeline.
+
+<P>
+<hr WIDTH="100%">
+
+<p>March 16,2004
+<br>Van Dixon
+<BR>v3.0/src/fuv/cf_extract_spectra.c
+<BR>v3.0/src/fuv/cf_hist_init.c
+<BR>v3.0/src/fuv/cf_ttag_init.c
+<BR>v3.0/src/fuv/cf_bad_pixels.c
+<BR>v3.0/src/fuv/cf_countmap.c
+<BR>v3.0/src/fuv/cf_gainmap.c
+<BR>v3.0/src/fuv/cf_convert_to_farf.c
+<BR>v3.0/src/libcf/cf_astigmatism_and_dispersion.c
+<BR>v3.0/src/libcf/cf_init_support.c
+<BR>v3.0/src/libcf/cf_satellite_jitter.c
+<BR>v3.0/src/libcf/cf_thermal_distort.c
+<BR>v3.0/src/libcf/cf_write_extracted_spectrum.c
+<BR>v3.0/include/calfuse.h v1.57, v1.58
+
+<P>
+Implement WPC array in cf_extract_spectra and associated subroutines.
+<br>In cf_hist_init.c, fix error in correcting hot pixels.
+<br>In cf_ttag_init.c, exit if no photons in raw data file.
+<br>In cf_bad_pixels.c, change maximum size of the output arrays in
+cf_combine_pothole_data and insure that lif_cnt and sic_cnt arrays are
+non zero.
+<br>In cf_countmap.c and cf_gainmap.c, allow user to select coordinate
+system: RAW, FARF (default), final.
+<br>In cf_astigmatism_and_dispersion.c, make subroutine cf_x2lambda globally
+accessible.
+<br>In cf_convert_to_farf.c, pass weight array to cf_thermal_distort.
+<br>In cf_init_support.c, read begin and end counters as float.
+Set countrate to zero when cntb is more than 16777216.
+<br>In cf_satellite_jitter.c, polulate the PLATESC keyword in the input file header.
+<br>In cf_thermal_distort.c, added weights to the calculation (needed for
+histogram mode) and corrected bug in procedure for finding stim pulses.
+<br>In cf_write_extracted_spectrum.c, populate archive search keywords and
+change name of POTHOLE column to QUALITY.
+
+<P>
+This is version 3.0.5 of the CalFUSE pipeline.
+
+<P>
+<hr WIDTH="100%">
+
+<p>February 16, 2004
+<br>Van Dixon
+<BR>v3.0/include/calfuse.h v1.56
+
+<P>
+Release CalFUSE v3.0.4 for beta testing.
+
+<P>
+<hr WIDTH="100%">
+
+<p>May 22, 2003
+<br>Van Dixon
+<BR>v2.4/src/idl/cf_plot_rate.pro
+<BR>v2.4/src/fuv/fcal.c
+<BR>v2.4/src/fuv/cf_make_ttag_bkgd.c
+<BR>v2.4/include/calfuse.h v1.172
+
+<P>
+Modified cf_plot_rate.pro, fcal.c, and cf_make_ttag_bkgd.c to deal
+gracefully with zero-length exposures. Resulting spectral file has
+FLUX and ERROR arrays set to zero.
+
+<P>
+This is version 2.4.1 of the CalFUSE pipeline.
+
+<P>
+<hr WIDTH="100%">
+
+<p>May 19, 2003
+<br>Van Dixon
+<BR>v2.4/src/analysis/cf_combine.c
+<BR>v2.4/include/calfuse.h v1.171
+
+<P>
+Imported two of Jeff's modifications to cf_combine:
+<br>
+Close each input file in initial loop.
+Without this, cfitsio crashes upon opening the 60th file.
+<br>
+Weight each pixel by exposure time after excluding ``bad'' pixels.
+
+<P>
+<hr WIDTH="100%">
+
+<p>May 2, 2003
+<br>Van Dixon
+<BR>v2.4/src/analysis/cf_uninterp.c
+<BR>v2.4/include/calfuse.h v1.170
+
+<P>
+Added cf_uninterp.c to re-calibrate extracted spectra using only
+the most recent flux-calibration file.
+
+<P>
+This is version 2.4.0 of the CalFUSE pipeline.
+
+<P>
+<hr WIDTH="100%">
+
+<p>April 29, 2003
+<br>Van Dixon
+<BR>v2.3/src/fuv/cf_ttag_jitter.c
+<BR>v2.3/src/fuv/cf_hist_jitter.c
+<BR>v2.3/include/calfuse.h v1.169
+
+<P>
+Modified jitter routines to allow possiblity that jitter filename is in
+lower-case letters.
+
+<P>
+<hr WIDTH="100%">
+
+<p>April 25, 2003
+<br>Van Dixon
+<BR>v2.3/src/fuv/cf_fuv_init.c
+<BR>v2.3/include/calfuse.h v1.167, v1.168
+
+<P>
+In cf_fuv_init, never linearly extrapolate calibration files forward in
+time. If an observation is not bracketed by calibration files,
+simply use the latest one.
+
+<P>
+This is version 2.3.2 of the CalFUSE pipeline.
+
+<P>
+<hr WIDTH="100%">
+
+<p>April 16, 2003
+<br>Van Dixon
+<BR>v2.3/src/fuv/cf_fuv_init.c
+<BR>v2.3/include/calfuse.h v1.166
+
+<P>
+In cf_fuv_init, test for corrupted detector bias values. Updated
+comment field of HV_FLAG. Modified associated warning messages.
+
+<P>
+This is version 2.3.1 of the CalFUSE pipeline.
+
+<P>
+<hr WIDTH="100%">
+
+<p>April 15, 2003
+<br>Van Dixon
+<BR>v2.3/src/fuv/cf_ttag_screen.c
+<BR>v2.3/include/calfuse.h v1.165, v1.166
+
+<P>
+Test only first letter of scrn*.fit keyword DAYNIGHT in cf_ttag_screen.
+
+<P>
+<hr WIDTH="100%">
+
+<p>April 2, 2003
+<br>Van Dixon
+<BR>v2.3/src/fuv/cf_ttag_geodopp.c
+<BR>v2.3/src/fuv/cf_ttag_jitter.c
+<BR>v2.3/include/calfuse.h v1.164
+
+<P>
+Simplified DX/DY test in cf_ttag_geodopp. Test that TRKFLG is <= 5
+(the highest allowed value) in cf_ttag_jitter.
+
+<P>
+<hr WIDTH="100%">
+
+<p>April 2, 2003
+<br>Van Dixon
+<BR>v2.3/src/fuv/cf_ttag_geodopp.c
+<BR>v2.3/include/calfuse.h v1.163
+
+<P>
+Test DX and DY values to make sure they are valid before combining
+into mean Doppler shift. NaN values lead to bad-pixels masks full
+of zeros, which lead to empty extracted spectra.
+
+<P>
+<hr WIDTH="100%">
+
+<p>March 10, 2003
+<br>Van Dixon
+<BR>v2.3/src/fuv/cf_ttag_geodopp.c
+<BR>v2.3/include/calfuse.h v1.162
+
+<P>
+Alain Lecavelier points out that, for high-count-rate TTAG data, the
+pipeline produces error bars that are about half of what one would
+expect from SQRT(N) statistics. Turns out that the change that I made
+to cf_ttag_geodopp in March 2002 was in error. I returned the code to
+its previous state, and the error bars are now much better behaved.
+Error bars for histogram data are unaffected by this change.
+
+<P>
+This is version 2.3.0 of the CalFUSE pipeline.
+
+<P>
+<hr WIDTH="100%">
+
+<p>February 24, 2003
+<br>Van Dixon
+<BR>v2.2/src/fuv/cf_make_ttag_bkgd.c
+<BR>v2.2/src/fuv/cf_make_hist_bkgd.c
+<BR>v2.2/include/calfuse.h v1.161
+
+<P>
+Peter Young's Dec Alpha compiler identified a bug in these routines.
+EXPNIGHT is stored in the header as type LONG, but these routines read
+it as type FLOAT. CFITSIO should make the conversion automatically,
+but apparently fails to do so on his machine. I've modified the calls
+to FITS_read_key() in both routines.
+<P>
+<font color=red>This is the release version of CalFUSE v2.2.3.</font>
+
+<P>
+<hr WIDTH="100%">
+
+<p>February 20, 2003
+<br>Van Dixon
+<BR>v2.2/src/libcf/read_tle.c
+<BR>v2.2/src/libcf/sgp4.c
+<BR>v2.2/src/fuv/cf_ttag_jitter.c
+<BR>v2.2/src/fuv/cf_make_ttag_bkgd.c
+<BR>v2.2/src/fuv/cf_extract.c
+<BR>v2.2/src/fuv/cf_driftcorr2.c
+<BR>v2.2/src/fuv/cf_coadd.c
+<BR>v2.2/src/analysis/ttag_combine.c
+<BR>v2.2/include/calfuse.h v1.160
+
+<P>
+Peter Young's Dec Alpha compiler identified two sets of bugs in these routines.
+Several calls to FITS_read_key() or FITS_update_key() used an ampersand incorrectly:
+<br>
+FITS_read_key(fptr, TSTRING, "INSTRUME", &instrument, comment, &status);
+<br>
+and a few routines used abs() when fabs() is required.
+<P>
+P.Y.'s compiler refused to recognize one of the #define keywords in
+sgp4.c, so Bryce Roberts replaced it with the actual value throughout
+the routine.
+
+<P>
+<hr WIDTH="100%">
+
+<p>December 13, 2002
+<br>Van Dixon
+<BR>v2.2/src/fuv/cf_ttag_screen.c
+<BR>v2.2/src/fuv/cf_hist_screen.c
+<BR>v2.2/src/fuv/cf_ttag_burst.c
+<BR>v2.2/src/fuv/cf_ttag_jitter.c
+<BR>v2.2/include/calfuse.h v1.159
+
+<P>
+Modify cf_ttag_screen and cf_hist_screen to write all EXP_* keywords as
+type long. Modify cf_ttag_burst and cf_ttag_jitter to pass through all
+photon events in the stim-pin regions, even during bad times. Have
+them add EXP_BRST and EXP_JITR to EXP_BAD, and write all as type long.
+
+<P>
+Updated CALFUSE version to 2.2.3.
+
+<P>
+<hr WIDTH="100%">
+
+<p>November 8, 2002
+<br>Van Dixon
+<BR>v2.2/src/fuv/cf_extract.c
+<BR>v2.2/include/calfuse.h v1.158
+
+<P>
+Modify cf_extract to write keyword SPECYCNT to outfits, not infits.
+
+<P>
+<hr WIDTH="100%">
+
+<p>November 6, 2002
+<br>Van Dixon
+<BR>v2.2/src/fuv/cf_hist_jitter.c
+<BR>v2.2/src/fuv/cf_ttag_jitter.c
+<BR>v2.2/include/calfuse.h v1.157
+
+<P>
+Make cf_hist_jitter and cf_ttag_jitter issue warning, but continue
+running, if keyword JIT_STAT is not found.
+
+<P>
+<hr WIDTH="100%">
+
+<p>November 1, 2002
+<br>Van Dixon
+<BR>v2.2/src/fuv/cf_hist_jitter.c
+<BR>v2.2/idl/cf_plot_hist_rate.pro
+<BR>v2.2/include/calfuse.h v1.156
+
+<P>
+Make cf_hist_jitter and cf_plot_hist_rate exit gracefully if jitter
+file not found.
+
+<P>
+<hr WIDTH="100%">
+
+<p>October 29, 2002
+<br>Van Dixon
+<BR>v2.2/src/analysis/cf_arith.c
+<BR>v2.2/src/analysis/cf_combine.c
+<BR>v2.2/include/calfuse.h v1.155
+
+<P>
+Corrected error in history lines of both routines.
+
+<P>
+<hr WIDTH="100%">
+
+<p>October 24, 2002
+<br>Van Dixon
+<BR>v2.2/src/fuv/Makefile
+<BR>v2.2/src/fuv/cf_make_hist_bkgd.c
+<BR>v2.2/include/calfuse.h v1.154
+
+<P>
+Add cf_hist_jitter to Makefiles.
+Remove unused variables in cf_make_ttag_bkgd.
+
+<P>
+<hr WIDTH="100%">
+
+<p>October 11, 2002
+<br>Van Dixon
+<BR>v2.2/src/fuv/cf_ttag_jitter.c
+<BR>v2.2/include/calfuse.h v1.153
+
+<P>
+Three changes to cf_ttag_jitter: Initialized nrej to 0, made program
+exit quietly if jitter file not found, and set all times to floats in
+test step, to correct bug whereby some photons were being erroneously
+rejected. Note that the program still rejects photons with times later
+than the end of the input good-time interval. This happens because the
+burst-correction routine converts the GTI boundaries to integers.
+
+<P>
+Updated CALFUSE version to 2.2.2.
+
+<P>
+<hr WIDTH="100%">
+
+<p>August 29, 2002
+<br>Van Dixon
+<BR>v2.2/src/fuv/cf_hist_init.c
+<BR>v2.2/src/fuv/cf_ttag_init.c
+<BR>v2.2/include/calfuse.h v1.152
+
+<P>
+The initialization routines now exit with an error if NEVENTS = 0.
+
+<P>
+<hr WIDTH="100%">
+
+<p>August 28, 2002
+<br>Van Dixon
+<BR>v2.2/src/fuv/cf_hist_jitter.c
+<BR>v2.2/src/libcf/cf_fcal.c
+<BR>v2.2/idl/cf_plot_hist_rate.pro
+<BR>v2.2/include/calfuse.h v1.151
+
+<P>
+cf_hist_jitter reads the jitter file, determines how much time (if any)
+the target spent out of the aperture, and writes this number to the
+keyword EXP_JITR. cf_fcal subtracts this value from EXPTIME when
+flux-calibrating the spectrum. The IDL procedure cf_plot_hist_rate.pro
+plots the count rate during a histogram exposure using counter values
+from the housekeeping file.
+
+<P>
+Updated CALFUSE version to 2.2.1.
+
+<P>
+<hr WIDTH="100%">
+
+<p>July 31, 2002
+<br>Van Dixon
+<BR>v2.2/src/fuv/cf_hist_count_map.c
+<BR>v2.2/src/fuv/cf_ttag_count_map.c
+<BR>v2.2/src/fuv/cf_ttag_gain_map.c
+<BR>v2.2/src/fuv/cf_make_ttag_bkgd.c
+<BR>v2.2/src/fuv/cf_ttag_jitter.c
+<BR>v2.2/src/fuv/cf_update_qual.c
+<BR>v2.2/src/libcf/cf_fuv_init.c
+<BR>v2.2/include/calfuse.h v1.150
+
+<P>
+The SDP group decided that CalFUSE 3.0 should use a radically different
+scheme for processing time-tagged data. In the mean time, we have made
+incremental progress on CalFUSE v2, and we have decided that this
+version of the program should go behind the firewall as soon as
+possible. Accordingly, I copied v2.1.7 to v2.2.0 and have continuued
+to make incremental changes to the code. Highlights are
+
+<P>
+Modify cf_hist_count_map, cf_ttag_count_map, cf_ttag_gain_map, and
+cf_update_qual to read version 002 YSTR files.
+<BR>
+Correct a Linux bug in cf_make_ttag_bkgd.
+<BR>
+Add cf_ttag_jitter and modify cf_fuv_init to support it.
+
+<P>
+Updated CALFUSE version to 2.2.0.
+<P>
+<font color=red>This version of CalFUSE will go behind the firewall on
+1 August 2002.</font>
+
+<P>
+<hr WIDTH="100%">
+
+<p>June 14, 2002
+<br>Van Dixon
+<BR>v2.1/src/fuv/cf_make_ttag_bkgd.c
+<BR>v2.1/include/calfuse.h v1.149
+
+<p>
+Moved v1.16 of cf_make_ttag_bkgd back to CalFUSE v2.1.
+<P>
+Updated CALFUSE version to 2.1.7.
+
+<hr WIDTH="100%">
+
+<p>June 14, 2002
+<br>Van Dixon
+<BR>cf_make_ttag_bkgd.c
+<BR>cf_undistort.c
+<BR>cf_driftcorr.c
+<BR>cf_extract.c
+<BR>cf_dpix.c
+<BR>cf_ttag_screen.c
+<BR>cf_hist_dopp.c
+<BR>cf_wcal.c
+<BR>cf_doppler_util.c
+<BR>calfuse.h v1.151
+
+<br>
+<p>
+In cf_make_ttag_bkgd, correct error when using MKBK_COR=OMIT (1.15) and
+fill in holes made by the removal of geocoronal lines. The latter is
+needed in determination of X variations of scattered light. Re-wrote
+cf_undistort to handle shifts as floats. Modified cf_driftcorr to
+write output as an array of shorts. Modified cf_extract, cf_dpix to
+read linear wavelength scale. Modified read_wavelengths in
+cf_doppler_util and calls to it in cf_ttag_screen and cf_hist_dopp.
+Modified cf_wcal to implement linear wavelength solution.
+<P>
+Updated CALFUSE version to 3.0.1.
+
+<hr WIDTH="100%">
+
+<p>May 30, 2002
+<br>Van Dixon
+<BR>cf_doppler_util.c
+<BR>cf_ttag_screen.c
+<BR>cf_hist_dopp.c
+<BR>cf_dpix.c
+<BR>cf_extract.c
+<BR>calfuse.h v1.150
+
+<br>
+<p>
+In cf_doppler_util, modified read_wavelength no longer to generate and
+return an xpix array, then modified the calling routines cf_ttag_screen
+and cf_hist_dopp accordingly. Modified cf_dpix and cf_extract to
+handle the linear wavelength scale.
+
+<hr WIDTH="100%">
+
+<p>May 29, 2002
+<br>Van Dixon
+<BR>cf_doppler_util.c
+<BR>cf_driftcorr.c
+<BR>cf_update_qual.c
+<BR>calfuse.h v1.149
+
+<br>
+<p>
+In cf_doppler_util, modified the subroutine read_wavelength to handle a
+linear wavelength scale. Installed Rich's new version of cf_driftcorr,
+which puts a correction for the count-rate dependent Y stretch into the
+DY image. Because we no longer need to correct the bad-pixel map for
+the Y stretch, I moved back from v1.8 to v1.5 of cf_update_qual.
+
+<hr WIDTH="100%">
+
+<p>May 21, 2002
+<br>Van Dixon
+<BR>cf_dpix
+<BR>calfuse.h v1.148
+
+<br>
+<p>
+Fixed a couple of bugs in cf_dpix: made LWRS the default aperture and
+allowed the boundary between the SiC and LiF regions to vary with
+detector.
+<p>
+Made this change to both v2.1 and v3.0.
+
+<hr WIDTH="100%">
+
+<p>May 17, 2002
+<br>Van Dixon
+<BR>cf_dtcorr
+<BR>cf_undistort
+<BR>cf_wcal
+<BR>calfuse.h v1.147
+
+<br>
+<p>
+Updated #define keywords in cf_dtcorr. Turned on X-distortion
+correction in cf_undistort and moved it to follow cf_driftcorr2.
+Implemented linear wavelength scale in cf_wcal.
+<p>
+Updated CALFUSE version to 3.0.0.
+
+<hr WIDTH="100%">
+
+<p>May 14, 2002
+<br>Van Dixon
+<BR>cf_make_ttag_bkgd
+<BR>cf_make_hist_bkgd
+<BR>calfuse.h v1.146
+
+<br>
+<p>
+Teach background modules to read compressed background-calibration files.
+<P>
+<font color=red>This is the release version of CalFUSE v2.1.</font>
+
+<hr WIDTH="100%">
+
+<p>April 16, 2002
+<br>Van Dixon
+<BR>cal_fuse_exp_ttag.csh
+<BR>cal_fuse_exp_hist.csh
+<BR>calfuse.h v1.145
+
+<br>
+<p>
+Remove cf_wormcorr from pipeline for now.
+<P>
+Updated CALFUSE version to 2.1.6.
+
+<hr WIDTH="100%">
+
+<p>April 8, 2002
+<br>Van Dixon
+<BR>cf_make_hist_bkgd
+<BR>cf_make_ttag_bkgd
+<BR>cf_ttag_burst
+<BR>bchr*001.fit
+<BR>scrn*013.fit
+<BR>calfuse.h v1.144
+
+<br>
+<p>
+New software from Rich: New BCHR (background characterization) files
+contain the binary extensions that used to be in the SCRN files.
+Pipeline modules were modified to read the new files.
+<P>
+Updated CALFUSE version to 2.1.5.
+
+<hr WIDTH="100%">
+
+<p>March 29, 2002
+<br>Van Dixon
+<BR>cf_make_ttag_bkgd
+<BR>cf_ttag_burst
+<BR>bkgd*005.fit
+<BR>bkgd*006.fit
+<BR>bkgd*007.fit
+<BR>bkgd*008.fit
+<BR>scrn*012.fit
+<BR>calfuse.h v1.143
+
+<br>
+<p>
+New software from Rich: The burst module has been modified to update
+the EXPNIGHT value. The background module has a new procedure for
+determining the intrinsic background from the data. The background
+files should do a better job at short wavelengths. The screening files
+redefine the background sample regions and add a few more geocoronal
+line positions.
+<P>
+Updated CALFUSE version to 2.1.4.
+
+<hr WIDTH="100%">
+
+<p>March 17, 2002
+<br>Van Dixon
+<BR>cf_make_ttag_bkgd
+<BR>cf_make_hist_bkgd
+<BR>cf_ttag_geodopp
+<BR>cf_hist_geodopp
+<BR>calfuse.h v1.142
+
+<br>
+<p>
+Turns out that all of these programs were treating the error arrays as
+sigmas rather than variances (sigma squared). Modified to propagate
+errors correctly.
+
+<P>
+Updated CALFUSE version to 2.1.3.
+
+<hr WIDTH="100%">
+
+<p>February 22, 2002
+<br>Van Dixon
+<BR>cf_fuv_init
+<BR>ttag_combine
+<BR>cf_dtcor
+<BR>calfuse.h v1.141
+
+<br>
+<p>
+Introduced new keyword, RAWTIME, which is equal to EXPTIME before
+CalFUSE starts tossing out data. Modified cf_fuv_init and ttag_combine
+to propagate it correctly.
+<p>
+Modified cf_dtcor to determine exposure time from the keywords CTIME_B
+and CTIME_E, which are the times of the initial and final engineering
+packets from which the counter data were taken.
+<P>
+Updated CALFUSE version to 2.1.2.
+
+<hr WIDTH="100%">
+
+<p>February 15, 2002
+<br>Van Dixon
+<BR>calfuse.h v1.140
+
+<br>
+<p>
+Changed OPUS_VERSION to 2.5.
+
+<hr WIDTH="100%">
+
+<p>February 13, 2002
+<br>Van Dixon
+<BR>cf_fuv_init
+<BR>ttag_combine
+<BR>calfuse.h v1.139
+
+<br>
+<p>
+Modified logic of voltage test in cf_fuv_init. Add COMMENT lines
+to data file header if low voltage found. Respond gracefully if
+bias keywords do not exist.
+<p>
+Modified ttag_combine to respond gracefully if EXPNIGHT does not exist.
+
+<hr WIDTH="100%">
+
+<p>February 12, 2002
+<br>Van Dixon
+<BR>cf_fuv_init
+<BR>calfuse.h v1.138
+
+<br>
+<p>
+Modified cf_fuv_init to check detector voltage and complain if low.
+New volt***001.fit calibration files, VOLT_CAL keyword.
+<P>
+Updated CALFUSE version to 2.1.1.
+
+<hr WIDTH="100%">
+
+<p>January 25, 2002
+<br>Van Dixon
+<BR>cf_ttag_burst
+<BR>calfuse.h v1.137
+
+<br>
+<p>
+Modified cf_ttag_burst to write a list of bursts to an ASCII file.
+
+<hr WIDTH="100%">
+
+<p>January 15, 2002
+<br>Van Dixon
+<BR>ttag_combine
+<BR>calfuse.h v1.136
+
+<br>
+<p>
+Modified ttag_combine to update keyword EXPNIGHT in output file.
+
+<hr WIDTH="100%">
+
+<p>December 7, 2001
+<br>Van Dixon
+<BR>cf_update_qual
+<BR>calfuse.h v1.135
+
+<br>
+<p>
+Richard's new version of cf_update_qual modifies the bad-pixel maps to
+account for the count-rate dependence of the detector Y scale.
+
+<hr WIDTH="100%">
+
+<p>November 30, 2001
+<br>Van Dixon
+<BR>cf_dpix, cf_extract, cf_wormcorr, cf_optextract, cf_spexextract,
+cf_plot_extract.pro, cal_fuse_exp_ttag.csh, cal_fuse_exp_hist.csh,
+parm**007.fit
+<BR>calfuse.h v1.134
+
+<br>
+<p>
+In earlier versions of the pipeline, the shift to correct for FPA
+offsets was performed by cf_wcal. We have moved it earlier in the
+pipeline, right after the astigmatism correction, and combine the
+FPA corrections with the other shifts in order to have a single
+float-to-integer conversion. The new module is called cf_dpix.
+
+<p>
+cf_extract now reads the keyword RUN_OPTI, rather than OPT_EXTR, from
+the parameter file. It also writes the Y centroid of each spectrum to
+the corresponding output file header.
+
+<p>
+Sylvestre added software to identify the worm in the LiF 1B spectrum:
+cf_wormcorr reads the keyword RUN_WORM from the parameter file. If
+RUN_WORM = LIF, SIC, or BOTH, the program attempts to identify the
+region of the worm and write the range of affected pixels (WORM_BEG and
+WORM_END) to the output file header. The IDL routine
+cf_plot_extract.pro draws a ring around the worm, if found.
+
+<p> Modified cal_fuse_exp_ttag.csh and cal_fuse_exp_hist.csh to call
+both cf_dpix and cf_wormcorr. Modified calfuse.h to include new
+processing keywords DPIX_COR and WORM_COR.
+
+<hr WIDTH="100%">
+
+<p>November 27, 2001
+<br>Van Dixon
+<BR>cf_ttag_screen
+<BR>calfuse.h v1.133
+
+<br>
+<p>
+Changed the way that cf_ttag_screen treats user-defined good-time
+intervals. Now takes intersection of them with pre-defined intervals
+(from OPUS or cf_ttag_combine) before screening. Also changed the
+module to apply all screens (SAA, day/night, limb angle, pulse height)
+regardless of where the good-time intervals came from. Screening can
+be turned off by modifying the <tt>scrn*.fit</tt> files, if desired.
+
+<hr WIDTH="100%">
+
+<p>November 21, 2001
+<br>Van Dixon
+<BR>cf_update_qual
+<BR>calfuse.h v1.132
+
+<br>
+<p>
+Installed Rich's new QUAL files. Modified cf_update_qual to read them.
+
+<hr WIDTH="100%">
+
+<p>November 16, 2001
+<br>Van Dixon
+<BR>calfuse.h v1.131
+
+<br>
+<p>
+Defined NO_PIXEL in calfuse.h. Used by geometric-distortion and
+extraction routines.
+
+<hr WIDTH="100%">
+
+<p>October 26, 2001
+<br>Van Dixon
+<BR>cf_dtcor
+<BR>calfuse.h v1.130
+
+<br>
+<p>
+Modified cf_dtcor to set counters to zero if values are too large to
+read as longs.
+
+<hr WIDTH="100%">
+
+<p>October 26, 2001
+<br>Van Dixon
+<BR>cf_fuv_init
+<BR>calfuse.h v1.129
+
+<br>
+<p>
+Modified cf_fuv_init to check header keyword OPUSVERS and complain if
+the data file was processed using an old version of OPUS.
+
+<hr WIDTH="100%">
+
+<p>October 10, 2001
+<br>Van Dixon
+<BR>cf_ttag_init
+<BR>calfuse.h v1.128
+
+<br>
+<p>
+Modified cf_ttag_init to reset the keywords SPECBINX, SPECBINY,
+SIA_TBL, and NUM_HIST without checking their current value.
+This code was moved from cf_ttag_image, where it had been
+commented out in April 2001.
+<p>
+Added keyword OPUS_VERSION to calfuse.h
+<p>
+Updated CALFUSE version to 2.1.0.
+
+<hr WIDTH="100%">
+
+<p>October 10, 2001
+<br>Van Dixon
+<BR>ttag_combine
+<BR>flux*008.fit
+<BR>calfuse.h v1.127
+
+<br>
+<p>
+Rich Robinson has made numerous upgrades to ttag_combine. Among other
+things, it can now handle the DX, DY and DNFLG columns added by
+cf_ttag_init.
+<p>
+Jeff Kruk has produced new flux-calibration files
+based on the latest wavelength calibration.
+<p>
+Updated CALFUSE version to 2.0.5.
+<font color=red>This is the release version of CalFUSE v2.0.</font>
+
+<hr WIDTH="100%">
+
+<p>October 2, 2001
+<br>Van Dixon
+<BR>wave*014.fit
+
+<br>
+<p>
+Don Lindler has produced new wavelength files appropriate for data that
+do NOT have the walk correction applied to their stim pins.
+They were created by taking the previous line locations and correcting
+them before fitting by:
+
+<pre>
+ xx = ((x-leftF)/(rightF-leftF))*(right1-left1)+left1
+ xcor = ((xx-left2)/(right2-left2))*(rightF-leftF)+leftF
+where:
+ left1,right1 are the measured STIM positions when the walk correction
+ was applied to the STIMs
+ left2,right2 are the measured STIM positions when the walk correction
+ was not applied to the STIMs
+ leftF, rightF - are the FARF STIM positions
+ x - is the measured x position in the spectra that had the walk
+ correction applied to the STIMs
+ xcor is the corrected x position that would be expected if the walk
+ correction was not applied to the STIMs
+</pre>
+
+<hr WIDTH="100%">
+
+<p>September 21, 2001
+<br>Van Dixon
+<BR>scrn*010.fit
+
+<br>
+<p>
+Version 008 had new PHA limits. Version 009 had new information for
+background models. Version 010 has both.
+
+<hr WIDTH="100%">
+
+<p>September 17, 2001
+<br>Van Dixon
+<br>calfuse.h 1.126
+<BR>cf_make_ttag_bkgd
+
+<br>
+<p>
+New version of background routine reads the keyword BKGDTYPE in the
+screening file. Default value is 1; if set to -1, routine does not
+perform an iterative fit to the observed scattered light.
+<P>
+Installed new wavelength calibration files, v013, which are corrected
+for the motion of the stim pins due to walk correction in previous
+versions of the pipeline.
+<P>
+Updated CALFUSE version to 2.0.4.
+
+<hr WIDTH="100%">
+
+<p>September 11, 2001
+<br>Van Dixon
+<br>calfuse.h 1.125
+<BR>cf_ttag_walk
+<BR>cf_hist_walk
+
+<br>
+<p>
+Don't apply walk correction to photons/pixels within STIM_PAD (512)
+pixels of the detector edge. New walk-correction files (v003) have
+zeros in the stim-pin region.
+
+<hr WIDTH="100%">
+
+<p>September 5, 2001
+<br>Van Dixon
+<br>calfuse.h 1.124
+<BR>cf_make_ttag_bkgd
+<BR>cf_extract
+
+<br>
+<p>
+If MKBK_COR is set to OMIT, cf_make_ttag_bkgd changes it to SKIPPED.
+cf_extract copies the keyword OPT_EXTR into the FITS file headers.
+
+<hr WIDTH="100%">
+
+<p>August 30, 2001
+<br>Van Dixon
+<br>calfuse.h 1.123
+<BR>cf_make_ttag_bkgd
+
+<br>
+<p>
+New cf_make_ttag_bkgd iteratively fits dark-count and scattered-light
+components of the background to deal with the fact that the dark count
+varies with time. Spits out a file filled with zeros if MKBK_COR
+is set to OMIT.
+<P>
+New wavelength calibration files. Updated CALFUSE version to 2.0.3.
+
+<hr WIDTH="100%">
+
+<p>August 23, 2001
+<br>Van Dixon
+<br>calfuse.h 1.122
+<br>cf_fuv_init
+<br>cf_ttag_burst
+<br>cf_ttag_walk
+<br>cf_hist_walk
+<br>cf_astig
+<BR>cf_make_hist_bkgd
+<BR>cf_make_ttag_bkgd
+<BR>cf_bkgd
+
+<br>
+<p>
+Replaced keyword TBURST with EXP_BRST in cf_ttag_burst.
+<p>
+Enable user to turn off the burst rejection, walk correction,
+background subtraction, or astigmatism correction by changing keywords
+in parm**006.fit. cf_fuv_init reads the PARM file and changes the
+appropriate keywords (e.g., BRST_COR) from PERFORM to OMIT. Subsequent
+pipeline steps check their keyword; if it is OMIT, they change the
+value to SKIPPED, issue a warning, and exit, copying input to output if
+appropriate. Updated CALFUSE version to 2.0.2.
+
+<hr WIDTH="100%">
+
+<p>August 21, 2001
+<br>Van Dixon
+<br>calfuse.h 1.121
+<br>cf_wcal
+<br>cf_fpa_pos
+<br>cf_ttag_init
+
+<br>
+<p>
+Moved cf_fpa_pos from cf_wcal to libcf. ttag_combine uses this routine
+to determine the FPA positions and complains if an FPA moves by more
+than 10 microns between exposures.
+
+<hr WIDTH="100%">
+
+<p>August 20, 2001
+<br>Van Dixon
+<br>calfuse.h 1.120
+<br>cf_ttag_init
+<br>cf_dtcor
+
+<br>
+<p>
+Header keywords SPECBINX and SPECBINY should be 1 for ttag data. An
+old version of OPUS set these to 0. Changed cf_ttag_init to update
+these parameters if it finds them equal to 0. Also updated cf_dtcor to
+use Dave Sahnow's new parameters for dead-time correction. Added a
+check: if DET_DEAD > 2.0, assume it's wrong and set to 1.0.
+
+<hr WIDTH="100%">
+
+<p>July 25, 2001
+<br>Van Dixon
+<br>calfuse.h 1.119
+<br>cf_astig.c
+
+<br>
+<p>
+New version of cf_astig employs Sylvester's cross-correlation routine
+to determine spectral centroids. New PHAM, WAVE, and FLUX files.
+Updated CALFUSE version to 2.0.1.
+<br><font color=red>This is the beta-test version of CalFUSE v2.0.</font>
+
+<hr WIDTH="100%">
+
+<p>July 2, 2001
+<br>Van Dixon
+<br>calfuse.h 1.118
+<br>cf_ttag_init.c
+<br>cf_ttag_screen.c
+<br>cf_ttag_burst.c
+<br>cf_make_ttag_bkgd.c
+<br>cf_make_hist_bkgd.c
+
+<br>
+<p>
+Implemented Richard's new background modeling routine, which
+independently computes the day- and night-time contributions to the
+scattered-light background. To do so, he adds an extra column, DNFLG,
+to all of the photon-event files. Package includes improvements
+to the burst-screening algorithm. Updated CALFUSE version to 2.0.0.
+
+<hr WIDTH="100%">
+
+<p>June 29, 2001
+<br>Van Dixon
+<br>calfuse.h 1.114
+<br>lsrd_vel.c
+<br>lsrk_vel.c
+
+<br>
+<p>
+Changed sign returned by the LSR correction subroutines to conform with
+astronomical standard. Updated CALFUSE version to 1.9.9
+
+<hr WIDTH="100%">
+
+<p>June 19, 2001
+<br>Jeff Kruk
+<br>helio_vel.c
+<p>
+Alex Fullerton determined that we have been applying the heliocentric
+velocity correction with the wrong sign. The orbital dopper correction
+has been applied with the correct sign. The function helio_vel.c
+inverts the sign returned by the SLALIB routines, so the simplest
+correction is to remove this sign inversion.
+
+<hr WIDTH="100%">
+
+<p>April 10, 2001
+<br>Van Dixon
+<br>calfuse.h 1.111
+<br>cf_hist_walk.c 1.1
+<br>cal_fuse_exp_hist.csh
+
+<br>
+<p>
+Installed new module to apply walk correction to histogram data.
+Modified shell script cal_fuse_exp_hist.csh to call this routine.
+Added PHAM entry to CALIBRATION_FILE_KEYS in calfuse.h. Updated
+CALFUSE version to 1.9.8
+
+<hr WIDTH="100%">
+
+<p>April 2, 2001
+<br>Van Dixon
+<br>calfuse.h 1.110
+<br>cf_ttag_walk.c 1.1
+<br>cal_fuse_exp_ttag.csh
+<br>cal_fuse_exp_hist.csh
+
+<br>
+<p>
+Installed new module to apply walk correction. Modified shell
+scripts cal_fuse_exp_ttag.csh and cal_fuse_exp_hist.csh to call this
+routine. Added WALK entry to CALIBRATION_FILE_KEYS in calfuse.h.
+Updated CALFUSE version to 1.9.7
+
+<hr WIDTH="100%">
+
+<p>March 28, 2001
+<br>Van Dixon
+<br>calfuse.h 1.109
+<br>cf_extract.c 1.52
+<br>cal_fuse_exp_ttag.csh
+<br>cal_fuse_exp_hist.csh
+
+<br>
+<p>
+Installed new module to perform optimal extraction. Modified shell
+scripts cal_fuse_exp_ttag.csh and cal_fuse_exp_hist.csh to call this
+routine. In calfuse.h, added definition of cf_optextract and new
+arguments to cf_spextract. Updated CALFUSE version to 1.9.6
+
+<hr WIDTH="100%">
+
+<p>March 27, 2001
+<br>Van Dixon
+<br>calfuse.h 1.108
+<br>cf_make_bkgd.c 1.22
+<br>cal_fuse_exp_ttag.csh
+<br>cal_fuse_exp_hist.csh
+
+<br>
+<p>
+Installed new module to scale background calibration file. Modified
+shell scripts cal_fuse_exp_ttag.csh and cal_fuse_exp_hist.csh to call
+this routine (instead of cf_make_bkgd_temp). Add AIRG entry to
+CALIBRATION_FILE_KEYS in calfuse.h. Updated CALFUSE version to 1.9.5
+
+<hr>
+
+<p>March 19, 2001
+<br>Van Dixon
+<br>calfuse.h 1.107
+<br>cf_ttag_burst.c 1.9
+<br>cal_fuse_exp_ttag.csh
+<br>cal_fuse_exp_hist.csh
+
+<br>
+<p>
+Installed new module to reject data during detector bursts. Modified
+shell scripts cal_fuse_exp_ttag.csh and cal_fuse_exp_hist.csh to call
+this routine. Modified Makefiles to install it. Updated CALFUSE
+version to 1.9.4
+
+<hr>
+<p>March 14, 2001
+<br>Van Dixon
+<br>calfuse.h 1.106
+<br>cf_astig.c 1.8
+<br>cal_fuse_exp_ttag.csh
+<br>cal_fuse_exp_hist.csh
+
+<br>
+<p>
+Installed new program to implement astigmatism correction, now called cf_astig.
+Modified shell scripts cal_fuse_exp_ttag.csh and cal_fuse_exp_hist.csh to call
+this routine. Modified Makefiles to install it.
+Updated CALFUSE version to 1.9.3
+
+<hr>
+<p>February 9, 2001
+<br>Jeff Kruk
+<br>calfuse.h 1.105
+<br>cf_ttag_screen.c 1.55
+
+<br>
+<p>
+Add checks to cf_ttag_screen.c to ensure that user-defined good time intervals
+actually fit within the time spanned by the dataset, and that in each case the
+end of a good time interval is later than the beginning. Invalid user GTI's
+are ignored. Also added printout to trailer file of the number of events that
+were rejected by pulse height limits. Updated CALFUSE version to 1.9.2
+
+<hr>
+<p>February 8, 2001
+<br>J.C. Hsu
+<br>calfuse.h 1.104
+<br>cf_linear.c 1.0
+<br>cf_transform1d.c 1.0
+<br>cf_1dff.c 1.0
+<br>cf_make_1dff.c 1.0
+
+<br>
+<p>
+Install programs needed to perform 1-D flat fielding. All Makefiles updated.
+The "official" pipeline shell scripts were not updated; users wishing to try
+the 1-D flatfields should edit their local copies of the shell scripts for
+the time being. Thus, the pipeline version was not updated.
+
+<hr>
+<p>December 21, 2000
+<br>Paul Barrett, J.C. Hsu
+<br>Makefile.Alpha
+<br>cf_ttag_screen.c 1.54
+<br>cf_ttag_image.c 1.22
+<br>cf_ttag_init.c 1.16
+<br>cf_wcal.c 1.25
+
+<br>
+<p>
+In response to problems encountered by Vincent LeBrun installing
+calfuse on a DEC Alpha running True64, we made a number of changes.
+The main one was to correct type mismatches in cfitsio calls:
+in a number of cases an "int" variable was referenced as TLONG and vice versa.
+Added -ieee flag to compiler options in Makefile.Alpha.
+cf_ttag_image: fix type mismatches in cfitsio calls
+cf_ttag_init: fix type mismatches in cfitsio calls
+cf_ttag_screen: fix type mismatches in cfitsio calls
+cf_wcal: fix type mismatches in cfitsio calls
+This is the first instance in which v1.9.1 differs from v1.8.7, and no
+change in functionality was involved, so the pipeline version was
+not updated.
+
+<hr>
+<p>November 15, 2000
+<br>Jeff Kruk
+<br>cf_make_ff_temp.c 1.6
+<br>cf_make_bkgd_temp.c 1.6
+<br>cf_ttag_screen.c 1.53
+
+<br>
+<p>
+Fixed typos in print statements in several routines.
+No change in functionality resulted, so the pipeline version number
+was not incremented.
+
+<hr>
+<p>October 19, 2000
+<br>Jeff Kruk
+<br>CALFUSE 1.9.1
+<br>calfuse.h 1.103
+
+<br>
+<p>
+Created CALFUSE version 1.9.1 as the new development version.
+calfuse.h was updated to reflect the new version number.
+
+<hr>
+<p>October 18, 2000
+<br>Martial Andre, Jeff Kruk
+<br>cf_extract.c 1.47
+<br>calfuse.h 1.102
+
+<br>
+<p>
+The image centroid (in Y) for extended sources is once again calculated
+including airglow lines. In many cases extended sources are very faint
+and the airglow will help locate the spectra. Extended sources will
+ordinarily fill the slits in the same manner as airglow, so the accuracy
+of the centroid calculation will not be adversely affected.
+<p>
+Changed CALFUSE version to 1.8.7.
+
+<hr>
+<p>October 13, 2000
+<br>Jeff Kruk
+<br>cf_ttag_screen.c 1.52
+<br>cf_extract.c 1.46
+<br>cf_fuv_init.c 1.9
+
+<br>
+<p>
+Three calls to FITS_read_key (infits, TSTRING, keyword, &arrayname,...) in the
+program cf_ttag_screen were modified to remove the extraneous ampersand.
+<p>
+One call to FITS_read_key (infits, TSTRING, keyword, &arrayname,...) in
+cf_extract.c was modified to remove the extraneous ampersand. Also
+fixed a bug in the test for the variable ystop_bis being out of limits.
+<p>
+CF_VER_NUM was brought up to date in cf_fuv_init.c
+
+<P>These changes are too small to update the version number of the pipeline.
+
+<hr>
+<p>October 2, 2000
+<br>Jeff Kruk, JC Hsu
+<br>cf_hist_dopp 1.25
+<br>calfuse.h 1.101
+<br>cal_fuse_exp_ttag.csh
+<br>cal_fuse_exp_hist.csh
+
+<br>
+<p>
+The program cf_hist_dopp was modified to incorporate corrections for
+grating thermal motion. The mean motion for the exposure is added to
+the doppler correction.
+<p>
+The shell script cal_fuse_exp_hist.csh was
+modified to call cf_make_shift and to pass the resulting shift file
+to cf_hist_dopp.
+<p>
+The include file calfuse.h was modified to include the function prototype
+for lif_sic_border() (see below), and to change the MKSH_COR
+histogram pipeline entry in CALIBRATION_STEP_KEYS to PERFORM.
+<p>
+The shell scripts cal_fuse_exp_ttag.csh and cal_fuse_exp_hist.csh were
+modified to test cfstat before calling the idlplot routines.
+
+<P>The pipeline version number was incremented to 1.8.6.
+
+<hr>
+<p>October 2, 2000
+<br>Jeff Kruk
+<br>cf_check_point 1.17
+<br>cf_hist_screen 1.21
+<br>cf_ttag_screen 1.51
+
+<br>
+<p>
+The programs cf_hist_screen and cf_ttag_screen were modified to
+update the keyword EXPNIGHT, newly created to provide the number of
+seconds of exposure time (after screening) that were obtained during
+the night side of the oribt. This keyword will be used by an upcoming
+version of cf_bkgd.
+<p>
+The function cf_check_point was modified to return a flag indicating
+whether the satellite was in daylight or night at the time being
+checked.
+
+<P>The pipeline version number was updated for an additional change made
+later in the day.
+
+<hr>
+<p>October 2, 2000
+<br>Jeff Kruk, JC Hsu
+<br>lif_sic_border() 1.00
+
+<br>
+<p>
+The function lif_sic_border() was extracted from cf_hist_dopp.c
+and make a function in libcf so that it would be available for
+the upcoming 1-D version of cf_ff. The libcf Makefiles were modified
+accordingly.
+
+<P>No change in functionality resulted, so no update to the pipeline
+version number was made.
+
+<hr>
+<p>October 2, 2000
+<br>Jeff Kruk
+<br>state_limb 1.08
+
+<br>
+<p>
+The function state_limb() was modified (v1.08) to include fortran
+function prototype wrappers for the new slalib calls introduced by
+the previous change (slaDcc2s, slaEvp, slaDranrm).
+
+<P>This change was solely for running Make on the distribution version
+of calfuse, so no update to the pipeline version number was made.
+
+<hr>
+<p>September 26, 2000
+<br>Martial Andre
+<br>state_limb 1.05, 1.06, 1.07
+<br>cf_check_point 1.16
+<br>cf_orbit 1.03
+<br>calfuse.h 1.98, 1.99, 1.100
+
+<br>
+<p>
+The function state_limb() was modified (v1.05) to calculate the limb angle
+constraint in the same way as is done by the mission planners:
+it checks if the limb itself is in daylight or night, rather than the
+old simplistic method of seeing if the satellite was in day or night.
+This required a modification to the call to state_limb.
+Versions 1.06, 1.07 of state_limb were to fix minor bugs.
+<p>
+The function cf_check_point (v1.16) and the program cf_orbit (v1.03) were
+modified to make use of this new limb angle constraint calculation.
+<p>
+The include file calfuse.h (v1.98, v1.99) was modified to provide the
+proper function prototype for the new versions of state_limb and
+cf_check_point.
+
+<P>These changes led to the increase in pipeline version number to 1.8.5
+(implemented by version 1.100 of calfuse.h).
+
+
+<hr>
+<p>September 18, 2000
+<br>Ed Murphy
+<br>Pipeline Distribution Version
+
+<br>
+<p>
+Ed Murphy & Paul Barrett produce distribution version of pipeline.
+Major change was to incorporate "makemake" files.
+
+<P>Update the version number of the pipeline to v1.8.4.
+
+<hr>
+<p>September 18, 2000
+<br>Ed Murphy
+<br>cf_astig2 1.07
+
+<br>
+<p>
+Ed made some change, not documented in the header.
+
+<P>Since this routine is still in testing, I have not updated the
+pipeline version number. The new version of cf_astig2.c is 1.07.
+
+
+<hr>
+<p>September 6, 2000
+<br>Jeff Kruk
+<br>cf_dtcor 1.18
+
+<br>
+<p>
+Jeff Kruk modified cf_dtcor.c to populate three new keywords
+in the FUV header:
+DEAD_DET Detector dead time factor
+DEAD_IDS IDS dead time factor
+DEAD_TOT Combined dead time factor
+
+New version of cf_dtcor.c is 1.18. He also changed sunmath.h to math.h.
+
+<P>These changes are too small to update the version number of the pipeline.
+
+<hr>
+<p>September 5, 2000
+<br>Ed Murphy
+<br>cf_astig2 1.06
+
+<br>
+<p>
+Modify cf_astig2 to get the calibration file from the ASTG_CAL keyword
+rather than being hardcoded.
+
+<P>Since this routine is still in testing, I have not update the
+pipeline version number. The new version of cf_astig2.c is 1.06.
+
+<hr>
+<p>August 25, 2000
+<br>Ed Murphy
+<br>cf_astig2 1.05
+
+<br>
+<p>
+Jeff Kruk found that cf_astig2 crashed on all segment 1B data. The
+routine lacked any boundary checking and was running off the bottom
+of the image when attempting to centroid the SiC spectrum. The
+centroiding routines have been updated to include boundary checking.
+
+<P>I also added the ability for the routine to check the number
+of arguments.
+
+<P>Since this routine is still in testing, I have not update the
+pipeline version number. The new version of cf_astig2.c is 1.05.
+
+<hr>
+<p>August 23, 2000
+<br>Martial Andre
+<br>cf_extract 1.44
+
+<br>
+<p>
+Martial fixed a bug in the initialization of column_sum that caused a
+fatal bus error.
+The change is too small to update the pipeline version number.
+<P>
+
+<hr>
+<p>August 18, 2000
+<br>Ed Murphy
+<br>cf_update_qual 1.03
+
+<br>
+<p>
+I added calls to cf_proc_check and cf_proc_update to cf_update_qual
+to rid the trailer files of the warnings concerning the QUAL_COR
+keyword. New version of cf_update_qual is 1.03. The change is too
+small to update the pipeline version number.
+<P>
+
+<hr>
+<p>August 14, 2000
+<br>Martial
+<br>cf_extract 1.43
+
+<br>
+<p>
+To avoid the centroid to be shifted close to the bright edge, the procedure should compute the size of
+the scanning window for each different channel (the changes done in version 1.41 were wrong!!!)
+<P>
+
+<hr>
+<p>August 13, 2000
+<br>Martial
+<br>cf_coadd 1.17
+
+<br>
+<p>
+Propagation of quality should have been done with float since the very beginning (now fixed).
+<P>
+
+<hr>
+<p>August 9, 2000
+<br>Martial
+<br>cf_extract 1.42
+
+<br>
+<p>
+Added a define statement to use sunmath only ifdef SOLARIS.
+<P>
+
+<hr>
+<p>July 26, 2000
+<br>J. C. Hsu, R. Robinson, Ed Murphy
+<br>cf_update_qual v1.02
+<br>cf_driftcorr2 v1.23
+
+<p>J. C. Hsu has written a program cf_update_qual to update the quality
+flags in the *_img.fit files after the drift correction has been
+determined. The FARF positions of the dead spots and edges of the detectors
+were determined by Rich Robinson and are in the qual*001.fit calibration
+files. The drift correction is used to correct for the strecth/shift
+in going from the FARF to the observed data frame.
+
+<p>When implementing cf_update_qual, Ed Murphy noticed that cf_driftcorr2
+was centroiding the stims incorrectly. The error arose because the
+algorithm was computing the stim centroid in a box that had an extent
+of +-256 in X. Since the stims are at pixel ~230 (on segment 1a) the
+centroiding box was including counts along the X=0 column, which
+skewed the centroid. In the particular observation that he used
+to test the routine (M999 flat field) the X=0 column was particularly
+bright due to the high count rates in a stim lamp observation. This
+problem probably does not effect most observations, since the X=0 column
+is normally much weaker. He also modified cf_driftcorr2 to use the
+FARF stim positions given in calfuse.h as opposed to the positions that
+were hard coded into the routine.
+<P>
+Ed Murphy created V1.8.3.
+
+<hr>
+<p>July 21, 2000
+<br>Martial
+<br>cf_extract 1.41
+
+<br>
+<p>
+Fixed bug of implementation of a pointer in im_centroid wich caused a bus error.
+<P>
+
+<hr>
+<p>June 27, 2000
+<br>Jeff Kruk
+<br>cf_dtcor v1.17
+
+<p>Jeff Kruk added an IDS dead time correction to the dead time correction
+routine cf_dtcor.c.
+
+<P>
+Ed Murphy created V1.8.2 and V1.7.8.
+
+<hr>
+<p>June 26, 2000
+<br>Martial
+<br>cf_coadd v1.15
+
+<p>Now the default resolution of the coadded spectra is 0.1 Angstrom. This way,
+we make sure that astronomers outside JHU don't use them for science purpose
+(since some of the channels are currently misaligned => artefacts). Note that
+the user is still free to have maximal resolution by tuning the arguments.
+
+<hr>
+<p>June 20, 2000
+<br>Ed Murphy
+<br>cf_ttag_screen 1.49, cf_hist_dopp v1.23
+<br>PR 41926
+
+<br>
+<p>
+Peter Young noticed that the Doppler shift in pixels for the SiC and
+LiF spectra on segment 1a were both in the same direction. Since the
+dispersions run in opposite directions, the two shifts should be opposite
+in sign. The DISPAPIX keyword in the wavelength calibration file records
+the average dispersion in Angstroms/pixel. It should be positive when
+the wavelength increases with increasing pixel number and it should be
+negative when the wavelength decreases with increasing pixel number
+(SiC1 and LiF2). However, I found that the DISPAPIX keyword was always
+positive in the recent versions of the wavelength calibration files.
+Therefore, for SiC1 and LiF2, the sign of the Doppler and heliocentric
+corrections are incorrect.
+
+<P>
+I have modified the code in cf_ttag_screen and cf_hist_dopp to read in
+the absolute value of DISPAPIX and compute the sign of the shift based
+on the aperture to which the photon belongs. The new version of
+cf_ttag_screen is 1.49 and the new version of cf_hist_dopp is 1.23.
+
+<P>
+I have also removed the flat-fielding step from the pipeline. Even
+though we do not have a flat-field file, we have been applying a flat
+field (filled with 1's) to the data so that we could incorporate a bad
+pixel mask. However, we are not stretching/shifting the flat field file
+(since it is all 1's) to match the data which means that the bad pixel
+mask does not line up with the data. J.C. Hsu is in the process of
+writing a new module to properly apply the bad pixel mask. However,
+the routine cf_ttag_geodopp.c still requires the _ff.fit file, so we
+must still run cf_make_ff_temp. This intermediate _ff.fit data file
+contains all 1's over the active area of the detectors, and 0's
+everywhere else. Since we are not running the cf_ff, the locations
+where the flat field is 0 are not being flagged as bad. This was
+causing cf_ttag_geodopp to report a lot of "Divide by zero in ffbuf"
+errors. For now, I have turned off the warning in cf_ttag_geodopp.
+
+<P>
+Ed Murphy created V1.8.1 and V1.7.7.
+
+<hr>
+<p>June 13, 2000
+<br>Martial
+<br>cf_extract 1.40
+<br>
+
+<br>
+<p>
+The algorithm of finding the centroid has been totally changed. Now the position
+of the spectrum is reached via a maximisation of the flux in the extraction window.
+Moreover, the airglows are systematically screened to center only on the source.
+
+<hr>
+<p>June 9, 2000
+<br>Martial
+<br>cf_extract 1.39
+
+<br>
+<p>
+Airglow screened while computing the centroid.
+<P>
+<hr>
+<p>June 9, 2000
+<br>Martial
+<br>cf_extract 1.38
+
+<br>
+<p>
+Major change to calculate the centroid. Center is reached for flux maximum.
+<P>
+<hr>
+<p>June 4, 2000
+<br>Martial
+<br>Version 7 of the extraction windows
+<br>
+
+<br>
+<p>
+The way the windows are calculated changed drastically. Using the parameter of the distortion
+correction, the shape of each window has been simplified (butterfly or trapeze) and the
+weigth files are filled with parabolic profiles (first approximation). For more details
+see /data1/fuse/calfuse/v1.8/src/cal/extraction_masks/README
+
+
+<hr>
+<p>May 24, 2000
+<br>Martial
+<br>cf_extract 1.37
+
+<br>
+<p>
+Added a define statement for the cpp and DEC
+<P>
+<hr>
+<br>
+<hr>
+<p>May 18, 2000
+<br>Jeff Kruk, Ed Murphy
+<br>cf_wcal 1.24
+
+<br>
+<p>
+Jeff Kruk upgraded cf_wcal to read either the new FPA keywords (FPASXPOS
+or FPALXPOS) or the old keywords (FP1SXPOS, FP1LXPOS, FP2SXPOS, or
+FP2LXPOS). New version is 1.24.
+<P>
+Ed Murphy created V1.8.0.
+
+
+<hr>
+<p>May 17, 2000
+<br>Jeff Kruk, Ed Murphy, Paul Barrett
+<br>CALFUSE v1.7.6
+
+<br>
+<p>
+Jeff Kruk has completed the new version of cf_dtcor.
+<P>
+Ed Murphy found and corrected a bug in cf_extract that prevented the
+SiC extraction windows from being reset to the default position if
+the centroid was more than EMAX_SIC pixels from the exptected position.
+<P>
+Paul Barret changed the interpolation algorithm back to a constant (to
+prevent ringing around the outside of the spectrum) and fixed a bug in
+that implementation.
+
+<hr>
+
+<p>May 12, 2000
+<br>Jeff Kruk, Paul Barrett
+<br>CALFUSE v1.7.5
+
+<br>
+<p>
+Jeff Kruk has modified cf_wcal.c (now version 1.23) to correct the
+wavelength scale for the position of the FPA.
+<P>
+Paul Barrett has produced new versions of the detector distortion
+files: geom*005.fit in /data1/fuse/calfuse/calfiles.
+
+<hr>
+
+<p>April 24, 2000
+<br>Ed Murphy
+<br>CALFUSE v1.7.4
+
+<br>
+<p>
+The pipeline can now generate a few diagnostic plots (using IDL) while
+it is running if the CF_IDLDIR environment variable is set to point to
+the location of the IDL programs. To set up the pipeline to make the
+plots, add the following to your .cshrc or .login file:<BR>
+setenv CF_IDLDIR '/data1/fuse/calfuse/current/idl/'
+<P>
+The plots are in GIF format so that they can, at some future time,
+be linked to the SDOG pages.
+<hr>
+<p>April 24, 2000
+<br>Ed Murphy
+<br>CALFUSE v1.7.4
+
+<br>
+<p>
+Development on V1.7.4 of the pipeline has been frozen. Only bug fixes
+will be made from now on. The current stable version of the pipeline
+now points to V1.7.4. You will need new calibration files, new
+parameter files, and a new master_calib_file.dat
+<P>
+Upgrades (besides those listed in previous messages) include:
+<ol>
+<li> Both the code (V1.7.*) and calibration files are now in the
+Flight Alignment Reference Frame. This means that the stretch and
+shift has been reduced from about 120 pixels in X to less than 10
+pixels in X.
+<li> Improved wavelength calibration from Don Lindler.
+<li> Improved flux calibration from Jeff Kruk.
+<li> Improved distortion correction from Paul Barrett.
+<li> The user now has the ability to scale the background by a simple
+scalar value when using pulse height screening. The value to scale
+the background is in the PHA_BKGD keyword in the screening parameter
+file.
+<li> The user now has the ability to limit the motion of the spectral
+extraction windows based on the pipeline determined centroid. If the
+difference between the expected and actual positions is larger than
+the limit, the pipeline defaults to the expected position. The limit
+is set using the EMAX_LIF and EMAX_SIC keywords in the parm**002.fit
+files.
+<li> The user now has the ability to ignore the pipeline determined
+centroid and place the extraction windows where ever they wish using
+the SPEX_SIC and SPEX_LIF keywords in the parm**002.fit files. Note
+that the maximum motion limit described above still applies.
+</ol>
+
+<hr WIDTH="100%">
+
+<p>March 24, 2000
+<br>Paul Barrett
+<br>CALFUSE v1.7.4
+<br>PR 41000
+<p>It has been suggested that a higher order interpolation scheme be used
+when expanding the binned histogram data, instead of the current constant
+interpolation scheme. A quadratic average interpolation algorithm has been
+implemented in cf_hist_init. This algorithm uses data from neighboring
+pixels to interpolate the data in binned pixles while conserving the total
+number of counts per binned pixel. This routine has been tested.
+<p>This modification to cf_hist_init will now allow histogram data to be
+used for determining distortion corrections by providing necessary spatial
+resolution.
+<hr WIDTH="100%">
+<p>March 7, 2000
+<br>Ed Murphy
+<br>CALFUSE V1.6.9 and V1.7.3
+<br>PR 40864
+
+<p STYLE="margin-bottom: 0in">In the SDOG report for P1320101 Jeff Kruk
+found that the pipeline seemed to be excessively screening out data that
+was near, but not violating, the night time limb angle limit. I found flawed
+logic in the limb angle check in cf_check_point.c that meant that the bright
+limb angle was always used regardless of the day/night flag. The problem
+has been corrected (cf_check_point.c now V1.15) and the routine has been
+tested.
+<br>
+<hr>
+<p>February 10, 2000
+<br>Ed Murphy
+<br>CALFUSE V1.6.8 and V1.7.2
+<br>PR 40661
+
+<p STYLE="margin-bottom: 0in">Bill Oegerle noticed that the pipeline was
+not subtracting the background from some recently processed datasets. The
+pipeline has been in this state since sometime around the end of December
+1999. I fixed the problem in both versions of the pipeline: new versions
+are V1.6.8 and V1.7.2
+<p>The problem was found in cf_make_bkgd_temp.c, which is a temporary module
+designed to read in the background calibration file and write it into the
+*ttagf_bkgd.fit file needed by the pipeline. The module does not stretch
+or shift the background image but does scale the background by the integration
+time. In the calibration file, the background image is composed of short
+integers with the value 1 everywhere. The keyword BSCALE gives the number
+of square cm per pixel, so that the file contains the number of counts
+per pixel per second. The original version of cf_make_bkgd_temp.c read
+in the calibration image and wrote it out directly, without converting
+the input image to floats. All it did was multiply BSCALE by the integration
+time, so that when cf_bkgd.c read in the file and scaled by BSCALE, the
+resulting image would be background counts per pixel for the full integration.
+<p>In late December 1999, it was decided to rewrite cf_make_bkgd_temp.c
+to rebin the data for histogram mode observations. In this case, the new
+routine read in the calibration file array (all 1), converted the background
+image to floats by applying BSCALE, rebinned the data (if necessary), and
+wrote out an array of floats. However, the header was copied from the input
+file, so the BSCALE keyword still remained even though the data had already
+been scaled as part of the routine. In addition, the step where BSCALE
+was multiplied by the integration time also remained in the new version.
+Therefore, when cf_bkgd.c read in the *ttagf_bkgd.fit intermediate file,
+it used the BSCALE keyword a second time. The result was that the subtracted
+background was about two orders of magnitude too small.
+<p>Because the pipeline now unbins the histogram data, we have reverted
+back to the original versions of the routines which do not rebin the data
+and do not suffer from this problem. The new version of cf_make_bkgd_temp.c
+is V1.4.&nbsp;
+<hr>
+<p>February 1, 2000
+<br>Ed Murphy
+<br>CALFUSE V1.6.7 and V1.7.1
+<br>PR 40541
+
+<p STYLE="margin-bottom: 0in">A few histogram data sets were crashing the
+pipeline becuause of a bad pixel value that was larger than 32767. This
+value was large enough that it would not fit into a short integer in the
+pipeline and cfitsio would return a data conversion error. Jim Rose has
+agreed to modify the OPUS pipeline to find pixel values larger than 32767
+and change them to the data fill value 21865. As seen below, the pipeline
+will convert the data fill value to 0.0 and change its quality flag to
+bad.
+<hr>
+<p>February 1, 2000
+<br>Ed Murphy
+<br>CALFUSE V1.6.7 and V1.7.1
+<br>PR 40544
+
+<p STYLE="margin-bottom: 0in">A number of histogram data sets have fill
+data in them (decimal 21865) which the pipeline was not filtering out.
+I have modifed v1.6.7 and v1.7.1 of the pipeline to check pixels for the
+fill data value. If the fill data value is found, it will replace the data
+with 0.0 and change the quality flag to bad.
+<hr>
+<p>January 31, 2000
+<br>Ed Murphy
+<br>CALFUSE V1.6.7 and V1.7.1
+<br>PR 40553
+
+<p STYLE="margin-bottom: 0in">Until now, the DATE keyword in the header
+was not modified by any of the modules in the pipeline, even though its
+comment stated that it was the "date the file was written." I have modified
+cf_proc_update.c to update the DATE keyword. Since cf_proc_update is called
+at the end of each module of the pipeline, the output files and all intermediate
+data products will now have accurate dates and times in the DATE keyword.
+This change was made to both V.1.6.7 and V1.7.1 of the pipeline.
+<hr>
+<p>January 24, 2000
+<br>Martial
+<br>CALFUSE V1.6 and V1.7
+
+<p STYLE="margin-bottom: 0in">CENTROIDING PROBLEMS FIXED :
+
+<p STYLE="margin-bottom: 0in">Until now, the cf_extract procedure was unable
+to perform a good centroiding in Y when very few counts were involved.
+Since we used the formula : Ycenter = (<font face="symbol">&aring;</font>
+Yi * nbcounts_i)/<font face="symbol">&aring;</font>nbcounts_i, where nbcounts_i
+is the total number of counts along the row i, the result was depending
+on the Y limits of the sum. For instance, if the upper limit equals infinity,
+the result is infinity (do not forget that the noise is different of 0).
+So, to use this formula, we need a first guess for the position of the
+center in order
+
+<p STYLE="margin-bottom: 0in">to choose a domain of calculation surrounding
+it. At present, this first guess is the maximum peak.
+<br>
+<hr>
+<p>January 21, 2000
+<br>Martial
+<br>CALFUSE V1.6 and V1.7
+
+<p STYLE="margin-bottom: 0in">The new extraction windows are now available
+(spex*005.fit). This is the first set of In Orbit Based Extraction Windows
+: all the apertures have the same window (based on 100 percent with LWRS).
+
+<p STYLE="margin-bottom: 0in">The associated weight files are also available
+(wgts*003.fit). Note that since the raw windows extracted from In Orbit
+Data are very noisy, I had to smooth and correct the geometrical distorsions
+, sometimes " by hand ".
+<br>&nbsp;
+<table BORDER CELLSPACING=3 CELLPADDING=4 >
+<caption><COL WIDTH=85><COL WIDTH=85><COL WIDTH=85><THEAD>
+<br></THEAD><TBODY>
+<br></TBODY></caption>
+
+<tr VALIGN=TOP>
+<th>Detector</th>
+
+<th>Data Used</th>
+
+<th>Notes</th>
+</tr>
+
+<tr VALIGN=TOP>
+<td>1A (LiF)</td>
+
+<td>/data2/fuse/CAL/M101/M1010201</td>
+
+<td>Good&nbsp;</td>
+</tr>
+
+<tr VALIGN=TOP>
+<td>1A (SiC)</td>
+
+<td>/data2/fuse/CAL/M103/M1030303</td>
+
+<td>Good&nbsp;</td>
+</tr>
+
+<tr VALIGN=TOP>
+<td>1B (LiF)</td>
+
+<td>/data2/fuse/CAL/M101/M1010201</td>
+
+<td>Corrected by hand : mirror transformation applied</td>
+</tr>
+
+<tr VALIGN=TOP>
+<td>1B (SiC)</td>
+
+<td>/data2/fuse/CAL/M103/M1030304</td>
+
+<td>Corrected by hand : linear regression for the narrow domain</td>
+</tr>
+
+<tr VALIGN=TOP>
+<td>2A (LiF)</td>
+
+<td>/data2/fuse/CAL/M101/M1010201</td>
+
+<td>Good</td>
+</tr>
+
+<tr VALIGN=TOP>
+<td>2A (SiC)</td>
+
+<td>/data2/fuse/CAL/M103/M1030304</td>
+
+<td>Good&nbsp;</td>
+</tr>
+
+<tr VALIGN=TOP>
+<td>2B (LiF)</td>
+
+<td>NOT AVAILABLE</td>
+
+<td>Here I didn't find a signal strong enough ... I used the old Ground
+Based Files + geometrical correction</td>
+</tr>
+
+<tr VALIGN=TOP>
+<td>2B (SiC)</td>
+
+<td>/data2/fuse/CAL/M103/M1030304</td>
+
+<td>Ground Based Files + geometrical correction</td>
+</tr>
+</table>
+
+<div STYLE="margin-bottom: 0in"></div>&nbsp;
+
+
+<p STYLE="margin-bottom: 0in">Note also that you can change the windows
+with "cf_modifwindows" wich apply an homothetic factor to the LiF channel
+and the SiC channel :
+
+<p STYLE="margin-bottom: 0in">>cf_modifwindows filename 0.8 (80% for LiF)
+0.9 (90% for SiC)
+<br>
+<hr>
+<br>&nbsp;
+<br>&nbsp;
+<br>&nbsp;
+<p>January 5, 2000
+<br>Ed Murphy
+<br>CALFUSE V1.6 and V1.7
+
+<p STYLE="margin-bottom: 0in">By popular demand, I have written a program
+to convert an ASCII file to the 1-D FITS extracted format that comes out
+of the pipeline. The program is called ascii2fits and is in the /usr/local/fusesw/calfuse/current/bin
+directory. The program takes 3 arguments: Calling sequence:ascii2fits ascii_file
+template_fits_file output_fits_file The ASCII file must have six columns:
+wavelength (float) flux (float) errors (float) quality flags (int) counts
+(float) errors on counts (float) The template FITS file is used to populate
+the header keywords. It can be any raw or pipeline processed file.
+<br>
+<hr>
+<p>January 03, 2000
+<br>Paul Barrett
+<br>CALFUSE V1.6.5
+
+<p STYLE="margin-bottom: 0in">Overlapping pixels are now averaged by cf_hist_geodopp.
+This is a temporary fix to minimize the effect on the spectrum due to a
+mis-match between the BARF and FARF, i.e. it removes the spikes from the
+spectrum.
+<br>
+<hr>
+<p>December 21, 1999
+<br>Ed Murphy
+<br>CALFUSE V1.7.1
+
+<p STYLE="margin-bottom: 0in">Version 1.7.1 of the pipeline is now in the
+FARF frame, however, the calibration files are not.
+<br>
+<hr>
+<p>December 21, 1999
+<br>Ed Murphy
+<br>CALFUSE V1.6.5
+
+<p STYLE="margin-bottom: 0in">The dead time correction step has been removed
+from the pipeline. The new version of pipeline is V1.6.5. The pipeline
+module itself was fine. However, Dave Sahnow has found that the on-board
+counters behave strangely at low count rates (in addition to behaving strangely
+in the SAA). Until this issue is resolved, we will not dead time correct
+the data.
+<br>
+<hr>
+<p>December 21, 1999
+<br>Ed Murphy
+<br>CALFUSE V1.6.4
+
+<p STYLE="margin-bottom: 0in">Histogram data currently show strong spikes
+approximately once per Angstrom. This behavior is not unexpected. It comes
+from the fact that we have to compress the image in the X direction by
+about 110 pixels in order to bring the data into the reference frame of
+the calibration files. Until we can redefine the calibration file reference
+frame and remake all our calibration files, this behavior will be present
+in the data.
+<br>
+<hr>
+<p>December 17, 1999
+<br>Ed Murphy
+<br>CALFUSE V1.6.4
+<p>Version 1.6.4 of the CALFUSE pipeline is now frozen. In the future,
+only bug fixes will occur. The /usr/local/fusesw/calfuse/current directory
+will now point to v1.6. All development will take place in v1.7.
+<p>Upgrades include:
+<ol>
+<div STYLE="margin-bottom: 0in">The histogram pipeline finally works. The
+histogram images are, for now, expanded out to 16384x1024 in size to avoid
+some of the binning problems we were encountering.</div>
+
+
+<p STYLE="margin-bottom: 0in">The spectral thermal shifts are now removed
+from the data using Kathy's algorithm. If you have a local copy of the
+calibration files, will need to copy the new version of master_calib_file.dat
+from /data1/fuse/calfuse/parmfiles and the new calibration file shft001.fit
+from /data1/fuse/calfuse/calfiles.
+
+<p STYLE="margin-bottom: 0in">In ttag data, the calculated centroid of
+the target aperture is used to offset all apertures to account for movememnt
+in the Y direction. In the past, each aperture was centroided and offset
+independently. However, because of the overlapping spectra on side 2, the
+HIRS aperture centroid often caused the HIRS extraction to contain significant
+flux from the LWRS aperture.
+<p>A large number of small items were taken care of (keyword updates, minor
+bug fixes, etc.).</ol>
+
+<div STYLE="margin-bottom: 0in">REMINDER: Many people directly reference
+"v1.5" rather than "current" in their PATH and LD_LIBRARY_PATH. If you
+do this, be sure to change both PATH and LD_LIBARARY_PATH to v1.6. Otherwise,
+you will be running the pipeline with outdated copies of the library routines
+since we are now using dynamically linked libraries (linked in at run time).</div>
+
+<br>
+<hr>
+ <address><a href="mailto:emurphy@pha.jhu.edu">Ed Murphy</a></address>
+<!-- Created: Fri Apr 28 15:14:57 EDT 2000 -->
+<!-- hhmts start -->
+Last modified: Monday, December 10 2001
+<!-- hhmts end -->
+ </body>
+</html>
diff --git a/idl/cf_obsplot.pro b/idl/cf_obsplot.pro
new file mode 100644
index 0000000..9a4c8c2
--- /dev/null
+++ b/idl/cf_obsplot.pro
@@ -0,0 +1,334 @@
+;+
+; cf_obsplot.pro reads the final, combined *00000all* spectral file
+; for a given observation and produces quick-look plots for
+; each of the four FUSE detectors. A fifth plot shows the
+; best three channels that span the regions 900-1000,
+; 1000-1100, and 1100-1200 A.
+;
+; Author: Ken Sembach
+; Last Update: February 23, 2001
+;
+; V. Dixon, 07/02/2001 - Modified for inclusion in pipeline.
+; V. Dixon, 08/16/2001 - Read and write to current directory.
+; V. Dixon, 08/31/2001 - Add a sixth plot spanning FUSE band.
+; Mark region of worm in LiF 1B.
+; V. Dixon, 11/05/2001 - Compute mean flux with 1-sig errors.
+; V. Dixon, 11/20/2001 - Modify position of mean-flux plots.
+; Add sentence describing error bars.
+; V. Dixon, 01/17/2002 - Deal gracefully with missing data.
+; V. Dixon, 03/12/2002 - Create .gif files if possible.
+; B. Godard, 04/26/2004 - Print units and CalFUSE Ver
+; Don't keep exposures with exptime=0
+; or quality array=0
+; Use quality array to compute min/max
+; V. Dixon, 05/04/2004 - Scale ymax by 1.1 in all plots.
+; Change output file names to match
+; MAST's expectations.
+; V. Dixon, 08/20/2004 - Change A to Angstroms at the bottom
+; of each page.
+; Exclude C III 977 when setting Y
+; scale.
+; V. Dixon, 04/14/2005 - Rewrite the program to use the new
+; *all* files produced by CalFUSE v3.1.
+; V. Dixon, 08/01/2005 - If IDL version > 6.0, generate GIF file.
+; V. Dixon, 03/21/2006 - If channel has no data, set mflux = -1.
+; Use "Exposure" or "Exposures" as
+; appropriate.
+; Consider all four channels for the
+; 1000-1100 A plot.
+; Pass xrange and yscale to TOP_PLOT
+; and BOTTOM_PLOT.
+; V. Dixon, 05/19/2006 - For BKGD targets, omit flux
+; comparison when selecting which
+; detector segments to use.
+; Compute mean flux using same wavelength
+; intervals for each band.
+; V. Dixon, 05/24/2006 - For PC targets, don't include O VI in
+; calculation of mean flux.
+; V. Dixon, 12/12/2006 - If OBSTIME < 10 s for preferred segment
+; and > 100 s for other segment, use other.
+; V. Dixon, 12/19/2006 - Use the same sample regions in all plots.
+; V. Dixon, 04/06/2007 - Comment out calls to set_plot,'X' and
+; CLEANPLOT, as they can cause problems
+; for OPUS.
+; V. Dixon, 04/11/2008 - If obstime < 1000, quote in seconds.
+; V. Dixon, 08/08/2008 - If airglow keyword is set, image files
+; are named *00900*
+;
+; Calling sequence: OBSPLOT, obsname
+;
+; Input: obsname (e.g., P1030604)
+; Output: obsname00000lif1ttagf.jpg, obsname00000lif2ttagf.jpg,
+; obsname00000sic1ttagf.jpg, obsname00000sic2ttagf.jpg,
+; obsname00000specttagf.jpg
+;
+;
+;-
+
+pro TOP_PLOT, data, header, xrange, yscale, aper, sample, mflux, title
+ s=sample
+ !x.range=xrange
+ obstime = SXPAR(header,'OBSTIME')
+ extname = SXPAR(header,'EXTNAME')
+ num_exp = SXPAR(header,'NSPEC')
+ if (num_exp eq 1) then exposures=' Exposure, ' else exposures=' Exposures, '
+ IF (obstime gt 0) THEN BEGIN
+ w = data.wave & f = data.flux
+ loc = WHERE(((w GT s[0]) AND (w LE s[1])) OR ((w GT s[2]) and (w LT s[3])) OR $
+ ((w GT s[4]) and (w LT s[5])))
+ ftmp = SMOOTH(f[loc],6) & nftmp = N_ELEMENTS(ftmp)
+ ymin = MIN(f[loc]) & ymax = MAX(ftmp)
+ ydiv = FIX(1-ALOG10(ymax))
+ ymax = yscale * ymax *10.^ydiv
+ !y.range=[ymin,ymax]
+ mflux = mean(f[loc])
+
+ if (obstime lt 1000) then time_str = STRING(round(obstime),'(I3)')+' sec)' else $
+ time_str = STRING(obstime/1000,'(F4.1)')+' ksec)'
+
+ PLOT,w,f*10.^ydiv,nsum=12,title=title,ytitle='Flux (10!u-'+STRTRIM(ydiv,2)+'!n)',xtitle=' '
+ XYOUTS,(!x.range[1]-!x.range[0])*0.5+!x.range[0],(!y.range[1]-!y.range[0])*0.88+!y.range[0], $
+ extname+' '+aper+' ('+STRTRIM(num_exp,2)+exposures+time_str,charsize=1.3,align=0.5
+ ENDIF ELSE BEGIN
+ !y.range=[0,1]
+ mflux = -1.
+ PLOT,[0,0],[0,0],title=title,ytitle='Flux',xtitle=' '
+ XYOUTS,(!x.range[1]-!x.range[0])*0.5+!x.range[0],0.88, $
+ extname+' '+aper+': No data found',charsize=1.5,align=0.5
+ ENDELSE
+ RETURN
+END
+
+pro BOTTOM_PLOT, data, header, xrange, yscale, aper, sample, mflux, vers
+ s=sample
+ !x.range=xrange
+ obstime = SXPAR(header,'OBSTIME')
+ extname = SXPAR(header,'EXTNAME')
+ num_exp = SXPAR(header,'NSPEC')
+ if (num_exp eq 1) then exposures=' Exposure, ' else exposures=' Exposures, '
+ IF (obstime gt 0) THEN BEGIN
+ w = data.wave & f = data.flux
+ loc = WHERE(((w GT s[0]) AND (w LE s[1])) OR ((w GT s[2]) AND (w LT s[3])) OR $
+ ((w GT s[4]) AND (w LT s[5])))
+ ftmp = SMOOTH(f(loc),6) & nftmp = N_ELEMENTS(ftmp)
+ ymin = MIN(f[loc]) & ymax = MAX(ftmp)
+ ydiv = FIX(1-ALOG10(ymax))
+ ymax = yscale * ymax *10.^ydiv
+ !y.range=[ymin,ymax]
+ mflux = mean(f[loc])
+
+ if (obstime lt 1000) then time_str = STRING(round(obstime),'(I3)')+' sec)' else $
+ time_str = STRING(obstime/1000,'(F4.1)')+' ksec)'
+
+ PLOT,w,f*10.^ydiv,nsum=12,title=' ',ytitle='Flux (10!u-'+STRTRIM(ydiv,2)+'!n)', $
+ xtitle='Wavelength ('+string("305B)+')',/noeras
+ XYOUTS,(!x.range[1]-!x.range[0])*0.5+!x.range[0],(!y.range[1]-!y.range[0])*0.88+!y.range[0], $
+ extname+' '+aper+' ('+STRTRIM(num_exp,2)+exposures+time_str, charsize=1.3,align=0.5
+ IF (STRCMP(extname,'1BLIF',5, /FOLD_CASE) EQ 1) THEN $
+ XYOUTS, 1160., (!y.range[1]-!y.range[0])*0.1+!y.range[0],'---- REGION OF WORM ----',align=0.5
+ ENDIF ELSE BEGIN
+ !y.range=[0,1]
+ mflux = -1.
+ PLOT,[0,0],[0,0],title=' ',ytitle='Flux', xtitle='Wavelength ('+string("305B)+')',/noeras
+ XYOUTS,(!x.range[1]-!x.range[0])*0.5+!x.range[0],0.88, $
+ extname+' '+aper+': No data found',charsize=1.5,align=0.5
+ ENDELSE
+ XYOUTS, 0.05, 0.01, 'Flux units are erg cm!E-2!N s!E-1!N '+string("305B)+'!E-1!N.', alignment=0., /NORMAL
+ XYOUTS, 0.95, 0.01, 'CalFUSE v'+vers, alignment=1., /NORMAL
+ RETURN
+END
+
+PRO CF_OBSPLOT, obsname, airglow=airglow
+
+ ver = float(!version.release)
+
+ if keyword_set(airglow) then fnumber = '00900' else fnumber = '00000'
+ list = FINDFILE(obsname+fnumber+'all*fcal.fit', COUNT=count)
+ lun = fxposit(list[0], 0, /SILENT)
+ foo = MRDFITS(lun,0,h,/SILENT)
+
+ root = SXPAR(h,'PRGRM_ID')+SXPAR(h,'TARG_ID')+SXPAR(h,'SCOBS_ID')
+ root = STRCOMPRESS(root, /REMOVE_ALL)
+ targ = STRCOMPRESS(SXPAR(h,'TARGNAME'), /REMOVE_ALL)
+ objclass = SXPAR(h,'OBJCLASS')
+ sp_type = STRCOMPRESS(SXPAR(h,'SP_TYPE'), /REMOVE_ALL)
+ src_type = STRCOMPRESS(SXPAR(h,'SRC_TYPE'), /REMOVE_ALL)
+ mode = STRLOWCASE(STRCOMPRESS(SXPAR(h,'INSTMODE'), /REMOVE_ALL))
+ aper = STRCOMPRESS(SXPAR(h,'APERTURE'), /REMOVE_ALL)
+ vers = STRCOMPRESS(SXPAR(h,'CF_VERS'), /REMOVE_ALL)
+ ext = '4'
+ IF aper EQ 'MDRS' THEN ext = '2'
+ IF aper EQ 'HIRS' THEN ext = '3'
+ if keyword_set(airglow) then title = ''+root+' [AIRGLOW]' else $
+ title = ''+root+' ['+targ+']'
+ if (src_type eq 'PE') then yscale = 1.0 else yscale = 1.3
+ if (objclass eq 7 or sp_type eq 'BKGD') then bkgd_obs = 1 else bkgd_obs = 0
+
+;
+; Read each channel and its header.
+;
+ L1A = mrdfits(lun,0,HL1A)
+ L1B = mrdfits(lun,0,HL1B)
+ L2B = mrdfits(lun,0,HL2B)
+ L2A = mrdfits(lun,0,HL2A)
+ S1A = mrdfits(lun,0,HS1A)
+ S1B = mrdfits(lun,0,HS1B)
+ S2B = mrdfits(lun,0,HS2B)
+ S2A = mrdfits(lun,0,HS2A)
+
+;
+; Use different sample regions for point and extended sources.
+;
+ S1B_SAMPLE = [912, 935, 955, 970, 980, 985]
+ S2A_SAMPLE = [912, 935, 955, 970, 980, 985]
+
+ if (src_type eq 'PC') then begin
+ L1A_SAMPLE = [0, 0, 0, 0, 1045, 1070]
+ S1A_SAMPLE = [0, 0, 0, 0, 1045, 1070]
+ L2B_SAMPLE = [0, 0, 0, 0, 1045, 1070]
+ S2B_SAMPLE = [0, 0, 0, 0, 1045, 1070]
+ endif else begin
+ L1A_SAMPLE = [0, 0, 1030, 1039, 1045, 1070]
+ S1A_SAMPLE = [0, 0, 1030, 1039, 1045, 1070]
+ L2B_SAMPLE = [0, 0, 1030, 1039, 1045, 1070]
+ S2B_SAMPLE = [0, 0, 1030, 1039, 1045, 1070]
+ endelse
+
+ L1B_SAMPLE = [1095, 1130, 1140, 1165, 1170, 1190]
+ L2A_SAMPLE = [1095, 1130, 1140, 1165, 1170, 1190]
+
+;
+; Plot individual channels. Skip this for airglow files.
+;
+ ;set_plot,'X'
+ ;CLEANPLOT
+ set_plot,'Z'
+ device,set_resolution=[650,580]
+
+ !x.style = 1 & !y.style = 1
+ !x.ticklen=0.045
+ !x.charsize=1.5
+ !y.charsize=1.5
+ !y.minor = 2
+ !p.title = ' '
+ !x.title = ' '
+ !y.title = ' '
+ !p.color = 0
+ !p.background = 255
+
+;
+; LiF 1A and 1B
+;
+ !p.position = [0.13,0.57,0.95,0.95]
+ TOP_PLOT, L1A, HL1A, [985,1085], yscale, aper, L1A_SAMPLE, FL1A, title
+
+ !p.position = [0.13,0.1,0.95,0.48]
+ BOTTOM_PLOT, L1B, HL1B, [1092,1190], yscale, aper, L1B_SAMPLE, FL1B, vers
+
+ if (ver ge 5.4 and ver le 6.0) then write_jpeg,root+fnumber+'lif1'+mode+'f.jpg',TVRD() $
+ else write_gif,root+fnumber+'lif1'+mode+'f.gif',TVRD()
+
+;
+; SiC 1A and 1B
+;
+ !p.position = [0.13,0.57,0.95,0.95]
+ TOP_PLOT, S1A, HS1A, [1000,1094], yscale, aper, S1A_SAMPLE, FS1A, title
+
+ !p.position = [0.13,0.1,0.95,0.48]
+ BOTTOM_PLOT, S1B, HS1B, [910,995], yscale, aper, S1B_SAMPLE, FS1B, vers
+
+ if (ver ge 5.4 and ver le 6.0) then write_jpeg,root+fnumber+'sic1'+mode+'f.jpg',TVRD() $
+ else write_gif,root+fnumber+'sic1'+mode+'f.gif',TVRD()
+
+;
+; LiF 2A and 2B
+;
+ !p.position = [0.13,0.57,0.95,0.95]
+ TOP_PLOT, L2A, HL2A, [1085,1185], yscale, aper, L2A_SAMPLE, FL2A, title
+
+ !p.position = [0.13,0.1,0.95,0.48]
+ BOTTOM_PLOT, L2B, HL2B, [975,1078], yscale, aper, L2B_SAMPLE, FL2B, vers
+
+ if (ver ge 5.4 and ver le 6.0) then write_jpeg,root+fnumber+'lif2'+mode+'f.jpg',TVRD() $
+ else write_gif,root+fnumber+'lif2'+mode+'f.gif',TVRD()
+
+;
+; SiC 2A and 2B
+;
+ !p.position = [0.13,0.57,0.95,0.95]
+ TOP_PLOT, S2A, HS2A, [913,1009], yscale, aper, S2A_SAMPLE, FS2A, title
+
+ !p.position = [0.13,0.1,0.95,0.48]
+ BOTTOM_PLOT, S2B, HS2B, [1013,1106], yscale, aper, S2B_SAMPLE, FS2B, vers
+
+ if (ver ge 5.4 and ver le 6.0) then write_jpeg,root+fnumber+'sic2'+mode+'f.jpg',TVRD() $
+ else write_gif,root+fnumber+'sic2'+mode+'f.gif',TVRD()
+
+;
+; Now plot combined fluxes
+;
+ ;set_plot,'X'
+ ;CLEANPLOT
+ set_plot,'Z'
+ device,set_resolution=[650,870]
+
+ !x.style = 1 & !y.style = 1
+ !x.ticklen=0.045
+ !x.charsize=1.5
+ !y.charsize=1.5
+ !y.minor = 2
+ !p.title = ' '
+ !x.title = ' '
+ !y.title = ' '
+ !p.color = 0
+ !p.background = 255
+
+;
+; 900 - 1000 A
+;
+ !p.position = [0.13,0.70,0.95,0.95]
+ obs2a = SXPAR(HS2A, 'OBSTIME')
+ obs1b = SXPAR(HS1B, 'OBSTIME')
+
+ if ((bkgd_obs eq 1 and FS2A gt -1) or (FS2A gt 0.9*FS1B) or (obs2a gt 100 and obs1b lt 10)) then begin
+ TOP_PLOT, S2A, HS2A, [913,1009], yscale, aper, S2A_SAMPLE, foo, title
+ endif else begin
+ TOP_PLOT, S1B, HS1B, [910,995], yscale, aper, S1B_SAMPLE, foo, title
+ endelse
+
+;
+; 1000 - 1100 A
+;
+ !p.noerase = 1
+ !p.position = [0.13,0.40,0.95,0.65]
+ obl1a = SXPAR(HL1A, 'OBSTIME')
+ obl2b = SXPAR(HL2B, 'OBSTIME')
+
+ if ((bkgd_obs eq 1 and FL1A gt -1) or $
+ ((FL1A gt 0.9*FL2B and FL1A gt 0.7*FS1A and FL1A gt 0.7*FS2B) $
+ and not (obl2b gt 100 and obl1a lt 10))) then $
+ TOP_PLOT, L1A, HL1A, [985,1085], yscale, aper, L1A_SAMPLE, foo, '' else $
+ if ((bkgd_obs eq 1 and FL2B gt -1) or $
+ ((FL2B gt 0.7*FS1A and FL2B gt 0.7*FS2B) and not (obl2b lt 10 and obl1a gt 100))) then $
+ TOP_PLOT, L2B, HL2B, [975,1078], yscale, aper, L2B_SAMPLE, foo, '' else $
+ if ((bkgd_obs eq 1 and FS1A gt -1) or ((FS1A gt FS2B) and not (obl1a lt 10 and obl2b gt 100))) then $
+ TOP_PLOT, S1A, HS1A, [1000,1094], yscale, aper, S1A_SAMPLE, foo, '' else $
+ TOP_PLOT, S2B, HS2B, [1013,1106], yscale, aper, S2B_SAMPLE, foo, ''
+
+;
+; 1100 - 1200 A
+;
+ !p.position = [0.13,0.1,0.95,0.35]
+ obl2a = SXPAR(HL2A, 'OBSTIME')
+ obl1b = SXPAR(HL1B, 'OBSTIME')
+
+ if ((bkgd_obs eq 1 and FL2A gt -1) or (FL2A gt 0.9*FL1B) or (obl2a gt 100 and obl1b lt 10)) then $
+ BOTTOM_PLOT, L2A, HL2A, [1085,1182], yscale, aper, L2A_SAMPLE, foo, vers else $
+ BOTTOM_PLOT, L1B, HL1B, [1092,1190], yscale, aper, L1B_SAMPLE, foo, vers
+
+ if (ver ge 5.4 and ver le 6.0) then write_jpeg,root+fnumber+'spec'+mode+'f.jpg',TVRD() $
+ else write_gif,root+fnumber+'spec'+mode+'f.gif',TVRD()
+
+ RETURN
+END
+
diff --git a/idl/cf_plot_extract3.pro b/idl/cf_plot_extract3.pro
new file mode 100644
index 0000000..c201754
--- /dev/null
+++ b/idl/cf_plot_extract3.pro
@@ -0,0 +1,210 @@
+;+
+; cf_plot_extract3.pro is a procedure to plot the extraction windows over a
+; greyscale image for a given IDF to a standard image file.
+;
+; Author: Edward M. Murphy
+; Written: 1999 November 24
+;
+; Calling sequence: cf_plot_extract3, rootname
+;
+; Inputs: rootname will have 'idf.fit' added to it.
+;
+; 02/12/03 jch: Adapt from cf_plot_extract.pro to work for CalFUSE 3.0.
+; 03/10/03 wvd: Silence calls to mrdfits. Simplify image construction.
+; 04/08/03 wvd: Shift apertures in X to match FPA positions.
+; 06/02/03 wvd: Don't plot non-target apertures in HIST mode.
+; 10/10/03 wvd: Exclude photons from bad times and those outside PHA limits.
+; 12/09/03 wvd: Use extended apertures when appropriate.
+; 02/26/04 wvd: Use strcmp to compare strings.
+; 05/03/04 wvd: In HIST mode, don't plot non-target apertures.
+; Read expected spectral centroid from CHID_CAL file header.
+; 05/14/04 wvd: Don't use strcmp to compare strings.
+; Modify boundaries between LiF and SiC channels.
+; 06/14/04 wvd: Don't shift apertures in X to match FPA positions.
+; 07/12/05 wvd: Clean up call to HIST_2D.
+; 08/01/05 wvd: If IDL version > 6.0, generate GIF file.
+; 08/30/05 wvd: If there are no good photons, plot all photons.
+; 11/01/05 wvd: If DAYNIGHT = NIGHT, exclude daytime photons.
+; 03/14/08 wvd: Require LOC_FLAG < 16B for good data.
+;-
+
+pro cf_plot_extract3,rootname
+
+ !quiet=1
+ filename=rootname+'idf.fit'
+ a=mrdfits(filename,0,ah,/SILENT)
+
+ ; Read input file's primary header keywords
+ wave_cal = strcompress(fxpar(ah,'WAVE_CAL'),/rem)
+ chid_cal = strcompress(fxpar(ah,'CHID_CAL'),/rem)
+ filedate = strcompress(fxpar(ah,'DATE'),/rem)
+ obsdate = strcompress(fxpar(ah,'DATEOBS'),/rem)
+ obstime = strcompress(fxpar(ah,'TIMEOBS'),/rem)
+ cfvers = strcompress(fxpar(ah,'CF_VERS'),/rem)
+ exptime = fxpar(ah,'EXPTIME')
+ instmode = strcompress(fxpar(ah,'INSTMODE'),/rem)
+ detector = strcompress(fxpar(ah,'DETECTOR'),/rem)
+ aperture = strcompress(fxpar(ah,'APERTURE'),/rem)
+ srctype = strmid(fxpar(ah,'SRC_TYPE'),0,1)
+ daynight = strcompress(fxpar(ah,'DAYNIGHT'),/rem)
+
+ ; Interpret aperture and srctype keywords.
+ if (aperture EQ 'MDRS') then begin
+ aplif = 2
+ apsic = 6
+ endif else if (aperture EQ 'HIRS') then begin
+ aplif = 1
+ apsic = 5
+ endif else begin ; assume LWRS
+ aplif = 3
+ apsic = 7
+ endelse
+ if (srctype EQ 'P') then extend = 0 else extend = 8
+
+ cal_path = getenv("CF_CALDIR")
+ slitname=["HIRS","MDRS","LWRS","PINH","HIRS","MDRS","LWRS","PINH"]
+ specname=["LiF","LiF","LiF","LiF","SiC","SiC","SiC","SiC"]
+
+ ; Set the plot resolution.
+ set_plot,'Z'
+ device,set_resolution=[1124,612]
+
+ ; Define plot attributes
+ !x.style=1
+ !y.style=1
+ !x.tickformat='(I5)'
+ !p.title=filename
+ !x.title="X pixel"
+ !y.title="Y pixel"
+ !p.charsize=1.2
+ cs=0.8
+
+ ; Read the X and Y columns from the first extension (photon list),
+ ; exclude bad events, and generate an image from the data.
+ ftab_ext, filename, 'X,Y,TIMEFLGS,LOC_FLGS', xarr, yarr, timeflag, loc_flag
+ if (daynight EQ 'NIGHT') then begin
+ good = where (timeflag eq 0 and loc_flag lt 16, n)
+ endif else begin
+ good = where ((timeflag and not 1B) eq 0 and loc_flag lt 16, n)
+ endelse
+ if (n gt 0) then begin
+ xarr = xarr[good]
+ yarr = yarr[good]
+ endif
+ a = HIST_2D(xarr,yarr,bin1=16,bin2=2,min1=0,max1=16383,min2=0,max2=1023)
+ b = HIST_EQUAL(a)
+
+ !p.charsize=1.3
+ x0=85
+ y0=65
+ x1=1024+x0
+ y1=512+y0
+ dummy_x = indgen(2)*16383
+ dummy_y = indgen(2)*1023
+
+ ; Plot the pixel axes and the photon image.
+ plot,dummy_x,dummy_y,/nodata,position=[x0,y0,x1,y1],/DEVICE,$
+ background=255,color=0,xticks=8
+ tv,255-b,x0,y0
+ plot,dummy_x,dummy_y,/nodata,/noerase,position=[x0,y0,x1,y1],/DEVICE,$
+ background=255,color=0,xticks=8,xminor=4
+
+ miny=10000
+ maxy=0.0
+
+ ; Plot the extraction windows.
+ for i=1,7 do begin
+ ; Skip the pinhole and any non-target apertures for HIST data.
+ if ((i ne 4) and ((instmode EQ 'TTAG') $
+ or (i eq aplif) or (i eq apsic))) then begin
+
+ ; Read aperture limits from calibration file.
+ j = 8; use extended apertures for non-target apertures
+ if ((i eq aplif) or (i eq apsic)) then j = extend
+ xw=mrdfits(cal_path+'/'+chid_cal,i+j,chidhdr,/SILENT)
+ yhigh = xw.yhigh
+ ylow = xw.ylow
+ default_y_centroid = fxpar(chidhdr,'CENTROID')
+
+ ; Get the YCENT keywords and adjust the windows accordingly.
+ key = 'YCENT' + strcompress(string(i),/rem)
+ ycent = fxpar(ah, key)
+ shift = nint(default_y_centroid - ycent)
+ yhigh = yhigh - shift
+ ylow = ylow - shift
+
+ ; Plot the extraction windows.
+ oplot,yhigh,color=0
+ oplot,ylow,color=0
+ miny=min([miny,ylow])
+ maxy=max([maxy,yhigh])
+ xyouts,15600,ylow[16350]+5,specname[i-1],$
+ color=0,charsize=0.8
+ xyouts,15600,ylow[16350]-20,slitname[i-1],$
+ color=0,charsize=0.8
+ endif
+ endfor
+
+ ; Write history information.
+ xyouts,50,20,'Observation date='+obsdate+'T'+obstime,$
+ charsize=0.90,color=0,/DEVICE
+ xyouts,50,5,'IDF file date= '+filedate,charsize=0.90,color=0,/DEVICE
+ xyouts,1124/2,5,'CALFUSE version '+cfvers,$
+ charsize=0.90,color=0,/DEVICE,align=0.5
+ xyouts,1124-50,20,'CHID calibration file='+chid_cal,$
+ charsize=0.90,color=0,/DEVICE,align=1.0
+ xyouts,1124-50,5,'Exposure time='+$
+ strcompress(string(exptime,format="(F10.2)"),/rem),$
+ charsize=0.90,color=0,/DEVICE,align=1.0
+
+ ; Read in and plot the wavelength scale
+ wl_lif=mrdfits(cal_path+'/'+wave_cal,4,ah,/SILENT)
+ wl_sic=mrdfits(cal_path+'/'+wave_cal,8,ah,/SILENT)
+
+ wlsc_lif=[wl_lif[0].wavelength,wl_lif[16383].wavelength]
+ wlsc_sic=[wl_sic[0].wavelength,wl_sic[16383].wavelength]
+
+ detector=strtrim(detector,2)
+
+ ; Determine locations of the wavelength axes.
+ if (detector EQ '1A') then begin
+ hip=maxy+25
+ midp=425
+ lowp=miny-15
+ endif else if (detector EQ '1B') then begin
+ hip=maxy+25
+ midp=425
+ lowp=miny-10
+ endif else if (detector EQ '2A') then begin
+ hip=maxy+100
+ midp=500
+ lowp=miny-100
+ endif else if (detector EQ '2B') then begin
+ hip=maxy+100
+ midp=500
+ lowp=miny-100
+ endif else begin
+ hip=maxy+25
+ midp=512
+ lowp=miny-15
+ endelse
+
+ ; Draw wavelength axes.
+ axis,0,hip,xaxis=1,xrange=wlsc_lif,xstyle=1,charsize=cs,$
+ color=0,xtitle="Wavelength"
+ axis,0,midp,xaxis=0,xrange=wlsc_lif,xstyle=1,charsize=0.001,$
+ color=0,xtitle="Wavelength"
+
+ axis,0,midp,xaxis=1,xrange=wlsc_sic,xs=1,charsize=0.001,$
+ color=0,xtitle=""
+ axis,0,lowp,xaxis=0,xrange=wlsc_sic,xs=1,charsize=cs,$
+ color=0,xtitle="Wavelength"
+
+ ; Create a GIF/JPEG file:
+ ver = float(!version.release)
+ if (ver ge 5.4 and ver le 6.0) then write_jpeg,rootname+'ext.jpg',TVRD() $
+ else write_gif,rootname+'ext.gif',TVRD()
+
+EXIT:
+return
+end
diff --git a/idl/cf_plot_rate3.pro b/idl/cf_plot_rate3.pro
new file mode 100644
index 0000000..6a2669b
--- /dev/null
+++ b/idl/cf_plot_rate3.pro
@@ -0,0 +1,227 @@
+;+
+; cf_plot_rate3.pro is a procedure to plot the count rate and screening
+; as a function of time for calfuse 3.0 data.
+;
+; Author: Edward M. Murphy
+; Written: 2000 April 21
+;
+; Calling sequence: cf_plot_rate3, rootname
+;
+; Inputs: rootname will have 'idf.fit' added to it.
+;
+; 02/20/03 JC Hsu Adapt from cf_plot_rate.pro to work on version 3.0 data.
+; 06/23/04 V Dixon Mark low-voltage periods with cross-hatch.
+; 03/16/05 V Dixon Ignore timeline table entries that extend beyond
+; the end of the exposure.
+; 08/01/05 V Dixon If IDL version > 6.0, generate GIF file.
+; 11/03/05 V Dixon Shade OPUS and SAA bad times before drawing rest of plot.
+;-
+
+pro cf_plot_rate3,rootname
+
+ !quiet=1
+
+ ; Open input IDF file
+ filename=rootname+'idf.fit'
+ dummy=mrdfits(filename,0,ah,/SILENT)
+
+ ; Read primary header keywords
+ pdate = fxpar(ah,'DATE')
+ dateobs = fxpar(ah,'DATEOBS')
+ expstart = fxpar(ah,'EXPSTART')
+ expend = fxpar(ah,'EXPEND')
+ detector = fxpar(ah,'DETECTOR')
+
+ exposure = (expend - expstart) * 24. * 3600.
+
+ ; Define plot attributes.
+ !p.multi=[0,1,2]
+ set_plot,'Z'
+ device,set_resolution=[1024,512]
+
+ !x.style=1
+ !y.style=1
+ !x.tickformat='(I6)'
+
+ !x.title="Time (seconds)"
+ !y.title="Count rate"
+ !p.charsize=1.2
+ !p.background=255
+ !p.color=0
+
+ ; Read columns from the timeline extension (ext 3)
+ ftab_ext, filename, 'TIME', time0, exten_no=3
+ ftab_ext, filename, 'STATUS_FLAGS', flags, exten_no=3
+ if (exposure gt 55000) then begin
+ good = where(time0 lt 55000, n)
+ exposure = time0[n-1] - time0[0]
+ endif
+ good = where(time0 lt exposure)
+ time = [0, time0[good], exposure]
+
+ ; Compute the day/night screenings (bit 1)
+ flags1 = ishft(flags, 7)
+ flags1 = ishft(flags1, -7) ; only keep bit 1
+
+ ; Compute the limb angle screening (bit 2)
+ flags2 = ishft(flags, 6) ;
+ flags2 = ishft(flags2, -7) ; only keep bit 2
+
+ ; Compute the SAA screening (bit 3)
+ flags3 = ishft(flags, 5) ;
+ flags3 = ishft(flags3, -7) ; only keep bit 3
+
+ ; Compute the HV screening (bit 4)
+ flags4 = ishft(flags, 4) ;
+ flags4 = ishft(flags4, -7) ; only keep bit 4
+
+ ; Compute burst screening (bit 5)
+ flags5 = ishft(flags, 3) ;
+ flags5 = ishft(flags5, -7) ; only keep bit 5
+
+ ; Compute OPUS screening (bit 6)
+ flags6 = ishft(flags, 2) ;
+ flags6 = ishft(flags6, -7) ; only keep bit 6
+
+ ; Compute jitter screening (bit 7)
+ flags7 = ishft(flags, 1) ;
+ flags7 = ishft(flags7, -7) ; only keep bit 7
+
+ ftab_ext, filename, 'BKGD_CNT_RATE', bkgd, exten_no=3
+ len = size(time0)
+ packet = 1 > len[1]/100 ; determine rebinning size
+ wht = where(time0 eq time0)
+ whbin = where(wht mod packet eq 0)
+
+ for i = 1, 2 do begin
+
+ if (i eq 1) then text = ' LiF' else text = ' SiC'
+ !p.title=filename + text
+
+ ; Draw grid, shade bad times, then over-plot count rate arrays.
+ if (i eq 1) then col = 'LIF' else col = 'SIC'
+ ftab_ext, filename, col+'_CNT_RATE', crate, exten_no=3
+ ymin = 1
+ ymax = max([1000,crate * 2.])
+ crate = crate > ymin
+ !y.range=[ymin, ymax]
+ plot_io, time0, crate, /nodata, xr=[0,exposure]
+
+ ; Shade OPUS
+ flags16 = flags6 * (ymax-ymin) + ymin
+ flags16 = [0, flags16[good], 0]
+ polyfill, time, flags16, COL = 0.75 * !D.N_COLORS
+ ;oplot, time, flags16, psym=10, linestyle=2
+
+ ; Shade SAA violations
+ flags13 = flags3 * (ymax/100-ymin) + ymin
+ flags13 = [0., flags13[good], 0.]
+ polyfill, time, flags13, COL = 0.25 * !D.N_COLORS
+ flags13 = flags3 * (ymax-ymin) + ymin
+ oplot, time, flags13, psym=10, linestyle=2
+
+ ; Shade day/night screenings
+ flags11 = flags1 * (0.2*ymax) + ymax
+ flags11 = [ymax, flags11[good], ymax]
+ oplot, time, flags11, psym=10
+ polyfill, time, flags11
+
+ ; Shade limb angle
+ flags12 = flags2 * (ymax-ymin) + ymin
+ flags12 = [0, flags12[good], 0]
+ oplot, time, flags12, psym=10, linestyle=2
+ polyfill, time, flags12, /line_fill, orientation=0
+
+ ; Shade low-voltage periods.
+ flags14 = flags4 * (ymax-ymin) + ymin
+ flags14 = [0, flags14[good], 0]
+ oplot, time, flags14, psym=10, linestyle=2
+ polyfill, time, flags14, /line_fill, orientation=45
+ polyfill, time, flags14, /line_fill, orientation=135
+
+ ; Shade burst
+ flags15 = flags5 * (ymax-ymin) + ymin
+ flags15 = [0, flags15[good], 0]
+ oplot, time, flags15, psym=10, linestyle=2
+ polyfill, time, flags15, /line_fill, orientation=45
+
+ ; Shade jitter
+ flags17 = flags7 * (ymax-ymin) + ymin
+ flags17 = [0, flags17[good], 0]
+ oplot, time, flags17, psym=10, linestyle=2
+ polyfill, time, flags17, /line_fill, orientation=135
+
+ ; Overplot count-rate arrays.
+ oplot, time0, crate, linestyle=0, psym=10
+ oplot, time0(whbin), bkgd(whbin)+0.001, linestyle=1
+ endfor
+
+ ; Draw legend
+ plot,[0,1],xstyle=7,ystyle=7,/nodata,position=[345-20,5,345+21,25],$
+ /noerase,title=" ",xtitle=" ",ytitle=" ",xrange=[0,1],$
+ yrange=[0,1],/DEVICE
+ polyfill,[0,1,1,0],[0,0,1,1], COL = 0.75 * !D.N_COLORS
+ oplot,[0,1,1,0,0],[0,0,1,1,0],psym=10
+ xyouts,345-17,10,'OPUS',charsize=1,color=0,/DEVICE
+
+ plot,[0,1],xstyle=7,ystyle=7,/nodata,position=[400-20,5,400+21,25],$
+ /noerase,title=" ",xtitle=" ",ytitle=" ",xrange=[0,1],$
+ yrange=[0,1],/DEVICE
+ polyfill,[0,1,1,0],[0,0,0.36,0.36], COL = 0.25 * !D.N_COLORS
+ oplot,[0,1,1,0,0],[0,0,1,1,0],psym=10
+ xyouts,400-12,13,'SAA',charsize=1,color=0,/DEVICE
+
+ plot,[0,1],xstyle=7,ystyle=7,/nodata,position=[450-15,5,450+15,25],$
+ /noerase,title=" ",xtitle=" ",ytitle=" ",xrange=[0,1],$
+ yrange=[0,1],/DEVICE
+ polyfill,[0,1,1,0],[0.8,0.8,1,1]
+ xyouts,450-11,10,'Day',charsize=1,color=0,/DEVICE
+
+ plot,[0,1],xstyle=7,ystyle=7,/nodata,position=[710-15,5,710+15,25],$
+ /noerase,title=" ",xtitle=" ",ytitle=" ",xrange=[0,1],$
+ yrange=[0,1],/DEVICE
+ polyfill,[0,1,1,0],[0,0,1,1],/line_fill,orientation=0
+ oplot,[0,1,1,0,0],[0,0,1,1,0],psym=10
+ xyouts,710+20,10,'Limb',charsize=1,color=0,/DEVICE
+
+ plot,[0,1],xstyle=7,ystyle=7,/nodata,position=[790-15,5,790+15,25],$
+ /noerase,title=" ",xtitle=" ",ytitle=" ",xrange=[0,1],$
+ yrange=[0,1],/DEVICE
+ polyfill,[0,1,1,0],[0,0,1,1],/line_fill,orientation=45
+ oplot,[0,1,1,0,0],[0,0,1,1,0],psym=10
+ xyouts,790+20,10,'Burst',charsize=1,color=0,/DEVICE
+
+ plot,[0,1],xstyle=7,ystyle=7,/nodata,position=[870-15,5,870+15,25],$
+ /noerase,title=" ",xtitle=" ",ytitle=" ",xrange=[0,1],$
+ yrange=[0,1],/DEVICE
+ polyfill,[0,1,1,0],[0,0,1,1],/line_fill,orientation=135
+ oplot,[0,1,1,0,0],[0,0,1,1,0],psym=10
+ xyouts,870+20,10,'Jitter',charsize=1,color=0,/DEVICE
+
+ plot,[0,1],xstyle=7,ystyle=7,/nodata,position=[950-15,5,950+15,25],$
+ /noerase,title=" ",xtitle=" ",ytitle=" ",xrange=[0,1],$
+ yrange=[0,1],/DEVICE
+ polyfill,[0,1,1,0],[0,0,1,1],/line_fill,orientation=45
+ polyfill,[0,1,1,0],[0,0,1,1],/line_fill,orientation=135
+ oplot,[0,1,1,0,0],[0,0,1,1,0],psym=10
+ xyouts,950+20,10,'HV',charsize=1,color=0,/DEVICE
+
+ xyouts,835,27,'Screenings :',charsize=.9,color=0,/DEVICE,alignment=.5
+ xyouts,20,16,'RAW file written at '+pdate,charsize=0.90,color=0,$
+ /DEVICE
+ xyouts,925,495,'DATEOBS: '+dateobs,charsize=.9,color=0,$
+ /DEVICE,alignment=.5
+
+ ; Create a GIF/JPEG file:
+ ver = float(!version.release)
+ if (ver ge 5.4 and ver le 6.0) then begin
+ xyouts,20,6,'JPG file written at '+!stime,charsize=0.90,$
+ color=0,/DEVICE
+ write_jpeg,rootname+'rat.jpg',TVRD()
+ endif else begin
+ xyouts,20,6,'GIF file written at '+!stime,charsize=0.90,$
+ color=0,/DEVICE
+ write_gif,rootname+'rat.gif',TVRD()
+ endelse
+return
+end
diff --git a/idl/cf_plot_rate_linear.pro b/idl/cf_plot_rate_linear.pro
new file mode 100644
index 0000000..e2e3aa7
--- /dev/null
+++ b/idl/cf_plot_rate_linear.pro
@@ -0,0 +1,175 @@
+;+
+; cf_plot_rate_linear.pro is a procedure to plot the count rate and screening
+; as a function of time for calfuse 3.0 data.
+; THIS VERSION PRODUCES A LINEAR PLOT OF COUNT RATE
+;
+; Author: Edward M. Murphy
+; Written: 2000 April 21
+;
+; Calling sequence: cf_plot_rate3, rootname
+;
+; Inputs: rootname will have 'idf.fit' added to it.
+;
+; 02/20/03 JC Hsu Adapt from cf_plot_rate.pro to work on version 3.0 data.
+; 05/17/04 V Dixon Adapt from cf_plot_rate3.pro
+;-
+
+pro cf_plot_rate_linear, rootname
+
+ !quiet=1
+
+ ; Open input IDF file
+ filename=rootname+'idf.fit'
+ dummy=mrdfits(filename,0,ah,/SILENT)
+
+ ; Read primary header keywords
+ pdate = fxpar(ah,'DATE')
+ dateobs = fxpar(ah,'DATEOBS')
+ expstart = fxpar(ah,'EXPSTART')
+ expend = fxpar(ah,'EXPEND')
+ detector = fxpar(ah,'DETECTOR')
+
+ exposure = (expend - expstart) * 24. * 3600.
+
+ ; Define plot attributes.
+ !p.multi=[0,1,2]
+ set_plot,'Z'
+ device,set_resolution=[1024,512]
+
+ !x.style=1
+ !y.style=1
+ !x.tickformat='(I6)'
+
+ !x.title="Time (seconds)"
+ !y.title="Count rate"
+ !p.charsize=1.2
+ !p.background=255
+ !p.color=0
+
+ ; Read columns from the timeline extension (ext 3)
+ ftab_ext, filename, 'TIME', time0, exten_no=3
+ ftab_ext, filename, 'STATUS_FLAGS', flags, exten_no=3
+ time = [0, time0, exposure]
+
+ ; Compute the day/night screenings (bit 1)
+ flags1 = ishft(flags, 7)
+ flags1 = ishft(flags1, -7) ; only keep bit 1
+
+ ; Compute the limb angle screening (bit 2)
+ flags2 = ishft(flags, 6) ;
+ flags2 = ishft(flags2, -7) ; only keep bit 2
+
+ ; Compute the SAA screening (bit 3)
+ flags3 = ishft(flags, 5) ;
+ flags3 = ishft(flags3, -7) ; only keep bit 3
+
+ ; Compute burst screening (bit 5)
+ flags5 = ishft(flags, 3) ;
+ flags5 = ishft(flags5, -7) ; only keep bit 5
+
+ ; Compute jitter screening (bit 7)
+ flags7 = ishft(flags, 1) ;
+ flags7 = ishft(flags7, -7) ; only keep bit 7
+
+ ftab_ext, filename, 'BKGD_CNT_RATE', bkgd, exten_no=3
+ len = size(time0)
+ packet = 1 > len[1]/100 ; determine rebinning size
+ wht = where(time0 eq time0)
+ whbin = where(wht mod packet eq 0)
+
+ for i = 1, 2 do begin
+
+ if (i eq 1) then text = ' LiF' else text = ' SiC'
+ !p.title=filename + text
+
+ ; Plot the count rate
+ if (i eq 1) then col = 'LIF' else col = 'SIC'
+ ftab_ext, filename, col+'_CNT_RATE', crate, exten_no=3
+ ymax = max(crate)*1.2
+ ymin = 0.
+ !y.range=[ymin, ymax]
+ plot, time0, crate, xr=[0,exposure], linestyle=0, psym=10
+ oplot, time0(whbin), bkgd(whbin)*(10./i), linestyle=1
+ if (i eq 1) then text = '5' else text = '10'
+ xyouts,exposure/50,ymax/20,'BKGD scaled by '+text,charsize=1
+
+
+ ; Shade day/night screenings
+ ;;;flags11 = flags1 * (-0.2*ymin) + ymin
+ ;;;flags11 = [0, flags11, 0]
+ flags11 = flags1 * (0.025*ymax) + ymax
+ flags11 = [ymax, flags11, ymax]
+ oplot, time, flags11, psym=10
+ polyfill, time, flags11
+
+ ; Shade limb angle
+ flags12 = flags2 * (ymax-ymin) + ymin
+ flags12 = [ymin, flags12, ymin]
+ oplot, time, flags12, psym=10, linestyle=2
+ polyfill, time, flags12, /line_fill, orientation=0
+
+ ; Shade SAA
+ ;;;flags13 = flags3 * (ymax-ymin) + ymin
+ ;;;flags13 = [ymin, flags13, ymin]
+ ;;;oplot, time, flags13, psym=10, linestyle=2
+
+ ; Shade burst
+ flags15 = flags5 * (ymax-ymin) + ymin
+ flags15 = [ymin, flags15, ymin]
+ oplot, time, flags15, psym=10, linestyle=2
+ polyfill, time, flags15, /line_fill, orientation=45
+
+ ; Shade jitter
+ flags17 = flags7 * (ymax-ymin) + ymin
+ flags17 = [ymin, flags17, ymin]
+ oplot, time, flags17, psym=10, linestyle=2
+ polyfill, time, flags17, /line_fill, orientation=135
+ endfor
+
+ ; Draw legend
+ plot,[0,1],xstyle=7,ystyle=7,/nodata,position=[710-15,5,710+15,25],$
+ /noerase,title=" ",xtitle=" ",ytitle=" ",xrange=[0,1],$
+ yrange=[0,1],/DEVICE
+ polyfill,[0,1,1,0],[0.8,0.8,1,1]
+ xyouts,710+20,10,'Day',charsize=1,color=0,/DEVICE
+
+ plot,[0,1],xstyle=7,ystyle=7,/nodata,position=[790-15,5,790+15,25],$
+ /noerase,title=" ",xtitle=" ",ytitle=" ",xrange=[0,1],$
+ yrange=[0,1],/DEVICE
+ polyfill,[0,1,1,0],[0,0,1,1],/line_fill,orientation=0
+ oplot,[0,1,1,0,0],[0,0,1,1,0],psym=10
+ xyouts,790+20,10,'Limb',charsize=1,color=0,/DEVICE
+
+ plot,[0,1],xstyle=7,ystyle=7,/nodata,position=[870-15,5,870+15,25],$
+ /noerase,title=" ",xtitle=" ",ytitle=" ",xrange=[0,1],$
+ yrange=[0,1],/DEVICE
+ polyfill,[0,1,1,0],[0,0,1,1],/line_fill,orientation=45
+ oplot,[0,1,1,0,0],[0,0,1,1,0],psym=10
+ xyouts,870+20,10,'Burst',charsize=1,color=0,/DEVICE
+
+ plot,[0,1],xstyle=7,ystyle=7,/nodata,position=[950-15,5,950+15,25],$
+ /noerase,title=" ",xtitle=" ",ytitle=" ",xrange=[0,1],$
+ yrange=[0,1],/DEVICE
+ polyfill,[0,1,1,0],[0,0,1,1],/line_fill,orientation=135
+ oplot,[0,1,1,0,0],[0,0,1,1,0],psym=10
+ xyouts,950+20,10,'Jitter',charsize=1,color=0,/DEVICE
+
+ xyouts,835,27,'Screenings :',charsize=.9,color=0,/DEVICE,alignment=.5
+ xyouts,20,16,'RAW file written at '+pdate,charsize=0.90,color=0,$
+ /DEVICE
+ xyouts,925,495,'DATEOBS: '+dateobs,charsize=.9,color=0,$
+ /DEVICE,alignment=.5
+
+ ; Create a GIF/JPEG file:
+ ver = float(!version.release)
+ if (ver ge 5.4) then begin
+ xyouts,20,6,'JPG file written at '+!stime,charsize=0.90,$
+ color=0,/DEVICE
+ write_jpeg,rootname+'lin.jpg',TVRD()
+ endif else begin
+ xyouts,20,6,'GIF file written at '+!stime,charsize=0.90,$
+ color=0,/DEVICE
+ write_gif,rootname+'lin.gif',TVRD()
+ endelse
+return
+end
diff --git a/idl/fuse_extract.pro b/idl/fuse_extract.pro
new file mode 100644
index 0000000..0b784d7
--- /dev/null
+++ b/idl/fuse_extract.pro
@@ -0,0 +1,154 @@
+pro fuse_extract, input
+;+
+; NAME:
+; FUSE_EXTRACT
+;
+;*PURPOSE:
+; To extract full-resolution spectra from the primary LiF and SiC
+; apertures of an intermediate data file.
+;
+;*CATEGORY:
+; INPUT/OUTPUT
+;
+;*CALLING SEQUENCE:
+; FUSE_EXTRACT, input
+;
+;*INPUT:
+; input: intermediate data file
+;
+;*OUTPUT:
+; LiF and SiC spectral files in v2.x format.
+;
+;
+;*PROCEDURES USED:
+; FXADDPAR, FXHMAKE, FXBADDCOL, FXBCREATE, FXBWRITE, FXBFINISH, MRDFITS,
+; SXPAR
+;
+;*HISTORY:
+; Written by: V. Dixon March 2003
+; 03/23/2003 V. Dixon Correct X values for Doppler shift.
+; 03/24/2003 V. Dixon Fix bug in call to where().
+; 06/27/2003 R. Robinson Update to new version of IDF
+; - added fscale keyword to mrdfits call
+; - divide flux by exposure time
+; 06/08/2004 V. Dixon Use EXPTIME rather than RAWTIME.
+; Correct calculation of COUNTS
+; 07/01/2004 V. Dixon Don't read headers of extensions.
+; Employ faster scheme for calculating
+; Doppler shift.
+; 07/02/2004 V. Dixon Don't compute dl per pixel. It suffers
+; from truncation errors. Instead, use
+; value from file header.
+;-
+;-----------------------------------------------------------------------------
+;
+; print calling sequence if no parameters supplied
+;
+ if n_params(0) lt 1 then begin
+ print,'CALLING SEQUENCE: fuse_extract, input'
+ return
+ end
+;
+; Physical constants
+;
+ C = 2.99792458e5 ; km/s
+;
+; Open input file and read keywords from header.
+;
+ dummy = mrdfits(input, 0, hdr, status=status)
+ rootname = SXPAR(hdr, 'ROOTNAME')
+ vhelio = SXPAR(hdr, 'V_HELIO')
+ detector = SXPAR(hdr, 'DETECTOR')
+ aperture = SXPAR(hdr, 'APERTURE')
+ wavecal = SXPAR(hdr, 'WAVE_CAL')
+ exptime = SXPAR(hdr, 'EXPTIME')
+
+ ap_array = ['HIRS', 'MDRS', 'LWRS', 'PINH']
+ ap_code = ['3','2','4','1']
+ for k = 0, 3 do if (strcmp(aperture, ap_array[k], 1)) then ap = k
+ channel = ap+1
+
+ GET_DATE, FITS_date
+;
+; Read photon information in the first extension of the IDF.
+;
+ a = mrdfits(input, 1, status=status, /fscale)
+;
+; Read timeline table from the third extension of the IDF.
+;
+ b = mrdfits(input, 3, status=status, /fscale)
+ nseconds = n_elements(b.time)
+ if (nint(b.time[nseconds-1] - b.time[0]) gt nseconds) then $
+ print, 'WARNING: '+input+' timeline table not continuous.'
+
+ for k = channel, channel+4, 4 do begin
+ print, 'Analyzing extension ', k
+ ;
+ ; Read corresponding wavelength array from WAVE_CAL file.
+ ;
+ wcalfile=strtrim('/data1/fuse/calfuse/v3.0/calfiles/'+wavecal,2)
+ print, 'Reading wavelength data from ', wcalfile
+ w=mrdfits(wcalfile,k,w_hdr)
+ wave = w.wavelength
+ wpc = SXPAR(w_hdr, 'DISPAPIX')
+ ;
+ ; Select photons from aperture of interest.
+ ;
+ g = where (a.channel eq k and (a.timeflgs and not 1B) eq 0 and $
+ (a.loc_flgs and 16B) eq 0, n)
+ print, 'Number of photons in spectrum = ', n
+ x = a.x[g]
+ ;
+ ; Correct X values for Doppler shift.
+ ;
+ print, 'Applying Doppler shift'
+ t = nint(a.time[g] - b.time[0])
+ ovc = (b.ORBITAL_VEL + vhelio)/C
+ for i = 0L, n-1L do x[i] = x[i] + ovc[t[i]] * a.lambda[g[i]]/wpc
+ ;
+ ; Extract spectrum and populate output arrays.
+ ;
+ print, 'Extracting spectrum'
+ x = nint(x)
+ flux = fltarr(16384)
+ error = fltarr(16384)
+ cntserr = fltarr(16384)
+ for i = 0L, n-1L do flux[x[i]] = flux[x[i]] + a.ergcm2[g[i]]
+ flux = flux / exptime / abs(wpc)
+ counts = histogram(x, min=0, max=16383)
+ g = where (counts gt 0)
+ cntserr[g] = sqrt(counts[g])
+ error[g] = flux[g]/cntserr[g]
+ quality = indgen(16384)
+ ;
+ ; Create primary HDU of output file
+ ;
+ if (k lt 5) then ch = 'lif' else ch = 'sic'
+ filename = strcompress(rootname+strlowcase(detector)+ch+ap_code[ap]+'ttagfcal.fit',/remove_all)
+ FXADDPAR, hdr, 'DATE', FITS_date
+ FXADDPAR, hdr, 'FILENAME', filename
+ FXADDPAR, hdr, 'FILETYPE', 'CALIBRATED EXTRACTED SPECTRUM'
+ FXADDPAR, hdr, 'APER_ACT', strupcase(strcompress(ap_array[ap]+'_'+ch,/remove_all))
+ FXHMAKE, hdr, /EXTEND
+ FXWRITE, filename, hdr
+
+ FXBHMAKE, HEADER, 1, 'FUSE 1D Spectrum'
+ FXBADDCOL, iwave, HEADER, wave, 'WAVE', TUNIT='ANGSTROMS'
+ FXBADDCOL, iflux, HEADER, flux, 'FLUX', TUNIT='ERG/CM2/S/A'
+ FXBADDCOL, ierror, HEADER, error, 'ERROR', TUNIT='ERG/CM2/S/A'
+ FXBADDCOL, iquality, HEADER, quality, 'QUALITY', TUNIT='UNITLESS'
+ FXBADDCOL, icounts, HEADER, counts, 'COUNTS', TUNIT='COUNTS'
+ FXBADDCOL, icntserr, HEADER, cntserr, 'CNTSERR', TUNIT='COUNTS'
+
+ FXBCREATE, out, filename, HEADER
+ FXBWRITE, out, wave, iwave, 1
+ FXBWRITE, out, flux, iflux, 1
+ FXBWRITE, out, error, ierror, 1
+ FXBWRITE, out, quality, iquality, 1
+ FXBWRITE, out, counts, icounts, 1
+ FXBWRITE, out, cntserr, icntserr, 1
+ FXBFINISH, out
+ endfor
+ close, /all
+ return
+ end
diff --git a/idl/fuse_sic_only.pro b/idl/fuse_sic_only.pro
new file mode 100644
index 0000000..f0eadc0
--- /dev/null
+++ b/idl/fuse_sic_only.pro
@@ -0,0 +1,159 @@
+pro fuse_sic_only, input
+;+
+; NAME:
+; FUSE_EXTRACT
+;
+;*PURPOSE:
+; To extract full-resolution spectra from the primary LiF and SiC
+; apertures of an intermediate data file.
+;
+; THIS VERSION EXTRACTS ONLY A SIC SPECTRUM.
+;
+;*CATEGORY:
+; INPUT/OUTPUT
+;
+;*CALLING SEQUENCE:
+; FUSE_EXTRACT, input
+;
+;*INPUT:
+; input: intermediate data file
+;
+;*OUTPUT:
+; LiF and SiC spectral files in v2.x format.
+;
+;
+;*PROCEDURES USED:
+; FXADDPAR, FXHMAKE, FXBADDCOL, FXBCREATE, FXBWRITE, FXBFINISH, MRDFITS,
+; SXPAR
+;
+;*HISTORY:
+; Written by: V. Dixon March 2003
+; 03/23/2003 V. Dixon Correct X values for Doppler shift.
+; 03/24/2003 V. Dixon Fix bug in call to where().
+; 06/27/2003 R. Robinson Update to new version of IDF
+; - added fscale keyword to mrdfits call
+; - divide flux by exposure time
+; 06/08/2004 V. Dixon Use EXPTIME rather than RAWTIME.
+; Correct calculation of COUNTS
+; 07/01/2004 V. Dixon Don't read headers of extensions.
+; Employ faster scheme for calculating
+; Doppler shift.
+; 07/02/2004 V. Dixon Don't compute dl per pixel. It suffers
+; from truncation errors. Instead, use
+; value from file header.
+; 07/15/2004 V. Dixon Extract only SiC spectrum.
+;-
+;-----------------------------------------------------------------------------
+;
+; print calling sequence if no parameters supplied
+;
+ if n_params(0) lt 1 then begin
+ print,'CALLING SEQUENCE: fuse_sic_only, input'
+ return
+ end
+;
+; Physical constants
+;
+ C = 2.99792458e5 ; km/s
+;
+; Open input file and read keywords from header.
+;
+ dummy = mrdfits(input, 0, hdr, status=status)
+ rootname = SXPAR(hdr, 'ROOTNAME')
+ vhelio = SXPAR(hdr, 'V_HELIO')
+ detector = SXPAR(hdr, 'DETECTOR')
+ aperture = SXPAR(hdr, 'APERTURE')
+ wavecal = SXPAR(hdr, 'WAVE_CAL')
+ exptime = SXPAR(hdr, 'EXPTIME')
+
+ ap_array = ['HIRS', 'MDRS', 'LWRS', 'PINH']
+ ap_code = ['3','2','4','1']
+ for k = 0, 3 do if (strcmp(aperture, ap_array[k], 1)) then ap = k
+ channel = ap+1
+
+ GET_DATE, FITS_date
+;
+; Read photon information in the first extension of the IDF.
+;
+ a = mrdfits(input, 1, status=status, /fscale)
+;
+; Read timeline table from the third extension of the IDF.
+;
+ b = mrdfits(input, 3, status=status, /fscale)
+ nseconds = n_elements(b.time)
+ if (nint(b.time[nseconds-1] - b.time[0]) gt nseconds) then $
+ print, 'WARNING: '+input+' timeline table not continuous.'
+
+ ; for k = channel, channel+4, 4 do begin
+ k = channel + 4
+ print, 'Analyzing extension ', k
+ ;
+ ; Read corresponding wavelength array from WAVE_CAL file.
+ ;
+ wcalfile=strtrim('/data1/fuse/calfuse/v3.0/calfiles/'+wavecal,2)
+ print, 'Reading wavelength data from ', wcalfile
+ w=mrdfits(wcalfile,k,w_hdr)
+ wave = w.wavelength
+ wpc = SXPAR(w_hdr, 'DISPAPIX')
+ ;
+ ; Select photons from aperture of interest.
+ ;
+ g = where (a.channel eq k and (a.timeflgs and not 1B) eq 0 and $
+ (a.loc_flgs and 16B) eq 0, n)
+ print, 'Number of photons in spectrum = ', n
+ x = a.x[g]
+ ;
+ ; Correct X values for Doppler shift.
+ ;
+ print, 'Applying Doppler shift'
+ t = nint(a.time[g] - b.time[0])
+ ovc = (b.ORBITAL_VEL + vhelio)/C
+ for i = 0L, n-1L do x[i] = x[i] + ovc[t[i]] * a.lambda[g[i]]/wpc
+ ;
+ ; Extract spectrum and populate output arrays.
+ ;
+ print, 'Extracting spectrum'
+ x = nint(x)
+ flux = fltarr(16384)
+ error = fltarr(16384)
+ cntserr = fltarr(16384)
+ for i = 0L, n-1L do flux[x[i]] = flux[x[i]] + a.ergcm2[g[i]]
+ flux = flux / exptime / abs(wpc)
+ counts = histogram(x, min=0, max=16383)
+ g = where (counts gt 0)
+ cntserr[g] = sqrt(counts[g])
+ error[g] = flux[g]/cntserr[g]
+ quality = indgen(16384)
+ ;
+ ; Create primary HDU of output file
+ ;
+ if (k lt 5) then ch = 'lif' else ch = 'sic'
+ filename = strcompress(rootname+strlowcase(detector)+ch+ap_code[ap]+'ttagfcal.fit',/remove_all)
+ FXADDPAR, hdr, 'DATE', FITS_date
+ FXADDPAR, hdr, 'FILENAME', filename
+ FXADDPAR, hdr, 'FILETYPE', 'CALIBRATED EXTRACTED SPECTRUM'
+ FXADDPAR, hdr, 'APER_ACT', strupcase(strcompress(ap_array[ap]+'_'+ch,/remove_all))
+ FXHMAKE, hdr, /EXTEND
+ FXWRITE, filename, hdr
+
+ FXBHMAKE, HEADER, 1, 'FUSE 1D Spectrum'
+ FXBADDCOL, iwave, HEADER, wave, 'WAVE', TUNIT='ANGSTROMS'
+ FXBADDCOL, iflux, HEADER, flux, 'FLUX', TUNIT='ERG/CM2/S/A'
+ FXBADDCOL, ierror, HEADER, error, 'ERROR', TUNIT='ERG/CM2/S/A'
+ FXBADDCOL, iquality, HEADER, quality, 'QUALITY', TUNIT='UNITLESS'
+ FXBADDCOL, icounts, HEADER, counts, 'COUNTS', TUNIT='COUNTS'
+ FXBADDCOL, icntserr, HEADER, cntserr, 'CNTSERR', TUNIT='COUNTS'
+
+ FXBCREATE, out, filename, HEADER
+ FXBWRITE, out, wave, iwave, 1
+ FXBWRITE, out, flux, iflux, 1
+ FXBWRITE, out, error, ierror, 1
+ FXBWRITE, out, quality, iquality, 1
+ FXBWRITE, out, counts, icounts, 1
+ FXBWRITE, out, cntserr, icntserr, 1
+ FXBFINISH, out
+ ;endfor
+
+ close, /all
+ return
+ end
diff --git a/include/calfitsio.h b/include/calfitsio.h
new file mode 100644
index 0000000..faa6505
--- /dev/null
+++ b/include/calfitsio.h
@@ -0,0 +1,157 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Description: Wrappers for cfitsio routines which includes error checking.
+ *
+ * History: 04/14/99 peb Finished work on subset of routines
+ * from cfitsio v2.031.
+ * 04/14/99 barrett Delete calfuse.h from file
+ * 04/15/99 barrett Added FITS_get_rowsize
+ * 04/16/99 barrett Added FITS_get_hdu_num
+ * 04/20/99 barrett Added FITS_insert_key_[str, log, lng,
+ * fixflt, flt, fixdbl, dbl, fixcmp,
+ * cmp, fixdblcmp, dblcmp]
+ *
+ ****************************************************************************/
+
+#ifndef FITSIO_H
+#define FITSIO_H
+
+#include "fitsio.h"
+
+int FITS_open_file(fitsfile **fptr, const char *filename, int iomode,
+ int *status);
+int FITS_reopen_file(fitsfile *openfptr, fitsfile **newfptr, int *status);
+int FITS_create_file(fitsfile **fptr, const char *filename, int *status);
+int FITS_flush_file(fitsfile *fptr, int *status);
+int FITS_close_file(fitsfile *fptr, int *status);
+int FITS_delete_file(fitsfile *fptr, int *status);
+int FITS_file_name(fitsfile *fptr, char *filename, int *status);
+int FITS_file_mode(fitsfile *fptr, int *filemode, int *status);
+int FITS_write_record(fitsfile *fptr, const char *card, int *status);
+int FITS_write_key(fitsfile *fptr, int datatype, char *keyname, void *value,
+ char *comm, int *status);
+int FITS_write_comment(fitsfile *fptr, const char *comm, int *status);
+int FITS_write_history(fitsfile *fptr, const char *history, int *status);
+int FITS_write_date(fitsfile *fptr, int *status);
+int FITS_copy_key(fitsfile *infptr,fitsfile *outfptr,int incol,int outcol,
+ char *rootname, int *status);
+int FITS_write_imghdr(fitsfile *fptr, int bitpix, int naxis, long naxes[],
+ int *status);
+int FITS_write_grphdr(fitsfile *fptr, int simple, int bitpix, int naxis,
+ long naxes[], long pcount, long gcount, int extend,
+ int *status);
+int FITS_write_btblhdr(fitsfile *fptr, long naxis2, int tfields, char **ttype,
+ char **tform, char **tunit, char *extname, long pcount,
+ int *status);
+int FITS_get_hdrpos(fitsfile *fptr, int *nexist, int *position, int *status);
+int FITS_read_record(fitsfile *fptr, int nrec, char *card, int *status);
+int FITS_read_card(fitsfile *fptr, char *keyname, char *card, int *status);
+int FITS_read_key(fitsfile *fptr, int datatype, char *keyname, void *value,
+ char *comm, int *status);
+int FITS_read_imghdr(fitsfile *fptr, int maxdim, int *simple, int *bitpix,
+ int *naxis, long naxes[], long *pcount, long *gcount,
+ int *extend, int *status);
+int FITS_read_btblhdr(fitsfile *fptr, int maxfield, long *naxis2, int *tfields,
+ char **ttype, char **tform, char **tunit, char *extname,
+ long *pcount, int *status);
+int FITS_update_card(fitsfile *fptr, char *keyname, char *card, int *status);
+int FITS_update_key(fitsfile *fptr, int datatype, char *keyname, void *value,
+ char *comm, int *status);
+int FITS_modify_record(fitsfile *fptr, int nkey, char *card, int *status);
+int FITS_modify_card(fitsfile *fptr, char *keyname, char *card, int *status);
+int FITS_modify_comment(fitsfile *fptr, char *keyname, char *comm,
+ int *status);
+int FITS_insert_record(fitsfile *fptr, int nkey, char *card, int *status);
+int FITS_insert_key_str(fitsfile *fptr, char *keyname, char *value,
+ char *comment, int *status);
+int FITS_insert_key_log(fitsfile *fptr, char *keyname, int value,
+ char *comment, int *status);
+int FITS_insert_key_lng(fitsfile *fptr, char *keyname, long value,
+ char *comment, int *status);
+int FITS_insert_key_flt(fitsfile *fptr, char *keyname, float value,
+ int decimals, char *comment, int *status);
+int FITS_insert_key_fixflt(fitsfile *fptr, char *keyname, float value,
+ int decimals, char *comment, int *status);
+int FITS_insert_key_dbl(fitsfile *fptr, char *keyname, double value,
+ int decimals, char *comment, int *status);
+int FITS_insert_key_fixdbl(fitsfile *fptr, char *keyname, double value,
+ int decimals, char *comment, int *status);
+int FITS_insert_key_cmp(fitsfile *fptr, char *keyname, float *value,
+ int decimals, char *comment, int *status);
+int FITS_insert_key_dblcmp(fitsfile *fptr, char *keyname, double *value,
+ int decimals, char *comment, int *status);
+int FITS_insert_key_fixcmp(fitsfile *fptr, char *keyname, float *value,
+ int decimals, char *comment, int *status);
+int FITS_insert_key_fixdblcmp(fitsfile *fptr, char *keyname, double *value,
+ int decimals, char *comment, int *status);
+int FITS_insert_key_null(fitsfile *fptr, char *keyname, char *comment,
+ int *status);
+int FITS_delete_key(fitsfile *fptr, char *keyname, int *status);
+int FITS_delete_record(fitsfile *fptr, int keypos, int *status);
+int FITS_get_hdu_num(fitsfile *fptr, int *hdunum);
+int FITS_get_hdu_type(fitsfile *fptr, int *exttype, int *status);
+int FITS_movabs_hdu(fitsfile *fptr, int hdunum, int *exttype, int *status);
+int FITS_movrel_hdu(fitsfile *fptr, int hdumov, int *exttype, int *status);
+int FITS_movnam_hdu(fitsfile *fptr, int exttype, char *hduname, int hduvers,
+ int *status);
+int FITS_get_num_hdus(fitsfile *fptr, int *nhdu, int *status);
+int FITS_create_img(fitsfile *fptr, int bitpix, int naxis, long *naxes,
+ int *status);
+int FITS_create_tbl(fitsfile *fptr, int tbltype, long naxis2, int tfields,
+ char **ttype, char **tform, char **tunit, char *extname,
+ int *status);
+int FITS_create_hdu(fitsfile *fptr, int *status);
+int FITS_insert_img(fitsfile *fptr, int bitpix, int naxis, long *naxes,
+ int *status);
+int FITS_insert_atbl(fitsfile *fptr, long naxis1, long naxis2, int tfields,
+ char **ttype, long *tbcol, char **tform, char **tunit,
+ char *extname, int *status);
+int FITS_insert_btbl(fitsfile *fptr,long naxis2, int tfields, char **ttype,
+ char **tform, char **tunit, char *extname, long pcount,
+ int *status);
+int FITS_delete_hdu(fitsfile *fptr, int *hdutype, int *status);
+int FITS_copy_hdu(fitsfile *infptr, fitsfile *outfptr, int morekeys,
+ int *status);
+int FITS_copy_header(fitsfile *infptr, fitsfile *outfptr, int *status);
+int FITS_copy_data(fitsfile *infptr, fitsfile *outfptr, int *status);
+int FITS_get_colnum(fitsfile *fptr, int casesen, char *templt, int *colnum,
+ int *status);
+int FITS_get_colname(fitsfile *fptr, int casesen, char *templt, char *colname,
+ int *colnum, int *status);
+int FITS_get_coltype(fitsfile *fptr, int colnum, int *typecode, long *repeat,
+ long *width, int *status);
+int FITS_get_num_rows(fitsfile *fptr, long *nrows, int *status);
+int FITS_get_rowsize(fitsfile *fptr, long *nrows, int *status);
+int FITS_get_num_cols(fitsfile *fptr, int *ncols, int *status);
+int FITS_get_acolparms(fitsfile *fptr, int colnum, char *ttype, long *tbcol,
+ char *tunit, char *tform, double *tscal, double *tzero,
+ char *tnull, char *tdisp, int *status);
+int FITS_get_bcolparms(fitsfile *fptr, int colnum, char *ttype, char *tunit,
+ char *dtype, long *repeat, double *tscal, double *tzero,
+ long *tnull, char *tdisp, int *status);
+int FITS_read_img(fitsfile *fptr, int datatype, long firstelem, long nelem,
+ void *nulval, void *array, int *anynul, int *status);
+int FITS_read_col(fitsfile *fptr, int datatype, int colnum, long firstrow,
+ long firstelem, long nelem, void *nulval, void *array,
+ int *anynul, int *status);
+int FITS_write_img(fitsfile *fptr, int datatype, long firstelem, long nelem,
+ void *array, int *status);
+int FITS_write_col(fitsfile *fptr, int datatype, int colnum, long firstrow,
+ long firstelem, long nelem, void *array, int *status);
+int FITS_insert_rows(fitsfile *fptr, long firstrow, long nrows, int *status);
+int FITS_delete_rows(fitsfile *fptr, long firstrow, long nrows, int *status);
+int FITS_delete_rowlist(fitsfile *fptr, long *rownum, long nrows,
+ int *status);
+int FITS_insert_col(fitsfile *fptr, int numcol, char *ttype, char *tform,
+ int *status);
+int FITS_insert_cols(fitsfile *fptr, int firstcol, int ncols, char **ttype,
+ char **tform, int *status);
+int FITS_delete_col(fitsfile *fptr, int numcol, int *status);
+int FITS_copy_col(fitsfile *infptr, fitsfile *outfptr, int incol, int outcol,
+ int create_col, int *status);
+
+#endif
diff --git a/include/calfuse.h b/include/calfuse.h
new file mode 100644
index 0000000..a1ab6e9
--- /dev/null
+++ b/include/calfuse.h
@@ -0,0 +1,536 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: #include "calfuse.h"
+ *
+ * Description: Master include file for FUSE calibration pipeline processing
+ * system. Global shared variables and structures are defined
+ * here, as well as symbols and default values of parameters.
+ *
+ * Arguments: none
+ *
+ * Returns: none
+ *
+ * History: 11/01/02 1.1 peb Begin work
+ * 12/10/02 1.3 wvd Continue work
+ * 12/20/02 1.4 wvd Change flags to unsigned char in
+ * screening routines.
+ * 01/14/03 1.5 wvd Change cf_fpa_pos to cf_read_fpa_pos
+ * 01/17/03 1.6 wvd Added new calibration files
+ * DIGI_CAL and SPEC_CAL
+ * Added cf_check_digitizer and DIGI_COR
+ * 02/05/03 1.7 wvd Added spectral extraction routines
+ * Interpolate between FLUX_CAL files.
+ * Define HC
+ * 02/12/03 1.8 wvd Added convert_to_ergs
+ * Replace FLUX_CAL with AEFF_CAL
+ * 02/14/03 1.9 wvd Added FLAT, WGTS and WORM calibration
+ * file keywords.
+ * 02/24/03 1.10 wvd Added subroutines of cf_extract
+ * and char *cf_hist_file(char *);
+ * 02/28/03 1.12 peb Added function definitions for
+ * cf_rebin_and_flux_calibrate_backround,
+ * cf_standard_or_optimal_extraction,
+ * cf_optimal_extraction, and
+ * cf_write_extracted_spectrum.
+ * 03/04/03 1.13 peb Added astig_read_file,
+ * astig_check_input_image,
+ * astig_target_aperture
+ * 03/05/03 1.14 wvd Added cf_target_count_rate
+ * 03/07/03 1.15 peb Changed cf_error_init, added
+ * cf_verbose, and made pha, timeflgs, and
+ * loc_flgs function type consistent.
+ * 03/11/03 1.16 wvd Changed channel from unsigned char to
+ * char in a few subroutines.
+ * 03/18/03 1.17 wvd variable argument list for cf_verbose
+ * 03/25/03 1.18 peb variable argument list for cf_if_error
+ * and cf_if_warning
+ * 03/21/03 1.19 wvd Add flag for photon in pot hole
+ * 04/01/03 1.21 wvd Delete cf_errmsg; obsolete
+ * 04/08/03 1.22 wvd Change definition of cf_apply_filters
+ * 04/09/03 1.23 wvd Add bad-pixel maps to calibration files.
+ * 04/17/03 1.25 wvd Add final_call to cf_identify_channel
+ * Add final_call and weight to
+ * cf_calculate_y_centroid
+ * 04/18/03 1.26 wvd Add cf_find_spectra
+ * 04/21/03 1.27 wvd Modify cf_grating_motion,
+ * cf_mirror_motion, and
+ * cf_satellite_jitter.
+ * Define FRAME_TOLERANCE.
+ * 04/28/03 v1.28 wvd Modified cf_fuv_init not to extrapolate
+ * the last two calibration files forward.
+ * 05/10/03 v1.29 wvd Pass locflag to cf_set_photon_flags
+ * 05/16/03 v1.30 wvd Add cf_make_mask.
+ * Set PERFORM keywords for HIST data.
+ * 05/28/03 v1.31 rdr Modified def of cf_optimal_extraction
+ * and cf_write_extracted_spectrum
+ * 05/30/03 v1.34 wvd Pass WEIGHTS to cf_set_photon_flags
+ * 06/09/03 v1.35 rdr Change definition of cf_apply_filters
+ * 06/11/03 v1.36 wvd Change HV array to type short.
+ * 06/11/03 v1.37 wvd Pass datatype to cf_read_col and
+ * cf_write_col.
+ * 07/16/03 v1.38 wvd Move initialization routines to libcf
+ * 07/23/03 v1.39 wvd Add HSKP_CAL to list of cal files
+ * Increment OPUS_VERSION to 2.7
+ * 08/01/03 v1.40 wvd Add cf_apply_dead_time to pipeline,
+ * modify arguments of dead-time routines.
+ * 08/04/03 v1.41 wvd Convert count-rate arrays to shorts.
+ * 08/06/03 v1.42 wvd Delete GTI's from cf_satellite_jitter
+ * 08/21/03 v1.43 wvd Change channel array to unsigned char
+ * in subroutines of cf_remove_motion
+ * 08/22/03 v1.44 wvd Add cf_get_extraction_limits.
+ * 08/22/03 v1.45 wvd Change limits of extraction window
+ * from type int to type short.
+ * 08/25/03 v1.46 wvd Add cf_nint, change coltype in
+ * cf_idf_io routines from string to int
+ * 08/28/03 v1.47 wvd Modify structure saareg
+ * 09/10/03 v1.48 wvd Define cf_set_user_gtis
+ * Modify args of cf_screen_burst
+ * 09/15/03 v1.49 wvd Add structure top_level_routines
+ * Delete astig_read_file and
+ * astig_target_aperture.
+ * Modify args of cf_identify_channel
+ * 10/02/03 v1.50 wvd Exchange PHA and GTI flags.
+ * Change version number to 3.0.2.
+ * 10/08/03 v1.51 wvd Change counts_out to type long
+ * 10/26/03 v1.52 wvd Change arguments of cf_find_spectra
+ * and cf_calculate_y_centroid.
+ * 10/31/03 v1.53 wvd Change channel to unsigned char
+ * throughout.
+ * 11/26/03 v1.54 wvd Change aic_rate and fec_rate to float
+ * throughout.
+ * 12/21/03 v1.55 wvd Remove underscore from idf and bpm
+ * filenames.
+ * Change version number to 3.0.3.
+ * 02/09/04 v1.56 wvd Employ new scheme for dead-time
+ * correction. Add cf_nlong() and
+ * cf_screen_fifo_overflow.
+ * Change version number to 3.0.4.
+ * 02/27/04 v1.57 rdr Change def of cf_thermal_distortion
+ * 03/02/04 v1.58 wvd Implement WPC array in extraction
+ * routine.
+ * Add cf_x2lambda.
+ * Change version number to 3.0.5.
+ * 03/16/04 v1.59 wvd Delete WPC array.
+ * Smooth HIST data in X.
+ * Comment out cf_astig_farf.
+ * Change version number to 3.0.6.
+ * 04/05/04 v1.60 wvd Modify cf_geometric_distort to
+ * rescale SPECBINY only for HIST data.
+ * 04/09/04 v1.61 wvd Fix bugs in cf_optimal_extraction.
+ * Change version number to 3.0.7.
+ * 04/09/04 v1.62 bjg Define FILL_DATA and LOCATION_FILL
+ * 04/26/04 v1.63 wvd Replace cf_rebin_and_flux_
+ * calibrate_background with
+ * cf_rebin_background.
+ * Modify args to cf_optimal_extraction
+ * and cf_find_spectra.
+ * 06/02/04 v1.64 wvd Add cf_modify_hist_times.
+ * Populate the header keywords
+ * TIME_COR, COMB_COR, and QUIK_COR
+ * Modify args to cf_calculate_y_centroid,
+ * cf_find_spectra, cf_satellite_jitter,
+ * cf_apply_filters, and
+ * cf_write_extracted_spectrum.
+ * Modify order of CALIBRATION_STEP_KEYS.
+ * 08/19/04 v1.65 wvd Add FES definitions and subroutines.
+ * 10/12/04 v1.66 wvd Change version number to 3.0.8
+ * 02/01/05 v1.67 wvd Change version number to 3.1.0
+ * Modify args to cf_screen_burst
+ * 03/02/05 v1.68 wvd Add cf_modify_hist_pha and PHAH_COR.
+ * Walk correct HIST data.
+ * Change cf_ttag_bkgd to cf_scale_bkgd
+ * and pass weights array to it.
+ * Change cf_get_extraction_limits to
+ * cf_extraction_limits; it now returns
+ * X limits of extraction window.
+ * Add cf_screen_airglow.
+ * 03/22/05 v1.69 wvd Change TIME_SUNRISE and TIME_SUNSET
+ * from floats to shorts.
+ * 04/19/05 v1.70 wvd Change version number to 3.1.1
+ * 06/15/05 v1.71 wvd BUG FIX: cf_extract_spectra always
+ * read the point-source probability
+ * array from WGTS_CAL file. Now uses
+ * variable "extended" to determine
+ * which HDU to read. Modify args to
+ * cf_rebin_probability_array
+ * Change version number to 3.1.2
+ * Delete QUIK_COR from structure
+ * CALIBRATION_STEP_KEYS.
+ * 08/30/05 v1.72 wvd Define MAX_EXPTIME = 55000
+ * Delete cf_read_fpa_pos
+ * Change version number to 3.1.3
+ * 09/19/05 v1.73 wvd Reinstall cf_read_fpa_pos, as it is
+ * needed by ttag_combine.
+ * 09/30/05 v1.74 wvd Change version number to 3.1.4
+ * Pass photon array to
+ * cf_screen_fifo_overflow.
+ * 11/22/05 v1.75 wvd Add cf_screen_bad_pixels,
+ * cf_screen_jitter, and
+ * cf_get_potholes
+ * Change version number to 3.1.5
+ * 01/24/06 v1.76 wvd Change version number to 3.1.6
+ * 02/03/06 v1.77 wvd Change version number to 3.1.7
+ * 05/15/06 v1.78 wvd Divide cf_astigmatism_and_dispersion
+ * into two separate routines. Incorporate
+ * cf_x2lambda into cf_dispersion.
+ * Change version number to 3.1.8
+ * Delete cf_astig_farf.
+ * 06/12/06 v1.79 wvd Add pole_ang.c
+ * Change version number to 3.1.9
+ * Add -a to cf_remove_motions
+ * 11/02/06 v1.80 wvd Add cf_time_xy_distort.c
+ * Change version number to 3.2.0
+ * Add APER_COR to list of cal steps.
+ * Change cf_screen_fifo_overflow to
+ * cf_fifo_deadtime. Modify args to
+ * it, cf_apply_dead_time, and
+ * cf_target_count_rate. Run
+ * cf_target_count_rate on HIST data.
+ * 03/07/07 v1.81 wvd Modify arguments to space_vel.
+ * 05/18/07 v1.82 wvd Change version number to 3.2.1.
+ * 09/15/07 v1.83 bot Change version number to 3.2.2.
+ * 10/16/07 v1.84 bot Added brackets in
+ * FES_CALIBRATION_STEP_KEYS
+ * and in CALIBRATION_FILE_KEYS.
+ * 08/22/08 v1.85 wvd Change version number to 3.2.3.
+ * Many changes to better handle
+ * bright-earth observations &
+ * 900-level airglow exposures.
+ *
+ ****************************************************************************/
+
+#include "calfitsio.h"
+
+#define CALFUSE_VERSION "3.2.3"
+
+#define LARGEMJD 9999999999.0
+#define OPUS_VERSION 2.7 /* Oldest compatible version of OPUS */
+#define PI 3.1415926535897932384626433832795028841971693993751
+#define RADIAN 0.017453292519943295769236907684886127134428718885417
+#define C 299792.458
+#define HC 1.98644746104e-8 /* erg A */
+#define MU 3.986005E5 /* km^3 s^-2 */
+#define RE 6371.00 /* km */
+#define RS 6.960E5
+#define AU 1.495978707E8
+#define FRAME_TOLERANCE 0.004
+
+#define FESPIX 266256 /* This is 516*516 */
+#define FILL_DATA 21865
+#define NXMAX 16384
+#define NYMAX 1024
+
+#define TEMPORAL_DAY (0x01<<0)
+#define TEMPORAL_LIMB (0x01<<1)
+#define TEMPORAL_SAA (0x01<<2)
+#define TEMPORAL_HV (0x01<<3)
+#define TEMPORAL_BRST (0x01<<4)
+#define TEMPORAL_OPUS (0x01<<5)
+#define TEMPORAL_JITR (0x01<<6)
+#define TEMPORAL_USER (0x01<<7)
+
+#define LOCATION_SHLD (0x01<<0)
+#define LOCATION_AIR (0x01<<1)
+#define LOCATION_STIML (0x01<<2)
+#define LOCATION_STIMR (0x01<<3)
+#define LOCATION_PHA (0x01<<4)
+#define LOCATION_BADPX (0x01<<5)
+#define LOCATION_FILL (0x01<<6)
+
+#define MAX_EXPTIME 55000
+
+struct fes_keyword_tab
+{
+ char name[9];
+ char value[8];
+ char proc[18];
+};
+
+#define NUM_FES_PROC_STEPS 6
+
+#define FES_CALIBRATION_STEP_KEYS { \
+ {"INIT_FES\0","PERFORM\0","cf_fes_init\0"},\
+ {"MASK_FES\0","PERFORM\0","cf_fes_mask\0"},\
+ {"BIAS_FES\0","PERFORM\0","cf_fes_bias\0"},\
+ {"FLAT_FES\0","PERFORM\0","cf_fes_flat\0"},\
+ {"UNDS_FES\0","PERFORM\0","cf_fes_undistort\0"},\
+ {"FLUX_FES\0","PERFORM\0","cf_fes_flux\0"},\
+}
+
+#define NUM_FES_CAL_KEYS 5
+
+#define FES_CALIBRATION_FILE_KEYS { \
+ "MASK",1,"FCL","\0","\0","\0",0.0,0.0,LARGEMJD,0,0,0,\
+ "BIAS",2,"FCL","\0","\0","\0",0.0,0.0,LARGEMJD,0,0,0,\
+ "FFLT",2,"FCL","\0","\0","\0",0.0,0.0,LARGEMJD,0,0,0,\
+ "FGEO",1,"FCL","\0","\0","\0",0.0,0.0,LARGEMJD,0,0,0,\
+ "FFLX",2,"FCL","\0","\0","\0",0.0,0.0,LARGEMJD,0,0,0\
+ }
+
+typedef struct {
+ double ra_ap;
+ double dec_ap;
+ double limb;
+} orbital;
+
+typedef struct {
+ long n_points;
+ float *lat;
+ float *lon;
+} saareg;
+
+typedef struct {
+ long ntimes; /* The number of intervals */
+ double *start; /* An array of starting times (in seconds) */
+ double *stop; /* An array of stoping times (in seconds) */
+} GTI; /* Good Time Intervals */
+
+struct keyword_tab
+{
+ char name[9];
+ char hist_value[8];
+ char hist_proc[32];
+ char ttag_value[8];
+ char ttag_proc[32];
+};
+
+#define NTOP_LEVEL_ROUTINES 11
+
+#define TOP_LEVEL_ROUTINES { \
+ "cf_ttag_init", \
+ "cf_hist_init", \
+ "cf_convert_to_farf", \
+ "cf_ttag_countmap", \
+ "cf_ttag_gainmap", \
+ "cf_remove_motions", \
+ "cf_assign_wavelength", \
+ "cf_screen_photons", \
+ "cf_flux_calibrate", \
+ "cf_bad_pixels", \
+ "cf_extract_spectra" \
+}
+
+#define NUM_PROC_STEPS 40
+
+#define CALIBRATION_STEP_KEYS { \
+ {"INIT_COR", "PERFORM", "cf_hist_init", "PERFORM", "cf_ttag_init"}, \
+ {"DIGI_COR", "PERFORM", "cf_check_digitizer", "PERFORM", "cf_check_digitizer"}, \
+ {"IDS__COR", "PERFORM", "cf_ids_dead_time", "PERFORM", "cf_ids_dead_time"}, \
+ {"ELEC_COR", "PERFORM", "cf_electronics_dead_time", "PERFORM", "cf_electronics_dead_time"}, \
+ {"FIFO_COR", "OMIT", "cf_fifo_dead_time", "PERFORM", "cf_fifo_dead_time"}, \
+ {"DEAD_COR", "PERFORM", "cf_apply_dead_time", "PERFORM", "cf_apply_dead_time"}, \
+ {"THRM_COR", "PERFORM", "cf_thermal_distort", "PERFORM", "cf_thermal_distort"}, \
+ {"RATE_COR", "PERFORM", "cf_count_rate_y_distort", "PERFORM", "cf_count_rate_y_distort"}, \
+ {"TMXY_COR", "PERFORM", "cf_time_xy_distort", "PERFORM", "cf_time_xy_distort"}, \
+ {"GEOM_COR", "PERFORM", "cf_geometric_distort", "PERFORM", "cf_geometric_distort"}, \
+ {"PHAH_COR", "PERFORM", "cf_modify_hist_pha", "OMIT", "cf_modify_hist_pha"}, \
+ {"PHAX_COR", "PERFORM", "cf_pha_x_distort", "PERFORM", "cf_pha_x_distort"}, \
+ {"ACTV_COR", "PERFORM", "cf_active_region", "PERFORM", "cf_active_region"}, \
+ {"LIMB_COR", "PERFORM", "cf_screen_limb_angle", "PERFORM", "cf_screen_limb_angle"}, \
+ {"SAA__COR", "PERFORM", "cf_screen_saa", "PERFORM", "cf_screen_saa"}, \
+ {"VOLT_COR", "PERFORM", "cf_screen_high_voltage", "PERFORM", "cf_screen_high_voltage"}, \
+ {"BRST_COR", "OMIT", "cf_screen_burst", "PERFORM", "cf_screen_burst"}, \
+ {"APER_COR", "PERFORM", "cf_screen_jitter", "PERFORM", "cf_screen_jitter"}, \
+ {"UGTI_COR", "OMIT", "cf_set_user_gtis", "PERFORM", "cf_set_user_gtis"}, \
+ {"FLAG_COR", "PERFORM", "cf_set_photon_flags", "PERFORM", "cf_set_photon_flags"}, \
+ {"GTI__COR", "PERFORM", "cf_set_good_time_intervals", "PERFORM", "cf_set_good_time_intervals"}, \
+ {"TIME_COR", "PERFORM", "cf_modify_hist_times", "OMIT", "cf_modify_hist_times"}, \
+ {"AIRG_COR", "PERFORM", "cf_screen_airglow", "PERFORM", "cf_screen_airglow"}, \
+ {"BPIX_COR", "PERFORM", "cf_screen_bad_pixels", "PERFORM", "cf_screen_bad_pixels"}, \
+ {"PHA__COR", "OMIT", "cf_screen_pulse_height", "PERFORM", "cf_screen_pulse_height"}, \
+ {"FIND_COR", "PERFORM", "cf_find_spectra", "PERFORM", "cf_find_spectra"}, \
+ {"YMOT_COR", "OMIT", "cf_calculate_ycent_motion", "PERFORM", "cf_calculate_ycent_motion"}, \
+ {"GRAT_COR", "PERFORM", "cf_grating_motion", "PERFORM", "cf_grating_motion"}, \
+ {"FPA__COR", "PERFORM", "cf_fpa_position", "PERFORM", "cf_fpa_position"}, \
+ {"MIRR_COR", "PERFORM", "cf_mirror_motion", "PERFORM", "cf_mirror_motion"}, \
+ {"JITR_COR", "OMIT", "cf_satellite_jitter", "PERFORM", "cf_satellite_jitter"}, \
+ {"YCNT_COR", "PERFORM", "cf_calculate_y_centroid", "PERFORM", "cf_calculate_y_centroid"}, \
+ {"CHID_COR", "PERFORM", "cf_identify_channel", "PERFORM", "cf_identify_channel"}, \
+ {"TCRT_COR", "PERFORM", "cf_target_count_rate", "PERFORM", "cf_target_count_rate"}, \
+ {"ASTG_COR", "PERFORM", "cf_astigmatism", "PERFORM", "cf_astigmatism"}, \
+ {"WAVE_COR", "PERFORM", "cf_dispersion", "PERFORM", "cf_dispersion"}, \
+ {"DOPP_COR", "PERFORM", "cf_doppler_and_heliocentric", "PERFORM", "cf_doppler_and_heliocentric"}, \
+ {"FLAT_COR", "OMIT", "cf_flat_field", "OMIT", "cf_flat_field"}, \
+ {"FLUX_COR", "PERFORM", "cf_convert_to_ergs", "PERFORM", "cf_convert_to_ergs"}, \
+ {"COMB_COR", "PERFORM", "cf_coadd", "PERFORM", "cf_coadd"} \
+}
+
+
+struct cal_file_tab
+{
+ char name[5];
+ int numfiles;
+ char extension[4];
+ char filenames[3][19];
+ float aftermjd[3];
+ int interp[3];
+};
+
+#define NUMCALKEYS 28
+
+#define CALIBRATION_FILE_KEYS { \
+ {"AEFF", 2, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
+ {"AIRG", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
+ {"ASTG", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
+ {"BCHR", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
+ {"BKGD", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
+ {"CHID", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
+ {"DIGI", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
+ {"ELEC", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
+ {"FLAT", 2, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
+ {"GEOM", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
+ {"GRAT", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
+ {"HSKP", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
+ {"JITR", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
+ {"MIRR", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
+ {"PARM", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
+ {"PHAH", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
+ {"PHAX", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
+ {"QUAL", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
+ {"RATE", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
+ {"TMXY", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
+ {"SAAC", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
+ {"SCRN", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
+ {"SPEC", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
+ {"STIM", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
+ {"VOLT", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
+ {"WAVE", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
+ {"WGTS", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
+ {"WORM", 2, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}} \
+}
+
+extern int verbose_level;
+
+void cf_error_init(const char *, const char *, FILE *);
+void cf_verbose(int, const char *, ...);
+void cf_if_fits_error(int);
+void cf_if_warning(char *, ...);
+void cf_if_error(char *, ...);
+void *cf_malloc(size_t);
+void *cf_calloc(size_t, size_t);
+
+void cf_timestamp(const char *, const char *, char *);
+int cf_proc_check(fitsfile *, char *);
+int cf_proc_update(fitsfile *, char *, char *);
+int cf_fuv_init(fitsfile *);
+
+char *cf_cal_file(char *);
+char *cf_parm_file(char *);
+int eclipse(double *, double, double *);
+double geod_mag(double, double);
+double helio_vel(double, double, double);
+double lsrd_vel(double, double);
+double lsrk_vel(double, double);
+void month_day(int, int, int*, int*);
+void read_tle(fitsfile *);
+double pole_ang(double *, double *, double, double);
+double solar_ang(double, double, double);
+int saa(saareg *, double, double);
+double space_vel(double *, double, double);
+void state_geod(double *, double, double *, double *, double *);
+double state_limb(double *, double, double, double, double *,int *);
+void cf_velang(fitsfile *, double);
+int astig_check_input_image(fitsfile *);
+
+long cf_read_col(fitsfile *, int, char *, void **);
+int cf_write_col(fitsfile *, int, char *, void *, long);
+int cf_nint (double);
+long cf_nlong (double);
+
+int cf_fes_proc_check(fitsfile *, char *);
+int cf_fes_proc_update(fitsfile *, char *, char *);
+
+int cf_add_header_keywords(fitsfile *);
+long cf_get_times(fitsfile *, double **);
+int cf_get_gti(fitsfile *, double **, double **);
+int cf_get_geocorona(fitsfile *, short **, short **, short **, short **);
+int cf_get_potholes(fitsfile *, float **, float **, float **, float **);
+int cf_timeline(fitsfile *);
+int cf_set_background_limits(fitsfile *);
+long cf_extraction_limits(fitsfile *, int, int, short **, short **,
+ short*, short*);
+
+int cf_check_digitizer(fitsfile *);
+int cf_ids_dead_time(fitsfile *, long, float *, float *);
+int cf_electronics_dead_time(fitsfile *, long, float *, float *);
+int cf_fifo_dead_time(fitsfile *, long, float *, long, float *, float *,
+ float *);
+int cf_apply_dead_time(fitsfile *, long, float *, float *,
+ long, float *, float *, float *);
+int cf_thermal_distort(fitsfile *, long, float *, float *, float *,
+ unsigned char *);
+int cf_count_rate_y_distort(fitsfile *, long, float *, float *,
+ unsigned char *, long, float *, float *);
+int cf_time_xy_distort(fitsfile *, long, float *, float *, unsigned char *);
+int cf_geometric_distort(fitsfile *, long, float *, float *,
+ unsigned char *);
+int cf_modify_hist_pha(fitsfile *, long, unsigned char *, unsigned char *);
+int cf_pha_x_distort(fitsfile *, long, unsigned char *, float *,
+ unsigned char *);
+int cf_active_region(fitsfile *, long, float *, float *, unsigned char *);
+
+int cf_find_spectra(fitsfile *, long, float *, float *, float *,
+ unsigned char *, unsigned char *, unsigned char *, int);
+int cf_identify_channel(fitsfile *, long, float *, float *, unsigned char *,
+ unsigned char *, int, int);
+int cf_calculate_ycent_motion(fitsfile*, long, float*, float*,
+ unsigned char*, unsigned char*, long, float*, float*, float*);
+int cf_source_aper(fitsfile*, int*);
+int cf_grating_motion(fitsfile *, long, float *, float *, float *,
+ unsigned char *, long, float *, short *);
+int cf_fpa_position(fitsfile *, long, float *, unsigned char *);
+int cf_read_fpa_pos (fitsfile *, float *, float *);
+int cf_mirror_motion(fitsfile *, long, float *, float *, float *,
+ unsigned char *, long, float *, short *);
+int cf_satellite_jitter(fitsfile *, long, float *, float *, float *,
+ unsigned char *, long, float *, unsigned char *);
+int cf_calculate_y_centroid(fitsfile*, long, float*, float*, float*,
+ unsigned char*, unsigned char*, unsigned char*);
+int cf_target_count_rate(fitsfile *, long, float *, float *, unsigned char *,
+ unsigned char *, long, float *, float *, float *);
+int cf_screen_limb_angle(fitsfile *, long, unsigned char *, float *);
+int cf_screen_saa(fitsfile *, long, unsigned char *, float *, float *);
+int cf_screen_airglow(fitsfile *, long, float *, float *, unsigned char *);
+int cf_screen_bad_pixels(fitsfile *, long, float *, float *, unsigned char *);
+int cf_screen_burst(fitsfile *, long, float *, float *, float *,
+ unsigned char *, GTI *, long, float *, unsigned char *, float *,
+ short *);
+int cf_screen_jitter(fitsfile *, long, float *, unsigned char *);
+int cf_set_user_gtis(fitsfile *, long, float *, unsigned char *);
+int cf_screen_high_voltage(fitsfile *, long, unsigned char *, short *);
+int cf_screen_pulse_height(fitsfile *, long, unsigned char *, unsigned char *);
+int cf_set_photon_flags(fitsfile *, long, float *, float *, unsigned char *,
+ unsigned char *, long, float *, unsigned char *);
+int cf_set_good_time_intervals(fitsfile *, long, float *, unsigned char *,
+ GTI *);
+int cf_modify_hist_times(fitsfile *, long, float *, GTI *);
+int cf_astigmatism(fitsfile *, long, float *, float *, unsigned char *);
+int cf_dispersion(fitsfile *, long , float *, unsigned char *, float *);
+int cf_doppler_and_heliocentric(fitsfile *, long, float *, unsigned char *,
+ float *, long, float *, float *);
+int cf_convert_to_ergs(fitsfile *, long , float *, float *,
+ unsigned char *, float *);
+int cf_apply_filters(fitsfile *, int, long, unsigned char *, unsigned char *,
+ long, unsigned char *, long *, long *, long *, long **);
+int cf_scale_bkgd(fitsfile *, long, float *, float *, float *, unsigned char *,
+ unsigned char *, unsigned char *, long,
+ long *, long, long, int *, int *, int *, int *, int *, float **,
+ int *, int *, int *, float **);
+int cf_make_mask(fitsfile *, int, long, float *, int, int, float **);
+int cf_make_wave_array(fitsfile *, int, long *, float **);
+int cf_rebin_probability_array(fitsfile *, int, int, long, float *, int *,
+ float *, float **);
+int cf_rebin_background(fitsfile *, int, long, float *,
+ int, int, int, int, float *, float **);
+int cf_standard_or_optimal_extraction(fitsfile *, int *);
+int cf_optimal_extraction(fitsfile *, int, int, float *, float *,
+ unsigned char *, float *, long, long *, float *,
+ float *, int, float, float *, long, float *, float **,
+ float **, long **, float **, float **, short **);
+int cf_write_extracted_spectrum(fitsfile *, int, int, long, float *,
+ float *, float *, long *, float *, float *, short *, char *);
+char *cf_hist_file(char *);
diff --git a/include/cfitsio/cfortran.h b/include/cfitsio/cfortran.h
new file mode 100644
index 0000000..0688224
--- /dev/null
+++ b/include/cfitsio/cfortran.h
@@ -0,0 +1,2149 @@
+/* cfortran.h 3.9 */ /* anonymous ftp@zebra.desy.de */
+/* Burkhard Burow burow@desy.de 1990 - 1997. */
+
+#ifndef __CFORTRAN_LOADED
+#define __CFORTRAN_LOADED
+
+/*
+ THIS FILE IS PROPERTY OF BURKHARD BUROW. IF YOU ARE USING THIS FILE YOU
+ SHOULD ALSO HAVE ACCESS TO CFORTRAN.DOC WHICH PROVIDES TERMS FOR USING,
+ MODIFYING, COPYING AND DISTRIBUTING THE CFORTRAN.H PACKAGE.
+*/
+
+/*******
+ Modifications:
+ Oct 1997: Changed symbol name extname to appendus (PDW/HSTX)
+ (Conflicted with a common variable name in FTOOLS)
+ Nov 1997: If g77Fortran defined, also define f2cFortran (PDW/HSTX)
+ Nov 1997: Define MIN(A,B) as _cfMIN(A,B)
+ Feb 1998: Let VMS see the NUM_ELEMS code. Lets programs treat
+ single strings as vectors with single elements
+ *******/
+#define MIN(A,B) _cfMIN(A,B)
+
+/*
+ Avoid symbols already used by compilers and system *.h:
+ __ - OSF1 zukal06 V3.0 347 alpha, cc -c -std1 cfortest.c
+
+ */
+
+
+/* First prepare for the C compiler. */
+
+#ifndef ANSI_C_preprocessor /* i.e. user can override. */
+#ifdef __CF__KnR
+#define ANSI_C_preprocessor 0
+#else
+#ifdef __STDC__
+#define ANSI_C_preprocessor 1
+#else
+#define _cfleft 1
+#define _cfright
+#define _cfleft_cfright 0
+#define ANSI_C_preprocessor _cfleft/**/_cfright
+#endif
+#endif
+#endif
+
+#if ANSI_C_preprocessor
+#define _0(A,B) A##B
+#define _(A,B) _0(A,B) /* see cat,xcat of K&R ANSI C p. 231 */
+#define _2(A,B) A##B /* K&R ANSI C p.230: .. identifier is not replaced */
+#define _3(A,B,C) _(A,_(B,C))
+#else /* if it turns up again during rescanning. */
+#define _(A,B) A/**/B
+#define _2(A,B) A/**/B
+#define _3(A,B,C) A/**/B/**/C
+#endif
+
+#if (defined(vax)&&defined(unix)) || (defined(__vax__)&&defined(__unix__))
+#define VAXUltrix
+#endif
+
+#include <stdio.h> /* NULL [in all machines stdio.h] */
+#include <string.h> /* strlen, memset, memcpy, memchr. */
+#if !( defined(VAXUltrix) || defined(sun) || (defined(apollo)&&!defined(__STDCPP__)) )
+#include <stdlib.h> /* malloc,free */
+#else
+#include <malloc.h> /* Had to be removed for DomainOS h105 10.4 sys5.3 425t*/
+#ifdef apollo
+#define __CF__APOLLO67 /* __STDCPP__ is in Apollo 6.8 (i.e. ANSI) and onwards */
+#endif
+#endif
+
+#if !defined(__GNUC__) && !defined(__sun) && (defined(sun)||defined(VAXUltrix)||defined(lynx))
+#define __CF__KnR /* Sun, LynxOS and VAX Ultrix cc only supports K&R. */
+ /* Manually define __CF__KnR for HP if desired/required.*/
+#endif /* i.e. We will generate Kernighan and Ritchie C. */
+/* Note that you may define __CF__KnR before #include cfortran.h, in order to
+generate K&R C instead of the default ANSI C. The differences are mainly in the
+function prototypes and declarations. All machines, except the Apollo, work
+with either style. The Apollo's argument promotion rules require ANSI or use of
+the obsolete std_$call which we have not implemented here. Hence on the Apollo,
+only C calling FORTRAN subroutines will work using K&R style.*/
+
+
+/* Remainder of cfortran.h depends on the Fortran compiler. */
+
+#if defined(CLIPPERFortran) || defined(g77Fortran) /* 11/3/97 PDW */
+#define f2cFortran
+#endif
+
+/* VAX/VMS does not let us \-split long #if lines. */
+/* Split #if into 2 because some HP-UX can't handle long #if */
+#if !(defined(NAGf90Fortran)||defined(f2cFortran)||defined(hpuxFortran)||defined(apolloFortran)||defined(sunFortran)||defined(IBMR2Fortran)||defined(CRAYFortran))
+#if !(defined(mipsFortran)||defined(DECFortran)||defined(vmsFortran)||defined(CONVEXFortran)||defined(PowerStationFortran)||defined(AbsoftUNIXFortran)||defined(SXFortran))
+/* If no Fortran compiler is given, we choose one for the machines we know. */
+#if defined(lynx) || defined(VAXUltrix)
+#define f2cFortran /* Lynx: Only support f2c at the moment.
+ VAXUltrix: f77 behaves like f2c.
+ Support f2c or f77 with gcc, vcc with f2c.
+ f77 with vcc works, missing link magic for f77 I/O.*/
+#endif
+#if defined(WIN32) || defined(macintosh)
+#define f2cFortran
+#endif
+#if defined(__hpux) /* 921107: Use __hpux instead of __hp9000s300 */
+#define hpuxFortran /* Should also allow hp9000s7/800 use.*/
+#endif
+#if defined(apollo)
+#define apolloFortran /* __CF__APOLLO67 also defines some behavior. */
+#endif
+#if defined(sun) || defined(__sun)
+#define sunFortran
+#endif
+#if defined(_IBMR2)
+#define IBMR2Fortran
+#endif
+#if defined(_CRAY)
+#define CRAYFortran /* _CRAYT3E also defines some behavior. */
+#endif
+#if defined(_SX)
+#define SXFortran
+#endif
+#if defined(mips) || defined(__mips)
+#define mipsFortran
+#endif
+#if defined(vms) || defined(__vms)
+#define vmsFortran
+#endif
+#if defined(__alpha) && defined(__unix__)
+#define DECFortran
+#endif
+#if defined(__convex__)
+#define CONVEXFortran
+#endif
+#if defined(VISUAL_CPLUSPLUS)
+#define PowerStationFortran
+#endif
+#endif /* ...Fortran */
+#endif /* ...Fortran */
+
+/* Split #if into 2 because some HP-UX can't handle long #if */
+#if !(defined(NAGf90Fortran)||defined(f2cFortran)||defined(hpuxFortran)||defined(apolloFortran)||defined(sunFortran)||defined(IBMR2Fortran)||defined(CRAYFortran))
+#if !(defined(mipsFortran)||defined(DECFortran)||defined(vmsFortran)||defined(CONVEXFortran)||defined(PowerStationFortran)||defined(AbsoftUNIXFortran)||defined(SXFortran))
+/* If your compiler barfs on ' #error', replace # with the trigraph for # */
+ #error "cfortran.h: Can't find your environment among:\
+ - MIPS cc and f77 2.0. (e.g. Silicon Graphics, DECstations, ...) \
+ - IBM AIX XL C and FORTRAN Compiler/6000 Version 01.01.0000.0000 \
+ - VAX VMS CC 3.1 and FORTRAN 5.4. \
+ - Alpha VMS DEC C 1.3 and DEC FORTRAN 6.0. \
+ - Alpha OSF DEC C and DEC Fortran for OSF/1 AXP Version 1.2 \
+ - Apollo DomainOS 10.2 (sys5.3) with f77 10.7 and cc 6.7. \
+ - CRAY \
+ - NEC SX-4 SUPER-UX \
+ - CONVEX \
+ - Sun \
+ - PowerStation Fortran with Visual C++ \
+ - HP9000s300/s700/s800 Latest test with: HP-UX A.08.07 A 9000/730 \
+ - LynxOS: cc or gcc with f2c. \
+ - VAXUltrix: vcc,cc or gcc with f2c. gcc or cc with f77. \
+ - f77 with vcc works; but missing link magic for f77 I/O. \
+ - NO fort. None of gcc, cc or vcc generate required names.\
+ - f2c : Use #define f2cFortran, or cc -Df2cFortran \
+ - NAG f90: Use #define NAGf90Fortran, or cc -DNAGf90Fortran \
+ - g77 v0.5.18 for linux \
+ - Absoft UNIX F77: Use #define AbsoftUNIXFortran or cc -DAbsoftUNIXFortran"
+/* Compiler must throw us out at this point! */
+#endif
+#endif
+
+
+#if defined(VAXC) && !defined(__VAXC)
+#define OLD_VAXC
+#pragma nostandard /* Prevent %CC-I-PARAMNOTUSED. */
+#endif
+
+/* Throughout cfortran.h we use: UN = Uppercase Name. LN = Lowercase Name. */
+
+#if defined(f2cFortran) || defined(NAGf90Fortran) || defined(DECFortran) || defined(mipsFortran) || defined(apolloFortran) || defined(sunFortran) || defined(CONVEXFortran) || defined(SXFortran) || defined(appendus) /* 10/31/97 PDW */
+#define CFC_(UN,LN) _(LN,_) /* Lowercase FORTRAN symbols. */
+#define orig_fcallsc(UN,LN) CFC_(UN,LN)
+#else
+#if defined(CRAYFortran) || defined(PowerStationFortran)
+#ifdef _CRAY /* (UN), not UN, circumvents CRAY preprocessor bug. */
+#define CFC_(UN,LN) (UN) /* Uppercase FORTRAN symbols. */
+#else /* At least VISUAL_CPLUSPLUS barfs on (UN), so need UN. */
+#define CFC_(UN,LN) UN /* Uppercase FORTRAN symbols. */
+#endif
+#define orig_fcallsc(UN,LN) CFC_(UN,LN) /* CRAY insists on arg.'s here. */
+#else /* For following machines one may wish to change the fcallsc default. */
+#define CF_SAME_NAMESPACE
+#ifdef vmsFortran
+#define CFC_(UN,LN) LN /* Either case FORTRAN symbols. */
+ /* BUT we usually use UN for C macro to FORTRAN routines, so use LN here,*/
+ /* because VAX/VMS doesn't do recursive macros. */
+#define orig_fcallsc(UN,LN) UN
+#else /* HP-UX without +ppu or IBMR2 without -qextname. NOT reccomended. */
+#define CFC_(UN,LN) LN /* Lowercase FORTRAN symbols. */
+#define orig_fcallsc(UN,LN) CFC_(UN,LN)
+#endif /* vmsFortran */
+#endif /* CRAYFortran PowerStationFortran */
+#endif /* ....Fortran */
+
+#define fcallsc(UN,LN) orig_fcallsc(UN,LN)
+#define preface_fcallsc(P,p,UN,LN) CFC_(_(P,UN),_(p,LN))
+#define append_fcallsc(P,p,UN,LN) CFC_(_(UN,P),_(LN,p))
+
+#define C_FUNCTION(UN,LN) fcallsc(UN,LN)
+#define FORTRAN_FUNCTION(UN,LN) CFC_(UN,LN)
+
+#ifndef COMMON_BLOCK
+#ifndef CONVEXFortran
+#ifndef CLIPPERFortran
+#ifndef AbsoftUNIXFortran
+#define COMMON_BLOCK(UN,LN) CFC_(UN,LN)
+#else
+#define COMMON_BLOCK(UN,LN) _(_C,LN)
+#endif
+#else
+#define COMMON_BLOCK(UN,LN) _(LN,__)
+#endif
+#else
+#define COMMON_BLOCK(UN,LN) _3(_,LN,_)
+#endif
+#endif
+
+#ifndef DOUBLE_PRECISION
+#if defined(CRAYFortran) && !defined(_CRAYT3E)
+#define DOUBLE_PRECISION long double
+#else
+#define DOUBLE_PRECISION double
+#endif
+#endif
+
+#ifndef FORTRAN_REAL
+#if defined(CRAYFortran) && defined(_CRAYT3E)
+#define FORTRAN_REAL double
+#else
+#define FORTRAN_REAL float
+#endif
+#endif
+
+#ifdef CRAYFortran
+#ifdef _CRAY
+#include <fortran.h>
+#else
+#include "fortran.h" /* i.e. if crosscompiling assume user has file. */
+#endif
+#define FLOATVVVVVVV_cfPP (FORTRAN_REAL *) /* Used for C calls FORTRAN. */
+/* CRAY's double==float but CRAY says pointers to doubles and floats are diff.*/
+#define VOIDP (void *) /* When FORTRAN calls C, we don't know if C routine
+ arg.'s have been declared float *, or double *. */
+#else
+#define FLOATVVVVVVV_cfPP
+#define VOIDP
+#endif
+
+#ifdef vmsFortran
+#if defined(vms) || defined(__vms)
+#include <descrip.h>
+#else
+#include "descrip.h" /* i.e. if crosscompiling assume user has file. */
+#endif
+#endif
+
+#ifdef sunFortran
+#if defined(sun) || defined(__sun)
+#include <math.h> /* Sun's FLOATFUNCTIONTYPE, ASSIGNFLOAT, RETURNFLOAT. */
+#else
+#include "math.h" /* i.e. if crosscompiling assume user has file. */
+#endif
+/* At least starting with the default C compiler SC3.0.1 of SunOS 5.3,
+ * FLOATFUNCTIONTYPE, ASSIGNFLOAT, RETURNFLOAT are not required and not in
+ * <math.h>, since sun C no longer promotes C float return values to doubles.
+ * Therefore, only use them if defined.
+ * Even if gcc is being used, assume that it exhibits the Sun C compiler
+ * behavior in order to be able to use *.o from the Sun C compiler.
+ * i.e. If FLOATFUNCTIONTYPE, etc. are in math.h, they required by gcc.
+ */
+#endif
+
+#ifndef apolloFortran
+#define COMMON_BLOCK_DEF(DEFINITION, NAME) extern DEFINITION NAME
+#define CF_NULL_PROTO
+#else /* HP doesn't understand #elif. */
+/* Without ANSI prototyping, Apollo promotes float functions to double. */
+/* Note that VAX/VMS, IBM, Mips choke on 'type function(...);' prototypes. */
+#define CF_NULL_PROTO ...
+#ifndef __CF__APOLLO67
+#define COMMON_BLOCK_DEF(DEFINITION, NAME) \
+ DEFINITION NAME __attribute((__section(NAME)))
+#else
+#define COMMON_BLOCK_DEF(DEFINITION, NAME) \
+ DEFINITION NAME #attribute[section(NAME)]
+#endif
+#endif
+
+#ifdef __cplusplus
+#undef CF_NULL_PROTO
+#define CF_NULL_PROTO ...
+#endif
+
+#ifdef mipsFortran
+#define CF_DECLARE_GETARG int f77argc; char **f77argv
+#define CF_SET_GETARG(ARGC,ARGV) f77argc = ARGC; f77argv = ARGV
+#else
+#define CF_DECLARE_GETARG
+#define CF_SET_GETARG(ARGC,ARGV)
+#endif
+
+#ifdef OLD_VAXC /* Allow %CC-I-PARAMNOTUSED. */
+#pragma standard
+#endif
+
+#define ACOMMA ,
+#define ACOLON ;
+
+/*-------------------------------------------------------------------------*/
+
+/* UTILITIES USED WITHIN CFORTRAN.H */
+
+#define _cfMIN(A,B) (A<B?A:B)
+#ifndef FALSE
+#define FALSE (1==0)
+#endif
+
+/* 970211 - XIX.145:
+ firstindexlength - better name is all_but_last_index_lengths
+ secondindexlength - better name is last_index_length
+ */
+#define firstindexlength(A) (sizeof(A[0])==1 ? 1 : (sizeof(A) / sizeof(A[0])) )
+#define secondindexlength(A) (sizeof(A[0])==1 ? sizeof(A) : sizeof(A[0]) )
+
+/* Behavior of FORTRAN LOGICAL. All machines' LOGICAL is same size as C's int.
+Conversion is automatic except for arrays which require F2CLOGICALV/C2FLOGICALV.
+f2c, MIPS f77 [DECstation, SGI], VAX Ultrix f77,
+HP-UX f77 : as in C.
+VAX/VMS FORTRAN, VAX Ultrix fort,
+Absoft Unix Fortran, IBM RS/6000 xlf : LS Bit = 0/1 = TRUE/FALSE.
+Apollo : neg. = TRUE, else FALSE.
+[Apollo accepts -1 as TRUE for function values, but NOT all other neg. values.]
+[DECFortran for Ultrix RISC is also called f77 but is the same as VAX/VMS.]
+[MIPS f77 treats .eqv./.neqv. as .eq./.ne. and hence requires LOGICAL_STRICT.]*/
+
+#if defined(NAGf90Fortran) || defined(f2cFortran) || defined(mipsFortran) || defined(PowerStationFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran) || defined(SXFortran)
+/* SX/PowerStationFortran have 0 and 1 defined, others are neither T nor F. */
+/* hpuxFortran800 has 0 and 0x01000000 defined. Others are unknown. */
+#define LOGICAL_STRICT /* Other Fortran have .eqv./.neqv. == .eq./.ne. */
+#endif
+
+#define C2FLOGICALV(A,I) \
+ do {int __i; for(__i=0;__i<I;__i++) A[__i]=C2FLOGICAL(A[__i]); } while (FALSE)
+#define F2CLOGICALV(A,I) \
+ do {int __i; for(__i=0;__i<I;__i++) A[__i]=F2CLOGICAL(A[__i]); } while (FALSE)
+
+#if defined(apolloFortran)
+#define C2FLOGICAL(L) ((L)?-1:(L)&~((unsigned)1<<sizeof(int)*8-1))
+#define F2CLOGICAL(L) ((L)<0?(L):0)
+#else
+#if defined(CRAYFortran)
+#define C2FLOGICAL(L) _btol(L)
+#define F2CLOGICAL(L) _ltob(&(L)) /* Strangely _ltob() expects a pointer. */
+#else
+#if defined(IBMR2Fortran) || defined(vmsFortran) || defined(DECFortran) || defined(AbsoftUNIXFortran)
+#define C2FLOGICAL(L) ((L)?(L)|1:(L)&~(int)1)
+#define F2CLOGICAL(L) ((L)&1?(L):0)
+#else
+#if defined(CONVEXFortran)
+#define C2FLOGICAL(L) ((L) ? ~0 : 0 )
+#define F2CLOGICAL(L) (L)
+#else /* others evaluate LOGICALs as for C. */
+#define C2FLOGICAL(L) (L)
+#define F2CLOGICAL(L) (L)
+#ifndef LOGICAL_STRICT
+#undef C2FLOGICALV
+#undef F2CLOGICALV
+#define C2FLOGICALV(A,I)
+#define F2CLOGICALV(A,I)
+#endif /* LOGICAL_STRICT */
+#endif /* CONVEXFortran || All Others */
+#endif /* IBMR2Fortran vmsFortran DECFortran AbsoftUNIXFortran */
+#endif /* CRAYFortran */
+#endif /* apolloFortran */
+
+/* 970514 - In addition to CRAY, there may be other machines
+ for which LOGICAL_STRICT makes no sense. */
+#if defined(LOGICAL_STRICT) && !defined(CRAYFortran)
+/* Force C2FLOGICAL to generate only the values for either .TRUE. or .FALSE.
+ SX/PowerStationFortran only have 0 and 1 defined.
+ Elsewhere, only needed if you want to do:
+ logical lvariable
+ if (lvariable .eq. .true.) then ! (1)
+ instead of
+ if (lvariable .eqv. .true.) then ! (2)
+ - (1) may not even be FORTRAN/77 and that Apollo's f77 and IBM's xlf
+ refuse to compile (1), so you are probably well advised to stay away from
+ (1) and from LOGICAL_STRICT.
+ - You pay a (slight) performance penalty for using LOGICAL_STRICT. */
+#undef C2FLOGICAL
+#ifdef hpuxFortran800
+#define C2FLOGICAL(L) ((L)?0x01000000:0)
+#else
+#if defined(apolloFortran) || defined(vmsFortran) || defined(DECFortran)
+#define C2FLOGICAL(L) ((L)?-1:0) /* These machines use -1/0 for .true./.false.*/
+#else
+#define C2FLOGICAL(L) ((L)? 1:0) /* All others use +1/0 for .true./.false.*/
+#endif
+#endif
+#endif /* LOGICAL_STRICT */
+
+/* Convert a vector of C strings into FORTRAN strings. */
+#ifndef __CF__KnR
+static char *c2fstrv(char* cstr, char *fstr, int elem_len, int sizeofcstr)
+#else
+static char *c2fstrv( cstr, fstr, elem_len, sizeofcstr)
+ char* cstr; char *fstr; int elem_len; int sizeofcstr;
+#endif
+{ int i,j;
+/* elem_len includes \0 for C strings. Fortran strings don't have term. \0.
+ Useful size of string must be the same in both languages. */
+for (i=0; i<sizeofcstr/elem_len; i++) {
+ for (j=1; j<elem_len && *cstr; j++) *fstr++ = *cstr++;
+ cstr += 1+elem_len-j;
+ for (; j<elem_len; j++) *fstr++ = ' ';
+} /* 95109 - Seems to be returning the original fstr. */
+return fstr-sizeofcstr+sizeofcstr/elem_len; }
+
+/* Convert a vector of FORTRAN strings into C strings. */
+#ifndef __CF__KnR
+static char *f2cstrv(char *fstr, char* cstr, int elem_len, int sizeofcstr)
+#else
+static char *f2cstrv( fstr, cstr, elem_len, sizeofcstr)
+ char *fstr; char* cstr; int elem_len; int sizeofcstr;
+#endif
+{ int i,j;
+/* elem_len includes \0 for C strings. Fortran strings don't have term. \0.
+ Useful size of string must be the same in both languages. */
+cstr += sizeofcstr;
+fstr += sizeofcstr - sizeofcstr/elem_len;
+for (i=0; i<sizeofcstr/elem_len; i++) {
+ *--cstr = '\0';
+ for (j=1; j<elem_len; j++) *--cstr = *--fstr;
+} return cstr; }
+
+/* kill the trailing char t's in string s. */
+#ifndef __CF__KnR
+static char *kill_trailing(char *s, char t)
+#else
+static char *kill_trailing( s, t) char *s; char t;
+#endif
+{char *e;
+e = s + strlen(s);
+if (e>s) { /* Need this to handle NULL string.*/
+ while (e>s && *--e==t); /* Don't follow t's past beginning. */
+ e[*e==t?0:1] = '\0'; /* Handle s[0]=t correctly. */
+} return s; }
+
+/* kill_trailingn(s,t,e) will kill the trailing t's in string s. e normally
+points to the terminating '\0' of s, but may actually point to anywhere in s.
+s's new '\0' will be placed at e or earlier in order to remove any trailing t's.
+If e<s string s is left unchanged. */
+#ifndef __CF__KnR
+static char *kill_trailingn(char *s, char t, char *e)
+#else
+static char *kill_trailingn( s, t, e) char *s; char t; char *e;
+#endif
+{
+if (e==s) *e = '\0'; /* Kill the string makes sense here.*/
+else if (e>s) { /* Watch out for neg. length string.*/
+ while (e>s && *--e==t); /* Don't follow t's past beginning. */
+ e[*e==t?0:1] = '\0'; /* Handle s[0]=t correctly. */
+} return s; }
+
+/* Note the following assumes that any element which has t's to be chopped off,
+does indeed fill the entire element. */
+#ifndef __CF__KnR
+static char *vkill_trailing(char* cstr, int elem_len, int sizeofcstr, char t)
+#else
+static char *vkill_trailing( cstr, elem_len, sizeofcstr, t)
+ char* cstr; int elem_len; int sizeofcstr; char t;
+#endif
+{ int i;
+for (i=0; i<sizeofcstr/elem_len; i++) /* elem_len includes \0 for C strings. */
+ kill_trailingn(cstr+elem_len*i,t,cstr+elem_len*(i+1)-1);
+return cstr; }
+
+#ifdef vmsFortran
+typedef struct dsc$descriptor_s fstring;
+#define DSC$DESCRIPTOR_A(DIMCT) \
+struct { \
+ unsigned short dsc$w_length; unsigned char dsc$b_dtype; \
+ unsigned char dsc$b_class; char *dsc$a_pointer; \
+ char dsc$b_scale; unsigned char dsc$b_digits; \
+ struct { \
+ unsigned : 3; unsigned dsc$v_fl_binscale : 1; \
+ unsigned dsc$v_fl_redim : 1; unsigned dsc$v_fl_column : 1; \
+ unsigned dsc$v_fl_coeff : 1; unsigned dsc$v_fl_bounds : 1; \
+ } dsc$b_aflags; \
+ unsigned char dsc$b_dimct; unsigned long dsc$l_arsize; \
+ char *dsc$a_a0; long dsc$l_m [DIMCT]; \
+ struct { \
+ long dsc$l_l; long dsc$l_u; \
+ } dsc$bounds [DIMCT]; \
+}
+
+typedef DSC$DESCRIPTOR_A(1) fstringvector;
+/*typedef DSC$DESCRIPTOR_A(2) fstringarrarr;
+ typedef DSC$DESCRIPTOR_A(3) fstringarrarrarr;*/
+#define initfstr(F,C,ELEMNO,ELEMLEN) \
+( (F).dsc$l_arsize= ( (F).dsc$w_length =(ELEMLEN) ) \
+ *( (F).dsc$l_m[0]=(F).dsc$bounds[0].dsc$l_u=(ELEMNO) ), \
+ (F).dsc$a_a0 = ( (F).dsc$a_pointer=(C) ) - (F).dsc$w_length ,(F))
+
+#endif /* PDW: 2/10/98 -- Let VMS see NUM_ELEMS definitions */
+#define _NUM_ELEMS -1
+#define _NUM_ELEM_ARG -2
+#define NUM_ELEMS(A) A,_NUM_ELEMS
+#define NUM_ELEM_ARG(B) *_2(A,B),_NUM_ELEM_ARG
+#define TERM_CHARS(A,B) A,B
+#ifndef __CF__KnR
+static int num_elem(char *strv, unsigned elem_len, int term_char, int num_term)
+#else
+static int num_elem( strv, elem_len, term_char, num_term)
+ char *strv; unsigned elem_len; int term_char; int num_term;
+#endif
+/* elem_len is the number of characters in each element of strv, the FORTRAN
+vector of strings. The last element of the vector must begin with at least
+num_term term_char characters, so that this routine can determine how
+many elements are in the vector. */
+{
+unsigned num,i;
+if (num_term == _NUM_ELEMS || num_term == _NUM_ELEM_ARG)
+ return term_char;
+if (num_term <=0) num_term = (int)elem_len;
+for (num=0; ; num++) {
+ for (i=0; i<(unsigned)num_term && *strv==term_char; i++,strv++);
+ if (i==(unsigned)num_term) break;
+ else strv += elem_len-i;
+}
+return (int)num;
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* UTILITIES FOR C TO USE STRINGS IN FORTRAN COMMON BLOCKS */
+
+/* C string TO Fortran Common Block STRing. */
+/* DIM is the number of DIMensions of the array in terms of strings, not
+ characters. e.g. char a[12] has DIM = 0, char a[12][4] has DIM = 1, etc. */
+#define C2FCBSTR(CSTR,FSTR,DIM) \
+ c2fstrv((char *)CSTR, (char *)FSTR, sizeof(FSTR)/cfelementsof(FSTR,DIM)+1, \
+ sizeof(FSTR)+cfelementsof(FSTR,DIM))
+
+/* Fortran Common Block string TO C STRing. */
+#define FCB2CSTR(FSTR,CSTR,DIM) \
+ vkill_trailing(f2cstrv((char *)FSTR, (char *)CSTR, \
+ sizeof(FSTR)/cfelementsof(FSTR,DIM)+1, \
+ sizeof(FSTR)+cfelementsof(FSTR,DIM)), \
+ sizeof(FSTR)/cfelementsof(FSTR,DIM)+1, \
+ sizeof(FSTR)+cfelementsof(FSTR,DIM), ' ')
+
+#define cfDEREFERENCE0
+#define cfDEREFERENCE1 *
+#define cfDEREFERENCE2 **
+#define cfDEREFERENCE3 ***
+#define cfDEREFERENCE4 ****
+#define cfDEREFERENCE5 *****
+#define cfelementsof(A,D) (sizeof(A)/sizeof(_(cfDEREFERENCE,D)(A)))
+
+/*-------------------------------------------------------------------------*/
+
+/* UTILITIES FOR C TO CALL FORTRAN SUBROUTINES */
+
+/* Define lookup tables for how to handle the various types of variables. */
+
+#ifdef OLD_VAXC /* Prevent %CC-I-PARAMNOTUSED. */
+#pragma nostandard
+#endif
+
+#define ZTRINGV_NUM(I) I
+#define ZTRINGV_ARGFP(I) (*(_2(A,I))) /* Undocumented. For PINT, etc. */
+#define ZTRINGV_ARGF(I) _2(A,I)
+#ifdef CFSUBASFUN
+#define ZTRINGV_ARGS(I) ZTRINGV_ARGF(I)
+#else
+#define ZTRINGV_ARGS(I) _2(B,I)
+#endif
+
+#define PBYTE_cfVP(A,B) PINT_cfVP(A,B)
+#define PDOUBLE_cfVP(A,B)
+#define PFLOAT_cfVP(A,B)
+#ifdef ZTRINGV_ARGS_allows_Pvariables
+/* This allows Pvariables for ARGS. ARGF machinery is above ARGFP.
+ * B is not needed because the variable may be changed by the Fortran routine,
+ * but because B is the only way to access an arbitrary macro argument. */
+#define PINT_cfVP(A,B) int B = (int)A; /* For ZSTRINGV_ARGS */
+#else
+#define PINT_cfVP(A,B)
+#endif
+#define PLOGICAL_cfVP(A,B) int *B; /* Returning LOGICAL in FUNn and SUBn */
+#define PLONG_cfVP(A,B) PINT_cfVP(A,B)
+#define PSHORT_cfVP(A,B) PINT_cfVP(A,B)
+
+#define VCF_INT_S(T,A,B) _(T,VVVVVVV_cfTYPE) B = A;
+#define VCF_INT_F(T,A,B) _(T,_cfVCF)(A,B)
+/* _cfVCF table is directly mapped to _cfCCC table. */
+#define BYTE_cfVCF(A,B)
+#define DOUBLE_cfVCF(A,B)
+#if !defined(__CF__KnR)
+#define FLOAT_cfVCF(A,B)
+#else
+#define FLOAT_cfVCF(A,B) FORTRAN_REAL B = A;
+#endif
+#define INT_cfVCF(A,B)
+#define LOGICAL_cfVCF(A,B)
+#define LONG_cfVCF(A,B)
+#define SHORT_cfVCF(A,B)
+
+#define VCF(TN,I) _Icf4(4,V,TN,_(A,I),_(B,I),F)
+#define VVCF(TN,AI,BI) _Icf4(4,V,TN,AI,BI,S)
+#define INT_cfV(T,A,B,F) _(VCF_INT_,F)(T,A,B)
+#define INTV_cfV(T,A,B,F)
+#define INTVV_cfV(T,A,B,F)
+#define INTVVV_cfV(T,A,B,F)
+#define INTVVVV_cfV(T,A,B,F)
+#define INTVVVVV_cfV(T,A,B,F)
+#define INTVVVVVV_cfV(T,A,B,F)
+#define INTVVVVVVV_cfV(T,A,B,F)
+#define PINT_cfV( T,A,B,F) _(T,_cfVP)(A,B)
+#define PVOID_cfV( T,A,B,F)
+#if defined(apolloFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran)
+#define ROUTINE_cfV(T,A,B,F) void (*B)(CF_NULL_PROTO) = (void (*)(CF_NULL_PROTO))A;
+#else
+#define ROUTINE_cfV(T,A,B,F)
+#endif
+#define SIMPLE_cfV(T,A,B,F)
+#ifdef vmsFortran
+#define STRING_cfV(T,A,B,F) static struct {fstring f; unsigned clen;} B = \
+ {{0,DSC$K_DTYPE_T,DSC$K_CLASS_S,NULL},0};
+#define PSTRING_cfV(T,A,B,F) static fstring B={0,DSC$K_DTYPE_T,DSC$K_CLASS_S,NULL};
+#define STRINGV_cfV(T,A,B,F) static fstringvector B = \
+ {sizeof(A),DSC$K_DTYPE_T,DSC$K_CLASS_A,NULL,0,0,{0,0,1,1,1},1,0,NULL,0,{1,0}};
+#define PSTRINGV_cfV(T,A,B,F) static fstringvector B = \
+ {0,DSC$K_DTYPE_T,DSC$K_CLASS_A,NULL,0,0,{0,0,1,1,1},1,0,NULL,0,{1,0}};
+#else
+#define STRING_cfV(T,A,B,F) struct {unsigned int clen, flen;} B;
+#define STRINGV_cfV(T,A,B,F) struct {char *s, *fs; unsigned flen;} B;
+#define PSTRING_cfV(T,A,B,F) int B;
+#define PSTRINGV_cfV(T,A,B,F) struct{char *fs; unsigned int sizeofA,flen;}B;
+#endif
+#define ZTRINGV_cfV(T,A,B,F) STRINGV_cfV(T,A,B,F)
+#define PZTRINGV_cfV(T,A,B,F) PSTRINGV_cfV(T,A,B,F)
+
+/* Note that the actions of the A table were performed inside the AA table.
+ VAX Ultrix vcc, and HP-UX cc, didn't evaluate arguments to functions left to
+ right, so we had to split the original table into the current robust two. */
+#define ACF(NAME,TN,AI,I) _(TN,_cfSTR)(4,A,NAME,I,AI,_(B,I),0)
+#define DEFAULT_cfA(M,I,A,B)
+#define LOGICAL_cfA(M,I,A,B) B=C2FLOGICAL(B);
+#define PLOGICAL_cfA(M,I,A,B) A=C2FLOGICAL(A);
+#define STRING_cfA(M,I,A,B) STRING_cfC(M,I,A,B,sizeof(A))
+#define PSTRING_cfA(M,I,A,B) PSTRING_cfC(M,I,A,B,sizeof(A))
+#ifdef vmsFortran
+#define AATRINGV_cfA( A,B, sA,filA,silA) \
+ initfstr(B,(char *)malloc((sA)-(filA)),(filA),(silA)-1), \
+ c2fstrv(A,B.dsc$a_pointer,(silA),(sA));
+#define APATRINGV_cfA( A,B, sA,filA,silA) \
+ initfstr(B,A,(filA),(silA)-1),c2fstrv(A,A,(silA),(sA));
+#else
+#define AATRINGV_cfA( A,B, sA,filA,silA) \
+ (B.s=(char *)malloc((sA)-(filA)),B.fs=c2fstrv(A,B.s,(B.flen=(silA)-1)+1,(sA)));
+#define APATRINGV_cfA( A,B, sA,filA,silA) \
+ B.fs=c2fstrv(A,A,(B.flen=(silA)-1)+1,B.sizeofA=(sA));
+#endif
+#define STRINGV_cfA(M,I,A,B) \
+ AATRINGV_cfA((char *)A,B,sizeof(A),firstindexlength(A),secondindexlength(A))
+#define PSTRINGV_cfA(M,I,A,B) \
+ APATRINGV_cfA((char *)A,B,sizeof(A),firstindexlength(A),secondindexlength(A))
+#define ZTRINGV_cfA(M,I,A,B) AATRINGV_cfA( (char *)A,B, \
+ (_3(M,_ELEMS_,I))*(( _3(M,_ELEMLEN_,I))+1), \
+ (_3(M,_ELEMS_,I)),(_3(M,_ELEMLEN_,I))+1)
+#define PZTRINGV_cfA(M,I,A,B) APATRINGV_cfA( (char *)A,B, \
+ (_3(M,_ELEMS_,I))*(( _3(M,_ELEMLEN_,I))+1), \
+ (_3(M,_ELEMS_,I)),(_3(M,_ELEMLEN_,I))+1)
+
+#define PBYTE_cfAAP(A,B) &A
+#define PDOUBLE_cfAAP(A,B) &A
+#define PFLOAT_cfAAP(A,B) FLOATVVVVVVV_cfPP &A
+#define PINT_cfAAP(A,B) &A
+#define PLOGICAL_cfAAP(A,B) B= &A /* B used to keep a common W table. */
+#define PLONG_cfAAP(A,B) &A
+#define PSHORT_cfAAP(A,B) &A
+
+#define AACF(TN,AI,I,C) _SEP_(TN,C,COMMA) _Icf(3,AA,TN,AI,_(B,I))
+#define INT_cfAA(T,A,B) &B
+#define INTV_cfAA(T,A,B) _(T,VVVVVV_cfPP) A
+#define INTVV_cfAA(T,A,B) _(T,VVVVV_cfPP) A[0]
+#define INTVVV_cfAA(T,A,B) _(T,VVVV_cfPP) A[0][0]
+#define INTVVVV_cfAA(T,A,B) _(T,VVV_cfPP) A[0][0][0]
+#define INTVVVVV_cfAA(T,A,B) _(T,VV_cfPP) A[0][0][0][0]
+#define INTVVVVVV_cfAA(T,A,B) _(T,V_cfPP) A[0][0][0][0][0]
+#define INTVVVVVVV_cfAA(T,A,B) _(T,_cfPP) A[0][0][0][0][0][0]
+#define PINT_cfAA(T,A,B) _(T,_cfAAP)(A,B)
+#define PVOID_cfAA(T,A,B) (void *) A
+#if defined(apolloFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran)
+#define ROUTINE_cfAA(T,A,B) &B
+#else
+#define ROUTINE_cfAA(T,A,B) (void(*)(CF_NULL_PROTO))A
+#endif
+#define STRING_cfAA(T,A,B) STRING_cfCC(T,A,B)
+#define PSTRING_cfAA(T,A,B) PSTRING_cfCC(T,A,B)
+#ifdef vmsFortran
+#define STRINGV_cfAA(T,A,B) &B
+#else
+#ifdef CRAYFortran
+#define STRINGV_cfAA(T,A,B) _cptofcd(B.fs,B.flen)
+#else
+#define STRINGV_cfAA(T,A,B) B.fs
+#endif
+#endif
+#define PSTRINGV_cfAA(T,A,B) STRINGV_cfAA(T,A,B)
+#define ZTRINGV_cfAA(T,A,B) STRINGV_cfAA(T,A,B)
+#define PZTRINGV_cfAA(T,A,B) STRINGV_cfAA(T,A,B)
+
+#if defined(vmsFortran) || defined(CRAYFortran)
+#define JCF(TN,I)
+#define KCF(TN,I)
+#else
+#define JCF(TN,I) _(TN,_cfSTR)(1,J,_(B,I), 0,0,0,0)
+#if defined(AbsoftUNIXFortran)
+#define DEFAULT_cfJ(B) ,0
+#else
+#define DEFAULT_cfJ(B)
+#endif
+#define LOGICAL_cfJ(B) DEFAULT_cfJ(B)
+#define PLOGICAL_cfJ(B) DEFAULT_cfJ(B)
+#define STRING_cfJ(B) ,B.flen
+#define PSTRING_cfJ(B) ,B
+#define STRINGV_cfJ(B) STRING_cfJ(B)
+#define PSTRINGV_cfJ(B) STRING_cfJ(B)
+#define ZTRINGV_cfJ(B) STRING_cfJ(B)
+#define PZTRINGV_cfJ(B) STRING_cfJ(B)
+
+/* KCF is identical to DCF, except that KCF ZTRING is not empty. */
+#define KCF(TN,I) _(TN,_cfSTR)(1,KK,_(B,I), 0,0,0,0)
+#if defined(AbsoftUNIXFortran)
+#define DEFAULT_cfKK(B) , unsigned B
+#else
+#define DEFAULT_cfKK(B)
+#endif
+#define LOGICAL_cfKK(B) DEFAULT_cfKK(B)
+#define PLOGICAL_cfKK(B) DEFAULT_cfKK(B)
+#define STRING_cfKK(B) , unsigned B
+#define PSTRING_cfKK(B) STRING_cfKK(B)
+#define STRINGV_cfKK(B) STRING_cfKK(B)
+#define PSTRINGV_cfKK(B) STRING_cfKK(B)
+#define ZTRINGV_cfKK(B) STRING_cfKK(B)
+#define PZTRINGV_cfKK(B) STRING_cfKK(B)
+#endif
+
+#define WCF(TN,AN,I) _(TN,_cfSTR)(2,W,AN,_(B,I), 0,0,0)
+#define DEFAULT_cfW(A,B)
+#define LOGICAL_cfW(A,B)
+#define PLOGICAL_cfW(A,B) *B=F2CLOGICAL(*B);
+#define STRING_cfW(A,B) (A[B.clen]!='\0'?A[B.clen]='\0':0); /* A?="constnt"*/
+#define PSTRING_cfW(A,B) kill_trailing(A,' ');
+#ifdef vmsFortran
+#define STRINGV_cfW(A,B) free(B.dsc$a_pointer);
+#define PSTRINGV_cfW(A,B) \
+ vkill_trailing(f2cstrv((char*)A, (char*)A, \
+ B.dsc$w_length+1, B.dsc$l_arsize+B.dsc$l_m[0]), \
+ B.dsc$w_length+1, B.dsc$l_arsize+B.dsc$l_m[0], ' ');
+#else
+#define STRINGV_cfW(A,B) free(B.s);
+#define PSTRINGV_cfW(A,B) vkill_trailing( \
+ f2cstrv((char*)A,(char*)A,B.flen+1,B.sizeofA), B.flen+1,B.sizeofA,' ');
+#endif
+#define ZTRINGV_cfW(A,B) STRINGV_cfW(A,B)
+#define PZTRINGV_cfW(A,B) PSTRINGV_cfW(A,B)
+
+#define NCF(TN,I,C) _SEP_(TN,C,COMMA) _Icf(2,N,TN,_(A,I),0)
+#define NNCF(TN,I,C) UUCF(TN,I,C)
+#define NNNCF(TN,I,C) _SEP_(TN,C,COLON) _Icf(2,N,TN,_(A,I),0)
+#define INT_cfN(T,A) _(T,VVVVVVV_cfTYPE) * A
+#define INTV_cfN(T,A) _(T,VVVVVV_cfTYPE) * A
+#define INTVV_cfN(T,A) _(T,VVVVV_cfTYPE) * A
+#define INTVVV_cfN(T,A) _(T,VVVV_cfTYPE) * A
+#define INTVVVV_cfN(T,A) _(T,VVV_cfTYPE) * A
+#define INTVVVVV_cfN(T,A) _(T,VV_cfTYPE) * A
+#define INTVVVVVV_cfN(T,A) _(T,V_cfTYPE) * A
+#define INTVVVVVVV_cfN(T,A) _(T,_cfTYPE) * A
+#define PINT_cfN(T,A) _(T,_cfTYPE) * A
+#define PVOID_cfN(T,A) void * A
+#if defined(apolloFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran)
+#define ROUTINE_cfN(T,A) void (**A)(CF_NULL_PROTO)
+#else
+#define ROUTINE_cfN(T,A) void ( *A)(CF_NULL_PROTO)
+#endif
+#ifdef vmsFortran
+#define STRING_cfN(T,A) fstring * A
+#define STRINGV_cfN(T,A) fstringvector * A
+#else
+#ifdef CRAYFortran
+#define STRING_cfN(T,A) _fcd A
+#define STRINGV_cfN(T,A) _fcd A
+#else
+#define STRING_cfN(T,A) char * A
+#define STRINGV_cfN(T,A) char * A
+#endif
+#endif
+#define PSTRING_cfN(T,A) STRING_cfN(T,A) /* CRAY insists on arg.'s here. */
+#define PNSTRING_cfN(T,A) STRING_cfN(T,A) /* CRAY insists on arg.'s here. */
+#define PPSTRING_cfN(T,A) STRING_cfN(T,A) /* CRAY insists on arg.'s here. */
+#define PSTRINGV_cfN(T,A) STRINGV_cfN(T,A)
+#define ZTRINGV_cfN(T,A) STRINGV_cfN(T,A)
+#define PZTRINGV_cfN(T,A) PSTRINGV_cfN(T,A)
+
+
+/* Apollo 6.7, CRAY, old Sun, VAX/Ultrix vcc/cc and new ultrix
+ can't hack more than 31 arg's.
+ e.g. ultrix >= 4.3 gives message:
+ zow35> cc -c -DDECFortran cfortest.c
+ cfe: Fatal: Out of memory: cfortest.c
+ zow35>
+ Old __hpux had the problem, but new 'HP-UX A.09.03 A 9000/735' is fine
+ if using -Aa, otherwise we have a problem.
+ */
+#ifndef MAX_PREPRO_ARGS
+#if !defined(__GNUC__) && (defined(VAXUltrix) || defined(__CF__APOLLO67) || (defined(sun)&&!defined(__sun)) || defined(_CRAY) || defined(__ultrix__) || (defined(__hpux)&&defined(__CF__KnR)))
+#define MAX_PREPRO_ARGS 31
+#else
+#define MAX_PREPRO_ARGS 99
+#endif
+#endif
+
+#if defined(AbsoftUNIXFortran)
+/* In addition to explicit Absoft stuff, only Absoft requires:
+ - DEFAULT coming from _cfSTR.
+ DEFAULT could have been called e.g. INT, but keep it for clarity.
+ - M term in CFARGT14 and CFARGT14FS.
+ */
+#define ABSOFT_cf1(T0) _(T0,_cfSTR)(0,ABSOFT1,0,0,0,0,0)
+#define ABSOFT_cf2(T0) _(T0,_cfSTR)(0,ABSOFT2,0,0,0,0,0)
+#define ABSOFT_cf3(T0) _(T0,_cfSTR)(0,ABSOFT3,0,0,0,0,0)
+#define DEFAULT_cfABSOFT1
+#define LOGICAL_cfABSOFT1
+#define STRING_cfABSOFT1 ,MAX_LEN_FORTRAN_FUNCTION_STRING
+#define DEFAULT_cfABSOFT2
+#define LOGICAL_cfABSOFT2
+#define STRING_cfABSOFT2 ,unsigned D0
+#define DEFAULT_cfABSOFT3
+#define LOGICAL_cfABSOFT3
+#define STRING_cfABSOFT3 ,D0
+#else
+#define ABSOFT_cf1(T0)
+#define ABSOFT_cf2(T0)
+#define ABSOFT_cf3(T0)
+#endif
+
+/* _Z introduced to cicumvent IBM and HP silly preprocessor warning.
+ e.g. "Macro CFARGT14 invoked with a null argument."
+ */
+#define _Z
+
+#define CFARGT14S(S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ S(T1,1) S(T2,2) S(T3,3) S(T4,4) S(T5,5) S(T6,6) S(T7,7) \
+ S(T8,8) S(T9,9) S(TA,A) S(TB,B) S(TC,C) S(TD,D) S(TE,E)
+#define CFARGT14FS(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ F(T1,1,0) F(T2,2,1) F(T3,3,1) F(T4,4,1) F(T5,5,1) F(T6,6,1) F(T7,7,1) \
+ F(T8,8,1) F(T9,9,1) F(TA,A,1) F(TB,B,1) F(TC,C,1) F(TD,D,1) F(TE,E,1) \
+ M CFARGT14S(S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
+
+#if !(defined(PowerStationFortran)||defined(hpuxFortran800))
+/* Old CFARGT14 -> CFARGT14FS as seen below, for Absoft cross-compile yields:
+ SunOS> cc -c -Xa -DAbsoftUNIXFortran c.c
+ "c.c", line 406: warning: argument mismatch
+ Haven't checked if this is ANSI C or a SunOS bug. SunOS -Xs works ok.
+ Behavior is most clearly seen in example:
+ #define A 1 , 2
+ #define C(X,Y,Z) x=X. y=Y. z=Z.
+ #define D(X,Y,Z) C(X,Y,Z)
+ D(x,A,z)
+ Output from preprocessor is: x = x . y = 1 . z = 2 .
+ #define CFARGT14(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ CFARGT14FS(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
+*/
+#define CFARGT14(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ F(T1,1,0) F(T2,2,1) F(T3,3,1) F(T4,4,1) F(T5,5,1) F(T6,6,1) F(T7,7,1) \
+ F(T8,8,1) F(T9,9,1) F(TA,A,1) F(TB,B,1) F(TC,C,1) F(TD,D,1) F(TE,E,1) \
+ M CFARGT14S(S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
+/* F changed to Z for arg 15. Watch out if ever extend to S or Z arguments. */
+#define CFARGT20(Z,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \
+ Z(T1,1,0) Z(T2,2,1) Z(T3,3,1) Z(T4,4,1) Z(T5,5,1) Z(T6,6,1) Z(T7,7,1) \
+ Z(T8,8,1) Z(T9,9,1) Z(TA,A,1) Z(TB,B,1) Z(TC,C,1) Z(TD,D,1) Z(TE,E,1) \
+ Z(TF,F,1) Z(TG,G,1) Z(TH,H,1) Z(TI,I,1) Z(TJ,J,1) Z(TK,K,1) \
+ S(T1,1) S(T2,2) S(T3,3) S(T4,4) S(T5,5) S(T6,6) S(T7,7) \
+ S(T8,8) S(T9,9) S(TA,A) S(TB,B) S(TC,C) S(TD,D) S(TE,E) \
+ S(TF,F) S(TG,G) S(TH,H) S(TI,I) S(TJ,J) S(TK,K)
+#define CFARGTA14(F,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE) \
+ F(T1,A1,1,0) F(T2,A2,2,1) F(T3,A3,3,1) F(T4,A4,4,1) F(T5,A5,5,1) F(T6,A6,6,1) \
+ F(T7,A7,7,1) F(T8,A8,8,1) F(T9,A9,9,1) F(TA,AA,A,1) F(TB,AB,B,1) F(TC,AC,C,1) \
+ F(TD,AD,D,1) F(TE,AE,E,1) S(T1,1) S(T2,2) S(T3,3) S(T4,4) \
+ S(T5,5) S(T6,6) S(T7,7) S(T8,8) S(T9,9) S(TA,A) \
+ S(TB,B) S(TC,C) S(TD,D) S(TE,E)
+#if MAX_PREPRO_ARGS>31
+/* F changed to Z for arg 15. Watch out if ever extend to S or Z arguments. */
+#define CFARGTA20(Z,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) \
+ Z(T1,A1,1,0) Z(T2,A2,2,1) Z(T3,A3,3,1) Z(T4,A4,4,1) Z(T5,A5,5,1) Z(T6,A6,6,1) \
+ Z(T7,A7,7,1) Z(T8,A8,8,1) Z(T9,A9,9,1) Z(TA,AA,A,1) Z(TB,AB,B,1) Z(TC,AC,C,1) \
+ Z(TD,AD,D,1) Z(TE,AE,E,1) Z(TF,AF,F,1) Z(TG,AG,G,1) Z(TH,AH,H,1) Z(TI,AI,I,1) \
+ Z(TJ,AJ,J,1) Z(TK,AK,K,1) S(T1,1) S(T2,2) S(T3,3) S(T4,4) \
+ S(T5,5) S(T6,6) S(T7,7) S(T8,8) S(T9,9) S(TA,A) \
+ S(TB,B) S(TC,C) S(TD,D) S(TE,E) S(TF,F) S(TG,G) \
+ S(TH,H) S(TI,I) S(TJ,J) S(TK,K)
+#endif
+#else
+#define CFARGT14(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ F(T1,1,0) S(T1,1) F(T2,2,1) S(T2,2) F(T3,3,1) S(T3,3) F(T4,4,1) S(T4,4) \
+ F(T5,5,1) S(T5,5) F(T6,6,1) S(T6,6) F(T7,7,1) S(T7,7) F(T8,8,1) S(T8,8) \
+ F(T9,9,1) S(T9,9) F(TA,A,1) S(TA,A) F(TB,B,1) S(TB,B) F(TC,C,1) S(TC,C) \
+ F(TD,D,1) S(TD,D) F(TE,E,1) S(TE,E)
+/* F changed to Z for arg 15. Watch out if ever extend to S or Z arguments. */
+#define CFARGT20(Z,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \
+ Z(T1,1,0) S(T1,1) Z(T2,2,1) S(T2,2) Z(T3,3,1) S(T3,3) Z(T4,4,1) S(T4,4) \
+ Z(T5,5,1) S(T5,5) Z(T6,6,1) S(T6,6) Z(T7,7,1) S(T7,7) Z(T8,8,1) S(T8,8) \
+ Z(T9,9,1) S(T9,9) Z(TA,A,1) S(TA,A) Z(TB,B,1) S(TB,B) Z(TC,C,1) S(TC,C) \
+ Z(TD,D,1) S(TD,D) Z(TE,E,1) S(TE,E) Z(TF,F,1) S(TF,F) Z(TG,G,1) S(TG,G) \
+ Z(TH,H,1) S(TH,H) Z(TI,I,1) S(TI,I) Z(TJ,J,1) S(TJ,J) Z(TK,K,1) S(TK,K)
+#define CFARGTA14(F,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE) \
+ F(T1,A1,1,0) S(T1,1) F(T2,A2,2,1) S(T2,2) F(T3,A3,3,1) S(T3,3) \
+ F(T4,A4,4,1) S(T4,4) F(T5,A5,5,1) S(T5,5) F(T6,A6,6,1) S(T6,6) \
+ F(T7,A7,7,1) S(T7,7) F(T8,A8,8,1) S(T8,8) F(T9,A9,9,1) S(T9,9) \
+ F(TA,AA,A,1) S(TA,A) F(TB,AB,B,1) S(TB,B) F(TC,AC,C,1) S(TC,C) \
+ F(TD,AD,D,1) S(TD,D) F(TE,AE,E,1) S(TE,E)
+#if MAX_PREPRO_ARGS>31
+/* F changed to Z for arg 15. Watch out if ever extend to S or Z arguments. */
+#define CFARGTA20(Z,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) \
+ Z(T1,A1,1,0) S(T1,1) Z(T2,A2,2,1) S(T2,2) Z(T3,A3,3,1) S(T3,3) \
+ Z(T4,A4,4,1) S(T4,4) Z(T5,A5,5,1) S(T5,5) Z(T6,A6,6,1) S(T6,6) \
+ Z(T7,A7,7,1) S(T7,7) Z(T8,A8,8,1) S(T8,8) Z(T9,A9,9,1) S(T9,9) \
+ Z(TA,AA,A,1) S(TA,A) Z(TB,AB,B,1) S(TB,B) Z(TC,AC,C,1) S(TC,C) \
+ Z(TD,AD,D,1) S(TD,D) Z(TE,AE,E,1) S(TE,E) Z(TF,AF,F,1) S(TF,F) \
+ Z(TG,AG,G,1) S(TG,G) Z(TH,AH,H,1) S(TH,H) Z(TI,AI,I,1) S(TI,I) \
+ Z(TJ,AJ,J,1) S(TJ,J) Z(TK,AK,K,1) S(TK,K)
+#endif
+#endif
+
+
+#define PROTOCCALLSFSUB1( UN,LN,T1) \
+ PROTOCCALLSFSUB14(UN,LN,T1,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB2( UN,LN,T1,T2) \
+ PROTOCCALLSFSUB14(UN,LN,T1,T2,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB3( UN,LN,T1,T2,T3) \
+ PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB4( UN,LN,T1,T2,T3,T4) \
+ PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB5( UN,LN,T1,T2,T3,T4,T5) \
+ PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB6( UN,LN,T1,T2,T3,T4,T5,T6) \
+ PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB7( UN,LN,T1,T2,T3,T4,T5,T6,T7) \
+ PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB8( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8) \
+ PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB9( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9) \
+ PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA) \
+ PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB11(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB) \
+ PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB12(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC) \
+ PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,CF_0,CF_0)
+#define PROTOCCALLSFSUB13(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD) \
+ PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,CF_0)
+
+
+#define PROTOCCALLSFSUB15(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF) \
+ PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB16(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG) \
+ PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB17(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH) \
+ PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB18(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI) \
+ PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,CF_0,CF_0)
+#define PROTOCCALLSFSUB19(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ) \
+ PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,CF_0)
+
+
+#ifndef FCALLSC_QUALIFIER
+#ifdef VISUAL_CPLUSPLUS
+#define FCALLSC_QUALIFIER __stdcall
+#else
+#define FCALLSC_QUALIFIER
+#endif
+#endif
+
+#ifdef __cplusplus
+#define CFextern extern "C"
+#else
+#define CFextern extern
+#endif
+
+
+#ifdef CFSUBASFUN
+#define PROTOCCALLSFSUB0(UN,LN) \
+ PROTOCCALLSFFUN0( VOID,UN,LN)
+#define PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ PROTOCCALLSFFUN14(VOID,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
+#define PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK)\
+ PROTOCCALLSFFUN20(VOID,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK)
+#else
+/* Note: Prevent compiler warnings, null #define PROTOCCALLSFSUB14/20 after
+ #include-ing cfortran.h if calling the FORTRAN wrapper within the same
+ source code where the wrapper is created. */
+#define PROTOCCALLSFSUB0(UN,LN) CFextern void FCALLSC_QUALIFIER CFC_(UN,LN)();
+#ifndef __CF__KnR
+#define PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ CFextern void FCALLSC_QUALIFIER CFC_(UN,LN)( CFARGT14(NCF,KCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) );
+#define PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK)\
+ CFextern void FCALLSC_QUALIFIER CFC_(UN,LN)( CFARGT20(NCF,KCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) );
+#else
+#define PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ PROTOCCALLSFSUB0(UN,LN)
+#define PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \
+ PROTOCCALLSFSUB0(UN,LN)
+#endif
+#endif
+
+
+#ifdef OLD_VAXC /* Allow %CC-I-PARAMNOTUSED. */
+#pragma standard
+#endif
+
+
+#define CCALLSFSUB1( UN,LN,T1, A1) \
+ CCALLSFSUB5 (UN,LN,T1,CF_0,CF_0,CF_0,CF_0,A1,0,0,0,0)
+#define CCALLSFSUB2( UN,LN,T1,T2, A1,A2) \
+ CCALLSFSUB5 (UN,LN,T1,T2,CF_0,CF_0,CF_0,A1,A2,0,0,0)
+#define CCALLSFSUB3( UN,LN,T1,T2,T3, A1,A2,A3) \
+ CCALLSFSUB5 (UN,LN,T1,T2,T3,CF_0,CF_0,A1,A2,A3,0,0)
+#define CCALLSFSUB4( UN,LN,T1,T2,T3,T4, A1,A2,A3,A4)\
+ CCALLSFSUB5 (UN,LN,T1,T2,T3,T4,CF_0,A1,A2,A3,A4,0)
+#define CCALLSFSUB5( UN,LN,T1,T2,T3,T4,T5, A1,A2,A3,A4,A5) \
+ CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,CF_0,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,0,0,0,0,0)
+#define CCALLSFSUB6( UN,LN,T1,T2,T3,T4,T5,T6, A1,A2,A3,A4,A5,A6) \
+ CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,0,0,0,0)
+#define CCALLSFSUB7( UN,LN,T1,T2,T3,T4,T5,T6,T7, A1,A2,A3,A4,A5,A6,A7) \
+ CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,T7,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,0,0,0)
+#define CCALLSFSUB8( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8, A1,A2,A3,A4,A5,A6,A7,A8) \
+ CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,0,0)
+#define CCALLSFSUB9( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,A1,A2,A3,A4,A5,A6,A7,A8,A9)\
+ CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,0)
+#define CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA)\
+ CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,0,0,0,0)
+#define CCALLSFSUB11(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB)\
+ CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,0,0,0)
+#define CCALLSFSUB12(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC)\
+ CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,0,0)
+#define CCALLSFSUB13(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD)\
+ CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,0)
+
+#ifdef __cplusplus
+#define CPPPROTOCLSFSUB0( UN,LN)
+#define CPPPROTOCLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
+#define CPPPROTOCLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK)
+#else
+#define CPPPROTOCLSFSUB0(UN,LN) \
+ PROTOCCALLSFSUB0(UN,LN)
+#define CPPPROTOCLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
+#define CPPPROTOCLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \
+ PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK)
+#endif
+
+#ifdef CFSUBASFUN
+#define CCALLSFSUB0(UN,LN) CCALLSFFUN0(UN,LN)
+#define CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE)\
+ CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE)
+#else
+/* do{...}while(FALSE) allows if(a==b) FORT(); else BORT(); */
+#define CCALLSFSUB0( UN,LN) do{CPPPROTOCLSFSUB0(UN,LN) CFC_(UN,LN)();}while(FALSE)
+#define CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE)\
+do{VVCF(T1,A1,B1) VVCF(T2,A2,B2) VVCF(T3,A3,B3) VVCF(T4,A4,B4) VVCF(T5,A5,B5) \
+ VVCF(T6,A6,B6) VVCF(T7,A7,B7) VVCF(T8,A8,B8) VVCF(T9,A9,B9) VVCF(TA,AA,BA) \
+ VVCF(TB,AB,BB) VVCF(TC,AC,BC) VVCF(TD,AD,BD) VVCF(TE,AE,BE) \
+ CPPPROTOCLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ ACF(LN,T1,A1,1) ACF(LN,T2,A2,2) ACF(LN,T3,A3,3) \
+ ACF(LN,T4,A4,4) ACF(LN,T5,A5,5) ACF(LN,T6,A6,6) ACF(LN,T7,A7,7) \
+ ACF(LN,T8,A8,8) ACF(LN,T9,A9,9) ACF(LN,TA,AA,A) ACF(LN,TB,AB,B) \
+ ACF(LN,TC,AC,C) ACF(LN,TD,AD,D) ACF(LN,TE,AE,E) \
+ CFC_(UN,LN)( CFARGTA14(AACF,JCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE) );\
+ WCF(T1,A1,1) WCF(T2,A2,2) WCF(T3,A3,3) WCF(T4,A4,4) WCF(T5,A5,5) \
+ WCF(T6,A6,6) WCF(T7,A7,7) WCF(T8,A8,8) WCF(T9,A9,9) WCF(TA,AA,A) \
+ WCF(TB,AB,B) WCF(TC,AC,C) WCF(TD,AD,D) WCF(TE,AE,E) }while(FALSE)
+#endif
+
+
+#if MAX_PREPRO_ARGS>31
+#define CCALLSFSUB15(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF)\
+ CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,CF_0,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,0,0,0,0,0)
+#define CCALLSFSUB16(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG)\
+ CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,0,0,0,0)
+#define CCALLSFSUB17(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH)\
+ CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,0,0,0)
+#define CCALLSFSUB18(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI)\
+ CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,0,0)
+#define CCALLSFSUB19(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ)\
+ CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,0)
+
+#ifdef CFSUBASFUN
+#define CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH, \
+ TI,TJ,TK, A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) \
+ CCALLSFFUN20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH, \
+ TI,TJ,TK, A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK)
+#else
+#define CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH, \
+ TI,TJ,TK, A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) \
+do{VVCF(T1,A1,B1) VVCF(T2,A2,B2) VVCF(T3,A3,B3) VVCF(T4,A4,B4) VVCF(T5,A5,B5) \
+ VVCF(T6,A6,B6) VVCF(T7,A7,B7) VVCF(T8,A8,B8) VVCF(T9,A9,B9) VVCF(TA,AA,BA) \
+ VVCF(TB,AB,BB) VVCF(TC,AC,BC) VVCF(TD,AD,BD) VVCF(TE,AE,BE) VVCF(TF,AF,BF) \
+ VVCF(TG,AG,BG) VVCF(TH,AH,BH) VVCF(TI,AI,BI) VVCF(TJ,AJ,BJ) VVCF(TK,AK,BK) \
+ CPPPROTOCLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \
+ ACF(LN,T1,A1,1) ACF(LN,T2,A2,2) ACF(LN,T3,A3,3) ACF(LN,T4,A4,4) \
+ ACF(LN,T5,A5,5) ACF(LN,T6,A6,6) ACF(LN,T7,A7,7) ACF(LN,T8,A8,8) \
+ ACF(LN,T9,A9,9) ACF(LN,TA,AA,A) ACF(LN,TB,AB,B) ACF(LN,TC,AC,C) \
+ ACF(LN,TD,AD,D) ACF(LN,TE,AE,E) ACF(LN,TF,AF,F) ACF(LN,TG,AG,G) \
+ ACF(LN,TH,AH,H) ACF(LN,TI,AI,I) ACF(LN,TJ,AJ,J) ACF(LN,TK,AK,K) \
+ CFC_(UN,LN)( CFARGTA20(AACF,JCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) ); \
+ WCF(T1,A1,1) WCF(T2,A2,2) WCF(T3,A3,3) WCF(T4,A4,4) WCF(T5,A5,5) WCF(T6,A6,6) \
+ WCF(T7,A7,7) WCF(T8,A8,8) WCF(T9,A9,9) WCF(TA,AA,A) WCF(TB,AB,B) WCF(TC,AC,C) \
+ WCF(TD,AD,D) WCF(TE,AE,E) WCF(TF,AF,F) WCF(TG,AG,G) WCF(TH,AH,H) WCF(TI,AI,I) \
+ WCF(TJ,AJ,J) WCF(TK,AK,K) }while(FALSE)
+#endif
+#endif /* MAX_PREPRO_ARGS */
+
+/*-------------------------------------------------------------------------*/
+
+/* UTILITIES FOR C TO CALL FORTRAN FUNCTIONS */
+
+/*N.B. PROTOCCALLSFFUNn(..) generates code, whether or not the FORTRAN
+ function is called. Therefore, especially for creator's of C header files
+ for large FORTRAN libraries which include many functions, to reduce
+ compile time and object code size, it may be desirable to create
+ preprocessor directives to allow users to create code for only those
+ functions which they use. */
+
+/* The following defines the maximum length string that a function can return.
+ Of course it may be undefine-d and re-define-d before individual
+ PROTOCCALLSFFUNn(..) as required. It would also be nice to have this derived
+ from the individual machines' limits. */
+#define MAX_LEN_FORTRAN_FUNCTION_STRING 0x4FE
+
+/* The following defines a character used by CFORTRAN.H to flag the end of a
+ string coming out of a FORTRAN routine. */
+#define CFORTRAN_NON_CHAR 0x7F
+
+#ifdef OLD_VAXC /* Prevent %CC-I-PARAMNOTUSED. */
+#pragma nostandard
+#endif
+
+#define _SEP_(TN,C,COMMA) _(__SEP_,C)(TN,COMMA)
+#define __SEP_0(TN,COMMA)
+#define __SEP_1(TN,COMMA) _Icf(2,SEP,TN,COMMA,0)
+#define INT_cfSEP(T,B) _(A,B)
+#define INTV_cfSEP(T,B) INT_cfSEP(T,B)
+#define INTVV_cfSEP(T,B) INT_cfSEP(T,B)
+#define INTVVV_cfSEP(T,B) INT_cfSEP(T,B)
+#define INTVVVV_cfSEP(T,B) INT_cfSEP(T,B)
+#define INTVVVVV_cfSEP(T,B) INT_cfSEP(T,B)
+#define INTVVVVVV_cfSEP(T,B) INT_cfSEP(T,B)
+#define INTVVVVVVV_cfSEP(T,B) INT_cfSEP(T,B)
+#define PINT_cfSEP(T,B) INT_cfSEP(T,B)
+#define PVOID_cfSEP(T,B) INT_cfSEP(T,B)
+#define ROUTINE_cfSEP(T,B) INT_cfSEP(T,B)
+#define SIMPLE_cfSEP(T,B) INT_cfSEP(T,B)
+#define VOID_cfSEP(T,B) INT_cfSEP(T,B) /* For FORTRAN calls C subr.s.*/
+#define STRING_cfSEP(T,B) INT_cfSEP(T,B)
+#define STRINGV_cfSEP(T,B) INT_cfSEP(T,B)
+#define PSTRING_cfSEP(T,B) INT_cfSEP(T,B)
+#define PSTRINGV_cfSEP(T,B) INT_cfSEP(T,B)
+#define PNSTRING_cfSEP(T,B) INT_cfSEP(T,B)
+#define PPSTRING_cfSEP(T,B) INT_cfSEP(T,B)
+#define ZTRINGV_cfSEP(T,B) INT_cfSEP(T,B)
+#define PZTRINGV_cfSEP(T,B) INT_cfSEP(T,B)
+
+#if defined(SIGNED_BYTE) || !defined(UNSIGNED_BYTE)
+#ifdef OLD_VAXC
+#define INTEGER_BYTE char /* Old VAXC barfs on 'signed char' */
+#else
+#define INTEGER_BYTE signed char /* default */
+#endif
+#else
+#define INTEGER_BYTE unsigned char
+#endif
+#define BYTEVVVVVVV_cfTYPE INTEGER_BYTE
+#define DOUBLEVVVVVVV_cfTYPE DOUBLE_PRECISION
+#define FLOATVVVVVVV_cfTYPE FORTRAN_REAL
+#define INTVVVVVVV_cfTYPE int
+#define LOGICALVVVVVVV_cfTYPE int
+#define LONGVVVVVVV_cfTYPE long
+#define SHORTVVVVVVV_cfTYPE short
+#define PBYTE_cfTYPE INTEGER_BYTE
+#define PDOUBLE_cfTYPE DOUBLE_PRECISION
+#define PFLOAT_cfTYPE FORTRAN_REAL
+#define PINT_cfTYPE int
+#define PLOGICAL_cfTYPE int
+#define PLONG_cfTYPE long
+#define PSHORT_cfTYPE short
+
+#define CFARGS0(A,T,V,W,X,Y,Z) _3(T,_cf,A)
+#define CFARGS1(A,T,V,W,X,Y,Z) _3(T,_cf,A)(V)
+#define CFARGS2(A,T,V,W,X,Y,Z) _3(T,_cf,A)(V,W)
+#define CFARGS3(A,T,V,W,X,Y,Z) _3(T,_cf,A)(V,W,X)
+#define CFARGS4(A,T,V,W,X,Y,Z) _3(T,_cf,A)(V,W,X,Y)
+#define CFARGS5(A,T,V,W,X,Y,Z) _3(T,_cf,A)(V,W,X,Y,Z)
+
+#define _Icf(N,T,I,X,Y) _(I,_cfINT)(N,T,I,X,Y,0)
+#define _Icf4(N,T,I,X,Y,Z) _(I,_cfINT)(N,T,I,X,Y,Z)
+#define BYTE_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z)
+#define DOUBLE_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INT,B,X,Y,Z,0)
+#define FLOAT_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z)
+#define INT_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z)
+#define LOGICAL_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z)
+#define LONG_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z)
+#define SHORT_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z)
+#define PBYTE_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z)
+#define PDOUBLE_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,PINT,B,X,Y,Z,0)
+#define PFLOAT_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z)
+#define PINT_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z)
+#define PLOGICAL_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z)
+#define PLONG_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z)
+#define PSHORT_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z)
+#define BYTEV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z)
+#define BYTEVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z)
+#define BYTEVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z)
+#define BYTEVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z)
+#define BYTEVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z)
+#define BYTEVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z)
+#define BYTEVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z)
+#define DOUBLEV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTV,B,X,Y,Z,0)
+#define DOUBLEVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVV,B,X,Y,Z,0)
+#define DOUBLEVVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVVV,B,X,Y,Z,0)
+#define DOUBLEVVVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVVVV,B,X,Y,Z,0)
+#define DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVVVVV,B,X,Y,Z,0)
+#define DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVVVVVV,B,X,Y,Z,0)
+#define DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVVVVVVV,B,X,Y,Z,0)
+#define FLOATV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z)
+#define FLOATVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z)
+#define FLOATVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z)
+#define FLOATVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z)
+#define FLOATVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z)
+#define FLOATVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z)
+#define FLOATVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z)
+#define INTV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z)
+#define INTVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z)
+#define INTVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z)
+#define INTVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z)
+#define INTVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z)
+#define INTVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z)
+#define INTVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z)
+#define LOGICALV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z)
+#define LOGICALVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z)
+#define LOGICALVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z)
+#define LOGICALVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z)
+#define LOGICALVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z)
+#define LOGICALVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z)
+#define LOGICALVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z)
+#define LONGV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z)
+#define LONGVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z)
+#define LONGVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z)
+#define LONGVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z)
+#define LONGVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z)
+#define LONGVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z)
+#define LONGVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z)
+#define SHORTV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z)
+#define SHORTVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z)
+#define SHORTVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z)
+#define SHORTVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z)
+#define SHORTVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z)
+#define SHORTVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z)
+#define SHORTVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z)
+#define PVOID_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,B,B,X,Y,Z,0)
+#define ROUTINE_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
+/*CRAY coughs on the first,
+ i.e. the usual trouble of not being able to
+ define macros to macros with arguments.
+ New ultrix is worse, it coughs on all such uses.
+ */
+/*#define SIMPLE_cfINT PVOID_cfINT*/
+#define SIMPLE_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
+#define VOID_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
+#define STRING_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
+#define STRINGV_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
+#define PSTRING_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
+#define PSTRINGV_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
+#define PNSTRING_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
+#define PPSTRING_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
+#define ZTRINGV_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
+#define PZTRINGV_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
+#define CF_0_cfINT(N,A,B,X,Y,Z)
+
+
+#define UCF(TN,I,C) _SEP_(TN,C,COMMA) _Icf(2,U,TN,_(A,I),0)
+#define UUCF(TN,I,C) _SEP_(TN,C,COMMA) _SEP_(TN,1,I)
+#define UUUCF(TN,I,C) _SEP_(TN,C,COLON) _Icf(2,U,TN,_(A,I),0)
+#define INT_cfU(T,A) _(T,VVVVVVV_cfTYPE) A
+#define INTV_cfU(T,A) _(T,VVVVVV_cfTYPE) * A
+#define INTVV_cfU(T,A) _(T,VVVVV_cfTYPE) * A
+#define INTVVV_cfU(T,A) _(T,VVVV_cfTYPE) * A
+#define INTVVVV_cfU(T,A) _(T,VVV_cfTYPE) * A
+#define INTVVVVV_cfU(T,A) _(T,VV_cfTYPE) * A
+#define INTVVVVVV_cfU(T,A) _(T,V_cfTYPE) * A
+#define INTVVVVVVV_cfU(T,A) _(T,_cfTYPE) * A
+#define PINT_cfU(T,A) _(T,_cfTYPE) * A
+#define PVOID_cfU(T,A) void *A
+#define ROUTINE_cfU(T,A) void (*A)(CF_NULL_PROTO)
+#define VOID_cfU(T,A) void A /* Needed for C calls FORTRAN sub.s. */
+#define STRING_cfU(T,A) char *A /* via VOID and wrapper. */
+#define STRINGV_cfU(T,A) char *A
+#define PSTRING_cfU(T,A) char *A
+#define PSTRINGV_cfU(T,A) char *A
+#define ZTRINGV_cfU(T,A) char *A
+#define PZTRINGV_cfU(T,A) char *A
+
+/* VOID breaks U into U and UU. */
+#define INT_cfUU(T,A) _(T,VVVVVVV_cfTYPE) A
+#define VOID_cfUU(T,A) /* Needed for FORTRAN calls C sub.s. */
+#define STRING_cfUU(T,A) char *A
+
+
+#define BYTE_cfPU(A) CFextern INTEGER_BYTE FCALLSC_QUALIFIER A
+#define DOUBLE_cfPU(A) CFextern DOUBLE_PRECISION FCALLSC_QUALIFIER A
+#if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT))
+#define FLOAT_cfPU(A) CFextern FORTRAN_REAL FCALLSC_QUALIFIER A
+#else
+#define FLOAT_cfPU(A) CFextern FLOATFUNCTIONTYPE FCALLSC_QUALIFIER A
+#endif
+#define INT_cfPU(A) CFextern int FCALLSC_QUALIFIER A
+#define LOGICAL_cfPU(A) CFextern int FCALLSC_QUALIFIER A
+#define LONG_cfPU(A) CFextern long FCALLSC_QUALIFIER A
+#define SHORT_cfPU(A) CFextern short FCALLSC_QUALIFIER A
+#define STRING_cfPU(A) CFextern void FCALLSC_QUALIFIER A
+#define VOID_cfPU(A) CFextern void FCALLSC_QUALIFIER A
+
+#define BYTE_cfE INTEGER_BYTE A0;
+#define DOUBLE_cfE DOUBLE_PRECISION A0;
+#if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT))
+#define FLOAT_cfE FORTRAN_REAL A0;
+#else
+#define FLOAT_cfE FORTRAN_REAL AA0; FLOATFUNCTIONTYPE A0;
+#endif
+#define INT_cfE int A0;
+#define LOGICAL_cfE int A0;
+#define LONG_cfE long A0;
+#define SHORT_cfE short A0;
+#define VOID_cfE
+#ifdef vmsFortran
+#define STRING_cfE static char AA0[1+MAX_LEN_FORTRAN_FUNCTION_STRING]; \
+ static fstring A0 = \
+ {MAX_LEN_FORTRAN_FUNCTION_STRING,DSC$K_DTYPE_T,DSC$K_CLASS_S,AA0};\
+ memset(AA0, CFORTRAN_NON_CHAR, MAX_LEN_FORTRAN_FUNCTION_STRING);\
+ *(AA0+MAX_LEN_FORTRAN_FUNCTION_STRING)='\0';
+#else
+#ifdef CRAYFortran
+#define STRING_cfE static char AA0[1+MAX_LEN_FORTRAN_FUNCTION_STRING]; \
+ static _fcd A0; *(AA0+MAX_LEN_FORTRAN_FUNCTION_STRING)='\0';\
+ memset(AA0,CFORTRAN_NON_CHAR, MAX_LEN_FORTRAN_FUNCTION_STRING);\
+ A0 = _cptofcd(AA0,MAX_LEN_FORTRAN_FUNCTION_STRING);
+#else
+/* 'cc: SC3.0.1 13 Jul 1994' barfs on char A0[0x4FE+1];
+ * char A0[0x4FE +1]; char A0[1+0x4FE]; are both OK. */
+#define STRING_cfE static char A0[1+MAX_LEN_FORTRAN_FUNCTION_STRING]; \
+ memset(A0, CFORTRAN_NON_CHAR, \
+ MAX_LEN_FORTRAN_FUNCTION_STRING); \
+ *(A0+MAX_LEN_FORTRAN_FUNCTION_STRING)='\0';
+#endif
+#endif
+/* ESTRING must use static char. array which is guaranteed to exist after
+ function returns. */
+
+/* N.B.i) The diff. for 0 (Zero) and >=1 arguments.
+ ii)That the following create an unmatched bracket, i.e. '(', which
+ must of course be matched in the call.
+ iii)Commas must be handled very carefully */
+#define INT_cfGZ(T,UN,LN) A0=CFC_(UN,LN)(
+#define VOID_cfGZ(T,UN,LN) CFC_(UN,LN)(
+#ifdef vmsFortran
+#define STRING_cfGZ(T,UN,LN) CFC_(UN,LN)(&A0
+#else
+#if defined(CRAYFortran) || defined(AbsoftUNIXFortran)
+#define STRING_cfGZ(T,UN,LN) CFC_(UN,LN)( A0
+#else
+#define STRING_cfGZ(T,UN,LN) CFC_(UN,LN)( A0,MAX_LEN_FORTRAN_FUNCTION_STRING
+#endif
+#endif
+
+#define INT_cfG(T,UN,LN) INT_cfGZ(T,UN,LN)
+#define VOID_cfG(T,UN,LN) VOID_cfGZ(T,UN,LN)
+#define STRING_cfG(T,UN,LN) STRING_cfGZ(T,UN,LN), /*, is only diff. from _cfG*/
+
+#define BYTEVVVVVVV_cfPP
+#define INTVVVVVVV_cfPP /* These complement FLOATVVVVVVV_cfPP. */
+#define DOUBLEVVVVVVV_cfPP
+#define LOGICALVVVVVVV_cfPP
+#define LONGVVVVVVV_cfPP
+#define SHORTVVVVVVV_cfPP
+#define PBYTE_cfPP
+#define PINT_cfPP
+#define PDOUBLE_cfPP
+#define PLOGICAL_cfPP
+#define PLONG_cfPP
+#define PSHORT_cfPP
+#define PFLOAT_cfPP FLOATVVVVVVV_cfPP
+
+#define BCF(TN,AN,C) _SEP_(TN,C,COMMA) _Icf(2,B,TN,AN,0)
+#define INT_cfB(T,A) (_(T,VVVVVVV_cfTYPE)) A
+#define INTV_cfB(T,A) A
+#define INTVV_cfB(T,A) (A)[0]
+#define INTVVV_cfB(T,A) (A)[0][0]
+#define INTVVVV_cfB(T,A) (A)[0][0][0]
+#define INTVVVVV_cfB(T,A) (A)[0][0][0][0]
+#define INTVVVVVV_cfB(T,A) (A)[0][0][0][0][0]
+#define INTVVVVVVV_cfB(T,A) (A)[0][0][0][0][0][0]
+#define PINT_cfB(T,A) _(T,_cfPP)&A
+#define STRING_cfB(T,A) (char *) A
+#define STRINGV_cfB(T,A) (char *) A
+#define PSTRING_cfB(T,A) (char *) A
+#define PSTRINGV_cfB(T,A) (char *) A
+#define PVOID_cfB(T,A) (void *) A
+#define ROUTINE_cfB(T,A) (void(*)(CF_NULL_PROTO))A
+#define ZTRINGV_cfB(T,A) (char *) A
+#define PZTRINGV_cfB(T,A) (char *) A
+
+#define SCF(TN,NAME,I,A) _(TN,_cfSTR)(3,S,NAME,I,A,0,0)
+#define DEFAULT_cfS(M,I,A)
+#define LOGICAL_cfS(M,I,A)
+#define PLOGICAL_cfS(M,I,A)
+#define STRING_cfS(M,I,A) ,sizeof(A)
+#define STRINGV_cfS(M,I,A) ,( (unsigned)0xFFFF*firstindexlength(A) \
+ +secondindexlength(A))
+#define PSTRING_cfS(M,I,A) ,sizeof(A)
+#define PSTRINGV_cfS(M,I,A) STRINGV_cfS(M,I,A)
+#define ZTRINGV_cfS(M,I,A)
+#define PZTRINGV_cfS(M,I,A)
+
+#define HCF(TN,I) _(TN,_cfSTR)(3,H,COMMA, H,_(C,I),0,0)
+#define HHCF(TN,I) _(TN,_cfSTR)(3,H,COMMA,HH,_(C,I),0,0)
+#define HHHCF(TN,I) _(TN,_cfSTR)(3,H,COLON, H,_(C,I),0,0)
+#define H_CF_SPECIAL unsigned
+#define HH_CF_SPECIAL
+#define DEFAULT_cfH(M,I,A)
+#define LOGICAL_cfH(S,U,B)
+#define PLOGICAL_cfH(S,U,B)
+#define STRING_cfH(S,U,B) _(A,S) _(U,_CF_SPECIAL) B
+#define STRINGV_cfH(S,U,B) STRING_cfH(S,U,B)
+#define PSTRING_cfH(S,U,B) STRING_cfH(S,U,B)
+#define PSTRINGV_cfH(S,U,B) STRING_cfH(S,U,B)
+#define PNSTRING_cfH(S,U,B) STRING_cfH(S,U,B)
+#define PPSTRING_cfH(S,U,B) STRING_cfH(S,U,B)
+#define ZTRINGV_cfH(S,U,B)
+#define PZTRINGV_cfH(S,U,B)
+
+/* Need VOID_cfSTR because Absoft forced function types go through _cfSTR. */
+/* No spaces inside expansion. They screws up macro catenation kludge. */
+#define VOID_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define BYTE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define DOUBLE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define FLOAT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define INT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LOGICAL_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,LOGICAL,A,B,C,D,E)
+#define LONG_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define SHORT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define BYTEV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define BYTEVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define BYTEVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define BYTEVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define BYTEVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define BYTEVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define BYTEVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define DOUBLEV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define DOUBLEVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define DOUBLEVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define DOUBLEVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define DOUBLEVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define DOUBLEVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define DOUBLEVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define FLOATV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define FLOATVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define FLOATVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define FLOATVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define FLOATVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define FLOATVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define FLOATVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define INTV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define INTVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define INTVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define INTVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define INTVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define INTVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define INTVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LOGICALV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LOGICALVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LOGICALVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LOGICALVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LOGICALVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LOGICALVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LOGICALVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LONGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LONGVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LONGVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LONGVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LONGVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LONGVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LONGVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define SHORTV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define SHORTVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define SHORTVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define SHORTVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define SHORTVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define SHORTVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define SHORTVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define PBYTE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define PDOUBLE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define PFLOAT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define PINT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define PLOGICAL_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PLOGICAL,A,B,C,D,E)
+#define PLONG_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define PSHORT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define STRING_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,STRING,A,B,C,D,E)
+#define PSTRING_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PSTRING,A,B,C,D,E)
+#define STRINGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,STRINGV,A,B,C,D,E)
+#define PSTRINGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PSTRINGV,A,B,C,D,E)
+#define PNSTRING_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PNSTRING,A,B,C,D,E)
+#define PPSTRING_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PPSTRING,A,B,C,D,E)
+#define PVOID_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define ROUTINE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define SIMPLE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define ZTRINGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,ZTRINGV,A,B,C,D,E)
+#define PZTRINGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PZTRINGV,A,B,C,D,E)
+#define CF_0_cfSTR(N,T,A,B,C,D,E)
+
+/* See ACF table comments, which explain why CCF was split into two. */
+#define CCF(NAME,TN,I) _(TN,_cfSTR)(5,C,NAME,I,_(A,I),_(B,I),_(C,I))
+#define DEFAULT_cfC(M,I,A,B,C)
+#define LOGICAL_cfC(M,I,A,B,C) A=C2FLOGICAL( A);
+#define PLOGICAL_cfC(M,I,A,B,C) *A=C2FLOGICAL(*A);
+#ifdef vmsFortran
+#define STRING_cfC(M,I,A,B,C) (B.clen=strlen(A),B.f.dsc$a_pointer=A, \
+ C==sizeof(char*)||C==(unsigned)(B.clen+1)?B.f.dsc$w_length=B.clen: \
+ (memset((A)+B.clen,' ',C-B.clen-1),A[B.f.dsc$w_length=C-1]='\0'));
+ /* PSTRING_cfC to beware of array A which does not contain any \0. */
+#define PSTRING_cfC(M,I,A,B,C) (B.dsc$a_pointer=A, C==sizeof(char*) ? \
+ B.dsc$w_length=strlen(A): (A[C-1]='\0',B.dsc$w_length=strlen(A), \
+ memset((A)+B.dsc$w_length,' ',C-B.dsc$w_length-1), B.dsc$w_length=C-1));
+#else
+#define STRING_cfC(M,I,A,B,C) (B.clen=strlen(A), \
+ C==sizeof(char*)||C==(unsigned)(B.clen+1)?B.flen=B.clen: \
+ (memset((A)+B.clen,' ',C-B.clen-1),A[B.flen=C-1]='\0'));
+#define PSTRING_cfC(M,I,A,B,C) (C==sizeof(char*)? B=strlen(A): \
+ (A[C-1]='\0',B=strlen(A),memset((A)+B,' ',C-B-1),B=C-1));
+#endif
+ /* For CRAYFortran for (P)STRINGV_cfC, B.fs is set, but irrelevant. */
+#define STRINGV_cfC(M,I,A,B,C) \
+ AATRINGV_cfA( A,B,(C/0xFFFF)*(C%0xFFFF),C/0xFFFF,C%0xFFFF)
+#define PSTRINGV_cfC(M,I,A,B,C) \
+ APATRINGV_cfA( A,B,(C/0xFFFF)*(C%0xFFFF),C/0xFFFF,C%0xFFFF)
+#define ZTRINGV_cfC(M,I,A,B,C) \
+ AATRINGV_cfA( A,B, (_3(M,_ELEMS_,I))*((_3(M,_ELEMLEN_,I))+1), \
+ (_3(M,_ELEMS_,I)), (_3(M,_ELEMLEN_,I))+1 )
+#define PZTRINGV_cfC(M,I,A,B,C) \
+ APATRINGV_cfA( A,B, (_3(M,_ELEMS_,I))*((_3(M,_ELEMLEN_,I))+1), \
+ (_3(M,_ELEMS_,I)), (_3(M,_ELEMLEN_,I))+1 )
+
+#define BYTE_cfCCC(A,B) &A
+#define DOUBLE_cfCCC(A,B) &A
+#if !defined(__CF__KnR)
+#define FLOAT_cfCCC(A,B) &A
+ /* Although the VAX doesn't, at least the */
+#else /* HP and K&R mips promote float arg.'s of */
+#define FLOAT_cfCCC(A,B) &B /* unprototyped functions to double. Cannot */
+#endif /* use A here to pass the argument to FORTRAN. */
+#define INT_cfCCC(A,B) &A
+#define LOGICAL_cfCCC(A,B) &A
+#define LONG_cfCCC(A,B) &A
+#define SHORT_cfCCC(A,B) &A
+#define PBYTE_cfCCC(A,B) A
+#define PDOUBLE_cfCCC(A,B) A
+#define PFLOAT_cfCCC(A,B) A
+#define PINT_cfCCC(A,B) A
+#define PLOGICAL_cfCCC(A,B) B=A /* B used to keep a common W table. */
+#define PLONG_cfCCC(A,B) A
+#define PSHORT_cfCCC(A,B) A
+
+#define CCCF(TN,I,M) _SEP_(TN,M,COMMA) _Icf(3,CC,TN,_(A,I),_(B,I))
+#define INT_cfCC(T,A,B) _(T,_cfCCC)(A,B)
+#define INTV_cfCC(T,A,B) A
+#define INTVV_cfCC(T,A,B) A
+#define INTVVV_cfCC(T,A,B) A
+#define INTVVVV_cfCC(T,A,B) A
+#define INTVVVVV_cfCC(T,A,B) A
+#define INTVVVVVV_cfCC(T,A,B) A
+#define INTVVVVVVV_cfCC(T,A,B) A
+#define PINT_cfCC(T,A,B) _(T,_cfCCC)(A,B)
+#define PVOID_cfCC(T,A,B) A
+#if defined(apolloFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran)
+#define ROUTINE_cfCC(T,A,B) &A
+#else
+#define ROUTINE_cfCC(T,A,B) A
+#endif
+#define SIMPLE_cfCC(T,A,B) A
+#ifdef vmsFortran
+#define STRING_cfCC(T,A,B) &B.f
+#define STRINGV_cfCC(T,A,B) &B
+#define PSTRING_cfCC(T,A,B) &B
+#define PSTRINGV_cfCC(T,A,B) &B
+#else
+#ifdef CRAYFortran
+#define STRING_cfCC(T,A,B) _cptofcd(A,B.flen)
+#define STRINGV_cfCC(T,A,B) _cptofcd(B.s,B.flen)
+#define PSTRING_cfCC(T,A,B) _cptofcd(A,B)
+#define PSTRINGV_cfCC(T,A,B) _cptofcd(A,B.flen)
+#else
+#define STRING_cfCC(T,A,B) A
+#define STRINGV_cfCC(T,A,B) B.fs
+#define PSTRING_cfCC(T,A,B) A
+#define PSTRINGV_cfCC(T,A,B) B.fs
+#endif
+#endif
+#define ZTRINGV_cfCC(T,A,B) STRINGV_cfCC(T,A,B)
+#define PZTRINGV_cfCC(T,A,B) PSTRINGV_cfCC(T,A,B)
+
+#define BYTE_cfX return A0;
+#define DOUBLE_cfX return A0;
+#if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT))
+#define FLOAT_cfX return A0;
+#else
+#define FLOAT_cfX ASSIGNFLOAT(AA0,A0); return AA0;
+#endif
+#define INT_cfX return A0;
+#define LOGICAL_cfX return F2CLOGICAL(A0);
+#define LONG_cfX return A0;
+#define SHORT_cfX return A0;
+#define VOID_cfX return ;
+#if defined(vmsFortran) || defined(CRAYFortran)
+#define STRING_cfX return kill_trailing( \
+ kill_trailing(AA0,CFORTRAN_NON_CHAR),' ');
+#else
+#define STRING_cfX return kill_trailing( \
+ kill_trailing( A0,CFORTRAN_NON_CHAR),' ');
+#endif
+
+#define CFFUN(NAME) _(__cf__,NAME)
+
+/* Note that we don't use LN here, but we keep it for consistency. */
+#define CCALLSFFUN0(UN,LN) CFFUN(UN)()
+
+#ifdef OLD_VAXC /* Allow %CC-I-PARAMNOTUSED. */
+#pragma standard
+#endif
+
+#define CCALLSFFUN1( UN,LN,T1, A1) \
+ CCALLSFFUN5 (UN,LN,T1,CF_0,CF_0,CF_0,CF_0,A1,0,0,0,0)
+#define CCALLSFFUN2( UN,LN,T1,T2, A1,A2) \
+ CCALLSFFUN5 (UN,LN,T1,T2,CF_0,CF_0,CF_0,A1,A2,0,0,0)
+#define CCALLSFFUN3( UN,LN,T1,T2,T3, A1,A2,A3) \
+ CCALLSFFUN5 (UN,LN,T1,T2,T3,CF_0,CF_0,A1,A2,A3,0,0)
+#define CCALLSFFUN4( UN,LN,T1,T2,T3,T4, A1,A2,A3,A4)\
+ CCALLSFFUN5 (UN,LN,T1,T2,T3,T4,CF_0,A1,A2,A3,A4,0)
+#define CCALLSFFUN5( UN,LN,T1,T2,T3,T4,T5, A1,A2,A3,A4,A5) \
+ CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,CF_0,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,0,0,0,0,0)
+#define CCALLSFFUN6( UN,LN,T1,T2,T3,T4,T5,T6, A1,A2,A3,A4,A5,A6) \
+ CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,T6,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,0,0,0,0)
+#define CCALLSFFUN7( UN,LN,T1,T2,T3,T4,T5,T6,T7, A1,A2,A3,A4,A5,A6,A7) \
+ CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,T6,T7,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,0,0,0)
+#define CCALLSFFUN8( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8, A1,A2,A3,A4,A5,A6,A7,A8) \
+ CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,0,0)
+#define CCALLSFFUN9( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,A1,A2,A3,A4,A5,A6,A7,A8,A9)\
+ CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,0)
+#define CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA)\
+ CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,0,0,0,0)
+#define CCALLSFFUN11(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB)\
+ CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,0,0,0)
+#define CCALLSFFUN12(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC)\
+ CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,0,0)
+#define CCALLSFFUN13(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD)\
+ CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,0)
+
+#define CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE)\
+((CFFUN(UN)( BCF(T1,A1,0) BCF(T2,A2,1) BCF(T3,A3,1) BCF(T4,A4,1) BCF(T5,A5,1) \
+ BCF(T6,A6,1) BCF(T7,A7,1) BCF(T8,A8,1) BCF(T9,A9,1) BCF(TA,AA,1) \
+ BCF(TB,AB,1) BCF(TC,AC,1) BCF(TD,AD,1) BCF(TE,AE,1) \
+ SCF(T1,LN,1,A1) SCF(T2,LN,2,A2) SCF(T3,LN,3,A3) SCF(T4,LN,4,A4) \
+ SCF(T5,LN,5,A5) SCF(T6,LN,6,A6) SCF(T7,LN,7,A7) SCF(T8,LN,8,A8) \
+ SCF(T9,LN,9,A9) SCF(TA,LN,A,AA) SCF(TB,LN,B,AB) SCF(TC,LN,C,AC) \
+ SCF(TD,LN,D,AD))))
+
+/* N.B. Create a separate function instead of using (call function, function
+value here) because in order to create the variables needed for the input
+arg.'s which may be const.'s one has to do the creation within {}, but these
+can never be placed within ()'s. Therefore one must create wrapper functions.
+gcc, on the other hand may be able to avoid the wrapper functions. */
+
+/* Prototypes are needed to correctly handle the value returned correctly. N.B.
+Can only have prototype arg.'s with difficulty, a la G... table since FORTRAN
+functions returning strings have extra arg.'s. Don't bother, since this only
+causes a compiler warning to come up when one uses FCALLSCFUNn and CCALLSFFUNn
+for the same function in the same source code. Something done by the experts in
+debugging only.*/
+
+#define PROTOCCALLSFFUN0(F,UN,LN) \
+_(F,_cfPU)( CFC_(UN,LN))(CF_NULL_PROTO); \
+static _Icf(2,U,F,CFFUN(UN),0)() {_(F,_cfE) _Icf(3,GZ,F,UN,LN) ABSOFT_cf1(F));_(F,_cfX)}
+
+#define PROTOCCALLSFFUN1( T0,UN,LN,T1) \
+ PROTOCCALLSFFUN5 (T0,UN,LN,T1,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFFUN2( T0,UN,LN,T1,T2) \
+ PROTOCCALLSFFUN5 (T0,UN,LN,T1,T2,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFFUN3( T0,UN,LN,T1,T2,T3) \
+ PROTOCCALLSFFUN5 (T0,UN,LN,T1,T2,T3,CF_0,CF_0)
+#define PROTOCCALLSFFUN4( T0,UN,LN,T1,T2,T3,T4) \
+ PROTOCCALLSFFUN5 (T0,UN,LN,T1,T2,T3,T4,CF_0)
+#define PROTOCCALLSFFUN5( T0,UN,LN,T1,T2,T3,T4,T5) \
+ PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFFUN6( T0,UN,LN,T1,T2,T3,T4,T5,T6) \
+ PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,T6,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFFUN7( T0,UN,LN,T1,T2,T3,T4,T5,T6,T7) \
+ PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFFUN8( T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8) \
+ PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,CF_0,CF_0)
+#define PROTOCCALLSFFUN9( T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9) \
+ PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,CF_0)
+#define PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA) \
+ PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFFUN11(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB) \
+ PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFFUN12(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC) \
+ PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,CF_0,CF_0)
+#define PROTOCCALLSFFUN13(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD) \
+ PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,CF_0)
+
+/* HP/UX 9.01 cc requires the blank between '_Icf(3,G,T0,UN,LN) CCCF(T1,1,0)' */
+
+#ifndef __CF__KnR
+#define PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ _(T0,_cfPU)(CFC_(UN,LN))(CF_NULL_PROTO); static _Icf(2,U,T0,CFFUN(UN),0)( \
+ CFARGT14FS(UCF,HCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) ) \
+{ CFARGT14S(VCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) _(T0,_cfE) \
+ CCF(LN,T1,1) CCF(LN,T2,2) CCF(LN,T3,3) CCF(LN,T4,4) CCF(LN,T5,5) \
+ CCF(LN,T6,6) CCF(LN,T7,7) CCF(LN,T8,8) CCF(LN,T9,9) CCF(LN,TA,A) \
+ CCF(LN,TB,B) CCF(LN,TC,C) CCF(LN,TD,D) CCF(LN,TE,E) _Icf(3,G,T0,UN,LN) \
+ CFARGT14(CCCF,JCF,ABSOFT_cf1(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)); \
+ WCF(T1,A1,1) WCF(T2,A2,2) WCF(T3,A3,3) WCF(T4,A4,4) WCF(T5,A5,5) \
+ WCF(T6,A6,6) WCF(T7,A7,7) WCF(T8,A8,8) WCF(T9,A9,9) WCF(TA,AA,A) \
+ WCF(TB,AB,B) WCF(TC,AC,C) WCF(TD,AD,D) WCF(TE,AE,E) _(T0,_cfX)}
+#else
+#define PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ _(T0,_cfPU)(CFC_(UN,LN))(CF_NULL_PROTO); static _Icf(2,U,T0,CFFUN(UN),0)( \
+ CFARGT14FS(UUCF,HHCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) ) \
+ CFARGT14FS(UUUCF,HHHCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) ; \
+{ CFARGT14S(VCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) _(T0,_cfE) \
+ CCF(LN,T1,1) CCF(LN,T2,2) CCF(LN,T3,3) CCF(LN,T4,4) CCF(LN,T5,5) \
+ CCF(LN,T6,6) CCF(LN,T7,7) CCF(LN,T8,8) CCF(LN,T9,9) CCF(LN,TA,A) \
+ CCF(LN,TB,B) CCF(LN,TC,C) CCF(LN,TD,D) CCF(LN,TE,E) _Icf(3,G,T0,UN,LN) \
+ CFARGT14(CCCF,JCF,ABSOFT_cf1(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)); \
+ WCF(T1,A1,1) WCF(T2,A2,2) WCF(T3,A3,3) WCF(T4,A4,4) WCF(T5,A5,5) \
+ WCF(T6,A6,6) WCF(T7,A7,7) WCF(T8,A8,8) WCF(T9,A9,9) WCF(TA,AA,A) \
+ WCF(TB,AB,B) WCF(TC,AC,C) WCF(TD,AD,D) WCF(TE,AE,E) _(T0,_cfX)}
+#endif
+
+/*-------------------------------------------------------------------------*/
+
+/* UTILITIES FOR FORTRAN TO CALL C ROUTINES */
+
+#ifdef OLD_VAXC /* Prevent %CC-I-PARAMNOTUSED. */
+#pragma nostandard
+#endif
+
+#if defined(vmsFortran) || defined(CRAYFortran)
+#define DCF(TN,I)
+#define DDCF(TN,I)
+#define DDDCF(TN,I)
+#else
+#define DCF(TN,I) HCF(TN,I)
+#define DDCF(TN,I) HHCF(TN,I)
+#define DDDCF(TN,I) HHHCF(TN,I)
+#endif
+
+#define QCF(TN,I) _(TN,_cfSTR)(1,Q,_(B,I), 0,0,0,0)
+#define DEFAULT_cfQ(B)
+#define LOGICAL_cfQ(B)
+#define PLOGICAL_cfQ(B)
+#define STRINGV_cfQ(B) char *B; unsigned int _(B,N);
+#define STRING_cfQ(B) char *B=NULL;
+#define PSTRING_cfQ(B) char *B=NULL;
+#define PSTRINGV_cfQ(B) STRINGV_cfQ(B)
+#define PNSTRING_cfQ(B) char *B=NULL;
+#define PPSTRING_cfQ(B)
+
+#ifdef __sgi /* Else SGI gives warning 182 contrary to its C LRM A.17.7 */
+#define ROUTINE_orig *(void**)&
+#else
+#define ROUTINE_orig (void *)
+#endif
+
+#define ROUTINE_1 ROUTINE_orig
+#define ROUTINE_2 ROUTINE_orig
+#define ROUTINE_3 ROUTINE_orig
+#define ROUTINE_4 ROUTINE_orig
+#define ROUTINE_5 ROUTINE_orig
+#define ROUTINE_6 ROUTINE_orig
+#define ROUTINE_7 ROUTINE_orig
+#define ROUTINE_8 ROUTINE_orig
+#define ROUTINE_9 ROUTINE_orig
+#define ROUTINE_10 ROUTINE_orig
+#define ROUTINE_11 ROUTINE_orig
+#define ROUTINE_12 ROUTINE_orig
+#define ROUTINE_13 ROUTINE_orig
+#define ROUTINE_14 ROUTINE_orig
+
+#define TCF(NAME,TN,I,M) _SEP_(TN,M,COMMA) _(TN,_cfT)(NAME,I,_(A,I),_(B,I),_(C,I))
+#define BYTE_cfT(M,I,A,B,D) *A
+#define DOUBLE_cfT(M,I,A,B,D) *A
+#define FLOAT_cfT(M,I,A,B,D) *A
+#define INT_cfT(M,I,A,B,D) *A
+#define LOGICAL_cfT(M,I,A,B,D) F2CLOGICAL(*A)
+#define LONG_cfT(M,I,A,B,D) *A
+#define SHORT_cfT(M,I,A,B,D) *A
+#define BYTEV_cfT(M,I,A,B,D) A
+#define DOUBLEV_cfT(M,I,A,B,D) A
+#define FLOATV_cfT(M,I,A,B,D) VOIDP A
+#define INTV_cfT(M,I,A,B,D) A
+#define LOGICALV_cfT(M,I,A,B,D) A
+#define LONGV_cfT(M,I,A,B,D) A
+#define SHORTV_cfT(M,I,A,B,D) A
+#define BYTEVV_cfT(M,I,A,B,D) (void *)A /* We have to cast to void *,*/
+#define BYTEVVV_cfT(M,I,A,B,D) (void *)A /* since we don't know the */
+#define BYTEVVVV_cfT(M,I,A,B,D) (void *)A /* dimensions of the array. */
+#define BYTEVVVVV_cfT(M,I,A,B,D) (void *)A /* i.e. Unfortunately, can't */
+#define BYTEVVVVVV_cfT(M,I,A,B,D) (void *)A /* check that the type */
+#define BYTEVVVVVVV_cfT(M,I,A,B,D) (void *)A /* matches the prototype. */
+#define DOUBLEVV_cfT(M,I,A,B,D) (void *)A
+#define DOUBLEVVV_cfT(M,I,A,B,D) (void *)A
+#define DOUBLEVVVV_cfT(M,I,A,B,D) (void *)A
+#define DOUBLEVVVVV_cfT(M,I,A,B,D) (void *)A
+#define DOUBLEVVVVVV_cfT(M,I,A,B,D) (void *)A
+#define DOUBLEVVVVVVV_cfT(M,I,A,B,D) (void *)A
+#define FLOATVV_cfT(M,I,A,B,D) (void *)A
+#define FLOATVVV_cfT(M,I,A,B,D) (void *)A
+#define FLOATVVVV_cfT(M,I,A,B,D) (void *)A
+#define FLOATVVVVV_cfT(M,I,A,B,D) (void *)A
+#define FLOATVVVVVV_cfT(M,I,A,B,D) (void *)A
+#define FLOATVVVVVVV_cfT(M,I,A,B,D) (void *)A
+#define INTVV_cfT(M,I,A,B,D) (void *)A
+#define INTVVV_cfT(M,I,A,B,D) (void *)A
+#define INTVVVV_cfT(M,I,A,B,D) (void *)A
+#define INTVVVVV_cfT(M,I,A,B,D) (void *)A
+#define INTVVVVVV_cfT(M,I,A,B,D) (void *)A
+#define INTVVVVVVV_cfT(M,I,A,B,D) (void *)A
+#define LOGICALVV_cfT(M,I,A,B,D) (void *)A
+#define LOGICALVVV_cfT(M,I,A,B,D) (void *)A
+#define LOGICALVVVV_cfT(M,I,A,B,D) (void *)A
+#define LOGICALVVVVV_cfT(M,I,A,B,D) (void *)A
+#define LOGICALVVVVVV_cfT(M,I,A,B,D) (void *)A
+#define LOGICALVVVVVVV_cfT(M,I,A,B,D) (void *)A
+#define LONGVV_cfT(M,I,A,B,D) (void *)A
+#define LONGVVV_cfT(M,I,A,B,D) (void *)A
+#define LONGVVVV_cfT(M,I,A,B,D) (void *)A
+#define LONGVVVVV_cfT(M,I,A,B,D) (void *)A
+#define LONGVVVVVV_cfT(M,I,A,B,D) (void *)A
+#define LONGVVVVVVV_cfT(M,I,A,B,D) (void *)A
+#define SHORTVV_cfT(M,I,A,B,D) (void *)A
+#define SHORTVVV_cfT(M,I,A,B,D) (void *)A
+#define SHORTVVVV_cfT(M,I,A,B,D) (void *)A
+#define SHORTVVVVV_cfT(M,I,A,B,D) (void *)A
+#define SHORTVVVVVV_cfT(M,I,A,B,D) (void *)A
+#define SHORTVVVVVVV_cfT(M,I,A,B,D) (void *)A
+#define PBYTE_cfT(M,I,A,B,D) A
+#define PDOUBLE_cfT(M,I,A,B,D) A
+#define PFLOAT_cfT(M,I,A,B,D) VOIDP A
+#define PINT_cfT(M,I,A,B,D) A
+#define PLOGICAL_cfT(M,I,A,B,D) ((*A=F2CLOGICAL(*A)),A)
+#define PLONG_cfT(M,I,A,B,D) A
+#define PSHORT_cfT(M,I,A,B,D) A
+#define PVOID_cfT(M,I,A,B,D) A
+#if defined(apolloFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran)
+#define ROUTINE_cfT(M,I,A,B,D) _(ROUTINE_,I) (*A)
+#else
+#define ROUTINE_cfT(M,I,A,B,D) _(ROUTINE_,I) A
+#endif
+/* A == pointer to the characters
+ D == length of the string, or of an element in an array of strings
+ E == number of elements in an array of strings */
+#define TTSTR( A,B,D) \
+ ((B=(char*)malloc(D+1))[D]='\0', memcpy(B,A,D), kill_trailing(B,' '))
+#define TTTTSTR( A,B,D) (!(D<4||A[0]||A[1]||A[2]||A[3]))?NULL: \
+ memchr(A,'\0',D) ?A : TTSTR(A,B,D)
+#define TTTTSTRV( A,B,D,E) (_(B,N)=E,B=(char*)malloc(_(B,N)*(D+1)), (void *) \
+ vkill_trailing(f2cstrv(A,B,D+1, _(B,N)*(D+1)), D+1,_(B,N)*(D+1),' '))
+#ifdef vmsFortran
+#define STRING_cfT(M,I,A,B,D) TTTTSTR( A->dsc$a_pointer,B,A->dsc$w_length)
+#define STRINGV_cfT(M,I,A,B,D) TTTTSTRV(A->dsc$a_pointer, B, \
+ A->dsc$w_length , A->dsc$l_m[0])
+#define PSTRING_cfT(M,I,A,B,D) TTSTR( A->dsc$a_pointer,B,A->dsc$w_length)
+#define PPSTRING_cfT(M,I,A,B,D) A->dsc$a_pointer
+#else
+#ifdef CRAYFortran
+#define STRING_cfT(M,I,A,B,D) TTTTSTR( _fcdtocp(A),B,_fcdlen(A))
+#define STRINGV_cfT(M,I,A,B,D) TTTTSTRV(_fcdtocp(A),B,_fcdlen(A), \
+ num_elem(_fcdtocp(A),_fcdlen(A),_3(M,_STRV_A,I)))
+#define PSTRING_cfT(M,I,A,B,D) TTSTR( _fcdtocp(A),B,_fcdlen(A))
+#define PPSTRING_cfT(M,I,A,B,D) _fcdtocp(A)
+#else
+#define STRING_cfT(M,I,A,B,D) TTTTSTR( A,B,D)
+#define STRINGV_cfT(M,I,A,B,D) TTTTSTRV(A,B,D, num_elem(A,D,_3(M,_STRV_A,I)))
+#define PSTRING_cfT(M,I,A,B,D) TTSTR( A,B,D)
+#define PPSTRING_cfT(M,I,A,B,D) A
+#endif
+#endif
+#define PNSTRING_cfT(M,I,A,B,D) STRING_cfT(M,I,A,B,D)
+#define PSTRINGV_cfT(M,I,A,B,D) STRINGV_cfT(M,I,A,B,D)
+#define CF_0_cfT(M,I,A,B,D)
+
+#define RCF(TN,I) _(TN,_cfSTR)(3,R,_(A,I),_(B,I),_(C,I),0,0)
+#define DEFAULT_cfR(A,B,D)
+#define LOGICAL_cfR(A,B,D)
+#define PLOGICAL_cfR(A,B,D) *A=C2FLOGICAL(*A);
+#define STRING_cfR(A,B,D) if (B) free(B);
+#define STRINGV_cfR(A,B,D) free(B);
+/* A and D as defined above for TSTRING(V) */
+#define RRRRPSTR( A,B,D) if (B) memcpy(A,B, _cfMIN(strlen(B),D)), \
+ (D>strlen(B)?memset(A+strlen(B),' ', D-strlen(B)):0), free(B);
+#define RRRRPSTRV(A,B,D) c2fstrv(B,A,D+1,(D+1)*_(B,N)), free(B);
+#ifdef vmsFortran
+#define PSTRING_cfR(A,B,D) RRRRPSTR( A->dsc$a_pointer,B,A->dsc$w_length)
+#define PSTRINGV_cfR(A,B,D) RRRRPSTRV(A->dsc$a_pointer,B,A->dsc$w_length)
+#else
+#ifdef CRAYFortran
+#define PSTRING_cfR(A,B,D) RRRRPSTR( _fcdtocp(A),B,_fcdlen(A))
+#define PSTRINGV_cfR(A,B,D) RRRRPSTRV(_fcdtocp(A),B,_fcdlen(A))
+#else
+#define PSTRING_cfR(A,B,D) RRRRPSTR( A,B,D)
+#define PSTRINGV_cfR(A,B,D) RRRRPSTRV(A,B,D)
+#endif
+#endif
+#define PNSTRING_cfR(A,B,D) PSTRING_cfR(A,B,D)
+#define PPSTRING_cfR(A,B,D)
+
+#define BYTE_cfFZ(UN,LN) INTEGER_BYTE FCALLSC_QUALIFIER fcallsc(UN,LN)(
+#define DOUBLE_cfFZ(UN,LN) DOUBLE_PRECISION FCALLSC_QUALIFIER fcallsc(UN,LN)(
+#define INT_cfFZ(UN,LN) int FCALLSC_QUALIFIER fcallsc(UN,LN)(
+#define LOGICAL_cfFZ(UN,LN) int FCALLSC_QUALIFIER fcallsc(UN,LN)(
+#define LONG_cfFZ(UN,LN) long FCALLSC_QUALIFIER fcallsc(UN,LN)(
+#define SHORT_cfFZ(UN,LN) short FCALLSC_QUALIFIER fcallsc(UN,LN)(
+#define VOID_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(
+#ifndef __CF__KnR
+/* The void is req'd by the Apollo, to make this an ANSI function declaration.
+ The Apollo promotes K&R float functions to double. */
+#define FLOAT_cfFZ(UN,LN) FORTRAN_REAL FCALLSC_QUALIFIER fcallsc(UN,LN)(void
+#ifdef vmsFortran
+#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(fstring *AS
+#else
+#ifdef CRAYFortran
+#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(_fcd AS
+#else
+#if defined(AbsoftUNIXFortran)
+#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(char *AS
+#else
+#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(char *AS, unsigned D0
+#endif
+#endif
+#endif
+#else
+#if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT))
+#define FLOAT_cfFZ(UN,LN) FORTRAN_REAL FCALLSC_QUALIFIER fcallsc(UN,LN)(
+#else
+#define FLOAT_cfFZ(UN,LN) FLOATFUNCTIONTYPE FCALLSC_QUALIFIER fcallsc(UN,LN)(
+#endif
+#if defined(vmsFortran) || defined(CRAYFortran) || defined(AbsoftUNIXFortran)
+#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(AS
+#else
+#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(AS, D0
+#endif
+#endif
+
+#define BYTE_cfF(UN,LN) BYTE_cfFZ(UN,LN)
+#define DOUBLE_cfF(UN,LN) DOUBLE_cfFZ(UN,LN)
+#ifndef __CF_KnR
+#define FLOAT_cfF(UN,LN) FORTRAN_REAL FCALLSC_QUALIFIER fcallsc(UN,LN)(
+#else
+#define FLOAT_cfF(UN,LN) FLOAT_cfFZ(UN,LN)
+#endif
+#define INT_cfF(UN,LN) INT_cfFZ(UN,LN)
+#define LOGICAL_cfF(UN,LN) LOGICAL_cfFZ(UN,LN)
+#define LONG_cfF(UN,LN) LONG_cfFZ(UN,LN)
+#define SHORT_cfF(UN,LN) SHORT_cfFZ(UN,LN)
+#define VOID_cfF(UN,LN) VOID_cfFZ(UN,LN)
+#define STRING_cfF(UN,LN) STRING_cfFZ(UN,LN),
+
+#define INT_cfFF
+#define VOID_cfFF
+#ifdef vmsFortran
+#define STRING_cfFF fstring *AS;
+#else
+#ifdef CRAYFortran
+#define STRING_cfFF _fcd AS;
+#else
+#define STRING_cfFF char *AS; unsigned D0;
+#endif
+#endif
+
+#define INT_cfL A0=
+#define STRING_cfL A0=
+#define VOID_cfL
+
+#define INT_cfK
+#define VOID_cfK
+/* KSTRING copies the string into the position provided by the caller. */
+#ifdef vmsFortran
+#define STRING_cfK \
+ memcpy(AS->dsc$a_pointer,A0,_cfMIN(AS->dsc$w_length,(A0==NULL?0:strlen(A0))));\
+ AS->dsc$w_length>(A0==NULL?0:strlen(A0))? \
+ memset(AS->dsc$a_pointer+(A0==NULL?0:strlen(A0)),' ', \
+ AS->dsc$w_length-(A0==NULL?0:strlen(A0))):0;
+#else
+#ifdef CRAYFortran
+#define STRING_cfK \
+ memcpy(_fcdtocp(AS),A0, _cfMIN(_fcdlen(AS),(A0==NULL?0:strlen(A0))) ); \
+ _fcdlen(AS)>(A0==NULL?0:strlen(A0))? \
+ memset(_fcdtocp(AS)+(A0==NULL?0:strlen(A0)),' ', \
+ _fcdlen(AS)-(A0==NULL?0:strlen(A0))):0;
+#else
+#define STRING_cfK memcpy(AS,A0, _cfMIN(D0,(A0==NULL?0:strlen(A0))) ); \
+ D0>(A0==NULL?0:strlen(A0))?memset(AS+(A0==NULL?0:strlen(A0)), \
+ ' ', D0-(A0==NULL?0:strlen(A0))):0;
+#endif
+#endif
+
+/* Note that K.. and I.. can't be combined since K.. has to access data before
+R.., in order for functions returning strings which are also passed in as
+arguments to work correctly. Note that R.. frees and hence may corrupt the
+string. */
+#define BYTE_cfI return A0;
+#define DOUBLE_cfI return A0;
+#if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT))
+#define FLOAT_cfI return A0;
+#else
+#define FLOAT_cfI RETURNFLOAT(A0);
+#endif
+#define INT_cfI return A0;
+#ifdef hpuxFortran800
+/* Incredibly, functions must return true as 1, elsewhere .true.==0x01000000. */
+#define LOGICAL_cfI return ((A0)?1:0);
+#else
+#define LOGICAL_cfI return C2FLOGICAL(A0);
+#endif
+#define LONG_cfI return A0;
+#define SHORT_cfI return A0;
+#define STRING_cfI return ;
+#define VOID_cfI return ;
+
+#ifdef OLD_VAXC /* Allow %CC-I-PARAMNOTUSED. */
+#pragma standard
+#endif
+
+#define FCALLSCSUB0( CN,UN,LN) FCALLSCFUN0(VOID,CN,UN,LN)
+#define FCALLSCSUB1( CN,UN,LN,T1) FCALLSCFUN1(VOID,CN,UN,LN,T1)
+#define FCALLSCSUB2( CN,UN,LN,T1,T2) FCALLSCFUN2(VOID,CN,UN,LN,T1,T2)
+#define FCALLSCSUB3( CN,UN,LN,T1,T2,T3) FCALLSCFUN3(VOID,CN,UN,LN,T1,T2,T3)
+#define FCALLSCSUB4( CN,UN,LN,T1,T2,T3,T4) \
+ FCALLSCFUN4(VOID,CN,UN,LN,T1,T2,T3,T4)
+#define FCALLSCSUB5( CN,UN,LN,T1,T2,T3,T4,T5) \
+ FCALLSCFUN5(VOID,CN,UN,LN,T1,T2,T3,T4,T5)
+#define FCALLSCSUB6( CN,UN,LN,T1,T2,T3,T4,T5,T6) \
+ FCALLSCFUN6(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6)
+#define FCALLSCSUB7( CN,UN,LN,T1,T2,T3,T4,T5,T6,T7) \
+ FCALLSCFUN7(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7)
+#define FCALLSCSUB8( CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8) \
+ FCALLSCFUN8(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8)
+#define FCALLSCSUB9( CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9) \
+ FCALLSCFUN9(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9)
+#define FCALLSCSUB10(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA) \
+ FCALLSCFUN10(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA)
+#define FCALLSCSUB11(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB) \
+ FCALLSCFUN11(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB)
+#define FCALLSCSUB12(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC) \
+ FCALLSCFUN12(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC)
+#define FCALLSCSUB13(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD) \
+ FCALLSCFUN13(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD)
+#define FCALLSCSUB14(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ FCALLSCFUN14(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
+
+#define FCALLSCFUN1( T0,CN,UN,LN,T1) \
+ FCALLSCFUN5 (T0,CN,UN,LN,T1,CF_0,CF_0,CF_0,CF_0)
+#define FCALLSCFUN2( T0,CN,UN,LN,T1,T2) \
+ FCALLSCFUN5 (T0,CN,UN,LN,T1,T2,CF_0,CF_0,CF_0)
+#define FCALLSCFUN3( T0,CN,UN,LN,T1,T2,T3) \
+ FCALLSCFUN5 (T0,CN,UN,LN,T1,T2,T3,CF_0,CF_0)
+#define FCALLSCFUN4( T0,CN,UN,LN,T1,T2,T3,T4) \
+ FCALLSCFUN5 (T0,CN,UN,LN,T1,T2,T3,T4,CF_0)
+#define FCALLSCFUN5( T0,CN,UN,LN,T1,T2,T3,T4,T5) \
+ FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define FCALLSCFUN6( T0,CN,UN,LN,T1,T2,T3,T4,T5,T6) \
+ FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,CF_0,CF_0,CF_0,CF_0)
+#define FCALLSCFUN7( T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7) \
+ FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,CF_0,CF_0,CF_0)
+#define FCALLSCFUN8( T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8) \
+ FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,CF_0,CF_0)
+#define FCALLSCFUN9( T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9) \
+ FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,CF_0)
+#define FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA) \
+ FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,CF_0,CF_0,CF_0,CF_0)
+#define FCALLSCFUN11(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB) \
+ FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,CF_0,CF_0,CF_0)
+#define FCALLSCFUN12(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC) \
+ FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,CF_0,CF_0)
+#define FCALLSCFUN13(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD) \
+ FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,CF_0)
+
+#ifndef __CF__KnR
+#define FCALLSCFUN0(T0,CN,UN,LN) CFextern _(T0,_cfFZ)(UN,LN) ABSOFT_cf2(T0)) \
+ {_Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN(); _Icf(0,K,T0,0,0) _(T0,_cfI)}
+
+#define FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ CFextern _(T0,_cfF)(UN,LN) \
+ CFARGT14(NCF,DCF,ABSOFT_cf2(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)) \
+ { CFARGT14S(QCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ _Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN( TCF(LN,T1,1,0) TCF(LN,T2,2,1) \
+ TCF(LN,T3,3,1) TCF(LN,T4,4,1) TCF(LN,T5,5,1) TCF(LN,T6,6,1) TCF(LN,T7,7,1) \
+ TCF(LN,T8,8,1) TCF(LN,T9,9,1) TCF(LN,TA,A,1) TCF(LN,TB,B,1) TCF(LN,TC,C,1) \
+ TCF(LN,TD,D,1) TCF(LN,TE,E,1) ); _Icf(0,K,T0,0,0) \
+ CFARGT14S(RCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) _(T0,_cfI) }
+#else
+#define FCALLSCFUN0(T0,CN,UN,LN) CFextern _(T0,_cfFZ)(UN,LN) ABSOFT_cf3(T0)) _Icf(0,FF,T0,0,0)\
+ {_Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN(); _Icf(0,K,T0,0,0) _(T0,_cfI)}
+
+#define FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ CFextern _(T0,_cfF)(UN,LN) \
+ CFARGT14(NNCF,DDCF,ABSOFT_cf3(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)) _Icf(0,FF,T0,0,0) \
+ CFARGT14FS(NNNCF,DDDCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE); \
+ { CFARGT14S(QCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ _Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN( TCF(LN,T1,1,0) TCF(LN,T2,2,1) \
+ TCF(LN,T3,3,1) TCF(LN,T4,4,1) TCF(LN,T5,5,1) TCF(LN,T6,6,1) TCF(LN,T7,7,1) \
+ TCF(LN,T8,8,1) TCF(LN,T9,9,1) TCF(LN,TA,A,1) TCF(LN,TB,B,1) TCF(LN,TC,C,1) \
+ TCF(LN,TD,D,1) TCF(LN,TE,E,1) ); _Icf(0,K,T0,0,0) \
+ CFARGT14S(RCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) _(T0,_cfI)}
+#endif
+
+
+#endif /* __CFORTRAN_LOADED */
diff --git a/include/cfitsio/compress.h b/include/cfitsio/compress.h
new file mode 100644
index 0000000..7e3c406
--- /dev/null
+++ b/include/cfitsio/compress.h
@@ -0,0 +1,212 @@
+/* compress.h -- definitions for the decompression routines used in CFITSIO */
+
+/* Blatantly copied and modified from the original gzip-1.2.4 source code. */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+
+/* 'near' is only relevant for 16-bit PC with small memory model */
+# define near
+
+#if defined(VAXC) || defined(VMS)
+# define RECORD_IO 1
+#else
+# define RECORD_IO 0
+#endif
+
+#define get_char() get_byte()
+
+/* gzip.h -- common declarations for all gzip modules */
+
+#define OF(args) args
+typedef void *voidp;
+
+#define memzero(s, n) memset ((voidp)(s), 0, (n))
+
+typedef unsigned char uch;
+typedef unsigned short ush;
+typedef unsigned long ulg;
+
+/* Return codes from gzip */
+#define OK 0
+#define ERROR 1
+#define WARNING 2
+
+/* Compression methods (see algorithm.doc) */
+#define STORED 0
+#define COMPRESSED 1
+#define PACKED 2
+#define LZHED 3
+/* methods 4 to 7 reserved */
+#define DEFLATED 8
+#define MAX_METHODS 9
+
+#define INBUFSIZ 0x8000 /* input buffer size */
+#define INBUF_EXTRA 64 /* required by unlzw() */
+#define OUTBUFSIZ 16384 /* output buffer size */
+#define OUTBUF_EXTRA 2048 /* required by unlzw() */
+#define DIST_BUFSIZE 0x8000 /* buffer for distances, see trees.c */
+#define WSIZE 0x8000 /* window size--must be a power of two, and */
+
+#define DECLARE(type, array, size) type array[size]
+
+#define tab_suffix window
+#define tab_prefix prev /* hash link (see deflate.c) */
+#define head (prev+WSIZE) /* hash head (see deflate.c) */
+
+#define PACK_MAGIC "\037\036" /* Magic header for packed files */
+#define GZIP_MAGIC "\037\213" /* Magic header for gzip files, 1F 8B */
+#define OLD_GZIP_MAGIC "\037\236" /* Magic header for gzip 0.5 = freeze 1.x */
+#define LZH_MAGIC "\037\240" /* Magic header for SCO LZH Compress files*/
+#define LZW_MAGIC "\037\235" /* Magic header for lzw files, 1F 9D */
+#define PKZIP_MAGIC "\120\113\003\004" /* Magic header for pkzip files */
+
+/* gzip flag byte */
+#define ASCII_FLAG 0x01 /* bit 0 set: file probably ascii text */
+#define CONTINUATION 0x02 /* bit 1 set: continuation of multi-part gzip file */
+#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */
+#define ORIG_NAME 0x08 /* bit 3 set: original file name present */
+#define COMMENT 0x10 /* bit 4 set: file comment present */
+#define ENCRYPTED 0x20 /* bit 5 set: file is encrypted */
+#define RESERVED 0xC0 /* bit 6,7: reserved */
+
+#define MIN_MATCH 3
+#define MAX_MATCH 258
+#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
+#define MAX_DIST (WSIZE-MIN_LOOKAHEAD)
+#define translate_eol 0 /* no option -a yet */
+
+#define get_byte() (inptr < insize ? inbuf[inptr++] : fill_inbuf(0))
+#define try_byte() (inptr < insize ? inbuf[inptr++] : fill_inbuf(1))
+#define put_ubyte(c) {window[outcnt++]=(uch)(c); if (outcnt==WSIZE)\
+ flush_window();}
+
+/* Macros for getting two-byte and four-byte header values */
+#define SH(p) ((ush)(uch)((p)[0]) | ((ush)(uch)((p)[1]) << 8))
+#define LG(p) ((ulg)(SH(p)) | ((ulg)(SH((p)+2)) << 16))
+
+/* Diagnostic functions */
+# define Assert(cond,msg)
+# define Trace(x)
+# define Tracev(x)
+# define Tracevv(x)
+# define Tracec(c,x)
+# define Tracecv(c,x)
+
+/* lzw.h -- define the lzw functions. */
+
+#ifndef BITS
+# define BITS 16
+#endif
+#define INIT_BITS 9 /* Initial number of bits per code */
+#define BIT_MASK 0x1f /* Mask for 'number of compression bits' */
+#define BLOCK_MODE 0x80
+#define LZW_RESERVED 0x60 /* reserved bits */
+#define CLEAR 256 /* flush the dictionary */
+#define FIRST (CLEAR+1) /* first free entry */
+
+/* prototypes */
+
+#define local static
+void ffpmsg(const char *err_message);
+
+local int get_method OF((FILE *in));
+
+local ulg updcrc OF((uch *s, unsigned n));
+local int fill_inbuf OF((int eof_ok));
+local void flush_outbuf OF((void));
+local void flush_window OF((void));
+local void write_buf OF((voidp buf, unsigned cnt));
+local void error OF((char *m));
+local ulg flush_block OF((char *buf, ulg stored_len, int eof));
+typedef int file_t; /* Do not use stdio */
+#define NO_FILE (-1) /* in memory compression */
+local int file_read OF((char *buf, unsigned size));
+local void send_bits OF((int value, int length));
+local unsigned bi_reverse OF((unsigned value, int length));
+local void bi_windup OF((void));
+local void copy_block OF((char *buf, unsigned len, int header));
+local int (*read_buf) OF((char *buf, unsigned size));
+local void lm_init OF((int pack_level, ush *flags));
+local ulg deflate OF((void));
+local void ct_init OF((ush *attr, int *method));
+local int ct_tally OF((int dist, int lc));
+local void bi_init OF((file_t zipfile));
+
+#define put_byte(c) {outbuf[outcnt++]=(uch)(c); if (outcnt==OUTBUFSIZ)\
+ flush_outbuf();}
+
+/* Output a 16 bit value, lsb first */
+#define put_short(w) \
+{ if (outcnt < OUTBUFSIZ-2) { \
+ outbuf[outcnt++] = (uch) ((w) & 0xff); \
+ outbuf[outcnt++] = (uch) ((ush)(w) >> 8); \
+ } else { \
+ put_byte((uch)((w) & 0xff)); \
+ put_byte((uch)((ush)(w) >> 8)); \
+ } \
+}
+
+/* Output a 32 bit value to the bit stream, lsb first */
+#define put_long(n) { \
+ put_short((n) & 0xffff); \
+ put_short(((ulg)(n)) >> 16); \
+}
+
+#define seekable() 0 /* force sequential output */
+
+/* io.c */
+local void fillbuf OF((int n));
+local unsigned getbits OF((int n));
+local void init_getbits OF((void));
+
+/* maketbl.c */
+local void make_table OF((int nchar, uch bitlen[],
+ int tablebits, ush table[]));
+
+/* huf.c */
+local void read_pt_len OF((int nn, int nbit, int i_special));
+local void read_c_len OF((void));
+local unsigned decode_c OF((void));
+local unsigned decode_p OF((void));
+local void huf_decode_start OF((void));
+
+/* decode.c */
+local void decode_start OF((void));
+local unsigned decode OF((unsigned count, uch buffer[]));
+
+local int unlzh OF((FILE *in, FILE *out));
+local int unlzw OF((FILE *in, FILE *out));
+
+local void read_tree OF((void));
+local void build_tree_unpack OF((void));
+
+local int unpack OF((FILE *in, FILE *out));
+local int check_zipfile OF((FILE *in));
+local int unzip OF((FILE *in, FILE *out));
+
+int (*work) OF((FILE *infile, FILE *outfile)) = unzip; /* function to call */
+
+/* inflate.c */
+struct huft {
+ uch e; /* number of extra bits or operation */
+ uch b; /* number of bits in this code or subcode */
+ union {
+ ush n; /* literal, length base, or distance base */
+ struct huft *t; /* pointer to next level of table */
+ } v;
+};
+
+local int huft_build OF((unsigned *, unsigned, unsigned, ush *, ush *,
+ struct huft **, int *));
+local int huft_free OF((struct huft *));
+local int inflate_codes OF((struct huft *, struct huft *, int, int));
+local int inflate_stored OF((void));
+local int inflate_fixed OF((void));
+local int inflate_dynamic OF((void));
+local int inflate_block OF((int *));
+local int inflate OF((void));
+
+/* end of compress.h include file */
diff --git a/include/cfitsio/drvrsmem.h b/include/cfitsio/drvrsmem.h
new file mode 100644
index 0000000..cd63810
--- /dev/null
+++ b/include/cfitsio/drvrsmem.h
@@ -0,0 +1,178 @@
+/* S H A R E D M E M O R Y D R I V E R
+ =======================================
+
+ by Jerzy.Borkowski@obs.unige.ch
+
+09-Mar-98 : initial version 1.0 released
+23-Mar-98 : shared_malloc now accepts new handle as an argument
+*/
+
+
+#include <sys/ipc.h> /* this is necessary for Solaris/Linux */
+#include <sys/shm.h>
+#include <sys/sem.h>
+
+#ifdef _AIX
+#include <fcntl.h>
+#else
+#include <sys/fcntl.h>
+#endif
+
+ /* configuration parameters */
+
+#define SHARED_MAXSEG (16) /* maximum number of shared memory blocks */
+
+#define SHARED_KEYBASE (14011963) /* base for shared memory keys, may be overriden by getenv */
+#define SHARED_FDNAME ("/tmp/.shmem-lockfile") /* template for lock file name */
+
+#define SHARED_ENV_KEYBASE ("SHMEM_LIB_KEYBASE") /* name of environment variable */
+#define SHARED_ENV_MAXSEG ("SHMEM_LIB_MAXSEG") /* name of environment variable */
+
+ /* useful constants */
+
+#define SHARED_RDONLY (0) /* flag for shared_(un)lock, lock for read */
+#define SHARED_RDWRITE (1) /* flag for shared_(un)lock, lock for write */
+#define SHARED_WAIT (0) /* flag for shared_lock, block if cannot lock immediate */
+#define SHARED_NOWAIT (2) /* flag for shared_lock, fail if cannot lock immediate */
+#define SHARED_NOLOCK (0x100) /* flag for shared_validate function */
+
+#define SHARED_RESIZE (4) /* flag for shared_malloc, object is resizeable */
+#define SHARED_PERSIST (8) /* flag for shared_malloc, object is not deleted after last proc detaches */
+
+#define SHARED_INVALID (-1) /* invalid handle for semaphore/shared memory */
+
+#define SHARED_EMPTY (0) /* entries for shared_used table */
+#define SHARED_USED (1)
+
+#define SHARED_GRANUL (16384) /* granularity of shared_malloc allocation = phys page size, system dependent */
+
+
+
+ /* checkpoints in shared memory segments - might be omitted */
+
+#define SHARED_ID_0 ('J') /* first byte of identifier in BLKHEAD */
+#define SHARED_ID_1 ('B') /* second byte of identifier in BLKHEAD */
+
+#define BLOCK_REG (0) /* value for tflag member of BLKHEAD */
+#define BLOCK_SHARED (1) /* value for tflag member of BLKHEAD */
+
+ /* generic error codes */
+
+#define SHARED_OK (0)
+
+#define SHARED_ERR_MIN_IDX SHARED_BADARG
+#define SHARED_ERR_MAX_IDX SHARED_NORESIZE
+
+
+#define DAL_SHM_FREE (0)
+#define DAL_SHM_USED (1)
+
+#define DAL_SHM_ID0 ('D')
+#define DAL_SHM_ID1 ('S')
+#define DAL_SHM_ID2 ('M')
+
+#define DAL_SHM_SEGHEAD_ID (0x19630114)
+
+
+
+ /* data types */
+
+/* BLKHEAD object is placed at the beginning of every memory segment (both
+ shared and regular) to allow automatic recognition of segments type */
+
+typedef union
+ { struct BLKHEADstruct
+ { char ID[2]; /* ID = 'JB', just as a checkpoint */
+ char tflag; /* is it shared memory or regular one ? */
+ int handle; /* this is not necessary, used only for non-resizeable objects via ptr */
+ } s;
+ double d; /* for proper alignment on every machine */
+ } BLKHEAD;
+
+typedef void *SHARED_P; /* generic type of shared memory pointer */
+
+typedef struct SHARED_GTABstruct /* data type used in global table */
+ { int sem; /* access semaphore (1 field): process count */
+ int semkey; /* key value used to generate semaphore handle */
+ int key; /* key value used to generate shared memory handle (realloc changes it) */
+ int handle; /* handle of shared memory segment */
+ int size; /* size of shared memory segment */
+ int nprocdebug; /* attached proc counter, helps remove zombie segments */
+ char attr; /* attributes of shared memory object */
+ } SHARED_GTAB;
+
+typedef struct SHARED_LTABstruct /* data type used in local table */
+ { BLKHEAD *p; /* pointer to segment (may be null) */
+ int tcnt; /* number of threads in this process attached to segment */
+ int lkcnt; /* >=0 <- number of read locks, -1 - write lock */
+ long seekpos; /* current pointer position, read/write/seek operations change it */
+ } SHARED_LTAB;
+
+
+ /* system dependent definitions */
+
+#ifndef HAVE_FLOCK_T
+typedef struct flock flock_t;
+#define HAVE_FLOCK_T
+#endif
+
+#ifndef HAVE_UNION_SEMUN
+union semun
+ { int val;
+ struct semid_ds *buf;
+ unsigned short *array;
+ };
+#define HAVE_UNION_SEMUN
+#endif
+
+
+typedef struct DAL_SHM_SEGHEAD_STRUCT DAL_SHM_SEGHEAD;
+
+struct DAL_SHM_SEGHEAD_STRUCT
+ { int ID; /* ID for debugging */
+ int h; /* handle of sh. mem */
+ int size; /* size of data area */
+ int nodeidx; /* offset of root object (node struct typically) */
+ };
+
+ /* API routines */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void shared_cleanup(void); /* must be called at exit/abort */
+int shared_init(int debug_msgs); /* must be called before any other shared memory routine */
+int shared_recover(int id); /* try to recover dormant segment(s) after applic crash */
+int shared_malloc(long size, int mode, int newhandle); /* allocate n-bytes of shared memory */
+int shared_attach(int idx); /* attach to segment given index to table */
+int shared_free(int idx); /* release shared memory */
+SHARED_P shared_lock(int idx, int mode); /* lock segment for reading */
+SHARED_P shared_realloc(int idx, long newsize); /* reallocate n-bytes of shared memory (ON LOCKED SEGMENT ONLY) */
+int shared_size(int idx); /* get size of attached shared memory segment (ON LOCKED SEGMENT ONLY) */
+int shared_attr(int idx); /* get attributes of attached shared memory segment (ON LOCKED SEGMENT ONLY) */
+int shared_set_attr(int idx, int newattr); /* set attributes of attached shared memory segment (ON LOCKED SEGMENT ONLY) */
+int shared_unlock(int idx); /* unlock segment (ON LOCKED SEGMENT ONLY) */
+int shared_set_debug(int debug_msgs); /* set/reset debug mode */
+int shared_set_createmode(int mode); /* set/reset debug mode */
+int shared_list(int id); /* list segment(s) */
+int shared_uncond_delete(int id); /* uncondintionally delete (NOWAIT operation) segment(s) */
+
+int smem_init(void);
+int smem_shutdown(void);
+int smem_setoptions(int options);
+int smem_getoptions(int *options);
+int smem_getversion(int *version);
+int smem_open(char *filename, int rwmode, int *driverhandle);
+int smem_create(char *filename, int *driverhandle);
+int smem_close(int driverhandle);
+int smem_remove(char *filename);
+int smem_size(int driverhandle, long *size);
+int smem_flush(int driverhandle);
+int smem_seek(int driverhandle, long offset);
+int smem_read(int driverhandle, void *buffer, long nbytes);
+int smem_write(int driverhandle, void *buffer, long nbytes);
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/include/cfitsio/eval_defs.h b/include/cfitsio/eval_defs.h
new file mode 100644
index 0000000..c650311
--- /dev/null
+++ b/include/cfitsio/eval_defs.h
@@ -0,0 +1,147 @@
+#include <stdio.h>
+#include <math.h>
+#include <stdlib.h>
+#include <string.h>
+#if defined(__sgi) || defined(__hpux)
+#include <alloca.h>
+#endif
+#ifdef sparc
+#include <malloc.h>
+#endif
+#include "fitsio2.h"
+
+#ifndef FFBISON
+#include "eval_tab.h"
+#endif
+
+#define MAXDIMS 5
+#define MAXSUBS 10
+#define MAXVARNAME 80
+#define CONST_OP -1000
+#define pERROR -1
+
+typedef struct {
+ char name[MAXVARNAME+1];
+ int type;
+ long nelem;
+ int naxis;
+ long naxes[MAXDIMS];
+ char *undef;
+ void *data;
+ } DataInfo;
+
+typedef struct {
+ long nelem;
+ int naxis;
+ long naxes[MAXDIMS];
+ char *undef;
+ union {
+ double dbl;
+ long lng;
+ char log;
+ char str[256];
+ double *dblptr;
+ long *lngptr;
+ char *logptr;
+ char **strptr;
+ void *ptr;
+ } data;
+ } lval;
+
+typedef struct Node {
+ int operation;
+ void (*DoOp)(struct Node *this);
+ int nSubNodes;
+ int SubNodes[MAXSUBS];
+ int type;
+ lval value;
+ } Node;
+
+typedef struct {
+ fitsfile *def_fptr;
+ int (*getData)( char *dataName, void *dataValue );
+ int (*loadData)( int varNum, long fRow, long nRows,
+ void *data, char *undef );
+
+ int compressed;
+ int timeCol;
+ int parCol;
+ int valCol;
+
+ char *expr;
+ int index;
+ int is_eobuf;
+
+ Node *Nodes;
+ int nNodes;
+ int nNodesAlloc;
+ int resultNode;
+
+ long firstRow;
+ long nRows;
+
+ int nCols;
+ iteratorCol *colData;
+ DataInfo *varData;
+
+ long firstDataRow;
+ long nDataRows;
+ long totalRows;
+
+ int datatype;
+
+ int status;
+ } ParseData;
+
+typedef enum {
+ rnd_fct = 1001,
+ sum_fct,
+ nelem_fct,
+ sin_fct,
+ cos_fct,
+ tan_fct,
+ asin_fct,
+ acos_fct,
+ atan_fct,
+ sinh_fct,
+ cosh_fct,
+ tanh_fct,
+ exp_fct,
+ log_fct,
+ log10_fct,
+ sqrt_fct,
+ abs_fct,
+ atan2_fct,
+ ceil_fct,
+ floor_fct,
+ round_fct,
+ min1_fct,
+ min2_fct,
+ max1_fct,
+ max2_fct,
+ near_fct,
+ circle_fct,
+ box_fct,
+ elps_fct,
+ isnull_fct,
+ defnull_fct,
+ gtifilt_fct,
+ regfilt_fct,
+ row_fct
+ } funcOp;
+
+extern ParseData gParse;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ int ffparse(void);
+ int fflex(void);
+ void ffrestart(FILE*);
+
+ void Evaluate_Parser( long firstRow, long nRows );
+
+#ifdef __cplusplus
+ }
+#endif
diff --git a/include/cfitsio/eval_tab.h b/include/cfitsio/eval_tab.h
new file mode 100644
index 0000000..784ac91
--- /dev/null
+++ b/include/cfitsio/eval_tab.h
@@ -0,0 +1,37 @@
+typedef union {
+ int Node; /* Index of Node */
+ double dbl; /* real value */
+ long lng; /* integer value */
+ char log; /* logical value */
+ char str[256]; /* string value */
+} FFSTYPE;
+#define BOOLEAN 258
+#define LONG 259
+#define DOUBLE 260
+#define STRING 261
+#define BITSTR 262
+#define FUNCTION 263
+#define BFUNCTION 264
+#define GTIFILTER 265
+#define REGFILTER 266
+#define COLUMN 267
+#define BCOLUMN 268
+#define SCOLUMN 269
+#define BITCOL 270
+#define ROWREF 271
+#define OR 272
+#define AND 273
+#define EQ 274
+#define NE 275
+#define GT 276
+#define LT 277
+#define LTE 278
+#define GTE 279
+#define POWER 280
+#define NOT 281
+#define INTCAST 282
+#define FLTCAST 283
+#define UMINUS 284
+
+
+extern FFSTYPE fflval;
diff --git a/include/cfitsio/f77_wrap.h b/include/cfitsio/f77_wrap.h
new file mode 100644
index 0000000..121850f
--- /dev/null
+++ b/include/cfitsio/f77_wrap.h
@@ -0,0 +1,277 @@
+#define UNSIGNED_BYTE
+#include "cfortran.h"
+
+/************************************************************************
+ DEC C creates longs as 8-byte integers. On most other machines, ints
+ and longs are both 4-bytes, so both are compatible with Fortrans
+ default integer which is 4-bytes. To support DECs, we must redefine
+ LONGs and convert them to 8-bytes when going to C, and restore them
+ to 4-bytes when returning to Fortran. Ugh!!!
+*************************************************************************/
+
+#if (defined DECFortran) || (defined(__alpha) && defined(g77Fortran))
+
+#undef LONGV_cfSTR
+#undef PLONG_cfSTR
+#undef LONGVVVVVVV_cfTYPE
+#undef PLONG_cfTYPE
+#undef LONGV_cfT
+#undef PLONG_cfT
+
+#define LONGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,LONGV,A,B,C,D,E)
+#define PLONG_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PLONG,A,B,C,D,E)
+#define LONGVVVVVVV_cfTYPE int
+#define PLONG_cfTYPE int
+#define LONGV_cfQ(B) long *B, _(B,N);
+#define PLONG_cfQ(B) long B;
+#define LONGV_cfT(M,I,A,B,D) ( (_(B,N) = * _3(M,_LONGV_A,I)), \
+ B = F2Clongv(_(B,N),A) )
+#define PLONG_cfT(M,I,A,B,D) ((B=*A),&B)
+#define LONGV_cfR(A,B,D) C2Flongv(_(B,N),A,B);
+#define PLONG_cfR(A,B,D) *A=B;
+#define LONGV_cfH(S,U,B)
+#define PLONG_cfH(S,U,B)
+
+static long *F2Clongv(long size, int *A)
+{
+ long i;
+ long *B;
+
+ B=(long *)malloc( size*sizeof(long) );
+ for(i=0;i<size;i++) B[i]=A[i];
+ return(B);
+}
+
+static void C2Flongv(long size, int *A, long *B)
+{
+ long i;
+
+ for(i=0;i<size;i++) A[i]=B[i];
+ free(B);
+}
+
+#endif
+
+/************************************************************************
+ Modify cfortran.h's handling of strings. C interprets a "char **"
+ parameter as an array of pointers to the strings (or as a handle),
+ not as a pointer to a block of contiguous strings. Also set a
+ a minimum length for string allocations, to minimize risk of
+ overflow.
+*************************************************************************/
+
+extern unsigned long gMinStrLen;
+
+#undef STRINGV_cfQ
+#undef STRINGV_cfR
+#undef TTSTR
+#undef TTTTSTRV
+#undef RRRRPSTRV
+
+#undef PPSTRING_cfT
+
+#ifdef vmsFortran
+#define PPSTRING_cfT(M,I,A,B,D) (unsigned char*)A->dsc$a_pointer
+
+/* We want single strings to be equivalent to string vectors with */
+/* a single element, so ignore the number of elements info in the */
+/* vector structure, and rely on the NUM_ELEM definitions. */
+
+#undef STRINGV_cfT
+#define STRINGV_cfT(M,I,A,B,D) TTTTSTRV(A->dsc$a_pointer, B, \
+ A->dsc$w_length, \
+ num_elem(A->dsc$a_pointer, \
+ A->dsc$w_length, \
+ _3(M,_STRV_A,I) ) )
+#else
+#ifdef CRAYFortran
+#define PPSTRING_cfT(M,I,A,B,D) (unsigned char*)_fcdtocp(A)
+#else
+#define PPSTRING_cfT(M,I,A,B,D) (unsigned char*)A
+#endif
+#endif
+
+#define _cfMAX(A,B) ( (A>B) ? A : B )
+#define STRINGV_cfQ(B) char **B; unsigned int _(B,N), _(B,M);
+#define STRINGV_cfR(A,B,D) free(B[0]); free(B);
+#define TTSTR( A,B,D) \
+ ((B=(char*)malloc(_cfMAX(D,gMinStrLen)+1))[D]='\0',memcpy(B,A,D), \
+ kill_trailing(B,' '))
+#define TTTTSTRV( A,B,D,E) ( \
+ _(B,N)=_cfMAX(E,1), \
+ _(B,M)=_cfMAX(D,gMinStrLen)+1, \
+ B=(char**)malloc(_(B,N)*sizeof(char*)), \
+ B[0]=(char*)malloc(_(B,N)*_(B,M)), \
+ vindex(B,_(B,M),_(B,N),f2cstrv2(A,B[0],D,_(B,M),_(B,N))) \
+ )
+#define RRRRPSTRV(A,B,D) \
+ c2fstrv2(B[0],A,_(B,M),D,_(B,N)), \
+ free(B[0]), \
+ free(B);
+
+static char **vindex(char **B, int elem_len, int nelem, char *B0)
+{
+ int i;
+ if( nelem )
+ for( i=0;i<nelem;i++ ) B[i] = B0+i*elem_len;
+ return B;
+}
+
+static char *c2fstrv2(char* cstr, char *fstr, int celem_len, int felem_len,
+ int nelem)
+{
+ int i,j;
+
+ if( nelem )
+ for (i=0; i<nelem; i++) {
+ for (j=0; j<felem_len && *cstr; j++) *fstr++ = *cstr++;
+ cstr += celem_len-j;
+ for (; j<felem_len; j++) *fstr++ = ' ';
+ }
+ return( fstr-felem_len*nelem );
+}
+
+static char *f2cstrv2(char *fstr, char* cstr, int felem_len, int celem_len,
+ int nelem)
+{
+ int i,j;
+
+ if( nelem )
+ for (i=0; i<nelem; i++, cstr+=(celem_len-felem_len)) {
+ for (j=0; j<felem_len; j++) *cstr++ = *fstr++;
+ *cstr='\0';
+ kill_trailingn( cstr-felem_len, ' ', cstr );
+ }
+ return( cstr-celem_len*nelem );
+}
+
+/************************************************************************
+ The following definitions redefine the BYTE data type to be
+ interpretted as a character*1 string instead of an integer*1 which
+ is not supported by all compilers.
+*************************************************************************/
+
+#undef BYTE_cfT
+#undef BYTEV_cfT
+#undef BYTE_cfINT
+#undef BYTEV_cfINT
+#undef BYTE_cfSTR
+#undef BYTEV_cfSTR
+
+#define BYTE_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,BYTE,B,X,Y,Z,0)
+#define BYTEV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,BYTEV,B,X,Y,Z,0)
+#define BYTE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,BYTE,A,B,C,D,E)
+#define BYTEV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,BYTEV,A,B,C,D,E)
+#define BYTE_cfSEP(T,B) INT_cfSEP(T,B)
+#define BYTEV_cfSEP(T,B) INT_cfSEP(T,B)
+#define BYTE_cfH(S,U,B) STRING_cfH(S,U,B)
+#define BYTEV_cfH(S,U,B) STRING_cfH(S,U,B)
+#define BYTE_cfQ(B)
+#define BYTEV_cfQ(B)
+#define BYTE_cfR(A,B,D)
+#define BYTEV_cfR(A,B,D)
+
+#ifdef vmsFortran
+#define BYTE_cfN(T,A) fstring * A
+#define BYTEV_cfN(T,A) fstringvector * A
+#define BYTE_cfT(M,I,A,B,D) (INTEGER_BYTE)((A->dsc$a_pointer)[0])
+#define BYTEV_cfT(M,I,A,B,D) (INTEGER_BYTE*)A->dsc$a_pointer
+#else
+#ifdef CRAYFortran
+#define BYTE_cfN(T,A) _fcd A
+#define BYTEV_cfN(T,A) _fcd A
+#define BYTE_cfT(M,I,A,B,D) (INTEGER_BYTE)((_fcdtocp(A))[0])
+#define BYTEV_cfT(M,I,A,B,D) (INTEGER_BYTE*)_fcdtocp(A)
+#else
+#define BYTE_cfN(T,A) INTEGER_BYTE * A
+#define BYTEV_cfN(T,A) INTEGER_BYTE * A
+#define BYTE_cfT(M,I,A,B,D) A[0]
+#define BYTEV_cfT(M,I,A,B,D) A
+#endif
+#endif
+
+/************************************************************************
+ The following definitions and functions handle conversions between
+ C and Fortran arrays of LOGICALS. Individually, LOGICALS are
+ treated as int's but as char's when in an array. cfortran defines
+ (F2C/C2F)LOGICALV but never uses them, so these routines also
+ handle TRUE/FALSE conversions.
+*************************************************************************/
+
+#undef LOGICALV_cfSTR
+#undef LOGICALV_cfT
+#define LOGICALV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,LOGICALV,A,B,C,D,E)
+#define LOGICALV_cfQ(B) char *B; unsigned int _(B,N);
+#define LOGICALV_cfT(M,I,A,B,D) (_(B,N)= * _3(M,_LOGV_A,I), \
+ B=F2CcopyLogVect(_(B,N),A))
+#define LOGICALV_cfR(A,B,D) C2FcopyLogVect(_(B,N),A,B);
+#define LOGICALV_cfH(S,U,B)
+
+static char *F2CcopyLogVect(long size, int *A)
+{
+ long i;
+ char *B;
+
+ B=(char *)malloc(size*sizeof(char));
+ for( i=0; i<size; i++ ) B[i]=F2CLOGICAL(A[i]);
+ return(B);
+}
+
+static void C2FcopyLogVect(long size, int *A, char *B)
+{
+ long i;
+
+ for( i=0; i<size; i++ ) A[i]=C2FLOGICAL(B[i]);
+ free(B);
+}
+
+/*------------------ Fortran File Handling ----------------------*/
+/* Fortran uses unit numbers, whereas C uses file pointers, so */
+/* a global array of file pointers is setup in which Fortran's */
+/* unit number serves as the index. Two FITSIO routines are */
+/* the integer unit number and the fitsfile file pointer. */
+/*-----------------------------------------------------------------*/
+
+#define MAXFITSFILES 200 /* Array of file pointers indexed */
+extern fitsfile *gFitsFiles[]; /* by Fortran unit numbers */
+
+#define FITSUNIT_cfINT(N,A,B,X,Y,Z) INT_cfINT(N,A,B,X,Y,Z)
+#define FITSUNIT_cfSTR(N,T,A,B,C,D,E) INT_cfSTR(N,T,A,B,C,D,E)
+#define FITSUNIT_cfT(M,I,A,B,D) gFitsFiles[*A]
+#define FITSUNITVVVVVVV_cfTYPE int
+#define PFITSUNIT_cfINT(N,A,B,X,Y,Z) PINT_cfINT(N,A,B,X,Y,Z)
+#define PFITSUNIT_cfSTR(N,T,A,B,C,D,E) PINT_cfSTR(N,T,A,B,C,D,E)
+#define PFITSUNIT_cfT(M,I,A,B,D) (gFitsFiles + *A)
+#define PFITSUNIT_cfTYPE int
+
+
+/*---------------------- Make C++ Happy -----------------------------*/
+/* Redefine FCALLSCFUNn so that they create prototypes of themselves */
+/* and change TTTTSTR to use (char *)0 instead of NULL */
+/*-------------------------------------------------------------------*/
+
+#undef FCALLSCFUN0
+#undef FCALLSCFUN14
+#undef TTTTSTR
+
+#define TTTTSTR(A,B,D) ( !(D<4||A[0]||A[1]||A[2]||A[3]) ) ? ((char*)0) : \
+ memchr(A,'\0',D) ? A : TTSTR(A,B,D)
+
+#define FCALLSCFUN0(T0,CN,UN,LN) \
+ CFextern _(T0,_cfFZ)(UN,LN) void ABSOFT_cf2(T0)); \
+ CFextern _(T0,_cfFZ)(UN,LN) void ABSOFT_cf2(T0)) \
+ {_Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN(); _Icf(0,K,T0,0,0) _(T0,_cfI)}
+
+#define FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ CFextern _(T0,_cfF)(UN,LN) \
+ CFARGT14(NCF,DCF,ABSOFT_cf2(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)); \
+ CFextern _(T0,_cfF)(UN,LN) \
+ CFARGT14(NCF,DCF,ABSOFT_cf2(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)) \
+ { CFARGT14S(QCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ _Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN( TCF(LN,T1,1,0) TCF(LN,T2,2,1) \
+ TCF(LN,T3,3,1) TCF(LN,T4,4,1) TCF(LN,T5,5,1) TCF(LN,T6,6,1) TCF(LN,T7,7,1) \
+ TCF(LN,T8,8,1) TCF(LN,T9,9,1) TCF(LN,TA,A,1) TCF(LN,TB,B,1) TCF(LN,TC,C,1) \
+ TCF(LN,TD,D,1) TCF(LN,TE,E,1) ); _Icf(0,K,T0,0,0) \
+ CFARGT14S(RCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) _(T0,_cfI) \
+ }
+
diff --git a/include/cfitsio/fitsio.h b/include/cfitsio/fitsio.h
new file mode 100644
index 0000000..9330127
--- /dev/null
+++ b/include/cfitsio/fitsio.h
@@ -0,0 +1,1355 @@
+#ifndef _FITSIO_H
+#define _FITSIO_H
+
+#include <stdio.h>
+/* stddef.h is apparently needed to define size_t */
+#include <stddef.h>
+
+/* The following exclusion if __CINT__ is defined is needed for ROOT */
+#ifndef __CINT__
+#include "longnam.h"
+#endif
+
+/* global variables */
+
+#define FLEN_FILENAME 1025 /* max length of a filename */
+#define FLEN_KEYWORD 72 /* max length of a keyword (HIERARCH convention) */
+#define FLEN_CARD 81 /* length of a FITS header card */
+#define FLEN_VALUE 71 /* max length of a keyword value string */
+#define FLEN_COMMENT 73 /* max length of a keyword comment string */
+#define FLEN_ERRMSG 81 /* max length of a FITSIO error message */
+#define FLEN_STATUS 31 /* max length of a FITSIO status text string */
+
+#define TBIT 1 /* codes for FITS table data types */
+#define TBYTE 11
+#define TLOGICAL 14
+#define TSTRING 16
+#define TUSHORT 20
+#define TSHORT 21
+#define TUINT 30
+#define TINT 31
+#define TULONG 40
+#define TLONG 41
+#define TFLOAT 42
+#define TDOUBLE 82
+#define TCOMPLEX 83
+#define TDBLCOMPLEX 163
+
+#define TYP_STRUC_KEY 10
+#define TYP_CMPRS_KEY 20
+#define TYP_SCAL_KEY 30
+#define TYP_NULL_KEY 40
+#define TYP_DIM_KEY 50
+#define TYP_RANG_KEY 60
+#define TYP_UNIT_KEY 70
+#define TYP_DISP_KEY 80
+#define TYP_HDUID_KEY 90
+#define TYP_CKSUM_KEY 100
+#define TYP_WCS_KEY 110
+#define TYP_REFSYS_KEY 120
+#define TYP_COMM_KEY 130
+#define TYP_CONT_KEY 140
+#define TYP_USER_KEY 150
+
+#define INT32BIT int /* 32-bit integer datatype. Currently this */
+ /* datatype is an 'int' on all useful platforms */
+ /* however, it is possible that that are cases */
+ /* where 'int' is a 2-byte integer, in which case */
+ /* FITSINT would need to be defined as 'long'. */
+
+#define BYTE_IMG 8 /* BITPIX code values for FITS image types */
+#define SHORT_IMG 16
+#define LONG_IMG 32
+#define FLOAT_IMG -32
+#define DOUBLE_IMG -64
+ /* The following 2 codes are not true FITS */
+ /* datatypes; these codes are only used internally */
+ /* within cfitsio to make it easier for users */
+ /* to deal with unsigned integers. */
+#define USHORT_IMG 20
+#define ULONG_IMG 40
+
+#define IMAGE_HDU 0 /* Primary Array or IMAGE HDU */
+#define ASCII_TBL 1 /* ASCII table HDU */
+#define BINARY_TBL 2 /* Binary table HDU */
+#define ANY_HDU -1 /* matches any HDU type */
+
+#define READONLY 0 /* options when opening a file */
+#define READWRITE 1
+
+/* adopt a hopefully obscure number to use as a null value flag */
+/* could be problems if the FITS files contain data with these values */
+#define FLOATNULLVALUE -9.11912E-36F
+#define DOUBLENULLVALUE -9.1191291391491E-36
+
+/* Image compression algorithm types */
+#define MAX_COMPRESS_DIM 6
+#define RICE_1 11
+#define GZIP_1 21
+#define PLIO_1 31
+#define HCOMPRESS_1 41
+
+#ifndef TRUE
+#define TRUE 1
+#endif
+
+#ifndef FALSE
+#define FALSE 0
+#endif
+
+#define CASESEN 1 /* do case-sensitive string match */
+#define CASEINSEN 0 /* do case-insensitive string match */
+
+#define MAXHDU 1000 /* maximum number of extensions allowed in a FITS file */
+
+#define GT_ID_ALL_URI 0 /* hierarchical grouping parameters */
+#define GT_ID_REF 1
+#define GT_ID_POS 2
+#define GT_ID_ALL 3
+#define GT_ID_REF_URI 11
+#define GT_ID_POS_URI 12
+
+#define OPT_RM_GPT 0
+#define OPT_RM_ENTRY 1
+#define OPT_RM_MBR 2
+#define OPT_RM_ALL 3
+
+#define OPT_GCP_GPT 0
+#define OPT_GCP_MBR 1
+#define OPT_GCP_ALL 2
+
+#define OPT_MCP_ADD 0
+#define OPT_MCP_NADD 1
+#define OPT_MCP_REPL 2
+#define OPT_MCP_MOV 3
+
+#define OPT_MRG_COPY 0
+#define OPT_MRG_MOV 1
+
+#define OPT_CMT_MBR 1
+#define OPT_CMT_MBR_DEL 11
+
+typedef struct /* structure used to store table column information */
+{
+ char ttype[70]; /* column name = FITS TTYPEn keyword; */
+ long tbcol; /* offset in row to first byte of each column */
+ int tdatatype; /* datatype code of each column */
+ long trepeat; /* repeat count of column; number of elements */
+ double tscale; /* FITS TSCALn linear scaling factor */
+ double tzero; /* FITS TZEROn linear scaling zero point */
+ long tnull; /* FITS null value for int image or binary table cols */
+ char strnull[20]; /* FITS null value string for ASCII table columns */
+ char tform[10]; /* FITS tform keyword value */
+ long twidth; /* width of each ASCII table column */
+}tcolumn;
+
+#define VALIDSTRUC 555 /* magic value used to identify if structure is valid */
+
+typedef struct /* structure used to store basic FITS file information */
+{
+ int filehandle; /* handle returned by the file open function */
+ int driver; /* defines which set of I/O drivers should be used */
+ int open_count; /* number of opened 'fitsfiles' using this structure */
+ char *filename; /* file name */
+ int validcode; /* magic value used to verify that structure is valid */
+ long filesize; /* current size of the physical disk file in bytes */
+ long logfilesize; /* logical size of file, including unflushed buffers */
+ int lasthdu; /* is this the last HDU in the file? 0 = no, else yes */
+ long bytepos; /* current logical I/O pointer position in file */
+ long io_pos; /* current I/O pointer position in the physical file */
+ int curbuf; /* number of I/O buffer currently in use */
+ int curhdu; /* current HDU number; 0 = primary array */
+ int hdutype; /* 0 = primary array, 1 = ASCII table, 2 = binary table */
+ int writemode; /* 0 = readonly, 1 = readwrite */
+ int maxhdu; /* highest numbered HDU known to exist in the file */
+ long headstart[MAXHDU + 1]; /* byte offset in file to start of each HDU */
+ long headend; /* byte offest in file to end of the current HDU header */
+ long nextkey; /* byte offset in file to beginning of next keyword */
+ long datastart; /* byte offset in file to start of the current data unit */
+ int tfield; /* number of fields in the table (primary array has 2 */
+ long origrows; /* original number of rows (value of NAXIS2 keyword) */
+ long numrows; /* number of rows in the table (dynamically updated) */
+ long rowlength; /* total length of a table row, in bytes */
+ tcolumn *tableptr; /* pointer to the table structure */
+ long heapstart; /* heap start byte relative to start of data unit */
+ long heapsize; /* size of the heap, in bytes */
+
+ /* the following elements are related to compress images */
+ int compressimg; /* 1 if HDU contains a compressed image, else 0 */
+ char zcmptype[12]; /* compression type string */
+ int compress_type; /* type of compression algorithm */
+ int zbitpix; /* FITS data type of image (BITPIX) */
+ int zndim; /* dimension of image */
+ long znaxis[MAX_COMPRESS_DIM]; /* length of each axis */
+ long tilesize[MAX_COMPRESS_DIM]; /* size of compression tiles */
+ long maxtilelen; /* max number of pixels in each image tile */
+ long maxelem; /* maximum length of variable length arrays */
+
+ int cn_compressed; /* column number for COMPRESSED_DATA column */
+ int cn_uncompressed; /* column number for UNCOMPRESSED_DATA column */
+ int cn_zscale; /* column number for ZSCALE column */
+ int cn_zzero; /* column number for ZZERO column */
+ int cn_zblank; /* column number for the ZBLANK column */
+
+ double zscale; /* scaling value, if same for all tiles */
+ double zzero; /* zero pt, if same for all tiles */
+ int zblank; /* value for null pixels, if not a column */
+
+ int rice_blocksize; /* first compression parameter */
+ int rice_nbits; /* second compression parameter */
+} FITSfile;
+
+typedef struct /* structure used to store basic HDU information */
+{
+ int HDUposition; /* HDU position in file; 0 = first HDU */
+ FITSfile *Fptr; /* pointer to FITS file structure */
+}fitsfile;
+
+typedef struct /* structure for the iterator function column information */
+{
+ /* elements required as input to fits_iterate_data: */
+
+ fitsfile *fptr; /* pointer to the HDU containing the column */
+ int colnum; /* column number in the table (use name if < 1) */
+ char colname[70]; /* name (= TTYPEn value) of the column (optional) */
+ int datatype; /* output datatype (converted if necessary */
+ int iotype; /* = InputCol, InputOutputCol, or OutputCol */
+
+ /* output elements that may be useful for the work function: */
+
+ void *array; /* pointer to the array (and the null value) */
+ long repeat; /* binary table vector repeat value */
+ long tlmin; /* legal minimum data value */
+ long tlmax; /* legal maximum data value */
+ char tunit[70]; /* physical unit string */
+ char tdisp[70]; /* suggested display format */
+
+} iteratorCol;
+
+#define InputCol 0 /* flag for input only iterator column */
+#define InputOutputCol 1 /* flag for input and output iterator column */
+#define OutputCol 2 /* flag for output only iterator column */
+
+/* error status codes */
+
+#define USE_MEM_BUFF -101 /* use memory buffer when opening file */
+#define OVERFLOW_ERR -11 /* overflow during datatype conversion */
+#define SAME_FILE 101 /* input and output files are the same */
+#define TOO_MANY_FILES 103 /* tried to open too many FITS files */
+#define FILE_NOT_OPENED 104 /* could not open the named file */
+#define FILE_NOT_CREATED 105 /* could not create the named file */
+#define WRITE_ERROR 106 /* error writing to FITS file */
+#define END_OF_FILE 107 /* tried to move past end of file */
+#define READ_ERROR 108 /* error reading from FITS file */
+#define FILE_NOT_CLOSED 110 /* could not close the file */
+#define ARRAY_TOO_BIG 111 /* array dimensions exceed internal limit */
+#define READONLY_FILE 112 /* Cannot write to readonly file */
+#define MEMORY_ALLOCATION 113 /* Could not allocate memory */
+#define BAD_FILEPTR 114 /* invalid fitsfile pointer */
+#define NULL_INPUT_PTR 115 /* NULL input pointer to routine */
+#define SEEK_ERROR 116 /* error seeking position in file */
+
+#define BAD_URL_PREFIX 121 /* invalid URL prefix on file name */
+#define TOO_MANY_DRIVERS 122 /* tried to register too many IO drivers */
+#define DRIVER_INIT_FAILED 123 /* driver initialization failed */
+#define NO_MATCHING_DRIVER 124 /* matching driver is not registered */
+#define URL_PARSE_ERROR 125 /* failed to parse input file URL */
+
+#define SHARED_ERRBASE (150)
+#define SHARED_BADARG (SHARED_ERRBASE + 1)
+#define SHARED_NULPTR (SHARED_ERRBASE + 2)
+#define SHARED_TABFULL (SHARED_ERRBASE + 3)
+#define SHARED_NOTINIT (SHARED_ERRBASE + 4)
+#define SHARED_IPCERR (SHARED_ERRBASE + 5)
+#define SHARED_NOMEM (SHARED_ERRBASE + 6)
+#define SHARED_AGAIN (SHARED_ERRBASE + 7)
+#define SHARED_NOFILE (SHARED_ERRBASE + 8)
+#define SHARED_NORESIZE (SHARED_ERRBASE + 9)
+
+#define HEADER_NOT_EMPTY 201 /* header already contains keywords */
+#define KEY_NO_EXIST 202 /* keyword not found in header */
+#define KEY_OUT_BOUNDS 203 /* keyword record number is out of bounds */
+#define VALUE_UNDEFINED 204 /* keyword value field is blank */
+#define NO_QUOTE 205 /* string is missing the closing quote */
+#define BAD_KEYCHAR 207 /* illegal character in keyword name or card */
+#define BAD_ORDER 208 /* required keywords out of order */
+#define NOT_POS_INT 209 /* keyword value is not a positive integer */
+#define NO_END 210 /* couldn't find END keyword */
+#define BAD_BITPIX 211 /* illegal BITPIX keyword value*/
+#define BAD_NAXIS 212 /* illegal NAXIS keyword value */
+#define BAD_NAXES 213 /* illegal NAXISn keyword value */
+#define BAD_PCOUNT 214 /* illegal PCOUNT keyword value */
+#define BAD_GCOUNT 215 /* illegal GCOUNT keyword value */
+#define BAD_TFIELDS 216 /* illegal TFIELDS keyword value */
+#define NEG_WIDTH 217 /* negative table row size */
+#define NEG_ROWS 218 /* negative number of rows in table */
+#define COL_NOT_FOUND 219 /* column with this name not found in table */
+#define BAD_SIMPLE 220 /* illegal value of SIMPLE keyword */
+#define NO_SIMPLE 221 /* Primary array doesn't start with SIMPLE */
+#define NO_BITPIX 222 /* Second keyword not BITPIX */
+#define NO_NAXIS 223 /* Third keyword not NAXIS */
+#define NO_NAXES 224 /* Couldn't find all the NAXISn keywords */
+#define NO_XTENSION 225 /* HDU doesn't start with XTENSION keyword */
+#define NOT_ATABLE 226 /* the CHDU is not an ASCII table extension */
+#define NOT_BTABLE 227 /* the CHDU is not a binary table extension */
+#define NO_PCOUNT 228 /* couldn't find PCOUNT keyword */
+#define NO_GCOUNT 229 /* couldn't find GCOUNT keyword */
+#define NO_TFIELDS 230 /* couldn't find TFIELDS keyword */
+#define NO_TBCOL 231 /* couldn't find TBCOLn keyword */
+#define NO_TFORM 232 /* couldn't find TFORMn keyword */
+#define NOT_IMAGE 233 /* the CHDU is not an IMAGE extension */
+#define BAD_TBCOL 234 /* TBCOLn keyword value < 0 or > rowlength */
+#define NOT_TABLE 235 /* the CHDU is not a table */
+#define COL_TOO_WIDE 236 /* column is too wide to fit in table */
+#define COL_NOT_UNIQUE 237 /* more than 1 column name matches template */
+#define BAD_ROW_WIDTH 241 /* sum of column widths not = NAXIS1 */
+#define UNKNOWN_EXT 251 /* unrecognizable FITS extension type */
+#define UNKNOWN_REC 252 /* unrecognizable FITS record */
+#define END_JUNK 253 /* END keyword is not blank */
+#define BAD_HEADER_FILL 254 /* Header fill area not blank */
+#define BAD_DATA_FILL 255 /* Data fill area not blank or zero */
+#define BAD_TFORM 261 /* illegal TFORM format code */
+#define BAD_TFORM_DTYPE 262 /* unrecognizable TFORM datatype code */
+#define BAD_TDIM 263 /* illegal TDIMn keyword value */
+
+#define BAD_HDU_NUM 301 /* HDU number < 1 or > MAXHDU */
+#define BAD_COL_NUM 302 /* column number < 1 or > tfields */
+#define NEG_FILE_POS 304 /* tried to move before beginning of file */
+#define NEG_BYTES 306 /* tried to read or write negative bytes */
+#define BAD_ROW_NUM 307 /* illegal starting row number in table */
+#define BAD_ELEM_NUM 308 /* illegal starting element number in vector */
+#define NOT_ASCII_COL 309 /* this is not an ASCII string column */
+#define NOT_LOGICAL_COL 310 /* this is not a logical datatype column */
+#define BAD_ATABLE_FORMAT 311 /* ASCII table column has wrong format */
+#define BAD_BTABLE_FORMAT 312 /* Binary table column has wrong format */
+#define NO_NULL 314 /* null value has not been defined */
+#define NOT_VARI_LEN 317 /* this is not a variable length column */
+#define BAD_DIMEN 320 /* illegal number of dimensions in array */
+#define BAD_PIX_NUM 321 /* first pixel number greater than last pixel */
+#define ZERO_SCALE 322 /* illegal BSCALE or TSCALn keyword = 0 */
+#define NEG_AXIS 323 /* illegal axis length < 1 */
+
+#define NOT_GROUP_TABLE 340
+#define HDU_ALREADY_MEMBER 341
+#define MEMBER_NOT_FOUND 342
+#define GROUP_NOT_FOUND 343
+#define BAD_GROUP_ID 344
+#define TOO_MANY_HDUS_TRACKED 345
+#define HDU_ALREADY_TRACKED 346
+#define BAD_OPTION 347
+#define IDENTICAL_POINTERS 348
+
+#define BAD_I2C 401 /* bad int to formatted string conversion */
+#define BAD_F2C 402 /* bad float to formatted string conversion */
+#define BAD_INTKEY 403 /* can't interprete keyword value as integer */
+#define BAD_LOGICALKEY 404 /* can't interprete keyword value as logical */
+#define BAD_FLOATKEY 405 /* can't interprete keyword value as float */
+#define BAD_DOUBLEKEY 406 /* can't interprete keyword value as double */
+#define BAD_C2I 407 /* bad formatted string to int conversion */
+#define BAD_C2F 408 /* bad formatted string to float conversion */
+#define BAD_C2D 409 /* bad formatted string to double conversion */
+#define BAD_DATATYPE 410 /* bad keyword datatype code */
+#define BAD_DECIM 411 /* bad number of decimal places specified */
+#define NUM_OVERFLOW 412 /* overflow during datatype conversion */
+
+# define DATA_COMPRESSION_ERR 413 /* error in imcompress routines */
+# define DATA_DECOMPRESSION_ERR 414 /* error in imcompress routines */
+
+#define BAD_DATE 420 /* error in date or time conversion */
+
+#define PARSE_SYNTAX_ERR 431 /* syntax error in parser expression */
+#define PARSE_BAD_TYPE 432 /* expression did not evaluate to desired type */
+#define PARSE_LRG_VECTOR 433 /* vector result too large to return in array */
+#define PARSE_NO_OUTPUT 434 /* data parser failed not sent an out column */
+#define PARSE_BAD_COL 435 /* bad data encounter while parsing column */
+#define PARSE_BAD_OUTPUT 436 /* Output file not of proper type */
+
+#define ANGLE_TOO_BIG 501 /* celestial angle too large for projection */
+#define BAD_WCS_VAL 502 /* bad celestial coordinate or pixel value */
+#define WCS_ERROR 503 /* error in celestial coordinate calculation */
+#define BAD_WCS_PROJ 504 /* unsupported type of celestial projection */
+#define NO_WCS_KEY 505 /* celestial coordinate keywords not found */
+#define APPROX_WCS_KEY 506 /* approximate WCS keywords were calculated */
+
+/*------- following error codes are used in the grparser.c file -----------*/
+#define NGP_ERRBASE (360) /* base chosen so not to interfere with CFITSIO */
+#define NGP_OK (0)
+#define NGP_NO_MEMORY (NGP_ERRBASE + 0) /* malloc failed */
+#define NGP_READ_ERR (NGP_ERRBASE + 1) /* read error from file */
+#define NGP_NUL_PTR (NGP_ERRBASE + 2) /* null pointer passed as argument */
+#define NGP_EMPTY_CURLINE (NGP_ERRBASE + 3) /* line read seems to be empty */
+#define NGP_UNREAD_QUEUE_FULL (NGP_ERRBASE + 4) /* cannot unread more then 1 line (or single line twice) */
+#define NGP_INC_NESTING (NGP_ERRBASE + 5) /* too deep include file nesting (inf. loop ?) */
+#define NGP_ERR_FOPEN (NGP_ERRBASE + 6) /* fopen() failed, cannot open file */
+#define NGP_EOF (NGP_ERRBASE + 7) /* end of file encountered */
+#define NGP_BAD_ARG (NGP_ERRBASE + 8) /* bad arguments passed */
+#define NGP_TOKEN_NOT_EXPECT (NGP_ERRBASE + 9) /* token not expected here */
+
+/* The following exclusion if __CINT__ is defined is needed for ROOT */
+#ifndef __CINT__
+/* the following 3 lines are needed to support C++ compilers */
+#ifdef __cplusplus
+extern "C" {
+#endif
+#endif
+
+/*---------------- FITS file URL parsing routines -------------*/
+int fits_get_token(char **ptr, char *delimiter, char *token, int *isanumber);
+int ffiurl(char *url, char *urltype, char *infile,
+ char *outfile, char *extspec, char *rowfilter,
+ char *binspec, char *colspec, int *status);
+int ffrtnm(char *url, char *rootname, int *status);
+int ffourl(char *url, char *urltype, char *outfile, char *tmplfile,
+ int *status);
+int ffexts(char *extspec, int *extnum, char *extname, int *extvers,
+ int *hdutype, char *colname, char *rowexpress, int *status);
+int ffextn(char *url, int *extension_num, int *status);
+int ffurlt(fitsfile *fptr, char *urlType, int *status);
+int ffbins(char *binspec, int *imagetype, int *haxis,
+ char colname[4][FLEN_VALUE], double *minin,
+ double *maxin, double *binsizein,
+ char minname[4][FLEN_VALUE], char maxname[4][FLEN_VALUE],
+ char binname[4][FLEN_VALUE], double *weight, char *wtname,
+ int *recip, int *status);
+int ffbinr(char **binspec, char *colname, double *minin,
+ double *maxin, double *binsizein, char *minname,
+ char *maxname, char *binname, int *status);
+int ffimport_file( char *filename, char **contents, int *status );
+
+/*---------------- FITS file I/O routines -------------*/
+int ffomem(fitsfile **fptr, const char *name, int mode, void **buffptr,
+ size_t *buffsize, size_t deltasize,
+ void *(*mem_realloc)(void *p, size_t newsize),
+ int *status);
+int ffopen(fitsfile **fptr, const char *filename, int iomode, int *status);
+int ffreopen(fitsfile *openfptr, fitsfile **newfptr, int *status);
+int ffinit(fitsfile **fptr, const char *filename, int *status);
+int fftplt(fitsfile **fptr, const char *filename, const char *tempname,
+ int *status);
+int ffflus(fitsfile *fptr, int *status);
+int ffclos(fitsfile *fptr, int *status);
+int ffdelt(fitsfile *fptr, int *status);
+int ffflnm(fitsfile *fptr, char *filename, int *status);
+int ffflmd(fitsfile *fptr, int *filemode, int *status);
+
+/*---------------- utility routines -------------*/
+float ffvers(float *version);
+void ffupch(char *string);
+void ffgerr(int status, char *errtext);
+void ffpmsg(const char *err_message);
+int ffgmsg(char *err_message);
+void ffcmsg(void);
+void ffrprt(FILE *stream, int status);
+void ffcmps(char *templt, char *colname, int casesen, int *match,
+ int *exact);
+int fftkey(char *keyword, int *status);
+int fftrec(char *card, int *status);
+int ffnchk(fitsfile *fptr, int *status);
+int ffkeyn(char *keyroot, int value, char *keyname, int *status);
+int ffnkey(int value, char *keyroot, char *keyname, int *status);
+int ffgkcl(char *card);
+int ffdtyp(char *cval, char *dtype, int *status);
+int ffpsvc(char *card, char *value, char *comm, int *status);
+int ffgknm(char *card, char *name, int *length, int *status);
+int ffgthd(char *tmplt, char *card, int *hdtype, int *status);
+int ffasfm(char *tform, int *datacode, long *width, int *decim, int *status);
+int ffbnfm(char *tform, int *datacode, long *repeat, long *width, int *status);
+int ffgabc(int tfields, char **tform, int space, long *rowlen, long *tbcol,
+ int *status);
+
+/*----------------- write single keywords --------------*/
+int ffpky(fitsfile *fptr, int datatype, char *keyname, void *value,
+ char *comm, int *status);
+int ffprec(fitsfile *fptr, const char *card, int *status);
+int ffpcom(fitsfile *fptr, const char *comm, int *status);
+int ffpunt(fitsfile *fptr, char *keyname, char *unit, int *status);
+int ffphis(fitsfile *fptr, const char *history, int *status);
+int ffpdat(fitsfile *fptr, int *status);
+int ffgstm(char *timestr, int *timeref, int *status);
+int ffgsdt(int *day, int *month, int *year, int *status);
+int ffdt2s(int year, int month, int day, char *datestr, int *status);
+int fftm2s(int year, int month, int day, int hour, int minute, double second,
+ int decimals, char *datestr, int *status);
+int ffs2dt(char *datestr, int *year, int *month, int *day, int *status);
+int ffs2tm(char *datestr, int *year, int *month, int *day, int *hour,
+ int *minute, double *second, int *status);
+int ffpkyu(fitsfile *fptr, char *keyname, char *comm, int *status);
+int ffpkys(fitsfile *fptr, char *keyname, char *value, char *comm,int *status);
+int ffpkls(fitsfile *fptr, char *keyname, char *value, char *comm,int *status);
+int ffplsw(fitsfile *fptr, int *status);
+int ffpkyl(fitsfile *fptr, char *keyname, int value, char *comm, int *status);
+int ffpkyj(fitsfile *fptr, char *keyname, long value, char *comm, int *status);
+int ffpkyf(fitsfile *fptr, char *keyname, float value, int decim, char *comm,
+ int *status);
+int ffpkye(fitsfile *fptr, char *keyname, float value, int decim, char *comm,
+ int *status);
+int ffpkyg(fitsfile *fptr, char *keyname, double value, int decim, char *comm,
+ int *status);
+int ffpkyd(fitsfile *fptr, char *keyname, double value, int decim, char *comm,
+ int *status);
+int ffpkyc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm,
+ int *status);
+int ffpkym(fitsfile *fptr, char *keyname, double *value, int decim, char *comm,
+ int *status);
+int ffpkfc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm,
+ int *status);
+int ffpkfm(fitsfile *fptr, char *keyname, double *value, int decim, char *comm,
+ int *status);
+int ffpkyt(fitsfile *fptr, char *keyname, long intval, double frac, char *comm,
+ int *status);
+int ffptdm( fitsfile *fptr, int colnum, int naxis, long naxes[], int *status);
+
+/*----------------- write array of keywords --------------*/
+int ffpkns(fitsfile *fptr, char *keyroot, int nstart, int nkey, char *value[],
+ char *comm[], int *status);
+int ffpknl(fitsfile *fptr, char *keyroot, int nstart, int nkey, int *value,
+ char *comm[], int *status);
+int ffpknj(fitsfile *fptr, char *keyroot, int nstart, int nkey, long *value,
+ char *comm[], int *status);
+int ffpknf(fitsfile *fptr, char *keyroot, int nstart, int nkey, float *value,
+ int decim, char *comm[], int *status);
+int ffpkne(fitsfile *fptr, char *keyroot, int nstart, int nkey, float *value,
+ int decim, char *comm[], int *status);
+int ffpkng(fitsfile *fptr, char *keyroot, int nstart, int nkey, double *value,
+ int decim, char *comm[], int *status);
+int ffpknd(fitsfile *fptr, char *keyroot, int nstart, int nkey, double *value,
+ int decim, char *comm[], int *status);
+int ffcpky(fitsfile *infptr,fitsfile *outfptr,int incol,int outcol,
+ char *rootname, int *status);
+
+/*----------------- write required header keywords --------------*/
+int ffphps( fitsfile *fptr, int bitpix, int naxis, long naxes[], int *status);
+int ffphpr( fitsfile *fptr, int simple, int bitpix, int naxis, long naxes[],
+ long pcount, long gcount, int extend, int *status);
+int ffphtb(fitsfile *fptr, long naxis1, long naxis2, int tfields, char **ttype,
+ long *tbcol, char **tform, char **tunit, char *extname, int *status);
+int ffphbn(fitsfile *fptr, long naxis2, int tfields, char **ttype,
+ char **tform, char **tunit, char *extname, long pcount, int *status);
+
+/*----------------- write template keywords --------------*/
+int ffpktp(fitsfile *fptr, const char *filename, int *status);
+
+/*------------------ get header information --------------*/
+int ffghsp(fitsfile *fptr, int *nexist, int *nmore, int *status);
+int ffghps(fitsfile *fptr, int *nexist, int *position, int *status);
+
+/*------------------ move position in header -------------*/
+int ffmaky(fitsfile *fptr, int nrec, int *status);
+int ffmrky(fitsfile *fptr, int nrec, int *status);
+
+/*------------------ read single keywords -----------------*/
+int ffgnxk(fitsfile *fptr, char **inclist, int ninc, char **exclist,
+ int nexc, char *card, int *status);
+int ffgrec(fitsfile *fptr, int nrec, char *card, int *status);
+int ffgcrd(fitsfile *fptr, char *keyname, char *card, int *status);
+int ffgunt(fitsfile *fptr, char *keyname, char *unit, int *status);
+int ffgkyn(fitsfile *fptr, int nkey, char *keyname, char *keyval, char *comm,
+ int *status);
+int ffgkey(fitsfile *fptr, char *keyname, char *keyval, char *comm,
+ int *status);
+
+int ffgky( fitsfile *fptr, int datatype, char *keyname, void *value,
+ char *comm, int *status);
+int ffgkys(fitsfile *fptr, char *keyname, char *value, char *comm, int *status);
+int ffgkls(fitsfile *fptr, char *keyname, char **value, char *comm, int *status)
+;
+int ffgkyl(fitsfile *fptr, char *keyname, int *value, char *comm, int *status);
+int ffgkyj(fitsfile *fptr, char *keyname, long *value, char *comm, int *status);
+int ffgkye(fitsfile *fptr, char *keyname, float *value, char *comm,int *status);
+int ffgkyd(fitsfile *fptr, char *keyname, double *value,char *comm,int *status);
+int ffgkyc(fitsfile *fptr, char *keyname, float *value, char *comm,int *status);
+int ffgkym(fitsfile *fptr, char *keyname, double *value,char *comm,int *status);
+int ffgkyt(fitsfile *fptr, char *keyname, long *ivalue, double *dvalue,
+ char *comm, int *status);
+int ffgtdm(fitsfile *fptr, int colnum, int maxdim, int *naxis, long naxes[],
+ int *status);
+int ffdtdm(fitsfile *fptr, char *tdimstr, int colnum, int maxdim,
+ int *naxis, long naxes[], int *status);
+
+/*------------------ read array of keywords -----------------*/
+int ffgkns(fitsfile *fptr, char *keyname, int nstart, int nmax, char *value[],
+ int *nfound, int *status);
+int ffgknl(fitsfile *fptr, char *keyname, int nstart, int nmax, int *value,
+ int *nfound, int *status);
+int ffgknj(fitsfile *fptr, char *keyname, int nstart, int nmax, long *value,
+ int *nfound, int *status);
+int ffgkne(fitsfile *fptr, char *keyname, int nstart, int nmax, float *value,
+ int *nfound, int *status);
+int ffgknd(fitsfile *fptr, char *keyname, int nstart, int nmax, double *value,
+ int *nfound, int *status);
+int ffh2st(fitsfile *fptr, char **header, int *status);
+
+/*----------------- read required header keywords --------------*/
+int ffghpr(fitsfile *fptr, int maxdim, int *simple, int *bitpix, int *naxis,
+ long naxes[], long *pcount, long *gcount, int *extend, int *status);
+
+int ffghtb(fitsfile *fptr,int maxfield, long *naxis1, long *naxis2,
+ int *tfields, char **ttype, long *tbcol, char **tform, char **tunit,
+ char *extname, int *status);
+
+int ffghbn(fitsfile *fptr, int maxfield, long *naxis2, int *tfields,
+ char **ttype, char **tform, char **tunit, char *extname,
+ long *pcount, int *status);
+
+/*--------------------- update keywords ---------------*/
+int ffuky(fitsfile *fptr, int datatype, char *keyname, void *value,
+ char *comm, int *status);
+int ffucrd(fitsfile *fptr, char *keyname, char *card, int *status);
+int ffukyu(fitsfile *fptr, char *keyname, char *comm, int *status);
+int ffukys(fitsfile *fptr, char *keyname, char *value, char *comm, int *status);
+int ffukls(fitsfile *fptr, char *keyname, char *value, char *comm, int *status);
+int ffukyl(fitsfile *fptr, char *keyname, int value, char *comm, int *status);
+int ffukyj(fitsfile *fptr, char *keyname, long value, char *comm, int *status);
+int ffukyf(fitsfile *fptr, char *keyname, float value, int decim, char *comm,
+ int *status);
+int ffukye(fitsfile *fptr, char *keyname, float value, int decim, char *comm,
+ int *status);
+int ffukyg(fitsfile *fptr, char *keyname, double value, int decim, char *comm,
+ int *status);
+int ffukyd(fitsfile *fptr, char *keyname, double value, int decim, char *comm,
+ int *status);
+int ffukyc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm,
+ int *status);
+int ffukym(fitsfile *fptr, char *keyname, double *value, int decim, char *comm,
+ int *status);
+int ffukfc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm,
+ int *status);
+int ffukfm(fitsfile *fptr, char *keyname, double *value, int decim, char *comm,
+ int *status);
+
+/*--------------------- modify keywords ---------------*/
+int ffmrec(fitsfile *fptr, int nkey, char *card, int *status);
+int ffmcrd(fitsfile *fptr, char *keyname, char *card, int *status);
+int ffmnam(fitsfile *fptr, char *oldname, char *newname, int *status);
+int ffmcom(fitsfile *fptr, char *keyname, char *comm, int *status);
+int ffmkyu(fitsfile *fptr, char *keyname, char *comm, int *status);
+int ffmkys(fitsfile *fptr, char *keyname, char *value, char *comm,int *status);
+int ffmkls(fitsfile *fptr, char *keyname, char *value, char *comm,int *status);
+int ffmkyl(fitsfile *fptr, char *keyname, int value, char *comm, int *status);
+int ffmkyj(fitsfile *fptr, char *keyname, long value, char *comm, int *status);
+int ffmkyf(fitsfile *fptr, char *keyname, float value, int decim, char *comm,
+ int *status);
+int ffmkye(fitsfile *fptr, char *keyname, float value, int decim, char *comm,
+ int *status);
+int ffmkyg(fitsfile *fptr, char *keyname, double value, int decim, char *comm,
+ int *status);
+int ffmkyd(fitsfile *fptr, char *keyname, double value, int decim, char *comm,
+ int *status);
+int ffmkyc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm,
+ int *status);
+int ffmkym(fitsfile *fptr, char *keyname, double *value, int decim, char *comm,
+ int *status);
+int ffmkfc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm,
+ int *status);
+int ffmkfm(fitsfile *fptr, char *keyname, double *value, int decim, char *comm,
+ int *status);
+
+/*--------------------- insert keywords ---------------*/
+int ffirec(fitsfile *fptr, int nkey, char *card, int *status);
+int ffikyu(fitsfile *fptr, char *keyname, char *comm, int *status);
+int ffikys(fitsfile *fptr, char *keyname, char *value, char *comm,int *status);
+int ffikls(fitsfile *fptr, char *keyname, char *value, char *comm,int *status);
+int ffikyl(fitsfile *fptr, char *keyname, int value, char *comm, int *status);
+int ffikyj(fitsfile *fptr, char *keyname, long value, char *comm, int *status);
+int ffikyf(fitsfile *fptr, char *keyname, float value, int decim, char *comm,
+ int *status);
+int ffikye(fitsfile *fptr, char *keyname, float value, int decim, char *comm,
+ int *status);
+int ffikyg(fitsfile *fptr, char *keyname, double value, int decim, char *comm,
+ int *status);
+int ffikyd(fitsfile *fptr, char *keyname, double value, int decim, char *comm,
+ int *status);
+int ffikyc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm,
+ int *status);
+int ffikym(fitsfile *fptr, char *keyname, double *value, int decim, char *comm,
+ int *status);
+int ffikfc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm,
+ int *status);
+int ffikfm(fitsfile *fptr, char *keyname, double *value, int decim, char *comm,
+ int *status);
+
+/*--------------------- delete keywords ---------------*/
+int ffdkey(fitsfile *fptr, char *keyname, int *status);
+int ffdrec(fitsfile *fptr, int keypos, int *status);
+
+/*--------------------- get HDU information -------------*/
+int ffghdn(fitsfile *fptr, int *chdunum);
+int ffghdt(fitsfile *fptr, int *exttype, int *status);
+int ffghad(fitsfile *fptr, long *headstart, long *datastart, long *dataend,
+ int *status);
+int ffgipr(fitsfile *fptr, int maxaxis, int *imgtype, int *naxis,
+ long *naxes, int *status);
+int ffgidt(fitsfile *fptr, int *imgtype, int *status);
+int ffgidm(fitsfile *fptr, int *naxis, int *status);
+int ffgisz(fitsfile *fptr, int nlen, long *naxes, int *status);
+
+/*--------------------- HDU operations -------------*/
+int ffmahd(fitsfile *fptr, int hdunum, int *exttype, int *status);
+int ffmrhd(fitsfile *fptr, int hdumov, int *exttype, int *status);
+int ffmnhd(fitsfile *fptr, int exttype, char *hduname, int hduvers,
+ int *status);
+int ffthdu(fitsfile *fptr, int *nhdu, int *status);
+int ffcrhd(fitsfile *fptr, int *status);
+int ffcrim(fitsfile *fptr, int bitpix, int naxis, long *naxes, int *status);
+int ffcrtb(fitsfile *fptr, int tbltype, long naxis2, int tfields, char **ttype,
+ char **tform, char **tunit, char *extname, int *status);
+int ffiimg(fitsfile *fptr, int bitpix, int naxis, long *naxes, int *status);
+int ffitab(fitsfile *fptr, long naxis1, long naxis2, int tfields, char **ttype,
+ long *tbcol, char **tform, char **tunit, char *extname, int *status);
+int ffibin(fitsfile *fptr,long naxis2, int tfields, char **ttype, char **tform,
+ char **tunit, char *extname, long pcount, int *status);
+int ffrsim(fitsfile *fptr, int bitpix, int naxis, long *naxes, int *status);
+int ffdhdu(fitsfile *fptr, int *hdutype, int *status);
+int ffcopy(fitsfile *infptr, fitsfile *outfptr, int morekeys, int *status);
+int ffcphd(fitsfile *infptr, fitsfile *outfptr, int *status);
+int ffcpdt(fitsfile *infptr, fitsfile *outfptr, int *status);
+int ffchfl(fitsfile *fptr, int *status);
+int ffcdfl(fitsfile *fptr, int *status);
+
+int ffrdef(fitsfile *fptr, int *status);
+int ffhdef(fitsfile *fptr, int morekeys, int *status);
+int ffpthp(fitsfile *fptr, long theap, int *status);
+
+int ffcsum(fitsfile *fptr, long nrec, unsigned long *sum, int *status);
+void ffesum(unsigned long sum, int complm, char *ascii);
+unsigned long ffdsum(char *ascii, int complm, unsigned long *sum);
+int ffpcks(fitsfile *fptr, int *status);
+int ffupck(fitsfile *fptr, int *status);
+int ffvcks(fitsfile *fptr, int *datastatus, int *hdustatus, int *status);
+int ffgcks(fitsfile *fptr, unsigned long *datasum, unsigned long *hdusum,
+ int *status);
+
+/*--------------------- define scaling or null values -------------*/
+int ffpscl(fitsfile *fptr, double scale, double zero, int *status);
+int ffpnul(fitsfile *fptr, long nulvalue, int *status);
+int fftscl(fitsfile *fptr, int colnum, double scale, double zero, int *status);
+int fftnul(fitsfile *fptr, int colnum, long nulvalue, int *status);
+int ffsnul(fitsfile *fptr, int colnum, char *nulstring, int *status);
+
+/*--------------------- get column information -------------*/
+int ffgcno(fitsfile *fptr, int casesen, char *templt, int *colnum,
+ int *status);
+int ffgcnn(fitsfile *fptr, int casesen, char *templt, char *colname,
+ int *colnum, int *status);
+
+int ffgtcl(fitsfile *fptr, int colnum, int *typecode, long *repeat,
+ long *width, int *status);
+int ffgncl(fitsfile *fptr, int *ncols, int *status);
+int ffgnrw(fitsfile *fptr, long *nrows, int *status);
+int ffgacl(fitsfile *fptr, int colnum, char *ttype, long *tbcol,
+ char *tunit, char *tform, double *tscal, double *tzero,
+ char *tnull, char *tdisp, int *status);
+int ffgbcl(fitsfile *fptr, int colnum, char *ttype, char *tunit,
+ char *dtype, long *repeat, double *tscal, double *tzero,
+ long *tnull, char *tdisp, int *status);
+int ffgrsz(fitsfile *fptr, long *nrows, int *status);
+int ffgcdw(fitsfile *fptr, int colnum, int *width, int *status);
+
+/*--------------------- read primary array or image elements -------------*/
+int ffgpv(fitsfile *fptr, int datatype, long firstelem, long nelem,
+ void *nulval, void *array, int *anynul, int *status);
+int ffgpf(fitsfile *fptr, int datatype, long firstelem, long nelem,
+ void *array, char *nullarray, int *anynul, int *status);
+int ffgpvb(fitsfile *fptr, long group, long firstelem, long nelem, unsigned
+ char nulval, unsigned char *array, int *anynul, int *status);
+int ffgpvui(fitsfile *fptr, long group, long firstelem, long nelem,
+ unsigned short nulval, unsigned short *array, int *anynul,
+ int *status);
+int ffgpvi(fitsfile *fptr, long group, long firstelem, long nelem,
+ short nulval, short *array, int *anynul, int *status);
+int ffgpvuj(fitsfile *fptr, long group, long firstelem, long nelem,
+ unsigned long nulval, unsigned long *array, int *anynul,
+ int *status);
+int ffgpvj(fitsfile *fptr, long group, long firstelem, long nelem,
+ long nulval, long *array, int *anynul, int *status);
+int ffgpvuk(fitsfile *fptr, long group, long firstelem, long nelem,
+ unsigned int nulval, unsigned int *array, int *anynul, int *status);
+int ffgpvk(fitsfile *fptr, long group, long firstelem, long nelem,
+ int nulval, int *array, int *anynul, int *status);
+int ffgpve(fitsfile *fptr, long group, long firstelem, long nelem,
+ float nulval, float *array, int *anynul, int *status);
+int ffgpvd(fitsfile *fptr, long group, long firstelem, long nelem,
+ double nulval, double *array, int *anynul, int *status);
+
+int ffgpfb(fitsfile *fptr, long group, long firstelem, long nelem,
+ unsigned char *array, char *nularray, int *anynul, int *status);
+int ffgpfui(fitsfile *fptr, long group, long firstelem, long nelem,
+ unsigned short *array, char *nularray, int *anynul, int *status);
+int ffgpfi(fitsfile *fptr, long group, long firstelem, long nelem,
+ short *array, char *nularray, int *anynul, int *status);
+int ffgpfuj(fitsfile *fptr, long group, long firstelem, long nelem,
+ unsigned long *array, char *nularray, int *anynul, int *status);
+int ffgpfj(fitsfile *fptr, long group, long firstelem, long nelem,
+ long *array, char *nularray, int *anynul, int *status);
+int ffgpfuk(fitsfile *fptr, long group, long firstelem, long nelem,
+ unsigned int *array, char *nularray, int *anynul, int *status);
+int ffgpfk(fitsfile *fptr, long group, long firstelem, long nelem,
+ int *array, char *nularray, int *anynul, int *status);
+int ffgpfe(fitsfile *fptr, long group, long firstelem, long nelem,
+ float *array, char *nularray, int *anynul, int *status);
+int ffgpfd(fitsfile *fptr, long group, long firstelem, long nelem,
+ double *array, char *nularray, int *anynul, int *status);
+
+int ffg2db(fitsfile *fptr, long group, unsigned char nulval, long ncols,
+ long naxis1, long naxis2, unsigned char *array,
+ int *anynul, int *status);
+int ffg2dui(fitsfile *fptr, long group, unsigned short nulval, long ncols,
+ long naxis1, long naxis2, unsigned short *array,
+ int *anynul, int *status);
+int ffg2di(fitsfile *fptr, long group, short nulval, long ncols,
+ long naxis1, long naxis2, short *array,
+ int *anynul, int *status);
+int ffg2duj(fitsfile *fptr, long group, unsigned long nulval, long ncols,
+ long naxis1, long naxis2, unsigned long *array,
+ int *anynul, int *status);
+int ffg2dj(fitsfile *fptr, long group, long nulval, long ncols,
+ long naxis1, long naxis2, long *array,
+ int *anynul, int *status);
+int ffg2duk(fitsfile *fptr, long group, unsigned int nulval, long ncols,
+ long naxis1, long naxis2, unsigned int *array,
+ int *anynul, int *status);
+int ffg2dk(fitsfile *fptr, long group, int nulval, long ncols,
+ long naxis1, long naxis2, int *array,
+ int *anynul, int *status);
+int ffg2de(fitsfile *fptr, long group, float nulval, long ncols,
+ long naxis1, long naxis2, float *array,
+ int *anynul, int *status);
+int ffg2dd(fitsfile *fptr, long group, double nulval, long ncols,
+ long naxis1, long naxis2, double *array,
+ int *anynul, int *status);
+
+int ffg3db(fitsfile *fptr, long group, unsigned char nulval, long ncols,
+ long nrows, long naxis1, long naxis2, long naxis3,
+ unsigned char *array, int *anynul, int *status);
+int ffg3dui(fitsfile *fptr, long group, unsigned short nulval, long ncols,
+ long nrows, long naxis1, long naxis2, long naxis3,
+ unsigned short *array, int *anynul, int *status);
+int ffg3di(fitsfile *fptr, long group, short nulval, long ncols,
+ long nrows, long naxis1, long naxis2, long naxis3,
+ short *array, int *anynul, int *status);
+int ffg3duj(fitsfile *fptr, long group, unsigned long nulval, long ncols,
+ long nrows, long naxis1, long naxis2, long naxis3,
+ unsigned long *array, int *anynul, int *status);
+int ffg3dj(fitsfile *fptr, long group, long nulval, long ncols,
+ long nrows, long naxis1, long naxis2, long naxis3,
+ long *array, int *anynul, int *status);
+int ffg3duk(fitsfile *fptr, long group, unsigned int nulval, long ncols,
+ long nrows, long naxis1, long naxis2, long naxis3,
+ unsigned int *array, int *anynul, int *status);
+int ffg3dk(fitsfile *fptr, long group, int nulval, long ncols,
+ long nrows, long naxis1, long naxis2, long naxis3,
+ int *array, int *anynul, int *status);
+int ffg3de(fitsfile *fptr, long group, float nulval, long ncols,
+ long nrows, long naxis1, long naxis2, long naxis3,
+ float *array, int *anynul, int *status);
+int ffg3dd(fitsfile *fptr, long group, double nulval, long ncols,
+ long nrows, long naxis1, long naxis2, long naxis3,
+ double *array, int *anynul, int *status);
+
+int ffgsvb(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
+ long *trc, long *inc, unsigned char nulval, unsigned char *array,
+ int *anynul, int *status);
+int ffgsvui(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
+ long *trc, long *inc, unsigned short nulval, unsigned short *array,
+ int *anynul, int *status);
+int ffgsvi(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
+ long *trc, long *inc, short nulval, short *array, int *anynul, int *status);
+int ffgsvuj(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
+ long *trc, long *inc, unsigned long nulval, unsigned long *array,
+ int *anynul, int *status);
+int ffgsvj(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
+ long *trc, long *inc, long nulval, long *array, int *anynul, int *status);
+int ffgsvuk(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
+ long *trc, long *inc, unsigned int nulval, unsigned int *array,
+ int *anynul, int *status);
+int ffgsvk(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
+ long *trc, long *inc, int nulval, int *array, int *anynul, int *status);
+int ffgsve(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
+ long *trc, long *inc, float nulval, float *array, int *anynul, int *status);
+int ffgsvd(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
+ long *trc, long *inc, double nulval, double *array, int *anynul,
+ int *status);
+
+int ffgsfb(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
+ long *trc, long *inc, unsigned char *array, char *flagval,
+ int *anynul, int *status);
+int ffgsfui(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
+ long *trc, long *inc, unsigned short *array, char *flagval, int *anynul,
+ int *status);
+int ffgsfi(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
+ long *trc, long *inc, short *array, char *flagval, int *anynul, int *status);
+int ffgsfuj(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
+ long *trc, long *inc, unsigned long *array, char *flagval, int *anynul,
+ int *status);
+int ffgsfj(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
+ long *trc, long *inc, long *array, char *flagval, int *anynul, int *status);
+int ffgsfuk(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
+ long *trc, long *inc, unsigned int *array, char *flagval, int *anynul,
+ int *status);
+int ffgsfk(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
+ long *trc, long *inc, int *array, char *flagval, int *anynul, int *status);
+int ffgsfe(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
+ long *trc, long *inc, float *array, char *flagval, int *anynul, int *status);
+int ffgsfd(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
+ long *trc, long *inc, double *array, char *flagval, int *anynul,
+ int *status);
+
+int ffggpb(fitsfile *fptr, long group, long firstelem, long nelem,
+ unsigned char *array, int *status);
+int ffggpui(fitsfile *fptr, long group, long firstelem, long nelem,
+ unsigned short *array, int *status);
+int ffggpi(fitsfile *fptr, long group, long firstelem, long nelem,
+ short *array, int *status);
+int ffggpuj(fitsfile *fptr, long group, long firstelem, long nelem,
+ unsigned long *array, int *status);
+int ffggpj(fitsfile *fptr, long group, long firstelem, long nelem,
+ long *array, int *status);
+int ffggpuk(fitsfile *fptr, long group, long firstelem, long nelem,
+ unsigned int *array, int *status);
+int ffggpk(fitsfile *fptr, long group, long firstelem, long nelem,
+ int *array, int *status);
+int ffggpe(fitsfile *fptr, long group, long firstelem, long nelem,
+ float *array, int *status);
+int ffggpd(fitsfile *fptr, long group, long firstelem, long nelem,
+ double *array, int *status);
+
+/*--------------------- read column elements -------------*/
+int ffgcv( fitsfile *fptr, int datatype, int colnum, long firstrow,
+ long firstelem, long nelem, void *nulval, void *array, int *anynul,
+ int *status);
+int ffgcf( fitsfile *fptr, int datatype, int colnum, long firstrow,
+ long firstelem, long nelem, void *array, char *nullarray,
+ int *anynul, int *status);
+int ffgcvs(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, char *nulval, char **array, int *anynul, int *status);
+int ffgcl (fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, char *array, int *status);
+int ffgcvl (fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, char nulval, char *array, int *anynul, int *status);
+int ffgcvb(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, unsigned char nulval, unsigned char *array,
+ int *anynul, int *status);
+int ffgcvui(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, unsigned short nulval, unsigned short *array,
+ int *anynul, int *status);
+int ffgcvi(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, short nulval, short *array, int *anynul, int *status);
+int ffgcvuj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, unsigned long nulval, unsigned long *array, int *anynul,
+ int *status);
+int ffgcvj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, long nulval, long *array, int *anynul, int *status);
+int ffgcvuk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, unsigned int nulval, unsigned int *array, int *anynul,
+ int *status);
+int ffgcvk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, int nulval, int *array, int *anynul, int *status);
+int ffgcve(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, float nulval, float *array, int *anynul, int *status);
+int ffgcvd(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, double nulval, double *array, int *anynul, int *status);
+int ffgcvc(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, float nulval, float *array, int *anynul, int *status);
+int ffgcvm(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, double nulval, double *array, int *anynul, int *status);
+int ffgcx(fitsfile *fptr, int colnum, long firstrow, long firstbit,
+ long nbits, char *larray, int *status);
+int ffgcxui(fitsfile *fptr, int colnum, long firstrow, long nrows,
+ long firstbit, int nbits, unsigned short *array, int *status);
+int ffgcxuk(fitsfile *fptr, int colnum, long firstrow, long nrows,
+ long firstbit, int nbits, unsigned int *array, int *status);
+
+int ffgcfs(fitsfile *fptr, int colnum, long firstrow, long firstelem, long
+ nelem, char **array, char *nularray, int *anynul, int *status);
+int ffgcfl(fitsfile *fptr, int colnum, long firstrow, long firstelem, long
+ nelem, char *array, char *nularray, int *anynul, int *status);
+int ffgcfb(fitsfile *fptr, int colnum, long firstrow, long firstelem, long
+ nelem, unsigned char *array, char *nularray, int *anynul, int *status);
+int ffgcfui(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, unsigned short *array, char *nularray, int *anynul,
+ int *status);
+int ffgcfi(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, short *array, char *nularray, int *anynul, int *status);
+int ffgcfuj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, unsigned long *array, char *nularray, int *anynul,
+ int *status);
+int ffgcfj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, long *array, char *nularray, int *anynul, int *status);
+int ffgcfuk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, unsigned int *array, char *nularray, int *anynul,
+ int *status);
+int ffgcfk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, int *array, char *nularray, int *anynul, int *status);
+int ffgcfe(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, float *array, char *nularray, int *anynul, int *status);
+int ffgcfd(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, double *array, char *nularray, int *anynul, int *status);
+int ffgcfc(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, float *array, char *nularray, int *anynul, int *status);
+int ffgcfm(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, double *array, char *nularray, int *anynul, int *status);
+
+int ffgdes(fitsfile *fptr, int colnum, long rownum, long *length,
+ long *heapaddr, int *status);
+
+int ffgdess(fitsfile *fptr, int colnum, long firstrow, long nrows, long *length,
+ long *heapaddr, int *status);
+
+int ffgtbb(fitsfile *fptr, long firstrow, long firstchar, long nchars,
+ unsigned char *values, int *status);
+
+/*------------ write primary array or image elements -------------*/
+int ffppr(fitsfile *fptr, int datatype, long firstelem, long nelem,
+ void *array, int *status);
+int ffpprb(fitsfile *fptr, long group, long firstelem,
+ long nelem, unsigned char *array, int *status);
+int ffpprui(fitsfile *fptr, long group, long firstelem,
+ long nelem, unsigned short *array, int *status);
+int ffppri(fitsfile *fptr, long group, long firstelem,
+ long nelem, short *array, int *status);
+int ffppruj(fitsfile *fptr, long group, long firstelem,
+ long nelem, unsigned long *array, int *status);
+int ffpprj(fitsfile *fptr, long group, long firstelem,
+ long nelem, long *array, int *status);
+int ffppruk(fitsfile *fptr, long group, long firstelem,
+ long nelem, unsigned int *array, int *status);
+int ffpprk(fitsfile *fptr, long group, long firstelem,
+ long nelem, int *array, int *status);
+int ffppre(fitsfile *fptr, long group, long firstelem,
+ long nelem, float *array, int *status);
+int ffpprd(fitsfile *fptr, long group, long firstelem,
+ long nelem, double *array, int *status);
+
+int ffppru(fitsfile *fptr, long group, long firstelem, long nelem,
+ int *status);
+int ffpprn(fitsfile *fptr, long firstelem, long nelem, int *status);
+
+int ffppn(fitsfile *fptr, int datatype, long firstelem, long nelem,
+ void *array, void *nulval, int *status);
+int ffppnb(fitsfile *fptr, long group, long firstelem, long nelem,
+ unsigned char *array, unsigned char nulval, int *status);
+int ffppnui(fitsfile *fptr, long group, long firstelem,
+ long nelem, unsigned short *array, unsigned short nulval,
+ int *status);
+int ffppni(fitsfile *fptr, long group, long firstelem,
+ long nelem, short *array, short nulval, int *status);
+int ffppnj(fitsfile *fptr, long group, long firstelem,
+ long nelem, long *array, long nulval, int *status);
+int ffppnuj(fitsfile *fptr, long group, long firstelem, long nelem,
+ unsigned long *array, unsigned long nulval, int *status);
+int ffppnuk(fitsfile *fptr, long group, long firstelem, long nelem,
+ unsigned int *array, unsigned int nulval, int *status);
+int ffppnk(fitsfile *fptr, long group, long firstelem,
+ long nelem, int *array, int nulval, int *status);
+int ffppne(fitsfile *fptr, long group, long firstelem,
+ long nelem, float *array, float nulval, int *status);
+int ffppnd(fitsfile *fptr, long group, long firstelem,
+ long nelem, double *array, double nulval, int *status);
+
+int ffp2db(fitsfile *fptr, long group, long ncols, long naxis1,
+ long naxis2, unsigned char *array, int *status);
+int ffp2dui(fitsfile *fptr, long group, long ncols, long naxis1,
+ long naxis2, unsigned short *array, int *status);
+int ffp2di(fitsfile *fptr, long group, long ncols, long naxis1,
+ long naxis2, short *array, int *status);
+int ffp2duj(fitsfile *fptr, long group, long ncols, long naxis1,
+ long naxis2, unsigned long *array, int *status);
+int ffp2dj(fitsfile *fptr, long group, long ncols, long naxis1,
+ long naxis2, long *array, int *status);
+int ffp2duk(fitsfile *fptr, long group, long ncols, long naxis1,
+ long naxis2, unsigned int *array, int *status);
+int ffp2dk(fitsfile *fptr, long group, long ncols, long naxis1,
+ long naxis2, int *array, int *status);
+int ffp2de(fitsfile *fptr, long group, long ncols, long naxis1,
+ long naxis2, float *array, int *status);
+int ffp2dd(fitsfile *fptr, long group, long ncols, long naxis1,
+ long naxis2, double *array, int *status);
+
+int ffp3db(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
+ long naxis2, long naxis3, unsigned char *array, int *status);
+int ffp3dui(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
+ long naxis2, long naxis3, unsigned short *array, int *status);
+int ffp3di(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
+ long naxis2, long naxis3, short *array, int *status);
+int ffp3duj(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
+ long naxis2, long naxis3, unsigned long *array, int *status);
+int ffp3dj(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
+ long naxis2, long naxis3, long *array, int *status);
+int ffp3duk(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
+ long naxis2, long naxis3, unsigned int *array, int *status);
+int ffp3dk(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
+ long naxis2, long naxis3, int *array, int *status);
+int ffp3de(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
+ long naxis2, long naxis3, float *array, int *status);
+int ffp3dd(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
+ long naxis2, long naxis3, double *array, int *status);
+
+int ffpssb(fitsfile *fptr, long group, long naxis, long *naxes,
+ long *fpixel, long *lpixel, unsigned char *array, int *status);
+int ffpssui(fitsfile *fptr, long group, long naxis, long *naxes,
+ long *fpixel, long *lpixel, unsigned short *array, int *status);
+int ffpssi(fitsfile *fptr, long group, long naxis, long *naxes,
+ long *fpixel, long *lpixel, short *array, int *status);
+int ffpssuj(fitsfile *fptr, long group, long naxis, long *naxes,
+ long *fpixel, long *lpixel, unsigned long *array, int *status);
+int ffpssj(fitsfile *fptr, long group, long naxis, long *naxes,
+ long *fpixel, long *lpixel, long *array, int *status);
+int ffpssuk(fitsfile *fptr, long group, long naxis, long *naxes,
+ long *fpixel, long *lpixel, unsigned int *array, int *status);
+int ffpssk(fitsfile *fptr, long group, long naxis, long *naxes,
+ long *fpixel, long *lpixel, int *array, int *status);
+int ffpsse(fitsfile *fptr, long group, long naxis, long *naxes,
+ long *fpixel, long *lpixel, float *array, int *status);
+int ffpssd(fitsfile *fptr, long group, long naxis, long *naxes,
+ long *fpixel, long *lpixel, double *array, int *status);
+
+int ffpgpb(fitsfile *fptr, long group, long firstelem,
+ long nelem, unsigned char *array, int *status);
+int ffpgpui(fitsfile *fptr, long group, long firstelem,
+ long nelem, unsigned short *array, int *status);
+int ffpgpi(fitsfile *fptr, long group, long firstelem,
+ long nelem, short *array, int *status);
+int ffpgpuj(fitsfile *fptr, long group, long firstelem,
+ long nelem, unsigned long *array, int *status);
+int ffpgpj(fitsfile *fptr, long group, long firstelem,
+ long nelem, long *array, int *status);
+int ffpgpuk(fitsfile *fptr, long group, long firstelem,
+ long nelem, unsigned int *array, int *status);
+int ffpgpk(fitsfile *fptr, long group, long firstelem,
+ long nelem, int *array, int *status);
+int ffpgpe(fitsfile *fptr, long group, long firstelem,
+ long nelem, float *array, int *status);
+int ffpgpd(fitsfile *fptr, long group, long firstelem,
+ long nelem, double *array, int *status);
+
+/*--------------------- iterator functions -------------*/
+int fits_iter_set_by_name(iteratorCol *col, fitsfile *fptr, char *colname,
+ int datatype, int iotype);
+int fits_iter_set_by_num(iteratorCol *col, fitsfile *fptr, int colnum,
+ int datatype, int iotype);
+int fits_iter_set_file(iteratorCol *col, fitsfile *fptr);
+int fits_iter_set_colname(iteratorCol *col, char *colname);
+int fits_iter_set_colnum(iteratorCol *col, int colnum);
+int fits_iter_set_datatype(iteratorCol *col, int datatype);
+int fits_iter_set_iotype(iteratorCol *col, int iotype);
+
+fitsfile * fits_iter_get_file(iteratorCol *col);
+char * fits_iter_get_colname(iteratorCol *col);
+int fits_iter_get_colnum(iteratorCol *col);
+int fits_iter_get_datatype(iteratorCol *col);
+int fits_iter_get_iotype(iteratorCol *col);
+void * fits_iter_get_array(iteratorCol *col);
+long fits_iter_get_tlmin(iteratorCol *col);
+long fits_iter_get_tlmax(iteratorCol *col);
+long fits_iter_get_repeat(iteratorCol *col);
+char * fits_iter_get_tunit(iteratorCol *col);
+char * fits_iter_get_tdisp(iteratorCol *col);
+
+int ffiter(int ncols, iteratorCol *data, long offset, long nPerLoop,
+ int (*workFn)( long totaln, long offset, long firstn,
+ long nvalues, int narrays, iteratorCol *data, void *userPointer),
+ void *userPointer, int *status);
+
+/*--------------------- write column elements -------------*/
+int ffpcl(fitsfile *fptr, int datatype, int colnum, long firstrow,
+ long firstelem, long nelem, void *array, int *status);
+int ffpcls(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, char **array, int *status);
+int ffpcll(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, char *array, int *status);
+int ffpclb(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, unsigned char *array, int *status);
+int ffpclui(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, unsigned short *array, int *status);
+int ffpcli(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, short *array, int *status);
+int ffpcluj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, unsigned long *array, int *status);
+int ffpclj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, long *array, int *status);
+int ffpcluk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, unsigned int *array, int *status);
+int ffpclk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, int *array, int *status);
+int ffpcle(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, float *array, int *status);
+int ffpcld(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, double *array, int *status);
+int ffpclc(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, float *array, int *status);
+int ffpclm(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, double *array, int *status);
+int ffpclu(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, int *status);
+int ffpclx(fitsfile *fptr, int colnum, long frow, long fbit, long nbit,
+ char *larray, int *status);
+
+int ffpcn(fitsfile *fptr, int datatype, int colnum, long firstrow,
+ long firstelem, long nelem, void *array, void *nulval, int *status);
+int ffpcns( fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, char **array, char *nulvalue, int *status);
+int ffpcnl( fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, char *array, char nulvalue, int *status);
+int ffpcnb(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, unsigned char *array, unsigned char nulvalue,
+ int *status);
+int ffpcnui(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, unsigned short *array, unsigned short nulvalue,
+ int *status);
+int ffpcni(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, short *array, short nulvalue, int *status);
+int ffpcnuj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, unsigned long *array, unsigned long nulvalue,
+ int *status);
+int ffpcnj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, long *array, long nulvalue, int *status);
+int ffpcnuk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, unsigned int *array, unsigned int nulvalue,
+ int *status);
+int ffpcnk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, int *array, int nulvalue, int *status);
+int ffpcne(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, float *array, float nulvalue, int *status);
+int ffpcnd(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, double *array, double nulvalue, int *status);
+
+int ffpdes(fitsfile *fptr, int colnum, long rownum, long length,
+ long heapaddr, int *status);
+
+int ffptbb(fitsfile *fptr, long firstrow, long firstchar, long nchars,
+ unsigned char *values, int *status);
+
+int ffirow(fitsfile *fptr, long firstrow, long nrows, int *status);
+int ffdrow(fitsfile *fptr, long firstrow, long nrows, int *status);
+int ffdrws(fitsfile *fptr, long *rownum, long nrows, int *status);
+int fficol(fitsfile *fptr, int numcol, char *ttype, char *tform, int *status);
+int fficls(fitsfile *fptr, int firstcol, int ncols, char **ttype,
+ char **tform, int *status);
+int ffmvec(fitsfile *fptr, int colnum, long newveclen, int *status);
+int ffdcol(fitsfile *fptr, int numcol, int *status);
+int ffcpcl(fitsfile *infptr, fitsfile *outfptr, int incol, int outcol,
+ int create_col, int *status);
+
+/*--------------------- WCS Utilities ------------------*/
+int ffgics(fitsfile *fptr, double *xrval, double *yrval, double *xrpix,
+ double *yrpix, double *xinc, double *yinc, double *rot,
+ char *type, int *status);
+int ffgtcs(fitsfile *fptr, int xcol, int ycol, double *xrval,
+ double *yrval, double *xrpix, double *yrpix, double *xinc,
+ double *yinc, double *rot, char *type, int *status);
+int ffwldp(double xpix, double ypix, double xref, double yref,
+ double xrefpix, double yrefpix, double xinc, double yinc,
+ double rot, char *type, double *xpos, double *ypos, int *status);
+int ffxypx(double xpos, double ypos, double xref, double yref,
+ double xrefpix, double yrefpix, double xinc, double yinc,
+ double rot, char *type, double *xpix, double *ypix, int *status);
+
+/* WCS support routines (provide interface to Doug Mink's WCS library */
+int ffgiwcs(fitsfile *fptr, char **header, int *status);
+int ffgtwcs(fitsfile *fptr, int xcol, int ycol, char **header, int *status);
+
+/*--------------------- lexical parsing routines ------------------*/
+int fftexp( fitsfile *fptr, char *expr, int maxdim,
+ int *datatype, long *nelem, int *naxis,
+ long *naxes, int *status );
+
+int fffrow( fitsfile *infptr, char *expr,
+ long firstrow, long nrows,
+ long *n_good_rows, char *row_status, int *status);
+
+int ffffrw( fitsfile *fptr, char *expr, long *rownum, int *status);
+
+int fffrwc( fitsfile *fptr, char *expr, char *timeCol,
+ char *parCol, char *valCol, long ntimes,
+ double *times, char *time_status, int *status );
+
+int ffsrow( fitsfile *infptr, fitsfile *outfptr, char *expr,
+ int *status);
+
+int ffcrow( fitsfile *fptr, int datatype, char *expr,
+ long firstrow, long nelements, void *nulval,
+ void *array, int *anynul, int *status );
+
+int ffcalc_rng( fitsfile *infptr, char *expr, fitsfile *outfptr,
+ char *parName, char *parInfo, int nRngs,
+ long *start, long *end, int *status );
+
+int ffcalc( fitsfile *infptr, char *expr, fitsfile *outfptr,
+ char *parName, char *parInfo, int *status );
+
+ /* ffhist is not really intended as a user-callable routine */
+ /* but it may be useful for some specialized applications */
+
+int ffhist(fitsfile **fptr, char *outfile, int imagetype, int naxis,
+ char colname[4][FLEN_VALUE],
+ double *minin, double *maxin, double *binsizein,
+ char minname[4][FLEN_VALUE], char maxname[4][FLEN_VALUE],
+ char binname[4][FLEN_VALUE],
+ double weightin, char wtcol[FLEN_VALUE],
+ int recip, char *rowselect, int *status);
+
+int fits_select_image_section(fitsfile **fptr, char *outfile,
+ char *imagesection, int *status);
+int fits_select_section( fitsfile *infptr, fitsfile *outfptr,
+ char *imagesection, int *status);
+
+/*--------------------- grouping routines ------------------*/
+
+int ffgtcr(fitsfile *fptr, char *grpname, int grouptype, int *status);
+int ffgtis(fitsfile *fptr, char *grpname, int grouptype, int *status);
+int ffgtch(fitsfile *gfptr, int grouptype, int *status);
+int ffgtrm(fitsfile *gfptr, int rmopt, int *status);
+int ffgtcp(fitsfile *infptr, fitsfile *outfptr, int cpopt, int *status);
+int ffgtmg(fitsfile *infptr, fitsfile *outfptr, int mgopt, int *status);
+int ffgtcm(fitsfile *gfptr, int cmopt, int *status);
+int ffgtvf(fitsfile *gfptr, long *firstfailed, int *status);
+int ffgtop(fitsfile *mfptr,int group,fitsfile **gfptr,int *status);
+int ffgtam(fitsfile *gfptr, fitsfile *mfptr, int hdupos, int *status);
+int ffgtnm(fitsfile *gfptr, long *nmembers, int *status);
+int ffgmng(fitsfile *mfptr, long *nmembers, int *status);
+int ffgmop(fitsfile *gfptr, long member, fitsfile **mfptr, int *status);
+int ffgmcp(fitsfile *gfptr, fitsfile *mfptr, long member, int cpopt,
+ int *status);
+int ffgmtf(fitsfile *infptr, fitsfile *outfptr, long member, int tfopt,
+ int *status);
+int ffgmrm(fitsfile *fptr, long member, int rmopt, int *status);
+
+/*--------------------- group template parser routines ------------------*/
+
+int fits_execute_template(fitsfile *ff, char *ngp_template, int *status);
+
+/*--------------------- image compression routines ------------------*/
+
+int fits_comp_img(fitsfile *infptr, fitsfile *outfptr, int compress_type,
+ long *tilesize, int parm1, int parm2, int *status);
+int fits_is_compressed_image(fitsfile *fptr, int *status);
+int fits_decomp_img (fitsfile *infptr, fitsfile *outfptr, int *status);
+int fits_read_compressed_img(fitsfile *fptr,
+ int datatype, long *fpixel,long *lpixel,long *inc,
+ int nullcheck, void *nulval, void *array, char *nullarray,
+ int *anynul, int *status);
+
+int fits_read_compressed_pixels(fitsfile *fptr,
+ int datatype, long fpixel, long npixels,
+ int nullcheck, void *nulval, void *array, char *nullarray,
+ int *anynul, int *status);
+
+int fits_quantize_float (float fdata[], int nx, float in_null_value,
+ int noise_bits, int idata[], double *bscale, double *bzero,
+ int *iminval, int *imaxval);
+int fits_quantize_double (double fdata[], int nx, double in_null_value,
+ int noise_bits, int idata[], double *bscale, double *bzero,
+ int *iminval, int *imaxval);
+int fits_rcomp(int a[], int nx, unsigned char *c, int clen,int nblock);
+int fits_rdecomp (unsigned char *c, int clen, unsigned int array[], int nx,
+ int nblock);
+
+/* The following exclusion if __CINT__ is defined is needed for ROOT */
+#ifndef __CINT__
+#ifdef __cplusplus
+}
+#endif
+#endif
+
+#endif
+
diff --git a/include/cfitsio/fitsio2.h b/include/cfitsio/fitsio2.h
new file mode 100644
index 0000000..5636cc3
--- /dev/null
+++ b/include/cfitsio/fitsio2.h
@@ -0,0 +1,870 @@
+#ifndef _FITSIO2_H
+#define _FITSIO2_H
+
+#include "fitsio.h"
+
+#define DBUFFSIZE 28800 /* size of data buffer in bytes */
+
+#define NIOBUF 25 /* number of IO buffers to create */
+#define IOBUFLEN 2880 /* size in bytes of each IO buffer */
+#define MINDIRECT 8640 /* minimum size for direct reads and writes */
+ /* MINDIRECT must have a value >= 8640 */
+
+#define NATIVE 0 /* a generic machine that uses IEEE formats */
+#define ULTRIX 1
+#define ALPHA_OSF 2
+#define VAXVMS 3
+#define ALPHAVMS 4
+#define IBMPC 5
+#define CRAY 6
+
+#define GFLOAT 1
+#define IEEEFLOAT 2
+
+/* the following are used to determine what type machine we are running on */
+
+/* the following block determines the size of longs on SGI IRIX machines */
+#if defined(_MIPS_SZLONG)
+# if _MIPS_SZLONG == 32
+# define LONGSIZE 32
+# elif _MIPS_SZLONG == 64
+# define LONGSIZE 64
+# else
+# error "can't handle long size given by _MIPS_SZLONG"
+# endif
+#endif
+
+#if defined(vax) && defined(VMS)
+
+#define MACHINE VAXVMS
+#define BYTESWAPPED TRUE
+
+#elif defined(__alpha) && defined(__VMS)
+
+#if (__D_FLOAT == TRUE)
+
+/* this float option is the same as for VAX/VMS machines. */
+#define MACHINE VAXVMS
+#define BYTESWAPPED TRUE
+
+#elif (__G_FLOAT == TRUE)
+
+/* G_FLOAT is the default for ALPHA VMS systems */
+#define MACHINE ALPHAVMS
+#define BYTESWAPPED TRUE
+#define FLOATTYPE GFLOAT
+
+#elif (__IEEE_FLOAT == TRUE)
+
+#define MACHINE ALPHAVMS
+#define BYTESWAPPED TRUE
+#define FLOATTYPE IEEEFLOAT
+
+#endif
+
+#elif defined(__alpha) && defined(__unix__)
+
+#define MACHINE ALPHA_OSF
+#define BYTESWAPPED TRUE
+#define LONGSIZE 64
+
+#elif defined(ultrix) && defined(unix)
+
+#define MACHINE ULTRIX
+#define BYTESWAPPED TRUE
+
+#elif defined(__i386) || defined(__i386__) || defined(__i486__) || defined(__i586__)
+
+/* IBM PC */
+#define MACHINE IBMPC
+#define BYTESWAPPED TRUE
+
+#elif defined(_MSC_VER) || defined(__BORLANDC__) || defined(__TURBOC__)
+
+/* IBM PC running DOS or Windows */
+#define MACHINE IBMPC
+#define BYTESWAPPED TRUE
+
+#elif defined(_NI_mswin_)
+
+/* LabWindows/CVI with Windows 3.x, 95, or NT */
+#define MACHINE IBMPC
+#define BYTESWAPPED TRUE
+
+#elif defined(__EMX__)
+
+/* IBM PC running OS/2 */
+#define MACHINE IBMPC
+#define BYTESWAPPED TRUE
+
+#elif defined(__sparcv9)
+
+/* SUN Solaris7 in 64-bit mode */
+#define BYTESWAPPED FALSE
+#define MACHINE NATIVE
+#define LONGSIZE 64
+
+#else
+
+/* assume machine uses the same IEEE formats as used in FITS files */
+#define MACHINE NATIVE
+#define BYTESWAPPED FALSE
+
+#endif
+
+/* assume longs are 4 bytes long, unless previously set otherwise */
+#ifndef LONGSIZE
+#define LONGSIZE 32
+#endif
+
+#define IGNORE_EOF 1
+#define REPORT_EOF 0
+#define DATA_UNDEFINED -1
+#define NULL_UNDEFINED 1234554321
+#define ASCII_NULL_UNDEFINED 1 /* indicate no defined null value */
+
+#define maxvalue(A,B) ((A) > (B) ? (A) : (B))
+#define minvalue(A,B) ((A) < (B) ? (A) : (B))
+
+#define FSTRCMP(a,b) ((a)[0]<(b)[0]? -1:(a)[0]>(b)[0]?1:strcmp((a),(b)))
+#define FSTRNCMP(a,b,n) ((a)[0]<(b)[0]?-1:(a)[0]>(b)[0]?1:strncmp((a),(b),(n)))
+
+#if defined(__VMS) || defined(VMS)
+
+#define FNANMASK 0xFFFF /* mask all bits */
+#define DNANMASK 0xFFFF /* mask all bits */
+
+#else
+
+#define FNANMASK 0x7F80 /* mask bits 1 - 8; all set on NaNs */
+ /* all 0 on underflow or 0. */
+
+#define DNANMASK 0x7FF0 /* mask bits 1 - 11; all set on NaNs */
+ /* all 0 on underflow or 0. */
+
+#endif
+
+#if MACHINE == CRAY
+ /*
+ Cray machines: the large negative integer corresponds
+ to the 3 most sig digits set to 1. If these
+ 3 bits are set in a floating point number (64 bits), then it represents
+ a reserved value (i.e., a NaN)
+ */
+#define fnan(L) ( (L) >= 0xE000000000000000 ? 1 : 0) )
+
+#else
+ /* these functions work for both big and little endian machines */
+ /* that use the IEEE floating point format for internal numbers */
+
+ /* These functions tests whether the float value is a reserved IEEE */
+ /* value such as a Not-a-Number (NaN), or underflow, overflow, or */
+ /* infinity. The functions returns 1 if the value is a NaN, overflow */
+ /* or infinity; it returns 2 if the value is an denormalized underflow */
+ /* value; otherwise it returns 0. fnan tests floats, dnan tests doubles */
+
+#define fnan(L) \
+ ( (L & FNANMASK) == FNANMASK ? 1 : (L & FNANMASK) == 0 ? 2 : 0)
+
+#define dnan(L) \
+ ( (L & DNANMASK) == DNANMASK ? 1 : (L & DNANMASK) == 0 ? 2 : 0)
+
+#endif
+
+#define DUCHAR_MAX 255.49 /* max double value that fits in an unsigned char */
+#define DUCHAR_MIN -0.49 /* min double value that fits in an unsigned char */
+#define DUSHRT_MAX 65535.49 /* max double value that fits in a unsigned short*/
+#define DUSHRT_MIN -0.49 /* min double value that fits in an unsigned short */
+#define DSHRT_MAX 32767.49 /* max double value that fits in a short */
+#define DSHRT_MIN -32768.49 /* min double value that fits in a short */
+#define DULONG_MAX 4294967295.49 /* max double that fits in a unsigned long */
+#define DULONG_MIN -0.49 /* min double value that fits in an unsigned long */
+#define DLONG_MAX 2147483647.49 /* max double value that fits in a long */
+#define DLONG_MIN -2147483648.49 /* min double value that fits in a long */
+#define DUINT_MAX 4294967295.49 /* max dbl that fits in a unsigned 4-byte int */
+#define DUINT_MIN -0.49 /* min dbl that fits in an unsigned 4-byte int */
+#define DINT_MAX 2147483647.49 /* max double value that fits in a 4-byte int */
+#define DINT_MIN -2147483648.49 /* min double value that fits in a 4-byte int */
+
+#ifndef UINT32_MAX
+#define UINT32_MAX 4294967295U /* max unsigned 32-bit integer */
+#endif
+#ifndef INT32_MAX
+#define INT32_MAX 2147483647 /* max 32-bit integer */
+#endif
+#ifndef INT32_MIN
+#define INT32_MIN -2147483647 /* min 32-bit integer */
+#endif
+
+#define COMPRESS_NULL_VALUE -2147483647
+
+int ffmkky(char *keyname, char *keyval, char *comm, char *card, int *status);
+int ffgnky(fitsfile *fptr, char *card, int *status);
+void ffcfmt(char *tform, char *cform);
+void ffcdsp(char *tform, char *cform);
+void ffswap2(short *values, long nvalues);
+void ffswap4(INT32BIT *values, long nvalues);
+void ffswap8(double *values, long nvalues);
+int ffi2c(long ival, char *cval, int *status);
+int ffl2c(int lval, char *cval, int *status);
+int ffs2c(char *instr, char *outstr, int *status);
+int ffr2f(float fval, int decim, char *cval, int *status);
+int ffr2e(float fval, int decim, char *cval, int *status);
+int ffd2f(double dval, int decim, char *cval, int *status);
+int ffd2e(double dval, int decim, char *cval, int *status);
+int ffc2ii(char *cval, long *ival, int *status);
+int ffc2ll(char *cval, int *lval, int *status);
+int ffc2rr(char *cval, float *fval, int *status);
+int ffc2dd(char *cval, double *dval, int *status);
+int ffc2x(char *cval, char *dtype, long *ival, int *lval, char *sval,
+ double *dval, int *status);
+int ffc2s(char *instr, char *outstr, int *status);
+int ffc2i(char *cval, long *ival, int *status);
+int ffc2r(char *cval, float *fval, int *status);
+int ffc2d(char *cval, double *dval, int *status);
+int ffc2l(char *cval, int *lval, int *status);
+void ffxmsg(int action, char *err_message);
+int ffgcnt(fitsfile *fptr, char *value, int *status);
+int ffgtkn(fitsfile *fptr, int numkey, char *keyname, long *value, int *status);
+int fftkyn(fitsfile *fptr, int numkey, char *keyname, char *value, int *status);
+int ffgphd(fitsfile *fptr, int maxdim, int *simple, int *bitpix, int *naxis,
+ long naxes[], long *pcount, long *gcount, int *extend, double *bscale,
+ double *bzero, long *blank, int *nspace, int *status);
+int ffgttb(fitsfile *fptr, long *rowlen, long *nrows, long *pcount,
+ long *tfield, int *status);
+
+int ffmkey(fitsfile *fptr, char *card, int *status);
+int ffikey(fitsfile *fptr, char *card, int *status);
+
+int ffmbyt(fitsfile *fptr, long bytpos, int ignore_err, int *status);
+int ffgbyt(fitsfile *fptr, long nbytes, void *buffer, int *status);
+int ffpbyt(fitsfile *fptr, long nbytes, void *buffer, int *status);
+int ffgbytoff(fitsfile *fptr, long gsize, long ngroups, long offset,
+ void *buffer, int *status);
+int ffpbytoff(fitsfile *fptr, long gsize, long ngroups, long offset,
+ void *buffer, int *status);
+int ffldrc(fitsfile *fptr, long record, int err_mode, int *status);
+int ffwhbf(fitsfile *fptr, int *nbuff);
+int ffcurbuf(int nbuff, FITSfile **Fptr);
+int ffflsh(fitsfile *fptr, int clearbuf, int *status);
+int ffbfeof(fitsfile *fptr, int *status);
+int ffbfwt(int nbuff, int *status);
+int fits_get_num_files(void);
+int ffpxsz(int datatype);
+
+int ffoptplt(fitsfile *fptr, const char *tempname, int *status);
+int fits_is_this_a_copy(char *urltype);
+int fits_already_open(fitsfile **fptr, char *url,
+ char *urltype, char *infile, char *extspec, char *rowfilter,
+ char *binspec, char *colspec, int mode,int *isopen, int *status);
+int ffedit_columns(fitsfile **fptr, char *outfile, char *expr, int *status);
+int fits_get_col_minmax(fitsfile *fptr, int colnum, float *datamin,
+ float *datamax, int *status);
+int ffwritehisto(long totaln, long offset, long firstn, long nvalues,
+ int narrays, iteratorCol *imagepars, void *userPointer);
+int ffcalchist(long totalrows, long offset, long firstrow, long nrows,
+ int ncols, iteratorCol *colpars, void *userPointer);
+int fits_copy_image_cell(fitsfile **fptr, char *outfile, char *colname,
+ long rownum, int *status);
+int fits_copy_image_keywords(fitsfile *infptr, fitsfile *outfptr, int *status);
+int fits_get_section_range(char **ptr,long *secmin,long *secmax,long *incre,
+ int *status);
+int ffrhdu(fitsfile *fptr, int *hdutype, int *status);
+int ffpinit(fitsfile *fptr, int *status);
+int ffainit(fitsfile *fptr, int *status);
+int ffbinit(fitsfile *fptr, int *status);
+int ffchdu(fitsfile *fptr, int *status);
+int ffwend(fitsfile *fptr, int *status);
+int ffpdfl(fitsfile *fptr, int *status);
+int ffuptf(fitsfile *fptr, int *status);
+
+int ffdblk(fitsfile *fptr, long nblocks, int *status);
+int ffgext(fitsfile *fptr, int moveto, int *exttype, int *status);
+int ffgtbc(fitsfile *fptr, long *totalwidth, int *status);
+int ffgtbp(fitsfile *fptr, char *name, char *value, int *status);
+int ffiblk(fitsfile *fptr, long nblock, int headdata, int *status);
+int ffshft(fitsfile *fptr, long firstbyte, long nbytes, long nshift,
+ int *status);
+
+int ffgcpr(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, int writemode, double *scale, double *zero, char *tform,
+ long *twidth, int *tcode, int *maxelem, long *startpos,
+ long *elemnum, long *incre, long *repeat,long *rowlen,
+ int *hdutype, long *tnull, char *snull, int *status);
+
+int ffflushx(FITSfile *fptr);
+int ffseek(FITSfile *fptr, long position);
+int ffread(FITSfile *fptr, long nbytes, void *buffer,
+ int *status);
+int ffwrite(FITSfile *fptr, long nbytes, void *buffer,
+ int *status);
+int fftrun(fitsfile *fptr, long filesize, int *status);
+
+int ffgcll(fitsfile *fptr, int colnum, long firstrow, long firstelem, long
+ nelem, int nultyp, char nulval, char *array, char *nularray,
+ int *anynul, int *status);
+int ffgcls(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, int nultyp, char *nulval,
+ char **array, char *nularray, int *anynul, int *status);
+int ffgcls2(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, int nultyp, char *nulval,
+ char **array, char *nularray, int *anynul, int *status);
+int ffgclb(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, long elemincre, int nultyp, unsigned char nulval,
+ unsigned char *array, char *nularray, int *anynul, int *status);
+int ffgclui(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, long elemincre, int nultyp, unsigned short nulval,
+ unsigned short *array, char *nularray, int *anynul, int *status);
+int ffgcli(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, long elemincre, int nultyp, short nulval,
+ short *array, char *nularray, int *anynul, int *status);
+int ffgcluj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, long elemincre, int nultyp, unsigned long nulval,
+ unsigned long *array, char *nularray, int *anynul, int *status);
+int ffgclj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, long elemincre, int nultyp, long nulval, long *array,
+ char *nularray, int *anynul, int *status);
+int ffgcluk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, long elemincre, int nultyp, unsigned int nulval,
+ unsigned int *array, char *nularray, int *anynul, int *status);
+int ffgclk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, long elemincre, int nultyp, int nulval, int *array,
+ char *nularray, int *anynul, int *status);
+int ffgcle(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, long elemincre, int nultyp, float nulval, float *array,
+ char *nularray, int *anynul, int *status);
+int ffgcld(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, long elemincre, int nultyp, double nulval,
+ double *array, char *nularray, int *anynul, int *status);
+
+int ffpi1b(fitsfile *fptr, long nelem, long incre, unsigned char *buffer,
+ int *status);
+int ffpi2b(fitsfile *fptr, long nelem, long incre, short *buffer, int *status);
+int ffpi4b(fitsfile *fptr, long nelem, long incre, INT32BIT *buffer,
+ int *status);
+int ffpr4b(fitsfile *fptr, long nelem, long incre, float *buffer, int *status);
+int ffpr8b(fitsfile *fptr, long nelem, long incre, double *buffer, int *status);
+
+int ffgi1b(fitsfile *fptr, long pos, long nelem, long incre,
+ unsigned char *buffer, int *status);
+int ffgi2b(fitsfile *fptr, long pos, long nelem, long incre, short *buffer,
+ int *status);
+int ffgi4b(fitsfile *fptr, long pos, long nelem, long incre, INT32BIT *buffer,
+ int *status);
+int ffgr4b(fitsfile *fptr, long pos, long nelem, long incre, float *buffer,
+ int *status);
+int ffgr8b(fitsfile *fptr, long pos, long nelem, long incre, double *buffer,
+ int *status);
+
+int ffcins(fitsfile *fptr, long naxis1, long naxis2, long nbytes,
+ long bytepos, int *status);
+int ffcdel(fitsfile *fptr, long naxis1, long naxis2, long nbytes,
+ long bytepos, int *status);
+int ffkshf(fitsfile *fptr, int firstcol, int tfields, int nshift, int *status);
+
+int fffi1i1(unsigned char *input, long ntodo, double scale, double zero,
+ int nullcheck, unsigned char tnull, unsigned char nullval, char
+ *nullarray, int *anynull, unsigned char *output, int *status);
+int fffi2i1(short *input, long ntodo, double scale, double zero,
+ int nullcheck, short tnull, unsigned char nullval, char *nullarray,
+ int *anynull, unsigned char *output, int *status);
+int fffi4i1(INT32BIT *input, long ntodo, double scale, double zero,
+ int nullcheck, INT32BIT tnull, unsigned char nullval, char *nullarray,
+ int *anynull, unsigned char *output, int *status);
+int fffr4i1(float *input, long ntodo, double scale, double zero,
+ int nullcheck, unsigned char nullval, char *nullarray,
+ int *anynull, unsigned char *output, int *status);
+int fffr8i1(double *input, long ntodo, double scale, double zero,
+ int nullcheck, unsigned char nullval, char *nullarray,
+ int *anynull, unsigned char *output, int *status);
+int fffstri1(char *input, long ntodo, double scale, double zero,
+ long twidth, double power, int nullcheck, char *snull,
+ unsigned char nullval, char *nullarray, int *anynull,
+ unsigned char *output, int *status);
+
+int fffi1u2(unsigned char *input, long ntodo, double scale, double zero,
+ int nullcheck, unsigned char tnull, unsigned short nullval,
+ char *nullarray,
+ int *anynull, unsigned short *output, int *status);
+int fffi2u2(short *input, long ntodo, double scale, double zero,
+ int nullcheck, short tnull, unsigned short nullval, char *nullarray,
+ int *anynull, unsigned short *output, int *status);
+int fffi4u2(INT32BIT *input, long ntodo, double scale, double zero,
+ int nullcheck, INT32BIT tnull, unsigned short nullval, char *nullarray,
+ int *anynull, unsigned short *output, int *status);
+int fffr4u2(float *input, long ntodo, double scale, double zero,
+ int nullcheck, unsigned short nullval, char *nullarray,
+ int *anynull, unsigned short *output, int *status);
+int fffr8u2(double *input, long ntodo, double scale, double zero,
+ int nullcheck, unsigned short nullval, char *nullarray,
+ int *anynull, unsigned short *output, int *status);
+int fffstru2(char *input, long ntodo, double scale, double zero,
+ long twidth, double power, int nullcheck, char *snull,
+ unsigned short nullval, char *nullarray, int *anynull,
+ unsigned short *output, int *status);
+
+int fffi1i2(unsigned char *input, long ntodo, double scale, double zero,
+ int nullcheck, unsigned char tnull, short nullval, char *nullarray,
+ int *anynull, short *output, int *status);
+int fffi2i2(short *input, long ntodo, double scale, double zero,
+ int nullcheck, short tnull, short nullval, char *nullarray,
+ int *anynull, short *output, int *status);
+int fffi4i2(INT32BIT *input, long ntodo, double scale, double zero,
+ int nullcheck, INT32BIT tnull, short nullval, char *nullarray,
+ int *anynull, short *output, int *status);
+int fffr4i2(float *input, long ntodo, double scale, double zero,
+ int nullcheck, short nullval, char *nullarray,
+ int *anynull, short *output, int *status);
+int fffr8i2(double *input, long ntodo, double scale, double zero,
+ int nullcheck, short nullval, char *nullarray,
+ int *anynull, short *output, int *status);
+int fffstri2(char *input, long ntodo, double scale, double zero,
+ long twidth, double power, int nullcheck, char *snull,
+ short nullval, char *nullarray, int *anynull, short *output,
+ int *status);
+
+int fffi1u4(unsigned char *input, long ntodo, double scale, double zero,
+ int nullcheck, unsigned char tnull, unsigned long nullval,
+ char *nullarray,
+ int *anynull, unsigned long *output, int *status);
+int fffi2u4(short *input, long ntodo, double scale, double zero,
+ int nullcheck, short tnull, unsigned long nullval, char *nullarray,
+ int *anynull, unsigned long *output, int *status);
+int fffi4u4(INT32BIT *input, long ntodo, double scale, double zero,
+ int nullcheck, INT32BIT tnull, unsigned long nullval, char *nullarray,
+ int *anynull, unsigned long *output, int *status);
+int fffr4u4(float *input, long ntodo, double scale, double zero,
+ int nullcheck, unsigned long nullval, char *nullarray,
+ int *anynull, unsigned long *output, int *status);
+int fffr8u4(double *input, long ntodo, double scale, double zero,
+ int nullcheck, unsigned long nullval, char *nullarray,
+ int *anynull, unsigned long *output, int *status);
+int fffstru4(char *input, long ntodo, double scale, double zero,
+ long twidth, double power, int nullcheck, char *snull,
+ unsigned long nullval, char *nullarray, int *anynull,
+ unsigned long *output, int *status);
+
+int fffi1i4(unsigned char *input, long ntodo, double scale, double zero,
+ int nullcheck, unsigned char tnull, long nullval, char *nullarray,
+ int *anynull, long *output, int *status);
+int fffi2i4(short *input, long ntodo, double scale, double zero,
+ int nullcheck, short tnull, long nullval, char *nullarray,
+ int *anynull, long *output, int *status);
+int fffi4i4(INT32BIT *input, long ntodo, double scale, double zero,
+ int nullcheck, INT32BIT tnull, long nullval, char *nullarray,
+ int *anynull, long *output, int *status);
+int fffr4i4(float *input, long ntodo, double scale, double zero,
+ int nullcheck, long nullval, char *nullarray,
+ int *anynull, long *output, int *status);
+int fffr8i4(double *input, long ntodo, double scale, double zero,
+ int nullcheck, long nullval, char *nullarray,
+ int *anynull, long *output, int *status);
+int fffstri4(char *input, long ntodo, double scale, double zero,
+ long twidth, double power, int nullcheck, char *snull,
+ long nullval, char *nullarray, int *anynull, long *output,
+ int *status);
+
+int fffi1int(unsigned char *input, long ntodo, double scale, double zero,
+ int nullcheck, unsigned char tnull, int nullval, char *nullarray,
+ int *anynull, int *output, int *status);
+int fffi2int(short *input, long ntodo, double scale, double zero,
+ int nullcheck, short tnull, int nullval, char *nullarray,
+ int *anynull, int *output, int *status);
+int fffi4int(INT32BIT *input, long ntodo, double scale, double zero,
+ int nullcheck, INT32BIT tnull, int nullval, char *nullarray,
+ int *anynull, int *output, int *status);
+int fffr4int(float *input, long ntodo, double scale, double zero,
+ int nullcheck, int nullval, char *nullarray,
+ int *anynull, int *output, int *status);
+int fffr8int(double *input, long ntodo, double scale, double zero,
+ int nullcheck, int nullval, char *nullarray,
+ int *anynull, int *output, int *status);
+int fffstrint(char *input, long ntodo, double scale, double zero,
+ long twidth, double power, int nullcheck, char *snull,
+ int nullval, char *nullarray, int *anynull, int *output,
+ int *status);
+
+int fffi1uint(unsigned char *input, long ntodo, double scale, double zero,
+ int nullcheck, unsigned char tnull, unsigned int nullval,
+ char *nullarray, int *anynull, unsigned int *output, int *status);
+int fffi2uint(short *input, long ntodo, double scale, double zero,
+ int nullcheck, short tnull, unsigned int nullval, char *nullarray,
+ int *anynull, unsigned int *output, int *status);
+int fffi4uint(INT32BIT *input, long ntodo, double scale, double zero,
+ int nullcheck, INT32BIT tnull, unsigned int nullval, char *nullarray,
+ int *anynull, unsigned int *output, int *status);
+int fffr4uint(float *input, long ntodo, double scale, double zero,
+ int nullcheck, unsigned int nullval, char *nullarray,
+ int *anynull, unsigned int *output, int *status);
+int fffr8uint(double *input, long ntodo, double scale, double zero,
+ int nullcheck, unsigned int nullval, char *nullarray,
+ int *anynull, unsigned int *output, int *status);
+int fffstruint(char *input, long ntodo, double scale, double zero,
+ long twidth, double power, int nullcheck, char *snull,
+ unsigned int nullval, char *nullarray, int *anynull,
+ unsigned int *output, int *status);
+
+int fffi1r4(unsigned char *input, long ntodo, double scale, double zero,
+ int nullcheck, unsigned char tnull, float nullval, char *nullarray,
+ int *anynull, float *output, int *status);
+int fffi2r4(short *input, long ntodo, double scale, double zero,
+ int nullcheck, short tnull, float nullval, char *nullarray,
+ int *anynull, float *output, int *status);
+int fffi4r4(INT32BIT *input, long ntodo, double scale, double zero,
+ int nullcheck, INT32BIT tnull, float nullval, char *nullarray,
+ int *anynull, float *output, int *status);
+int fffr4r4(float *input, long ntodo, double scale, double zero,
+ int nullcheck, float nullval, char *nullarray,
+ int *anynull, float *output, int *status);
+int fffr8r4(double *input, long ntodo, double scale, double zero,
+ int nullcheck, float nullval, char *nullarray,
+ int *anynull, float *output, int *status);
+int fffstrr4(char *input, long ntodo, double scale, double zero,
+ long twidth, double power, int nullcheck, char *snull,
+ float nullval, char *nullarray, int *anynull, float *output,
+ int *status);
+
+int fffi1r8(unsigned char *input, long ntodo, double scale, double zero,
+ int nullcheck, unsigned char tnull, double nullval, char *nullarray,
+ int *anynull, double *output, int *status);
+int fffi2r8(short *input, long ntodo, double scale, double zero,
+ int nullcheck, short tnull, double nullval, char *nullarray,
+ int *anynull, double *output, int *status);
+int fffi4r8(INT32BIT *input, long ntodo, double scale, double zero,
+ int nullcheck, INT32BIT tnull, double nullval, char *nullarray,
+ int *anynull, double *output, int *status);
+int fffr4r8(float *input, long ntodo, double scale, double zero,
+ int nullcheck, double nullval, char *nullarray,
+ int *anynull, double *output, int *status);
+int fffr8r8(double *input, long ntodo, double scale, double zero,
+ int nullcheck, double nullval, char *nullarray,
+ int *anynull, double *output, int *status);
+int fffstrr8(char *input, long ntodo, double scale, double zero,
+ long twidth, double power, int nullcheck, char *snull,
+ double nullval, char *nullarray, int *anynull, double *output,
+ int *status);
+
+int ffi1fi1(unsigned char *array, long ntodo, double scale, double zero,
+ unsigned char *buffer, int *status);
+int ffu2fi1(unsigned short *array, long ntodo, double scale, double zero,
+ unsigned char *buffer, int *status);
+int ffi2fi1(short *array, long ntodo, double scale, double zero,
+ unsigned char *buffer, int *status);
+int ffu4fi1(unsigned long *array, long ntodo, double scale, double zero,
+ unsigned char *buffer, int *status);
+int ffi4fi1(long *array, long ntodo, double scale, double zero,
+ unsigned char *buffer, int *status);
+int ffuintfi1(unsigned int *array, long ntodo, double scale, double zero,
+ unsigned char *buffer, int *status);
+int ffintfi1(int *array, long ntodo, double scale, double zero,
+ unsigned char *buffer, int *status);
+int ffr4fi1(float *array, long ntodo, double scale, double zero,
+ unsigned char *buffer, int *status);
+int ffr8fi1(double *array, long ntodo, double scale, double zero,
+ unsigned char *buffer, int *status);
+
+int ffi1fi2(unsigned char *array, long ntodo, double scale, double zero,
+ short *buffer, int *status);
+int ffu2fi2(unsigned short *array, long ntodo, double scale, double zero,
+ short *buffer, int *status);
+int ffi2fi2(short *array, long ntodo, double scale, double zero,
+ short *buffer, int *status);
+int ffu4fi2(unsigned long *array, long ntodo, double scale, double zero,
+ short *buffer, int *status);
+int ffi4fi2(long *array, long ntodo, double scale, double zero,
+ short *buffer, int *status);
+int ffuintfi2(unsigned int *array, long ntodo, double scale, double zero,
+ short *buffer, int *status);
+int ffintfi2(int *array, long ntodo, double scale, double zero,
+ short *buffer, int *status);
+int ffr4fi2(float *array, long ntodo, double scale, double zero,
+ short *buffer, int *status);
+int ffr8fi2(double *array, long ntodo, double scale, double zero,
+ short *buffer, int *status);
+
+int ffi1fi4(unsigned char *array, long ntodo, double scale, double zero,
+ INT32BIT *buffer, int *status);
+int ffu2fi4(unsigned short *array, long ntodo, double scale, double zero,
+ INT32BIT *buffer, int *status);
+int ffi2fi4(short *array, long ntodo, double scale, double zero,
+ INT32BIT *buffer, int *status);
+int ffu4fi4(unsigned long *array, long ntodo, double scale, double zero,
+ INT32BIT *buffer, int *status);
+int ffi4fi4(long *array, long ntodo, double scale, double zero,
+ INT32BIT *buffer, int *status);
+int ffuintfi4(unsigned int *array, long ntodo, double scale, double zero,
+ INT32BIT *buffer, int *status);
+int ffintfi4(int *array, long ntodo, double scale, double zero,
+ INT32BIT *buffer, int *status);
+int ffr4fi4(float *array, long ntodo, double scale, double zero,
+ INT32BIT *buffer, int *status);
+int ffr8fi4(double *array, long ntodo, double scale, double zero,
+ INT32BIT *buffer, int *status);
+
+int ffi1fr4(unsigned char *array, long ntodo, double scale, double zero,
+ float *buffer, int *status);
+int ffu2fr4(unsigned short *array, long ntodo, double scale, double zero,
+ float *buffer, int *status);
+int ffi2fr4(short *array, long ntodo, double scale, double zero,
+ float *buffer, int *status);
+int ffu4fr4(unsigned long *array, long ntodo, double scale, double zero,
+ float *buffer, int *status);
+int ffi4fr4(long *array, long ntodo, double scale, double zero,
+ float *buffer, int *status);
+int ffuintfr4(unsigned int *array, long ntodo, double scale, double zero,
+ float *buffer, int *status);
+int ffintfr4(int *array, long ntodo, double scale, double zero,
+ float *buffer, int *status);
+int ffr4fr4(float *array, long ntodo, double scale, double zero,
+ float *buffer, int *status);
+int ffr8fr4(double *array, long ntodo, double scale, double zero,
+ float *buffer, int *status);
+
+int ffi1fr8(unsigned char *array, long ntodo, double scale, double zero,
+ double *buffer, int *status);
+int ffu2fr8(unsigned short *array, long ntodo, double scale, double zero,
+ double *buffer, int *status);
+int ffi2fr8(short *array, long ntodo, double scale, double zero,
+ double *buffer, int *status);
+int ffu4fr8(unsigned long *array, long ntodo, double scale, double zero,
+ double *buffer, int *status);
+int ffi4fr8(long *array, long ntodo, double scale, double zero,
+ double *buffer, int *status);
+int ffuintfr8(unsigned int *array, long ntodo, double scale, double zero,
+ double *buffer, int *status);
+int ffintfr8(int *array, long ntodo, double scale, double zero,
+ double *buffer, int *status);
+int ffr4fr8(float *array, long ntodo, double scale, double zero,
+ double *buffer, int *status);
+int ffr8fr8(double *array, long ntodo, double scale, double zero,
+ double *buffer, int *status);
+
+int ffi1fstr(unsigned char *input, long ntodo, double scale, double zero,
+ char *cform, long twidth, char *output, int *status);
+int ffu2fstr(unsigned short *input, long ntodo, double scale, double zero,
+ char *cform, long twidth, char *output, int *status);
+int ffi2fstr(short *input, long ntodo, double scale, double zero,
+ char *cform, long twidth, char *output, int *status);
+int ffu4fstr(unsigned long *input, long ntodo, double scale, double zero,
+ char *cform, long twidth, char *output, int *status);
+int ffi4fstr(long *input, long ntodo, double scale, double zero,
+ char *cform, long twidth, char *output, int *status);
+int ffintfstr(int *input, long ntodo, double scale, double zero,
+ char *cform, long twidth, char *output, int *status);
+int ffuintfstr(unsigned int *input, long ntodo, double scale, double zero,
+ char *cform, long twidth, char *output, int *status);
+int ffr4fstr(float *input, long ntodo, double scale, double zero,
+ char *cform, long twidth, char *output, int *status);
+int ffr8fstr(double *input, long ntodo, double scale, double zero,
+ char *cform, long twidth, char *output, int *status);
+
+/* the following 4 routines are VMS macros used on VAX or Alpha VMS */
+void ieevpd(double *inarray, double *outarray, long *nvals);
+void ieevud(double *inarray, double *outarray, long *nvals);
+void ieevpr(float *inarray, float *outarray, long *nvals);
+void ieevur(float *inarray, float *outarray, long *nvals);
+
+/* routines related to the lexical parser */
+int ffselect_table(fitsfile **fptr, char *outfile, char *expr, int *status);
+int ffiprs( fitsfile *fptr, int compressed, char *expr, int maxdim,
+ int *datatype, long *nelem, int *naxis, long *naxes,
+ int *status );
+void ffcprs( void );
+int ffcvtn( int inputType, void *input, char *undef, long ntodo,
+ int outputType, void *nulval, void *output,
+ int *anynull, int *status );
+int parse_data( long totalrows, long offset, long firstrow,
+ long nrows, int nCols, iteratorCol *colData,
+ void *userPtr );
+int uncompress_hkdata( fitsfile *fptr, long ntimes,
+ double *times, int *status );
+int ffffrw_work( long totalrows, long offset, long firstrow,
+ long nrows, int nCols, iteratorCol *colData,
+ void *userPtr );
+
+
+/* image compression routines */
+int imcomp_init_table(fitsfile *outfptr, int compress_type,
+ int bitpix, int naxis,long *naxes,long *tilesize,
+ int rice_blocksize,int rice_nbits,int *status);
+int imcomp_calc_max_elem (int comptype, int nx, int blocksize);
+int imcomp_copy_imheader(fitsfile *infptr, fitsfile *outfptr,
+ int *status);
+int imcomp_compress_image (fitsfile *infptr, fitsfile *outfptr,
+ int *status);
+int imcomp_compress_tile (fitsfile *outfptr, long row,
+ int datatype, void *tiledata, long tilelen, int *status);
+
+/* image decompression routines */
+int fits_read_compressed_img_plane(fitsfile *fptr, int datatype,
+ int bytesperpixel, long nplane, long *firstcoord, long *lastcoord,
+ long *inc, long *naxes, int nullcheck, void *nullval,
+ void *array, char *nullarray, int *anynul, long *nread, int *status);
+int imcomp_get_compressed_image_par(fitsfile *infptr, int *status);
+int imcomp_decompress_tile (fitsfile *infptr,
+ int nrow, int tilesize, int datatype, int nullcheck,
+ void *nulval, void *buffer, char *bnullarray, int *anynul,
+ int *status);
+int imcomp_copy_overlap (char *tile, int datatype, int ndim,
+ long *tfpixel, long *tlpixel, char *bnullarray, char *image,
+ long *fpixel, long *lpixel, int nullcheck, char *nullarray,
+ int *status);
+
+int pl_p2li (int *pxsrc, int xs, short *lldst, int npix);
+int pl_l2pi (short *ll_src, int xs, int *px_dst, int npix);
+
+/* general driver routines */
+
+int urltype2driver(char *urltype, int *driver);
+int fits_init_cfitsio(void);
+
+int fits_register_driver( char *prefix,
+ int (*init)(void),
+ int (*fitsshutdown)(void),
+ int (*setoptions)(int option),
+ int (*getoptions)(int *options),
+ int (*getversion)(int *version),
+ int (*checkfile) (char *urltype, char *infile, char *outfile),
+ int (*fitsopen)(char *filename, int rwmode, int *driverhandle),
+ int (*fitscreate)(char *filename, int *driverhandle),
+ int (*fitstruncate)(int driverhandle, long filesize),
+ int (*fitsclose)(int driverhandle),
+ int (*fremove)(char *filename),
+ int (*size)(int driverhandle, long *size),
+ int (*flush)(int driverhandle),
+ int (*seek)(int driverhandle, long offset),
+ int (*fitsread) (int driverhandle, void *buffer, long nbytes),
+ int (*fitswrite)(int driverhandle, void *buffer, long nbytes));
+
+/* file driver I/O routines */
+
+int file_init(void);
+int file_setoptions(int options);
+int file_getoptions(int *options);
+int file_getversion(int *version);
+int file_shutdown(void);
+int file_checkfile(char *urltype, char *infile, char *outfile);
+int file_open(char *filename, int rwmode, int *driverhandle);
+int file_compress_open(char *filename, int rwmode, int *hdl);
+int file_openfile(char *filename, int rwmode, FILE **diskfile);
+int file_create(char *filename, int *driverhandle);
+int file_truncate(int driverhandle, long filesize);
+int file_size(int driverhandle, long *filesize);
+int file_close(int driverhandle);
+int file_remove(char *filename);
+int file_flush(int driverhandle);
+int file_seek(int driverhandle, long offset);
+int file_read (int driverhandle, void *buffer, long nbytes);
+int file_write(int driverhandle, void *buffer, long nbytes);
+int file_is_compressed(char *filename);
+
+/* memory driver I/O routines */
+
+int mem_init(void);
+int mem_setoptions(int options);
+int mem_getoptions(int *options);
+int mem_getversion(int *version);
+int mem_shutdown(void);
+int mem_create(char *filename, int *handle);
+int mem_openmem(void **buffptr, size_t *buffsize, size_t deltasize,
+ void *(*memrealloc)(void *p, size_t newsize), int *handle);
+int mem_createmem(size_t memsize, int *handle);
+int stdin_checkfile(char *urltype, char *infile, char *outfile);
+int stdin_open(char *filename, int rwmode, int *handle);
+int stdin2mem(int hd);
+int stdin2file(int hd);
+int stdout_close(int handle);
+int mem_compress_open(char *filename, int rwmode, int *hdl);
+int mem_iraf_open(char *filename, int rwmode, int *hdl);
+int mem_size(int handle, long *filesize);
+int mem_truncate(int handle, long filesize);
+int mem_close_free(int handle);
+int mem_close_keep(int handle);
+int mem_seek(int handle, long offset);
+int mem_read(int hdl, void *buffer, long nbytes);
+int mem_write(int hdl, void *buffer, long nbytes);
+int mem_uncompress2mem(char *filename, FILE *diskfile, int hdl);
+
+int iraf2mem(char *filename, char **buffptr, size_t *buffsize,
+ size_t *filesize, int *status);
+
+/* root driver I/O routines */
+
+int root_init(void);
+int root_setoptions(int options);
+int root_getoptions(int *options);
+int root_getversion(int *version);
+int root_shutdown(void);
+int root_open(char *filename, int rwmode, int *driverhandle);
+int root_create(char *filename, int *driverhandle);
+int root_close(int driverhandle);
+int root_flush(int driverhandle);
+int root_seek(int driverhandle, long offset);
+int root_read (int driverhandle, void *buffer, long nbytes);
+int root_write(int driverhandle, void *buffer, long nbytes);
+int root_size(int handle, long *filesize);
+
+/* http driver I/O routines */
+
+int http_checkfile(char *urltype, char *infile, char *outfile);
+int http_open(char *filename, int rwmode, int *driverhandle);
+int http_file_open(char *filename, int rwmode, int *driverhandle);
+int http_compress_open(char *filename, int rwmode, int *driverhandle);
+
+/* ftp driver I/O routines */
+
+int ftp_checkfile(char *urltype, char *infile, char *outfile);
+int ftp_open(char *filename, int rwmode, int *driverhandle);
+int ftp_file_open(char *filename, int rwmode, int *driverhandle);
+int ftp_compress_open(char *filename, int rwmode, int *driverhandle);
+
+
+int uncompress2mem(char *filename, FILE *diskfile,
+ char **buffptr, size_t *buffsize,
+ void *(*mem_realloc)(void *p, size_t newsize),
+ size_t *filesize, int *status);
+
+int uncompress2mem_from_mem(
+ char *inmemptr,
+ size_t inmemsize,
+ char **buffptr,
+ size_t *buffsize,
+ void *(*mem_realloc)(void *p, size_t newsize),
+ size_t *filesize,
+ int *status);
+
+int uncompress2file(char *filename,
+ FILE *indiskfile,
+ FILE *outdiskfile,
+ int *status);
+
+int compress2mem_from_mem(
+ char *inmemptr,
+ size_t inmemsize,
+ char **buffptr,
+ size_t *buffsize,
+ void *(*mem_realloc)(void *p, size_t newsize),
+ size_t *filesize,
+ int *status);
+
+/* ==================== SHARED MEMORY DRIVER SECTION ======================= */
+
+#ifdef HAVE_SHMEM_SERVICES
+#include "drvrsmem.h"
+#endif
+
+/* ==================== END OF SHARED MEMORY DRIVER SECTION ================ */
+
+#endif
+
+
+#if defined(vms) || defined(__vms) || defined(WIN32) || defined(__WIN32__) || defined(macintosh)
+
+/* ================================================================== */
+/* A hack for nonunix machines, which lack strcasecmp and strncasecmp */
+/* ================================================================== */
+
+int strcasecmp (const char *s1, const char *s2 );
+int strncasecmp(const char *s1, const char *s2, size_t n);
+
+#endif
diff --git a/include/cfitsio/group.h b/include/cfitsio/group.h
new file mode 100644
index 0000000..f7aae5b
--- /dev/null
+++ b/include/cfitsio/group.h
@@ -0,0 +1,65 @@
+#define MAX_HDU_TRACKER 1000
+
+typedef struct _HDUtracker HDUtracker;
+
+struct _HDUtracker
+{
+ int nHDU;
+
+ char *filename[MAX_HDU_TRACKER];
+ int position[MAX_HDU_TRACKER];
+
+ char *newFilename[MAX_HDU_TRACKER];
+ int newPosition[MAX_HDU_TRACKER];
+};
+
+/* functions used internally in the grouping convention module */
+
+int ffgtdc(int grouptype, int xtensioncol, int extnamecol, int extvercol,
+ int positioncol, int locationcol, int uricol, char *ttype[],
+ char *tform[], int *ncols, int *status);
+
+int ffgtgc(fitsfile *gfptr, int *xtensionCol, int *extnameCol, int *extverCol,
+ int *positionCol, int *locationCol, int *uriCol, int *grptype,
+ int *status);
+
+int ffgmul(fitsfile *mfptr, int rmopt, int *status);
+
+int ffgmf(fitsfile *gfptr, char *xtension, char *extname, int extver,
+ int position, char *location, long *member, int *status);
+
+int ffgtrmr(fitsfile *gfptr, HDUtracker *HDU, int *status);
+
+int ffgtcpr(fitsfile *infptr, fitsfile *outfptr, int cpopt, HDUtracker *HDU,
+ int *status);
+
+int fftsad(fitsfile *mfptr, HDUtracker *HDU, int *newPosition,
+ char *newFileName);
+
+int fftsud(fitsfile *mfptr, HDUtracker *HDU, int newPosition,
+ char *newFileName);
+
+void prepare_keyvalue(char *keyvalue);
+
+int fits_path2url(char *inpath, char *outpath, int *status);
+
+int fits_url2path(char *inpath, char *outpath, int *status);
+
+int fits_get_cwd(char *cwd, int *status);
+
+int fits_get_url(fitsfile *fptr, char *realURL, char *startURL,
+ char *realAccess, char *startAccess, int *iostate,
+ int *status);
+
+int fits_clean_url(char *inURL, char *outURL, int *status);
+
+int fits_relurl2url(char *refURL, char *relURL, char *absURL, int *status);
+
+int fits_url2relurl(char *refURL, char *absURL, char *relURL, int *status);
+
+int fits_encode_url(char *inpath, char *outpath, int *status);
+
+int fits_unencode_url(char *inpath, char *outpath, int *status);
+
+int fits_is_url_absolute(char *url);
+
diff --git a/include/cfitsio/grparser.h b/include/cfitsio/grparser.h
new file mode 100644
index 0000000..32a172b
--- /dev/null
+++ b/include/cfitsio/grparser.h
@@ -0,0 +1,181 @@
+/* T E M P L A T E P A R S E R H E A D E R F I L E
+ =====================================================
+
+ by Jerzy.Borkowski@obs.unige.ch
+
+ Integral Science Data Center
+ ch. d'Ecogia 16
+ 1290 Versoix
+ Switzerland
+
+14-Oct-98: initial release
+16-Oct-98: reference to fitsio.h removed, also removed strings after #endif
+ directives to make gcc -Wall not to complain
+20-Oct-98: added declarations NGP_XTENSION_SIMPLE and NGP_XTENSION_FIRST
+24-Oct-98: prototype of ngp_read_line() function updated.
+22-Jan-99: prototype for ngp_set_extver() function added.
+*/
+
+#ifndef GRPARSER_H_INCLUDED
+#define GRPARSER_H_INCLUDED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ /* error codes - now defined in fitsio.h */
+
+ /* common constants definitions */
+
+#define NGP_ALLOCCHUNK (1000)
+#define NGP_MAX_INCLUDE (10) /* include file nesting limit */
+#define NGP_MAX_COMMENT (80) /* max size for comment */
+#define NGP_MAX_NAME (20) /* max size for KEYWORD (FITS limits it to 8 chars) */
+#define NGP_MAX_STRING (80) /* max size for various strings */
+#define NGP_MAX_ARRAY_DIM (999) /* max. number of dimensions in array */
+#define NGP_MAX_FNAME (1000) /* max size of combined path+fname */
+#define NGP_MAX_ENVFILES (10000) /* max size of CFITSIO_INCLUDE_FILES env. variable */
+
+#define NGP_TOKEN_UNKNOWN (-1) /* token type unknown */
+#define NGP_TOKEN_INCLUDE (0) /* \INCLUDE token */
+#define NGP_TOKEN_GROUP (1) /* \GROUP token */
+#define NGP_TOKEN_END (2) /* \END token */
+#define NGP_TOKEN_XTENSION (3) /* XTENSION token */
+#define NGP_TOKEN_SIMPLE (4) /* SIMPLE token */
+#define NGP_TOKEN_EOF (5) /* End Of File pseudo token */
+
+#define NGP_TTYPE_UNKNOWN (0) /* undef (yet) token type - invalid to print/write to disk */
+#define NGP_TTYPE_BOOL (1) /* boolean, it is 'T' or 'F' */
+#define NGP_TTYPE_STRING (2) /* something withing "" or starting with letter */
+#define NGP_TTYPE_INT (3) /* starting with digit and not with '.' */
+#define NGP_TTYPE_REAL (4) /* digits + '.' */
+#define NGP_TTYPE_COMPLEX (5) /* 2 reals, separated with ',' */
+#define NGP_TTYPE_NULL (6) /* NULL token, format is : NAME = / comment */
+#define NGP_TTYPE_RAW (7) /* HISTORY/COMMENT/8SPACES + comment string without / */
+
+#define NGP_FOUND_EQUAL_SIGN (1) /* line contains '=' after keyword name */
+
+#define NGP_FORMAT_OK (0) /* line format OK */
+#define NGP_FORMAT_ERROR (1) /* line format error */
+
+#define NGP_NODE_INVALID (0) /* default node type - invalid (to catch errors) */
+#define NGP_NODE_IMAGE (1) /* IMAGE type */
+#define NGP_NODE_ATABLE (2) /* ASCII table type */
+#define NGP_NODE_BTABLE (3) /* BINARY table type */
+
+#define NGP_NON_SYSTEM_ONLY (0) /* save all keywords except NAXIS,BITPIX,etc.. */
+#define NGP_REALLY_ALL (1) /* save really all keywords */
+
+#define NGP_XTENSION_SIMPLE (1) /* HDU defined with SIMPLE T */
+#define NGP_XTENSION_FIRST (2) /* this is first extension in template */
+
+#define NGP_LINE_REREAD (1) /* reread line */
+
+#define NGP_BITPIX_INVALID (-12345) /* default BITPIX (to catch errors) */
+
+ /* common macro definitions */
+
+#ifdef NGP_PARSER_DEBUG_MALLOC
+
+#define ngp_alloc(x) dal_malloc(x)
+#define ngp_free(x) dal_free(x)
+#define ngp_realloc(x,y) dal_realloc(x,y)
+
+#else
+
+#define ngp_alloc(x) malloc(x)
+#define ngp_free(x) free(x)
+#define ngp_realloc(x,y) realloc(x,y)
+
+#endif
+
+ /* type definitions */
+
+typedef struct NGP_RAW_LINE_STRUCT
+ { char *line;
+ char *name;
+ char *value;
+ int type;
+ char *comment;
+ int format;
+ int flags;
+ } NGP_RAW_LINE;
+
+
+typedef union NGP_TOKVAL_UNION
+ { char *s; /* space allocated separately, be careful !!! */
+ char b;
+ int i;
+ double d;
+ struct NGP_COMPLEX_STRUCT
+ { double re;
+ double im;
+ } c; /* complex value */
+ } NGP_TOKVAL;
+
+
+typedef struct NGP_TOKEN_STRUCT
+ { int type;
+ char name[NGP_MAX_NAME];
+ NGP_TOKVAL value;
+ char comment[NGP_MAX_COMMENT];
+ } NGP_TOKEN;
+
+
+typedef struct NGP_HDU_STRUCT
+ { int tokcnt;
+ NGP_TOKEN *tok;
+ } NGP_HDU;
+
+
+typedef struct NGP_TKDEF_STRUCT
+ { char *name;
+ int code;
+ } NGP_TKDEF;
+
+
+typedef struct NGP_EXTVER_TAB_STRUCT
+ { char *extname;
+ int version;
+ } NGP_EXTVER_TAB;
+
+
+ /* globally visible variables declarations */
+
+extern NGP_RAW_LINE ngp_curline;
+extern NGP_RAW_LINE ngp_prevline;
+
+extern int ngp_extver_tab_size;
+extern NGP_EXTVER_TAB *ngp_extver_tab;
+
+
+ /* globally visible functions declarations */
+
+int ngp_get_extver(char *extname, int *version);
+int ngp_set_extver(char *extname, int version);
+int ngp_delete_extver_tab(void);
+int ngp_strcasecmp(char *p1, char *p2);
+int ngp_line_from_file(FILE *fp, char **p);
+int ngp_free_line(void);
+int ngp_free_prevline(void);
+int ngp_read_line_buffered(FILE *fp);
+int ngp_unread_line(void);
+int ngp_extract_tokens(NGP_RAW_LINE *cl);
+int ngp_include_file(char *fname);
+int ngp_read_line(int ignore_blank_lines);
+int ngp_keyword_is_write(NGP_TOKEN *ngp_tok);
+int ngp_keyword_all_write(NGP_HDU *ngph, fitsfile *ffp, int mode);
+int ngp_hdu_init(NGP_HDU *ngph);
+int ngp_hdu_clear(NGP_HDU *ngph);
+int ngp_hdu_insert_token(NGP_HDU *ngph, NGP_TOKEN *newtok);
+int ngp_append_columns(fitsfile *ff, NGP_HDU *ngph, int aftercol);
+int ngp_read_xtension(fitsfile *ff, int parent_hn, int simple_mode);
+int ngp_read_group(fitsfile *ff, char *grpname, int parent_hn);
+
+ /* top level API function - now defined in fitsio.h */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/cfitsio/imcompress.h b/include/cfitsio/imcompress.h
new file mode 100644
index 0000000..c5ba7d2
--- /dev/null
+++ b/include/cfitsio/imcompress.h
@@ -0,0 +1,56 @@
+#define MAX_COMPRESS_DIM 6
+#define COMPRESS_NULL_VALUE -2147483647
+
+typedef struct {
+ char zcmptype[12]; /* compression type string */
+ int compress_type; /* type of compression algorithm */
+ int bitpix; /* FITS data type of image (BITPIX) */
+ int ndim; /* dimension of image */
+ long naxis[MAX_COMPRESS_DIM]; /* length of each axis */
+ int cn_compressed; /* column number for COMPRESSED_DATA column */
+ int cn_uncompressed; /* column number for UNCOMPRESSED_DATA column */
+ int cn_zscale; /* column number for CSCALE column */
+ int cn_zzero; /* column number for CZERO column */
+ int cn_zblank; /* column number for the CBLANK column */
+ double zscale; /* scaling value, if keyword and not column */
+ double zzero; /* zero pt, if keyword and not column */
+ int zblank; /* value for null pixels, if not a column */
+ long nrows; /* number of rows in table */
+ int ncols; /* number of columns in table */
+ int rice_blocksize; /* first compression parameter */
+ int rice_nbits; /* second compression parameter */
+ long tilesize[MAX_COMPRESS_DIM]; /* size of compression tiles */
+ long maxtilelen; /* max number of pixels in each image tile */
+ long maxelem; /* maximum length of variable length arrays */
+} CompressImageInfo;
+
+/* image compression routines */
+static int imcomp_get_image_params(fitsfile *infptr, CompressImageInfo *otb,
+ int *status);
+static int imcomp_init_table(fitsfile *outfptr,
+ CompressImageInfo *otb, int *status);
+static int imcomp_calc_max_elem (int nx, int blocksize);
+static int imcomp_copy_imheader(fitsfile *infptr, fitsfile *outfptr,
+ int *status);
+static int imcomp_img_to_tbl_special (char *card);
+static int imcomp_compress_image (fitsfile *infptr, fitsfile *outfptr,
+ CompressImageInfo *otb, int *status);
+
+/* image decompression routines */
+int fits_read_compressed_img_plane(fitsfile *fptr, int datatype,
+ int bytesperpixel, long nplane, long *firstcoord, long *lastcoord,
+ long *inc, long *naxes, int nullcheck, void *nullval,
+ void *array, char *nullarray, int *anynul, int *status);
+static int imcomp_get_table_params(fitsfile *infptr, CompressImageInfo *itb,
+ int *status);
+static int imcomp_copy_tblheader(fitsfile *infptr, fitsfile *outfptr,
+ int *status);
+static int imcomp_tbl_to_img_special (char *keyname);
+static int imcomp_decompress_tile (fitsfile *infptr, CompressImageInfo *itb,
+ int nrow, int tilesize, int datatype, int nullcheck,
+ void *nulval, void *buffer, char *bnullarray, int *anynul,
+ int *status);
+static int imcomp_copy_overlap (char *tile, int datatype, int ndim,
+ long *tfpixel, long *tlpixel, char *bnullarray, char *image,
+ long *fpixel, long *lpixel, int nullcheck, char *nullarray,
+ int *status);
diff --git a/include/cfitsio/longnam.h b/include/cfitsio/longnam.h
new file mode 100644
index 0000000..ac083bc
--- /dev/null
+++ b/include/cfitsio/longnam.h
@@ -0,0 +1,476 @@
+#ifndef _LONGNAME_H
+#define _LONGNAME_H
+
+#define fits_parse_input_url ffiurl
+#define fits_parse_rootname ffrtnm
+#define fits_parse_output_url ffourl
+#define fits_parse_extspec ffexts
+#define fits_parse_extnum ffextn
+#define fits_parse_binspec ffbins
+#define fits_parse_binrange ffbinr
+#define fits_open_memfile ffomem
+#define fits_open_file ffopen
+#define fits_reopen_file ffreopen
+#define fits_create_file ffinit
+#define fits_create_template fftplt
+#define fits_flush_file ffflus
+#define fits_close_file ffclos
+#define fits_delete_file ffdelt
+#define fits_file_name ffflnm
+#define fits_file_mode ffflmd
+#define fits_url_type ffurlt
+
+#define fits_get_version ffvers
+#define fits_uppercase ffupch
+#define fits_get_errstatus ffgerr
+#define fits_write_errmsg ffpmsg
+#define fits_read_errmsg ffgmsg
+#define fits_clear_errmsg ffcmsg
+#define fits_report_error ffrprt
+#define fits_compare_str ffcmps
+#define fits_test_keyword fftkey
+#define fits_test_record fftrec
+#define fits_null_check ffnchk
+#define fits_make_keyn ffkeyn
+#define fits_make_nkey ffnkey
+#define fits_get_keyclass ffgkcl
+#define fits_get_keytype ffdtyp
+#define fits_parse_value ffpsvc
+#define fits_get_keyname ffgknm
+#define fits_parse_template ffgthd
+#define fits_ascii_tform ffasfm
+#define fits_binary_tform ffbnfm
+#define fits_get_tbcol ffgabc
+#define fits_get_rowsize ffgrsz
+#define fits_get_col_display_width ffgcdw
+
+#define fits_write_record ffprec
+#define fits_write_key ffpky
+#define fits_write_key_unit ffpunt
+#define fits_write_comment ffpcom
+#define fits_write_history ffphis
+#define fits_write_date ffpdat
+#define fits_get_system_time ffgstm
+#define fits_get_system_date ffgsdt
+#define fits_date2str ffdt2s
+#define fits_time2str fftm2s
+#define fits_str2date ffs2dt
+#define fits_str2time ffs2tm
+#define fits_write_key_longstr ffpkls
+#define fits_write_key_longwarn ffplsw
+#define fits_write_key_null ffpkyu
+#define fits_write_key_str ffpkys
+#define fits_write_key_log ffpkyl
+#define fits_write_key_lng ffpkyj
+#define fits_write_key_fixflt ffpkyf
+#define fits_write_key_flt ffpkye
+#define fits_write_key_fixdbl ffpkyg
+#define fits_write_key_dbl ffpkyd
+#define fits_write_key_fixcmp ffpkfc
+#define fits_write_key_cmp ffpkyc
+#define fits_write_key_fixdblcmp ffpkfm
+#define fits_write_key_dblcmp ffpkym
+#define fits_write_key_triple ffpkyt
+#define fits_write_tdim ffptdm
+#define fits_write_keys_str ffpkns
+#define fits_write_keys_log ffpknl
+#define fits_write_keys_lng ffpknj
+#define fits_write_keys_fixflt ffpknf
+#define fits_write_keys_flt ffpkne
+#define fits_write_keys_fixdbl ffpkng
+#define fits_write_keys_dbl ffpknd
+#define fits_copy_key ffcpky
+#define fits_write_imghdr ffphps
+#define fits_write_grphdr ffphpr
+#define fits_write_atblhdr ffphtb
+#define fits_write_btblhdr ffphbn
+#define fits_write_key_template ffpktp
+
+#define fits_get_hdrspace ffghsp
+#define fits_get_hdrpos ffghps
+#define fits_movabs_key ffmaky
+#define fits_movrel_key ffmrky
+#define fits_find_nextkey ffgnxk
+
+#define fits_read_record ffgrec
+#define fits_read_card ffgcrd
+#define fits_read_key_unit ffgunt
+#define fits_read_keyn ffgkyn
+#define fits_read_key ffgky
+#define fits_read_keyword ffgkey
+#define fits_read_key_str ffgkys
+#define fits_read_key_log ffgkyl
+#define fits_read_key_lng ffgkyj
+#define fits_read_key_flt ffgkye
+#define fits_read_key_dbl ffgkyd
+#define fits_read_key_cmp ffgkyc
+#define fits_read_key_dblcmp ffgkym
+#define fits_read_key_triple ffgkyt
+#define fits_read_key_longstr ffgkls
+#define fits_read_tdim ffgtdm
+#define fits_decode_tdim ffdtdm
+#define fits_read_keys_str ffgkns
+#define fits_read_keys_log ffgknl
+#define fits_read_keys_lng ffgknj
+#define fits_read_keys_flt ffgkne
+#define fits_read_keys_dbl ffgknd
+#define fits_read_imghdr ffghpr
+#define fits_read_atblhdr ffghtb
+#define fits_read_btblhdr ffghbn
+#define fits_header2str ffh2st
+
+#define fits_update_card ffucrd
+#define fits_update_key ffuky
+#define fits_update_key_null ffukyu
+#define fits_update_key_str ffukys
+#define fits_update_key_longstr ffukls
+#define fits_update_key_log ffukyl
+#define fits_update_key_lng ffukyj
+#define fits_update_key_fixflt ffukyf
+#define fits_update_key_flt ffukye
+#define fits_update_key_fixdbl ffukyg
+#define fits_update_key_dbl ffukyd
+#define fits_update_key_fixcmp ffukfc
+#define fits_update_key_cmp ffukyc
+#define fits_update_key_fixdblcmp ffukfm
+#define fits_update_key_dblcmp ffukym
+
+#define fits_modify_record ffmrec
+#define fits_modify_card ffmcrd
+#define fits_modify_name ffmnam
+#define fits_modify_comment ffmcom
+#define fits_modify_key_null ffmkyu
+#define fits_modify_key_str ffmkys
+#define fits_modify_key_longstr ffmkls
+#define fits_modify_key_log ffmkyl
+#define fits_modify_key_lng ffmkyj
+#define fits_modify_key_fixflt ffmkyf
+#define fits_modify_key_flt ffmkye
+#define fits_modify_key_fixdbl ffmkyg
+#define fits_modify_key_dbl ffmkyd
+#define fits_modify_key_fixcmp ffmkfc
+#define fits_modify_key_cmp ffmkyc
+#define fits_modify_key_fixdblcmp ffmkfm
+#define fits_modify_key_dblcmp ffmkym
+
+#define fits_insert_record ffirec
+#define fits_insert_key_null ffikyu
+#define fits_insert_key_str ffikys
+#define fits_insert_key_longstr ffikls
+#define fits_insert_key_log ffikyl
+#define fits_insert_key_lng ffikyj
+#define fits_insert_key_fixflt ffikyf
+#define fits_insert_key_flt ffikye
+#define fits_insert_key_fixdbl ffikyg
+#define fits_insert_key_dbl ffikyd
+#define fits_insert_key_fixcmp ffikfc
+#define fits_insert_key_cmp ffikyc
+#define fits_insert_key_fixdblcmp ffikfm
+#define fits_insert_key_dblcmp ffikym
+
+#define fits_delete_key ffdkey
+#define fits_delete_record ffdrec
+#define fits_get_hdu_num ffghdn
+#define fits_get_hdu_type ffghdt
+#define fits_get_hduaddr ffghad
+
+#define fits_get_img_param ffgipr
+#define fits_get_img_type ffgidt
+#define fits_get_img_dim ffgidm
+#define fits_get_img_size ffgisz
+
+#define fits_movabs_hdu ffmahd
+#define fits_movrel_hdu ffmrhd
+#define fits_movnam_hdu ffmnhd
+#define fits_get_num_hdus ffthdu
+#define fits_create_img ffcrim
+#define fits_create_tbl ffcrtb
+#define fits_create_hdu ffcrhd
+#define fits_insert_img ffiimg
+#define fits_insert_atbl ffitab
+#define fits_insert_btbl ffibin
+#define fits_resize_img ffrsim
+#define fits_delete_hdu ffdhdu
+#define fits_copy_hdu ffcopy
+#define fits_copy_header ffcphd
+#define fits_copy_data ffcpdt
+
+#define fits_set_hdustruc ffrdef
+#define fits_set_hdrsize ffhdef
+#define fits_write_theap ffpthp
+
+#define fits_encode_chksum ffesum
+#define fits_decode_chksum ffdsum
+#define fits_write_chksum ffpcks
+#define fits_update_chksum ffupck
+#define fits_verify_chksum ffvcks
+#define fits_get_chksum ffgcks
+
+#define fits_set_bscale ffpscl
+#define fits_set_tscale fftscl
+#define fits_set_imgnull ffpnul
+#define fits_set_btblnull fftnul
+#define fits_set_atblnull ffsnul
+
+#define fits_get_colnum ffgcno
+#define fits_get_colname ffgcnn
+#define fits_get_coltype ffgtcl
+#define fits_get_num_rows ffgnrw
+#define fits_get_num_cols ffgncl
+#define fits_get_acolparms ffgacl
+#define fits_get_bcolparms ffgbcl
+
+#define fits_iterate_data ffiter
+
+#define fits_read_grppar_byt ffggpb
+#define fits_read_grppar_usht ffggpui
+#define fits_read_grppar_ulng ffggpuj
+#define fits_read_grppar_sht ffggpi
+#define fits_read_grppar_lng ffggpj
+#define fits_read_grppar_int ffggpk
+#define fits_read_grppar_uint ffggpuk
+#define fits_read_grppar_flt ffggpe
+#define fits_read_grppar_dbl ffggpd
+
+#define fits_read_img ffgpv
+#define fits_read_imgnull ffgpf
+#define fits_read_img_byt ffgpvb
+#define fits_read_img_usht ffgpvui
+#define fits_read_img_ulng ffgpvuj
+#define fits_read_img_sht ffgpvi
+#define fits_read_img_lng ffgpvj
+#define fits_read_img_uint ffgpvuk
+#define fits_read_img_int ffgpvk
+#define fits_read_img_flt ffgpve
+#define fits_read_img_dbl ffgpvd
+
+#define fits_read_imgnull_byt ffgpfb
+#define fits_read_imgnull_usht ffgpfui
+#define fits_read_imgnull_ulng ffgpfuj
+#define fits_read_imgnull_sht ffgpfi
+#define fits_read_imgnull_lng ffgpfj
+#define fits_read_imgnull_uint ffgpfuk
+#define fits_read_imgnull_int ffgpfk
+#define fits_read_imgnull_flt ffgpfe
+#define fits_read_imgnull_dbl ffgpfd
+
+#define fits_read_2d_byt ffg2db
+#define fits_read_2d_usht ffg2dui
+#define fits_read_2d_ulng ffg2duj
+#define fits_read_2d_sht ffg2di
+#define fits_read_2d_lng ffg2dj
+#define fits_read_2d_uint ffg2duk
+#define fits_read_2d_int ffg2dk
+#define fits_read_2d_flt ffg2de
+#define fits_read_2d_dbl ffg2dd
+
+#define fits_read_3d_byt ffg3db
+#define fits_read_3d_usht ffg3dui
+#define fits_read_3d_ulng ffg3duj
+#define fits_read_3d_sht ffg3di
+#define fits_read_3d_lng ffg3dj
+#define fits_read_3d_uint ffg3duk
+#define fits_read_3d_int ffg3dk
+#define fits_read_3d_flt ffg3de
+#define fits_read_3d_dbl ffg3dd
+
+#define fits_read_subset_byt ffgsvb
+#define fits_read_subset_usht ffgsvui
+#define fits_read_subset_ulng ffgsvuj
+#define fits_read_subset_sht ffgsvi
+#define fits_read_subset_lng ffgsvj
+#define fits_read_subset_uint ffgsvuk
+#define fits_read_subset_int ffgsvk
+#define fits_read_subset_flt ffgsve
+#define fits_read_subset_dbl ffgsvd
+
+#define fits_read_subsetnull_byt ffgsfb
+#define fits_read_subsetnull_usht ffgsfui
+#define fits_read_subsetnull_ulng ffgsfuj
+#define fits_read_subsetnull_sht ffgsfi
+#define fits_read_subsetnull_lng ffgsfj
+#define fits_read_subsetnull_uint ffgsfuk
+#define fits_read_subsetnull_int ffgsfk
+#define fits_read_subsetnull_flt ffgsfe
+#define fits_read_subsetnull_dbl ffgsfd
+
+#define fits_read_col ffgcv
+#define fits_read_colnull ffgcf
+#define fits_read_col_str ffgcvs
+#define fits_read_col_log ffgcvl
+#define fits_read_col_byt ffgcvb
+#define fits_read_col_usht ffgcvui
+#define fits_read_col_ulng ffgcvuj
+#define fits_read_col_sht ffgcvi
+#define fits_read_col_lng ffgcvj
+#define fits_read_col_uint ffgcvuk
+#define fits_read_col_int ffgcvk
+#define fits_read_col_flt ffgcve
+#define fits_read_col_dbl ffgcvd
+#define fits_read_col_cmp ffgcvc
+#define fits_read_col_dblcmp ffgcvm
+#define fits_read_col_bit ffgcx
+#define fits_read_col_bit_usht ffgcxui
+#define fits_read_col_bit_uint ffgcxuk
+
+#define fits_read_colnull_str ffgcfs
+#define fits_read_colnull_log ffgcfl
+#define fits_read_colnull_byt ffgcfb
+#define fits_read_colnull_usht ffgcfui
+#define fits_read_colnull_ulng ffgcfuj
+#define fits_read_colnull_sht ffgcfi
+#define fits_read_colnull_lng ffgcfj
+#define fits_read_colnull_uint ffgcfuk
+#define fits_read_colnull_int ffgcfk
+#define fits_read_colnull_flt ffgcfe
+#define fits_read_colnull_dbl ffgcfd
+#define fits_read_colnull_cmp ffgcfc
+#define fits_read_colnull_dblcmp ffgcfm
+
+#define fits_read_descript ffgdes
+#define fits_read_descripts ffgdess
+#define fits_read_tblbytes ffgtbb
+
+#define fits_write_grppar_byt ffpgpb
+#define fits_write_grppar_usht ffpgpui
+#define fits_write_grppar_ulng ffpgpuj
+#define fits_write_grppar_sht ffpgpi
+#define fits_write_grppar_lng ffpgpj
+#define fits_write_grppar_uint ffpgpuk
+#define fits_write_grppar_int ffpgpk
+#define fits_write_grppar_flt ffpgpe
+#define fits_write_grppar_dbl ffpgpd
+
+#define fits_write_img ffppr
+#define fits_write_img_byt ffpprb
+#define fits_write_img_usht ffpprui
+#define fits_write_img_ulng ffppruj
+#define fits_write_img_sht ffppri
+#define fits_write_img_lng ffpprj
+#define fits_write_img_uint ffppruk
+#define fits_write_img_int ffpprk
+#define fits_write_img_flt ffppre
+#define fits_write_img_dbl ffpprd
+
+#define fits_write_imgnull ffppn
+#define fits_write_imgnull_byt ffppnb
+#define fits_write_imgnull_usht ffppnui
+#define fits_write_imgnull_ulng ffppnuj
+#define fits_write_imgnull_sht ffppni
+#define fits_write_imgnull_lng ffppnj
+#define fits_write_imgnull_uint ffppnuk
+#define fits_write_imgnull_int ffppnk
+#define fits_write_imgnull_flt ffppne
+#define fits_write_imgnull_dbl ffppnd
+
+#define fits_write_img_null ffppru
+#define fits_write_null_img ffpprn
+
+#define fits_write_2d_byt ffp2db
+#define fits_write_2d_usht ffp2dui
+#define fits_write_2d_ulng ffp2duj
+#define fits_write_2d_sht ffp2di
+#define fits_write_2d_lng ffp2dj
+#define fits_write_2d_uint ffp2duk
+#define fits_write_2d_int ffp2dk
+#define fits_write_2d_flt ffp2de
+#define fits_write_2d_dbl ffp2dd
+
+#define fits_write_3d_byt ffp3db
+#define fits_write_3d_usht ffp3dui
+#define fits_write_3d_ulng ffp3duj
+#define fits_write_3d_sht ffp3di
+#define fits_write_3d_lng ffp3dj
+#define fits_write_3d_uint ffp3duk
+#define fits_write_3d_int ffp3dk
+#define fits_write_3d_flt ffp3de
+#define fits_write_3d_dbl ffp3dd
+
+#define fits_write_subset_byt ffpssb
+#define fits_write_subset_usht ffpssui
+#define fits_write_subset_ulng ffpssuj
+#define fits_write_subset_sht ffpssi
+#define fits_write_subset_lng ffpssj
+#define fits_write_subset_uint ffpssuk
+#define fits_write_subset_int ffpssk
+#define fits_write_subset_flt ffpsse
+#define fits_write_subset_dbl ffpssd
+
+#define fits_write_col ffpcl
+#define fits_write_col_str ffpcls
+#define fits_write_col_log ffpcll
+#define fits_write_col_byt ffpclb
+#define fits_write_col_usht ffpclui
+#define fits_write_col_ulng ffpcluj
+#define fits_write_col_sht ffpcli
+#define fits_write_col_lng ffpclj
+#define fits_write_col_uint ffpcluk
+#define fits_write_col_int ffpclk
+#define fits_write_col_flt ffpcle
+#define fits_write_col_dbl ffpcld
+#define fits_write_col_cmp ffpclc
+#define fits_write_col_dblcmp ffpclm
+#define fits_write_col_null ffpclu
+#define fits_write_col_bit ffpclx
+
+#define fits_write_colnull ffpcn
+#define fits_write_colnull_str ffpcns
+#define fits_write_colnull_log ffpcnl
+#define fits_write_colnull_byt ffpcnb
+#define fits_write_colnull_usht ffpcnui
+#define fits_write_colnull_ulng ffpcnuj
+#define fits_write_colnull_sht ffpcni
+#define fits_write_colnull_lng ffpcnj
+#define fits_write_colnull_uint ffpcnuk
+#define fits_write_colnull_int ffpcnk
+#define fits_write_colnull_flt ffpcne
+#define fits_write_colnull_dbl ffpcnd
+
+#define fits_write_descript ffpdes
+
+#define fits_write_tblbytes ffptbb
+#define fits_insert_rows ffirow
+#define fits_delete_rows ffdrow
+#define fits_delete_rowlist ffdrws
+#define fits_insert_col fficol
+#define fits_insert_cols fficls
+#define fits_delete_col ffdcol
+#define fits_copy_col ffcpcl
+#define fits_modify_vector_len ffmvec
+
+#define fits_read_img_coord ffgics
+#define fits_read_tbl_coord ffgtcs
+#define fits_pix_to_world ffwldp
+#define fits_world_to_pix ffxypx
+
+#define fits_get_image_wcs_keys ffgiwcs
+#define fits_get_table_wcs_keys ffgtwcs
+
+#define fits_find_rows fffrow
+#define fits_find_first_row ffffrw
+#define fits_find_rows_cmp fffrwc
+#define fits_select_rows ffsrow
+#define fits_calc_rows ffcrow
+#define fits_calculator ffcalc
+#define fits_calculator_rng ffcalc_rng
+#define fits_test_expr fftexp
+
+#define fits_create_group ffgtcr
+#define fits_insert_group ffgtis
+#define fits_change_group ffgtch
+#define fits_remove_group ffgtrm
+#define fits_copy_group ffgtcp
+#define fits_merge_groups ffgtmg
+#define fits_compact_group ffgtcm
+#define fits_verify_group ffgtvf
+#define fits_open_group ffgtop
+#define fits_add_group_member ffgtam
+#define fits_get_num_members ffgtnm
+
+#define fits_get_num_groups ffgmng
+#define fits_open_member ffgmop
+#define fits_copy_member ffgmcp
+#define fits_transfer_member ffgmtf
+#define fits_remove_member ffgmrm
+
+#endif
diff --git a/include/cfitsio/pctype.h b/include/cfitsio/pctype.h
new file mode 100644
index 0000000..2ef4a67
--- /dev/null
+++ b/include/cfitsio/pctype.h
@@ -0,0 +1,155 @@
+/*
+ * These ones are necessary to override the behaviour of
+ * PINT_cfB, which puts the & on before getting to the
+ * TYPE specific PCINT_cfPP...
+ * The only way to do this is to introduce PCDOUBLE_cfINT,
+ * which means we use PCINT for alot of the generic macros.
+ */
+
+#define PCINT_cfAA PINT_cfAA
+#define PCINT_cfN PINT_cfN
+#define PCINT_cfV PINT_cfV
+#define PCINT_cfZ(T,I,A) (__cfztringv[I]= (int ) *A),
+#define PCINT_cfSEP INT_cfSEP
+#define PCINT_cfCC PINT_cfCC
+#define PCINT_cfB(T,A) _(T,_cfPP) A
+#define PCINT_cfU PINT_cfU
+
+/* These are the real TYPE specific ones, and will need to be
+ * duplicated for FLOAT,...
+ */
+#define PCINT_cfINT PCDOUBLE_cfINT
+#define PCINT_cfAAP(A, B) A
+#define PCINT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define PCINT_cfTYPE int
+#define PCINT_cfVP(A,B) int B = (int) *A; /* For ZSTRINGV_ARGS */
+#define PCINT_cfPP
+#define PCINT_cfCCC(A,B) A
+
+#define PCFLOAT_cfINT PCDOUBLE_cfINT
+#define PCFLOAT_cfAAP(A, B) A
+#define PCFLOAT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define PCFLOAT_cfTYPE float
+#define PCFLOAT_cfVP PCINT_cfVP /* For ZSTRINGV_ARGS */
+#define PCFLOAT_cfPP
+#define PCFLOAT_cfCCC(A,B) A
+
+#define PCDOUBLE_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,PCINT,B,X,Y,Z,0)
+#define PCDOUBLE_cfAAP(A, B) A
+#define PCDOUBLE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define PCDOUBLE_cfTYPE double
+#define PCDOUBLE_cfVP PCINT_cfVP /* For ZSTRINGV_ARGS */
+#define PCDOUBLE_cfPP
+#define PCDOUBLE_cfCCC(A,B) A
+
+#define PCLOGICAL_cfINT PCDOUBLE_cfINT
+#define PCLOGICAL_cfA(M,I,A,B) *A=C2FLOGICAL(*A);
+#define PCLOGICAL_cfAAP(A,B) B = A
+#define PCLOGICAL_cfC(A,B,C) *A=C2FLOGICAL(*A);
+#define PCLOGICAL_cfH(S,U,B)
+#define PCLOGICAL_cfJ(B)
+#define PCLOGICAL_cfW(A,B) PLOGICAL_cfW(A,B)
+#define PCLOGICAL_cfS(M,I,A)
+#define PCLOGICAL_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PCLOGICAL,A,B,C,D,E)
+#define PCLOGICAL_cfTYPE int
+#define PCLOGICAL_cfVP PLOGICAL_cfVP /* For ZSTRINGV_ARGS */
+#define PCLOGICAL_cfPP
+#define PCLOGICAL_cfKK PLOGICAL_cfKK
+#define PCLOGICAL_cfCCC(A,B) B = A
+
+/*
+ * I can't find where the following three defines are used...
+ * So they may well be wrong.
+ */
+
+#define PCLOGICAL_cfQ(B)
+#define PCLOGICAL_cfR(A,B,D) *A=C2FLOGICAL(*A);
+#define PCLOGICAL_cfT(M,I,A,B,D) ((*A=F2CLOGICAL(*A)),A)
+
+/* This is to get PZTRINGS to work for dynamically allocated
+ * Contiguous arrays... The problem was that the array is massaged
+ * coming in with the call: c2fstrv( A[0], A[0],... )
+ * and coming out with: f2cstrv( (char *) A, (char *) A,... )
+ *
+ * If you dynamically allocate an array with the trick:
+ *
+ * char ** A;
+ * A = (char **) malloc ( nelements * sizeof(char *) );
+ * A[0] = (char *) malloc (nelements * elemSize * sizeof (char) );
+ * for ( i = 1; i < nelements; i++) A[i] = A[0] + i * elemSize;
+ *
+ * Then the coming in call will kill you if you pass in A, and the
+ * coming out call will kill you if you pass in A[0]...
+ * So, I change the coming in call to (char *)A, and you must then
+ * pass in A[0].
+ *
+ */
+
+
+#undef PZTRINGV_cfA
+#define PZTRINGV_cfA(M,I,A,B) APAZTRINGV_cfA(M,I,A,B, \
+ (_3(M,_ELEMS_,I))*(( _3(M,_ELEMLEN_,I))+1), \
+ (_3(M,_ELEMS_,I)),(_3(M,_ELEMLEN_,I))+1)
+#ifdef vmsFortran
+#define AAZTRINGV_cfA(M,I,A,B, sA,filA,silA) \
+ initfstr(B,malloc((sA)-(filA)),(filA),(silA)-1), \ c2fstrv((char *) A,B.dsc$a_pointer,(silA),(sA));
+#define APAZTRINGV_cfA(M,I,A,B, sA,filA,silA) \
+ initfstr(B,(char *) A,(filA),(silA)-1),c2fstrv((char *) A,(char *)A,(silA),(sA));
+#else
+#define AAZTRINGV_cfA(M,I,A,B, sA,filA,silA) \
+ (B.s=malloc((sA)-(filA)),B.fs=c2fstrv((char *)A,B.s,(B.flen=(silA)-1)+1,(sA)));
+#define APAZTRINGV_cfA(M,I,A,B, sA,filA,silA) \
+ B.fs=c2fstrv((char *) A,(char *) A,(B.flen=(silA)-1)+1,B.sizeofA=(sA));
+#endif
+
+
+/*
+ * This allows for character arrays longer than an unsigned short...
+ */
+
+#ifndef vmsFortran
+#undef STRING_cfV
+#undef PSTRINGV_cfV
+#define STRING_cfV(T,A,B,F) struct {unsigned int clen, flen;} B;
+#define PSTRINGV_cfV(T,A,B,F) struct {char *fs; unsigned int sizeofA, flen;} B;
+#endif
+
+/*
+ * This is to introduce a PZTRING ( NO V ) type
+ */
+
+
+#ifdef vmsFortran
+#define PZTRING_cfV(T,A,B,F) static fstring B={0,DSC$K_DTYPE_T,DSC$K_CLASS_S,NULL};
+#define APATRING_cfA(M,I,A,B,silA) \
+ (B.dsc$w_length=strlen(A),B.dsc$a_pointer=A, \
+ B.dsc$w_length >= silA?0:(memset((A)+B.dsc$w_length,' ',silA-B.dsc$w_length-1), \
+ A[B.dsc$w_length=silA-1]='\0'));
+#define PZTRING_cfC(A,B,C) \
+ (B.dsc$w_length=strlen(A),B.dsc$a_pointer=A, \
+ B.dsc$w_length >= C?0:(memset((A)+B.dsc$w_length,' ',C-B.dsc$w_length-1), \
+ A[B.dsc$w_length=C-1]='\0'));
+#else
+#define PZTRING_cfV(T,A,B,F) int B;
+#define APATRING_cfA(M,I,A,B,silA) \
+ (B=strlen(A),B >= silA?0:(memset((A)+B,' ',silA-B-1)),A[B = silA - 1]='\0');
+#define PZTRING_cfC(A,B,C) \
+ (B=strlen(A),B > C?0:(memset((A)+B,' ',(C - 1)-B-1)),A[B = C - 1]='\0');
+#endif
+
+#define PZTRING_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PZTRING,A,B,C,D,E)
+#define PZTRING_cfINT PVOID_cfINT
+#define PZTRING_cfA(M,I,A,B) APATRING_cfA(M,I,A,B,(_3(M,_ELEMLEN_,I))+1)
+#define PZTRING_cfAA PSTRING_cfCC
+#define PZTRING_cfB PSTRING_cfB
+
+#define PZTRING_cfCC PSTRING_cfCC
+#define PZTRING_cfJ PSTRING_cfJ
+#define PZTRING_cfH STRING_cfH
+#define PZTRING_cfN(T,A) STRING_cfN(T,A) /* CRAY insists on arg.'s here. */
+#define PZTRING_cfS(M,I,A) ,( _3(M,_ELEMLEN_,I) + 1 )
+#define PZTRING_cfU(T,A) char *A
+#define PZTRING_cfW(A,B) kill_trailing(A,' ');
+#define PZTRING_cfZ(T,I,A)
+#define PZTRING_cfSEP INT_cfSEP
+#define PZTRING_cfKK STRING_cfKK
diff --git a/include/cfitsio/region.h b/include/cfitsio/region.h
new file mode 100644
index 0000000..4d7c96c
--- /dev/null
+++ b/include/cfitsio/region.h
@@ -0,0 +1,80 @@
+/***************************************************************/
+/* REGION STUFF */
+/***************************************************************/
+
+#define myPI 3.1415926535897932385
+
+typedef struct {
+ int exists;
+ double xrefval, yrefval;
+ double xrefpix, yrefpix;
+ double xinc, yinc;
+ double rot;
+ char type[6];
+} WCSdata;
+
+typedef enum {
+ point_rgn,
+ line_rgn,
+ circle_rgn,
+ annulus_rgn,
+ ellipse_rgn,
+ elliptannulus_rgn,
+ box_rgn,
+ rectangle_rgn,
+ diamond_rgn,
+ sector_rgn,
+ poly_rgn
+} shapeType;
+
+typedef enum { pixel_fmt, degree_fmt, hhmmss_fmt } coordFmt;
+
+typedef struct {
+ char sign; /* Include or exclude? */
+ shapeType shape; /* Shape of this region */
+
+ union { /* Parameters - In pixels */
+
+ /**** Generic Shape Data ****/
+
+ struct {
+ double p[8]; /* Region parameters */
+ double sinT, cosT; /* For rotated shapes */
+ double a, b; /* Extra scratch area */
+ } gen;
+
+ /**** Polygon Data ****/
+
+ struct {
+ int nPts; /* Number of Polygon pts */
+ double *Pts; /* Polygon points */
+ double xmin,xmax; /* Polygon bounding box */
+ double ymin,ymax;
+ } poly;
+
+ } param;
+
+} RgnShape;
+
+typedef struct {
+ int nShapes;
+ RgnShape *Shapes;
+ WCSdata wcs;
+} SAORegion;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int ffrrgn( const char *filename, WCSdata *wcs, SAORegion **Rgn, int *status );
+int fftrgn( double X, double Y, SAORegion *Rgn );
+void fffrgn( SAORegion *Rgn );
+
+#ifdef __cplusplus
+ }
+#endif
+
+#define fits_read_rgnfile ffrrgn
+#define fits_in_region fftrgn
+#define fits_free_region fffrgn
+
diff --git a/include/cfitsio/ricecomp.h b/include/cfitsio/ricecomp.h
new file mode 100644
index 0000000..4a48328
--- /dev/null
+++ b/include/cfitsio/ricecomp.h
@@ -0,0 +1,107 @@
+/* @(#) buffer.h 1.1 98/07/21 12:34:27 */
+/* buffer.h: structure for compression to buffer rather than to a file, including
+ * bit I/O buffer
+ *
+ * R. White, 19 June 1998
+ */
+
+
+typedef unsigned char Buffer_t;
+
+typedef struct {
+ int bitbuffer; /* bit buffer */
+ int bits_to_go; /* bits to go in buffer */
+ Buffer_t *start; /* start of buffer */
+ Buffer_t *current; /* current position in buffer */
+ Buffer_t *end; /* end of buffer */
+} Buffer;
+
+#define buffree(mf) (free(mf->start), free(mf))
+#define bufused(mf) (mf->current - mf->start)
+#define bufreset(mf) (mf->current = mf->start)
+
+/*
+ * getcbuf, putcbuf macros for character IO to buffer
+ * putcbuf returns EOF on end of buffer, else returns 0
+ */
+#define getcbuf(mf) ((mf->current >= mf->end) ? EOF : *(mf->current)++)
+#define putcbuf(c,mf) \
+ ((mf->current >= mf->end) ? \
+ EOF :\
+ ((*(mf->current)++ = c), 0))
+
+/*
+ * bufalloc sets up buffer of length n
+ */
+
+/* not needed by CFITSIO
+
+static Buffer *bufalloc(int n)
+{
+Buffer *mf;
+
+ mf = (Buffer *) malloc(sizeof(Buffer));
+ if (mf == (Buffer *)NULL) return((Buffer *)NULL);
+
+ mf->start = (Buffer_t *) malloc(n*sizeof(Buffer_t));
+ if (mf->start == (Buffer_t *)NULL) {
+ free(mf);
+ return((Buffer *)NULL);
+ }
+ mf->bits_to_go = 8;
+ mf->end = mf->start + n;
+ mf->current = mf->start;
+ return(mf);
+}
+*/
+
+/*
+ * bufrealloc extends buffer (or truncates it) by
+ * reallocating memory
+ */
+
+/* not needed by CFITSIO
+static int bufrealloc(Buffer *mf, int n)
+{
+int len;
+
+ len = mf->current - mf->start;
+
+ * silently throw away data if buffer is already longer than n *
+ if (len>n) len = n;
+ if (len<0) len = 0;
+
+ mf->start = (Buffer_t *) realloc(mf->start, n*sizeof(Buffer_t));
+ if (mf->start == (Buffer_t *)NULL) return(0);
+
+ mf->end = mf->start + n;
+ mf->current = mf->start + len;
+ return(n);
+}
+*/
+
+/*
+ * bufdump dumps contents of buffer to outfile and resets
+ * it to be empty. Returns number of bytes written.
+ *
+ * Note we don't write out the bit buffer -- you must call
+ * done_outputing_bits() first to ensure that the bit buffer
+ * is written out. I do it this way to allow incremental
+ * buffer dumps while bit IO is still going on.
+ */
+
+/* not needed by CFITSIO
+
+static int bufdump(FILE *outfile, Buffer *buffer)
+{
+int ndump;
+
+ ndump = bufused(buffer);
+ if (fwrite(buffer->start, 1, ndump, outfile) != ndump) {
+ fprintf(stderr, "bufdump: error in write\n");
+ exit(1);
+ }
+ bufreset(buffer);
+ return(ndump);
+}
+*/
diff --git a/include/cfortran.doc b/include/cfortran.doc
new file mode 100644
index 0000000..6c6f4b3
--- /dev/null
+++ b/include/cfortran.doc
@@ -0,0 +1,2051 @@
+/* cfortran.doc 4.3 */
+/* www-zeus.desy.de/~burow OR anonymous ftp@zebra.desy.de */
+/* Burkhard Burow burow@desy.de 1990 - 1998. */
+
+
+ cfortran.h : Interfacing C or C++ and FORTRAN
+
+Supports: Alpha and VAX VMS, Alpha OSF, DECstation and VAX Ultrix, IBM RS/6000,
+ Silicon Graphics, Sun, CRAY, Apollo, HP9000, LynxOS, Convex, Absoft,
+ f2c, g77, NAG f90, PowerStation Fortran with Visual C++, NEC SX-4,
+ Portland Group.
+
+C and C++ are generally equivalent as far as cfortran.h is concerned.
+Unless explicitly noted otherwise, mention of C implicitly includes C++.
+C++ compilers tested include:
+ SunOS> CC +p +w # Clean compiles.
+ IRIX> CC # Clean compiles.
+ IRIX> CC -fullwarn # Still some warnings to be overcome.
+ GNU> g++ -Wall # Compiles are clean, other than warnings for unused
+ # cfortran.h static routines.
+
+N.B.: The best documentation on interfacing C or C++ and Fortran is in
+ the chapter named something like 'Interfacing C and Fortran'
+ to be found in the user's guide of almost every Fortran compiler.
+ Understanding this information for one or more Fortran compilers
+ greatly clarifies the aims and actions of cfortran.h.
+ Such a chapter generally also addresses issues orthogonal to cfortran.h,
+ for example the order of array indices, the index of the first element,
+ as well as compiling and linking issues.
+
+
+0 Short Summary of the Syntax Required to Create the Interface
+--------------------------------------------------------------
+
+e.g. Prototyping a FORTRAN subroutine for C:
+
+/* PROTOCCALLSFSUBn is optional for C, but mandatory for C++. */
+
+ PROTOCCALLSFSUB2(SUB_NAME,sub_name,STRING,PINT)
+#define SUB_NAME(A,B) CCALLSFSUB2(SUB_NAME,sub_name,STRING,PINT, A,B)
+
+ ^ - -
+ number of arguments _____| | STRING BYTE PBYTE BYTEV(..)|
+ / | STRINGV DOUBLE PDOUBLE DOUBLEV(..)|
+ / | PSTRING FLOAT PFLOAT FLOATV(..)|
+ types of arguments ____ / | PNSTRING INT PINT INTV(..)|
+ \ | PPSTRING LOGICAL PLOGICAL LOGICALV(..)|
+ \ | PSTRINGV LONG PLONG LONGV(..)|
+ \ | ZTRINGV SHORT PSHORT SHORTV(..)|
+ | PZTRINGV ROUTINE PVOID SIMPLE |
+ - -
+
+
+e.g. Prototyping a FORTRAN function for C:
+/* PROTOCCALLSFFUNn is mandatory for both C and C++. */
+PROTOCCALLSFFUN1(INT,FUN_NAME,fun_name,STRING)
+#define FUN_NAME(A) CCALLSFFUN1(FUN_NAME,fun_name,STRING, A)
+
+e.g. calling FUN_NAME from C: {int a; a = FUN_NAME("hello");}
+
+
+e.g. Creating a FORTRAN-callable wrapper for
+ a C function returning void, with a 7 dimensional integer array argument:
+ [Not supported from C++.]
+FCALLSCSUB1(csub_name,CSUB_NAME,csub_name,INTVVVVVVV)
+
+
+e.g. Creating a FORTRAN-callable wrapper for other C functions:
+FCALLSCFUN1(STRING,cfun_name,CFUN_NAME,cfun_name,INT)
+ [ ^-- BYTE, DOUBLE, FLOAT, INT, LOGICAL, LONG, SHORT, VOID
+ are other types returned by functions. ]
+
+
+e.g. COMMON BLOCKs:
+FORTRAN: common /fcb/ v,w,x
+ character *(13) v, w(4), x(3,2)
+C:
+typedef struct { char v[13],w[4][13],x[2][3][13]; } FCB_DEF;
+#define FCB COMMON_BLOCK(FCB,fcb)
+COMMON_BLOCK_DEF(FCB_DEF,FCB);
+FCB_DEF FCB; /* Define, i.e. allocate memory, in exactly one *.c file. */
+
+e.g. accessing FCB in C: printf("%.13s",FCB.v);
+
+
+
+I Introduction
+--------------
+
+cfortran.h is an easy-to-use powerful bridge between C and FORTRAN.
+It provides a completely transparent, machine independent interface between
+C and FORTRAN routines (= subroutines and/or functions) and global data,
+i.e. structures and COMMON blocks.
+
+The complete cfortran.h package consists of 4 files: the documentation in
+cfortran.doc, the engine cfortran.h, examples in cfortest.c and
+cfortex.f/or. [cfortex.for under VMS, cfortex.f on other machines.]
+
+The cfortran.h package continues to be developed. The most recent version is
+available via www at http://www-zeus.desy.de/~burow
+or via anonymous ftp at zebra.desy.de (131.169.2.244).
+
+The examples may be run using one of the following sets of instructions:
+
+N.B. Unlike earlier versions, cfortran.h 3.0 and later versions
+ automatically uses the correct ANSI ## or pre-ANSI /**/
+ preprocessor operator as required by the C compiler.
+
+N.B. As a general rule when trying to determine how to link C and Fortran,
+ link a trivial Fortran program using the Fortran compilers verbose option,
+ in order to see how the Fortran compiler drives the linker. e.g.
+ unix> cat f.f
+ END
+ unix> f77 -v f.f
+ .. lots of info. follows ...
+
+N.B. If using a C main(), i.e. Fortran PROGRAM is not entry of the executable,
+ and if the link bombs with a complaint about
+ a missing "MAIN" (e.g. MAIN__, MAIN_, f90_main or similar),
+ then Fortran has hijacked the entry point to the executable
+ and wishes to call the rest of the executable via "MAIN".
+ This can usually be satisfied by doing e.g. 'cc -Dmain=MAIN__ ...'
+ but often kills the command line arguments in argv and argc.
+ The f77 verbose option, usually -v, may point to a solution.
+
+
+RS/6000> # Users are strongly urged to use f77 -qextname and cc -Dextname
+RS/6000> # Use -Dextname=extname if extname is a symbol used in the C code.
+RS/6000> xlf -c -qextname cfortex.f
+RS/6000> cc -c -Dextname cfortest.c
+RS/6000> xlf -o cfortest cfortest.o cfortex.o && cfortest
+
+DECFortran> #Only DECstations with DECFortran for Ultrix RISC Systems.
+DECFortran> cc -c -DDECFortran cfortest.c
+DECFortran> f77 -o cfortest cfortest.o cfortex.f && cfortest
+
+IRIX xxxxxx 5.2 02282015 IP20 mips
+MIPS> # DECstations and Silicon Graphics using the MIPS compilers.
+MIPS> cc -o cfortest cfortest.c cfortex.f -lI77 -lU77 -lF77 && cfortest
+MIPS> # Can also let f77 drive linking, e.g.
+MIPS> cc -c cfortest.c
+MIPS> f77 -o cfortest cfortest.o cfortex.f && cfortest
+
+Apollo> # Some 'C compiler 68K Rev6.8' break. [See Section II o) Notes: Apollo]
+Apollo> f77 -c cfortex.f && cc -o cfortest cfortest.c cfortex.o && cfortest
+
+VMS> define lnk$library sys$library:vaxcrtl
+VMS> cc cfortest.c
+VMS> fortran cfortex.for
+VMS> link/exec=cfortest cfortest,cfortex
+VMS> run cfortest
+
+OSF1 xxxxxx V3.0 347 alpha
+Alpha/OSF> # Probably better to let cc drive linking, e.g.
+Alpha/OSF> f77 -c cfortex.f
+Alpha/OSF> cc -o cfortest cfortest.c cfortex.o -lUfor -lfor -lFutil -lots -lm
+Alpha/OSF> cfortest
+Alpha/OSF> # Else may need 'cc -Dmain=MAIN__' to let f77 drive linking.
+
+Sun> # Some old cc(1) need a little help. [See Section II o) Notes: Sun]
+Sun> f77 -o cfortest cfortest.c cfortex.f -lc -lm && cfortest
+Sun> # Some older f77 may require 'cc -Dmain=MAIN_'.
+
+CRAY> cft77 cfortex.f
+CRAY> cc -c cfortest.c
+CRAY> segldr -o cfortest.e cfortest.o cfortex.o
+CRAY> ./cfortest.e
+
+NEC> cc -c -Xa cfortest.c
+NEC> f77 -o cfortest cfortest.o cfortex.f && cfortest
+
+VAX/Ultrix/cc> # For cc on VAX Ultrix only, do the following once to cfortran.h.
+VAX/Ultrix/cc> mv cfortran.h cftmp.h && grep -v "^#pragma" <cftmp.h >cfortran.h
+
+VAX/Ultrix/f77> # In the following, 'CC' is either 'cc' or 'gcc -ansi'. NOT'vcc'
+VAX/Ultrix/f77> CC -c -Dmain=MAIN_ cfortest.c
+VAX/Ultrix/f77> f77 -o cfortest cfortex.f cfortest.o && cfortest
+
+LynxOS> # In the following, 'CC' is either 'cc' or 'gcc -ansi'.
+LynxOS> # Unfortunately cc is easily overwhelmed by cfortran.h,
+LynxOS> # and won't compile some of the cfortest.c demos.
+LynxOS> f2c -R cfortex.f
+LynxOS> CC -Dlynx -o cfortest cfortest.c cfortex.c -lf2c && cfortest
+
+HP9000> # Tested with HP-UX 7.05 B 9000/380 and with A.08.07 A 9000/730
+HP9000> # CC may be either 'c89 -Aa' or 'cc -Aa'
+HP9000> # Depending on the compiler version, you may need to include the
+HP9000> # option '-tp,/lib/cpp' or worse, you'll have to stick to the K&R C.
+HP9000> # [See Section II o) Notes: HP9000]
+HP9000> # Users are strongly urged to use f77 +ppu and cc -Dextname
+HP9000> # Use -Dextname=extname if extname is a symbol used in the C code.
+HP9000> CC -Dextname -c cfortest.c
+HP9000> f77 +ppu cfortex.f -o cfortest cfortest.o && cfortest
+HP9000> # Older f77 may need
+HP9000> f77 -c cfortex.f
+HP9000> CC -o cfortest cfortest.c cfortex.o -lI77 -lF77 && cfortest
+
+HP0000> # If old-style f77 +800 compiled objects are required:
+HP9000> # #define hpuxFortran800
+HP9000> cc -c -Aa -DhpuxFortran800 cfortest.c
+HP9000> f77 +800 -o cfortest cfortest.o cfortex.f
+
+f2c> # In the following, 'CC' is any C compiler.
+f2c> f2c -R cfortex.f
+f2c> CC -o cfortest -Df2cFortran cfortest.c cfortex.c -lf2c && cfortest
+
+Portland Group $ # Presumably other C compilers also work.
+Portland Group $ pgcc -DpgiFortran -c cfortest.c
+Portland Group $ pgf77 -o cfortest cfortex.f cfortest.o && cfortest
+
+NAGf90> # cfortex.f is distributed with Fortran 77 style comments.
+NAGf90> # To convert to f90 style comments do the following once to cfortex.f:
+NAGf90> mv cfortex.f cf_temp.f && sed 's/^C/\!/g' cf_temp.f > cfortex.f
+NAGf90> # In the following, 'CC' is any C compiler.
+NAGf90> CC -c -DNAGf90Fortran cfortest.c
+NAGf90> f90 -o cfortest cfortest.o cfortex.f && cfortest
+
+PC> # On a PC with PowerStation Fortran and Visual_C++
+PC> cl /c cftest.c
+PC> fl32 cftest.obj cftex.for
+
+GNU> # GNU Fortran
+GNU> # See Section VI caveat on using 'gcc -traditional'.
+GNU> gcc -ansi -Wall -O -c -Df2cFortran cfortest.c
+GNU> g77 -ff2c -o cfortest cfortest.o cfortex.f && cfortest
+
+AbsoftUNIX> # Absoft Fortran for all UNIX based operating systems.
+AbsoftUNIX> # e.g. Linux or Next on Intel or Motorola68000.
+AbsoftUNIX> # Absoft f77 -k allows Fortran routines to be safely called from C.
+AbsoftUNIX> gcc -ansi -Wall -O -c -DAbsoftUNIXFortran cfortest.c
+AbsoftUNIX> f77 -k -o cfortest cfortest.o cfortex.f && cfortest
+
+AbsoftPro> # Absoft Pro Fortran for MacOS
+AbsoftPro> # Use #define AbsoftProFortran
+
+CLIPPER> # INTERGRAPH CLIX using CLIPPER C and Fortran compilers.
+CLIPPER> # N.B. - User, not cfortran.h, is responsible for
+CLIPPER> # f77initio() and f77uninitio() if required.
+CLIPPER> # - LOGICAL values are not mentioned in CLIPPER doc.s,
+CLIPPER> # so they may not yet be correct in cfortran.h.
+CLIPPER> # - K&R mode (-knr or Ac=knr) breaks FLOAT functions
+CLIPPER> # (see CLIPPER doc.s) and cfortran.h does not fix it up.
+CLIPPER> # [cfortran.h ok for old sun C which made the same mistake.]
+CLIPPER> acc cfortest.c -c -DCLIPPERFortran
+CLIPPER> af77 cfortex.f cfortest.o -o cfortest
+
+
+By changing the SELECTion ifdef of cfortest.c and recompiling one can try out
+a few dozen different few-line examples.
+
+
+
+The benefits of using cfortran.h include:
+1. Machine/OS/compiler independent mixing of C and FORTRAN.
+
+2. Identical (within syntax) calls across languages, e.g.
+C FORTRAN
+ CALL HBOOK1(1,'pT spectrum of pi+',100,0.,5.,0.)
+/* C*/
+ HBOOK1(1,"pT spectrum of pi+",100,0.,5.,0.);
+
+3. Each routine need only be set up once in its lifetime. e.g.
+/* Setting up a FORTRAN routine to be called by C.
+ ID,...,VMX are merely the names of arguments.
+ These tags must be unique w.r.t. each other but are otherwise arbitrary. */
+PROTOCCALLSFSUB6(HBOOK1,hbook1,INT,STRING,INT,FLOAT,FLOAT,FLOAT)
+#define HBOOK1(ID,CHTITLE,NX,XMI,XMA,VMX) \
+ CCALLSFSUB6(HBOOK1,hbook1,INT,STRING,INT,FLOAT,FLOAT,FLOAT, \
+ ID,CHTITLE,NX,XMI,XMA,VMX)
+
+4. Source code is NOT required for the C routines exported to FORTRAN, nor for
+ the FORTRAN routines imported to C. In fact, routines are most easily
+ prototyped using the information in the routines' documentation.
+
+5. Routines, and the code calling them, can be coded naturally in the language
+ of choice. C routines may be coded with the natural assumption of being
+ called only by C code. cfortran.h does all the required work for FORTRAN
+ code to call C routines. Similarly it also does all the work required for C
+ to call FORTRAN routines. Therefore:
+ - C programmers need not embed FORTRAN argument passing mechanisms into
+ their code.
+ - FORTRAN code need not be converted into C code. i.e. The honed and
+ time-honored FORTRAN routines are called by C.
+
+6. cfortran.h is a single ~1700 line C include file; portable to most
+ remaining, if not all, platforms.
+
+7. STRINGS and VECTORS of STRINGS along with the usual simple arguments to
+ routines are supported as are functions returning STRINGS or numbers. Arrays
+ of pointers to strings and values of structures as C arguments, will soon be
+ implemented. After learning the machinery of cfortran.h, users can expand
+ it to create custom types of arguments. [This requires no modification to
+ cfortran.h, all the preprocessor directives required to implement the
+ custom types can be defined outside cfortran.h]
+
+8. cfortran.h requires each routine to be exported to be explicitly set up.
+ While is usually only be done once in a header file it would be best if
+ applications were required to do no work at all in order to cross languages.
+ cfortran.h's simple syntax could be a convenient back-end for a program
+ which would export FORTRAN or C routines directly from the source code.
+
+
+ -----
+
+Example 1 - cfortran.h has been used to make the C header file hbook.h,
+ which then gives any C programmer, e.g. example.c, full and
+ completely transparent access to CERN's HBOOK library of routines.
+ Each HBOOK routine required about 3 lines of simple code in
+ hbook.h. The example also demonstrates how FORTRAN common blocks
+ are defined and used.
+
+/* hbook.h */
+#include "cfortran.h"
+ :
+PROTOCCALLSFSUB6(HBOOK1,hbook1,INT,STRING,INT,FLOAT,FLOAT,FLOAT)
+#define HBOOK1(ID,CHTITLE,NX,XMI,XMA,VMX) \
+ CCALLSFSUB6(HBOOK1,hbook1,INT,STRING,INT,FLOAT,FLOAT,FLOAT, \
+ ID,CHTITLE,NX,XMI,XMA,VMX)
+ :
+/* end hbook.h */
+
+/* example.c */
+#include "hbook.h"
+ :
+typedef struct {
+ int lines;
+ int status[SIZE];
+ float p[SIZE]; /* momentum */
+} FAKE_DEF;
+#define FAKE COMMON_BLOCK(FAKE,fake)
+COMMON_BLOCK_DEF(FAKE_DEF,FAKE);
+ :
+main ()
+{
+ :
+ HBOOK1(1,"pT spectrum of pi+",100,0.,5.,0.);
+/* c.f. the call in FORTRAN:
+ CALL HBOOK1(1,'pT spectrum of pi+',100,0.,5.,0.)
+*/
+ :
+ FAKE.p[7]=1.0;
+ :
+}
+
+N.B. i) The routine is language independent.
+ ii) hbook.h is machine independent.
+ iii) Applications using routines via cfortran.h are machine independent.
+
+ -----
+
+Example 2 - Many VMS System calls are most easily called from FORTRAN, but
+ cfortran.h now gives that ease in C.
+
+#include "cfortran.h"
+
+PROTOCCALLSFSUB3(LIB$SPAWN,lib$spawn,STRING,STRING,STRING)
+#define LIB$SPAWN(command,input_file,output_file) \
+ CCALLSFSUB3(LIB$SPAWN,lib$spawn,STRING,STRING,STRING, \
+ command,input_file,output_file)
+
+main ()
+{
+LIB$SPAWN("set term/width=132","","");
+}
+
+Obviously the cfortran.h command above could be put into a header file along
+with the description of the other system calls, but as this example shows, it's
+not much hassle to set up cfortran.h for even a single call.
+
+ -----
+
+Example 3 - cfortran.h and the source cstring.c create the cstring.obj library
+ which gives FORTRAN access to all the functions in C's system
+ library described by the system's C header file string.h.
+
+C EXAMPLE.FOR
+ PROGRAM EXAMPLE
+ DIMENSION I(20), J(30)
+ :
+ CALL MEMCPY(I,J,7)
+ :
+ END
+
+/* cstring.c */
+#include <string.h> /* string.h prototypes memcpy() */
+#include "cfortran.h"
+
+ :
+FCALLSCSUB3(memcpy,MEMCPY,memcpy,PVOID,PVOID,INT)
+ :
+
+
+The simplicity exhibited in the above example exists for many but not all
+machines. Note 4. of Section II ii) details the limitations and describes tools
+which try to maintain the best possible interface when FORTRAN calls C
+routines.
+
+ -----
+
+
+II Using cfortran.h
+-------------------
+
+The user is asked to look at the source files cfortest.c and cfortex.f
+for clarification by example.
+
+o) Notes:
+
+o Specifying the Fortran compiler
+ cfortran.h generates interfaces for the default Fortran compiler. The default
+can be overridden by defining,
+ . in the code, e.g.: #define NAGf90Fortran
+ OR . in the compile directive, e.g.: unix> cc -DNAGf90Fortran
+one of the following before including cfortran.h:
+ NAGf90Fortran f2cFortran hpuxFortran apolloFortran sunFortran
+ IBMR2Fortran CRAYFortran mipsFortran DECFortran vmsFortran
+ CONVEXFortran PowerStationFortran AbsoftUNIXFortran
+ SXFortran pgiFortran AbsoftProFortran
+This also allows crosscompilation.
+If wanted, NAGf90Fortran, f2cFortran, DECFortran, AbsoftUNIXFortran,
+AbsoftProFortran and pgiFortran must be requested by the user.
+
+o /**/
+ cfortran.h (ab)uses the comment kludge /**/ when the ANSI C preprocessor
+catenation operator ## doesn't exist. In at least MIPS C, this kludge is
+sensitive to blanks surrounding arguments to macros.
+ Therefore, for applications using non-ANSI C compilers, the argtype_i,
+routine_name, routine_type and common_block_name arguments to the
+PROTOCCALLSFFUNn, CCALLSFSUB/FUNn, FCALLSCSUB/FUNn and COMMON_BLOCK macros
+--- MUST NOT --- be followed by any white space characters such as
+blanks, tabs or newlines.
+
+o LOGICAL
+ FORTRAN LOGICAL values of .TRUE. and .FALSE. do not agree with the C
+representation of TRUE and FALSE on all machines. cfortran.h does the
+conversion for LOGICAL and PLOGICAL arguments and for functions returning
+LOGICAL. Users must convert arrays of LOGICALs from C to FORTRAN with the
+C2FLOGICALV(array_name, elements_in_array); macro. Similarly, arrays of LOGICAL
+values may be converted from the FORTRAN into C representation by using
+F2CLOGICALV(array_name, elements_in_array);
+
+ When C passes or returns LOGICAL values to FORTRAN, by default cfortran.h
+only makes the minimal changes required to the value. [e.g. Set/Unset the
+single relevant bit or do nothing for FORTRAN compilers which use 0 as FALSE
+and treat all other values as TRUE.] Therefore cfortran.h will pass LOGICALs
+to FORTRAN which do not have an identical representation to .TRUE. or .FALSE.
+This is fine except for abuses of FORTRAN/77 in the style of:
+ logical l
+ if (l .eq. .TRUE.) ! (1)
+instead of the correct:
+ if (l .eqv. .TRUE.) ! (2)
+or:
+ if (l) ! (3)
+For FORTRAN code which treats LOGICALs from C in the method of (1),
+LOGICAL_STRICT must be defined before including cfortran.h, either in the
+code, "#define LOGICAL_STRICT", or compile with "cc -DLOGICAL_STRICT".
+There is no reason to use LOGICAL_STRICT for FORTRAN code which does not do (1).
+At least the IBM's xlf and the Apollo's f77 do not even allow code along the
+lines of (1).
+
+ DECstations' DECFortran and MIPS FORTRAN compilers use different internal
+representations for LOGICAL values. [Both compilers are usually called f77,
+although when both are installed on a single machine the MIPS' one is usually
+renamed. (e.g. f772.1 for version 2.10.)] cc doesn't know which FORTRAN
+compiler is present, so cfortran.h assumes MIPS f77. To use cc with DECFortran
+define the preprocessor constant 'DECFortran'.
+e.g. i) cc -DDECFortran -c the_code.c
+ or ii) #define DECFortran /* in the C code or add to cfortran.h. */
+
+ MIPS f77 [SGI and DECstations], f2c, and f77 on VAX Ultrix treat
+.eqv./.neqv. as .eq./.ne.. Therefore, for these compilers, LOGICAL_STRICT is
+defined by default in cfortran.h. [The Sun and HP compilers have not been
+tested, so they may also require LOGICAL_STRICT as the default.]
+
+o SHORT and BYTE
+ They are irrelevant for the CRAY where FORTRAN has no equivalent to C's short.
+Similarly BYTE is irrelevant for f2c and for VAX Ultrix f77 and fort. The
+author has tested SHORT and BYTE with a modified cfortest.c/cfortex.f on all
+machines supported except for the HP9000 and the Sun.
+
+ BYTE is a signed 8-bit quantity, i.e. values are -128 to 127, on all machines
+except for the SGI [at least for MIPS Computer Systems 2.0.] On the SGI it is
+an unsigned 8-bit quantity, i.e. values are 0 to 255, although the SGI 'FORTRAN
+77 Programmers Guide' claims BYTE is signed. Perhaps MIPS 2.0 is dated, since
+the DECstations using MIPS 2.10 f77 have a signed BYTE.
+
+ To minimize the difficulties of signed and unsigned BYTE, cfortran.h creates
+the type 'INTEGER_BYTE' to agree with FORTRAN's BYTE. Users may define
+SIGNED_BYTE or UNSIGNED_BYTE, before including cfortran.h, to specify FORTRAN's
+BYTE. If neither is defined, cfortran.h assumes SIGNED_BYTE.
+
+o CRAY
+ The type DOUBLE in cfortran.h corresponds to FORTRAN's DOUBLE PRECISION.
+ The type FLOAT in cfortran.h corresponds to FORTRAN's REAL.
+
+On a classic CRAY [i.e. all models except for the t3e]:
+( 64 bit) C float == C double == Fortran REAL
+(128 bit) C long double == Fortran DOUBLE PRECISION
+Therefore when moving a mixed C and FORTRAN app. to/from a classic CRAY,
+either the C code will have to change,
+or the FORTRAN code and cfortran.h declarations will have to change.
+DOUBLE_PRECISION is a cfortran.h macro which provides the former option,
+i.e. the C code is automatically changed.
+DOUBLE_PRECISION is 'long double' on classic CRAY and 'double' elsewhere.
+DOUBLE_PRECISION thus corresponds to FORTRAN's DOUBLE PRECISION
+on all machines, including classic CRAY.
+
+On a classic CRAY with the fortran compiler flag '-dp':
+Fortran DOUBLE PRECISION thus is also the faster 64bit type.
+(This switch is often used since the application is usually satisfied by
+ 64 bit precision and the application needs the speed.)
+DOUBLE_PRECISION is thus not required in this case,
+since the classic CRAY behaves like all other machines.
+If DOUBLE_PRECISION is used nonetheless, then on the classic CRAY
+the default cfortran.h behavior must be overridden,
+for example by the C compiler option '-DDOUBLE_PRECISION=double'.
+
+On a CRAY t3e:
+(32 bit) C float == Fortran Unavailable
+(64 bit) C double == C long double == Fortran REAL == Fortran DOUBLE PRECISION
+Notes:
+- (32 bit) is available as Fortran REAL*4 and
+ (64 bit) is available as Fortran REAL*8.
+ Since cfortran.h is all about more portability, not about less portability,
+ the use of the nonstandard REAL*4 and REAL*8 is strongly discouraged.
+- Fortran DOUBLE PRECISION is folded to REAL with the following warning:
+ 'DOUBLE PRECISION is not supported on this platform. REAL will be used.'
+ Similarly, Fortran REAL*16 is mapped to REAL*8 with a warning.
+This behavior differs from that of other machines, including the classic CRAY.
+FORTRAN_REAL is thus introduced for the t3e,
+just as DOUBLE_PRECISION is introduced for the classic CRAY.
+FORTRAN_REAL is 'double' on t3e and 'float' elsewhere.
+FORTRAN_REAL thus corresponds to FORTRAN's REAL on all machines, including t3e.
+
+
+o f2c
+ f2c, by default promotes REAL functions to double. cfortran.h does not (yet)
+support this, so the f2c -R option must be used to turn this promotion off.
+
+o f2c
+[Thanks to Dario Autiero for pointing out the following.]
+f2c has a strange feature in that either one or two underscores are appended
+to a Fortran name of a routine or common block,
+depending on whether or not the original name contains an underscore.
+
+ S.I. Feldman et al., "A fortran to C converter",
+ Computing Science Technical Report No. 149.
+
+ page 2, chapter 2: INTERLANGUAGE conventions
+ ...........
+ To avoid conflict with the names of library routines and with names that
+ f2c generates,
+ Fortran names may have one or two underscores appended. Fortran names are
+ forced to lower case (unless the -U option described in Appendix B is in
+ effect); external names, i.e. the names of fortran procedures and common
+ blocks, have a single underscore appended if they do not contain any
+ underscore and have a pair of underscores appended if they do contain
+ underscores. Thus fortran subroutines names ABC, A_B_C and A_B_C_ result
+ in C functions named abc_, a_b_c__ and a_b_c___.
+ ...........
+
+cfortran.h is unable to change the naming convention on a name by name basis.
+Fortran routine and common block names which do not contain an underscore
+are unaffected by this feature.
+Names which do contain an underscore may use the following work-around:
+
+/* First 2 lines are a completely standard cfortran.h interface
+ to the Fortran routine E_ASY . */
+ PROTOCCALLSFSUB2(E_ASY,e_asy, PINT, INT)
+#define E_ASY(A,B) CCALLSFSUB2(E_ASY,e_asy, PINT, INT, A, B)
+#ifdef f2cFortran
+#define e_asy_ e_asy__
+#endif
+/* Last three lines are a work-around for the strange f2c naming feature. */
+
+o NAG f90
+ The Fortran 77 subset of Fortran 90 is supported. Extending cfortran.h to
+interface C with all of Fortran 90 has not yet been examined.
+ The NAG f90 library hijacks the main() of any program and starts the user's
+program with a call to: void f90_main(void);
+While this in itself is only a minor hassle, a major problem arises because
+NAG f90 provides no mechanism to access command line arguments.
+ At least version 'NAGWare f90 compiler Version 1.1(334)' appended _CB to
+common block names instead of the usual _. To fix, add this to cfortran.h:
+#ifdef old_NAG_f90_CB_COMMON
+#define COMMON_BLOCK CFC_ /* for all other Fortran compilers */
+#else
+#define COMMON_BLOCK(UN,LN) _(LN,_CB)
+#endif
+
+o RS/6000
+ Using "xlf -qextname ...", which appends an underscore, '_', to all FORTRAN
+external references, requires "cc -Dextname ..." so that cfortran.h also
+generates these underscores.
+Use -Dextname=extname if extname is a symbol used in the C code.
+The use of "xlf -qextname" is STRONGLY ENCOURAGED, since it allows for
+transparent naming schemes when mixing C and Fortran.
+
+o HP9000
+ Using "f77 +ppu ...", which appends an underscore, '_', to all FORTRAN
+external references, requires "cc -Dextname ..." so that cfortran.h also
+generates these underscores.
+Use -Dextname=extname if extname is a symbol used in the C code.
+The use of "f77 +ppu" is STRONGLY ENCOURAGED, since it allows for
+transparent naming schemes when mixing C and Fortran.
+
+ At least one release of the HP /lib/cpp.ansi preprocessor is broken and will
+go into an infinite loop when trying to process cfortran.h with the
+## catenation operator. The K&R version of cfortran.h must then be used and the
+K&R preprocessor must be specified. e.g.
+ HP9000> cc -Aa -tp,/lib/cpp -c source.c
+The same problem with a similar solution exists on the Apollo.
+An irrelevant error message '0: extraneous name /usr/include' will appear for
+each source file due to another HP bug, and can be safely ignored.
+e.g. 'cc -v -c -Aa -tp,/lib/cpp cfortest.c' will show that the driver passes
+'-I /usr/include' instead of '-I/usr/include' to /lib/cpp
+
+On some machines the above error causes compilation to stop; one must then use
+K&R C, as with old HP compilers which don't support function prototyping.
+cfortran.h has to be informed that K&R C is to being used, e.g.
+HP9000> cc -D__CF__KnR -c source.c
+
+o AbsoftUNIXFortran
+By default, cfortran.h follows the default AbsoftUNIX/ProFortran and prepends _C
+to each COMMON BLOCK name. To override the cfortran.h behavior
+#define COMMON_BLOCK(UN,LN) before #including cfortran.h.
+[Search for COMMON_BLOCK in cfortran.h for examples.]
+
+o Apollo
+On at least one release, 'C compiler 68K Rev6.8(168)', the default C
+preprocessor, from cc -A xansi or cc -A ansi, enters an infinite loop when
+using cfortran.h. This Apollo bug can be circumvented by using:
+ . cc -DANSI_C_preprocessor=0 to force use of /**/, instead of '##'.
+ AND . The pre-ANSI preprocessor, i.e. use cc -Yp,/usr/lib
+The same problem with a similar solution exists on the HP.
+
+o Sun
+Old versions of cc(1), say <~1986, may require help for cfortran.h applications:
+ . #pragma may not be understood, hence cfortran.h and cfortest.c may require
+ sun> mv cfortran.h cftmp.h && grep -v "^#pragma" <cftmp.h >cfortran.h
+ sun> mv cfortest.c cftmp.c && grep -v "^#pragma" <cftmp.c >cfortest.c
+ . Old copies of math.h may not include the following from a newer math.h.
+ [For an ancient math.h on a 386 or sparc, get similar from a new math.h.]
+ #ifdef mc68000 /* 5 lines Copyright (c) 1988 by Sun Microsystems, Inc. */
+ #define FLOATFUNCTIONTYPE int
+ #define RETURNFLOAT(x) return (*(int *)(&(x)))
+ #define ASSIGNFLOAT(x,y) *(int *)(&x) = y
+ #endif
+
+o CRAY, Sun, Apollo [pre 6.8 cc], VAX Ultrix and HP9000
+ Only FORTRAN routines with less than 15 arguments can be prototyped for C,
+since these compilers don't allow more than 31 arguments to a C macro. This can
+be overcome, [see Section IV], with access to any C compiler without this
+limitation, e.g. gcc, on ANY machine.
+
+o VAX Ultrix
+ vcc (1) with f77 is not supported. Although:
+VAXUltrix> f77 -c cfortex.f
+VAXUltrix> vcc -o cfortest cfortest.c cfortex.o -lI77 -lU77 -lF77 && cfortest
+will link and run. However, the FORTRAN standard I/O is NOT merged with the
+stdin and stdout of C, and instead uses the files fort.6 and fort.5. For vcc,
+f77 can't drive the linking, as for gcc and cc, since vcc objects must be
+linked using lk (1). f77 -v doesn't tell much, and without VAX Ultrix manuals,
+the author can only wait for the info. required.
+
+ fort (1) is not supported. Without VAX Ultrix manuals the author cannot
+convince vcc/gcc/cc and fort to generate names of routines and COMMON blocks
+that match at the linker, lk (1). i.e. vcc/gcc/cc prepend a single underscore
+to external references, e.g. NAME becomes _NAME, while fort does not modify the
+references. So ... either fort has prepend an underscore to external
+references, or vcc/gcc/cc have to generate unmodified names. man 1 fort
+mentions JBL, is JBL the only way?
+
+o VAX VMS C
+ The compiler 'easily' exhausts its table space and generates:
+%CC-F-BUGCHECK, Compiler bug check during parser phase .
+ Submit an SPR with a problem description.
+ At line number 777 in DISK:[DIR]FILE.C;1.
+where the line given, '777', includes a call across C and FORTRAN via
+cfortran.h, usually with >7 arguments and/or very long argument expressions.
+This SPR can be staved off, with the simple modification to cfortran.h, such
+that the relevant CCALLSFSUBn (or CCALLSFFUNn or FCALLSCFUNn) is not
+cascaded up to CCALLSFSUB14, and instead has its own copy of the contents of
+CCALLSFSUB14. [If these instructions are not obvious after examining cfortran.h
+please contact the author.]
+[Thanks go to Mark Kyprianou (kyp@stsci.edu) for this solution.]
+
+o Mips compilers
+ e.g. DECstations and SGI, require applications with a C main() and calls to
+GETARG(3F), i.e. FORTRAN routines returning the command line arguments, to use
+two macros as shown:
+ :
+CF_DECLARE_GETARG; /* This must be external to all routines. */
+ :
+main(int argc, char *argv[])
+{
+ :
+CF_SET_GETARG(argc,argv); /* This must precede any calls to GETARG(3F). */
+ :
+}
+The macros are null and benign on all other systems. Sun's GETARG(3F) also
+doesn't work with a generic C main() and perhaps a workaround similar to the
+Mips' one exists.
+
+o Alpha/OSF
+Using the DEC Fortran and the DEC C compilers of DEC OSF/1 [RT] V1.2 (Rev. 10),
+Fortran, when called from C, has occasional trouble using a routine received as
+a dummy argument.
+
+e.g. In the following the Fortran routine 'e' will crash when it tries to use
+ the C routine 'c' or the Fortran routine 'f'.
+ The example works on other systems.
+
+C FORTRAN /* C */
+ integer function f() #include <stdio.h>
+ f = 2 int f_();
+ return int e_(int (*u)());
+ end
+ int c(){ return 1;}
+ integer function e(u) int d (int (*u)()) { return u();}
+ integer u
+ external u main()
+ e=u() { /* Calls to d work. */
+ return printf("d (c ) returns %d.\n",d (c ));
+ end printf("d (f_) returns %d.\n",d (f_));
+ /* Calls to e_ crash. */
+ printf("e_(c ) returns %d.\n",e_(c ));
+ printf("e_(f_) returns %d.\n",e_(f_));
+ }
+
+Solutions to the problem are welcomed!
+A kludge which allows the above example to work correctly, requires an extra
+argument to be given when calling the dummy argument function.
+i.e. Replacing 'e=u()' by 'e=u(1)' allows the above example to work.
+
+
+o The FORTRAN routines are called using macro expansions, therefore the usual
+caveats for expressions in arguments apply. The expressions to the routines may
+be evaluated more than once, leading to lower performance and in the worst case
+bizarre bugs.
+
+o For those who wish to use cfortran.h in large applications. [See Section IV.]
+This release is intended to make it easy to get applications up and running.
+This implies that applications are not as efficient as they could be:
+- The current mechanism is inefficient if a single header file is used to
+ describe a large library of FORTRAN functions. Code for a static wrapper fn.
+ is generated in each piece of C source code for each FORTRAN function
+ specified with the CCALLSFFUNn statement, irrespective of whether or not the
+ function is ever called.
+- Code for several static utility routines internal to cfortran.h is placed
+ into any source code which #includes cfortran.h. These routines should
+ probably be in a library.
+
+
+i) Calling FORTRAN routines from C:
+ --------------------------------
+
+The FORTRAN routines are defined by one of the following two instructions:
+
+for a SUBROUTINE:
+/* PROTOCCALLSFSUBn is optional for C, but mandatory for C++. */
+PROTOCCALLSFSUBn(ROUTINE_NAME,routine_name,argtype_1,...,argtype_n)
+#define Routine_name(argname_1,..,argname_n) \
+CCALLSFSUBn(ROUTINE_NAME,routine_name,argtype_1,...,argtype_n, \
+ argname_1,..,argname_n)
+
+for a FUNCTION:
+PROTOCCALLSFFUNn(routine_type,ROUTINE_NAME,routine_name,argtype_1,...,argtype_n)
+#define Routine_name(argname_1,..,argname_n) \
+CCALLSFFUNn(ROUTINE_NAME,routine_name,argtype_1,...,argtype_n, \
+ argname_1,..,argname_n)
+
+Where:
+'n' = 0->14 [SUBROUTINE's ->27] (easily expanded in cfortran.h to > 14 [27]) is
+ the number of arguments to the routine.
+Routine_name = C name of the routine (IN UPPER CASE LETTERS).[see 2.below]
+ROUTINE_NAME = FORTRAN name of the routine (IN UPPER CASE LETTERS).
+routine_name = FORTRAN name of the routine (IN lower case LETTERS).
+routine_type = the type of argument returned by FORTRAN functions.
+ = BYTE, DOUBLE, FLOAT, INT, LOGICAL, LONG, SHORT, STRING, VOID.
+ [Instead of VOID one would usually use CCALLSFSUBn.
+ VOID forces a wrapper function to be used.]
+argtype_i = the type of argument passed to the FORTRAN routine and must be
+ consistent in the definition and prototyping of the routine s.a.
+ = BYTE, DOUBLE, FLOAT, INT, LOGICAL, LONG, SHORT, STRING.
+ For vectors, i.e. 1 dim. arrays use
+ = BYTEV, DOUBLEV, FLOATV, INTV, LOGICALV, LONGV, SHORTV,
+ STRINGV, ZTRINGV.
+ For vectors of vectors, i.e. 2 dim. arrays use
+ = BYTEVV, DOUBLEVV, FLOATVV, INTVV, LOGICALVV, LONGVV, SHORTVV.
+ For n-dim. arrays, 1<=n<=7 [7 is the maximum in Fortran 77],
+ = BYTEV..nV's..V, DOUBLEV..V, FLOATV..V, INTV..V, LOGICALV..V,
+ LONGV..V, SHORTV..V.
+ N.B. Array dimensions and types are checked by the C compiler.
+ For routines changing the values of an argument, the keyword is
+ prepended by a 'P'.
+ = PBYTE, PDOUBLE, PFLOAT, PINT, PLOGICAL, PLONG, PSHORT,
+ PSTRING, PSTRINGV, PZTRINGV.
+ For EXTERNAL procedures passed as arguments use
+ = ROUTINE.
+ For exceptional arguments which require no massaging to fit the
+ argument passing mechanisms use
+ = PVOID.
+ The argument is cast and passed as (void *).
+ Although PVOID could be used to describe all array arguments on
+ most (all?) machines , it shouldn't be because the C compiler
+ can no longer check the type and dimension of the array.
+argname_i = any valid unique C tag, but must be consistent in the definition
+ as shown.
+
+Notes:
+
+1. cfortran.h may be expanded to handle a more argument type. To suppport new
+arguments requiring complicated massaging when passed between Fortran and C,
+the user will have to understand cfortran.h and follow its code and mechanisms.
+
+To define types requiring little or no massaging when passed between Fortran
+and C, the pseudo argument type SIMPLE may be used.
+For a user defined type called 'newtype', the definitions required are:
+
+/* The following 7 lines are required verbatim.
+ 'newtype' is the name of the new user defined argument type.
+*/
+#define newtype_cfV( T,A,B,F) SIMPLE_cfV(T,A,B,F)
+#define newtype_cfSEP(T, B) SIMPLE_cfSEP(T,B)
+#define newtype_cfINT(N,A,B,X,Y,Z) SIMPLE_cfINT(N,A,B,X,Y,Z)
+#define newtype_cfSTR(N,T,A,B,C,D,E) SIMPLE_cfSTR(N,T,A,B,C,D,E)
+#define newtype_cfCC( T,A,B) SIMPLE_cfCC(T,A,B)
+#define newtype_cfAA( T,A,B) newtype_cfB(T,A) /* Argument B not used. */
+#define newtype_cfU( T,A) newtype_cfN(T,A)
+
+/* 'parameter_type(A)' is a declaration for 'A' and describes the type of the
+parameter expected by the Fortran function. This type will be used in the
+prototype for the function, if using ANSI C, and to declare the argument used
+by the intermediate function if calling a Fortran FUNCTION.
+Valid 'parameter_type(A)' include: int A
+ void (*A)()
+ double A[17]
+*/
+#define newtype_cfN( T,A) parameter_type(A) /* Argument T not used. */
+
+/* Before any argument of the new type is passed to the Fortran routine, it may
+be massaged as given by 'massage(A)'.
+*/
+#define newtype_cfB( T,A) massage(A) /* Argument T not used. */
+
+An example of a simple user defined type is given cfortex.f and cfortest.c.
+Two uses of SIMPLE user defined types are [don't show the 7 verbatim #defines]:
+
+/* Pass the address of a structure, using a type called PSTRUCT */
+#define PSTRUCT_cfN( T,A) void *A
+#define PSTRUCT_cfB( T,A) (void *) &(A)
+
+/* Pass an integer by value, (not standard F77 ), using a type called INTVAL */
+#define INTVAL_cfN( T,A) int A
+#define INTVAL_cfB( T,A) (A)
+
+[If using VAX VMS, surrounding the #defines with "#pragma (no)standard" allows
+ the %CC-I-PARAMNOTUSED messages to be avoided.]
+
+Upgrades to cfortran.h try to be, and have been, backwards compatible. This
+compatibility cannot be offered to user defined types. SIMPLE user defined
+types are less of a risk since they require so little effort in their creation.
+If a user defined type is required in more than one C header file of interfaces
+to libraries of Fortran routines, good programming practice, and ease of code
+maintenance, suggests keeping any user defined type within a single file which
+is #included as required. To date, changes to the SIMPLE macros were introduced
+in versions 2.6, 3.0 and 3.2 of cfortran.h.
+
+
+2. Routine_name is the name of the macro which the C programmer will use in
+order to call a FORTRAN routine. In theory Routine_name could be any valid and
+unique name, but in practice, the name of the FORTRAN routine in UPPER CASE
+works everywhere and would seem to be an obvious choice.
+
+
+3. <BYTE|DOUBLE|BYTE|DOUBLE|FLOAT|INT|LOGICAL|LONG|SHORT><V|VV|VVV|...>
+
+cfortran.h encourages the exact specification of the type and dimension of
+array parameters because it allows the C compiler to detect errors in the
+arguments when calling the routine.
+
+cfortran.h does not strictly require the exact specification since the argument
+is merely the address of the array and is passed on to the calling routine.
+Any array parameter could be declared as PVOID, but this circumvents
+C's compiletime ability to check the correctness of arguments and is therefore
+discouraged.
+
+Passing the address of these arguments implies that PBYTEV, PFLOATV, ... ,
+PDOUBLEVV, ... don't exist in cfortran.h, since by default the routine and the
+calling code share the same array, i.e. the same values at the same memory
+location.
+
+These comments do NOT apply to arrays of (P)S/ZTRINGV. For these parameters,
+cfortran.h passes a massaged copy of the array to the routine. When the routine
+returns, S/ZTRINGV ignores the copy, while PS/ZTRINGV replaces the calling
+code's original array with copy, which may have been modified by the called
+routine.
+
+
+4. (P)STRING(V):
+- STRING - If the argument is a fixed length character array, e.g. char ar[8];,
+the string is blank, ' ', padded on the right to fill out the array before
+being passed to the FORTRAN routine. The useful size of the string is the same
+in both languages, e.g. ar[8] is passed as character*7. If the argument is a
+pointer, the string cannot be blank padded, so the length is passed as
+strlen(argument). On return from the FORTRAN routine, pointer arguments are not
+disturbed, but arrays have the terminating '\0' replaced to its original
+position. i.e. The padding blanks are never visible to the C code.
+
+- PSTRING - The argument is massaged as with STRING before being passed to the
+FORTRAN routine. On return, the argument has all trailing blanks removed,
+regardless of whether the argument was a pointer or an array.
+
+- (P)STRINGV - Passes a 1- or 2-dimensional char array. e.g. char a[7],b[6][8];
+STRINGV may thus also pass a string constant, e.g. "hiho".
+(P)STRINGV does NOT pass a pointer, e.g. char *, to either a 1- or a
+2-dimensional array, since it cannot determine the array dimensions.
+A pointer can only be passed using (P)ZTRINGV.
+N.B. If a C routine receives a character array argument, e.g. char a[2][3],
+ such an argument is actually a pointer and my thus not be passed by
+ (P)STRINGV. Instead (P)ZTRINGV must be used.
+
+- STRINGV - The elements of the argument are copied into space malloc'd, and
+each element is padded with blanks. The useful size of each element is the same
+in both languages. Therefore char bb[6][8]; is equivalent to character*7 bb(6).
+On return from the routine the malloc'd space is simply released.
+
+- PSTRINGV - Since FORTRAN has no trailing '\0', elements in an array of
+strings are contiguous. Therefore each element of the C array is padded with
+blanks and strip out C's trailing '\0'. After returning from the routine, the
+trailing '\0' is reinserted and kill the trailing blanks in each element.
+
+- SUMMARY: STRING(V) arguments are blank padded during the call to the FORTRAN
+routine, but remain original in the C code. (P)STRINGV arguments are blank
+padded for the FORTRAN call, and after returning from FORTRAN trailing blanks
+are stripped off.
+
+
+5. (P)ZTRINGV:
+- (P)ZTRINGV - is identical to (P)STRINGV,
+except that the dimensions of the array of strings is explicitly specified,
+which thus also allows a pointer to be passed.
+(P)ZTRINGV can thus pass a 1- or 2-dimensional char array, e.g. char b[6][8],
+or it can pass a pointer to such an array, e.g. char *p;.
+ZTRINGV may thus also pass a string constant, e.g. "hiho".
+If passing a 1-dimensional array, routine_name_ELEMS_j (see below) must be 1.
+[Users of (P)ZTRINGV should examine cfortest.c for examples.]:
+
+- (P)ZTRINGV must thus be used instead of (P)STRINGV whenever sizeof()
+can't be used to determine the dimensions of the array of string or strings.
+e.g. when calling FORTRAN from C with a char * received by C as an argument.
+
+- There is no (P)ZTRING type, since (P)ZTRINGV can pass a 1-dimensional
+array or a pointer to such an array, e.g. char a[7], *b;
+If passing a 1-dimensional array, routine_name_ELEMS_j (see below) must be 1.
+
+- To specify the numbers of elements,
+routine_name_ELEMS_j and routine_name_ELEMLEN_j must be defined as shown below
+before interfacing the routine with CCALLSFSUBn, PROTOCCALLSFFUNn, etc.
+
+#define routine_name_ELEMS_j ZTRINGV_ARGS(k)
+ [..ARGS for subroutines, ..ARGF for functions.]
+or
+#define routine_name_ELEMS_j ZTRINGV_NUM(l)
+Where: routine_name is as above.
+ j [1-n], is the argument being specifying.
+ k [1-n], the value of the k'th argument is the dynamic number
+ of elements for argument j. The k'th argument must be
+ of type BYTE, DOUBLE, FLOAT, INT, LONG or SHORT.
+ l the number of elements for argument j. This must be an
+ integer constant available at compile time.
+ i.e. it is static.
+
+- Similarly to specify the useful length, [i.e. don't count C's trailing '\0',]
+of each element:
+#define routine_name_ELEMLEN_j ZTRINGV_ARGS(m)
+ [..ARGS for subroutines, ..ARGF for functions.]
+or
+#define routine_name_ELEMLEN_j ZTRINGV_NUM(q)
+Where: m [1-n], as for k but this is the length of each element.
+ q as for l but this is the length of each element.
+
+
+6. ROUTINE
+The argument is an EXTERNAL procedure.
+
+When C passes a routine to Fortran, the language of the function must be
+specified as follows: [The case of some_*_function must be given as shown.]
+
+When C passes a C routine to a Fortran:
+ FORTRAN_ROUTINE(arg1, .... ,
+ C_FUNCTION(SOME_C_FUNCTION,some_c_function),
+ ...., argn);
+
+and similarly when C passes a Fortran routine to Fortran:
+ FORTRAN_ROUTINE(arg1, .... ,
+ FORTRAN_FUNCTION(SOME_FORT_FUNCTION,some_fort_function),
+ ...., argn);
+
+If fcallsc has been redefined; the same definition of fcallsc used when creating
+the wrapper for 'some_c_function' must also be defined when C_FUNCTION is used.
+See ii) 4. of this section for when and how to redefine fcallsc.
+
+ROUTINE was introduced with cfortran.h version 2.6. Earlier versions of
+cfortran.h used PVOID to pass external procedures as arguments. Using PVOID for
+this purpose is no longer recommended since it won't work 'as is' for
+apolloFortran, hpuxFortran800, AbsoftUNIXFortran, AbsoftProFortran.
+
+7. CRAY only:
+In a given piece of source code, where FFUNC is any FORTRAN routine,
+FORTRAN_FUNCTION(FFUNC,ffunc)
+disallows a previous
+#define FFUNC(..) CCALLSFSUBn(FFUNC,ffunc,...) [ or CCALLSFFUNn]
+in order to make the UPPER CASE FFUNC callable from C.
+#define Ffunc(..) ... is OK though, as are obviously any other names.
+
+
+ii) Calling C routines from FORTRAN:
+ --------------------------------
+
+Each of the following two statements to export a C routine to FORTRAN create
+FORTRAN 'wrappers', written in C, which must be compiled and linked along with
+the original C routines and with the FORTRAN calling code.
+
+FORTRAN callable 'wrappers' may also be created for C macros. i.e. in this
+section, the term 'C function' may be replaced by 'C macro'.
+
+for C functions returning void:
+FCALLSCSUBn( Routine_name,ROUTINE_NAME,routine_name,argtype_1,...,argtype_n)
+
+for all other C functions:
+FCALLSCFUNn(routine_type,Routine_name,ROUTINE_NAME,routine_name,argtype_1,...,argtype_n)
+
+Where:
+'n' = 0->27 (easily expanded to > 27) stands for the number of arguments to the
+ routine.
+Routine_name = the C name of the routine. [see 9. below]
+ROUTINE_NAME = the FORTRAN name of the routine (IN UPPER CASE LETTERS).
+routine_name = the FORTRAN name of the routine (IN lower case LETTERS).
+routine_type = the type of argument returned by C functions.
+ = BYTE, DOUBLE, FLOAT, INT, LOGICAL, LONG, SHORT, STRING, VOID.
+ [Instead of VOID, FCALLSCSUBn is recommended.]
+argtype_i = the type of argument passed to the FORTRAN routine and must be
+ consistent in the definition and prototyping of the routine
+ = BYTE, DOUBLE, FLOAT, INT, LOGICAL, LONG, SHORT, STRING.
+ For vectors, i.e. 1 dim. arrays use
+ = BYTEV, DOUBLEV, FLOATV, INTV, LOGICALV, LONGV, SHORTV, STRINGV.
+ For vectors of vectors, 2 dim. arrays use
+ = BYTEVV, DOUBLEVV, FLOATVV, INTVV, LOGICALVV, LONGVV, SHORTVV.
+ For n-dim. arrays use
+ = BYTEV..nV's..V, DOUBLEV..V, FLOATV..V, INTV..V, LOGICALV..V,
+ LONGV..V, SHORTV..V.
+ For routines changing the values of an argument, the keyword is
+ prepended by a 'P'.
+ = PBYTE, PDOUBLE, PFLOAT, PINT, PLOGICAL, PLONG, PSHORT,
+ PSTRING, PNSTRING, PPSTRING, PSTRINGV.
+ For EXTERNAL procedures passed as arguments use
+ = ROUTINE.
+ For exceptional arguments which require no massaging to fit the
+ argument passing mechanisms use
+ = PVOID.
+ The argument is cast and passed as (void *).
+
+
+Notes:
+
+0. For Fortran calling C++ routines, C++ does NOT easily allow support for:
+ STRINGV.
+ BYTEVV, DOUBLEVV, FLOATVV, INTVV, LOGICALVV, LONGVV, SHORTVV.
+ BYTEV..V, DOUBLEV..V, FLOATV..V, INTV..V, LOGICALV..V, LONGV..V, SHORTV..V.
+Though there are ways to get around this restriction,
+the restriction is not serious since these types are unlikely to be used as
+arguments for a C++ routine.
+
+1. FCALLSCSUB/FUNn expect that the routine to be 'wrapped' has been properly
+prototyped, or at least declared.
+
+
+2. cfortran.h may be expanded to handle a new argument type not already among
+the above.
+
+
+3. <BYTE|DOUBLE|BYTE|DOUBLE|FLOAT|INT|LOGICAL|LONG|SHORT><V|VV|VVV|...>
+
+cfortran.h encourages the exact specification of the type and dimension of
+array parameters because it allows the C compiler to detect errors in the
+arguments when declaring the routine using FCALLSCSUB/FUNn, assuming the
+routine to be 'wrapped' has been properly prototyped.
+
+cfortran.h does not strictly require the exact specification since the argument
+is merely the address of the array and is passed on to the calling routine.
+Any array parameter could be declared as PVOID, but this circumvents
+C's compiletime ability to check the correctness of arguments and is therefore
+discouraged.
+
+Passing the address of these arguments implies that PBYTEV, PFLOATV, ... ,
+PDOUBLEVV, ... don't exist in cfortran.h, since by default the routine and the
+calling code share the same array, i.e. the same values at the same memory
+location.
+
+These comments do NOT apply to arrays of (P)STRINGV. For these parameters,
+cfortran.h passes a massaged copy of the array to the routine. When the routine
+returns, STRINGV ignores the copy, while PSTRINGV replaces the calling
+code's original array with copy, which may have been modified by the called
+routine.
+
+
+4. (P(N))STRING arguments have any trailing blanks removed before being passed
+to C, the same holds true for each element in (P)STRINGV. Space is malloc'd in
+all cases big enough to hold the original string (elements) as well as C's
+terminating '\0'. i.e. The useful size of the string (elements) is the same in
+both languages. P(N)STRING(V) => the string (elements) will be copied from the
+malloc'd space back into the FORTRAN bytes. If one of the two escape mechanisms
+mentioned below for PNSTRING has been used, the copying back to FORTRAN is
+obviously not relevant.
+
+
+5. (PN)STRING's, [NOT PSTRING's nor (P)STRINGV's,] behavior may be overridden
+in two cases. In both cases PNSTRING and STRING behave identically.
+
+a) If a (PN)STRING argument's first 4 bytes are all the NUL character,
+i.e. '\0\0\0\0' the NULL pointer is passed to the C routine.
+
+b) If the characters of a (PN)STRING argument contain at least one HEX-00, i.e.
+the NUL character, i.e. C strings' terminating '\0', the address of the string
+is simply passed to the C routine. i.e. The argument is treated in this case as
+it would be with PPSTRING, to which we refer the reader for more detail.
+
+Mechanism a) overrides b). Therefore, to use this mechanism to pass the NULL
+string, "", to C, the first character of the string must obviously be the NUL
+character, but of the first 4 characters in the string, at least one must not
+be HEX-00.
+
+Example:
+C FORTRAN /* C */
+ character*40 str #include "cfortran.h"
+C Set up a NULL as : void cs(char *s) {if (s) printf("%s.\n",s);}
+C i) 4 NUL characters. FCALLSCSUB1(cs,CS,cs,STRING)
+C ii) NULL pointer.
+ character*4 NULL
+ NULL = CHAR(0)//CHAR(0)//CHAR(0)//CHAR(0)
+
+ data str/'just some string'/
+
+C Passing the NULL pointer to cs.
+ call cs(NULL)
+C Passing a copy of 'str' to cs.
+ call cs(str)
+C Passing address of 'str' to cs. Trailing blanks NOT killed.
+ str(40:) = NULL
+ call cs(str)
+ end
+
+Strings passed from Fortran to C via (PN)STRING must not have undefined
+contents, otherwise undefined behavior will result, since one of the above two
+escape mechanisms may occur depending on the contents of the string.
+
+This is not be a problem for STRING arguments, which are read-only in the C
+routine and hence must have a well defined value when being passed in.
+
+PNSTRING arguments require special care. Even if they are write-only in the C
+routine, PNSTRING's above two escape mechanisms require that the value of the
+argument be well defined when being passed in from Fortran to C. Therefore,
+unless one or both of PNSTRING's escape mechanisms are required, PSTRING should
+be used instead of PNSTRING.
+Prior to version 2.8, PSTRING did have the above two escape mechanisms,
+but they were removed from PSTRING to allow strings with undefined contents to
+be passed in. PNSTRING behaves like the old PSTRING.
+[Thanks go to Paul Dubois (dubios@icf.llnl.gov) for pointing out that PSTRING
+ must allow for strings with undefined contents to be passed in.]
+
+Example:
+C FORTRAN /* C */
+ character*10 s,sn #include "cfortran.h"
+ void ps(char *s) {strcpy(s,"hello");}
+C Can call ps with undef. s. FCALLSCSUB1(ps,PS,ps,PSTRING)
+ call ps(s) FCALLSCSUB1(ps,PNS,pns,PNSTRING)
+ print *,s,'=s'
+
+C Can't call pns with undef. s.
+C e.g. If first 4 bytes of s were
+C "\0\0\0\0", ps would try
+C to copy to NULL because
+C of PNSTRING mechanism.
+ sn = ""
+ call pns(sn)
+ print *,sn,'=sn'
+
+ end
+
+
+6. PPSTRING
+The address of the string argument is simply passed to the C routine. Therefore
+the C routine and the FORTRAN calling code share the same string at the same
+memory location. If the C routine modifies the string, the string will also be
+modified for the FORTRAN calling code.
+The user is responsible for negociating the differences in representation of a
+string in Fortran and in C, i.e. the differences are not automatically resolved
+as they are for (P(N)STRING(V).
+This mechanism is provided for two reasons:
+ - Some C routines require the string to exist at the given memory location,
+ after the C routine has exited. Recall that for the usual (P(N)STRING(V)
+ mechanism, a copy of the FORTRAN string is given to the C routine, and this
+ copy ceases to exist after returning to the FORTRAN calling code.
+ - This mechanism can save runtime CPU cycles over (P(N)STRING(V), since it
+ does not perform their malloc, copy and kill trailing blanks of the string
+ to be passed.
+ Only in a small minority of cases does the potential benefit of the saved
+ CPU cycles outweigh the programming effort required to manually resolve
+ the differences in representation of a string in Fortran and in C.
+
+For arguments passed via PPSTRING, the argument passed may also be an array of
+strings.
+
+
+7. ROUTINE
+ANSI C requires that the type of the value returned by the routine be known,
+For all ROUTINE arguments passed from Fortran to C, the type of ROUTINE is
+specified by defining a cast as follows:
+
+#undef ROUTINE_j
+#define ROUTINE_j (cast)
+where:
+ j [1-n], is the argument being specifying.
+ (cast) is a cast matching that of the argument expected by the C
+ function protoytpe for which a wrapper is being defined.
+
+e.g. To create a Fortran wrapper for qsort(3C):
+#undef ROUTINE_4
+#define ROUTINE_4 (int (*)(void *,void *))
+FCALLSCSUB4(qsort,FQSORT,fqsort,PVOID,INT,INT,ROUTINE)
+
+In order to maintain backward compatibility, cfortran.h defines a generic cast
+for ROUTINE_1, ROUTINE_2, ..., ROUTINE_27. The user's definition is therefore
+strictly required only for DEC C, which at the moment is the only compiler
+which insists on the correct cast for pointers to functions.
+
+When using the ROUTINE argument inside some Fortran code:
+- it is difficult to pass a C routine as the parameter,
+ since in many Fortran implementations,
+ Fortran has no access to the normal C namespace.
+ e.g. For most UNIX,
+ Fortran implicitly only has access to C routines ending in _.
+ If the calling Fortran code receives the routine as a parameter
+ it can of course easily pass it along.
+- if a Fortran routine is passed directly as the parameter,
+ the called C routine must call the parameter routine
+ using the Fortran argument passing conventions.
+- if a Fortran routine is to be passed as the parameter,
+ but if Fortran can be made to pass a C routine as the parameter,
+ then it may be best to pass a C-callable wrapper for the Fortran routine.
+ The called C routine is thus spared all Fortran argument passing conventions.
+ cfortran.h can be used to create such a C-callable wrapper
+ to the parameter Fortran routine.
+
+ONLY PowerStationFortran:
+This Fortran provides no easy way to pass a Fortran routine as an argument to a
+C routine. The problem arises because in Fortran the stack is cleared by the
+called routine, while in C/C++ it is cleared by the caller.
+The C/C++ stack clearing behavior can be changed to that of Fortran by using
+stdcall__ in the function prototype. The stdcall__ cannot be applied in this
+case since the called C routine expects the ROUTINE parameter to be a C routine
+and does not know that it should apply stdcall__.
+In principle the cfortran.h generated Fortran callable wrapper for the called C
+routine should be able to massage the ROUTINE argument such that stdcall__ is
+performed, but it is not yet known how this could be easily done.
+
+
+8. THE FOLLOWING INSTRUCTIONS ARE NOT REQUIRED FOR VAX VMS
+ ------------
+(P)STRINGV information [NOT required for VAX VMS]: cfortran.h cannot convert
+the FORTRAN vector of STRINGS to the required C vector of STRINGS without
+explicitly knowing the number of elements in the vector. The application must
+do one of the following for each (P)STRINGV argument in a routine before that
+routine's FCALLSCFUNn/SUBn is called:
+
+#define routine_name_STRV_Ai NUM_ELEMS(j)
+ or
+#define routine_name_STRV_Ai NUM_ELEM_ARG(k)
+ or
+#define routine_name_STRV_Ai TERM_CHARS(l,m)
+
+where: routine_name is as above.
+ i [i=1->n.] specifies the argument number of a STRING VECTOR.
+ j would specify a fixed number of elements.
+ k [k=1->n. k!=i] would specify an integer argument which specifies the
+ number of elements.
+ l [char] the terminating character at the beginning of an
+ element, indicating to cfortran.h that the preceding
+ elements in the vector are the valid ones.
+ m [m=1-...] the number of terminating characters required to appear
+ at the beginning of the terminating string element.
+ The terminating element is NOT passed on to
+ the C routine.
+
+e.g. #define ce_STRV_A1 TERM_CHARS(' ',2)
+ FCALLSCSUB1(ce,CE,ce,STRINGV)
+
+cfortran.h will pass on all elements, in the 1st and only argument to the C
+routine ce, of the STRING VECTOR until, but not including, the first string
+element beginning with 2 blank, ' ', characters.
+
+
+9. INSTRUCTIONS REQUIRED ONLY FOR FORTRAN COMPILERS WHICH GENERATE
+ -------------
+ ROUTINE NAMES WHICH ARE UNDISTINGUISHABLE FROM C ROUTINE NAMES
+ i.e. VAX VMS
+ AbsoftUNIXFortran (AbsoftProFortran ok, since it uses Uppercase names.)
+ HP9000 if not using the +ppu option of f77
+ IBM RS/6000 if not using the -qextname option of xlf
+ Call them the same_namespace compilers.
+
+FCALLSCSUBn(...) and FCALLSCFUNn(...), when compiled, are expanded into
+'wrapper' functions, so called because they wrap around the original C
+functions and interface the format of the original C functions' arguments and
+return values with the format of the FORTRAN call.
+
+Ideally one wants to be able to call the C routine from FORTRAN using the same
+name as the original C name. This is not a problem for FORTRAN compilers which
+append an underscore, '_', to the names of routines, since the original C
+routine has the name 'name', and the FORTRAN wrapper is called 'name_'.
+Similarly, if the FORTRAN compiler generates upper case names for routines, the
+original C routine 'name' can have a wrapper called 'NAME', [Assuming the C
+routine name is not in upper case.] For these compilers, e.g. Mips, CRAY, IBM
+RS/6000 'xlf -qextname', HP-UX 'f77 +ppu', the naming of the wrappers is done
+automatically.
+
+For same_namespace compilers things are not as simple, but cfortran.h tries to
+provide tools and guidelines to minimize the costs involved in meeting their
+constraints. The following two options can provide same_namespace compilers
+with distinct names for the wrapper and the original C function.
+
+These compilers are flagged by cfortran.h with the CF_SAME_NAMESPACE constant,
+so that the change in the C name occurs only when required.
+
+For the remainder of the discussion, routine names generated by FORTRAN
+compilers are referred to in lower case, these names should be read as upper
+case for the appropriate compilers.
+
+
+HP9000: (When f77 +ppu is not used.)
+f77 has a -U option which forces uppercase external names to be generated.
+Unfortunately, cc does not handle recursive macros. Hence, if one wished to use
+-U for separate C and FORTRAN namespaces, one would have to adopt a different
+convention of naming the macros which allow C to call FORTRAN subroutines.
+(Functions are not a problem.) The macros are currently the uppercase of the
+original FORTRAN name, and would have to be changed to lower case or mixed
+case, or to a different name. (Lower case would of course cause conflicts on
+many other machines.) Therefore, it is suggested that f77 -U not be used, and
+instead that Option a) or Option b) outlined below be used.
+
+
+VAX/VMS:
+For the name used by FORTRAN in calling a C routine to be the same as that of
+the C routine, the source code of the C routine is required. A preprocessor
+directive can then force the C compiler to generate a different name for the C
+routine.
+e.g. #if defined(vms)
+ #define name name_
+ #endif
+ void name() {printf("name: was called.\n");}
+ FCALLSCSUB0(name,NAME,name)
+
+In the above, the C compiler generates the original routine with the name
+'name_' and a wrapper called 'NAME'. This assumes that the name of the routine,
+as seen by the C programmer, is not in upper case. The VAX VMS linker is not
+case sensitive, allowing cfortran.h to export the upper case name as the
+wrapper, which then doesn't conflict with the routine name in C. Since the IBM,
+HP and AbsoftUNIXFortran platforms have case sensitive linkers
+this technique is not available to them.
+
+The above technique is required even if the C name is in mixed case, see
+Option a) for the other compilers, but is obviously not required when
+Option b) is used.
+
+
+Option a) Mixed Case names for the C routines to be called by FORTRAN.
+
+If the original C routines have mixed case names, there are no name space
+conflicts.
+
+Nevertheless for VAX/VMS, the technique outlined above must also used.
+
+
+Option b) Modifying the names of C routines when used by FORTRAN:
+
+The more robust naming mechanism, which guarantees portability to all machines,
+'renames' C routines when called by FORTRAN. Indeed, one must change the names
+on same_namespace compilers when FORTRAN calls C routines for which the source
+is unavailable. [Even when the source is available, renaming may be preferable
+to Option a) for large libraries of C routines.]
+
+Obviously, if done for a single type of machine, it must be done for all
+machines since the names of routines used in FORTRAN code cannot be easily
+redefined for different machines.
+
+The simplest way to achieve this end is to do explicitly give the modified
+FORTRAN name in the FCALLSCSUBn(...) and FCALLSCFUNn(...) declarations. e.g.
+
+FCALLSCSUB0(name,CFNAME,cfname)
+
+This allows FORTRAN to call the C routine 'name' as 'cfname'. Any name can of
+course be used for a given routine when it is called from FORTRAN, although
+this is discouraged due to the confusion it is sure to cause. e.g. Bizarre,
+but valid and allowing C's 'call_back' routine to be called from FORTRAN as
+'abcd':
+
+FCALLSCSUB0(call_back,ABCD,abcd)
+
+
+cfortran.h also provides preprocessor directives for a systematic 'renaming' of
+the C routines when they are called from FORTRAN. This is done by redefining
+the fcallsc macro before the FCALLSCSUB/FUN/n declarations as follows:
+
+#undef fcallsc
+#define fcallsc(UN,LN) preface_fcallsc(CF,cf,UN,LN)
+
+FCALLSCSUB0(hello,HELLO,hello)
+
+Will cause C's routine 'hello' to be known in FORTRAN as 'cfhello'. Similarly
+all subsequent FCALLSCSUB/FUN/n declarations will generate wrappers to allow
+FORTRAN to call C with the C routine's name prefaced by 'cf'. The following has
+the same effect, with subsequent FCALLSCSUB/FUN/n's appending the modifier to
+the original C routines name.
+
+#undef fcallsc
+#define fcallsc(UN,LN) append_fcallsc(Y,y,UN,LN)
+
+FCALLSCSUB0(Xroutine,ROUTINE,routine)
+
+Hence, C's Xroutine is called from FORTRAN as:
+ CALL XROUTINEY()
+
+The original behavior of FCALLSCSUB/FUN/n, where FORTRAN routine names are left
+identical to those of C, is returned using:
+
+#undef fcallsc
+#define fcallsc(UN,LN) orig_fcallsc(UN,LN)
+
+
+In C, when passing a C routine, i.e. its wrapper, as an argument to a FORTRAN
+routine, the FORTRAN name declared is used and the correct fcallsc must be in
+effect. E.g. Passing 'name' and 'routine' of the above examples to the FORTRAN
+routines, FT1 and FT2, respectively:
+
+/* This might not be needed if fcallsc is already orig_fcallsc. */
+#undef fcallsc
+#define fcallsc(UN,LN) orig_fcallsc(UN,LN)
+FT1(C_FUNCTION(CFNAME,cfname));
+
+#undef fcallsc
+#define fcallsc(UN,LN) append_fcallsc(Y,y,UN,LN)
+FT1(C_FUNCTION(XROUTINE,xroutine));
+
+If the names of C routines are modified when used by FORTRAN, fcallsc would
+usually be defined once in a header_file.h for the application. This definition
+would then be used and be valid for the entire application and fcallsc would at
+no point need to be redefined.
+
+
+ONCE AGAIN: THE DEFINITIONS, INSTRUCTIONS, DECLARATIONS AND DIFFICULTIES
+DESCRIBED HERE, NOTE 9. of II ii),
+APPLY ONLY FOR VAX VMS,
+ IBM RS/6000 WITHOUT THE -qextname OPTION FOR xlf, OR
+ HP-UX WITHOUT THE +ppu OPTION FOR f77
+ AbsoftUNIXFortran
+AND APPLY ONLY WHEN CREATING WRAPPERS WHICH ENABLE FORTRAN TO CALL C ROUTINES.
+
+
+
+iii) Using C to manipulate FORTRAN COMMON BLOCKS:
+ -------------------------------------------------------
+
+FORTRAN common blocks are set up with the following three constructs:
+
+1.
+#define Common_block_name COMMON_BLOCK(COMMON_BLOCK_NAME,common_block_name)
+
+Common_block_name is in UPPER CASE.
+COMMON_BLOCK_NAME is in UPPER CASE.
+common_block_name is in lower case.
+[Common_block_name actually follows the same 'rules' as Routine_name in Note 2.
+ of II i).] This construct exists to ensure that C code accessing the common
+block is machine independent.
+
+2.
+COMMON_BLOCK_DEF(TYPEDEF_OF_STRUCT, Common_block_name);
+
+where
+typedef { ... } TYPEDEF_OF_STRUCT;
+declares the structure which maps on to the common block. The #define of
+Common_block_name must come before the use of COMMON_BLOCK_DEF.
+
+3.
+In exactly one of the C source files, storage should be set aside for the
+common block with the definition:
+
+TYPEDEF_OF_STRUCT Common_block_name;
+
+The above definition may have to be omitted on some machines for a common block
+which is initialized by Fortran BLOCK DATA or is declared with a smaller size
+in the C routines than in the Fortran routines.
+
+The rules for common blocks are not well defined when linking/loading a mixture
+of C and Fortran, but the following information may help resolve problems.
+
+From the 2nd or ANSI ed. of K&R C, p.31, last paragraph:
+i)
+ An external variable must be defined, exactly once, outside of any function;
+ this sets aside storage for it.
+ii)
+ The variable must also be declared in each function that wants to access it;
+ ...
+ The declaration ... may be implicit from context.
+
+In Fortran, every routine says 'common /bar/ foo',
+i.e. part ii) of the above, but there's no part i) requirement.
+cc/ld on some machines don't require i) either.
+Therefore, when handling Fortran, and sometimes C,
+the loader/linker must automagically set aside storage for common blocks.
+
+Some loaders, including at least one for the CRAY, turn off the
+'automagically set aside storage' capability for Fortran common blocks,
+if any C object declares that common block.
+Therefore, C code should define, i.e. set aside storage,
+for the the common block as shown above.
+
+e.g.
+C Fortran
+ common /fcb/ v,w,x
+ character *(13) v, w(4), x(3,2)
+
+/* C */
+typedef struct { char v[13],w[4][13],x[2][3][13]; } FCB_DEF;
+#define Fcb COMMON_BLOCK(FCB,fcb)
+COMMON_BLOCK_DEF(FCB_DEF,Fcb);
+FCB_DEF Fcb; /* Definition, which sets aside storage for Fcb, */
+ /* may appear in at most one C source file. */
+
+
+C programs can place a string (or a multidimensional array of strings) into a
+FORTRAN common block using the following call:
+
+C2FCBSTR( CSTR, FSTR,DIMENSIONS);
+
+where:
+
+CSTR is a pointer to the first element of C's copy of the string (array).
+ The C code must use a duplicate of, not the original, common block string,
+ because the FORTRAN common block does not allocate space for C strings'
+ terminating '\0'.
+
+FSTR is a pointer to the first element of the string (array) in the common
+ block.
+
+DIMENSIONS is the number of dimensions of string array.
+ e.g. char a[10] has DIMENSIONS=0.
+ char aa[10][17] has DIMENSIONS=1.
+ etc...
+
+C2FCBSTR will copy the string (array) from CSTR to FSTR, padding with blanks,
+' ', the trailing characters as required. C2FCBSTR uses DIMENSIONS and FSTR to
+determine the lengths of the individual string elements and the total number of
+elements in the string array.
+
+Note that:
+- the number of string elements in CSTR and FSTR are identical.
+- for arrays of strings, the useful lengths of strings in CSTR and FSTR must be
+ the same. i.e. CSTR elements each have 1 extra character to accommodate the
+ terminating '\0'.
+- On most non-ANSI compilers, the DIMENSION argument cannot be prepended by any
+ blanks.
+
+
+FCB2CSTR( FSTR, CSTR,DIMENSIONS)
+
+is the inverse of C2FCBSTR, and shares the same arguments and caveats.
+FCB2CSTR copies each string element of FSTR to CSTR, minus FORTRAN strings'
+trailing blanks.
+
+
+cfortran.h USERS ARE STRONGLY URGED TO EXAMINE THE COMMON BLOCK EXAMPLES IN
+cfortest.c AND cfortex.f. The use of strings in common blocks is
+demonstrated, along with a suggested way for C to imitate FORTRAN EQUIVALENCE'd
+variables.
+
+
+ ===> USERS OF CFORTRAN.H NEED READ NO FURTHER <===
+
+
+III Some Musings
+----------------
+
+cfortran.h is simple enough to be used by the most basic of applications, i.e.
+making a single C/FORTRAN routine available to the FORTRAN/C programmers. Yet
+cfortran.h is powerful enough to easily make entire C/FORTRAN libraries
+available to FORTRAN/C programmers.
+
+
+cfortran.h is the ideal tool for FORTRAN libraries which are being (re)written
+in C, but are to (continue to) support FORTRAN users. It allows the routines to
+be written in 'natural C', without having to consider the FORTRAN argument
+passing mechanisms of any machine. It also allows C code accessing these
+rewritten routines, to use the C entry point. Without cfortran.h, one risks the
+perverse practice of C code calling a C function using FORTRAN argument passing
+mechanisms!
+
+
+Perhaps the philosophy and mechanisms of cfortran.h could be used and extended
+to create other language bridges such as ADAFORTRAN, CPASCAL, COCCAM, etc.
+
+
+The code generation machinery inside cfortran.h, i.e. the global structure is
+quite good, being clean and workable as seen by its ability to meet the needs
+and constraints of many different compilers. Though the individual instructions
+of the A..., C..., T..., R... and K... tables deserve to be cleaned up.
+
+
+
+IV Getting Serious with cfortran.h
+-----------------------------------
+
+cfortran.h is set up to be as simple as possible for the casual user. While
+this ease of use will always be present, 'hooks', i.e. preprocessor directives,
+are required in cfortran.h so that some of the following 'inefficiencies' can
+be eliminated if they cause difficulties:
+
+o cfortran.h contains a few small routines for string manipulation. These
+routines are declared static and are included and compiled in all source code
+which uses cfortran.h. Hooks should be provided in cfortran.h to create an
+object file of these routines, allowing cfortran.h to merely prototypes
+these routines in the application source code. This is the only 'problem' which
+afflicts both halves of cfortran.h. The remaining discussion refers to the C
+calls FORTRAN half only.
+
+o Similar to the above routines, cfortran.h generates code for a 'wrapper'
+routine for each FUNCTION exported from FORTRAN. Again cfortran.h needs
+preprocessor directives to create a single object file of these routines,
+and to merely prototype them in the applications.
+
+o Libraries often contain hundreds of routines. While the preprocessor makes
+quick work of generating the required interface code from cfortran.h and the
+application.h's, it may be convenient for very large stable libraries to have
+final_application.h's which already contain the interface code, i.e. these
+final_application.h's would not require cfortran.h. [The convenience can be
+imagined for the VAX VMS CC compiler which has a fixed amount of memory for
+preprocessor directives. Not requiring cfortran.h, with its hundreds of
+directives, could help prevent this compiler from choking on its internal
+limits quite so often.]
+
+With a similar goal in mind, cfortran.h defines 100's of preprocessor
+directives. There is always the potential that these will clash with other tags
+in the users code, so final_applications.h, which don't require cfortran.h,
+also provide the solution.
+
+In the same vein, routines with more than 14 arguments can not be interfaced by
+cfortran.h with compilers which limit C macros to 31 arguments. To resolve this
+difficulty, final_application.h's can be created on a compiler without this
+limitation.
+
+Therefore, new machinery is required to do:
+
+application.h + cfortran.h => final_application.h
+
+The following example may help clarify the means and ends:
+
+If the following definition of the HBOOK1 routine, the /*commented_out_part*/,
+is passed through the preprocessor [perhaps #undefing and #defining preprocessor
+constants if creating an application.h for compiler other than that of the
+preprocessor being used, e.g. cpp -Umips -DCRAY ... ] :
+
+#include "cfortran.h"
+PROTOCCALLSFSUB6(HBOOK1,hbook1,INT,STRING,INT,FLOAT,FLOAT,FLOAT)
+/*#define HBOOK1(ID,CHTITLE,NX,XMI,XMA,VMX) \*/
+ CCALLSFSUB6(HBOOK1,hbook1,INT,STRING,INT,FLOAT,FLOAT,FLOAT, \
+ ID,CHTITLE,NX,XMI,XMA,VMX)
+
+A function prototype is produced by the PROTOCCALLSFSUB6(...).
+Interface code is produced, based on the 'variables',
+ID,CHTITLE,NX,XMI,XMA,VMX, which will correctly massage a HBOOK1 call.
+Therefore, adding the #define line:
+
+'prototype code'
+#define HBOOK1(ID,CHTITLE,NX,XMI,XMA,VMX) \
+ 'interface code'(ID,CHTITLE,NX,XMI,XMA,VMX)
+
+which is placed into final_application.h.
+
+The only known limitation of the above method does not allow the 'variable'
+names to include B1,B2,...,B9,BA,BB,...
+
+Obviously the machinery to automatically generate final_applications.h from
+cfortran.h and applications.h needs more than just some preprocessor
+directives, but a fairly simple unix shell script should be sufficient. Any
+takers?
+
+
+
+V Machine Dependencies of cfortran.h
+------------------------------------
+
+Porting cfortran.h applications, e.g. the hbook.h and cstring.c mentioned
+above, to other machines is trivial since they are machine independent. Porting
+cfortran.h requires a solid knowledge of the new machines C preprocessor, and
+its FORTRAN argument passing mechanisms. Logically cfortran.h exists as two
+halves, a "C CALLS FORTRAN" and a "FORTRAN CALLS C" utility. In some cases it
+may be perfectly reasonable to port only 'one half' of cfortran.h onto a new
+system.
+
+
+The lucky programmer porting cfortran.h to a new machine, must discover the
+FORTRAN argument passing mechanisms. A safe starting point is to assume that
+variables and arrays are simply passed by reference, but nothing is guaranteed.
+Strings, and n-dimensional arrays of strings are a different story. It is
+doubtful that any systems do it quite like VAX VMS does it, so that a UNIX or
+f2c versions may provide an easier starting point.
+
+
+cfortran.h uses and abuses the preprocessor's ## operator. Although the ##
+operator does not exist in many compilers, many kludges do. cfortran.h uses
+/**/ with no space allowed between the slashes, '/', and the macros or tags
+to be concatenated. e.g.
+#define concat(a,b) a/**/b /* works*/
+main()
+{
+ concat(pri,ntf)("hello"); /* e.g. */
+}
+N.B. On some compilers without ##, /**/ may also not work. The author may be
+able to offer alternate kludges.
+
+
+
+VI Bugs in vendors C compilers and other curiosities
+----------------------------------------------------
+
+1. ULTRIX xxxxxx 4.3 1 RISC
+
+Condolences to long suffering ultrix users!
+DEC supplies a working C front end for alpha/OSF, but not for ultrix.
+
+From K&R ANSI C p. 231:
+ ultrix> cat cat.c
+ #define cat(x, y) x ## y
+ #define xcat(x,y) cat(x,y)
+ cat(cat(1,2),3)
+ xcat(xcat(1,2),3)
+ ultrix> cc -E cat.c
+ 123 <---- Should be: cat(1,2)3
+ 123 <---- Correct.
+ ultrix>
+
+The problem for cfortran.h, preventing use of -std and -std1:
+ ultrix> cat c.c
+ #define cat(x, y) x ## y
+ #define xcat(x,y) cat(x,y)
+ #define AB(X) X+X
+ #define C(E,F,G) cat(E,F)(G)
+ #define X(E,F,G) xcat(E,F)(G)
+ C(A,B,2)
+ X(A,B,2)
+ ultrix> cc -std1 -E c.c
+ 2+2
+ AB (2) <---- ?????????????
+ ultrix>
+ ultrix> cc -std0 -E c.c
+ 2+2
+ AB(2) <---- ?????????????
+ ultrix>
+
+Due to further ultrix preprocessor problems,
+for all definitions of definitions with arguments,
+cfortran.h >= 3.0 includes the arguments and recommends the same,
+even though it is not required by ANSI C.
+e.g. Users are advised to do
+ #define fcallsc(UN,LN) orig_fcallsc(UN,LN)
+instead of
+ #define fcallsc orig_fcallsc
+since ultrix fails to properly preprocess the latter example.
+CRAY used to (still does?) occasionally trip up on this problem.
+
+
+2. ConvexOS convex C210 11.0 convex
+
+In a program with a C main, output to LUN=6=* from Fortran goes into
+$pwd/fort.6 instead of stdout. Presumably, a magic incantation can be called
+from the C main in order to properly initialize the Fortran I/O.
+
+
+3. SunOS 5.3 Generic_101318-69 sun4m sparc
+
+The default data and code alignments produced by cc, gcc and f77 are compatible.
+If deviating from the defaults, consistent alignment options must be used
+across all objects compiled by cc and f77. [Does gcc provide such options?]
+
+
+4. SunOS 5.3 Generic_101318-69 sun4m sparc with cc: SC3.0.1 13 Jul 1994
+ or equivalently
+ ULTRIX 4.4 0 RISC using cc -oldc
+ are K&R C preprocessors that suffer from infinite loop macros, e.g.
+
+ zedy03> cat src.c
+ #include "cfortran.h"
+ PROTOCCALLSFFUN1(INT,FREV,frev, INTV)
+ #define FREV(A1) CCALLSFFUN1( FREV,frev, INTV, A1)
+ /* To avoid the problem, deletete these ---^^^^--- spaces. */
+ main() { static int a[] = {1,2}; FREV(a); return EXIT_SUCCESS; }
+
+ zedy03> cc -c -Xs -v -DMAX_PREPRO_ARGS=31 -D__CF__KnR src.c
+ "src.c", line 4: FREV: actuals too long
+ "src.c", line 4: FREV: actuals too long
+ .... 3427 more lines of the same message
+ "src.c", line 4: FREV: actuals too long
+ cc : Fatal error in /usr/ccs/lib/cpp
+ Segmentation fault (core dumped)
+
+
+5. Older sun C compilers
+
+To link to f77 objects, older sun C compilers require the math.h macros:
+
+#define RETURNFLOAT(x) { union {double _d; float _f; } _kluge; \
+ _kluge._f = (x); return _kluge._d; }
+#define ASSIGNFLOAT(x,y) { union {double _d; float _f; } _kluge; \
+ _kluge._d = (y); x = _kluge._f; }
+
+Unfortunately, in at least some copies of the sun math.h, the semi-colon
+for 'float _f;' is left out, leading to compiler warnings.
+
+The solution is to correct math.h, or to change cfortran.h to #define
+RETURNFLOAT(x) and ASSIGNFLOAT(x,y) instead of including math.h.
+
+
+6. gcc version 2.6.3 and probably all other versions as well
+
+Unlike all other C compilers supported by cfortran.h,
+'gcc -traditional' promotes to double all functions returning float
+as demonstrated bu the following example.
+
+/* m.c */
+#include <stdio.h>
+int main() { FLOAT_FUNCTION d(); float f; f = d(); printf("%f\n",f); return 0; }
+
+/* d.c */
+float d() { return -123.124; }
+
+burow[29] gcc -c -traditional d.c
+burow[30] gcc -DFLOAT_FUNCTION=float m.c d.o && a.out
+0.000000
+burow[31] gcc -DFLOAT_FUNCTION=double m.c d.o && a.out
+-123.124001
+burow[32]
+
+Thus, 'gcc -traditional' is not supported by cfortran.h.
+Support would require the same RETURNFLOAT, etc. macro machinery
+present in old sun math.h, before sun gave up the same promotion.
+
+
+7. CRAY
+
+At least some versions of the t3e and t3d C preprocessor are broken
+in the fashion described below.
+At least some versions of the t90 C preprocessor do not have this problem.
+
+On the CRAY, all Fortran names are converted to uppercase.
+Generally the uppercase name is also used for the macro interface
+created by cfortran.h.
+
+For example, in the following interface,
+EASY is both the name of the macro in the original C code
+and EASY is the name of the resulting function to be called.
+
+#define EASY(A,B) CCALLSFSUB2(EASY,easy, PINT, INTV, A, B)
+
+The fact that a macro called EASY() expands to a function called EASY()
+is not a problem for a working C preprocessor.
+From Kernighan and Ritchie, 2nd edition, p.230:
+
+ In both kinds of macro, the replacement token sequence is repeatedly
+ rescanned for more identifiers. However, once a given identifier has been
+ replaced in a given expansion, it is not replaced if it turns up again during
+ rescanning; instead it is left unchanged.
+
+Unfortunately, some CRAY preprocessors are broken and don't obey the above rule.
+A work-around is for the user to NOT use the uppercase name
+of the name of the macro interface provided by cfortran.h. For example:
+
+#define Easy(A,B) CCALLSFSUB2(EASY,easy, PINT, INTV, A, B)
+
+Luckily, the above work-around is not required since the following
+work-around within cfortran.h also circumvents the bug:
+
+ /* (UN), not UN, is required in order to get around CRAY preprocessor bug.*/
+ #define CFC_(UN,LN) (UN) /* Uppercase FORTRAN symbols. */
+
+Aside: The Visual C++ compiler is happy with UN, but barfs on (UN),
+ so either (UN) causes nonstandard C/C++ or Visual C++ is broken.
+
+
+VII History and Acknowledgements
+--------------------------------
+
+1.0 - Supports VAX VMS using C 3.1 and FORTRAN 5.4. Oct. '90.
+1.0 - Supports Silicon Graphics w. Mips Computer 2.0 f77 and cc. Feb. '91.
+ [Port of C calls FORTRAN half only.]
+1.1 - Supports Mips Computer System 2.0 f77 and cc. Mar. '91.
+ [Runs on at least: Silicon Graphics IRIX 3.3.1
+ DECstations with Ultrix V4.1]
+1.2 - Internals made simpler, smaller, faster, stronger. May '91.
+ - Mips version works on IBM RS/6000, this is now called the unix version.
+1.3 - UNIX and VAX VMS versions are merged into a single cfortran.h. July '91.
+ - C can help manipulate (arrays of) strings in FORTRAN common blocks.
+ - Dimensions of string arrays arguments can be explicit.
+ - Supports Apollo DomainOS 10.2 (sys5.3) with f77 10.7 and cc 6.7.
+
+2.0 - Improved code generation machinery creates K&R or ANSI C. Aug. '91.
+ - Supports Sun, CRAY. f2c with vcc on VAX Ultrix.
+ - cfortran.h macros now require routine and COMMON block names in both
+ upper and lower case. No changes required to applications though.
+ - PROTOCCALLSFSUBn is eliminated, with no loss to cfortran.h performance.
+ - Improved tools and guidelines for naming C routines called by FORTRAN.
+2.1 - LOGICAL correctly supported across all machines. Oct. '91.
+ - Improved support for DOUBLE PRECISION on the CRAY.
+ - HP9000 fully supported.
+ - VAX Ultrix cc or gcc with f77 now supported.
+2.2 - SHORT, i.e. INTEGER*2, and BYTE now supported. Dec. '91.
+ - LOGICAL_STRICT introduced. More compact and robust internal tables.
+ - typeV and typeVV for type = BYTE, DOUBLE, FLOAT, INT, LOGICAL, LONG,SHORT.
+ - FORTRAN passing strings and NULL pointer to C routines improved.
+2.3 - Extraneous arguments removed from many internal tables. May '92.
+ - Introduce pseudo argument type SIMPLE for user defined types.
+ - LynxOS using f2c supported. (Tested with LynxOS 2.0 386/AT.)
+2.4 - Separation of internal C and Fortran compilation directives. Oct. '92.
+ - f2c and NAG f90 supported on all machines.
+2.5 - Minor mod.s to source and/or doc for HP9000, f2c, and NAG f90. Nov. '92.
+2.6 - Support external procedures as arguments with type ROUTINE. Dec. '92.
+2.7 - Support Alpha VMS. Support HP9000 f77 +ppu Jan. '93.
+ - Support arrays with up to 7 dimensions.
+ - Minor mod. of Fortran NULL to C via (P)STRING.
+ - Specify the type of ROUTINE passed from Fortran to C [ANSI C requirement.]
+ - Macros never receive a null parameter [RS/6000 requirement.]
+2.8 - PSTRING for Fortran calls C no longer provides escape to pass April'93.
+ NULL pointer nor to pass address of original string.
+ PNSTRING introduced with old PSTRING's behavior.
+ PPSTRING introduced to always pass original address of string.
+ - Support Alpha/OSF.
+ - Document that common blocks used in C should be declared AND defined.
+
+3.0 - Automagic handling of ANSI ## versus K&R /**/ preprocessor op. March'95.
+ - Less chance of name space collisions between cfortran.h and other codes.
+ - SIMPLE macros, supporting user defined types, have changed names.
+3.1 - Internal macro name _INT not used. Conflicted with IRIX 5.3. May '95.
+ - SunOS, all versions, should work out of the box.
+ - ZTRINGV_ARGS|F(k) may no longer point to a PDOUBLE or PFLOAT argument.
+ - ConvexOS 11.0 supported.
+3.2 - __hpux no longer needs to be restricted to MAX_PREPRO_ARGS=31. Oct. '95.
+ - PSTRING bug fixed.
+ - ZTRINGV_ARGS|F(k) may not point to a PBYTE,PINT,PLONG or PSHORT argument.
+ - (P)ZTRINGV machinery improved. Should lead to fewer compiler warnings.
+ (P)ZTRINGV no longer limits recursion or the nesting of routines.
+ - SIMPLE macros, supporting user defined types, have changed slightly.
+3.3 - Supports PowerStation Fortran with Visual C++. Nov. '95.
+ - g77 should work using f2cFortran, though no changes made for it.
+ - (PROTO)CCALLSFFUN10 extended to (PROTO)CCALLSFFUN14.
+ - FCALLSCFUN10 and SUB10 extended to FCALLSCFUN14 and SUB14.
+3.4 - C++ supported, Dec. '95.
+ but it required the reintroduction of PROTOCCALLSFSUBn for users.
+ - HP-UX f77 +800 supported.
+3.5 - Absoft UNIX Fortran supported. Sept.'96.
+3.6 - Minor corrections to cfortran.doc. Oct. '96.
+ - Fixed bug for 15th argument. [Thanks to Tom Epperly at Aspen Tech.]
+ - For AbsoftUNIXFortran, obey default of prepending _C to COMMON BLOCK name.
+ - Fortran calling C with ROUTINE argument fixed and cleaned up.
+3.7 - Circumvent IBM and HP "null argument" preprocessor warning. Oct. '96
+3.8 - (P)STRINGV and (P)ZTRINGV can pass a 1- or 2-dim. char array. Feb. '97
+ (P)ZTRINGV thus effectively also provides (P)ZTRING.
+ - (P)ZTRINGV accepts a (char *) pointer.
+3.9 - Bug fixed for *VVVVV. May '97
+ - f2c: Work-around for strange underscore-dependent naming feature.
+ - NEC SX-4 supported.
+ - CRAY: LOGICAL conversion uses _btol and _ltob from CRAY's fortran.h.
+ - CRAY: Avoid bug of some versions of the C preprocessor.
+ - CRAY T3E: FORTRAN_REAL introduced.
+
+4.0 - new/delete now used for C++. malloc/free still used for C. Jan. '98
+ - FALSE no longer is defined by cfortran.h .
+ - Absoft Pro Fortran for MacOS supported.
+4.1 - COMMA and COLON no longer are defined by cfortran.h . April'98
+ - Bug fixed when 10th arg. or beyond is a string.
+ [Rob Lucchesi of NASA-Goddard pointed out this bug.]
+ - CCALLSFSUB/FUN extended from 14 to 27 arguments.
+ - Workaround SunOS CC 4.2 cast bug. [Thanks to Savrak SAR of CERN.]
+4.2 - Portland Group needs -DpgiFortran . [Thank George Lai of NASA.] June '98
+4.3 - (PROTO)CCALLSFSUB extended from 20 to 27 arguments. July '98
+
+
+['Support' implies these and more recent releases of the respective
+ OS/compilers/linkers can be used with cfortran.h.
+ Earlier releases may also work.]
+
+
+Acknowledgements:
+- CERN very generously sponsored a week in 1994 for me to work on cfortran.h.
+- M.L.Luvisetto (Istituto Nazionale Fisica Nucleare - Centro Nazionale
+ Analisi Fotogrammi, Bologna, Italy) provided all the support for the port to
+ the CRAY. Marisa's encouragement and enthusiasm was also much appreciated.
+- J.Bunn (CERN) supported the port to PowerStation Fortran with Visual C++.
+- Paul Schenk (UC Riverside, CERN PPE/OPAL) in June 1993 extended cfortran.h 2.7
+ to have C++ call Fortran. This was the starting point for full C++ in 3.4.
+- Glenn P.Davis of University Corp. for Atmospheric Research (UCAR) / Unidata
+ supported the NEC SX-4 port and helped understand the CRAY.
+- Tony Goelz of Absoft Corporation ported cfortran.h to Absoft.
+- Though cfortran.h has been created in my 'copious' free time, I thank
+ NSERC for their generous support of my grad. student and postdoc years.
+- Univ.Toronto, DESY, CERN and others have provided time on their computers.
+
+
+THIS PACKAGE, I.E. CFORTRAN.H, THIS DOCUMENT, AND THE CFORTRAN.H EXAMPLE
+PROGRAMS ARE PROPERTY OF THE AUTHOR WHO RESERVES ALL RIGHTS. THIS PACKAGE AND
+THE CODE IT PRODUCES MAY BE FREELY DISTRIBUTED WITHOUT FEES, SUBJECT TO THE
+FOLLOWING RESTRICTIONS:
+- YOU MUST ACCOMPANY ANY COPIES OR DISTRIBUTION WITH THIS (UNALTERED) NOTICE.
+- YOU MAY NOT RECEIVE MONEY FOR THE DISTRIBUTION OR FOR ITS MEDIA
+ (E.G. TAPE, DISK, COMPUTER, PAPER.)
+- YOU MAY NOT PREVENT OTHERS FROM COPYING IT FREELY.
+- YOU MAY NOT DISTRIBUTE MODIFIED VERSIONS WITHOUT CLEARLY DOCUMENTING YOUR
+ CHANGES AND NOTIFYING THE AUTHOR.
+- YOU MAY NOT MISREPRESENTED THE ORIGIN OF THIS SOFTWARE, EITHER BY EXPLICIT
+ CLAIM OR BY OMISSION.
+
+THE INTENT OF THE ABOVE TERMS IS TO ENSURE THAT THE CFORTRAN.H PACKAGE NOT BE
+USED FOR PROFIT MAKING ACTIVITIES UNLESS SOME ROYALTY ARRANGEMENT IS ENTERED
+INTO WITH ITS AUTHOR.
+
+THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
+EXPRESSED OR IMPLIED. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST
+OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. THE AUTHOR IS NOT RESPONSIBLE
+FOR ANY SUPPORT OR SERVICE OF THE CFORTRAN.H PACKAGE.
+
+ Burkhard Burow
+ burow@desy.de
+
+P.S. Your comments and questions are welcomed and usually promptly answered.
+
+VAX VMS and Ultrix, Alpha, OSF, Silicon Graphics (SGI), DECstation, Mips RISC,
+Sun, CRAY, Convex, IBM RS/6000, Apollo DomainOS, HP, LynxOS, f2c, NAG, Absoft,
+NEC SX-4, PowerStation and Visual C++ are registered trademarks of their
+respective owners.
+
+/* end: cfortran.doc */
diff --git a/include/cfortran.h b/include/cfortran.h
new file mode 100644
index 0000000..ed23011
--- /dev/null
+++ b/include/cfortran.h
@@ -0,0 +1,2363 @@
+/* cfortran.h 4.3 */
+/* http://www-zeus.desy.de/~burow/cfortran/ */
+/* Burkhard Burow burow@desy.de 1990 - 2001. */
+
+#ifndef __CFORTRAN_LOADED
+#define __CFORTRAN_LOADED
+
+/*
+ THIS FILE IS PROPERTY OF BURKHARD BUROW. IF YOU ARE USING THIS FILE YOU
+ SHOULD ALSO HAVE ACCESS TO CFORTRAN.DOC WHICH PROVIDES TERMS FOR USING,
+ MODIFYING, COPYING AND DISTRIBUTING THE CFORTRAN.H PACKAGE.
+*/
+
+/*
+ Avoid symbols already used by compilers and system *.h:
+ __ - OSF1 zukal06 V3.0 347 alpha, cc -c -std1 cfortest.c
+
+ */
+
+
+/* First prepare for the C compiler. */
+
+#ifndef ANSI_C_preprocessor /* i.e. user can override. */
+#ifdef __CF__KnR
+#define ANSI_C_preprocessor 0
+#else
+#ifdef __STDC__
+#define ANSI_C_preprocessor 1
+#else
+#define _cfleft 1
+#define _cfright
+#define _cfleft_cfright 0
+#define ANSI_C_preprocessor _cfleft/**/_cfright
+#endif
+#endif
+#endif
+
+#if ANSI_C_preprocessor
+#define _0(A,B) A##B
+#define _(A,B) _0(A,B) /* see cat,xcat of K&R ANSI C p. 231 */
+#define _2(A,B) A##B /* K&R ANSI C p.230: .. identifier is not replaced */
+#define _3(A,B,C) _(A,_(B,C))
+#else /* if it turns up again during rescanning. */
+#define _(A,B) A/**/B
+#define _2(A,B) A/**/B
+#define _3(A,B,C) A/**/B/**/C
+#endif
+
+#if (defined(vax)&&defined(unix)) || (defined(__vax__)&&defined(__unix__))
+#define VAXUltrix
+#endif
+
+#include <stdio.h> /* NULL [in all machines stdio.h] */
+#include <string.h> /* strlen, memset, memcpy, memchr. */
+#if !( defined(VAXUltrix) || defined(sun) || (defined(apollo)&&!defined(__STDCPP__)) )
+#include <stdlib.h> /* malloc,free */
+#else
+#include <malloc.h> /* Had to be removed for DomainOS h105 10.4 sys5.3 425t*/
+#ifdef apollo
+#define __CF__APOLLO67 /* __STDCPP__ is in Apollo 6.8 (i.e. ANSI) and onwards */
+#endif
+#endif
+
+#if !defined(__GNUC__) && !defined(__sun) && (defined(sun)||defined(VAXUltrix)||defined(lynx))
+#define __CF__KnR /* Sun, LynxOS and VAX Ultrix cc only supports K&R. */
+ /* Manually define __CF__KnR for HP if desired/required.*/
+#endif /* i.e. We will generate Kernighan and Ritchie C. */
+/* Note that you may define __CF__KnR before #include cfortran.h, in order to
+generate K&R C instead of the default ANSI C. The differences are mainly in the
+function prototypes and declarations. All machines, except the Apollo, work
+with either style. The Apollo's argument promotion rules require ANSI or use of
+the obsolete std_$call which we have not implemented here. Hence on the Apollo,
+only C calling FORTRAN subroutines will work using K&R style.*/
+
+
+/* Remainder of cfortran.h depends on the Fortran compiler. */
+
+#if defined(CLIPPERFortran) || defined(pgiFortran)
+#define f2cFortran
+#endif
+
+/* VAX/VMS does not let us \-split long #if lines. */
+/* Split #if into 2 because some HP-UX can't handle long #if */
+#if !(defined(NAGf90Fortran)||defined(f2cFortran)||defined(hpuxFortran)||defined(apolloFortran)||defined(sunFortran)||defined(IBMR2Fortran)||defined(CRAYFortran))
+#if !(defined(mipsFortran)||defined(DECFortran)||defined(vmsFortran)||defined(CONVEXFortran)||defined(PowerStationFortran)||defined(AbsoftUNIXFortran)||defined(AbsoftProFortran)||defined(SXFortran))
+/* If no Fortran compiler is given, we choose one for the machines we know. */
+#if defined(lynx) || defined(VAXUltrix)
+#define f2cFortran /* Lynx: Only support f2c at the moment.
+ VAXUltrix: f77 behaves like f2c.
+ Support f2c or f77 with gcc, vcc with f2c.
+ f77 with vcc works, missing link magic for f77 I/O.*/
+#endif
+#if defined(__hpux) /* 921107: Use __hpux instead of __hp9000s300 */
+#define hpuxFortran /* Should also allow hp9000s7/800 use.*/
+#endif
+#if defined(apollo)
+#define apolloFortran /* __CF__APOLLO67 also defines some behavior. */
+#endif
+#if defined(sun) || defined(__sun)
+#define sunFortran
+#endif
+#if defined(_IBMR2)
+#define IBMR2Fortran
+#endif
+#if defined(_CRAY)
+#define CRAYFortran /* _CRAYT3E also defines some behavior. */
+#endif
+#if defined(_SX)
+#define SXFortran
+#endif
+#if defined(mips) || defined(__mips)
+#define mipsFortran
+#endif
+#if defined(vms) || defined(__vms)
+#define vmsFortran
+#endif
+#if defined(__alpha) && defined(__unix__)
+#define DECFortran
+#endif
+#if defined(__convex__)
+#define CONVEXFortran
+#endif
+#if defined(VISUAL_CPLUSPLUS)
+#define PowerStationFortran
+#endif
+#endif /* ...Fortran */
+#endif /* ...Fortran */
+
+/* Split #if into 2 because some HP-UX can't handle long #if */
+#if !(defined(NAGf90Fortran)||defined(f2cFortran)||defined(hpuxFortran)||defined(apolloFortran)||defined(sunFortran)||defined(IBMR2Fortran)||defined(CRAYFortran))
+#if !(defined(mipsFortran)||defined(DECFortran)||defined(vmsFortran)||defined(CONVEXFortran)||defined(PowerStationFortran)||defined(AbsoftUNIXFortran)||defined(AbsoftProFortran)||defined(SXFortran))
+/* If your compiler barfs on ' #error', replace # with the trigraph for # */
+ #error "cfortran.h: Can't find your environment among:\
+ - MIPS cc and f77 2.0. (e.g. Silicon Graphics, DECstations, ...) \
+ - IBM AIX XL C and FORTRAN Compiler/6000 Version 01.01.0000.0000 \
+ - VAX VMS CC 3.1 and FORTRAN 5.4. \
+ - Alpha VMS DEC C 1.3 and DEC FORTRAN 6.0. \
+ - Alpha OSF DEC C and DEC Fortran for OSF/1 AXP Version 1.2 \
+ - Apollo DomainOS 10.2 (sys5.3) with f77 10.7 and cc 6.7. \
+ - CRAY \
+ - NEC SX-4 SUPER-UX \
+ - CONVEX \
+ - Sun \
+ - PowerStation Fortran with Visual C++ \
+ - HP9000s300/s700/s800 Latest test with: HP-UX A.08.07 A 9000/730 \
+ - LynxOS: cc or gcc with f2c. \
+ - VAXUltrix: vcc,cc or gcc with f2c. gcc or cc with f77. \
+ - f77 with vcc works; but missing link magic for f77 I/O. \
+ - NO fort. None of gcc, cc or vcc generate required names.\
+ - f2c : Use #define f2cFortran, or cc -Df2cFortran \
+ - NAG f90: Use #define NAGf90Fortran, or cc -DNAGf90Fortran \
+ - Absoft UNIX F77: Use #define AbsoftUNIXFortran or cc -DAbsoftUNIXFortran \
+ - Absoft Pro Fortran: Use #define AbsoftProFortran \
+ - Portland Group Fortran: Use #define pgiFortran"
+/* Compiler must throw us out at this point! */
+#endif
+#endif
+
+
+#if defined(VAXC) && !defined(__VAXC)
+#define OLD_VAXC
+#pragma nostandard /* Prevent %CC-I-PARAMNOTUSED. */
+#endif
+
+/* Throughout cfortran.h we use: UN = Uppercase Name. LN = Lowercase Name. */
+
+#if defined(f2cFortran) || defined(NAGf90Fortran) || defined(DECFortran) || defined(mipsFortran) || defined(apolloFortran) || defined(sunFortran) || defined(CONVEXFortran) || defined(SXFortran) || defined(extname)
+#define CFC_(UN,LN) _(LN,_) /* Lowercase FORTRAN symbols. */
+#define orig_fcallsc(UN,LN) CFC_(UN,LN)
+#else
+#if defined(CRAYFortran) || defined(PowerStationFortran) || defined(AbsoftProFortran)
+#ifdef _CRAY /* (UN), not UN, circumvents CRAY preprocessor bug. */
+#define CFC_(UN,LN) (UN) /* Uppercase FORTRAN symbols. */
+#else /* At least VISUAL_CPLUSPLUS barfs on (UN), so need UN. */
+#define CFC_(UN,LN) UN /* Uppercase FORTRAN symbols. */
+#endif
+#define orig_fcallsc(UN,LN) CFC_(UN,LN) /* CRAY insists on arg.'s here. */
+#else /* For following machines one may wish to change the fcallsc default. */
+#define CF_SAME_NAMESPACE
+#ifdef vmsFortran
+#define CFC_(UN,LN) LN /* Either case FORTRAN symbols. */
+ /* BUT we usually use UN for C macro to FORTRAN routines, so use LN here,*/
+ /* because VAX/VMS doesn't do recursive macros. */
+#define orig_fcallsc(UN,LN) UN
+#else /* HP-UX without +ppu or IBMR2 without -qextname. NOT reccomended. */
+#define CFC_(UN,LN) LN /* Lowercase FORTRAN symbols. */
+#define orig_fcallsc(UN,LN) CFC_(UN,LN)
+#endif /* vmsFortran */
+#endif /* CRAYFortran PowerStationFortran */
+#endif /* ....Fortran */
+
+#define fcallsc(UN,LN) orig_fcallsc(UN,LN)
+#define preface_fcallsc(P,p,UN,LN) CFC_(_(P,UN),_(p,LN))
+#define append_fcallsc(P,p,UN,LN) CFC_(_(UN,P),_(LN,p))
+
+#define C_FUNCTION(UN,LN) fcallsc(UN,LN)
+#define FORTRAN_FUNCTION(UN,LN) CFC_(UN,LN)
+
+#ifndef COMMON_BLOCK
+#ifndef CONVEXFortran
+#ifndef CLIPPERFortran
+#if !(defined(AbsoftUNIXFortran)||defined(AbsoftProFortran))
+#define COMMON_BLOCK(UN,LN) CFC_(UN,LN)
+#else
+#define COMMON_BLOCK(UN,LN) _(_C,LN)
+#endif /* AbsoftUNIXFortran or AbsoftProFortran */
+#else
+#define COMMON_BLOCK(UN,LN) _(LN,__)
+#endif /* CLIPPERFortran */
+#else
+#define COMMON_BLOCK(UN,LN) _3(_,LN,_)
+#endif /* CONVEXFortran */
+#endif /* COMMON_BLOCK */
+
+#ifndef DOUBLE_PRECISION
+#if defined(CRAYFortran) && !defined(_CRAYT3E)
+#define DOUBLE_PRECISION long double
+#else
+#define DOUBLE_PRECISION double
+#endif
+#endif
+
+#ifndef FORTRAN_REAL
+#if defined(CRAYFortran) && defined(_CRAYT3E)
+#define FORTRAN_REAL double
+#else
+#define FORTRAN_REAL float
+#endif
+#endif
+
+#ifdef CRAYFortran
+#ifdef _CRAY
+#include <fortran.h>
+#else
+#include "fortran.h" /* i.e. if crosscompiling assume user has file. */
+#endif
+#define FLOATVVVVVVV_cfPP (FORTRAN_REAL *) /* Used for C calls FORTRAN. */
+/* CRAY's double==float but CRAY says pointers to doubles and floats are diff.*/
+#define VOIDP (void *) /* When FORTRAN calls C, we don't know if C routine
+ arg.'s have been declared float *, or double *. */
+#else
+#define FLOATVVVVVVV_cfPP
+#define VOIDP
+#endif
+
+#ifdef vmsFortran
+#if defined(vms) || defined(__vms)
+#include <descrip.h>
+#else
+#include "descrip.h" /* i.e. if crosscompiling assume user has file. */
+#endif
+#endif
+
+#ifdef sunFortran
+#if defined(sun) || defined(__sun)
+#include <math.h> /* Sun's FLOATFUNCTIONTYPE, ASSIGNFLOAT, RETURNFLOAT. */
+#else
+#include "math.h" /* i.e. if crosscompiling assume user has file. */
+#endif
+/* At least starting with the default C compiler SC3.0.1 of SunOS 5.3,
+ * FLOATFUNCTIONTYPE, ASSIGNFLOAT, RETURNFLOAT are not required and not in
+ * <math.h>, since sun C no longer promotes C float return values to doubles.
+ * Therefore, only use them if defined.
+ * Even if gcc is being used, assume that it exhibits the Sun C compiler
+ * behavior in order to be able to use *.o from the Sun C compiler.
+ * i.e. If FLOATFUNCTIONTYPE, etc. are in math.h, they required by gcc.
+ */
+#endif
+
+#ifndef apolloFortran
+#define COMMON_BLOCK_DEF(DEFINITION, NAME) extern DEFINITION NAME
+#define CF_NULL_PROTO
+#else /* HP doesn't understand #elif. */
+/* Without ANSI prototyping, Apollo promotes float functions to double. */
+/* Note that VAX/VMS, IBM, Mips choke on 'type function(...);' prototypes. */
+#define CF_NULL_PROTO ...
+#ifndef __CF__APOLLO67
+#define COMMON_BLOCK_DEF(DEFINITION, NAME) \
+ DEFINITION NAME __attribute((__section(NAME)))
+#else
+#define COMMON_BLOCK_DEF(DEFINITION, NAME) \
+ DEFINITION NAME #attribute[section(NAME)]
+#endif
+#endif
+
+#ifdef __cplusplus
+#undef CF_NULL_PROTO
+#define CF_NULL_PROTO ...
+#endif
+
+
+#ifndef USE_NEW_DELETE
+#ifdef __cplusplus
+#define USE_NEW_DELETE 1
+#else
+#define USE_NEW_DELETE 0
+#endif
+#endif
+#if USE_NEW_DELETE
+#define _cf_malloc(N) new char[N]
+#define _cf_free(P) delete[] P
+#else
+#define _cf_malloc(N) (char *)malloc(N)
+#define _cf_free(P) free(P)
+#endif
+
+#ifdef mipsFortran
+#define CF_DECLARE_GETARG int f77argc; char **f77argv
+#define CF_SET_GETARG(ARGC,ARGV) f77argc = ARGC; f77argv = ARGV
+#else
+#define CF_DECLARE_GETARG
+#define CF_SET_GETARG(ARGC,ARGV)
+#endif
+
+#ifdef OLD_VAXC /* Allow %CC-I-PARAMNOTUSED. */
+#pragma standard
+#endif
+
+#define AcfCOMMA ,
+#define AcfCOLON ;
+
+/*-------------------------------------------------------------------------*/
+
+/* UTILITIES USED WITHIN CFORTRAN.H */
+
+#define _cfMIN(A,B) (A<B?A:B)
+
+/* 970211 - XIX.145:
+ firstindexlength - better name is all_but_last_index_lengths
+ secondindexlength - better name is last_index_length
+ */
+#define firstindexlength(A) (sizeof(A[0])==1 ? 1 : (sizeof(A) / sizeof(A[0])) )
+#define secondindexlength(A) (sizeof(A[0])==1 ? sizeof(A) : sizeof(A[0]) )
+
+/* Behavior of FORTRAN LOGICAL. All machines' LOGICAL is same size as C's int.
+Conversion is automatic except for arrays which require F2CLOGICALV/C2FLOGICALV.
+f2c, MIPS f77 [DECstation, SGI], VAX Ultrix f77,
+HP-UX f77 : as in C.
+VAX/VMS FORTRAN, VAX Ultrix fort,
+Absoft Unix Fortran, IBM RS/6000 xlf : LS Bit = 0/1 = TRUE/FALSE.
+Apollo : neg. = TRUE, else FALSE.
+[Apollo accepts -1 as TRUE for function values, but NOT all other neg. values.]
+[DECFortran for Ultrix RISC is also called f77 but is the same as VAX/VMS.]
+[MIPS f77 treats .eqv./.neqv. as .eq./.ne. and hence requires LOGICAL_STRICT.]*/
+
+#if defined(NAGf90Fortran) || defined(f2cFortran) || defined(mipsFortran) || defined(PowerStationFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran) || defined(AbsoftProFortran) || defined(SXFortran)
+/* SX/PowerStationFortran have 0 and 1 defined, others are neither T nor F. */
+/* hpuxFortran800 has 0 and 0x01000000 defined. Others are unknown. */
+#define LOGICAL_STRICT /* Other Fortran have .eqv./.neqv. == .eq./.ne. */
+#endif
+
+#define C2FLOGICALV(A,I) \
+ do {int __i; for(__i=0;__i<I;__i++) A[__i]=C2FLOGICAL(A[__i]); } while (0)
+#define F2CLOGICALV(A,I) \
+ do {int __i; for(__i=0;__i<I;__i++) A[__i]=F2CLOGICAL(A[__i]); } while (0)
+
+#if defined(apolloFortran)
+#define C2FLOGICAL(L) ((L)?-1:(L)&~((unsigned)1<<sizeof(int)*8-1))
+#define F2CLOGICAL(L) ((L)<0?(L):0)
+#else
+#if defined(CRAYFortran)
+#define C2FLOGICAL(L) _btol(L)
+#define F2CLOGICAL(L) _ltob(&(L)) /* Strangely _ltob() expects a pointer. */
+#else
+#if defined(IBMR2Fortran) || defined(vmsFortran) || defined(DECFortran) || defined(AbsoftUNIXFortran)
+/* How come no AbsoftProFortran ? */
+#define C2FLOGICAL(L) ((L)?(L)|1:(L)&~(int)1)
+#define F2CLOGICAL(L) ((L)&1?(L):0)
+#else
+#if defined(CONVEXFortran)
+#define C2FLOGICAL(L) ((L) ? ~0 : 0 )
+#define F2CLOGICAL(L) (L)
+#else /* others evaluate LOGICALs as for C. */
+#define C2FLOGICAL(L) (L)
+#define F2CLOGICAL(L) (L)
+#ifndef LOGICAL_STRICT
+#undef C2FLOGICALV
+#undef F2CLOGICALV
+#define C2FLOGICALV(A,I)
+#define F2CLOGICALV(A,I)
+#endif /* LOGICAL_STRICT */
+#endif /* CONVEXFortran || All Others */
+#endif /* IBMR2Fortran vmsFortran DECFortran AbsoftUNIXFortran */
+#endif /* CRAYFortran */
+#endif /* apolloFortran */
+
+/* 970514 - In addition to CRAY, there may be other machines
+ for which LOGICAL_STRICT makes no sense. */
+#if defined(LOGICAL_STRICT) && !defined(CRAYFortran)
+/* Force C2FLOGICAL to generate only the values for either .TRUE. or .FALSE.
+ SX/PowerStationFortran only have 0 and 1 defined.
+ Elsewhere, only needed if you want to do:
+ logical lvariable
+ if (lvariable .eq. .true.) then ! (1)
+ instead of
+ if (lvariable .eqv. .true.) then ! (2)
+ - (1) may not even be FORTRAN/77 and that Apollo's f77 and IBM's xlf
+ refuse to compile (1), so you are probably well advised to stay away from
+ (1) and from LOGICAL_STRICT.
+ - You pay a (slight) performance penalty for using LOGICAL_STRICT. */
+#undef C2FLOGICAL
+#ifdef hpuxFortran800
+#define C2FLOGICAL(L) ((L)?0x01000000:0)
+#else
+#if defined(apolloFortran) || defined(vmsFortran) || defined(DECFortran)
+#define C2FLOGICAL(L) ((L)?-1:0) /* These machines use -1/0 for .true./.false.*/
+#else
+#define C2FLOGICAL(L) ((L)? 1:0) /* All others use +1/0 for .true./.false.*/
+#endif
+#endif
+#endif /* LOGICAL_STRICT */
+
+/* Convert a vector of C strings into FORTRAN strings. */
+#ifndef __CF__KnR
+static char *c2fstrv(char* cstr, char *fstr, int elem_len, int sizeofcstr)
+#else
+static char *c2fstrv( cstr, fstr, elem_len, sizeofcstr)
+ char* cstr; char *fstr; int elem_len; int sizeofcstr;
+#endif
+{ int i,j;
+/* elem_len includes \0 for C strings. Fortran strings don't have term. \0.
+ Useful size of string must be the same in both languages. */
+for (i=0; i<sizeofcstr/elem_len; i++) {
+ for (j=1; j<elem_len && *cstr; j++) *fstr++ = *cstr++;
+ cstr += 1+elem_len-j;
+ for (; j<elem_len; j++) *fstr++ = ' ';
+} /* 95109 - Seems to be returning the original fstr. */
+return fstr-sizeofcstr+sizeofcstr/elem_len; }
+
+/* Convert a vector of FORTRAN strings into C strings. */
+#ifndef __CF__KnR
+static char *f2cstrv(char *fstr, char* cstr, int elem_len, int sizeofcstr)
+#else
+static char *f2cstrv( fstr, cstr, elem_len, sizeofcstr)
+ char *fstr; char* cstr; int elem_len; int sizeofcstr;
+#endif
+{ int i,j;
+/* elem_len includes \0 for C strings. Fortran strings don't have term. \0.
+ Useful size of string must be the same in both languages. */
+cstr += sizeofcstr;
+fstr += sizeofcstr - sizeofcstr/elem_len;
+for (i=0; i<sizeofcstr/elem_len; i++) {
+ *--cstr = '\0';
+ for (j=1; j<elem_len; j++) *--cstr = *--fstr;
+} return cstr; }
+
+/* kill the trailing char t's in string s. */
+#ifndef __CF__KnR
+static char *kill_trailing(char *s, char t)
+#else
+static char *kill_trailing( s, t) char *s; char t;
+#endif
+{char *e;
+e = s + strlen(s);
+if (e>s) { /* Need this to handle NULL string.*/
+ while (e>s && *--e==t); /* Don't follow t's past beginning. */
+ e[*e==t?0:1] = '\0'; /* Handle s[0]=t correctly. */
+} return s; }
+
+/* kill_trailingn(s,t,e) will kill the trailing t's in string s. e normally
+points to the terminating '\0' of s, but may actually point to anywhere in s.
+s's new '\0' will be placed at e or earlier in order to remove any trailing t's.
+If e<s string s is left unchanged. */
+#ifndef __CF__KnR
+static char *kill_trailingn(char *s, char t, char *e)
+#else
+static char *kill_trailingn( s, t, e) char *s; char t; char *e;
+#endif
+{
+if (e==s) *e = '\0'; /* Kill the string makes sense here.*/
+else if (e>s) { /* Watch out for neg. length string.*/
+ while (e>s && *--e==t); /* Don't follow t's past beginning. */
+ e[*e==t?0:1] = '\0'; /* Handle s[0]=t correctly. */
+} return s; }
+
+/* Note the following assumes that any element which has t's to be chopped off,
+does indeed fill the entire element. */
+#ifndef __CF__KnR
+static char *vkill_trailing(char* cstr, int elem_len, int sizeofcstr, char t)
+#else
+static char *vkill_trailing( cstr, elem_len, sizeofcstr, t)
+ char* cstr; int elem_len; int sizeofcstr; char t;
+#endif
+{ int i;
+for (i=0; i<sizeofcstr/elem_len; i++) /* elem_len includes \0 for C strings. */
+ kill_trailingn(cstr+elem_len*i,t,cstr+elem_len*(i+1)-1);
+return cstr; }
+
+#ifdef vmsFortran
+typedef struct dsc$descriptor_s fstring;
+#define DSC$DESCRIPTOR_A(DIMCT) \
+struct { \
+ unsigned short dsc$w_length; unsigned char dsc$b_dtype; \
+ unsigned char dsc$b_class; char *dsc$a_pointer; \
+ char dsc$b_scale; unsigned char dsc$b_digits; \
+ struct { \
+ unsigned : 3; unsigned dsc$v_fl_binscale : 1; \
+ unsigned dsc$v_fl_redim : 1; unsigned dsc$v_fl_column : 1; \
+ unsigned dsc$v_fl_coeff : 1; unsigned dsc$v_fl_bounds : 1; \
+ } dsc$b_aflags; \
+ unsigned char dsc$b_dimct; unsigned long dsc$l_arsize; \
+ char *dsc$a_a0; long dsc$l_m [DIMCT]; \
+ struct { \
+ long dsc$l_l; long dsc$l_u; \
+ } dsc$bounds [DIMCT]; \
+}
+typedef DSC$DESCRIPTOR_A(1) fstringvector;
+/*typedef DSC$DESCRIPTOR_A(2) fstringarrarr;
+ typedef DSC$DESCRIPTOR_A(3) fstringarrarrarr;*/
+#define initfstr(F,C,ELEMNO,ELEMLEN) \
+( (F).dsc$l_arsize= ( (F).dsc$w_length =(ELEMLEN) ) \
+ *( (F).dsc$l_m[0]=(F).dsc$bounds[0].dsc$l_u=(ELEMNO) ), \
+ (F).dsc$a_a0 = ( (F).dsc$a_pointer=(C) ) - (F).dsc$w_length ,(F))
+
+#else
+#define _NUM_ELEMS -1
+#define _NUM_ELEM_ARG -2
+#define NUM_ELEMS(A) A,_NUM_ELEMS
+#define NUM_ELEM_ARG(B) *_2(A,B),_NUM_ELEM_ARG
+#define TERM_CHARS(A,B) A,B
+#ifndef __CF__KnR
+static int num_elem(char *strv, unsigned elem_len, int term_char, int num_term)
+#else
+static int num_elem( strv, elem_len, term_char, num_term)
+ char *strv; unsigned elem_len; int term_char; int num_term;
+#endif
+/* elem_len is the number of characters in each element of strv, the FORTRAN
+vector of strings. The last element of the vector must begin with at least
+num_term term_char characters, so that this routine can determine how
+many elements are in the vector. */
+{
+unsigned num,i;
+if (num_term == _NUM_ELEMS || num_term == _NUM_ELEM_ARG)
+ return term_char;
+if (num_term <=0) num_term = (int)elem_len;
+for (num=0; ; num++) {
+ for (i=0; i<(unsigned)num_term && *strv==term_char; i++,strv++);
+ if (i==(unsigned)num_term) break;
+ else strv += elem_len-i;
+}
+return (int)num;
+}
+#endif
+/*-------------------------------------------------------------------------*/
+
+/* UTILITIES FOR C TO USE STRINGS IN FORTRAN COMMON BLOCKS */
+
+/* C string TO Fortran Common Block STRing. */
+/* DIM is the number of DIMensions of the array in terms of strings, not
+ characters. e.g. char a[12] has DIM = 0, char a[12][4] has DIM = 1, etc. */
+#define C2FCBSTR(CSTR,FSTR,DIM) \
+ c2fstrv((char *)CSTR, (char *)FSTR, sizeof(FSTR)/cfelementsof(FSTR,DIM)+1, \
+ sizeof(FSTR)+cfelementsof(FSTR,DIM))
+
+/* Fortran Common Block string TO C STRing. */
+#define FCB2CSTR(FSTR,CSTR,DIM) \
+ vkill_trailing(f2cstrv((char *)FSTR, (char *)CSTR, \
+ sizeof(FSTR)/cfelementsof(FSTR,DIM)+1, \
+ sizeof(FSTR)+cfelementsof(FSTR,DIM)), \
+ sizeof(FSTR)/cfelementsof(FSTR,DIM)+1, \
+ sizeof(FSTR)+cfelementsof(FSTR,DIM), ' ')
+
+#define cfDEREFERENCE0
+#define cfDEREFERENCE1 *
+#define cfDEREFERENCE2 **
+#define cfDEREFERENCE3 ***
+#define cfDEREFERENCE4 ****
+#define cfDEREFERENCE5 *****
+#define cfelementsof(A,D) (sizeof(A)/sizeof(_(cfDEREFERENCE,D)(A)))
+
+/*-------------------------------------------------------------------------*/
+
+/* UTILITIES FOR C TO CALL FORTRAN SUBROUTINES */
+
+/* Define lookup tables for how to handle the various types of variables. */
+
+#ifdef OLD_VAXC /* Prevent %CC-I-PARAMNOTUSED. */
+#pragma nostandard
+#endif
+
+#define ZTRINGV_NUM(I) I
+#define ZTRINGV_ARGFP(I) (*(_2(A,I))) /* Undocumented. For PINT, etc. */
+#define ZTRINGV_ARGF(I) _2(A,I)
+#ifdef CFSUBASFUN
+#define ZTRINGV_ARGS(I) ZTRINGV_ARGF(I)
+#else
+#define ZTRINGV_ARGS(I) _2(B,I)
+#endif
+
+#define PBYTE_cfVP(A,B) PINT_cfVP(A,B)
+#define PDOUBLE_cfVP(A,B)
+#define PFLOAT_cfVP(A,B)
+#ifdef ZTRINGV_ARGS_allows_Pvariables
+/* This allows Pvariables for ARGS. ARGF machinery is above ARGFP.
+ * B is not needed because the variable may be changed by the Fortran routine,
+ * but because B is the only way to access an arbitrary macro argument. */
+#define PINT_cfVP(A,B) int B = (int)A; /* For ZSTRINGV_ARGS */
+#else
+#define PINT_cfVP(A,B)
+#endif
+#define PLOGICAL_cfVP(A,B) int *B; /* Returning LOGICAL in FUNn and SUBn */
+#define PLONG_cfVP(A,B) PINT_cfVP(A,B)
+#define PSHORT_cfVP(A,B) PINT_cfVP(A,B)
+
+#define VCF_INT_S(T,A,B) _(T,VVVVVVV_cfTYPE) B = A;
+#define VCF_INT_F(T,A,B) _(T,_cfVCF)(A,B)
+/* _cfVCF table is directly mapped to _cfCCC table. */
+#define BYTE_cfVCF(A,B)
+#define DOUBLE_cfVCF(A,B)
+#if !defined(__CF__KnR)
+#define FLOAT_cfVCF(A,B)
+#else
+#define FLOAT_cfVCF(A,B) FORTRAN_REAL B = A;
+#endif
+#define INT_cfVCF(A,B)
+#define LOGICAL_cfVCF(A,B)
+#define LONG_cfVCF(A,B)
+#define SHORT_cfVCF(A,B)
+
+/* 980416
+ Cast (void (*)(CF_NULL_PROTO)) causes SunOS CC 4.2 occasionally to barf,
+ while the following equivalent typedef is fine.
+ For consistency use the typedef on all machines.
+ */
+typedef void (*cfCAST_FUNCTION)(CF_NULL_PROTO);
+
+#define VCF(TN,I) _Icf4(4,V,TN,_(A,I),_(B,I),F)
+#define VVCF(TN,AI,BI) _Icf4(4,V,TN,AI,BI,S)
+#define INT_cfV(T,A,B,F) _(VCF_INT_,F)(T,A,B)
+#define INTV_cfV(T,A,B,F)
+#define INTVV_cfV(T,A,B,F)
+#define INTVVV_cfV(T,A,B,F)
+#define INTVVVV_cfV(T,A,B,F)
+#define INTVVVVV_cfV(T,A,B,F)
+#define INTVVVVVV_cfV(T,A,B,F)
+#define INTVVVVVVV_cfV(T,A,B,F)
+#define PINT_cfV( T,A,B,F) _(T,_cfVP)(A,B)
+#define PVOID_cfV( T,A,B,F)
+#if defined(apolloFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran) || defined(AbsoftProFortran)
+#define ROUTINE_cfV(T,A,B,F) void (*B)(CF_NULL_PROTO) = (cfCAST_FUNCTION)A;
+#else
+#define ROUTINE_cfV(T,A,B,F)
+#endif
+#define SIMPLE_cfV(T,A,B,F)
+#ifdef vmsFortran
+#define STRING_cfV(T,A,B,F) static struct {fstring f; unsigned clen;} B = \
+ {{0,DSC$K_DTYPE_T,DSC$K_CLASS_S,NULL},0};
+#define PSTRING_cfV(T,A,B,F) static fstring B={0,DSC$K_DTYPE_T,DSC$K_CLASS_S,NULL};
+#define STRINGV_cfV(T,A,B,F) static fstringvector B = \
+ {sizeof(A),DSC$K_DTYPE_T,DSC$K_CLASS_A,NULL,0,0,{0,0,1,1,1},1,0,NULL,0,{1,0}};
+#define PSTRINGV_cfV(T,A,B,F) static fstringvector B = \
+ {0,DSC$K_DTYPE_T,DSC$K_CLASS_A,NULL,0,0,{0,0,1,1,1},1,0,NULL,0,{1,0}};
+#else
+#define STRING_cfV(T,A,B,F) struct {unsigned int clen, flen;} B;
+#define STRINGV_cfV(T,A,B,F) struct {char *s, *fs; unsigned flen;} B;
+#define PSTRING_cfV(T,A,B,F) int B;
+#define PSTRINGV_cfV(T,A,B,F) struct{char *fs; unsigned int sizeofA,flen;}B;
+#endif
+#define ZTRINGV_cfV(T,A,B,F) STRINGV_cfV(T,A,B,F)
+#define PZTRINGV_cfV(T,A,B,F) PSTRINGV_cfV(T,A,B,F)
+
+/* Note that the actions of the A table were performed inside the AA table.
+ VAX Ultrix vcc, and HP-UX cc, didn't evaluate arguments to functions left to
+ right, so we had to split the original table into the current robust two. */
+#define ACF(NAME,TN,AI,I) _(TN,_cfSTR)(4,A,NAME,I,AI,_(B,I),0)
+#define DEFAULT_cfA(M,I,A,B)
+#define LOGICAL_cfA(M,I,A,B) B=C2FLOGICAL(B);
+#define PLOGICAL_cfA(M,I,A,B) A=C2FLOGICAL(A);
+#define STRING_cfA(M,I,A,B) STRING_cfC(M,I,A,B,sizeof(A))
+#define PSTRING_cfA(M,I,A,B) PSTRING_cfC(M,I,A,B,sizeof(A))
+#ifdef vmsFortran
+#define AATRINGV_cfA( A,B, sA,filA,silA) \
+ initfstr(B,_cf_malloc((sA)-(filA)),(filA),(silA)-1), \
+ c2fstrv(A,B.dsc$a_pointer,(silA),(sA));
+#define APATRINGV_cfA( A,B, sA,filA,silA) \
+ initfstr(B,A,(filA),(silA)-1),c2fstrv(A,A,(silA),(sA));
+#else
+#define AATRINGV_cfA( A,B, sA,filA,silA) \
+ (B.s=_cf_malloc((sA)-(filA)),B.fs=c2fstrv(A,B.s,(B.flen=(silA)-1)+1,(sA)));
+#define APATRINGV_cfA( A,B, sA,filA,silA) \
+ B.fs=c2fstrv(A,A,(B.flen=(silA)-1)+1,B.sizeofA=(sA));
+#endif
+#define STRINGV_cfA(M,I,A,B) \
+ AATRINGV_cfA((char *)A,B,sizeof(A),firstindexlength(A),secondindexlength(A))
+#define PSTRINGV_cfA(M,I,A,B) \
+ APATRINGV_cfA((char *)A,B,sizeof(A),firstindexlength(A),secondindexlength(A))
+#define ZTRINGV_cfA(M,I,A,B) AATRINGV_cfA( (char *)A,B, \
+ (_3(M,_ELEMS_,I))*(( _3(M,_ELEMLEN_,I))+1), \
+ (_3(M,_ELEMS_,I)),(_3(M,_ELEMLEN_,I))+1)
+#define PZTRINGV_cfA(M,I,A,B) APATRINGV_cfA( (char *)A,B, \
+ (_3(M,_ELEMS_,I))*(( _3(M,_ELEMLEN_,I))+1), \
+ (_3(M,_ELEMS_,I)),(_3(M,_ELEMLEN_,I))+1)
+
+#define PBYTE_cfAAP(A,B) &A
+#define PDOUBLE_cfAAP(A,B) &A
+#define PFLOAT_cfAAP(A,B) FLOATVVVVVVV_cfPP &A
+#define PINT_cfAAP(A,B) &A
+#define PLOGICAL_cfAAP(A,B) B= &A /* B used to keep a common W table. */
+#define PLONG_cfAAP(A,B) &A
+#define PSHORT_cfAAP(A,B) &A
+
+#define AACF(TN,AI,I,C) _SEP_(TN,C,cfCOMMA) _Icf(3,AA,TN,AI,_(B,I))
+#define INT_cfAA(T,A,B) &B
+#define INTV_cfAA(T,A,B) _(T,VVVVVV_cfPP) A
+#define INTVV_cfAA(T,A,B) _(T,VVVVV_cfPP) A[0]
+#define INTVVV_cfAA(T,A,B) _(T,VVVV_cfPP) A[0][0]
+#define INTVVVV_cfAA(T,A,B) _(T,VVV_cfPP) A[0][0][0]
+#define INTVVVVV_cfAA(T,A,B) _(T,VV_cfPP) A[0][0][0][0]
+#define INTVVVVVV_cfAA(T,A,B) _(T,V_cfPP) A[0][0][0][0][0]
+#define INTVVVVVVV_cfAA(T,A,B) _(T,_cfPP) A[0][0][0][0][0][0]
+#define PINT_cfAA(T,A,B) _(T,_cfAAP)(A,B)
+#define PVOID_cfAA(T,A,B) (void *) A
+#if defined(apolloFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran)
+#define ROUTINE_cfAA(T,A,B) &B
+#else
+#define ROUTINE_cfAA(T,A,B) (cfCAST_FUNCTION)A
+#endif
+#define STRING_cfAA(T,A,B) STRING_cfCC(T,A,B)
+#define PSTRING_cfAA(T,A,B) PSTRING_cfCC(T,A,B)
+#ifdef vmsFortran
+#define STRINGV_cfAA(T,A,B) &B
+#else
+#ifdef CRAYFortran
+#define STRINGV_cfAA(T,A,B) _cptofcd(B.fs,B.flen)
+#else
+#define STRINGV_cfAA(T,A,B) B.fs
+#endif
+#endif
+#define PSTRINGV_cfAA(T,A,B) STRINGV_cfAA(T,A,B)
+#define ZTRINGV_cfAA(T,A,B) STRINGV_cfAA(T,A,B)
+#define PZTRINGV_cfAA(T,A,B) STRINGV_cfAA(T,A,B)
+
+#if defined(vmsFortran) || defined(CRAYFortran)
+#define JCF(TN,I)
+#define KCF(TN,I)
+#else
+#define JCF(TN,I) _(TN,_cfSTR)(1,J,_(B,I), 0,0,0,0)
+#if defined(AbsoftUNIXFortran)
+#define DEFAULT_cfJ(B) ,0
+#else
+#define DEFAULT_cfJ(B)
+#endif
+#define LOGICAL_cfJ(B) DEFAULT_cfJ(B)
+#define PLOGICAL_cfJ(B) DEFAULT_cfJ(B)
+#define STRING_cfJ(B) ,B.flen
+#define PSTRING_cfJ(B) ,B
+#define STRINGV_cfJ(B) STRING_cfJ(B)
+#define PSTRINGV_cfJ(B) STRING_cfJ(B)
+#define ZTRINGV_cfJ(B) STRING_cfJ(B)
+#define PZTRINGV_cfJ(B) STRING_cfJ(B)
+
+/* KCF is identical to DCF, except that KCF ZTRING is not empty. */
+#define KCF(TN,I) _(TN,_cfSTR)(1,KK,_(B,I), 0,0,0,0)
+#if defined(AbsoftUNIXFortran)
+#define DEFAULT_cfKK(B) , unsigned B
+#else
+#define DEFAULT_cfKK(B)
+#endif
+#define LOGICAL_cfKK(B) DEFAULT_cfKK(B)
+#define PLOGICAL_cfKK(B) DEFAULT_cfKK(B)
+#define STRING_cfKK(B) , unsigned B
+#define PSTRING_cfKK(B) STRING_cfKK(B)
+#define STRINGV_cfKK(B) STRING_cfKK(B)
+#define PSTRINGV_cfKK(B) STRING_cfKK(B)
+#define ZTRINGV_cfKK(B) STRING_cfKK(B)
+#define PZTRINGV_cfKK(B) STRING_cfKK(B)
+#endif
+
+#define WCF(TN,AN,I) _(TN,_cfSTR)(2,W,AN,_(B,I), 0,0,0)
+#define DEFAULT_cfW(A,B)
+#define LOGICAL_cfW(A,B)
+#define PLOGICAL_cfW(A,B) *B=F2CLOGICAL(*B);
+#define STRING_cfW(A,B) (A[B.clen]!='\0'?A[B.clen]='\0':0); /* A?="constnt"*/
+#define PSTRING_cfW(A,B) kill_trailing(A,' ');
+#ifdef vmsFortran
+#define STRINGV_cfW(A,B) _cf_free(B.dsc$a_pointer);
+#define PSTRINGV_cfW(A,B) \
+ vkill_trailing(f2cstrv((char*)A, (char*)A, \
+ B.dsc$w_length+1, B.dsc$l_arsize+B.dsc$l_m[0]), \
+ B.dsc$w_length+1, B.dsc$l_arsize+B.dsc$l_m[0], ' ');
+#else
+#define STRINGV_cfW(A,B) _cf_free(B.s);
+#define PSTRINGV_cfW(A,B) vkill_trailing( \
+ f2cstrv((char*)A,(char*)A,B.flen+1,B.sizeofA), B.flen+1,B.sizeofA,' ');
+#endif
+#define ZTRINGV_cfW(A,B) STRINGV_cfW(A,B)
+#define PZTRINGV_cfW(A,B) PSTRINGV_cfW(A,B)
+
+#define NCF(TN,I,C) _SEP_(TN,C,cfCOMMA) _Icf(2,N,TN,_(A,I),0)
+#define NNCF(TN,I,C) UUCF(TN,I,C)
+#define NNNCF(TN,I,C) _SEP_(TN,C,cfCOLON) _Icf(2,N,TN,_(A,I),0)
+#define INT_cfN(T,A) _(T,VVVVVVV_cfTYPE) * A
+#define INTV_cfN(T,A) _(T,VVVVVV_cfTYPE) * A
+#define INTVV_cfN(T,A) _(T,VVVVV_cfTYPE) * A
+#define INTVVV_cfN(T,A) _(T,VVVV_cfTYPE) * A
+#define INTVVVV_cfN(T,A) _(T,VVV_cfTYPE) * A
+#define INTVVVVV_cfN(T,A) _(T,VV_cfTYPE) * A
+#define INTVVVVVV_cfN(T,A) _(T,V_cfTYPE) * A
+#define INTVVVVVVV_cfN(T,A) _(T,_cfTYPE) * A
+#define PINT_cfN(T,A) _(T,_cfTYPE) * A
+#define PVOID_cfN(T,A) void * A
+#if defined(apolloFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran)
+#define ROUTINE_cfN(T,A) void (**A)(CF_NULL_PROTO)
+#else
+#define ROUTINE_cfN(T,A) void ( *A)(CF_NULL_PROTO)
+#endif
+#ifdef vmsFortran
+#define STRING_cfN(T,A) fstring * A
+#define STRINGV_cfN(T,A) fstringvector * A
+#else
+#ifdef CRAYFortran
+#define STRING_cfN(T,A) _fcd A
+#define STRINGV_cfN(T,A) _fcd A
+#else
+#define STRING_cfN(T,A) char * A
+#define STRINGV_cfN(T,A) char * A
+#endif
+#endif
+#define PSTRING_cfN(T,A) STRING_cfN(T,A) /* CRAY insists on arg.'s here. */
+#define PNSTRING_cfN(T,A) STRING_cfN(T,A) /* CRAY insists on arg.'s here. */
+#define PPSTRING_cfN(T,A) STRING_cfN(T,A) /* CRAY insists on arg.'s here. */
+#define PSTRINGV_cfN(T,A) STRINGV_cfN(T,A)
+#define ZTRINGV_cfN(T,A) STRINGV_cfN(T,A)
+#define PZTRINGV_cfN(T,A) PSTRINGV_cfN(T,A)
+
+
+/* Apollo 6.7, CRAY, old Sun, VAX/Ultrix vcc/cc and new ultrix
+ can't hack more than 31 arg's.
+ e.g. ultrix >= 4.3 gives message:
+ zow35> cc -c -DDECFortran cfortest.c
+ cfe: Fatal: Out of memory: cfortest.c
+ zow35>
+ Old __hpux had the problem, but new 'HP-UX A.09.03 A 9000/735' is fine
+ if using -Aa, otherwise we have a problem.
+ */
+#ifndef MAX_PREPRO_ARGS
+#if !defined(__GNUC__) && (defined(VAXUltrix) || defined(__CF__APOLLO67) || (defined(sun)&&!defined(__sun)) || defined(_CRAY) || defined(__ultrix__) || (defined(__hpux)&&defined(__CF__KnR)))
+#define MAX_PREPRO_ARGS 31
+#else
+#define MAX_PREPRO_ARGS 99
+#endif
+#endif
+
+#if defined(AbsoftUNIXFortran) || defined(AbsoftProFortran)
+/* In addition to explicit Absoft stuff, only Absoft requires:
+ - DEFAULT coming from _cfSTR.
+ DEFAULT could have been called e.g. INT, but keep it for clarity.
+ - M term in CFARGT14 and CFARGT14FS.
+ */
+#define ABSOFT_cf1(T0) _(T0,_cfSTR)(0,ABSOFT1,0,0,0,0,0)
+#define ABSOFT_cf2(T0) _(T0,_cfSTR)(0,ABSOFT2,0,0,0,0,0)
+#define ABSOFT_cf3(T0) _(T0,_cfSTR)(0,ABSOFT3,0,0,0,0,0)
+#define DEFAULT_cfABSOFT1
+#define LOGICAL_cfABSOFT1
+#define STRING_cfABSOFT1 ,MAX_LEN_FORTRAN_FUNCTION_STRING
+#define DEFAULT_cfABSOFT2
+#define LOGICAL_cfABSOFT2
+#define STRING_cfABSOFT2 ,unsigned D0
+#define DEFAULT_cfABSOFT3
+#define LOGICAL_cfABSOFT3
+#define STRING_cfABSOFT3 ,D0
+#else
+#define ABSOFT_cf1(T0)
+#define ABSOFT_cf2(T0)
+#define ABSOFT_cf3(T0)
+#endif
+
+/* _Z introduced to cicumvent IBM and HP silly preprocessor warning.
+ e.g. "Macro CFARGT14 invoked with a null argument."
+ */
+#define _Z
+
+#define CFARGT14S(S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ S(T1,1) S(T2,2) S(T3,3) S(T4,4) S(T5,5) S(T6,6) S(T7,7) \
+ S(T8,8) S(T9,9) S(TA,10) S(TB,11) S(TC,12) S(TD,13) S(TE,14)
+#define CFARGT27S(S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \
+ S(T1,1) S(T2,2) S(T3,3) S(T4,4) S(T5,5) S(T6,6) S(T7,7) \
+ S(T8,8) S(T9,9) S(TA,10) S(TB,11) S(TC,12) S(TD,13) S(TE,14) \
+ S(TF,15) S(TG,16) S(TH,17) S(TI,18) S(TJ,19) S(TK,20) S(TL,21) \
+ S(TM,22) S(TN,23) S(TO,24) S(TP,25) S(TQ,26) S(TR,27)
+
+#define CFARGT14FS(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ F(T1,1,0) F(T2,2,1) F(T3,3,1) F(T4,4,1) F(T5,5,1) F(T6,6,1) F(T7,7,1) \
+ F(T8,8,1) F(T9,9,1) F(TA,10,1) F(TB,11,1) F(TC,12,1) F(TD,13,1) F(TE,14,1) \
+ M CFARGT14S(S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
+#define CFARGT27FS(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \
+ F(T1,1,0) F(T2,2,1) F(T3,3,1) F(T4,4,1) F(T5,5,1) F(T6,6,1) F(T7,7,1) \
+ F(T8,8,1) F(T9,9,1) F(TA,10,1) F(TB,11,1) F(TC,12,1) F(TD,13,1) F(TE,14,1) \
+ F(TF,15,1) F(TG,16,1) F(TH,17,1) F(TI,18,1) F(TJ,19,1) F(TK,20,1) F(TL,21,1) \
+ F(TM,22,1) F(TN,23,1) F(TO,24,1) F(TP,25,1) F(TQ,26,1) F(TR,27,1) \
+ M CFARGT27S(S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR)
+
+#if !(defined(PowerStationFortran)||defined(hpuxFortran800))
+/* Old CFARGT14 -> CFARGT14FS as seen below, for Absoft cross-compile yields:
+ SunOS> cc -c -Xa -DAbsoftUNIXFortran c.c
+ "c.c", line 406: warning: argument mismatch
+ Haven't checked if this is ANSI C or a SunOS bug. SunOS -Xs works ok.
+ Behavior is most clearly seen in example:
+ #define A 1 , 2
+ #define C(X,Y,Z) x=X. y=Y. z=Z.
+ #define D(X,Y,Z) C(X,Y,Z)
+ D(x,A,z)
+ Output from preprocessor is: x = x . y = 1 . z = 2 .
+ #define CFARGT14(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ CFARGT14FS(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
+*/
+#define CFARGT14(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ F(T1,1,0) F(T2,2,1) F(T3,3,1) F(T4,4,1) F(T5,5,1) F(T6,6,1) F(T7,7,1) \
+ F(T8,8,1) F(T9,9,1) F(TA,10,1) F(TB,11,1) F(TC,12,1) F(TD,13,1) F(TE,14,1) \
+ M CFARGT14S(S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
+#define CFARGT27(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \
+ F(T1,1,0) F(T2,2,1) F(T3,3,1) F(T4,4,1) F(T5,5,1) F(T6,6,1) F(T7,7,1) \
+ F(T8,8,1) F(T9,9,1) F(TA,10,1) F(TB,11,1) F(TC,12,1) F(TD,13,1) F(TE,14,1) \
+ F(TF,15,1) F(TG,16,1) F(TH,17,1) F(TI,18,1) F(TJ,19,1) F(TK,20,1) F(TL,21,1) \
+ F(TM,22,1) F(TN,23,1) F(TO,24,1) F(TP,25,1) F(TQ,26,1) F(TR,27,1) \
+ M CFARGT27S(S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR)
+
+#define CFARGT20(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \
+ F(T1,1,0) F(T2,2,1) F(T3,3,1) F(T4,4,1) F(T5,5,1) F(T6,6,1) F(T7,7,1) \
+ F(T8,8,1) F(T9,9,1) F(TA,10,1) F(TB,11,1) F(TC,12,1) F(TD,13,1) F(TE,14,1) \
+ F(TF,15,1) F(TG,16,1) F(TH,17,1) F(TI,18,1) F(TJ,19,1) F(TK,20,1) \
+ S(T1,1) S(T2,2) S(T3,3) S(T4,4) S(T5,5) S(T6,6) S(T7,7) \
+ S(T8,8) S(T9,9) S(TA,10) S(TB,11) S(TC,12) S(TD,13) S(TE,14) \
+ S(TF,15) S(TG,16) S(TH,17) S(TI,18) S(TJ,19) S(TK,20)
+#define CFARGTA14(F,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE) \
+ F(T1,A1,1,0) F(T2,A2,2,1) F(T3,A3,3,1) F(T4,A4,4,1) F(T5,A5,5,1) F(T6,A6,6,1) \
+ F(T7,A7,7,1) F(T8,A8,8,1) F(T9,A9,9,1) F(TA,AA,10,1) F(TB,AB,11,1) F(TC,AC,12,1) \
+ F(TD,AD,13,1) F(TE,AE,14,1) S(T1,1) S(T2,2) S(T3,3) S(T4,4) \
+ S(T5,5) S(T6,6) S(T7,7) S(T8,8) S(T9,9) S(TA,10) \
+ S(TB,11) S(TC,12) S(TD,13) S(TE,14)
+#if MAX_PREPRO_ARGS>31
+#define CFARGTA20(F,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) \
+ F(T1,A1,1,0) F(T2,A2,2,1) F(T3,A3,3,1) F(T4,A4,4,1) F(T5,A5,5,1) F(T6,A6,6,1) \
+ F(T7,A7,7,1) F(T8,A8,8,1) F(T9,A9,9,1) F(TA,AA,10,1) F(TB,AB,11,1) F(TC,AC,12,1) \
+ F(TD,AD,13,1) F(TE,AE,14,1) F(TF,AF,15,1) F(TG,AG,16,1) F(TH,AH,17,1) F(TI,AI,18,1) \
+ F(TJ,AJ,19,1) F(TK,AK,20,1) S(T1,1) S(T2,2) S(T3,3) S(T4,4) \
+ S(T5,5) S(T6,6) S(T7,7) S(T8,8) S(T9,9) S(TA,10) \
+ S(TB,11) S(TC,12) S(TD,13) S(TE,14) S(TF,15) S(TG,16) \
+ S(TH,17) S(TI,18) S(TJ,19) S(TK,20)
+#define CFARGTA27(F,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR) \
+ F(T1,A1,1,0) F(T2,A2,2,1) F(T3,A3,3,1) F(T4,A4,4,1) F(T5,A5,5,1) F(T6,A6,6,1) \
+ F(T7,A7,7,1) F(T8,A8,8,1) F(T9,A9,9,1) F(TA,AA,10,1) F(TB,AB,11,1) F(TC,AC,12,1) \
+ F(TD,AD,13,1) F(TE,AE,14,1) F(TF,AF,15,1) F(TG,AG,16,1) F(TH,AH,17,1) F(TI,AI,18,1) \
+ F(TJ,AJ,19,1) F(TK,AK,20,1) F(TL,AL,21,1) F(TM,AM,22,1) F(TN,AN,23,1) F(TO,AO,24,1) \
+ F(TP,AP,25,1) F(TQ,AQ,26,1) F(TR,AR,27,1) S(T1,1) S(T2,2) S(T3,3) \
+ S(T4,4) S(T5,5) S(T6,6) S(T7,7) S(T8,8) S(T9,9) \
+ S(TA,10) S(TB,11) S(TC,12) S(TD,13) S(TE,14) S(TF,15) \
+ S(TG,16) S(TH,17) S(TI,18) S(TJ,19) S(TK,20) S(TL,21) \
+ S(TM,22) S(TN,23) S(TO,24) S(TP,25) S(TQ,26) S(TR,27)
+#endif
+#else
+#define CFARGT14(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ F(T1,1,0) S(T1,1) F(T2,2,1) S(T2,2) F(T3,3,1) S(T3,3) F(T4,4,1) S(T4,4) \
+ F(T5,5,1) S(T5,5) F(T6,6,1) S(T6,6) F(T7,7,1) S(T7,7) F(T8,8,1) S(T8,8) \
+ F(T9,9,1) S(T9,9) F(TA,10,1) S(TA,10) F(TB,11,1) S(TB,11) F(TC,12,1) S(TC,12) \
+ F(TD,13,1) S(TD,13) F(TE,14,1) S(TE,14)
+#define CFARGT27(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \
+ F(T1,1,0) S(T1,1) F(T2,2,1) S(T2,2) F(T3,3,1) S(T3,3) F(T4,4,1) S(T4,4) \
+ F(T5,5,1) S(T5,5) F(T6,6,1) S(T6,6) F(T7,7,1) S(T7,7) F(T8,8,1) S(T8,8) \
+ F(T9,9,1) S(T9,9) F(TA,10,1) S(TA,10) F(TB,11,1) S(TB,11) F(TC,12,1) S(TC,12) \
+ F(TD,13,1) S(TD,13) F(TE,14,1) S(TE,14) F(TF,15,1) S(TF,15) F(TG,16,1) S(TG,16) \
+ F(TH,17,1) S(TH,17) F(TI,18,1) S(TI,18) F(TJ,19,1) S(TJ,19) F(TK,20,1) S(TK,20) \
+ F(TL,21,1) S(TL,21) F(TM,22,1) S(TM,22) F(TN,23,1) S(TN,23) F(TO,24,1) S(TO,24) \
+ F(TP,25,1) S(TP,25) F(TQ,26,1) S(TQ,26) F(TR,27,1) S(TR,27)
+
+#define CFARGT20(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \
+ F(T1,1,0) S(T1,1) F(T2,2,1) S(T2,2) F(T3,3,1) S(T3,3) F(T4,4,1) S(T4,4) \
+ F(T5,5,1) S(T5,5) F(T6,6,1) S(T6,6) F(T7,7,1) S(T7,7) F(T8,8,1) S(T8,8) \
+ F(T9,9,1) S(T9,9) F(TA,10,1) S(TA,10) F(TB,11,1) S(TB,11) F(TC,12,1) S(TC,12) \
+ F(TD,13,1) S(TD,13) F(TE,14,1) S(TE,14) F(TF,15,1) S(TF,15) F(TG,16,1) S(TG,16) \
+ F(TH,17,1) S(TH,17) F(TI,18,1) S(TI,18) F(TJ,19,1) S(TJ,19) F(TK,20,1) S(TK,20)
+#define CFARGTA14(F,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE) \
+ F(T1,A1,1,0) S(T1,1) F(T2,A2,2,1) S(T2,2) F(T3,A3,3,1) S(T3,3) \
+ F(T4,A4,4,1) S(T4,4) F(T5,A5,5,1) S(T5,5) F(T6,A6,6,1) S(T6,6) \
+ F(T7,A7,7,1) S(T7,7) F(T8,A8,8,1) S(T8,8) F(T9,A9,9,1) S(T9,9) \
+ F(TA,AA,10,1) S(TA,10) F(TB,AB,11,1) S(TB,11) F(TC,AC,12,1) S(TC,12) \
+ F(TD,AD,13,1) S(TD,13) F(TE,AE,14,1) S(TE,14)
+#if MAX_PREPRO_ARGS>31
+#define CFARGTA20(F,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) \
+ F(T1,A1,1,0) S(T1,1) F(T2,A2,2,1) S(T2,2) F(T3,A3,3,1) S(T3,3) \
+ F(T4,A4,4,1) S(T4,4) F(T5,A5,5,1) S(T5,5) F(T6,A6,6,1) S(T6,6) \
+ F(T7,A7,7,1) S(T7,7) F(T8,A8,8,1) S(T8,8) F(T9,A9,9,1) S(T9,9) \
+ F(TA,AA,10,1) S(TA,10) F(TB,AB,11,1) S(TB,11) F(TC,AC,12,1) S(TC,12) \
+ F(TD,AD,13,1) S(TD,13) F(TE,AE,14,1) S(TE,14) F(TF,AF,15,1) S(TF,15) \
+ F(TG,AG,16,1) S(TG,16) F(TH,AH,17,1) S(TH,17) F(TI,AI,18,1) S(TI,18) \
+ F(TJ,AJ,19,1) S(TJ,19) F(TK,AK,20,1) S(TK,20)
+#define CFARGTA27(F,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR) \
+ F(T1,A1,1,0) S(T1,1) F(T2,A2,2,1) S(T2,2) F(T3,A3,3,1) S(T3,3) \
+ F(T4,A4,4,1) S(T4,4) F(T5,A5,5,1) S(T5,5) F(T6,A6,6,1) S(T6,6) \
+ F(T7,A7,7,1) S(T7,7) F(T8,A8,8,1) S(T8,8) F(T9,A9,9,1) S(T9,9) \
+ F(TA,AA,10,1) S(TA,10) F(TB,AB,11,1) S(TB,11) F(TC,AC,12,1) S(TC,12) \
+ F(TD,AD,13,1) S(TD,13) F(TE,AE,14,1) S(TE,14) F(TF,AF,15,1) S(TF,15) \
+ F(TG,AG,16,1) S(TG,16) F(TH,AH,17,1) S(TH,17) F(TI,AI,18,1) S(TI,18) \
+ F(TJ,AJ,19,1) S(TJ,19) F(TK,AK,20,1) S(TK,20) F(TL,AL,21,1) S(TL,21) \
+ F(TM,AM,22,1) S(TM,22) F(TN,AN,23,1) S(TN,23) F(TO,AO,24,1) S(TO,24) \
+ F(TP,AP,25,1) S(TP,25) F(TQ,AQ,26,1) S(TQ,26) F(TR,AR,27,1) S(TR,27)
+#endif
+#endif
+
+
+#define PROTOCCALLSFSUB1( UN,LN,T1) \
+ PROTOCCALLSFSUB14(UN,LN,T1,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB2( UN,LN,T1,T2) \
+ PROTOCCALLSFSUB14(UN,LN,T1,T2,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB3( UN,LN,T1,T2,T3) \
+ PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB4( UN,LN,T1,T2,T3,T4) \
+ PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB5( UN,LN,T1,T2,T3,T4,T5) \
+ PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB6( UN,LN,T1,T2,T3,T4,T5,T6) \
+ PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB7( UN,LN,T1,T2,T3,T4,T5,T6,T7) \
+ PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB8( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8) \
+ PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB9( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9) \
+ PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA) \
+ PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB11(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB) \
+ PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB12(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC) \
+ PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,CF_0,CF_0)
+#define PROTOCCALLSFSUB13(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD) \
+ PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,CF_0)
+
+
+#define PROTOCCALLSFSUB15(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF) \
+ PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB16(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG) \
+ PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB17(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH) \
+ PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB18(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI) \
+ PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,CF_0,CF_0)
+#define PROTOCCALLSFSUB19(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ) \
+ PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,CF_0)
+
+#define PROTOCCALLSFSUB21(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL) \
+ PROTOCCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB22(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM) \
+ PROTOCCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB23(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN) \
+ PROTOCCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB24(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO) \
+ PROTOCCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB25(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP) \
+ PROTOCCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,CF_0,CF_0)
+#define PROTOCCALLSFSUB26(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ) \
+ PROTOCCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,CF_0)
+
+
+#ifndef FCALLSC_QUALIFIER
+#ifdef VISUAL_CPLUSPLUS
+#define FCALLSC_QUALIFIER __stdcall
+#else
+#define FCALLSC_QUALIFIER
+#endif
+#endif
+
+#ifdef __cplusplus
+#define CFextern extern "C"
+#else
+#define CFextern extern
+#endif
+
+
+#ifdef CFSUBASFUN
+#define PROTOCCALLSFSUB0(UN,LN) \
+ PROTOCCALLSFFUN0( VOID,UN,LN)
+#define PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ PROTOCCALLSFFUN14(VOID,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
+#define PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK)\
+ PROTOCCALLSFFUN20(VOID,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK)
+#define PROTOCCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR)\
+ PROTOCCALLSFFUN27(VOID,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR)
+#else
+/* Note: Prevent compiler warnings, null #define PROTOCCALLSFSUB14/20 after
+ #include-ing cfortran.h if calling the FORTRAN wrapper within the same
+ source code where the wrapper is created. */
+#define PROTOCCALLSFSUB0(UN,LN) _(VOID,_cfPU)(CFC_(UN,LN))();
+#ifndef __CF__KnR
+#define PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ _(VOID,_cfPU)(CFC_(UN,LN))( CFARGT14(NCF,KCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) );
+#define PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK)\
+ _(VOID,_cfPU)(CFC_(UN,LN))( CFARGT20(NCF,KCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) );
+#define PROTOCCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR)\
+ _(VOID,_cfPU)(CFC_(UN,LN))( CFARGT27(NCF,KCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) );
+#else
+#define PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ PROTOCCALLSFSUB0(UN,LN)
+#define PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \
+ PROTOCCALLSFSUB0(UN,LN)
+#define PROTOCCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \
+ PROTOCCALLSFSUB0(UN,LN)
+#endif
+#endif
+
+
+#ifdef OLD_VAXC /* Allow %CC-I-PARAMNOTUSED. */
+#pragma standard
+#endif
+
+
+#define CCALLSFSUB1( UN,LN,T1, A1) \
+ CCALLSFSUB5 (UN,LN,T1,CF_0,CF_0,CF_0,CF_0,A1,0,0,0,0)
+#define CCALLSFSUB2( UN,LN,T1,T2, A1,A2) \
+ CCALLSFSUB5 (UN,LN,T1,T2,CF_0,CF_0,CF_0,A1,A2,0,0,0)
+#define CCALLSFSUB3( UN,LN,T1,T2,T3, A1,A2,A3) \
+ CCALLSFSUB5 (UN,LN,T1,T2,T3,CF_0,CF_0,A1,A2,A3,0,0)
+#define CCALLSFSUB4( UN,LN,T1,T2,T3,T4, A1,A2,A3,A4)\
+ CCALLSFSUB5 (UN,LN,T1,T2,T3,T4,CF_0,A1,A2,A3,A4,0)
+#define CCALLSFSUB5( UN,LN,T1,T2,T3,T4,T5, A1,A2,A3,A4,A5) \
+ CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,CF_0,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,0,0,0,0,0)
+#define CCALLSFSUB6( UN,LN,T1,T2,T3,T4,T5,T6, A1,A2,A3,A4,A5,A6) \
+ CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,0,0,0,0)
+#define CCALLSFSUB7( UN,LN,T1,T2,T3,T4,T5,T6,T7, A1,A2,A3,A4,A5,A6,A7) \
+ CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,T7,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,0,0,0)
+#define CCALLSFSUB8( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8, A1,A2,A3,A4,A5,A6,A7,A8) \
+ CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,0,0)
+#define CCALLSFSUB9( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,A1,A2,A3,A4,A5,A6,A7,A8,A9)\
+ CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,0)
+#define CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA)\
+ CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,0,0,0,0)
+#define CCALLSFSUB11(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB)\
+ CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,0,0,0)
+#define CCALLSFSUB12(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC)\
+ CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,0,0)
+#define CCALLSFSUB13(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD)\
+ CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,0)
+
+#ifdef __cplusplus
+#define CPPPROTOCLSFSUB0( UN,LN)
+#define CPPPROTOCLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
+#define CPPPROTOCLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK)
+#define CPPPROTOCLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR)
+#else
+#define CPPPROTOCLSFSUB0(UN,LN) \
+ PROTOCCALLSFSUB0(UN,LN)
+#define CPPPROTOCLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
+#define CPPPROTOCLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \
+ PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK)
+#define CPPPROTOCLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \
+ PROTOCCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR)
+#endif
+
+#ifdef CFSUBASFUN
+#define CCALLSFSUB0(UN,LN) CCALLSFFUN0(UN,LN)
+#define CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE)\
+ CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE)
+#else
+/* do{...}while(0) allows if(a==b) FORT(); else BORT(); */
+#define CCALLSFSUB0( UN,LN) do{CPPPROTOCLSFSUB0(UN,LN) CFC_(UN,LN)();}while(0)
+#define CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE)\
+do{VVCF(T1,A1,B1) VVCF(T2,A2,B2) VVCF(T3,A3,B3) VVCF(T4,A4,B4) VVCF(T5,A5,B5) \
+ VVCF(T6,A6,B6) VVCF(T7,A7,B7) VVCF(T8,A8,B8) VVCF(T9,A9,B9) VVCF(TA,AA,B10) \
+ VVCF(TB,AB,B11) VVCF(TC,AC,B12) VVCF(TD,AD,B13) VVCF(TE,AE,B14) \
+ CPPPROTOCLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ ACF(LN,T1,A1,1) ACF(LN,T2,A2,2) ACF(LN,T3,A3,3) \
+ ACF(LN,T4,A4,4) ACF(LN,T5,A5,5) ACF(LN,T6,A6,6) ACF(LN,T7,A7,7) \
+ ACF(LN,T8,A8,8) ACF(LN,T9,A9,9) ACF(LN,TA,AA,10) ACF(LN,TB,AB,11) \
+ ACF(LN,TC,AC,12) ACF(LN,TD,AD,13) ACF(LN,TE,AE,14) \
+ CFC_(UN,LN)( CFARGTA14(AACF,JCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE) );\
+ WCF(T1,A1,1) WCF(T2,A2,2) WCF(T3,A3,3) WCF(T4,A4,4) WCF(T5,A5,5) \
+ WCF(T6,A6,6) WCF(T7,A7,7) WCF(T8,A8,8) WCF(T9,A9,9) WCF(TA,AA,10) \
+ WCF(TB,AB,11) WCF(TC,AC,12) WCF(TD,AD,13) WCF(TE,AE,14) }while(0)
+#endif
+
+
+#if MAX_PREPRO_ARGS>31
+#define CCALLSFSUB15(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF)\
+ CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,CF_0,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,0,0,0,0,0)
+#define CCALLSFSUB16(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG)\
+ CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,0,0,0,0)
+#define CCALLSFSUB17(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH)\
+ CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,0,0,0)
+#define CCALLSFSUB18(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI)\
+ CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,0,0)
+#define CCALLSFSUB19(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ)\
+ CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,0)
+
+#ifdef CFSUBASFUN
+#define CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH, \
+ TI,TJ,TK, A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) \
+ CCALLSFFUN20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH, \
+ TI,TJ,TK, A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK)
+#else
+#define CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH, \
+ TI,TJ,TK, A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) \
+do{VVCF(T1,A1,B1) VVCF(T2,A2,B2) VVCF(T3,A3,B3) VVCF(T4,A4,B4) VVCF(T5,A5,B5) \
+ VVCF(T6,A6,B6) VVCF(T7,A7,B7) VVCF(T8,A8,B8) VVCF(T9,A9,B9) VVCF(TA,AA,B10) \
+ VVCF(TB,AB,B11) VVCF(TC,AC,B12) VVCF(TD,AD,B13) VVCF(TE,AE,B14) VVCF(TF,AF,B15) \
+ VVCF(TG,AG,B16) VVCF(TH,AH,B17) VVCF(TI,AI,B18) VVCF(TJ,AJ,B19) VVCF(TK,AK,B20) \
+ CPPPROTOCLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \
+ ACF(LN,T1,A1,1) ACF(LN,T2,A2,2) ACF(LN,T3,A3,3) ACF(LN,T4,A4,4) \
+ ACF(LN,T5,A5,5) ACF(LN,T6,A6,6) ACF(LN,T7,A7,7) ACF(LN,T8,A8,8) \
+ ACF(LN,T9,A9,9) ACF(LN,TA,AA,10) ACF(LN,TB,AB,11) ACF(LN,TC,AC,12) \
+ ACF(LN,TD,AD,13) ACF(LN,TE,AE,14) ACF(LN,TF,AF,15) ACF(LN,TG,AG,16) \
+ ACF(LN,TH,AH,17) ACF(LN,TI,AI,18) ACF(LN,TJ,AJ,19) ACF(LN,TK,AK,20) \
+ CFC_(UN,LN)( CFARGTA20(AACF,JCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) ); \
+ WCF(T1,A1,1) WCF(T2,A2,2) WCF(T3,A3,3) WCF(T4,A4,4) WCF(T5,A5,5) WCF(T6,A6,6) \
+ WCF(T7,A7,7) WCF(T8,A8,8) WCF(T9,A9,9) WCF(TA,AA,10) WCF(TB,AB,11) WCF(TC,AC,12) \
+ WCF(TD,AD,13) WCF(TE,AE,14) WCF(TF,AF,15) WCF(TG,AG,16) WCF(TH,AH,17) WCF(TI,AI,18) \
+ WCF(TJ,AJ,19) WCF(TK,AK,20) }while(0)
+#endif
+#endif /* MAX_PREPRO_ARGS */
+
+#if MAX_PREPRO_ARGS>31
+#define CCALLSFSUB21(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL)\
+ CCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,0,0,0,0,0,0)
+#define CCALLSFSUB22(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM)\
+ CCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,CF_0,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,0,0,0,0,0)
+#define CCALLSFSUB23(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN)\
+ CCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,0,0,0,0)
+#define CCALLSFSUB24(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO)\
+ CCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,0,0,0)
+#define CCALLSFSUB25(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP)\
+ CCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,0,0)
+#define CCALLSFSUB26(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ)\
+ CCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,0)
+
+#ifdef CFSUBASFUN
+#define CCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR, \
+ A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR) \
+ CCALLSFFUN27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR, \
+ A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR)
+#else
+#define CCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR, \
+ A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR) \
+do{VVCF(T1,A1,B1) VVCF(T2,A2,B2) VVCF(T3,A3,B3) VVCF(T4,A4,B4) VVCF(T5,A5,B5) \
+ VVCF(T6,A6,B6) VVCF(T7,A7,B7) VVCF(T8,A8,B8) VVCF(T9,A9,B9) VVCF(TA,AA,B10) \
+ VVCF(TB,AB,B11) VVCF(TC,AC,B12) VVCF(TD,AD,B13) VVCF(TE,AE,B14) VVCF(TF,AF,B15) \
+ VVCF(TG,AG,B16) VVCF(TH,AH,B17) VVCF(TI,AI,B18) VVCF(TJ,AJ,B19) VVCF(TK,AK,B20) \
+ VVCF(TL,AL,B21) VVCF(TM,AM,B22) VVCF(TN,AN,B23) VVCF(TO,AO,B24) VVCF(TP,AP,B25) \
+ VVCF(TQ,AQ,B26) VVCF(TR,AR,B27) \
+ CPPPROTOCLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \
+ ACF(LN,T1,A1,1) ACF(LN,T2,A2,2) ACF(LN,T3,A3,3) ACF(LN,T4,A4,4) \
+ ACF(LN,T5,A5,5) ACF(LN,T6,A6,6) ACF(LN,T7,A7,7) ACF(LN,T8,A8,8) \
+ ACF(LN,T9,A9,9) ACF(LN,TA,AA,10) ACF(LN,TB,AB,11) ACF(LN,TC,AC,12) \
+ ACF(LN,TD,AD,13) ACF(LN,TE,AE,14) ACF(LN,TF,AF,15) ACF(LN,TG,AG,16) \
+ ACF(LN,TH,AH,17) ACF(LN,TI,AI,18) ACF(LN,TJ,AJ,19) ACF(LN,TK,AK,20) \
+ ACF(LN,TL,AL,21) ACF(LN,TM,AM,22) ACF(LN,TN,AN,23) ACF(LN,TO,AO,24) \
+ ACF(LN,TP,AP,25) ACF(LN,TQ,AQ,26) ACF(LN,TR,AR,27) \
+ CFC_(UN,LN)( CFARGTA27(AACF,JCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR,\
+ A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR) ); \
+ WCF(T1,A1,1) WCF(T2,A2,2) WCF(T3,A3,3) WCF(T4,A4,4) WCF(T5,A5,5) WCF(T6,A6,6) \
+ WCF(T7,A7,7) WCF(T8,A8,8) WCF(T9,A9,9) WCF(TA,AA,10) WCF(TB,AB,11) WCF(TC,AC,12) \
+ WCF(TD,AD,13) WCF(TE,AE,14) WCF(TF,AF,15) WCF(TG,AG,16) WCF(TH,AH,17) WCF(TI,AI,18) \
+ WCF(TJ,AJ,19) WCF(TK,AK,20) WCF(TL,AL,21) WCF(TM,AM,22) WCF(TN,AN,23) WCF(TO,AO,24) \
+ WCF(TP,AP,25) WCF(TQ,AQ,26) WCF(TR,AR,27) }while(0)
+#endif
+#endif /* MAX_PREPRO_ARGS */
+
+/*-------------------------------------------------------------------------*/
+
+/* UTILITIES FOR C TO CALL FORTRAN FUNCTIONS */
+
+/*N.B. PROTOCCALLSFFUNn(..) generates code, whether or not the FORTRAN
+ function is called. Therefore, especially for creator's of C header files
+ for large FORTRAN libraries which include many functions, to reduce
+ compile time and object code size, it may be desirable to create
+ preprocessor directives to allow users to create code for only those
+ functions which they use. */
+
+/* The following defines the maximum length string that a function can return.
+ Of course it may be undefine-d and re-define-d before individual
+ PROTOCCALLSFFUNn(..) as required. It would also be nice to have this derived
+ from the individual machines' limits. */
+#define MAX_LEN_FORTRAN_FUNCTION_STRING 0x4FE
+
+/* The following defines a character used by CFORTRAN.H to flag the end of a
+ string coming out of a FORTRAN routine. */
+#define CFORTRAN_NON_CHAR 0x7F
+
+#ifdef OLD_VAXC /* Prevent %CC-I-PARAMNOTUSED. */
+#pragma nostandard
+#endif
+
+#define _SEP_(TN,C,cfCOMMA) _(__SEP_,C)(TN,cfCOMMA)
+#define __SEP_0(TN,cfCOMMA)
+#define __SEP_1(TN,cfCOMMA) _Icf(2,SEP,TN,cfCOMMA,0)
+#define INT_cfSEP(T,B) _(A,B)
+#define INTV_cfSEP(T,B) INT_cfSEP(T,B)
+#define INTVV_cfSEP(T,B) INT_cfSEP(T,B)
+#define INTVVV_cfSEP(T,B) INT_cfSEP(T,B)
+#define INTVVVV_cfSEP(T,B) INT_cfSEP(T,B)
+#define INTVVVVV_cfSEP(T,B) INT_cfSEP(T,B)
+#define INTVVVVVV_cfSEP(T,B) INT_cfSEP(T,B)
+#define INTVVVVVVV_cfSEP(T,B) INT_cfSEP(T,B)
+#define PINT_cfSEP(T,B) INT_cfSEP(T,B)
+#define PVOID_cfSEP(T,B) INT_cfSEP(T,B)
+#define ROUTINE_cfSEP(T,B) INT_cfSEP(T,B)
+#define SIMPLE_cfSEP(T,B) INT_cfSEP(T,B)
+#define VOID_cfSEP(T,B) INT_cfSEP(T,B) /* For FORTRAN calls C subr.s.*/
+#define STRING_cfSEP(T,B) INT_cfSEP(T,B)
+#define STRINGV_cfSEP(T,B) INT_cfSEP(T,B)
+#define PSTRING_cfSEP(T,B) INT_cfSEP(T,B)
+#define PSTRINGV_cfSEP(T,B) INT_cfSEP(T,B)
+#define PNSTRING_cfSEP(T,B) INT_cfSEP(T,B)
+#define PPSTRING_cfSEP(T,B) INT_cfSEP(T,B)
+#define ZTRINGV_cfSEP(T,B) INT_cfSEP(T,B)
+#define PZTRINGV_cfSEP(T,B) INT_cfSEP(T,B)
+
+#if defined(SIGNED_BYTE) || !defined(UNSIGNED_BYTE)
+#ifdef OLD_VAXC
+#define INTEGER_BYTE char /* Old VAXC barfs on 'signed char' */
+#else
+#define INTEGER_BYTE signed char /* default */
+#endif
+#else
+#define INTEGER_BYTE unsigned char
+#endif
+#define BYTEVVVVVVV_cfTYPE INTEGER_BYTE
+#define DOUBLEVVVVVVV_cfTYPE DOUBLE_PRECISION
+#define FLOATVVVVVVV_cfTYPE FORTRAN_REAL
+#define INTVVVVVVV_cfTYPE int
+#define LOGICALVVVVVVV_cfTYPE int
+#define LONGVVVVVVV_cfTYPE long
+#define SHORTVVVVVVV_cfTYPE short
+#define PBYTE_cfTYPE INTEGER_BYTE
+#define PDOUBLE_cfTYPE DOUBLE_PRECISION
+#define PFLOAT_cfTYPE FORTRAN_REAL
+#define PINT_cfTYPE int
+#define PLOGICAL_cfTYPE int
+#define PLONG_cfTYPE long
+#define PSHORT_cfTYPE short
+
+#define CFARGS0(A,T,V,W,X,Y,Z) _3(T,_cf,A)
+#define CFARGS1(A,T,V,W,X,Y,Z) _3(T,_cf,A)(V)
+#define CFARGS2(A,T,V,W,X,Y,Z) _3(T,_cf,A)(V,W)
+#define CFARGS3(A,T,V,W,X,Y,Z) _3(T,_cf,A)(V,W,X)
+#define CFARGS4(A,T,V,W,X,Y,Z) _3(T,_cf,A)(V,W,X,Y)
+#define CFARGS5(A,T,V,W,X,Y,Z) _3(T,_cf,A)(V,W,X,Y,Z)
+
+#define _Icf(N,T,I,X,Y) _(I,_cfINT)(N,T,I,X,Y,0)
+#define _Icf4(N,T,I,X,Y,Z) _(I,_cfINT)(N,T,I,X,Y,Z)
+#define BYTE_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z)
+#define DOUBLE_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INT,B,X,Y,Z,0)
+#define FLOAT_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z)
+#define INT_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z)
+#define LOGICAL_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z)
+#define LONG_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z)
+#define SHORT_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z)
+#define PBYTE_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z)
+#define PDOUBLE_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,PINT,B,X,Y,Z,0)
+#define PFLOAT_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z)
+#define PINT_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z)
+#define PLOGICAL_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z)
+#define PLONG_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z)
+#define PSHORT_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z)
+#define BYTEV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z)
+#define BYTEVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z)
+#define BYTEVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z)
+#define BYTEVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z)
+#define BYTEVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z)
+#define BYTEVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z)
+#define BYTEVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z)
+#define DOUBLEV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTV,B,X,Y,Z,0)
+#define DOUBLEVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVV,B,X,Y,Z,0)
+#define DOUBLEVVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVVV,B,X,Y,Z,0)
+#define DOUBLEVVVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVVVV,B,X,Y,Z,0)
+#define DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVVVVV,B,X,Y,Z,0)
+#define DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVVVVVV,B,X,Y,Z,0)
+#define DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVVVVVVV,B,X,Y,Z,0)
+#define FLOATV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z)
+#define FLOATVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z)
+#define FLOATVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z)
+#define FLOATVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z)
+#define FLOATVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z)
+#define FLOATVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z)
+#define FLOATVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z)
+#define INTV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z)
+#define INTVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z)
+#define INTVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z)
+#define INTVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z)
+#define INTVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z)
+#define INTVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z)
+#define INTVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z)
+#define LOGICALV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z)
+#define LOGICALVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z)
+#define LOGICALVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z)
+#define LOGICALVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z)
+#define LOGICALVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z)
+#define LOGICALVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z)
+#define LOGICALVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z)
+#define LONGV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z)
+#define LONGVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z)
+#define LONGVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z)
+#define LONGVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z)
+#define LONGVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z)
+#define LONGVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z)
+#define LONGVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z)
+#define SHORTV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z)
+#define SHORTVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z)
+#define SHORTVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z)
+#define SHORTVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z)
+#define SHORTVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z)
+#define SHORTVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z)
+#define SHORTVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z)
+#define PVOID_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,B,B,X,Y,Z,0)
+#define ROUTINE_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
+/*CRAY coughs on the first,
+ i.e. the usual trouble of not being able to
+ define macros to macros with arguments.
+ New ultrix is worse, it coughs on all such uses.
+ */
+/*#define SIMPLE_cfINT PVOID_cfINT*/
+#define SIMPLE_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
+#define VOID_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
+#define STRING_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
+#define STRINGV_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
+#define PSTRING_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
+#define PSTRINGV_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
+#define PNSTRING_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
+#define PPSTRING_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
+#define ZTRINGV_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
+#define PZTRINGV_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
+#define CF_0_cfINT(N,A,B,X,Y,Z)
+
+
+#define UCF(TN,I,C) _SEP_(TN,C,cfCOMMA) _Icf(2,U,TN,_(A,I),0)
+#define UUCF(TN,I,C) _SEP_(TN,C,cfCOMMA) _SEP_(TN,1,I)
+#define UUUCF(TN,I,C) _SEP_(TN,C,cfCOLON) _Icf(2,U,TN,_(A,I),0)
+#define INT_cfU(T,A) _(T,VVVVVVV_cfTYPE) A
+#define INTV_cfU(T,A) _(T,VVVVVV_cfTYPE) * A
+#define INTVV_cfU(T,A) _(T,VVVVV_cfTYPE) * A
+#define INTVVV_cfU(T,A) _(T,VVVV_cfTYPE) * A
+#define INTVVVV_cfU(T,A) _(T,VVV_cfTYPE) * A
+#define INTVVVVV_cfU(T,A) _(T,VV_cfTYPE) * A
+#define INTVVVVVV_cfU(T,A) _(T,V_cfTYPE) * A
+#define INTVVVVVVV_cfU(T,A) _(T,_cfTYPE) * A
+#define PINT_cfU(T,A) _(T,_cfTYPE) * A
+#define PVOID_cfU(T,A) void *A
+#define ROUTINE_cfU(T,A) void (*A)(CF_NULL_PROTO)
+#define VOID_cfU(T,A) void A /* Needed for C calls FORTRAN sub.s. */
+#define STRING_cfU(T,A) char *A /* via VOID and wrapper. */
+#define STRINGV_cfU(T,A) char *A
+#define PSTRING_cfU(T,A) char *A
+#define PSTRINGV_cfU(T,A) char *A
+#define ZTRINGV_cfU(T,A) char *A
+#define PZTRINGV_cfU(T,A) char *A
+
+/* VOID breaks U into U and UU. */
+#define INT_cfUU(T,A) _(T,VVVVVVV_cfTYPE) A
+#define VOID_cfUU(T,A) /* Needed for FORTRAN calls C sub.s. */
+#define STRING_cfUU(T,A) char *A
+
+
+#define BYTE_cfPU(A) CFextern INTEGER_BYTE FCALLSC_QUALIFIER A
+#define DOUBLE_cfPU(A) CFextern DOUBLE_PRECISION FCALLSC_QUALIFIER A
+#if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT))
+#define FLOAT_cfPU(A) CFextern FORTRAN_REAL FCALLSC_QUALIFIER A
+#else
+#define FLOAT_cfPU(A) CFextern FLOATFUNCTIONTYPE FCALLSC_QUALIFIER A
+#endif
+#define INT_cfPU(A) CFextern int FCALLSC_QUALIFIER A
+#define LOGICAL_cfPU(A) CFextern int FCALLSC_QUALIFIER A
+#define LONG_cfPU(A) CFextern long FCALLSC_QUALIFIER A
+#define SHORT_cfPU(A) CFextern short FCALLSC_QUALIFIER A
+#define STRING_cfPU(A) CFextern void FCALLSC_QUALIFIER A
+#define VOID_cfPU(A) CFextern void FCALLSC_QUALIFIER A
+
+#define BYTE_cfE INTEGER_BYTE A0;
+#define DOUBLE_cfE DOUBLE_PRECISION A0;
+#if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT))
+#define FLOAT_cfE FORTRAN_REAL A0;
+#else
+#define FLOAT_cfE FORTRAN_REAL AA0; FLOATFUNCTIONTYPE A0;
+#endif
+#define INT_cfE int A0;
+#define LOGICAL_cfE int A0;
+#define LONG_cfE long A0;
+#define SHORT_cfE short A0;
+#define VOID_cfE
+#ifdef vmsFortran
+#define STRING_cfE static char AA0[1+MAX_LEN_FORTRAN_FUNCTION_STRING]; \
+ static fstring A0 = \
+ {MAX_LEN_FORTRAN_FUNCTION_STRING,DSC$K_DTYPE_T,DSC$K_CLASS_S,AA0};\
+ memset(AA0, CFORTRAN_NON_CHAR, MAX_LEN_FORTRAN_FUNCTION_STRING);\
+ *(AA0+MAX_LEN_FORTRAN_FUNCTION_STRING)='\0';
+#else
+#ifdef CRAYFortran
+#define STRING_cfE static char AA0[1+MAX_LEN_FORTRAN_FUNCTION_STRING]; \
+ static _fcd A0; *(AA0+MAX_LEN_FORTRAN_FUNCTION_STRING)='\0';\
+ memset(AA0,CFORTRAN_NON_CHAR, MAX_LEN_FORTRAN_FUNCTION_STRING);\
+ A0 = _cptofcd(AA0,MAX_LEN_FORTRAN_FUNCTION_STRING);
+#else
+/* 'cc: SC3.0.1 13 Jul 1994' barfs on char A0[0x4FE+1];
+ * char A0[0x4FE +1]; char A0[1+0x4FE]; are both OK. */
+#define STRING_cfE static char A0[1+MAX_LEN_FORTRAN_FUNCTION_STRING]; \
+ memset(A0, CFORTRAN_NON_CHAR, \
+ MAX_LEN_FORTRAN_FUNCTION_STRING); \
+ *(A0+MAX_LEN_FORTRAN_FUNCTION_STRING)='\0';
+#endif
+#endif
+/* ESTRING must use static char. array which is guaranteed to exist after
+ function returns. */
+
+/* N.B.i) The diff. for 0 (Zero) and >=1 arguments.
+ ii)That the following create an unmatched bracket, i.e. '(', which
+ must of course be matched in the call.
+ iii)Commas must be handled very carefully */
+#define INT_cfGZ(T,UN,LN) A0=CFC_(UN,LN)(
+#define VOID_cfGZ(T,UN,LN) CFC_(UN,LN)(
+#ifdef vmsFortran
+#define STRING_cfGZ(T,UN,LN) CFC_(UN,LN)(&A0
+#else
+#if defined(CRAYFortran) || defined(AbsoftUNIXFortran) || defined(AbsoftProFortran)
+#define STRING_cfGZ(T,UN,LN) CFC_(UN,LN)( A0
+#else
+#define STRING_cfGZ(T,UN,LN) CFC_(UN,LN)( A0,MAX_LEN_FORTRAN_FUNCTION_STRING
+#endif
+#endif
+
+#define INT_cfG(T,UN,LN) INT_cfGZ(T,UN,LN)
+#define VOID_cfG(T,UN,LN) VOID_cfGZ(T,UN,LN)
+#define STRING_cfG(T,UN,LN) STRING_cfGZ(T,UN,LN), /*, is only diff. from _cfG*/
+
+#define BYTEVVVVVVV_cfPP
+#define INTVVVVVVV_cfPP /* These complement FLOATVVVVVVV_cfPP. */
+#define DOUBLEVVVVVVV_cfPP
+#define LOGICALVVVVVVV_cfPP
+#define LONGVVVVVVV_cfPP
+#define SHORTVVVVVVV_cfPP
+#define PBYTE_cfPP
+#define PINT_cfPP
+#define PDOUBLE_cfPP
+#define PLOGICAL_cfPP
+#define PLONG_cfPP
+#define PSHORT_cfPP
+#define PFLOAT_cfPP FLOATVVVVVVV_cfPP
+
+#define BCF(TN,AN,C) _SEP_(TN,C,cfCOMMA) _Icf(2,B,TN,AN,0)
+#define INT_cfB(T,A) (_(T,VVVVVVV_cfTYPE)) A
+#define INTV_cfB(T,A) A
+#define INTVV_cfB(T,A) (A)[0]
+#define INTVVV_cfB(T,A) (A)[0][0]
+#define INTVVVV_cfB(T,A) (A)[0][0][0]
+#define INTVVVVV_cfB(T,A) (A)[0][0][0][0]
+#define INTVVVVVV_cfB(T,A) (A)[0][0][0][0][0]
+#define INTVVVVVVV_cfB(T,A) (A)[0][0][0][0][0][0]
+#define PINT_cfB(T,A) _(T,_cfPP)&A
+#define STRING_cfB(T,A) (char *) A
+#define STRINGV_cfB(T,A) (char *) A
+#define PSTRING_cfB(T,A) (char *) A
+#define PSTRINGV_cfB(T,A) (char *) A
+#define PVOID_cfB(T,A) (void *) A
+#define ROUTINE_cfB(T,A) (cfCAST_FUNCTION)A
+#define ZTRINGV_cfB(T,A) (char *) A
+#define PZTRINGV_cfB(T,A) (char *) A
+
+#define SCF(TN,NAME,I,A) _(TN,_cfSTR)(3,S,NAME,I,A,0,0)
+#define DEFAULT_cfS(M,I,A)
+#define LOGICAL_cfS(M,I,A)
+#define PLOGICAL_cfS(M,I,A)
+#define STRING_cfS(M,I,A) ,sizeof(A)
+#define STRINGV_cfS(M,I,A) ,( (unsigned)0xFFFF*firstindexlength(A) \
+ +secondindexlength(A))
+#define PSTRING_cfS(M,I,A) ,sizeof(A)
+#define PSTRINGV_cfS(M,I,A) STRINGV_cfS(M,I,A)
+#define ZTRINGV_cfS(M,I,A)
+#define PZTRINGV_cfS(M,I,A)
+
+#define HCF(TN,I) _(TN,_cfSTR)(3,H,cfCOMMA, H,_(C,I),0,0)
+#define HHCF(TN,I) _(TN,_cfSTR)(3,H,cfCOMMA,HH,_(C,I),0,0)
+#define HHHCF(TN,I) _(TN,_cfSTR)(3,H,cfCOLON, H,_(C,I),0,0)
+#define H_CF_SPECIAL unsigned
+#define HH_CF_SPECIAL
+#define DEFAULT_cfH(M,I,A)
+#define LOGICAL_cfH(S,U,B)
+#define PLOGICAL_cfH(S,U,B)
+#define STRING_cfH(S,U,B) _(A,S) _(U,_CF_SPECIAL) B
+#define STRINGV_cfH(S,U,B) STRING_cfH(S,U,B)
+#define PSTRING_cfH(S,U,B) STRING_cfH(S,U,B)
+#define PSTRINGV_cfH(S,U,B) STRING_cfH(S,U,B)
+#define PNSTRING_cfH(S,U,B) STRING_cfH(S,U,B)
+#define PPSTRING_cfH(S,U,B) STRING_cfH(S,U,B)
+#define ZTRINGV_cfH(S,U,B)
+#define PZTRINGV_cfH(S,U,B)
+
+/* Need VOID_cfSTR because Absoft forced function types go through _cfSTR. */
+/* No spaces inside expansion. They screws up macro catenation kludge. */
+#define VOID_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define BYTE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define DOUBLE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define FLOAT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define INT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LOGICAL_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,LOGICAL,A,B,C,D,E)
+#define LONG_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define SHORT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define BYTEV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define BYTEVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define BYTEVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define BYTEVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define BYTEVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define BYTEVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define BYTEVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define DOUBLEV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define DOUBLEVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define DOUBLEVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define DOUBLEVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define DOUBLEVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define DOUBLEVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define DOUBLEVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define FLOATV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define FLOATVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define FLOATVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define FLOATVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define FLOATVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define FLOATVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define FLOATVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define INTV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define INTVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define INTVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define INTVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define INTVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define INTVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define INTVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LOGICALV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LOGICALVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LOGICALVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LOGICALVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LOGICALVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LOGICALVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LOGICALVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LONGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LONGVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LONGVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LONGVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LONGVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LONGVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LONGVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define SHORTV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define SHORTVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define SHORTVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define SHORTVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define SHORTVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define SHORTVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define SHORTVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define PBYTE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define PDOUBLE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define PFLOAT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define PINT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define PLOGICAL_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PLOGICAL,A,B,C,D,E)
+#define PLONG_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define PSHORT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define STRING_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,STRING,A,B,C,D,E)
+#define PSTRING_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PSTRING,A,B,C,D,E)
+#define STRINGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,STRINGV,A,B,C,D,E)
+#define PSTRINGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PSTRINGV,A,B,C,D,E)
+#define PNSTRING_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PNSTRING,A,B,C,D,E)
+#define PPSTRING_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PPSTRING,A,B,C,D,E)
+#define PVOID_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define ROUTINE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define SIMPLE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define ZTRINGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,ZTRINGV,A,B,C,D,E)
+#define PZTRINGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PZTRINGV,A,B,C,D,E)
+#define CF_0_cfSTR(N,T,A,B,C,D,E)
+
+/* See ACF table comments, which explain why CCF was split into two. */
+#define CCF(NAME,TN,I) _(TN,_cfSTR)(5,C,NAME,I,_(A,I),_(B,I),_(C,I))
+#define DEFAULT_cfC(M,I,A,B,C)
+#define LOGICAL_cfC(M,I,A,B,C) A=C2FLOGICAL( A);
+#define PLOGICAL_cfC(M,I,A,B,C) *A=C2FLOGICAL(*A);
+#ifdef vmsFortran
+#define STRING_cfC(M,I,A,B,C) (B.clen=strlen(A),B.f.dsc$a_pointer=A, \
+ C==sizeof(char*)||C==(unsigned)(B.clen+1)?B.f.dsc$w_length=B.clen: \
+ (memset((A)+B.clen,' ',C-B.clen-1),A[B.f.dsc$w_length=C-1]='\0'));
+ /* PSTRING_cfC to beware of array A which does not contain any \0. */
+#define PSTRING_cfC(M,I,A,B,C) (B.dsc$a_pointer=A, C==sizeof(char*) ? \
+ B.dsc$w_length=strlen(A): (A[C-1]='\0',B.dsc$w_length=strlen(A), \
+ memset((A)+B.dsc$w_length,' ',C-B.dsc$w_length-1), B.dsc$w_length=C-1));
+#else
+#define STRING_cfC(M,I,A,B,C) (B.clen=strlen(A), \
+ C==sizeof(char*)||C==(unsigned)(B.clen+1)?B.flen=B.clen: \
+ (memset((A)+B.clen,' ',C-B.clen-1),A[B.flen=C-1]='\0'));
+#define PSTRING_cfC(M,I,A,B,C) (C==sizeof(char*)? B=strlen(A): \
+ (A[C-1]='\0',B=strlen(A),memset((A)+B,' ',C-B-1),B=C-1));
+#endif
+ /* For CRAYFortran for (P)STRINGV_cfC, B.fs is set, but irrelevant. */
+#define STRINGV_cfC(M,I,A,B,C) \
+ AATRINGV_cfA( A,B,(C/0xFFFF)*(C%0xFFFF),C/0xFFFF,C%0xFFFF)
+#define PSTRINGV_cfC(M,I,A,B,C) \
+ APATRINGV_cfA( A,B,(C/0xFFFF)*(C%0xFFFF),C/0xFFFF,C%0xFFFF)
+#define ZTRINGV_cfC(M,I,A,B,C) \
+ AATRINGV_cfA( A,B, (_3(M,_ELEMS_,I))*((_3(M,_ELEMLEN_,I))+1), \
+ (_3(M,_ELEMS_,I)), (_3(M,_ELEMLEN_,I))+1 )
+#define PZTRINGV_cfC(M,I,A,B,C) \
+ APATRINGV_cfA( A,B, (_3(M,_ELEMS_,I))*((_3(M,_ELEMLEN_,I))+1), \
+ (_3(M,_ELEMS_,I)), (_3(M,_ELEMLEN_,I))+1 )
+
+#define BYTE_cfCCC(A,B) &A
+#define DOUBLE_cfCCC(A,B) &A
+#if !defined(__CF__KnR)
+#define FLOAT_cfCCC(A,B) &A
+ /* Although the VAX doesn't, at least the */
+#else /* HP and K&R mips promote float arg.'s of */
+#define FLOAT_cfCCC(A,B) &B /* unprototyped functions to double. Cannot */
+#endif /* use A here to pass the argument to FORTRAN. */
+#define INT_cfCCC(A,B) &A
+#define LOGICAL_cfCCC(A,B) &A
+#define LONG_cfCCC(A,B) &A
+#define SHORT_cfCCC(A,B) &A
+#define PBYTE_cfCCC(A,B) A
+#define PDOUBLE_cfCCC(A,B) A
+#define PFLOAT_cfCCC(A,B) A
+#define PINT_cfCCC(A,B) A
+#define PLOGICAL_cfCCC(A,B) B=A /* B used to keep a common W table. */
+#define PLONG_cfCCC(A,B) A
+#define PSHORT_cfCCC(A,B) A
+
+#define CCCF(TN,I,M) _SEP_(TN,M,cfCOMMA) _Icf(3,CC,TN,_(A,I),_(B,I))
+#define INT_cfCC(T,A,B) _(T,_cfCCC)(A,B)
+#define INTV_cfCC(T,A,B) A
+#define INTVV_cfCC(T,A,B) A
+#define INTVVV_cfCC(T,A,B) A
+#define INTVVVV_cfCC(T,A,B) A
+#define INTVVVVV_cfCC(T,A,B) A
+#define INTVVVVVV_cfCC(T,A,B) A
+#define INTVVVVVVV_cfCC(T,A,B) A
+#define PINT_cfCC(T,A,B) _(T,_cfCCC)(A,B)
+#define PVOID_cfCC(T,A,B) A
+#if defined(apolloFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran)
+#define ROUTINE_cfCC(T,A,B) &A
+#else
+#define ROUTINE_cfCC(T,A,B) A
+#endif
+#define SIMPLE_cfCC(T,A,B) A
+#ifdef vmsFortran
+#define STRING_cfCC(T,A,B) &B.f
+#define STRINGV_cfCC(T,A,B) &B
+#define PSTRING_cfCC(T,A,B) &B
+#define PSTRINGV_cfCC(T,A,B) &B
+#else
+#ifdef CRAYFortran
+#define STRING_cfCC(T,A,B) _cptofcd(A,B.flen)
+#define STRINGV_cfCC(T,A,B) _cptofcd(B.s,B.flen)
+#define PSTRING_cfCC(T,A,B) _cptofcd(A,B)
+#define PSTRINGV_cfCC(T,A,B) _cptofcd(A,B.flen)
+#else
+#define STRING_cfCC(T,A,B) A
+#define STRINGV_cfCC(T,A,B) B.fs
+#define PSTRING_cfCC(T,A,B) A
+#define PSTRINGV_cfCC(T,A,B) B.fs
+#endif
+#endif
+#define ZTRINGV_cfCC(T,A,B) STRINGV_cfCC(T,A,B)
+#define PZTRINGV_cfCC(T,A,B) PSTRINGV_cfCC(T,A,B)
+
+#define BYTE_cfX return A0;
+#define DOUBLE_cfX return A0;
+#if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT))
+#define FLOAT_cfX return A0;
+#else
+#define FLOAT_cfX ASSIGNFLOAT(AA0,A0); return AA0;
+#endif
+#define INT_cfX return A0;
+#define LOGICAL_cfX return F2CLOGICAL(A0);
+#define LONG_cfX return A0;
+#define SHORT_cfX return A0;
+#define VOID_cfX return ;
+#if defined(vmsFortran) || defined(CRAYFortran)
+#define STRING_cfX return kill_trailing( \
+ kill_trailing(AA0,CFORTRAN_NON_CHAR),' ');
+#else
+#define STRING_cfX return kill_trailing( \
+ kill_trailing( A0,CFORTRAN_NON_CHAR),' ');
+#endif
+
+#define CFFUN(NAME) _(__cf__,NAME)
+
+/* Note that we don't use LN here, but we keep it for consistency. */
+#define CCALLSFFUN0(UN,LN) CFFUN(UN)()
+
+#ifdef OLD_VAXC /* Allow %CC-I-PARAMNOTUSED. */
+#pragma standard
+#endif
+
+#define CCALLSFFUN1( UN,LN,T1, A1) \
+ CCALLSFFUN5 (UN,LN,T1,CF_0,CF_0,CF_0,CF_0,A1,0,0,0,0)
+#define CCALLSFFUN2( UN,LN,T1,T2, A1,A2) \
+ CCALLSFFUN5 (UN,LN,T1,T2,CF_0,CF_0,CF_0,A1,A2,0,0,0)
+#define CCALLSFFUN3( UN,LN,T1,T2,T3, A1,A2,A3) \
+ CCALLSFFUN5 (UN,LN,T1,T2,T3,CF_0,CF_0,A1,A2,A3,0,0)
+#define CCALLSFFUN4( UN,LN,T1,T2,T3,T4, A1,A2,A3,A4)\
+ CCALLSFFUN5 (UN,LN,T1,T2,T3,T4,CF_0,A1,A2,A3,A4,0)
+#define CCALLSFFUN5( UN,LN,T1,T2,T3,T4,T5, A1,A2,A3,A4,A5) \
+ CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,CF_0,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,0,0,0,0,0)
+#define CCALLSFFUN6( UN,LN,T1,T2,T3,T4,T5,T6, A1,A2,A3,A4,A5,A6) \
+ CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,T6,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,0,0,0,0)
+#define CCALLSFFUN7( UN,LN,T1,T2,T3,T4,T5,T6,T7, A1,A2,A3,A4,A5,A6,A7) \
+ CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,T6,T7,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,0,0,0)
+#define CCALLSFFUN8( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8, A1,A2,A3,A4,A5,A6,A7,A8) \
+ CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,0,0)
+#define CCALLSFFUN9( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,A1,A2,A3,A4,A5,A6,A7,A8,A9)\
+ CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,0)
+#define CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA)\
+ CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,0,0,0,0)
+#define CCALLSFFUN11(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB)\
+ CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,0,0,0)
+#define CCALLSFFUN12(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC)\
+ CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,0,0)
+#define CCALLSFFUN13(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD)\
+ CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,0)
+
+#define CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE)\
+((CFFUN(UN)( BCF(T1,A1,0) BCF(T2,A2,1) BCF(T3,A3,1) BCF(T4,A4,1) BCF(T5,A5,1) \
+ BCF(T6,A6,1) BCF(T7,A7,1) BCF(T8,A8,1) BCF(T9,A9,1) BCF(TA,AA,1) \
+ BCF(TB,AB,1) BCF(TC,AC,1) BCF(TD,AD,1) BCF(TE,AE,1) \
+ SCF(T1,LN,1,A1) SCF(T2,LN,2,A2) SCF(T3,LN,3,A3) SCF(T4,LN,4,A4) \
+ SCF(T5,LN,5,A5) SCF(T6,LN,6,A6) SCF(T7,LN,7,A7) SCF(T8,LN,8,A8) \
+ SCF(T9,LN,9,A9) SCF(TA,LN,10,AA) SCF(TB,LN,11,AB) SCF(TC,LN,12,AC) \
+ SCF(TD,LN,13,AD) SCF(TE,LN,14,AE))))
+
+/* N.B. Create a separate function instead of using (call function, function
+value here) because in order to create the variables needed for the input
+arg.'s which may be const.'s one has to do the creation within {}, but these
+can never be placed within ()'s. Therefore one must create wrapper functions.
+gcc, on the other hand may be able to avoid the wrapper functions. */
+
+/* Prototypes are needed to correctly handle the value returned correctly. N.B.
+Can only have prototype arg.'s with difficulty, a la G... table since FORTRAN
+functions returning strings have extra arg.'s. Don't bother, since this only
+causes a compiler warning to come up when one uses FCALLSCFUNn and CCALLSFFUNn
+for the same function in the same source code. Something done by the experts in
+debugging only.*/
+
+#define PROTOCCALLSFFUN0(F,UN,LN) \
+_(F,_cfPU)( CFC_(UN,LN))(CF_NULL_PROTO); \
+static _Icf(2,U,F,CFFUN(UN),0)() {_(F,_cfE) _Icf(3,GZ,F,UN,LN) ABSOFT_cf1(F));_(F,_cfX)}
+
+#define PROTOCCALLSFFUN1( T0,UN,LN,T1) \
+ PROTOCCALLSFFUN5 (T0,UN,LN,T1,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFFUN2( T0,UN,LN,T1,T2) \
+ PROTOCCALLSFFUN5 (T0,UN,LN,T1,T2,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFFUN3( T0,UN,LN,T1,T2,T3) \
+ PROTOCCALLSFFUN5 (T0,UN,LN,T1,T2,T3,CF_0,CF_0)
+#define PROTOCCALLSFFUN4( T0,UN,LN,T1,T2,T3,T4) \
+ PROTOCCALLSFFUN5 (T0,UN,LN,T1,T2,T3,T4,CF_0)
+#define PROTOCCALLSFFUN5( T0,UN,LN,T1,T2,T3,T4,T5) \
+ PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFFUN6( T0,UN,LN,T1,T2,T3,T4,T5,T6) \
+ PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,T6,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFFUN7( T0,UN,LN,T1,T2,T3,T4,T5,T6,T7) \
+ PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFFUN8( T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8) \
+ PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,CF_0,CF_0)
+#define PROTOCCALLSFFUN9( T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9) \
+ PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,CF_0)
+#define PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA) \
+ PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFFUN11(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB) \
+ PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFFUN12(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC) \
+ PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,CF_0,CF_0)
+#define PROTOCCALLSFFUN13(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD) \
+ PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,CF_0)
+
+/* HP/UX 9.01 cc requires the blank between '_Icf(3,G,T0,UN,LN) CCCF(T1,1,0)' */
+
+#ifndef __CF__KnR
+#define PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ _(T0,_cfPU)(CFC_(UN,LN))(CF_NULL_PROTO); static _Icf(2,U,T0,CFFUN(UN),0)( \
+ CFARGT14FS(UCF,HCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) ) \
+{ CFARGT14S(VCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) _(T0,_cfE) \
+ CCF(LN,T1,1) CCF(LN,T2,2) CCF(LN,T3,3) CCF(LN,T4,4) CCF(LN,T5,5) \
+ CCF(LN,T6,6) CCF(LN,T7,7) CCF(LN,T8,8) CCF(LN,T9,9) CCF(LN,TA,10) \
+ CCF(LN,TB,11) CCF(LN,TC,12) CCF(LN,TD,13) CCF(LN,TE,14) _Icf(3,G,T0,UN,LN) \
+ CFARGT14(CCCF,JCF,ABSOFT_cf1(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)); \
+ WCF(T1,A1,1) WCF(T2,A2,2) WCF(T3,A3,3) WCF(T4,A4,4) WCF(T5,A5,5) \
+ WCF(T6,A6,6) WCF(T7,A7,7) WCF(T8,A8,8) WCF(T9,A9,9) WCF(TA,A10,10) \
+ WCF(TB,A11,11) WCF(TC,A12,12) WCF(TD,A13,13) WCF(TE,A14,14) _(T0,_cfX)}
+#else
+#define PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ _(T0,_cfPU)(CFC_(UN,LN))(CF_NULL_PROTO); static _Icf(2,U,T0,CFFUN(UN),0)( \
+ CFARGT14FS(UUCF,HHCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) ) \
+ CFARGT14FS(UUUCF,HHHCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) ; \
+{ CFARGT14S(VCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) _(T0,_cfE) \
+ CCF(LN,T1,1) CCF(LN,T2,2) CCF(LN,T3,3) CCF(LN,T4,4) CCF(LN,T5,5) \
+ CCF(LN,T6,6) CCF(LN,T7,7) CCF(LN,T8,8) CCF(LN,T9,9) CCF(LN,TA,10) \
+ CCF(LN,TB,11) CCF(LN,TC,12) CCF(LN,TD,13) CCF(LN,TE,14) _Icf(3,G,T0,UN,LN) \
+ CFARGT14(CCCF,JCF,ABSOFT_cf1(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)); \
+ WCF(T1,A1,1) WCF(T2,A2,2) WCF(T3,A3,3) WCF(T4,A4,4) WCF(T5,A5,5) \
+ WCF(T6,A6,6) WCF(T7,A7,7) WCF(T8,A8,8) WCF(T9,A9,9) WCF(TA,A10,10) \
+ WCF(TB,A11,11) WCF(TC,A12,12) WCF(TD,A13,13) WCF(TE,A14,14) _(T0,_cfX)}
+#endif
+
+/*-------------------------------------------------------------------------*/
+
+/* UTILITIES FOR FORTRAN TO CALL C ROUTINES */
+
+#ifdef OLD_VAXC /* Prevent %CC-I-PARAMNOTUSED. */
+#pragma nostandard
+#endif
+
+#if defined(vmsFortran) || defined(CRAYFortran)
+#define DCF(TN,I)
+#define DDCF(TN,I)
+#define DDDCF(TN,I)
+#else
+#define DCF(TN,I) HCF(TN,I)
+#define DDCF(TN,I) HHCF(TN,I)
+#define DDDCF(TN,I) HHHCF(TN,I)
+#endif
+
+#define QCF(TN,I) _(TN,_cfSTR)(1,Q,_(B,I), 0,0,0,0)
+#define DEFAULT_cfQ(B)
+#define LOGICAL_cfQ(B)
+#define PLOGICAL_cfQ(B)
+#define STRINGV_cfQ(B) char *B; unsigned int _(B,N);
+#define STRING_cfQ(B) char *B=NULL;
+#define PSTRING_cfQ(B) char *B=NULL;
+#define PSTRINGV_cfQ(B) STRINGV_cfQ(B)
+#define PNSTRING_cfQ(B) char *B=NULL;
+#define PPSTRING_cfQ(B)
+
+#ifdef __sgi /* Else SGI gives warning 182 contrary to its C LRM A.17.7 */
+#define ROUTINE_orig *(void**)&
+#else
+#define ROUTINE_orig (void *)
+#endif
+
+#define ROUTINE_1 ROUTINE_orig
+#define ROUTINE_2 ROUTINE_orig
+#define ROUTINE_3 ROUTINE_orig
+#define ROUTINE_4 ROUTINE_orig
+#define ROUTINE_5 ROUTINE_orig
+#define ROUTINE_6 ROUTINE_orig
+#define ROUTINE_7 ROUTINE_orig
+#define ROUTINE_8 ROUTINE_orig
+#define ROUTINE_9 ROUTINE_orig
+#define ROUTINE_10 ROUTINE_orig
+#define ROUTINE_11 ROUTINE_orig
+#define ROUTINE_12 ROUTINE_orig
+#define ROUTINE_13 ROUTINE_orig
+#define ROUTINE_14 ROUTINE_orig
+#define ROUTINE_15 ROUTINE_orig
+#define ROUTINE_16 ROUTINE_orig
+#define ROUTINE_17 ROUTINE_orig
+#define ROUTINE_18 ROUTINE_orig
+#define ROUTINE_19 ROUTINE_orig
+#define ROUTINE_20 ROUTINE_orig
+#define ROUTINE_21 ROUTINE_orig
+#define ROUTINE_22 ROUTINE_orig
+#define ROUTINE_23 ROUTINE_orig
+#define ROUTINE_24 ROUTINE_orig
+#define ROUTINE_25 ROUTINE_orig
+#define ROUTINE_26 ROUTINE_orig
+#define ROUTINE_27 ROUTINE_orig
+
+#define TCF(NAME,TN,I,M) _SEP_(TN,M,cfCOMMA) _(TN,_cfT)(NAME,I,_(A,I),_(B,I),_(C,I))
+#define BYTE_cfT(M,I,A,B,D) *A
+#define DOUBLE_cfT(M,I,A,B,D) *A
+#define FLOAT_cfT(M,I,A,B,D) *A
+#define INT_cfT(M,I,A,B,D) *A
+#define LOGICAL_cfT(M,I,A,B,D) F2CLOGICAL(*A)
+#define LONG_cfT(M,I,A,B,D) *A
+#define SHORT_cfT(M,I,A,B,D) *A
+#define BYTEV_cfT(M,I,A,B,D) A
+#define DOUBLEV_cfT(M,I,A,B,D) A
+#define FLOATV_cfT(M,I,A,B,D) VOIDP A
+#define INTV_cfT(M,I,A,B,D) A
+#define LOGICALV_cfT(M,I,A,B,D) A
+#define LONGV_cfT(M,I,A,B,D) A
+#define SHORTV_cfT(M,I,A,B,D) A
+#define BYTEVV_cfT(M,I,A,B,D) (void *)A /* We have to cast to void *,*/
+#define BYTEVVV_cfT(M,I,A,B,D) (void *)A /* since we don't know the */
+#define BYTEVVVV_cfT(M,I,A,B,D) (void *)A /* dimensions of the array. */
+#define BYTEVVVVV_cfT(M,I,A,B,D) (void *)A /* i.e. Unfortunately, can't */
+#define BYTEVVVVVV_cfT(M,I,A,B,D) (void *)A /* check that the type */
+#define BYTEVVVVVVV_cfT(M,I,A,B,D) (void *)A /* matches the prototype. */
+#define DOUBLEVV_cfT(M,I,A,B,D) (void *)A
+#define DOUBLEVVV_cfT(M,I,A,B,D) (void *)A
+#define DOUBLEVVVV_cfT(M,I,A,B,D) (void *)A
+#define DOUBLEVVVVV_cfT(M,I,A,B,D) (void *)A
+#define DOUBLEVVVVVV_cfT(M,I,A,B,D) (void *)A
+#define DOUBLEVVVVVVV_cfT(M,I,A,B,D) (void *)A
+#define FLOATVV_cfT(M,I,A,B,D) (void *)A
+#define FLOATVVV_cfT(M,I,A,B,D) (void *)A
+#define FLOATVVVV_cfT(M,I,A,B,D) (void *)A
+#define FLOATVVVVV_cfT(M,I,A,B,D) (void *)A
+#define FLOATVVVVVV_cfT(M,I,A,B,D) (void *)A
+#define FLOATVVVVVVV_cfT(M,I,A,B,D) (void *)A
+#define INTVV_cfT(M,I,A,B,D) (void *)A
+#define INTVVV_cfT(M,I,A,B,D) (void *)A
+#define INTVVVV_cfT(M,I,A,B,D) (void *)A
+#define INTVVVVV_cfT(M,I,A,B,D) (void *)A
+#define INTVVVVVV_cfT(M,I,A,B,D) (void *)A
+#define INTVVVVVVV_cfT(M,I,A,B,D) (void *)A
+#define LOGICALVV_cfT(M,I,A,B,D) (void *)A
+#define LOGICALVVV_cfT(M,I,A,B,D) (void *)A
+#define LOGICALVVVV_cfT(M,I,A,B,D) (void *)A
+#define LOGICALVVVVV_cfT(M,I,A,B,D) (void *)A
+#define LOGICALVVVVVV_cfT(M,I,A,B,D) (void *)A
+#define LOGICALVVVVVVV_cfT(M,I,A,B,D) (void *)A
+#define LONGVV_cfT(M,I,A,B,D) (void *)A
+#define LONGVVV_cfT(M,I,A,B,D) (void *)A
+#define LONGVVVV_cfT(M,I,A,B,D) (void *)A
+#define LONGVVVVV_cfT(M,I,A,B,D) (void *)A
+#define LONGVVVVVV_cfT(M,I,A,B,D) (void *)A
+#define LONGVVVVVVV_cfT(M,I,A,B,D) (void *)A
+#define SHORTVV_cfT(M,I,A,B,D) (void *)A
+#define SHORTVVV_cfT(M,I,A,B,D) (void *)A
+#define SHORTVVVV_cfT(M,I,A,B,D) (void *)A
+#define SHORTVVVVV_cfT(M,I,A,B,D) (void *)A
+#define SHORTVVVVVV_cfT(M,I,A,B,D) (void *)A
+#define SHORTVVVVVVV_cfT(M,I,A,B,D) (void *)A
+#define PBYTE_cfT(M,I,A,B,D) A
+#define PDOUBLE_cfT(M,I,A,B,D) A
+#define PFLOAT_cfT(M,I,A,B,D) VOIDP A
+#define PINT_cfT(M,I,A,B,D) A
+#define PLOGICAL_cfT(M,I,A,B,D) ((*A=F2CLOGICAL(*A)),A)
+#define PLONG_cfT(M,I,A,B,D) A
+#define PSHORT_cfT(M,I,A,B,D) A
+#define PVOID_cfT(M,I,A,B,D) A
+#if defined(apolloFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran)
+#define ROUTINE_cfT(M,I,A,B,D) _(ROUTINE_,I) (*A)
+#else
+#define ROUTINE_cfT(M,I,A,B,D) _(ROUTINE_,I) A
+#endif
+/* A == pointer to the characters
+ D == length of the string, or of an element in an array of strings
+ E == number of elements in an array of strings */
+#define TTSTR( A,B,D) \
+ ((B=_cf_malloc(D+1))[D]='\0', memcpy(B,A,D), kill_trailing(B,' '))
+#define TTTTSTR( A,B,D) (!(D<4||A[0]||A[1]||A[2]||A[3]))?NULL: \
+ memchr(A,'\0',D) ?A : TTSTR(A,B,D)
+#define TTTTSTRV( A,B,D,E) (_(B,N)=E,B=_cf_malloc(_(B,N)*(D+1)), (void *) \
+ vkill_trailing(f2cstrv(A,B,D+1, _(B,N)*(D+1)), D+1,_(B,N)*(D+1),' '))
+#ifdef vmsFortran
+#define STRING_cfT(M,I,A,B,D) TTTTSTR( A->dsc$a_pointer,B,A->dsc$w_length)
+#define STRINGV_cfT(M,I,A,B,D) TTTTSTRV(A->dsc$a_pointer, B, \
+ A->dsc$w_length , A->dsc$l_m[0])
+#define PSTRING_cfT(M,I,A,B,D) TTSTR( A->dsc$a_pointer,B,A->dsc$w_length)
+#define PPSTRING_cfT(M,I,A,B,D) A->dsc$a_pointer
+#else
+#ifdef CRAYFortran
+#define STRING_cfT(M,I,A,B,D) TTTTSTR( _fcdtocp(A),B,_fcdlen(A))
+#define STRINGV_cfT(M,I,A,B,D) TTTTSTRV(_fcdtocp(A),B,_fcdlen(A), \
+ num_elem(_fcdtocp(A),_fcdlen(A),_3(M,_STRV_A,I)))
+#define PSTRING_cfT(M,I,A,B,D) TTSTR( _fcdtocp(A),B,_fcdlen(A))
+#define PPSTRING_cfT(M,I,A,B,D) _fcdtocp(A)
+#else
+#define STRING_cfT(M,I,A,B,D) TTTTSTR( A,B,D)
+#define STRINGV_cfT(M,I,A,B,D) TTTTSTRV(A,B,D, num_elem(A,D,_3(M,_STRV_A,I)))
+#define PSTRING_cfT(M,I,A,B,D) TTSTR( A,B,D)
+#define PPSTRING_cfT(M,I,A,B,D) A
+#endif
+#endif
+#define PNSTRING_cfT(M,I,A,B,D) STRING_cfT(M,I,A,B,D)
+#define PSTRINGV_cfT(M,I,A,B,D) STRINGV_cfT(M,I,A,B,D)
+#define CF_0_cfT(M,I,A,B,D)
+
+#define RCF(TN,I) _(TN,_cfSTR)(3,R,_(A,I),_(B,I),_(C,I),0,0)
+#define DEFAULT_cfR(A,B,D)
+#define LOGICAL_cfR(A,B,D)
+#define PLOGICAL_cfR(A,B,D) *A=C2FLOGICAL(*A);
+#define STRING_cfR(A,B,D) if (B) _cf_free(B);
+#define STRINGV_cfR(A,B,D) _cf_free(B);
+/* A and D as defined above for TSTRING(V) */
+#define RRRRPSTR( A,B,D) if (B) memcpy(A,B, _cfMIN(strlen(B),D)), \
+ (D>strlen(B)?memset(A+strlen(B),' ', D-strlen(B)):0), _cf_free(B);
+#define RRRRPSTRV(A,B,D) c2fstrv(B,A,D+1,(D+1)*_(B,N)), _cf_free(B);
+#ifdef vmsFortran
+#define PSTRING_cfR(A,B,D) RRRRPSTR( A->dsc$a_pointer,B,A->dsc$w_length)
+#define PSTRINGV_cfR(A,B,D) RRRRPSTRV(A->dsc$a_pointer,B,A->dsc$w_length)
+#else
+#ifdef CRAYFortran
+#define PSTRING_cfR(A,B,D) RRRRPSTR( _fcdtocp(A),B,_fcdlen(A))
+#define PSTRINGV_cfR(A,B,D) RRRRPSTRV(_fcdtocp(A),B,_fcdlen(A))
+#else
+#define PSTRING_cfR(A,B,D) RRRRPSTR( A,B,D)
+#define PSTRINGV_cfR(A,B,D) RRRRPSTRV(A,B,D)
+#endif
+#endif
+#define PNSTRING_cfR(A,B,D) PSTRING_cfR(A,B,D)
+#define PPSTRING_cfR(A,B,D)
+
+#define BYTE_cfFZ(UN,LN) INTEGER_BYTE FCALLSC_QUALIFIER fcallsc(UN,LN)(
+#define DOUBLE_cfFZ(UN,LN) DOUBLE_PRECISION FCALLSC_QUALIFIER fcallsc(UN,LN)(
+#define INT_cfFZ(UN,LN) int FCALLSC_QUALIFIER fcallsc(UN,LN)(
+#define LOGICAL_cfFZ(UN,LN) int FCALLSC_QUALIFIER fcallsc(UN,LN)(
+#define LONG_cfFZ(UN,LN) long FCALLSC_QUALIFIER fcallsc(UN,LN)(
+#define SHORT_cfFZ(UN,LN) short FCALLSC_QUALIFIER fcallsc(UN,LN)(
+#define VOID_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(
+#ifndef __CF__KnR
+/* The void is req'd by the Apollo, to make this an ANSI function declaration.
+ The Apollo promotes K&R float functions to double. */
+#define FLOAT_cfFZ(UN,LN) FORTRAN_REAL FCALLSC_QUALIFIER fcallsc(UN,LN)(void
+#ifdef vmsFortran
+#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(fstring *AS
+#else
+#ifdef CRAYFortran
+#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(_fcd AS
+#else
+#if defined(AbsoftUNIXFortran) || defined(AbsoftProFortran)
+#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(char *AS
+#else
+#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(char *AS, unsigned D0
+#endif
+#endif
+#endif
+#else
+#if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT))
+#define FLOAT_cfFZ(UN,LN) FORTRAN_REAL FCALLSC_QUALIFIER fcallsc(UN,LN)(
+#else
+#define FLOAT_cfFZ(UN,LN) FLOATFUNCTIONTYPE FCALLSC_QUALIFIER fcallsc(UN,LN)(
+#endif
+#if defined(vmsFortran) || defined(CRAYFortran) || defined(AbsoftUNIXFortran)
+#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(AS
+#else
+#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(AS, D0
+#endif
+#endif
+
+#define BYTE_cfF(UN,LN) BYTE_cfFZ(UN,LN)
+#define DOUBLE_cfF(UN,LN) DOUBLE_cfFZ(UN,LN)
+#ifndef __CF_KnR
+#define FLOAT_cfF(UN,LN) FORTRAN_REAL FCALLSC_QUALIFIER fcallsc(UN,LN)(
+#else
+#define FLOAT_cfF(UN,LN) FLOAT_cfFZ(UN,LN)
+#endif
+#define INT_cfF(UN,LN) INT_cfFZ(UN,LN)
+#define LOGICAL_cfF(UN,LN) LOGICAL_cfFZ(UN,LN)
+#define LONG_cfF(UN,LN) LONG_cfFZ(UN,LN)
+#define SHORT_cfF(UN,LN) SHORT_cfFZ(UN,LN)
+#define VOID_cfF(UN,LN) VOID_cfFZ(UN,LN)
+#define STRING_cfF(UN,LN) STRING_cfFZ(UN,LN),
+
+#define INT_cfFF
+#define VOID_cfFF
+#ifdef vmsFortran
+#define STRING_cfFF fstring *AS;
+#else
+#ifdef CRAYFortran
+#define STRING_cfFF _fcd AS;
+#else
+#define STRING_cfFF char *AS; unsigned D0;
+#endif
+#endif
+
+#define INT_cfL A0=
+#define STRING_cfL A0=
+#define VOID_cfL
+
+#define INT_cfK
+#define VOID_cfK
+/* KSTRING copies the string into the position provided by the caller. */
+#ifdef vmsFortran
+#define STRING_cfK \
+ memcpy(AS->dsc$a_pointer,A0,_cfMIN(AS->dsc$w_length,(A0==NULL?0:strlen(A0))));\
+ AS->dsc$w_length>(A0==NULL?0:strlen(A0))? \
+ memset(AS->dsc$a_pointer+(A0==NULL?0:strlen(A0)),' ', \
+ AS->dsc$w_length-(A0==NULL?0:strlen(A0))):0;
+#else
+#ifdef CRAYFortran
+#define STRING_cfK \
+ memcpy(_fcdtocp(AS),A0, _cfMIN(_fcdlen(AS),(A0==NULL?0:strlen(A0))) ); \
+ _fcdlen(AS)>(A0==NULL?0:strlen(A0))? \
+ memset(_fcdtocp(AS)+(A0==NULL?0:strlen(A0)),' ', \
+ _fcdlen(AS)-(A0==NULL?0:strlen(A0))):0;
+#else
+#define STRING_cfK memcpy(AS,A0, _cfMIN(D0,(A0==NULL?0:strlen(A0))) ); \
+ D0>(A0==NULL?0:strlen(A0))?memset(AS+(A0==NULL?0:strlen(A0)), \
+ ' ', D0-(A0==NULL?0:strlen(A0))):0;
+#endif
+#endif
+
+/* Note that K.. and I.. can't be combined since K.. has to access data before
+R.., in order for functions returning strings which are also passed in as
+arguments to work correctly. Note that R.. frees and hence may corrupt the
+string. */
+#define BYTE_cfI return A0;
+#define DOUBLE_cfI return A0;
+#if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT))
+#define FLOAT_cfI return A0;
+#else
+#define FLOAT_cfI RETURNFLOAT(A0);
+#endif
+#define INT_cfI return A0;
+#ifdef hpuxFortran800
+/* Incredibly, functions must return true as 1, elsewhere .true.==0x01000000. */
+#define LOGICAL_cfI return ((A0)?1:0);
+#else
+#define LOGICAL_cfI return C2FLOGICAL(A0);
+#endif
+#define LONG_cfI return A0;
+#define SHORT_cfI return A0;
+#define STRING_cfI return ;
+#define VOID_cfI return ;
+
+#ifdef OLD_VAXC /* Allow %CC-I-PARAMNOTUSED. */
+#pragma standard
+#endif
+
+#define FCALLSCSUB0( CN,UN,LN) FCALLSCFUN0(VOID,CN,UN,LN)
+#define FCALLSCSUB1( CN,UN,LN,T1) FCALLSCFUN1(VOID,CN,UN,LN,T1)
+#define FCALLSCSUB2( CN,UN,LN,T1,T2) FCALLSCFUN2(VOID,CN,UN,LN,T1,T2)
+#define FCALLSCSUB3( CN,UN,LN,T1,T2,T3) FCALLSCFUN3(VOID,CN,UN,LN,T1,T2,T3)
+#define FCALLSCSUB4( CN,UN,LN,T1,T2,T3,T4) \
+ FCALLSCFUN4(VOID,CN,UN,LN,T1,T2,T3,T4)
+#define FCALLSCSUB5( CN,UN,LN,T1,T2,T3,T4,T5) \
+ FCALLSCFUN5(VOID,CN,UN,LN,T1,T2,T3,T4,T5)
+#define FCALLSCSUB6( CN,UN,LN,T1,T2,T3,T4,T5,T6) \
+ FCALLSCFUN6(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6)
+#define FCALLSCSUB7( CN,UN,LN,T1,T2,T3,T4,T5,T6,T7) \
+ FCALLSCFUN7(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7)
+#define FCALLSCSUB8( CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8) \
+ FCALLSCFUN8(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8)
+#define FCALLSCSUB9( CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9) \
+ FCALLSCFUN9(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9)
+#define FCALLSCSUB10(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA) \
+ FCALLSCFUN10(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA)
+#define FCALLSCSUB11(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB) \
+ FCALLSCFUN11(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB)
+#define FCALLSCSUB12(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC) \
+ FCALLSCFUN12(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC)
+#define FCALLSCSUB13(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD) \
+ FCALLSCFUN13(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD)
+#define FCALLSCSUB14(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ FCALLSCFUN14(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
+#define FCALLSCSUB15(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF) \
+ FCALLSCFUN15(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF)
+#define FCALLSCSUB16(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG) \
+ FCALLSCFUN16(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG)
+#define FCALLSCSUB17(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH) \
+ FCALLSCFUN17(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH)
+#define FCALLSCSUB18(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI) \
+ FCALLSCFUN18(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI)
+#define FCALLSCSUB19(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ) \
+ FCALLSCFUN19(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ)
+#define FCALLSCSUB20(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \
+ FCALLSCFUN20(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK)
+#define FCALLSCSUB21(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL) \
+ FCALLSCFUN21(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL)
+#define FCALLSCSUB22(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM) \
+ FCALLSCFUN22(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM)
+#define FCALLSCSUB23(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN) \
+ FCALLSCFUN23(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN)
+#define FCALLSCSUB24(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO) \
+ FCALLSCFUN24(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO)
+#define FCALLSCSUB25(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP) \
+ FCALLSCFUN25(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP)
+#define FCALLSCSUB26(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ) \
+ FCALLSCFUN26(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ)
+#define FCALLSCSUB27(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \
+ FCALLSCFUN27(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR)
+
+
+#define FCALLSCFUN1( T0,CN,UN,LN,T1) \
+ FCALLSCFUN5 (T0,CN,UN,LN,T1,CF_0,CF_0,CF_0,CF_0)
+#define FCALLSCFUN2( T0,CN,UN,LN,T1,T2) \
+ FCALLSCFUN5 (T0,CN,UN,LN,T1,T2,CF_0,CF_0,CF_0)
+#define FCALLSCFUN3( T0,CN,UN,LN,T1,T2,T3) \
+ FCALLSCFUN5 (T0,CN,UN,LN,T1,T2,T3,CF_0,CF_0)
+#define FCALLSCFUN4( T0,CN,UN,LN,T1,T2,T3,T4) \
+ FCALLSCFUN5 (T0,CN,UN,LN,T1,T2,T3,T4,CF_0)
+#define FCALLSCFUN5( T0,CN,UN,LN,T1,T2,T3,T4,T5) \
+ FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define FCALLSCFUN6( T0,CN,UN,LN,T1,T2,T3,T4,T5,T6) \
+ FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,CF_0,CF_0,CF_0,CF_0)
+#define FCALLSCFUN7( T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7) \
+ FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,CF_0,CF_0,CF_0)
+#define FCALLSCFUN8( T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8) \
+ FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,CF_0,CF_0)
+#define FCALLSCFUN9( T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9) \
+ FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,CF_0)
+#define FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA) \
+ FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,CF_0,CF_0,CF_0,CF_0)
+#define FCALLSCFUN11(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB) \
+ FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,CF_0,CF_0,CF_0)
+#define FCALLSCFUN12(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC) \
+ FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,CF_0,CF_0)
+#define FCALLSCFUN13(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD) \
+ FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,CF_0)
+
+
+#define FCALLSCFUN15(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF) \
+ FCALLSCFUN20(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define FCALLSCFUN16(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG) \
+ FCALLSCFUN20(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,CF_0,CF_0,CF_0,CF_0)
+#define FCALLSCFUN17(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH) \
+ FCALLSCFUN20(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,CF_0,CF_0,CF_0)
+#define FCALLSCFUN18(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI) \
+ FCALLSCFUN20(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,CF_0,CF_0)
+#define FCALLSCFUN19(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ) \
+ FCALLSCFUN20(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,CF_0)
+#define FCALLSCFUN20(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \
+ FCALLSCFUN27(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define FCALLSCFUN21(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL) \
+ FCALLSCFUN27(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define FCALLSCFUN22(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM) \
+ FCALLSCFUN27(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define FCALLSCFUN23(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN) \
+ FCALLSCFUN27(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,CF_0,CF_0,CF_0,CF_0)
+#define FCALLSCFUN24(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO) \
+ FCALLSCFUN27(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,CF_0,CF_0,CF_0)
+#define FCALLSCFUN25(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP) \
+ FCALLSCFUN27(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,CF_0,CF_0)
+#define FCALLSCFUN26(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ) \
+ FCALLSCFUN27(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,CF_0)
+
+
+#ifndef __CF__KnR
+#define FCALLSCFUN0(T0,CN,UN,LN) CFextern _(T0,_cfFZ)(UN,LN) ABSOFT_cf2(T0)) \
+ {_Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN(); _Icf(0,K,T0,0,0) _(T0,_cfI)}
+
+#define FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ CFextern _(T0,_cfF)(UN,LN) \
+ CFARGT14(NCF,DCF,ABSOFT_cf2(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) ) \
+ { CFARGT14S(QCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ _Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN( TCF(LN,T1,1,0) TCF(LN,T2,2,1) \
+ TCF(LN,T3,3,1) TCF(LN,T4,4,1) TCF(LN,T5,5,1) TCF(LN,T6,6,1) TCF(LN,T7,7,1) \
+ TCF(LN,T8,8,1) TCF(LN,T9,9,1) TCF(LN,TA,10,1) TCF(LN,TB,11,1) TCF(LN,TC,12,1) \
+ TCF(LN,TD,13,1) TCF(LN,TE,14,1) ); _Icf(0,K,T0,0,0) \
+ CFARGT14S(RCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) _(T0,_cfI) }
+
+#define FCALLSCFUN27(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \
+ CFextern _(T0,_cfF)(UN,LN) \
+ CFARGT27(NCF,DCF,ABSOFT_cf2(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) ) \
+ { CFARGT27S(QCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \
+ _Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN( TCF(LN,T1,1,0) TCF(LN,T2,2,1) \
+ TCF(LN,T3,3,1) TCF(LN,T4,4,1) TCF(LN,T5,5,1) TCF(LN,T6,6,1) TCF(LN,T7,7,1) \
+ TCF(LN,T8,8,1) TCF(LN,T9,9,1) TCF(LN,TA,10,1) TCF(LN,TB,11,1) TCF(LN,TC,12,1) \
+ TCF(LN,TD,13,1) TCF(LN,TE,14,1) TCF(LN,TF,15,1) TCF(LN,TG,16,1) TCF(LN,TH,17,1) \
+ TCF(LN,TI,18,1) TCF(LN,TJ,19,1) TCF(LN,TK,20,1) TCF(LN,TL,21,1) TCF(LN,TM,22,1) \
+ TCF(LN,TN,23,1) TCF(LN,TO,24,1) TCF(LN,TP,25,1) TCF(LN,TQ,26,1) TCF(LN,TR,27,1) ); _Icf(0,K,T0,0,0) \
+ CFARGT27S(RCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) _(T0,_cfI) }
+
+#else
+#define FCALLSCFUN0(T0,CN,UN,LN) CFextern _(T0,_cfFZ)(UN,LN) ABSOFT_cf3(T0)) _Icf(0,FF,T0,0,0)\
+ {_Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN(); _Icf(0,K,T0,0,0) _(T0,_cfI)}
+
+#define FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ CFextern _(T0,_cfF)(UN,LN) \
+ CFARGT14(NNCF,DDCF,ABSOFT_cf3(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)) _Icf(0,FF,T0,0,0) \
+ CFARGT14FS(NNNCF,DDDCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE); \
+ { CFARGT14S(QCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ _Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN( TCF(LN,T1,1,0) TCF(LN,T2,2,1) \
+ TCF(LN,T3,3,1) TCF(LN,T4,4,1) TCF(LN,T5,5,1) TCF(LN,T6,6,1) TCF(LN,T7,7,1) \
+ TCF(LN,T8,8,1) TCF(LN,T9,9,1) TCF(LN,TA,10,1) TCF(LN,TB,11,1) TCF(LN,TC,12,1) \
+ TCF(LN,TD,13,1) TCF(LN,TE,14,1) ); _Icf(0,K,T0,0,0) \
+ CFARGT14S(RCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) _(T0,_cfI)}
+
+#define FCALLSCFUN27(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \
+ CFextern _(T0,_cfF)(UN,LN) \
+ CFARGT27(NNCF,DDCF,ABSOFT_cf3(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR)) _Icf(0,FF,T0,0,0) \
+ CFARGT27FS(NNNCF,DDDCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR); \
+ { CFARGT27S(QCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \
+ _Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN( TCF(LN,T1,1,0) TCF(LN,T2,2,1) \
+ TCF(LN,T3,3,1) TCF(LN,T4,4,1) TCF(LN,T5,5,1) TCF(LN,T6,6,1) TCF(LN,T7,7,1) \
+ TCF(LN,T8,8,1) TCF(LN,T9,9,1) TCF(LN,TA,10,1) TCF(LN,TB,11,1) TCF(LN,TC,12,1) \
+ TCF(LN,TD,13,1) TCF(LN,TE,14,1) TCF(LN,TF,15,1) TCF(LN,TG,16,1) TCF(LN,TH,17,1) \
+ TCF(LN,TI,18,1) TCF(LN,TJ,19,1) TCF(LN,TK,20,1) TCF(LN,TL,21,1) TCF(LN,TM,22,1) \
+ TCF(LN,TN,23,1) TCF(LN,TO,24,1) TCF(LN,TP,25,1) TCF(LN,TQ,26,1) TCF(LN,TR,27,1) ); _Icf(0,K,T0,0,0) \
+ CFARGT27S(RCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) _(T0,_cfI)}
+
+#endif
+
+
+#endif /* __CFORTRAN_LOADED */
diff --git a/include/cfortran.h.3.9 b/include/cfortran.h.3.9
new file mode 100644
index 0000000..0688224
--- /dev/null
+++ b/include/cfortran.h.3.9
@@ -0,0 +1,2149 @@
+/* cfortran.h 3.9 */ /* anonymous ftp@zebra.desy.de */
+/* Burkhard Burow burow@desy.de 1990 - 1997. */
+
+#ifndef __CFORTRAN_LOADED
+#define __CFORTRAN_LOADED
+
+/*
+ THIS FILE IS PROPERTY OF BURKHARD BUROW. IF YOU ARE USING THIS FILE YOU
+ SHOULD ALSO HAVE ACCESS TO CFORTRAN.DOC WHICH PROVIDES TERMS FOR USING,
+ MODIFYING, COPYING AND DISTRIBUTING THE CFORTRAN.H PACKAGE.
+*/
+
+/*******
+ Modifications:
+ Oct 1997: Changed symbol name extname to appendus (PDW/HSTX)
+ (Conflicted with a common variable name in FTOOLS)
+ Nov 1997: If g77Fortran defined, also define f2cFortran (PDW/HSTX)
+ Nov 1997: Define MIN(A,B) as _cfMIN(A,B)
+ Feb 1998: Let VMS see the NUM_ELEMS code. Lets programs treat
+ single strings as vectors with single elements
+ *******/
+#define MIN(A,B) _cfMIN(A,B)
+
+/*
+ Avoid symbols already used by compilers and system *.h:
+ __ - OSF1 zukal06 V3.0 347 alpha, cc -c -std1 cfortest.c
+
+ */
+
+
+/* First prepare for the C compiler. */
+
+#ifndef ANSI_C_preprocessor /* i.e. user can override. */
+#ifdef __CF__KnR
+#define ANSI_C_preprocessor 0
+#else
+#ifdef __STDC__
+#define ANSI_C_preprocessor 1
+#else
+#define _cfleft 1
+#define _cfright
+#define _cfleft_cfright 0
+#define ANSI_C_preprocessor _cfleft/**/_cfright
+#endif
+#endif
+#endif
+
+#if ANSI_C_preprocessor
+#define _0(A,B) A##B
+#define _(A,B) _0(A,B) /* see cat,xcat of K&R ANSI C p. 231 */
+#define _2(A,B) A##B /* K&R ANSI C p.230: .. identifier is not replaced */
+#define _3(A,B,C) _(A,_(B,C))
+#else /* if it turns up again during rescanning. */
+#define _(A,B) A/**/B
+#define _2(A,B) A/**/B
+#define _3(A,B,C) A/**/B/**/C
+#endif
+
+#if (defined(vax)&&defined(unix)) || (defined(__vax__)&&defined(__unix__))
+#define VAXUltrix
+#endif
+
+#include <stdio.h> /* NULL [in all machines stdio.h] */
+#include <string.h> /* strlen, memset, memcpy, memchr. */
+#if !( defined(VAXUltrix) || defined(sun) || (defined(apollo)&&!defined(__STDCPP__)) )
+#include <stdlib.h> /* malloc,free */
+#else
+#include <malloc.h> /* Had to be removed for DomainOS h105 10.4 sys5.3 425t*/
+#ifdef apollo
+#define __CF__APOLLO67 /* __STDCPP__ is in Apollo 6.8 (i.e. ANSI) and onwards */
+#endif
+#endif
+
+#if !defined(__GNUC__) && !defined(__sun) && (defined(sun)||defined(VAXUltrix)||defined(lynx))
+#define __CF__KnR /* Sun, LynxOS and VAX Ultrix cc only supports K&R. */
+ /* Manually define __CF__KnR for HP if desired/required.*/
+#endif /* i.e. We will generate Kernighan and Ritchie C. */
+/* Note that you may define __CF__KnR before #include cfortran.h, in order to
+generate K&R C instead of the default ANSI C. The differences are mainly in the
+function prototypes and declarations. All machines, except the Apollo, work
+with either style. The Apollo's argument promotion rules require ANSI or use of
+the obsolete std_$call which we have not implemented here. Hence on the Apollo,
+only C calling FORTRAN subroutines will work using K&R style.*/
+
+
+/* Remainder of cfortran.h depends on the Fortran compiler. */
+
+#if defined(CLIPPERFortran) || defined(g77Fortran) /* 11/3/97 PDW */
+#define f2cFortran
+#endif
+
+/* VAX/VMS does not let us \-split long #if lines. */
+/* Split #if into 2 because some HP-UX can't handle long #if */
+#if !(defined(NAGf90Fortran)||defined(f2cFortran)||defined(hpuxFortran)||defined(apolloFortran)||defined(sunFortran)||defined(IBMR2Fortran)||defined(CRAYFortran))
+#if !(defined(mipsFortran)||defined(DECFortran)||defined(vmsFortran)||defined(CONVEXFortran)||defined(PowerStationFortran)||defined(AbsoftUNIXFortran)||defined(SXFortran))
+/* If no Fortran compiler is given, we choose one for the machines we know. */
+#if defined(lynx) || defined(VAXUltrix)
+#define f2cFortran /* Lynx: Only support f2c at the moment.
+ VAXUltrix: f77 behaves like f2c.
+ Support f2c or f77 with gcc, vcc with f2c.
+ f77 with vcc works, missing link magic for f77 I/O.*/
+#endif
+#if defined(WIN32) || defined(macintosh)
+#define f2cFortran
+#endif
+#if defined(__hpux) /* 921107: Use __hpux instead of __hp9000s300 */
+#define hpuxFortran /* Should also allow hp9000s7/800 use.*/
+#endif
+#if defined(apollo)
+#define apolloFortran /* __CF__APOLLO67 also defines some behavior. */
+#endif
+#if defined(sun) || defined(__sun)
+#define sunFortran
+#endif
+#if defined(_IBMR2)
+#define IBMR2Fortran
+#endif
+#if defined(_CRAY)
+#define CRAYFortran /* _CRAYT3E also defines some behavior. */
+#endif
+#if defined(_SX)
+#define SXFortran
+#endif
+#if defined(mips) || defined(__mips)
+#define mipsFortran
+#endif
+#if defined(vms) || defined(__vms)
+#define vmsFortran
+#endif
+#if defined(__alpha) && defined(__unix__)
+#define DECFortran
+#endif
+#if defined(__convex__)
+#define CONVEXFortran
+#endif
+#if defined(VISUAL_CPLUSPLUS)
+#define PowerStationFortran
+#endif
+#endif /* ...Fortran */
+#endif /* ...Fortran */
+
+/* Split #if into 2 because some HP-UX can't handle long #if */
+#if !(defined(NAGf90Fortran)||defined(f2cFortran)||defined(hpuxFortran)||defined(apolloFortran)||defined(sunFortran)||defined(IBMR2Fortran)||defined(CRAYFortran))
+#if !(defined(mipsFortran)||defined(DECFortran)||defined(vmsFortran)||defined(CONVEXFortran)||defined(PowerStationFortran)||defined(AbsoftUNIXFortran)||defined(SXFortran))
+/* If your compiler barfs on ' #error', replace # with the trigraph for # */
+ #error "cfortran.h: Can't find your environment among:\
+ - MIPS cc and f77 2.0. (e.g. Silicon Graphics, DECstations, ...) \
+ - IBM AIX XL C and FORTRAN Compiler/6000 Version 01.01.0000.0000 \
+ - VAX VMS CC 3.1 and FORTRAN 5.4. \
+ - Alpha VMS DEC C 1.3 and DEC FORTRAN 6.0. \
+ - Alpha OSF DEC C and DEC Fortran for OSF/1 AXP Version 1.2 \
+ - Apollo DomainOS 10.2 (sys5.3) with f77 10.7 and cc 6.7. \
+ - CRAY \
+ - NEC SX-4 SUPER-UX \
+ - CONVEX \
+ - Sun \
+ - PowerStation Fortran with Visual C++ \
+ - HP9000s300/s700/s800 Latest test with: HP-UX A.08.07 A 9000/730 \
+ - LynxOS: cc or gcc with f2c. \
+ - VAXUltrix: vcc,cc or gcc with f2c. gcc or cc with f77. \
+ - f77 with vcc works; but missing link magic for f77 I/O. \
+ - NO fort. None of gcc, cc or vcc generate required names.\
+ - f2c : Use #define f2cFortran, or cc -Df2cFortran \
+ - NAG f90: Use #define NAGf90Fortran, or cc -DNAGf90Fortran \
+ - g77 v0.5.18 for linux \
+ - Absoft UNIX F77: Use #define AbsoftUNIXFortran or cc -DAbsoftUNIXFortran"
+/* Compiler must throw us out at this point! */
+#endif
+#endif
+
+
+#if defined(VAXC) && !defined(__VAXC)
+#define OLD_VAXC
+#pragma nostandard /* Prevent %CC-I-PARAMNOTUSED. */
+#endif
+
+/* Throughout cfortran.h we use: UN = Uppercase Name. LN = Lowercase Name. */
+
+#if defined(f2cFortran) || defined(NAGf90Fortran) || defined(DECFortran) || defined(mipsFortran) || defined(apolloFortran) || defined(sunFortran) || defined(CONVEXFortran) || defined(SXFortran) || defined(appendus) /* 10/31/97 PDW */
+#define CFC_(UN,LN) _(LN,_) /* Lowercase FORTRAN symbols. */
+#define orig_fcallsc(UN,LN) CFC_(UN,LN)
+#else
+#if defined(CRAYFortran) || defined(PowerStationFortran)
+#ifdef _CRAY /* (UN), not UN, circumvents CRAY preprocessor bug. */
+#define CFC_(UN,LN) (UN) /* Uppercase FORTRAN symbols. */
+#else /* At least VISUAL_CPLUSPLUS barfs on (UN), so need UN. */
+#define CFC_(UN,LN) UN /* Uppercase FORTRAN symbols. */
+#endif
+#define orig_fcallsc(UN,LN) CFC_(UN,LN) /* CRAY insists on arg.'s here. */
+#else /* For following machines one may wish to change the fcallsc default. */
+#define CF_SAME_NAMESPACE
+#ifdef vmsFortran
+#define CFC_(UN,LN) LN /* Either case FORTRAN symbols. */
+ /* BUT we usually use UN for C macro to FORTRAN routines, so use LN here,*/
+ /* because VAX/VMS doesn't do recursive macros. */
+#define orig_fcallsc(UN,LN) UN
+#else /* HP-UX without +ppu or IBMR2 without -qextname. NOT reccomended. */
+#define CFC_(UN,LN) LN /* Lowercase FORTRAN symbols. */
+#define orig_fcallsc(UN,LN) CFC_(UN,LN)
+#endif /* vmsFortran */
+#endif /* CRAYFortran PowerStationFortran */
+#endif /* ....Fortran */
+
+#define fcallsc(UN,LN) orig_fcallsc(UN,LN)
+#define preface_fcallsc(P,p,UN,LN) CFC_(_(P,UN),_(p,LN))
+#define append_fcallsc(P,p,UN,LN) CFC_(_(UN,P),_(LN,p))
+
+#define C_FUNCTION(UN,LN) fcallsc(UN,LN)
+#define FORTRAN_FUNCTION(UN,LN) CFC_(UN,LN)
+
+#ifndef COMMON_BLOCK
+#ifndef CONVEXFortran
+#ifndef CLIPPERFortran
+#ifndef AbsoftUNIXFortran
+#define COMMON_BLOCK(UN,LN) CFC_(UN,LN)
+#else
+#define COMMON_BLOCK(UN,LN) _(_C,LN)
+#endif
+#else
+#define COMMON_BLOCK(UN,LN) _(LN,__)
+#endif
+#else
+#define COMMON_BLOCK(UN,LN) _3(_,LN,_)
+#endif
+#endif
+
+#ifndef DOUBLE_PRECISION
+#if defined(CRAYFortran) && !defined(_CRAYT3E)
+#define DOUBLE_PRECISION long double
+#else
+#define DOUBLE_PRECISION double
+#endif
+#endif
+
+#ifndef FORTRAN_REAL
+#if defined(CRAYFortran) && defined(_CRAYT3E)
+#define FORTRAN_REAL double
+#else
+#define FORTRAN_REAL float
+#endif
+#endif
+
+#ifdef CRAYFortran
+#ifdef _CRAY
+#include <fortran.h>
+#else
+#include "fortran.h" /* i.e. if crosscompiling assume user has file. */
+#endif
+#define FLOATVVVVVVV_cfPP (FORTRAN_REAL *) /* Used for C calls FORTRAN. */
+/* CRAY's double==float but CRAY says pointers to doubles and floats are diff.*/
+#define VOIDP (void *) /* When FORTRAN calls C, we don't know if C routine
+ arg.'s have been declared float *, or double *. */
+#else
+#define FLOATVVVVVVV_cfPP
+#define VOIDP
+#endif
+
+#ifdef vmsFortran
+#if defined(vms) || defined(__vms)
+#include <descrip.h>
+#else
+#include "descrip.h" /* i.e. if crosscompiling assume user has file. */
+#endif
+#endif
+
+#ifdef sunFortran
+#if defined(sun) || defined(__sun)
+#include <math.h> /* Sun's FLOATFUNCTIONTYPE, ASSIGNFLOAT, RETURNFLOAT. */
+#else
+#include "math.h" /* i.e. if crosscompiling assume user has file. */
+#endif
+/* At least starting with the default C compiler SC3.0.1 of SunOS 5.3,
+ * FLOATFUNCTIONTYPE, ASSIGNFLOAT, RETURNFLOAT are not required and not in
+ * <math.h>, since sun C no longer promotes C float return values to doubles.
+ * Therefore, only use them if defined.
+ * Even if gcc is being used, assume that it exhibits the Sun C compiler
+ * behavior in order to be able to use *.o from the Sun C compiler.
+ * i.e. If FLOATFUNCTIONTYPE, etc. are in math.h, they required by gcc.
+ */
+#endif
+
+#ifndef apolloFortran
+#define COMMON_BLOCK_DEF(DEFINITION, NAME) extern DEFINITION NAME
+#define CF_NULL_PROTO
+#else /* HP doesn't understand #elif. */
+/* Without ANSI prototyping, Apollo promotes float functions to double. */
+/* Note that VAX/VMS, IBM, Mips choke on 'type function(...);' prototypes. */
+#define CF_NULL_PROTO ...
+#ifndef __CF__APOLLO67
+#define COMMON_BLOCK_DEF(DEFINITION, NAME) \
+ DEFINITION NAME __attribute((__section(NAME)))
+#else
+#define COMMON_BLOCK_DEF(DEFINITION, NAME) \
+ DEFINITION NAME #attribute[section(NAME)]
+#endif
+#endif
+
+#ifdef __cplusplus
+#undef CF_NULL_PROTO
+#define CF_NULL_PROTO ...
+#endif
+
+#ifdef mipsFortran
+#define CF_DECLARE_GETARG int f77argc; char **f77argv
+#define CF_SET_GETARG(ARGC,ARGV) f77argc = ARGC; f77argv = ARGV
+#else
+#define CF_DECLARE_GETARG
+#define CF_SET_GETARG(ARGC,ARGV)
+#endif
+
+#ifdef OLD_VAXC /* Allow %CC-I-PARAMNOTUSED. */
+#pragma standard
+#endif
+
+#define ACOMMA ,
+#define ACOLON ;
+
+/*-------------------------------------------------------------------------*/
+
+/* UTILITIES USED WITHIN CFORTRAN.H */
+
+#define _cfMIN(A,B) (A<B?A:B)
+#ifndef FALSE
+#define FALSE (1==0)
+#endif
+
+/* 970211 - XIX.145:
+ firstindexlength - better name is all_but_last_index_lengths
+ secondindexlength - better name is last_index_length
+ */
+#define firstindexlength(A) (sizeof(A[0])==1 ? 1 : (sizeof(A) / sizeof(A[0])) )
+#define secondindexlength(A) (sizeof(A[0])==1 ? sizeof(A) : sizeof(A[0]) )
+
+/* Behavior of FORTRAN LOGICAL. All machines' LOGICAL is same size as C's int.
+Conversion is automatic except for arrays which require F2CLOGICALV/C2FLOGICALV.
+f2c, MIPS f77 [DECstation, SGI], VAX Ultrix f77,
+HP-UX f77 : as in C.
+VAX/VMS FORTRAN, VAX Ultrix fort,
+Absoft Unix Fortran, IBM RS/6000 xlf : LS Bit = 0/1 = TRUE/FALSE.
+Apollo : neg. = TRUE, else FALSE.
+[Apollo accepts -1 as TRUE for function values, but NOT all other neg. values.]
+[DECFortran for Ultrix RISC is also called f77 but is the same as VAX/VMS.]
+[MIPS f77 treats .eqv./.neqv. as .eq./.ne. and hence requires LOGICAL_STRICT.]*/
+
+#if defined(NAGf90Fortran) || defined(f2cFortran) || defined(mipsFortran) || defined(PowerStationFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran) || defined(SXFortran)
+/* SX/PowerStationFortran have 0 and 1 defined, others are neither T nor F. */
+/* hpuxFortran800 has 0 and 0x01000000 defined. Others are unknown. */
+#define LOGICAL_STRICT /* Other Fortran have .eqv./.neqv. == .eq./.ne. */
+#endif
+
+#define C2FLOGICALV(A,I) \
+ do {int __i; for(__i=0;__i<I;__i++) A[__i]=C2FLOGICAL(A[__i]); } while (FALSE)
+#define F2CLOGICALV(A,I) \
+ do {int __i; for(__i=0;__i<I;__i++) A[__i]=F2CLOGICAL(A[__i]); } while (FALSE)
+
+#if defined(apolloFortran)
+#define C2FLOGICAL(L) ((L)?-1:(L)&~((unsigned)1<<sizeof(int)*8-1))
+#define F2CLOGICAL(L) ((L)<0?(L):0)
+#else
+#if defined(CRAYFortran)
+#define C2FLOGICAL(L) _btol(L)
+#define F2CLOGICAL(L) _ltob(&(L)) /* Strangely _ltob() expects a pointer. */
+#else
+#if defined(IBMR2Fortran) || defined(vmsFortran) || defined(DECFortran) || defined(AbsoftUNIXFortran)
+#define C2FLOGICAL(L) ((L)?(L)|1:(L)&~(int)1)
+#define F2CLOGICAL(L) ((L)&1?(L):0)
+#else
+#if defined(CONVEXFortran)
+#define C2FLOGICAL(L) ((L) ? ~0 : 0 )
+#define F2CLOGICAL(L) (L)
+#else /* others evaluate LOGICALs as for C. */
+#define C2FLOGICAL(L) (L)
+#define F2CLOGICAL(L) (L)
+#ifndef LOGICAL_STRICT
+#undef C2FLOGICALV
+#undef F2CLOGICALV
+#define C2FLOGICALV(A,I)
+#define F2CLOGICALV(A,I)
+#endif /* LOGICAL_STRICT */
+#endif /* CONVEXFortran || All Others */
+#endif /* IBMR2Fortran vmsFortran DECFortran AbsoftUNIXFortran */
+#endif /* CRAYFortran */
+#endif /* apolloFortran */
+
+/* 970514 - In addition to CRAY, there may be other machines
+ for which LOGICAL_STRICT makes no sense. */
+#if defined(LOGICAL_STRICT) && !defined(CRAYFortran)
+/* Force C2FLOGICAL to generate only the values for either .TRUE. or .FALSE.
+ SX/PowerStationFortran only have 0 and 1 defined.
+ Elsewhere, only needed if you want to do:
+ logical lvariable
+ if (lvariable .eq. .true.) then ! (1)
+ instead of
+ if (lvariable .eqv. .true.) then ! (2)
+ - (1) may not even be FORTRAN/77 and that Apollo's f77 and IBM's xlf
+ refuse to compile (1), so you are probably well advised to stay away from
+ (1) and from LOGICAL_STRICT.
+ - You pay a (slight) performance penalty for using LOGICAL_STRICT. */
+#undef C2FLOGICAL
+#ifdef hpuxFortran800
+#define C2FLOGICAL(L) ((L)?0x01000000:0)
+#else
+#if defined(apolloFortran) || defined(vmsFortran) || defined(DECFortran)
+#define C2FLOGICAL(L) ((L)?-1:0) /* These machines use -1/0 for .true./.false.*/
+#else
+#define C2FLOGICAL(L) ((L)? 1:0) /* All others use +1/0 for .true./.false.*/
+#endif
+#endif
+#endif /* LOGICAL_STRICT */
+
+/* Convert a vector of C strings into FORTRAN strings. */
+#ifndef __CF__KnR
+static char *c2fstrv(char* cstr, char *fstr, int elem_len, int sizeofcstr)
+#else
+static char *c2fstrv( cstr, fstr, elem_len, sizeofcstr)
+ char* cstr; char *fstr; int elem_len; int sizeofcstr;
+#endif
+{ int i,j;
+/* elem_len includes \0 for C strings. Fortran strings don't have term. \0.
+ Useful size of string must be the same in both languages. */
+for (i=0; i<sizeofcstr/elem_len; i++) {
+ for (j=1; j<elem_len && *cstr; j++) *fstr++ = *cstr++;
+ cstr += 1+elem_len-j;
+ for (; j<elem_len; j++) *fstr++ = ' ';
+} /* 95109 - Seems to be returning the original fstr. */
+return fstr-sizeofcstr+sizeofcstr/elem_len; }
+
+/* Convert a vector of FORTRAN strings into C strings. */
+#ifndef __CF__KnR
+static char *f2cstrv(char *fstr, char* cstr, int elem_len, int sizeofcstr)
+#else
+static char *f2cstrv( fstr, cstr, elem_len, sizeofcstr)
+ char *fstr; char* cstr; int elem_len; int sizeofcstr;
+#endif
+{ int i,j;
+/* elem_len includes \0 for C strings. Fortran strings don't have term. \0.
+ Useful size of string must be the same in both languages. */
+cstr += sizeofcstr;
+fstr += sizeofcstr - sizeofcstr/elem_len;
+for (i=0; i<sizeofcstr/elem_len; i++) {
+ *--cstr = '\0';
+ for (j=1; j<elem_len; j++) *--cstr = *--fstr;
+} return cstr; }
+
+/* kill the trailing char t's in string s. */
+#ifndef __CF__KnR
+static char *kill_trailing(char *s, char t)
+#else
+static char *kill_trailing( s, t) char *s; char t;
+#endif
+{char *e;
+e = s + strlen(s);
+if (e>s) { /* Need this to handle NULL string.*/
+ while (e>s && *--e==t); /* Don't follow t's past beginning. */
+ e[*e==t?0:1] = '\0'; /* Handle s[0]=t correctly. */
+} return s; }
+
+/* kill_trailingn(s,t,e) will kill the trailing t's in string s. e normally
+points to the terminating '\0' of s, but may actually point to anywhere in s.
+s's new '\0' will be placed at e or earlier in order to remove any trailing t's.
+If e<s string s is left unchanged. */
+#ifndef __CF__KnR
+static char *kill_trailingn(char *s, char t, char *e)
+#else
+static char *kill_trailingn( s, t, e) char *s; char t; char *e;
+#endif
+{
+if (e==s) *e = '\0'; /* Kill the string makes sense here.*/
+else if (e>s) { /* Watch out for neg. length string.*/
+ while (e>s && *--e==t); /* Don't follow t's past beginning. */
+ e[*e==t?0:1] = '\0'; /* Handle s[0]=t correctly. */
+} return s; }
+
+/* Note the following assumes that any element which has t's to be chopped off,
+does indeed fill the entire element. */
+#ifndef __CF__KnR
+static char *vkill_trailing(char* cstr, int elem_len, int sizeofcstr, char t)
+#else
+static char *vkill_trailing( cstr, elem_len, sizeofcstr, t)
+ char* cstr; int elem_len; int sizeofcstr; char t;
+#endif
+{ int i;
+for (i=0; i<sizeofcstr/elem_len; i++) /* elem_len includes \0 for C strings. */
+ kill_trailingn(cstr+elem_len*i,t,cstr+elem_len*(i+1)-1);
+return cstr; }
+
+#ifdef vmsFortran
+typedef struct dsc$descriptor_s fstring;
+#define DSC$DESCRIPTOR_A(DIMCT) \
+struct { \
+ unsigned short dsc$w_length; unsigned char dsc$b_dtype; \
+ unsigned char dsc$b_class; char *dsc$a_pointer; \
+ char dsc$b_scale; unsigned char dsc$b_digits; \
+ struct { \
+ unsigned : 3; unsigned dsc$v_fl_binscale : 1; \
+ unsigned dsc$v_fl_redim : 1; unsigned dsc$v_fl_column : 1; \
+ unsigned dsc$v_fl_coeff : 1; unsigned dsc$v_fl_bounds : 1; \
+ } dsc$b_aflags; \
+ unsigned char dsc$b_dimct; unsigned long dsc$l_arsize; \
+ char *dsc$a_a0; long dsc$l_m [DIMCT]; \
+ struct { \
+ long dsc$l_l; long dsc$l_u; \
+ } dsc$bounds [DIMCT]; \
+}
+
+typedef DSC$DESCRIPTOR_A(1) fstringvector;
+/*typedef DSC$DESCRIPTOR_A(2) fstringarrarr;
+ typedef DSC$DESCRIPTOR_A(3) fstringarrarrarr;*/
+#define initfstr(F,C,ELEMNO,ELEMLEN) \
+( (F).dsc$l_arsize= ( (F).dsc$w_length =(ELEMLEN) ) \
+ *( (F).dsc$l_m[0]=(F).dsc$bounds[0].dsc$l_u=(ELEMNO) ), \
+ (F).dsc$a_a0 = ( (F).dsc$a_pointer=(C) ) - (F).dsc$w_length ,(F))
+
+#endif /* PDW: 2/10/98 -- Let VMS see NUM_ELEMS definitions */
+#define _NUM_ELEMS -1
+#define _NUM_ELEM_ARG -2
+#define NUM_ELEMS(A) A,_NUM_ELEMS
+#define NUM_ELEM_ARG(B) *_2(A,B),_NUM_ELEM_ARG
+#define TERM_CHARS(A,B) A,B
+#ifndef __CF__KnR
+static int num_elem(char *strv, unsigned elem_len, int term_char, int num_term)
+#else
+static int num_elem( strv, elem_len, term_char, num_term)
+ char *strv; unsigned elem_len; int term_char; int num_term;
+#endif
+/* elem_len is the number of characters in each element of strv, the FORTRAN
+vector of strings. The last element of the vector must begin with at least
+num_term term_char characters, so that this routine can determine how
+many elements are in the vector. */
+{
+unsigned num,i;
+if (num_term == _NUM_ELEMS || num_term == _NUM_ELEM_ARG)
+ return term_char;
+if (num_term <=0) num_term = (int)elem_len;
+for (num=0; ; num++) {
+ for (i=0; i<(unsigned)num_term && *strv==term_char; i++,strv++);
+ if (i==(unsigned)num_term) break;
+ else strv += elem_len-i;
+}
+return (int)num;
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* UTILITIES FOR C TO USE STRINGS IN FORTRAN COMMON BLOCKS */
+
+/* C string TO Fortran Common Block STRing. */
+/* DIM is the number of DIMensions of the array in terms of strings, not
+ characters. e.g. char a[12] has DIM = 0, char a[12][4] has DIM = 1, etc. */
+#define C2FCBSTR(CSTR,FSTR,DIM) \
+ c2fstrv((char *)CSTR, (char *)FSTR, sizeof(FSTR)/cfelementsof(FSTR,DIM)+1, \
+ sizeof(FSTR)+cfelementsof(FSTR,DIM))
+
+/* Fortran Common Block string TO C STRing. */
+#define FCB2CSTR(FSTR,CSTR,DIM) \
+ vkill_trailing(f2cstrv((char *)FSTR, (char *)CSTR, \
+ sizeof(FSTR)/cfelementsof(FSTR,DIM)+1, \
+ sizeof(FSTR)+cfelementsof(FSTR,DIM)), \
+ sizeof(FSTR)/cfelementsof(FSTR,DIM)+1, \
+ sizeof(FSTR)+cfelementsof(FSTR,DIM), ' ')
+
+#define cfDEREFERENCE0
+#define cfDEREFERENCE1 *
+#define cfDEREFERENCE2 **
+#define cfDEREFERENCE3 ***
+#define cfDEREFERENCE4 ****
+#define cfDEREFERENCE5 *****
+#define cfelementsof(A,D) (sizeof(A)/sizeof(_(cfDEREFERENCE,D)(A)))
+
+/*-------------------------------------------------------------------------*/
+
+/* UTILITIES FOR C TO CALL FORTRAN SUBROUTINES */
+
+/* Define lookup tables for how to handle the various types of variables. */
+
+#ifdef OLD_VAXC /* Prevent %CC-I-PARAMNOTUSED. */
+#pragma nostandard
+#endif
+
+#define ZTRINGV_NUM(I) I
+#define ZTRINGV_ARGFP(I) (*(_2(A,I))) /* Undocumented. For PINT, etc. */
+#define ZTRINGV_ARGF(I) _2(A,I)
+#ifdef CFSUBASFUN
+#define ZTRINGV_ARGS(I) ZTRINGV_ARGF(I)
+#else
+#define ZTRINGV_ARGS(I) _2(B,I)
+#endif
+
+#define PBYTE_cfVP(A,B) PINT_cfVP(A,B)
+#define PDOUBLE_cfVP(A,B)
+#define PFLOAT_cfVP(A,B)
+#ifdef ZTRINGV_ARGS_allows_Pvariables
+/* This allows Pvariables for ARGS. ARGF machinery is above ARGFP.
+ * B is not needed because the variable may be changed by the Fortran routine,
+ * but because B is the only way to access an arbitrary macro argument. */
+#define PINT_cfVP(A,B) int B = (int)A; /* For ZSTRINGV_ARGS */
+#else
+#define PINT_cfVP(A,B)
+#endif
+#define PLOGICAL_cfVP(A,B) int *B; /* Returning LOGICAL in FUNn and SUBn */
+#define PLONG_cfVP(A,B) PINT_cfVP(A,B)
+#define PSHORT_cfVP(A,B) PINT_cfVP(A,B)
+
+#define VCF_INT_S(T,A,B) _(T,VVVVVVV_cfTYPE) B = A;
+#define VCF_INT_F(T,A,B) _(T,_cfVCF)(A,B)
+/* _cfVCF table is directly mapped to _cfCCC table. */
+#define BYTE_cfVCF(A,B)
+#define DOUBLE_cfVCF(A,B)
+#if !defined(__CF__KnR)
+#define FLOAT_cfVCF(A,B)
+#else
+#define FLOAT_cfVCF(A,B) FORTRAN_REAL B = A;
+#endif
+#define INT_cfVCF(A,B)
+#define LOGICAL_cfVCF(A,B)
+#define LONG_cfVCF(A,B)
+#define SHORT_cfVCF(A,B)
+
+#define VCF(TN,I) _Icf4(4,V,TN,_(A,I),_(B,I),F)
+#define VVCF(TN,AI,BI) _Icf4(4,V,TN,AI,BI,S)
+#define INT_cfV(T,A,B,F) _(VCF_INT_,F)(T,A,B)
+#define INTV_cfV(T,A,B,F)
+#define INTVV_cfV(T,A,B,F)
+#define INTVVV_cfV(T,A,B,F)
+#define INTVVVV_cfV(T,A,B,F)
+#define INTVVVVV_cfV(T,A,B,F)
+#define INTVVVVVV_cfV(T,A,B,F)
+#define INTVVVVVVV_cfV(T,A,B,F)
+#define PINT_cfV( T,A,B,F) _(T,_cfVP)(A,B)
+#define PVOID_cfV( T,A,B,F)
+#if defined(apolloFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran)
+#define ROUTINE_cfV(T,A,B,F) void (*B)(CF_NULL_PROTO) = (void (*)(CF_NULL_PROTO))A;
+#else
+#define ROUTINE_cfV(T,A,B,F)
+#endif
+#define SIMPLE_cfV(T,A,B,F)
+#ifdef vmsFortran
+#define STRING_cfV(T,A,B,F) static struct {fstring f; unsigned clen;} B = \
+ {{0,DSC$K_DTYPE_T,DSC$K_CLASS_S,NULL},0};
+#define PSTRING_cfV(T,A,B,F) static fstring B={0,DSC$K_DTYPE_T,DSC$K_CLASS_S,NULL};
+#define STRINGV_cfV(T,A,B,F) static fstringvector B = \
+ {sizeof(A),DSC$K_DTYPE_T,DSC$K_CLASS_A,NULL,0,0,{0,0,1,1,1},1,0,NULL,0,{1,0}};
+#define PSTRINGV_cfV(T,A,B,F) static fstringvector B = \
+ {0,DSC$K_DTYPE_T,DSC$K_CLASS_A,NULL,0,0,{0,0,1,1,1},1,0,NULL,0,{1,0}};
+#else
+#define STRING_cfV(T,A,B,F) struct {unsigned int clen, flen;} B;
+#define STRINGV_cfV(T,A,B,F) struct {char *s, *fs; unsigned flen;} B;
+#define PSTRING_cfV(T,A,B,F) int B;
+#define PSTRINGV_cfV(T,A,B,F) struct{char *fs; unsigned int sizeofA,flen;}B;
+#endif
+#define ZTRINGV_cfV(T,A,B,F) STRINGV_cfV(T,A,B,F)
+#define PZTRINGV_cfV(T,A,B,F) PSTRINGV_cfV(T,A,B,F)
+
+/* Note that the actions of the A table were performed inside the AA table.
+ VAX Ultrix vcc, and HP-UX cc, didn't evaluate arguments to functions left to
+ right, so we had to split the original table into the current robust two. */
+#define ACF(NAME,TN,AI,I) _(TN,_cfSTR)(4,A,NAME,I,AI,_(B,I),0)
+#define DEFAULT_cfA(M,I,A,B)
+#define LOGICAL_cfA(M,I,A,B) B=C2FLOGICAL(B);
+#define PLOGICAL_cfA(M,I,A,B) A=C2FLOGICAL(A);
+#define STRING_cfA(M,I,A,B) STRING_cfC(M,I,A,B,sizeof(A))
+#define PSTRING_cfA(M,I,A,B) PSTRING_cfC(M,I,A,B,sizeof(A))
+#ifdef vmsFortran
+#define AATRINGV_cfA( A,B, sA,filA,silA) \
+ initfstr(B,(char *)malloc((sA)-(filA)),(filA),(silA)-1), \
+ c2fstrv(A,B.dsc$a_pointer,(silA),(sA));
+#define APATRINGV_cfA( A,B, sA,filA,silA) \
+ initfstr(B,A,(filA),(silA)-1),c2fstrv(A,A,(silA),(sA));
+#else
+#define AATRINGV_cfA( A,B, sA,filA,silA) \
+ (B.s=(char *)malloc((sA)-(filA)),B.fs=c2fstrv(A,B.s,(B.flen=(silA)-1)+1,(sA)));
+#define APATRINGV_cfA( A,B, sA,filA,silA) \
+ B.fs=c2fstrv(A,A,(B.flen=(silA)-1)+1,B.sizeofA=(sA));
+#endif
+#define STRINGV_cfA(M,I,A,B) \
+ AATRINGV_cfA((char *)A,B,sizeof(A),firstindexlength(A),secondindexlength(A))
+#define PSTRINGV_cfA(M,I,A,B) \
+ APATRINGV_cfA((char *)A,B,sizeof(A),firstindexlength(A),secondindexlength(A))
+#define ZTRINGV_cfA(M,I,A,B) AATRINGV_cfA( (char *)A,B, \
+ (_3(M,_ELEMS_,I))*(( _3(M,_ELEMLEN_,I))+1), \
+ (_3(M,_ELEMS_,I)),(_3(M,_ELEMLEN_,I))+1)
+#define PZTRINGV_cfA(M,I,A,B) APATRINGV_cfA( (char *)A,B, \
+ (_3(M,_ELEMS_,I))*(( _3(M,_ELEMLEN_,I))+1), \
+ (_3(M,_ELEMS_,I)),(_3(M,_ELEMLEN_,I))+1)
+
+#define PBYTE_cfAAP(A,B) &A
+#define PDOUBLE_cfAAP(A,B) &A
+#define PFLOAT_cfAAP(A,B) FLOATVVVVVVV_cfPP &A
+#define PINT_cfAAP(A,B) &A
+#define PLOGICAL_cfAAP(A,B) B= &A /* B used to keep a common W table. */
+#define PLONG_cfAAP(A,B) &A
+#define PSHORT_cfAAP(A,B) &A
+
+#define AACF(TN,AI,I,C) _SEP_(TN,C,COMMA) _Icf(3,AA,TN,AI,_(B,I))
+#define INT_cfAA(T,A,B) &B
+#define INTV_cfAA(T,A,B) _(T,VVVVVV_cfPP) A
+#define INTVV_cfAA(T,A,B) _(T,VVVVV_cfPP) A[0]
+#define INTVVV_cfAA(T,A,B) _(T,VVVV_cfPP) A[0][0]
+#define INTVVVV_cfAA(T,A,B) _(T,VVV_cfPP) A[0][0][0]
+#define INTVVVVV_cfAA(T,A,B) _(T,VV_cfPP) A[0][0][0][0]
+#define INTVVVVVV_cfAA(T,A,B) _(T,V_cfPP) A[0][0][0][0][0]
+#define INTVVVVVVV_cfAA(T,A,B) _(T,_cfPP) A[0][0][0][0][0][0]
+#define PINT_cfAA(T,A,B) _(T,_cfAAP)(A,B)
+#define PVOID_cfAA(T,A,B) (void *) A
+#if defined(apolloFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran)
+#define ROUTINE_cfAA(T,A,B) &B
+#else
+#define ROUTINE_cfAA(T,A,B) (void(*)(CF_NULL_PROTO))A
+#endif
+#define STRING_cfAA(T,A,B) STRING_cfCC(T,A,B)
+#define PSTRING_cfAA(T,A,B) PSTRING_cfCC(T,A,B)
+#ifdef vmsFortran
+#define STRINGV_cfAA(T,A,B) &B
+#else
+#ifdef CRAYFortran
+#define STRINGV_cfAA(T,A,B) _cptofcd(B.fs,B.flen)
+#else
+#define STRINGV_cfAA(T,A,B) B.fs
+#endif
+#endif
+#define PSTRINGV_cfAA(T,A,B) STRINGV_cfAA(T,A,B)
+#define ZTRINGV_cfAA(T,A,B) STRINGV_cfAA(T,A,B)
+#define PZTRINGV_cfAA(T,A,B) STRINGV_cfAA(T,A,B)
+
+#if defined(vmsFortran) || defined(CRAYFortran)
+#define JCF(TN,I)
+#define KCF(TN,I)
+#else
+#define JCF(TN,I) _(TN,_cfSTR)(1,J,_(B,I), 0,0,0,0)
+#if defined(AbsoftUNIXFortran)
+#define DEFAULT_cfJ(B) ,0
+#else
+#define DEFAULT_cfJ(B)
+#endif
+#define LOGICAL_cfJ(B) DEFAULT_cfJ(B)
+#define PLOGICAL_cfJ(B) DEFAULT_cfJ(B)
+#define STRING_cfJ(B) ,B.flen
+#define PSTRING_cfJ(B) ,B
+#define STRINGV_cfJ(B) STRING_cfJ(B)
+#define PSTRINGV_cfJ(B) STRING_cfJ(B)
+#define ZTRINGV_cfJ(B) STRING_cfJ(B)
+#define PZTRINGV_cfJ(B) STRING_cfJ(B)
+
+/* KCF is identical to DCF, except that KCF ZTRING is not empty. */
+#define KCF(TN,I) _(TN,_cfSTR)(1,KK,_(B,I), 0,0,0,0)
+#if defined(AbsoftUNIXFortran)
+#define DEFAULT_cfKK(B) , unsigned B
+#else
+#define DEFAULT_cfKK(B)
+#endif
+#define LOGICAL_cfKK(B) DEFAULT_cfKK(B)
+#define PLOGICAL_cfKK(B) DEFAULT_cfKK(B)
+#define STRING_cfKK(B) , unsigned B
+#define PSTRING_cfKK(B) STRING_cfKK(B)
+#define STRINGV_cfKK(B) STRING_cfKK(B)
+#define PSTRINGV_cfKK(B) STRING_cfKK(B)
+#define ZTRINGV_cfKK(B) STRING_cfKK(B)
+#define PZTRINGV_cfKK(B) STRING_cfKK(B)
+#endif
+
+#define WCF(TN,AN,I) _(TN,_cfSTR)(2,W,AN,_(B,I), 0,0,0)
+#define DEFAULT_cfW(A,B)
+#define LOGICAL_cfW(A,B)
+#define PLOGICAL_cfW(A,B) *B=F2CLOGICAL(*B);
+#define STRING_cfW(A,B) (A[B.clen]!='\0'?A[B.clen]='\0':0); /* A?="constnt"*/
+#define PSTRING_cfW(A,B) kill_trailing(A,' ');
+#ifdef vmsFortran
+#define STRINGV_cfW(A,B) free(B.dsc$a_pointer);
+#define PSTRINGV_cfW(A,B) \
+ vkill_trailing(f2cstrv((char*)A, (char*)A, \
+ B.dsc$w_length+1, B.dsc$l_arsize+B.dsc$l_m[0]), \
+ B.dsc$w_length+1, B.dsc$l_arsize+B.dsc$l_m[0], ' ');
+#else
+#define STRINGV_cfW(A,B) free(B.s);
+#define PSTRINGV_cfW(A,B) vkill_trailing( \
+ f2cstrv((char*)A,(char*)A,B.flen+1,B.sizeofA), B.flen+1,B.sizeofA,' ');
+#endif
+#define ZTRINGV_cfW(A,B) STRINGV_cfW(A,B)
+#define PZTRINGV_cfW(A,B) PSTRINGV_cfW(A,B)
+
+#define NCF(TN,I,C) _SEP_(TN,C,COMMA) _Icf(2,N,TN,_(A,I),0)
+#define NNCF(TN,I,C) UUCF(TN,I,C)
+#define NNNCF(TN,I,C) _SEP_(TN,C,COLON) _Icf(2,N,TN,_(A,I),0)
+#define INT_cfN(T,A) _(T,VVVVVVV_cfTYPE) * A
+#define INTV_cfN(T,A) _(T,VVVVVV_cfTYPE) * A
+#define INTVV_cfN(T,A) _(T,VVVVV_cfTYPE) * A
+#define INTVVV_cfN(T,A) _(T,VVVV_cfTYPE) * A
+#define INTVVVV_cfN(T,A) _(T,VVV_cfTYPE) * A
+#define INTVVVVV_cfN(T,A) _(T,VV_cfTYPE) * A
+#define INTVVVVVV_cfN(T,A) _(T,V_cfTYPE) * A
+#define INTVVVVVVV_cfN(T,A) _(T,_cfTYPE) * A
+#define PINT_cfN(T,A) _(T,_cfTYPE) * A
+#define PVOID_cfN(T,A) void * A
+#if defined(apolloFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran)
+#define ROUTINE_cfN(T,A) void (**A)(CF_NULL_PROTO)
+#else
+#define ROUTINE_cfN(T,A) void ( *A)(CF_NULL_PROTO)
+#endif
+#ifdef vmsFortran
+#define STRING_cfN(T,A) fstring * A
+#define STRINGV_cfN(T,A) fstringvector * A
+#else
+#ifdef CRAYFortran
+#define STRING_cfN(T,A) _fcd A
+#define STRINGV_cfN(T,A) _fcd A
+#else
+#define STRING_cfN(T,A) char * A
+#define STRINGV_cfN(T,A) char * A
+#endif
+#endif
+#define PSTRING_cfN(T,A) STRING_cfN(T,A) /* CRAY insists on arg.'s here. */
+#define PNSTRING_cfN(T,A) STRING_cfN(T,A) /* CRAY insists on arg.'s here. */
+#define PPSTRING_cfN(T,A) STRING_cfN(T,A) /* CRAY insists on arg.'s here. */
+#define PSTRINGV_cfN(T,A) STRINGV_cfN(T,A)
+#define ZTRINGV_cfN(T,A) STRINGV_cfN(T,A)
+#define PZTRINGV_cfN(T,A) PSTRINGV_cfN(T,A)
+
+
+/* Apollo 6.7, CRAY, old Sun, VAX/Ultrix vcc/cc and new ultrix
+ can't hack more than 31 arg's.
+ e.g. ultrix >= 4.3 gives message:
+ zow35> cc -c -DDECFortran cfortest.c
+ cfe: Fatal: Out of memory: cfortest.c
+ zow35>
+ Old __hpux had the problem, but new 'HP-UX A.09.03 A 9000/735' is fine
+ if using -Aa, otherwise we have a problem.
+ */
+#ifndef MAX_PREPRO_ARGS
+#if !defined(__GNUC__) && (defined(VAXUltrix) || defined(__CF__APOLLO67) || (defined(sun)&&!defined(__sun)) || defined(_CRAY) || defined(__ultrix__) || (defined(__hpux)&&defined(__CF__KnR)))
+#define MAX_PREPRO_ARGS 31
+#else
+#define MAX_PREPRO_ARGS 99
+#endif
+#endif
+
+#if defined(AbsoftUNIXFortran)
+/* In addition to explicit Absoft stuff, only Absoft requires:
+ - DEFAULT coming from _cfSTR.
+ DEFAULT could have been called e.g. INT, but keep it for clarity.
+ - M term in CFARGT14 and CFARGT14FS.
+ */
+#define ABSOFT_cf1(T0) _(T0,_cfSTR)(0,ABSOFT1,0,0,0,0,0)
+#define ABSOFT_cf2(T0) _(T0,_cfSTR)(0,ABSOFT2,0,0,0,0,0)
+#define ABSOFT_cf3(T0) _(T0,_cfSTR)(0,ABSOFT3,0,0,0,0,0)
+#define DEFAULT_cfABSOFT1
+#define LOGICAL_cfABSOFT1
+#define STRING_cfABSOFT1 ,MAX_LEN_FORTRAN_FUNCTION_STRING
+#define DEFAULT_cfABSOFT2
+#define LOGICAL_cfABSOFT2
+#define STRING_cfABSOFT2 ,unsigned D0
+#define DEFAULT_cfABSOFT3
+#define LOGICAL_cfABSOFT3
+#define STRING_cfABSOFT3 ,D0
+#else
+#define ABSOFT_cf1(T0)
+#define ABSOFT_cf2(T0)
+#define ABSOFT_cf3(T0)
+#endif
+
+/* _Z introduced to cicumvent IBM and HP silly preprocessor warning.
+ e.g. "Macro CFARGT14 invoked with a null argument."
+ */
+#define _Z
+
+#define CFARGT14S(S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ S(T1,1) S(T2,2) S(T3,3) S(T4,4) S(T5,5) S(T6,6) S(T7,7) \
+ S(T8,8) S(T9,9) S(TA,A) S(TB,B) S(TC,C) S(TD,D) S(TE,E)
+#define CFARGT14FS(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ F(T1,1,0) F(T2,2,1) F(T3,3,1) F(T4,4,1) F(T5,5,1) F(T6,6,1) F(T7,7,1) \
+ F(T8,8,1) F(T9,9,1) F(TA,A,1) F(TB,B,1) F(TC,C,1) F(TD,D,1) F(TE,E,1) \
+ M CFARGT14S(S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
+
+#if !(defined(PowerStationFortran)||defined(hpuxFortran800))
+/* Old CFARGT14 -> CFARGT14FS as seen below, for Absoft cross-compile yields:
+ SunOS> cc -c -Xa -DAbsoftUNIXFortran c.c
+ "c.c", line 406: warning: argument mismatch
+ Haven't checked if this is ANSI C or a SunOS bug. SunOS -Xs works ok.
+ Behavior is most clearly seen in example:
+ #define A 1 , 2
+ #define C(X,Y,Z) x=X. y=Y. z=Z.
+ #define D(X,Y,Z) C(X,Y,Z)
+ D(x,A,z)
+ Output from preprocessor is: x = x . y = 1 . z = 2 .
+ #define CFARGT14(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ CFARGT14FS(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
+*/
+#define CFARGT14(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ F(T1,1,0) F(T2,2,1) F(T3,3,1) F(T4,4,1) F(T5,5,1) F(T6,6,1) F(T7,7,1) \
+ F(T8,8,1) F(T9,9,1) F(TA,A,1) F(TB,B,1) F(TC,C,1) F(TD,D,1) F(TE,E,1) \
+ M CFARGT14S(S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
+/* F changed to Z for arg 15. Watch out if ever extend to S or Z arguments. */
+#define CFARGT20(Z,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \
+ Z(T1,1,0) Z(T2,2,1) Z(T3,3,1) Z(T4,4,1) Z(T5,5,1) Z(T6,6,1) Z(T7,7,1) \
+ Z(T8,8,1) Z(T9,9,1) Z(TA,A,1) Z(TB,B,1) Z(TC,C,1) Z(TD,D,1) Z(TE,E,1) \
+ Z(TF,F,1) Z(TG,G,1) Z(TH,H,1) Z(TI,I,1) Z(TJ,J,1) Z(TK,K,1) \
+ S(T1,1) S(T2,2) S(T3,3) S(T4,4) S(T5,5) S(T6,6) S(T7,7) \
+ S(T8,8) S(T9,9) S(TA,A) S(TB,B) S(TC,C) S(TD,D) S(TE,E) \
+ S(TF,F) S(TG,G) S(TH,H) S(TI,I) S(TJ,J) S(TK,K)
+#define CFARGTA14(F,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE) \
+ F(T1,A1,1,0) F(T2,A2,2,1) F(T3,A3,3,1) F(T4,A4,4,1) F(T5,A5,5,1) F(T6,A6,6,1) \
+ F(T7,A7,7,1) F(T8,A8,8,1) F(T9,A9,9,1) F(TA,AA,A,1) F(TB,AB,B,1) F(TC,AC,C,1) \
+ F(TD,AD,D,1) F(TE,AE,E,1) S(T1,1) S(T2,2) S(T3,3) S(T4,4) \
+ S(T5,5) S(T6,6) S(T7,7) S(T8,8) S(T9,9) S(TA,A) \
+ S(TB,B) S(TC,C) S(TD,D) S(TE,E)
+#if MAX_PREPRO_ARGS>31
+/* F changed to Z for arg 15. Watch out if ever extend to S or Z arguments. */
+#define CFARGTA20(Z,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) \
+ Z(T1,A1,1,0) Z(T2,A2,2,1) Z(T3,A3,3,1) Z(T4,A4,4,1) Z(T5,A5,5,1) Z(T6,A6,6,1) \
+ Z(T7,A7,7,1) Z(T8,A8,8,1) Z(T9,A9,9,1) Z(TA,AA,A,1) Z(TB,AB,B,1) Z(TC,AC,C,1) \
+ Z(TD,AD,D,1) Z(TE,AE,E,1) Z(TF,AF,F,1) Z(TG,AG,G,1) Z(TH,AH,H,1) Z(TI,AI,I,1) \
+ Z(TJ,AJ,J,1) Z(TK,AK,K,1) S(T1,1) S(T2,2) S(T3,3) S(T4,4) \
+ S(T5,5) S(T6,6) S(T7,7) S(T8,8) S(T9,9) S(TA,A) \
+ S(TB,B) S(TC,C) S(TD,D) S(TE,E) S(TF,F) S(TG,G) \
+ S(TH,H) S(TI,I) S(TJ,J) S(TK,K)
+#endif
+#else
+#define CFARGT14(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ F(T1,1,0) S(T1,1) F(T2,2,1) S(T2,2) F(T3,3,1) S(T3,3) F(T4,4,1) S(T4,4) \
+ F(T5,5,1) S(T5,5) F(T6,6,1) S(T6,6) F(T7,7,1) S(T7,7) F(T8,8,1) S(T8,8) \
+ F(T9,9,1) S(T9,9) F(TA,A,1) S(TA,A) F(TB,B,1) S(TB,B) F(TC,C,1) S(TC,C) \
+ F(TD,D,1) S(TD,D) F(TE,E,1) S(TE,E)
+/* F changed to Z for arg 15. Watch out if ever extend to S or Z arguments. */
+#define CFARGT20(Z,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \
+ Z(T1,1,0) S(T1,1) Z(T2,2,1) S(T2,2) Z(T3,3,1) S(T3,3) Z(T4,4,1) S(T4,4) \
+ Z(T5,5,1) S(T5,5) Z(T6,6,1) S(T6,6) Z(T7,7,1) S(T7,7) Z(T8,8,1) S(T8,8) \
+ Z(T9,9,1) S(T9,9) Z(TA,A,1) S(TA,A) Z(TB,B,1) S(TB,B) Z(TC,C,1) S(TC,C) \
+ Z(TD,D,1) S(TD,D) Z(TE,E,1) S(TE,E) Z(TF,F,1) S(TF,F) Z(TG,G,1) S(TG,G) \
+ Z(TH,H,1) S(TH,H) Z(TI,I,1) S(TI,I) Z(TJ,J,1) S(TJ,J) Z(TK,K,1) S(TK,K)
+#define CFARGTA14(F,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE) \
+ F(T1,A1,1,0) S(T1,1) F(T2,A2,2,1) S(T2,2) F(T3,A3,3,1) S(T3,3) \
+ F(T4,A4,4,1) S(T4,4) F(T5,A5,5,1) S(T5,5) F(T6,A6,6,1) S(T6,6) \
+ F(T7,A7,7,1) S(T7,7) F(T8,A8,8,1) S(T8,8) F(T9,A9,9,1) S(T9,9) \
+ F(TA,AA,A,1) S(TA,A) F(TB,AB,B,1) S(TB,B) F(TC,AC,C,1) S(TC,C) \
+ F(TD,AD,D,1) S(TD,D) F(TE,AE,E,1) S(TE,E)
+#if MAX_PREPRO_ARGS>31
+/* F changed to Z for arg 15. Watch out if ever extend to S or Z arguments. */
+#define CFARGTA20(Z,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) \
+ Z(T1,A1,1,0) S(T1,1) Z(T2,A2,2,1) S(T2,2) Z(T3,A3,3,1) S(T3,3) \
+ Z(T4,A4,4,1) S(T4,4) Z(T5,A5,5,1) S(T5,5) Z(T6,A6,6,1) S(T6,6) \
+ Z(T7,A7,7,1) S(T7,7) Z(T8,A8,8,1) S(T8,8) Z(T9,A9,9,1) S(T9,9) \
+ Z(TA,AA,A,1) S(TA,A) Z(TB,AB,B,1) S(TB,B) Z(TC,AC,C,1) S(TC,C) \
+ Z(TD,AD,D,1) S(TD,D) Z(TE,AE,E,1) S(TE,E) Z(TF,AF,F,1) S(TF,F) \
+ Z(TG,AG,G,1) S(TG,G) Z(TH,AH,H,1) S(TH,H) Z(TI,AI,I,1) S(TI,I) \
+ Z(TJ,AJ,J,1) S(TJ,J) Z(TK,AK,K,1) S(TK,K)
+#endif
+#endif
+
+
+#define PROTOCCALLSFSUB1( UN,LN,T1) \
+ PROTOCCALLSFSUB14(UN,LN,T1,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB2( UN,LN,T1,T2) \
+ PROTOCCALLSFSUB14(UN,LN,T1,T2,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB3( UN,LN,T1,T2,T3) \
+ PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB4( UN,LN,T1,T2,T3,T4) \
+ PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB5( UN,LN,T1,T2,T3,T4,T5) \
+ PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB6( UN,LN,T1,T2,T3,T4,T5,T6) \
+ PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB7( UN,LN,T1,T2,T3,T4,T5,T6,T7) \
+ PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB8( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8) \
+ PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB9( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9) \
+ PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA) \
+ PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB11(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB) \
+ PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB12(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC) \
+ PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,CF_0,CF_0)
+#define PROTOCCALLSFSUB13(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD) \
+ PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,CF_0)
+
+
+#define PROTOCCALLSFSUB15(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF) \
+ PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB16(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG) \
+ PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB17(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH) \
+ PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFSUB18(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI) \
+ PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,CF_0,CF_0)
+#define PROTOCCALLSFSUB19(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ) \
+ PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,CF_0)
+
+
+#ifndef FCALLSC_QUALIFIER
+#ifdef VISUAL_CPLUSPLUS
+#define FCALLSC_QUALIFIER __stdcall
+#else
+#define FCALLSC_QUALIFIER
+#endif
+#endif
+
+#ifdef __cplusplus
+#define CFextern extern "C"
+#else
+#define CFextern extern
+#endif
+
+
+#ifdef CFSUBASFUN
+#define PROTOCCALLSFSUB0(UN,LN) \
+ PROTOCCALLSFFUN0( VOID,UN,LN)
+#define PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ PROTOCCALLSFFUN14(VOID,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
+#define PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK)\
+ PROTOCCALLSFFUN20(VOID,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK)
+#else
+/* Note: Prevent compiler warnings, null #define PROTOCCALLSFSUB14/20 after
+ #include-ing cfortran.h if calling the FORTRAN wrapper within the same
+ source code where the wrapper is created. */
+#define PROTOCCALLSFSUB0(UN,LN) CFextern void FCALLSC_QUALIFIER CFC_(UN,LN)();
+#ifndef __CF__KnR
+#define PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ CFextern void FCALLSC_QUALIFIER CFC_(UN,LN)( CFARGT14(NCF,KCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) );
+#define PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK)\
+ CFextern void FCALLSC_QUALIFIER CFC_(UN,LN)( CFARGT20(NCF,KCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) );
+#else
+#define PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ PROTOCCALLSFSUB0(UN,LN)
+#define PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \
+ PROTOCCALLSFSUB0(UN,LN)
+#endif
+#endif
+
+
+#ifdef OLD_VAXC /* Allow %CC-I-PARAMNOTUSED. */
+#pragma standard
+#endif
+
+
+#define CCALLSFSUB1( UN,LN,T1, A1) \
+ CCALLSFSUB5 (UN,LN,T1,CF_0,CF_0,CF_0,CF_0,A1,0,0,0,0)
+#define CCALLSFSUB2( UN,LN,T1,T2, A1,A2) \
+ CCALLSFSUB5 (UN,LN,T1,T2,CF_0,CF_0,CF_0,A1,A2,0,0,0)
+#define CCALLSFSUB3( UN,LN,T1,T2,T3, A1,A2,A3) \
+ CCALLSFSUB5 (UN,LN,T1,T2,T3,CF_0,CF_0,A1,A2,A3,0,0)
+#define CCALLSFSUB4( UN,LN,T1,T2,T3,T4, A1,A2,A3,A4)\
+ CCALLSFSUB5 (UN,LN,T1,T2,T3,T4,CF_0,A1,A2,A3,A4,0)
+#define CCALLSFSUB5( UN,LN,T1,T2,T3,T4,T5, A1,A2,A3,A4,A5) \
+ CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,CF_0,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,0,0,0,0,0)
+#define CCALLSFSUB6( UN,LN,T1,T2,T3,T4,T5,T6, A1,A2,A3,A4,A5,A6) \
+ CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,0,0,0,0)
+#define CCALLSFSUB7( UN,LN,T1,T2,T3,T4,T5,T6,T7, A1,A2,A3,A4,A5,A6,A7) \
+ CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,T7,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,0,0,0)
+#define CCALLSFSUB8( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8, A1,A2,A3,A4,A5,A6,A7,A8) \
+ CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,0,0)
+#define CCALLSFSUB9( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,A1,A2,A3,A4,A5,A6,A7,A8,A9)\
+ CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,0)
+#define CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA)\
+ CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,0,0,0,0)
+#define CCALLSFSUB11(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB)\
+ CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,0,0,0)
+#define CCALLSFSUB12(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC)\
+ CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,0,0)
+#define CCALLSFSUB13(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD)\
+ CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,0)
+
+#ifdef __cplusplus
+#define CPPPROTOCLSFSUB0( UN,LN)
+#define CPPPROTOCLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
+#define CPPPROTOCLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK)
+#else
+#define CPPPROTOCLSFSUB0(UN,LN) \
+ PROTOCCALLSFSUB0(UN,LN)
+#define CPPPROTOCLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
+#define CPPPROTOCLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \
+ PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK)
+#endif
+
+#ifdef CFSUBASFUN
+#define CCALLSFSUB0(UN,LN) CCALLSFFUN0(UN,LN)
+#define CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE)\
+ CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE)
+#else
+/* do{...}while(FALSE) allows if(a==b) FORT(); else BORT(); */
+#define CCALLSFSUB0( UN,LN) do{CPPPROTOCLSFSUB0(UN,LN) CFC_(UN,LN)();}while(FALSE)
+#define CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE)\
+do{VVCF(T1,A1,B1) VVCF(T2,A2,B2) VVCF(T3,A3,B3) VVCF(T4,A4,B4) VVCF(T5,A5,B5) \
+ VVCF(T6,A6,B6) VVCF(T7,A7,B7) VVCF(T8,A8,B8) VVCF(T9,A9,B9) VVCF(TA,AA,BA) \
+ VVCF(TB,AB,BB) VVCF(TC,AC,BC) VVCF(TD,AD,BD) VVCF(TE,AE,BE) \
+ CPPPROTOCLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ ACF(LN,T1,A1,1) ACF(LN,T2,A2,2) ACF(LN,T3,A3,3) \
+ ACF(LN,T4,A4,4) ACF(LN,T5,A5,5) ACF(LN,T6,A6,6) ACF(LN,T7,A7,7) \
+ ACF(LN,T8,A8,8) ACF(LN,T9,A9,9) ACF(LN,TA,AA,A) ACF(LN,TB,AB,B) \
+ ACF(LN,TC,AC,C) ACF(LN,TD,AD,D) ACF(LN,TE,AE,E) \
+ CFC_(UN,LN)( CFARGTA14(AACF,JCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE) );\
+ WCF(T1,A1,1) WCF(T2,A2,2) WCF(T3,A3,3) WCF(T4,A4,4) WCF(T5,A5,5) \
+ WCF(T6,A6,6) WCF(T7,A7,7) WCF(T8,A8,8) WCF(T9,A9,9) WCF(TA,AA,A) \
+ WCF(TB,AB,B) WCF(TC,AC,C) WCF(TD,AD,D) WCF(TE,AE,E) }while(FALSE)
+#endif
+
+
+#if MAX_PREPRO_ARGS>31
+#define CCALLSFSUB15(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF)\
+ CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,CF_0,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,0,0,0,0,0)
+#define CCALLSFSUB16(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG)\
+ CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,0,0,0,0)
+#define CCALLSFSUB17(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH)\
+ CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,0,0,0)
+#define CCALLSFSUB18(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI)\
+ CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,0,0)
+#define CCALLSFSUB19(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ)\
+ CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,0)
+
+#ifdef CFSUBASFUN
+#define CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH, \
+ TI,TJ,TK, A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) \
+ CCALLSFFUN20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH, \
+ TI,TJ,TK, A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK)
+#else
+#define CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH, \
+ TI,TJ,TK, A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) \
+do{VVCF(T1,A1,B1) VVCF(T2,A2,B2) VVCF(T3,A3,B3) VVCF(T4,A4,B4) VVCF(T5,A5,B5) \
+ VVCF(T6,A6,B6) VVCF(T7,A7,B7) VVCF(T8,A8,B8) VVCF(T9,A9,B9) VVCF(TA,AA,BA) \
+ VVCF(TB,AB,BB) VVCF(TC,AC,BC) VVCF(TD,AD,BD) VVCF(TE,AE,BE) VVCF(TF,AF,BF) \
+ VVCF(TG,AG,BG) VVCF(TH,AH,BH) VVCF(TI,AI,BI) VVCF(TJ,AJ,BJ) VVCF(TK,AK,BK) \
+ CPPPROTOCLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \
+ ACF(LN,T1,A1,1) ACF(LN,T2,A2,2) ACF(LN,T3,A3,3) ACF(LN,T4,A4,4) \
+ ACF(LN,T5,A5,5) ACF(LN,T6,A6,6) ACF(LN,T7,A7,7) ACF(LN,T8,A8,8) \
+ ACF(LN,T9,A9,9) ACF(LN,TA,AA,A) ACF(LN,TB,AB,B) ACF(LN,TC,AC,C) \
+ ACF(LN,TD,AD,D) ACF(LN,TE,AE,E) ACF(LN,TF,AF,F) ACF(LN,TG,AG,G) \
+ ACF(LN,TH,AH,H) ACF(LN,TI,AI,I) ACF(LN,TJ,AJ,J) ACF(LN,TK,AK,K) \
+ CFC_(UN,LN)( CFARGTA20(AACF,JCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) ); \
+ WCF(T1,A1,1) WCF(T2,A2,2) WCF(T3,A3,3) WCF(T4,A4,4) WCF(T5,A5,5) WCF(T6,A6,6) \
+ WCF(T7,A7,7) WCF(T8,A8,8) WCF(T9,A9,9) WCF(TA,AA,A) WCF(TB,AB,B) WCF(TC,AC,C) \
+ WCF(TD,AD,D) WCF(TE,AE,E) WCF(TF,AF,F) WCF(TG,AG,G) WCF(TH,AH,H) WCF(TI,AI,I) \
+ WCF(TJ,AJ,J) WCF(TK,AK,K) }while(FALSE)
+#endif
+#endif /* MAX_PREPRO_ARGS */
+
+/*-------------------------------------------------------------------------*/
+
+/* UTILITIES FOR C TO CALL FORTRAN FUNCTIONS */
+
+/*N.B. PROTOCCALLSFFUNn(..) generates code, whether or not the FORTRAN
+ function is called. Therefore, especially for creator's of C header files
+ for large FORTRAN libraries which include many functions, to reduce
+ compile time and object code size, it may be desirable to create
+ preprocessor directives to allow users to create code for only those
+ functions which they use. */
+
+/* The following defines the maximum length string that a function can return.
+ Of course it may be undefine-d and re-define-d before individual
+ PROTOCCALLSFFUNn(..) as required. It would also be nice to have this derived
+ from the individual machines' limits. */
+#define MAX_LEN_FORTRAN_FUNCTION_STRING 0x4FE
+
+/* The following defines a character used by CFORTRAN.H to flag the end of a
+ string coming out of a FORTRAN routine. */
+#define CFORTRAN_NON_CHAR 0x7F
+
+#ifdef OLD_VAXC /* Prevent %CC-I-PARAMNOTUSED. */
+#pragma nostandard
+#endif
+
+#define _SEP_(TN,C,COMMA) _(__SEP_,C)(TN,COMMA)
+#define __SEP_0(TN,COMMA)
+#define __SEP_1(TN,COMMA) _Icf(2,SEP,TN,COMMA,0)
+#define INT_cfSEP(T,B) _(A,B)
+#define INTV_cfSEP(T,B) INT_cfSEP(T,B)
+#define INTVV_cfSEP(T,B) INT_cfSEP(T,B)
+#define INTVVV_cfSEP(T,B) INT_cfSEP(T,B)
+#define INTVVVV_cfSEP(T,B) INT_cfSEP(T,B)
+#define INTVVVVV_cfSEP(T,B) INT_cfSEP(T,B)
+#define INTVVVVVV_cfSEP(T,B) INT_cfSEP(T,B)
+#define INTVVVVVVV_cfSEP(T,B) INT_cfSEP(T,B)
+#define PINT_cfSEP(T,B) INT_cfSEP(T,B)
+#define PVOID_cfSEP(T,B) INT_cfSEP(T,B)
+#define ROUTINE_cfSEP(T,B) INT_cfSEP(T,B)
+#define SIMPLE_cfSEP(T,B) INT_cfSEP(T,B)
+#define VOID_cfSEP(T,B) INT_cfSEP(T,B) /* For FORTRAN calls C subr.s.*/
+#define STRING_cfSEP(T,B) INT_cfSEP(T,B)
+#define STRINGV_cfSEP(T,B) INT_cfSEP(T,B)
+#define PSTRING_cfSEP(T,B) INT_cfSEP(T,B)
+#define PSTRINGV_cfSEP(T,B) INT_cfSEP(T,B)
+#define PNSTRING_cfSEP(T,B) INT_cfSEP(T,B)
+#define PPSTRING_cfSEP(T,B) INT_cfSEP(T,B)
+#define ZTRINGV_cfSEP(T,B) INT_cfSEP(T,B)
+#define PZTRINGV_cfSEP(T,B) INT_cfSEP(T,B)
+
+#if defined(SIGNED_BYTE) || !defined(UNSIGNED_BYTE)
+#ifdef OLD_VAXC
+#define INTEGER_BYTE char /* Old VAXC barfs on 'signed char' */
+#else
+#define INTEGER_BYTE signed char /* default */
+#endif
+#else
+#define INTEGER_BYTE unsigned char
+#endif
+#define BYTEVVVVVVV_cfTYPE INTEGER_BYTE
+#define DOUBLEVVVVVVV_cfTYPE DOUBLE_PRECISION
+#define FLOATVVVVVVV_cfTYPE FORTRAN_REAL
+#define INTVVVVVVV_cfTYPE int
+#define LOGICALVVVVVVV_cfTYPE int
+#define LONGVVVVVVV_cfTYPE long
+#define SHORTVVVVVVV_cfTYPE short
+#define PBYTE_cfTYPE INTEGER_BYTE
+#define PDOUBLE_cfTYPE DOUBLE_PRECISION
+#define PFLOAT_cfTYPE FORTRAN_REAL
+#define PINT_cfTYPE int
+#define PLOGICAL_cfTYPE int
+#define PLONG_cfTYPE long
+#define PSHORT_cfTYPE short
+
+#define CFARGS0(A,T,V,W,X,Y,Z) _3(T,_cf,A)
+#define CFARGS1(A,T,V,W,X,Y,Z) _3(T,_cf,A)(V)
+#define CFARGS2(A,T,V,W,X,Y,Z) _3(T,_cf,A)(V,W)
+#define CFARGS3(A,T,V,W,X,Y,Z) _3(T,_cf,A)(V,W,X)
+#define CFARGS4(A,T,V,W,X,Y,Z) _3(T,_cf,A)(V,W,X,Y)
+#define CFARGS5(A,T,V,W,X,Y,Z) _3(T,_cf,A)(V,W,X,Y,Z)
+
+#define _Icf(N,T,I,X,Y) _(I,_cfINT)(N,T,I,X,Y,0)
+#define _Icf4(N,T,I,X,Y,Z) _(I,_cfINT)(N,T,I,X,Y,Z)
+#define BYTE_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z)
+#define DOUBLE_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INT,B,X,Y,Z,0)
+#define FLOAT_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z)
+#define INT_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z)
+#define LOGICAL_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z)
+#define LONG_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z)
+#define SHORT_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z)
+#define PBYTE_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z)
+#define PDOUBLE_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,PINT,B,X,Y,Z,0)
+#define PFLOAT_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z)
+#define PINT_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z)
+#define PLOGICAL_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z)
+#define PLONG_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z)
+#define PSHORT_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z)
+#define BYTEV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z)
+#define BYTEVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z)
+#define BYTEVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z)
+#define BYTEVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z)
+#define BYTEVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z)
+#define BYTEVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z)
+#define BYTEVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z)
+#define DOUBLEV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTV,B,X,Y,Z,0)
+#define DOUBLEVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVV,B,X,Y,Z,0)
+#define DOUBLEVVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVVV,B,X,Y,Z,0)
+#define DOUBLEVVVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVVVV,B,X,Y,Z,0)
+#define DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVVVVV,B,X,Y,Z,0)
+#define DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVVVVVV,B,X,Y,Z,0)
+#define DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVVVVVVV,B,X,Y,Z,0)
+#define FLOATV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z)
+#define FLOATVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z)
+#define FLOATVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z)
+#define FLOATVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z)
+#define FLOATVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z)
+#define FLOATVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z)
+#define FLOATVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z)
+#define INTV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z)
+#define INTVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z)
+#define INTVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z)
+#define INTVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z)
+#define INTVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z)
+#define INTVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z)
+#define INTVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z)
+#define LOGICALV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z)
+#define LOGICALVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z)
+#define LOGICALVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z)
+#define LOGICALVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z)
+#define LOGICALVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z)
+#define LOGICALVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z)
+#define LOGICALVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z)
+#define LONGV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z)
+#define LONGVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z)
+#define LONGVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z)
+#define LONGVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z)
+#define LONGVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z)
+#define LONGVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z)
+#define LONGVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z)
+#define SHORTV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z)
+#define SHORTVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z)
+#define SHORTVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z)
+#define SHORTVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z)
+#define SHORTVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z)
+#define SHORTVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z)
+#define SHORTVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z)
+#define PVOID_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,B,B,X,Y,Z,0)
+#define ROUTINE_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
+/*CRAY coughs on the first,
+ i.e. the usual trouble of not being able to
+ define macros to macros with arguments.
+ New ultrix is worse, it coughs on all such uses.
+ */
+/*#define SIMPLE_cfINT PVOID_cfINT*/
+#define SIMPLE_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
+#define VOID_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
+#define STRING_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
+#define STRINGV_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
+#define PSTRING_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
+#define PSTRINGV_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
+#define PNSTRING_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
+#define PPSTRING_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
+#define ZTRINGV_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
+#define PZTRINGV_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
+#define CF_0_cfINT(N,A,B,X,Y,Z)
+
+
+#define UCF(TN,I,C) _SEP_(TN,C,COMMA) _Icf(2,U,TN,_(A,I),0)
+#define UUCF(TN,I,C) _SEP_(TN,C,COMMA) _SEP_(TN,1,I)
+#define UUUCF(TN,I,C) _SEP_(TN,C,COLON) _Icf(2,U,TN,_(A,I),0)
+#define INT_cfU(T,A) _(T,VVVVVVV_cfTYPE) A
+#define INTV_cfU(T,A) _(T,VVVVVV_cfTYPE) * A
+#define INTVV_cfU(T,A) _(T,VVVVV_cfTYPE) * A
+#define INTVVV_cfU(T,A) _(T,VVVV_cfTYPE) * A
+#define INTVVVV_cfU(T,A) _(T,VVV_cfTYPE) * A
+#define INTVVVVV_cfU(T,A) _(T,VV_cfTYPE) * A
+#define INTVVVVVV_cfU(T,A) _(T,V_cfTYPE) * A
+#define INTVVVVVVV_cfU(T,A) _(T,_cfTYPE) * A
+#define PINT_cfU(T,A) _(T,_cfTYPE) * A
+#define PVOID_cfU(T,A) void *A
+#define ROUTINE_cfU(T,A) void (*A)(CF_NULL_PROTO)
+#define VOID_cfU(T,A) void A /* Needed for C calls FORTRAN sub.s. */
+#define STRING_cfU(T,A) char *A /* via VOID and wrapper. */
+#define STRINGV_cfU(T,A) char *A
+#define PSTRING_cfU(T,A) char *A
+#define PSTRINGV_cfU(T,A) char *A
+#define ZTRINGV_cfU(T,A) char *A
+#define PZTRINGV_cfU(T,A) char *A
+
+/* VOID breaks U into U and UU. */
+#define INT_cfUU(T,A) _(T,VVVVVVV_cfTYPE) A
+#define VOID_cfUU(T,A) /* Needed for FORTRAN calls C sub.s. */
+#define STRING_cfUU(T,A) char *A
+
+
+#define BYTE_cfPU(A) CFextern INTEGER_BYTE FCALLSC_QUALIFIER A
+#define DOUBLE_cfPU(A) CFextern DOUBLE_PRECISION FCALLSC_QUALIFIER A
+#if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT))
+#define FLOAT_cfPU(A) CFextern FORTRAN_REAL FCALLSC_QUALIFIER A
+#else
+#define FLOAT_cfPU(A) CFextern FLOATFUNCTIONTYPE FCALLSC_QUALIFIER A
+#endif
+#define INT_cfPU(A) CFextern int FCALLSC_QUALIFIER A
+#define LOGICAL_cfPU(A) CFextern int FCALLSC_QUALIFIER A
+#define LONG_cfPU(A) CFextern long FCALLSC_QUALIFIER A
+#define SHORT_cfPU(A) CFextern short FCALLSC_QUALIFIER A
+#define STRING_cfPU(A) CFextern void FCALLSC_QUALIFIER A
+#define VOID_cfPU(A) CFextern void FCALLSC_QUALIFIER A
+
+#define BYTE_cfE INTEGER_BYTE A0;
+#define DOUBLE_cfE DOUBLE_PRECISION A0;
+#if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT))
+#define FLOAT_cfE FORTRAN_REAL A0;
+#else
+#define FLOAT_cfE FORTRAN_REAL AA0; FLOATFUNCTIONTYPE A0;
+#endif
+#define INT_cfE int A0;
+#define LOGICAL_cfE int A0;
+#define LONG_cfE long A0;
+#define SHORT_cfE short A0;
+#define VOID_cfE
+#ifdef vmsFortran
+#define STRING_cfE static char AA0[1+MAX_LEN_FORTRAN_FUNCTION_STRING]; \
+ static fstring A0 = \
+ {MAX_LEN_FORTRAN_FUNCTION_STRING,DSC$K_DTYPE_T,DSC$K_CLASS_S,AA0};\
+ memset(AA0, CFORTRAN_NON_CHAR, MAX_LEN_FORTRAN_FUNCTION_STRING);\
+ *(AA0+MAX_LEN_FORTRAN_FUNCTION_STRING)='\0';
+#else
+#ifdef CRAYFortran
+#define STRING_cfE static char AA0[1+MAX_LEN_FORTRAN_FUNCTION_STRING]; \
+ static _fcd A0; *(AA0+MAX_LEN_FORTRAN_FUNCTION_STRING)='\0';\
+ memset(AA0,CFORTRAN_NON_CHAR, MAX_LEN_FORTRAN_FUNCTION_STRING);\
+ A0 = _cptofcd(AA0,MAX_LEN_FORTRAN_FUNCTION_STRING);
+#else
+/* 'cc: SC3.0.1 13 Jul 1994' barfs on char A0[0x4FE+1];
+ * char A0[0x4FE +1]; char A0[1+0x4FE]; are both OK. */
+#define STRING_cfE static char A0[1+MAX_LEN_FORTRAN_FUNCTION_STRING]; \
+ memset(A0, CFORTRAN_NON_CHAR, \
+ MAX_LEN_FORTRAN_FUNCTION_STRING); \
+ *(A0+MAX_LEN_FORTRAN_FUNCTION_STRING)='\0';
+#endif
+#endif
+/* ESTRING must use static char. array which is guaranteed to exist after
+ function returns. */
+
+/* N.B.i) The diff. for 0 (Zero) and >=1 arguments.
+ ii)That the following create an unmatched bracket, i.e. '(', which
+ must of course be matched in the call.
+ iii)Commas must be handled very carefully */
+#define INT_cfGZ(T,UN,LN) A0=CFC_(UN,LN)(
+#define VOID_cfGZ(T,UN,LN) CFC_(UN,LN)(
+#ifdef vmsFortran
+#define STRING_cfGZ(T,UN,LN) CFC_(UN,LN)(&A0
+#else
+#if defined(CRAYFortran) || defined(AbsoftUNIXFortran)
+#define STRING_cfGZ(T,UN,LN) CFC_(UN,LN)( A0
+#else
+#define STRING_cfGZ(T,UN,LN) CFC_(UN,LN)( A0,MAX_LEN_FORTRAN_FUNCTION_STRING
+#endif
+#endif
+
+#define INT_cfG(T,UN,LN) INT_cfGZ(T,UN,LN)
+#define VOID_cfG(T,UN,LN) VOID_cfGZ(T,UN,LN)
+#define STRING_cfG(T,UN,LN) STRING_cfGZ(T,UN,LN), /*, is only diff. from _cfG*/
+
+#define BYTEVVVVVVV_cfPP
+#define INTVVVVVVV_cfPP /* These complement FLOATVVVVVVV_cfPP. */
+#define DOUBLEVVVVVVV_cfPP
+#define LOGICALVVVVVVV_cfPP
+#define LONGVVVVVVV_cfPP
+#define SHORTVVVVVVV_cfPP
+#define PBYTE_cfPP
+#define PINT_cfPP
+#define PDOUBLE_cfPP
+#define PLOGICAL_cfPP
+#define PLONG_cfPP
+#define PSHORT_cfPP
+#define PFLOAT_cfPP FLOATVVVVVVV_cfPP
+
+#define BCF(TN,AN,C) _SEP_(TN,C,COMMA) _Icf(2,B,TN,AN,0)
+#define INT_cfB(T,A) (_(T,VVVVVVV_cfTYPE)) A
+#define INTV_cfB(T,A) A
+#define INTVV_cfB(T,A) (A)[0]
+#define INTVVV_cfB(T,A) (A)[0][0]
+#define INTVVVV_cfB(T,A) (A)[0][0][0]
+#define INTVVVVV_cfB(T,A) (A)[0][0][0][0]
+#define INTVVVVVV_cfB(T,A) (A)[0][0][0][0][0]
+#define INTVVVVVVV_cfB(T,A) (A)[0][0][0][0][0][0]
+#define PINT_cfB(T,A) _(T,_cfPP)&A
+#define STRING_cfB(T,A) (char *) A
+#define STRINGV_cfB(T,A) (char *) A
+#define PSTRING_cfB(T,A) (char *) A
+#define PSTRINGV_cfB(T,A) (char *) A
+#define PVOID_cfB(T,A) (void *) A
+#define ROUTINE_cfB(T,A) (void(*)(CF_NULL_PROTO))A
+#define ZTRINGV_cfB(T,A) (char *) A
+#define PZTRINGV_cfB(T,A) (char *) A
+
+#define SCF(TN,NAME,I,A) _(TN,_cfSTR)(3,S,NAME,I,A,0,0)
+#define DEFAULT_cfS(M,I,A)
+#define LOGICAL_cfS(M,I,A)
+#define PLOGICAL_cfS(M,I,A)
+#define STRING_cfS(M,I,A) ,sizeof(A)
+#define STRINGV_cfS(M,I,A) ,( (unsigned)0xFFFF*firstindexlength(A) \
+ +secondindexlength(A))
+#define PSTRING_cfS(M,I,A) ,sizeof(A)
+#define PSTRINGV_cfS(M,I,A) STRINGV_cfS(M,I,A)
+#define ZTRINGV_cfS(M,I,A)
+#define PZTRINGV_cfS(M,I,A)
+
+#define HCF(TN,I) _(TN,_cfSTR)(3,H,COMMA, H,_(C,I),0,0)
+#define HHCF(TN,I) _(TN,_cfSTR)(3,H,COMMA,HH,_(C,I),0,0)
+#define HHHCF(TN,I) _(TN,_cfSTR)(3,H,COLON, H,_(C,I),0,0)
+#define H_CF_SPECIAL unsigned
+#define HH_CF_SPECIAL
+#define DEFAULT_cfH(M,I,A)
+#define LOGICAL_cfH(S,U,B)
+#define PLOGICAL_cfH(S,U,B)
+#define STRING_cfH(S,U,B) _(A,S) _(U,_CF_SPECIAL) B
+#define STRINGV_cfH(S,U,B) STRING_cfH(S,U,B)
+#define PSTRING_cfH(S,U,B) STRING_cfH(S,U,B)
+#define PSTRINGV_cfH(S,U,B) STRING_cfH(S,U,B)
+#define PNSTRING_cfH(S,U,B) STRING_cfH(S,U,B)
+#define PPSTRING_cfH(S,U,B) STRING_cfH(S,U,B)
+#define ZTRINGV_cfH(S,U,B)
+#define PZTRINGV_cfH(S,U,B)
+
+/* Need VOID_cfSTR because Absoft forced function types go through _cfSTR. */
+/* No spaces inside expansion. They screws up macro catenation kludge. */
+#define VOID_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define BYTE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define DOUBLE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define FLOAT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define INT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LOGICAL_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,LOGICAL,A,B,C,D,E)
+#define LONG_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define SHORT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define BYTEV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define BYTEVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define BYTEVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define BYTEVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define BYTEVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define BYTEVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define BYTEVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define DOUBLEV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define DOUBLEVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define DOUBLEVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define DOUBLEVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define DOUBLEVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define DOUBLEVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define DOUBLEVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define FLOATV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define FLOATVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define FLOATVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define FLOATVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define FLOATVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define FLOATVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define FLOATVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define INTV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define INTVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define INTVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define INTVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define INTVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define INTVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define INTVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LOGICALV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LOGICALVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LOGICALVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LOGICALVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LOGICALVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LOGICALVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LOGICALVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LONGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LONGVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LONGVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LONGVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LONGVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LONGVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define LONGVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define SHORTV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define SHORTVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define SHORTVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define SHORTVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define SHORTVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define SHORTVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define SHORTVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define PBYTE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define PDOUBLE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define PFLOAT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define PINT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define PLOGICAL_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PLOGICAL,A,B,C,D,E)
+#define PLONG_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define PSHORT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define STRING_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,STRING,A,B,C,D,E)
+#define PSTRING_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PSTRING,A,B,C,D,E)
+#define STRINGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,STRINGV,A,B,C,D,E)
+#define PSTRINGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PSTRINGV,A,B,C,D,E)
+#define PNSTRING_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PNSTRING,A,B,C,D,E)
+#define PPSTRING_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PPSTRING,A,B,C,D,E)
+#define PVOID_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define ROUTINE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define SIMPLE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define ZTRINGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,ZTRINGV,A,B,C,D,E)
+#define PZTRINGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PZTRINGV,A,B,C,D,E)
+#define CF_0_cfSTR(N,T,A,B,C,D,E)
+
+/* See ACF table comments, which explain why CCF was split into two. */
+#define CCF(NAME,TN,I) _(TN,_cfSTR)(5,C,NAME,I,_(A,I),_(B,I),_(C,I))
+#define DEFAULT_cfC(M,I,A,B,C)
+#define LOGICAL_cfC(M,I,A,B,C) A=C2FLOGICAL( A);
+#define PLOGICAL_cfC(M,I,A,B,C) *A=C2FLOGICAL(*A);
+#ifdef vmsFortran
+#define STRING_cfC(M,I,A,B,C) (B.clen=strlen(A),B.f.dsc$a_pointer=A, \
+ C==sizeof(char*)||C==(unsigned)(B.clen+1)?B.f.dsc$w_length=B.clen: \
+ (memset((A)+B.clen,' ',C-B.clen-1),A[B.f.dsc$w_length=C-1]='\0'));
+ /* PSTRING_cfC to beware of array A which does not contain any \0. */
+#define PSTRING_cfC(M,I,A,B,C) (B.dsc$a_pointer=A, C==sizeof(char*) ? \
+ B.dsc$w_length=strlen(A): (A[C-1]='\0',B.dsc$w_length=strlen(A), \
+ memset((A)+B.dsc$w_length,' ',C-B.dsc$w_length-1), B.dsc$w_length=C-1));
+#else
+#define STRING_cfC(M,I,A,B,C) (B.clen=strlen(A), \
+ C==sizeof(char*)||C==(unsigned)(B.clen+1)?B.flen=B.clen: \
+ (memset((A)+B.clen,' ',C-B.clen-1),A[B.flen=C-1]='\0'));
+#define PSTRING_cfC(M,I,A,B,C) (C==sizeof(char*)? B=strlen(A): \
+ (A[C-1]='\0',B=strlen(A),memset((A)+B,' ',C-B-1),B=C-1));
+#endif
+ /* For CRAYFortran for (P)STRINGV_cfC, B.fs is set, but irrelevant. */
+#define STRINGV_cfC(M,I,A,B,C) \
+ AATRINGV_cfA( A,B,(C/0xFFFF)*(C%0xFFFF),C/0xFFFF,C%0xFFFF)
+#define PSTRINGV_cfC(M,I,A,B,C) \
+ APATRINGV_cfA( A,B,(C/0xFFFF)*(C%0xFFFF),C/0xFFFF,C%0xFFFF)
+#define ZTRINGV_cfC(M,I,A,B,C) \
+ AATRINGV_cfA( A,B, (_3(M,_ELEMS_,I))*((_3(M,_ELEMLEN_,I))+1), \
+ (_3(M,_ELEMS_,I)), (_3(M,_ELEMLEN_,I))+1 )
+#define PZTRINGV_cfC(M,I,A,B,C) \
+ APATRINGV_cfA( A,B, (_3(M,_ELEMS_,I))*((_3(M,_ELEMLEN_,I))+1), \
+ (_3(M,_ELEMS_,I)), (_3(M,_ELEMLEN_,I))+1 )
+
+#define BYTE_cfCCC(A,B) &A
+#define DOUBLE_cfCCC(A,B) &A
+#if !defined(__CF__KnR)
+#define FLOAT_cfCCC(A,B) &A
+ /* Although the VAX doesn't, at least the */
+#else /* HP and K&R mips promote float arg.'s of */
+#define FLOAT_cfCCC(A,B) &B /* unprototyped functions to double. Cannot */
+#endif /* use A here to pass the argument to FORTRAN. */
+#define INT_cfCCC(A,B) &A
+#define LOGICAL_cfCCC(A,B) &A
+#define LONG_cfCCC(A,B) &A
+#define SHORT_cfCCC(A,B) &A
+#define PBYTE_cfCCC(A,B) A
+#define PDOUBLE_cfCCC(A,B) A
+#define PFLOAT_cfCCC(A,B) A
+#define PINT_cfCCC(A,B) A
+#define PLOGICAL_cfCCC(A,B) B=A /* B used to keep a common W table. */
+#define PLONG_cfCCC(A,B) A
+#define PSHORT_cfCCC(A,B) A
+
+#define CCCF(TN,I,M) _SEP_(TN,M,COMMA) _Icf(3,CC,TN,_(A,I),_(B,I))
+#define INT_cfCC(T,A,B) _(T,_cfCCC)(A,B)
+#define INTV_cfCC(T,A,B) A
+#define INTVV_cfCC(T,A,B) A
+#define INTVVV_cfCC(T,A,B) A
+#define INTVVVV_cfCC(T,A,B) A
+#define INTVVVVV_cfCC(T,A,B) A
+#define INTVVVVVV_cfCC(T,A,B) A
+#define INTVVVVVVV_cfCC(T,A,B) A
+#define PINT_cfCC(T,A,B) _(T,_cfCCC)(A,B)
+#define PVOID_cfCC(T,A,B) A
+#if defined(apolloFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran)
+#define ROUTINE_cfCC(T,A,B) &A
+#else
+#define ROUTINE_cfCC(T,A,B) A
+#endif
+#define SIMPLE_cfCC(T,A,B) A
+#ifdef vmsFortran
+#define STRING_cfCC(T,A,B) &B.f
+#define STRINGV_cfCC(T,A,B) &B
+#define PSTRING_cfCC(T,A,B) &B
+#define PSTRINGV_cfCC(T,A,B) &B
+#else
+#ifdef CRAYFortran
+#define STRING_cfCC(T,A,B) _cptofcd(A,B.flen)
+#define STRINGV_cfCC(T,A,B) _cptofcd(B.s,B.flen)
+#define PSTRING_cfCC(T,A,B) _cptofcd(A,B)
+#define PSTRINGV_cfCC(T,A,B) _cptofcd(A,B.flen)
+#else
+#define STRING_cfCC(T,A,B) A
+#define STRINGV_cfCC(T,A,B) B.fs
+#define PSTRING_cfCC(T,A,B) A
+#define PSTRINGV_cfCC(T,A,B) B.fs
+#endif
+#endif
+#define ZTRINGV_cfCC(T,A,B) STRINGV_cfCC(T,A,B)
+#define PZTRINGV_cfCC(T,A,B) PSTRINGV_cfCC(T,A,B)
+
+#define BYTE_cfX return A0;
+#define DOUBLE_cfX return A0;
+#if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT))
+#define FLOAT_cfX return A0;
+#else
+#define FLOAT_cfX ASSIGNFLOAT(AA0,A0); return AA0;
+#endif
+#define INT_cfX return A0;
+#define LOGICAL_cfX return F2CLOGICAL(A0);
+#define LONG_cfX return A0;
+#define SHORT_cfX return A0;
+#define VOID_cfX return ;
+#if defined(vmsFortran) || defined(CRAYFortran)
+#define STRING_cfX return kill_trailing( \
+ kill_trailing(AA0,CFORTRAN_NON_CHAR),' ');
+#else
+#define STRING_cfX return kill_trailing( \
+ kill_trailing( A0,CFORTRAN_NON_CHAR),' ');
+#endif
+
+#define CFFUN(NAME) _(__cf__,NAME)
+
+/* Note that we don't use LN here, but we keep it for consistency. */
+#define CCALLSFFUN0(UN,LN) CFFUN(UN)()
+
+#ifdef OLD_VAXC /* Allow %CC-I-PARAMNOTUSED. */
+#pragma standard
+#endif
+
+#define CCALLSFFUN1( UN,LN,T1, A1) \
+ CCALLSFFUN5 (UN,LN,T1,CF_0,CF_0,CF_0,CF_0,A1,0,0,0,0)
+#define CCALLSFFUN2( UN,LN,T1,T2, A1,A2) \
+ CCALLSFFUN5 (UN,LN,T1,T2,CF_0,CF_0,CF_0,A1,A2,0,0,0)
+#define CCALLSFFUN3( UN,LN,T1,T2,T3, A1,A2,A3) \
+ CCALLSFFUN5 (UN,LN,T1,T2,T3,CF_0,CF_0,A1,A2,A3,0,0)
+#define CCALLSFFUN4( UN,LN,T1,T2,T3,T4, A1,A2,A3,A4)\
+ CCALLSFFUN5 (UN,LN,T1,T2,T3,T4,CF_0,A1,A2,A3,A4,0)
+#define CCALLSFFUN5( UN,LN,T1,T2,T3,T4,T5, A1,A2,A3,A4,A5) \
+ CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,CF_0,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,0,0,0,0,0)
+#define CCALLSFFUN6( UN,LN,T1,T2,T3,T4,T5,T6, A1,A2,A3,A4,A5,A6) \
+ CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,T6,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,0,0,0,0)
+#define CCALLSFFUN7( UN,LN,T1,T2,T3,T4,T5,T6,T7, A1,A2,A3,A4,A5,A6,A7) \
+ CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,T6,T7,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,0,0,0)
+#define CCALLSFFUN8( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8, A1,A2,A3,A4,A5,A6,A7,A8) \
+ CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,0,0)
+#define CCALLSFFUN9( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,A1,A2,A3,A4,A5,A6,A7,A8,A9)\
+ CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,0)
+#define CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA)\
+ CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,0,0,0,0)
+#define CCALLSFFUN11(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB)\
+ CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,0,0,0)
+#define CCALLSFFUN12(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC)\
+ CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,0,0)
+#define CCALLSFFUN13(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD)\
+ CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,0)
+
+#define CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE)\
+((CFFUN(UN)( BCF(T1,A1,0) BCF(T2,A2,1) BCF(T3,A3,1) BCF(T4,A4,1) BCF(T5,A5,1) \
+ BCF(T6,A6,1) BCF(T7,A7,1) BCF(T8,A8,1) BCF(T9,A9,1) BCF(TA,AA,1) \
+ BCF(TB,AB,1) BCF(TC,AC,1) BCF(TD,AD,1) BCF(TE,AE,1) \
+ SCF(T1,LN,1,A1) SCF(T2,LN,2,A2) SCF(T3,LN,3,A3) SCF(T4,LN,4,A4) \
+ SCF(T5,LN,5,A5) SCF(T6,LN,6,A6) SCF(T7,LN,7,A7) SCF(T8,LN,8,A8) \
+ SCF(T9,LN,9,A9) SCF(TA,LN,A,AA) SCF(TB,LN,B,AB) SCF(TC,LN,C,AC) \
+ SCF(TD,LN,D,AD))))
+
+/* N.B. Create a separate function instead of using (call function, function
+value here) because in order to create the variables needed for the input
+arg.'s which may be const.'s one has to do the creation within {}, but these
+can never be placed within ()'s. Therefore one must create wrapper functions.
+gcc, on the other hand may be able to avoid the wrapper functions. */
+
+/* Prototypes are needed to correctly handle the value returned correctly. N.B.
+Can only have prototype arg.'s with difficulty, a la G... table since FORTRAN
+functions returning strings have extra arg.'s. Don't bother, since this only
+causes a compiler warning to come up when one uses FCALLSCFUNn and CCALLSFFUNn
+for the same function in the same source code. Something done by the experts in
+debugging only.*/
+
+#define PROTOCCALLSFFUN0(F,UN,LN) \
+_(F,_cfPU)( CFC_(UN,LN))(CF_NULL_PROTO); \
+static _Icf(2,U,F,CFFUN(UN),0)() {_(F,_cfE) _Icf(3,GZ,F,UN,LN) ABSOFT_cf1(F));_(F,_cfX)}
+
+#define PROTOCCALLSFFUN1( T0,UN,LN,T1) \
+ PROTOCCALLSFFUN5 (T0,UN,LN,T1,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFFUN2( T0,UN,LN,T1,T2) \
+ PROTOCCALLSFFUN5 (T0,UN,LN,T1,T2,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFFUN3( T0,UN,LN,T1,T2,T3) \
+ PROTOCCALLSFFUN5 (T0,UN,LN,T1,T2,T3,CF_0,CF_0)
+#define PROTOCCALLSFFUN4( T0,UN,LN,T1,T2,T3,T4) \
+ PROTOCCALLSFFUN5 (T0,UN,LN,T1,T2,T3,T4,CF_0)
+#define PROTOCCALLSFFUN5( T0,UN,LN,T1,T2,T3,T4,T5) \
+ PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFFUN6( T0,UN,LN,T1,T2,T3,T4,T5,T6) \
+ PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,T6,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFFUN7( T0,UN,LN,T1,T2,T3,T4,T5,T6,T7) \
+ PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFFUN8( T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8) \
+ PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,CF_0,CF_0)
+#define PROTOCCALLSFFUN9( T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9) \
+ PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,CF_0)
+#define PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA) \
+ PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,CF_0,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFFUN11(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB) \
+ PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,CF_0,CF_0,CF_0)
+#define PROTOCCALLSFFUN12(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC) \
+ PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,CF_0,CF_0)
+#define PROTOCCALLSFFUN13(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD) \
+ PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,CF_0)
+
+/* HP/UX 9.01 cc requires the blank between '_Icf(3,G,T0,UN,LN) CCCF(T1,1,0)' */
+
+#ifndef __CF__KnR
+#define PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ _(T0,_cfPU)(CFC_(UN,LN))(CF_NULL_PROTO); static _Icf(2,U,T0,CFFUN(UN),0)( \
+ CFARGT14FS(UCF,HCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) ) \
+{ CFARGT14S(VCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) _(T0,_cfE) \
+ CCF(LN,T1,1) CCF(LN,T2,2) CCF(LN,T3,3) CCF(LN,T4,4) CCF(LN,T5,5) \
+ CCF(LN,T6,6) CCF(LN,T7,7) CCF(LN,T8,8) CCF(LN,T9,9) CCF(LN,TA,A) \
+ CCF(LN,TB,B) CCF(LN,TC,C) CCF(LN,TD,D) CCF(LN,TE,E) _Icf(3,G,T0,UN,LN) \
+ CFARGT14(CCCF,JCF,ABSOFT_cf1(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)); \
+ WCF(T1,A1,1) WCF(T2,A2,2) WCF(T3,A3,3) WCF(T4,A4,4) WCF(T5,A5,5) \
+ WCF(T6,A6,6) WCF(T7,A7,7) WCF(T8,A8,8) WCF(T9,A9,9) WCF(TA,AA,A) \
+ WCF(TB,AB,B) WCF(TC,AC,C) WCF(TD,AD,D) WCF(TE,AE,E) _(T0,_cfX)}
+#else
+#define PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ _(T0,_cfPU)(CFC_(UN,LN))(CF_NULL_PROTO); static _Icf(2,U,T0,CFFUN(UN),0)( \
+ CFARGT14FS(UUCF,HHCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) ) \
+ CFARGT14FS(UUUCF,HHHCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) ; \
+{ CFARGT14S(VCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) _(T0,_cfE) \
+ CCF(LN,T1,1) CCF(LN,T2,2) CCF(LN,T3,3) CCF(LN,T4,4) CCF(LN,T5,5) \
+ CCF(LN,T6,6) CCF(LN,T7,7) CCF(LN,T8,8) CCF(LN,T9,9) CCF(LN,TA,A) \
+ CCF(LN,TB,B) CCF(LN,TC,C) CCF(LN,TD,D) CCF(LN,TE,E) _Icf(3,G,T0,UN,LN) \
+ CFARGT14(CCCF,JCF,ABSOFT_cf1(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)); \
+ WCF(T1,A1,1) WCF(T2,A2,2) WCF(T3,A3,3) WCF(T4,A4,4) WCF(T5,A5,5) \
+ WCF(T6,A6,6) WCF(T7,A7,7) WCF(T8,A8,8) WCF(T9,A9,9) WCF(TA,AA,A) \
+ WCF(TB,AB,B) WCF(TC,AC,C) WCF(TD,AD,D) WCF(TE,AE,E) _(T0,_cfX)}
+#endif
+
+/*-------------------------------------------------------------------------*/
+
+/* UTILITIES FOR FORTRAN TO CALL C ROUTINES */
+
+#ifdef OLD_VAXC /* Prevent %CC-I-PARAMNOTUSED. */
+#pragma nostandard
+#endif
+
+#if defined(vmsFortran) || defined(CRAYFortran)
+#define DCF(TN,I)
+#define DDCF(TN,I)
+#define DDDCF(TN,I)
+#else
+#define DCF(TN,I) HCF(TN,I)
+#define DDCF(TN,I) HHCF(TN,I)
+#define DDDCF(TN,I) HHHCF(TN,I)
+#endif
+
+#define QCF(TN,I) _(TN,_cfSTR)(1,Q,_(B,I), 0,0,0,0)
+#define DEFAULT_cfQ(B)
+#define LOGICAL_cfQ(B)
+#define PLOGICAL_cfQ(B)
+#define STRINGV_cfQ(B) char *B; unsigned int _(B,N);
+#define STRING_cfQ(B) char *B=NULL;
+#define PSTRING_cfQ(B) char *B=NULL;
+#define PSTRINGV_cfQ(B) STRINGV_cfQ(B)
+#define PNSTRING_cfQ(B) char *B=NULL;
+#define PPSTRING_cfQ(B)
+
+#ifdef __sgi /* Else SGI gives warning 182 contrary to its C LRM A.17.7 */
+#define ROUTINE_orig *(void**)&
+#else
+#define ROUTINE_orig (void *)
+#endif
+
+#define ROUTINE_1 ROUTINE_orig
+#define ROUTINE_2 ROUTINE_orig
+#define ROUTINE_3 ROUTINE_orig
+#define ROUTINE_4 ROUTINE_orig
+#define ROUTINE_5 ROUTINE_orig
+#define ROUTINE_6 ROUTINE_orig
+#define ROUTINE_7 ROUTINE_orig
+#define ROUTINE_8 ROUTINE_orig
+#define ROUTINE_9 ROUTINE_orig
+#define ROUTINE_10 ROUTINE_orig
+#define ROUTINE_11 ROUTINE_orig
+#define ROUTINE_12 ROUTINE_orig
+#define ROUTINE_13 ROUTINE_orig
+#define ROUTINE_14 ROUTINE_orig
+
+#define TCF(NAME,TN,I,M) _SEP_(TN,M,COMMA) _(TN,_cfT)(NAME,I,_(A,I),_(B,I),_(C,I))
+#define BYTE_cfT(M,I,A,B,D) *A
+#define DOUBLE_cfT(M,I,A,B,D) *A
+#define FLOAT_cfT(M,I,A,B,D) *A
+#define INT_cfT(M,I,A,B,D) *A
+#define LOGICAL_cfT(M,I,A,B,D) F2CLOGICAL(*A)
+#define LONG_cfT(M,I,A,B,D) *A
+#define SHORT_cfT(M,I,A,B,D) *A
+#define BYTEV_cfT(M,I,A,B,D) A
+#define DOUBLEV_cfT(M,I,A,B,D) A
+#define FLOATV_cfT(M,I,A,B,D) VOIDP A
+#define INTV_cfT(M,I,A,B,D) A
+#define LOGICALV_cfT(M,I,A,B,D) A
+#define LONGV_cfT(M,I,A,B,D) A
+#define SHORTV_cfT(M,I,A,B,D) A
+#define BYTEVV_cfT(M,I,A,B,D) (void *)A /* We have to cast to void *,*/
+#define BYTEVVV_cfT(M,I,A,B,D) (void *)A /* since we don't know the */
+#define BYTEVVVV_cfT(M,I,A,B,D) (void *)A /* dimensions of the array. */
+#define BYTEVVVVV_cfT(M,I,A,B,D) (void *)A /* i.e. Unfortunately, can't */
+#define BYTEVVVVVV_cfT(M,I,A,B,D) (void *)A /* check that the type */
+#define BYTEVVVVVVV_cfT(M,I,A,B,D) (void *)A /* matches the prototype. */
+#define DOUBLEVV_cfT(M,I,A,B,D) (void *)A
+#define DOUBLEVVV_cfT(M,I,A,B,D) (void *)A
+#define DOUBLEVVVV_cfT(M,I,A,B,D) (void *)A
+#define DOUBLEVVVVV_cfT(M,I,A,B,D) (void *)A
+#define DOUBLEVVVVVV_cfT(M,I,A,B,D) (void *)A
+#define DOUBLEVVVVVVV_cfT(M,I,A,B,D) (void *)A
+#define FLOATVV_cfT(M,I,A,B,D) (void *)A
+#define FLOATVVV_cfT(M,I,A,B,D) (void *)A
+#define FLOATVVVV_cfT(M,I,A,B,D) (void *)A
+#define FLOATVVVVV_cfT(M,I,A,B,D) (void *)A
+#define FLOATVVVVVV_cfT(M,I,A,B,D) (void *)A
+#define FLOATVVVVVVV_cfT(M,I,A,B,D) (void *)A
+#define INTVV_cfT(M,I,A,B,D) (void *)A
+#define INTVVV_cfT(M,I,A,B,D) (void *)A
+#define INTVVVV_cfT(M,I,A,B,D) (void *)A
+#define INTVVVVV_cfT(M,I,A,B,D) (void *)A
+#define INTVVVVVV_cfT(M,I,A,B,D) (void *)A
+#define INTVVVVVVV_cfT(M,I,A,B,D) (void *)A
+#define LOGICALVV_cfT(M,I,A,B,D) (void *)A
+#define LOGICALVVV_cfT(M,I,A,B,D) (void *)A
+#define LOGICALVVVV_cfT(M,I,A,B,D) (void *)A
+#define LOGICALVVVVV_cfT(M,I,A,B,D) (void *)A
+#define LOGICALVVVVVV_cfT(M,I,A,B,D) (void *)A
+#define LOGICALVVVVVVV_cfT(M,I,A,B,D) (void *)A
+#define LONGVV_cfT(M,I,A,B,D) (void *)A
+#define LONGVVV_cfT(M,I,A,B,D) (void *)A
+#define LONGVVVV_cfT(M,I,A,B,D) (void *)A
+#define LONGVVVVV_cfT(M,I,A,B,D) (void *)A
+#define LONGVVVVVV_cfT(M,I,A,B,D) (void *)A
+#define LONGVVVVVVV_cfT(M,I,A,B,D) (void *)A
+#define SHORTVV_cfT(M,I,A,B,D) (void *)A
+#define SHORTVVV_cfT(M,I,A,B,D) (void *)A
+#define SHORTVVVV_cfT(M,I,A,B,D) (void *)A
+#define SHORTVVVVV_cfT(M,I,A,B,D) (void *)A
+#define SHORTVVVVVV_cfT(M,I,A,B,D) (void *)A
+#define SHORTVVVVVVV_cfT(M,I,A,B,D) (void *)A
+#define PBYTE_cfT(M,I,A,B,D) A
+#define PDOUBLE_cfT(M,I,A,B,D) A
+#define PFLOAT_cfT(M,I,A,B,D) VOIDP A
+#define PINT_cfT(M,I,A,B,D) A
+#define PLOGICAL_cfT(M,I,A,B,D) ((*A=F2CLOGICAL(*A)),A)
+#define PLONG_cfT(M,I,A,B,D) A
+#define PSHORT_cfT(M,I,A,B,D) A
+#define PVOID_cfT(M,I,A,B,D) A
+#if defined(apolloFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran)
+#define ROUTINE_cfT(M,I,A,B,D) _(ROUTINE_,I) (*A)
+#else
+#define ROUTINE_cfT(M,I,A,B,D) _(ROUTINE_,I) A
+#endif
+/* A == pointer to the characters
+ D == length of the string, or of an element in an array of strings
+ E == number of elements in an array of strings */
+#define TTSTR( A,B,D) \
+ ((B=(char*)malloc(D+1))[D]='\0', memcpy(B,A,D), kill_trailing(B,' '))
+#define TTTTSTR( A,B,D) (!(D<4||A[0]||A[1]||A[2]||A[3]))?NULL: \
+ memchr(A,'\0',D) ?A : TTSTR(A,B,D)
+#define TTTTSTRV( A,B,D,E) (_(B,N)=E,B=(char*)malloc(_(B,N)*(D+1)), (void *) \
+ vkill_trailing(f2cstrv(A,B,D+1, _(B,N)*(D+1)), D+1,_(B,N)*(D+1),' '))
+#ifdef vmsFortran
+#define STRING_cfT(M,I,A,B,D) TTTTSTR( A->dsc$a_pointer,B,A->dsc$w_length)
+#define STRINGV_cfT(M,I,A,B,D) TTTTSTRV(A->dsc$a_pointer, B, \
+ A->dsc$w_length , A->dsc$l_m[0])
+#define PSTRING_cfT(M,I,A,B,D) TTSTR( A->dsc$a_pointer,B,A->dsc$w_length)
+#define PPSTRING_cfT(M,I,A,B,D) A->dsc$a_pointer
+#else
+#ifdef CRAYFortran
+#define STRING_cfT(M,I,A,B,D) TTTTSTR( _fcdtocp(A),B,_fcdlen(A))
+#define STRINGV_cfT(M,I,A,B,D) TTTTSTRV(_fcdtocp(A),B,_fcdlen(A), \
+ num_elem(_fcdtocp(A),_fcdlen(A),_3(M,_STRV_A,I)))
+#define PSTRING_cfT(M,I,A,B,D) TTSTR( _fcdtocp(A),B,_fcdlen(A))
+#define PPSTRING_cfT(M,I,A,B,D) _fcdtocp(A)
+#else
+#define STRING_cfT(M,I,A,B,D) TTTTSTR( A,B,D)
+#define STRINGV_cfT(M,I,A,B,D) TTTTSTRV(A,B,D, num_elem(A,D,_3(M,_STRV_A,I)))
+#define PSTRING_cfT(M,I,A,B,D) TTSTR( A,B,D)
+#define PPSTRING_cfT(M,I,A,B,D) A
+#endif
+#endif
+#define PNSTRING_cfT(M,I,A,B,D) STRING_cfT(M,I,A,B,D)
+#define PSTRINGV_cfT(M,I,A,B,D) STRINGV_cfT(M,I,A,B,D)
+#define CF_0_cfT(M,I,A,B,D)
+
+#define RCF(TN,I) _(TN,_cfSTR)(3,R,_(A,I),_(B,I),_(C,I),0,0)
+#define DEFAULT_cfR(A,B,D)
+#define LOGICAL_cfR(A,B,D)
+#define PLOGICAL_cfR(A,B,D) *A=C2FLOGICAL(*A);
+#define STRING_cfR(A,B,D) if (B) free(B);
+#define STRINGV_cfR(A,B,D) free(B);
+/* A and D as defined above for TSTRING(V) */
+#define RRRRPSTR( A,B,D) if (B) memcpy(A,B, _cfMIN(strlen(B),D)), \
+ (D>strlen(B)?memset(A+strlen(B),' ', D-strlen(B)):0), free(B);
+#define RRRRPSTRV(A,B,D) c2fstrv(B,A,D+1,(D+1)*_(B,N)), free(B);
+#ifdef vmsFortran
+#define PSTRING_cfR(A,B,D) RRRRPSTR( A->dsc$a_pointer,B,A->dsc$w_length)
+#define PSTRINGV_cfR(A,B,D) RRRRPSTRV(A->dsc$a_pointer,B,A->dsc$w_length)
+#else
+#ifdef CRAYFortran
+#define PSTRING_cfR(A,B,D) RRRRPSTR( _fcdtocp(A),B,_fcdlen(A))
+#define PSTRINGV_cfR(A,B,D) RRRRPSTRV(_fcdtocp(A),B,_fcdlen(A))
+#else
+#define PSTRING_cfR(A,B,D) RRRRPSTR( A,B,D)
+#define PSTRINGV_cfR(A,B,D) RRRRPSTRV(A,B,D)
+#endif
+#endif
+#define PNSTRING_cfR(A,B,D) PSTRING_cfR(A,B,D)
+#define PPSTRING_cfR(A,B,D)
+
+#define BYTE_cfFZ(UN,LN) INTEGER_BYTE FCALLSC_QUALIFIER fcallsc(UN,LN)(
+#define DOUBLE_cfFZ(UN,LN) DOUBLE_PRECISION FCALLSC_QUALIFIER fcallsc(UN,LN)(
+#define INT_cfFZ(UN,LN) int FCALLSC_QUALIFIER fcallsc(UN,LN)(
+#define LOGICAL_cfFZ(UN,LN) int FCALLSC_QUALIFIER fcallsc(UN,LN)(
+#define LONG_cfFZ(UN,LN) long FCALLSC_QUALIFIER fcallsc(UN,LN)(
+#define SHORT_cfFZ(UN,LN) short FCALLSC_QUALIFIER fcallsc(UN,LN)(
+#define VOID_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(
+#ifndef __CF__KnR
+/* The void is req'd by the Apollo, to make this an ANSI function declaration.
+ The Apollo promotes K&R float functions to double. */
+#define FLOAT_cfFZ(UN,LN) FORTRAN_REAL FCALLSC_QUALIFIER fcallsc(UN,LN)(void
+#ifdef vmsFortran
+#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(fstring *AS
+#else
+#ifdef CRAYFortran
+#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(_fcd AS
+#else
+#if defined(AbsoftUNIXFortran)
+#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(char *AS
+#else
+#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(char *AS, unsigned D0
+#endif
+#endif
+#endif
+#else
+#if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT))
+#define FLOAT_cfFZ(UN,LN) FORTRAN_REAL FCALLSC_QUALIFIER fcallsc(UN,LN)(
+#else
+#define FLOAT_cfFZ(UN,LN) FLOATFUNCTIONTYPE FCALLSC_QUALIFIER fcallsc(UN,LN)(
+#endif
+#if defined(vmsFortran) || defined(CRAYFortran) || defined(AbsoftUNIXFortran)
+#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(AS
+#else
+#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(AS, D0
+#endif
+#endif
+
+#define BYTE_cfF(UN,LN) BYTE_cfFZ(UN,LN)
+#define DOUBLE_cfF(UN,LN) DOUBLE_cfFZ(UN,LN)
+#ifndef __CF_KnR
+#define FLOAT_cfF(UN,LN) FORTRAN_REAL FCALLSC_QUALIFIER fcallsc(UN,LN)(
+#else
+#define FLOAT_cfF(UN,LN) FLOAT_cfFZ(UN,LN)
+#endif
+#define INT_cfF(UN,LN) INT_cfFZ(UN,LN)
+#define LOGICAL_cfF(UN,LN) LOGICAL_cfFZ(UN,LN)
+#define LONG_cfF(UN,LN) LONG_cfFZ(UN,LN)
+#define SHORT_cfF(UN,LN) SHORT_cfFZ(UN,LN)
+#define VOID_cfF(UN,LN) VOID_cfFZ(UN,LN)
+#define STRING_cfF(UN,LN) STRING_cfFZ(UN,LN),
+
+#define INT_cfFF
+#define VOID_cfFF
+#ifdef vmsFortran
+#define STRING_cfFF fstring *AS;
+#else
+#ifdef CRAYFortran
+#define STRING_cfFF _fcd AS;
+#else
+#define STRING_cfFF char *AS; unsigned D0;
+#endif
+#endif
+
+#define INT_cfL A0=
+#define STRING_cfL A0=
+#define VOID_cfL
+
+#define INT_cfK
+#define VOID_cfK
+/* KSTRING copies the string into the position provided by the caller. */
+#ifdef vmsFortran
+#define STRING_cfK \
+ memcpy(AS->dsc$a_pointer,A0,_cfMIN(AS->dsc$w_length,(A0==NULL?0:strlen(A0))));\
+ AS->dsc$w_length>(A0==NULL?0:strlen(A0))? \
+ memset(AS->dsc$a_pointer+(A0==NULL?0:strlen(A0)),' ', \
+ AS->dsc$w_length-(A0==NULL?0:strlen(A0))):0;
+#else
+#ifdef CRAYFortran
+#define STRING_cfK \
+ memcpy(_fcdtocp(AS),A0, _cfMIN(_fcdlen(AS),(A0==NULL?0:strlen(A0))) ); \
+ _fcdlen(AS)>(A0==NULL?0:strlen(A0))? \
+ memset(_fcdtocp(AS)+(A0==NULL?0:strlen(A0)),' ', \
+ _fcdlen(AS)-(A0==NULL?0:strlen(A0))):0;
+#else
+#define STRING_cfK memcpy(AS,A0, _cfMIN(D0,(A0==NULL?0:strlen(A0))) ); \
+ D0>(A0==NULL?0:strlen(A0))?memset(AS+(A0==NULL?0:strlen(A0)), \
+ ' ', D0-(A0==NULL?0:strlen(A0))):0;
+#endif
+#endif
+
+/* Note that K.. and I.. can't be combined since K.. has to access data before
+R.., in order for functions returning strings which are also passed in as
+arguments to work correctly. Note that R.. frees and hence may corrupt the
+string. */
+#define BYTE_cfI return A0;
+#define DOUBLE_cfI return A0;
+#if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT))
+#define FLOAT_cfI return A0;
+#else
+#define FLOAT_cfI RETURNFLOAT(A0);
+#endif
+#define INT_cfI return A0;
+#ifdef hpuxFortran800
+/* Incredibly, functions must return true as 1, elsewhere .true.==0x01000000. */
+#define LOGICAL_cfI return ((A0)?1:0);
+#else
+#define LOGICAL_cfI return C2FLOGICAL(A0);
+#endif
+#define LONG_cfI return A0;
+#define SHORT_cfI return A0;
+#define STRING_cfI return ;
+#define VOID_cfI return ;
+
+#ifdef OLD_VAXC /* Allow %CC-I-PARAMNOTUSED. */
+#pragma standard
+#endif
+
+#define FCALLSCSUB0( CN,UN,LN) FCALLSCFUN0(VOID,CN,UN,LN)
+#define FCALLSCSUB1( CN,UN,LN,T1) FCALLSCFUN1(VOID,CN,UN,LN,T1)
+#define FCALLSCSUB2( CN,UN,LN,T1,T2) FCALLSCFUN2(VOID,CN,UN,LN,T1,T2)
+#define FCALLSCSUB3( CN,UN,LN,T1,T2,T3) FCALLSCFUN3(VOID,CN,UN,LN,T1,T2,T3)
+#define FCALLSCSUB4( CN,UN,LN,T1,T2,T3,T4) \
+ FCALLSCFUN4(VOID,CN,UN,LN,T1,T2,T3,T4)
+#define FCALLSCSUB5( CN,UN,LN,T1,T2,T3,T4,T5) \
+ FCALLSCFUN5(VOID,CN,UN,LN,T1,T2,T3,T4,T5)
+#define FCALLSCSUB6( CN,UN,LN,T1,T2,T3,T4,T5,T6) \
+ FCALLSCFUN6(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6)
+#define FCALLSCSUB7( CN,UN,LN,T1,T2,T3,T4,T5,T6,T7) \
+ FCALLSCFUN7(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7)
+#define FCALLSCSUB8( CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8) \
+ FCALLSCFUN8(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8)
+#define FCALLSCSUB9( CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9) \
+ FCALLSCFUN9(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9)
+#define FCALLSCSUB10(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA) \
+ FCALLSCFUN10(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA)
+#define FCALLSCSUB11(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB) \
+ FCALLSCFUN11(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB)
+#define FCALLSCSUB12(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC) \
+ FCALLSCFUN12(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC)
+#define FCALLSCSUB13(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD) \
+ FCALLSCFUN13(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD)
+#define FCALLSCSUB14(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ FCALLSCFUN14(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
+
+#define FCALLSCFUN1( T0,CN,UN,LN,T1) \
+ FCALLSCFUN5 (T0,CN,UN,LN,T1,CF_0,CF_0,CF_0,CF_0)
+#define FCALLSCFUN2( T0,CN,UN,LN,T1,T2) \
+ FCALLSCFUN5 (T0,CN,UN,LN,T1,T2,CF_0,CF_0,CF_0)
+#define FCALLSCFUN3( T0,CN,UN,LN,T1,T2,T3) \
+ FCALLSCFUN5 (T0,CN,UN,LN,T1,T2,T3,CF_0,CF_0)
+#define FCALLSCFUN4( T0,CN,UN,LN,T1,T2,T3,T4) \
+ FCALLSCFUN5 (T0,CN,UN,LN,T1,T2,T3,T4,CF_0)
+#define FCALLSCFUN5( T0,CN,UN,LN,T1,T2,T3,T4,T5) \
+ FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,CF_0,CF_0,CF_0,CF_0,CF_0)
+#define FCALLSCFUN6( T0,CN,UN,LN,T1,T2,T3,T4,T5,T6) \
+ FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,CF_0,CF_0,CF_0,CF_0)
+#define FCALLSCFUN7( T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7) \
+ FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,CF_0,CF_0,CF_0)
+#define FCALLSCFUN8( T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8) \
+ FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,CF_0,CF_0)
+#define FCALLSCFUN9( T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9) \
+ FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,CF_0)
+#define FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA) \
+ FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,CF_0,CF_0,CF_0,CF_0)
+#define FCALLSCFUN11(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB) \
+ FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,CF_0,CF_0,CF_0)
+#define FCALLSCFUN12(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC) \
+ FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,CF_0,CF_0)
+#define FCALLSCFUN13(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD) \
+ FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,CF_0)
+
+#ifndef __CF__KnR
+#define FCALLSCFUN0(T0,CN,UN,LN) CFextern _(T0,_cfFZ)(UN,LN) ABSOFT_cf2(T0)) \
+ {_Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN(); _Icf(0,K,T0,0,0) _(T0,_cfI)}
+
+#define FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ CFextern _(T0,_cfF)(UN,LN) \
+ CFARGT14(NCF,DCF,ABSOFT_cf2(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)) \
+ { CFARGT14S(QCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ _Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN( TCF(LN,T1,1,0) TCF(LN,T2,2,1) \
+ TCF(LN,T3,3,1) TCF(LN,T4,4,1) TCF(LN,T5,5,1) TCF(LN,T6,6,1) TCF(LN,T7,7,1) \
+ TCF(LN,T8,8,1) TCF(LN,T9,9,1) TCF(LN,TA,A,1) TCF(LN,TB,B,1) TCF(LN,TC,C,1) \
+ TCF(LN,TD,D,1) TCF(LN,TE,E,1) ); _Icf(0,K,T0,0,0) \
+ CFARGT14S(RCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) _(T0,_cfI) }
+#else
+#define FCALLSCFUN0(T0,CN,UN,LN) CFextern _(T0,_cfFZ)(UN,LN) ABSOFT_cf3(T0)) _Icf(0,FF,T0,0,0)\
+ {_Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN(); _Icf(0,K,T0,0,0) _(T0,_cfI)}
+
+#define FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ CFextern _(T0,_cfF)(UN,LN) \
+ CFARGT14(NNCF,DDCF,ABSOFT_cf3(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)) _Icf(0,FF,T0,0,0) \
+ CFARGT14FS(NNNCF,DDDCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE); \
+ { CFARGT14S(QCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ _Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN( TCF(LN,T1,1,0) TCF(LN,T2,2,1) \
+ TCF(LN,T3,3,1) TCF(LN,T4,4,1) TCF(LN,T5,5,1) TCF(LN,T6,6,1) TCF(LN,T7,7,1) \
+ TCF(LN,T8,8,1) TCF(LN,T9,9,1) TCF(LN,TA,A,1) TCF(LN,TB,B,1) TCF(LN,TC,C,1) \
+ TCF(LN,TD,D,1) TCF(LN,TE,E,1) ); _Icf(0,K,T0,0,0) \
+ CFARGT14S(RCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) _(T0,_cfI)}
+#endif
+
+
+#endif /* __CFORTRAN_LOADED */
diff --git a/include/compress.h b/include/compress.h
new file mode 100644
index 0000000..7e3c406
--- /dev/null
+++ b/include/compress.h
@@ -0,0 +1,212 @@
+/* compress.h -- definitions for the decompression routines used in CFITSIO */
+
+/* Blatantly copied and modified from the original gzip-1.2.4 source code. */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+
+/* 'near' is only relevant for 16-bit PC with small memory model */
+# define near
+
+#if defined(VAXC) || defined(VMS)
+# define RECORD_IO 1
+#else
+# define RECORD_IO 0
+#endif
+
+#define get_char() get_byte()
+
+/* gzip.h -- common declarations for all gzip modules */
+
+#define OF(args) args
+typedef void *voidp;
+
+#define memzero(s, n) memset ((voidp)(s), 0, (n))
+
+typedef unsigned char uch;
+typedef unsigned short ush;
+typedef unsigned long ulg;
+
+/* Return codes from gzip */
+#define OK 0
+#define ERROR 1
+#define WARNING 2
+
+/* Compression methods (see algorithm.doc) */
+#define STORED 0
+#define COMPRESSED 1
+#define PACKED 2
+#define LZHED 3
+/* methods 4 to 7 reserved */
+#define DEFLATED 8
+#define MAX_METHODS 9
+
+#define INBUFSIZ 0x8000 /* input buffer size */
+#define INBUF_EXTRA 64 /* required by unlzw() */
+#define OUTBUFSIZ 16384 /* output buffer size */
+#define OUTBUF_EXTRA 2048 /* required by unlzw() */
+#define DIST_BUFSIZE 0x8000 /* buffer for distances, see trees.c */
+#define WSIZE 0x8000 /* window size--must be a power of two, and */
+
+#define DECLARE(type, array, size) type array[size]
+
+#define tab_suffix window
+#define tab_prefix prev /* hash link (see deflate.c) */
+#define head (prev+WSIZE) /* hash head (see deflate.c) */
+
+#define PACK_MAGIC "\037\036" /* Magic header for packed files */
+#define GZIP_MAGIC "\037\213" /* Magic header for gzip files, 1F 8B */
+#define OLD_GZIP_MAGIC "\037\236" /* Magic header for gzip 0.5 = freeze 1.x */
+#define LZH_MAGIC "\037\240" /* Magic header for SCO LZH Compress files*/
+#define LZW_MAGIC "\037\235" /* Magic header for lzw files, 1F 9D */
+#define PKZIP_MAGIC "\120\113\003\004" /* Magic header for pkzip files */
+
+/* gzip flag byte */
+#define ASCII_FLAG 0x01 /* bit 0 set: file probably ascii text */
+#define CONTINUATION 0x02 /* bit 1 set: continuation of multi-part gzip file */
+#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */
+#define ORIG_NAME 0x08 /* bit 3 set: original file name present */
+#define COMMENT 0x10 /* bit 4 set: file comment present */
+#define ENCRYPTED 0x20 /* bit 5 set: file is encrypted */
+#define RESERVED 0xC0 /* bit 6,7: reserved */
+
+#define MIN_MATCH 3
+#define MAX_MATCH 258
+#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
+#define MAX_DIST (WSIZE-MIN_LOOKAHEAD)
+#define translate_eol 0 /* no option -a yet */
+
+#define get_byte() (inptr < insize ? inbuf[inptr++] : fill_inbuf(0))
+#define try_byte() (inptr < insize ? inbuf[inptr++] : fill_inbuf(1))
+#define put_ubyte(c) {window[outcnt++]=(uch)(c); if (outcnt==WSIZE)\
+ flush_window();}
+
+/* Macros for getting two-byte and four-byte header values */
+#define SH(p) ((ush)(uch)((p)[0]) | ((ush)(uch)((p)[1]) << 8))
+#define LG(p) ((ulg)(SH(p)) | ((ulg)(SH((p)+2)) << 16))
+
+/* Diagnostic functions */
+# define Assert(cond,msg)
+# define Trace(x)
+# define Tracev(x)
+# define Tracevv(x)
+# define Tracec(c,x)
+# define Tracecv(c,x)
+
+/* lzw.h -- define the lzw functions. */
+
+#ifndef BITS
+# define BITS 16
+#endif
+#define INIT_BITS 9 /* Initial number of bits per code */
+#define BIT_MASK 0x1f /* Mask for 'number of compression bits' */
+#define BLOCK_MODE 0x80
+#define LZW_RESERVED 0x60 /* reserved bits */
+#define CLEAR 256 /* flush the dictionary */
+#define FIRST (CLEAR+1) /* first free entry */
+
+/* prototypes */
+
+#define local static
+void ffpmsg(const char *err_message);
+
+local int get_method OF((FILE *in));
+
+local ulg updcrc OF((uch *s, unsigned n));
+local int fill_inbuf OF((int eof_ok));
+local void flush_outbuf OF((void));
+local void flush_window OF((void));
+local void write_buf OF((voidp buf, unsigned cnt));
+local void error OF((char *m));
+local ulg flush_block OF((char *buf, ulg stored_len, int eof));
+typedef int file_t; /* Do not use stdio */
+#define NO_FILE (-1) /* in memory compression */
+local int file_read OF((char *buf, unsigned size));
+local void send_bits OF((int value, int length));
+local unsigned bi_reverse OF((unsigned value, int length));
+local void bi_windup OF((void));
+local void copy_block OF((char *buf, unsigned len, int header));
+local int (*read_buf) OF((char *buf, unsigned size));
+local void lm_init OF((int pack_level, ush *flags));
+local ulg deflate OF((void));
+local void ct_init OF((ush *attr, int *method));
+local int ct_tally OF((int dist, int lc));
+local void bi_init OF((file_t zipfile));
+
+#define put_byte(c) {outbuf[outcnt++]=(uch)(c); if (outcnt==OUTBUFSIZ)\
+ flush_outbuf();}
+
+/* Output a 16 bit value, lsb first */
+#define put_short(w) \
+{ if (outcnt < OUTBUFSIZ-2) { \
+ outbuf[outcnt++] = (uch) ((w) & 0xff); \
+ outbuf[outcnt++] = (uch) ((ush)(w) >> 8); \
+ } else { \
+ put_byte((uch)((w) & 0xff)); \
+ put_byte((uch)((ush)(w) >> 8)); \
+ } \
+}
+
+/* Output a 32 bit value to the bit stream, lsb first */
+#define put_long(n) { \
+ put_short((n) & 0xffff); \
+ put_short(((ulg)(n)) >> 16); \
+}
+
+#define seekable() 0 /* force sequential output */
+
+/* io.c */
+local void fillbuf OF((int n));
+local unsigned getbits OF((int n));
+local void init_getbits OF((void));
+
+/* maketbl.c */
+local void make_table OF((int nchar, uch bitlen[],
+ int tablebits, ush table[]));
+
+/* huf.c */
+local void read_pt_len OF((int nn, int nbit, int i_special));
+local void read_c_len OF((void));
+local unsigned decode_c OF((void));
+local unsigned decode_p OF((void));
+local void huf_decode_start OF((void));
+
+/* decode.c */
+local void decode_start OF((void));
+local unsigned decode OF((unsigned count, uch buffer[]));
+
+local int unlzh OF((FILE *in, FILE *out));
+local int unlzw OF((FILE *in, FILE *out));
+
+local void read_tree OF((void));
+local void build_tree_unpack OF((void));
+
+local int unpack OF((FILE *in, FILE *out));
+local int check_zipfile OF((FILE *in));
+local int unzip OF((FILE *in, FILE *out));
+
+int (*work) OF((FILE *infile, FILE *outfile)) = unzip; /* function to call */
+
+/* inflate.c */
+struct huft {
+ uch e; /* number of extra bits or operation */
+ uch b; /* number of bits in this code or subcode */
+ union {
+ ush n; /* literal, length base, or distance base */
+ struct huft *t; /* pointer to next level of table */
+ } v;
+};
+
+local int huft_build OF((unsigned *, unsigned, unsigned, ush *, ush *,
+ struct huft **, int *));
+local int huft_free OF((struct huft *));
+local int inflate_codes OF((struct huft *, struct huft *, int, int));
+local int inflate_stored OF((void));
+local int inflate_fixed OF((void));
+local int inflate_dynamic OF((void));
+local int inflate_block OF((int *));
+local int inflate OF((void));
+
+/* end of compress.h include file */
diff --git a/include/drvrsmem.h b/include/drvrsmem.h
new file mode 100644
index 0000000..cd63810
--- /dev/null
+++ b/include/drvrsmem.h
@@ -0,0 +1,178 @@
+/* S H A R E D M E M O R Y D R I V E R
+ =======================================
+
+ by Jerzy.Borkowski@obs.unige.ch
+
+09-Mar-98 : initial version 1.0 released
+23-Mar-98 : shared_malloc now accepts new handle as an argument
+*/
+
+
+#include <sys/ipc.h> /* this is necessary for Solaris/Linux */
+#include <sys/shm.h>
+#include <sys/sem.h>
+
+#ifdef _AIX
+#include <fcntl.h>
+#else
+#include <sys/fcntl.h>
+#endif
+
+ /* configuration parameters */
+
+#define SHARED_MAXSEG (16) /* maximum number of shared memory blocks */
+
+#define SHARED_KEYBASE (14011963) /* base for shared memory keys, may be overriden by getenv */
+#define SHARED_FDNAME ("/tmp/.shmem-lockfile") /* template for lock file name */
+
+#define SHARED_ENV_KEYBASE ("SHMEM_LIB_KEYBASE") /* name of environment variable */
+#define SHARED_ENV_MAXSEG ("SHMEM_LIB_MAXSEG") /* name of environment variable */
+
+ /* useful constants */
+
+#define SHARED_RDONLY (0) /* flag for shared_(un)lock, lock for read */
+#define SHARED_RDWRITE (1) /* flag for shared_(un)lock, lock for write */
+#define SHARED_WAIT (0) /* flag for shared_lock, block if cannot lock immediate */
+#define SHARED_NOWAIT (2) /* flag for shared_lock, fail if cannot lock immediate */
+#define SHARED_NOLOCK (0x100) /* flag for shared_validate function */
+
+#define SHARED_RESIZE (4) /* flag for shared_malloc, object is resizeable */
+#define SHARED_PERSIST (8) /* flag for shared_malloc, object is not deleted after last proc detaches */
+
+#define SHARED_INVALID (-1) /* invalid handle for semaphore/shared memory */
+
+#define SHARED_EMPTY (0) /* entries for shared_used table */
+#define SHARED_USED (1)
+
+#define SHARED_GRANUL (16384) /* granularity of shared_malloc allocation = phys page size, system dependent */
+
+
+
+ /* checkpoints in shared memory segments - might be omitted */
+
+#define SHARED_ID_0 ('J') /* first byte of identifier in BLKHEAD */
+#define SHARED_ID_1 ('B') /* second byte of identifier in BLKHEAD */
+
+#define BLOCK_REG (0) /* value for tflag member of BLKHEAD */
+#define BLOCK_SHARED (1) /* value for tflag member of BLKHEAD */
+
+ /* generic error codes */
+
+#define SHARED_OK (0)
+
+#define SHARED_ERR_MIN_IDX SHARED_BADARG
+#define SHARED_ERR_MAX_IDX SHARED_NORESIZE
+
+
+#define DAL_SHM_FREE (0)
+#define DAL_SHM_USED (1)
+
+#define DAL_SHM_ID0 ('D')
+#define DAL_SHM_ID1 ('S')
+#define DAL_SHM_ID2 ('M')
+
+#define DAL_SHM_SEGHEAD_ID (0x19630114)
+
+
+
+ /* data types */
+
+/* BLKHEAD object is placed at the beginning of every memory segment (both
+ shared and regular) to allow automatic recognition of segments type */
+
+typedef union
+ { struct BLKHEADstruct
+ { char ID[2]; /* ID = 'JB', just as a checkpoint */
+ char tflag; /* is it shared memory or regular one ? */
+ int handle; /* this is not necessary, used only for non-resizeable objects via ptr */
+ } s;
+ double d; /* for proper alignment on every machine */
+ } BLKHEAD;
+
+typedef void *SHARED_P; /* generic type of shared memory pointer */
+
+typedef struct SHARED_GTABstruct /* data type used in global table */
+ { int sem; /* access semaphore (1 field): process count */
+ int semkey; /* key value used to generate semaphore handle */
+ int key; /* key value used to generate shared memory handle (realloc changes it) */
+ int handle; /* handle of shared memory segment */
+ int size; /* size of shared memory segment */
+ int nprocdebug; /* attached proc counter, helps remove zombie segments */
+ char attr; /* attributes of shared memory object */
+ } SHARED_GTAB;
+
+typedef struct SHARED_LTABstruct /* data type used in local table */
+ { BLKHEAD *p; /* pointer to segment (may be null) */
+ int tcnt; /* number of threads in this process attached to segment */
+ int lkcnt; /* >=0 <- number of read locks, -1 - write lock */
+ long seekpos; /* current pointer position, read/write/seek operations change it */
+ } SHARED_LTAB;
+
+
+ /* system dependent definitions */
+
+#ifndef HAVE_FLOCK_T
+typedef struct flock flock_t;
+#define HAVE_FLOCK_T
+#endif
+
+#ifndef HAVE_UNION_SEMUN
+union semun
+ { int val;
+ struct semid_ds *buf;
+ unsigned short *array;
+ };
+#define HAVE_UNION_SEMUN
+#endif
+
+
+typedef struct DAL_SHM_SEGHEAD_STRUCT DAL_SHM_SEGHEAD;
+
+struct DAL_SHM_SEGHEAD_STRUCT
+ { int ID; /* ID for debugging */
+ int h; /* handle of sh. mem */
+ int size; /* size of data area */
+ int nodeidx; /* offset of root object (node struct typically) */
+ };
+
+ /* API routines */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void shared_cleanup(void); /* must be called at exit/abort */
+int shared_init(int debug_msgs); /* must be called before any other shared memory routine */
+int shared_recover(int id); /* try to recover dormant segment(s) after applic crash */
+int shared_malloc(long size, int mode, int newhandle); /* allocate n-bytes of shared memory */
+int shared_attach(int idx); /* attach to segment given index to table */
+int shared_free(int idx); /* release shared memory */
+SHARED_P shared_lock(int idx, int mode); /* lock segment for reading */
+SHARED_P shared_realloc(int idx, long newsize); /* reallocate n-bytes of shared memory (ON LOCKED SEGMENT ONLY) */
+int shared_size(int idx); /* get size of attached shared memory segment (ON LOCKED SEGMENT ONLY) */
+int shared_attr(int idx); /* get attributes of attached shared memory segment (ON LOCKED SEGMENT ONLY) */
+int shared_set_attr(int idx, int newattr); /* set attributes of attached shared memory segment (ON LOCKED SEGMENT ONLY) */
+int shared_unlock(int idx); /* unlock segment (ON LOCKED SEGMENT ONLY) */
+int shared_set_debug(int debug_msgs); /* set/reset debug mode */
+int shared_set_createmode(int mode); /* set/reset debug mode */
+int shared_list(int id); /* list segment(s) */
+int shared_uncond_delete(int id); /* uncondintionally delete (NOWAIT operation) segment(s) */
+
+int smem_init(void);
+int smem_shutdown(void);
+int smem_setoptions(int options);
+int smem_getoptions(int *options);
+int smem_getversion(int *version);
+int smem_open(char *filename, int rwmode, int *driverhandle);
+int smem_create(char *filename, int *driverhandle);
+int smem_close(int driverhandle);
+int smem_remove(char *filename);
+int smem_size(int driverhandle, long *size);
+int smem_flush(int driverhandle);
+int smem_seek(int driverhandle, long offset);
+int smem_read(int driverhandle, void *buffer, long nbytes);
+int smem_write(int driverhandle, void *buffer, long nbytes);
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/include/eval_defs.h b/include/eval_defs.h
new file mode 100644
index 0000000..c650311
--- /dev/null
+++ b/include/eval_defs.h
@@ -0,0 +1,147 @@
+#include <stdio.h>
+#include <math.h>
+#include <stdlib.h>
+#include <string.h>
+#if defined(__sgi) || defined(__hpux)
+#include <alloca.h>
+#endif
+#ifdef sparc
+#include <malloc.h>
+#endif
+#include "fitsio2.h"
+
+#ifndef FFBISON
+#include "eval_tab.h"
+#endif
+
+#define MAXDIMS 5
+#define MAXSUBS 10
+#define MAXVARNAME 80
+#define CONST_OP -1000
+#define pERROR -1
+
+typedef struct {
+ char name[MAXVARNAME+1];
+ int type;
+ long nelem;
+ int naxis;
+ long naxes[MAXDIMS];
+ char *undef;
+ void *data;
+ } DataInfo;
+
+typedef struct {
+ long nelem;
+ int naxis;
+ long naxes[MAXDIMS];
+ char *undef;
+ union {
+ double dbl;
+ long lng;
+ char log;
+ char str[256];
+ double *dblptr;
+ long *lngptr;
+ char *logptr;
+ char **strptr;
+ void *ptr;
+ } data;
+ } lval;
+
+typedef struct Node {
+ int operation;
+ void (*DoOp)(struct Node *this);
+ int nSubNodes;
+ int SubNodes[MAXSUBS];
+ int type;
+ lval value;
+ } Node;
+
+typedef struct {
+ fitsfile *def_fptr;
+ int (*getData)( char *dataName, void *dataValue );
+ int (*loadData)( int varNum, long fRow, long nRows,
+ void *data, char *undef );
+
+ int compressed;
+ int timeCol;
+ int parCol;
+ int valCol;
+
+ char *expr;
+ int index;
+ int is_eobuf;
+
+ Node *Nodes;
+ int nNodes;
+ int nNodesAlloc;
+ int resultNode;
+
+ long firstRow;
+ long nRows;
+
+ int nCols;
+ iteratorCol *colData;
+ DataInfo *varData;
+
+ long firstDataRow;
+ long nDataRows;
+ long totalRows;
+
+ int datatype;
+
+ int status;
+ } ParseData;
+
+typedef enum {
+ rnd_fct = 1001,
+ sum_fct,
+ nelem_fct,
+ sin_fct,
+ cos_fct,
+ tan_fct,
+ asin_fct,
+ acos_fct,
+ atan_fct,
+ sinh_fct,
+ cosh_fct,
+ tanh_fct,
+ exp_fct,
+ log_fct,
+ log10_fct,
+ sqrt_fct,
+ abs_fct,
+ atan2_fct,
+ ceil_fct,
+ floor_fct,
+ round_fct,
+ min1_fct,
+ min2_fct,
+ max1_fct,
+ max2_fct,
+ near_fct,
+ circle_fct,
+ box_fct,
+ elps_fct,
+ isnull_fct,
+ defnull_fct,
+ gtifilt_fct,
+ regfilt_fct,
+ row_fct
+ } funcOp;
+
+extern ParseData gParse;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ int ffparse(void);
+ int fflex(void);
+ void ffrestart(FILE*);
+
+ void Evaluate_Parser( long firstRow, long nRows );
+
+#ifdef __cplusplus
+ }
+#endif
diff --git a/include/eval_tab.h b/include/eval_tab.h
new file mode 100644
index 0000000..784ac91
--- /dev/null
+++ b/include/eval_tab.h
@@ -0,0 +1,37 @@
+typedef union {
+ int Node; /* Index of Node */
+ double dbl; /* real value */
+ long lng; /* integer value */
+ char log; /* logical value */
+ char str[256]; /* string value */
+} FFSTYPE;
+#define BOOLEAN 258
+#define LONG 259
+#define DOUBLE 260
+#define STRING 261
+#define BITSTR 262
+#define FUNCTION 263
+#define BFUNCTION 264
+#define GTIFILTER 265
+#define REGFILTER 266
+#define COLUMN 267
+#define BCOLUMN 268
+#define SCOLUMN 269
+#define BITCOL 270
+#define ROWREF 271
+#define OR 272
+#define AND 273
+#define EQ 274
+#define NE 275
+#define GT 276
+#define LT 277
+#define LTE 278
+#define GTE 279
+#define POWER 280
+#define NOT 281
+#define INTCAST 282
+#define FLTCAST 283
+#define UMINUS 284
+
+
+extern FFSTYPE fflval;
diff --git a/include/f77_wrap.h b/include/f77_wrap.h
new file mode 100644
index 0000000..121850f
--- /dev/null
+++ b/include/f77_wrap.h
@@ -0,0 +1,277 @@
+#define UNSIGNED_BYTE
+#include "cfortran.h"
+
+/************************************************************************
+ DEC C creates longs as 8-byte integers. On most other machines, ints
+ and longs are both 4-bytes, so both are compatible with Fortrans
+ default integer which is 4-bytes. To support DECs, we must redefine
+ LONGs and convert them to 8-bytes when going to C, and restore them
+ to 4-bytes when returning to Fortran. Ugh!!!
+*************************************************************************/
+
+#if (defined DECFortran) || (defined(__alpha) && defined(g77Fortran))
+
+#undef LONGV_cfSTR
+#undef PLONG_cfSTR
+#undef LONGVVVVVVV_cfTYPE
+#undef PLONG_cfTYPE
+#undef LONGV_cfT
+#undef PLONG_cfT
+
+#define LONGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,LONGV,A,B,C,D,E)
+#define PLONG_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PLONG,A,B,C,D,E)
+#define LONGVVVVVVV_cfTYPE int
+#define PLONG_cfTYPE int
+#define LONGV_cfQ(B) long *B, _(B,N);
+#define PLONG_cfQ(B) long B;
+#define LONGV_cfT(M,I,A,B,D) ( (_(B,N) = * _3(M,_LONGV_A,I)), \
+ B = F2Clongv(_(B,N),A) )
+#define PLONG_cfT(M,I,A,B,D) ((B=*A),&B)
+#define LONGV_cfR(A,B,D) C2Flongv(_(B,N),A,B);
+#define PLONG_cfR(A,B,D) *A=B;
+#define LONGV_cfH(S,U,B)
+#define PLONG_cfH(S,U,B)
+
+static long *F2Clongv(long size, int *A)
+{
+ long i;
+ long *B;
+
+ B=(long *)malloc( size*sizeof(long) );
+ for(i=0;i<size;i++) B[i]=A[i];
+ return(B);
+}
+
+static void C2Flongv(long size, int *A, long *B)
+{
+ long i;
+
+ for(i=0;i<size;i++) A[i]=B[i];
+ free(B);
+}
+
+#endif
+
+/************************************************************************
+ Modify cfortran.h's handling of strings. C interprets a "char **"
+ parameter as an array of pointers to the strings (or as a handle),
+ not as a pointer to a block of contiguous strings. Also set a
+ a minimum length for string allocations, to minimize risk of
+ overflow.
+*************************************************************************/
+
+extern unsigned long gMinStrLen;
+
+#undef STRINGV_cfQ
+#undef STRINGV_cfR
+#undef TTSTR
+#undef TTTTSTRV
+#undef RRRRPSTRV
+
+#undef PPSTRING_cfT
+
+#ifdef vmsFortran
+#define PPSTRING_cfT(M,I,A,B,D) (unsigned char*)A->dsc$a_pointer
+
+/* We want single strings to be equivalent to string vectors with */
+/* a single element, so ignore the number of elements info in the */
+/* vector structure, and rely on the NUM_ELEM definitions. */
+
+#undef STRINGV_cfT
+#define STRINGV_cfT(M,I,A,B,D) TTTTSTRV(A->dsc$a_pointer, B, \
+ A->dsc$w_length, \
+ num_elem(A->dsc$a_pointer, \
+ A->dsc$w_length, \
+ _3(M,_STRV_A,I) ) )
+#else
+#ifdef CRAYFortran
+#define PPSTRING_cfT(M,I,A,B,D) (unsigned char*)_fcdtocp(A)
+#else
+#define PPSTRING_cfT(M,I,A,B,D) (unsigned char*)A
+#endif
+#endif
+
+#define _cfMAX(A,B) ( (A>B) ? A : B )
+#define STRINGV_cfQ(B) char **B; unsigned int _(B,N), _(B,M);
+#define STRINGV_cfR(A,B,D) free(B[0]); free(B);
+#define TTSTR( A,B,D) \
+ ((B=(char*)malloc(_cfMAX(D,gMinStrLen)+1))[D]='\0',memcpy(B,A,D), \
+ kill_trailing(B,' '))
+#define TTTTSTRV( A,B,D,E) ( \
+ _(B,N)=_cfMAX(E,1), \
+ _(B,M)=_cfMAX(D,gMinStrLen)+1, \
+ B=(char**)malloc(_(B,N)*sizeof(char*)), \
+ B[0]=(char*)malloc(_(B,N)*_(B,M)), \
+ vindex(B,_(B,M),_(B,N),f2cstrv2(A,B[0],D,_(B,M),_(B,N))) \
+ )
+#define RRRRPSTRV(A,B,D) \
+ c2fstrv2(B[0],A,_(B,M),D,_(B,N)), \
+ free(B[0]), \
+ free(B);
+
+static char **vindex(char **B, int elem_len, int nelem, char *B0)
+{
+ int i;
+ if( nelem )
+ for( i=0;i<nelem;i++ ) B[i] = B0+i*elem_len;
+ return B;
+}
+
+static char *c2fstrv2(char* cstr, char *fstr, int celem_len, int felem_len,
+ int nelem)
+{
+ int i,j;
+
+ if( nelem )
+ for (i=0; i<nelem; i++) {
+ for (j=0; j<felem_len && *cstr; j++) *fstr++ = *cstr++;
+ cstr += celem_len-j;
+ for (; j<felem_len; j++) *fstr++ = ' ';
+ }
+ return( fstr-felem_len*nelem );
+}
+
+static char *f2cstrv2(char *fstr, char* cstr, int felem_len, int celem_len,
+ int nelem)
+{
+ int i,j;
+
+ if( nelem )
+ for (i=0; i<nelem; i++, cstr+=(celem_len-felem_len)) {
+ for (j=0; j<felem_len; j++) *cstr++ = *fstr++;
+ *cstr='\0';
+ kill_trailingn( cstr-felem_len, ' ', cstr );
+ }
+ return( cstr-celem_len*nelem );
+}
+
+/************************************************************************
+ The following definitions redefine the BYTE data type to be
+ interpretted as a character*1 string instead of an integer*1 which
+ is not supported by all compilers.
+*************************************************************************/
+
+#undef BYTE_cfT
+#undef BYTEV_cfT
+#undef BYTE_cfINT
+#undef BYTEV_cfINT
+#undef BYTE_cfSTR
+#undef BYTEV_cfSTR
+
+#define BYTE_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,BYTE,B,X,Y,Z,0)
+#define BYTEV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,BYTEV,B,X,Y,Z,0)
+#define BYTE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,BYTE,A,B,C,D,E)
+#define BYTEV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,BYTEV,A,B,C,D,E)
+#define BYTE_cfSEP(T,B) INT_cfSEP(T,B)
+#define BYTEV_cfSEP(T,B) INT_cfSEP(T,B)
+#define BYTE_cfH(S,U,B) STRING_cfH(S,U,B)
+#define BYTEV_cfH(S,U,B) STRING_cfH(S,U,B)
+#define BYTE_cfQ(B)
+#define BYTEV_cfQ(B)
+#define BYTE_cfR(A,B,D)
+#define BYTEV_cfR(A,B,D)
+
+#ifdef vmsFortran
+#define BYTE_cfN(T,A) fstring * A
+#define BYTEV_cfN(T,A) fstringvector * A
+#define BYTE_cfT(M,I,A,B,D) (INTEGER_BYTE)((A->dsc$a_pointer)[0])
+#define BYTEV_cfT(M,I,A,B,D) (INTEGER_BYTE*)A->dsc$a_pointer
+#else
+#ifdef CRAYFortran
+#define BYTE_cfN(T,A) _fcd A
+#define BYTEV_cfN(T,A) _fcd A
+#define BYTE_cfT(M,I,A,B,D) (INTEGER_BYTE)((_fcdtocp(A))[0])
+#define BYTEV_cfT(M,I,A,B,D) (INTEGER_BYTE*)_fcdtocp(A)
+#else
+#define BYTE_cfN(T,A) INTEGER_BYTE * A
+#define BYTEV_cfN(T,A) INTEGER_BYTE * A
+#define BYTE_cfT(M,I,A,B,D) A[0]
+#define BYTEV_cfT(M,I,A,B,D) A
+#endif
+#endif
+
+/************************************************************************
+ The following definitions and functions handle conversions between
+ C and Fortran arrays of LOGICALS. Individually, LOGICALS are
+ treated as int's but as char's when in an array. cfortran defines
+ (F2C/C2F)LOGICALV but never uses them, so these routines also
+ handle TRUE/FALSE conversions.
+*************************************************************************/
+
+#undef LOGICALV_cfSTR
+#undef LOGICALV_cfT
+#define LOGICALV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,LOGICALV,A,B,C,D,E)
+#define LOGICALV_cfQ(B) char *B; unsigned int _(B,N);
+#define LOGICALV_cfT(M,I,A,B,D) (_(B,N)= * _3(M,_LOGV_A,I), \
+ B=F2CcopyLogVect(_(B,N),A))
+#define LOGICALV_cfR(A,B,D) C2FcopyLogVect(_(B,N),A,B);
+#define LOGICALV_cfH(S,U,B)
+
+static char *F2CcopyLogVect(long size, int *A)
+{
+ long i;
+ char *B;
+
+ B=(char *)malloc(size*sizeof(char));
+ for( i=0; i<size; i++ ) B[i]=F2CLOGICAL(A[i]);
+ return(B);
+}
+
+static void C2FcopyLogVect(long size, int *A, char *B)
+{
+ long i;
+
+ for( i=0; i<size; i++ ) A[i]=C2FLOGICAL(B[i]);
+ free(B);
+}
+
+/*------------------ Fortran File Handling ----------------------*/
+/* Fortran uses unit numbers, whereas C uses file pointers, so */
+/* a global array of file pointers is setup in which Fortran's */
+/* unit number serves as the index. Two FITSIO routines are */
+/* the integer unit number and the fitsfile file pointer. */
+/*-----------------------------------------------------------------*/
+
+#define MAXFITSFILES 200 /* Array of file pointers indexed */
+extern fitsfile *gFitsFiles[]; /* by Fortran unit numbers */
+
+#define FITSUNIT_cfINT(N,A,B,X,Y,Z) INT_cfINT(N,A,B,X,Y,Z)
+#define FITSUNIT_cfSTR(N,T,A,B,C,D,E) INT_cfSTR(N,T,A,B,C,D,E)
+#define FITSUNIT_cfT(M,I,A,B,D) gFitsFiles[*A]
+#define FITSUNITVVVVVVV_cfTYPE int
+#define PFITSUNIT_cfINT(N,A,B,X,Y,Z) PINT_cfINT(N,A,B,X,Y,Z)
+#define PFITSUNIT_cfSTR(N,T,A,B,C,D,E) PINT_cfSTR(N,T,A,B,C,D,E)
+#define PFITSUNIT_cfT(M,I,A,B,D) (gFitsFiles + *A)
+#define PFITSUNIT_cfTYPE int
+
+
+/*---------------------- Make C++ Happy -----------------------------*/
+/* Redefine FCALLSCFUNn so that they create prototypes of themselves */
+/* and change TTTTSTR to use (char *)0 instead of NULL */
+/*-------------------------------------------------------------------*/
+
+#undef FCALLSCFUN0
+#undef FCALLSCFUN14
+#undef TTTTSTR
+
+#define TTTTSTR(A,B,D) ( !(D<4||A[0]||A[1]||A[2]||A[3]) ) ? ((char*)0) : \
+ memchr(A,'\0',D) ? A : TTSTR(A,B,D)
+
+#define FCALLSCFUN0(T0,CN,UN,LN) \
+ CFextern _(T0,_cfFZ)(UN,LN) void ABSOFT_cf2(T0)); \
+ CFextern _(T0,_cfFZ)(UN,LN) void ABSOFT_cf2(T0)) \
+ {_Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN(); _Icf(0,K,T0,0,0) _(T0,_cfI)}
+
+#define FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ CFextern _(T0,_cfF)(UN,LN) \
+ CFARGT14(NCF,DCF,ABSOFT_cf2(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)); \
+ CFextern _(T0,_cfF)(UN,LN) \
+ CFARGT14(NCF,DCF,ABSOFT_cf2(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)) \
+ { CFARGT14S(QCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
+ _Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN( TCF(LN,T1,1,0) TCF(LN,T2,2,1) \
+ TCF(LN,T3,3,1) TCF(LN,T4,4,1) TCF(LN,T5,5,1) TCF(LN,T6,6,1) TCF(LN,T7,7,1) \
+ TCF(LN,T8,8,1) TCF(LN,T9,9,1) TCF(LN,TA,A,1) TCF(LN,TB,B,1) TCF(LN,TC,C,1) \
+ TCF(LN,TD,D,1) TCF(LN,TE,E,1) ); _Icf(0,K,T0,0,0) \
+ CFARGT14S(RCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) _(T0,_cfI) \
+ }
+
diff --git a/include/fitsio.h b/include/fitsio.h
new file mode 100644
index 0000000..9330127
--- /dev/null
+++ b/include/fitsio.h
@@ -0,0 +1,1355 @@
+#ifndef _FITSIO_H
+#define _FITSIO_H
+
+#include <stdio.h>
+/* stddef.h is apparently needed to define size_t */
+#include <stddef.h>
+
+/* The following exclusion if __CINT__ is defined is needed for ROOT */
+#ifndef __CINT__
+#include "longnam.h"
+#endif
+
+/* global variables */
+
+#define FLEN_FILENAME 1025 /* max length of a filename */
+#define FLEN_KEYWORD 72 /* max length of a keyword (HIERARCH convention) */
+#define FLEN_CARD 81 /* length of a FITS header card */
+#define FLEN_VALUE 71 /* max length of a keyword value string */
+#define FLEN_COMMENT 73 /* max length of a keyword comment string */
+#define FLEN_ERRMSG 81 /* max length of a FITSIO error message */
+#define FLEN_STATUS 31 /* max length of a FITSIO status text string */
+
+#define TBIT 1 /* codes for FITS table data types */
+#define TBYTE 11
+#define TLOGICAL 14
+#define TSTRING 16
+#define TUSHORT 20
+#define TSHORT 21
+#define TUINT 30
+#define TINT 31
+#define TULONG 40
+#define TLONG 41
+#define TFLOAT 42
+#define TDOUBLE 82
+#define TCOMPLEX 83
+#define TDBLCOMPLEX 163
+
+#define TYP_STRUC_KEY 10
+#define TYP_CMPRS_KEY 20
+#define TYP_SCAL_KEY 30
+#define TYP_NULL_KEY 40
+#define TYP_DIM_KEY 50
+#define TYP_RANG_KEY 60
+#define TYP_UNIT_KEY 70
+#define TYP_DISP_KEY 80
+#define TYP_HDUID_KEY 90
+#define TYP_CKSUM_KEY 100
+#define TYP_WCS_KEY 110
+#define TYP_REFSYS_KEY 120
+#define TYP_COMM_KEY 130
+#define TYP_CONT_KEY 140
+#define TYP_USER_KEY 150
+
+#define INT32BIT int /* 32-bit integer datatype. Currently this */
+ /* datatype is an 'int' on all useful platforms */
+ /* however, it is possible that that are cases */
+ /* where 'int' is a 2-byte integer, in which case */
+ /* FITSINT would need to be defined as 'long'. */
+
+#define BYTE_IMG 8 /* BITPIX code values for FITS image types */
+#define SHORT_IMG 16
+#define LONG_IMG 32
+#define FLOAT_IMG -32
+#define DOUBLE_IMG -64
+ /* The following 2 codes are not true FITS */
+ /* datatypes; these codes are only used internally */
+ /* within cfitsio to make it easier for users */
+ /* to deal with unsigned integers. */
+#define USHORT_IMG 20
+#define ULONG_IMG 40
+
+#define IMAGE_HDU 0 /* Primary Array or IMAGE HDU */
+#define ASCII_TBL 1 /* ASCII table HDU */
+#define BINARY_TBL 2 /* Binary table HDU */
+#define ANY_HDU -1 /* matches any HDU type */
+
+#define READONLY 0 /* options when opening a file */
+#define READWRITE 1
+
+/* adopt a hopefully obscure number to use as a null value flag */
+/* could be problems if the FITS files contain data with these values */
+#define FLOATNULLVALUE -9.11912E-36F
+#define DOUBLENULLVALUE -9.1191291391491E-36
+
+/* Image compression algorithm types */
+#define MAX_COMPRESS_DIM 6
+#define RICE_1 11
+#define GZIP_1 21
+#define PLIO_1 31
+#define HCOMPRESS_1 41
+
+#ifndef TRUE
+#define TRUE 1
+#endif
+
+#ifndef FALSE
+#define FALSE 0
+#endif
+
+#define CASESEN 1 /* do case-sensitive string match */
+#define CASEINSEN 0 /* do case-insensitive string match */
+
+#define MAXHDU 1000 /* maximum number of extensions allowed in a FITS file */
+
+#define GT_ID_ALL_URI 0 /* hierarchical grouping parameters */
+#define GT_ID_REF 1
+#define GT_ID_POS 2
+#define GT_ID_ALL 3
+#define GT_ID_REF_URI 11
+#define GT_ID_POS_URI 12
+
+#define OPT_RM_GPT 0
+#define OPT_RM_ENTRY 1
+#define OPT_RM_MBR 2
+#define OPT_RM_ALL 3
+
+#define OPT_GCP_GPT 0
+#define OPT_GCP_MBR 1
+#define OPT_GCP_ALL 2
+
+#define OPT_MCP_ADD 0
+#define OPT_MCP_NADD 1
+#define OPT_MCP_REPL 2
+#define OPT_MCP_MOV 3
+
+#define OPT_MRG_COPY 0
+#define OPT_MRG_MOV 1
+
+#define OPT_CMT_MBR 1
+#define OPT_CMT_MBR_DEL 11
+
+typedef struct /* structure used to store table column information */
+{
+ char ttype[70]; /* column name = FITS TTYPEn keyword; */
+ long tbcol; /* offset in row to first byte of each column */
+ int tdatatype; /* datatype code of each column */
+ long trepeat; /* repeat count of column; number of elements */
+ double tscale; /* FITS TSCALn linear scaling factor */
+ double tzero; /* FITS TZEROn linear scaling zero point */
+ long tnull; /* FITS null value for int image or binary table cols */
+ char strnull[20]; /* FITS null value string for ASCII table columns */
+ char tform[10]; /* FITS tform keyword value */
+ long twidth; /* width of each ASCII table column */
+}tcolumn;
+
+#define VALIDSTRUC 555 /* magic value used to identify if structure is valid */
+
+typedef struct /* structure used to store basic FITS file information */
+{
+ int filehandle; /* handle returned by the file open function */
+ int driver; /* defines which set of I/O drivers should be used */
+ int open_count; /* number of opened 'fitsfiles' using this structure */
+ char *filename; /* file name */
+ int validcode; /* magic value used to verify that structure is valid */
+ long filesize; /* current size of the physical disk file in bytes */
+ long logfilesize; /* logical size of file, including unflushed buffers */
+ int lasthdu; /* is this the last HDU in the file? 0 = no, else yes */
+ long bytepos; /* current logical I/O pointer position in file */
+ long io_pos; /* current I/O pointer position in the physical file */
+ int curbuf; /* number of I/O buffer currently in use */
+ int curhdu; /* current HDU number; 0 = primary array */
+ int hdutype; /* 0 = primary array, 1 = ASCII table, 2 = binary table */
+ int writemode; /* 0 = readonly, 1 = readwrite */
+ int maxhdu; /* highest numbered HDU known to exist in the file */
+ long headstart[MAXHDU + 1]; /* byte offset in file to start of each HDU */
+ long headend; /* byte offest in file to end of the current HDU header */
+ long nextkey; /* byte offset in file to beginning of next keyword */
+ long datastart; /* byte offset in file to start of the current data unit */
+ int tfield; /* number of fields in the table (primary array has 2 */
+ long origrows; /* original number of rows (value of NAXIS2 keyword) */
+ long numrows; /* number of rows in the table (dynamically updated) */
+ long rowlength; /* total length of a table row, in bytes */
+ tcolumn *tableptr; /* pointer to the table structure */
+ long heapstart; /* heap start byte relative to start of data unit */
+ long heapsize; /* size of the heap, in bytes */
+
+ /* the following elements are related to compress images */
+ int compressimg; /* 1 if HDU contains a compressed image, else 0 */
+ char zcmptype[12]; /* compression type string */
+ int compress_type; /* type of compression algorithm */
+ int zbitpix; /* FITS data type of image (BITPIX) */
+ int zndim; /* dimension of image */
+ long znaxis[MAX_COMPRESS_DIM]; /* length of each axis */
+ long tilesize[MAX_COMPRESS_DIM]; /* size of compression tiles */
+ long maxtilelen; /* max number of pixels in each image tile */
+ long maxelem; /* maximum length of variable length arrays */
+
+ int cn_compressed; /* column number for COMPRESSED_DATA column */
+ int cn_uncompressed; /* column number for UNCOMPRESSED_DATA column */
+ int cn_zscale; /* column number for ZSCALE column */
+ int cn_zzero; /* column number for ZZERO column */
+ int cn_zblank; /* column number for the ZBLANK column */
+
+ double zscale; /* scaling value, if same for all tiles */
+ double zzero; /* zero pt, if same for all tiles */
+ int zblank; /* value for null pixels, if not a column */
+
+ int rice_blocksize; /* first compression parameter */
+ int rice_nbits; /* second compression parameter */
+} FITSfile;
+
+typedef struct /* structure used to store basic HDU information */
+{
+ int HDUposition; /* HDU position in file; 0 = first HDU */
+ FITSfile *Fptr; /* pointer to FITS file structure */
+}fitsfile;
+
+typedef struct /* structure for the iterator function column information */
+{
+ /* elements required as input to fits_iterate_data: */
+
+ fitsfile *fptr; /* pointer to the HDU containing the column */
+ int colnum; /* column number in the table (use name if < 1) */
+ char colname[70]; /* name (= TTYPEn value) of the column (optional) */
+ int datatype; /* output datatype (converted if necessary */
+ int iotype; /* = InputCol, InputOutputCol, or OutputCol */
+
+ /* output elements that may be useful for the work function: */
+
+ void *array; /* pointer to the array (and the null value) */
+ long repeat; /* binary table vector repeat value */
+ long tlmin; /* legal minimum data value */
+ long tlmax; /* legal maximum data value */
+ char tunit[70]; /* physical unit string */
+ char tdisp[70]; /* suggested display format */
+
+} iteratorCol;
+
+#define InputCol 0 /* flag for input only iterator column */
+#define InputOutputCol 1 /* flag for input and output iterator column */
+#define OutputCol 2 /* flag for output only iterator column */
+
+/* error status codes */
+
+#define USE_MEM_BUFF -101 /* use memory buffer when opening file */
+#define OVERFLOW_ERR -11 /* overflow during datatype conversion */
+#define SAME_FILE 101 /* input and output files are the same */
+#define TOO_MANY_FILES 103 /* tried to open too many FITS files */
+#define FILE_NOT_OPENED 104 /* could not open the named file */
+#define FILE_NOT_CREATED 105 /* could not create the named file */
+#define WRITE_ERROR 106 /* error writing to FITS file */
+#define END_OF_FILE 107 /* tried to move past end of file */
+#define READ_ERROR 108 /* error reading from FITS file */
+#define FILE_NOT_CLOSED 110 /* could not close the file */
+#define ARRAY_TOO_BIG 111 /* array dimensions exceed internal limit */
+#define READONLY_FILE 112 /* Cannot write to readonly file */
+#define MEMORY_ALLOCATION 113 /* Could not allocate memory */
+#define BAD_FILEPTR 114 /* invalid fitsfile pointer */
+#define NULL_INPUT_PTR 115 /* NULL input pointer to routine */
+#define SEEK_ERROR 116 /* error seeking position in file */
+
+#define BAD_URL_PREFIX 121 /* invalid URL prefix on file name */
+#define TOO_MANY_DRIVERS 122 /* tried to register too many IO drivers */
+#define DRIVER_INIT_FAILED 123 /* driver initialization failed */
+#define NO_MATCHING_DRIVER 124 /* matching driver is not registered */
+#define URL_PARSE_ERROR 125 /* failed to parse input file URL */
+
+#define SHARED_ERRBASE (150)
+#define SHARED_BADARG (SHARED_ERRBASE + 1)
+#define SHARED_NULPTR (SHARED_ERRBASE + 2)
+#define SHARED_TABFULL (SHARED_ERRBASE + 3)
+#define SHARED_NOTINIT (SHARED_ERRBASE + 4)
+#define SHARED_IPCERR (SHARED_ERRBASE + 5)
+#define SHARED_NOMEM (SHARED_ERRBASE + 6)
+#define SHARED_AGAIN (SHARED_ERRBASE + 7)
+#define SHARED_NOFILE (SHARED_ERRBASE + 8)
+#define SHARED_NORESIZE (SHARED_ERRBASE + 9)
+
+#define HEADER_NOT_EMPTY 201 /* header already contains keywords */
+#define KEY_NO_EXIST 202 /* keyword not found in header */
+#define KEY_OUT_BOUNDS 203 /* keyword record number is out of bounds */
+#define VALUE_UNDEFINED 204 /* keyword value field is blank */
+#define NO_QUOTE 205 /* string is missing the closing quote */
+#define BAD_KEYCHAR 207 /* illegal character in keyword name or card */
+#define BAD_ORDER 208 /* required keywords out of order */
+#define NOT_POS_INT 209 /* keyword value is not a positive integer */
+#define NO_END 210 /* couldn't find END keyword */
+#define BAD_BITPIX 211 /* illegal BITPIX keyword value*/
+#define BAD_NAXIS 212 /* illegal NAXIS keyword value */
+#define BAD_NAXES 213 /* illegal NAXISn keyword value */
+#define BAD_PCOUNT 214 /* illegal PCOUNT keyword value */
+#define BAD_GCOUNT 215 /* illegal GCOUNT keyword value */
+#define BAD_TFIELDS 216 /* illegal TFIELDS keyword value */
+#define NEG_WIDTH 217 /* negative table row size */
+#define NEG_ROWS 218 /* negative number of rows in table */
+#define COL_NOT_FOUND 219 /* column with this name not found in table */
+#define BAD_SIMPLE 220 /* illegal value of SIMPLE keyword */
+#define NO_SIMPLE 221 /* Primary array doesn't start with SIMPLE */
+#define NO_BITPIX 222 /* Second keyword not BITPIX */
+#define NO_NAXIS 223 /* Third keyword not NAXIS */
+#define NO_NAXES 224 /* Couldn't find all the NAXISn keywords */
+#define NO_XTENSION 225 /* HDU doesn't start with XTENSION keyword */
+#define NOT_ATABLE 226 /* the CHDU is not an ASCII table extension */
+#define NOT_BTABLE 227 /* the CHDU is not a binary table extension */
+#define NO_PCOUNT 228 /* couldn't find PCOUNT keyword */
+#define NO_GCOUNT 229 /* couldn't find GCOUNT keyword */
+#define NO_TFIELDS 230 /* couldn't find TFIELDS keyword */
+#define NO_TBCOL 231 /* couldn't find TBCOLn keyword */
+#define NO_TFORM 232 /* couldn't find TFORMn keyword */
+#define NOT_IMAGE 233 /* the CHDU is not an IMAGE extension */
+#define BAD_TBCOL 234 /* TBCOLn keyword value < 0 or > rowlength */
+#define NOT_TABLE 235 /* the CHDU is not a table */
+#define COL_TOO_WIDE 236 /* column is too wide to fit in table */
+#define COL_NOT_UNIQUE 237 /* more than 1 column name matches template */
+#define BAD_ROW_WIDTH 241 /* sum of column widths not = NAXIS1 */
+#define UNKNOWN_EXT 251 /* unrecognizable FITS extension type */
+#define UNKNOWN_REC 252 /* unrecognizable FITS record */
+#define END_JUNK 253 /* END keyword is not blank */
+#define BAD_HEADER_FILL 254 /* Header fill area not blank */
+#define BAD_DATA_FILL 255 /* Data fill area not blank or zero */
+#define BAD_TFORM 261 /* illegal TFORM format code */
+#define BAD_TFORM_DTYPE 262 /* unrecognizable TFORM datatype code */
+#define BAD_TDIM 263 /* illegal TDIMn keyword value */
+
+#define BAD_HDU_NUM 301 /* HDU number < 1 or > MAXHDU */
+#define BAD_COL_NUM 302 /* column number < 1 or > tfields */
+#define NEG_FILE_POS 304 /* tried to move before beginning of file */
+#define NEG_BYTES 306 /* tried to read or write negative bytes */
+#define BAD_ROW_NUM 307 /* illegal starting row number in table */
+#define BAD_ELEM_NUM 308 /* illegal starting element number in vector */
+#define NOT_ASCII_COL 309 /* this is not an ASCII string column */
+#define NOT_LOGICAL_COL 310 /* this is not a logical datatype column */
+#define BAD_ATABLE_FORMAT 311 /* ASCII table column has wrong format */
+#define BAD_BTABLE_FORMAT 312 /* Binary table column has wrong format */
+#define NO_NULL 314 /* null value has not been defined */
+#define NOT_VARI_LEN 317 /* this is not a variable length column */
+#define BAD_DIMEN 320 /* illegal number of dimensions in array */
+#define BAD_PIX_NUM 321 /* first pixel number greater than last pixel */
+#define ZERO_SCALE 322 /* illegal BSCALE or TSCALn keyword = 0 */
+#define NEG_AXIS 323 /* illegal axis length < 1 */
+
+#define NOT_GROUP_TABLE 340
+#define HDU_ALREADY_MEMBER 341
+#define MEMBER_NOT_FOUND 342
+#define GROUP_NOT_FOUND 343
+#define BAD_GROUP_ID 344
+#define TOO_MANY_HDUS_TRACKED 345
+#define HDU_ALREADY_TRACKED 346
+#define BAD_OPTION 347
+#define IDENTICAL_POINTERS 348
+
+#define BAD_I2C 401 /* bad int to formatted string conversion */
+#define BAD_F2C 402 /* bad float to formatted string conversion */
+#define BAD_INTKEY 403 /* can't interprete keyword value as integer */
+#define BAD_LOGICALKEY 404 /* can't interprete keyword value as logical */
+#define BAD_FLOATKEY 405 /* can't interprete keyword value as float */
+#define BAD_DOUBLEKEY 406 /* can't interprete keyword value as double */
+#define BAD_C2I 407 /* bad formatted string to int conversion */
+#define BAD_C2F 408 /* bad formatted string to float conversion */
+#define BAD_C2D 409 /* bad formatted string to double conversion */
+#define BAD_DATATYPE 410 /* bad keyword datatype code */
+#define BAD_DECIM 411 /* bad number of decimal places specified */
+#define NUM_OVERFLOW 412 /* overflow during datatype conversion */
+
+# define DATA_COMPRESSION_ERR 413 /* error in imcompress routines */
+# define DATA_DECOMPRESSION_ERR 414 /* error in imcompress routines */
+
+#define BAD_DATE 420 /* error in date or time conversion */
+
+#define PARSE_SYNTAX_ERR 431 /* syntax error in parser expression */
+#define PARSE_BAD_TYPE 432 /* expression did not evaluate to desired type */
+#define PARSE_LRG_VECTOR 433 /* vector result too large to return in array */
+#define PARSE_NO_OUTPUT 434 /* data parser failed not sent an out column */
+#define PARSE_BAD_COL 435 /* bad data encounter while parsing column */
+#define PARSE_BAD_OUTPUT 436 /* Output file not of proper type */
+
+#define ANGLE_TOO_BIG 501 /* celestial angle too large for projection */
+#define BAD_WCS_VAL 502 /* bad celestial coordinate or pixel value */
+#define WCS_ERROR 503 /* error in celestial coordinate calculation */
+#define BAD_WCS_PROJ 504 /* unsupported type of celestial projection */
+#define NO_WCS_KEY 505 /* celestial coordinate keywords not found */
+#define APPROX_WCS_KEY 506 /* approximate WCS keywords were calculated */
+
+/*------- following error codes are used in the grparser.c file -----------*/
+#define NGP_ERRBASE (360) /* base chosen so not to interfere with CFITSIO */
+#define NGP_OK (0)
+#define NGP_NO_MEMORY (NGP_ERRBASE + 0) /* malloc failed */
+#define NGP_READ_ERR (NGP_ERRBASE + 1) /* read error from file */
+#define NGP_NUL_PTR (NGP_ERRBASE + 2) /* null pointer passed as argument */
+#define NGP_EMPTY_CURLINE (NGP_ERRBASE + 3) /* line read seems to be empty */
+#define NGP_UNREAD_QUEUE_FULL (NGP_ERRBASE + 4) /* cannot unread more then 1 line (or single line twice) */
+#define NGP_INC_NESTING (NGP_ERRBASE + 5) /* too deep include file nesting (inf. loop ?) */
+#define NGP_ERR_FOPEN (NGP_ERRBASE + 6) /* fopen() failed, cannot open file */
+#define NGP_EOF (NGP_ERRBASE + 7) /* end of file encountered */
+#define NGP_BAD_ARG (NGP_ERRBASE + 8) /* bad arguments passed */
+#define NGP_TOKEN_NOT_EXPECT (NGP_ERRBASE + 9) /* token not expected here */
+
+/* The following exclusion if __CINT__ is defined is needed for ROOT */
+#ifndef __CINT__
+/* the following 3 lines are needed to support C++ compilers */
+#ifdef __cplusplus
+extern "C" {
+#endif
+#endif
+
+/*---------------- FITS file URL parsing routines -------------*/
+int fits_get_token(char **ptr, char *delimiter, char *token, int *isanumber);
+int ffiurl(char *url, char *urltype, char *infile,
+ char *outfile, char *extspec, char *rowfilter,
+ char *binspec, char *colspec, int *status);
+int ffrtnm(char *url, char *rootname, int *status);
+int ffourl(char *url, char *urltype, char *outfile, char *tmplfile,
+ int *status);
+int ffexts(char *extspec, int *extnum, char *extname, int *extvers,
+ int *hdutype, char *colname, char *rowexpress, int *status);
+int ffextn(char *url, int *extension_num, int *status);
+int ffurlt(fitsfile *fptr, char *urlType, int *status);
+int ffbins(char *binspec, int *imagetype, int *haxis,
+ char colname[4][FLEN_VALUE], double *minin,
+ double *maxin, double *binsizein,
+ char minname[4][FLEN_VALUE], char maxname[4][FLEN_VALUE],
+ char binname[4][FLEN_VALUE], double *weight, char *wtname,
+ int *recip, int *status);
+int ffbinr(char **binspec, char *colname, double *minin,
+ double *maxin, double *binsizein, char *minname,
+ char *maxname, char *binname, int *status);
+int ffimport_file( char *filename, char **contents, int *status );
+
+/*---------------- FITS file I/O routines -------------*/
+int ffomem(fitsfile **fptr, const char *name, int mode, void **buffptr,
+ size_t *buffsize, size_t deltasize,
+ void *(*mem_realloc)(void *p, size_t newsize),
+ int *status);
+int ffopen(fitsfile **fptr, const char *filename, int iomode, int *status);
+int ffreopen(fitsfile *openfptr, fitsfile **newfptr, int *status);
+int ffinit(fitsfile **fptr, const char *filename, int *status);
+int fftplt(fitsfile **fptr, const char *filename, const char *tempname,
+ int *status);
+int ffflus(fitsfile *fptr, int *status);
+int ffclos(fitsfile *fptr, int *status);
+int ffdelt(fitsfile *fptr, int *status);
+int ffflnm(fitsfile *fptr, char *filename, int *status);
+int ffflmd(fitsfile *fptr, int *filemode, int *status);
+
+/*---------------- utility routines -------------*/
+float ffvers(float *version);
+void ffupch(char *string);
+void ffgerr(int status, char *errtext);
+void ffpmsg(const char *err_message);
+int ffgmsg(char *err_message);
+void ffcmsg(void);
+void ffrprt(FILE *stream, int status);
+void ffcmps(char *templt, char *colname, int casesen, int *match,
+ int *exact);
+int fftkey(char *keyword, int *status);
+int fftrec(char *card, int *status);
+int ffnchk(fitsfile *fptr, int *status);
+int ffkeyn(char *keyroot, int value, char *keyname, int *status);
+int ffnkey(int value, char *keyroot, char *keyname, int *status);
+int ffgkcl(char *card);
+int ffdtyp(char *cval, char *dtype, int *status);
+int ffpsvc(char *card, char *value, char *comm, int *status);
+int ffgknm(char *card, char *name, int *length, int *status);
+int ffgthd(char *tmplt, char *card, int *hdtype, int *status);
+int ffasfm(char *tform, int *datacode, long *width, int *decim, int *status);
+int ffbnfm(char *tform, int *datacode, long *repeat, long *width, int *status);
+int ffgabc(int tfields, char **tform, int space, long *rowlen, long *tbcol,
+ int *status);
+
+/*----------------- write single keywords --------------*/
+int ffpky(fitsfile *fptr, int datatype, char *keyname, void *value,
+ char *comm, int *status);
+int ffprec(fitsfile *fptr, const char *card, int *status);
+int ffpcom(fitsfile *fptr, const char *comm, int *status);
+int ffpunt(fitsfile *fptr, char *keyname, char *unit, int *status);
+int ffphis(fitsfile *fptr, const char *history, int *status);
+int ffpdat(fitsfile *fptr, int *status);
+int ffgstm(char *timestr, int *timeref, int *status);
+int ffgsdt(int *day, int *month, int *year, int *status);
+int ffdt2s(int year, int month, int day, char *datestr, int *status);
+int fftm2s(int year, int month, int day, int hour, int minute, double second,
+ int decimals, char *datestr, int *status);
+int ffs2dt(char *datestr, int *year, int *month, int *day, int *status);
+int ffs2tm(char *datestr, int *year, int *month, int *day, int *hour,
+ int *minute, double *second, int *status);
+int ffpkyu(fitsfile *fptr, char *keyname, char *comm, int *status);
+int ffpkys(fitsfile *fptr, char *keyname, char *value, char *comm,int *status);
+int ffpkls(fitsfile *fptr, char *keyname, char *value, char *comm,int *status);
+int ffplsw(fitsfile *fptr, int *status);
+int ffpkyl(fitsfile *fptr, char *keyname, int value, char *comm, int *status);
+int ffpkyj(fitsfile *fptr, char *keyname, long value, char *comm, int *status);
+int ffpkyf(fitsfile *fptr, char *keyname, float value, int decim, char *comm,
+ int *status);
+int ffpkye(fitsfile *fptr, char *keyname, float value, int decim, char *comm,
+ int *status);
+int ffpkyg(fitsfile *fptr, char *keyname, double value, int decim, char *comm,
+ int *status);
+int ffpkyd(fitsfile *fptr, char *keyname, double value, int decim, char *comm,
+ int *status);
+int ffpkyc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm,
+ int *status);
+int ffpkym(fitsfile *fptr, char *keyname, double *value, int decim, char *comm,
+ int *status);
+int ffpkfc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm,
+ int *status);
+int ffpkfm(fitsfile *fptr, char *keyname, double *value, int decim, char *comm,
+ int *status);
+int ffpkyt(fitsfile *fptr, char *keyname, long intval, double frac, char *comm,
+ int *status);
+int ffptdm( fitsfile *fptr, int colnum, int naxis, long naxes[], int *status);
+
+/*----------------- write array of keywords --------------*/
+int ffpkns(fitsfile *fptr, char *keyroot, int nstart, int nkey, char *value[],
+ char *comm[], int *status);
+int ffpknl(fitsfile *fptr, char *keyroot, int nstart, int nkey, int *value,
+ char *comm[], int *status);
+int ffpknj(fitsfile *fptr, char *keyroot, int nstart, int nkey, long *value,
+ char *comm[], int *status);
+int ffpknf(fitsfile *fptr, char *keyroot, int nstart, int nkey, float *value,
+ int decim, char *comm[], int *status);
+int ffpkne(fitsfile *fptr, char *keyroot, int nstart, int nkey, float *value,
+ int decim, char *comm[], int *status);
+int ffpkng(fitsfile *fptr, char *keyroot, int nstart, int nkey, double *value,
+ int decim, char *comm[], int *status);
+int ffpknd(fitsfile *fptr, char *keyroot, int nstart, int nkey, double *value,
+ int decim, char *comm[], int *status);
+int ffcpky(fitsfile *infptr,fitsfile *outfptr,int incol,int outcol,
+ char *rootname, int *status);
+
+/*----------------- write required header keywords --------------*/
+int ffphps( fitsfile *fptr, int bitpix, int naxis, long naxes[], int *status);
+int ffphpr( fitsfile *fptr, int simple, int bitpix, int naxis, long naxes[],
+ long pcount, long gcount, int extend, int *status);
+int ffphtb(fitsfile *fptr, long naxis1, long naxis2, int tfields, char **ttype,
+ long *tbcol, char **tform, char **tunit, char *extname, int *status);
+int ffphbn(fitsfile *fptr, long naxis2, int tfields, char **ttype,
+ char **tform, char **tunit, char *extname, long pcount, int *status);
+
+/*----------------- write template keywords --------------*/
+int ffpktp(fitsfile *fptr, const char *filename, int *status);
+
+/*------------------ get header information --------------*/
+int ffghsp(fitsfile *fptr, int *nexist, int *nmore, int *status);
+int ffghps(fitsfile *fptr, int *nexist, int *position, int *status);
+
+/*------------------ move position in header -------------*/
+int ffmaky(fitsfile *fptr, int nrec, int *status);
+int ffmrky(fitsfile *fptr, int nrec, int *status);
+
+/*------------------ read single keywords -----------------*/
+int ffgnxk(fitsfile *fptr, char **inclist, int ninc, char **exclist,
+ int nexc, char *card, int *status);
+int ffgrec(fitsfile *fptr, int nrec, char *card, int *status);
+int ffgcrd(fitsfile *fptr, char *keyname, char *card, int *status);
+int ffgunt(fitsfile *fptr, char *keyname, char *unit, int *status);
+int ffgkyn(fitsfile *fptr, int nkey, char *keyname, char *keyval, char *comm,
+ int *status);
+int ffgkey(fitsfile *fptr, char *keyname, char *keyval, char *comm,
+ int *status);
+
+int ffgky( fitsfile *fptr, int datatype, char *keyname, void *value,
+ char *comm, int *status);
+int ffgkys(fitsfile *fptr, char *keyname, char *value, char *comm, int *status);
+int ffgkls(fitsfile *fptr, char *keyname, char **value, char *comm, int *status)
+;
+int ffgkyl(fitsfile *fptr, char *keyname, int *value, char *comm, int *status);
+int ffgkyj(fitsfile *fptr, char *keyname, long *value, char *comm, int *status);
+int ffgkye(fitsfile *fptr, char *keyname, float *value, char *comm,int *status);
+int ffgkyd(fitsfile *fptr, char *keyname, double *value,char *comm,int *status);
+int ffgkyc(fitsfile *fptr, char *keyname, float *value, char *comm,int *status);
+int ffgkym(fitsfile *fptr, char *keyname, double *value,char *comm,int *status);
+int ffgkyt(fitsfile *fptr, char *keyname, long *ivalue, double *dvalue,
+ char *comm, int *status);
+int ffgtdm(fitsfile *fptr, int colnum, int maxdim, int *naxis, long naxes[],
+ int *status);
+int ffdtdm(fitsfile *fptr, char *tdimstr, int colnum, int maxdim,
+ int *naxis, long naxes[], int *status);
+
+/*------------------ read array of keywords -----------------*/
+int ffgkns(fitsfile *fptr, char *keyname, int nstart, int nmax, char *value[],
+ int *nfound, int *status);
+int ffgknl(fitsfile *fptr, char *keyname, int nstart, int nmax, int *value,
+ int *nfound, int *status);
+int ffgknj(fitsfile *fptr, char *keyname, int nstart, int nmax, long *value,
+ int *nfound, int *status);
+int ffgkne(fitsfile *fptr, char *keyname, int nstart, int nmax, float *value,
+ int *nfound, int *status);
+int ffgknd(fitsfile *fptr, char *keyname, int nstart, int nmax, double *value,
+ int *nfound, int *status);
+int ffh2st(fitsfile *fptr, char **header, int *status);
+
+/*----------------- read required header keywords --------------*/
+int ffghpr(fitsfile *fptr, int maxdim, int *simple, int *bitpix, int *naxis,
+ long naxes[], long *pcount, long *gcount, int *extend, int *status);
+
+int ffghtb(fitsfile *fptr,int maxfield, long *naxis1, long *naxis2,
+ int *tfields, char **ttype, long *tbcol, char **tform, char **tunit,
+ char *extname, int *status);
+
+int ffghbn(fitsfile *fptr, int maxfield, long *naxis2, int *tfields,
+ char **ttype, char **tform, char **tunit, char *extname,
+ long *pcount, int *status);
+
+/*--------------------- update keywords ---------------*/
+int ffuky(fitsfile *fptr, int datatype, char *keyname, void *value,
+ char *comm, int *status);
+int ffucrd(fitsfile *fptr, char *keyname, char *card, int *status);
+int ffukyu(fitsfile *fptr, char *keyname, char *comm, int *status);
+int ffukys(fitsfile *fptr, char *keyname, char *value, char *comm, int *status);
+int ffukls(fitsfile *fptr, char *keyname, char *value, char *comm, int *status);
+int ffukyl(fitsfile *fptr, char *keyname, int value, char *comm, int *status);
+int ffukyj(fitsfile *fptr, char *keyname, long value, char *comm, int *status);
+int ffukyf(fitsfile *fptr, char *keyname, float value, int decim, char *comm,
+ int *status);
+int ffukye(fitsfile *fptr, char *keyname, float value, int decim, char *comm,
+ int *status);
+int ffukyg(fitsfile *fptr, char *keyname, double value, int decim, char *comm,
+ int *status);
+int ffukyd(fitsfile *fptr, char *keyname, double value, int decim, char *comm,
+ int *status);
+int ffukyc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm,
+ int *status);
+int ffukym(fitsfile *fptr, char *keyname, double *value, int decim, char *comm,
+ int *status);
+int ffukfc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm,
+ int *status);
+int ffukfm(fitsfile *fptr, char *keyname, double *value, int decim, char *comm,
+ int *status);
+
+/*--------------------- modify keywords ---------------*/
+int ffmrec(fitsfile *fptr, int nkey, char *card, int *status);
+int ffmcrd(fitsfile *fptr, char *keyname, char *card, int *status);
+int ffmnam(fitsfile *fptr, char *oldname, char *newname, int *status);
+int ffmcom(fitsfile *fptr, char *keyname, char *comm, int *status);
+int ffmkyu(fitsfile *fptr, char *keyname, char *comm, int *status);
+int ffmkys(fitsfile *fptr, char *keyname, char *value, char *comm,int *status);
+int ffmkls(fitsfile *fptr, char *keyname, char *value, char *comm,int *status);
+int ffmkyl(fitsfile *fptr, char *keyname, int value, char *comm, int *status);
+int ffmkyj(fitsfile *fptr, char *keyname, long value, char *comm, int *status);
+int ffmkyf(fitsfile *fptr, char *keyname, float value, int decim, char *comm,
+ int *status);
+int ffmkye(fitsfile *fptr, char *keyname, float value, int decim, char *comm,
+ int *status);
+int ffmkyg(fitsfile *fptr, char *keyname, double value, int decim, char *comm,
+ int *status);
+int ffmkyd(fitsfile *fptr, char *keyname, double value, int decim, char *comm,
+ int *status);
+int ffmkyc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm,
+ int *status);
+int ffmkym(fitsfile *fptr, char *keyname, double *value, int decim, char *comm,
+ int *status);
+int ffmkfc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm,
+ int *status);
+int ffmkfm(fitsfile *fptr, char *keyname, double *value, int decim, char *comm,
+ int *status);
+
+/*--------------------- insert keywords ---------------*/
+int ffirec(fitsfile *fptr, int nkey, char *card, int *status);
+int ffikyu(fitsfile *fptr, char *keyname, char *comm, int *status);
+int ffikys(fitsfile *fptr, char *keyname, char *value, char *comm,int *status);
+int ffikls(fitsfile *fptr, char *keyname, char *value, char *comm,int *status);
+int ffikyl(fitsfile *fptr, char *keyname, int value, char *comm, int *status);
+int ffikyj(fitsfile *fptr, char *keyname, long value, char *comm, int *status);
+int ffikyf(fitsfile *fptr, char *keyname, float value, int decim, char *comm,
+ int *status);
+int ffikye(fitsfile *fptr, char *keyname, float value, int decim, char *comm,
+ int *status);
+int ffikyg(fitsfile *fptr, char *keyname, double value, int decim, char *comm,
+ int *status);
+int ffikyd(fitsfile *fptr, char *keyname, double value, int decim, char *comm,
+ int *status);
+int ffikyc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm,
+ int *status);
+int ffikym(fitsfile *fptr, char *keyname, double *value, int decim, char *comm,
+ int *status);
+int ffikfc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm,
+ int *status);
+int ffikfm(fitsfile *fptr, char *keyname, double *value, int decim, char *comm,
+ int *status);
+
+/*--------------------- delete keywords ---------------*/
+int ffdkey(fitsfile *fptr, char *keyname, int *status);
+int ffdrec(fitsfile *fptr, int keypos, int *status);
+
+/*--------------------- get HDU information -------------*/
+int ffghdn(fitsfile *fptr, int *chdunum);
+int ffghdt(fitsfile *fptr, int *exttype, int *status);
+int ffghad(fitsfile *fptr, long *headstart, long *datastart, long *dataend,
+ int *status);
+int ffgipr(fitsfile *fptr, int maxaxis, int *imgtype, int *naxis,
+ long *naxes, int *status);
+int ffgidt(fitsfile *fptr, int *imgtype, int *status);
+int ffgidm(fitsfile *fptr, int *naxis, int *status);
+int ffgisz(fitsfile *fptr, int nlen, long *naxes, int *status);
+
+/*--------------------- HDU operations -------------*/
+int ffmahd(fitsfile *fptr, int hdunum, int *exttype, int *status);
+int ffmrhd(fitsfile *fptr, int hdumov, int *exttype, int *status);
+int ffmnhd(fitsfile *fptr, int exttype, char *hduname, int hduvers,
+ int *status);
+int ffthdu(fitsfile *fptr, int *nhdu, int *status);
+int ffcrhd(fitsfile *fptr, int *status);
+int ffcrim(fitsfile *fptr, int bitpix, int naxis, long *naxes, int *status);
+int ffcrtb(fitsfile *fptr, int tbltype, long naxis2, int tfields, char **ttype,
+ char **tform, char **tunit, char *extname, int *status);
+int ffiimg(fitsfile *fptr, int bitpix, int naxis, long *naxes, int *status);
+int ffitab(fitsfile *fptr, long naxis1, long naxis2, int tfields, char **ttype,
+ long *tbcol, char **tform, char **tunit, char *extname, int *status);
+int ffibin(fitsfile *fptr,long naxis2, int tfields, char **ttype, char **tform,
+ char **tunit, char *extname, long pcount, int *status);
+int ffrsim(fitsfile *fptr, int bitpix, int naxis, long *naxes, int *status);
+int ffdhdu(fitsfile *fptr, int *hdutype, int *status);
+int ffcopy(fitsfile *infptr, fitsfile *outfptr, int morekeys, int *status);
+int ffcphd(fitsfile *infptr, fitsfile *outfptr, int *status);
+int ffcpdt(fitsfile *infptr, fitsfile *outfptr, int *status);
+int ffchfl(fitsfile *fptr, int *status);
+int ffcdfl(fitsfile *fptr, int *status);
+
+int ffrdef(fitsfile *fptr, int *status);
+int ffhdef(fitsfile *fptr, int morekeys, int *status);
+int ffpthp(fitsfile *fptr, long theap, int *status);
+
+int ffcsum(fitsfile *fptr, long nrec, unsigned long *sum, int *status);
+void ffesum(unsigned long sum, int complm, char *ascii);
+unsigned long ffdsum(char *ascii, int complm, unsigned long *sum);
+int ffpcks(fitsfile *fptr, int *status);
+int ffupck(fitsfile *fptr, int *status);
+int ffvcks(fitsfile *fptr, int *datastatus, int *hdustatus, int *status);
+int ffgcks(fitsfile *fptr, unsigned long *datasum, unsigned long *hdusum,
+ int *status);
+
+/*--------------------- define scaling or null values -------------*/
+int ffpscl(fitsfile *fptr, double scale, double zero, int *status);
+int ffpnul(fitsfile *fptr, long nulvalue, int *status);
+int fftscl(fitsfile *fptr, int colnum, double scale, double zero, int *status);
+int fftnul(fitsfile *fptr, int colnum, long nulvalue, int *status);
+int ffsnul(fitsfile *fptr, int colnum, char *nulstring, int *status);
+
+/*--------------------- get column information -------------*/
+int ffgcno(fitsfile *fptr, int casesen, char *templt, int *colnum,
+ int *status);
+int ffgcnn(fitsfile *fptr, int casesen, char *templt, char *colname,
+ int *colnum, int *status);
+
+int ffgtcl(fitsfile *fptr, int colnum, int *typecode, long *repeat,
+ long *width, int *status);
+int ffgncl(fitsfile *fptr, int *ncols, int *status);
+int ffgnrw(fitsfile *fptr, long *nrows, int *status);
+int ffgacl(fitsfile *fptr, int colnum, char *ttype, long *tbcol,
+ char *tunit, char *tform, double *tscal, double *tzero,
+ char *tnull, char *tdisp, int *status);
+int ffgbcl(fitsfile *fptr, int colnum, char *ttype, char *tunit,
+ char *dtype, long *repeat, double *tscal, double *tzero,
+ long *tnull, char *tdisp, int *status);
+int ffgrsz(fitsfile *fptr, long *nrows, int *status);
+int ffgcdw(fitsfile *fptr, int colnum, int *width, int *status);
+
+/*--------------------- read primary array or image elements -------------*/
+int ffgpv(fitsfile *fptr, int datatype, long firstelem, long nelem,
+ void *nulval, void *array, int *anynul, int *status);
+int ffgpf(fitsfile *fptr, int datatype, long firstelem, long nelem,
+ void *array, char *nullarray, int *anynul, int *status);
+int ffgpvb(fitsfile *fptr, long group, long firstelem, long nelem, unsigned
+ char nulval, unsigned char *array, int *anynul, int *status);
+int ffgpvui(fitsfile *fptr, long group, long firstelem, long nelem,
+ unsigned short nulval, unsigned short *array, int *anynul,
+ int *status);
+int ffgpvi(fitsfile *fptr, long group, long firstelem, long nelem,
+ short nulval, short *array, int *anynul, int *status);
+int ffgpvuj(fitsfile *fptr, long group, long firstelem, long nelem,
+ unsigned long nulval, unsigned long *array, int *anynul,
+ int *status);
+int ffgpvj(fitsfile *fptr, long group, long firstelem, long nelem,
+ long nulval, long *array, int *anynul, int *status);
+int ffgpvuk(fitsfile *fptr, long group, long firstelem, long nelem,
+ unsigned int nulval, unsigned int *array, int *anynul, int *status);
+int ffgpvk(fitsfile *fptr, long group, long firstelem, long nelem,
+ int nulval, int *array, int *anynul, int *status);
+int ffgpve(fitsfile *fptr, long group, long firstelem, long nelem,
+ float nulval, float *array, int *anynul, int *status);
+int ffgpvd(fitsfile *fptr, long group, long firstelem, long nelem,
+ double nulval, double *array, int *anynul, int *status);
+
+int ffgpfb(fitsfile *fptr, long group, long firstelem, long nelem,
+ unsigned char *array, char *nularray, int *anynul, int *status);
+int ffgpfui(fitsfile *fptr, long group, long firstelem, long nelem,
+ unsigned short *array, char *nularray, int *anynul, int *status);
+int ffgpfi(fitsfile *fptr, long group, long firstelem, long nelem,
+ short *array, char *nularray, int *anynul, int *status);
+int ffgpfuj(fitsfile *fptr, long group, long firstelem, long nelem,
+ unsigned long *array, char *nularray, int *anynul, int *status);
+int ffgpfj(fitsfile *fptr, long group, long firstelem, long nelem,
+ long *array, char *nularray, int *anynul, int *status);
+int ffgpfuk(fitsfile *fptr, long group, long firstelem, long nelem,
+ unsigned int *array, char *nularray, int *anynul, int *status);
+int ffgpfk(fitsfile *fptr, long group, long firstelem, long nelem,
+ int *array, char *nularray, int *anynul, int *status);
+int ffgpfe(fitsfile *fptr, long group, long firstelem, long nelem,
+ float *array, char *nularray, int *anynul, int *status);
+int ffgpfd(fitsfile *fptr, long group, long firstelem, long nelem,
+ double *array, char *nularray, int *anynul, int *status);
+
+int ffg2db(fitsfile *fptr, long group, unsigned char nulval, long ncols,
+ long naxis1, long naxis2, unsigned char *array,
+ int *anynul, int *status);
+int ffg2dui(fitsfile *fptr, long group, unsigned short nulval, long ncols,
+ long naxis1, long naxis2, unsigned short *array,
+ int *anynul, int *status);
+int ffg2di(fitsfile *fptr, long group, short nulval, long ncols,
+ long naxis1, long naxis2, short *array,
+ int *anynul, int *status);
+int ffg2duj(fitsfile *fptr, long group, unsigned long nulval, long ncols,
+ long naxis1, long naxis2, unsigned long *array,
+ int *anynul, int *status);
+int ffg2dj(fitsfile *fptr, long group, long nulval, long ncols,
+ long naxis1, long naxis2, long *array,
+ int *anynul, int *status);
+int ffg2duk(fitsfile *fptr, long group, unsigned int nulval, long ncols,
+ long naxis1, long naxis2, unsigned int *array,
+ int *anynul, int *status);
+int ffg2dk(fitsfile *fptr, long group, int nulval, long ncols,
+ long naxis1, long naxis2, int *array,
+ int *anynul, int *status);
+int ffg2de(fitsfile *fptr, long group, float nulval, long ncols,
+ long naxis1, long naxis2, float *array,
+ int *anynul, int *status);
+int ffg2dd(fitsfile *fptr, long group, double nulval, long ncols,
+ long naxis1, long naxis2, double *array,
+ int *anynul, int *status);
+
+int ffg3db(fitsfile *fptr, long group, unsigned char nulval, long ncols,
+ long nrows, long naxis1, long naxis2, long naxis3,
+ unsigned char *array, int *anynul, int *status);
+int ffg3dui(fitsfile *fptr, long group, unsigned short nulval, long ncols,
+ long nrows, long naxis1, long naxis2, long naxis3,
+ unsigned short *array, int *anynul, int *status);
+int ffg3di(fitsfile *fptr, long group, short nulval, long ncols,
+ long nrows, long naxis1, long naxis2, long naxis3,
+ short *array, int *anynul, int *status);
+int ffg3duj(fitsfile *fptr, long group, unsigned long nulval, long ncols,
+ long nrows, long naxis1, long naxis2, long naxis3,
+ unsigned long *array, int *anynul, int *status);
+int ffg3dj(fitsfile *fptr, long group, long nulval, long ncols,
+ long nrows, long naxis1, long naxis2, long naxis3,
+ long *array, int *anynul, int *status);
+int ffg3duk(fitsfile *fptr, long group, unsigned int nulval, long ncols,
+ long nrows, long naxis1, long naxis2, long naxis3,
+ unsigned int *array, int *anynul, int *status);
+int ffg3dk(fitsfile *fptr, long group, int nulval, long ncols,
+ long nrows, long naxis1, long naxis2, long naxis3,
+ int *array, int *anynul, int *status);
+int ffg3de(fitsfile *fptr, long group, float nulval, long ncols,
+ long nrows, long naxis1, long naxis2, long naxis3,
+ float *array, int *anynul, int *status);
+int ffg3dd(fitsfile *fptr, long group, double nulval, long ncols,
+ long nrows, long naxis1, long naxis2, long naxis3,
+ double *array, int *anynul, int *status);
+
+int ffgsvb(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
+ long *trc, long *inc, unsigned char nulval, unsigned char *array,
+ int *anynul, int *status);
+int ffgsvui(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
+ long *trc, long *inc, unsigned short nulval, unsigned short *array,
+ int *anynul, int *status);
+int ffgsvi(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
+ long *trc, long *inc, short nulval, short *array, int *anynul, int *status);
+int ffgsvuj(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
+ long *trc, long *inc, unsigned long nulval, unsigned long *array,
+ int *anynul, int *status);
+int ffgsvj(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
+ long *trc, long *inc, long nulval, long *array, int *anynul, int *status);
+int ffgsvuk(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
+ long *trc, long *inc, unsigned int nulval, unsigned int *array,
+ int *anynul, int *status);
+int ffgsvk(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
+ long *trc, long *inc, int nulval, int *array, int *anynul, int *status);
+int ffgsve(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
+ long *trc, long *inc, float nulval, float *array, int *anynul, int *status);
+int ffgsvd(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
+ long *trc, long *inc, double nulval, double *array, int *anynul,
+ int *status);
+
+int ffgsfb(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
+ long *trc, long *inc, unsigned char *array, char *flagval,
+ int *anynul, int *status);
+int ffgsfui(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
+ long *trc, long *inc, unsigned short *array, char *flagval, int *anynul,
+ int *status);
+int ffgsfi(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
+ long *trc, long *inc, short *array, char *flagval, int *anynul, int *status);
+int ffgsfuj(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
+ long *trc, long *inc, unsigned long *array, char *flagval, int *anynul,
+ int *status);
+int ffgsfj(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
+ long *trc, long *inc, long *array, char *flagval, int *anynul, int *status);
+int ffgsfuk(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
+ long *trc, long *inc, unsigned int *array, char *flagval, int *anynul,
+ int *status);
+int ffgsfk(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
+ long *trc, long *inc, int *array, char *flagval, int *anynul, int *status);
+int ffgsfe(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
+ long *trc, long *inc, float *array, char *flagval, int *anynul, int *status);
+int ffgsfd(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
+ long *trc, long *inc, double *array, char *flagval, int *anynul,
+ int *status);
+
+int ffggpb(fitsfile *fptr, long group, long firstelem, long nelem,
+ unsigned char *array, int *status);
+int ffggpui(fitsfile *fptr, long group, long firstelem, long nelem,
+ unsigned short *array, int *status);
+int ffggpi(fitsfile *fptr, long group, long firstelem, long nelem,
+ short *array, int *status);
+int ffggpuj(fitsfile *fptr, long group, long firstelem, long nelem,
+ unsigned long *array, int *status);
+int ffggpj(fitsfile *fptr, long group, long firstelem, long nelem,
+ long *array, int *status);
+int ffggpuk(fitsfile *fptr, long group, long firstelem, long nelem,
+ unsigned int *array, int *status);
+int ffggpk(fitsfile *fptr, long group, long firstelem, long nelem,
+ int *array, int *status);
+int ffggpe(fitsfile *fptr, long group, long firstelem, long nelem,
+ float *array, int *status);
+int ffggpd(fitsfile *fptr, long group, long firstelem, long nelem,
+ double *array, int *status);
+
+/*--------------------- read column elements -------------*/
+int ffgcv( fitsfile *fptr, int datatype, int colnum, long firstrow,
+ long firstelem, long nelem, void *nulval, void *array, int *anynul,
+ int *status);
+int ffgcf( fitsfile *fptr, int datatype, int colnum, long firstrow,
+ long firstelem, long nelem, void *array, char *nullarray,
+ int *anynul, int *status);
+int ffgcvs(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, char *nulval, char **array, int *anynul, int *status);
+int ffgcl (fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, char *array, int *status);
+int ffgcvl (fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, char nulval, char *array, int *anynul, int *status);
+int ffgcvb(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, unsigned char nulval, unsigned char *array,
+ int *anynul, int *status);
+int ffgcvui(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, unsigned short nulval, unsigned short *array,
+ int *anynul, int *status);
+int ffgcvi(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, short nulval, short *array, int *anynul, int *status);
+int ffgcvuj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, unsigned long nulval, unsigned long *array, int *anynul,
+ int *status);
+int ffgcvj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, long nulval, long *array, int *anynul, int *status);
+int ffgcvuk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, unsigned int nulval, unsigned int *array, int *anynul,
+ int *status);
+int ffgcvk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, int nulval, int *array, int *anynul, int *status);
+int ffgcve(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, float nulval, float *array, int *anynul, int *status);
+int ffgcvd(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, double nulval, double *array, int *anynul, int *status);
+int ffgcvc(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, float nulval, float *array, int *anynul, int *status);
+int ffgcvm(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, double nulval, double *array, int *anynul, int *status);
+int ffgcx(fitsfile *fptr, int colnum, long firstrow, long firstbit,
+ long nbits, char *larray, int *status);
+int ffgcxui(fitsfile *fptr, int colnum, long firstrow, long nrows,
+ long firstbit, int nbits, unsigned short *array, int *status);
+int ffgcxuk(fitsfile *fptr, int colnum, long firstrow, long nrows,
+ long firstbit, int nbits, unsigned int *array, int *status);
+
+int ffgcfs(fitsfile *fptr, int colnum, long firstrow, long firstelem, long
+ nelem, char **array, char *nularray, int *anynul, int *status);
+int ffgcfl(fitsfile *fptr, int colnum, long firstrow, long firstelem, long
+ nelem, char *array, char *nularray, int *anynul, int *status);
+int ffgcfb(fitsfile *fptr, int colnum, long firstrow, long firstelem, long
+ nelem, unsigned char *array, char *nularray, int *anynul, int *status);
+int ffgcfui(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, unsigned short *array, char *nularray, int *anynul,
+ int *status);
+int ffgcfi(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, short *array, char *nularray, int *anynul, int *status);
+int ffgcfuj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, unsigned long *array, char *nularray, int *anynul,
+ int *status);
+int ffgcfj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, long *array, char *nularray, int *anynul, int *status);
+int ffgcfuk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, unsigned int *array, char *nularray, int *anynul,
+ int *status);
+int ffgcfk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, int *array, char *nularray, int *anynul, int *status);
+int ffgcfe(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, float *array, char *nularray, int *anynul, int *status);
+int ffgcfd(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, double *array, char *nularray, int *anynul, int *status);
+int ffgcfc(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, float *array, char *nularray, int *anynul, int *status);
+int ffgcfm(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, double *array, char *nularray, int *anynul, int *status);
+
+int ffgdes(fitsfile *fptr, int colnum, long rownum, long *length,
+ long *heapaddr, int *status);
+
+int ffgdess(fitsfile *fptr, int colnum, long firstrow, long nrows, long *length,
+ long *heapaddr, int *status);
+
+int ffgtbb(fitsfile *fptr, long firstrow, long firstchar, long nchars,
+ unsigned char *values, int *status);
+
+/*------------ write primary array or image elements -------------*/
+int ffppr(fitsfile *fptr, int datatype, long firstelem, long nelem,
+ void *array, int *status);
+int ffpprb(fitsfile *fptr, long group, long firstelem,
+ long nelem, unsigned char *array, int *status);
+int ffpprui(fitsfile *fptr, long group, long firstelem,
+ long nelem, unsigned short *array, int *status);
+int ffppri(fitsfile *fptr, long group, long firstelem,
+ long nelem, short *array, int *status);
+int ffppruj(fitsfile *fptr, long group, long firstelem,
+ long nelem, unsigned long *array, int *status);
+int ffpprj(fitsfile *fptr, long group, long firstelem,
+ long nelem, long *array, int *status);
+int ffppruk(fitsfile *fptr, long group, long firstelem,
+ long nelem, unsigned int *array, int *status);
+int ffpprk(fitsfile *fptr, long group, long firstelem,
+ long nelem, int *array, int *status);
+int ffppre(fitsfile *fptr, long group, long firstelem,
+ long nelem, float *array, int *status);
+int ffpprd(fitsfile *fptr, long group, long firstelem,
+ long nelem, double *array, int *status);
+
+int ffppru(fitsfile *fptr, long group, long firstelem, long nelem,
+ int *status);
+int ffpprn(fitsfile *fptr, long firstelem, long nelem, int *status);
+
+int ffppn(fitsfile *fptr, int datatype, long firstelem, long nelem,
+ void *array, void *nulval, int *status);
+int ffppnb(fitsfile *fptr, long group, long firstelem, long nelem,
+ unsigned char *array, unsigned char nulval, int *status);
+int ffppnui(fitsfile *fptr, long group, long firstelem,
+ long nelem, unsigned short *array, unsigned short nulval,
+ int *status);
+int ffppni(fitsfile *fptr, long group, long firstelem,
+ long nelem, short *array, short nulval, int *status);
+int ffppnj(fitsfile *fptr, long group, long firstelem,
+ long nelem, long *array, long nulval, int *status);
+int ffppnuj(fitsfile *fptr, long group, long firstelem, long nelem,
+ unsigned long *array, unsigned long nulval, int *status);
+int ffppnuk(fitsfile *fptr, long group, long firstelem, long nelem,
+ unsigned int *array, unsigned int nulval, int *status);
+int ffppnk(fitsfile *fptr, long group, long firstelem,
+ long nelem, int *array, int nulval, int *status);
+int ffppne(fitsfile *fptr, long group, long firstelem,
+ long nelem, float *array, float nulval, int *status);
+int ffppnd(fitsfile *fptr, long group, long firstelem,
+ long nelem, double *array, double nulval, int *status);
+
+int ffp2db(fitsfile *fptr, long group, long ncols, long naxis1,
+ long naxis2, unsigned char *array, int *status);
+int ffp2dui(fitsfile *fptr, long group, long ncols, long naxis1,
+ long naxis2, unsigned short *array, int *status);
+int ffp2di(fitsfile *fptr, long group, long ncols, long naxis1,
+ long naxis2, short *array, int *status);
+int ffp2duj(fitsfile *fptr, long group, long ncols, long naxis1,
+ long naxis2, unsigned long *array, int *status);
+int ffp2dj(fitsfile *fptr, long group, long ncols, long naxis1,
+ long naxis2, long *array, int *status);
+int ffp2duk(fitsfile *fptr, long group, long ncols, long naxis1,
+ long naxis2, unsigned int *array, int *status);
+int ffp2dk(fitsfile *fptr, long group, long ncols, long naxis1,
+ long naxis2, int *array, int *status);
+int ffp2de(fitsfile *fptr, long group, long ncols, long naxis1,
+ long naxis2, float *array, int *status);
+int ffp2dd(fitsfile *fptr, long group, long ncols, long naxis1,
+ long naxis2, double *array, int *status);
+
+int ffp3db(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
+ long naxis2, long naxis3, unsigned char *array, int *status);
+int ffp3dui(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
+ long naxis2, long naxis3, unsigned short *array, int *status);
+int ffp3di(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
+ long naxis2, long naxis3, short *array, int *status);
+int ffp3duj(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
+ long naxis2, long naxis3, unsigned long *array, int *status);
+int ffp3dj(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
+ long naxis2, long naxis3, long *array, int *status);
+int ffp3duk(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
+ long naxis2, long naxis3, unsigned int *array, int *status);
+int ffp3dk(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
+ long naxis2, long naxis3, int *array, int *status);
+int ffp3de(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
+ long naxis2, long naxis3, float *array, int *status);
+int ffp3dd(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
+ long naxis2, long naxis3, double *array, int *status);
+
+int ffpssb(fitsfile *fptr, long group, long naxis, long *naxes,
+ long *fpixel, long *lpixel, unsigned char *array, int *status);
+int ffpssui(fitsfile *fptr, long group, long naxis, long *naxes,
+ long *fpixel, long *lpixel, unsigned short *array, int *status);
+int ffpssi(fitsfile *fptr, long group, long naxis, long *naxes,
+ long *fpixel, long *lpixel, short *array, int *status);
+int ffpssuj(fitsfile *fptr, long group, long naxis, long *naxes,
+ long *fpixel, long *lpixel, unsigned long *array, int *status);
+int ffpssj(fitsfile *fptr, long group, long naxis, long *naxes,
+ long *fpixel, long *lpixel, long *array, int *status);
+int ffpssuk(fitsfile *fptr, long group, long naxis, long *naxes,
+ long *fpixel, long *lpixel, unsigned int *array, int *status);
+int ffpssk(fitsfile *fptr, long group, long naxis, long *naxes,
+ long *fpixel, long *lpixel, int *array, int *status);
+int ffpsse(fitsfile *fptr, long group, long naxis, long *naxes,
+ long *fpixel, long *lpixel, float *array, int *status);
+int ffpssd(fitsfile *fptr, long group, long naxis, long *naxes,
+ long *fpixel, long *lpixel, double *array, int *status);
+
+int ffpgpb(fitsfile *fptr, long group, long firstelem,
+ long nelem, unsigned char *array, int *status);
+int ffpgpui(fitsfile *fptr, long group, long firstelem,
+ long nelem, unsigned short *array, int *status);
+int ffpgpi(fitsfile *fptr, long group, long firstelem,
+ long nelem, short *array, int *status);
+int ffpgpuj(fitsfile *fptr, long group, long firstelem,
+ long nelem, unsigned long *array, int *status);
+int ffpgpj(fitsfile *fptr, long group, long firstelem,
+ long nelem, long *array, int *status);
+int ffpgpuk(fitsfile *fptr, long group, long firstelem,
+ long nelem, unsigned int *array, int *status);
+int ffpgpk(fitsfile *fptr, long group, long firstelem,
+ long nelem, int *array, int *status);
+int ffpgpe(fitsfile *fptr, long group, long firstelem,
+ long nelem, float *array, int *status);
+int ffpgpd(fitsfile *fptr, long group, long firstelem,
+ long nelem, double *array, int *status);
+
+/*--------------------- iterator functions -------------*/
+int fits_iter_set_by_name(iteratorCol *col, fitsfile *fptr, char *colname,
+ int datatype, int iotype);
+int fits_iter_set_by_num(iteratorCol *col, fitsfile *fptr, int colnum,
+ int datatype, int iotype);
+int fits_iter_set_file(iteratorCol *col, fitsfile *fptr);
+int fits_iter_set_colname(iteratorCol *col, char *colname);
+int fits_iter_set_colnum(iteratorCol *col, int colnum);
+int fits_iter_set_datatype(iteratorCol *col, int datatype);
+int fits_iter_set_iotype(iteratorCol *col, int iotype);
+
+fitsfile * fits_iter_get_file(iteratorCol *col);
+char * fits_iter_get_colname(iteratorCol *col);
+int fits_iter_get_colnum(iteratorCol *col);
+int fits_iter_get_datatype(iteratorCol *col);
+int fits_iter_get_iotype(iteratorCol *col);
+void * fits_iter_get_array(iteratorCol *col);
+long fits_iter_get_tlmin(iteratorCol *col);
+long fits_iter_get_tlmax(iteratorCol *col);
+long fits_iter_get_repeat(iteratorCol *col);
+char * fits_iter_get_tunit(iteratorCol *col);
+char * fits_iter_get_tdisp(iteratorCol *col);
+
+int ffiter(int ncols, iteratorCol *data, long offset, long nPerLoop,
+ int (*workFn)( long totaln, long offset, long firstn,
+ long nvalues, int narrays, iteratorCol *data, void *userPointer),
+ void *userPointer, int *status);
+
+/*--------------------- write column elements -------------*/
+int ffpcl(fitsfile *fptr, int datatype, int colnum, long firstrow,
+ long firstelem, long nelem, void *array, int *status);
+int ffpcls(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, char **array, int *status);
+int ffpcll(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, char *array, int *status);
+int ffpclb(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, unsigned char *array, int *status);
+int ffpclui(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, unsigned short *array, int *status);
+int ffpcli(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, short *array, int *status);
+int ffpcluj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, unsigned long *array, int *status);
+int ffpclj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, long *array, int *status);
+int ffpcluk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, unsigned int *array, int *status);
+int ffpclk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, int *array, int *status);
+int ffpcle(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, float *array, int *status);
+int ffpcld(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, double *array, int *status);
+int ffpclc(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, float *array, int *status);
+int ffpclm(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, double *array, int *status);
+int ffpclu(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, int *status);
+int ffpclx(fitsfile *fptr, int colnum, long frow, long fbit, long nbit,
+ char *larray, int *status);
+
+int ffpcn(fitsfile *fptr, int datatype, int colnum, long firstrow,
+ long firstelem, long nelem, void *array, void *nulval, int *status);
+int ffpcns( fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, char **array, char *nulvalue, int *status);
+int ffpcnl( fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, char *array, char nulvalue, int *status);
+int ffpcnb(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, unsigned char *array, unsigned char nulvalue,
+ int *status);
+int ffpcnui(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, unsigned short *array, unsigned short nulvalue,
+ int *status);
+int ffpcni(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, short *array, short nulvalue, int *status);
+int ffpcnuj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, unsigned long *array, unsigned long nulvalue,
+ int *status);
+int ffpcnj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, long *array, long nulvalue, int *status);
+int ffpcnuk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, unsigned int *array, unsigned int nulvalue,
+ int *status);
+int ffpcnk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, int *array, int nulvalue, int *status);
+int ffpcne(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, float *array, float nulvalue, int *status);
+int ffpcnd(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, double *array, double nulvalue, int *status);
+
+int ffpdes(fitsfile *fptr, int colnum, long rownum, long length,
+ long heapaddr, int *status);
+
+int ffptbb(fitsfile *fptr, long firstrow, long firstchar, long nchars,
+ unsigned char *values, int *status);
+
+int ffirow(fitsfile *fptr, long firstrow, long nrows, int *status);
+int ffdrow(fitsfile *fptr, long firstrow, long nrows, int *status);
+int ffdrws(fitsfile *fptr, long *rownum, long nrows, int *status);
+int fficol(fitsfile *fptr, int numcol, char *ttype, char *tform, int *status);
+int fficls(fitsfile *fptr, int firstcol, int ncols, char **ttype,
+ char **tform, int *status);
+int ffmvec(fitsfile *fptr, int colnum, long newveclen, int *status);
+int ffdcol(fitsfile *fptr, int numcol, int *status);
+int ffcpcl(fitsfile *infptr, fitsfile *outfptr, int incol, int outcol,
+ int create_col, int *status);
+
+/*--------------------- WCS Utilities ------------------*/
+int ffgics(fitsfile *fptr, double *xrval, double *yrval, double *xrpix,
+ double *yrpix, double *xinc, double *yinc, double *rot,
+ char *type, int *status);
+int ffgtcs(fitsfile *fptr, int xcol, int ycol, double *xrval,
+ double *yrval, double *xrpix, double *yrpix, double *xinc,
+ double *yinc, double *rot, char *type, int *status);
+int ffwldp(double xpix, double ypix, double xref, double yref,
+ double xrefpix, double yrefpix, double xinc, double yinc,
+ double rot, char *type, double *xpos, double *ypos, int *status);
+int ffxypx(double xpos, double ypos, double xref, double yref,
+ double xrefpix, double yrefpix, double xinc, double yinc,
+ double rot, char *type, double *xpix, double *ypix, int *status);
+
+/* WCS support routines (provide interface to Doug Mink's WCS library */
+int ffgiwcs(fitsfile *fptr, char **header, int *status);
+int ffgtwcs(fitsfile *fptr, int xcol, int ycol, char **header, int *status);
+
+/*--------------------- lexical parsing routines ------------------*/
+int fftexp( fitsfile *fptr, char *expr, int maxdim,
+ int *datatype, long *nelem, int *naxis,
+ long *naxes, int *status );
+
+int fffrow( fitsfile *infptr, char *expr,
+ long firstrow, long nrows,
+ long *n_good_rows, char *row_status, int *status);
+
+int ffffrw( fitsfile *fptr, char *expr, long *rownum, int *status);
+
+int fffrwc( fitsfile *fptr, char *expr, char *timeCol,
+ char *parCol, char *valCol, long ntimes,
+ double *times, char *time_status, int *status );
+
+int ffsrow( fitsfile *infptr, fitsfile *outfptr, char *expr,
+ int *status);
+
+int ffcrow( fitsfile *fptr, int datatype, char *expr,
+ long firstrow, long nelements, void *nulval,
+ void *array, int *anynul, int *status );
+
+int ffcalc_rng( fitsfile *infptr, char *expr, fitsfile *outfptr,
+ char *parName, char *parInfo, int nRngs,
+ long *start, long *end, int *status );
+
+int ffcalc( fitsfile *infptr, char *expr, fitsfile *outfptr,
+ char *parName, char *parInfo, int *status );
+
+ /* ffhist is not really intended as a user-callable routine */
+ /* but it may be useful for some specialized applications */
+
+int ffhist(fitsfile **fptr, char *outfile, int imagetype, int naxis,
+ char colname[4][FLEN_VALUE],
+ double *minin, double *maxin, double *binsizein,
+ char minname[4][FLEN_VALUE], char maxname[4][FLEN_VALUE],
+ char binname[4][FLEN_VALUE],
+ double weightin, char wtcol[FLEN_VALUE],
+ int recip, char *rowselect, int *status);
+
+int fits_select_image_section(fitsfile **fptr, char *outfile,
+ char *imagesection, int *status);
+int fits_select_section( fitsfile *infptr, fitsfile *outfptr,
+ char *imagesection, int *status);
+
+/*--------------------- grouping routines ------------------*/
+
+int ffgtcr(fitsfile *fptr, char *grpname, int grouptype, int *status);
+int ffgtis(fitsfile *fptr, char *grpname, int grouptype, int *status);
+int ffgtch(fitsfile *gfptr, int grouptype, int *status);
+int ffgtrm(fitsfile *gfptr, int rmopt, int *status);
+int ffgtcp(fitsfile *infptr, fitsfile *outfptr, int cpopt, int *status);
+int ffgtmg(fitsfile *infptr, fitsfile *outfptr, int mgopt, int *status);
+int ffgtcm(fitsfile *gfptr, int cmopt, int *status);
+int ffgtvf(fitsfile *gfptr, long *firstfailed, int *status);
+int ffgtop(fitsfile *mfptr,int group,fitsfile **gfptr,int *status);
+int ffgtam(fitsfile *gfptr, fitsfile *mfptr, int hdupos, int *status);
+int ffgtnm(fitsfile *gfptr, long *nmembers, int *status);
+int ffgmng(fitsfile *mfptr, long *nmembers, int *status);
+int ffgmop(fitsfile *gfptr, long member, fitsfile **mfptr, int *status);
+int ffgmcp(fitsfile *gfptr, fitsfile *mfptr, long member, int cpopt,
+ int *status);
+int ffgmtf(fitsfile *infptr, fitsfile *outfptr, long member, int tfopt,
+ int *status);
+int ffgmrm(fitsfile *fptr, long member, int rmopt, int *status);
+
+/*--------------------- group template parser routines ------------------*/
+
+int fits_execute_template(fitsfile *ff, char *ngp_template, int *status);
+
+/*--------------------- image compression routines ------------------*/
+
+int fits_comp_img(fitsfile *infptr, fitsfile *outfptr, int compress_type,
+ long *tilesize, int parm1, int parm2, int *status);
+int fits_is_compressed_image(fitsfile *fptr, int *status);
+int fits_decomp_img (fitsfile *infptr, fitsfile *outfptr, int *status);
+int fits_read_compressed_img(fitsfile *fptr,
+ int datatype, long *fpixel,long *lpixel,long *inc,
+ int nullcheck, void *nulval, void *array, char *nullarray,
+ int *anynul, int *status);
+
+int fits_read_compressed_pixels(fitsfile *fptr,
+ int datatype, long fpixel, long npixels,
+ int nullcheck, void *nulval, void *array, char *nullarray,
+ int *anynul, int *status);
+
+int fits_quantize_float (float fdata[], int nx, float in_null_value,
+ int noise_bits, int idata[], double *bscale, double *bzero,
+ int *iminval, int *imaxval);
+int fits_quantize_double (double fdata[], int nx, double in_null_value,
+ int noise_bits, int idata[], double *bscale, double *bzero,
+ int *iminval, int *imaxval);
+int fits_rcomp(int a[], int nx, unsigned char *c, int clen,int nblock);
+int fits_rdecomp (unsigned char *c, int clen, unsigned int array[], int nx,
+ int nblock);
+
+/* The following exclusion if __CINT__ is defined is needed for ROOT */
+#ifndef __CINT__
+#ifdef __cplusplus
+}
+#endif
+#endif
+
+#endif
+
diff --git a/include/fitsio2.h b/include/fitsio2.h
new file mode 100644
index 0000000..5636cc3
--- /dev/null
+++ b/include/fitsio2.h
@@ -0,0 +1,870 @@
+#ifndef _FITSIO2_H
+#define _FITSIO2_H
+
+#include "fitsio.h"
+
+#define DBUFFSIZE 28800 /* size of data buffer in bytes */
+
+#define NIOBUF 25 /* number of IO buffers to create */
+#define IOBUFLEN 2880 /* size in bytes of each IO buffer */
+#define MINDIRECT 8640 /* minimum size for direct reads and writes */
+ /* MINDIRECT must have a value >= 8640 */
+
+#define NATIVE 0 /* a generic machine that uses IEEE formats */
+#define ULTRIX 1
+#define ALPHA_OSF 2
+#define VAXVMS 3
+#define ALPHAVMS 4
+#define IBMPC 5
+#define CRAY 6
+
+#define GFLOAT 1
+#define IEEEFLOAT 2
+
+/* the following are used to determine what type machine we are running on */
+
+/* the following block determines the size of longs on SGI IRIX machines */
+#if defined(_MIPS_SZLONG)
+# if _MIPS_SZLONG == 32
+# define LONGSIZE 32
+# elif _MIPS_SZLONG == 64
+# define LONGSIZE 64
+# else
+# error "can't handle long size given by _MIPS_SZLONG"
+# endif
+#endif
+
+#if defined(vax) && defined(VMS)
+
+#define MACHINE VAXVMS
+#define BYTESWAPPED TRUE
+
+#elif defined(__alpha) && defined(__VMS)
+
+#if (__D_FLOAT == TRUE)
+
+/* this float option is the same as for VAX/VMS machines. */
+#define MACHINE VAXVMS
+#define BYTESWAPPED TRUE
+
+#elif (__G_FLOAT == TRUE)
+
+/* G_FLOAT is the default for ALPHA VMS systems */
+#define MACHINE ALPHAVMS
+#define BYTESWAPPED TRUE
+#define FLOATTYPE GFLOAT
+
+#elif (__IEEE_FLOAT == TRUE)
+
+#define MACHINE ALPHAVMS
+#define BYTESWAPPED TRUE
+#define FLOATTYPE IEEEFLOAT
+
+#endif
+
+#elif defined(__alpha) && defined(__unix__)
+
+#define MACHINE ALPHA_OSF
+#define BYTESWAPPED TRUE
+#define LONGSIZE 64
+
+#elif defined(ultrix) && defined(unix)
+
+#define MACHINE ULTRIX
+#define BYTESWAPPED TRUE
+
+#elif defined(__i386) || defined(__i386__) || defined(__i486__) || defined(__i586__)
+
+/* IBM PC */
+#define MACHINE IBMPC
+#define BYTESWAPPED TRUE
+
+#elif defined(_MSC_VER) || defined(__BORLANDC__) || defined(__TURBOC__)
+
+/* IBM PC running DOS or Windows */
+#define MACHINE IBMPC
+#define BYTESWAPPED TRUE
+
+#elif defined(_NI_mswin_)
+
+/* LabWindows/CVI with Windows 3.x, 95, or NT */
+#define MACHINE IBMPC
+#define BYTESWAPPED TRUE
+
+#elif defined(__EMX__)
+
+/* IBM PC running OS/2 */
+#define MACHINE IBMPC
+#define BYTESWAPPED TRUE
+
+#elif defined(__sparcv9)
+
+/* SUN Solaris7 in 64-bit mode */
+#define BYTESWAPPED FALSE
+#define MACHINE NATIVE
+#define LONGSIZE 64
+
+#else
+
+/* assume machine uses the same IEEE formats as used in FITS files */
+#define MACHINE NATIVE
+#define BYTESWAPPED FALSE
+
+#endif
+
+/* assume longs are 4 bytes long, unless previously set otherwise */
+#ifndef LONGSIZE
+#define LONGSIZE 32
+#endif
+
+#define IGNORE_EOF 1
+#define REPORT_EOF 0
+#define DATA_UNDEFINED -1
+#define NULL_UNDEFINED 1234554321
+#define ASCII_NULL_UNDEFINED 1 /* indicate no defined null value */
+
+#define maxvalue(A,B) ((A) > (B) ? (A) : (B))
+#define minvalue(A,B) ((A) < (B) ? (A) : (B))
+
+#define FSTRCMP(a,b) ((a)[0]<(b)[0]? -1:(a)[0]>(b)[0]?1:strcmp((a),(b)))
+#define FSTRNCMP(a,b,n) ((a)[0]<(b)[0]?-1:(a)[0]>(b)[0]?1:strncmp((a),(b),(n)))
+
+#if defined(__VMS) || defined(VMS)
+
+#define FNANMASK 0xFFFF /* mask all bits */
+#define DNANMASK 0xFFFF /* mask all bits */
+
+#else
+
+#define FNANMASK 0x7F80 /* mask bits 1 - 8; all set on NaNs */
+ /* all 0 on underflow or 0. */
+
+#define DNANMASK 0x7FF0 /* mask bits 1 - 11; all set on NaNs */
+ /* all 0 on underflow or 0. */
+
+#endif
+
+#if MACHINE == CRAY
+ /*
+ Cray machines: the large negative integer corresponds
+ to the 3 most sig digits set to 1. If these
+ 3 bits are set in a floating point number (64 bits), then it represents
+ a reserved value (i.e., a NaN)
+ */
+#define fnan(L) ( (L) >= 0xE000000000000000 ? 1 : 0) )
+
+#else
+ /* these functions work for both big and little endian machines */
+ /* that use the IEEE floating point format for internal numbers */
+
+ /* These functions tests whether the float value is a reserved IEEE */
+ /* value such as a Not-a-Number (NaN), or underflow, overflow, or */
+ /* infinity. The functions returns 1 if the value is a NaN, overflow */
+ /* or infinity; it returns 2 if the value is an denormalized underflow */
+ /* value; otherwise it returns 0. fnan tests floats, dnan tests doubles */
+
+#define fnan(L) \
+ ( (L & FNANMASK) == FNANMASK ? 1 : (L & FNANMASK) == 0 ? 2 : 0)
+
+#define dnan(L) \
+ ( (L & DNANMASK) == DNANMASK ? 1 : (L & DNANMASK) == 0 ? 2 : 0)
+
+#endif
+
+#define DUCHAR_MAX 255.49 /* max double value that fits in an unsigned char */
+#define DUCHAR_MIN -0.49 /* min double value that fits in an unsigned char */
+#define DUSHRT_MAX 65535.49 /* max double value that fits in a unsigned short*/
+#define DUSHRT_MIN -0.49 /* min double value that fits in an unsigned short */
+#define DSHRT_MAX 32767.49 /* max double value that fits in a short */
+#define DSHRT_MIN -32768.49 /* min double value that fits in a short */
+#define DULONG_MAX 4294967295.49 /* max double that fits in a unsigned long */
+#define DULONG_MIN -0.49 /* min double value that fits in an unsigned long */
+#define DLONG_MAX 2147483647.49 /* max double value that fits in a long */
+#define DLONG_MIN -2147483648.49 /* min double value that fits in a long */
+#define DUINT_MAX 4294967295.49 /* max dbl that fits in a unsigned 4-byte int */
+#define DUINT_MIN -0.49 /* min dbl that fits in an unsigned 4-byte int */
+#define DINT_MAX 2147483647.49 /* max double value that fits in a 4-byte int */
+#define DINT_MIN -2147483648.49 /* min double value that fits in a 4-byte int */
+
+#ifndef UINT32_MAX
+#define UINT32_MAX 4294967295U /* max unsigned 32-bit integer */
+#endif
+#ifndef INT32_MAX
+#define INT32_MAX 2147483647 /* max 32-bit integer */
+#endif
+#ifndef INT32_MIN
+#define INT32_MIN -2147483647 /* min 32-bit integer */
+#endif
+
+#define COMPRESS_NULL_VALUE -2147483647
+
+int ffmkky(char *keyname, char *keyval, char *comm, char *card, int *status);
+int ffgnky(fitsfile *fptr, char *card, int *status);
+void ffcfmt(char *tform, char *cform);
+void ffcdsp(char *tform, char *cform);
+void ffswap2(short *values, long nvalues);
+void ffswap4(INT32BIT *values, long nvalues);
+void ffswap8(double *values, long nvalues);
+int ffi2c(long ival, char *cval, int *status);
+int ffl2c(int lval, char *cval, int *status);
+int ffs2c(char *instr, char *outstr, int *status);
+int ffr2f(float fval, int decim, char *cval, int *status);
+int ffr2e(float fval, int decim, char *cval, int *status);
+int ffd2f(double dval, int decim, char *cval, int *status);
+int ffd2e(double dval, int decim, char *cval, int *status);
+int ffc2ii(char *cval, long *ival, int *status);
+int ffc2ll(char *cval, int *lval, int *status);
+int ffc2rr(char *cval, float *fval, int *status);
+int ffc2dd(char *cval, double *dval, int *status);
+int ffc2x(char *cval, char *dtype, long *ival, int *lval, char *sval,
+ double *dval, int *status);
+int ffc2s(char *instr, char *outstr, int *status);
+int ffc2i(char *cval, long *ival, int *status);
+int ffc2r(char *cval, float *fval, int *status);
+int ffc2d(char *cval, double *dval, int *status);
+int ffc2l(char *cval, int *lval, int *status);
+void ffxmsg(int action, char *err_message);
+int ffgcnt(fitsfile *fptr, char *value, int *status);
+int ffgtkn(fitsfile *fptr, int numkey, char *keyname, long *value, int *status);
+int fftkyn(fitsfile *fptr, int numkey, char *keyname, char *value, int *status);
+int ffgphd(fitsfile *fptr, int maxdim, int *simple, int *bitpix, int *naxis,
+ long naxes[], long *pcount, long *gcount, int *extend, double *bscale,
+ double *bzero, long *blank, int *nspace, int *status);
+int ffgttb(fitsfile *fptr, long *rowlen, long *nrows, long *pcount,
+ long *tfield, int *status);
+
+int ffmkey(fitsfile *fptr, char *card, int *status);
+int ffikey(fitsfile *fptr, char *card, int *status);
+
+int ffmbyt(fitsfile *fptr, long bytpos, int ignore_err, int *status);
+int ffgbyt(fitsfile *fptr, long nbytes, void *buffer, int *status);
+int ffpbyt(fitsfile *fptr, long nbytes, void *buffer, int *status);
+int ffgbytoff(fitsfile *fptr, long gsize, long ngroups, long offset,
+ void *buffer, int *status);
+int ffpbytoff(fitsfile *fptr, long gsize, long ngroups, long offset,
+ void *buffer, int *status);
+int ffldrc(fitsfile *fptr, long record, int err_mode, int *status);
+int ffwhbf(fitsfile *fptr, int *nbuff);
+int ffcurbuf(int nbuff, FITSfile **Fptr);
+int ffflsh(fitsfile *fptr, int clearbuf, int *status);
+int ffbfeof(fitsfile *fptr, int *status);
+int ffbfwt(int nbuff, int *status);
+int fits_get_num_files(void);
+int ffpxsz(int datatype);
+
+int ffoptplt(fitsfile *fptr, const char *tempname, int *status);
+int fits_is_this_a_copy(char *urltype);
+int fits_already_open(fitsfile **fptr, char *url,
+ char *urltype, char *infile, char *extspec, char *rowfilter,
+ char *binspec, char *colspec, int mode,int *isopen, int *status);
+int ffedit_columns(fitsfile **fptr, char *outfile, char *expr, int *status);
+int fits_get_col_minmax(fitsfile *fptr, int colnum, float *datamin,
+ float *datamax, int *status);
+int ffwritehisto(long totaln, long offset, long firstn, long nvalues,
+ int narrays, iteratorCol *imagepars, void *userPointer);
+int ffcalchist(long totalrows, long offset, long firstrow, long nrows,
+ int ncols, iteratorCol *colpars, void *userPointer);
+int fits_copy_image_cell(fitsfile **fptr, char *outfile, char *colname,
+ long rownum, int *status);
+int fits_copy_image_keywords(fitsfile *infptr, fitsfile *outfptr, int *status);
+int fits_get_section_range(char **ptr,long *secmin,long *secmax,long *incre,
+ int *status);
+int ffrhdu(fitsfile *fptr, int *hdutype, int *status);
+int ffpinit(fitsfile *fptr, int *status);
+int ffainit(fitsfile *fptr, int *status);
+int ffbinit(fitsfile *fptr, int *status);
+int ffchdu(fitsfile *fptr, int *status);
+int ffwend(fitsfile *fptr, int *status);
+int ffpdfl(fitsfile *fptr, int *status);
+int ffuptf(fitsfile *fptr, int *status);
+
+int ffdblk(fitsfile *fptr, long nblocks, int *status);
+int ffgext(fitsfile *fptr, int moveto, int *exttype, int *status);
+int ffgtbc(fitsfile *fptr, long *totalwidth, int *status);
+int ffgtbp(fitsfile *fptr, char *name, char *value, int *status);
+int ffiblk(fitsfile *fptr, long nblock, int headdata, int *status);
+int ffshft(fitsfile *fptr, long firstbyte, long nbytes, long nshift,
+ int *status);
+
+int ffgcpr(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, int writemode, double *scale, double *zero, char *tform,
+ long *twidth, int *tcode, int *maxelem, long *startpos,
+ long *elemnum, long *incre, long *repeat,long *rowlen,
+ int *hdutype, long *tnull, char *snull, int *status);
+
+int ffflushx(FITSfile *fptr);
+int ffseek(FITSfile *fptr, long position);
+int ffread(FITSfile *fptr, long nbytes, void *buffer,
+ int *status);
+int ffwrite(FITSfile *fptr, long nbytes, void *buffer,
+ int *status);
+int fftrun(fitsfile *fptr, long filesize, int *status);
+
+int ffgcll(fitsfile *fptr, int colnum, long firstrow, long firstelem, long
+ nelem, int nultyp, char nulval, char *array, char *nularray,
+ int *anynul, int *status);
+int ffgcls(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, int nultyp, char *nulval,
+ char **array, char *nularray, int *anynul, int *status);
+int ffgcls2(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, int nultyp, char *nulval,
+ char **array, char *nularray, int *anynul, int *status);
+int ffgclb(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, long elemincre, int nultyp, unsigned char nulval,
+ unsigned char *array, char *nularray, int *anynul, int *status);
+int ffgclui(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, long elemincre, int nultyp, unsigned short nulval,
+ unsigned short *array, char *nularray, int *anynul, int *status);
+int ffgcli(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, long elemincre, int nultyp, short nulval,
+ short *array, char *nularray, int *anynul, int *status);
+int ffgcluj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, long elemincre, int nultyp, unsigned long nulval,
+ unsigned long *array, char *nularray, int *anynul, int *status);
+int ffgclj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, long elemincre, int nultyp, long nulval, long *array,
+ char *nularray, int *anynul, int *status);
+int ffgcluk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, long elemincre, int nultyp, unsigned int nulval,
+ unsigned int *array, char *nularray, int *anynul, int *status);
+int ffgclk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, long elemincre, int nultyp, int nulval, int *array,
+ char *nularray, int *anynul, int *status);
+int ffgcle(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, long elemincre, int nultyp, float nulval, float *array,
+ char *nularray, int *anynul, int *status);
+int ffgcld(fitsfile *fptr, int colnum, long firstrow, long firstelem,
+ long nelem, long elemincre, int nultyp, double nulval,
+ double *array, char *nularray, int *anynul, int *status);
+
+int ffpi1b(fitsfile *fptr, long nelem, long incre, unsigned char *buffer,
+ int *status);
+int ffpi2b(fitsfile *fptr, long nelem, long incre, short *buffer, int *status);
+int ffpi4b(fitsfile *fptr, long nelem, long incre, INT32BIT *buffer,
+ int *status);
+int ffpr4b(fitsfile *fptr, long nelem, long incre, float *buffer, int *status);
+int ffpr8b(fitsfile *fptr, long nelem, long incre, double *buffer, int *status);
+
+int ffgi1b(fitsfile *fptr, long pos, long nelem, long incre,
+ unsigned char *buffer, int *status);
+int ffgi2b(fitsfile *fptr, long pos, long nelem, long incre, short *buffer,
+ int *status);
+int ffgi4b(fitsfile *fptr, long pos, long nelem, long incre, INT32BIT *buffer,
+ int *status);
+int ffgr4b(fitsfile *fptr, long pos, long nelem, long incre, float *buffer,
+ int *status);
+int ffgr8b(fitsfile *fptr, long pos, long nelem, long incre, double *buffer,
+ int *status);
+
+int ffcins(fitsfile *fptr, long naxis1, long naxis2, long nbytes,
+ long bytepos, int *status);
+int ffcdel(fitsfile *fptr, long naxis1, long naxis2, long nbytes,
+ long bytepos, int *status);
+int ffkshf(fitsfile *fptr, int firstcol, int tfields, int nshift, int *status);
+
+int fffi1i1(unsigned char *input, long ntodo, double scale, double zero,
+ int nullcheck, unsigned char tnull, unsigned char nullval, char
+ *nullarray, int *anynull, unsigned char *output, int *status);
+int fffi2i1(short *input, long ntodo, double scale, double zero,
+ int nullcheck, short tnull, unsigned char nullval, char *nullarray,
+ int *anynull, unsigned char *output, int *status);
+int fffi4i1(INT32BIT *input, long ntodo, double scale, double zero,
+ int nullcheck, INT32BIT tnull, unsigned char nullval, char *nullarray,
+ int *anynull, unsigned char *output, int *status);
+int fffr4i1(float *input, long ntodo, double scale, double zero,
+ int nullcheck, unsigned char nullval, char *nullarray,
+ int *anynull, unsigned char *output, int *status);
+int fffr8i1(double *input, long ntodo, double scale, double zero,
+ int nullcheck, unsigned char nullval, char *nullarray,
+ int *anynull, unsigned char *output, int *status);
+int fffstri1(char *input, long ntodo, double scale, double zero,
+ long twidth, double power, int nullcheck, char *snull,
+ unsigned char nullval, char *nullarray, int *anynull,
+ unsigned char *output, int *status);
+
+int fffi1u2(unsigned char *input, long ntodo, double scale, double zero,
+ int nullcheck, unsigned char tnull, unsigned short nullval,
+ char *nullarray,
+ int *anynull, unsigned short *output, int *status);
+int fffi2u2(short *input, long ntodo, double scale, double zero,
+ int nullcheck, short tnull, unsigned short nullval, char *nullarray,
+ int *anynull, unsigned short *output, int *status);
+int fffi4u2(INT32BIT *input, long ntodo, double scale, double zero,
+ int nullcheck, INT32BIT tnull, unsigned short nullval, char *nullarray,
+ int *anynull, unsigned short *output, int *status);
+int fffr4u2(float *input, long ntodo, double scale, double zero,
+ int nullcheck, unsigned short nullval, char *nullarray,
+ int *anynull, unsigned short *output, int *status);
+int fffr8u2(double *input, long ntodo, double scale, double zero,
+ int nullcheck, unsigned short nullval, char *nullarray,
+ int *anynull, unsigned short *output, int *status);
+int fffstru2(char *input, long ntodo, double scale, double zero,
+ long twidth, double power, int nullcheck, char *snull,
+ unsigned short nullval, char *nullarray, int *anynull,
+ unsigned short *output, int *status);
+
+int fffi1i2(unsigned char *input, long ntodo, double scale, double zero,
+ int nullcheck, unsigned char tnull, short nullval, char *nullarray,
+ int *anynull, short *output, int *status);
+int fffi2i2(short *input, long ntodo, double scale, double zero,
+ int nullcheck, short tnull, short nullval, char *nullarray,
+ int *anynull, short *output, int *status);
+int fffi4i2(INT32BIT *input, long ntodo, double scale, double zero,
+ int nullcheck, INT32BIT tnull, short nullval, char *nullarray,
+ int *anynull, short *output, int *status);
+int fffr4i2(float *input, long ntodo, double scale, double zero,
+ int nullcheck, short nullval, char *nullarray,
+ int *anynull, short *output, int *status);
+int fffr8i2(double *input, long ntodo, double scale, double zero,
+ int nullcheck, short nullval, char *nullarray,
+ int *anynull, short *output, int *status);
+int fffstri2(char *input, long ntodo, double scale, double zero,
+ long twidth, double power, int nullcheck, char *snull,
+ short nullval, char *nullarray, int *anynull, short *output,
+ int *status);
+
+int fffi1u4(unsigned char *input, long ntodo, double scale, double zero,
+ int nullcheck, unsigned char tnull, unsigned long nullval,
+ char *nullarray,
+ int *anynull, unsigned long *output, int *status);
+int fffi2u4(short *input, long ntodo, double scale, double zero,
+ int nullcheck, short tnull, unsigned long nullval, char *nullarray,
+ int *anynull, unsigned long *output, int *status);
+int fffi4u4(INT32BIT *input, long ntodo, double scale, double zero,
+ int nullcheck, INT32BIT tnull, unsigned long nullval, char *nullarray,
+ int *anynull, unsigned long *output, int *status);
+int fffr4u4(float *input, long ntodo, double scale, double zero,
+ int nullcheck, unsigned long nullval, char *nullarray,
+ int *anynull, unsigned long *output, int *status);
+int fffr8u4(double *input, long ntodo, double scale, double zero,
+ int nullcheck, unsigned long nullval, char *nullarray,
+ int *anynull, unsigned long *output, int *status);
+int fffstru4(char *input, long ntodo, double scale, double zero,
+ long twidth, double power, int nullcheck, char *snull,
+ unsigned long nullval, char *nullarray, int *anynull,
+ unsigned long *output, int *status);
+
+int fffi1i4(unsigned char *input, long ntodo, double scale, double zero,
+ int nullcheck, unsigned char tnull, long nullval, char *nullarray,
+ int *anynull, long *output, int *status);
+int fffi2i4(short *input, long ntodo, double scale, double zero,
+ int nullcheck, short tnull, long nullval, char *nullarray,
+ int *anynull, long *output, int *status);
+int fffi4i4(INT32BIT *input, long ntodo, double scale, double zero,
+ int nullcheck, INT32BIT tnull, long nullval, char *nullarray,
+ int *anynull, long *output, int *status);
+int fffr4i4(float *input, long ntodo, double scale, double zero,
+ int nullcheck, long nullval, char *nullarray,
+ int *anynull, long *output, int *status);
+int fffr8i4(double *input, long ntodo, double scale, double zero,
+ int nullcheck, long nullval, char *nullarray,
+ int *anynull, long *output, int *status);
+int fffstri4(char *input, long ntodo, double scale, double zero,
+ long twidth, double power, int nullcheck, char *snull,
+ long nullval, char *nullarray, int *anynull, long *output,
+ int *status);
+
+int fffi1int(unsigned char *input, long ntodo, double scale, double zero,
+ int nullcheck, unsigned char tnull, int nullval, char *nullarray,
+ int *anynull, int *output, int *status);
+int fffi2int(short *input, long ntodo, double scale, double zero,
+ int nullcheck, short tnull, int nullval, char *nullarray,
+ int *anynull, int *output, int *status);
+int fffi4int(INT32BIT *input, long ntodo, double scale, double zero,
+ int nullcheck, INT32BIT tnull, int nullval, char *nullarray,
+ int *anynull, int *output, int *status);
+int fffr4int(float *input, long ntodo, double scale, double zero,
+ int nullcheck, int nullval, char *nullarray,
+ int *anynull, int *output, int *status);
+int fffr8int(double *input, long ntodo, double scale, double zero,
+ int nullcheck, int nullval, char *nullarray,
+ int *anynull, int *output, int *status);
+int fffstrint(char *input, long ntodo, double scale, double zero,
+ long twidth, double power, int nullcheck, char *snull,
+ int nullval, char *nullarray, int *anynull, int *output,
+ int *status);
+
+int fffi1uint(unsigned char *input, long ntodo, double scale, double zero,
+ int nullcheck, unsigned char tnull, unsigned int nullval,
+ char *nullarray, int *anynull, unsigned int *output, int *status);
+int fffi2uint(short *input, long ntodo, double scale, double zero,
+ int nullcheck, short tnull, unsigned int nullval, char *nullarray,
+ int *anynull, unsigned int *output, int *status);
+int fffi4uint(INT32BIT *input, long ntodo, double scale, double zero,
+ int nullcheck, INT32BIT tnull, unsigned int nullval, char *nullarray,
+ int *anynull, unsigned int *output, int *status);
+int fffr4uint(float *input, long ntodo, double scale, double zero,
+ int nullcheck, unsigned int nullval, char *nullarray,
+ int *anynull, unsigned int *output, int *status);
+int fffr8uint(double *input, long ntodo, double scale, double zero,
+ int nullcheck, unsigned int nullval, char *nullarray,
+ int *anynull, unsigned int *output, int *status);
+int fffstruint(char *input, long ntodo, double scale, double zero,
+ long twidth, double power, int nullcheck, char *snull,
+ unsigned int nullval, char *nullarray, int *anynull,
+ unsigned int *output, int *status);
+
+int fffi1r4(unsigned char *input, long ntodo, double scale, double zero,
+ int nullcheck, unsigned char tnull, float nullval, char *nullarray,
+ int *anynull, float *output, int *status);
+int fffi2r4(short *input, long ntodo, double scale, double zero,
+ int nullcheck, short tnull, float nullval, char *nullarray,
+ int *anynull, float *output, int *status);
+int fffi4r4(INT32BIT *input, long ntodo, double scale, double zero,
+ int nullcheck, INT32BIT tnull, float nullval, char *nullarray,
+ int *anynull, float *output, int *status);
+int fffr4r4(float *input, long ntodo, double scale, double zero,
+ int nullcheck, float nullval, char *nullarray,
+ int *anynull, float *output, int *status);
+int fffr8r4(double *input, long ntodo, double scale, double zero,
+ int nullcheck, float nullval, char *nullarray,
+ int *anynull, float *output, int *status);
+int fffstrr4(char *input, long ntodo, double scale, double zero,
+ long twidth, double power, int nullcheck, char *snull,
+ float nullval, char *nullarray, int *anynull, float *output,
+ int *status);
+
+int fffi1r8(unsigned char *input, long ntodo, double scale, double zero,
+ int nullcheck, unsigned char tnull, double nullval, char *nullarray,
+ int *anynull, double *output, int *status);
+int fffi2r8(short *input, long ntodo, double scale, double zero,
+ int nullcheck, short tnull, double nullval, char *nullarray,
+ int *anynull, double *output, int *status);
+int fffi4r8(INT32BIT *input, long ntodo, double scale, double zero,
+ int nullcheck, INT32BIT tnull, double nullval, char *nullarray,
+ int *anynull, double *output, int *status);
+int fffr4r8(float *input, long ntodo, double scale, double zero,
+ int nullcheck, double nullval, char *nullarray,
+ int *anynull, double *output, int *status);
+int fffr8r8(double *input, long ntodo, double scale, double zero,
+ int nullcheck, double nullval, char *nullarray,
+ int *anynull, double *output, int *status);
+int fffstrr8(char *input, long ntodo, double scale, double zero,
+ long twidth, double power, int nullcheck, char *snull,
+ double nullval, char *nullarray, int *anynull, double *output,
+ int *status);
+
+int ffi1fi1(unsigned char *array, long ntodo, double scale, double zero,
+ unsigned char *buffer, int *status);
+int ffu2fi1(unsigned short *array, long ntodo, double scale, double zero,
+ unsigned char *buffer, int *status);
+int ffi2fi1(short *array, long ntodo, double scale, double zero,
+ unsigned char *buffer, int *status);
+int ffu4fi1(unsigned long *array, long ntodo, double scale, double zero,
+ unsigned char *buffer, int *status);
+int ffi4fi1(long *array, long ntodo, double scale, double zero,
+ unsigned char *buffer, int *status);
+int ffuintfi1(unsigned int *array, long ntodo, double scale, double zero,
+ unsigned char *buffer, int *status);
+int ffintfi1(int *array, long ntodo, double scale, double zero,
+ unsigned char *buffer, int *status);
+int ffr4fi1(float *array, long ntodo, double scale, double zero,
+ unsigned char *buffer, int *status);
+int ffr8fi1(double *array, long ntodo, double scale, double zero,
+ unsigned char *buffer, int *status);
+
+int ffi1fi2(unsigned char *array, long ntodo, double scale, double zero,
+ short *buffer, int *status);
+int ffu2fi2(unsigned short *array, long ntodo, double scale, double zero,
+ short *buffer, int *status);
+int ffi2fi2(short *array, long ntodo, double scale, double zero,
+ short *buffer, int *status);
+int ffu4fi2(unsigned long *array, long ntodo, double scale, double zero,
+ short *buffer, int *status);
+int ffi4fi2(long *array, long ntodo, double scale, double zero,
+ short *buffer, int *status);
+int ffuintfi2(unsigned int *array, long ntodo, double scale, double zero,
+ short *buffer, int *status);
+int ffintfi2(int *array, long ntodo, double scale, double zero,
+ short *buffer, int *status);
+int ffr4fi2(float *array, long ntodo, double scale, double zero,
+ short *buffer, int *status);
+int ffr8fi2(double *array, long ntodo, double scale, double zero,
+ short *buffer, int *status);
+
+int ffi1fi4(unsigned char *array, long ntodo, double scale, double zero,
+ INT32BIT *buffer, int *status);
+int ffu2fi4(unsigned short *array, long ntodo, double scale, double zero,
+ INT32BIT *buffer, int *status);
+int ffi2fi4(short *array, long ntodo, double scale, double zero,
+ INT32BIT *buffer, int *status);
+int ffu4fi4(unsigned long *array, long ntodo, double scale, double zero,
+ INT32BIT *buffer, int *status);
+int ffi4fi4(long *array, long ntodo, double scale, double zero,
+ INT32BIT *buffer, int *status);
+int ffuintfi4(unsigned int *array, long ntodo, double scale, double zero,
+ INT32BIT *buffer, int *status);
+int ffintfi4(int *array, long ntodo, double scale, double zero,
+ INT32BIT *buffer, int *status);
+int ffr4fi4(float *array, long ntodo, double scale, double zero,
+ INT32BIT *buffer, int *status);
+int ffr8fi4(double *array, long ntodo, double scale, double zero,
+ INT32BIT *buffer, int *status);
+
+int ffi1fr4(unsigned char *array, long ntodo, double scale, double zero,
+ float *buffer, int *status);
+int ffu2fr4(unsigned short *array, long ntodo, double scale, double zero,
+ float *buffer, int *status);
+int ffi2fr4(short *array, long ntodo, double scale, double zero,
+ float *buffer, int *status);
+int ffu4fr4(unsigned long *array, long ntodo, double scale, double zero,
+ float *buffer, int *status);
+int ffi4fr4(long *array, long ntodo, double scale, double zero,
+ float *buffer, int *status);
+int ffuintfr4(unsigned int *array, long ntodo, double scale, double zero,
+ float *buffer, int *status);
+int ffintfr4(int *array, long ntodo, double scale, double zero,
+ float *buffer, int *status);
+int ffr4fr4(float *array, long ntodo, double scale, double zero,
+ float *buffer, int *status);
+int ffr8fr4(double *array, long ntodo, double scale, double zero,
+ float *buffer, int *status);
+
+int ffi1fr8(unsigned char *array, long ntodo, double scale, double zero,
+ double *buffer, int *status);
+int ffu2fr8(unsigned short *array, long ntodo, double scale, double zero,
+ double *buffer, int *status);
+int ffi2fr8(short *array, long ntodo, double scale, double zero,
+ double *buffer, int *status);
+int ffu4fr8(unsigned long *array, long ntodo, double scale, double zero,
+ double *buffer, int *status);
+int ffi4fr8(long *array, long ntodo, double scale, double zero,
+ double *buffer, int *status);
+int ffuintfr8(unsigned int *array, long ntodo, double scale, double zero,
+ double *buffer, int *status);
+int ffintfr8(int *array, long ntodo, double scale, double zero,
+ double *buffer, int *status);
+int ffr4fr8(float *array, long ntodo, double scale, double zero,
+ double *buffer, int *status);
+int ffr8fr8(double *array, long ntodo, double scale, double zero,
+ double *buffer, int *status);
+
+int ffi1fstr(unsigned char *input, long ntodo, double scale, double zero,
+ char *cform, long twidth, char *output, int *status);
+int ffu2fstr(unsigned short *input, long ntodo, double scale, double zero,
+ char *cform, long twidth, char *output, int *status);
+int ffi2fstr(short *input, long ntodo, double scale, double zero,
+ char *cform, long twidth, char *output, int *status);
+int ffu4fstr(unsigned long *input, long ntodo, double scale, double zero,
+ char *cform, long twidth, char *output, int *status);
+int ffi4fstr(long *input, long ntodo, double scale, double zero,
+ char *cform, long twidth, char *output, int *status);
+int ffintfstr(int *input, long ntodo, double scale, double zero,
+ char *cform, long twidth, char *output, int *status);
+int ffuintfstr(unsigned int *input, long ntodo, double scale, double zero,
+ char *cform, long twidth, char *output, int *status);
+int ffr4fstr(float *input, long ntodo, double scale, double zero,
+ char *cform, long twidth, char *output, int *status);
+int ffr8fstr(double *input, long ntodo, double scale, double zero,
+ char *cform, long twidth, char *output, int *status);
+
+/* the following 4 routines are VMS macros used on VAX or Alpha VMS */
+void ieevpd(double *inarray, double *outarray, long *nvals);
+void ieevud(double *inarray, double *outarray, long *nvals);
+void ieevpr(float *inarray, float *outarray, long *nvals);
+void ieevur(float *inarray, float *outarray, long *nvals);
+
+/* routines related to the lexical parser */
+int ffselect_table(fitsfile **fptr, char *outfile, char *expr, int *status);
+int ffiprs( fitsfile *fptr, int compressed, char *expr, int maxdim,
+ int *datatype, long *nelem, int *naxis, long *naxes,
+ int *status );
+void ffcprs( void );
+int ffcvtn( int inputType, void *input, char *undef, long ntodo,
+ int outputType, void *nulval, void *output,
+ int *anynull, int *status );
+int parse_data( long totalrows, long offset, long firstrow,
+ long nrows, int nCols, iteratorCol *colData,
+ void *userPtr );
+int uncompress_hkdata( fitsfile *fptr, long ntimes,
+ double *times, int *status );
+int ffffrw_work( long totalrows, long offset, long firstrow,
+ long nrows, int nCols, iteratorCol *colData,
+ void *userPtr );
+
+
+/* image compression routines */
+int imcomp_init_table(fitsfile *outfptr, int compress_type,
+ int bitpix, int naxis,long *naxes,long *tilesize,
+ int rice_blocksize,int rice_nbits,int *status);
+int imcomp_calc_max_elem (int comptype, int nx, int blocksize);
+int imcomp_copy_imheader(fitsfile *infptr, fitsfile *outfptr,
+ int *status);
+int imcomp_compress_image (fitsfile *infptr, fitsfile *outfptr,
+ int *status);
+int imcomp_compress_tile (fitsfile *outfptr, long row,
+ int datatype, void *tiledata, long tilelen, int *status);
+
+/* image decompression routines */
+int fits_read_compressed_img_plane(fitsfile *fptr, int datatype,
+ int bytesperpixel, long nplane, long *firstcoord, long *lastcoord,
+ long *inc, long *naxes, int nullcheck, void *nullval,
+ void *array, char *nullarray, int *anynul, long *nread, int *status);
+int imcomp_get_compressed_image_par(fitsfile *infptr, int *status);
+int imcomp_decompress_tile (fitsfile *infptr,
+ int nrow, int tilesize, int datatype, int nullcheck,
+ void *nulval, void *buffer, char *bnullarray, int *anynul,
+ int *status);
+int imcomp_copy_overlap (char *tile, int datatype, int ndim,
+ long *tfpixel, long *tlpixel, char *bnullarray, char *image,
+ long *fpixel, long *lpixel, int nullcheck, char *nullarray,
+ int *status);
+
+int pl_p2li (int *pxsrc, int xs, short *lldst, int npix);
+int pl_l2pi (short *ll_src, int xs, int *px_dst, int npix);
+
+/* general driver routines */
+
+int urltype2driver(char *urltype, int *driver);
+int fits_init_cfitsio(void);
+
+int fits_register_driver( char *prefix,
+ int (*init)(void),
+ int (*fitsshutdown)(void),
+ int (*setoptions)(int option),
+ int (*getoptions)(int *options),
+ int (*getversion)(int *version),
+ int (*checkfile) (char *urltype, char *infile, char *outfile),
+ int (*fitsopen)(char *filename, int rwmode, int *driverhandle),
+ int (*fitscreate)(char *filename, int *driverhandle),
+ int (*fitstruncate)(int driverhandle, long filesize),
+ int (*fitsclose)(int driverhandle),
+ int (*fremove)(char *filename),
+ int (*size)(int driverhandle, long *size),
+ int (*flush)(int driverhandle),
+ int (*seek)(int driverhandle, long offset),
+ int (*fitsread) (int driverhandle, void *buffer, long nbytes),
+ int (*fitswrite)(int driverhandle, void *buffer, long nbytes));
+
+/* file driver I/O routines */
+
+int file_init(void);
+int file_setoptions(int options);
+int file_getoptions(int *options);
+int file_getversion(int *version);
+int file_shutdown(void);
+int file_checkfile(char *urltype, char *infile, char *outfile);
+int file_open(char *filename, int rwmode, int *driverhandle);
+int file_compress_open(char *filename, int rwmode, int *hdl);
+int file_openfile(char *filename, int rwmode, FILE **diskfile);
+int file_create(char *filename, int *driverhandle);
+int file_truncate(int driverhandle, long filesize);
+int file_size(int driverhandle, long *filesize);
+int file_close(int driverhandle);
+int file_remove(char *filename);
+int file_flush(int driverhandle);
+int file_seek(int driverhandle, long offset);
+int file_read (int driverhandle, void *buffer, long nbytes);
+int file_write(int driverhandle, void *buffer, long nbytes);
+int file_is_compressed(char *filename);
+
+/* memory driver I/O routines */
+
+int mem_init(void);
+int mem_setoptions(int options);
+int mem_getoptions(int *options);
+int mem_getversion(int *version);
+int mem_shutdown(void);
+int mem_create(char *filename, int *handle);
+int mem_openmem(void **buffptr, size_t *buffsize, size_t deltasize,
+ void *(*memrealloc)(void *p, size_t newsize), int *handle);
+int mem_createmem(size_t memsize, int *handle);
+int stdin_checkfile(char *urltype, char *infile, char *outfile);
+int stdin_open(char *filename, int rwmode, int *handle);
+int stdin2mem(int hd);
+int stdin2file(int hd);
+int stdout_close(int handle);
+int mem_compress_open(char *filename, int rwmode, int *hdl);
+int mem_iraf_open(char *filename, int rwmode, int *hdl);
+int mem_size(int handle, long *filesize);
+int mem_truncate(int handle, long filesize);
+int mem_close_free(int handle);
+int mem_close_keep(int handle);
+int mem_seek(int handle, long offset);
+int mem_read(int hdl, void *buffer, long nbytes);
+int mem_write(int hdl, void *buffer, long nbytes);
+int mem_uncompress2mem(char *filename, FILE *diskfile, int hdl);
+
+int iraf2mem(char *filename, char **buffptr, size_t *buffsize,
+ size_t *filesize, int *status);
+
+/* root driver I/O routines */
+
+int root_init(void);
+int root_setoptions(int options);
+int root_getoptions(int *options);
+int root_getversion(int *version);
+int root_shutdown(void);
+int root_open(char *filename, int rwmode, int *driverhandle);
+int root_create(char *filename, int *driverhandle);
+int root_close(int driverhandle);
+int root_flush(int driverhandle);
+int root_seek(int driverhandle, long offset);
+int root_read (int driverhandle, void *buffer, long nbytes);
+int root_write(int driverhandle, void *buffer, long nbytes);
+int root_size(int handle, long *filesize);
+
+/* http driver I/O routines */
+
+int http_checkfile(char *urltype, char *infile, char *outfile);
+int http_open(char *filename, int rwmode, int *driverhandle);
+int http_file_open(char *filename, int rwmode, int *driverhandle);
+int http_compress_open(char *filename, int rwmode, int *driverhandle);
+
+/* ftp driver I/O routines */
+
+int ftp_checkfile(char *urltype, char *infile, char *outfile);
+int ftp_open(char *filename, int rwmode, int *driverhandle);
+int ftp_file_open(char *filename, int rwmode, int *driverhandle);
+int ftp_compress_open(char *filename, int rwmode, int *driverhandle);
+
+
+int uncompress2mem(char *filename, FILE *diskfile,
+ char **buffptr, size_t *buffsize,
+ void *(*mem_realloc)(void *p, size_t newsize),
+ size_t *filesize, int *status);
+
+int uncompress2mem_from_mem(
+ char *inmemptr,
+ size_t inmemsize,
+ char **buffptr,
+ size_t *buffsize,
+ void *(*mem_realloc)(void *p, size_t newsize),
+ size_t *filesize,
+ int *status);
+
+int uncompress2file(char *filename,
+ FILE *indiskfile,
+ FILE *outdiskfile,
+ int *status);
+
+int compress2mem_from_mem(
+ char *inmemptr,
+ size_t inmemsize,
+ char **buffptr,
+ size_t *buffsize,
+ void *(*mem_realloc)(void *p, size_t newsize),
+ size_t *filesize,
+ int *status);
+
+/* ==================== SHARED MEMORY DRIVER SECTION ======================= */
+
+#ifdef HAVE_SHMEM_SERVICES
+#include "drvrsmem.h"
+#endif
+
+/* ==================== END OF SHARED MEMORY DRIVER SECTION ================ */
+
+#endif
+
+
+#if defined(vms) || defined(__vms) || defined(WIN32) || defined(__WIN32__) || defined(macintosh)
+
+/* ================================================================== */
+/* A hack for nonunix machines, which lack strcasecmp and strncasecmp */
+/* ================================================================== */
+
+int strcasecmp (const char *s1, const char *s2 );
+int strncasecmp(const char *s1, const char *s2, size_t n);
+
+#endif
diff --git a/include/fusebuf.h b/include/fusebuf.h
new file mode 100644
index 0000000..954a979
--- /dev/null
+++ b/include/fusebuf.h
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *******************************************************************************
+ *
+ * Synopsis: #include "fusebuf.h"
+ *
+ * Description: Structure definitions and routine prototyping for multi-line
+ * file buffering as handled by fusebuf.c.
+ *
+ * History: 08/17/98 gak Begin work
+ * 08/18/98 gak Tested and working
+ * (as called by cf_make_ff)
+ *
+ ******************************************************************************/
+
+typedef struct {
+ fitsfile *fits; /* Pointer to open FITS structure. */
+ int hdu; /* HDU containing image to buffer. */
+ int nx, ny; /* X and Y dimensions of the image. */
+ float **buf, /* Array of pointers to buffered lines. */
+ **y; /* Pointers to buffered lines in y order. */
+ int nl, /* Number of lines buffered. */
+ yfirst, ylast, /* Row numbers of buffered lines */
+ znext; /* Ordinal of next line ptr to use. */
+} imgbuf;
+
+int cf_openextn(fitsfile *, int, imgbuf *, int, int *);
+
+int cf_closeextn(imgbuf *, int *);
+
+float getpixf(imgbuf *, int, int);
+
diff --git a/include/group.h b/include/group.h
new file mode 100644
index 0000000..f7aae5b
--- /dev/null
+++ b/include/group.h
@@ -0,0 +1,65 @@
+#define MAX_HDU_TRACKER 1000
+
+typedef struct _HDUtracker HDUtracker;
+
+struct _HDUtracker
+{
+ int nHDU;
+
+ char *filename[MAX_HDU_TRACKER];
+ int position[MAX_HDU_TRACKER];
+
+ char *newFilename[MAX_HDU_TRACKER];
+ int newPosition[MAX_HDU_TRACKER];
+};
+
+/* functions used internally in the grouping convention module */
+
+int ffgtdc(int grouptype, int xtensioncol, int extnamecol, int extvercol,
+ int positioncol, int locationcol, int uricol, char *ttype[],
+ char *tform[], int *ncols, int *status);
+
+int ffgtgc(fitsfile *gfptr, int *xtensionCol, int *extnameCol, int *extverCol,
+ int *positionCol, int *locationCol, int *uriCol, int *grptype,
+ int *status);
+
+int ffgmul(fitsfile *mfptr, int rmopt, int *status);
+
+int ffgmf(fitsfile *gfptr, char *xtension, char *extname, int extver,
+ int position, char *location, long *member, int *status);
+
+int ffgtrmr(fitsfile *gfptr, HDUtracker *HDU, int *status);
+
+int ffgtcpr(fitsfile *infptr, fitsfile *outfptr, int cpopt, HDUtracker *HDU,
+ int *status);
+
+int fftsad(fitsfile *mfptr, HDUtracker *HDU, int *newPosition,
+ char *newFileName);
+
+int fftsud(fitsfile *mfptr, HDUtracker *HDU, int newPosition,
+ char *newFileName);
+
+void prepare_keyvalue(char *keyvalue);
+
+int fits_path2url(char *inpath, char *outpath, int *status);
+
+int fits_url2path(char *inpath, char *outpath, int *status);
+
+int fits_get_cwd(char *cwd, int *status);
+
+int fits_get_url(fitsfile *fptr, char *realURL, char *startURL,
+ char *realAccess, char *startAccess, int *iostate,
+ int *status);
+
+int fits_clean_url(char *inURL, char *outURL, int *status);
+
+int fits_relurl2url(char *refURL, char *relURL, char *absURL, int *status);
+
+int fits_url2relurl(char *refURL, char *absURL, char *relURL, int *status);
+
+int fits_encode_url(char *inpath, char *outpath, int *status);
+
+int fits_unencode_url(char *inpath, char *outpath, int *status);
+
+int fits_is_url_absolute(char *url);
+
diff --git a/include/grparser.h b/include/grparser.h
new file mode 100644
index 0000000..32a172b
--- /dev/null
+++ b/include/grparser.h
@@ -0,0 +1,181 @@
+/* T E M P L A T E P A R S E R H E A D E R F I L E
+ =====================================================
+
+ by Jerzy.Borkowski@obs.unige.ch
+
+ Integral Science Data Center
+ ch. d'Ecogia 16
+ 1290 Versoix
+ Switzerland
+
+14-Oct-98: initial release
+16-Oct-98: reference to fitsio.h removed, also removed strings after #endif
+ directives to make gcc -Wall not to complain
+20-Oct-98: added declarations NGP_XTENSION_SIMPLE and NGP_XTENSION_FIRST
+24-Oct-98: prototype of ngp_read_line() function updated.
+22-Jan-99: prototype for ngp_set_extver() function added.
+*/
+
+#ifndef GRPARSER_H_INCLUDED
+#define GRPARSER_H_INCLUDED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ /* error codes - now defined in fitsio.h */
+
+ /* common constants definitions */
+
+#define NGP_ALLOCCHUNK (1000)
+#define NGP_MAX_INCLUDE (10) /* include file nesting limit */
+#define NGP_MAX_COMMENT (80) /* max size for comment */
+#define NGP_MAX_NAME (20) /* max size for KEYWORD (FITS limits it to 8 chars) */
+#define NGP_MAX_STRING (80) /* max size for various strings */
+#define NGP_MAX_ARRAY_DIM (999) /* max. number of dimensions in array */
+#define NGP_MAX_FNAME (1000) /* max size of combined path+fname */
+#define NGP_MAX_ENVFILES (10000) /* max size of CFITSIO_INCLUDE_FILES env. variable */
+
+#define NGP_TOKEN_UNKNOWN (-1) /* token type unknown */
+#define NGP_TOKEN_INCLUDE (0) /* \INCLUDE token */
+#define NGP_TOKEN_GROUP (1) /* \GROUP token */
+#define NGP_TOKEN_END (2) /* \END token */
+#define NGP_TOKEN_XTENSION (3) /* XTENSION token */
+#define NGP_TOKEN_SIMPLE (4) /* SIMPLE token */
+#define NGP_TOKEN_EOF (5) /* End Of File pseudo token */
+
+#define NGP_TTYPE_UNKNOWN (0) /* undef (yet) token type - invalid to print/write to disk */
+#define NGP_TTYPE_BOOL (1) /* boolean, it is 'T' or 'F' */
+#define NGP_TTYPE_STRING (2) /* something withing "" or starting with letter */
+#define NGP_TTYPE_INT (3) /* starting with digit and not with '.' */
+#define NGP_TTYPE_REAL (4) /* digits + '.' */
+#define NGP_TTYPE_COMPLEX (5) /* 2 reals, separated with ',' */
+#define NGP_TTYPE_NULL (6) /* NULL token, format is : NAME = / comment */
+#define NGP_TTYPE_RAW (7) /* HISTORY/COMMENT/8SPACES + comment string without / */
+
+#define NGP_FOUND_EQUAL_SIGN (1) /* line contains '=' after keyword name */
+
+#define NGP_FORMAT_OK (0) /* line format OK */
+#define NGP_FORMAT_ERROR (1) /* line format error */
+
+#define NGP_NODE_INVALID (0) /* default node type - invalid (to catch errors) */
+#define NGP_NODE_IMAGE (1) /* IMAGE type */
+#define NGP_NODE_ATABLE (2) /* ASCII table type */
+#define NGP_NODE_BTABLE (3) /* BINARY table type */
+
+#define NGP_NON_SYSTEM_ONLY (0) /* save all keywords except NAXIS,BITPIX,etc.. */
+#define NGP_REALLY_ALL (1) /* save really all keywords */
+
+#define NGP_XTENSION_SIMPLE (1) /* HDU defined with SIMPLE T */
+#define NGP_XTENSION_FIRST (2) /* this is first extension in template */
+
+#define NGP_LINE_REREAD (1) /* reread line */
+
+#define NGP_BITPIX_INVALID (-12345) /* default BITPIX (to catch errors) */
+
+ /* common macro definitions */
+
+#ifdef NGP_PARSER_DEBUG_MALLOC
+
+#define ngp_alloc(x) dal_malloc(x)
+#define ngp_free(x) dal_free(x)
+#define ngp_realloc(x,y) dal_realloc(x,y)
+
+#else
+
+#define ngp_alloc(x) malloc(x)
+#define ngp_free(x) free(x)
+#define ngp_realloc(x,y) realloc(x,y)
+
+#endif
+
+ /* type definitions */
+
+typedef struct NGP_RAW_LINE_STRUCT
+ { char *line;
+ char *name;
+ char *value;
+ int type;
+ char *comment;
+ int format;
+ int flags;
+ } NGP_RAW_LINE;
+
+
+typedef union NGP_TOKVAL_UNION
+ { char *s; /* space allocated separately, be careful !!! */
+ char b;
+ int i;
+ double d;
+ struct NGP_COMPLEX_STRUCT
+ { double re;
+ double im;
+ } c; /* complex value */
+ } NGP_TOKVAL;
+
+
+typedef struct NGP_TOKEN_STRUCT
+ { int type;
+ char name[NGP_MAX_NAME];
+ NGP_TOKVAL value;
+ char comment[NGP_MAX_COMMENT];
+ } NGP_TOKEN;
+
+
+typedef struct NGP_HDU_STRUCT
+ { int tokcnt;
+ NGP_TOKEN *tok;
+ } NGP_HDU;
+
+
+typedef struct NGP_TKDEF_STRUCT
+ { char *name;
+ int code;
+ } NGP_TKDEF;
+
+
+typedef struct NGP_EXTVER_TAB_STRUCT
+ { char *extname;
+ int version;
+ } NGP_EXTVER_TAB;
+
+
+ /* globally visible variables declarations */
+
+extern NGP_RAW_LINE ngp_curline;
+extern NGP_RAW_LINE ngp_prevline;
+
+extern int ngp_extver_tab_size;
+extern NGP_EXTVER_TAB *ngp_extver_tab;
+
+
+ /* globally visible functions declarations */
+
+int ngp_get_extver(char *extname, int *version);
+int ngp_set_extver(char *extname, int version);
+int ngp_delete_extver_tab(void);
+int ngp_strcasecmp(char *p1, char *p2);
+int ngp_line_from_file(FILE *fp, char **p);
+int ngp_free_line(void);
+int ngp_free_prevline(void);
+int ngp_read_line_buffered(FILE *fp);
+int ngp_unread_line(void);
+int ngp_extract_tokens(NGP_RAW_LINE *cl);
+int ngp_include_file(char *fname);
+int ngp_read_line(int ignore_blank_lines);
+int ngp_keyword_is_write(NGP_TOKEN *ngp_tok);
+int ngp_keyword_all_write(NGP_HDU *ngph, fitsfile *ffp, int mode);
+int ngp_hdu_init(NGP_HDU *ngph);
+int ngp_hdu_clear(NGP_HDU *ngph);
+int ngp_hdu_insert_token(NGP_HDU *ngph, NGP_TOKEN *newtok);
+int ngp_append_columns(fitsfile *ff, NGP_HDU *ngph, int aftercol);
+int ngp_read_xtension(fitsfile *ff, int parent_hn, int simple_mode);
+int ngp_read_group(fitsfile *ff, char *grpname, int parent_hn);
+
+ /* top level API function - now defined in fitsio.h */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/imcompress.h b/include/imcompress.h
new file mode 100644
index 0000000..c5ba7d2
--- /dev/null
+++ b/include/imcompress.h
@@ -0,0 +1,56 @@
+#define MAX_COMPRESS_DIM 6
+#define COMPRESS_NULL_VALUE -2147483647
+
+typedef struct {
+ char zcmptype[12]; /* compression type string */
+ int compress_type; /* type of compression algorithm */
+ int bitpix; /* FITS data type of image (BITPIX) */
+ int ndim; /* dimension of image */
+ long naxis[MAX_COMPRESS_DIM]; /* length of each axis */
+ int cn_compressed; /* column number for COMPRESSED_DATA column */
+ int cn_uncompressed; /* column number for UNCOMPRESSED_DATA column */
+ int cn_zscale; /* column number for CSCALE column */
+ int cn_zzero; /* column number for CZERO column */
+ int cn_zblank; /* column number for the CBLANK column */
+ double zscale; /* scaling value, if keyword and not column */
+ double zzero; /* zero pt, if keyword and not column */
+ int zblank; /* value for null pixels, if not a column */
+ long nrows; /* number of rows in table */
+ int ncols; /* number of columns in table */
+ int rice_blocksize; /* first compression parameter */
+ int rice_nbits; /* second compression parameter */
+ long tilesize[MAX_COMPRESS_DIM]; /* size of compression tiles */
+ long maxtilelen; /* max number of pixels in each image tile */
+ long maxelem; /* maximum length of variable length arrays */
+} CompressImageInfo;
+
+/* image compression routines */
+static int imcomp_get_image_params(fitsfile *infptr, CompressImageInfo *otb,
+ int *status);
+static int imcomp_init_table(fitsfile *outfptr,
+ CompressImageInfo *otb, int *status);
+static int imcomp_calc_max_elem (int nx, int blocksize);
+static int imcomp_copy_imheader(fitsfile *infptr, fitsfile *outfptr,
+ int *status);
+static int imcomp_img_to_tbl_special (char *card);
+static int imcomp_compress_image (fitsfile *infptr, fitsfile *outfptr,
+ CompressImageInfo *otb, int *status);
+
+/* image decompression routines */
+int fits_read_compressed_img_plane(fitsfile *fptr, int datatype,
+ int bytesperpixel, long nplane, long *firstcoord, long *lastcoord,
+ long *inc, long *naxes, int nullcheck, void *nullval,
+ void *array, char *nullarray, int *anynul, int *status);
+static int imcomp_get_table_params(fitsfile *infptr, CompressImageInfo *itb,
+ int *status);
+static int imcomp_copy_tblheader(fitsfile *infptr, fitsfile *outfptr,
+ int *status);
+static int imcomp_tbl_to_img_special (char *keyname);
+static int imcomp_decompress_tile (fitsfile *infptr, CompressImageInfo *itb,
+ int nrow, int tilesize, int datatype, int nullcheck,
+ void *nulval, void *buffer, char *bnullarray, int *anynul,
+ int *status);
+static int imcomp_copy_overlap (char *tile, int datatype, int ndim,
+ long *tfpixel, long *tlpixel, char *bnullarray, char *image,
+ long *fpixel, long *lpixel, int nullcheck, char *nullarray,
+ int *status);
diff --git a/include/longnam.h b/include/longnam.h
new file mode 100644
index 0000000..ac083bc
--- /dev/null
+++ b/include/longnam.h
@@ -0,0 +1,476 @@
+#ifndef _LONGNAME_H
+#define _LONGNAME_H
+
+#define fits_parse_input_url ffiurl
+#define fits_parse_rootname ffrtnm
+#define fits_parse_output_url ffourl
+#define fits_parse_extspec ffexts
+#define fits_parse_extnum ffextn
+#define fits_parse_binspec ffbins
+#define fits_parse_binrange ffbinr
+#define fits_open_memfile ffomem
+#define fits_open_file ffopen
+#define fits_reopen_file ffreopen
+#define fits_create_file ffinit
+#define fits_create_template fftplt
+#define fits_flush_file ffflus
+#define fits_close_file ffclos
+#define fits_delete_file ffdelt
+#define fits_file_name ffflnm
+#define fits_file_mode ffflmd
+#define fits_url_type ffurlt
+
+#define fits_get_version ffvers
+#define fits_uppercase ffupch
+#define fits_get_errstatus ffgerr
+#define fits_write_errmsg ffpmsg
+#define fits_read_errmsg ffgmsg
+#define fits_clear_errmsg ffcmsg
+#define fits_report_error ffrprt
+#define fits_compare_str ffcmps
+#define fits_test_keyword fftkey
+#define fits_test_record fftrec
+#define fits_null_check ffnchk
+#define fits_make_keyn ffkeyn
+#define fits_make_nkey ffnkey
+#define fits_get_keyclass ffgkcl
+#define fits_get_keytype ffdtyp
+#define fits_parse_value ffpsvc
+#define fits_get_keyname ffgknm
+#define fits_parse_template ffgthd
+#define fits_ascii_tform ffasfm
+#define fits_binary_tform ffbnfm
+#define fits_get_tbcol ffgabc
+#define fits_get_rowsize ffgrsz
+#define fits_get_col_display_width ffgcdw
+
+#define fits_write_record ffprec
+#define fits_write_key ffpky
+#define fits_write_key_unit ffpunt
+#define fits_write_comment ffpcom
+#define fits_write_history ffphis
+#define fits_write_date ffpdat
+#define fits_get_system_time ffgstm
+#define fits_get_system_date ffgsdt
+#define fits_date2str ffdt2s
+#define fits_time2str fftm2s
+#define fits_str2date ffs2dt
+#define fits_str2time ffs2tm
+#define fits_write_key_longstr ffpkls
+#define fits_write_key_longwarn ffplsw
+#define fits_write_key_null ffpkyu
+#define fits_write_key_str ffpkys
+#define fits_write_key_log ffpkyl
+#define fits_write_key_lng ffpkyj
+#define fits_write_key_fixflt ffpkyf
+#define fits_write_key_flt ffpkye
+#define fits_write_key_fixdbl ffpkyg
+#define fits_write_key_dbl ffpkyd
+#define fits_write_key_fixcmp ffpkfc
+#define fits_write_key_cmp ffpkyc
+#define fits_write_key_fixdblcmp ffpkfm
+#define fits_write_key_dblcmp ffpkym
+#define fits_write_key_triple ffpkyt
+#define fits_write_tdim ffptdm
+#define fits_write_keys_str ffpkns
+#define fits_write_keys_log ffpknl
+#define fits_write_keys_lng ffpknj
+#define fits_write_keys_fixflt ffpknf
+#define fits_write_keys_flt ffpkne
+#define fits_write_keys_fixdbl ffpkng
+#define fits_write_keys_dbl ffpknd
+#define fits_copy_key ffcpky
+#define fits_write_imghdr ffphps
+#define fits_write_grphdr ffphpr
+#define fits_write_atblhdr ffphtb
+#define fits_write_btblhdr ffphbn
+#define fits_write_key_template ffpktp
+
+#define fits_get_hdrspace ffghsp
+#define fits_get_hdrpos ffghps
+#define fits_movabs_key ffmaky
+#define fits_movrel_key ffmrky
+#define fits_find_nextkey ffgnxk
+
+#define fits_read_record ffgrec
+#define fits_read_card ffgcrd
+#define fits_read_key_unit ffgunt
+#define fits_read_keyn ffgkyn
+#define fits_read_key ffgky
+#define fits_read_keyword ffgkey
+#define fits_read_key_str ffgkys
+#define fits_read_key_log ffgkyl
+#define fits_read_key_lng ffgkyj
+#define fits_read_key_flt ffgkye
+#define fits_read_key_dbl ffgkyd
+#define fits_read_key_cmp ffgkyc
+#define fits_read_key_dblcmp ffgkym
+#define fits_read_key_triple ffgkyt
+#define fits_read_key_longstr ffgkls
+#define fits_read_tdim ffgtdm
+#define fits_decode_tdim ffdtdm
+#define fits_read_keys_str ffgkns
+#define fits_read_keys_log ffgknl
+#define fits_read_keys_lng ffgknj
+#define fits_read_keys_flt ffgkne
+#define fits_read_keys_dbl ffgknd
+#define fits_read_imghdr ffghpr
+#define fits_read_atblhdr ffghtb
+#define fits_read_btblhdr ffghbn
+#define fits_header2str ffh2st
+
+#define fits_update_card ffucrd
+#define fits_update_key ffuky
+#define fits_update_key_null ffukyu
+#define fits_update_key_str ffukys
+#define fits_update_key_longstr ffukls
+#define fits_update_key_log ffukyl
+#define fits_update_key_lng ffukyj
+#define fits_update_key_fixflt ffukyf
+#define fits_update_key_flt ffukye
+#define fits_update_key_fixdbl ffukyg
+#define fits_update_key_dbl ffukyd
+#define fits_update_key_fixcmp ffukfc
+#define fits_update_key_cmp ffukyc
+#define fits_update_key_fixdblcmp ffukfm
+#define fits_update_key_dblcmp ffukym
+
+#define fits_modify_record ffmrec
+#define fits_modify_card ffmcrd
+#define fits_modify_name ffmnam
+#define fits_modify_comment ffmcom
+#define fits_modify_key_null ffmkyu
+#define fits_modify_key_str ffmkys
+#define fits_modify_key_longstr ffmkls
+#define fits_modify_key_log ffmkyl
+#define fits_modify_key_lng ffmkyj
+#define fits_modify_key_fixflt ffmkyf
+#define fits_modify_key_flt ffmkye
+#define fits_modify_key_fixdbl ffmkyg
+#define fits_modify_key_dbl ffmkyd
+#define fits_modify_key_fixcmp ffmkfc
+#define fits_modify_key_cmp ffmkyc
+#define fits_modify_key_fixdblcmp ffmkfm
+#define fits_modify_key_dblcmp ffmkym
+
+#define fits_insert_record ffirec
+#define fits_insert_key_null ffikyu
+#define fits_insert_key_str ffikys
+#define fits_insert_key_longstr ffikls
+#define fits_insert_key_log ffikyl
+#define fits_insert_key_lng ffikyj
+#define fits_insert_key_fixflt ffikyf
+#define fits_insert_key_flt ffikye
+#define fits_insert_key_fixdbl ffikyg
+#define fits_insert_key_dbl ffikyd
+#define fits_insert_key_fixcmp ffikfc
+#define fits_insert_key_cmp ffikyc
+#define fits_insert_key_fixdblcmp ffikfm
+#define fits_insert_key_dblcmp ffikym
+
+#define fits_delete_key ffdkey
+#define fits_delete_record ffdrec
+#define fits_get_hdu_num ffghdn
+#define fits_get_hdu_type ffghdt
+#define fits_get_hduaddr ffghad
+
+#define fits_get_img_param ffgipr
+#define fits_get_img_type ffgidt
+#define fits_get_img_dim ffgidm
+#define fits_get_img_size ffgisz
+
+#define fits_movabs_hdu ffmahd
+#define fits_movrel_hdu ffmrhd
+#define fits_movnam_hdu ffmnhd
+#define fits_get_num_hdus ffthdu
+#define fits_create_img ffcrim
+#define fits_create_tbl ffcrtb
+#define fits_create_hdu ffcrhd
+#define fits_insert_img ffiimg
+#define fits_insert_atbl ffitab
+#define fits_insert_btbl ffibin
+#define fits_resize_img ffrsim
+#define fits_delete_hdu ffdhdu
+#define fits_copy_hdu ffcopy
+#define fits_copy_header ffcphd
+#define fits_copy_data ffcpdt
+
+#define fits_set_hdustruc ffrdef
+#define fits_set_hdrsize ffhdef
+#define fits_write_theap ffpthp
+
+#define fits_encode_chksum ffesum
+#define fits_decode_chksum ffdsum
+#define fits_write_chksum ffpcks
+#define fits_update_chksum ffupck
+#define fits_verify_chksum ffvcks
+#define fits_get_chksum ffgcks
+
+#define fits_set_bscale ffpscl
+#define fits_set_tscale fftscl
+#define fits_set_imgnull ffpnul
+#define fits_set_btblnull fftnul
+#define fits_set_atblnull ffsnul
+
+#define fits_get_colnum ffgcno
+#define fits_get_colname ffgcnn
+#define fits_get_coltype ffgtcl
+#define fits_get_num_rows ffgnrw
+#define fits_get_num_cols ffgncl
+#define fits_get_acolparms ffgacl
+#define fits_get_bcolparms ffgbcl
+
+#define fits_iterate_data ffiter
+
+#define fits_read_grppar_byt ffggpb
+#define fits_read_grppar_usht ffggpui
+#define fits_read_grppar_ulng ffggpuj
+#define fits_read_grppar_sht ffggpi
+#define fits_read_grppar_lng ffggpj
+#define fits_read_grppar_int ffggpk
+#define fits_read_grppar_uint ffggpuk
+#define fits_read_grppar_flt ffggpe
+#define fits_read_grppar_dbl ffggpd
+
+#define fits_read_img ffgpv
+#define fits_read_imgnull ffgpf
+#define fits_read_img_byt ffgpvb
+#define fits_read_img_usht ffgpvui
+#define fits_read_img_ulng ffgpvuj
+#define fits_read_img_sht ffgpvi
+#define fits_read_img_lng ffgpvj
+#define fits_read_img_uint ffgpvuk
+#define fits_read_img_int ffgpvk
+#define fits_read_img_flt ffgpve
+#define fits_read_img_dbl ffgpvd
+
+#define fits_read_imgnull_byt ffgpfb
+#define fits_read_imgnull_usht ffgpfui
+#define fits_read_imgnull_ulng ffgpfuj
+#define fits_read_imgnull_sht ffgpfi
+#define fits_read_imgnull_lng ffgpfj
+#define fits_read_imgnull_uint ffgpfuk
+#define fits_read_imgnull_int ffgpfk
+#define fits_read_imgnull_flt ffgpfe
+#define fits_read_imgnull_dbl ffgpfd
+
+#define fits_read_2d_byt ffg2db
+#define fits_read_2d_usht ffg2dui
+#define fits_read_2d_ulng ffg2duj
+#define fits_read_2d_sht ffg2di
+#define fits_read_2d_lng ffg2dj
+#define fits_read_2d_uint ffg2duk
+#define fits_read_2d_int ffg2dk
+#define fits_read_2d_flt ffg2de
+#define fits_read_2d_dbl ffg2dd
+
+#define fits_read_3d_byt ffg3db
+#define fits_read_3d_usht ffg3dui
+#define fits_read_3d_ulng ffg3duj
+#define fits_read_3d_sht ffg3di
+#define fits_read_3d_lng ffg3dj
+#define fits_read_3d_uint ffg3duk
+#define fits_read_3d_int ffg3dk
+#define fits_read_3d_flt ffg3de
+#define fits_read_3d_dbl ffg3dd
+
+#define fits_read_subset_byt ffgsvb
+#define fits_read_subset_usht ffgsvui
+#define fits_read_subset_ulng ffgsvuj
+#define fits_read_subset_sht ffgsvi
+#define fits_read_subset_lng ffgsvj
+#define fits_read_subset_uint ffgsvuk
+#define fits_read_subset_int ffgsvk
+#define fits_read_subset_flt ffgsve
+#define fits_read_subset_dbl ffgsvd
+
+#define fits_read_subsetnull_byt ffgsfb
+#define fits_read_subsetnull_usht ffgsfui
+#define fits_read_subsetnull_ulng ffgsfuj
+#define fits_read_subsetnull_sht ffgsfi
+#define fits_read_subsetnull_lng ffgsfj
+#define fits_read_subsetnull_uint ffgsfuk
+#define fits_read_subsetnull_int ffgsfk
+#define fits_read_subsetnull_flt ffgsfe
+#define fits_read_subsetnull_dbl ffgsfd
+
+#define fits_read_col ffgcv
+#define fits_read_colnull ffgcf
+#define fits_read_col_str ffgcvs
+#define fits_read_col_log ffgcvl
+#define fits_read_col_byt ffgcvb
+#define fits_read_col_usht ffgcvui
+#define fits_read_col_ulng ffgcvuj
+#define fits_read_col_sht ffgcvi
+#define fits_read_col_lng ffgcvj
+#define fits_read_col_uint ffgcvuk
+#define fits_read_col_int ffgcvk
+#define fits_read_col_flt ffgcve
+#define fits_read_col_dbl ffgcvd
+#define fits_read_col_cmp ffgcvc
+#define fits_read_col_dblcmp ffgcvm
+#define fits_read_col_bit ffgcx
+#define fits_read_col_bit_usht ffgcxui
+#define fits_read_col_bit_uint ffgcxuk
+
+#define fits_read_colnull_str ffgcfs
+#define fits_read_colnull_log ffgcfl
+#define fits_read_colnull_byt ffgcfb
+#define fits_read_colnull_usht ffgcfui
+#define fits_read_colnull_ulng ffgcfuj
+#define fits_read_colnull_sht ffgcfi
+#define fits_read_colnull_lng ffgcfj
+#define fits_read_colnull_uint ffgcfuk
+#define fits_read_colnull_int ffgcfk
+#define fits_read_colnull_flt ffgcfe
+#define fits_read_colnull_dbl ffgcfd
+#define fits_read_colnull_cmp ffgcfc
+#define fits_read_colnull_dblcmp ffgcfm
+
+#define fits_read_descript ffgdes
+#define fits_read_descripts ffgdess
+#define fits_read_tblbytes ffgtbb
+
+#define fits_write_grppar_byt ffpgpb
+#define fits_write_grppar_usht ffpgpui
+#define fits_write_grppar_ulng ffpgpuj
+#define fits_write_grppar_sht ffpgpi
+#define fits_write_grppar_lng ffpgpj
+#define fits_write_grppar_uint ffpgpuk
+#define fits_write_grppar_int ffpgpk
+#define fits_write_grppar_flt ffpgpe
+#define fits_write_grppar_dbl ffpgpd
+
+#define fits_write_img ffppr
+#define fits_write_img_byt ffpprb
+#define fits_write_img_usht ffpprui
+#define fits_write_img_ulng ffppruj
+#define fits_write_img_sht ffppri
+#define fits_write_img_lng ffpprj
+#define fits_write_img_uint ffppruk
+#define fits_write_img_int ffpprk
+#define fits_write_img_flt ffppre
+#define fits_write_img_dbl ffpprd
+
+#define fits_write_imgnull ffppn
+#define fits_write_imgnull_byt ffppnb
+#define fits_write_imgnull_usht ffppnui
+#define fits_write_imgnull_ulng ffppnuj
+#define fits_write_imgnull_sht ffppni
+#define fits_write_imgnull_lng ffppnj
+#define fits_write_imgnull_uint ffppnuk
+#define fits_write_imgnull_int ffppnk
+#define fits_write_imgnull_flt ffppne
+#define fits_write_imgnull_dbl ffppnd
+
+#define fits_write_img_null ffppru
+#define fits_write_null_img ffpprn
+
+#define fits_write_2d_byt ffp2db
+#define fits_write_2d_usht ffp2dui
+#define fits_write_2d_ulng ffp2duj
+#define fits_write_2d_sht ffp2di
+#define fits_write_2d_lng ffp2dj
+#define fits_write_2d_uint ffp2duk
+#define fits_write_2d_int ffp2dk
+#define fits_write_2d_flt ffp2de
+#define fits_write_2d_dbl ffp2dd
+
+#define fits_write_3d_byt ffp3db
+#define fits_write_3d_usht ffp3dui
+#define fits_write_3d_ulng ffp3duj
+#define fits_write_3d_sht ffp3di
+#define fits_write_3d_lng ffp3dj
+#define fits_write_3d_uint ffp3duk
+#define fits_write_3d_int ffp3dk
+#define fits_write_3d_flt ffp3de
+#define fits_write_3d_dbl ffp3dd
+
+#define fits_write_subset_byt ffpssb
+#define fits_write_subset_usht ffpssui
+#define fits_write_subset_ulng ffpssuj
+#define fits_write_subset_sht ffpssi
+#define fits_write_subset_lng ffpssj
+#define fits_write_subset_uint ffpssuk
+#define fits_write_subset_int ffpssk
+#define fits_write_subset_flt ffpsse
+#define fits_write_subset_dbl ffpssd
+
+#define fits_write_col ffpcl
+#define fits_write_col_str ffpcls
+#define fits_write_col_log ffpcll
+#define fits_write_col_byt ffpclb
+#define fits_write_col_usht ffpclui
+#define fits_write_col_ulng ffpcluj
+#define fits_write_col_sht ffpcli
+#define fits_write_col_lng ffpclj
+#define fits_write_col_uint ffpcluk
+#define fits_write_col_int ffpclk
+#define fits_write_col_flt ffpcle
+#define fits_write_col_dbl ffpcld
+#define fits_write_col_cmp ffpclc
+#define fits_write_col_dblcmp ffpclm
+#define fits_write_col_null ffpclu
+#define fits_write_col_bit ffpclx
+
+#define fits_write_colnull ffpcn
+#define fits_write_colnull_str ffpcns
+#define fits_write_colnull_log ffpcnl
+#define fits_write_colnull_byt ffpcnb
+#define fits_write_colnull_usht ffpcnui
+#define fits_write_colnull_ulng ffpcnuj
+#define fits_write_colnull_sht ffpcni
+#define fits_write_colnull_lng ffpcnj
+#define fits_write_colnull_uint ffpcnuk
+#define fits_write_colnull_int ffpcnk
+#define fits_write_colnull_flt ffpcne
+#define fits_write_colnull_dbl ffpcnd
+
+#define fits_write_descript ffpdes
+
+#define fits_write_tblbytes ffptbb
+#define fits_insert_rows ffirow
+#define fits_delete_rows ffdrow
+#define fits_delete_rowlist ffdrws
+#define fits_insert_col fficol
+#define fits_insert_cols fficls
+#define fits_delete_col ffdcol
+#define fits_copy_col ffcpcl
+#define fits_modify_vector_len ffmvec
+
+#define fits_read_img_coord ffgics
+#define fits_read_tbl_coord ffgtcs
+#define fits_pix_to_world ffwldp
+#define fits_world_to_pix ffxypx
+
+#define fits_get_image_wcs_keys ffgiwcs
+#define fits_get_table_wcs_keys ffgtwcs
+
+#define fits_find_rows fffrow
+#define fits_find_first_row ffffrw
+#define fits_find_rows_cmp fffrwc
+#define fits_select_rows ffsrow
+#define fits_calc_rows ffcrow
+#define fits_calculator ffcalc
+#define fits_calculator_rng ffcalc_rng
+#define fits_test_expr fftexp
+
+#define fits_create_group ffgtcr
+#define fits_insert_group ffgtis
+#define fits_change_group ffgtch
+#define fits_remove_group ffgtrm
+#define fits_copy_group ffgtcp
+#define fits_merge_groups ffgtmg
+#define fits_compact_group ffgtcm
+#define fits_verify_group ffgtvf
+#define fits_open_group ffgtop
+#define fits_add_group_member ffgtam
+#define fits_get_num_members ffgtnm
+
+#define fits_get_num_groups ffgmng
+#define fits_open_member ffgmop
+#define fits_copy_member ffgmcp
+#define fits_transfer_member ffgmtf
+#define fits_remove_member ffgmrm
+
+#endif
diff --git a/include/pctype.h b/include/pctype.h
new file mode 100644
index 0000000..2ef4a67
--- /dev/null
+++ b/include/pctype.h
@@ -0,0 +1,155 @@
+/*
+ * These ones are necessary to override the behaviour of
+ * PINT_cfB, which puts the & on before getting to the
+ * TYPE specific PCINT_cfPP...
+ * The only way to do this is to introduce PCDOUBLE_cfINT,
+ * which means we use PCINT for alot of the generic macros.
+ */
+
+#define PCINT_cfAA PINT_cfAA
+#define PCINT_cfN PINT_cfN
+#define PCINT_cfV PINT_cfV
+#define PCINT_cfZ(T,I,A) (__cfztringv[I]= (int ) *A),
+#define PCINT_cfSEP INT_cfSEP
+#define PCINT_cfCC PINT_cfCC
+#define PCINT_cfB(T,A) _(T,_cfPP) A
+#define PCINT_cfU PINT_cfU
+
+/* These are the real TYPE specific ones, and will need to be
+ * duplicated for FLOAT,...
+ */
+#define PCINT_cfINT PCDOUBLE_cfINT
+#define PCINT_cfAAP(A, B) A
+#define PCINT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define PCINT_cfTYPE int
+#define PCINT_cfVP(A,B) int B = (int) *A; /* For ZSTRINGV_ARGS */
+#define PCINT_cfPP
+#define PCINT_cfCCC(A,B) A
+
+#define PCFLOAT_cfINT PCDOUBLE_cfINT
+#define PCFLOAT_cfAAP(A, B) A
+#define PCFLOAT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define PCFLOAT_cfTYPE float
+#define PCFLOAT_cfVP PCINT_cfVP /* For ZSTRINGV_ARGS */
+#define PCFLOAT_cfPP
+#define PCFLOAT_cfCCC(A,B) A
+
+#define PCDOUBLE_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,PCINT,B,X,Y,Z,0)
+#define PCDOUBLE_cfAAP(A, B) A
+#define PCDOUBLE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+#define PCDOUBLE_cfTYPE double
+#define PCDOUBLE_cfVP PCINT_cfVP /* For ZSTRINGV_ARGS */
+#define PCDOUBLE_cfPP
+#define PCDOUBLE_cfCCC(A,B) A
+
+#define PCLOGICAL_cfINT PCDOUBLE_cfINT
+#define PCLOGICAL_cfA(M,I,A,B) *A=C2FLOGICAL(*A);
+#define PCLOGICAL_cfAAP(A,B) B = A
+#define PCLOGICAL_cfC(A,B,C) *A=C2FLOGICAL(*A);
+#define PCLOGICAL_cfH(S,U,B)
+#define PCLOGICAL_cfJ(B)
+#define PCLOGICAL_cfW(A,B) PLOGICAL_cfW(A,B)
+#define PCLOGICAL_cfS(M,I,A)
+#define PCLOGICAL_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PCLOGICAL,A,B,C,D,E)
+#define PCLOGICAL_cfTYPE int
+#define PCLOGICAL_cfVP PLOGICAL_cfVP /* For ZSTRINGV_ARGS */
+#define PCLOGICAL_cfPP
+#define PCLOGICAL_cfKK PLOGICAL_cfKK
+#define PCLOGICAL_cfCCC(A,B) B = A
+
+/*
+ * I can't find where the following three defines are used...
+ * So they may well be wrong.
+ */
+
+#define PCLOGICAL_cfQ(B)
+#define PCLOGICAL_cfR(A,B,D) *A=C2FLOGICAL(*A);
+#define PCLOGICAL_cfT(M,I,A,B,D) ((*A=F2CLOGICAL(*A)),A)
+
+/* This is to get PZTRINGS to work for dynamically allocated
+ * Contiguous arrays... The problem was that the array is massaged
+ * coming in with the call: c2fstrv( A[0], A[0],... )
+ * and coming out with: f2cstrv( (char *) A, (char *) A,... )
+ *
+ * If you dynamically allocate an array with the trick:
+ *
+ * char ** A;
+ * A = (char **) malloc ( nelements * sizeof(char *) );
+ * A[0] = (char *) malloc (nelements * elemSize * sizeof (char) );
+ * for ( i = 1; i < nelements; i++) A[i] = A[0] + i * elemSize;
+ *
+ * Then the coming in call will kill you if you pass in A, and the
+ * coming out call will kill you if you pass in A[0]...
+ * So, I change the coming in call to (char *)A, and you must then
+ * pass in A[0].
+ *
+ */
+
+
+#undef PZTRINGV_cfA
+#define PZTRINGV_cfA(M,I,A,B) APAZTRINGV_cfA(M,I,A,B, \
+ (_3(M,_ELEMS_,I))*(( _3(M,_ELEMLEN_,I))+1), \
+ (_3(M,_ELEMS_,I)),(_3(M,_ELEMLEN_,I))+1)
+#ifdef vmsFortran
+#define AAZTRINGV_cfA(M,I,A,B, sA,filA,silA) \
+ initfstr(B,malloc((sA)-(filA)),(filA),(silA)-1), \ c2fstrv((char *) A,B.dsc$a_pointer,(silA),(sA));
+#define APAZTRINGV_cfA(M,I,A,B, sA,filA,silA) \
+ initfstr(B,(char *) A,(filA),(silA)-1),c2fstrv((char *) A,(char *)A,(silA),(sA));
+#else
+#define AAZTRINGV_cfA(M,I,A,B, sA,filA,silA) \
+ (B.s=malloc((sA)-(filA)),B.fs=c2fstrv((char *)A,B.s,(B.flen=(silA)-1)+1,(sA)));
+#define APAZTRINGV_cfA(M,I,A,B, sA,filA,silA) \
+ B.fs=c2fstrv((char *) A,(char *) A,(B.flen=(silA)-1)+1,B.sizeofA=(sA));
+#endif
+
+
+/*
+ * This allows for character arrays longer than an unsigned short...
+ */
+
+#ifndef vmsFortran
+#undef STRING_cfV
+#undef PSTRINGV_cfV
+#define STRING_cfV(T,A,B,F) struct {unsigned int clen, flen;} B;
+#define PSTRINGV_cfV(T,A,B,F) struct {char *fs; unsigned int sizeofA, flen;} B;
+#endif
+
+/*
+ * This is to introduce a PZTRING ( NO V ) type
+ */
+
+
+#ifdef vmsFortran
+#define PZTRING_cfV(T,A,B,F) static fstring B={0,DSC$K_DTYPE_T,DSC$K_CLASS_S,NULL};
+#define APATRING_cfA(M,I,A,B,silA) \
+ (B.dsc$w_length=strlen(A),B.dsc$a_pointer=A, \
+ B.dsc$w_length >= silA?0:(memset((A)+B.dsc$w_length,' ',silA-B.dsc$w_length-1), \
+ A[B.dsc$w_length=silA-1]='\0'));
+#define PZTRING_cfC(A,B,C) \
+ (B.dsc$w_length=strlen(A),B.dsc$a_pointer=A, \
+ B.dsc$w_length >= C?0:(memset((A)+B.dsc$w_length,' ',C-B.dsc$w_length-1), \
+ A[B.dsc$w_length=C-1]='\0'));
+#else
+#define PZTRING_cfV(T,A,B,F) int B;
+#define APATRING_cfA(M,I,A,B,silA) \
+ (B=strlen(A),B >= silA?0:(memset((A)+B,' ',silA-B-1)),A[B = silA - 1]='\0');
+#define PZTRING_cfC(A,B,C) \
+ (B=strlen(A),B > C?0:(memset((A)+B,' ',(C - 1)-B-1)),A[B = C - 1]='\0');
+#endif
+
+#define PZTRING_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PZTRING,A,B,C,D,E)
+#define PZTRING_cfINT PVOID_cfINT
+#define PZTRING_cfA(M,I,A,B) APATRING_cfA(M,I,A,B,(_3(M,_ELEMLEN_,I))+1)
+#define PZTRING_cfAA PSTRING_cfCC
+#define PZTRING_cfB PSTRING_cfB
+
+#define PZTRING_cfCC PSTRING_cfCC
+#define PZTRING_cfJ PSTRING_cfJ
+#define PZTRING_cfH STRING_cfH
+#define PZTRING_cfN(T,A) STRING_cfN(T,A) /* CRAY insists on arg.'s here. */
+#define PZTRING_cfS(M,I,A) ,( _3(M,_ELEMLEN_,I) + 1 )
+#define PZTRING_cfU(T,A) char *A
+#define PZTRING_cfW(A,B) kill_trailing(A,' ');
+#define PZTRING_cfZ(T,I,A)
+#define PZTRING_cfSEP INT_cfSEP
+#define PZTRING_cfKK STRING_cfKK
diff --git a/include/region.h b/include/region.h
new file mode 100644
index 0000000..4d7c96c
--- /dev/null
+++ b/include/region.h
@@ -0,0 +1,80 @@
+/***************************************************************/
+/* REGION STUFF */
+/***************************************************************/
+
+#define myPI 3.1415926535897932385
+
+typedef struct {
+ int exists;
+ double xrefval, yrefval;
+ double xrefpix, yrefpix;
+ double xinc, yinc;
+ double rot;
+ char type[6];
+} WCSdata;
+
+typedef enum {
+ point_rgn,
+ line_rgn,
+ circle_rgn,
+ annulus_rgn,
+ ellipse_rgn,
+ elliptannulus_rgn,
+ box_rgn,
+ rectangle_rgn,
+ diamond_rgn,
+ sector_rgn,
+ poly_rgn
+} shapeType;
+
+typedef enum { pixel_fmt, degree_fmt, hhmmss_fmt } coordFmt;
+
+typedef struct {
+ char sign; /* Include or exclude? */
+ shapeType shape; /* Shape of this region */
+
+ union { /* Parameters - In pixels */
+
+ /**** Generic Shape Data ****/
+
+ struct {
+ double p[8]; /* Region parameters */
+ double sinT, cosT; /* For rotated shapes */
+ double a, b; /* Extra scratch area */
+ } gen;
+
+ /**** Polygon Data ****/
+
+ struct {
+ int nPts; /* Number of Polygon pts */
+ double *Pts; /* Polygon points */
+ double xmin,xmax; /* Polygon bounding box */
+ double ymin,ymax;
+ } poly;
+
+ } param;
+
+} RgnShape;
+
+typedef struct {
+ int nShapes;
+ RgnShape *Shapes;
+ WCSdata wcs;
+} SAORegion;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int ffrrgn( const char *filename, WCSdata *wcs, SAORegion **Rgn, int *status );
+int fftrgn( double X, double Y, SAORegion *Rgn );
+void fffrgn( SAORegion *Rgn );
+
+#ifdef __cplusplus
+ }
+#endif
+
+#define fits_read_rgnfile ffrrgn
+#define fits_in_region fftrgn
+#define fits_free_region fffrgn
+
diff --git a/include/ricecomp.h b/include/ricecomp.h
new file mode 100644
index 0000000..4a48328
--- /dev/null
+++ b/include/ricecomp.h
@@ -0,0 +1,107 @@
+/* @(#) buffer.h 1.1 98/07/21 12:34:27 */
+/* buffer.h: structure for compression to buffer rather than to a file, including
+ * bit I/O buffer
+ *
+ * R. White, 19 June 1998
+ */
+
+
+typedef unsigned char Buffer_t;
+
+typedef struct {
+ int bitbuffer; /* bit buffer */
+ int bits_to_go; /* bits to go in buffer */
+ Buffer_t *start; /* start of buffer */
+ Buffer_t *current; /* current position in buffer */
+ Buffer_t *end; /* end of buffer */
+} Buffer;
+
+#define buffree(mf) (free(mf->start), free(mf))
+#define bufused(mf) (mf->current - mf->start)
+#define bufreset(mf) (mf->current = mf->start)
+
+/*
+ * getcbuf, putcbuf macros for character IO to buffer
+ * putcbuf returns EOF on end of buffer, else returns 0
+ */
+#define getcbuf(mf) ((mf->current >= mf->end) ? EOF : *(mf->current)++)
+#define putcbuf(c,mf) \
+ ((mf->current >= mf->end) ? \
+ EOF :\
+ ((*(mf->current)++ = c), 0))
+
+/*
+ * bufalloc sets up buffer of length n
+ */
+
+/* not needed by CFITSIO
+
+static Buffer *bufalloc(int n)
+{
+Buffer *mf;
+
+ mf = (Buffer *) malloc(sizeof(Buffer));
+ if (mf == (Buffer *)NULL) return((Buffer *)NULL);
+
+ mf->start = (Buffer_t *) malloc(n*sizeof(Buffer_t));
+ if (mf->start == (Buffer_t *)NULL) {
+ free(mf);
+ return((Buffer *)NULL);
+ }
+ mf->bits_to_go = 8;
+ mf->end = mf->start + n;
+ mf->current = mf->start;
+ return(mf);
+}
+*/
+
+/*
+ * bufrealloc extends buffer (or truncates it) by
+ * reallocating memory
+ */
+
+/* not needed by CFITSIO
+static int bufrealloc(Buffer *mf, int n)
+{
+int len;
+
+ len = mf->current - mf->start;
+
+ * silently throw away data if buffer is already longer than n *
+ if (len>n) len = n;
+ if (len<0) len = 0;
+
+ mf->start = (Buffer_t *) realloc(mf->start, n*sizeof(Buffer_t));
+ if (mf->start == (Buffer_t *)NULL) return(0);
+
+ mf->end = mf->start + n;
+ mf->current = mf->start + len;
+ return(n);
+}
+*/
+
+/*
+ * bufdump dumps contents of buffer to outfile and resets
+ * it to be empty. Returns number of bytes written.
+ *
+ * Note we don't write out the bit buffer -- you must call
+ * done_outputing_bits() first to ensure that the bit buffer
+ * is written out. I do it this way to allow incremental
+ * buffer dumps while bit IO is still going on.
+ */
+
+/* not needed by CFITSIO
+
+static int bufdump(FILE *outfile, Buffer *buffer)
+{
+int ndump;
+
+ ndump = bufused(buffer);
+ if (fwrite(buffer->start, 1, ndump, outfile) != ndump) {
+ fprintf(stderr, "bufdump: error in write\n");
+ exit(1);
+ }
+ bufreset(buffer);
+ return(ndump);
+}
+*/
diff --git a/include/sgp4.h b/include/sgp4.h
new file mode 100644
index 0000000..289b969
--- /dev/null
+++ b/include/sgp4.h
@@ -0,0 +1,62 @@
+/* H+
+ * Title : sgp4.h
+ * Author : Bryce A. Roberts
+ * Date : 23 February 1999
+ * Synopsis : header file for SGP4 propagation routines
+ * SCCS : @(#)sgp4.h 1.1 03/04/03
+ * Revisions :
+ * mm/dd/yy name description
+ * H-
+ */
+
+#ifndef _SGP4_H
+#define _SGP4_H
+
+#include <math.h>
+#include <stdlib.h>
+#include <time.h>
+#include <strings.h>
+
+#define MJD2000 (51544.0)
+
+/* the data structure itself */
+struct sgp4_st {
+ /* NORAD tle components */
+ double epochTime, n0, n0dt, n0dt2, bstar, i0, raan, e0, w0, M0;
+
+ /* derived variables */
+ double n0dp, a0dp, q0ms4, theta, theta_2, zeta_4, beta0_2, eta, C1,
+ C1_2, C1_3, C1_4, C3, C4, C5, D2, D3, D4, mdot, wdot, raandot;
+ };
+
+typedef struct sgp4_st * SGP4;
+
+/* create a new instance of SGP4 */
+extern SGP4 SGP4_create(void);
+
+/* destroy an instance of SGP4 */
+extern void SGP4_destroy(SGP4 sgp4);
+
+/* convert NORAD time string to TJD */
+extern int SGP4_getTime(const char *str, double *t);
+
+/* do time-invariant initializations */
+extern void SGP4_init(SGP4 sgp4);
+
+/* get a state vector at a point in time */
+extern void SGP4_getStateVector(SGP4 sgp4, double t, double pos[3],
+ double vel[3]);
+
+/* finds the pole (orbit plane normal) */
+extern void SGP4_getPole(double pos[3], double vel[3], double pole[3]);
+
+/* sets the elements of an instance of SGP4 */
+extern void SGP4_set(SGP4 sgp4, double epochTime, double n0dt, double n0dt2,
+ double bstar, double i0, double raan, double e0,
+ double w0, double M0, double n0);
+
+/* precesses a direction vector from t1 to t2 */
+void SGP4_precess(double v[3], double t1, double t2);
+
+
+#endif
diff --git a/include/slalib.h b/include/slalib.h
new file mode 100644
index 0000000..1cba29a
--- /dev/null
+++ b/include/slalib.h
@@ -0,0 +1,418 @@
+#ifndef SLALIBHDEF
+#define SLALIBHDEF
+#include <math.h>
+
+/*
+** - - - - - - - - -
+** s l a l i b . h
+** - - - - - - - - -
+**
+** Prototype function declarations for slalib library.
+**
+** Last revision: 29 November 1996
+**
+** Copyright P.T.Wallace. All rights reserved.
+*/
+
+void slaAddet ( double rm, double dm, double eq, double *rc, double *dc );
+
+void slaAfin ( char *string, int *iptr, float *a, int *j );
+
+double slaAirmas ( double zd );
+
+void slaAltaz ( double ha, double dec, double phi,
+ double *az, double *azd, double *azdd,
+ double *el, double *eld, double *eldd,
+ double *pa, double *pad, double *padd );
+
+void slaAmp ( double ra, double da, double date, double eq,
+ double *rm, double *dm );
+
+void slaAmpqk ( double ra, double da, double amprms[21],
+ double *rm, double *dm );
+
+void slaAop ( double rap, double dap, double date, double dut,
+ double elongm, double phim, double hm, double xp,
+ double yp, double tdk, double pmb, double rh,
+ double wl, double tlr,
+ double *aob, double *zob, double *hob,
+ double *dob, double *rob );
+
+void slaAoppa ( double date, double dut, double elongm, double phim,
+ double hm, double xp, double yp, double tdk, double pmb,
+ double rh, double wl, double tlr, double aoprms[14] );
+
+void slaAoppat ( double date, double aoprms[14] );
+
+void slaAopqk ( double rap, double dap, double aoprms[14],
+ double *aob, double *zob, double *hob,
+ double *dob, double *rob );
+
+void slaAtmdsp ( double tdk, double pmb, double rh, double wl1,
+ double a1, double b1, double wl2, double *a2, double *b2 );
+
+void slaAv2m ( float axvec[3], float rmat[3][3] );
+
+float slaBear ( float a1, float b1, float a2, float b2 );
+
+void slaCaf2r ( int ideg, int iamin, float asec, float *rad, int *j );
+
+void slaCaldj ( int iy, int im, int id, double *djm, int *j );
+
+void slaCalyd ( int iy, int im, int id, int *ny, int *nd, int *j );
+
+void slaCc2s ( float v[3], float *a, float *b );
+
+void slaCc62s ( float v[6], float *a, float *b, float *r,
+ float *ad, float *bd, float *rd );
+
+void slaCd2tf ( int ndp, float days, char *sign, int ihmsf[4] );
+
+void slaCldj ( int iy, int im, int id, double *djm, int *j );
+
+void slaClyd ( int iy, int im, int id, int *ny, int *nd, int *jstat );
+
+void slaCr2af ( int ndp, float angle, char *sign, int idmsf[4] );
+
+void slaCr2tf ( int ndp, float angle, char *sign, int ihmsf[4] );
+
+void slaCs2c ( float a, float b, float v[3] );
+
+void slaCs2c6 ( float a, float b, float r, float ad,
+ float bd, float rd, float v[6] );
+
+void slaCtf2d ( int ihour, int imin, float sec, float *days, int *j );
+
+void slaCtf2r ( int ihour, int imin, float sec, float *rad, int *j );
+
+void slaDaf2r ( int ideg, int iamin, double asec, double *rad, int *j );
+
+void slaDafin ( char *string, int *iptr, double *a, int *j );
+
+double slaDat ( double dju );
+
+void slaDav2m ( double axvec[3], double rmat[3][3] );
+
+double slaDbear ( double a1, double b1, double a2, double b2 );
+
+void slaDbjin ( char *string, int *nstrt,
+ double *dreslt, int *jf1, int *jf2 );
+
+void slaDc62s ( double v[6], double *a, double *b, double *r,
+ double *ad, double *bd, double *rd );
+
+void slaDcc2s ( double v[3], double *a, double *b );
+
+void slaDcmpf ( double coeffs[6], double *xz, double *yz, double *xs,
+ double *ys, double *perp, double *orient );
+
+void slaDcs2c ( double a, double b, double v[3] );
+
+void slaDd2tf ( int ndp, double days, char *sign, int ihmsf[4] );
+
+void slaDe2h ( double ha, double dec, double phi,
+ double *az, double *el );
+
+void slaDeuler ( char *order, double phi, double theta, double psi,
+ double rmat[3][3] );
+
+void slaDfltin ( char *string, int *nstrt, double *dreslt, int *jflag );
+
+void slaDh2e ( double az, double el, double phi, double *ha, double *dec);
+
+void slaDimxv ( double dm[3][3], double va[3], double vb[3] );
+
+void slaDjcal ( int ndp, double djm, int iymdf[4], int *j );
+
+void slaDjcl ( double djm, int *iy, int *im, int *id, double *fd, int *j );
+
+void slaDm2av ( double rmat[3][3], double axvec[3] );
+
+void slaDmat ( int n, double *a, double *y, double *d, int *jf, int *iw );
+
+void slaDmoon ( double date, double pv[6] );
+
+void slaDmxm ( double a[3][3], double b[3][3], double c[3][3] );
+
+void slaDmxv ( double dm[3][3], double va[3], double vb[3] );
+
+void slaDr2af ( int ndp, double angle, char *sign, int idmsf[4] );
+
+void slaDr2tf ( int ndp, double angle, char *sign, int ihmsf[4] );
+
+double slaDrange ( double angle );
+
+double slaDranrm ( double angle );
+
+void slaDs2c6 ( double a, double b, double r, double ad, double bd,
+ double rd, double v[6] );
+
+void slaDs2tp ( double ra, double dec, double raz, double decz,
+ double *xi, double *eta, int *j );
+
+double slaDsep ( double a1, double b1, double a2, double b2 );
+
+double slaDt ( double epoch );
+
+void slaDtf2d ( int ihour, int imin, double sec, double *days, int *j );
+
+void slaDtf2r ( int ihour, int imin, double sec, double *rad, int *j );
+
+void slaDtp2s ( double xi, double eta, double raz, double decz,
+ double *ra, double *dec );
+
+void slaDtp2v ( double xi, double eta, double v0[3], double v[3] );
+
+void slaDtps2c ( double xi, double eta, double ra, double dec,
+ double *raz1, double *decz1,
+ double *raz2, double *decz2, int *n );
+
+void slaDtpv2c ( double xi, double eta, double v[3],
+ double v01[3], double v02[3], int *n );
+
+double slaDtt ( double dju );
+
+void slaDv2tp ( double v[3], double v0[3], double *xi, double *eta, int *j );
+
+double slaDvdv ( double va[3], double vb[3] );
+
+void slaDvn ( double v[3], double uv[3], double *vm );
+
+void slaDvxv ( double va[3], double vb[3], double vc[3] );
+
+void slaE2h ( float ha, float dec, float phi, float *az, float *el );
+
+void slaEarth ( int iy, int id, float fd, float posvel[6] );
+
+void slaEcleq ( double dl, double db, double date, double *dr, double *dd );
+
+void slaEcmat ( double date, double rmat[3][3] );
+
+void slaEcor ( float rm, float dm, int iy, int id, float fd,
+ float *rv, float *tl );
+
+void slaEg50 ( double dr, double dd, double *dl, double *db );
+
+double slaEpb ( double date );
+
+double slaEpb2d ( double epb );
+
+double slaEpco ( char k0, char k, double e );
+
+double slaEpj ( double date );
+
+double slaEpj2d ( double epj );
+
+void slaEqecl ( double dr, double dd, double date, double *dl, double *db );
+
+double slaEqeqx ( double date );
+
+void slaEqgal ( double dr, double dd, double *dl, double *db );
+
+void slaEtrms ( double ep, double ev[3] );
+
+void slaEuler ( char *order, float phi, float theta, float psi,
+ float rmat[3][3] );
+
+void slaEvp ( double date, double deqx,
+ double dvb[3], double dpb[3],
+ double dvh[3], double dph[3] );
+
+void slaFitxy ( int itype, int np, double xye[][2], double xym[][2],
+ double coeffs[6], int *j );
+
+void slaFk425 ( double r1950, double d1950, double dr1950,
+ double dd1950, double p1950, double v1950,
+ double *r2000, double *d2000, double *dr2000,
+ double *dd2000, double *p2000, double *v2000 );
+
+void slaFk45z ( double r1950, double d1950, double bepoch,
+ double *r2000, double *d2000 );
+
+void slaFk524 ( double r2000, double d2000, double dr2000,
+ double dd2000, double p2000, double v2000,
+ double *r1950, double *d1950, double *dr1950,
+ double *dd1950, double *p1950, double *v1950 );
+
+void slaFk54z ( double r2000, double d2000, double bepoch,
+ double *r1950, double *d1950,
+ double *dr1950, double *dd1950 );
+
+void slaFlotin ( char *string, int *nstrt, float *reslt, int *jflag );
+
+void slaGaleq ( double dl, double db, double *dr, double *dd );
+
+void slaGalsup ( double dl, double db, double *dsl, double *dsb );
+
+void slaGe50 ( double dl, double db, double *dr, double *dd );
+
+void slaGeoc ( double p, double h, double *r, double *z );
+
+double slaGmst ( double ut1 );
+
+double slaGmsta ( double date, double ut1 );
+
+void slaH2e ( float az, float el, float phi, float *ha, float *dec );
+
+void slaImxv ( float rm[3][3], float va[3], float vb[3] );
+
+void slaIntin ( char *string, int *nstrt, long *ireslt, int *jflag );
+
+void slaInvf ( double fwds[6], double bkwds[6], int *j );
+
+void slaKbj ( int jb, double e, char *k, int *j );
+
+void slaM2av ( float rmat[3][3], float axvec[3] );
+
+void slaMap ( double rm, double dm, double pr, double pd,
+ double px, double rv, double eq, double date,
+ double *ra, double *da );
+
+void slaMappa ( double eq, double date, double amprms[21] );
+
+void slaMapqk ( double rm, double dm, double pr, double pd,
+ double px, double rv, double amprms[21],
+ double *ra, double *da );
+
+void slaMapqkz ( double rm, double dm, double amprms[21],
+ double *ra, double *da );
+
+void slaMoon ( int iy, int id, float fd, float posvel[6] );
+
+void slaMxm ( float a[3][3], float b[3][3], float c[3][3] );
+
+void slaMxv ( float rm[3][3], float va[3], float vb[3] );
+
+void slaNut ( double date, double rmatn[3][3] );
+
+void slaNutc ( double date, double *dpsi, double *deps, double *eps0 );
+
+void slaOap ( char *type, double ob1, double ob2, double date,
+ double dut, double elongm, double phim, double hm,
+ double xp, double yp, double tdk, double pmb,
+ double rh, double wl, double tlr,
+ double *rap, double *dap );
+
+void slaOapqk ( char *type, double ob1, double ob2, double aoprms[14],
+ double *rap, double *dap );
+
+void slaObs ( int n, char *c, char *name, double *w, double *p, double *h );
+
+double slaPa ( double ha, double dec, double phi );
+
+void slaPcd ( double disco, double *x, double *y );
+
+void slaPda2h ( double p, double d, double a,
+ double *h1, int *j1, double *h2, int *j2 );
+
+void slaPdq2h ( double p, double d, double q,
+ double *h1, int *j1, double *h2, int *j2 );
+
+void slaPlanet ( double date, int np, double pv[6], int *j );
+
+void slaPm ( double r0, double d0, double pr, double pd,
+ double px, double rv, double ep0, double ep1,
+ double *r1, double *d1 );
+
+void slaPolmo ( double elongm, double phim, double xp, double yp,
+ double *elong, double *phi, double *daz );
+
+void slaPrebn ( double bep0, double bep1, double rmatp[3][3] );
+
+void slaPrec ( double ep0, double ep1, double rmatp[3][3] );
+
+void slaPrecl ( double ep0, double ep1, double rmatp[3][3] );
+
+void slaPreces ( char sys[3], double ep0, double ep1,
+ double *ra, double *dc );
+
+void slaPrenut ( double epoch, double date, double rmatpn[3][3] );
+
+void slaPvobs ( double p, double h, double stl, double pv[6] );
+
+void slaPxy ( int np, double xye[][2], double xym[][2],
+ double coeffs[6],
+ double xyp[][2], double *xrms, double *yrms, double *rrms );
+
+float slaRange ( float angle );
+
+float slaRanorm ( float angle );
+
+double slaRcc ( double tdb, double ut1, double wl, double u, double v );
+
+void slaRdplan ( double date, int np, double elong, double phi,
+ double *ra, double *dec, double *diam );
+
+void slaRefco ( double hm, double tdk, double pmb, double rh,
+ double wl, double phi, double tlr, double eps,
+ double *refa, double *refb );
+
+void slaRefro ( double zobs, double hm, double tdk, double pmb,
+ double rh, double wl, double phi, double tlr, double eps,
+ double *ref );
+
+void slaRefv ( double vu[3], double refa, double refb, double vr[3] );
+
+void slaRefz ( double zu, double refa, double refb, double *zr );
+
+float slaRverot ( float phi, float ra, float da, float st );
+
+float slaRvgalc ( float r2000, float d2000 );
+
+float slaRvlg ( float r2000, float d2000 );
+
+float slaRvlsrd ( float r2000, float d2000 );
+
+float slaRvlsrk ( float r2000, float d2000 );
+
+void slaS2tp ( float ra, float dec, float raz, float decz,
+ float *xi, float *eta, int *j );
+
+float slaSep ( float a1, float b1, float a2, float b2 );
+
+void slaSmat ( int n, float *a, float *y, float *d, int *jf, int *iw );
+
+void slaSubet ( double rc, double dc, double eq,
+ double *rm, double *dm );
+
+void slaSupgal ( double dsl, double dsb, double *dl, double *db );
+
+void slaSvd ( int m, int n, int mp, int np,
+ double *a, double *w, double *v, double *work,
+ int *jstat );
+
+void slaSvdcov ( int n, int np, int nc,
+ double *w, double *v, double *work, double *cvm );
+
+void slaSvdsol ( int m, int n, int mp, int np,
+ double *b, double *u, double *w, double *v,
+ double *work, double *x );
+
+void slaTp2s ( float xi, float eta, float raz, float decz,
+ float *ra, float *dec );
+
+void slaTp2v ( float xi, float eta, float v0[3], float v[3] );
+
+void slaTps2c ( float xi, float eta, float ra, float dec,
+ float *raz1, float *decz1,
+ float *raz2, float *decz2, int *n );
+
+void slaTpv2c ( float xi, float eta, float v[3],
+ float v01[3], float v02[3], int *n );
+
+void slaUnpcd ( double disco, double *x, double *y );
+
+void slaV2tp ( float v[3], float v0[3], float *xi, float *eta, int *j );
+
+float slaVdv ( float va[3], float vb[3] );
+
+void slaVn ( float v[3], float uv[3], float *vm );
+
+void slaVxv ( float va[3], float vb[3], float vc[3] );
+
+void slaXy2xy ( double x1, double y1, double coeffs[6],
+ double *x2, double *y2 );
+
+double slaZd ( double ha, double dec, double phi );
+
+#endif
diff --git a/include/slamac.h b/include/slamac.h
new file mode 100644
index 0000000..6b0fa0e
--- /dev/null
+++ b/include/slamac.h
@@ -0,0 +1,100 @@
+#ifndef SLAMACHDEF
+#define SLAMACHDEF
+
+/*
+** - - - - - - - - -
+** s l a m a c . h
+** - - - - - - - - -
+**
+** Macros used by slalib library.
+**
+** Last revision: 5 June 1996
+**
+** Copyright P.T.Wallace. All rights reserved.
+*/
+
+/* max(A,B) - larger (most +ve) of two numbers (generic) */
+#define gmax(A,B) ((A)>(B)?(A):(B))
+
+/* min(A,B) - smaller (least +ve) of two numbers (generic) */
+#define gmin(A,B) ((A)<(B)?(A):(B))
+
+/* dint(A) - truncate to nearest whole number towards zero (double) */
+#define dint(A) ((A)<0.0?ceil(A):floor(A))
+
+/* aint(A) - truncate to nearest whole number towards zero (float) */
+#define aint(A) ((A)<0.0f?(float)ceil((double)(A)):(float)floor((double)(A)))
+
+/* dnint(A) - round to nearest whole number (double) */
+#define dnint(A) ((A)<0.0?ceil((A)-0.5):floor((A)+0.5))
+
+/* anint(A) - round to nearest whole number (float) */
+#define anint(A) ((float)dnint((double)(A)))
+
+/* dsign(A,B) - magnitude of A with sign of B (double) */
+#define dsign(A,B) ((B)<0.0?-(A):(A))
+
+/* dmod(A,B) - A modulo B (double) */
+#define dmod(A,B) ((B)!=0.0?((A)*(B)>0.0?(A)-(B)*floor((A)/(B))\
+ :(A)+(B)*floor(-(A)/(B))):(A))
+
+/* logicals */
+#if !defined(FALSE) || ((FALSE)!=0)
+#define FALSE 0
+#endif
+#if !defined(TRUE) || ((TRUE)!=1)
+#define TRUE 1
+#endif
+
+/* pi */
+#define DPI 3.1415926535897932384626433832795028841971693993751
+
+/* 2pi */
+#define D2PI 6.2831853071795864769252867665590057683943387987502
+
+/* 1/(2pi) */
+#define D1B2PI 0.15915494309189533576888376337251436203445964574046
+
+/* 4pi */
+#define D4PI 12.566370614359172953850573533118011536788677597500
+
+/* 1/(4pi) */
+#define D1B4PI 0.079577471545947667884441881686257181017229822870228
+
+/* pi^2 */
+#define DPISQ 9.8696044010893586188344909998761511353136994072408
+
+/* sqrt(pi) */
+#define DSQRPI 1.7724538509055160272981674833411451827975494561224
+
+/* pi/2: 90 degrees in radians */
+#define DPIBY2 1.5707963267948966192313216916397514420985846996876
+
+/* pi/180: degrees to radians */
+#define DD2R 0.017453292519943295769236907684886127134428718885417
+
+/* 180/pi: radians to degrees */
+#define DR2D 57.295779513082320876798154814105170332405472466564
+
+/* pi/(180*3600): arcseconds to radians */
+#define DAS2R 4.8481368110953599358991410235794797595635330237270e-6
+
+/* 180*3600/pi : radians to arcseconds */
+#define DR2AS 2.0626480624709635515647335733077861319665970087963e5
+
+/* pi/12: hours to radians */
+#define DH2R 0.26179938779914943653855361527329190701643078328126
+
+/* 12/pi: radians to hours */
+#define DR2H 3.8197186342054880584532103209403446888270314977709
+
+/* pi/(12*3600): seconds of time to radians */
+#define DS2R 7.2722052166430399038487115353692196393452995355905e-5
+
+/* 12*3600/pi: radians to seconds of time */
+#define DR2S 1.3750987083139757010431557155385240879777313391975e4
+
+/* 15/(2pi): hours to degrees x radians to turns */
+#define D15B2P 2.3873241463784300365332564505877154305168946861068
+
+#endif
diff --git a/install-sh b/install-sh
new file mode 100755
index 0000000..0b0fdcb
--- /dev/null
+++ b/install-sh
@@ -0,0 +1,501 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2013-12-25.23; # UTC
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# 'make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+tab=' '
+nl='
+'
+IFS=" $tab$nl"
+
+# Set DOITPROG to "echo" to test this script.
+
+doit=${DOITPROG-}
+doit_exec=${doit:-exec}
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+is_target_a_directory=possibly
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+ or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+ --help display this help and exit.
+ --version display version info and exit.
+
+ -c (ignored)
+ -C install only if different (preserve the last data modification time)
+ -d create directories instead of installing files.
+ -g GROUP $chgrpprog installed files to GROUP.
+ -m MODE $chmodprog installed files to MODE.
+ -o USER $chownprog installed files to USER.
+ -s $stripprog installed files.
+ -t DIRECTORY install into DIRECTORY.
+ -T report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+ CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+ RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+ case $1 in
+ -c) ;;
+
+ -C) copy_on_change=true;;
+
+ -d) dir_arg=true;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift;;
+
+ --help) echo "$usage"; exit $?;;
+
+ -m) mode=$2
+ case $mode in
+ *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
+
+ -o) chowncmd="$chownprog $2"
+ shift;;
+
+ -s) stripcmd=$stripprog;;
+
+ -t)
+ is_target_a_directory=always
+ dst_arg=$2
+ # Protect names problematic for 'test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ shift;;
+
+ -T) is_target_a_directory=never;;
+
+ --version) echo "$0 $scriptversion"; exit $?;;
+
+ --) shift
+ break;;
+
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
+
+ *) break;;
+ esac
+ shift
+done
+
+# We allow the use of options -d and -T together, by making -d
+# take the precedence; this is for compatibility with GNU install.
+
+if test -n "$dir_arg"; then
+ if test -n "$dst_arg"; then
+ echo "$0: target directory not allowed when installing a directory." >&2
+ exit 1
+ fi
+fi
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+ # When -d is used, all remaining arguments are directories to create.
+ # When -t is used, the destination is already specified.
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dst_arg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dst_arg"
+ shift # fnord
+ fi
+ shift # arg
+ dst_arg=$arg
+ # Protect names problematic for 'test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ done
+fi
+
+if test $# -eq 0; then
+ if test -z "$dir_arg"; then
+ echo "$0: no input file specified." >&2
+ exit 1
+ fi
+ # It's OK to call 'install-sh -d' without argument.
+ # This can happen when creating conditional directories.
+ exit 0
+fi
+
+if test -z "$dir_arg"; then
+ if test $# -gt 1 || test "$is_target_a_directory" = always; then
+ if test ! -d "$dst_arg"; then
+ echo "$0: $dst_arg: Is not a directory." >&2
+ exit 1
+ fi
+ fi
+fi
+
+if test -z "$dir_arg"; then
+ do_exit='(exit $ret); exit $ret'
+ trap "ret=129; $do_exit" 1
+ trap "ret=130; $do_exit" 2
+ trap "ret=141; $do_exit" 13
+ trap "ret=143; $do_exit" 15
+
+ # Set umask so as not to create temps with too-generous modes.
+ # However, 'strip' requires both read and write access to temps.
+ case $mode in
+ # Optimize common cases.
+ *644) cp_umask=133;;
+ *755) cp_umask=22;;
+
+ *[0-7])
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw='% 200'
+ fi
+ cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+ *)
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw=,u+rw
+ fi
+ cp_umask=$mode$u_plus_rw;;
+ esac
+fi
+
+for src
+do
+ # Protect names problematic for 'test' and other utilities.
+ case $src in
+ -* | [=\(\)!]) src=./$src;;
+ esac
+
+ if test -n "$dir_arg"; then
+ dst=$src
+ dstdir=$dst
+ test -d "$dstdir"
+ dstdir_status=$?
+ else
+
+ # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+ # might cause directories to be created, which would be especially bad
+ # if $src (and thus $dsttmp) contains '*'.
+ if test ! -f "$src" && test ! -d "$src"; then
+ echo "$0: $src does not exist." >&2
+ exit 1
+ fi
+
+ if test -z "$dst_arg"; then
+ echo "$0: no destination specified." >&2
+ exit 1
+ fi
+ dst=$dst_arg
+
+ # If destination is a directory, append the input filename; won't work
+ # if double slashes aren't ignored.
+ if test -d "$dst"; then
+ if test "$is_target_a_directory" = never; then
+ echo "$0: $dst_arg: Is a directory" >&2
+ exit 1
+ fi
+ dstdir=$dst
+ dst=$dstdir/`basename "$src"`
+ dstdir_status=0
+ else
+ dstdir=`dirname "$dst"`
+ test -d "$dstdir"
+ dstdir_status=$?
+ fi
+ fi
+
+ obsolete_mkdir_used=false
+
+ if test $dstdir_status != 0; then
+ case $posix_mkdir in
+ '')
+ # Create intermediate dirs using mode 755 as modified by the umask.
+ # This is like FreeBSD 'install' as of 1997-10-28.
+ umask=`umask`
+ case $stripcmd.$umask in
+ # Optimize common cases.
+ *[2367][2367]) mkdir_umask=$umask;;
+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+ *[0-7])
+ mkdir_umask=`expr $umask + 22 \
+ - $umask % 100 % 40 + $umask % 20 \
+ - $umask % 10 % 4 + $umask % 2
+ `;;
+ *) mkdir_umask=$umask,go-w;;
+ esac
+
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
+ else
+ mkdir_mode=
+ fi
+
+ posix_mkdir=false
+ case $umask in
+ *[123567][0-7][0-7])
+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+ ;;
+ *)
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ if (umask $mkdir_umask &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ ls_ld_tmpdir=`ls -ld "$tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/d" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+ fi
+ trap '' 0;;
+ esac;;
+ esac
+
+ if
+ $posix_mkdir && (
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ )
+ then :
+ else
+
+ # The umask is ridiculous, or mkdir does not conform to POSIX,
+ # or it failed possibly due to a race condition. Create the
+ # directory the slow way, step by step, checking for races as we go.
+
+ case $dstdir in
+ /*) prefix='/';;
+ [-=\(\)!]*) prefix='./';;
+ *) prefix='';;
+ esac
+
+ oIFS=$IFS
+ IFS=/
+ set -f
+ set fnord $dstdir
+ shift
+ set +f
+ IFS=$oIFS
+
+ prefixes=
+
+ for d
+ do
+ test X"$d" = X && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask=$mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
+ done
+
+ if test -n "$prefixes"; then
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
+ fi
+ fi
+ fi
+
+ if test -n "$dir_arg"; then
+ { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+ { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+ else
+
+ # Make a couple of temp file names in the proper directory.
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
+
+ # Trap to clean up those temp files at exit.
+ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+ # Copy the file name to the temp name.
+ (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+ # and set any options; do chmod last to preserve setuid bits.
+ #
+ # If any of these fail, we abort the whole thing. If we want to
+ # ignore errors from any of these, just make sure not to ignore
+ # errors from the above "$doit $cpprog $src $dsttmp" command.
+ #
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+ { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+ { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+ # If -C, don't bother to copy if it wouldn't change the file.
+ if $copy_on_change &&
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+ set -f &&
+ set X $old && old=:$2:$4:$5:$6 &&
+ set X $new && new=:$2:$4:$5:$6 &&
+ set +f &&
+ test "$old" = "$new" &&
+ $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+ then
+ rm -f "$dsttmp"
+ else
+ # Rename the file to the real destination.
+ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+ # The rename failed, perhaps because mv can't rename something else
+ # to itself, or perhaps because mv is so ancient that it does not
+ # support -f.
+ {
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ test ! -f "$dst" ||
+ $doit $rmcmd -f "$dst" 2>/dev/null ||
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+ } ||
+ { echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
+ }
+ fi || exit 1
+
+ trap '' 0
+ fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/ltmain.sh b/ltmain.sh
new file mode 100644
index 0000000..b891526
--- /dev/null
+++ b/ltmain.sh
@@ -0,0 +1,11140 @@
+#! /bin/sh
+## DO NOT EDIT - This file generated from ./build-aux/ltmain.in
+## by inline-source v2014-01-03.01
+
+# libtool (GNU libtool) 2.4.5
+# Provide generalized library-building support services.
+# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+
+# Copyright (C) 1996-2015 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+PROGRAM=libtool
+PACKAGE=libtool
+VERSION=2.4.5
+package_revision=2.4.5
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# Run './libtool --help' for help with using this script from the
+# command line.
+
+
+## ------------------------------- ##
+## User overridable command paths. ##
+## ------------------------------- ##
+
+# After configure completes, it has a better idea of some of the
+# shell tools we need than the defaults used by the functions shared
+# with bootstrap, so set those here where they can still be over-
+# ridden by the user, but otherwise take precedence.
+
+: ${AUTOCONF="autoconf"}
+: ${AUTOMAKE="automake"}
+
+
+## -------------------------- ##
+## Source external libraries. ##
+## -------------------------- ##
+
+# Much of our low-level functionality needs to be sourced from external
+# libraries, which are installed to $pkgauxdir.
+
+# Set a version string for this script.
+scriptversion=2014-01-03.01; # UTC
+
+# General shell script boiler plate, and helper functions.
+# Written by Gary V. Vaughan, 2004
+
+# Copyright (C) 2004-2015 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# As a special exception to the GNU General Public License, if you distribute
+# this file as part of a program or library that is built using GNU Libtool,
+# you may include this file under the same distribution terms that you use
+# for the rest of that program.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Please report bugs or propose patches to gary@gnu.org.
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# Evaluate this file near the top of your script to gain access to
+# the functions and variables defined here:
+#
+# . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh
+#
+# If you need to override any of the default environment variable
+# settings, do that before evaluating this file.
+
+
+## -------------------- ##
+## Shell normalisation. ##
+## -------------------- ##
+
+# Some shells need a little help to be as Bourne compatible as possible.
+# Before doing anything else, make sure all that help has been provided!
+
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac
+fi
+
+# NLS nuisances: We save the old values in case they are required later.
+_G_user_locale=
+_G_safe_locale=
+for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+ eval "if test set = \"\${$_G_var+set}\"; then
+ save_$_G_var=\$$_G_var
+ $_G_var=C
+ export $_G_var
+ _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\"
+ _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\"
+ fi"
+done
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# Make sure IFS has a sensible default
+sp=' '
+nl='
+'
+IFS="$sp $nl"
+
+# There are apparently some retarded systems that use ';' as a PATH separator!
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+
+## ------------------------- ##
+## Locate command utilities. ##
+## ------------------------- ##
+
+
+# func_executable_p FILE
+# ----------------------
+# Check that FILE is an executable regular file.
+func_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+}
+
+
+# func_path_progs PROGS_LIST CHECK_FUNC [PATH]
+# --------------------------------------------
+# Search for either a program that responds to --version with output
+# containing "GNU", or else returned by CHECK_FUNC otherwise, by
+# trying all the directories in PATH with each of the elements of
+# PROGS_LIST.
+#
+# CHECK_FUNC should accept the path to a candidate program, and
+# set $func_check_prog_result if it truncates its output less than
+# $_G_path_prog_max characters.
+func_path_progs ()
+{
+ _G_progs_list=$1
+ _G_check_func=$2
+ _G_PATH=${3-"$PATH"}
+
+ _G_path_prog_max=0
+ _G_path_prog_found=false
+ _G_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for _G_dir in $_G_PATH; do
+ IFS=$_G_save_IFS
+ test -z "$_G_dir" && _G_dir=.
+ for _G_prog_name in $_G_progs_list; do
+ for _exeext in '' .EXE; do
+ _G_path_prog=$_G_dir/$_G_prog_name$_exeext
+ func_executable_p "$_G_path_prog" || continue
+ case `"$_G_path_prog" --version 2>&1` in
+ *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;;
+ *) $_G_check_func $_G_path_prog
+ func_path_progs_result=$func_check_prog_result
+ ;;
+ esac
+ $_G_path_prog_found && break 3
+ done
+ done
+ done
+ IFS=$_G_save_IFS
+ test -z "$func_path_progs_result" && {
+ echo "no acceptable sed could be found in \$PATH" >&2
+ exit 1
+ }
+}
+
+
+# We want to be able to use the functions in this file before configure
+# has figured out where the best binaries are kept, which means we have
+# to search for them ourselves - except when the results are already set
+# where we skip the searches.
+
+# Unless the user overrides by setting SED, search the path for either GNU
+# sed, or the sed that truncates its output the least.
+test -z "$SED" && {
+ _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for _G_i in 1 2 3 4 5 6 7; do
+ _G_sed_script=$_G_sed_script$nl$_G_sed_script
+ done
+ echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed
+ _G_sed_script=
+
+ func_check_prog_sed ()
+ {
+ _G_path_prog=$1
+
+ _G_count=0
+ printf 0123456789 >conftest.in
+ while :
+ do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo '' >> conftest.nl
+ "$_G_path_prog" -f conftest.sed <conftest.nl >conftest.out 2>/dev/null || break
+ diff conftest.out conftest.nl >/dev/null 2>&1 || break
+ _G_count=`expr $_G_count + 1`
+ if test "$_G_count" -gt "$_G_path_prog_max"; then
+ # Best one so far, save it but keep looking for a better one
+ func_check_prog_result=$_G_path_prog
+ _G_path_prog_max=$_G_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test 10 -lt "$_G_count" && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out
+ }
+
+ func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin
+ rm -f conftest.sed
+ SED=$func_path_progs_result
+}
+
+
+# Unless the user overrides by setting GREP, search the path for either GNU
+# grep, or the grep that truncates its output the least.
+test -z "$GREP" && {
+ func_check_prog_grep ()
+ {
+ _G_path_prog=$1
+
+ _G_count=0
+ _G_path_prog_max=0
+ printf 0123456789 >conftest.in
+ while :
+ do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo 'GREP' >> conftest.nl
+ "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' <conftest.nl >conftest.out 2>/dev/null || break
+ diff conftest.out conftest.nl >/dev/null 2>&1 || break
+ _G_count=`expr $_G_count + 1`
+ if test "$_G_count" -gt "$_G_path_prog_max"; then
+ # Best one so far, save it but keep looking for a better one
+ func_check_prog_result=$_G_path_prog
+ _G_path_prog_max=$_G_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test 10 -lt "$_G_count" && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out
+ }
+
+ func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin
+ GREP=$func_path_progs_result
+}
+
+
+## ------------------------------- ##
+## User overridable command paths. ##
+## ------------------------------- ##
+
+# All uppercase variable names are used for environment variables. These
+# variables can be overridden by the user before calling a script that
+# uses them if a suitable command of that name is not already available
+# in the command search PATH.
+
+: ${CP="cp -f"}
+: ${ECHO="printf %s\n"}
+: ${EGREP="$GREP -E"}
+: ${FGREP="$GREP -F"}
+: ${LN_S="ln -s"}
+: ${MAKE="make"}
+: ${MKDIR="mkdir"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
+
+
+## -------------------- ##
+## Useful sed snippets. ##
+## -------------------- ##
+
+sed_dirname='s|/[^/]*$||'
+sed_basename='s|^.*/||'
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s|\([`"$\\]\)|\\\1|g'
+
+# Same as above, but do not quote variable references.
+sed_double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution that turns a string into a regex matching for the
+# string literally.
+sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g'
+
+# Sed substitution that converts a w32 file name or path
+# that contains forward slashes, into one that contains
+# (escaped) backslashes. A very naive implementation.
+sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+
+# Re-'\' parameter expansions in output of sed_double_quote_subst that
+# were '\'-ed in input to the same. If an odd number of '\' preceded a
+# '$' in input to sed_double_quote_subst, that '$' was protected from
+# expansion. Since each input '\' is now two '\'s, look for any number
+# of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'.
+_G_bs='\\'
+_G_bs2='\\\\'
+_G_bs4='\\\\\\\\'
+_G_dollar='\$'
+sed_double_backslash="\
+ s/$_G_bs4/&\\
+/g
+ s/^$_G_bs2$_G_dollar/$_G_bs&/
+ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g
+ s/\n//g"
+
+
+## ----------------- ##
+## Global variables. ##
+## ----------------- ##
+
+# Except for the global variables explicitly listed below, the following
+# functions in the '^func_' namespace, and the '^require_' namespace
+# variables initialised in the 'Resource management' section, sourcing
+# this file will not pollute your global namespace with anything
+# else. There's no portable way to scope variables in Bourne shell
+# though, so actually running these functions will sometimes place
+# results into a variable named after the function, and often use
+# temporary variables in the '^_G_' namespace. If you are careful to
+# avoid using those namespaces casually in your sourcing script, things
+# should continue to work as you expect. And, of course, you can freely
+# overwrite any of the functions or variables defined here before
+# calling anything to customize them.
+
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
+EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
+
+# Allow overriding, eg assuming that you follow the convention of
+# putting '$debug_cmd' at the start of all your functions, you can get
+# bash to show function call trace with:
+#
+# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
+debug_cmd=${debug_cmd-":"}
+exit_cmd=:
+
+# By convention, finish your script with:
+#
+# exit $exit_status
+#
+# so that you can set exit_status to non-zero if you want to indicate
+# something went wrong during execution without actually bailing out at
+# the point of failure.
+exit_status=$EXIT_SUCCESS
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath=$0
+
+# The name of this program.
+progname=`$ECHO "$progpath" |$SED "$sed_basename"`
+
+# Make sure we have an absolute progpath for reexecution:
+case $progpath in
+ [\\/]*|[A-Za-z]:\\*) ;;
+ *[\\/]*)
+ progdir=`$ECHO "$progpath" |$SED "$sed_dirname"`
+ progdir=`cd "$progdir" && pwd`
+ progpath=$progdir/$progname
+ ;;
+ *)
+ _G_IFS=$IFS
+ IFS=${PATH_SEPARATOR-:}
+ for progdir in $PATH; do
+ IFS=$_G_IFS
+ test -x "$progdir/$progname" && break
+ done
+ IFS=$_G_IFS
+ test -n "$progdir" || progdir=`pwd`
+ progpath=$progdir/$progname
+ ;;
+esac
+
+
+## ----------------- ##
+## Standard options. ##
+## ----------------- ##
+
+# The following options affect the operation of the functions defined
+# below, and should be set appropriately depending on run-time para-
+# meters passed on the command line.
+
+opt_dry_run=false
+opt_quiet=false
+opt_verbose=false
+
+# Categories 'all' and 'none' are always available. Append any others
+# you will pass as the first argument to func_warning from your own
+# code.
+warning_categories=
+
+# By default, display warnings according to 'opt_warning_types'. Set
+# 'warning_func' to ':' to elide all warnings, or func_fatal_error to
+# treat the next displayed warning as a fatal error.
+warning_func=func_warn_and_continue
+
+# Set to 'all' to display all warnings, 'none' to suppress all
+# warnings, or a space delimited list of some subset of
+# 'warning_categories' to display only the listed warnings.
+opt_warning_types=all
+
+
+## -------------------- ##
+## Resource management. ##
+## -------------------- ##
+
+# This section contains definitions for functions that each ensure a
+# particular resource (a file, or a non-empty configuration variable for
+# example) is available, and if appropriate to extract default values
+# from pertinent package files. Call them using their associated
+# 'require_*' variable to ensure that they are executed, at most, once.
+#
+# It's entirely deliberate that calling these functions can set
+# variables that don't obey the namespace limitations obeyed by the rest
+# of this file, in order that that they be as useful as possible to
+# callers.
+
+
+# require_term_colors
+# -------------------
+# Allow display of bold text on terminals that support it.
+require_term_colors=func_require_term_colors
+func_require_term_colors ()
+{
+ $debug_cmd
+
+ test -t 1 && {
+ # COLORTERM and USE_ANSI_COLORS environment variables take
+ # precedence, because most terminfo databases neglect to describe
+ # whether color sequences are supported.
+ test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"}
+
+ if test 1 = "$USE_ANSI_COLORS"; then
+ # Standard ANSI escape sequences
+ tc_reset=''
+ tc_bold=''; tc_standout=''
+ tc_red=''; tc_green=''
+ tc_blue=''; tc_cyan=''
+ else
+ # Otherwise trust the terminfo database after all.
+ test -n "`tput sgr0 2>/dev/null`" && {
+ tc_reset=`tput sgr0`
+ test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold`
+ tc_standout=$tc_bold
+ test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso`
+ test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1`
+ test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2`
+ test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4`
+ test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5`
+ }
+ fi
+ }
+
+ require_term_colors=:
+}
+
+
+## ----------------- ##
+## Function library. ##
+## ----------------- ##
+
+# This section contains a variety of useful functions to call in your
+# scripts. Take note of the portable wrappers for features provided by
+# some modern shells, which will fall back to slower equivalents on
+# less featureful shells.
+
+
+# func_append VAR VALUE
+# ---------------------
+# Append VALUE onto the existing contents of VAR.
+
+ # We should try to minimise forks, especially on Windows where they are
+ # unreasonably slow, so skip the feature probes when bash or zsh are
+ # being used:
+ if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then
+ : ${_G_HAVE_ARITH_OP="yes"}
+ : ${_G_HAVE_XSI_OPS="yes"}
+ # The += operator was introduced in bash 3.1
+ case $BASH_VERSION in
+ [12].* | 3.0 | 3.0*) ;;
+ *)
+ : ${_G_HAVE_PLUSEQ_OP="yes"}
+ ;;
+ esac
+ fi
+
+ # _G_HAVE_PLUSEQ_OP
+ # Can be empty, in which case the shell is probed, "yes" if += is
+ # useable or anything else if it does not work.
+ test -z "$_G_HAVE_PLUSEQ_OP" \
+ && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \
+ && _G_HAVE_PLUSEQ_OP=yes
+
+if test yes = "$_G_HAVE_PLUSEQ_OP"
+then
+ # This is an XSI compatible shell, allowing a faster implementation...
+ eval 'func_append ()
+ {
+ $debug_cmd
+
+ eval "$1+=\$2"
+ }'
+else
+ # ...otherwise fall back to using expr, which is often a shell builtin.
+ func_append ()
+ {
+ $debug_cmd
+
+ eval "$1=\$$1\$2"
+ }
+fi
+
+
+# func_append_quoted VAR VALUE
+# ----------------------------
+# Quote VALUE and append to the end of shell variable VAR, separated
+# by a space.
+if test yes = "$_G_HAVE_PLUSEQ_OP"; then
+ eval 'func_append_quoted ()
+ {
+ $debug_cmd
+
+ func_quote_for_eval "$2"
+ eval "$1+=\\ \$func_quote_for_eval_result"
+ }'
+else
+ func_append_quoted ()
+ {
+ $debug_cmd
+
+ func_quote_for_eval "$2"
+ eval "$1=\$$1\\ \$func_quote_for_eval_result"
+ }
+fi
+
+
+# func_append_uniq VAR VALUE
+# --------------------------
+# Append unique VALUE onto the existing contents of VAR, assuming
+# entries are delimited by the first character of VALUE. For example:
+#
+# func_append_uniq options " --another-option option-argument"
+#
+# will only append to $options if " --another-option option-argument "
+# is not already present somewhere in $options already (note spaces at
+# each end implied by leading space in second argument).
+func_append_uniq ()
+{
+ $debug_cmd
+
+ eval _G_current_value='`$ECHO $'$1'`'
+ _G_delim=`expr "$2" : '\(.\)'`
+
+ case $_G_delim$_G_current_value$_G_delim in
+ *"$2$_G_delim"*) ;;
+ *) func_append "$@" ;;
+ esac
+}
+
+
+# func_arith TERM...
+# ------------------
+# Set func_arith_result to the result of evaluating TERMs.
+ test -z "$_G_HAVE_ARITH_OP" \
+ && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \
+ && _G_HAVE_ARITH_OP=yes
+
+if test yes = "$_G_HAVE_ARITH_OP"; then
+ eval 'func_arith ()
+ {
+ $debug_cmd
+
+ func_arith_result=$(( $* ))
+ }'
+else
+ func_arith ()
+ {
+ $debug_cmd
+
+ func_arith_result=`expr "$@"`
+ }
+fi
+
+
+# func_basename FILE
+# ------------------
+# Set func_basename_result to FILE with everything up to and including
+# the last / stripped.
+if test yes = "$_G_HAVE_XSI_OPS"; then
+ # If this shell supports suffix pattern removal, then use it to avoid
+ # forking. Hide the definitions single quotes in case the shell chokes
+ # on unsupported syntax...
+ _b='func_basename_result=${1##*/}'
+ _d='case $1 in
+ */*) func_dirname_result=${1%/*}$2 ;;
+ * ) func_dirname_result=$3 ;;
+ esac'
+
+else
+ # ...otherwise fall back to using sed.
+ _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`'
+ _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"`
+ if test "X$func_dirname_result" = "X$1"; then
+ func_dirname_result=$3
+ else
+ func_append func_dirname_result "$2"
+ fi'
+fi
+
+eval 'func_basename ()
+{
+ $debug_cmd
+
+ '"$_b"'
+}'
+
+
+# func_dirname FILE APPEND NONDIR_REPLACEMENT
+# -------------------------------------------
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+eval 'func_dirname ()
+{
+ $debug_cmd
+
+ '"$_d"'
+}'
+
+
+# func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT
+# --------------------------------------------------------
+# Perform func_basename and func_dirname in a single function
+# call:
+# dirname: Compute the dirname of FILE. If nonempty,
+# add APPEND to the result, otherwise set result
+# to NONDIR_REPLACEMENT.
+# value returned in "$func_dirname_result"
+# basename: Compute filename of FILE.
+# value retuned in "$func_basename_result"
+# For efficiency, we do not delegate to the functions above but instead
+# duplicate the functionality here.
+eval 'func_dirname_and_basename ()
+{
+ $debug_cmd
+
+ '"$_b"'
+ '"$_d"'
+}'
+
+
+# func_echo ARG...
+# ----------------
+# Echo program name prefixed message.
+func_echo ()
+{
+ $debug_cmd
+
+ _G_message=$*
+
+ func_echo_IFS=$IFS
+ IFS=$nl
+ for _G_line in $_G_message; do
+ IFS=$func_echo_IFS
+ $ECHO "$progname: $_G_line"
+ done
+ IFS=$func_echo_IFS
+}
+
+
+# func_echo_all ARG...
+# --------------------
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+ $ECHO "$*"
+}
+
+
+# func_echo_infix_1 INFIX ARG...
+# ------------------------------
+# Echo program name, followed by INFIX on the first line, with any
+# additional lines not showing INFIX.
+func_echo_infix_1 ()
+{
+ $debug_cmd
+
+ $require_term_colors
+
+ _G_infix=$1; shift
+ _G_indent=$_G_infix
+ _G_prefix="$progname: $_G_infix: "
+ _G_message=$*
+
+ # Strip color escape sequences before counting printable length
+ for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan"
+ do
+ test -n "$_G_tc" && {
+ _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"`
+ _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"`
+ }
+ done
+ _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes
+
+ func_echo_infix_1_IFS=$IFS
+ IFS=$nl
+ for _G_line in $_G_message; do
+ IFS=$func_echo_infix_1_IFS
+ $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2
+ _G_prefix=$_G_indent
+ done
+ IFS=$func_echo_infix_1_IFS
+}
+
+
+# func_error ARG...
+# -----------------
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+ $debug_cmd
+
+ $require_term_colors
+
+ func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2
+}
+
+
+# func_fatal_error ARG...
+# -----------------------
+# Echo program name prefixed message to standard error, and exit.
+func_fatal_error ()
+{
+ $debug_cmd
+
+ func_error "$*"
+ exit $EXIT_FAILURE
+}
+
+
+# func_grep EXPRESSION FILENAME
+# -----------------------------
+# Check whether EXPRESSION matches any line of FILENAME, without output.
+func_grep ()
+{
+ $debug_cmd
+
+ $GREP "$1" "$2" >/dev/null 2>&1
+}
+
+
+# func_len STRING
+# ---------------
+# Set func_len_result to the length of STRING. STRING may not
+# start with a hyphen.
+ test -z "$_G_HAVE_XSI_OPS" \
+ && (eval 'x=a/b/c;
+ test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
+ && _G_HAVE_XSI_OPS=yes
+
+if test yes = "$_G_HAVE_XSI_OPS"; then
+ eval 'func_len ()
+ {
+ $debug_cmd
+
+ func_len_result=${#1}
+ }'
+else
+ func_len ()
+ {
+ $debug_cmd
+
+ func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
+ }
+fi
+
+
+# func_mkdir_p DIRECTORY-PATH
+# ---------------------------
+# Make sure the entire path to DIRECTORY-PATH is available.
+func_mkdir_p ()
+{
+ $debug_cmd
+
+ _G_directory_path=$1
+ _G_dir_list=
+
+ if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then
+
+ # Protect directory names starting with '-'
+ case $_G_directory_path in
+ -*) _G_directory_path=./$_G_directory_path ;;
+ esac
+
+ # While some portion of DIR does not yet exist...
+ while test ! -d "$_G_directory_path"; do
+ # ...make a list in topmost first order. Use a colon delimited
+ # list incase some portion of path contains whitespace.
+ _G_dir_list=$_G_directory_path:$_G_dir_list
+
+ # If the last portion added has no slash in it, the list is done
+ case $_G_directory_path in */*) ;; *) break ;; esac
+
+ # ...otherwise throw away the child directory and loop
+ _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"`
+ done
+ _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'`
+
+ func_mkdir_p_IFS=$IFS; IFS=:
+ for _G_dir in $_G_dir_list; do
+ IFS=$func_mkdir_p_IFS
+ # mkdir can fail with a 'File exist' error if two processes
+ # try to create one of the directories concurrently. Don't
+ # stop in that case!
+ $MKDIR "$_G_dir" 2>/dev/null || :
+ done
+ IFS=$func_mkdir_p_IFS
+
+ # Bail out if we (or some other process) failed to create a directory.
+ test -d "$_G_directory_path" || \
+ func_fatal_error "Failed to create '$1'"
+ fi
+}
+
+
+# func_mktempdir [BASENAME]
+# -------------------------
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible. If
+# given, BASENAME is the basename for that directory.
+func_mktempdir ()
+{
+ $debug_cmd
+
+ _G_template=${TMPDIR-/tmp}/${1-$progname}
+
+ if test : = "$opt_dry_run"; then
+ # Return a directory name, but don't create it in dry-run mode
+ _G_tmpdir=$_G_template-$$
+ else
+
+ # If mktemp works, use that first and foremost
+ _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null`
+
+ if test ! -d "$_G_tmpdir"; then
+ # Failing that, at least try and use $RANDOM to avoid a race
+ _G_tmpdir=$_G_template-${RANDOM-0}$$
+
+ func_mktempdir_umask=`umask`
+ umask 0077
+ $MKDIR "$_G_tmpdir"
+ umask $func_mktempdir_umask
+ fi
+
+ # If we're not in dry-run mode, bomb out on failure
+ test -d "$_G_tmpdir" || \
+ func_fatal_error "cannot create temporary directory '$_G_tmpdir'"
+ fi
+
+ $ECHO "$_G_tmpdir"
+}
+
+
+# func_normal_abspath PATH
+# ------------------------
+# Remove doubled-up and trailing slashes, "." path components,
+# and cancel out any ".." path components in PATH after making
+# it an absolute path.
+func_normal_abspath ()
+{
+ $debug_cmd
+
+ # These SED scripts presuppose an absolute path with a trailing slash.
+ _G_pathcar='s|^/\([^/]*\).*$|\1|'
+ _G_pathcdr='s|^/[^/]*||'
+ _G_removedotparts=':dotsl
+ s|/\./|/|g
+ t dotsl
+ s|/\.$|/|'
+ _G_collapseslashes='s|/\{1,\}|/|g'
+ _G_finalslash='s|/*$|/|'
+
+ # Start from root dir and reassemble the path.
+ func_normal_abspath_result=
+ func_normal_abspath_tpath=$1
+ func_normal_abspath_altnamespace=
+ case $func_normal_abspath_tpath in
+ "")
+ # Empty path, that just means $cwd.
+ func_stripname '' '/' "`pwd`"
+ func_normal_abspath_result=$func_stripname_result
+ return
+ ;;
+ # The next three entries are used to spot a run of precisely
+ # two leading slashes without using negated character classes;
+ # we take advantage of case's first-match behaviour.
+ ///*)
+ # Unusual form of absolute path, do nothing.
+ ;;
+ //*)
+ # Not necessarily an ordinary path; POSIX reserves leading '//'
+ # and for example Cygwin uses it to access remote file shares
+ # over CIFS/SMB, so we conserve a leading double slash if found.
+ func_normal_abspath_altnamespace=/
+ ;;
+ /*)
+ # Absolute path, do nothing.
+ ;;
+ *)
+ # Relative path, prepend $cwd.
+ func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
+ ;;
+ esac
+
+ # Cancel out all the simple stuff to save iterations. We also want
+ # the path to end with a slash for ease of parsing, so make sure
+ # there is one (and only one) here.
+ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"`
+ while :; do
+ # Processed it all yet?
+ if test / = "$func_normal_abspath_tpath"; then
+ # If we ascended to the root using ".." the result may be empty now.
+ if test -z "$func_normal_abspath_result"; then
+ func_normal_abspath_result=/
+ fi
+ break
+ fi
+ func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$_G_pathcar"`
+ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$_G_pathcdr"`
+ # Figure out what to do with it
+ case $func_normal_abspath_tcomponent in
+ "")
+ # Trailing empty path component, ignore it.
+ ;;
+ ..)
+ # Parent dir; strip last assembled component from result.
+ func_dirname "$func_normal_abspath_result"
+ func_normal_abspath_result=$func_dirname_result
+ ;;
+ *)
+ # Actual path component, append it.
+ func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent"
+ ;;
+ esac
+ done
+ # Restore leading double-slash if one was found on entry.
+ func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
+}
+
+
+# func_notquiet ARG...
+# --------------------
+# Echo program name prefixed message only when not in quiet mode.
+func_notquiet ()
+{
+ $debug_cmd
+
+ $opt_quiet || func_echo ${1+"$@"}
+
+ # A bug in bash halts the script if the last line of a function
+ # fails when set -e is in force, so we need another command to
+ # work around that:
+ :
+}
+
+
+# func_relative_path SRCDIR DSTDIR
+# --------------------------------
+# Set func_relative_path_result to the relative path from SRCDIR to DSTDIR.
+func_relative_path ()
+{
+ $debug_cmd
+
+ func_relative_path_result=
+ func_normal_abspath "$1"
+ func_relative_path_tlibdir=$func_normal_abspath_result
+ func_normal_abspath "$2"
+ func_relative_path_tbindir=$func_normal_abspath_result
+
+ # Ascend the tree starting from libdir
+ while :; do
+ # check if we have found a prefix of bindir
+ case $func_relative_path_tbindir in
+ $func_relative_path_tlibdir)
+ # found an exact match
+ func_relative_path_tcancelled=
+ break
+ ;;
+ $func_relative_path_tlibdir*)
+ # found a matching prefix
+ func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
+ func_relative_path_tcancelled=$func_stripname_result
+ if test -z "$func_relative_path_result"; then
+ func_relative_path_result=.
+ fi
+ break
+ ;;
+ *)
+ func_dirname $func_relative_path_tlibdir
+ func_relative_path_tlibdir=$func_dirname_result
+ if test -z "$func_relative_path_tlibdir"; then
+ # Have to descend all the way to the root!
+ func_relative_path_result=../$func_relative_path_result
+ func_relative_path_tcancelled=$func_relative_path_tbindir
+ break
+ fi
+ func_relative_path_result=../$func_relative_path_result
+ ;;
+ esac
+ done
+
+ # Now calculate path; take care to avoid doubling-up slashes.
+ func_stripname '' '/' "$func_relative_path_result"
+ func_relative_path_result=$func_stripname_result
+ func_stripname '/' '/' "$func_relative_path_tcancelled"
+ if test -n "$func_stripname_result"; then
+ func_append func_relative_path_result "/$func_stripname_result"
+ fi
+
+ # Normalisation. If bindir is libdir, return '.' else relative path.
+ if test -n "$func_relative_path_result"; then
+ func_stripname './' '' "$func_relative_path_result"
+ func_relative_path_result=$func_stripname_result
+ fi
+
+ test -n "$func_relative_path_result" || func_relative_path_result=.
+
+ :
+}
+
+
+# func_quote_for_eval ARG...
+# --------------------------
+# Aesthetically quote ARGs to be evaled later.
+# This function returns two values:
+# i) func_quote_for_eval_result
+# double-quoted, suitable for a subsequent eval
+# ii) func_quote_for_eval_unquoted_result
+# has all characters that are still active within double
+# quotes backslashified.
+func_quote_for_eval ()
+{
+ $debug_cmd
+
+ func_quote_for_eval_unquoted_result=
+ func_quote_for_eval_result=
+ while test 0 -lt $#; do
+ case $1 in
+ *[\\\`\"\$]*)
+ _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;;
+ *)
+ _G_unquoted_arg=$1 ;;
+ esac
+ if test -n "$func_quote_for_eval_unquoted_result"; then
+ func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg"
+ else
+ func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg"
+ fi
+
+ case $_G_unquoted_arg in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting, command substitution and variable expansion
+ # for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ _G_quoted_arg=\"$_G_unquoted_arg\"
+ ;;
+ *)
+ _G_quoted_arg=$_G_unquoted_arg
+ ;;
+ esac
+
+ if test -n "$func_quote_for_eval_result"; then
+ func_append func_quote_for_eval_result " $_G_quoted_arg"
+ else
+ func_append func_quote_for_eval_result "$_G_quoted_arg"
+ fi
+ shift
+ done
+}
+
+
+# func_quote_for_expand ARG
+# -------------------------
+# Aesthetically quote ARG to be evaled later; same as above,
+# but do not quote variable references.
+func_quote_for_expand ()
+{
+ $debug_cmd
+
+ case $1 in
+ *[\\\`\"]*)
+ _G_arg=`$ECHO "$1" | $SED \
+ -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;;
+ *)
+ _G_arg=$1 ;;
+ esac
+
+ case $_G_arg in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting and command substitution for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ _G_arg=\"$_G_arg\"
+ ;;
+ esac
+
+ func_quote_for_expand_result=$_G_arg
+}
+
+
+# func_stripname PREFIX SUFFIX NAME
+# ---------------------------------
+# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+if test yes = "$_G_HAVE_XSI_OPS"; then
+ eval 'func_stripname ()
+ {
+ $debug_cmd
+
+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+ # positional parameters, so assign one to ordinary variable first.
+ func_stripname_result=$3
+ func_stripname_result=${func_stripname_result#"$1"}
+ func_stripname_result=${func_stripname_result%"$2"}
+ }'
+else
+ func_stripname ()
+ {
+ $debug_cmd
+
+ case $2 in
+ .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;;
+ *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;;
+ esac
+ }
+fi
+
+
+# func_show_eval CMD [FAIL_EXP]
+# -----------------------------
+# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is
+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.
+func_show_eval ()
+{
+ $debug_cmd
+
+ _G_cmd=$1
+ _G_fail_exp=${2-':'}
+
+ func_quote_for_expand "$_G_cmd"
+ eval "func_notquiet $func_quote_for_expand_result"
+
+ $opt_dry_run || {
+ eval "$_G_cmd"
+ _G_status=$?
+ if test 0 -ne "$_G_status"; then
+ eval "(exit $_G_status); $_G_fail_exp"
+ fi
+ }
+}
+
+
+# func_show_eval_locale CMD [FAIL_EXP]
+# ------------------------------------
+# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is
+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it. Use the saved locale for evaluation.
+func_show_eval_locale ()
+{
+ $debug_cmd
+
+ _G_cmd=$1
+ _G_fail_exp=${2-':'}
+
+ $opt_quiet || {
+ func_quote_for_expand "$_G_cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+
+ $opt_dry_run || {
+ eval "$_G_user_locale
+ $_G_cmd"
+ _G_status=$?
+ eval "$_G_safe_locale"
+ if test 0 -ne "$_G_status"; then
+ eval "(exit $_G_status); $_G_fail_exp"
+ fi
+ }
+}
+
+
+# func_tr_sh
+# ----------
+# Turn $1 into a string suitable for a shell variable name.
+# Result is stored in $func_tr_sh_result. All characters
+# not in the set a-zA-Z0-9_ are replaced with '_'. Further,
+# if $1 begins with a digit, a '_' is prepended as well.
+func_tr_sh ()
+{
+ $debug_cmd
+
+ case $1 in
+ [0-9]* | *[!a-zA-Z0-9_]*)
+ func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'`
+ ;;
+ * )
+ func_tr_sh_result=$1
+ ;;
+ esac
+}
+
+
+# func_verbose ARG...
+# -------------------
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
+{
+ $debug_cmd
+
+ $opt_verbose && func_echo "$*"
+
+ :
+}
+
+
+# func_warn_and_continue ARG...
+# -----------------------------
+# Echo program name prefixed warning message to standard error.
+func_warn_and_continue ()
+{
+ $debug_cmd
+
+ $require_term_colors
+
+ func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2
+}
+
+
+# func_warning CATEGORY ARG...
+# ----------------------------
+# Echo program name prefixed warning message to standard error. Warning
+# messages can be filtered according to CATEGORY, where this function
+# elides messages where CATEGORY is not listed in the global variable
+# 'opt_warning_types'.
+func_warning ()
+{
+ $debug_cmd
+
+ # CATEGORY must be in the warning_categories list!
+ case " $warning_categories " in
+ *" $1 "*) ;;
+ *) func_internal_error "invalid warning category '$1'" ;;
+ esac
+
+ _G_category=$1
+ shift
+
+ case " $opt_warning_types " in
+ *" $_G_category "*) $warning_func ${1+"$@"} ;;
+ esac
+}
+
+
+# func_sort_ver VER1 VER2
+# -----------------------
+# 'sort -V' is not generally available.
+# Note this deviates from the version comparison in automake
+# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a
+# but this should suffice as we won't be specifying old
+# version formats or redundant trailing .0 in bootstrap.conf.
+# If we did want full compatibility then we should probably
+# use m4_version_compare from autoconf.
+func_sort_ver ()
+{
+ $debug_cmd
+
+ printf '%s\n%s\n' "$1" "$2" \
+ | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n
+}
+
+# func_lt_ver PREV CURR
+# ---------------------
+# Return true if PREV and CURR are in the correct order according to
+# func_sort_ver, otherwise false. Use it like this:
+#
+# func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..."
+func_lt_ver ()
+{
+ $debug_cmd
+
+ test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q`
+}
+
+
+# Local variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
+# time-stamp-time-zone: "UTC"
+# End:
+#! /bin/sh
+
+# Set a version string for this script.
+scriptversion=2014-01-07.03; # UTC
+
+# A portable, pluggable option parser for Bourne shell.
+# Written by Gary V. Vaughan, 2010
+
+# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Please report bugs or propose patches to gary@gnu.org.
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# This file is a library for parsing options in your shell scripts along
+# with assorted other useful supporting features that you can make use
+# of too.
+#
+# For the simplest scripts you might need only:
+#
+# #!/bin/sh
+# . relative/path/to/funclib.sh
+# . relative/path/to/options-parser
+# scriptversion=1.0
+# func_options ${1+"$@"}
+# eval set dummy "$func_options_result"; shift
+# ...rest of your script...
+#
+# In order for the '--version' option to work, you will need to have a
+# suitably formatted comment like the one at the top of this file
+# starting with '# Written by ' and ending with '# warranty; '.
+#
+# For '-h' and '--help' to work, you will also need a one line
+# description of your script's purpose in a comment directly above the
+# '# Written by ' line, like the one at the top of this file.
+#
+# The default options also support '--debug', which will turn on shell
+# execution tracing (see the comment above debug_cmd below for another
+# use), and '--verbose' and the func_verbose function to allow your script
+# to display verbose messages only when your user has specified
+# '--verbose'.
+#
+# After sourcing this file, you can plug processing for additional
+# options by amending the variables from the 'Configuration' section
+# below, and following the instructions in the 'Option parsing'
+# section further down.
+
+## -------------- ##
+## Configuration. ##
+## -------------- ##
+
+# You should override these variables in your script after sourcing this
+# file so that they reflect the customisations you have added to the
+# option parser.
+
+# The usage line for option parsing errors and the start of '-h' and
+# '--help' output messages. You can embed shell variables for delayed
+# expansion at the time the message is displayed, but you will need to
+# quote other shell meta-characters carefully to prevent them being
+# expanded when the contents are evaled.
+usage='$progpath [OPTION]...'
+
+# Short help message in response to '-h' and '--help'. Add to this or
+# override it after sourcing this library to reflect the full set of
+# options your script accepts.
+usage_message="\
+ --debug enable verbose shell tracing
+ -W, --warnings=CATEGORY
+ report the warnings falling in CATEGORY [all]
+ -v, --verbose verbosely report processing
+ --version print version information and exit
+ -h, --help print short or long help message and exit
+"
+
+# Additional text appended to 'usage_message' in response to '--help'.
+long_help_message="
+Warning categories include:
+ 'all' show all warnings
+ 'none' turn off all the warnings
+ 'error' warnings are treated as fatal errors"
+
+# Help message printed before fatal option parsing errors.
+fatal_help="Try '\$progname --help' for more information."
+
+
+
+## ------------------------- ##
+## Hook function management. ##
+## ------------------------- ##
+
+# This section contains functions for adding, removing, and running hooks
+# to the main code. A hook is just a named list of of function, that can
+# be run in order later on.
+
+# func_hookable FUNC_NAME
+# -----------------------
+# Declare that FUNC_NAME will run hooks added with
+# 'func_add_hook FUNC_NAME ...'.
+func_hookable ()
+{
+ $debug_cmd
+
+ func_append hookable_fns " $1"
+}
+
+
+# func_add_hook FUNC_NAME HOOK_FUNC
+# ---------------------------------
+# Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must
+# first have been declared "hookable" by a call to 'func_hookable'.
+func_add_hook ()
+{
+ $debug_cmd
+
+ case " $hookable_fns " in
+ *" $1 "*) ;;
+ *) func_fatal_error "'$1' does not accept hook functions." ;;
+ esac
+
+ eval func_append ${1}_hooks '" $2"'
+}
+
+
+# func_remove_hook FUNC_NAME HOOK_FUNC
+# ------------------------------------
+# Remove HOOK_FUNC from the list of functions called by FUNC_NAME.
+func_remove_hook ()
+{
+ $debug_cmd
+
+ eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`'
+}
+
+
+# func_run_hooks FUNC_NAME [ARG]...
+# ---------------------------------
+# Run all hook functions registered to FUNC_NAME.
+# It is assumed that the list of hook functions contains nothing more
+# than a whitespace-delimited list of legal shell function names, and
+# no effort is wasted trying to catch shell meta-characters or preserve
+# whitespace.
+func_run_hooks ()
+{
+ $debug_cmd
+
+ case " $hookable_fns " in
+ *" $1 "*) ;;
+ *) func_fatal_error "'$1' does not support hook funcions.n" ;;
+ esac
+
+ eval _G_hook_fns=\$$1_hooks; shift
+
+ for _G_hook in $_G_hook_fns; do
+ eval $_G_hook '"$@"'
+
+ # store returned options list back into positional
+ # parameters for next 'cmd' execution.
+ eval _G_hook_result=\$${_G_hook}_result
+ eval set dummy "$_G_hook_result"; shift
+ done
+
+ func_quote_for_eval ${1+"$@"}
+ func_run_hooks_result=$func_quote_for_eval_result
+}
+
+
+
+## --------------- ##
+## Option parsing. ##
+## --------------- ##
+
+# In order to add your own option parsing hooks, you must accept the
+# full positional parameter list in your hook function, remove any
+# options that you action, and then pass back the remaining unprocessed
+# options in '<hooked_function_name>_result', escaped suitably for
+# 'eval'. Like this:
+#
+# my_options_prep ()
+# {
+# $debug_cmd
+#
+# # Extend the existing usage message.
+# usage_message=$usage_message'
+# -s, --silent don'\''t print informational messages
+# '
+#
+# func_quote_for_eval ${1+"$@"}
+# my_options_prep_result=$func_quote_for_eval_result
+# }
+# func_add_hook func_options_prep my_options_prep
+#
+#
+# my_silent_option ()
+# {
+# $debug_cmd
+#
+# # Note that for efficiency, we parse as many options as we can
+# # recognise in a loop before passing the remainder back to the
+# # caller on the first unrecognised argument we encounter.
+# while test $# -gt 0; do
+# opt=$1; shift
+# case $opt in
+# --silent|-s) opt_silent=: ;;
+# # Separate non-argument short options:
+# -s*) func_split_short_opt "$_G_opt"
+# set dummy "$func_split_short_opt_name" \
+# "-$func_split_short_opt_arg" ${1+"$@"}
+# shift
+# ;;
+# *) set dummy "$_G_opt" "$*"; shift; break ;;
+# esac
+# done
+#
+# func_quote_for_eval ${1+"$@"}
+# my_silent_option_result=$func_quote_for_eval_result
+# }
+# func_add_hook func_parse_options my_silent_option
+#
+#
+# my_option_validation ()
+# {
+# $debug_cmd
+#
+# $opt_silent && $opt_verbose && func_fatal_help "\
+# '--silent' and '--verbose' options are mutually exclusive."
+#
+# func_quote_for_eval ${1+"$@"}
+# my_option_validation_result=$func_quote_for_eval_result
+# }
+# func_add_hook func_validate_options my_option_validation
+#
+# You'll alse need to manually amend $usage_message to reflect the extra
+# options you parse. It's preferable to append if you can, so that
+# multiple option parsing hooks can be added safely.
+
+
+# func_options [ARG]...
+# ---------------------
+# All the functions called inside func_options are hookable. See the
+# individual implementations for details.
+func_hookable func_options
+func_options ()
+{
+ $debug_cmd
+
+ func_options_prep ${1+"$@"}
+ eval func_parse_options \
+ ${func_options_prep_result+"$func_options_prep_result"}
+ eval func_validate_options \
+ ${func_parse_options_result+"$func_parse_options_result"}
+
+ eval func_run_hooks func_options \
+ ${func_validate_options_result+"$func_validate_options_result"}
+
+ # save modified positional parameters for caller
+ func_options_result=$func_run_hooks_result
+}
+
+
+# func_options_prep [ARG]...
+# --------------------------
+# All initialisations required before starting the option parse loop.
+# Note that when calling hook functions, we pass through the list of
+# positional parameters. If a hook function modifies that list, and
+# needs to propogate that back to rest of this script, then the complete
+# modified list must be put in 'func_run_hooks_result' before
+# returning.
+func_hookable func_options_prep
+func_options_prep ()
+{
+ $debug_cmd
+
+ # Option defaults:
+ opt_verbose=false
+ opt_warning_types=
+
+ func_run_hooks func_options_prep ${1+"$@"}
+
+ # save modified positional parameters for caller
+ func_options_prep_result=$func_run_hooks_result
+}
+
+
+# func_parse_options [ARG]...
+# ---------------------------
+# The main option parsing loop.
+func_hookable func_parse_options
+func_parse_options ()
+{
+ $debug_cmd
+
+ func_parse_options_result=
+
+ # this just eases exit handling
+ while test $# -gt 0; do
+ # Defer to hook functions for initial option parsing, so they
+ # get priority in the event of reusing an option name.
+ func_run_hooks func_parse_options ${1+"$@"}
+
+ # Adjust func_parse_options positional parameters to match
+ eval set dummy "$func_run_hooks_result"; shift
+
+ # Break out of the loop if we already parsed every option.
+ test $# -gt 0 || break
+
+ _G_opt=$1
+ shift
+ case $_G_opt in
+ --debug|-x) debug_cmd='set -x'
+ func_echo "enabling shell trace mode"
+ $debug_cmd
+ ;;
+
+ --no-warnings|--no-warning|--no-warn)
+ set dummy --warnings none ${1+"$@"}
+ shift
+ ;;
+
+ --warnings|--warning|-W)
+ test $# = 0 && func_missing_arg $_G_opt && break
+ case " $warning_categories $1" in
+ *" $1 "*)
+ # trailing space prevents matching last $1 above
+ func_append_uniq opt_warning_types " $1"
+ ;;
+ *all)
+ opt_warning_types=$warning_categories
+ ;;
+ *none)
+ opt_warning_types=none
+ warning_func=:
+ ;;
+ *error)
+ opt_warning_types=$warning_categories
+ warning_func=func_fatal_error
+ ;;
+ *)
+ func_fatal_error \
+ "unsupported warning category: '$1'"
+ ;;
+ esac
+ shift
+ ;;
+
+ --verbose|-v) opt_verbose=: ;;
+ --version) func_version ;;
+ -\?|-h) func_usage ;;
+ --help) func_help ;;
+
+ # Separate optargs to long options (plugins may need this):
+ --*=*) func_split_equals "$_G_opt"
+ set dummy "$func_split_equals_lhs" \
+ "$func_split_equals_rhs" ${1+"$@"}
+ shift
+ ;;
+
+ # Separate optargs to short options:
+ -W*)
+ func_split_short_opt "$_G_opt"
+ set dummy "$func_split_short_opt_name" \
+ "$func_split_short_opt_arg" ${1+"$@"}
+ shift
+ ;;
+
+ # Separate non-argument short options:
+ -\?*|-h*|-v*|-x*)
+ func_split_short_opt "$_G_opt"
+ set dummy "$func_split_short_opt_name" \
+ "-$func_split_short_opt_arg" ${1+"$@"}
+ shift
+ ;;
+
+ --) break ;;
+ -*) func_fatal_help "unrecognised option: '$_G_opt'" ;;
+ *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
+ esac
+ done
+
+ # save modified positional parameters for caller
+ func_quote_for_eval ${1+"$@"}
+ func_parse_options_result=$func_quote_for_eval_result
+}
+
+
+# func_validate_options [ARG]...
+# ------------------------------
+# Perform any sanity checks on option settings and/or unconsumed
+# arguments.
+func_hookable func_validate_options
+func_validate_options ()
+{
+ $debug_cmd
+
+ # Display all warnings if -W was not given.
+ test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
+
+ func_run_hooks func_validate_options ${1+"$@"}
+
+ # Bail if the options were screwed!
+ $exit_cmd $EXIT_FAILURE
+
+ # save modified positional parameters for caller
+ func_validate_options_result=$func_run_hooks_result
+}
+
+
+
+## ----------------- ##
+## Helper functions. ##
+## ----------------- ##
+
+# This section contains the helper functions used by the rest of the
+# hookable option parser framework in ascii-betical order.
+
+
+# func_fatal_help ARG...
+# ----------------------
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
+{
+ $debug_cmd
+
+ eval \$ECHO \""Usage: $usage"\"
+ eval \$ECHO \""$fatal_help"\"
+ func_error ${1+"$@"}
+ exit $EXIT_FAILURE
+}
+
+
+# func_help
+# ---------
+# Echo long help message to standard output and exit.
+func_help ()
+{
+ $debug_cmd
+
+ func_usage_message
+ $ECHO "$long_help_message"
+ exit 0
+}
+
+
+# func_missing_arg ARGNAME
+# ------------------------
+# Echo program name prefixed message to standard error and set global
+# exit_cmd.
+func_missing_arg ()
+{
+ $debug_cmd
+
+ func_error "Missing argument for '$1'."
+ exit_cmd=exit
+}
+
+
+# func_split_equals STRING
+# ------------------------
+# Set func_split_equals_lhs and func_split_equals_rhs shell variables after
+# splitting STRING at the '=' sign.
+test -z "$_G_HAVE_XSI_OPS" \
+ && (eval 'x=a/b/c;
+ test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
+ && _G_HAVE_XSI_OPS=yes
+
+if test yes = "$_G_HAVE_XSI_OPS"
+then
+ # This is an XSI compatible shell, allowing a faster implementation...
+ eval 'func_split_equals ()
+ {
+ $debug_cmd
+
+ func_split_equals_lhs=${1%%=*}
+ func_split_equals_rhs=${1#*=}
+ test "x$func_split_equals_lhs" = "x$1" \
+ && func_split_equals_rhs=
+ }'
+else
+ # ...otherwise fall back to using expr, which is often a shell builtin.
+ func_split_equals ()
+ {
+ $debug_cmd
+
+ func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'`
+ func_split_equals_rhs=
+ test "x$func_split_equals_lhs" = "x$1" \
+ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'`
+ }
+fi #func_split_equals
+
+
+# func_split_short_opt SHORTOPT
+# -----------------------------
+# Set func_split_short_opt_name and func_split_short_opt_arg shell
+# variables after splitting SHORTOPT after the 2nd character.
+if test yes = "$_G_HAVE_XSI_OPS"
+then
+ # This is an XSI compatible shell, allowing a faster implementation...
+ eval 'func_split_short_opt ()
+ {
+ $debug_cmd
+
+ func_split_short_opt_arg=${1#??}
+ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}
+ }'
+else
+ # ...otherwise fall back to using expr, which is often a shell builtin.
+ func_split_short_opt ()
+ {
+ $debug_cmd
+
+ func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'`
+ func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'`
+ }
+fi #func_split_short_opt
+
+
+# func_usage
+# ----------
+# Echo short help message to standard output and exit.
+func_usage ()
+{
+ $debug_cmd
+
+ func_usage_message
+ $ECHO "Run '$progname --help |${PAGER-more}' for full usage"
+ exit 0
+}
+
+
+# func_usage_message
+# ------------------
+# Echo short help message to standard output.
+func_usage_message ()
+{
+ $debug_cmd
+
+ eval \$ECHO \""Usage: $usage"\"
+ echo
+ $SED -n 's|^# ||
+ /^Written by/{
+ x;p;x
+ }
+ h
+ /^Written by/q' < "$progpath"
+ echo
+ eval \$ECHO \""$usage_message"\"
+}
+
+
+# func_version
+# ------------
+# Echo version message to standard output and exit.
+func_version ()
+{
+ $debug_cmd
+
+ printf '%s\n' "$progname $scriptversion"
+ $SED -n '
+ /(C)/!b go
+ :more
+ /\./!{
+ N
+ s|\n# | |
+ b more
+ }
+ :go
+ /^# Written by /,/# warranty; / {
+ s|^# ||
+ s|^# *$||
+ s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
+ p
+ }
+ /^# Written by / {
+ s|^# ||
+ p
+ }
+ /^warranty; /q' < "$progpath"
+
+ exit $?
+}
+
+
+# Local variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
+# time-stamp-time-zone: "UTC"
+# End:
+
+# Set a version string.
+scriptversion='(GNU libtool) 2.4.5'
+
+
+# func_echo ARG...
+# ----------------
+# Libtool also displays the current mode in messages, so override
+# funclib.sh func_echo with this custom definition.
+func_echo ()
+{
+ $debug_cmd
+
+ _G_message=$*
+
+ func_echo_IFS=$IFS
+ IFS=$nl
+ for _G_line in $_G_message; do
+ IFS=$func_echo_IFS
+ $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line"
+ done
+ IFS=$func_echo_IFS
+}
+
+
+# func_warning ARG...
+# -------------------
+# Libtool warnings are not categorized, so override funclib.sh
+# func_warning with this simpler definition.
+func_warning ()
+{
+ $debug_cmd
+
+ $warning_func ${1+"$@"}
+}
+
+
+## ---------------- ##
+## Options parsing. ##
+## ---------------- ##
+
+# Hook in the functions to make sure our own options are parsed during
+# the option parsing loop.
+
+usage='$progpath [OPTION]... [MODE-ARG]...'
+
+# Short help message in response to '-h'.
+usage_message="Options:
+ --config show all configuration variables
+ --debug enable verbose shell tracing
+ -n, --dry-run display commands without modifying any files
+ --features display basic configuration information and exit
+ --mode=MODE use operation mode MODE
+ --no-warnings equivalent to '-Wnone'
+ --preserve-dup-deps don't remove duplicate dependency libraries
+ --quiet, --silent don't print informational messages
+ --tag=TAG use configuration variables from tag TAG
+ -v, --verbose print more informational messages than default
+ --version print version information
+ -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all]
+ -h, --help, --help-all print short, long, or detailed help message
+"
+
+# Additional text appended to 'usage_message' in response to '--help'.
+long_help_message=$long_help_message"
+
+MODE must be one of the following:
+
+ clean remove files from the build directory
+ compile compile a source file into a libtool object
+ execute automatically set library path, then run a program
+ finish complete the installation of libtool libraries
+ install install libraries or executables
+ link create a library or an executable
+ uninstall remove libraries from an installed directory
+
+MODE-ARGS vary depending on the MODE. When passed as first option,
+'--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that.
+Try '$progname --help --mode=MODE' for a more detailed description of MODE.
+
+When reporting a bug, please describe a test case to reproduce it and
+include the following information:
+
+ host-triplet: $host
+ shell: $SHELL
+ compiler: $LTCC
+ compiler flags: $LTCFLAGS
+ linker: $LD (gnu? $with_gnu_ld)
+ version: $progname (GNU libtool) 2.4.5
+ automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
+ autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
+
+Report bugs to <bug-libtool@gnu.org>.
+GNU libtool home page: <http://www.gnu.org/software/libtool/>.
+General help using GNU software: <http://www.gnu.org/gethelp/>."
+
+
+# func_lo2o OBJECT-NAME
+# ---------------------
+# Transform OBJECT-NAME from a '.lo' suffix to the platform specific
+# object suffix.
+
+lo2o=s/\\.lo\$/.$objext/
+o2lo=s/\\.$objext\$/.lo/
+
+if test yes = "$_G_HAVE_XSI_OPS"; then
+ eval 'func_lo2o ()
+ {
+ case $1 in
+ *.lo) func_lo2o_result=${1%.lo}.$objext ;;
+ * ) func_lo2o_result=$1 ;;
+ esac
+ }'
+
+ # func_xform LIBOBJ-OR-SOURCE
+ # ---------------------------
+ # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise)
+ # suffix to a '.lo' libtool-object suffix.
+ eval 'func_xform ()
+ {
+ func_xform_result=${1%.*}.lo
+ }'
+else
+ # ...otherwise fall back to using sed.
+ func_lo2o ()
+ {
+ func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"`
+ }
+
+ func_xform ()
+ {
+ func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'`
+ }
+fi
+
+
+# func_fatal_configuration ARG...
+# -------------------------------
+# Echo program name prefixed message to standard error, followed by
+# a configuration failure hint, and exit.
+func_fatal_configuration ()
+{
+ func__fatal_error ${1+"$@"} \
+ "See the $PACKAGE documentation for more information." \
+ "Fatal configuration error."
+}
+
+
+# func_config
+# -----------
+# Display the configuration for all the tags in this script.
+func_config ()
+{
+ re_begincf='^# ### BEGIN LIBTOOL'
+ re_endcf='^# ### END LIBTOOL'
+
+ # Default configuration.
+ $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
+
+ # Now print the configurations for the tags.
+ for tagname in $taglist; do
+ $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
+ done
+
+ exit $?
+}
+
+
+# func_features
+# -------------
+# Display the features supported by this script.
+func_features ()
+{
+ echo "host: $host"
+ if test yes = "$build_libtool_libs"; then
+ echo "enable shared libraries"
+ else
+ echo "disable shared libraries"
+ fi
+ if test yes = "$build_old_libs"; then
+ echo "enable static libraries"
+ else
+ echo "disable static libraries"
+ fi
+
+ exit $?
+}
+
+
+# func_enable_tag TAGNAME
+# -----------------------
+# Verify that TAGNAME is valid, and either flag an error and exit, or
+# enable the TAGNAME tag. We also add TAGNAME to the global $taglist
+# variable here.
+func_enable_tag ()
+{
+ # Global variable:
+ tagname=$1
+
+ re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
+ re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
+ sed_extractcf=/$re_begincf/,/$re_endcf/p
+
+ # Validate tagname.
+ case $tagname in
+ *[!-_A-Za-z0-9,/]*)
+ func_fatal_error "invalid tag name: $tagname"
+ ;;
+ esac
+
+ # Don't test for the "default" C tag, as we know it's
+ # there but not specially marked.
+ case $tagname in
+ CC) ;;
+ *)
+ if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
+ taglist="$taglist $tagname"
+
+ # Evaluate the configuration. Be careful to quote the path
+ # and the sed script, to avoid splitting on whitespace, but
+ # also don't use non-portable quotes within backquotes within
+ # quotes we have to do it in 2 steps:
+ extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
+ eval "$extractedcf"
+ else
+ func_error "ignoring unknown tag $tagname"
+ fi
+ ;;
+ esac
+}
+
+
+# func_check_version_match
+# ------------------------
+# Ensure that we are using m4 macros, and libtool script from the same
+# release of libtool.
+func_check_version_match ()
+{
+ if test "$package_revision" != "$macro_revision"; then
+ if test "$VERSION" != "$macro_version"; then
+ if test -z "$macro_version"; then
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from an older release.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+ else
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+ fi
+ else
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
+$progname: but the definition of this LT_INIT comes from revision $macro_revision.
+$progname: You should recreate aclocal.m4 with macros from revision $package_revision
+$progname: of $PACKAGE $VERSION and run autoconf again.
+_LT_EOF
+ fi
+
+ exit $EXIT_MISMATCH
+ fi
+}
+
+
+# libtool_options_prep [ARG]...
+# -----------------------------
+# Preparation for options parsed by libtool.
+libtool_options_prep ()
+{
+ $debug_mode
+
+ # Option defaults:
+ opt_config=false
+ opt_dlopen=
+ opt_dry_run=false
+ opt_help=false
+ opt_mode=
+ opt_preserve_dup_deps=false
+ opt_quiet=false
+
+ nonopt=
+ preserve_args=
+
+ # Shorthand for --mode=foo, only valid as the first argument
+ case $1 in
+ clean|clea|cle|cl)
+ shift; set dummy --mode clean ${1+"$@"}; shift
+ ;;
+ compile|compil|compi|comp|com|co|c)
+ shift; set dummy --mode compile ${1+"$@"}; shift
+ ;;
+ execute|execut|execu|exec|exe|ex|e)
+ shift; set dummy --mode execute ${1+"$@"}; shift
+ ;;
+ finish|finis|fini|fin|fi|f)
+ shift; set dummy --mode finish ${1+"$@"}; shift
+ ;;
+ install|instal|insta|inst|ins|in|i)
+ shift; set dummy --mode install ${1+"$@"}; shift
+ ;;
+ link|lin|li|l)
+ shift; set dummy --mode link ${1+"$@"}; shift
+ ;;
+ uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+ shift; set dummy --mode uninstall ${1+"$@"}; shift
+ ;;
+ esac
+
+ # Pass back the list of options.
+ func_quote_for_eval ${1+"$@"}
+ libtool_options_prep_result=$func_quote_for_eval_result
+}
+func_add_hook func_options_prep libtool_options_prep
+
+
+# libtool_parse_options [ARG]...
+# ---------------------------------
+# Provide handling for libtool specific options.
+libtool_parse_options ()
+{
+ $debug_cmd
+
+ # Perform our own loop to consume as many options as possible in
+ # each iteration.
+ while test $# -gt 0; do
+ _G_opt=$1
+ shift
+ case $_G_opt in
+ --dry-run|--dryrun|-n)
+ opt_dry_run=:
+ ;;
+
+ --config) func_config ;;
+
+ --dlopen|-dlopen)
+ opt_dlopen="${opt_dlopen+$opt_dlopen
+}$1"
+ shift
+ ;;
+
+ --preserve-dup-deps)
+ opt_preserve_dup_deps=: ;;
+
+ --features) func_features ;;
+
+ --finish) set dummy --mode finish ${1+"$@"}; shift ;;
+
+ --help) opt_help=: ;;
+
+ --help-all) opt_help=': help-all' ;;
+
+ --mode) test $# = 0 && func_missing_arg $_G_opt && break
+ opt_mode=$1
+ case $1 in
+ # Valid mode arguments:
+ clean|compile|execute|finish|install|link|relink|uninstall) ;;
+
+ # Catch anything else as an error
+ *) func_error "invalid argument for $_G_opt"
+ exit_cmd=exit
+ break
+ ;;
+ esac
+ shift
+ ;;
+
+ --no-silent|--no-quiet)
+ opt_quiet=false
+ func_append preserve_args " $_G_opt"
+ ;;
+
+ --no-warnings|--no-warning|--no-warn)
+ opt_warning=false
+ func_append preserve_args " $_G_opt"
+ ;;
+
+ --no-verbose)
+ opt_verbose=false
+ func_append preserve_args " $_G_opt"
+ ;;
+
+ --silent|--quiet)
+ opt_quiet=:
+ opt_verbose=false
+ func_append preserve_args " $_G_opt"
+ ;;
+
+ --tag) test $# = 0 && func_missing_arg $_G_opt && break
+ opt_tag=$1
+ func_append preserve_args " $_G_opt $1"
+ func_enable_tag "$1"
+ shift
+ ;;
+
+ --verbose|-v) opt_quiet=false
+ opt_verbose=:
+ func_append preserve_args " $_G_opt"
+ ;;
+
+ # An option not handled by this hook function:
+ *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
+ esac
+ done
+
+
+ # save modified positional parameters for caller
+ func_quote_for_eval ${1+"$@"}
+ libtool_parse_options_result=$func_quote_for_eval_result
+}
+func_add_hook func_parse_options libtool_parse_options
+
+
+
+# libtool_validate_options [ARG]...
+# ---------------------------------
+# Perform any sanity checks on option settings and/or unconsumed
+# arguments.
+libtool_validate_options ()
+{
+ # save first non-option argument
+ if test 0 -lt $#; then
+ nonopt=$1
+ shift
+ fi
+
+ # preserve --debug
+ test : = "$debug_cmd" || func_append preserve_args " --debug"
+
+ case $host in
+ # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
+ # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
+ *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
+ # don't eliminate duplications in $postdeps and $predeps
+ opt_duplicate_compiler_generated_deps=:
+ ;;
+ *)
+ opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
+ ;;
+ esac
+
+ $opt_help || {
+ # Sanity checks first:
+ func_check_version_match
+
+ test yes != "$build_libtool_libs" \
+ && test yes != "$build_old_libs" \
+ && func_fatal_configuration "not configured to build any kind of library"
+
+ # Darwin sucks
+ eval std_shrext=\"$shrext_cmds\"
+
+ # Only execute mode is allowed to have -dlopen flags.
+ if test -n "$opt_dlopen" && test execute != "$opt_mode"; then
+ func_error "unrecognized option '-dlopen'"
+ $ECHO "$help" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ # Change the help message to a mode-specific one.
+ generic_help=$help
+ help="Try '$progname --help --mode=$opt_mode' for more information."
+ }
+
+ # Pass back the unparsed argument list
+ func_quote_for_eval ${1+"$@"}
+ libtool_validate_options_result=$func_quote_for_eval_result
+}
+func_add_hook func_validate_options libtool_validate_options
+
+
+# Process options as early as possible so that --help and --version
+# can return quickly.
+func_options ${1+"$@"}
+eval set dummy "$func_options_result"; shift
+
+
+
+## ----------- ##
+## Main. ##
+## ----------- ##
+
+magic='%%%MAGIC variable%%%'
+magic_exe='%%%MAGIC EXE variable%%%'
+
+# Global variables.
+extracted_archives=
+extracted_serial=0
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end. This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+}
+
+# func_generated_by_libtool
+# True iff stdin has been generated by Libtool. This function is only
+# a basic sanity check; it will hardly flush out determined imposters.
+func_generated_by_libtool_p ()
+{
+ $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+}
+
+# func_lalib_p file
+# True iff FILE is a libtool '.la' library or '.lo' object file.
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_lalib_p ()
+{
+ test -f "$1" &&
+ $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p
+}
+
+# func_lalib_unsafe_p file
+# True iff FILE is a libtool '.la' library or '.lo' object file.
+# This function implements the same check as func_lalib_p without
+# resorting to external programs. To this end, it redirects stdin and
+# closes it afterwards, without saving the original file descriptor.
+# As a safety measure, use it only where a negative result would be
+# fatal anyway. Works if 'file' does not exist.
+func_lalib_unsafe_p ()
+{
+ lalib_p=no
+ if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
+ for lalib_p_l in 1 2 3 4
+ do
+ read lalib_p_line
+ case $lalib_p_line in
+ \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
+ esac
+ done
+ exec 0<&5 5<&-
+ fi
+ test yes = "$lalib_p"
+}
+
+# func_ltwrapper_script_p file
+# True iff FILE is a libtool wrapper script
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_script_p ()
+{
+ test -f "$1" &&
+ $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p
+}
+
+# func_ltwrapper_executable_p file
+# True iff FILE is a libtool wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_executable_p ()
+{
+ func_ltwrapper_exec_suffix=
+ case $1 in
+ *.exe) ;;
+ *) func_ltwrapper_exec_suffix=.exe ;;
+ esac
+ $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
+}
+
+# func_ltwrapper_scriptname file
+# Assumes file is an ltwrapper_executable
+# uses $file to determine the appropriate filename for a
+# temporary ltwrapper_script.
+func_ltwrapper_scriptname ()
+{
+ func_dirname_and_basename "$1" "" "."
+ func_stripname '' '.exe' "$func_basename_result"
+ func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper
+}
+
+# func_ltwrapper_p file
+# True iff FILE is a libtool wrapper script or wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_p ()
+{
+ func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
+}
+
+
+# func_execute_cmds commands fail_cmd
+# Execute tilde-delimited COMMANDS.
+# If FAIL_CMD is given, eval that upon failure.
+# FAIL_CMD may read-access the current command in variable CMD!
+func_execute_cmds ()
+{
+ $debug_cmd
+
+ save_ifs=$IFS; IFS='~'
+ for cmd in $1; do
+ IFS=$sp$nl
+ eval cmd=\"$cmd\"
+ IFS=$save_ifs
+ func_show_eval "$cmd" "${2-:}"
+ done
+ IFS=$save_ifs
+}
+
+
+# func_source file
+# Source FILE, adding directory component if necessary.
+# Note that it is not necessary on cygwin/mingw to append a dot to
+# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
+# behavior happens only for exec(3), not for open(2)! Also, sourcing
+# 'FILE.' does not work on cygwin managed mounts.
+func_source ()
+{
+ $debug_cmd
+
+ case $1 in
+ */* | *\\*) . "$1" ;;
+ *) . "./$1" ;;
+ esac
+}
+
+
+# func_resolve_sysroot PATH
+# Replace a leading = in PATH with a sysroot. Store the result into
+# func_resolve_sysroot_result
+func_resolve_sysroot ()
+{
+ func_resolve_sysroot_result=$1
+ case $func_resolve_sysroot_result in
+ =*)
+ func_stripname '=' '' "$func_resolve_sysroot_result"
+ func_resolve_sysroot_result=$lt_sysroot$func_stripname_result
+ ;;
+ esac
+}
+
+# func_replace_sysroot PATH
+# If PATH begins with the sysroot, replace it with = and
+# store the result into func_replace_sysroot_result.
+func_replace_sysroot ()
+{
+ case $lt_sysroot:$1 in
+ ?*:"$lt_sysroot"*)
+ func_stripname "$lt_sysroot" '' "$1"
+ func_replace_sysroot_result='='$func_stripname_result
+ ;;
+ *)
+ # Including no sysroot.
+ func_replace_sysroot_result=$1
+ ;;
+ esac
+}
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag ()
+{
+ $debug_cmd
+
+ if test -n "$available_tags" && test -z "$tagname"; then
+ CC_quoted=
+ for arg in $CC; do
+ func_append_quoted CC_quoted "$arg"
+ done
+ CC_expanded=`func_echo_all $CC`
+ CC_quoted_expanded=`func_echo_all $CC_quoted`
+ case $@ in
+ # Blanks in the command may have been stripped by the calling shell,
+ # but not from the CC environment variable when configure was run.
+ " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
+ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
+ # Blanks at the start of $base_compile will cause this to fail
+ # if we don't check for them as well.
+ *)
+ for z in $available_tags; do
+ if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+ # Evaluate the configuration.
+ eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+ CC_quoted=
+ for arg in $CC; do
+ # Double-quote args containing other shell metacharacters.
+ func_append_quoted CC_quoted "$arg"
+ done
+ CC_expanded=`func_echo_all $CC`
+ CC_quoted_expanded=`func_echo_all $CC_quoted`
+ case "$@ " in
+ " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
+ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
+ # The compiler in the base compile command matches
+ # the one in the tagged configuration.
+ # Assume this is the tagged configuration we want.
+ tagname=$z
+ break
+ ;;
+ esac
+ fi
+ done
+ # If $tagname still isn't set, then no tagged configuration
+ # was found and let the user know that the "--tag" command
+ # line option must be used.
+ if test -z "$tagname"; then
+ func_echo "unable to infer tagged configuration"
+ func_fatal_error "specify a tag with '--tag'"
+# else
+# func_verbose "using $tagname tagged configuration"
+ fi
+ ;;
+ esac
+ fi
+}
+
+
+
+# func_write_libtool_object output_name pic_name nonpic_name
+# Create a libtool object file (analogous to a ".la" file),
+# but don't create it if we're doing a dry run.
+func_write_libtool_object ()
+{
+ write_libobj=$1
+ if test yes = "$build_libtool_libs"; then
+ write_lobj=\'$2\'
+ else
+ write_lobj=none
+ fi
+
+ if test yes = "$build_old_libs"; then
+ write_oldobj=\'$3\'
+ else
+ write_oldobj=none
+ fi
+
+ $opt_dry_run || {
+ cat >${write_libobj}T <<EOF
+# $write_libobj - a libtool object file
+# Generated by $PROGRAM (GNU $PACKAGE) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=$write_lobj
+
+# Name of the non-PIC object
+non_pic_object=$write_oldobj
+
+EOF
+ $MV "${write_libobj}T" "$write_libobj"
+ }
+}
+
+
+##################################################
+# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
+##################################################
+
+# func_convert_core_file_wine_to_w32 ARG
+# Helper function used by file name conversion functions when $build is *nix,
+# and $host is mingw, cygwin, or some other w32 environment. Relies on a
+# correctly configured wine environment available, with the winepath program
+# in $build's $PATH.
+#
+# ARG is the $build file name to be converted to w32 format.
+# Result is available in $func_convert_core_file_wine_to_w32_result, and will
+# be empty on error (or when ARG is empty)
+func_convert_core_file_wine_to_w32 ()
+{
+ $debug_cmd
+
+ func_convert_core_file_wine_to_w32_result=$1
+ if test -n "$1"; then
+ # Unfortunately, winepath does not exit with a non-zero error code, so we
+ # are forced to check the contents of stdout. On the other hand, if the
+ # command is not found, the shell will set an exit code of 127 and print
+ # *an error message* to stdout. So we must check for both error code of
+ # zero AND non-empty stdout, which explains the odd construction:
+ func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
+ if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then
+ func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
+ $SED -e "$sed_naive_backslashify"`
+ else
+ func_convert_core_file_wine_to_w32_result=
+ fi
+ fi
+}
+# end: func_convert_core_file_wine_to_w32
+
+
+# func_convert_core_path_wine_to_w32 ARG
+# Helper function used by path conversion functions when $build is *nix, and
+# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
+# configured wine environment available, with the winepath program in $build's
+# $PATH. Assumes ARG has no leading or trailing path separator characters.
+#
+# ARG is path to be converted from $build format to win32.
+# Result is available in $func_convert_core_path_wine_to_w32_result.
+# Unconvertible file (directory) names in ARG are skipped; if no directory names
+# are convertible, then the result may be empty.
+func_convert_core_path_wine_to_w32 ()
+{
+ $debug_cmd
+
+ # unfortunately, winepath doesn't convert paths, only file names
+ func_convert_core_path_wine_to_w32_result=
+ if test -n "$1"; then
+ oldIFS=$IFS
+ IFS=:
+ for func_convert_core_path_wine_to_w32_f in $1; do
+ IFS=$oldIFS
+ func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
+ if test -n "$func_convert_core_file_wine_to_w32_result"; then
+ if test -z "$func_convert_core_path_wine_to_w32_result"; then
+ func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result
+ else
+ func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
+ fi
+ fi
+ done
+ IFS=$oldIFS
+ fi
+}
+# end: func_convert_core_path_wine_to_w32
+
+
+# func_cygpath ARGS...
+# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
+# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
+# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
+# (2), returns the Cygwin file name or path in func_cygpath_result (input
+# file name or path is assumed to be in w32 format, as previously converted
+# from $build's *nix or MSYS format). In case (3), returns the w32 file name
+# or path in func_cygpath_result (input file name or path is assumed to be in
+# Cygwin format). Returns an empty string on error.
+#
+# ARGS are passed to cygpath, with the last one being the file name or path to
+# be converted.
+#
+# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
+# environment variable; do not put it in $PATH.
+func_cygpath ()
+{
+ $debug_cmd
+
+ if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
+ func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
+ if test "$?" -ne 0; then
+ # on failure, ensure result is empty
+ func_cygpath_result=
+ fi
+ else
+ func_cygpath_result=
+ func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'"
+ fi
+}
+#end: func_cygpath
+
+
+# func_convert_core_msys_to_w32 ARG
+# Convert file name or path ARG from MSYS format to w32 format. Return
+# result in func_convert_core_msys_to_w32_result.
+func_convert_core_msys_to_w32 ()
+{
+ $debug_cmd
+
+ # awkward: cmd appends spaces to result
+ func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
+ $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"`
+}
+#end: func_convert_core_msys_to_w32
+
+
+# func_convert_file_check ARG1 ARG2
+# Verify that ARG1 (a file name in $build format) was converted to $host
+# format in ARG2. Otherwise, emit an error message, but continue (resetting
+# func_to_host_file_result to ARG1).
+func_convert_file_check ()
+{
+ $debug_cmd
+
+ if test -z "$2" && test -n "$1"; then
+ func_error "Could not determine host file name corresponding to"
+ func_error " '$1'"
+ func_error "Continuing, but uninstalled executables may not work."
+ # Fallback:
+ func_to_host_file_result=$1
+ fi
+}
+# end func_convert_file_check
+
+
+# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
+# Verify that FROM_PATH (a path in $build format) was converted to $host
+# format in TO_PATH. Otherwise, emit an error message, but continue, resetting
+# func_to_host_file_result to a simplistic fallback value (see below).
+func_convert_path_check ()
+{
+ $debug_cmd
+
+ if test -z "$4" && test -n "$3"; then
+ func_error "Could not determine the host path corresponding to"
+ func_error " '$3'"
+ func_error "Continuing, but uninstalled executables may not work."
+ # Fallback. This is a deliberately simplistic "conversion" and
+ # should not be "improved". See libtool.info.
+ if test "x$1" != "x$2"; then
+ lt_replace_pathsep_chars="s|$1|$2|g"
+ func_to_host_path_result=`echo "$3" |
+ $SED -e "$lt_replace_pathsep_chars"`
+ else
+ func_to_host_path_result=$3
+ fi
+ fi
+}
+# end func_convert_path_check
+
+
+# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
+# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
+# and appending REPL if ORIG matches BACKPAT.
+func_convert_path_front_back_pathsep ()
+{
+ $debug_cmd
+
+ case $4 in
+ $1 ) func_to_host_path_result=$3$func_to_host_path_result
+ ;;
+ esac
+ case $4 in
+ $2 ) func_append func_to_host_path_result "$3"
+ ;;
+ esac
+}
+# end func_convert_path_front_back_pathsep
+
+
+##################################################
+# $build to $host FILE NAME CONVERSION FUNCTIONS #
+##################################################
+# invoked via '$to_host_file_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# Result will be available in $func_to_host_file_result.
+
+
+# func_to_host_file ARG
+# Converts the file name ARG from $build format to $host format. Return result
+# in func_to_host_file_result.
+func_to_host_file ()
+{
+ $debug_cmd
+
+ $to_host_file_cmd "$1"
+}
+# end func_to_host_file
+
+
+# func_to_tool_file ARG LAZY
+# converts the file name ARG from $build format to toolchain format. Return
+# result in func_to_tool_file_result. If the conversion in use is listed
+# in (the comma separated) LAZY, no conversion takes place.
+func_to_tool_file ()
+{
+ $debug_cmd
+
+ case ,$2, in
+ *,"$to_tool_file_cmd",*)
+ func_to_tool_file_result=$1
+ ;;
+ *)
+ $to_tool_file_cmd "$1"
+ func_to_tool_file_result=$func_to_host_file_result
+ ;;
+ esac
+}
+# end func_to_tool_file
+
+
+# func_convert_file_noop ARG
+# Copy ARG to func_to_host_file_result.
+func_convert_file_noop ()
+{
+ func_to_host_file_result=$1
+}
+# end func_convert_file_noop
+
+
+# func_convert_file_msys_to_w32 ARG
+# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper. Returns result in
+# func_to_host_file_result.
+func_convert_file_msys_to_w32 ()
+{
+ $debug_cmd
+
+ func_to_host_file_result=$1
+ if test -n "$1"; then
+ func_convert_core_msys_to_w32 "$1"
+ func_to_host_file_result=$func_convert_core_msys_to_w32_result
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_w32
+
+
+# func_convert_file_cygwin_to_w32 ARG
+# Convert file name ARG from Cygwin to w32 format. Returns result in
+# func_to_host_file_result.
+func_convert_file_cygwin_to_w32 ()
+{
+ $debug_cmd
+
+ func_to_host_file_result=$1
+ if test -n "$1"; then
+ # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
+ # LT_CYGPATH in this case.
+ func_to_host_file_result=`cygpath -m "$1"`
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_cygwin_to_w32
+
+
+# func_convert_file_nix_to_w32 ARG
+# Convert file name ARG from *nix to w32 format. Requires a wine environment
+# and a working winepath. Returns result in func_to_host_file_result.
+func_convert_file_nix_to_w32 ()
+{
+ $debug_cmd
+
+ func_to_host_file_result=$1
+ if test -n "$1"; then
+ func_convert_core_file_wine_to_w32 "$1"
+ func_to_host_file_result=$func_convert_core_file_wine_to_w32_result
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_w32
+
+
+# func_convert_file_msys_to_cygwin ARG
+# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_file_msys_to_cygwin ()
+{
+ $debug_cmd
+
+ func_to_host_file_result=$1
+ if test -n "$1"; then
+ func_convert_core_msys_to_w32 "$1"
+ func_cygpath -u "$func_convert_core_msys_to_w32_result"
+ func_to_host_file_result=$func_cygpath_result
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_cygwin
+
+
+# func_convert_file_nix_to_cygwin ARG
+# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed
+# in a wine environment, working winepath, and LT_CYGPATH set. Returns result
+# in func_to_host_file_result.
+func_convert_file_nix_to_cygwin ()
+{
+ $debug_cmd
+
+ func_to_host_file_result=$1
+ if test -n "$1"; then
+ # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
+ func_convert_core_file_wine_to_w32 "$1"
+ func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
+ func_to_host_file_result=$func_cygpath_result
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_cygwin
+
+
+#############################################
+# $build to $host PATH CONVERSION FUNCTIONS #
+#############################################
+# invoked via '$to_host_path_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# The result will be available in $func_to_host_path_result.
+#
+# Path separators are also converted from $build format to $host format. If
+# ARG begins or ends with a path separator character, it is preserved (but
+# converted to $host format) on output.
+#
+# All path conversion functions are named using the following convention:
+# file name conversion function : func_convert_file_X_to_Y ()
+# path conversion function : func_convert_path_X_to_Y ()
+# where, for any given $build/$host combination the 'X_to_Y' value is the
+# same. If conversion functions are added for new $build/$host combinations,
+# the two new functions must follow this pattern, or func_init_to_host_path_cmd
+# will break.
+
+
+# func_init_to_host_path_cmd
+# Ensures that function "pointer" variable $to_host_path_cmd is set to the
+# appropriate value, based on the value of $to_host_file_cmd.
+to_host_path_cmd=
+func_init_to_host_path_cmd ()
+{
+ $debug_cmd
+
+ if test -z "$to_host_path_cmd"; then
+ func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
+ to_host_path_cmd=func_convert_path_$func_stripname_result
+ fi
+}
+
+
+# func_to_host_path ARG
+# Converts the path ARG from $build format to $host format. Return result
+# in func_to_host_path_result.
+func_to_host_path ()
+{
+ $debug_cmd
+
+ func_init_to_host_path_cmd
+ $to_host_path_cmd "$1"
+}
+# end func_to_host_path
+
+
+# func_convert_path_noop ARG
+# Copy ARG to func_to_host_path_result.
+func_convert_path_noop ()
+{
+ func_to_host_path_result=$1
+}
+# end func_convert_path_noop
+
+
+# func_convert_path_msys_to_w32 ARG
+# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper. Returns result in
+# func_to_host_path_result.
+func_convert_path_msys_to_w32 ()
+{
+ $debug_cmd
+
+ func_to_host_path_result=$1
+ if test -n "$1"; then
+ # Remove leading and trailing path separator characters from ARG. MSYS
+ # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
+ # and winepath ignores them completely.
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+ func_to_host_path_result=$func_convert_core_msys_to_w32_result
+ func_convert_path_check : ";" \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+ fi
+}
+# end func_convert_path_msys_to_w32
+
+
+# func_convert_path_cygwin_to_w32 ARG
+# Convert path ARG from Cygwin to w32 format. Returns result in
+# func_to_host_file_result.
+func_convert_path_cygwin_to_w32 ()
+{
+ $debug_cmd
+
+ func_to_host_path_result=$1
+ if test -n "$1"; then
+ # See func_convert_path_msys_to_w32:
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
+ func_convert_path_check : ";" \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+ fi
+}
+# end func_convert_path_cygwin_to_w32
+
+
+# func_convert_path_nix_to_w32 ARG
+# Convert path ARG from *nix to w32 format. Requires a wine environment and
+# a working winepath. Returns result in func_to_host_file_result.
+func_convert_path_nix_to_w32 ()
+{
+ $debug_cmd
+
+ func_to_host_path_result=$1
+ if test -n "$1"; then
+ # See func_convert_path_msys_to_w32:
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+ func_to_host_path_result=$func_convert_core_path_wine_to_w32_result
+ func_convert_path_check : ";" \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+ fi
+}
+# end func_convert_path_nix_to_w32
+
+
+# func_convert_path_msys_to_cygwin ARG
+# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_path_msys_to_cygwin ()
+{
+ $debug_cmd
+
+ func_to_host_path_result=$1
+ if test -n "$1"; then
+ # See func_convert_path_msys_to_w32:
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+ func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
+ func_to_host_path_result=$func_cygpath_result
+ func_convert_path_check : : \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+ fi
+}
+# end func_convert_path_msys_to_cygwin
+
+
+# func_convert_path_nix_to_cygwin ARG
+# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a
+# a wine environment, working winepath, and LT_CYGPATH set. Returns result in
+# func_to_host_file_result.
+func_convert_path_nix_to_cygwin ()
+{
+ $debug_cmd
+
+ func_to_host_path_result=$1
+ if test -n "$1"; then
+ # Remove leading and trailing path separator characters from
+ # ARG. msys behavior is inconsistent here, cygpath turns them
+ # into '.;' and ';.', and winepath ignores them completely.
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+ func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
+ func_to_host_path_result=$func_cygpath_result
+ func_convert_path_check : : \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+ fi
+}
+# end func_convert_path_nix_to_cygwin
+
+
+# func_dll_def_p FILE
+# True iff FILE is a Windows DLL '.def' file.
+# Keep in sync with _LT_DLL_DEF_P in libtool.m4
+func_dll_def_p ()
+{
+ $debug_cmd
+
+ func_dll_def_p_tmp=`$SED -n \
+ -e 's/^[ ]*//' \
+ -e '/^\(;.*\)*$/d' \
+ -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \
+ -e q \
+ "$1"`
+ test DEF = "$func_dll_def_p_tmp"
+}
+
+
+# func_mode_compile arg...
+func_mode_compile ()
+{
+ $debug_cmd
+
+ # Get the compilation command and the source file.
+ base_compile=
+ srcfile=$nonopt # always keep a non-empty value in "srcfile"
+ suppress_opt=yes
+ suppress_output=
+ arg_mode=normal
+ libobj=
+ later=
+ pie_flag=
+
+ for arg
+ do
+ case $arg_mode in
+ arg )
+ # do not "continue". Instead, add this to base_compile
+ lastarg=$arg
+ arg_mode=normal
+ ;;
+
+ target )
+ libobj=$arg
+ arg_mode=normal
+ continue
+ ;;
+
+ normal )
+ # Accept any command-line options.
+ case $arg in
+ -o)
+ test -n "$libobj" && \
+ func_fatal_error "you cannot specify '-o' more than once"
+ arg_mode=target
+ continue
+ ;;
+
+ -pie | -fpie | -fPIE)
+ func_append pie_flag " $arg"
+ continue
+ ;;
+
+ -shared | -static | -prefer-pic | -prefer-non-pic)
+ func_append later " $arg"
+ continue
+ ;;
+
+ -no-suppress)
+ suppress_opt=no
+ continue
+ ;;
+
+ -Xcompiler)
+ arg_mode=arg # the next one goes into the "base_compile" arg list
+ continue # The current "srcfile" will either be retained or
+ ;; # replaced later. I would guess that would be a bug.
+
+ -Wc,*)
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
+ lastarg=
+ save_ifs=$IFS; IFS=,
+ for arg in $args; do
+ IFS=$save_ifs
+ func_append_quoted lastarg "$arg"
+ done
+ IFS=$save_ifs
+ func_stripname ' ' '' "$lastarg"
+ lastarg=$func_stripname_result
+
+ # Add the arguments to base_compile.
+ func_append base_compile " $lastarg"
+ continue
+ ;;
+
+ *)
+ # Accept the current argument as the source file.
+ # The previous "srcfile" becomes the current argument.
+ #
+ lastarg=$srcfile
+ srcfile=$arg
+ ;;
+ esac # case $arg
+ ;;
+ esac # case $arg_mode
+
+ # Aesthetically quote the previous argument.
+ func_append_quoted base_compile "$lastarg"
+ done # for arg
+
+ case $arg_mode in
+ arg)
+ func_fatal_error "you must specify an argument for -Xcompile"
+ ;;
+ target)
+ func_fatal_error "you must specify a target with '-o'"
+ ;;
+ *)
+ # Get the name of the library object.
+ test -z "$libobj" && {
+ func_basename "$srcfile"
+ libobj=$func_basename_result
+ }
+ ;;
+ esac
+
+ # Recognize several different file suffixes.
+ # If the user specifies -o file.o, it is replaced with file.lo
+ case $libobj in
+ *.[cCFSifmso] | \
+ *.ada | *.adb | *.ads | *.asm | \
+ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
+ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup)
+ func_xform "$libobj"
+ libobj=$func_xform_result
+ ;;
+ esac
+
+ case $libobj in
+ *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
+ *)
+ func_fatal_error "cannot determine name of library object from '$libobj'"
+ ;;
+ esac
+
+ func_infer_tag $base_compile
+
+ for arg in $later; do
+ case $arg in
+ -shared)
+ test yes = "$build_libtool_libs" \
+ || func_fatal_configuration "cannot build a shared library"
+ build_old_libs=no
+ continue
+ ;;
+
+ -static)
+ build_libtool_libs=no
+ build_old_libs=yes
+ continue
+ ;;
+
+ -prefer-pic)
+ pic_mode=yes
+ continue
+ ;;
+
+ -prefer-non-pic)
+ pic_mode=no
+ continue
+ ;;
+ esac
+ done
+
+ func_quote_for_eval "$libobj"
+ test "X$libobj" != "X$func_quote_for_eval_result" \
+ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
+ && func_warning "libobj name '$libobj' may not contain shell special characters."
+ func_dirname_and_basename "$obj" "/" ""
+ objname=$func_basename_result
+ xdir=$func_dirname_result
+ lobj=$xdir$objdir/$objname
+
+ test -z "$base_compile" && \
+ func_fatal_help "you must specify a compilation command"
+
+ # Delete any leftover library objects.
+ if test yes = "$build_old_libs"; then
+ removelist="$obj $lobj $libobj ${libobj}T"
+ else
+ removelist="$lobj $libobj ${libobj}T"
+ fi
+
+ # On Cygwin there's no "real" PIC flag so we must build both object types
+ case $host_os in
+ cygwin* | mingw* | pw32* | os2* | cegcc*)
+ pic_mode=default
+ ;;
+ esac
+ if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then
+ # non-PIC code in shared libraries is not supported
+ pic_mode=default
+ fi
+
+ # Calculate the filename of the output object if compiler does
+ # not support -o with -c
+ if test no = "$compiler_c_o"; then
+ output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext
+ lockfile=$output_obj.lock
+ else
+ output_obj=
+ need_locks=no
+ lockfile=
+ fi
+
+ # Lock this critical section if it is needed
+ # We use this script file to make the link, it avoids creating a new file
+ if test yes = "$need_locks"; then
+ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+ func_echo "Waiting for $lockfile to be removed"
+ sleep 2
+ done
+ elif test warn = "$need_locks"; then
+ if test -f "$lockfile"; then
+ $ECHO "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support '-c' and '-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+ func_append removelist " $output_obj"
+ $ECHO "$srcfile" > "$lockfile"
+ fi
+
+ $opt_dry_run || $RM $removelist
+ func_append removelist " $lockfile"
+ trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
+
+ func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
+ srcfile=$func_to_tool_file_result
+ func_quote_for_eval "$srcfile"
+ qsrcfile=$func_quote_for_eval_result
+
+ # Only build a PIC object if we are building libtool libraries.
+ if test yes = "$build_libtool_libs"; then
+ # Without this assignment, base_compile gets emptied.
+ fbsd_hideous_sh_bug=$base_compile
+
+ if test no != "$pic_mode"; then
+ command="$base_compile $qsrcfile $pic_flag"
+ else
+ # Don't build PIC code
+ command="$base_compile $qsrcfile"
+ fi
+
+ func_mkdir_p "$xdir$objdir"
+
+ if test -z "$output_obj"; then
+ # Place PIC objects in $objdir
+ func_append command " -o $lobj"
+ fi
+
+ func_show_eval_locale "$command" \
+ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
+
+ if test warn = "$need_locks" &&
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support '-c' and '-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed, then go on to compile the next one
+ if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
+ func_show_eval '$MV "$output_obj" "$lobj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+
+ # Allow error messages only from the first compilation.
+ if test yes = "$suppress_opt"; then
+ suppress_output=' >/dev/null 2>&1'
+ fi
+ fi
+
+ # Only build a position-dependent object if we build old libraries.
+ if test yes = "$build_old_libs"; then
+ if test yes != "$pic_mode"; then
+ # Don't build PIC code
+ command="$base_compile $qsrcfile$pie_flag"
+ else
+ command="$base_compile $qsrcfile $pic_flag"
+ fi
+ if test yes = "$compiler_c_o"; then
+ func_append command " -o $obj"
+ fi
+
+ # Suppress compiler output if we already did a PIC compilation.
+ func_append command "$suppress_output"
+ func_show_eval_locale "$command" \
+ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
+
+ if test warn = "$need_locks" &&
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support '-c' and '-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed
+ if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
+ func_show_eval '$MV "$output_obj" "$obj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+ fi
+
+ $opt_dry_run || {
+ func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
+
+ # Unlock the critical section if it was locked
+ if test no != "$need_locks"; then
+ removelist=$lockfile
+ $RM "$lockfile"
+ fi
+ }
+
+ exit $EXIT_SUCCESS
+}
+
+$opt_help || {
+ test compile = "$opt_mode" && func_mode_compile ${1+"$@"}
+}
+
+func_mode_help ()
+{
+ # We need to display help for each of the modes.
+ case $opt_mode in
+ "")
+ # Generic help is extracted from the usage comments
+ # at the start of this file.
+ func_help
+ ;;
+
+ clean)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed
+to RM.
+
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ compile)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+ -o OUTPUT-FILE set the output file name to OUTPUT-FILE
+ -no-suppress do not suppress compiler output for multiple passes
+ -prefer-pic try to build PIC objects only
+ -prefer-non-pic try to build non-PIC objects only
+ -shared do not build a '.o' file suitable for static linking
+ -static only build a '.o' file suitable for static linking
+ -Wc,FLAG pass FLAG directly to the compiler
+
+COMPILE-COMMAND is a command to be used in creating a 'standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix '.c' with the
+library object suffix, '.lo'."
+ ;;
+
+ execute)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+ -dlopen FILE add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to '-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+ ;;
+
+ finish)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges. Use
+the '--dry-run' option if you just want to see what would be executed."
+ ;;
+
+ install)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command. The first component should be
+either the 'install' or 'cp' program.
+
+The following components of INSTALL-COMMAND are treated specially:
+
+ -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+ ;;
+
+ link)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+ -all-static do not do any dynamic linking at all
+ -avoid-version do not add a version suffix if possible
+ -bindir BINDIR specify path to binaries directory (for systems where
+ libraries must be found in the PATH setting at runtime)
+ -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime
+ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
+ -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+ -export-symbols SYMFILE
+ try to export only the symbols listed in SYMFILE
+ -export-symbols-regex REGEX
+ try to export only the symbols matching REGEX
+ -LLIBDIR search LIBDIR for required installed libraries
+ -lNAME OUTPUT-FILE requires the installed library libNAME
+ -module build a library that can dlopened
+ -no-fast-install disable the fast-install mode
+ -no-install link a not-installable executable
+ -no-undefined declare that a library does not refer to external symbols
+ -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
+ -objectlist FILE use a list of object files found in FILE to specify objects
+ -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes)
+ -precious-files-regex REGEX
+ don't remove output files matching REGEX
+ -release RELEASE specify package release information
+ -rpath LIBDIR the created library will eventually be installed in LIBDIR
+ -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
+ -shared only do dynamic linking of libtool libraries
+ -shrext SUFFIX override the standard shared library file extension
+ -static do not do any dynamic linking of uninstalled libtool libraries
+ -static-libtool-libs
+ do not do any dynamic linking of libtool libraries
+ -version-info CURRENT[:REVISION[:AGE]]
+ specify library version info [each variable defaults to 0]
+ -weak LIBNAME declare that the target provides the LIBNAME interface
+ -Wc,FLAG
+ -Xcompiler FLAG pass linker-specific FLAG directly to the compiler
+ -Wl,FLAG
+ -Xlinker FLAG pass linker-specific FLAG directly to the linker
+ -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC)
+
+All other options (arguments beginning with '-') are ignored.
+
+Every other argument is treated as a filename. Files ending in '.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in '.la', then a libtool library is created,
+only library objects ('.lo' files) may be specified, and '-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created
+using 'ar' and 'ranlib', or on Windows using 'lib'.
+
+If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file
+is created, otherwise an executable program is created."
+ ;;
+
+ uninstall)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ *)
+ func_fatal_help "invalid operation mode '$opt_mode'"
+ ;;
+ esac
+
+ echo
+ $ECHO "Try '$progname --help' for more information about other modes."
+}
+
+# Now that we've collected a possible --mode arg, show help if necessary
+if $opt_help; then
+ if test : = "$opt_help"; then
+ func_mode_help
+ else
+ {
+ func_help noexit
+ for opt_mode in compile link execute install finish uninstall clean; do
+ func_mode_help
+ done
+ } | $SED -n '1p; 2,$s/^Usage:/ or: /p'
+ {
+ func_help noexit
+ for opt_mode in compile link execute install finish uninstall clean; do
+ echo
+ func_mode_help
+ done
+ } |
+ $SED '1d
+ /^When reporting/,/^Report/{
+ H
+ d
+ }
+ $x
+ /information about other modes/d
+ /more detailed .*MODE/d
+ s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
+ fi
+ exit $?
+fi
+
+
+# func_mode_execute arg...
+func_mode_execute ()
+{
+ $debug_cmd
+
+ # The first argument is the command name.
+ cmd=$nonopt
+ test -z "$cmd" && \
+ func_fatal_help "you must specify a COMMAND"
+
+ # Handle -dlopen flags immediately.
+ for file in $opt_dlopen; do
+ test -f "$file" \
+ || func_fatal_help "'$file' is not a file"
+
+ dir=
+ case $file in
+ *.la)
+ func_resolve_sysroot "$file"
+ file=$func_resolve_sysroot_result
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$file" \
+ || func_fatal_help "'$lib' is not a valid libtool archive"
+
+ # Read the libtool library.
+ dlname=
+ library_names=
+ func_source "$file"
+
+ # Skip this library if it cannot be dlopened.
+ if test -z "$dlname"; then
+ # Warn if it was a shared library.
+ test -n "$library_names" && \
+ func_warning "'$file' was not linked with '-export-dynamic'"
+ continue
+ fi
+
+ func_dirname "$file" "" "."
+ dir=$func_dirname_result
+
+ if test -f "$dir/$objdir/$dlname"; then
+ func_append dir "/$objdir"
+ else
+ if test ! -f "$dir/$dlname"; then
+ func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'"
+ fi
+ fi
+ ;;
+
+ *.lo)
+ # Just add the directory containing the .lo file.
+ func_dirname "$file" "" "."
+ dir=$func_dirname_result
+ ;;
+
+ *)
+ func_warning "'-dlopen' is ignored for non-libtool libraries and objects"
+ continue
+ ;;
+ esac
+
+ # Get the absolute pathname.
+ absdir=`cd "$dir" && pwd`
+ test -n "$absdir" && dir=$absdir
+
+ # Now add the directory to shlibpath_var.
+ if eval "test -z \"\$$shlibpath_var\""; then
+ eval "$shlibpath_var=\"\$dir\""
+ else
+ eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+ fi
+ done
+
+ # This variable tells wrapper scripts just to set shlibpath_var
+ # rather than running their programs.
+ libtool_execute_magic=$magic
+
+ # Check if any of the arguments is a wrapper script.
+ args=
+ for file
+ do
+ case $file in
+ -* | *.la | *.lo ) ;;
+ *)
+ # Do a test to see if this is really a libtool program.
+ if func_ltwrapper_script_p "$file"; then
+ func_source "$file"
+ # Transform arg to wrapped name.
+ file=$progdir/$program
+ elif func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ func_source "$func_ltwrapper_scriptname_result"
+ # Transform arg to wrapped name.
+ file=$progdir/$program
+ fi
+ ;;
+ esac
+ # Quote arguments (to preserve shell metacharacters).
+ func_append_quoted args "$file"
+ done
+
+ if $opt_dry_run; then
+ # Display what would be done.
+ if test -n "$shlibpath_var"; then
+ eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
+ echo "export $shlibpath_var"
+ fi
+ $ECHO "$cmd$args"
+ exit $EXIT_SUCCESS
+ else
+ if test -n "$shlibpath_var"; then
+ # Export the shlibpath_var.
+ eval "export $shlibpath_var"
+ fi
+
+ # Restore saved environment variables
+ for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+ do
+ eval "if test \"\${save_$lt_var+set}\" = set; then
+ $lt_var=\$save_$lt_var; export $lt_var
+ else
+ $lt_unset $lt_var
+ fi"
+ done
+
+ # Now prepare to actually exec the command.
+ exec_cmd=\$cmd$args
+ fi
+}
+
+test execute = "$opt_mode" && func_mode_execute ${1+"$@"}
+
+
+# func_mode_finish arg...
+func_mode_finish ()
+{
+ $debug_cmd
+
+ libs=
+ libdirs=
+ admincmds=
+
+ for opt in "$nonopt" ${1+"$@"}
+ do
+ if test -d "$opt"; then
+ func_append libdirs " $opt"
+
+ elif test -f "$opt"; then
+ if func_lalib_unsafe_p "$opt"; then
+ func_append libs " $opt"
+ else
+ func_warning "'$opt' is not a valid libtool archive"
+ fi
+
+ else
+ func_fatal_error "invalid argument '$opt'"
+ fi
+ done
+
+ if test -n "$libs"; then
+ if test -n "$lt_sysroot"; then
+ sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
+ sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
+ else
+ sysroot_cmd=
+ fi
+
+ # Remove sysroot references
+ if $opt_dry_run; then
+ for lib in $libs; do
+ echo "removing references to $lt_sysroot and '=' prefixes from $lib"
+ done
+ else
+ tmpdir=`func_mktempdir`
+ for lib in $libs; do
+ $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
+ > $tmpdir/tmp-la
+ mv -f $tmpdir/tmp-la $lib
+ done
+ ${RM}r "$tmpdir"
+ fi
+ fi
+
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ for libdir in $libdirs; do
+ if test -n "$finish_cmds"; then
+ # Do each command in the finish commands.
+ func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
+'"$cmd"'"'
+ fi
+ if test -n "$finish_eval"; then
+ # Do the single finish_eval.
+ eval cmds=\"$finish_eval\"
+ $opt_dry_run || eval "$cmds" || func_append admincmds "
+ $cmds"
+ fi
+ done
+ fi
+
+ # Exit here if they wanted silent mode.
+ $opt_quiet && exit $EXIT_SUCCESS
+
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ echo "----------------------------------------------------------------------"
+ echo "Libraries have been installed in:"
+ for libdir in $libdirs; do
+ $ECHO " $libdir"
+ done
+ echo
+ echo "If you ever happen to want to link against installed libraries"
+ echo "in a given directory, LIBDIR, you must either use libtool, and"
+ echo "specify the full pathname of the library, or use the '-LLIBDIR'"
+ echo "flag during linking and do at least one of the following:"
+ if test -n "$shlibpath_var"; then
+ echo " - add LIBDIR to the '$shlibpath_var' environment variable"
+ echo " during execution"
+ fi
+ if test -n "$runpath_var"; then
+ echo " - add LIBDIR to the '$runpath_var' environment variable"
+ echo " during linking"
+ fi
+ if test -n "$hardcode_libdir_flag_spec"; then
+ libdir=LIBDIR
+ eval flag=\"$hardcode_libdir_flag_spec\"
+
+ $ECHO " - use the '$flag' linker flag"
+ fi
+ if test -n "$admincmds"; then
+ $ECHO " - have your system administrator run these commands:$admincmds"
+ fi
+ if test -f /etc/ld.so.conf; then
+ echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'"
+ fi
+ echo
+
+ echo "See any operating system documentation about shared libraries for"
+ case $host in
+ solaris2.[6789]|solaris2.1[0-9])
+ echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
+ echo "pages."
+ ;;
+ *)
+ echo "more information, such as the ld(1) and ld.so(8) manual pages."
+ ;;
+ esac
+ echo "----------------------------------------------------------------------"
+ fi
+ exit $EXIT_SUCCESS
+}
+
+test finish = "$opt_mode" && func_mode_finish ${1+"$@"}
+
+
+# func_mode_install arg...
+func_mode_install ()
+{
+ $debug_cmd
+
+ # There may be an optional sh(1) argument at the beginning of
+ # install_prog (especially on Windows NT).
+ if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" ||
+ # Allow the use of GNU shtool's install command.
+ case $nonopt in *shtool*) :;; *) false;; esac
+ then
+ # Aesthetically quote it.
+ func_quote_for_eval "$nonopt"
+ install_prog="$func_quote_for_eval_result "
+ arg=$1
+ shift
+ else
+ install_prog=
+ arg=$nonopt
+ fi
+
+ # The real first argument should be the name of the installation program.
+ # Aesthetically quote it.
+ func_quote_for_eval "$arg"
+ func_append install_prog "$func_quote_for_eval_result"
+ install_shared_prog=$install_prog
+ case " $install_prog " in
+ *[\\\ /]cp\ *) install_cp=: ;;
+ *) install_cp=false ;;
+ esac
+
+ # We need to accept at least all the BSD install flags.
+ dest=
+ files=
+ opts=
+ prev=
+ install_type=
+ isdir=false
+ stripme=
+ no_mode=:
+ for arg
+ do
+ arg2=
+ if test -n "$dest"; then
+ func_append files " $dest"
+ dest=$arg
+ continue
+ fi
+
+ case $arg in
+ -d) isdir=: ;;
+ -f)
+ if $install_cp; then :; else
+ prev=$arg
+ fi
+ ;;
+ -g | -m | -o)
+ prev=$arg
+ ;;
+ -s)
+ stripme=" -s"
+ continue
+ ;;
+ -*)
+ ;;
+ *)
+ # If the previous option needed an argument, then skip it.
+ if test -n "$prev"; then
+ if test X-m = "X$prev" && test -n "$install_override_mode"; then
+ arg2=$install_override_mode
+ no_mode=false
+ fi
+ prev=
+ else
+ dest=$arg
+ continue
+ fi
+ ;;
+ esac
+
+ # Aesthetically quote the argument.
+ func_quote_for_eval "$arg"
+ func_append install_prog " $func_quote_for_eval_result"
+ if test -n "$arg2"; then
+ func_quote_for_eval "$arg2"
+ fi
+ func_append install_shared_prog " $func_quote_for_eval_result"
+ done
+
+ test -z "$install_prog" && \
+ func_fatal_help "you must specify an install program"
+
+ test -n "$prev" && \
+ func_fatal_help "the '$prev' option requires an argument"
+
+ if test -n "$install_override_mode" && $no_mode; then
+ if $install_cp; then :; else
+ func_quote_for_eval "$install_override_mode"
+ func_append install_shared_prog " -m $func_quote_for_eval_result"
+ fi
+ fi
+
+ if test -z "$files"; then
+ if test -z "$dest"; then
+ func_fatal_help "no file or destination specified"
+ else
+ func_fatal_help "you must specify a destination"
+ fi
+ fi
+
+ # Strip any trailing slash from the destination.
+ func_stripname '' '/' "$dest"
+ dest=$func_stripname_result
+
+ # Check to see that the destination is a directory.
+ test -d "$dest" && isdir=:
+ if $isdir; then
+ destdir=$dest
+ destname=
+ else
+ func_dirname_and_basename "$dest" "" "."
+ destdir=$func_dirname_result
+ destname=$func_basename_result
+
+ # Not a directory, so check to see that there is only one file specified.
+ set dummy $files; shift
+ test "$#" -gt 1 && \
+ func_fatal_help "'$dest' is not a directory"
+ fi
+ case $destdir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ for file in $files; do
+ case $file in
+ *.lo) ;;
+ *)
+ func_fatal_help "'$destdir' must be an absolute directory name"
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic=$magic
+
+ staticlibs=
+ future_libdirs=
+ current_libdirs=
+ for file in $files; do
+
+ # Do each installation.
+ case $file in
+ *.$libext)
+ # Do the static libraries later.
+ func_append staticlibs " $file"
+ ;;
+
+ *.la)
+ func_resolve_sysroot "$file"
+ file=$func_resolve_sysroot_result
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$file" \
+ || func_fatal_help "'$file' is not a valid libtool archive"
+
+ library_names=
+ old_library=
+ relink_command=
+ func_source "$file"
+
+ # Add the libdir to current_libdirs if it is the destination.
+ if test "X$destdir" = "X$libdir"; then
+ case "$current_libdirs " in
+ *" $libdir "*) ;;
+ *) func_append current_libdirs " $libdir" ;;
+ esac
+ else
+ # Note the libdir as a future libdir.
+ case "$future_libdirs " in
+ *" $libdir "*) ;;
+ *) func_append future_libdirs " $libdir" ;;
+ esac
+ fi
+
+ func_dirname "$file" "/" ""
+ dir=$func_dirname_result
+ func_append dir "$objdir"
+
+ if test -n "$relink_command"; then
+ # Determine the prefix the user has applied to our future dir.
+ inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
+
+ # Don't allow the user to place us outside of our expected
+ # location b/c this prevents finding dependent libraries that
+ # are installed to the same prefix.
+ # At present, this check doesn't affect windows .dll's that
+ # are installed into $libdir/../bin (currently, that works fine)
+ # but it's something to keep an eye on.
+ test "$inst_prefix_dir" = "$destdir" && \
+ func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir"
+
+ if test -n "$inst_prefix_dir"; then
+ # Stick the inst_prefix_dir data into the link command.
+ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+ else
+ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
+ fi
+
+ func_warning "relinking '$file'"
+ func_show_eval "$relink_command" \
+ 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"'
+ fi
+
+ # See the names of the shared library.
+ set dummy $library_names; shift
+ if test -n "$1"; then
+ realname=$1
+ shift
+
+ srcname=$realname
+ test -n "$relink_command" && srcname=${realname}T
+
+ # Install the shared library and build the symlinks.
+ func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
+ 'exit $?'
+ tstripme=$stripme
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ case $realname in
+ *.dll.a)
+ tstripme=
+ ;;
+ esac
+ ;;
+ os2*)
+ case $realname in
+ *_dll.a)
+ tstripme=
+ ;;
+ esac
+ ;;
+ esac
+ if test -n "$tstripme" && test -n "$striplib"; then
+ func_show_eval "$striplib $destdir/$realname" 'exit $?'
+ fi
+
+ if test "$#" -gt 0; then
+ # Delete the old symlinks, and create new ones.
+ # Try 'ln -sf' first, because the 'ln' binary might depend on
+ # the symlink we replace! Solaris /bin/ln does not understand -f,
+ # so we also need to try rm && ln -s.
+ for linkname
+ do
+ test "$linkname" != "$realname" \
+ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
+ done
+ fi
+
+ # Do each command in the postinstall commands.
+ lib=$destdir/$realname
+ func_execute_cmds "$postinstall_cmds" 'exit $?'
+ fi
+
+ # Install the pseudo-library for information purposes.
+ func_basename "$file"
+ name=$func_basename_result
+ instname=$dir/${name}i
+ func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
+
+ # Maybe install the static library, too.
+ test -n "$old_library" && func_append staticlibs " $dir/$old_library"
+ ;;
+
+ *.lo)
+ # Install (i.e. copy) a libtool object.
+
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile=$destdir/$destname
+ else
+ func_basename "$file"
+ destfile=$func_basename_result
+ destfile=$destdir/$destfile
+ fi
+
+ # Deduce the name of the destination old-style object file.
+ case $destfile in
+ *.lo)
+ func_lo2o "$destfile"
+ staticdest=$func_lo2o_result
+ ;;
+ *.$objext)
+ staticdest=$destfile
+ destfile=
+ ;;
+ *)
+ func_fatal_help "cannot copy a libtool object to '$destfile'"
+ ;;
+ esac
+
+ # Install the libtool object if requested.
+ test -n "$destfile" && \
+ func_show_eval "$install_prog $file $destfile" 'exit $?'
+
+ # Install the old object if enabled.
+ if test yes = "$build_old_libs"; then
+ # Deduce the name of the old-style object file.
+ func_lo2o "$file"
+ staticobj=$func_lo2o_result
+ func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
+ fi
+ exit $EXIT_SUCCESS
+ ;;
+
+ *)
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile=$destdir/$destname
+ else
+ func_basename "$file"
+ destfile=$func_basename_result
+ destfile=$destdir/$destfile
+ fi
+
+ # If the file is missing, and there is a .exe on the end, strip it
+ # because it is most likely a libtool script we actually want to
+ # install
+ stripped_ext=
+ case $file in
+ *.exe)
+ if test ! -f "$file"; then
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ stripped_ext=.exe
+ fi
+ ;;
+ esac
+
+ # Do a test to see if this is really a libtool program.
+ case $host in
+ *cygwin* | *mingw*)
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ wrapper=$func_ltwrapper_scriptname_result
+ else
+ func_stripname '' '.exe' "$file"
+ wrapper=$func_stripname_result
+ fi
+ ;;
+ *)
+ wrapper=$file
+ ;;
+ esac
+ if func_ltwrapper_script_p "$wrapper"; then
+ notinst_deplibs=
+ relink_command=
+
+ func_source "$wrapper"
+
+ # Check the variables that should have been set.
+ test -z "$generated_by_libtool_version" && \
+ func_fatal_error "invalid libtool wrapper script '$wrapper'"
+
+ finalize=:
+ for lib in $notinst_deplibs; do
+ # Check to see that each library is installed.
+ libdir=
+ if test -f "$lib"; then
+ func_source "$lib"
+ fi
+ libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'`
+ if test -n "$libdir" && test ! -f "$libfile"; then
+ func_warning "'$lib' has not been installed in '$libdir'"
+ finalize=false
+ fi
+ done
+
+ relink_command=
+ func_source "$wrapper"
+
+ outputname=
+ if test no = "$fast_install" && test -n "$relink_command"; then
+ $opt_dry_run || {
+ if $finalize; then
+ tmpdir=`func_mktempdir`
+ func_basename "$file$stripped_ext"
+ file=$func_basename_result
+ outputname=$tmpdir/$file
+ # Replace the output file specification.
+ relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
+
+ $opt_quiet || {
+ func_quote_for_expand "$relink_command"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ if eval "$relink_command"; then :
+ else
+ func_error "error: relink '$file' with the above command before installing it"
+ $opt_dry_run || ${RM}r "$tmpdir"
+ continue
+ fi
+ file=$outputname
+ else
+ func_warning "cannot relink '$file'"
+ fi
+ }
+ else
+ # Install the binary that we compiled earlier.
+ file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"`
+ fi
+ fi
+
+ # remove .exe since cygwin /usr/bin/install will append another
+ # one anyway
+ case $install_prog,$host in
+ */usr/bin/install*,*cygwin*)
+ case $file:$destfile in
+ *.exe:*.exe)
+ # this is ok
+ ;;
+ *.exe:*)
+ destfile=$destfile.exe
+ ;;
+ *:*.exe)
+ func_stripname '' '.exe' "$destfile"
+ destfile=$func_stripname_result
+ ;;
+ esac
+ ;;
+ esac
+ func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
+ $opt_dry_run || if test -n "$outputname"; then
+ ${RM}r "$tmpdir"
+ fi
+ ;;
+ esac
+ done
+
+ for file in $staticlibs; do
+ func_basename "$file"
+ name=$func_basename_result
+
+ # Set up the ranlib parameters.
+ oldlib=$destdir/$name
+ func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
+ tool_oldlib=$func_to_tool_file_result
+
+ func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
+
+ if test -n "$stripme" && test -n "$old_striplib"; then
+ func_show_eval "$old_striplib $tool_oldlib" 'exit $?'
+ fi
+
+ # Do each command in the postinstall commands.
+ func_execute_cmds "$old_postinstall_cmds" 'exit $?'
+ done
+
+ test -n "$future_libdirs" && \
+ func_warning "remember to run '$progname --finish$future_libdirs'"
+
+ if test -n "$current_libdirs"; then
+ # Maybe just do a dry run.
+ $opt_dry_run && current_libdirs=" -n$current_libdirs"
+ exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs'
+ else
+ exit $EXIT_SUCCESS
+ fi
+}
+
+test install = "$opt_mode" && func_mode_install ${1+"$@"}
+
+
+# func_generate_dlsyms outputname originator pic_p
+# Extract symbols from dlprefiles and create ${outputname}S.o with
+# a dlpreopen symbol table.
+func_generate_dlsyms ()
+{
+ $debug_cmd
+
+ my_outputname=$1
+ my_originator=$2
+ my_pic_p=${3-false}
+ my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'`
+ my_dlsyms=
+
+ if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
+ if test -n "$NM" && test -n "$global_symbol_pipe"; then
+ my_dlsyms=${my_outputname}S.c
+ else
+ func_error "not configured to extract global symbols from dlpreopened files"
+ fi
+ fi
+
+ if test -n "$my_dlsyms"; then
+ case $my_dlsyms in
+ "") ;;
+ *.c)
+ # Discover the nlist of each of the dlfiles.
+ nlist=$output_objdir/$my_outputname.nm
+
+ func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
+
+ # Parse the name list into a source file.
+ func_verbose "creating $output_objdir/$my_dlsyms"
+
+ $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
+/* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */
+/* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+#if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
+#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
+#endif
+
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
+#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
+/* DATA imports from DLLs on WIN32 can't be const, because runtime
+ relocations are performed -- see ld's documentation on pseudo-relocs. */
+# define LT_DLSYM_CONST
+#elif defined __osf__
+/* This system does not cope well with relocations in const data. */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
+#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
+
+/* External symbol declarations for the compiler. */\
+"
+
+ if test yes = "$dlself"; then
+ func_verbose "generating symbol list for '$output'"
+
+ $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
+
+ # Add our own program objects to the symbol list.
+ progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ for progfile in $progfiles; do
+ func_to_tool_file "$progfile" func_convert_file_msys_to_w32
+ func_verbose "extracting global C symbols from '$func_to_tool_file_result'"
+ $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
+ done
+
+ if test -n "$exclude_expsyms"; then
+ $opt_dry_run || {
+ eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ if test -n "$export_symbols_regex"; then
+ $opt_dry_run || {
+ eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ export_symbols=$output_objdir/$outputname.exp
+ $opt_dry_run || {
+ $RM $export_symbols
+ eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ else
+ $opt_dry_run || {
+ eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+ eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ fi
+ fi
+
+ for dlprefile in $dlprefiles; do
+ func_verbose "extracting global C symbols from '$dlprefile'"
+ func_basename "$dlprefile"
+ name=$func_basename_result
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ # if an import library, we need to obtain dlname
+ if func_win32_import_lib_p "$dlprefile"; then
+ func_tr_sh "$dlprefile"
+ eval "curr_lafile=\$libfile_$func_tr_sh_result"
+ dlprefile_dlbasename=
+ if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
+ # Use subshell, to avoid clobbering current variable values
+ dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
+ if test -n "$dlprefile_dlname"; then
+ func_basename "$dlprefile_dlname"
+ dlprefile_dlbasename=$func_basename_result
+ else
+ # no lafile. user explicitly requested -dlpreopen <import library>.
+ $sharedlib_from_linklib_cmd "$dlprefile"
+ dlprefile_dlbasename=$sharedlib_from_linklib_result
+ fi
+ fi
+ $opt_dry_run || {
+ if test -n "$dlprefile_dlbasename"; then
+ eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
+ else
+ func_warning "Could not compute DLL name from $name"
+ eval '$ECHO ": $name " >> "$nlist"'
+ fi
+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
+ $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
+ }
+ else # not an import lib
+ $opt_dry_run || {
+ eval '$ECHO ": $name " >> "$nlist"'
+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+ }
+ fi
+ ;;
+ *)
+ $opt_dry_run || {
+ eval '$ECHO ": $name " >> "$nlist"'
+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+ }
+ ;;
+ esac
+ done
+
+ $opt_dry_run || {
+ # Make sure we have at least an empty file.
+ test -f "$nlist" || : > "$nlist"
+
+ if test -n "$exclude_expsyms"; then
+ $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+ $MV "$nlist"T "$nlist"
+ fi
+
+ # Try sorting and uniquifying the output.
+ if $GREP -v "^: " < "$nlist" |
+ if sort -k 3 </dev/null >/dev/null 2>&1; then
+ sort -k 3
+ else
+ sort +2
+ fi |
+ uniq > "$nlist"S; then
+ :
+ else
+ $GREP -v "^: " < "$nlist" > "$nlist"S
+ fi
+
+ if test -f "$nlist"S; then
+ eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
+ else
+ echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
+ fi
+
+ func_show_eval '$RM "${nlist}I"'
+ if test -n "$global_symbol_to_import"; then
+ eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I'
+ fi
+
+ echo >> "$output_objdir/$my_dlsyms" "\
+
+/* The mapping between symbol names and symbols. */
+typedef struct {
+ const char *name;
+ void *address;
+} lt_dlsymlist;
+extern LT_DLSYM_CONST lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[];\
+"
+
+ if test -s "$nlist"I; then
+ echo >> "$output_objdir/$my_dlsyms" "\
+static void lt_syminit(void)
+{
+ LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols;
+ for (; symbol->name; ++symbol)
+ {"
+ $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms"
+ echo >> "$output_objdir/$my_dlsyms" "\
+ }
+}"
+ fi
+ echo >> "$output_objdir/$my_dlsyms" "\
+LT_DLSYM_CONST lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[] =
+{ {\"$my_originator\", (void *) 0},"
+
+ if test -s "$nlist"I; then
+ echo >> "$output_objdir/$my_dlsyms" "\
+ {\"@INIT@\", (void *) &lt_syminit},"
+ fi
+
+ case $need_lib_prefix in
+ no)
+ eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
+ ;;
+ *)
+ eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
+ ;;
+ esac
+ echo >> "$output_objdir/$my_dlsyms" "\
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt_${my_prefix}_LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+ } # !$opt_dry_run
+
+ pic_flag_for_symtable=
+ case "$compile_command " in
+ *" -static "*) ;;
+ *)
+ case $host in
+ # compiling the symbol table file with pic_flag works around
+ # a FreeBSD bug that causes programs to crash when -lm is
+ # linked before any other PIC object. But we must not use
+ # pic_flag when linking with -static. The problem exists in
+ # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+ *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+ pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
+ *-*-hpux*)
+ pic_flag_for_symtable=" $pic_flag" ;;
+ *)
+ $my_pic_p && pic_flag_for_symtable=" $pic_flag"
+ ;;
+ esac
+ ;;
+ esac
+ symtab_cflags=
+ for arg in $LTCFLAGS; do
+ case $arg in
+ -pie | -fpie | -fPIE) ;;
+ *) func_append symtab_cflags " $arg" ;;
+ esac
+ done
+
+ # Now compile the dynamic symbol file.
+ func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
+
+ # Clean up the generated files.
+ func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"'
+
+ # Transform the symbol file into the correct name.
+ symfileobj=$output_objdir/${my_outputname}S.$objext
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ if test -f "$output_objdir/$my_outputname.def"; then
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ else
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ fi
+ ;;
+ *)
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ ;;
+ esac
+ ;;
+ *)
+ func_fatal_error "unknown suffix for '$my_dlsyms'"
+ ;;
+ esac
+ else
+ # We keep going just in case the user didn't refer to
+ # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
+ # really was required.
+
+ # Nullify the symbol file.
+ compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
+ fi
+}
+
+# func_cygming_gnu_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is a GNU/binutils-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_gnu_implib_p ()
+{
+ $debug_cmd
+
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
+ test -n "$func_cygming_gnu_implib_tmp"
+}
+
+# func_cygming_ms_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is an MS-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_ms_implib_p ()
+{
+ $debug_cmd
+
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
+ test -n "$func_cygming_ms_implib_tmp"
+}
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+# Despite the name, also deal with 64 bit binaries.
+func_win32_libid ()
+{
+ $debug_cmd
+
+ win32_libid_type=unknown
+ win32_fileres=`file -L $1 2>/dev/null`
+ case $win32_fileres in
+ *ar\ archive\ import\ library*) # definitely import
+ win32_libid_type="x86 archive import"
+ ;;
+ *ar\ archive*) # could be an import, or static
+ # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
+ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
+ $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
+ case $nm_interface in
+ "MS dumpbin")
+ if func_cygming_ms_implib_p "$1" ||
+ func_cygming_gnu_implib_p "$1"
+ then
+ win32_nmres=import
+ else
+ win32_nmres=
+ fi
+ ;;
+ *)
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
+ $SED -n -e '
+ 1,100{
+ / I /{
+ s|.*|import|
+ p
+ q
+ }
+ }'`
+ ;;
+ esac
+ case $win32_nmres in
+ import*) win32_libid_type="x86 archive import";;
+ *) win32_libid_type="x86 archive static";;
+ esac
+ fi
+ ;;
+ *DLL*)
+ win32_libid_type="x86 DLL"
+ ;;
+ *executable*) # but shell scripts are "executable" too...
+ case $win32_fileres in
+ *MS\ Windows\ PE\ Intel*)
+ win32_libid_type="x86 DLL"
+ ;;
+ esac
+ ;;
+ esac
+ $ECHO "$win32_libid_type"
+}
+
+# func_cygming_dll_for_implib ARG
+#
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+# Invoked by eval'ing the libtool variable
+# $sharedlib_from_linklib_cmd
+# Result is available in the variable
+# $sharedlib_from_linklib_result
+func_cygming_dll_for_implib ()
+{
+ $debug_cmd
+
+ sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
+}
+
+# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
+#
+# The is the core of a fallback implementation of a
+# platform-specific function to extract the name of the
+# DLL associated with the specified import library LIBNAME.
+#
+# SECTION_NAME is either .idata$6 or .idata$7, depending
+# on the platform and compiler that created the implib.
+#
+# Echos the name of the DLL associated with the
+# specified import library.
+func_cygming_dll_for_implib_fallback_core ()
+{
+ $debug_cmd
+
+ match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
+ $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
+ $SED '/^Contents of section '"$match_literal"':/{
+ # Place marker at beginning of archive member dllname section
+ s/.*/====MARK====/
+ p
+ d
+ }
+ # These lines can sometimes be longer than 43 characters, but
+ # are always uninteresting
+ /:[ ]*file format pe[i]\{,1\}-/d
+ /^In archive [^:]*:/d
+ # Ensure marker is printed
+ /^====MARK====/p
+ # Remove all lines with less than 43 characters
+ /^.\{43\}/!d
+ # From remaining lines, remove first 43 characters
+ s/^.\{43\}//' |
+ $SED -n '
+ # Join marker and all lines until next marker into a single line
+ /^====MARK====/ b para
+ H
+ $ b para
+ b
+ :para
+ x
+ s/\n//g
+ # Remove the marker
+ s/^====MARK====//
+ # Remove trailing dots and whitespace
+ s/[\. \t]*$//
+ # Print
+ /./p' |
+ # we now have a list, one entry per line, of the stringified
+ # contents of the appropriate section of all members of the
+ # archive that possess that section. Heuristic: eliminate
+ # all those that have a first or second character that is
+ # a '.' (that is, objdump's representation of an unprintable
+ # character.) This should work for all archives with less than
+ # 0x302f exports -- but will fail for DLLs whose name actually
+ # begins with a literal '.' or a single character followed by
+ # a '.'.
+ #
+ # Of those that remain, print the first one.
+ $SED -e '/^\./d;/^.\./d;q'
+}
+
+# func_cygming_dll_for_implib_fallback ARG
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+#
+# This fallback implementation is for use when $DLLTOOL
+# does not support the --identify-strict option.
+# Invoked by eval'ing the libtool variable
+# $sharedlib_from_linklib_cmd
+# Result is available in the variable
+# $sharedlib_from_linklib_result
+func_cygming_dll_for_implib_fallback ()
+{
+ $debug_cmd
+
+ if func_cygming_gnu_implib_p "$1"; then
+ # binutils import library
+ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
+ elif func_cygming_ms_implib_p "$1"; then
+ # ms-generated import library
+ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
+ else
+ # unknown
+ sharedlib_from_linklib_result=
+ fi
+}
+
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+ $debug_cmd
+
+ f_ex_an_ar_dir=$1; shift
+ f_ex_an_ar_oldlib=$1
+ if test yes = "$lock_old_archive_extraction"; then
+ lockfile=$f_ex_an_ar_oldlib.lock
+ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+ func_echo "Waiting for $lockfile to be removed"
+ sleep 2
+ done
+ fi
+ func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
+ 'stat=$?; rm -f "$lockfile"; exit $stat'
+ if test yes = "$lock_old_archive_extraction"; then
+ $opt_dry_run || rm -f "$lockfile"
+ fi
+ if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
+ fi
+}
+
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+ $debug_cmd
+
+ my_gentop=$1; shift
+ my_oldlibs=${1+"$@"}
+ my_oldobjs=
+ my_xlib=
+ my_xabs=
+ my_xdir=
+
+ for my_xlib in $my_oldlibs; do
+ # Extract the objects.
+ case $my_xlib in
+ [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;;
+ *) my_xabs=`pwd`"/$my_xlib" ;;
+ esac
+ func_basename "$my_xlib"
+ my_xlib=$func_basename_result
+ my_xlib_u=$my_xlib
+ while :; do
+ case " $extracted_archives " in
+ *" $my_xlib_u "*)
+ func_arith $extracted_serial + 1
+ extracted_serial=$func_arith_result
+ my_xlib_u=lt$extracted_serial-$my_xlib ;;
+ *) break ;;
+ esac
+ done
+ extracted_archives="$extracted_archives $my_xlib_u"
+ my_xdir=$my_gentop/$my_xlib_u
+
+ func_mkdir_p "$my_xdir"
+
+ case $host in
+ *-darwin*)
+ func_verbose "Extracting $my_xabs"
+ # Do not bother doing anything if just a dry run
+ $opt_dry_run || {
+ darwin_orig_dir=`pwd`
+ cd $my_xdir || exit $?
+ darwin_archive=$my_xabs
+ darwin_curdir=`pwd`
+ func_basename "$darwin_archive"
+ darwin_base_archive=$func_basename_result
+ darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
+ if test -n "$darwin_arches"; then
+ darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
+ darwin_arch=
+ func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
+ for darwin_arch in $darwin_arches; do
+ func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch"
+ $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive"
+ cd "unfat-$$/$darwin_base_archive-$darwin_arch"
+ func_extract_an_archive "`pwd`" "$darwin_base_archive"
+ cd "$darwin_curdir"
+ $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive"
+ done # $darwin_arches
+ ## Okay now we've a bunch of thin objects, gotta fatten them up :)
+ darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u`
+ darwin_file=
+ darwin_files=
+ for darwin_file in $darwin_filelist; do
+ darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`
+ $LIPO -create -output "$darwin_file" $darwin_files
+ done # $darwin_filelist
+ $RM -rf unfat-$$
+ cd "$darwin_orig_dir"
+ else
+ cd $darwin_orig_dir
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ fi # $darwin_arches
+ } # !$opt_dry_run
+ ;;
+ *)
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ ;;
+ esac
+ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
+ done
+
+ func_extract_archives_result=$my_oldobjs
+}
+
+
+# func_emit_wrapper [arg=no]
+#
+# Emit a libtool wrapper script on stdout.
+# Don't directly open a file because we may want to
+# incorporate the script contents within a cygwin/mingw
+# wrapper executable. Must ONLY be called from within
+# func_mode_link because it depends on a number of variables
+# set therein.
+#
+# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
+# variable will take. If 'yes', then the emitted script
+# will assume that the directory where it is stored is
+# the $objdir directory. This is a cygwin/mingw-specific
+# behavior.
+func_emit_wrapper ()
+{
+ func_emit_wrapper_arg1=${1-no}
+
+ $ECHO "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM (GNU $PACKAGE) $VERSION
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='$sed_quote_subst'
+
+# Be Bourne compatible
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+ # install mode needs the following variables:
+ generated_by_libtool_version='$macro_version'
+ notinst_deplibs='$notinst_deplibs'
+else
+ # When we are sourced in execute mode, \$file and \$ECHO are already set.
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ file=\"\$0\""
+
+ qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
+ $ECHO "\
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+\$1
+_LTECHO_EOF'
+}
+ ECHO=\"$qECHO\"
+ fi
+
+# Very basic option parsing. These options are (a) specific to
+# the libtool wrapper, (b) are identical between the wrapper
+# /script/ and the wrapper /executable/ that is used only on
+# windows platforms, and (c) all begin with the string "--lt-"
+# (application programs are unlikely to have options that match
+# this pattern).
+#
+# There are only two supported options: --lt-debug and
+# --lt-dump-script. There is, deliberately, no --lt-help.
+#
+# The first argument to this parsing function should be the
+# script's $0 value, followed by "$@".
+lt_option_debug=
+func_parse_lt_options ()
+{
+ lt_script_arg0=\$0
+ shift
+ for lt_opt
+ do
+ case \"\$lt_opt\" in
+ --lt-debug) lt_option_debug=1 ;;
+ --lt-dump-script)
+ lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\`
+ test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=.
+ lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\`
+ cat \"\$lt_dump_D/\$lt_dump_F\"
+ exit 0
+ ;;
+ --lt-*)
+ \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2
+ exit 1
+ ;;
+ esac
+ done
+
+ # Print the debug banner immediately:
+ if test -n \"\$lt_option_debug\"; then
+ echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2
+ fi
+}
+
+# Used when --lt-debug. Prints its arguments to stdout
+# (redirection is the responsibility of the caller)
+func_lt_dump_args ()
+{
+ lt_dump_args_N=1;
+ for lt_arg
+ do
+ \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\"
+ lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
+ done
+}
+
+# Core function for launching the target application
+func_exec_program_core ()
+{
+"
+ case $host in
+ # Backslashes separate directories on plain windows
+ *-*-mingw | *-*-os2* | *-cegcc*)
+ $ECHO "\
+ if test -n \"\$lt_option_debug\"; then
+ \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2
+ func_lt_dump_args \${1+\"\$@\"} 1>&2
+ fi
+ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
+"
+ ;;
+
+ *)
+ $ECHO "\
+ if test -n \"\$lt_option_debug\"; then
+ \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2
+ func_lt_dump_args \${1+\"\$@\"} 1>&2
+ fi
+ exec \"\$progdir/\$program\" \${1+\"\$@\"}
+"
+ ;;
+ esac
+ $ECHO "\
+ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
+ exit 1
+}
+
+# A function to encapsulate launching the target application
+# Strips options in the --lt-* namespace from \$@ and
+# launches target application with the remaining arguments.
+func_exec_program ()
+{
+ case \" \$* \" in
+ *\\ --lt-*)
+ for lt_wr_arg
+ do
+ case \$lt_wr_arg in
+ --lt-*) ;;
+ *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
+ esac
+ shift
+ done ;;
+ esac
+ func_exec_program_core \${1+\"\$@\"}
+}
+
+ # Parse options
+ func_parse_lt_options \"\$0\" \${1+\"\$@\"}
+
+ # Find the directory that this script lives in.
+ thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
+ test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+ # Follow symbolic links until we get to the real thisdir.
+ file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\`
+ while test -n \"\$file\"; do
+ destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\`
+
+ # If there was a directory component, then change thisdir.
+ if test \"x\$destdir\" != \"x\$file\"; then
+ case \"\$destdir\" in
+ [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+ *) thisdir=\"\$thisdir/\$destdir\" ;;
+ esac
+ fi
+
+ file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\`
+ file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
+ done
+
+ # Usually 'no', except on cygwin/mingw when embedded into
+ # the cwrapper.
+ WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
+ if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
+ # special case for '.'
+ if test \"\$thisdir\" = \".\"; then
+ thisdir=\`pwd\`
+ fi
+ # remove .libs from thisdir
+ case \"\$thisdir\" in
+ *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;;
+ $objdir ) thisdir=. ;;
+ esac
+ fi
+
+ # Try to get the absolute directory name.
+ absdir=\`cd \"\$thisdir\" && pwd\`
+ test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+ if test yes = "$fast_install"; then
+ $ECHO "\
+ program=lt-'$outputname'$exeext
+ progdir=\"\$thisdir/$objdir\"
+
+ if test ! -f \"\$progdir/\$program\" ||
+ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\
+ test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+ file=\"\$\$-\$program\"
+
+ if test ! -d \"\$progdir\"; then
+ $MKDIR \"\$progdir\"
+ else
+ $RM \"\$progdir/\$file\"
+ fi"
+
+ $ECHO "\
+
+ # relink executable if necessary
+ if test -n \"\$relink_command\"; then
+ if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+ else
+ \$ECHO \"\$relink_command_output\" >&2
+ $RM \"\$progdir/\$file\"
+ exit 1
+ fi
+ fi
+
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+ { $RM \"\$progdir/\$program\";
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+ $RM \"\$progdir/\$file\"
+ fi"
+ else
+ $ECHO "\
+ program='$outputname'
+ progdir=\"\$thisdir/$objdir\"
+"
+ fi
+
+ $ECHO "\
+
+ if test -f \"\$progdir/\$program\"; then"
+
+ # fixup the dll searchpath if we need to.
+ #
+ # Fix the DLL searchpath if we need to. Do this before prepending
+ # to shlibpath, because on Windows, both are PATH and uninstalled
+ # libraries must come first.
+ if test -n "$dllsearchpath"; then
+ $ECHO "\
+ # Add the dll search path components to the executable PATH
+ PATH=$dllsearchpath:\$PATH
+"
+ fi
+
+ # Export our shlibpath_var if we have one.
+ if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ $ECHO "\
+ # Add our own library path to $shlibpath_var
+ $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+ # Some systems cannot cope with colon-terminated $shlibpath_var
+ # The second colon is a workaround for a bug in BeOS R4 sed
+ $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\`
+
+ export $shlibpath_var
+"
+ fi
+
+ $ECHO "\
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ # Run the actual program with our arguments.
+ func_exec_program \${1+\"\$@\"}
+ fi
+ else
+ # The program doesn't exist.
+ \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2
+ \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
+ \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
+ exit 1
+ fi
+fi\
+"
+}
+
+
+# func_emit_cwrapperexe_src
+# emit the source code for a wrapper executable on stdout
+# Must ONLY be called from within func_mode_link because
+# it depends on a number of variable set therein.
+func_emit_cwrapperexe_src ()
+{
+ cat <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+ Generated by $PROGRAM (GNU $PACKAGE) $VERSION
+
+ The $output program cannot be directly executed until all the libtool
+ libraries that it depends on are installed.
+
+ This wrapper executable should never be moved out of the build directory.
+ If it is, it will not operate correctly.
+*/
+EOF
+ cat <<"EOF"
+#ifdef _MSC_VER
+# define _CRT_SECURE_NO_DEPRECATE 1
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef _MSC_VER
+# include <direct.h>
+# include <process.h>
+# include <io.h>
+#else
+# include <unistd.h>
+# include <stdint.h>
+# ifdef __CYGWIN__
+# include <io.h>
+# endif
+#endif
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
+
+/* declarations of non-ANSI functions */
+#if defined __MINGW32__
+# ifdef __STRICT_ANSI__
+int _putenv (const char *);
+# endif
+#elif defined __CYGWIN__
+# ifdef __STRICT_ANSI__
+char *realpath (const char *, char *);
+int putenv (char *);
+int setenv (const char *, const char *, int);
+# endif
+/* #elif defined other_platform || defined ... */
+#endif
+
+/* portability defines, excluding path handling macros */
+#if defined _MSC_VER
+# define setmode _setmode
+# define stat _stat
+# define chmod _chmod
+# define getcwd _getcwd
+# define putenv _putenv
+# define S_IXUSR _S_IEXEC
+#elif defined __MINGW32__
+# define setmode _setmode
+# define stat _stat
+# define chmod _chmod
+# define getcwd _getcwd
+# define putenv _putenv
+#elif defined __CYGWIN__
+# define HAVE_SETENV
+# define FOPEN_WB "wb"
+/* #elif defined other platforms ... */
+#endif
+
+#if defined PATH_MAX
+# define LT_PATHMAX PATH_MAX
+#elif defined MAXPATHLEN
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef S_IXOTH
+# define S_IXOTH 0
+#endif
+#ifndef S_IXGRP
+# define S_IXGRP 0
+#endif
+
+/* path handling portability macros */
+#ifndef DIR_SEPARATOR
+# define DIR_SEPARATOR '/'
+# define PATH_SEPARATOR ':'
+#endif
+
+#if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \
+ defined __OS2__
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# define FOPEN_WB "wb"
+# ifndef DIR_SEPARATOR_2
+# define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+# define PATH_SEPARATOR_2 ';'
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#ifndef PATH_SEPARATOR_2
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
+#else /* PATH_SEPARATOR_2 */
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
+#endif /* PATH_SEPARATOR_2 */
+
+#ifndef FOPEN_WB
+# define FOPEN_WB "w"
+#endif
+#ifndef _O_BINARY
+# define _O_BINARY 0
+#endif
+
+#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+ if (stale) { free (stale); stale = 0; } \
+} while (0)
+
+#if defined LT_DEBUGWRAPPER
+static int lt_debug = 1;
+#else
+static int lt_debug = 0;
+#endif
+
+const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */
+
+void *xmalloc (size_t num);
+char *xstrdup (const char *string);
+const char *base_name (const char *name);
+char *find_executable (const char *wrapper);
+char *chase_symlinks (const char *pathspec);
+int make_executable (const char *path);
+int check_executable (const char *path);
+char *strendzap (char *str, const char *pat);
+void lt_debugprintf (const char *file, int line, const char *fmt, ...);
+void lt_fatal (const char *file, int line, const char *message, ...);
+static const char *nonnull (const char *s);
+static const char *nonempty (const char *s);
+void lt_setenv (const char *name, const char *value);
+char *lt_extend_str (const char *orig_value, const char *add, int to_end);
+void lt_update_exe_path (const char *name, const char *value);
+void lt_update_lib_path (const char *name, const char *value);
+char **prepare_spawn (char **argv);
+void lt_dump_script (FILE *f);
+EOF
+
+ cat <<EOF
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
+# define externally_visible volatile
+#else
+# define externally_visible __attribute__((externally_visible)) volatile
+#endif
+externally_visible const char * MAGIC_EXE = "$magic_exe";
+const char * LIB_PATH_VARNAME = "$shlibpath_var";
+EOF
+
+ if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ func_to_host_path "$temp_rpath"
+ cat <<EOF
+const char * LIB_PATH_VALUE = "$func_to_host_path_result";
+EOF
+ else
+ cat <<"EOF"
+const char * LIB_PATH_VALUE = "";
+EOF
+ fi
+
+ if test -n "$dllsearchpath"; then
+ func_to_host_path "$dllsearchpath:"
+ cat <<EOF
+const char * EXE_PATH_VARNAME = "PATH";
+const char * EXE_PATH_VALUE = "$func_to_host_path_result";
+EOF
+ else
+ cat <<"EOF"
+const char * EXE_PATH_VARNAME = "";
+const char * EXE_PATH_VALUE = "";
+EOF
+ fi
+
+ if test yes = "$fast_install"; then
+ cat <<EOF
+const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
+EOF
+ else
+ cat <<EOF
+const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
+EOF
+ fi
+
+
+ cat <<"EOF"
+
+#define LTWRAPPER_OPTION_PREFIX "--lt-"
+
+static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
+static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
+static const char *debug_opt = LTWRAPPER_OPTION_PREFIX "debug";
+
+int
+main (int argc, char *argv[])
+{
+ char **newargz;
+ int newargc;
+ char *tmp_pathspec;
+ char *actual_cwrapper_path;
+ char *actual_cwrapper_name;
+ char *target_name;
+ char *lt_argv_zero;
+ int rval = 127;
+
+ int i;
+
+ program_name = (char *) xstrdup (base_name (argv[0]));
+ newargz = XMALLOC (char *, (size_t) argc + 1);
+
+ /* very simple arg parsing; don't want to rely on getopt
+ * also, copy all non cwrapper options to newargz, except
+ * argz[0], which is handled differently
+ */
+ newargc=0;
+ for (i = 1; i < argc; i++)
+ {
+ if (STREQ (argv[i], dumpscript_opt))
+ {
+EOF
+ case $host in
+ *mingw* | *cygwin* )
+ # make stdout use "unix" line endings
+ echo " setmode(1,_O_BINARY);"
+ ;;
+ esac
+
+ cat <<"EOF"
+ lt_dump_script (stdout);
+ return 0;
+ }
+ if (STREQ (argv[i], debug_opt))
+ {
+ lt_debug = 1;
+ continue;
+ }
+ if (STREQ (argv[i], ltwrapper_option_prefix))
+ {
+ /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
+ namespace, but it is not one of the ones we know about and
+ have already dealt with, above (inluding dump-script), then
+ report an error. Otherwise, targets might begin to believe
+ they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
+ namespace. The first time any user complains about this, we'll
+ need to make LTWRAPPER_OPTION_PREFIX a configure-time option
+ or a configure.ac-settable value.
+ */
+ lt_fatal (__FILE__, __LINE__,
+ "unrecognized %s option: '%s'",
+ ltwrapper_option_prefix, argv[i]);
+ }
+ /* otherwise ... */
+ newargz[++newargc] = xstrdup (argv[i]);
+ }
+ newargz[++newargc] = NULL;
+
+EOF
+ cat <<EOF
+ /* The GNU banner must be the first non-error debug message */
+ lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE) $VERSION\n");
+EOF
+ cat <<"EOF"
+ lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
+ lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name);
+
+ tmp_pathspec = find_executable (argv[0]);
+ if (tmp_pathspec == NULL)
+ lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]);
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) found exe (before symlink chase) at: %s\n",
+ tmp_pathspec);
+
+ actual_cwrapper_path = chase_symlinks (tmp_pathspec);
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) found exe (after symlink chase) at: %s\n",
+ actual_cwrapper_path);
+ XFREE (tmp_pathspec);
+
+ actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path));
+ strendzap (actual_cwrapper_path, actual_cwrapper_name);
+
+ /* wrapper name transforms */
+ strendzap (actual_cwrapper_name, ".exe");
+ tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
+ XFREE (actual_cwrapper_name);
+ actual_cwrapper_name = tmp_pathspec;
+ tmp_pathspec = 0;
+
+ /* target_name transforms -- use actual target program name; might have lt- prefix */
+ target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
+ strendzap (target_name, ".exe");
+ tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
+ XFREE (target_name);
+ target_name = tmp_pathspec;
+ tmp_pathspec = 0;
+
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) libtool target name: %s\n",
+ target_name);
+EOF
+
+ cat <<EOF
+ newargz[0] =
+ XMALLOC (char, (strlen (actual_cwrapper_path) +
+ strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
+ strcpy (newargz[0], actual_cwrapper_path);
+ strcat (newargz[0], "$objdir");
+ strcat (newargz[0], "/");
+EOF
+
+ cat <<"EOF"
+ /* stop here, and copy so we don't have to do this twice */
+ tmp_pathspec = xstrdup (newargz[0]);
+
+ /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
+ strcat (newargz[0], actual_cwrapper_name);
+
+ /* DO want the lt- prefix here if it exists, so use target_name */
+ lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
+ XFREE (tmp_pathspec);
+ tmp_pathspec = NULL;
+EOF
+
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+ {
+ char* p;
+ while ((p = strchr (newargz[0], '\\')) != NULL)
+ {
+ *p = '/';
+ }
+ while ((p = strchr (lt_argv_zero, '\\')) != NULL)
+ {
+ *p = '/';
+ }
+ }
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+ XFREE (target_name);
+ XFREE (actual_cwrapper_path);
+ XFREE (actual_cwrapper_name);
+
+ lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
+ lt_setenv ("DUALCASE", "1"); /* for MSK sh */
+ /* Update the DLL searchpath. EXE_PATH_VALUE ($dllsearchpath) must
+ be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)
+ because on Windows, both *_VARNAMEs are PATH but uninstalled
+ libraries must come first. */
+ lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
+ lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
+
+ lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
+ nonnull (lt_argv_zero));
+ for (i = 0; i < newargc; i++)
+ {
+ lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n",
+ i, nonnull (newargz[i]));
+ }
+
+EOF
+
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+ /* execv doesn't actually work on mingw as expected on unix */
+ newargz = prepare_spawn (newargz);
+ rval = (int) _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
+ if (rval == -1)
+ {
+ /* failed to start process */
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) failed to launch target \"%s\": %s\n",
+ lt_argv_zero, nonnull (strerror (errno)));
+ return 127;
+ }
+ return rval;
+EOF
+ ;;
+ *)
+ cat <<"EOF"
+ execv (lt_argv_zero, newargz);
+ return rval; /* =127, but avoids unused variable warning */
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+}
+
+void *
+xmalloc (size_t num)
+{
+ void *p = (void *) malloc (num);
+ if (!p)
+ lt_fatal (__FILE__, __LINE__, "memory exhausted");
+
+ return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+ return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
+ string) : NULL;
+}
+
+const char *
+base_name (const char *name)
+{
+ const char *base;
+
+#if defined HAVE_DOS_BASED_FILE_SYSTEM
+ /* Skip over the disk name in MSDOS pathnames. */
+ if (isalpha ((unsigned char) name[0]) && name[1] == ':')
+ name += 2;
+#endif
+
+ for (base = name; *name; name++)
+ if (IS_DIR_SEPARATOR (*name))
+ base = name + 1;
+ return base;
+}
+
+int
+check_executable (const char *path)
+{
+ struct stat st;
+
+ lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n",
+ nonempty (path));
+ if ((!path) || (!*path))
+ return 0;
+
+ if ((stat (path, &st) >= 0)
+ && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
+ return 1;
+ else
+ return 0;
+}
+
+int
+make_executable (const char *path)
+{
+ int rval = 0;
+ struct stat st;
+
+ lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n",
+ nonempty (path));
+ if ((!path) || (!*path))
+ return 0;
+
+ if (stat (path, &st) >= 0)
+ {
+ rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
+ }
+ return rval;
+}
+
+/* Searches for the full path of the wrapper. Returns
+ newly allocated full path name if found, NULL otherwise
+ Does not chase symlinks, even on platforms that support them.
+*/
+char *
+find_executable (const char *wrapper)
+{
+ int has_slash = 0;
+ const char *p;
+ const char *p_next;
+ /* static buffer for getcwd */
+ char tmp[LT_PATHMAX + 1];
+ size_t tmp_len;
+ char *concat_name;
+
+ lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
+ nonempty (wrapper));
+
+ if ((wrapper == NULL) || (*wrapper == '\0'))
+ return NULL;
+
+ /* Absolute path? */
+#if defined HAVE_DOS_BASED_FILE_SYSTEM
+ if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+ else
+ {
+#endif
+ if (IS_DIR_SEPARATOR (wrapper[0]))
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+#if defined HAVE_DOS_BASED_FILE_SYSTEM
+ }
+#endif
+
+ for (p = wrapper; *p; p++)
+ if (*p == '/')
+ {
+ has_slash = 1;
+ break;
+ }
+ if (!has_slash)
+ {
+ /* no slashes; search PATH */
+ const char *path = getenv ("PATH");
+ if (path != NULL)
+ {
+ for (p = path; *p; p = p_next)
+ {
+ const char *q;
+ size_t p_len;
+ for (q = p; *q; q++)
+ if (IS_PATH_SEPARATOR (*q))
+ break;
+ p_len = (size_t) (q - p);
+ p_next = (*q == '\0' ? q : q + 1);
+ if (p_len == 0)
+ {
+ /* empty path: current directory */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
+ nonnull (strerror (errno)));
+ tmp_len = strlen (tmp);
+ concat_name =
+ XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+ }
+ else
+ {
+ concat_name =
+ XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, p, p_len);
+ concat_name[p_len] = '/';
+ strcpy (concat_name + p_len + 1, wrapper);
+ }
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+ }
+ /* not found in PATH; assume curdir */
+ }
+ /* Relative path | not found in path: prepend cwd */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
+ nonnull (strerror (errno)));
+ tmp_len = strlen (tmp);
+ concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ return NULL;
+}
+
+char *
+chase_symlinks (const char *pathspec)
+{
+#ifndef S_ISLNK
+ return xstrdup (pathspec);
+#else
+ char buf[LT_PATHMAX];
+ struct stat s;
+ char *tmp_pathspec = xstrdup (pathspec);
+ char *p;
+ int has_symlinks = 0;
+ while (strlen (tmp_pathspec) && !has_symlinks)
+ {
+ lt_debugprintf (__FILE__, __LINE__,
+ "checking path component for symlinks: %s\n",
+ tmp_pathspec);
+ if (lstat (tmp_pathspec, &s) == 0)
+ {
+ if (S_ISLNK (s.st_mode) != 0)
+ {
+ has_symlinks = 1;
+ break;
+ }
+
+ /* search backwards for last DIR_SEPARATOR */
+ p = tmp_pathspec + strlen (tmp_pathspec) - 1;
+ while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+ p--;
+ if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+ {
+ /* no more DIR_SEPARATORS left */
+ break;
+ }
+ *p = '\0';
+ }
+ else
+ {
+ lt_fatal (__FILE__, __LINE__,
+ "error accessing file \"%s\": %s",
+ tmp_pathspec, nonnull (strerror (errno)));
+ }
+ }
+ XFREE (tmp_pathspec);
+
+ if (!has_symlinks)
+ {
+ return xstrdup (pathspec);
+ }
+
+ tmp_pathspec = realpath (pathspec, buf);
+ if (tmp_pathspec == 0)
+ {
+ lt_fatal (__FILE__, __LINE__,
+ "could not follow symlinks for %s", pathspec);
+ }
+ return xstrdup (tmp_pathspec);
+#endif
+}
+
+char *
+strendzap (char *str, const char *pat)
+{
+ size_t len, patlen;
+
+ assert (str != NULL);
+ assert (pat != NULL);
+
+ len = strlen (str);
+ patlen = strlen (pat);
+
+ if (patlen <= len)
+ {
+ str += len - patlen;
+ if (STREQ (str, pat))
+ *str = '\0';
+ }
+ return str;
+}
+
+void
+lt_debugprintf (const char *file, int line, const char *fmt, ...)
+{
+ va_list args;
+ if (lt_debug)
+ {
+ (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line);
+ va_start (args, fmt);
+ (void) vfprintf (stderr, fmt, args);
+ va_end (args);
+ }
+}
+
+static void
+lt_error_core (int exit_status, const char *file,
+ int line, const char *mode,
+ const char *message, va_list ap)
+{
+ fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode);
+ vfprintf (stderr, message, ap);
+ fprintf (stderr, ".\n");
+
+ if (exit_status >= 0)
+ exit (exit_status);
+}
+
+void
+lt_fatal (const char *file, int line, const char *message, ...)
+{
+ va_list ap;
+ va_start (ap, message);
+ lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap);
+ va_end (ap);
+}
+
+static const char *
+nonnull (const char *s)
+{
+ return s ? s : "(null)";
+}
+
+static const char *
+nonempty (const char *s)
+{
+ return (s && !*s) ? "(empty)" : nonnull (s);
+}
+
+void
+lt_setenv (const char *name, const char *value)
+{
+ lt_debugprintf (__FILE__, __LINE__,
+ "(lt_setenv) setting '%s' to '%s'\n",
+ nonnull (name), nonnull (value));
+ {
+#ifdef HAVE_SETENV
+ /* always make a copy, for consistency with !HAVE_SETENV */
+ char *str = xstrdup (value);
+ setenv (name, str, 1);
+#else
+ size_t len = strlen (name) + 1 + strlen (value) + 1;
+ char *str = XMALLOC (char, len);
+ sprintf (str, "%s=%s", name, value);
+ if (putenv (str) != EXIT_SUCCESS)
+ {
+ XFREE (str);
+ }
+#endif
+ }
+}
+
+char *
+lt_extend_str (const char *orig_value, const char *add, int to_end)
+{
+ char *new_value;
+ if (orig_value && *orig_value)
+ {
+ size_t orig_value_len = strlen (orig_value);
+ size_t add_len = strlen (add);
+ new_value = XMALLOC (char, add_len + orig_value_len + 1);
+ if (to_end)
+ {
+ strcpy (new_value, orig_value);
+ strcpy (new_value + orig_value_len, add);
+ }
+ else
+ {
+ strcpy (new_value, add);
+ strcpy (new_value + add_len, orig_value);
+ }
+ }
+ else
+ {
+ new_value = xstrdup (add);
+ }
+ return new_value;
+}
+
+void
+lt_update_exe_path (const char *name, const char *value)
+{
+ lt_debugprintf (__FILE__, __LINE__,
+ "(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
+ nonnull (name), nonnull (value));
+
+ if (name && *name && value && *value)
+ {
+ char *new_value = lt_extend_str (getenv (name), value, 0);
+ /* some systems can't cope with a ':'-terminated path #' */
+ size_t len = strlen (new_value);
+ while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
+ {
+ new_value[--len] = '\0';
+ }
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ }
+}
+
+void
+lt_update_lib_path (const char *name, const char *value)
+{
+ lt_debugprintf (__FILE__, __LINE__,
+ "(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
+ nonnull (name), nonnull (value));
+
+ if (name && *name && value && *value)
+ {
+ char *new_value = lt_extend_str (getenv (name), value, 0);
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ }
+}
+
+EOF
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+
+/* Prepares an argument vector before calling spawn().
+ Note that spawn() does not by itself call the command interpreter
+ (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") :
+ ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+ GetVersionEx(&v);
+ v.dwPlatformId == VER_PLATFORM_WIN32_NT;
+ }) ? "cmd.exe" : "command.com").
+ Instead it simply concatenates the arguments, separated by ' ', and calls
+ CreateProcess(). We must quote the arguments since Win32 CreateProcess()
+ interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
+ special way:
+ - Space and tab are interpreted as delimiters. They are not treated as
+ delimiters if they are surrounded by double quotes: "...".
+ - Unescaped double quotes are removed from the input. Their only effect is
+ that within double quotes, space and tab are treated like normal
+ characters.
+ - Backslashes not followed by double quotes are not special.
+ - But 2*n+1 backslashes followed by a double quote become
+ n backslashes followed by a double quote (n >= 0):
+ \" -> "
+ \\\" -> \"
+ \\\\\" -> \\"
+ */
+#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+char **
+prepare_spawn (char **argv)
+{
+ size_t argc;
+ char **new_argv;
+ size_t i;
+
+ /* Count number of arguments. */
+ for (argc = 0; argv[argc] != NULL; argc++)
+ ;
+
+ /* Allocate new argument vector. */
+ new_argv = XMALLOC (char *, argc + 1);
+
+ /* Put quoted arguments into the new argument vector. */
+ for (i = 0; i < argc; i++)
+ {
+ const char *string = argv[i];
+
+ if (string[0] == '\0')
+ new_argv[i] = xstrdup ("\"\"");
+ else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
+ {
+ int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
+ size_t length;
+ unsigned int backslashes;
+ const char *s;
+ char *quoted_string;
+ char *p;
+
+ length = 0;
+ backslashes = 0;
+ if (quote_around)
+ length++;
+ for (s = string; *s != '\0'; s++)
+ {
+ char c = *s;
+ if (c == '"')
+ length += backslashes + 1;
+ length++;
+ if (c == '\\')
+ backslashes++;
+ else
+ backslashes = 0;
+ }
+ if (quote_around)
+ length += backslashes + 1;
+
+ quoted_string = XMALLOC (char, length + 1);
+
+ p = quoted_string;
+ backslashes = 0;
+ if (quote_around)
+ *p++ = '"';
+ for (s = string; *s != '\0'; s++)
+ {
+ char c = *s;
+ if (c == '"')
+ {
+ unsigned int j;
+ for (j = backslashes + 1; j > 0; j--)
+ *p++ = '\\';
+ }
+ *p++ = c;
+ if (c == '\\')
+ backslashes++;
+ else
+ backslashes = 0;
+ }
+ if (quote_around)
+ {
+ unsigned int j;
+ for (j = backslashes; j > 0; j--)
+ *p++ = '\\';
+ *p++ = '"';
+ }
+ *p = '\0';
+
+ new_argv[i] = quoted_string;
+ }
+ else
+ new_argv[i] = (char *) string;
+ }
+ new_argv[argc] = NULL;
+
+ return new_argv;
+}
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+void lt_dump_script (FILE* f)
+{
+EOF
+ func_emit_wrapper yes |
+ $SED -n -e '
+s/^\(.\{79\}\)\(..*\)/\1\
+\2/
+h
+s/\([\\"]\)/\\\1/g
+s/$/\\n/
+s/\([^\n]*\).*/ fputs ("\1", f);/p
+g
+D'
+ cat <<"EOF"
+}
+EOF
+}
+# end: func_emit_cwrapperexe_src
+
+# func_win32_import_lib_p ARG
+# True if ARG is an import lib, as indicated by $file_magic_cmd
+func_win32_import_lib_p ()
+{
+ $debug_cmd
+
+ case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
+ *import*) : ;;
+ *) false ;;
+ esac
+}
+
+# func_suncc_cstd_abi
+# !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!!
+# Several compiler flags select an ABI that is incompatible with the
+# Cstd library. Avoid specifying it if any are in CXXFLAGS.
+func_suncc_cstd_abi ()
+{
+ $debug_cmd
+
+ case " $compile_command " in
+ *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*)
+ suncc_use_cstd_abi=no
+ ;;
+ *)
+ suncc_use_cstd_abi=yes
+ ;;
+ esac
+}
+
+# func_mode_link arg...
+func_mode_link ()
+{
+ $debug_cmd
+
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ # It is impossible to link a dll without this setting, and
+ # we shouldn't force the makefile maintainer to figure out
+ # what system we are compiling for in order to pass an extra
+ # flag for every libtool invocation.
+ # allow_undefined=no
+
+ # FIXME: Unfortunately, there are problems with the above when trying
+ # to make a dll that has undefined symbols, in which case not
+ # even a static library is built. For now, we need to specify
+ # -no-undefined on the libtool link line when we can be certain
+ # that all symbols are satisfied, otherwise we get a static library.
+ allow_undefined=yes
+ ;;
+ *)
+ allow_undefined=yes
+ ;;
+ esac
+ libtool_args=$nonopt
+ base_compile="$nonopt $@"
+ compile_command=$nonopt
+ finalize_command=$nonopt
+
+ compile_rpath=
+ finalize_rpath=
+ compile_shlibpath=
+ finalize_shlibpath=
+ convenience=
+ old_convenience=
+ deplibs=
+ old_deplibs=
+ compiler_flags=
+ linker_flags=
+ dllsearchpath=
+ lib_search_path=`pwd`
+ inst_prefix_dir=
+ new_inherited_linker_flags=
+
+ avoid_version=no
+ bindir=
+ dlfiles=
+ dlprefiles=
+ dlself=no
+ export_dynamic=no
+ export_symbols=
+ export_symbols_regex=
+ generated=
+ libobjs=
+ ltlibs=
+ module=no
+ no_install=no
+ objs=
+ os2dllname=
+ non_pic_objects=
+ precious_files_regex=
+ prefer_static_libs=no
+ preload=false
+ prev=
+ prevarg=
+ release=
+ rpath=
+ xrpath=
+ perm_rpath=
+ temp_rpath=
+ thread_safe=no
+ vinfo=
+ vinfo_number=no
+ weak_libs=
+ single_module=$wl-single_module
+ func_infer_tag $base_compile
+
+ # We need to know -static, to get the right output filenames.
+ for arg
+ do
+ case $arg in
+ -shared)
+ test yes != "$build_libtool_libs" \
+ && func_fatal_configuration "cannot build a shared library"
+ build_old_libs=no
+ break
+ ;;
+ -all-static | -static | -static-libtool-libs)
+ case $arg in
+ -all-static)
+ if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then
+ func_warning "complete static linking is impossible in this configuration"
+ fi
+ if test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ -static)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=built
+ ;;
+ -static-libtool-libs)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ esac
+ build_libtool_libs=no
+ build_old_libs=yes
+ break
+ ;;
+ esac
+ done
+
+ # See if our shared archives depend on static archives.
+ test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+ # Go through the arguments, transforming them on the way.
+ while test "$#" -gt 0; do
+ arg=$1
+ shift
+ func_quote_for_eval "$arg"
+ qarg=$func_quote_for_eval_unquoted_result
+ func_append libtool_args " $func_quote_for_eval_result"
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$prev"; then
+ case $prev in
+ output)
+ func_append compile_command " @OUTPUT@"
+ func_append finalize_command " @OUTPUT@"
+ ;;
+ esac
+
+ case $prev in
+ bindir)
+ bindir=$arg
+ prev=
+ continue
+ ;;
+ dlfiles|dlprefiles)
+ $preload || {
+ # Add the symbol object into the linking commands.
+ func_append compile_command " @SYMFILE@"
+ func_append finalize_command " @SYMFILE@"
+ preload=:
+ }
+ case $arg in
+ *.la | *.lo) ;; # We handle these cases below.
+ force)
+ if test no = "$dlself"; then
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ self)
+ if test dlprefiles = "$prev"; then
+ dlself=yes
+ elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then
+ dlself=yes
+ else
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ *)
+ if test dlfiles = "$prev"; then
+ func_append dlfiles " $arg"
+ else
+ func_append dlprefiles " $arg"
+ fi
+ prev=
+ continue
+ ;;
+ esac
+ ;;
+ expsyms)
+ export_symbols=$arg
+ test -f "$arg" \
+ || func_fatal_error "symbol file '$arg' does not exist"
+ prev=
+ continue
+ ;;
+ expsyms_regex)
+ export_symbols_regex=$arg
+ prev=
+ continue
+ ;;
+ framework)
+ case $host in
+ *-*-darwin*)
+ case "$deplibs " in
+ *" $qarg.ltframework "*) ;;
+ *) func_append deplibs " $qarg.ltframework" # this is fixed later
+ ;;
+ esac
+ ;;
+ esac
+ prev=
+ continue
+ ;;
+ inst_prefix)
+ inst_prefix_dir=$arg
+ prev=
+ continue
+ ;;
+ mllvm)
+ # Clang does not use LLVM to link, so we can simply discard any
+ # '-mllvm $arg' options when doing the link step.
+ prev=
+ continue
+ ;;
+ objectlist)
+ if test -f "$arg"; then
+ save_arg=$arg
+ moreargs=
+ for fil in `cat "$save_arg"`
+ do
+# func_append moreargs " $fil"
+ arg=$fil
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if func_lalib_unsafe_p "$arg"; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ func_source "$arg"
+
+ if test -z "$pic_object" ||
+ test -z "$non_pic_object" ||
+ test none = "$pic_object" &&
+ test none = "$non_pic_object"; then
+ func_fatal_error "cannot find name of object for '$arg'"
+ fi
+
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir=$func_dirname_result
+
+ if test none != "$pic_object"; then
+ # Prepend the subdirectory the object is found in.
+ pic_object=$xdir$pic_object
+
+ if test dlfiles = "$prev"; then
+ if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then
+ func_append dlfiles " $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test dlprefiles = "$prev"; then
+ # Preload the old-style object.
+ func_append dlprefiles " $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ func_append libobjs " $pic_object"
+ arg=$pic_object
+ fi
+
+ # Non-PIC object.
+ if test none != "$non_pic_object"; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object=$xdir$non_pic_object
+
+ # A standard non-PIC object
+ func_append non_pic_objects " $non_pic_object"
+ if test -z "$pic_object" || test none = "$pic_object"; then
+ arg=$non_pic_object
+ fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object=$pic_object
+ func_append non_pic_objects " $non_pic_object"
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if $opt_dry_run; then
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir=$func_dirname_result
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "'$arg' is not a valid libtool object"
+ fi
+ fi
+ done
+ else
+ func_fatal_error "link input file '$arg' does not exist"
+ fi
+ arg=$save_arg
+ prev=
+ continue
+ ;;
+ os2dllname)
+ os2dllname=$arg
+ prev=
+ continue
+ ;;
+ precious_regex)
+ precious_files_regex=$arg
+ prev=
+ continue
+ ;;
+ release)
+ release=-$arg
+ prev=
+ continue
+ ;;
+ rpath | xrpath)
+ # We need an absolute path.
+ case $arg in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ func_fatal_error "only absolute run-paths are allowed"
+ ;;
+ esac
+ if test rpath = "$prev"; then
+ case "$rpath " in
+ *" $arg "*) ;;
+ *) func_append rpath " $arg" ;;
+ esac
+ else
+ case "$xrpath " in
+ *" $arg "*) ;;
+ *) func_append xrpath " $arg" ;;
+ esac
+ fi
+ prev=
+ continue
+ ;;
+ shrext)
+ shrext_cmds=$arg
+ prev=
+ continue
+ ;;
+ weak)
+ func_append weak_libs " $arg"
+ prev=
+ continue
+ ;;
+ xcclinker)
+ func_append linker_flags " $qarg"
+ func_append compiler_flags " $qarg"
+ prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
+ continue
+ ;;
+ xcompiler)
+ func_append compiler_flags " $qarg"
+ prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
+ continue
+ ;;
+ xlinker)
+ func_append linker_flags " $qarg"
+ func_append compiler_flags " $wl$qarg"
+ prev=
+ func_append compile_command " $wl$qarg"
+ func_append finalize_command " $wl$qarg"
+ continue
+ ;;
+ *)
+ eval "$prev=\"\$arg\""
+ prev=
+ continue
+ ;;
+ esac
+ fi # test -n "$prev"
+
+ prevarg=$arg
+
+ case $arg in
+ -all-static)
+ if test -n "$link_static_flag"; then
+ # See comment for -static flag below, for more details.
+ func_append compile_command " $link_static_flag"
+ func_append finalize_command " $link_static_flag"
+ fi
+ continue
+ ;;
+
+ -allow-undefined)
+ # FIXME: remove this flag sometime in the future.
+ func_fatal_error "'-allow-undefined' must not be used because it is the default"
+ ;;
+
+ -avoid-version)
+ avoid_version=yes
+ continue
+ ;;
+
+ -bindir)
+ prev=bindir
+ continue
+ ;;
+
+ -dlopen)
+ prev=dlfiles
+ continue
+ ;;
+
+ -dlpreopen)
+ prev=dlprefiles
+ continue
+ ;;
+
+ -export-dynamic)
+ export_dynamic=yes
+ continue
+ ;;
+
+ -export-symbols | -export-symbols-regex)
+ if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+ func_fatal_error "more than one -exported-symbols argument is not allowed"
+ fi
+ if test X-export-symbols = "X$arg"; then
+ prev=expsyms
+ else
+ prev=expsyms_regex
+ fi
+ continue
+ ;;
+
+ -framework)
+ prev=framework
+ continue
+ ;;
+
+ -inst-prefix-dir)
+ prev=inst_prefix
+ continue
+ ;;
+
+ # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+ # so, if we see these flags be careful not to treat them like -L
+ -L[A-Z][A-Z]*:*)
+ case $with_gcc/$host in
+ no/*-*-irix* | /*-*-irix*)
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ ;;
+ esac
+ continue
+ ;;
+
+ -L*)
+ func_stripname "-L" '' "$arg"
+ if test -z "$func_stripname_result"; then
+ if test "$#" -gt 0; then
+ func_fatal_error "require no space between '-L' and '$1'"
+ else
+ func_fatal_error "need path for '-L' option"
+ fi
+ fi
+ func_resolve_sysroot "$func_stripname_result"
+ dir=$func_resolve_sysroot_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ test -z "$absdir" && \
+ func_fatal_error "cannot determine absolute directory name of '$dir'"
+ dir=$absdir
+ ;;
+ esac
+ case "$deplibs " in
+ *" -L$dir "* | *" $arg "*)
+ # Will only happen for absolute or sysroot arguments
+ ;;
+ *)
+ # Preserve sysroot, but never include relative directories
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;;
+ *) func_append deplibs " -L$dir" ;;
+ esac
+ func_append lib_search_path " $dir"
+ ;;
+ esac
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$dir:"*) ;;
+ ::) dllsearchpath=$dir;;
+ *) func_append dllsearchpath ":$dir";;
+ esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ ::) dllsearchpath=$testbindir;;
+ *) func_append dllsearchpath ":$testbindir";;
+ esac
+ ;;
+ esac
+ continue
+ ;;
+
+ -l*)
+ if test X-lc = "X$arg" || test X-lm = "X$arg"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
+ # These systems don't actually have a C or math library (as such)
+ continue
+ ;;
+ *-*-os2*)
+ # These systems don't actually have a C library (as such)
+ test X-lc = "X$arg" && continue
+ ;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
+ # Do not include libc due to us having libc/libc_r.
+ test X-lc = "X$arg" && continue
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C and math libraries are in the System framework
+ func_append deplibs " System.ltframework"
+ continue
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ test X-lc = "X$arg" && continue
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ test X-lc = "X$arg" && continue
+ ;;
+ esac
+ elif test X-lc_r = "X$arg"; then
+ case $host in
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
+ # Do not include libc_r directly, use -pthread flag.
+ continue
+ ;;
+ esac
+ fi
+ func_append deplibs " $arg"
+ continue
+ ;;
+
+ -mllvm)
+ prev=mllvm
+ continue
+ ;;
+
+ -module)
+ module=yes
+ continue
+ ;;
+
+ # Tru64 UNIX uses -model [arg] to determine the layout of C++
+ # classes, name mangling, and exception handling.
+ # Darwin uses the -arch flag to determine output architecture.
+ -model|-arch|-isysroot|--sysroot)
+ func_append compiler_flags " $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ prev=xcompiler
+ continue
+ ;;
+
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
+ func_append compiler_flags " $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ case "$new_inherited_linker_flags " in
+ *" $arg "*) ;;
+ * ) func_append new_inherited_linker_flags " $arg" ;;
+ esac
+ continue
+ ;;
+
+ -multi_module)
+ single_module=$wl-multi_module
+ continue
+ ;;
+
+ -no-fast-install)
+ fast_install=no
+ continue
+ ;;
+
+ -no-install)
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
+ # The PATH hackery in wrapper scripts is required on Windows
+ # and Darwin in order for the loader to find any dlls it needs.
+ func_warning "'-no-install' is ignored for $host"
+ func_warning "assuming '-no-fast-install' instead"
+ fast_install=no
+ ;;
+ *) no_install=yes ;;
+ esac
+ continue
+ ;;
+
+ -no-undefined)
+ allow_undefined=no
+ continue
+ ;;
+
+ -objectlist)
+ prev=objectlist
+ continue
+ ;;
+
+ -os2dllname)
+ prev=os2dllname
+ continue
+ ;;
+
+ -o) prev=output ;;
+
+ -precious-files-regex)
+ prev=precious_regex
+ continue
+ ;;
+
+ -release)
+ prev=release
+ continue
+ ;;
+
+ -rpath)
+ prev=rpath
+ continue
+ ;;
+
+ -R)
+ prev=xrpath
+ continue
+ ;;
+
+ -R*)
+ func_stripname '-R' '' "$arg"
+ dir=$func_stripname_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ =*)
+ func_stripname '=' '' "$dir"
+ dir=$lt_sysroot$func_stripname_result
+ ;;
+ *)
+ func_fatal_error "only absolute run-paths are allowed"
+ ;;
+ esac
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) func_append xrpath " $dir" ;;
+ esac
+ continue
+ ;;
+
+ -shared)
+ # The effects of -shared are defined in a previous loop.
+ continue
+ ;;
+
+ -shrext)
+ prev=shrext
+ continue
+ ;;
+
+ -static | -static-libtool-libs)
+ # The effects of -static are defined in a previous loop.
+ # We used to do the same as -all-static on platforms that
+ # didn't have a PIC flag, but the assumption that the effects
+ # would be equivalent was wrong. It would break on at least
+ # Digital Unix and AIX.
+ continue
+ ;;
+
+ -thread-safe)
+ thread_safe=yes
+ continue
+ ;;
+
+ -version-info)
+ prev=vinfo
+ continue
+ ;;
+
+ -version-number)
+ prev=vinfo
+ vinfo_number=yes
+ continue
+ ;;
+
+ -weak)
+ prev=weak
+ continue
+ ;;
+
+ -Wc,*)
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs=$IFS; IFS=,
+ for flag in $args; do
+ IFS=$save_ifs
+ func_quote_for_eval "$flag"
+ func_append arg " $func_quote_for_eval_result"
+ func_append compiler_flags " $func_quote_for_eval_result"
+ done
+ IFS=$save_ifs
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
+ -Wl,*)
+ func_stripname '-Wl,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs=$IFS; IFS=,
+ for flag in $args; do
+ IFS=$save_ifs
+ func_quote_for_eval "$flag"
+ func_append arg " $wl$func_quote_for_eval_result"
+ func_append compiler_flags " $wl$func_quote_for_eval_result"
+ func_append linker_flags " $func_quote_for_eval_result"
+ done
+ IFS=$save_ifs
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
+ -Xcompiler)
+ prev=xcompiler
+ continue
+ ;;
+
+ -Xlinker)
+ prev=xlinker
+ continue
+ ;;
+
+ -XCClinker)
+ prev=xcclinker
+ continue
+ ;;
+
+ # -msg_* for osf cc
+ -msg_*)
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
+ ;;
+
+ # Flags to be passed through unchanged, with rationale:
+ # -64, -mips[0-9] enable 64-bit mode for the SGI compiler
+ # -r[0-9][0-9]* specify processor for the SGI compiler
+ # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
+ # +DA*, +DD* enable 64-bit mode for the HP compiler
+ # -q* compiler args for the IBM compiler
+ # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
+ # -F/path path to uninstalled frameworks, gcc on darwin
+ # -p, -pg, --coverage, -fprofile-* profiling flags for GCC
+ # -fstack-protector* stack protector flags for GCC
+ # @file GCC response files
+ # -tp=* Portland pgcc target processor selection
+ # --sysroot=* for sysroot support
+ # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+ # -stdlib=* select c++ std lib with clang
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*)
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ func_append compiler_flags " $arg"
+ continue
+ ;;
+
+ -Z*)
+ if test os2 = "`expr $host : '.*\(os2\)'`"; then
+ # OS/2 uses -Zxxx to specify OS/2-specific options
+ compiler_flags="$compiler_flags $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ case $arg in
+ -Zlinker | -Zstack)
+ prev=xcompiler
+ ;;
+ esac
+ continue
+ else
+ # Otherwise treat like 'Some other compiler flag' below
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
+ fi
+ ;;
+
+ # Some other compiler flag.
+ -* | +*)
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
+ ;;
+
+ *.$objext)
+ # A standard object.
+ func_append objs " $arg"
+ ;;
+
+ *.lo)
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if func_lalib_unsafe_p "$arg"; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ func_source "$arg"
+
+ if test -z "$pic_object" ||
+ test -z "$non_pic_object" ||
+ test none = "$pic_object" &&
+ test none = "$non_pic_object"; then
+ func_fatal_error "cannot find name of object for '$arg'"
+ fi
+
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir=$func_dirname_result
+
+ test none = "$pic_object" || {
+ # Prepend the subdirectory the object is found in.
+ pic_object=$xdir$pic_object
+
+ if test dlfiles = "$prev"; then
+ if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then
+ func_append dlfiles " $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test dlprefiles = "$prev"; then
+ # Preload the old-style object.
+ func_append dlprefiles " $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ func_append libobjs " $pic_object"
+ arg=$pic_object
+ }
+
+ # Non-PIC object.
+ if test none != "$non_pic_object"; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object=$xdir$non_pic_object
+
+ # A standard non-PIC object
+ func_append non_pic_objects " $non_pic_object"
+ if test -z "$pic_object" || test none = "$pic_object"; then
+ arg=$non_pic_object
+ fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object=$pic_object
+ func_append non_pic_objects " $non_pic_object"
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if $opt_dry_run; then
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir=$func_dirname_result
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "'$arg' is not a valid libtool object"
+ fi
+ fi
+ ;;
+
+ *.$libext)
+ # An archive.
+ func_append deplibs " $arg"
+ func_append old_deplibs " $arg"
+ continue
+ ;;
+
+ *.la)
+ # A libtool-controlled library.
+
+ func_resolve_sysroot "$arg"
+ if test dlfiles = "$prev"; then
+ # This library was specified with -dlopen.
+ func_append dlfiles " $func_resolve_sysroot_result"
+ prev=
+ elif test dlprefiles = "$prev"; then
+ # The library was specified with -dlpreopen.
+ func_append dlprefiles " $func_resolve_sysroot_result"
+ prev=
+ else
+ func_append deplibs " $func_resolve_sysroot_result"
+ fi
+ continue
+ ;;
+
+ # Some other compiler argument.
+ *)
+ # Unknown arguments in both finalize_command and compile_command need
+ # to be aesthetically quoted because they are evaled later.
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
+ ;;
+ esac # arg
+
+ # Now actually substitute the argument into the commands.
+ if test -n "$arg"; then
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ fi
+ done # argument parsing loop
+
+ test -n "$prev" && \
+ func_fatal_help "the '$prevarg' option requires an argument"
+
+ if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then
+ eval arg=\"$export_dynamic_flag_spec\"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ fi
+
+ oldlibs=
+ # calculate the name of the file, without its directory
+ func_basename "$output"
+ outputname=$func_basename_result
+ libobjs_save=$libobjs
+
+ if test -n "$shlibpath_var"; then
+ # get the directories listed in $shlibpath_var
+ eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\`
+ else
+ shlib_search_path=
+ fi
+ eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+ eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+ # Definition is injected by LT_CONFIG during libtool generation.
+ func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH"
+
+ func_dirname "$output" "/" ""
+ output_objdir=$func_dirname_result$objdir
+ func_to_tool_file "$output_objdir/"
+ tool_output_objdir=$func_to_tool_file_result
+ # Create the object directory.
+ func_mkdir_p "$output_objdir"
+
+ # Determine the type of output
+ case $output in
+ "")
+ func_fatal_help "you must specify an output file"
+ ;;
+ *.$libext) linkmode=oldlib ;;
+ *.lo | *.$objext) linkmode=obj ;;
+ *.la) linkmode=lib ;;
+ *) linkmode=prog ;; # Anything else should be a program.
+ esac
+
+ specialdeplibs=
+
+ libs=
+ # Find all interdependent deplibs by searching for libraries
+ # that are linked more than once (e.g. -la -lb -la)
+ for deplib in $deplibs; do
+ if $opt_preserve_dup_deps; then
+ case "$libs " in
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+ esac
+ fi
+ func_append libs " $deplib"
+ done
+
+ if test lib = "$linkmode"; then
+ libs="$predeps $libs $compiler_lib_search_path $postdeps"
+
+ # Compute libraries that are listed more than once in $predeps
+ # $postdeps and mark them as special (i.e., whose duplicates are
+ # not to be eliminated).
+ pre_post_deps=
+ if $opt_duplicate_compiler_generated_deps; then
+ for pre_post_dep in $predeps $postdeps; do
+ case "$pre_post_deps " in
+ *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;;
+ esac
+ func_append pre_post_deps " $pre_post_dep"
+ done
+ fi
+ pre_post_deps=
+ fi
+
+ deplibs=
+ newdependency_libs=
+ newlib_search_path=
+ need_relink=no # whether we're linking any uninstalled libtool libraries
+ notinst_deplibs= # not-installed libtool libraries
+ notinst_path= # paths that contain not-installed libtool libraries
+
+ case $linkmode in
+ lib)
+ passes="conv dlpreopen link"
+ for file in $dlfiles $dlprefiles; do
+ case $file in
+ *.la) ;;
+ *)
+ func_fatal_help "libraries can '-dlopen' only libtool libraries: $file"
+ ;;
+ esac
+ done
+ ;;
+ prog)
+ compile_deplibs=
+ finalize_deplibs=
+ alldeplibs=false
+ newdlfiles=
+ newdlprefiles=
+ passes="conv scan dlopen dlpreopen link"
+ ;;
+ *) passes="conv"
+ ;;
+ esac
+
+ for pass in $passes; do
+ # The preopen pass in lib mode reverses $deplibs; put it back here
+ # so that -L comes before libs that need it for instance...
+ if test lib,link = "$linkmode,$pass"; then
+ ## FIXME: Find the place where the list is rebuilt in the wrong
+ ## order, and fix it there properly
+ tmp_deplibs=
+ for deplib in $deplibs; do
+ tmp_deplibs="$deplib $tmp_deplibs"
+ done
+ deplibs=$tmp_deplibs
+ fi
+
+ if test lib,link = "$linkmode,$pass" ||
+ test prog,scan = "$linkmode,$pass"; then
+ libs=$deplibs
+ deplibs=
+ fi
+ if test prog = "$linkmode"; then
+ case $pass in
+ dlopen) libs=$dlfiles ;;
+ dlpreopen) libs=$dlprefiles ;;
+ link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
+ esac
+ fi
+ if test lib,dlpreopen = "$linkmode,$pass"; then
+ # Collect and forward deplibs of preopened libtool libs
+ for lib in $dlprefiles; do
+ # Ignore non-libtool-libs
+ dependency_libs=
+ func_resolve_sysroot "$lib"
+ case $lib in
+ *.la) func_source "$func_resolve_sysroot_result" ;;
+ esac
+
+ # Collect preopened libtool deplibs, except any this library
+ # has declared as weak libs
+ for deplib in $dependency_libs; do
+ func_basename "$deplib"
+ deplib_base=$func_basename_result
+ case " $weak_libs " in
+ *" $deplib_base "*) ;;
+ *) func_append deplibs " $deplib" ;;
+ esac
+ done
+ done
+ libs=$dlprefiles
+ fi
+ if test dlopen = "$pass"; then
+ # Collect dlpreopened libraries
+ save_deplibs=$deplibs
+ deplibs=
+ fi
+
+ for deplib in $libs; do
+ lib=
+ found=false
+ case $deplib in
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
+ if test prog,link = "$linkmode,$pass"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ func_append compiler_flags " $deplib"
+ if test lib = "$linkmode"; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) func_append new_inherited_linker_flags " $deplib" ;;
+ esac
+ fi
+ fi
+ continue
+ ;;
+ -l*)
+ if test lib != "$linkmode" && test prog != "$linkmode"; then
+ func_warning "'-l' is ignored for archives/objects"
+ continue
+ fi
+ func_stripname '-l' '' "$deplib"
+ name=$func_stripname_result
+ if test lib = "$linkmode"; then
+ searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
+ else
+ searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
+ fi
+ for searchdir in $searchdirs; do
+ for search_ext in .la $std_shrext .so .a; do
+ # Search the libtool library
+ lib=$searchdir/lib$name$search_ext
+ if test -f "$lib"; then
+ if test .la = "$search_ext"; then
+ found=:
+ else
+ found=false
+ fi
+ break 2
+ fi
+ done
+ done
+ if $found; then
+ # deplib is a libtool library
+ # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+ # We need to do some special things here, and not later.
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ case " $predeps $postdeps " in
+ *" $deplib "*)
+ if func_lalib_p "$lib"; then
+ library_names=
+ old_library=
+ func_source "$lib"
+ for l in $old_library $library_names; do
+ ll=$l
+ done
+ if test "X$ll" = "X$old_library"; then # only static version available
+ found=false
+ func_dirname "$lib" "" "."
+ ladir=$func_dirname_result
+ lib=$ladir/$old_library
+ if test prog,link = "$linkmode,$pass"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ fi
+ fi
+ ;;
+ *) ;;
+ esac
+ fi
+ else
+ # deplib doesn't seem to be a libtool library
+ if test prog,link = "$linkmode,$pass"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ fi
+ ;; # -l
+ *.ltframework)
+ if test prog,link = "$linkmode,$pass"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ if test lib = "$linkmode"; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) func_append new_inherited_linker_flags " $deplib" ;;
+ esac
+ fi
+ fi
+ continue
+ ;;
+ -L*)
+ case $linkmode in
+ lib)
+ deplibs="$deplib $deplibs"
+ test conv = "$pass" && continue
+ newdependency_libs="$deplib $newdependency_libs"
+ func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ func_append newlib_search_path " $func_resolve_sysroot_result"
+ ;;
+ prog)
+ if test conv = "$pass"; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ if test scan = "$pass"; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ func_append newlib_search_path " $func_resolve_sysroot_result"
+ ;;
+ *)
+ func_warning "'-L' is ignored for archives/objects"
+ ;;
+ esac # linkmode
+ continue
+ ;; # -L
+ -R*)
+ if test link = "$pass"; then
+ func_stripname '-R' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ dir=$func_resolve_sysroot_result
+ # Make sure the xrpath contains only unique directories.
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) func_append xrpath " $dir" ;;
+ esac
+ fi
+ deplibs="$deplib $deplibs"
+ continue
+ ;;
+ *.la)
+ func_resolve_sysroot "$deplib"
+ lib=$func_resolve_sysroot_result
+ ;;
+ *.$libext)
+ if test conv = "$pass"; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ case $linkmode in
+ lib)
+ # Linking convenience modules into shared libraries is allowed,
+ # but linking other static libraries is non-portable.
+ case " $dlpreconveniencelibs " in
+ *" $deplib "*) ;;
+ *)
+ valid_a_lib=false
+ case $deplibs_check_method in
+ match_pattern*)
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
+ | $EGREP "$match_pattern_regex" > /dev/null; then
+ valid_a_lib=:
+ fi
+ ;;
+ pass_all)
+ valid_a_lib=:
+ ;;
+ esac
+ if $valid_a_lib; then
+ echo
+ $ECHO "*** Warning: Linking the shared library $output against the"
+ $ECHO "*** static library $deplib is not portable!"
+ deplibs="$deplib $deplibs"
+ else
+ echo
+ $ECHO "*** Warning: Trying to link with static lib archive $deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because the file extensions .$libext of this argument makes me believe"
+ echo "*** that it is just a static archive that I should not use here."
+ fi
+ ;;
+ esac
+ continue
+ ;;
+ prog)
+ if test link != "$pass"; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ continue
+ ;;
+ esac # linkmode
+ ;; # *.$libext
+ *.lo | *.$objext)
+ if test conv = "$pass"; then
+ deplibs="$deplib $deplibs"
+ elif test prog = "$linkmode"; then
+ if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then
+ # If there is no dlopen support or we're linking statically,
+ # we need to preload.
+ func_append newdlprefiles " $deplib"
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ func_append newdlfiles " $deplib"
+ fi
+ fi
+ continue
+ ;;
+ %DEPLIBS%)
+ alldeplibs=:
+ continue
+ ;;
+ esac # case $deplib
+
+ $found || test -f "$lib" \
+ || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'"
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$lib" \
+ || func_fatal_error "'$lib' is not a valid libtool archive"
+
+ func_dirname "$lib" "" "."
+ ladir=$func_dirname_result
+
+ dlname=
+ dlopen=
+ dlpreopen=
+ libdir=
+ library_names=
+ old_library=
+ inherited_linker_flags=
+ # If the library was installed with an old release of libtool,
+ # it will not redefine variables installed, or shouldnotlink
+ installed=yes
+ shouldnotlink=no
+ avoidtemprpath=
+
+
+ # Read the .la file
+ func_source "$lib"
+
+ # Convert "-framework foo" to "foo.ltframework"
+ if test -n "$inherited_linker_flags"; then
+ tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
+ for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
+ case " $new_inherited_linker_flags " in
+ *" $tmp_inherited_linker_flag "*) ;;
+ *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";;
+ esac
+ done
+ fi
+ dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ if test lib,link = "$linkmode,$pass" ||
+ test prog,scan = "$linkmode,$pass" ||
+ { test prog != "$linkmode" && test lib != "$linkmode"; }; then
+ test -n "$dlopen" && func_append dlfiles " $dlopen"
+ test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
+ fi
+
+ if test conv = "$pass"; then
+ # Only check for convenience libraries
+ deplibs="$lib $deplibs"
+ if test -z "$libdir"; then
+ if test -z "$old_library"; then
+ func_fatal_error "cannot find name of link library for '$lib'"
+ fi
+ # It is a libtool convenience library, so add in its objects.
+ func_append convenience " $ladir/$objdir/$old_library"
+ func_append old_convenience " $ladir/$objdir/$old_library"
+ elif test prog != "$linkmode" && test lib != "$linkmode"; then
+ func_fatal_error "'$lib' is not a convenience library"
+ fi
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ deplibs="$deplib $deplibs"
+ if $opt_preserve_dup_deps; then
+ case "$tmp_libs " in
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+ esac
+ fi
+ func_append tmp_libs " $deplib"
+ done
+ continue
+ fi # $pass = conv
+
+
+ # Get the name of the library we link against.
+ linklib=
+ if test -n "$old_library" &&
+ { test yes = "$prefer_static_libs" ||
+ test built,no = "$prefer_static_libs,$installed"; }; then
+ linklib=$old_library
+ else
+ for l in $old_library $library_names; do
+ linklib=$l
+ done
+ fi
+ if test -z "$linklib"; then
+ func_fatal_error "cannot find name of link library for '$lib'"
+ fi
+
+ # This library was specified with -dlopen.
+ if test dlopen = "$pass"; then
+ test -z "$libdir" \
+ && func_fatal_error "cannot -dlopen a convenience library: '$lib'"
+ if test -z "$dlname" ||
+ test yes != "$dlopen_support" ||
+ test no = "$build_libtool_libs"
+ then
+ # If there is no dlname, no dlopen support or we're linking
+ # statically, we need to preload. We also need to preload any
+ # dependent libraries so libltdl's deplib preloader doesn't
+ # bomb out in the load deplibs phase.
+ func_append dlprefiles " $lib $dependency_libs"
+ else
+ func_append newdlfiles " $lib"
+ fi
+ continue
+ fi # $pass = dlopen
+
+ # We need an absolute path.
+ case $ladir in
+ [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;;
+ *)
+ abs_ladir=`cd "$ladir" && pwd`
+ if test -z "$abs_ladir"; then
+ func_warning "cannot determine absolute directory name of '$ladir'"
+ func_warning "passing it literally to the linker, although it might fail"
+ abs_ladir=$ladir
+ fi
+ ;;
+ esac
+ func_basename "$lib"
+ laname=$func_basename_result
+
+ # Find the relevant object directory and library name.
+ if test yes = "$installed"; then
+ if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ func_warning "library '$lib' was moved."
+ dir=$ladir
+ absdir=$abs_ladir
+ libdir=$abs_ladir
+ else
+ dir=$lt_sysroot$libdir
+ absdir=$lt_sysroot$libdir
+ fi
+ test yes = "$hardcode_automatic" && avoidtemprpath=yes
+ else
+ if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ dir=$ladir
+ absdir=$abs_ladir
+ # Remove this search path later
+ func_append notinst_path " $abs_ladir"
+ else
+ dir=$ladir/$objdir
+ absdir=$abs_ladir/$objdir
+ # Remove this search path later
+ func_append notinst_path " $abs_ladir"
+ fi
+ fi # $installed = yes
+ func_stripname 'lib' '.la' "$laname"
+ name=$func_stripname_result
+
+ # This library was specified with -dlpreopen.
+ if test dlpreopen = "$pass"; then
+ if test -z "$libdir" && test prog = "$linkmode"; then
+ func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'"
+ fi
+ case $host in
+ # special handling for platforms with PE-DLLs.
+ *cygwin* | *mingw* | *cegcc* )
+ # Linker will automatically link against shared library if both
+ # static and shared are present. Therefore, ensure we extract
+ # symbols from the import library if a shared library is present
+ # (otherwise, the dlopen module name will be incorrect). We do
+ # this by putting the import library name into $newdlprefiles.
+ # We recover the dlopen module name by 'saving' the la file
+ # name in a special purpose variable, and (later) extracting the
+ # dlname from the la file.
+ if test -n "$dlname"; then
+ func_tr_sh "$dir/$linklib"
+ eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname"
+ func_append newdlprefiles " $dir/$linklib"
+ else
+ func_append newdlprefiles " $dir/$old_library"
+ # Keep a list of preopened convenience libraries to check
+ # that they are being used correctly in the link pass.
+ test -z "$libdir" && \
+ func_append dlpreconveniencelibs " $dir/$old_library"
+ fi
+ ;;
+ * )
+ # Prefer using a static library (so that no silly _DYNAMIC symbols
+ # are required to link).
+ if test -n "$old_library"; then
+ func_append newdlprefiles " $dir/$old_library"
+ # Keep a list of preopened convenience libraries to check
+ # that they are being used correctly in the link pass.
+ test -z "$libdir" && \
+ func_append dlpreconveniencelibs " $dir/$old_library"
+ # Otherwise, use the dlname, so that lt_dlopen finds it.
+ elif test -n "$dlname"; then
+ func_append newdlprefiles " $dir/$dlname"
+ else
+ func_append newdlprefiles " $dir/$linklib"
+ fi
+ ;;
+ esac
+ fi # $pass = dlpreopen
+
+ if test -z "$libdir"; then
+ # Link the convenience library
+ if test lib = "$linkmode"; then
+ deplibs="$dir/$old_library $deplibs"
+ elif test prog,link = "$linkmode,$pass"; then
+ compile_deplibs="$dir/$old_library $compile_deplibs"
+ finalize_deplibs="$dir/$old_library $finalize_deplibs"
+ else
+ deplibs="$lib $deplibs" # used for prog,scan pass
+ fi
+ continue
+ fi
+
+
+ if test prog = "$linkmode" && test link != "$pass"; then
+ func_append newlib_search_path " $ladir"
+ deplibs="$lib $deplibs"
+
+ linkalldeplibs=false
+ if test no != "$link_all_deplibs" || test -z "$library_names" ||
+ test no = "$build_libtool_libs"; then
+ linkalldeplibs=:
+ fi
+
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ -L*) func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ func_append newlib_search_path " $func_resolve_sysroot_result"
+ ;;
+ esac
+ # Need to link against all dependency_libs?
+ if $linkalldeplibs; then
+ deplibs="$deplib $deplibs"
+ else
+ # Need to hardcode shared library paths
+ # or/and link against static libraries
+ newdependency_libs="$deplib $newdependency_libs"
+ fi
+ if $opt_preserve_dup_deps; then
+ case "$tmp_libs " in
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+ esac
+ fi
+ func_append tmp_libs " $deplib"
+ done # for deplib
+ continue
+ fi # $linkmode = prog...
+
+ if test prog,link = "$linkmode,$pass"; then
+ if test -n "$library_names" &&
+ { { test no = "$prefer_static_libs" ||
+ test built,yes = "$prefer_static_libs,$installed"; } ||
+ test -z "$old_library"; }; then
+ # We need to hardcode the library path
+ if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then
+ # Make sure the rpath contains only unique directories.
+ case $temp_rpath: in
+ *"$absdir:"*) ;;
+ *) func_append temp_rpath "$absdir:" ;;
+ esac
+ fi
+
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) func_append compile_rpath " $absdir" ;;
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ ;;
+ esac
+ fi # $linkmode,$pass = prog,link...
+
+ if $alldeplibs &&
+ { test pass_all = "$deplibs_check_method" ||
+ { test yes = "$build_libtool_libs" &&
+ test -n "$library_names"; }; }; then
+ # We only need to search for static libraries
+ continue
+ fi
+ fi
+
+ link_static=no # Whether the deplib will be linked statically
+ use_static_libs=$prefer_static_libs
+ if test built = "$use_static_libs" && test yes = "$installed"; then
+ use_static_libs=no
+ fi
+ if test -n "$library_names" &&
+ { test no = "$use_static_libs" || test -z "$old_library"; }; then
+ case $host in
+ *cygwin* | *mingw* | *cegcc* | *os2*)
+ # No point in relinking DLLs because paths are not encoded
+ func_append notinst_deplibs " $lib"
+ need_relink=no
+ ;;
+ *)
+ if test no = "$installed"; then
+ func_append notinst_deplibs " $lib"
+ need_relink=yes
+ fi
+ ;;
+ esac
+ # This is a shared library
+
+ # Warn about portability, can't link against -module's on some
+ # systems (darwin). Don't bleat about dlopened modules though!
+ dlopenmodule=
+ for dlpremoduletest in $dlprefiles; do
+ if test "X$dlpremoduletest" = "X$lib"; then
+ dlopenmodule=$dlpremoduletest
+ break
+ fi
+ done
+ if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then
+ echo
+ if test prog = "$linkmode"; then
+ $ECHO "*** Warning: Linking the executable $output against the loadable module"
+ else
+ $ECHO "*** Warning: Linking the shared library $output against the loadable module"
+ fi
+ $ECHO "*** $linklib is not portable!"
+ fi
+ if test lib = "$linkmode" &&
+ test yes = "$hardcode_into_libs"; then
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) func_append compile_rpath " $absdir" ;;
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ ;;
+ esac
+ fi
+
+ if test -n "$old_archive_from_expsyms_cmds"; then
+ # figure out the soname
+ set dummy $library_names
+ shift
+ realname=$1
+ shift
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ # use dlname if we got it. it's perfectly good, no?
+ if test -n "$dlname"; then
+ soname=$dlname
+ elif test -n "$soname_spec"; then
+ # bleh windows
+ case $host in
+ *cygwin* | mingw* | *cegcc* | *os2*)
+ func_arith $current - $age
+ major=$func_arith_result
+ versuffix=-$major
+ ;;
+ esac
+ eval soname=\"$soname_spec\"
+ else
+ soname=$realname
+ fi
+
+ # Make a new name for the extract_expsyms_cmds to use
+ soroot=$soname
+ func_basename "$soroot"
+ soname=$func_basename_result
+ func_stripname 'lib' '.dll' "$soname"
+ newlib=libimp-$func_stripname_result.a
+
+ # If the library has no export list, then create one now
+ if test -f "$output_objdir/$soname-def"; then :
+ else
+ func_verbose "extracting exported symbol list from '$soname'"
+ func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
+ fi
+
+ # Create $newlib
+ if test -f "$output_objdir/$newlib"; then :; else
+ func_verbose "generating import library for '$soname'"
+ func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
+ fi
+ # make sure the library variables are pointing to the new library
+ dir=$output_objdir
+ linklib=$newlib
+ fi # test -n "$old_archive_from_expsyms_cmds"
+
+ if test prog = "$linkmode" || test relink != "$opt_mode"; then
+ add_shlibpath=
+ add_dir=
+ add=
+ lib_linked=yes
+ case $hardcode_action in
+ immediate | unsupported)
+ if test no = "$hardcode_direct"; then
+ add=$dir/$linklib
+ case $host in
+ *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;;
+ *-*-sysv4*uw2*) add_dir=-L$dir ;;
+ *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+ *-*-unixware7*) add_dir=-L$dir ;;
+ *-*-darwin* )
+ # if the lib is a (non-dlopened) module then we cannot
+ # link against it, someone is ignoring the earlier warnings
+ if /usr/bin/file -L $add 2> /dev/null |
+ $GREP ": [^:]* bundle" >/dev/null; then
+ if test "X$dlopenmodule" != "X$lib"; then
+ $ECHO "*** Warning: lib $linklib is a module, not a shared library"
+ if test -z "$old_library"; then
+ echo
+ echo "*** And there doesn't seem to be a static archive available"
+ echo "*** The link will probably fail, sorry"
+ else
+ add=$dir/$old_library
+ fi
+ elif test -n "$old_library"; then
+ add=$dir/$old_library
+ fi
+ fi
+ esac
+ elif test no = "$hardcode_minus_L"; then
+ case $host in
+ *-*-sunos*) add_shlibpath=$dir ;;
+ esac
+ add_dir=-L$dir
+ add=-l$name
+ elif test no = "$hardcode_shlibpath_var"; then
+ add_shlibpath=$dir
+ add=-l$name
+ else
+ lib_linked=no
+ fi
+ ;;
+ relink)
+ if test yes = "$hardcode_direct" &&
+ test no = "$hardcode_direct_absolute"; then
+ add=$dir/$linklib
+ elif test yes = "$hardcode_minus_L"; then
+ add_dir=-L$absdir
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+ [\\/]*)
+ func_append add_dir " -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
+ add=-l$name
+ elif test yes = "$hardcode_shlibpath_var"; then
+ add_shlibpath=$dir
+ add=-l$name
+ else
+ lib_linked=no
+ fi
+ ;;
+ *) lib_linked=no ;;
+ esac
+
+ if test yes != "$lib_linked"; then
+ func_fatal_configuration "unsupported hardcode properties"
+ fi
+
+ if test -n "$add_shlibpath"; then
+ case :$compile_shlibpath: in
+ *":$add_shlibpath:"*) ;;
+ *) func_append compile_shlibpath "$add_shlibpath:" ;;
+ esac
+ fi
+ if test prog = "$linkmode"; then
+ test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+ test -n "$add" && compile_deplibs="$add $compile_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ if test yes != "$hardcode_direct" &&
+ test yes != "$hardcode_minus_L" &&
+ test yes = "$hardcode_shlibpath_var"; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) func_append finalize_shlibpath "$libdir:" ;;
+ esac
+ fi
+ fi
+ fi
+
+ if test prog = "$linkmode" || test relink = "$opt_mode"; then
+ add_shlibpath=
+ add_dir=
+ add=
+ # Finalize command for both is simple: just hardcode it.
+ if test yes = "$hardcode_direct" &&
+ test no = "$hardcode_direct_absolute"; then
+ add=$libdir/$linklib
+ elif test yes = "$hardcode_minus_L"; then
+ add_dir=-L$libdir
+ add=-l$name
+ elif test yes = "$hardcode_shlibpath_var"; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) func_append finalize_shlibpath "$libdir:" ;;
+ esac
+ add=-l$name
+ elif test yes = "$hardcode_automatic"; then
+ if test -n "$inst_prefix_dir" &&
+ test -f "$inst_prefix_dir$libdir/$linklib"; then
+ add=$inst_prefix_dir$libdir/$linklib
+ else
+ add=$libdir/$linklib
+ fi
+ else
+ # We cannot seem to hardcode it, guess we'll fake it.
+ add_dir=-L$libdir
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+ [\\/]*)
+ func_append add_dir " -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
+ add=-l$name
+ fi
+
+ if test prog = "$linkmode"; then
+ test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+ test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ fi
+ fi
+ elif test prog = "$linkmode"; then
+ # Here we assume that one of hardcode_direct or hardcode_minus_L
+ # is not unsupported. This is valid on all known static and
+ # shared platforms.
+ if test unsupported != "$hardcode_direct"; then
+ test -n "$old_library" && linklib=$old_library
+ compile_deplibs="$dir/$linklib $compile_deplibs"
+ finalize_deplibs="$dir/$linklib $finalize_deplibs"
+ else
+ compile_deplibs="-l$name -L$dir $compile_deplibs"
+ finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+ fi
+ elif test yes = "$build_libtool_libs"; then
+ # Not a shared library
+ if test pass_all != "$deplibs_check_method"; then
+ # We're trying link a shared library against a static one
+ # but the system doesn't support it.
+
+ # Just print a warning and add the library to dependency_libs so
+ # that the program can be linked against the static library.
+ echo
+ $ECHO "*** Warning: This system cannot link to static lib archive $lib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have."
+ if test yes = "$module"; then
+ echo "*** But as you try to build a module library, libtool will still create "
+ echo "*** a static module, that should work as long as the dlopening application"
+ echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
+ if test -z "$global_symbol_pipe"; then
+ echo
+ echo "*** However, this would only work if libtool was able to extract symbol"
+ echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
+ echo "*** not find such a program. So, this module is probably useless."
+ echo "*** 'nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test no = "$build_old_libs"; then
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ else
+ deplibs="$dir/$old_library $deplibs"
+ link_static=yes
+ fi
+ fi # link shared/static library?
+
+ if test lib = "$linkmode"; then
+ if test -n "$dependency_libs" &&
+ { test yes != "$hardcode_into_libs" ||
+ test yes = "$build_old_libs" ||
+ test yes = "$link_static"; }; then
+ # Extract -R from dependency_libs
+ temp_deplibs=
+ for libdir in $dependency_libs; do
+ case $libdir in
+ -R*) func_stripname '-R' '' "$libdir"
+ temp_xrpath=$func_stripname_result
+ case " $xrpath " in
+ *" $temp_xrpath "*) ;;
+ *) func_append xrpath " $temp_xrpath";;
+ esac;;
+ *) func_append temp_deplibs " $libdir";;
+ esac
+ done
+ dependency_libs=$temp_deplibs
+ fi
+
+ func_append newlib_search_path " $absdir"
+ # Link against this library
+ test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+ # ... and its dependency_libs
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ newdependency_libs="$deplib $newdependency_libs"
+ case $deplib in
+ -L*) func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result";;
+ *) func_resolve_sysroot "$deplib" ;;
+ esac
+ if $opt_preserve_dup_deps; then
+ case "$tmp_libs " in
+ *" $func_resolve_sysroot_result "*)
+ func_append specialdeplibs " $func_resolve_sysroot_result" ;;
+ esac
+ fi
+ func_append tmp_libs " $func_resolve_sysroot_result"
+ done
+
+ if test no != "$link_all_deplibs"; then
+ # Add the search paths of all dependency libraries
+ for deplib in $dependency_libs; do
+ path=
+ case $deplib in
+ -L*) path=$deplib ;;
+ *.la)
+ func_resolve_sysroot "$deplib"
+ deplib=$func_resolve_sysroot_result
+ func_dirname "$deplib" "" "."
+ dir=$func_dirname_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ if test -z "$absdir"; then
+ func_warning "cannot determine absolute directory name of '$dir'"
+ absdir=$dir
+ fi
+ ;;
+ esac
+ if $GREP "^installed=no" $deplib > /dev/null; then
+ case $host in
+ *-*-darwin*)
+ depdepl=
+ eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+ if test -n "$deplibrary_names"; then
+ for tmp in $deplibrary_names; do
+ depdepl=$tmp
+ done
+ if test -f "$absdir/$objdir/$depdepl"; then
+ depdepl=$absdir/$objdir/$depdepl
+ darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ if test -z "$darwin_install_name"; then
+ darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ fi
+ func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl"
+ func_append linker_flags " -dylib_file $darwin_install_name:$depdepl"
+ path=
+ fi
+ fi
+ ;;
+ *)
+ path=-L$absdir/$objdir
+ ;;
+ esac
+ else
+ eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ test -z "$libdir" && \
+ func_fatal_error "'$deplib' is not a valid libtool archive"
+ test "$absdir" != "$libdir" && \
+ func_warning "'$deplib' seems to be moved"
+
+ path=-L$absdir
+ fi
+ ;;
+ esac
+ case " $deplibs " in
+ *" $path "*) ;;
+ *) deplibs="$path $deplibs" ;;
+ esac
+ done
+ fi # link_all_deplibs != no
+ fi # linkmode = lib
+ done # for deplib in $libs
+ if test link = "$pass"; then
+ if test prog = "$linkmode"; then
+ compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
+ finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
+ else
+ compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ fi
+ fi
+ dependency_libs=$newdependency_libs
+ if test dlpreopen = "$pass"; then
+ # Link the dlpreopened libraries before other libraries
+ for deplib in $save_deplibs; do
+ deplibs="$deplib $deplibs"
+ done
+ fi
+ if test dlopen != "$pass"; then
+ test conv = "$pass" || {
+ # Make sure lib_search_path contains only unique directories.
+ lib_search_path=
+ for dir in $newlib_search_path; do
+ case "$lib_search_path " in
+ *" $dir "*) ;;
+ *) func_append lib_search_path " $dir" ;;
+ esac
+ done
+ newlib_search_path=
+ }
+
+ if test prog,link = "$linkmode,$pass"; then
+ vars="compile_deplibs finalize_deplibs"
+ else
+ vars=deplibs
+ fi
+ for var in $vars dependency_libs; do
+ # Add libraries to $var in reverse order
+ eval tmp_libs=\"\$$var\"
+ new_libs=
+ for deplib in $tmp_libs; do
+ # FIXME: Pedantically, this is the right thing to do, so
+ # that some nasty dependency loop isn't accidentally
+ # broken:
+ #new_libs="$deplib $new_libs"
+ # Pragmatically, this seems to cause very few problems in
+ # practice:
+ case $deplib in
+ -L*) new_libs="$deplib $new_libs" ;;
+ -R*) ;;
+ *)
+ # And here is the reason: when a library appears more
+ # than once as an explicit dependence of a library, or
+ # is implicitly linked in more than once by the
+ # compiler, it is considered special, and multiple
+ # occurrences thereof are not removed. Compare this
+ # with having the same library being listed as a
+ # dependency of multiple other libraries: in this case,
+ # we know (pedantically, we assume) the library does not
+ # need to be listed more than once, so we keep only the
+ # last copy. This is not always right, but it is rare
+ # enough that we require users that really mean to play
+ # such unportable linking tricks to link the library
+ # using -Wl,-lname, so that libtool does not consider it
+ # for duplicate removal.
+ case " $specialdeplibs " in
+ *" $deplib "*) new_libs="$deplib $new_libs" ;;
+ *)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$deplib $new_libs" ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ done
+ tmp_libs=
+ for deplib in $new_libs; do
+ case $deplib in
+ -L*)
+ case " $tmp_libs " in
+ *" $deplib "*) ;;
+ *) func_append tmp_libs " $deplib" ;;
+ esac
+ ;;
+ *) func_append tmp_libs " $deplib" ;;
+ esac
+ done
+ eval $var=\"$tmp_libs\"
+ done # for var
+ fi
+
+ # Add Sun CC postdeps if required:
+ test CXX = "$tagname" && {
+ case $host_os in
+ linux*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C++ 5.9
+ func_suncc_cstd_abi
+
+ if test no != "$suncc_use_cstd_abi"; then
+ func_append postdeps ' -library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+
+ solaris*)
+ func_cc_basename "$CC"
+ case $func_cc_basename_result in
+ CC* | sunCC*)
+ func_suncc_cstd_abi
+
+ if test no != "$suncc_use_cstd_abi"; then
+ func_append postdeps ' -library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ }
+
+ # Last step: remove runtime libs from dependency_libs
+ # (they stay in deplibs)
+ tmp_libs=
+ for i in $dependency_libs; do
+ case " $predeps $postdeps $compiler_lib_search_path " in
+ *" $i "*)
+ i=
+ ;;
+ esac
+ if test -n "$i"; then
+ func_append tmp_libs " $i"
+ fi
+ done
+ dependency_libs=$tmp_libs
+ done # for pass
+ if test prog = "$linkmode"; then
+ dlfiles=$newdlfiles
+ fi
+ if test prog = "$linkmode" || test lib = "$linkmode"; then
+ dlprefiles=$newdlprefiles
+ fi
+
+ case $linkmode in
+ oldlib)
+ if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
+ func_warning "'-dlopen' is ignored for archives"
+ fi
+
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "'-l' and '-L' are ignored for archives" ;;
+ esac
+
+ test -n "$rpath" && \
+ func_warning "'-rpath' is ignored for archives"
+
+ test -n "$xrpath" && \
+ func_warning "'-R' is ignored for archives"
+
+ test -n "$vinfo" && \
+ func_warning "'-version-info/-version-number' is ignored for archives"
+
+ test -n "$release" && \
+ func_warning "'-release' is ignored for archives"
+
+ test -n "$export_symbols$export_symbols_regex" && \
+ func_warning "'-export-symbols' is ignored for archives"
+
+ # Now set the variables for building old libraries.
+ build_libtool_libs=no
+ oldlibs=$output
+ func_append objs "$old_deplibs"
+ ;;
+
+ lib)
+ # Make sure we only generate libraries of the form 'libNAME.la'.
+ case $outputname in
+ lib*)
+ func_stripname 'lib' '.la' "$outputname"
+ name=$func_stripname_result
+ eval shared_ext=\"$shrext_cmds\"
+ eval libname=\"$libname_spec\"
+ ;;
+ *)
+ test no = "$module" \
+ && func_fatal_help "libtool library '$output' must begin with 'lib'"
+
+ if test no != "$need_lib_prefix"; then
+ # Add the "lib" prefix for modules if required
+ func_stripname '' '.la' "$outputname"
+ name=$func_stripname_result
+ eval shared_ext=\"$shrext_cmds\"
+ eval libname=\"$libname_spec\"
+ else
+ func_stripname '' '.la' "$outputname"
+ libname=$func_stripname_result
+ fi
+ ;;
+ esac
+
+ if test -n "$objs"; then
+ if test pass_all != "$deplibs_check_method"; then
+ func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs"
+ else
+ echo
+ $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
+ $ECHO "*** objects $objs is not portable!"
+ func_append libobjs " $objs"
+ fi
+ fi
+
+ test no = "$dlself" \
+ || func_warning "'-dlopen self' is ignored for libtool libraries"
+
+ set dummy $rpath
+ shift
+ test 1 -lt "$#" \
+ && func_warning "ignoring multiple '-rpath's for a libtool library"
+
+ install_libdir=$1
+
+ oldlibs=
+ if test -z "$rpath"; then
+ if test yes = "$build_libtool_libs"; then
+ # Building a libtool convenience library.
+ # Some compilers have problems with a '.al' extension so
+ # convenience libraries should have the same extension an
+ # archive normally would.
+ oldlibs="$output_objdir/$libname.$libext $oldlibs"
+ build_libtool_libs=convenience
+ build_old_libs=yes
+ fi
+
+ test -n "$vinfo" && \
+ func_warning "'-version-info/-version-number' is ignored for convenience libraries"
+
+ test -n "$release" && \
+ func_warning "'-release' is ignored for convenience libraries"
+ else
+
+ # Parse the version information argument.
+ save_ifs=$IFS; IFS=:
+ set dummy $vinfo 0 0 0
+ shift
+ IFS=$save_ifs
+
+ test -n "$7" && \
+ func_fatal_help "too many parameters to '-version-info'"
+
+ # convert absolute version numbers to libtool ages
+ # this retains compatibility with .la files and attempts
+ # to make the code below a bit more comprehensible
+
+ case $vinfo_number in
+ yes)
+ number_major=$1
+ number_minor=$2
+ number_revision=$3
+ #
+ # There are really only two kinds -- those that
+ # use the current revision as the major version
+ # and those that subtract age and use age as
+ # a minor version. But, then there is irix
+ # that has an extra 1 added just for fun
+ #
+ case $version_type in
+ # correct linux to gnu/linux during the next big refactor
+ darwin|freebsd-elf|linux|osf|windows|none)
+ func_arith $number_major + $number_minor
+ current=$func_arith_result
+ age=$number_minor
+ revision=$number_revision
+ ;;
+ freebsd-aout|qnx|sunos)
+ current=$number_major
+ revision=$number_minor
+ age=0
+ ;;
+ irix|nonstopux)
+ func_arith $number_major + $number_minor
+ current=$func_arith_result
+ age=$number_minor
+ revision=$number_minor
+ lt_irix_increment=no
+ ;;
+ esac
+ ;;
+ no)
+ current=$1
+ revision=$2
+ age=$3
+ ;;
+ esac
+
+ # Check that each of the things are valid numbers.
+ case $current in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "CURRENT '$current' must be a nonnegative integer"
+ func_fatal_error "'$vinfo' is not valid version information"
+ ;;
+ esac
+
+ case $revision in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "REVISION '$revision' must be a nonnegative integer"
+ func_fatal_error "'$vinfo' is not valid version information"
+ ;;
+ esac
+
+ case $age in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "AGE '$age' must be a nonnegative integer"
+ func_fatal_error "'$vinfo' is not valid version information"
+ ;;
+ esac
+
+ if test "$age" -gt "$current"; then
+ func_error "AGE '$age' is greater than the current interface number '$current'"
+ func_fatal_error "'$vinfo' is not valid version information"
+ fi
+
+ # Calculate the version variables.
+ major=
+ versuffix=
+ verstring=
+ case $version_type in
+ none) ;;
+
+ darwin)
+ # Like Linux, but with the current version available in
+ # verstring for coding it into the library header
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix=$major.$age.$revision
+ # Darwin ld doesn't like 0 for these options...
+ func_arith $current + 1
+ minor_current=$func_arith_result
+ xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+ # On Darwin other compilers
+ case $CC in
+ nagfor*)
+ verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
+ ;;
+ *)
+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+ ;;
+ esac
+ ;;
+
+ freebsd-aout)
+ major=.$current
+ versuffix=.$current.$revision
+ ;;
+
+ freebsd-elf)
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix=$major.$age.$revision
+ ;;
+
+ irix | nonstopux)
+ if test no = "$lt_irix_increment"; then
+ func_arith $current - $age
+ else
+ func_arith $current - $age + 1
+ fi
+ major=$func_arith_result
+
+ case $version_type in
+ nonstopux) verstring_prefix=nonstopux ;;
+ *) verstring_prefix=sgi ;;
+ esac
+ verstring=$verstring_prefix$major.$revision
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$revision
+ while test 0 -ne "$loop"; do
+ func_arith $revision - $loop
+ iface=$func_arith_result
+ func_arith $loop - 1
+ loop=$func_arith_result
+ verstring=$verstring_prefix$major.$iface:$verstring
+ done
+
+ # Before this point, $major must not contain '.'.
+ major=.$major
+ versuffix=$major.$revision
+ ;;
+
+ linux) # correct to gnu/linux during the next big refactor
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix=$major.$age.$revision
+ ;;
+
+ osf)
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix=.$current.$age.$revision
+ verstring=$current.$age.$revision
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$age
+ while test 0 -ne "$loop"; do
+ func_arith $current - $loop
+ iface=$func_arith_result
+ func_arith $loop - 1
+ loop=$func_arith_result
+ verstring=$verstring:$iface.0
+ done
+
+ # Make executables depend on our current version.
+ func_append verstring ":$current.0"
+ ;;
+
+ qnx)
+ major=.$current
+ versuffix=.$current
+ ;;
+
+ sco)
+ major=.$current
+ versuffix=.$current
+ ;;
+
+ sunos)
+ major=.$current
+ versuffix=.$current.$revision
+ ;;
+
+ windows)
+ # Use '-' rather than '.', since we only want one
+ # extension on DOS 8.3 file systems.
+ func_arith $current - $age
+ major=$func_arith_result
+ versuffix=-$major
+ ;;
+
+ *)
+ func_fatal_configuration "unknown library version type '$version_type'"
+ ;;
+ esac
+
+ # Clear the version info if we defaulted, and they specified a release.
+ if test -z "$vinfo" && test -n "$release"; then
+ major=
+ case $version_type in
+ darwin)
+ # we can't check for "0.0" in archive_cmds due to quoting
+ # problems, so we reset it completely
+ verstring=
+ ;;
+ *)
+ verstring=0.0
+ ;;
+ esac
+ if test no = "$need_version"; then
+ versuffix=
+ else
+ versuffix=.0.0
+ fi
+ fi
+
+ # Remove version info from name if versioning should be avoided
+ if test yes,no = "$avoid_version,$need_version"; then
+ major=
+ versuffix=
+ verstring=
+ fi
+
+ # Check to see if the archive will have undefined symbols.
+ if test yes = "$allow_undefined"; then
+ if test unsupported = "$allow_undefined_flag"; then
+ if test yes = "$build_old_libs"; then
+ func_warning "undefined symbols not allowed in $host shared libraries; building static only"
+ build_libtool_libs=no
+ else
+ func_fatal_error "can't build $host shared library unless -no-undefined is specified"
+ fi
+ fi
+ else
+ # Don't allow undefined symbols.
+ allow_undefined_flag=$no_undefined_flag
+ fi
+
+ fi
+
+ func_generate_dlsyms "$libname" "$libname" :
+ func_append libobjs " $symfileobj"
+ test " " = "$libobjs" && libobjs=
+
+ if test relink != "$opt_mode"; then
+ # Remove our outputs, but don't remove object files since they
+ # may have been created when compiling PIC objects.
+ removelist=
+ tempremovelist=`$ECHO "$output_objdir/*"`
+ for p in $tempremovelist; do
+ case $p in
+ *.$objext | *.gcno)
+ ;;
+ $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*)
+ if test -n "$precious_files_regex"; then
+ if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+ then
+ continue
+ fi
+ fi
+ func_append removelist " $p"
+ ;;
+ *) ;;
+ esac
+ done
+ test -n "$removelist" && \
+ func_show_eval "${RM}r \$removelist"
+ fi
+
+ # Now set the variables for building old libraries.
+ if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then
+ func_append oldlibs " $output_objdir/$libname.$libext"
+
+ # Transform .lo files to .o files.
+ oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP`
+ fi
+
+ # Eliminate all temporary directories.
+ #for path in $notinst_path; do
+ # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"`
+ # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"`
+ # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"`
+ #done
+
+ if test -n "$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ temp_xrpath=
+ for libdir in $xrpath; do
+ func_replace_sysroot "$libdir"
+ func_append temp_xrpath " -R$func_replace_sysroot_result"
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ done
+ if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then
+ dependency_libs="$temp_xrpath $dependency_libs"
+ fi
+ fi
+
+ # Make sure dlfiles contains only unique files that won't be dlpreopened
+ old_dlfiles=$dlfiles
+ dlfiles=
+ for lib in $old_dlfiles; do
+ case " $dlprefiles $dlfiles " in
+ *" $lib "*) ;;
+ *) func_append dlfiles " $lib" ;;
+ esac
+ done
+
+ # Make sure dlprefiles contains only unique files
+ old_dlprefiles=$dlprefiles
+ dlprefiles=
+ for lib in $old_dlprefiles; do
+ case "$dlprefiles " in
+ *" $lib "*) ;;
+ *) func_append dlprefiles " $lib" ;;
+ esac
+ done
+
+ if test yes = "$build_libtool_libs"; then
+ if test -n "$rpath"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
+ # these systems don't actually have a c library (as such)!
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C library is in the System framework
+ func_append deplibs " System.ltframework"
+ ;;
+ *-*-netbsd*)
+ # Don't link with libc until the a.out ld.so is fixed.
+ ;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc due to us having libc/libc_r.
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ ;;
+ *)
+ # Add libc to deplibs on all other systems if necessary.
+ if test yes = "$build_libtool_need_lc"; then
+ func_append deplibs " -lc"
+ fi
+ ;;
+ esac
+ fi
+
+ # Transform deplibs into only deplibs that can be linked in shared.
+ name_save=$name
+ libname_save=$libname
+ release_save=$release
+ versuffix_save=$versuffix
+ major_save=$major
+ # I'm not sure if I'm treating the release correctly. I think
+ # release should show up in the -l (ie -lgmp5) so we don't want to
+ # add it in twice. Is that correct?
+ release=
+ versuffix=
+ major=
+ newdeplibs=
+ droppeddeps=no
+ case $deplibs_check_method in
+ pass_all)
+ # Don't check for shared/static. Everything works.
+ # This might be a little naive. We might want to check
+ # whether the library exists or not. But this is on
+ # osf3 & osf4 and I'm not really sure... Just
+ # implementing what was already the behavior.
+ newdeplibs=$deplibs
+ ;;
+ test_compile)
+ # This code stresses the "libraries are programs" paradigm to its
+ # limits. Maybe even breaks it. We compile a program, linking it
+ # against the deplibs as a proxy for the library. Then we can check
+ # whether they linked in statically or dynamically with ldd.
+ $opt_dry_run || $RM conftest.c
+ cat > conftest.c <<EOF
+ int main() { return 0; }
+EOF
+ $opt_dry_run || $RM conftest
+ if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+ ldd_output=`ldd conftest`
+ for i in $deplibs; do
+ case $i in
+ -l*)
+ func_stripname -l '' "$i"
+ name=$func_stripname_result
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ func_append newdeplibs " $i"
+ i=
+ ;;
+ esac
+ fi
+ if test -n "$i"; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+ set dummy $deplib_matches; shift
+ deplib_match=$1
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
+ func_append newdeplibs " $i"
+ else
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which I believe you do not have"
+ echo "*** because a test_compile did reveal that the linker did not use it for"
+ echo "*** its dynamic dependency list that programs get resolved with at runtime."
+ fi
+ fi
+ ;;
+ *)
+ func_append newdeplibs " $i"
+ ;;
+ esac
+ done
+ else
+ # Error occurred in the first compile. Let's try to salvage
+ # the situation: Compile a separate program for each library.
+ for i in $deplibs; do
+ case $i in
+ -l*)
+ func_stripname -l '' "$i"
+ name=$func_stripname_result
+ $opt_dry_run || $RM conftest
+ if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
+ ldd_output=`ldd conftest`
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ func_append newdeplibs " $i"
+ i=
+ ;;
+ esac
+ fi
+ if test -n "$i"; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+ set dummy $deplib_matches; shift
+ deplib_match=$1
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
+ func_append newdeplibs " $i"
+ else
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because a test_compile did reveal that the linker did not use this one"
+ echo "*** as a dynamic dependency that programs can get resolved with at runtime."
+ fi
+ fi
+ else
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
+ echo "*** make it link in! You will probably need to install it or some"
+ echo "*** library that it depends on before this library will be fully"
+ echo "*** functional. Installing it before continuing would be even better."
+ fi
+ ;;
+ *)
+ func_append newdeplibs " $i"
+ ;;
+ esac
+ done
+ fi
+ ;;
+ file_magic*)
+ set dummy $deplibs_check_method; shift
+ file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ for a_deplib in $deplibs; do
+ case $a_deplib in
+ -l*)
+ func_stripname -l '' "$a_deplib"
+ name=$func_stripname_result
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ func_append newdeplibs " $a_deplib"
+ a_deplib=
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib"; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ if test -n "$file_magic_glob"; then
+ libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
+ else
+ libnameglob=$libname
+ fi
+ test yes = "$want_nocaseglob" && nocaseglob=`shopt -p nocaseglob`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ if test yes = "$want_nocaseglob"; then
+ shopt -s nocaseglob
+ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+ $nocaseglob
+ else
+ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+ fi
+ for potent_lib in $potential_libs; do
+ # Follow soft links.
+ if ls -lLd "$potent_lib" 2>/dev/null |
+ $GREP " -> " >/dev/null; then
+ continue
+ fi
+ # The statement above tries to avoid entering an
+ # endless loop below, in case of cyclic links.
+ # We might still enter an endless loop, since a link
+ # loop can be closed while we follow links,
+ # but so what?
+ potlib=$potent_lib
+ while test -h "$potlib" 2>/dev/null; do
+ potliblink=`ls -ld $potlib | $SED 's/.* -> //'`
+ case $potliblink in
+ [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;;
+ *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";;
+ esac
+ done
+ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
+ $SED -e 10q |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ func_append newdeplibs " $a_deplib"
+ a_deplib=
+ break 2
+ fi
+ done
+ done
+ fi
+ if test -n "$a_deplib"; then
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib"; then
+ $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
+ else
+ $ECHO "*** with $libname and none of the candidates passed a file format test"
+ $ECHO "*** using a file magic. Last file checked: $potlib"
+ fi
+ fi
+ ;;
+ *)
+ # Add a -L argument.
+ func_append newdeplibs " $a_deplib"
+ ;;
+ esac
+ done # Gone through all deplibs.
+ ;;
+ match_pattern*)
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ for a_deplib in $deplibs; do
+ case $a_deplib in
+ -l*)
+ func_stripname -l '' "$a_deplib"
+ name=$func_stripname_result
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ func_append newdeplibs " $a_deplib"
+ a_deplib=
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib"; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
+ potlib=$potent_lib # see symlink-check above in file_magic test
+ if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
+ $EGREP "$match_pattern_regex" > /dev/null; then
+ func_append newdeplibs " $a_deplib"
+ a_deplib=
+ break 2
+ fi
+ done
+ done
+ fi
+ if test -n "$a_deplib"; then
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib"; then
+ $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
+ else
+ $ECHO "*** with $libname and none of the candidates passed a file format test"
+ $ECHO "*** using a regex pattern. Last file checked: $potlib"
+ fi
+ fi
+ ;;
+ *)
+ # Add a -L argument.
+ func_append newdeplibs " $a_deplib"
+ ;;
+ esac
+ done # Gone through all deplibs.
+ ;;
+ none | unknown | *)
+ newdeplibs=
+ tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ for i in $predeps $postdeps; do
+ # can't use Xsed below, because $i might contain '/'
+ tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"`
+ done
+ fi
+ case $tmp_deplibs in
+ *[!\ \ ]*)
+ echo
+ if test none = "$deplibs_check_method"; then
+ echo "*** Warning: inter-library dependencies are not supported in this platform."
+ else
+ echo "*** Warning: inter-library dependencies are not known to be supported."
+ fi
+ echo "*** All declared inter-library dependencies are being dropped."
+ droppeddeps=yes
+ ;;
+ esac
+ ;;
+ esac
+ versuffix=$versuffix_save
+ major=$major_save
+ release=$release_save
+ libname=$libname_save
+ name=$name_save
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library with the System framework
+ newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'`
+ ;;
+ esac
+
+ if test yes = "$droppeddeps"; then
+ if test yes = "$module"; then
+ echo
+ echo "*** Warning: libtool could not satisfy all declared inter-library"
+ $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
+ echo "*** a static module, that should work as long as the dlopening"
+ echo "*** application is linked with the -dlopen flag."
+ if test -z "$global_symbol_pipe"; then
+ echo
+ echo "*** However, this would only work if libtool was able to extract symbol"
+ echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
+ echo "*** not find such a program. So, this module is probably useless."
+ echo "*** 'nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test no = "$build_old_libs"; then
+ oldlibs=$output_objdir/$libname.$libext
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ else
+ echo "*** The inter-library dependencies that have been dropped here will be"
+ echo "*** automatically added whenever a program is linked with this library"
+ echo "*** or is declared to -dlopen it."
+
+ if test no = "$allow_undefined"; then
+ echo
+ echo "*** Since this library must not contain undefined symbols,"
+ echo "*** because either the platform does not support them or"
+ echo "*** it was explicitly requested with -no-undefined,"
+ echo "*** libtool will only create a static version of it."
+ if test no = "$build_old_libs"; then
+ oldlibs=$output_objdir/$libname.$libext
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ fi
+ fi
+ # Done checking deplibs!
+ deplibs=$newdeplibs
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ case $host in
+ *-*-darwin*)
+ newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
+ esac
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $deplibs " in
+ *" -L$path/$objdir "*)
+ func_append new_libs " -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ done
+ deplibs=$new_libs
+
+ # All the library-specific variables (install_libdir is set above).
+ library_names=
+ old_library=
+ dlname=
+
+ # Test again, we may have decided not to build it any more
+ if test yes = "$build_libtool_libs"; then
+ # Remove $wl instances when linking with ld.
+ # FIXME: should test the right _cmds variable.
+ case $archive_cmds in
+ *\$LD\ *) wl= ;;
+ esac
+ if test yes = "$hardcode_into_libs"; then
+ # Hardcode the library paths
+ hardcode_libdirs=
+ dep_rpath=
+ rpath=$finalize_rpath
+ test relink = "$opt_mode" || rpath=$compile_rpath$rpath
+ for libdir in $rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ func_replace_sysroot "$libdir"
+ libdir=$func_replace_sysroot_result
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs=$libdir
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ func_append dep_rpath " $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) func_append perm_rpath " $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir=$hardcode_libdirs
+ eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
+ fi
+ if test -n "$runpath_var" && test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ func_append rpath "$dir:"
+ done
+ eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+ fi
+ test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+ fi
+
+ shlibpath=$finalize_shlibpath
+ test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath
+ if test -n "$shlibpath"; then
+ eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+ fi
+
+ # Get the real and link names of the library.
+ eval shared_ext=\"$shrext_cmds\"
+ eval library_names=\"$library_names_spec\"
+ set dummy $library_names
+ shift
+ realname=$1
+ shift
+
+ if test -n "$soname_spec"; then
+ eval soname=\"$soname_spec\"
+ else
+ soname=$realname
+ fi
+ if test -z "$dlname"; then
+ dlname=$soname
+ fi
+
+ lib=$output_objdir/$realname
+ linknames=
+ for link
+ do
+ func_append linknames " $link"
+ done
+
+ # Use standard objects if they are pic
+ test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ test "X$libobjs" = "X " && libobjs=
+
+ delfiles=
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
+ export_symbols=$output_objdir/$libname.uexp
+ func_append delfiles " $export_symbols"
+ fi
+
+ orig_export_symbols=
+ case $host_os in
+ cygwin* | mingw* | cegcc*)
+ if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
+ # exporting using user supplied symfile
+ func_dll_def_p "$export_symbols" || {
+ # and it's NOT already a .def file. Must figure out
+ # which of the given symbols are data symbols and tag
+ # them as such. So, trigger use of export_symbols_cmds.
+ # export_symbols gets reassigned inside the "prepare
+ # the list of exported symbols" if statement, so the
+ # include_expsyms logic still works.
+ orig_export_symbols=$export_symbols
+ export_symbols=
+ always_export_symbols=yes
+ }
+ fi
+ ;;
+ esac
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then
+ func_verbose "generating symbol list for '$libname.la'"
+ export_symbols=$output_objdir/$libname.exp
+ $opt_dry_run || $RM $export_symbols
+ cmds=$export_symbols_cmds
+ save_ifs=$IFS; IFS='~'
+ for cmd1 in $cmds; do
+ IFS=$save_ifs
+ # Take the normal branch if the nm_file_list_spec branch
+ # doesn't work or if tool conversion is not needed.
+ case $nm_file_list_spec~$to_tool_file_cmd in
+ *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*)
+ try_normal_branch=yes
+ eval cmd=\"$cmd1\"
+ func_len " $cmd"
+ len=$func_len_result
+ ;;
+ *)
+ try_normal_branch=no
+ ;;
+ esac
+ if test yes = "$try_normal_branch" \
+ && { test "$len" -lt "$max_cmd_len" \
+ || test "$max_cmd_len" -le -1; }
+ then
+ func_show_eval "$cmd" 'exit $?'
+ skipped_export=false
+ elif test -n "$nm_file_list_spec"; then
+ func_basename "$output"
+ output_la=$func_basename_result
+ save_libobjs=$libobjs
+ save_output=$output
+ output=$output_objdir/$output_la.nm
+ func_to_tool_file "$output"
+ libobjs=$nm_file_list_spec$func_to_tool_file_result
+ func_append delfiles " $output"
+ func_verbose "creating $NM input file list: $output"
+ for obj in $save_libobjs; do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result"
+ done > "$output"
+ eval cmd=\"$cmd1\"
+ func_show_eval "$cmd" 'exit $?'
+ output=$save_output
+ libobjs=$save_libobjs
+ skipped_export=false
+ else
+ # The command line is too long to execute in one step.
+ func_verbose "using reloadable object file for export list..."
+ skipped_export=:
+ # Break out early, otherwise skipped_export may be
+ # set to false by a later but shorter cmd.
+ break
+ fi
+ done
+ IFS=$save_ifs
+ if test -n "$export_symbols_regex" && test : != "$skipped_export"; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+ fi
+
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ tmp_export_symbols=$export_symbols
+ test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols
+ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test : != "$skipped_export" && test -n "$orig_export_symbols"; then
+ # The given exports_symbols file has to be filtered, so filter it.
+ func_verbose "filter symbol list for '$libname.la' to tag DATA exports"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # 's' commands, which not all seds can handle. GNU sed should be fine
+ # though. Also, the filter scales superlinearly with the number of
+ # global variables. join(1) would be nice here, but unfortunately
+ # isn't a blessed tool.
+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+ func_append delfiles " $export_symbols $output_objdir/$libname.filter"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+ fi
+
+ tmp_deplibs=
+ for test_deplib in $deplibs; do
+ case " $convenience " in
+ *" $test_deplib "*) ;;
+ *)
+ func_append tmp_deplibs " $test_deplib"
+ ;;
+ esac
+ done
+ deplibs=$tmp_deplibs
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec" &&
+ test yes = "$compiler_needs_object" &&
+ test -z "$libobjs"; then
+ # extract the archives, so we have objects to list.
+ # TODO: could optimize this to just extract one archive.
+ whole_archive_flag_spec=
+ fi
+ if test -n "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
+ else
+ gentop=$output_objdir/${outputname}x
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $convenience
+ func_append libobjs " $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+ fi
+
+ if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then
+ eval flag=\"$thread_safe_flag_spec\"
+ func_append linker_flags " $flag"
+ fi
+
+ # Make a backup of the uninstalled library when relinking
+ if test relink = "$opt_mode"; then
+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
+ fi
+
+ # Do each of the archive commands.
+ if test yes = "$module" && test -n "$module_cmds"; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ eval test_cmds=\"$module_expsym_cmds\"
+ cmds=$module_expsym_cmds
+ else
+ eval test_cmds=\"$module_cmds\"
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ eval test_cmds=\"$archive_expsym_cmds\"
+ cmds=$archive_expsym_cmds
+ else
+ eval test_cmds=\"$archive_cmds\"
+ cmds=$archive_cmds
+ fi
+ fi
+
+ if test : != "$skipped_export" &&
+ func_len " $test_cmds" &&
+ len=$func_len_result &&
+ test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ :
+ else
+ # The command line is too long to link in one step, link piecewise
+ # or, if using GNU ld and skipped_export is not :, use a linker
+ # script.
+
+ # Save the value of $output and $libobjs because we want to
+ # use them later. If we have whole_archive_flag_spec, we
+ # want to use save_libobjs as it was before
+ # whole_archive_flag_spec was expanded, because we can't
+ # assume the linker understands whole_archive_flag_spec.
+ # This may have to be revisited, in case too many
+ # convenience libraries get linked in and end up exceeding
+ # the spec.
+ if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ fi
+ save_output=$output
+ func_basename "$output"
+ output_la=$func_basename_result
+
+ # Clear the reloadable object creation command queue and
+ # initialize k to one.
+ test_cmds=
+ concat_cmds=
+ objlist=
+ last_robj=
+ k=1
+
+ if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then
+ output=$output_objdir/$output_la.lnkscript
+ func_verbose "creating GNU ld script: $output"
+ echo 'INPUT (' > $output
+ for obj in $save_libobjs
+ do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result" >> $output
+ done
+ echo ')' >> $output
+ func_append delfiles " $output"
+ func_to_tool_file "$output"
+ output=$func_to_tool_file_result
+ elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then
+ output=$output_objdir/$output_la.lnk
+ func_verbose "creating linker input file list: $output"
+ : > $output
+ set x $save_libobjs
+ shift
+ firstobj=
+ if test yes = "$compiler_needs_object"; then
+ firstobj="$1 "
+ shift
+ fi
+ for obj
+ do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result" >> $output
+ done
+ func_append delfiles " $output"
+ func_to_tool_file "$output"
+ output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
+ else
+ if test -n "$save_libobjs"; then
+ func_verbose "creating reloadable object files..."
+ output=$output_objdir/$output_la-$k.$objext
+ eval test_cmds=\"$reload_cmds\"
+ func_len " $test_cmds"
+ len0=$func_len_result
+ len=$len0
+
+ # Loop over the list of objects to be linked.
+ for obj in $save_libobjs
+ do
+ func_len " $obj"
+ func_arith $len + $func_len_result
+ len=$func_arith_result
+ if test -z "$objlist" ||
+ test "$len" -lt "$max_cmd_len"; then
+ func_append objlist " $obj"
+ else
+ # The command $test_cmds is almost too long, add a
+ # command to the queue.
+ if test 1 -eq "$k"; then
+ # The first file doesn't have a previous command to add.
+ reload_objs=$objlist
+ eval concat_cmds=\"$reload_cmds\"
+ else
+ # All subsequent reloadable object files will link in
+ # the last one created.
+ reload_objs="$objlist $last_robj"
+ eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
+ fi
+ last_robj=$output_objdir/$output_la-$k.$objext
+ func_arith $k + 1
+ k=$func_arith_result
+ output=$output_objdir/$output_la-$k.$objext
+ objlist=" $obj"
+ func_len " $last_robj"
+ func_arith $len0 + $func_len_result
+ len=$func_arith_result
+ fi
+ done
+ # Handle the remaining objects by creating one last
+ # reloadable object file. All subsequent reloadable object
+ # files will link in the last one created.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ reload_objs="$objlist $last_robj"
+ eval concat_cmds=\"\$concat_cmds$reload_cmds\"
+ if test -n "$last_robj"; then
+ eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
+ fi
+ func_append delfiles " $output"
+
+ else
+ output=
+ fi
+
+ ${skipped_export-false} && {
+ func_verbose "generating symbol list for '$libname.la'"
+ export_symbols=$output_objdir/$libname.exp
+ $opt_dry_run || $RM $export_symbols
+ libobjs=$output
+ # Append the command to create the export file.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
+ if test -n "$last_robj"; then
+ eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
+ fi
+ }
+
+ test -n "$save_libobjs" &&
+ func_verbose "creating a temporary reloadable object file: $output"
+
+ # Loop through the commands generated above and execute them.
+ save_ifs=$IFS; IFS='~'
+ for cmd in $concat_cmds; do
+ IFS=$save_ifs
+ $opt_quiet || {
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test relink = "$opt_mode"; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
+
+ exit $lt_exit
+ }
+ done
+ IFS=$save_ifs
+
+ if test -n "$export_symbols_regex" && ${skipped_export-false}; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+
+ ${skipped_export-false} && {
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ tmp_export_symbols=$export_symbols
+ test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols
+ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test -n "$orig_export_symbols"; then
+ # The given exports_symbols file has to be filtered, so filter it.
+ func_verbose "filter symbol list for '$libname.la' to tag DATA exports"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # 's' commands, which not all seds can handle. GNU sed should be fine
+ # though. Also, the filter scales superlinearly with the number of
+ # global variables. join(1) would be nice here, but unfortunately
+ # isn't a blessed tool.
+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+ func_append delfiles " $export_symbols $output_objdir/$libname.filter"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+ fi
+ }
+
+ libobjs=$output
+ # Restore the value of output.
+ output=$save_output
+
+ if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+ # Expand the library linking commands again to reset the
+ # value of $libobjs for piecewise linking.
+
+ # Do each of the archive commands.
+ if test yes = "$module" && test -n "$module_cmds"; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ cmds=$module_expsym_cmds
+ else
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ cmds=$archive_expsym_cmds
+ else
+ cmds=$archive_cmds
+ fi
+ fi
+ fi
+
+ if test -n "$delfiles"; then
+ # Append the command to remove temporary files to $cmds.
+ eval cmds=\"\$cmds~\$RM $delfiles\"
+ fi
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop=$output_objdir/${outputname}x
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ func_append libobjs " $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+
+ save_ifs=$IFS; IFS='~'
+ for cmd in $cmds; do
+ IFS=$sp$nl
+ eval cmd=\"$cmd\"
+ IFS=$save_ifs
+ $opt_quiet || {
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test relink = "$opt_mode"; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
+
+ exit $lt_exit
+ }
+ done
+ IFS=$save_ifs
+
+ # Restore the uninstalled library and exit
+ if test relink = "$opt_mode"; then
+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
+
+ if test -n "$convenience"; then
+ if test -z "$whole_archive_flag_spec"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ # Create links to the real library.
+ for linkname in $linknames; do
+ if test "$realname" != "$linkname"; then
+ func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
+ fi
+ done
+
+ # If -module or -export-dynamic was specified, set the dlname.
+ if test yes = "$module" || test yes = "$export_dynamic"; then
+ # On all known operating systems, these are identical.
+ dlname=$soname
+ fi
+ fi
+ ;;
+
+ obj)
+ if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
+ func_warning "'-dlopen' is ignored for objects"
+ fi
+
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "'-l' and '-L' are ignored for objects" ;;
+ esac
+
+ test -n "$rpath" && \
+ func_warning "'-rpath' is ignored for objects"
+
+ test -n "$xrpath" && \
+ func_warning "'-R' is ignored for objects"
+
+ test -n "$vinfo" && \
+ func_warning "'-version-info' is ignored for objects"
+
+ test -n "$release" && \
+ func_warning "'-release' is ignored for objects"
+
+ case $output in
+ *.lo)
+ test -n "$objs$old_deplibs" && \
+ func_fatal_error "cannot build library object '$output' from non-libtool objects"
+
+ libobj=$output
+ func_lo2o "$libobj"
+ obj=$func_lo2o_result
+ ;;
+ *)
+ libobj=
+ obj=$output
+ ;;
+ esac
+
+ # Delete the old objects.
+ $opt_dry_run || $RM $obj $libobj
+
+ # Objects from convenience libraries. This assumes
+ # single-version convenience libraries. Whenever we create
+ # different ones for PIC/non-PIC, this we'll have to duplicate
+ # the extraction.
+ reload_conv_objs=
+ gentop=
+ # if reload_cmds runs $LD directly, get rid of -Wl from
+ # whole_archive_flag_spec and hope we can get by with turning comma
+ # into space.
+ case $reload_cmds in
+ *\$LD[\ \$]*) wl= ;;
+ esac
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec"; then
+ eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+ test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
+ reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags
+ else
+ gentop=$output_objdir/${obj}x
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $convenience
+ reload_conv_objs="$reload_objs $func_extract_archives_result"
+ fi
+ fi
+
+ # If we're not building shared, we need to use non_pic_objs
+ test yes = "$build_libtool_libs" || libobjs=$non_pic_objects
+
+ # Create the old-style object.
+ reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs
+
+ output=$obj
+ func_execute_cmds "$reload_cmds" 'exit $?'
+
+ # Exit if we aren't doing a library object file.
+ if test -z "$libobj"; then
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ test yes = "$build_libtool_libs" || {
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ # Create an invalid libtool object if no PIC, so that we don't
+ # accidentally link it into a program.
+ # $show "echo timestamp > $libobj"
+ # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
+ exit $EXIT_SUCCESS
+ }
+
+ if test -n "$pic_flag" || test default != "$pic_mode"; then
+ # Only do commands if we really have different PIC objects.
+ reload_objs="$libobjs $reload_conv_objs"
+ output=$libobj
+ func_execute_cmds "$reload_cmds" 'exit $?'
+ fi
+
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ exit $EXIT_SUCCESS
+ ;;
+
+ prog)
+ case $host in
+ *cygwin*) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result.exe;;
+ esac
+ test -n "$vinfo" && \
+ func_warning "'-version-info' is ignored for programs"
+
+ test -n "$release" && \
+ func_warning "'-release' is ignored for programs"
+
+ $preload \
+ && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \
+ && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support."
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library is the System framework
+ compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'`
+ finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'`
+ ;;
+ esac
+
+ case $host in
+ *-*-darwin*)
+ # Don't allow lazy linking, it breaks C++ global constructors
+ # But is supposedly fixed on 10.4 or later (yay!).
+ if test CXX = "$tagname"; then
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+ 10.[0123])
+ func_append compile_command " $wl-bind_at_load"
+ func_append finalize_command " $wl-bind_at_load"
+ ;;
+ esac
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
+ esac
+
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $compile_deplibs " in
+ *" -L$path/$objdir "*)
+ func_append new_libs " -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $compile_deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ done
+ compile_deplibs=$new_libs
+
+
+ func_append compile_command " $compile_deplibs"
+ func_append finalize_command " $finalize_deplibs"
+
+ if test -n "$rpath$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ for libdir in $rpath $xrpath; do
+ # This is the magic to use -rpath.
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ done
+ fi
+
+ # Now hardcode the library paths
+ rpath=
+ hardcode_libdirs=
+ for libdir in $compile_rpath $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs=$libdir
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ func_append rpath " $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) func_append perm_rpath " $libdir" ;;
+ esac
+ fi
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$libdir:"*) ;;
+ ::) dllsearchpath=$libdir;;
+ *) func_append dllsearchpath ":$libdir";;
+ esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ ::) dllsearchpath=$testbindir;;
+ *) func_append dllsearchpath ":$testbindir";;
+ esac
+ ;;
+ esac
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir=$hardcode_libdirs
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ compile_rpath=$rpath
+
+ rpath=
+ hardcode_libdirs=
+ for libdir in $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs=$libdir
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ func_append rpath " $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$finalize_perm_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_perm_rpath " $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir=$hardcode_libdirs
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ finalize_rpath=$rpath
+
+ if test -n "$libobjs" && test yes = "$build_old_libs"; then
+ # Transform all the library objects into standard objects.
+ compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ fi
+
+ func_generate_dlsyms "$outputname" "@PROGRAM@" false
+
+ # template prelinking step
+ if test -n "$prelink_cmds"; then
+ func_execute_cmds "$prelink_cmds" 'exit $?'
+ fi
+
+ wrappers_required=:
+ case $host in
+ *cegcc* | *mingw32ce*)
+ # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
+ wrappers_required=false
+ ;;
+ *cygwin* | *mingw* )
+ test yes = "$build_libtool_libs" || wrappers_required=false
+ ;;
+ *)
+ if test no = "$need_relink" || test yes != "$build_libtool_libs"; then
+ wrappers_required=false
+ fi
+ ;;
+ esac
+ $wrappers_required || {
+ # Replace the output file specification.
+ compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
+ link_command=$compile_command$compile_rpath
+
+ # We have no uninstalled library dependencies, so finalize right now.
+ exit_status=0
+ func_show_eval "$link_command" 'exit_status=$?'
+
+ if test -n "$postlink_cmds"; then
+ func_to_tool_file "$output"
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+ func_execute_cmds "$postlink_cmds" 'exit $?'
+ fi
+
+ # Delete the generated files.
+ if test -f "$output_objdir/${outputname}S.$objext"; then
+ func_show_eval '$RM "$output_objdir/${outputname}S.$objext"'
+ fi
+
+ exit $exit_status
+ }
+
+ if test -n "$compile_shlibpath$finalize_shlibpath"; then
+ compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+ fi
+ if test -n "$finalize_shlibpath"; then
+ finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+ fi
+
+ compile_var=
+ finalize_var=
+ if test -n "$runpath_var"; then
+ if test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ func_append rpath "$dir:"
+ done
+ compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ if test -n "$finalize_perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $finalize_perm_rpath; do
+ func_append rpath "$dir:"
+ done
+ finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ fi
+
+ if test yes = "$no_install"; then
+ # We don't need to create a wrapper script.
+ link_command=$compile_var$compile_command$compile_rpath
+ # Replace the output file specification.
+ link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
+ # Delete the old output file.
+ $opt_dry_run || $RM $output
+ # Link the executable and exit
+ func_show_eval "$link_command" 'exit $?'
+
+ if test -n "$postlink_cmds"; then
+ func_to_tool_file "$output"
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+ func_execute_cmds "$postlink_cmds" 'exit $?'
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ case $hardcode_action,$fast_install in
+ relink,*)
+ # Fast installation is not supported
+ link_command=$compile_var$compile_command$compile_rpath
+ relink_command=$finalize_var$finalize_command$finalize_rpath
+
+ func_warning "this platform does not like uninstalled shared libraries"
+ func_warning "'$output' will be relinked during installation"
+ ;;
+ *,yes)
+ link_command=$finalize_var$compile_command$finalize_rpath
+ relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
+ ;;
+ *,no)
+ link_command=$compile_var$compile_command$compile_rpath
+ relink_command=$finalize_var$finalize_command$finalize_rpath
+ ;;
+ *,needless)
+ link_command=$finalize_var$compile_command$finalize_rpath
+ relink_command=
+ ;;
+ esac
+
+ # Replace the output file specification.
+ link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+ # Delete the old output files.
+ $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+ func_show_eval "$link_command" 'exit $?'
+
+ if test -n "$postlink_cmds"; then
+ func_to_tool_file "$output_objdir/$outputname"
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+ func_execute_cmds "$postlink_cmds" 'exit $?'
+ fi
+
+ # Now create the wrapper script.
+ func_verbose "creating $output"
+
+ # Quote the relink command for shipping.
+ if test -n "$relink_command"; then
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+ fi
+ done
+ relink_command="(cd `pwd`; $relink_command)"
+ relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
+ fi
+
+ # Only actually do things if not in dry run mode.
+ $opt_dry_run || {
+ # win32 will think the script is a binary if it has
+ # a .exe suffix, so we strip it off here.
+ case $output in
+ *.exe) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result ;;
+ esac
+ # test for cygwin because mv fails w/o .exe extensions
+ case $host in
+ *cygwin*)
+ exeext=.exe
+ func_stripname '' '.exe' "$outputname"
+ outputname=$func_stripname_result ;;
+ *) exeext= ;;
+ esac
+ case $host in
+ *cygwin* | *mingw* )
+ func_dirname_and_basename "$output" "" "."
+ output_name=$func_basename_result
+ output_path=$func_dirname_result
+ cwrappersource=$output_path/$objdir/lt-$output_name.c
+ cwrapper=$output_path/$output_name.exe
+ $RM $cwrappersource $cwrapper
+ trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+ func_emit_cwrapperexe_src > $cwrappersource
+
+ # The wrapper executable is built using the $host compiler,
+ # because it contains $host paths and files. If cross-
+ # compiling, it, like the target executable, must be
+ # executed on the $host or under an emulation environment.
+ $opt_dry_run || {
+ $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
+ $STRIP $cwrapper
+ }
+
+ # Now, create the wrapper script for func_source use:
+ func_ltwrapper_scriptname $cwrapper
+ $RM $func_ltwrapper_scriptname_result
+ trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
+ $opt_dry_run || {
+ # note: this script will not be executed, so do not chmod.
+ if test "x$build" = "x$host"; then
+ $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
+ else
+ func_emit_wrapper no > $func_ltwrapper_scriptname_result
+ fi
+ }
+ ;;
+ * )
+ $RM $output
+ trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
+
+ func_emit_wrapper no > $output
+ chmod +x $output
+ ;;
+ esac
+ }
+ exit $EXIT_SUCCESS
+ ;;
+ esac
+
+ # See if we need to build an old-fashioned archive.
+ for oldlib in $oldlibs; do
+
+ case $build_libtool_libs in
+ convenience)
+ oldobjs="$libobjs_save $symfileobj"
+ addlibs=$convenience
+ build_libtool_libs=no
+ ;;
+ module)
+ oldobjs=$libobjs_save
+ addlibs=$old_convenience
+ build_libtool_libs=no
+ ;;
+ *)
+ oldobjs="$old_deplibs $non_pic_objects"
+ $preload && test -f "$symfileobj" \
+ && func_append oldobjs " $symfileobj"
+ addlibs=$old_convenience
+ ;;
+ esac
+
+ if test -n "$addlibs"; then
+ gentop=$output_objdir/${outputname}x
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $addlibs
+ func_append oldobjs " $func_extract_archives_result"
+ fi
+
+ # Do each command in the archive commands.
+ if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then
+ cmds=$old_archive_from_new_cmds
+ else
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop=$output_objdir/${outputname}x
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ func_append oldobjs " $func_extract_archives_result"
+ fi
+
+ # POSIX demands no paths to be encoded in archives. We have
+ # to avoid creating archives with duplicate basenames if we
+ # might have to extract them afterwards, e.g., when creating a
+ # static archive out of a convenience library, or when linking
+ # the entirety of a libtool archive into another (currently
+ # not supported by libtool).
+ if (for obj in $oldobjs
+ do
+ func_basename "$obj"
+ $ECHO "$func_basename_result"
+ done | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ echo "copying selected object files to avoid basename conflicts..."
+ gentop=$output_objdir/${outputname}x
+ func_append generated " $gentop"
+ func_mkdir_p "$gentop"
+ save_oldobjs=$oldobjs
+ oldobjs=
+ counter=1
+ for obj in $save_oldobjs
+ do
+ func_basename "$obj"
+ objbase=$func_basename_result
+ case " $oldobjs " in
+ " ") oldobjs=$obj ;;
+ *[\ /]"$objbase "*)
+ while :; do
+ # Make sure we don't pick an alternate name that also
+ # overlaps.
+ newobj=lt$counter-$objbase
+ func_arith $counter + 1
+ counter=$func_arith_result
+ case " $oldobjs " in
+ *[\ /]"$newobj "*) ;;
+ *) if test ! -f "$gentop/$newobj"; then break; fi ;;
+ esac
+ done
+ func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+ func_append oldobjs " $gentop/$newobj"
+ ;;
+ *) func_append oldobjs " $obj" ;;
+ esac
+ done
+ fi
+ func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
+ tool_oldlib=$func_to_tool_file_result
+ eval cmds=\"$old_archive_cmds\"
+
+ func_len " $cmds"
+ len=$func_len_result
+ if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ cmds=$old_archive_cmds
+ elif test -n "$archiver_list_spec"; then
+ func_verbose "using command file archive linking..."
+ for obj in $oldobjs
+ do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result"
+ done > $output_objdir/$libname.libcmd
+ func_to_tool_file "$output_objdir/$libname.libcmd"
+ oldobjs=" $archiver_list_spec$func_to_tool_file_result"
+ cmds=$old_archive_cmds
+ else
+ # the command line is too long to link in one step, link in parts
+ func_verbose "using piecewise archive linking..."
+ save_RANLIB=$RANLIB
+ RANLIB=:
+ objlist=
+ concat_cmds=
+ save_oldobjs=$oldobjs
+ oldobjs=
+ # Is there a better way of finding the last object in the list?
+ for obj in $save_oldobjs
+ do
+ last_oldobj=$obj
+ done
+ eval test_cmds=\"$old_archive_cmds\"
+ func_len " $test_cmds"
+ len0=$func_len_result
+ len=$len0
+ for obj in $save_oldobjs
+ do
+ func_len " $obj"
+ func_arith $len + $func_len_result
+ len=$func_arith_result
+ func_append objlist " $obj"
+ if test "$len" -lt "$max_cmd_len"; then
+ :
+ else
+ # the above command should be used before it gets too long
+ oldobjs=$objlist
+ if test "$obj" = "$last_oldobj"; then
+ RANLIB=$save_RANLIB
+ fi
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\$concat_cmds$old_archive_cmds\"
+ objlist=
+ len=$len0
+ fi
+ done
+ RANLIB=$save_RANLIB
+ oldobjs=$objlist
+ if test -z "$oldobjs"; then
+ eval cmds=\"\$concat_cmds\"
+ else
+ eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+ fi
+ fi
+ fi
+ func_execute_cmds "$cmds" 'exit $?'
+ done
+
+ test -n "$generated" && \
+ func_show_eval "${RM}r$generated"
+
+ # Now create the libtool archive.
+ case $output in
+ *.la)
+ old_library=
+ test yes = "$build_old_libs" && old_library=$libname.$libext
+ func_verbose "creating $output"
+
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+ fi
+ done
+ # Quote the link command for shipping.
+ relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+ relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
+ if test yes = "$hardcode_automatic"; then
+ relink_command=
+ fi
+
+ # Only create the output if not a dry run.
+ $opt_dry_run || {
+ for installed in no yes; do
+ if test yes = "$installed"; then
+ if test -z "$install_libdir"; then
+ break
+ fi
+ output=$output_objdir/${outputname}i
+ # Replace all uninstalled libtool libraries with the installed ones
+ newdependency_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ *.la)
+ func_basename "$deplib"
+ name=$func_basename_result
+ func_resolve_sysroot "$deplib"
+ eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
+ test -z "$libdir" && \
+ func_fatal_error "'$deplib' is not a valid libtool archive"
+ func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
+ ;;
+ -L*)
+ func_stripname -L '' "$deplib"
+ func_replace_sysroot "$func_stripname_result"
+ func_append newdependency_libs " -L$func_replace_sysroot_result"
+ ;;
+ -R*)
+ func_stripname -R '' "$deplib"
+ func_replace_sysroot "$func_stripname_result"
+ func_append newdependency_libs " -R$func_replace_sysroot_result"
+ ;;
+ *) func_append newdependency_libs " $deplib" ;;
+ esac
+ done
+ dependency_libs=$newdependency_libs
+ newdlfiles=
+
+ for lib in $dlfiles; do
+ case $lib in
+ *.la)
+ func_basename "$lib"
+ name=$func_basename_result
+ eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ test -z "$libdir" && \
+ func_fatal_error "'$lib' is not a valid libtool archive"
+ func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
+ ;;
+ *) func_append newdlfiles " $lib" ;;
+ esac
+ done
+ dlfiles=$newdlfiles
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ *.la)
+ # Only pass preopened files to the pseudo-archive (for
+ # eventual linking with the app. that links it) if we
+ # didn't already link the preopened objects directly into
+ # the library:
+ func_basename "$lib"
+ name=$func_basename_result
+ eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ test -z "$libdir" && \
+ func_fatal_error "'$lib' is not a valid libtool archive"
+ func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
+ ;;
+ esac
+ done
+ dlprefiles=$newdlprefiles
+ else
+ newdlfiles=
+ for lib in $dlfiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ func_append newdlfiles " $abs"
+ done
+ dlfiles=$newdlfiles
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ func_append newdlprefiles " $abs"
+ done
+ dlprefiles=$newdlprefiles
+ fi
+ $RM $output
+ # place dlname in correct position for cygwin
+ # In fact, it would be nice if we could use this code for all target
+ # systems that can't hard-code library paths into their executables
+ # and that have no shared library path variable independent of PATH,
+ # but it turns out we can't easily determine that from inspecting
+ # libtool variables, so we have to hard-code the OSs to which it
+ # applies here; at the moment, that means platforms that use the PE
+ # object format with DLL files. See the long comment at the top of
+ # tests/bindir.at for full details.
+ tdlname=$dlname
+ case $host,$output,$installed,$module,$dlname in
+ *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
+ # If a -bindir argument was supplied, place the dll there.
+ if test -n "$bindir"; then
+ func_relative_path "$install_libdir" "$bindir"
+ tdlname=$func_relative_path_result/$dlname
+ else
+ # Otherwise fall back on heuristic.
+ tdlname=../bin/$dlname
+ fi
+ ;;
+ esac
+ $ECHO > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM (GNU $PACKAGE) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$tdlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Linker flags that cannot go in dependency_libs.
+inherited_linker_flags='$new_inherited_linker_flags'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Names of additional weak libraries provided by this library
+weak_library_names='$weak_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=$installed
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+ if test no,yes = "$installed,$need_relink"; then
+ $ECHO >> $output "\
+relink_command=\"$relink_command\""
+ fi
+ done
+ }
+
+ # Do a symbolic link so that the libtool archive can be found in
+ # LD_LIBRARY_PATH before the program is installed.
+ func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
+ ;;
+ esac
+ exit $EXIT_SUCCESS
+}
+
+if test link = "$opt_mode" || test relink = "$opt_mode"; then
+ func_mode_link ${1+"$@"}
+fi
+
+
+# func_mode_uninstall arg...
+func_mode_uninstall ()
+{
+ $debug_cmd
+
+ RM=$nonopt
+ files=
+ rmforce=false
+ exit_status=0
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic=$magic
+
+ for arg
+ do
+ case $arg in
+ -f) func_append RM " $arg"; rmforce=: ;;
+ -*) func_append RM " $arg" ;;
+ *) func_append files " $arg" ;;
+ esac
+ done
+
+ test -z "$RM" && \
+ func_fatal_help "you must specify an RM program"
+
+ rmdirs=
+
+ for file in $files; do
+ func_dirname "$file" "" "."
+ dir=$func_dirname_result
+ if test . = "$dir"; then
+ odir=$objdir
+ else
+ odir=$dir/$objdir
+ fi
+ func_basename "$file"
+ name=$func_basename_result
+ test uninstall = "$opt_mode" && odir=$dir
+
+ # Remember odir for removal later, being careful to avoid duplicates
+ if test clean = "$opt_mode"; then
+ case " $rmdirs " in
+ *" $odir "*) ;;
+ *) func_append rmdirs " $odir" ;;
+ esac
+ fi
+
+ # Don't error if the file doesn't exist and rm -f was used.
+ if { test -L "$file"; } >/dev/null 2>&1 ||
+ { test -h "$file"; } >/dev/null 2>&1 ||
+ test -f "$file"; then
+ :
+ elif test -d "$file"; then
+ exit_status=1
+ continue
+ elif $rmforce; then
+ continue
+ fi
+
+ rmfiles=$file
+
+ case $name in
+ *.la)
+ # Possibly a libtool archive, so verify it.
+ if func_lalib_p "$file"; then
+ func_source $dir/$name
+
+ # Delete the libtool libraries and symlinks.
+ for n in $library_names; do
+ func_append rmfiles " $odir/$n"
+ done
+ test -n "$old_library" && func_append rmfiles " $odir/$old_library"
+
+ case $opt_mode in
+ clean)
+ case " $library_names " in
+ *" $dlname "*) ;;
+ *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;;
+ esac
+ test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i"
+ ;;
+ uninstall)
+ if test -n "$library_names"; then
+ # Do each command in the postuninstall commands.
+ func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1'
+ fi
+
+ if test -n "$old_library"; then
+ # Do each command in the old_postuninstall commands.
+ func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1'
+ fi
+ # FIXME: should reinstall the best remaining shared library.
+ ;;
+ esac
+ fi
+ ;;
+
+ *.lo)
+ # Possibly a libtool object, so verify it.
+ if func_lalib_p "$file"; then
+
+ # Read the .lo file
+ func_source $dir/$name
+
+ # Add PIC object to the list of files to remove.
+ if test -n "$pic_object" && test none != "$pic_object"; then
+ func_append rmfiles " $dir/$pic_object"
+ fi
+
+ # Add non-PIC object to the list of files to remove.
+ if test -n "$non_pic_object" && test none != "$non_pic_object"; then
+ func_append rmfiles " $dir/$non_pic_object"
+ fi
+ fi
+ ;;
+
+ *)
+ if test clean = "$opt_mode"; then
+ noexename=$name
+ case $file in
+ *.exe)
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ func_stripname '' '.exe' "$name"
+ noexename=$func_stripname_result
+ # $file with .exe has already been added to rmfiles,
+ # add $file without .exe
+ func_append rmfiles " $file"
+ ;;
+ esac
+ # Do a test to see if this is a libtool program.
+ if func_ltwrapper_p "$file"; then
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ relink_command=
+ func_source $func_ltwrapper_scriptname_result
+ func_append rmfiles " $func_ltwrapper_scriptname_result"
+ else
+ relink_command=
+ func_source $dir/$noexename
+ fi
+
+ # note $name still contains .exe if it was in $file originally
+ # as does the version of $file that was added into $rmfiles
+ func_append rmfiles " $odir/$name $odir/${name}S.$objext"
+ if test yes = "$fast_install" && test -n "$relink_command"; then
+ func_append rmfiles " $odir/lt-$name"
+ fi
+ if test "X$noexename" != "X$name"; then
+ func_append rmfiles " $odir/lt-$noexename.c"
+ fi
+ fi
+ fi
+ ;;
+ esac
+ func_show_eval "$RM $rmfiles" 'exit_status=1'
+ done
+
+ # Try to remove the $objdir's in the directories where we deleted files
+ for dir in $rmdirs; do
+ if test -d "$dir"; then
+ func_show_eval "rmdir $dir >/dev/null 2>&1"
+ fi
+ done
+
+ exit $exit_status
+}
+
+if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then
+ func_mode_uninstall ${1+"$@"}
+fi
+
+test -z "$opt_mode" && {
+ help=$generic_help
+ func_fatal_help "you must specify a MODE"
+}
+
+test -z "$exec_cmd" && \
+ func_fatal_help "invalid operation mode '$opt_mode'"
+
+if test -n "$exec_cmd"; then
+ eval exec "$exec_cmd"
+ exit $EXIT_FAILURE
+fi
+
+exit $exit_status
+
+
+# The TAGs below are defined such that we never get into a situation
+# where we disable both kinds of libraries. Given conflicting
+# choices, we go for a static library, that is the most portable,
+# since we can't tell whether shared libraries were disabled because
+# the user asked for that or because the platform doesn't support
+# them. This is particularly important on AIX, because we don't
+# support having both static and shared libraries enabled at the same
+# time on that platform, so we default to a shared-only configuration.
+# If a disable-shared tag is given, we'll fallback to a static-only
+# configuration. But we'll never go from static-only to shared-only.
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
+build_libtool_libs=no
+build_old_libs=yes
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+# ### END LIBTOOL TAG CONFIG: disable-static
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
diff --git a/m4/libtool.m4 b/m4/libtool.m4
new file mode 120000
index 0000000..fd138f6
--- /dev/null
+++ b/m4/libtool.m4
@@ -0,0 +1 @@
+/opt/local/share/aclocal/libtool.m4 \ No newline at end of file
diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4
new file mode 120000
index 0000000..c703e35
--- /dev/null
+++ b/m4/ltoptions.m4
@@ -0,0 +1 @@
+/opt/local/share/aclocal/ltoptions.m4 \ No newline at end of file
diff --git a/m4/ltsugar.m4 b/m4/ltsugar.m4
new file mode 120000
index 0000000..b13a2d6
--- /dev/null
+++ b/m4/ltsugar.m4
@@ -0,0 +1 @@
+/opt/local/share/aclocal/ltsugar.m4 \ No newline at end of file
diff --git a/m4/ltversion.m4 b/m4/ltversion.m4
new file mode 120000
index 0000000..9463860
--- /dev/null
+++ b/m4/ltversion.m4
@@ -0,0 +1 @@
+/opt/local/share/aclocal/ltversion.m4 \ No newline at end of file
diff --git a/m4/lt~obsolete.m4 b/m4/lt~obsolete.m4
new file mode 120000
index 0000000..7b1ec91
--- /dev/null
+++ b/m4/lt~obsolete.m4
@@ -0,0 +1 @@
+/opt/local/share/aclocal/lt~obsolete.m4 \ No newline at end of file
diff --git a/missing b/missing
new file mode 100755
index 0000000..f62bbae
--- /dev/null
+++ b/missing
@@ -0,0 +1,215 @@
+#! /bin/sh
+# Common wrapper for a few potentially missing GNU programs.
+
+scriptversion=2013-10-28.13; # UTC
+
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+ echo 1>&2 "Try '$0 --help' for more information"
+ exit 1
+fi
+
+case $1 in
+
+ --is-lightweight)
+ # Used by our autoconf macros to check whether the available missing
+ # script is modern enough.
+ exit 0
+ ;;
+
+ --run)
+ # Back-compat with the calling convention used by older automake.
+ shift
+ ;;
+
+ -h|--h|--he|--hel|--help)
+ echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
+to PROGRAM being missing or too old.
+
+Options:
+ -h, --help display this help and exit
+ -v, --version output version information and exit
+
+Supported PROGRAM values:
+ aclocal autoconf autoheader autom4te automake makeinfo
+ bison yacc flex lex help2man
+
+Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
+'g' are ignored when checking the name.
+
+Send bug reports to <bug-automake@gnu.org>."
+ exit $?
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing $scriptversion (GNU Automake)"
+ exit $?
+ ;;
+
+ -*)
+ echo 1>&2 "$0: unknown '$1' option"
+ echo 1>&2 "Try '$0 --help' for more information"
+ exit 1
+ ;;
+
+esac
+
+# Run the given program, remember its exit status.
+"$@"; st=$?
+
+# If it succeeded, we are done.
+test $st -eq 0 && exit 0
+
+# Also exit now if we it failed (or wasn't found), and '--version' was
+# passed; such an option is passed most likely to detect whether the
+# program is present and works.
+case $2 in --version|--help) exit $st;; esac
+
+# Exit code 63 means version mismatch. This often happens when the user
+# tries to use an ancient version of a tool on a file that requires a
+# minimum version.
+if test $st -eq 63; then
+ msg="probably too old"
+elif test $st -eq 127; then
+ # Program was missing.
+ msg="missing on your system"
+else
+ # Program was found and executed, but failed. Give up.
+ exit $st
+fi
+
+perl_URL=http://www.perl.org/
+flex_URL=http://flex.sourceforge.net/
+gnu_software_URL=http://www.gnu.org/software
+
+program_details ()
+{
+ case $1 in
+ aclocal|automake)
+ echo "The '$1' program is part of the GNU Automake package:"
+ echo "<$gnu_software_URL/automake>"
+ echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/autoconf>"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ autoconf|autom4te|autoheader)
+ echo "The '$1' program is part of the GNU Autoconf package:"
+ echo "<$gnu_software_URL/autoconf/>"
+ echo "It also requires GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ esac
+}
+
+give_advice ()
+{
+ # Normalize program name to check for.
+ normalized_program=`echo "$1" | sed '
+ s/^gnu-//; t
+ s/^gnu//; t
+ s/^g//; t'`
+
+ printf '%s\n' "'$1' is $msg."
+
+ configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
+ case $normalized_program in
+ autoconf*)
+ echo "You should only need it if you modified 'configure.ac',"
+ echo "or m4 files included by it."
+ program_details 'autoconf'
+ ;;
+ autoheader*)
+ echo "You should only need it if you modified 'acconfig.h' or"
+ echo "$configure_deps."
+ program_details 'autoheader'
+ ;;
+ automake*)
+ echo "You should only need it if you modified 'Makefile.am' or"
+ echo "$configure_deps."
+ program_details 'automake'
+ ;;
+ aclocal*)
+ echo "You should only need it if you modified 'acinclude.m4' or"
+ echo "$configure_deps."
+ program_details 'aclocal'
+ ;;
+ autom4te*)
+ echo "You might have modified some maintainer files that require"
+ echo "the 'autom4te' program to be rebuilt."
+ program_details 'autom4te'
+ ;;
+ bison*|yacc*)
+ echo "You should only need it if you modified a '.y' file."
+ echo "You may want to install the GNU Bison package:"
+ echo "<$gnu_software_URL/bison/>"
+ ;;
+ lex*|flex*)
+ echo "You should only need it if you modified a '.l' file."
+ echo "You may want to install the Fast Lexical Analyzer package:"
+ echo "<$flex_URL>"
+ ;;
+ help2man*)
+ echo "You should only need it if you modified a dependency" \
+ "of a man page."
+ echo "You may want to install the GNU Help2man package:"
+ echo "<$gnu_software_URL/help2man/>"
+ ;;
+ makeinfo*)
+ echo "You should only need it if you modified a '.texi' file, or"
+ echo "any other file indirectly affecting the aspect of the manual."
+ echo "You might want to install the Texinfo package:"
+ echo "<$gnu_software_URL/texinfo/>"
+ echo "The spurious makeinfo call might also be the consequence of"
+ echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
+ echo "want to install GNU make:"
+ echo "<$gnu_software_URL/make/>"
+ ;;
+ *)
+ echo "You might have modified some files without having the proper"
+ echo "tools for further handling them. Check the 'README' file, it"
+ echo "often tells you about the needed prerequisites for installing"
+ echo "this package. You may also peek at any GNU archive site, in"
+ echo "case some other package contains this missing '$1' program."
+ ;;
+ esac
+}
+
+give_advice "$1" | sed -e '1s/^/WARNING: /' \
+ -e '2,$s/^/ /' >&2
+
+# Propagate the correct exit status (expected to be 127 for a program
+# not found, 63 for a program that failed due to version mismatch).
+exit $st
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/parmfiles/bchr1a003.fit b/parmfiles/bchr1a003.fit
new file mode 100644
index 0000000..7f21089
--- /dev/null
+++ b/parmfiles/bchr1a003.fit
Binary files differ
diff --git a/parmfiles/bchr1b003.fit b/parmfiles/bchr1b003.fit
new file mode 100644
index 0000000..a9427a7
--- /dev/null
+++ b/parmfiles/bchr1b003.fit
Binary files differ
diff --git a/parmfiles/bchr2a003.fit b/parmfiles/bchr2a003.fit
new file mode 100644
index 0000000..7ded2f4
--- /dev/null
+++ b/parmfiles/bchr2a003.fit
Binary files differ
diff --git a/parmfiles/bchr2b003.fit b/parmfiles/bchr2b003.fit
new file mode 100644
index 0000000..0f003b8
--- /dev/null
+++ b/parmfiles/bchr2b003.fit
Binary files differ
diff --git a/parmfiles/master_calib_file.dat b/parmfiles/master_calib_file.dat
new file mode 100644
index 0000000..6f67b95
--- /dev/null
+++ b/parmfiles/master_calib_file.dat
@@ -0,0 +1,453 @@
+# This is an example of the master calibration database file that
+# lists the valid dates of each calibration file.
+# This file is read by cf_fuv_init.
+# Though it is not strictly required by cf_fuv_init, this file
+# should be kept in time order.
+# There should be no blank lines in this file.
+# Reminder:
+# interp flag of 0 => stepwise
+# interp flag of 1 => interpolate
+#
+# The items must appear in the following columns:
+# Columns Item
+# 1- 4 Keyword name
+# 5- 6 Blank
+# 7 Detector number (or blank)
+# 8 Detector segment (or blank)
+# 9-10 Blank
+# 11-23 Filename
+# 24-25 Blank
+# 26-34 Modified Julian Date
+# 35-36 Blank
+# 37 Interpolation method
+#
+# 03/15/2001 wvd Change ASTG files to version 5
+# 03/19/2001 wvd Change SCRN files to version 4
+# 03/27/2001 wvd Change BKGD files to version 2
+# Change SCRN files to version 5
+# Add AIRG files
+# 03/28/2001 wvd Change WGTS files to version 7
+# 03/29/2001 wvd Change PARM files to version 5
+# 04/02/2001 wvd Add WALK files
+# 04/09/2001 wvd Change WAVE files to version 10
+# Change QUAL files to version 2
+# 04/10/2001 wvd Add PHAM files
+# Change WGTS files to version 8
+# 04/11/2001 wvd Add multiple PHAM files
+# 04/17/2001 wvd Change WGTS files to version 9
+# 04/24/2001 wvd Change WALK files to version 2
+# 05/23/2001 wvd Delete DRFT files; not used
+# 06/12/2001 wvd Change ASTG files to version 6
+# 07/03/2001 wvd Delete AIRG files; not used
+# Change BKGD files to versions 3&4
+# Change SCRN files to version 7
+# 07/25/2001 wvd Change PHAM files to versions 72-84
+# Change SCRN files to version 8
+# 07/26/2001 wvd Change WAVE files to version 11
+# Change FLUX files to version 7
+# 08/15/2001 wvd Added GAIN files versions 17-22
+# Added TCNT files version 10
+# 08/23/2001 wvd Change PARM files to version 6
+# 08/30/2001 wvd Change WAVE files to version 12
+# 09/12/2001 wvd Change WALK files to version 3
+# 09/13/2001 wvd Change WAVE files to version 13
+# 09/14/2001 wvd Change SCRN files to version 9
+# 09/21/2001 wvd Change SCRN files to version 10
+# 10/02/2001 wvd Change WAVE files to version 14
+# 10/10/2001 wvd Change FLUX files to version 8
+# 11/20/2001 wvd Added QUAL files versions 3-10
+# 11/27/2001 wvd Change SCRN files to version 11
+# 11/29/2001 wvd Change PARM files to version 7
+# 12/07/2001 wvd Add YSTR files
+# 02/11/2002 wvd Add VOLT files
+# 02/19/2002 wvd Change VOLT files to version 2
+# 03/29/2002 wvd Added BKGD files versions 5-8
+# Change SCRN files to version 12
+# 04/02/2002 wvd Added BCHR files
+# 04/10/2002 wvd Change SCRN files to version 13
+# 04/15/2002 wvd Change PARM files to version 8
+# Remove SPEX files version 1
+# 05/02/2002 wvd Change VOLT files to version 3
+# 05/17/2002 wvd Change WAVE files to version 15
+# 05/29/2002 wvd Change GEOM files to version 8
+# Change QUAL files to versions 11-19
+# Change YSTR files to version 2
+# 06/12/2002 wvd Added BKGD files version 9
+# 18/12/2002 rdr added AIRG files
+# change BCHR files
+# 01/14/2003 wvd Change VOLT files to version 5
+# 01/17/2003 wvd Change WAVE files to version 14
+# Added DIGI file version 1
+# Added SPEC file version 1
+# 02/07/2003 wvd Added FLUX files versions 9-13
+# 02/11/2003 wvd Change VOLT files to version 6
+# 02/13/2003 wvd Replace FLUX files with AEFF files
+# 02/14/2003 wvd Change effective date of aeff*008.fit files
+# to 51403, which was HV first turned on.
+# 02/25/2003 wvd Change PARM files to version 10
+# 02/28/2003 wvd Added AEFF files versions 8-13
+# 03/07/2003 peb Change GEOM files to version 12
+# 03/25/2003 wvd Change CHID files to version 10
+# for SIDE 2 ONLY!!!
+# 04/07/2003 wvd Change ASTG files to version 7
+# for SIDE 2 ONLY!!!
+# 04/09/2003 rdr Added QUAL files to CalFUSE v3.0
+# 06/17/2003 wvd Change AIRG files to version 2
+# 06/25/2003 djs Change GEOM files to version 13 for 1B only
+# 07/09/2003 rdr Change all GEOM files to version 13
+# 07/23/2003 rdr Change all CHID files to version 11
+# 07/31/2003 wvd Change ELEC file to version 2
+# 08/19/2003 wvd Added AEFF files versions 14-15
+# 08/20/2003 wvd Change ELEC file to version 3
+# 08/20/2003 wvd Change VOLT files to version 7
+# 08/21/2003 wvd Change SPEC file to version 2
+# 08/27/2003 wvd Change SAAC file to version 4
+# 09/05/2003 wvd Change BCHR file to version 3
+# Change BKGD files to versions 11-16
+# 09/10/2003 djs Change ASTG files to version 8
+# 09/17/2003 wvd Change ASTG files to version 9
+# 09/22/2003 wvd Change WAVE files to version 15
+# 10/02/2003 wvd Change WGTS files to version 10
+# 10/10/2003 rdr Change QUAL files to version 20
+# 10/14/2003 wvd Change PHAX files to version 4
+# 02/09/2004 wvd Change ELEC file to version 4
+# 02/20/2004 rdr Change CHID files to version 12
+# 03/03/2004 rdr Change WGTS files to version 11
+# 03/26/2004 rdr Change GEOM files to version 14
+# 03/30/2004 wvd Change WAVE files to version 16
+# 04/21/2003 rdr Added BKGD files version 17
+# 04/27/2004 wvd Change PARM files to version 11
+# 06/08/2004 wvd Change PHAX files to version 5
+# Change ASTG files to version 10
+# 07/02/2004 wvd Added AEFF files versions 16-21
+# 07/07/2004 rdr Change MIRR file to version 2
+# 07/28/2004 wvd Change VOLT files to version 8
+# 08/11/2004 wvd Change GEOM files to version 15
+# 08/11/2004 wvd Change WAVE files to version 17
+# 08/20/2004 wvd Change SCRN files to version 14
+# 08/24/2004 wvd Change GEOM files to version 16
+# 10/21/2004 wvd Change PARM files to version 12
+# 01/21/2005 wvd Change ASTG files to version 11
+# 02/22/2005 wvd Change WAVE files to version 18
+# 03/02/2005 wvd Added PHAH files
+# Added STIM files
+# 03/10/2005 wvd Change AIRG files to version 03
+# Change MJD of initial AEFF_CAL
+# file to 50000.
+# 03/14/2005 wvd Change CHID files to version 13
+# 03/16/2005 wvd Added BKGD files version 18
+# 03/24/2005 wvd Change VOLT files to version 9
+# 04/07/2005 wvd Change SCRN files to version 15
+# 06/01/2005 wvd Change WAVE files to version 19
+# 06/13/2005 wvd Change AEFF files to versions 100-119
+# 06/22/2005 wvd Change WAVE files to version 20
+# 07/06/2005 wvd Change PARM files to version 13
+# 07/19/2005 wvd Change GRAT file to version 02
+# 09/07/2005 wvd Change WAVE files to version 21
+# 02/22/2006 wvd Change WAVE files to version 22
+# 05/11/2006 wvd Add AEFF files version 120
+# 05/23/2006 wvd Change AIRG files to version 04
+# 06/14/2006 wvd Change PARM files to version 14
+# 07/06/2006 wvd Change GRAT file to version 03
+# 10/24/2006 wvd Change PARM files to version 15
+# 11/02/2006 wvd Add TMXY files
+# 11/22/2006 wvd Change TMXY files to version 001
+# 11/28/2006 wvd Change GRAT file to version 04
+# 12/29/2006 wvd Change ELEC file to version 05
+# 01/19/2007 wvd Change TMXY files to version 002
+# 01/24/2007 wvd Change GRAT file to version 05
+# 02/16/2007 wvd Add AEFF files version 121
+# 03/02/2007 wvd Change WAVE files to version 23
+# 04/06/2007 wvd Change CHID files to version 14
+# 08/15/2007 wvd Add AEFF files version 122
+# 09/12/2007 wvd Add BKGD files version 019
+# 09/17/2007 wvd Change use-after date for bkgd 019
+# 02/08/2008 wvd Change PHAH files to version 02
+# Change STIM files to version 02
+# 03/07/2008 wvd Change PHAX files to version 06
+#
+# 1 2 3 4
+#234567890123456789012345678901234567890
+#
+# Use after Interp
+#Key Seg Filename MJD method
+#
+AIRG 1A airg1a004.fit 50000.000 0
+#
+AIRG 1B airg1b004.fit 50000.000 0
+#
+AIRG 2A airg2a004.fit 50000.000 0
+#
+AIRG 2B airg2b004.fit 50000.000 0
+#
+BKGD 1A bkgd1a011.fit 50000.000 0
+BKGD 1A bkgd1a012.fit 51911.000 0
+BKGD 1A bkgd1a013.fit 52120.000 0
+BKGD 1A bkgd1a014.fit 52202.000 0
+BKGD 1A bkgd1a015.fit 52324.000 0
+BKGD 1A bkgd1a016.fit 52426.000 0
+BKGD 1A bkgd1a017.fit 52845.000 0
+BKGD 1A bkgd1a018.fit 53118.000 0
+BKGD 1A bkgd1a019.fit 53371.500 0
+#
+BKGD 1B bkgd1b011.fit 50000.000 0
+BKGD 1B bkgd1b012.fit 51911.000 0
+BKGD 1B bkgd1b013.fit 52120.000 0
+BKGD 1B bkgd1b014.fit 52202.000 0
+BKGD 1B bkgd1b015.fit 52324.000 0
+BKGD 1B bkgd1b016.fit 52426.000 0
+BKGD 1B bkgd1b017.fit 52845.000 0
+BKGD 1B bkgd1b018.fit 53118.000 0
+BKGD 1B bkgd1b019.fit 53371.500 0
+#
+BKGD 2A bkgd2a011.fit 50000.000 0
+BKGD 2A bkgd2a012.fit 51911.000 0
+BKGD 2A bkgd2a013.fit 52120.000 0
+BKGD 2A bkgd2a014.fit 52202.000 0
+BKGD 2A bkgd2a015.fit 52324.000 0
+BKGD 2A bkgd2a016.fit 52426.000 0
+BKGD 2A bkgd2a017.fit 52845.000 0
+BKGD 2A bkgd2a018.fit 53118.000 0
+BKGD 2A bkgd2a019.fit 53371.500 0
+#
+BKGD 2B bkgd2b011.fit 50000.000 0
+BKGD 2B bkgd2b012.fit 51911.000 0
+BKGD 2B bkgd2b013.fit 52120.000 0
+BKGD 2B bkgd2b014.fit 52202.000 0
+BKGD 2B bkgd2b015.fit 52324.000 0
+BKGD 2B bkgd2b016.fit 52426.000 0
+BKGD 2B bkgd2b017.fit 52845.000 0
+BKGD 2B bkgd2b018.fit 53118.000 0
+BKGD 2B bkgd2b019.fit 53371.500 0
+#
+DIGI digi001.fit 50000.000 0
+#
+ELEC elec005.fit 50000.000 0
+#
+RATE 1A rate1a002.fit 50000.000 0
+#
+RATE 1B rate1b002.fit 50000.000 0
+#
+RATE 2A rate2a002.fit 50000.000 0
+#
+RATE 2B rate2b002.fit 50000.000 0
+#
+TMXY 1A tmxy1a002.fit 50000.000 0
+#
+TMXY 1B tmxy1b002.fit 50000.000 0
+#
+TMXY 2A tmxy2a002.fit 50000.000 0
+#
+TMXY 2B tmxy2b002.fit 50000.000 0
+#
+GEOM 1A geom1a016.fit 50000.000 0
+#
+GEOM 1B geom1b016.fit 50000.000 0
+#
+GEOM 2A geom2a016.fit 50000.000 0
+#
+GEOM 2B geom2b016.fit 50000.000 0
+#
+PHAX 1A phax1a006.fit 50000.000 0
+#
+PHAX 1B phax1b006.fit 50000.000 0
+#
+PHAX 2A phax2a006.fit 50000.000 0
+#
+PHAX 2B phax2b006.fit 50000.000 0
+#
+CHID 1A chid1a014.fit 50000.000 0
+#
+CHID 1B chid1b014.fit 50000.000 0
+#
+CHID 2A chid2a014.fit 50000.000 0
+#
+CHID 2B chid2b014.fit 50000.000 0
+#
+GRAT grat005.fit 50000.000 0
+#
+WAVE 1A wave1a023.fit 50000.000 0
+#
+WAVE 1B wave1b023.fit 50000.000 0
+#
+WAVE 2A wave2a023.fit 50000.000 0
+#
+WAVE 2B wave2b023.fit 50000.000 0
+#
+MIRR mirr002.fit 50000.000 0
+#
+ASTG 1A astg1a011.fit 50000.000 0
+#
+ASTG 1B astg1b011.fit 50000.000 0
+#
+ASTG 2A astg2a011.fit 50000.000 0
+#
+ASTG 2B astg2b011.fit 50000.000 0
+#
+VOLT 1A volt1a009.fit 50000.000 0
+#
+VOLT 1B volt1b009.fit 50000.000 0
+#
+VOLT 2A volt2a009.fit 50000.000 0
+#
+VOLT 2B volt2b009.fit 50000.000 0
+#
+BCHR 1A bchr1a003.fit 50000.000 0
+#
+BCHR 1B bchr1b003.fit 50000.000 0
+#
+BCHR 2A bchr2a003.fit 50000.000 0
+#
+BCHR 2B bchr2b003.fit 50000.000 0
+#
+PARM 1A parm1a015.fit 50000.000 0
+#
+PARM 1B parm1b015.fit 50000.000 0
+#
+PARM 2A parm2a015.fit 50000.000 0
+#
+PARM 2B parm2b015.fit 50000.000 0
+#
+PHAH 1A phah1a002.fit 50000.000 0
+#
+PHAH 1B phah1b002.fit 50000.000 0
+#
+PHAH 2A phah2a002.fit 50000.000 0
+#
+PHAH 2B phah2b002.fit 50000.000 0
+#
+SAAC saac004.fit 50000.000 0
+#
+SCRN 1A scrn1a015.fit 50000.000 0
+#
+SCRN 1B scrn1b015.fit 50000.000 0
+#
+SCRN 2A scrn2a015.fit 50000.000 0
+#
+SCRN 2B scrn2b015.fit 50000.000 0
+#
+SPEC spec002.fit 50000.000 0
+#
+STIM 1A stim1a002.fit 50000.000 0
+#
+STIM 1B stim1b002.fit 50000.000 0
+#
+STIM 2A stim2a002.fit 50000.000 0
+#
+STIM 2B stim2b002.fit 50000.000 0
+#
+QUAL 1A qual1a020.fit 50000.000 0
+#
+QUAL 1B qual1b020.fit 50000.000 0
+#
+QUAL 2A qual2a020.fit 50000.000 0
+#
+QUAL 2B qual2b020.fit 50000.000 0
+#
+WGTS 1A wgts1a011.fit 50000.000 0
+#
+WGTS 1B wgts1b011.fit 50000.000 0
+#
+WGTS 2A wgts2a011.fit 50000.000 0
+#
+WGTS 2B wgts2b011.fit 50000.000 0
+#
+AEFF 1A aeff1a100.fit 50000.000 1
+AEFF 1A aeff1a100.fit 51543.000 1
+AEFF 1A aeff1a101.fit 51634.000 1
+AEFF 1A aeff1a102.fit 51725.000 1
+AEFF 1A aeff1a103.fit 51817.000 1
+AEFF 1A aeff1a104.fit 51909.000 1
+AEFF 1A aeff1a105.fit 51999.000 1
+AEFF 1A aeff1a106.fit 52090.000 1
+AEFF 1A aeff1a107.fit 52182.000 1
+AEFF 1A aeff1a108.fit 52274.000 1
+AEFF 1A aeff1a109.fit 52364.000 1
+AEFF 1A aeff1a110.fit 52455.000 1
+AEFF 1A aeff1a111.fit 52547.000 1
+AEFF 1A aeff1a112.fit 52639.000 1
+AEFF 1A aeff1a113.fit 52729.000 1
+AEFF 1A aeff1a114.fit 52820.000 1
+AEFF 1A aeff1a115.fit 52912.000 1
+AEFF 1A aeff1a116.fit 53004.000 1
+AEFF 1A aeff1a117.fit 53095.000 1
+AEFF 1A aeff1a118.fit 53186.000 1
+AEFF 1A aeff1a119.fit 53278.000 1
+AEFF 1A aeff1a120.fit 53818.000 1
+AEFF 1A aeff1a121.fit 54046.800 1
+AEFF 1A aeff1a122.fit 54179.800 1
+#
+AEFF 1B aeff1b100.fit 50000.000 1
+AEFF 1B aeff1b100.fit 51543.000 1
+AEFF 1B aeff1b101.fit 51634.000 1
+AEFF 1B aeff1b102.fit 51725.000 1
+AEFF 1B aeff1b103.fit 51817.000 1
+AEFF 1B aeff1b104.fit 51909.000 1
+AEFF 1B aeff1b105.fit 51999.000 1
+AEFF 1B aeff1b106.fit 52090.000 1
+AEFF 1B aeff1b107.fit 52182.000 1
+AEFF 1B aeff1b108.fit 52274.000 1
+AEFF 1B aeff1b109.fit 52364.000 1
+AEFF 1B aeff1b110.fit 52455.000 1
+AEFF 1B aeff1b111.fit 52547.000 1
+AEFF 1B aeff1b112.fit 52639.000 1
+AEFF 1B aeff1b113.fit 52729.000 1
+AEFF 1B aeff1b114.fit 52820.000 1
+AEFF 1B aeff1b115.fit 52912.000 1
+AEFF 1B aeff1b116.fit 53004.000 1
+AEFF 1B aeff1b117.fit 53095.000 1
+AEFF 1B aeff1b118.fit 53186.000 1
+AEFF 1B aeff1b119.fit 53278.000 1
+AEFF 1B aeff1b120.fit 53818.000 1
+AEFF 1B aeff1b121.fit 54046.800 1
+AEFF 1B aeff1b122.fit 54179.800 1
+#
+AEFF 2A aeff2a100.fit 50000.000 1
+AEFF 2A aeff2a100.fit 51543.000 1
+AEFF 2A aeff2a101.fit 51634.000 1
+AEFF 2A aeff2a102.fit 51725.000 1
+AEFF 2A aeff2a103.fit 51817.000 1
+AEFF 2A aeff2a104.fit 51909.000 1
+AEFF 2A aeff2a105.fit 51999.000 1
+AEFF 2A aeff2a106.fit 52090.000 1
+AEFF 2A aeff2a107.fit 52182.000 1
+AEFF 2A aeff2a108.fit 52274.000 1
+AEFF 2A aeff2a109.fit 52364.000 1
+AEFF 2A aeff2a110.fit 52455.000 1
+AEFF 2A aeff2a111.fit 52547.000 1
+AEFF 2A aeff2a112.fit 52639.000 1
+AEFF 2A aeff2a113.fit 52729.000 1
+AEFF 2A aeff2a114.fit 52820.000 1
+AEFF 2A aeff2a115.fit 52912.000 1
+AEFF 2A aeff2a116.fit 53004.000 1
+AEFF 2A aeff2a117.fit 53095.000 1
+AEFF 2A aeff2a118.fit 53186.000 1
+AEFF 2A aeff2a119.fit 53278.000 1
+AEFF 2A aeff2a120.fit 53818.000 1
+AEFF 2A aeff2a121.fit 54046.800 1
+AEFF 2A aeff2a122.fit 54179.800 1
+#
+AEFF 2B aeff2b100.fit 50000.000 1
+AEFF 2B aeff2b100.fit 51543.000 1
+AEFF 2B aeff2b101.fit 51634.000 1
+AEFF 2B aeff2b102.fit 51725.000 1
+AEFF 2B aeff2b103.fit 51817.000 1
+AEFF 2B aeff2b104.fit 51909.000 1
+AEFF 2B aeff2b105.fit 51999.000 1
+AEFF 2B aeff2b106.fit 52090.000 1
+AEFF 2B aeff2b107.fit 52182.000 1
+AEFF 2B aeff2b108.fit 52274.000 1
+AEFF 2B aeff2b109.fit 52364.000 1
+AEFF 2B aeff2b110.fit 52455.000 1
+AEFF 2B aeff2b111.fit 52547.000 1
+AEFF 2B aeff2b112.fit 52639.000 1
+AEFF 2B aeff2b113.fit 52729.000 1
+AEFF 2B aeff2b114.fit 52820.000 1
+AEFF 2B aeff2b115.fit 52912.000 1
+AEFF 2B aeff2b116.fit 53004.000 1
+AEFF 2B aeff2b117.fit 53095.000 1
+AEFF 2B aeff2b118.fit 53186.000 1
+AEFF 2B aeff2b119.fit 53278.000 1
+AEFF 2B aeff2b120.fit 53818.000 1
+AEFF 2B aeff2b121.fit 54046.800 1
+AEFF 2B aeff2b122.fit 54179.800 1
diff --git a/parmfiles/parm1a015.fit b/parmfiles/parm1a015.fit
new file mode 100644
index 0000000..5f63130
--- /dev/null
+++ b/parmfiles/parm1a015.fit
@@ -0,0 +1 @@
+SIMPLE = T / Fits standard BITPIX = 16 / Bits per pixel NAXIS = 0 / Number of axes EXTEND = T / File may contain extensions COMMENT FITS (Flexible Image Transport System) format defined in Astronomy andCOMMENT Astrophysics Supplement Series v44/p363, v44/p371, v73/p359, v73/p365.COMMENT Contact the NASA Science Office of Standards and Technology for the COMMENT FITS Definition document #100 and other FITS information. CALFTYPE= 'PARM ' / Calibration file type CALFVERS= 15 / Calibration file version DETECTOR= '1A ' / detector (1A, 1B, 2A, 2B) EFFMJD = 50000. / Date on which file should be applied (MJD) DATE = '2006-11-30T17:33:00' COMMENT COMMENT The SPEX_SIC and SPEX_LIF keywords allow the user to center the extracCOMMENT tion windows along a given row rather than having the pipeline try to COMMENT centroid the spectrum. A number less than 0 or greater than 1023 willCOMMENT default to pipeline centroiding. A value between 0 and 1023 will defCOMMENT ine the center of the extraction window. Since the pipeline expands hCOMMENT istogram images out to 1023 pixels in Y, the number must be given for COMMENT a full 1023 image height. That is, if the center is determined from bCOMMENT inned images, the center must be multiplied by the binning factor befoCOMMENT re entering it in this file. COMMENT SPEX_SIC= -1 / SiC extraction window Y center (0-1023) SPEX_LIF= -1 / LiF extraction window Y center (0-1023) COMMENT COMMENT The EMAX_SIC and EMAX_LIF keywords allow the user to limit the amount COMMENT that the pipeline can shift the extraction windows based on the centroCOMMENT id of the spectrum. In cases where the source is very faint, the centCOMMENT roid routine may find bright detector artifacts or other apertures insCOMMENT tead of the desired aperture. If the calculated centroid differs fromCOMMENT the predicted centroid by more than EMAX_SIC or EMAX_LIF, the pipelinCOMMENT e uses the default extraction window location. COMMENT EMAX_SIC= 40 / SiC extraction window maximum Y movement EMAX_LIF= 40 / LiF extraction window maximum Y movement COMMENT COMMENT The following keywords allow the user to skip various COMMENT steps of the pipeline. Change value from 'YES' to 'NO' COMMENT to skip the corresponding step. COMMENT RUN_PHAX= 'YES' / PHA X correction RUN_BRST= 'YES' / Burst rejection RUN_JITR= 'YES' / Jitter correction RUN_ASTG= 'YES' / Astigmatism correction RUN_BKGD= 'YES' / Background subtraction RUN_OPTI= 'YES' / Optimal extraction COMMENT COMMENT These keywords control the jitter-screening routine. Only tabulated COMMENT pointing errors with quality flags greater than TRKFLG are considered.COMMENT Times when the pointing errors exceed the allowed limits are flagged COMMENT as bad. Limits are applied to both the LiF and SiC channels. COMMENT TRKFLG = 1 / Minimum trustworthy value of TRKFLG DX_MAX = 30 / [arcsec] Allowed pointing error DY_MAX = 30 / [arcsec] Allowed pointing error COMMENT COMMENT These keywords allow the user to specify the range and bin size of COMMENT the output wavelength array. If not set, default values are used. COMMENT LIF_W0 = / [A] Requested initial wavelength LIF_WMAX= / [A] Requested final wavelength LIF_WPC = / [A] Requested wavelength per channel SIC_W0 = / [A] Requested initial wavelength SIC_WMAX= / [A] Requested final wavelength SIC_WPC = / [A] Requested wavelength per channel END \ No newline at end of file
diff --git a/parmfiles/parm1b015.fit b/parmfiles/parm1b015.fit
new file mode 100644
index 0000000..8f8b8fb
--- /dev/null
+++ b/parmfiles/parm1b015.fit
@@ -0,0 +1 @@
+SIMPLE = T / Fits standard BITPIX = 16 / Bits per pixel NAXIS = 0 / Number of axes EXTEND = T / File may contain extensions COMMENT FITS (Flexible Image Transport System) format defined in Astronomy andCOMMENT Astrophysics Supplement Series v44/p363, v44/p371, v73/p359, v73/p365.COMMENT Contact the NASA Science Office of Standards and Technology for the COMMENT FITS Definition document #100 and other FITS information. CALFTYPE= 'PARM ' / Calibration file type CALFVERS= 15 / Calibration file version DETECTOR= '1B ' / detector (1A, 1B, 2A, 2B) EFFMJD = 50000. / Date on which file should be applied (MJD) DATE = '2006-11-30T17:33:00' COMMENT COMMENT The SPEX_SIC and SPEX_LIF keywords allow the user to center the extracCOMMENT tion windows along a given row rather than having the pipeline try to COMMENT centroid the spectrum. A number less than 0 or greater than 1023 willCOMMENT default to pipeline centroiding. A value between 0 and 1023 will defCOMMENT ine the center of the extraction window. Since the pipeline expands hCOMMENT istogram images out to 1023 pixels in Y, the number must be given for COMMENT a full 1023 image height. That is, if the center is determined from bCOMMENT inned images, the center must be multiplied by the binning factor befoCOMMENT re entering it in this file. COMMENT SPEX_SIC= -1 / SiC extraction window Y center (0-1023) SPEX_LIF= -1 / LiF extraction window Y center (0-1023) COMMENT COMMENT The EMAX_SIC and EMAX_LIF keywords allow the user to limit the amount COMMENT that the pipeline can shift the extraction windows based on the centroCOMMENT id of the spectrum. In cases where the source is very faint, the centCOMMENT roid routine may find bright detector artifacts or other apertures insCOMMENT tead of the desired aperture. If the calculated centroid differs fromCOMMENT the predicted centroid by more than EMAX_SIC or EMAX_LIF, the pipelinCOMMENT e uses the default extraction window location. COMMENT EMAX_SIC= 40 / SiC extraction window maximum Y movement EMAX_LIF= 40 / LiF extraction window maximum Y movement COMMENT COMMENT The following keywords allow the user to skip various COMMENT steps of the pipeline. Change value from 'YES' to 'NO' COMMENT to skip the corresponding st COMMENT RUN_PHAX= 'YES' / PHA X correction RUN_BRST= 'YES' / Burst rejection RUN_JITR= 'YES' / Jitter correction RUN_ASTG= 'YES' / Astigmatism correction RUN_BKGD= 'YES' / Background subtraction RUN_OPTI= 'YES' / Optimal extraction COMMENT COMMENT These keywords control the jitter-screening routine. Only tabulated COMMENT pointing errors with quality flags greater than TRKFLG are considered.COMMENT Times when the pointing errors exceed the allowed limits are flagged COMMENT as bad. Limits are applied to both the LiF and SiC channels. COMMENT TRKFLG = 1 / Minimum trustworthy value of TRKFLG DX_MAX = 30 / [arcsec] Allowed pointing error DY_MAX = 30 / [arcsec] Allowed pointing error COMMENT COMMENT These keywords allow the user to specify the range and bin size of COMMENT the output wavelength array. If not set, default values are used. COMMENT LIF_W0 = / [A] Requested initial wavelength LIF_WMAX= / [A] Requested final wavelength LIF_WPC = / [A] Requested wavelength per channel SIC_W0 = / [A] Requested initial wavelength SIC_WMAX= / [A] Requested final wavelength SIC_WPC = / [A] Requested wavelength per channel END \ No newline at end of file
diff --git a/parmfiles/parm2a015.fit b/parmfiles/parm2a015.fit
new file mode 100644
index 0000000..95e96d6
--- /dev/null
+++ b/parmfiles/parm2a015.fit
@@ -0,0 +1 @@
+SIMPLE = T / Fits standard BITPIX = 16 / Bits per pixel NAXIS = 0 / Number of axes EXTEND = T / File may contain extensions COMMENT FITS (Flexible Image Transport System) format defined in Astronomy andCOMMENT Astrophysics Supplement Series v44/p363, v44/p371, v73/p359, v73/p365.COMMENT Contact the NASA Science Office of Standards and Technology for the COMMENT FITS Definition document #100 and other FITS information. CALFTYPE= 'PARM ' / Calibration file type CALFVERS= 15 / Calibration file version DETECTOR= '2A ' / detector (1A, 1B, 2A, 2B) EFFMJD = 50000. / Date on which file should be applied (MJD) DATE = '2006-11-30T17:33:00' COMMENT COMMENT The SPEX_SIC and SPEX_LIF keywords allow the user to center the extracCOMMENT tion windows along a given row rather than having the pipeline try to COMMENT centroid the spectrum. A number less than 0 or greater than 1023 willCOMMENT default to pipeline centroiding. A value between 0 and 1023 will defCOMMENT ine the center of the extraction window. Since the pipeline expands hCOMMENT istogram images out to 1023 pixels in Y, the number must be given for COMMENT a full 1023 image height. That is, if the center is determined from bCOMMENT inned images, the center must be multiplied by the binning factor befoCOMMENT re entering it in this file. COMMENT SPEX_SIC= -1 / SiC extraction window Y center (0-1023) SPEX_LIF= -1 / LiF extraction window Y center (0-1023) COMMENT COMMENT The EMAX_SIC and EMAX_LIF keywords allow the user to limit the amount COMMENT that the pipeline can shift the extraction windows based on the centroCOMMENT id of the spectrum. In cases where the source is very faint, the centCOMMENT roid routine may find bright detector artifacts or other apertures insCOMMENT tead of the desired aperture. If the calculated centroid differs fromCOMMENT the predicted centroid by more than EMAX_SIC or EMAX_LIF, the pipelinCOMMENT e uses the default extraction window location. COMMENT EMAX_SIC= 40 / SiC extraction window maximum Y movement EMAX_LIF= 40 / LiF extraction window maximum Y movement COMMENT COMMENT The following keywords allow the user to skip various COMMENT steps of the pipeline. Change value from 'YES' to 'NO' COMMENT to skip the corresponding step. COMMENT RUN_PHAX= 'YES' / PHA X correction RUN_BRST= 'YES' / Burst rejection RUN_JITR= 'YES' / Jitter correction RUN_ASTG= 'YES' / Astigmatism correction RUN_BKGD= 'YES' / Background subtraction RUN_OPTI= 'YES' / Optimal extraction COMMENT COMMENT These keywords control the jitter-screening routine. Only tabulated COMMENT pointing errors with quality flags greater than TRKFLG are considered.COMMENT Times when the pointing errors exceed the allowed limits are flagged COMMENT as bad. Limits are applied to both the LiF and SiC channels. COMMENT TRKFLG = 1 / Minimum trustworthy value of TRKFLG DX_MAX = 30 / [arcsec] Allowed pointing error DY_MAX = 30 / [arcsec] Allowed pointing error COMMENT COMMENT These keywords allow the user to specify the range and bin size of COMMENT the output wavelength array. If not set, default values are used. COMMENT LIF_W0 = / [A] Requested initial wavelength LIF_WMAX= / [A] Requested final wavelength LIF_WPC = / [A] Requested wavelength per channel SIC_W0 = / [A] Requested initial wavelength SIC_WMAX= / [A] Requested final wavelength SIC_WPC = / [A] Requested wavelength per channel END \ No newline at end of file
diff --git a/parmfiles/parm2b015.fit b/parmfiles/parm2b015.fit
new file mode 100644
index 0000000..e5289f4
--- /dev/null
+++ b/parmfiles/parm2b015.fit
@@ -0,0 +1 @@
+SIMPLE = T / Fits standard BITPIX = 16 / Bits per pixel NAXIS = 0 / Number of axes EXTEND = T / File may contain extensions COMMENT FITS (Flexible Image Transport System) format defined in Astronomy andCOMMENT Astrophysics Supplement Series v44/p363, v44/p371, v73/p359, v73/p365.COMMENT Contact the NASA Science Office of Standards and Technology for the COMMENT FITS Definition document #100 and other FITS information. CALFTYPE= 'PARM ' / Calibration file type CALFVERS= 15 / Calibration file version DETECTOR= '2B ' / detector (1A, 1B, 2A, 2B) EFFMJD = 50000. / Date on which file should be applied (MJD) DATE = '2006-11-30T17:33:00' COMMENT COMMENT The SPEX_SIC and SPEX_LIF keywords allow the user to center the extracCOMMENT tion windows along a given row rather than having the pipeline try to COMMENT centroid the spectrum. A number less than 0 or greater than 1023 willCOMMENT default to pipeline centroiding. A value between 0 and 1023 will defCOMMENT ine the center of the extraction window. Since the pipeline expands hCOMMENT istogram images out to 1023 pixels in Y, the number must be given for COMMENT a full 1023 image height. That is, if the center is determined from bCOMMENT inned images, the center must be multiplied by the binning factor befoCOMMENT re entering it in this file. COMMENT SPEX_SIC= -1 / SiC extraction window Y center (0-1023) SPEX_LIF= -1 / LiF extraction window Y center (0-1023) COMMENT COMMENT The EMAX_SIC and EMAX_LIF keywords allow the user to limit the amount COMMENT that the pipeline can shift the extraction windows based on the centroCOMMENT id of the spectrum. In cases where the source is very faint, the centCOMMENT roid routine may find bright detector artifacts or other apertures insCOMMENT tead of the desired aperture. If the calculated centroid differs fromCOMMENT the predicted centroid by more than EMAX_SIC or EMAX_LIF, the pipelinCOMMENT e uses the default extraction window location. COMMENT EMAX_SIC= 40 / SiC extraction window maximum Y movement EMAX_LIF= 40 / LiF extraction window maximum Y movement COMMENT COMMENT The following keywords allow the user to skip various COMMENT steps of the pipeline. Change value from 'YES' to 'NO' COMMENT to skip the corresponding step. COMMENT RUN_PHAX= 'YES' / PHA X correction RUN_BRST= 'YES' / Burst rejection RUN_JITR= 'YES' / Jitter correction RUN_ASTG= 'YES' / Astigmatism correction RUN_BKGD= 'YES' / Background subtraction RUN_OPTI= 'YES' / Optimal extraction COMMENT COMMENT These keywords control the jitter-screening routine. Only tabulated COMMENT pointing errors with quality flags greater than TRKFLG are considered.COMMENT Times when the pointing errors exceed the allowed limits are flagged COMMENT as bad. Limits are applied to both the LiF and SiC channels. COMMENT TRKFLG = 1 / Minimum trustworthy value of TRKFLG DX_MAX = 30 / [arcsec] Allowed pointing error DY_MAX = 30 / [arcsec] Allowed pointing error COMMENT COMMENT These keywords allow the user to specify the range and bin size of COMMENT the output wavelength array. If not set, default values are used. COMMENT LIF_W0 = / [A] Requested initial wavelength LIF_WMAX= / [A] Requested final wavelength LIF_WPC = / [A] Requested wavelength per channel SIC_W0 = / [A] Requested initial wavelength SIC_WMAX= / [A] Requested final wavelength SIC_WPC = / [A] Requested wavelength per channel END \ No newline at end of file
diff --git a/parmfiles/scrn1a015.fit b/parmfiles/scrn1a015.fit
new file mode 100644
index 0000000..14fbae7
--- /dev/null
+++ b/parmfiles/scrn1a015.fit
@@ -0,0 +1 @@
+SIMPLE = T / Fits standard BITPIX = 16 / Bits per pixel NAXIS = 0 / Number of axes EXTEND = T / File may contain extensions ORIGIN = 'NOAO-IRAF FITS Image Kernel December 2001' / FITS file originator IRAF-TLM= '17:33:33 (13/04/2005)' COMMENT FITS (Flexible Image Transport System) format defined in Astronomy andCOMMENT Astrophysics Supplement Series v44/p363, v44/p371, v73/p359, v73/p365.COMMENT Contact the NASA Science Office of Standards and Technology for the COMMENT FITS Definition document #100 and other FITS information. CALFTYPE= 'SCRN ' / Calibration file type CALFVERS= 15 / Calibration file version DETECTOR= '1A ' / detector (1A, 1B, 2A, 2B) EFFMJD = 50000. / Date on which file should be applied (MJD) DATE = 'Tue Apr 2 14:20:04 2002' / Date file was created AUTHOR = 'R.D. Robinson' / Author SAA_SCR = 'ON ' / SAA screening ON/OFF LIMB_SCR= 'ON ' / Limb angle screening ON/OFF DAYNIGHT= 'BOTH ' / Use only DAY, NIGHT or BOTH PHALOW = 2 / Minimum acceptable PHA value PHAHIGH = 25 / Maximum acceptable PHA value BRITLIMB= 15. / [deg] Bright limb avoidance angle DARKLIMB= 10. / [deg] Dark limb avoidance angle NUSERGTI= 0 / Number of user defined good time intervals GTIBEG01= 0. / [sec] Beginning good time interval GTIEND01= 0. / [sec] Ending good time interval GTIBEG02= 0. / [sec] Beginning good time interval GTIEND02= 0. / [sec] Ending good time interval MNCNT = 5 / minimum cnt rate for burst STDREJ = 5 / std dev from median for burst rej NBIN = 15 / binning factor for time sequence NSMED = 600 / averaging factor (s) in det med flt SRCFRAC = 0.00100000 / fraction of source intensity needed BKGDTYPE= 1 / flag for type of background model END \ No newline at end of file
diff --git a/parmfiles/scrn1b015.fit b/parmfiles/scrn1b015.fit
new file mode 100644
index 0000000..eb9a195
--- /dev/null
+++ b/parmfiles/scrn1b015.fit
@@ -0,0 +1 @@
+SIMPLE = T / Fits standard BITPIX = 16 / Bits per pixel NAXIS = 0 / Number of axes EXTEND = T / File may contain extensions ORIGIN = 'NOAO-IRAF FITS Image Kernel December 2001' / FITS file originator IRAF-TLM= '17:33:33 (13/04/2005)' COMMENT FITS (Flexible Image Transport System) format defined in Astronomy andCOMMENT Astrophysics Supplement Series v44/p363, v44/p371, v73/p359, v73/p365.COMMENT Contact the NASA Science Office of Standards and Technology for the COMMENT FITS Definition document #100 and other FITS information. CALFTYPE= 'SCRN ' / Calibration file type CALFVERS= 15 / Calibration file version DETECTOR= '1B ' / detector (1A, 1B, 2A, 2B) EFFMJD = 50000. / Date on which file should be applied (MJD) DATE = 'Tue Apr 2 14:20:04 2002' / Date file was created AUTHOR = 'R.D. Robinson' / Author SAA_SCR = 'ON ' / SAA screening ON/OFF LIMB_SCR= 'ON ' / Limb angle screening ON/OFF DAYNIGHT= 'BOTH ' / Use only DAY, NIGHT or BOTH PHALOW = 2 / Minimum acceptable PHA value PHAHIGH = 24 / Maximum acceptable PHA value BRITLIMB= 15. / [deg] Bright limb avoidance angle DARKLIMB= 10. / [deg] Dark limb avoidance angle NUSERGTI= 0 / Number of user defined good time intervals GTIBEG01= 0. / [sec] Beginning good time interval GTIEND01= 0. / [sec] Ending good time interval GTIBEG02= 0. / [sec] Beginning good time interval GTIEND02= 0. / [sec] Ending good time interval MNCNT = 5 / minimum cnt rate for burst STDREJ = 5 / std dev from median for burst rej NBIN = 15 / binning factor for time sequence NSMED = 600 / averaging factor (s) in det med flt SRCFRAC = 0.00100000 / fraction of source intensity needed BKGDTYPE= 1 / flag for type of background model END \ No newline at end of file
diff --git a/parmfiles/scrn2a015.fit b/parmfiles/scrn2a015.fit
new file mode 100644
index 0000000..25a48f3
--- /dev/null
+++ b/parmfiles/scrn2a015.fit
@@ -0,0 +1 @@
+SIMPLE = T / Fits standard BITPIX = 16 / Bits per pixel NAXIS = 0 / Number of axes EXTEND = T / File may contain extensions ORIGIN = 'NOAO-IRAF FITS Image Kernel December 2001' / FITS file originator IRAF-TLM= '17:33:33 (13/04/2005)' COMMENT FITS (Flexible Image Transport System) format defined in Astronomy andCOMMENT Astrophysics Supplement Series v44/p363, v44/p371, v73/p359, v73/p365.COMMENT Contact the NASA Science Office of Standards and Technology for the COMMENT FITS Definition document #100 and other FITS information. CALFTYPE= 'SCRN ' / Calibration file type CALFVERS= 15 / Calibration file version DETECTOR= '2A ' / detector (1A, 1B, 2A, 2B) EFFMJD = 50000. / Date on which file should be applied (MJD) DATE = 'Tue Apr 2 14:20:05 2002' / Date file was created AUTHOR = 'R.D. Robinson' / Author SAA_SCR = 'ON ' / SAA screening ON/OFF LIMB_SCR= 'ON ' / Limb angle screening ON/OFF DAYNIGHT= 'BOTH ' / Use only DAY, NIGHT or BOTH PHALOW = 3 / Minimum acceptable PHA value PHAHIGH = 23 / Maximum acceptable PHA value BRITLIMB= 15. / [deg] Bright limb avoidance angle DARKLIMB= 10. / [deg] Dark limb avoidance angle NUSERGTI= 0 / Number of user defined good time intervals GTIBEG01= 0. / [sec] Beginning good time interval GTIEND01= 0. / [sec] Ending good time interval GTIBEG02= 0. / [sec] Beginning good time interval GTIEND02= 0. / [sec] Ending good time interval MNCNT = 5 / minimum cnt rate for burst STDREJ = 5 / std dev from median for burst rej NBIN = 15 / binning factor for time sequence NSMED = 600 / averaging factor (s) in det med flt SRCFRAC = 0.00100000 / fraction of source intensity needed BKGDTYPE= 1 / flag for type of background model END \ No newline at end of file
diff --git a/parmfiles/scrn2b015.fit b/parmfiles/scrn2b015.fit
new file mode 100644
index 0000000..3a85c3c
--- /dev/null
+++ b/parmfiles/scrn2b015.fit
@@ -0,0 +1 @@
+SIMPLE = T / Fits standard BITPIX = 16 / Bits per pixel NAXIS = 0 / Number of axes EXTEND = T / File may contain extensions ORIGIN = 'NOAO-IRAF FITS Image Kernel December 2001' / FITS file originator IRAF-TLM= '17:33:33 (13/04/2005)' COMMENT FITS (Flexible Image Transport System) format defined in Astronomy andCOMMENT Astrophysics Supplement Series v44/p363, v44/p371, v73/p359, v73/p365.COMMENT Contact the NASA Science Office of Standards and Technology for the COMMENT FITS Definition document #100 and other FITS information. CALFTYPE= 'SCRN ' / Calibration file type CALFVERS= 15 / Calibration file version DETECTOR= '2B ' / detector (1A, 1B, 2A, 2B) EFFMJD = 50000. / Date on which file should be applied (MJD) DATE = 'Tue Apr 2 14:20:05 2002' / Date file was created AUTHOR = 'R.D. Robinson' / Author SAA_SCR = 'ON ' / SAA screening ON/OFF LIMB_SCR= 'ON ' / Limb angle screening ON/OFF DAYNIGHT= 'BOTH ' / Use only DAY, NIGHT or BOTH PHALOW = 3 / Minimum acceptable PHA value PHAHIGH = 24 / Maximum acceptable PHA value BRITLIMB= 15. / [deg] Bright limb avoidance angle DARKLIMB= 10. / [deg] Dark limb avoidance angle NUSERGTI= 0 / Number of user defined good time intervals GTIBEG01= 0. / [sec] Beginning good time interval GTIEND01= 0. / [sec] Ending good time interval GTIBEG02= 0. / [sec] Beginning good time interval GTIEND02= 0. / [sec] Ending good time interval MNCNT = 5 / minimum cnt rate for burst STDREJ = 5 / std dev from median for burst rej NBIN = 15 / binning factor for time sequence NSMED = 600 / averaging factor (s) in det med flt SRCFRAC = 0.00100000 / fraction of source intensity needed BKGDTYPE= 1 / flag for type of background model END \ No newline at end of file
diff --git a/src/Makefile.Linux.orig b/src/Makefile.Linux.orig
new file mode 100644
index 0000000..1351804
--- /dev/null
+++ b/src/Makefile.Linux.orig
@@ -0,0 +1,138 @@
+
+CALFUSEDIR= ${PWD}/..
+PLATFORM= ix86_Linux
+SHARED= -shared
+FITSVER= 2.470
+
+# Symbols for make
+MAKE= make
+
+#Symbols used for compiling
+CC= cc
+OPT= -Wall -g -DCFORTRAN -Dg77Fortran -Df2cFortran
+CFLAGS= ${OPT} -I${CALFUSEDIR}/include
+LIBS= -lc -lm -lnsl -ldl -lgfortran
+
+all: lib bin fes jitter
+
+lib: libcfitsio libsla libfuse
+
+install: libinstall bininstall analinstall jitinstall # fesinstall
+
+libinstall: libcfitsioinstall libslainstall libfuseinstall
+
+clean: binclean fesclean analclean libclean jitclean
+
+distclean: bindistclean fesdistclean analdistclean libdistclean jitdistclean
+
+libclean: libcfitsioclean libslaclean libfuseclean
+
+libdistclean: libcfitsiodistclean libsladistclean libfusedistclean
+
+cfitsio/Makefile:
+ cd cfitsio; CC="${CC}"; export CC; ./configure;
+
+libcfitsio.so:
+ cd cfitsio; /bin/rm -f libcfitsio-${FITSVER}.so
+
+libcfitsio: cfitsio/Makefile
+ cd cfitsio; ${MAKE} CFLAGS="${OPT}"; \
+ ${CC} ${SHARED} -o libcfitsio-${FITSVER}.so *.o ${LIBS}
+
+libsla:
+ SYSTEM="${PLATFORM}"; export SYSTEM; \
+ FFLAGS="${OPT}"; export FFLAGS; \
+ cd slalib; ./mk build; ${CC} ${SHARED} -o libsla.so *.o ${LIBS}
+
+libfuse:
+ cd libcf; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" FITSVER=${FITSVER} all
+
+bin:
+ cd fuv; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" FITSVER=${FITSVER} all
+
+fes:
+ cd fes; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" FITSVER=${FITSVER} all
+
+analysis:
+ cd analysis; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" FITSVER=${FITSVER} all
+
+jitter:
+ cd cal/jitter; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" FITSVER=${FITSVER} all
+
+libcfitsioinstall: libcfitsio
+ cd cfitsio; cp libcfitsio-${FITSVER}.so ${CALFUSEDIR}/lib
+
+libslainstall: libsla
+ cd slalib; cp libsla.so ${CALFUSEDIR}/lib
+
+libfuseinstall: libfuse
+ cd libcf; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" install
+
+bininstall: bin
+ cd fuv; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" install
+
+fesinstall: fes
+ cd fes; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" install
+
+analinstall: analysis
+ cd analysis; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" install
+
+jitinstall: jitter
+ cd cal/jitter; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" install
+
+libcfitsioclean:
+ - cd cfitsio; ${MAKE} clean; /bin/rm -f libcfitsio-${FITSVER}.so
+
+libcfitsiodistclean:
+ - cd cfitsio; ${MAKE} distclean; /bin/rm -f libcfitsio-${FITSVER}.so
+ cd ../lib; /bin/rm -f libcfitsio-${FITSVER}.so
+
+libslaclean:
+ - SYSTEM="${PLATFORM}"; export SYSTEM; \
+ cd slalib; ./mk clean; /bin/rm -f libsla.a libsla.so
+
+libsladistclean:
+ - SYSTEM="${PLATFORM}"; export SYSTEM; \
+ cd slalib; ./mk unbuild
+ cd ../lib; /bin/rm -f libsla.so
+
+libfuseclean:
+ cd libcf; ${MAKE} clean
+
+libfusedistclean:
+ cd libcf; ${MAKE} distclean
+
+binclean:
+ cd fuv; ${MAKE} clean
+
+bindistclean:
+ cd fuv; ${MAKE} distclean
+
+fesclean:
+ cd fes; ${MAKE} clean
+
+fesdistclean:
+ cd fes; ${MAKE} distclean
+
+analclean:
+ cd analysis; ${MAKE} clean
+
+analdistclean:
+ cd analysis; ${MAKE} distclean
+
+jitclean:
+ cd cal/jitter; ${MAKE} clean
+
+jitdistclean:
+ cd cal/jitter; ${MAKE} distclean
+
diff --git a/src/Makefile.Linux64.orig b/src/Makefile.Linux64.orig
new file mode 100644
index 0000000..6c498d9
--- /dev/null
+++ b/src/Makefile.Linux64.orig
@@ -0,0 +1,113 @@
+
+CALFUSEDIR= ${PWD}/..
+PLATFORM= x86_64
+SHARED= -shared -fPIC
+
+# Symbols for make
+MAKE= make
+
+#Symbols used for compiling
+CC= gcc
+OPT= -Wall -g -DCFORTRAN -Dg77Fortran -Df2cFortran
+CFLAGS= ${OPT} -I${CALFUSEDIR}/include
+LIBS= -lc -lm -lnsl -ldl -lgfortran -lcfitsio
+
+install: libinstall bininstall analinstall jitinstall # fesinstall
+
+libinstall: libslainstall libfuseinstall
+
+clean: binclean fesclean analclean libclean jitclean
+
+distclean: bindistclean fesdistclean analdistclean libdistclean jitdistclean
+
+libclean: libslaclean libfuseclean
+
+libdistclean: libsladistclean libfusedistclean
+
+libsla:
+ SYSTEM="${PLATFORM}"; export SYSTEM; \
+ FFLAGS="${OPT}"; export FFLAGS; \
+ cd slalib; ./mk build; ${CC} ${SHARED} -o libsla.so *.o ${LIBS}
+
+libfuse:
+ cd libcf; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT} ${SHARED}" all
+
+bin:
+ cd fuv; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" all
+
+fes:
+ cd fes; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" all
+
+analysis:
+ cd analysis; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" all
+
+jitter:
+ cd cal/jitter; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" all
+
+libslainstall: libsla
+ cd slalib; cp libsla.so ${CALFUSEDIR}/lib
+
+libfuseinstall: libfuse
+ cd libcf; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" install
+
+bininstall: bin
+ cd fuv; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" install
+
+fesinstall: fes
+ cd fes; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" install
+
+analinstall: analysis
+ cd analysis; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" install
+
+jitinstall: jitter
+ cd cal/jitter; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" install
+
+libslaclean:
+ - SYSTEM="${PLATFORM}"; export SYSTEM; \
+ cd slalib; ./mk clean; /bin/rm -f libsla.a libsla.so
+
+libsladistclean:
+ - SYSTEM="${PLATFORM}"; export SYSTEM; \
+ cd slalib; ./mk unbuild
+ cd ../lib; /bin/rm -f libsla.so
+
+libfuseclean:
+ cd libcf; ${MAKE} clean
+
+libfusedistclean:
+ cd libcf; ${MAKE} distclean
+
+binclean:
+ cd fuv; ${MAKE} clean
+
+bindistclean:
+ cd fuv; ${MAKE} distclean
+
+fesclean:
+ cd fes; ${MAKE} clean
+
+fesdistclean:
+ cd fes; ${MAKE} distclean
+
+analclean:
+ cd analysis; ${MAKE} clean
+
+analdistclean:
+ cd analysis; ${MAKE} distclean
+
+jitclean:
+ cd cal/jitter; ${MAKE} clean
+
+jitdistclean:
+ cd cal/jitter; ${MAKE} distclean
+
diff --git a/src/Makefile.MacOSX.orig b/src/Makefile.MacOSX.orig
new file mode 100644
index 0000000..6bfae3e
--- /dev/null
+++ b/src/Makefile.MacOSX.orig
@@ -0,0 +1,143 @@
+
+# Master Makefile for Mac OS X Version 10.2 or higher
+# Slalib installation requires the command "make -e install"
+# Leave PLATFORM = ix86_Linux; required by slalib.
+# FITSVER is not used; library is always called libcfitsio.dylib.
+
+CALFUSEDIR= ${PWD}/..
+PLATFORM= ix86_Linux
+SHARED= -dynamiclib
+FITSVER= 2.470
+MACOSX_DEPLOYMENT_TARGET= 10.2
+
+# Symbols for make
+MAKE= make
+
+#Symbols used for compiling
+CC= cc
+OPT= -O3 -Wall -DCFORTRAN -Dg77Fortran -Df2cFortran
+CFLAGS= ${OPT} -I${CALFUSEDIR}/include
+LIBS= -L/sw/lib/ -lgfortran
+
+all: lib bin fes jitter
+
+lib: libcfitsio libsla libfuse
+
+install: libinstall bininstall analinstall jitinstall # fesinstall
+
+libinstall: libcfitsioinstall libslainstall libfuseinstall
+
+clean: binclean fesclean analclean libclean jitclean
+
+distclean: bindistclean fesdistclean analdistclean libdistclean jitdistclean
+
+libclean: libcfitsioclean libslaclean libfuseclean
+
+libdistclean: libcfitsiodistclean libsladistclean libfusedistclean
+
+cfitsio/Makefile:
+ cd cfitsio; CC="${CC}"; export CC; ./configure;
+
+libcfitsio: cfitsio/Makefile
+ cd cfitsio; ${MAKE} shared
+
+libsla:
+ - SYSTEM="${PLATFORM}"; export SYSTEM; \
+ cd slalib; ./mk build; \
+ ${CC} ${SHARED} -o libsla.dylib *.o ${LIBS}
+
+libfuse:
+ cd libcf; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" FITSVER=${FITSVER} all
+
+bin:
+ MACOSX_DEPLOYMENT_TARGET="${MACOSX_DEPLOYMENT_TARGET}"; \
+ export MACOSX_DEPLOYMENT_TARGET; \
+ cd fuv; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" FITSVER=${FITSVER} all
+
+fes:
+ cd fes; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" FITSVER=${FITSVER} all
+
+analysis:
+ cd analysis; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" FITSVER=${FITSVER} all
+
+jitter:
+ cd cal/jitter; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" FITSVER=${FITSVER} all
+
+libcfitsioinstall: libcfitsio
+ cd cfitsio; cp libcfitsio.dylib ${CALFUSEDIR}/lib
+
+libslainstall: libsla
+ cd slalib; cp libsla.dylib ${CALFUSEDIR}/lib
+
+libfuseinstall: libfuse
+ cd libcf; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" install
+
+bininstall: bin
+ cd fuv; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" install
+
+fesinstall: fes
+ cd fes; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" install
+
+analinstall: analysis
+ cd analysis; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" install
+
+jitinstall: jitter
+ cd cal/jitter; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" install
+
+libcfitsioclean:
+ - cd cfitsio; ${MAKE} clean; /bin/rm -f libcfitsio.dylib
+
+libcfitsiodistclean:
+ - cd cfitsio; ${MAKE} distclean; /bin/rm -f libcfitsio.dylib
+ /bin/rm -f ../lib/libcfitsio.dylib
+ # cd ../lib; /bin/rm libcfitsio-${FITSVER}.dylib
+
+libslaclean:
+ - SYSTEM="${PLATFORM}"; export SYSTEM; \
+ cd slalib; ./mk clean; /bin/rm -f libsla.a libsla.dylib
+
+libsladistclean:
+ - SYSTEM="${PLATFORM}"; export SYSTEM; \
+ cd slalib; ./mk unbuild
+ cd ../lib; /bin/rm -f libsla.dylib
+
+libfuseclean:
+ cd libcf; ${MAKE} clean
+
+libfusedistclean:
+ cd libcf; ${MAKE} distclean
+
+binclean:
+ cd fuv; ${MAKE} clean
+
+bindistclean:
+ cd fuv; ${MAKE} distclean
+
+fesclean:
+ cd fes; ${MAKE} clean
+
+fesdistclean:
+ cd fes; ${MAKE} distclean
+
+analclean:
+ cd analysis; ${MAKE} clean
+
+analdistclean:
+ cd analysis; ${MAKE} distclean
+
+jitclean:
+ cd cal/jitter; ${MAKE} clean
+
+jitdistclean:
+ cd cal/jitter; ${MAKE} distclean
+
diff --git a/src/Makefile.Solaris.orig b/src/Makefile.Solaris.orig
new file mode 100644
index 0000000..6661a7d
--- /dev/null
+++ b/src/Makefile.Solaris.orig
@@ -0,0 +1,137 @@
+
+CALFUSEDIR= ${PWD}/..
+PLATFORM= sun4_Solaris
+SHARED= -G
+FITSVER= 2.470
+
+# Symbols for make
+MAKE= make
+
+#Symbols used for compiling
+CC= cc
+OPT= -O -DCFORTRAN -KPIC -DSOLARIS
+CFLAGS= ${OPT} -I${CALFUSEDIR}/include
+LIBS= -lc -lm -lnsl -ldl -lsocket -lsunmath -lM77 -lF77
+
+all: lib bin fes jitter
+
+lib: libcfitsio libsla libfuse
+
+install: libinstall bininstall analinstall jitinstall # fesinstall
+
+libinstall: libcfitsioinstall libslainstall libfuseinstall
+
+clean: binclean fesclean analclean libclean jitclean
+
+distclean: bindistclean fesdistclean analdistclean libdistclean jitdistclean
+
+libclean: libcfitsioclean libslaclean libfuseclean
+
+libdistclean: libcfitsiodistclean libsladistclean libfusedistclean
+
+cfitsio/Makefile:
+ cd cfitsio; CC="${CC}"; export CC; ./configure;
+
+libcfitsio.so:
+ cd cfitsio; /bin/rm -f libcfitsio-${FITSVER}.so
+
+libcfitsio: cfitsio/Makefile
+ cd cfitsio; ${MAKE} CFLAGS="${OPT}"; \
+ ${CC} ${SHARED} -o libcfitsio-${FITSVER}.so *.o ${LIBS}
+
+libsla:
+ SYSTEM="${PLATFORM}"; export SYSTEM; \
+ FFLAGS="${OPT}"; export FFLAGS; \
+ cd slalib; ./mk build; ${CC} ${SHARED} -o libsla.so *.o ${LIBS}
+
+libfuse:
+ cd libcf; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" FITSVER=${FITSVER} all
+
+bin:
+ cd fuv; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" FITSVER=${FITSVER} all
+
+fes:
+ cd fes; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" FITSVER=${FITSVER} all
+
+analysis:
+ cd analysis; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" FITSVER=${FITSVER} all
+
+jitter:
+ cd cal/jitter; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" FITSVER=${FITSVER} all
+
+libcfitsioinstall: libcfitsio
+ cd cfitsio; cp libcfitsio-${FITSVER}.so ${CALFUSEDIR}/lib
+
+libslainstall: libsla
+ cd slalib; cp libsla.so ${CALFUSEDIR}/lib
+
+libfuseinstall: libfuse
+ cd libcf; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" install
+
+bininstall: bin
+ cd fuv; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" install
+
+fesinstall: fes
+ cd fes; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" install
+
+analinstall: analysis
+ cd analysis; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" install
+
+jitinstall: jitter
+ cd cal/jitter; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" install
+
+libcfitsioclean:
+ - cd cfitsio; ${MAKE} clean; /bin/rm -f libcfitsio-${FITSVER}.so
+
+libcfitsiodistclean:
+ - cd cfitsio; ${MAKE} distclean; /bin/rm -f libcfitsio-${FITSVER}.so
+ cd ../lib; /bin/rm -f libcfitsio-${FITSVER}.so
+
+libslaclean:
+ - SYSTEM="${PLATFORM}"; export SYSTEM; \
+ cd slalib; ./mk clean; /bin/rm -f libsla.a libsla.so
+
+libsladistclean:
+ - SYSTEM="${PLATFORM}"; export SYSTEM; \
+ cd slalib; ./mk unbuild
+ cd ../lib; /bin/rm -f libsla.so
+
+libfuseclean:
+ cd libcf; ${MAKE} clean
+
+libfusedistclean:
+ cd libcf; ${MAKE} distclean
+
+binclean:
+ cd fuv; ${MAKE} clean
+
+bindistclean:
+ cd fuv; ${MAKE} distclean
+
+fesclean:
+ cd fes; ${MAKE} clean
+
+fesdistclean:
+ cd fes; ${MAKE} distclean
+
+analclean:
+ cd analysis; ${MAKE} clean
+
+analdistclean:
+ cd analysis; ${MAKE} distclean
+
+jitclean:
+ cd cal/jitter; ${MAKE} clean
+
+jitdistclean:
+ cd cal/jitter; ${MAKE} distclean
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..7a3bd69
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = slalib
diff --git a/src/Makefile.in b/src/Makefile.in
new file mode 100644
index 0000000..b58841d
--- /dev/null
+++ b/src/Makefile.in
@@ -0,0 +1,619 @@
+# Makefile.in generated by automake 1.15 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = src
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-recursive dvi-recursive html-recursive info-recursive \
+ install-data-recursive install-dvi-recursive \
+ install-exec-recursive install-html-recursive \
+ install-info-recursive install-pdf-recursive \
+ install-ps-recursive install-recursive installcheck-recursive \
+ installdirs-recursive pdf-recursive ps-recursive \
+ tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+ distdir
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SUBDIRS = slalib
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign src/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(am__recursive_targets) install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
+ check-am clean clean-generic clean-libtool cscopelist-am ctags \
+ ctags-am distclean distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ installdirs-am maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+ ps ps-am tags tags-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/Makefile.orig.orig b/src/Makefile.orig.orig
new file mode 100644
index 0000000..6661a7d
--- /dev/null
+++ b/src/Makefile.orig.orig
@@ -0,0 +1,137 @@
+
+CALFUSEDIR= ${PWD}/..
+PLATFORM= sun4_Solaris
+SHARED= -G
+FITSVER= 2.470
+
+# Symbols for make
+MAKE= make
+
+#Symbols used for compiling
+CC= cc
+OPT= -O -DCFORTRAN -KPIC -DSOLARIS
+CFLAGS= ${OPT} -I${CALFUSEDIR}/include
+LIBS= -lc -lm -lnsl -ldl -lsocket -lsunmath -lM77 -lF77
+
+all: lib bin fes jitter
+
+lib: libcfitsio libsla libfuse
+
+install: libinstall bininstall analinstall jitinstall # fesinstall
+
+libinstall: libcfitsioinstall libslainstall libfuseinstall
+
+clean: binclean fesclean analclean libclean jitclean
+
+distclean: bindistclean fesdistclean analdistclean libdistclean jitdistclean
+
+libclean: libcfitsioclean libslaclean libfuseclean
+
+libdistclean: libcfitsiodistclean libsladistclean libfusedistclean
+
+cfitsio/Makefile:
+ cd cfitsio; CC="${CC}"; export CC; ./configure;
+
+libcfitsio.so:
+ cd cfitsio; /bin/rm -f libcfitsio-${FITSVER}.so
+
+libcfitsio: cfitsio/Makefile
+ cd cfitsio; ${MAKE} CFLAGS="${OPT}"; \
+ ${CC} ${SHARED} -o libcfitsio-${FITSVER}.so *.o ${LIBS}
+
+libsla:
+ SYSTEM="${PLATFORM}"; export SYSTEM; \
+ FFLAGS="${OPT}"; export FFLAGS; \
+ cd slalib; ./mk build; ${CC} ${SHARED} -o libsla.so *.o ${LIBS}
+
+libfuse:
+ cd libcf; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" FITSVER=${FITSVER} all
+
+bin:
+ cd fuv; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" FITSVER=${FITSVER} all
+
+fes:
+ cd fes; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" FITSVER=${FITSVER} all
+
+analysis:
+ cd analysis; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" FITSVER=${FITSVER} all
+
+jitter:
+ cd cal/jitter; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" FITSVER=${FITSVER} all
+
+libcfitsioinstall: libcfitsio
+ cd cfitsio; cp libcfitsio-${FITSVER}.so ${CALFUSEDIR}/lib
+
+libslainstall: libsla
+ cd slalib; cp libsla.so ${CALFUSEDIR}/lib
+
+libfuseinstall: libfuse
+ cd libcf; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" install
+
+bininstall: bin
+ cd fuv; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" install
+
+fesinstall: fes
+ cd fes; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" install
+
+analinstall: analysis
+ cd analysis; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" install
+
+jitinstall: jitter
+ cd cal/jitter; ${MAKE} CALFUSEDIR="${CALFUSEDIR}" \
+ CC="${CC}" OPT="${OPT}" install
+
+libcfitsioclean:
+ - cd cfitsio; ${MAKE} clean; /bin/rm -f libcfitsio-${FITSVER}.so
+
+libcfitsiodistclean:
+ - cd cfitsio; ${MAKE} distclean; /bin/rm -f libcfitsio-${FITSVER}.so
+ cd ../lib; /bin/rm -f libcfitsio-${FITSVER}.so
+
+libslaclean:
+ - SYSTEM="${PLATFORM}"; export SYSTEM; \
+ cd slalib; ./mk clean; /bin/rm -f libsla.a libsla.so
+
+libsladistclean:
+ - SYSTEM="${PLATFORM}"; export SYSTEM; \
+ cd slalib; ./mk unbuild
+ cd ../lib; /bin/rm -f libsla.so
+
+libfuseclean:
+ cd libcf; ${MAKE} clean
+
+libfusedistclean:
+ cd libcf; ${MAKE} distclean
+
+binclean:
+ cd fuv; ${MAKE} clean
+
+bindistclean:
+ cd fuv; ${MAKE} distclean
+
+fesclean:
+ cd fes; ${MAKE} clean
+
+fesdistclean:
+ cd fes; ${MAKE} distclean
+
+analclean:
+ cd analysis; ${MAKE} clean
+
+analdistclean:
+ cd analysis; ${MAKE} distclean
+
+jitclean:
+ cd cal/jitter; ${MAKE} clean
+
+jitdistclean:
+ cd cal/jitter; ${MAKE} distclean
diff --git a/src/analysis/Makefile.Linux.orig b/src/analysis/Makefile.Linux.orig
new file mode 100644
index 0000000..b1786ef
--- /dev/null
+++ b/src/analysis/Makefile.Linux.orig
@@ -0,0 +1,142 @@
+
+FITSVER= 2.470
+CALFUSEDIR= ${PWD}/../..
+
+# Symbols for include directories
+FUSEINCLDIR= -I${CALFUSEDIR}/include
+
+# Symbols used for compiling
+CC= cc
+OPT= -g -Wall -DCFORTRAN -Dg77Fortran -Df2cFortran
+CFLAGS= ${OPT} ${FUSEINCLDIR}
+
+# Symbols used for creating shared binaries
+FUSEBINDIR= ${CALFUSEDIR}/bin
+FUSELIBDIR= -L${CALFUSEDIR}/lib
+LIBDIR= -L/opt/SUNWspro/lib
+FUSELIBS= -lsla -lcfitsio-${FITSVER} -lcf
+LIBS= -lc -lm -lnsl -ldl -lgfortran
+LDFLAGS= -Wl,-R${CALFUSEDIR}/lib
+
+# Binaries to be made
+
+BINS= cf_ttag_to_hist get_shift mjd2hjd cf_reflux \
+ idf_screen extract_jitter modhead \
+ cf_arith cf_combine cf_nvo cf_pack cf_xcorr \
+ idf_combine bpm_combine ttag_combine \
+ cf_coadd cf_make_all_exp \
+ remove_target_orbital_motion idf_cut \
+ ttag_lightcurve \
+ ttag_lightcurve_channel_sum \
+ ttag_lightcurve_mjd2hmjd \
+ ttag_lightcurve_combine \
+ ttag_lightcurve_periodogram
+
+all: ${BINS}
+ chmod g+rw ${BINS}
+
+install: all
+ /bin/cp ${BINS} cf_make_all_obs.csh cf_make_900_obs.csh ${FUSEBINDIR}
+
+clean:
+ /bin/rm -f *.o ${BINS}
+
+distclean:
+ /bin/rm -f *.o ${BINS}
+ cd ../../bin; /bin/rm -f ${BINS}
+
+cf_arith: cf_arith.c cf_wrspec7.c cf_wrspec_cf2.c
+ ${CC} ${CFLAGS} -o cf_arith cf_arith.c cf_wrspec7.c cf_wrspec_cf2.c\
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_coadd: cf_coadd.c
+ ${CC} ${CFLAGS} -o cf_coadd cf_coadd.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_combine: cf_combine.c cf_wrspec7.c
+ ${CC} ${CFLAGS} -o cf_combine cf_combine.c cf_wrspec7.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_make_all_exp:
+ ${CC} ${CFLAGS} -o cf_make_all_exp cf_make_all_exp.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_ttag_to_hist:
+ ${CC} ${CFLAGS} -o cf_ttag_to_hist cf_ttag_to_hist.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+ttag_combine:
+ ${CC} ${CFLAGS} -o ttag_combine ttag_combine.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+idf_combine:
+ ${CC} ${CFLAGS} -o idf_combine idf_combine.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+bpm_combine:
+ ${CC} ${CFLAGS} -o bpm_combine bpm_combine.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+get_shift:
+ ${CC} ${CFLAGS} -o get_shift get_shift.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_pack:
+ ${CC} ${CFLAGS} -o cf_pack cf_pack.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_nvo:
+ ${CC} ${CFLAGS} -o cf_nvo cf_nvo.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_reflux:
+ ${CC} ${CFLAGS} -o cf_reflux cf_reflux.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_xcorr:
+ ${CC} ${CFLAGS} -o cf_xcorr cf_xcorr.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+modhead:
+ ${CC} ${CFLAGS} -o modhead modhead.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+ttag_lightcurve:
+ ${CC} ${CFLAGS} -o ttag_lightcurve ttag_lightcurve.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+ttag_lightcurve_periodogram:
+ ${CC} ${CFLAGS} -o ttag_lightcurve_periodogram ttag_lightcurve_periodogram.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+mjd2hjd: mjd2hjd.c gethmjd.c
+ ${CC} ${CFLAGS} -o mjd2hjd mjd2hjd.c gethmjd.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+ttag_lightcurve_channel_sum:
+ ${CC} ${CFLAGS} -o ttag_lightcurve_channel_sum ttag_lightcurve_channel_sum.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+ttag_lightcurve_mjd2hmjd : ttag_lightcurve_mjd2hmjd.c gethmjd.c
+ ${CC} ${CFLAGS} -o ttag_lightcurve_mjd2hmjd ttag_lightcurve_mjd2hmjd.c gethmjd.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+ttag_lightcurve_combine:
+ ${CC} ${CFLAGS} -o ttag_lightcurve_combine ttag_lightcurve_combine.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+idf_screen:
+ ${CC} ${CFLAGS} -o idf_screen idf_screen.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+remove_target_orbital_motion: remove_target_orbital_motion.c gethmjd.c
+ ${CC} ${CFLAGS} -o remove_target_orbital_motion remove_target_orbital_motion.c gethmjd.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+idf_cut:
+ ${CC} ${CFLAGS} -o idf_cut idf_cut.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+extract_jitter:
+ ${CC} ${CFLAGS} -o extract_jitter extract_jitter.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
diff --git a/src/analysis/Makefile.Linux64.orig b/src/analysis/Makefile.Linux64.orig
new file mode 100644
index 0000000..2ef8094
--- /dev/null
+++ b/src/analysis/Makefile.Linux64.orig
@@ -0,0 +1,141 @@
+
+CALFUSEDIR= ${PWD}/../..
+
+# Symbols for include directories
+FUSEINCLDIR= -I${CALFUSEDIR}/include
+
+# Symbols used for compiling
+CC= cc
+OPT= -g -Wall -DCFORTRAN -Dg77Fortran -Df2cFortran
+CFLAGS= ${OPT} ${FUSEINCLDIR}
+
+# Symbols used for creating shared binaries
+FUSEBINDIR= ${CALFUSEDIR}/bin
+FUSELIBDIR= -L${CALFUSEDIR}/lib
+LIBDIR= -L/opt/SUNWspro/lib
+FUSELIBS= -lsla -lcf
+LIBS= -lc -lm -lnsl -ldl -lgfortran -lcfitsio
+LDFLAGS= -Wl,-R${CALFUSEDIR}/lib
+
+# Binaries to be made
+
+BINS= cf_ttag_to_hist get_shift mjd2hjd cf_reflux \
+ idf_screen extract_jitter modhead \
+ cf_arith cf_combine cf_nvo cf_pack cf_xcorr \
+ idf_combine bpm_combine ttag_combine \
+ cf_coadd cf_make_all_exp \
+ remove_target_orbital_motion idf_cut \
+ ttag_lightcurve \
+ ttag_lightcurve_channel_sum \
+ ttag_lightcurve_mjd2hmjd \
+ ttag_lightcurve_combine \
+ ttag_lightcurve_periodogram
+
+all: ${BINS}
+ chmod g+rw ${BINS}
+
+install: all
+ /bin/cp ${BINS} cf_make_all_obs.csh cf_make_900_obs.csh ${FUSEBINDIR}
+
+clean:
+ /bin/rm -f *.o ${BINS}
+
+distclean:
+ /bin/rm -f *.o ${BINS}
+ cd ../../bin; /bin/rm -f ${BINS}
+
+cf_arith: cf_arith.c cf_wrspec7.c cf_wrspec_cf2.c
+ ${CC} ${CFLAGS} -o cf_arith cf_arith.c cf_wrspec7.c cf_wrspec_cf2.c\
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_coadd: cf_coadd.c
+ ${CC} ${CFLAGS} -o cf_coadd cf_coadd.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_combine: cf_combine.c cf_wrspec7.c
+ ${CC} ${CFLAGS} -o cf_combine cf_combine.c cf_wrspec7.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_make_all_exp:
+ ${CC} ${CFLAGS} -o cf_make_all_exp cf_make_all_exp.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_ttag_to_hist:
+ ${CC} ${CFLAGS} -o cf_ttag_to_hist cf_ttag_to_hist.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+ttag_combine:
+ ${CC} ${CFLAGS} -o ttag_combine ttag_combine.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+idf_combine:
+ ${CC} ${CFLAGS} -o idf_combine idf_combine.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+bpm_combine:
+ ${CC} ${CFLAGS} -o bpm_combine bpm_combine.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+get_shift:
+ ${CC} ${CFLAGS} -o get_shift get_shift.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_pack:
+ ${CC} ${CFLAGS} -o cf_pack cf_pack.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_nvo:
+ ${CC} ${CFLAGS} -o cf_nvo cf_nvo.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_reflux:
+ ${CC} ${CFLAGS} -o cf_reflux cf_reflux.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_xcorr:
+ ${CC} ${CFLAGS} -o cf_xcorr cf_xcorr.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+modhead:
+ ${CC} ${CFLAGS} -o modhead modhead.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+ttag_lightcurve:
+ ${CC} ${CFLAGS} -o ttag_lightcurve ttag_lightcurve.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+ttag_lightcurve_periodogram:
+ ${CC} ${CFLAGS} -o ttag_lightcurve_periodogram ttag_lightcurve_periodogram.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+mjd2hjd: mjd2hjd.c gethmjd.c
+ ${CC} ${CFLAGS} -o mjd2hjd mjd2hjd.c gethmjd.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+ttag_lightcurve_channel_sum:
+ ${CC} ${CFLAGS} -o ttag_lightcurve_channel_sum ttag_lightcurve_channel_sum.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+ttag_lightcurve_mjd2hmjd : ttag_lightcurve_mjd2hmjd.c gethmjd.c
+ ${CC} ${CFLAGS} -o ttag_lightcurve_mjd2hmjd ttag_lightcurve_mjd2hmjd.c gethmjd.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+ttag_lightcurve_combine:
+ ${CC} ${CFLAGS} -o ttag_lightcurve_combine ttag_lightcurve_combine.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+idf_screen:
+ ${CC} ${CFLAGS} -o idf_screen idf_screen.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+remove_target_orbital_motion: remove_target_orbital_motion.c gethmjd.c
+ ${CC} ${CFLAGS} -o remove_target_orbital_motion remove_target_orbital_motion.c gethmjd.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+idf_cut:
+ ${CC} ${CFLAGS} -o idf_cut idf_cut.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+extract_jitter:
+ ${CC} ${CFLAGS} -o extract_jitter extract_jitter.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
diff --git a/src/analysis/Makefile.MacOSX.orig b/src/analysis/Makefile.MacOSX.orig
new file mode 100644
index 0000000..5e40b35
--- /dev/null
+++ b/src/analysis/Makefile.MacOSX.orig
@@ -0,0 +1,145 @@
+
+FITSVER= 2.470
+CALFUSEDIR= ${PWD}/../..
+MACOSX_DEPLOYMENT_TARGET= 10.2
+
+# Symbols for include directories
+FUSEINCLDIR= -I${CALFUSEDIR}/include
+
+# Symbols used for compiling
+CC= cc
+OPT= -O3 -Wall -DCFORTRAN -Dg77Fortran -Df2cFortran
+CFLAGS= ${OPT} ${FUSEINCLDIR}
+
+# Symbols used for creating shared binaries
+FUSEBINDIR= ${CALFUSEDIR}/bin
+FUSELIBDIR= -L${CALFUSEDIR}/lib
+# FUSELIBS= -lsla -lcfitsio-${FITSVER} -lcf
+FUSELIBS= -lsla -lcfitsio -lcf
+LIBS= -lc -lm -ldl -L/sw/lib/ -lgfortran
+
+# Binaries to be made
+
+BINS= cf_ttag_to_hist get_shift mjd2hjd cf_reflux \
+ idf_screen extract_jitter modhead \
+ cf_arith cf_combine cf_nvo cf_pack cf_xcorr \
+ idf_combine bpm_combine ttag_combine \
+ cf_coadd cf_make_all_exp \
+ remove_target_orbital_motion idf_cut \
+ ttag_lightcurve \
+ ttag_lightcurve_channel_sum \
+ ttag_lightcurve_mjd2hmjd \
+ ttag_lightcurve_combine \
+ ttag_lightcurve_periodogram
+
+all: ${BINS}
+ chmod g+rw ${BINS}
+
+install:
+ MACOSX_DEPLOYMENT_TARGET="${MACOSX_DEPLOYMENT_TARGET}"; \
+ export MACOSX_DEPLOYMENT_TARGET; \
+ make all
+ /bin/cp ${BINS} cf_make_all_obs.csh cf_make_900_obs.csh ${FUSEBINDIR}
+
+clean:
+ /bin/rm -f *.o ${BINS}
+
+distclean:
+ /bin/rm -f *.o ${BINS}
+ cd ../../bin; /bin/rm -f ${BINS}
+
+cf_arith: cf_arith.c cf_wrspec7.c cf_wrspec_cf2.c
+ ${CC} ${CFLAGS} -o cf_arith cf_arith.c cf_wrspec7.c cf_wrspec_cf2.c\
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_coadd: cf_coadd.c
+ ${CC} ${CFLAGS} -o cf_coadd cf_coadd.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_combine: cf_combine.c cf_wrspec7.c
+ ${CC} ${CFLAGS} -o cf_combine cf_combine.c cf_wrspec7.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_make_all_exp:
+ ${CC} ${CFLAGS} -o cf_make_all_exp cf_make_all_exp.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_ttag_to_hist:
+ ${CC} ${CFLAGS} -o cf_ttag_to_hist cf_ttag_to_hist.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+ttag_combine:
+ ${CC} ${CFLAGS} -o ttag_combine ttag_combine.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+idf_combine:
+ ${CC} ${CFLAGS} -o idf_combine idf_combine.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+bpm_combine:
+ ${CC} ${CFLAGS} -o bpm_combine bpm_combine.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+get_shift:
+ ${CC} ${CFLAGS} -o get_shift get_shift.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_pack:
+ ${CC} ${CFLAGS} -o cf_pack cf_pack.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_nvo:
+ ${CC} ${CFLAGS} -o cf_nvo cf_nvo.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_reflux:
+ ${CC} ${CFLAGS} -o cf_reflux cf_reflux.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_xcorr:
+ ${CC} ${CFLAGS} -o cf_xcorr cf_xcorr.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+modhead:
+ ${CC} ${CFLAGS} -o modhead modhead.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+ttag_lightcurve:
+ ${CC} ${CFLAGS} -o ttag_lightcurve ttag_lightcurve.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+ttag_lightcurve_periodogram:
+ ${CC} ${CFLAGS} -o ttag_lightcurve_periodogram ttag_lightcurve_periodogram.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+mjd2hjd: mjd2hjd.c gethmjd.c
+ ${CC} ${CFLAGS} -o mjd2hjd mjd2hjd.c gethmjd.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+ttag_lightcurve_channel_sum:
+ ${CC} ${CFLAGS} -o ttag_lightcurve_channel_sum ttag_lightcurve_channel_sum.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+ttag_lightcurve_mjd2hmjd : ttag_lightcurve_mjd2hmjd.c gethmjd.c
+ ${CC} ${CFLAGS} -o ttag_lightcurve_mjd2hmjd ttag_lightcurve_mjd2hmjd.c gethmjd.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+ttag_lightcurve_combine:
+ ${CC} ${CFLAGS} -o ttag_lightcurve_combine ttag_lightcurve_combine.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+idf_screen:
+ ${CC} ${CFLAGS} -o idf_screen idf_screen.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+remove_target_orbital_motion: remove_target_orbital_motion.c gethmjd.c
+ ${CC} ${CFLAGS} -o remove_target_orbital_motion remove_target_orbital_motion.c gethmjd.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+idf_cut:
+ ${CC} ${CFLAGS} -o idf_cut idf_cut.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+extract_jitter:
+ ${CC} ${CFLAGS} -o extract_jitter extract_jitter.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
diff --git a/src/analysis/Makefile.Solaris.orig b/src/analysis/Makefile.Solaris.orig
new file mode 100644
index 0000000..52fb31b
--- /dev/null
+++ b/src/analysis/Makefile.Solaris.orig
@@ -0,0 +1,147 @@
+
+FITSVER= 2.470
+CALFUSEDIR= ${PWD}/../..
+
+# Symbols for include directories
+FUSEINCLDIR= -I${CALFUSEDIR}/include
+
+# Symbols used for compiling
+CC= cc
+# Romelfanger's optimizations
+# OPT= -fast -xO5 -xtarget=ultra2 -xarch=v8plusa
+#
+# SunWorld's optimizations
+# OPT= -p -v -xO2 -xdepend -xchip=ultra -xarch=generic
+OPT= -O -DCFORTRAN -KPIC -DSOLARIS
+CFLAGS= ${OPT} ${FUSEINCLDIR}
+
+# Symbols used for creating shared binaries
+FUSEBINDIR= ${CALFUSEDIR}/bin
+FUSELIBDIR= -L${CALFUSEDIR}/lib
+LIBDIR= -L/opt/SUNWspro/lib
+FUSELIBS= -lsla -lcfitsio-${FITSVER} -lcf
+LIBS= -lc -lm -lnsl -ldl -lsocket -lsunmath -lM77 -lF77
+LDFLAGS= -Wl,-R${CALFUSEDIR}/lib
+
+# Binaries to be made
+
+BINS= cf_ttag_to_hist get_shift mjd2hjd cf_reflux \
+ idf_screen extract_jitter modhead \
+ cf_arith cf_combine cf_nvo cf_pack cf_xcorr \
+ idf_combine bpm_combine ttag_combine \
+ cf_coadd cf_make_all_exp \
+ remove_target_orbital_motion idf_cut \
+ ttag_lightcurve \
+ ttag_lightcurve_channel_sum \
+ ttag_lightcurve_mjd2hmjd \
+ ttag_lightcurve_combine \
+ ttag_lightcurve_periodogram
+
+all: ${BINS}
+ chmod g+rw ${BINS}
+
+install: all
+ /bin/cp ${BINS} cf_make_all_obs.csh cf_make_900_obs.csh ${FUSEBINDIR}
+
+clean:
+ /bin/rm -f *.o ${BINS}
+
+distclean:
+ /bin/rm -f *.o ${BINS}
+ cd ../../bin; /bin/rm -f ${BINS}
+
+cf_arith: cf_arith.c cf_wrspec7.c cf_wrspec_cf2.c
+ ${CC} ${CFLAGS} -o cf_arith cf_arith.c cf_wrspec7.c cf_wrspec_cf2.c\
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_coadd: cf_coadd.c
+ ${CC} ${CFLAGS} -o cf_coadd cf_coadd.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_combine: cf_combine.c cf_wrspec7.c
+ ${CC} ${CFLAGS} -o cf_combine cf_combine.c cf_wrspec7.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_make_all_exp:
+ ${CC} ${CFLAGS} -o cf_make_all_exp cf_make_all_exp.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_ttag_to_hist:
+ ${CC} ${CFLAGS} -o cf_ttag_to_hist cf_ttag_to_hist.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+ttag_combine:
+ ${CC} ${CFLAGS} -o ttag_combine ttag_combine.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+idf_combine:
+ ${CC} ${CFLAGS} -o idf_combine idf_combine.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+bpm_combine:
+ ${CC} ${CFLAGS} -o bpm_combine bpm_combine.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+get_shift:
+ ${CC} ${CFLAGS} -o get_shift get_shift.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_pack:
+ ${CC} ${CFLAGS} -o cf_pack cf_pack.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_nvo:
+ ${CC} ${CFLAGS} -o cf_nvo cf_nvo.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_reflux:
+ ${CC} ${CFLAGS} -o cf_reflux cf_reflux.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_xcorr:
+ ${CC} ${CFLAGS} -o cf_xcorr cf_xcorr.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+modhead:
+ ${CC} ${CFLAGS} -o modhead modhead.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+ttag_lightcurve:
+ ${CC} ${CFLAGS} -o ttag_lightcurve ttag_lightcurve.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+ttag_lightcurve_periodogram:
+ ${CC} ${CFLAGS} -o ttag_lightcurve_periodogram ttag_lightcurve_periodogram.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+mjd2hjd: mjd2hjd.c gethmjd.c
+ ${CC} ${CFLAGS} -o mjd2hjd mjd2hjd.c gethmjd.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+ttag_lightcurve_channel_sum:
+ ${CC} ${CFLAGS} -o ttag_lightcurve_channel_sum ttag_lightcurve_channel_sum.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+ttag_lightcurve_mjd2hmjd : ttag_lightcurve_mjd2hmjd.c gethmjd.c
+ ${CC} ${CFLAGS} -o ttag_lightcurve_mjd2hmjd ttag_lightcurve_mjd2hmjd.c gethmjd.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+ttag_lightcurve_combine:
+ ${CC} ${CFLAGS} -o ttag_lightcurve_combine ttag_lightcurve_combine.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+idf_screen:
+ ${CC} ${CFLAGS} -o idf_screen idf_screen.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+remove_target_orbital_motion: remove_target_orbital_motion.c gethmjd.c
+ ${CC} ${CFLAGS} -o remove_target_orbital_motion remove_target_orbital_motion.c gethmjd.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+idf_cut:
+ ${CC} ${CFLAGS} -o idf_cut idf_cut.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+extract_jitter:
+ ${CC} ${CFLAGS} -o extract_jitter extract_jitter.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
diff --git a/src/analysis/Makefile.orig.orig b/src/analysis/Makefile.orig.orig
new file mode 100644
index 0000000..52fb31b
--- /dev/null
+++ b/src/analysis/Makefile.orig.orig
@@ -0,0 +1,147 @@
+
+FITSVER= 2.470
+CALFUSEDIR= ${PWD}/../..
+
+# Symbols for include directories
+FUSEINCLDIR= -I${CALFUSEDIR}/include
+
+# Symbols used for compiling
+CC= cc
+# Romelfanger's optimizations
+# OPT= -fast -xO5 -xtarget=ultra2 -xarch=v8plusa
+#
+# SunWorld's optimizations
+# OPT= -p -v -xO2 -xdepend -xchip=ultra -xarch=generic
+OPT= -O -DCFORTRAN -KPIC -DSOLARIS
+CFLAGS= ${OPT} ${FUSEINCLDIR}
+
+# Symbols used for creating shared binaries
+FUSEBINDIR= ${CALFUSEDIR}/bin
+FUSELIBDIR= -L${CALFUSEDIR}/lib
+LIBDIR= -L/opt/SUNWspro/lib
+FUSELIBS= -lsla -lcfitsio-${FITSVER} -lcf
+LIBS= -lc -lm -lnsl -ldl -lsocket -lsunmath -lM77 -lF77
+LDFLAGS= -Wl,-R${CALFUSEDIR}/lib
+
+# Binaries to be made
+
+BINS= cf_ttag_to_hist get_shift mjd2hjd cf_reflux \
+ idf_screen extract_jitter modhead \
+ cf_arith cf_combine cf_nvo cf_pack cf_xcorr \
+ idf_combine bpm_combine ttag_combine \
+ cf_coadd cf_make_all_exp \
+ remove_target_orbital_motion idf_cut \
+ ttag_lightcurve \
+ ttag_lightcurve_channel_sum \
+ ttag_lightcurve_mjd2hmjd \
+ ttag_lightcurve_combine \
+ ttag_lightcurve_periodogram
+
+all: ${BINS}
+ chmod g+rw ${BINS}
+
+install: all
+ /bin/cp ${BINS} cf_make_all_obs.csh cf_make_900_obs.csh ${FUSEBINDIR}
+
+clean:
+ /bin/rm -f *.o ${BINS}
+
+distclean:
+ /bin/rm -f *.o ${BINS}
+ cd ../../bin; /bin/rm -f ${BINS}
+
+cf_arith: cf_arith.c cf_wrspec7.c cf_wrspec_cf2.c
+ ${CC} ${CFLAGS} -o cf_arith cf_arith.c cf_wrspec7.c cf_wrspec_cf2.c\
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_coadd: cf_coadd.c
+ ${CC} ${CFLAGS} -o cf_coadd cf_coadd.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_combine: cf_combine.c cf_wrspec7.c
+ ${CC} ${CFLAGS} -o cf_combine cf_combine.c cf_wrspec7.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_make_all_exp:
+ ${CC} ${CFLAGS} -o cf_make_all_exp cf_make_all_exp.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_ttag_to_hist:
+ ${CC} ${CFLAGS} -o cf_ttag_to_hist cf_ttag_to_hist.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+ttag_combine:
+ ${CC} ${CFLAGS} -o ttag_combine ttag_combine.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+idf_combine:
+ ${CC} ${CFLAGS} -o idf_combine idf_combine.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+bpm_combine:
+ ${CC} ${CFLAGS} -o bpm_combine bpm_combine.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+get_shift:
+ ${CC} ${CFLAGS} -o get_shift get_shift.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_pack:
+ ${CC} ${CFLAGS} -o cf_pack cf_pack.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_nvo:
+ ${CC} ${CFLAGS} -o cf_nvo cf_nvo.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_reflux:
+ ${CC} ${CFLAGS} -o cf_reflux cf_reflux.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_xcorr:
+ ${CC} ${CFLAGS} -o cf_xcorr cf_xcorr.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+modhead:
+ ${CC} ${CFLAGS} -o modhead modhead.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+ttag_lightcurve:
+ ${CC} ${CFLAGS} -o ttag_lightcurve ttag_lightcurve.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+ttag_lightcurve_periodogram:
+ ${CC} ${CFLAGS} -o ttag_lightcurve_periodogram ttag_lightcurve_periodogram.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+mjd2hjd: mjd2hjd.c gethmjd.c
+ ${CC} ${CFLAGS} -o mjd2hjd mjd2hjd.c gethmjd.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+ttag_lightcurve_channel_sum:
+ ${CC} ${CFLAGS} -o ttag_lightcurve_channel_sum ttag_lightcurve_channel_sum.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+ttag_lightcurve_mjd2hmjd : ttag_lightcurve_mjd2hmjd.c gethmjd.c
+ ${CC} ${CFLAGS} -o ttag_lightcurve_mjd2hmjd ttag_lightcurve_mjd2hmjd.c gethmjd.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+ttag_lightcurve_combine:
+ ${CC} ${CFLAGS} -o ttag_lightcurve_combine ttag_lightcurve_combine.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+idf_screen:
+ ${CC} ${CFLAGS} -o idf_screen idf_screen.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+remove_target_orbital_motion: remove_target_orbital_motion.c gethmjd.c
+ ${CC} ${CFLAGS} -o remove_target_orbital_motion remove_target_orbital_motion.c gethmjd.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+idf_cut:
+ ${CC} ${CFLAGS} -o idf_cut idf_cut.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+extract_jitter:
+ ${CC} ${CFLAGS} -o extract_jitter extract_jitter.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
diff --git a/src/analysis/bpm_combine.c b/src/analysis/bpm_combine.c
new file mode 100644
index 0000000..86ec7d0
--- /dev/null
+++ b/src/analysis/bpm_combine.c
@@ -0,0 +1,548 @@
+
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSEbpm_combine
+ *****************************************************************************
+ *
+ * Synopsis: bpm_combine output_bpm_file combined_idf_file
+ *
+ *
+ * Description: Creates a bpm file associated with a combined idf file
+ * It gets the names of the idf files from the combined idf
+ * file header. It gets the name of the bpm files from the idf
+ * files header. These bpm files are then combined using the
+ * offset information provided in the combined idf file header.
+ * The BPM_CAL keyword is updated in the combined idf file
+ * header.
+ *
+ * WARNING: all the single exposure IDF files (who took part in
+ * the creation of the idf_file) and their associated BPM files
+ * must be in the working directory.
+ *
+ *
+ * History: 12/03/03 bjg v1.0 Begin work.
+ * 12/05/03 bjg First version that compiles
+ *
+ * 12/10/03 bjg Accept now only idf as parameter
+ * Updated NSPEC keyword and
+ * SPECxxx, WOFFLxxx, WOFFSxxx
+ * keywords
+ * Removed paths in filenames
+ * written into header.
+ * 04/05/04 bjg Remove unused variables
+ * Change formats to match arg
+ * types in printf
+ * 05/25/04 bjg Skip when BPM_CAL unpopulated
+ * or not present.
+ * 04/13/05 wvd v2.0 combined_idf_file may be
+ * replaced by a file containing
+ * a list of BPM files. The first
+ * line of this file must contain
+ * the number of entries that
+ * follow.
+ *
+ ****************************************************************************/
+
+
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <time.h>
+#include "calfuse.h"
+
+typedef char filename[FLEN_CARD];
+
+
+
+static char CF_PRGM_ID[]= "bpm_combine";
+static char CF_VER_NUM[]= "2.0";
+
+int main(int argc,char *argv[]){
+
+ char date[FLEN_CARD]={'\0'};
+ char rootname[FLEN_CARD];
+ char *corrected_filename;
+ char *string_pointer;
+
+ int felem_hdu2;
+
+ char stime[FLEN_CARD],keyword[FLEN_CARD];
+
+
+
+ time_t vtime;
+
+ fitsfile *infits,*outfits,*idffits;
+ char *has_bpm_list;
+ filename *filelist;
+ double *expstartlist;
+ double *expendlist;
+ long *neventslist;
+ double *sicshiftlist;
+ double *lifshiftlist;
+ double *exptimelist;
+
+ double delta_t;
+
+ filename tempstring,tempstring2;
+ double tempdouble;
+ long templong;
+ float tempfloat;
+ char tempchar;
+
+ double minexpstart;
+ int minindex;
+
+ int nfiles;
+
+ int intnull=0,anynull;
+ int ncol;
+
+ int status=0;
+ int hdutype=0;
+ int tref = 0;
+
+ long nevents=0;
+ long n_real_events=0;
+ long i,j,istart;
+
+
+ float * xfield,*yfield,*weightfield,*lambdafield;
+ char *channelfield;
+
+ char fmt_byte[FLEN_CARD],fmt_float[FLEN_CARD],fmt_short[FLEN_CARD];
+
+ double totalexptime=0, rawtime=0;
+ long neventscreened=0, neventscreenedpha=0;
+ float timescreened=0, timesaa=0, timelowlimbangle=0, timeburst=0, timejitter=0,timenight=0;
+
+
+
+ int hdu2_tfields=5;
+
+ char hdu2_extname[]="POTHOLE_DATA"; /* Name of this extension */
+
+ char *hdu2_ttype[]={"X", "Y", "CHANNEL", "WEIGHT", "LAMBDA"};
+
+ char *hdu2_tform[5]; /* We'll assign values when we know
+ the number of elements in the data set. */
+
+
+ char *hdu2_tunit[]={"PIXELS", "PIXELS", "UNITLESS", "UNITLESS", "ANGSTROMS"};
+
+
+ FILE *fp=NULL;
+ char line[FLEN_FILENAME];
+ int maxline=FLEN_FILENAME;
+
+
+ if (argc != 3) {
+ printf("Incorrect number of arguments.\n");
+ printf("Calling sequence:bpm_combine bpm_file combined_idf_file\n");
+ printf("Final argument may be the name of a file containing a list of BPM files.\n");
+ printf("First line must be number of BPM files in list.\n");
+ exit(1);
+ }
+
+ /* Initialize error checking. */
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Started execution.");
+
+ /* get and display time */
+ vtime = time(NULL) ;
+ strcpy(stime,ctime(&vtime));
+
+ fits_open_file(&idffits,argv[2],READONLY,&status);
+ if (status) {
+ status = 0;
+ if ((fp = fopen(argv[2], "r")) == NULL) {
+ printf("Can't open file %s\n", argv[2]);
+ return 1;
+ }
+ if ((fgets(line, maxline, fp)) == NULL) {
+ printf("Error reading file %s\n", argv[2]);
+ return 1;
+ }
+ sscanf(line,"%d",&nfiles);
+ }
+ else FITS_read_key(idffits,TINT,"NSPEC",&nfiles,NULL,&status);
+
+ filelist = (filename *)malloc(nfiles*sizeof(filename));
+ neventslist = (long *)malloc(nfiles*sizeof(long));
+ sicshiftlist = (double *)calloc((size_t)nfiles,sizeof(double));
+ lifshiftlist = (double *)calloc((size_t)nfiles,sizeof(double));
+ expstartlist = (double *)malloc(nfiles*sizeof(double));
+ expendlist = (double *)malloc(nfiles*sizeof(double));
+ exptimelist = (double *)malloc(nfiles*sizeof(double));
+ has_bpm_list = (char *)malloc(nfiles*sizeof(char));
+
+ for (i=0; i<nfiles;i++) {
+
+ has_bpm_list[i]=1;
+
+ if (fp != NULL) {
+ if((fgets(line, maxline, fp)) == NULL) {
+ printf("Error reading %s\n", argv[2]);
+ return 1;
+ }
+ sscanf(line, "%s", filelist[i]);
+ }
+ else {
+ /* Read name of individual IDF file from combined file header. */
+ sprintf(tempstring, "SPEC%.3ld", i+1);
+ FITS_read_key(idffits,TSTRING,tempstring,tempstring2,NULL,&status);
+ /* Open individual IDF file and read name of associated BPM file. */
+ FITS_open_file(&infits,tempstring2,READONLY,&status);
+ fits_read_key(infits,TSTRING,"BPM_CAL",filelist[i],NULL,&status);
+ if (status) {
+ status=0;
+ FITS_close_file(infits,&status);
+ printf("BPM_CAL keyword not found in IDF %s; skipping.\n",tempstring2);
+ has_bpm_list[i]=0;
+ filelist[i][0]='\0';
+ continue;
+ }
+ /* Close individual IDF file. */
+ FITS_close_file(infits,&status);
+
+ /* These keywords don't apply to a user-provided list of BPM files. */
+ sprintf(tempstring, "WOFFL%.3ld", i+1);
+ FITS_read_key(idffits,TDOUBLE,tempstring,&lifshiftlist[i],NULL,&status);
+
+ sprintf(tempstring, "WOFFS%.3ld", i+1);
+ FITS_read_key(idffits,TDOUBLE,tempstring,&sicshiftlist[i],NULL,&status);
+ }
+
+ /* Open individual BPM file. */
+ fits_open_file(&infits,filelist[i],READONLY,&status);
+ if (status) {
+ status=0;
+ printf("Could not open BPM %s for IDF %s; BPM_CAL keyword may be incorrectly populated; skipping.\n",filelist[i],tempstring2);
+ has_bpm_list[i]=0;
+ filelist[i][0]='\0';
+ continue;
+ }
+
+ FITS_read_key(infits,TDOUBLE,"EXPSTART",&(expstartlist[i]),NULL,&status);
+ FITS_read_key(infits,TDOUBLE,"EXPEND",&(expendlist[i]),NULL,&status);
+
+ FITS_read_key(infits,TDOUBLE,"EXPTIME",&(exptimelist[i]),NULL,&status);
+ totalexptime+=exptimelist[i];
+
+ FITS_read_key(infits,TDOUBLE,"RAWTIME",&(tempdouble),NULL,&status);
+ rawtime+=tempdouble;
+
+ FITS_read_key(infits,TLONG,"NBADEVNT",&templong,NULL,&status);
+ neventscreened+=templong;
+ FITS_read_key(infits,TLONG,"NBADPHA",&templong,NULL,&status);
+ neventscreenedpha+=templong;
+
+ FITS_read_key(infits,TFLOAT,"EXP_BAD",&tempfloat,NULL,&status);
+ timescreened+=tempfloat;
+ FITS_read_key(infits,TFLOAT,"EXP_SAA",&tempfloat,NULL,&status);
+ timesaa+=tempfloat;
+ FITS_read_key(infits,TFLOAT,"EXP_LIM",&tempfloat,NULL,&status);
+ timelowlimbangle+=tempfloat;
+ FITS_read_key(infits,TFLOAT,"EXP_BRST",&tempfloat,NULL,&status);
+ timeburst+=tempfloat;
+ FITS_read_key(infits,TFLOAT,"EXP_JITR",&tempfloat,NULL,&status);
+ timejitter+=tempfloat;
+ FITS_read_key(infits,TFLOAT,"EXPNIGHT",&tempfloat,NULL,&status);
+ timenight+=tempfloat;
+
+ FITS_read_key(infits,TFLOAT,"NEVENTS",&templong,NULL,&status);
+ n_real_events+=templong;
+
+
+ FITS_movabs_hdu(infits,2,&hdutype,&status);
+
+ FITS_read_key(infits,TSTRING,"TFORM1",&tempstring,NULL,&status);
+ sscanf(tempstring,"%ld%c",&neventslist[i],&tempchar);
+ nevents+=neventslist[i];
+
+ FITS_close_file(infits,&status);
+
+ }
+
+ if (fp != NULL) fclose(fp);
+ else FITS_close_file(idffits,&status);
+
+
+
+
+
+
+ printf("---SORTING INPUT FILES IN TIME ORDER---\n") ;
+
+ for (i=0; i<nfiles-1;i++) {
+ if (!(has_bpm_list[i])) continue;
+ minexpstart=expstartlist[i];
+ minindex=i;
+ for (j=i+1; j<nfiles;j++) {
+ if (!(has_bpm_list[j])) continue;
+ if (expstartlist[j]<minexpstart){
+ minexpstart=expstartlist[j];
+ minindex=j;
+ }
+ }
+
+ strcpy(tempstring,filelist[minindex]);
+ strcpy(filelist[minindex],filelist[i]);
+ strcpy(filelist[i],tempstring);
+
+ tempdouble=expstartlist[minindex];
+ expstartlist[minindex]=expstartlist[i];
+ expstartlist[i]=tempdouble;
+
+ tempdouble=expendlist[minindex];
+ expendlist[minindex]=expendlist[i];
+ expendlist[i]=tempdouble;
+
+ tempdouble=exptimelist[minindex];
+ exptimelist[minindex]=exptimelist[i];
+ exptimelist[i]=tempdouble;
+
+ templong=neventslist[minindex];
+ neventslist[minindex]=neventslist[i];
+ neventslist[i]=templong;
+
+ tempdouble=lifshiftlist[minindex];
+ lifshiftlist[minindex]=lifshiftlist[i];
+ lifshiftlist[i]=tempdouble;
+
+ tempdouble=sicshiftlist[minindex];
+ sicshiftlist[minindex]=sicshiftlist[i];
+ sicshiftlist[i]=tempdouble;
+
+ }
+
+ istart=-1;
+
+ for (i=0; i<nfiles;i++) {
+ if (!(has_bpm_list[i])) continue;
+ printf("%s %7.1f %7.1f %4ld %f %f\n",filelist[i],expstartlist[i],expendlist[i],neventslist[i],lifshiftlist[i],sicshiftlist[i]);
+ if (istart==-1) istart=i;
+ }
+ printf("\n");
+
+ if (istart==-1) {
+ printf("No BPM files found. Exiting\n");
+ exit(0);
+ }
+
+
+
+
+ printf("--------CREATING OUTPUT FILE-----\n");
+
+ FITS_open_file(&infits,filelist[istart],READONLY,&status);
+ FITS_create_file(&outfits,argv[1],&status);
+
+
+
+
+ printf("--------WRITING MAIN HEADER-----\n");
+
+ FITS_copy_hdu(infits,outfits,0,&status);
+
+ FITS_read_key(infits,TSTRING,"ROOTNAME",rootname,NULL,&status);
+
+ rootname[8]='9';
+ rootname[9]='9';
+ rootname[10]='9';
+
+ FITS_update_key(outfits,TSTRING,"ROOTNAME",rootname,NULL,&status);
+
+ string_pointer=strrchr(argv[1],'/');
+ if (string_pointer==NULL) corrected_filename=argv[1];
+ else corrected_filename=&(string_pointer[1]);
+
+ FITS_update_key(outfits,TSTRING,"FILENAME",corrected_filename,NULL,&status);
+
+ FITS_update_key(outfits,TSTRING,"EXP_ID","999",NULL,&status);
+
+ string_pointer=strrchr(argv[2],'/');
+ if (string_pointer==NULL) corrected_filename=argv[2];
+ else corrected_filename=&(string_pointer[1]);
+
+
+ if (fp == NULL)
+ FITS_update_key(outfits,TSTRING,"IDF_FILE",corrected_filename,NULL,&status);
+
+
+
+
+ fits_get_system_time(date, &tref, &status);
+
+ FITS_update_key(outfits,TSTRING,"DATE",date,NULL,&status);
+
+ FITS_update_key(outfits,TDOUBLE,"EXPEND",&expendlist[nfiles-1],NULL,&status);
+ FITS_update_key(outfits,TDOUBLE,"EXPTIME",&totalexptime,NULL,&status);
+ FITS_update_key(outfits,TDOUBLE,"RAWTIME",&rawtime,NULL,&status);
+ FITS_update_key(outfits,TLONG,"NEVENTS",&n_real_events,NULL,&status);
+ FITS_update_key(outfits,TLONG,"NBADEVNT",&neventscreened,NULL,&status);
+ FITS_update_key(outfits,TLONG,"NBADPHA",&neventscreenedpha,NULL,&status);
+ FITS_update_key(outfits,TFLOAT,"EXP_BAD",&(timescreened),NULL,&status);
+ FITS_update_key(outfits,TFLOAT,"EXP_SAA",&(timesaa),NULL,&status);
+ FITS_update_key(outfits,TFLOAT,"EXP_LIM",&(timelowlimbangle),NULL,&status);
+ FITS_update_key(outfits,TFLOAT,"EXP_BRST",&(timeburst),NULL,&status);
+ FITS_update_key(outfits,TFLOAT,"EXP_JITR",&(timejitter),NULL,&status);
+ FITS_update_key(outfits,TFLOAT,"EXPNIGHT",&(timenight),NULL,&status);
+
+ fits_write_history(outfits," COMBINED WITH BPM_COMBINE ",&status);
+
+ FITS_update_key(outfits,TINT,"NSPEC",&nfiles,NULL,&status);
+
+ for (i=0;i<nfiles;i++){
+
+ if (!(has_bpm_list[i])) continue;
+
+ string_pointer=strrchr(filelist[i],'/');
+ if (string_pointer==NULL) corrected_filename=filelist[i];
+ else corrected_filename=&(string_pointer[1]);
+
+ sprintf(keyword, "SPEC%.3ld", i+1);
+ FITS_update_key(outfits,TSTRING,keyword,corrected_filename,NULL,&status);
+ sprintf(keyword, "WOFFL%.3ld", i+1);
+ FITS_update_key(outfits,TFLOAT,keyword,&lifshiftlist[i],NULL,&status);
+ sprintf(keyword, "WOFFS%.3ld", i+1);
+ FITS_update_key(outfits,TFLOAT,keyword,&sicshiftlist[i],NULL,&status);
+
+
+
+ }
+
+
+
+
+ FITS_close_file(infits,&status);
+
+ printf("--------PREPARING EVENTS LIST HDU-----\n");
+
+ /* Generate the tform array */
+ sprintf(fmt_byte, "%ldB", nevents);
+ sprintf(fmt_float, "%ldE", nevents);
+ sprintf(fmt_short, "%ldI", nevents);
+
+ hdu2_tform[0] = fmt_float;
+ hdu2_tform[1] = fmt_float;
+ hdu2_tform[2] = fmt_byte;
+ hdu2_tform[3] = fmt_float;
+ hdu2_tform[4] = fmt_float;
+
+
+
+ /* Append a new empty binary table to the output file */
+ FITS_create_tbl(outfits, BINARY_TBL, 1, hdu2_tfields, hdu2_ttype, hdu2_tform,
+ hdu2_tunit, hdu2_extname, &status);
+
+
+
+
+
+
+
+ printf("--------COMBINING HDU-----\n");
+ felem_hdu2=1;
+ for (i=0;i<nfiles;i++){
+ if (!(has_bpm_list[i])) continue;
+
+
+ delta_t=(expstartlist[i]-expstartlist[0])*3600*24;
+
+ FITS_open_file(&infits,filelist[i],READONLY,&status);
+
+
+ FITS_movabs_hdu(infits, 2, &hdutype, &status);
+ FITS_movabs_hdu(outfits, 2, &hdutype, &status);
+ printf("Processing file %s\n",filelist[i]);
+
+ xfield=(float *)malloc(neventslist[i]*sizeof(float));
+ yfield=(float *)malloc(neventslist[i]*sizeof(float));
+ channelfield=(char *)malloc(neventslist[i]*sizeof(char));
+ weightfield=(float *)malloc(neventslist[i]*sizeof(float));
+ lambdafield=(float *)malloc(neventslist[i]*sizeof(float));
+
+
+ FITS_get_colnum(infits, TRUE, "X", &ncol, &status);
+ FITS_read_col(infits, TFLOAT, ncol, 1, 1, neventslist[i], &intnull,
+ xfield, &anynull, &status);
+
+
+ FITS_get_colnum(infits, TRUE, "Y", &ncol, &status);
+ FITS_read_col(infits, TFLOAT, ncol, 1, 1, neventslist[i], &intnull,
+ yfield, &anynull, &status);
+
+
+ FITS_get_colnum(infits, TRUE, "CHANNEL", &ncol, &status);
+ FITS_read_col(infits, TBYTE, ncol, 1, 1, neventslist[i], &intnull,
+ channelfield, &anynull, &status);
+
+
+ FITS_get_colnum(infits, TRUE, "WEIGHT", &ncol, &status);
+ FITS_read_col(infits, TFLOAT, ncol, 1, 1, neventslist[i], &intnull,
+ weightfield, &anynull, &status);
+
+
+ FITS_get_colnum(infits, TRUE, "LAMBDA", &ncol, &status);
+ FITS_read_col(infits, TFLOAT, ncol, 1, 1, neventslist[i], &intnull,
+ lambdafield, &anynull, &status);
+
+
+
+
+ for (j=0;j<neventslist[i];j++){
+ if (channelfield[j]<5) lambdafield[j]=lambdafield[j]+lifshiftlist[i];
+ if (channelfield[j]>4) lambdafield[j]=lambdafield[j]+sicshiftlist[i];
+ weightfield[j]=weightfield[j]*exptimelist[i]/totalexptime;
+ }
+
+
+
+ FITS_write_col(outfits, TFLOAT, 1, 1, felem_hdu2, neventslist[i], xfield, &status);
+ FITS_write_col(outfits, TFLOAT, 2, 1, felem_hdu2, neventslist[i], yfield, &status);
+ FITS_write_col(outfits, TBYTE, 3, 1, felem_hdu2, neventslist[i], channelfield, &status);
+ FITS_write_col(outfits, TFLOAT, 4, 1, felem_hdu2, neventslist[i], weightfield, &status);
+ FITS_write_col(outfits, TFLOAT, 5, 1, felem_hdu2, neventslist[i], lambdafield, &status);
+
+
+ free(xfield);
+ free(yfield);
+ free(channelfield);
+ free(weightfield);
+ free(lambdafield);
+
+ felem_hdu2+=neventslist[i];
+
+ FITS_close_file(infits,&status);
+
+
+ }
+
+ printf("--------CLOSING OUTPUT FILE-----\n");
+
+
+ FITS_close_file(outfits,&status);
+
+
+ if (fp == NULL) {
+ FITS_open_file(&idffits,argv[2],READWRITE,&status);
+
+ string_pointer=strrchr(argv[1],'/');
+ if (string_pointer==NULL) corrected_filename=argv[1];
+ else corrected_filename=&(string_pointer[1]);
+
+ FITS_update_key(idffits,TSTRING,"BPM_CAL",corrected_filename,NULL,&status);
+ FITS_close_file(idffits,&status);
+ }
+
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished execution.");
+ return EXIT_SUCCESS;
+
+}
+
+
diff --git a/src/analysis/cf_arith.c b/src/analysis/cf_arith.c
new file mode 100644
index 0000000..94e40e9
--- /dev/null
+++ b/src/analysis/cf_arith.c
@@ -0,0 +1,2154 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_arith infile1 op infile2 outfile
+ *
+ * Description: This is a generic utility program that performs arithmetic
+ * operations on two FUSE FITS files. The files must
+ * contain extracted FUSE spectra.
+ * Input files are assumed to have 6 columns in a binary
+ * table in the first extension (wavelength, flux, error, quality,
+ * counts, counts_error). Files with 4 columns (no counts or
+ * counts_error) are also handled for compatibility with
+ * pipeline output written prior to 12/1/99.
+ *
+ * (The next paragraph is included for completeness, but is
+ * not expected to be applicable to most users).
+ * If infile1 and infile2 have the same number of extensions,
+ * the specified operation is performed for each extension
+ * (outfile_ext_i = infile1_ext_i op infile2_ext_i).
+ * If infile2 has a single extension, the operation is performed
+ * for each extension in infile1 with the extension in infile2
+ * (outfile_ext_i = infile1_ext_i op infile2_ext_1).
+ *
+ * infile1 and infile2 must have the same number of elements
+ * in each binary table (ie. binned by the same factor).
+ * infile2 may be a numeric string instead of a file.
+ * The header in outfile will be the same as for infile1,
+ * plus some HISTORY lines.
+ * No check is performed that the wavelengths in infile2 match
+ * those in infile1.
+ * It is assumed that error arrays contain errors, not variances.
+ *
+ * If infile2 is the string "EXPTIME" (without the quotes)
+ * operand 2 is set to the exposure time in the header of infile1.
+ *
+ * valid choices for the operation "op" are:
+ * +, -, *, /, avg_t, avg_s, repl_d, repl_e, boxcar, delta,
+ * min, max, shift, bin, deriv, addnoise
+ *
+ * avg_t = average weighted by exposure time
+ * avg_s = average weighted by sigma (errors)
+ * avg_t, avg_s valid only if infile2 is a fits file.
+ * repl_d = replace data in operand1 with data from operand2
+ * repl_e = replace errors in operand1 with errors from operand2
+ * boxcar = smooth data in operand1 with moving boxcar
+ * of width operand2. If operand2 is a FITS file,
+ * the "FLUX" column is used as the width. This
+ * permits application of variable smoothing.
+ * delta = adds delta functions to operand 1 every 100 pixels;
+ * height is equal to operand 2 (must be a scalar).
+ * Used only for creating test spectra.
+ * shift = shift data by the specified number of pixels. Operand2
+ * must be an integer. A positive shift moves the data
+ * to higher pixel numbers.
+ * bin = bin data by the specified number of pixels. Operand2
+ * must be an integer. The flux column is averaged, the
+ * counts column is summed.
+ * deriv = take derivative of input: out[i] = in[i+1] - in[i]
+ * operand 2 is ignored for this!
+ * addnoise = a uniformly distributed random number in the range
+ * +/-operand2 is added pixel-by-pixel to the flux
+ * Used only for creating test spectra.
+ *
+ * If op = "+" and the second operand is a file (not a scalar),
+ * or if op = "avg_t" or if op = "avg_s", the exposure
+ * time in the output is the sum of the exposure times
+ * in the input files.
+ *
+ * For op1 min op2 out: op1 is replaced by op2 if op1 < op2.
+ * (op2 sets a min value for the flux)
+ * For op1 max op2 out: op1 is replaced by op2 if op1 > op2.
+ * (op2 sets a max value for the flux)
+ *
+ * The same operations are performed on the counts/countserr
+ * columns as on the flux/fluxerr columns. In most cases this
+ * leads to reasonable results. However, in a few cases, such
+ * as addition or subtraction of a scalar, the result is likely
+ * to be meaningless for either the flux or counts columns.
+ * Exceptions: MIN, MAX, REPL_D, REPL_E, DELTA, only affect
+ * the flux and fluxerr columns. The counts and countserror
+ * columns are unaffected.
+ *
+ * Note that avg_t and avg_s also average the counts; in some
+ * cases the user may have really wanted the counts to be summed!
+ *
+ * NOTE: Must enclose * in quotes (ie. "*") or the shell
+ * will expand it into filenames in the pwd!
+ *
+ *
+ * History: 08/15/99 jwk started work
+ * 10/25/99 v1.1 jwk avg_t,_s sum exp times in output
+ * 11/30/99 jwk handle either 4 or 6-column files
+ * 01/06/00 v1.2 jwk add bin option
+ * 05/01/00 v1.3 jwk handle byte or short quality flags
+ * 09/20/00 v1.4 jwk add derivative operation
+ * 10/11/00 v1.5 jwk update FILENAME keyword in output file
+ * 12/11/00 v1.6 jwk improve numeric accuracy of error prop.
+ * 01/23/01 v1.7 jwk smooth quality rather than sum when
+ * doing BOXCAR, to avoid overflow of
+ * short datasize.
+ * 10/10/01 v1.8 jwk add handling of eff area files
+ * 05/30/03 v1.9 jwk change timeval from long to time_t; put
+ * ifdef SOLARIS/endif around ieee_retro
+ * spec field width for final timestamp
+ * (make consistent with calfuse version)
+ * 02/04/04 v2.0 jwk implement addnoise option
+ * 02/25/04 v2.1 jwk check for zero errors in avg_s code
+ * 03/06/04 v3.0 jwk add support for calfuse 3.0 files
+ * 04/05/04 v3.1 bjg Declarations for cf_wrspec7 and
+ * cf_wrspec_cf2
+ * Include ctype.h
+ * Correct formats to match argument
+ * types in printf
+ * Remove unused variable long npix
+ * Casting to char * arg of setstate
+ * Remove local definitions of
+ * initstate() and setstate()
+ * Correct use of cf_wrspec7
+ * 08/26/05 v3.2 wvd Change name from cf_arith3 to cf_arith.
+ * If no arguments, don't return error.
+ * Just print message and exit.\
+ * 08/27/07 v3.3 bot Added L to long l.399 and 537
+ *
+ ****************************************************************************/
+
+#include <time.h>
+#include <math.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include "calfuse.h"
+#include <ctype.h>
+
+#define PLUS 1
+#define MINUS 2
+#define MULT 3
+#define DIV 4
+#define AVG_T 5
+#define AVG_S 6
+#define REPL_D 7
+#define REPL_E 8
+#define BOXCAR 9
+#define DELTA 10
+#define MIN 11
+#define MAX 12
+#define SHIFT 13
+#define BIN 14
+#define DERIV 15
+#define ADDNOISE 16
+
+/* arbitrary value for error when no data is present */
+#define DEF_ERROR 1.e-3
+
+#define MAX_RAND 0x7fffffff
+
+static char CF_PRGM_ID[] = "cf_arith";
+static char CF_VER_NUM[] = "3.3";
+
+
+void cf_wrspec7(fitsfile *outfits, long npts, float *wave, float *flux,
+ float *error, long *counts, float *weights,
+ float *bkgd,short *pothole);
+void cf_wrspec_cf2(fitsfile *outfits, int npts, float *wave,
+ float *spec, float *errs, short *qual,
+ float *counts, float *cntserr, int ncol,
+ int areaflag);
+
+
+
+
+int main(int argc, char *argv[])
+{
+ char *timestr;
+ time_t timeval;
+ char infile1[80], infile2[80], outfile[80];
+ char comment[FLEN_CARD];
+ char expt_comment[FLEN_CARD];
+ char errstr[80];
+ char datatype[20];
+ int areaflag;
+ int nbin;
+ int next_1, next_2;
+ int status=0, anynull=0, intnull=0;
+ int hdutype_1, hdutype_2, hdutype_o;
+ int hdunum_1, hdunum_2, hdunum_o;
+ long npix_1, npix_2, npix_o;
+ long naxis2_1, naxis2_2;
+ int fluxcol, wavecol, errorcol, qualcol, cntscol, cntserrcol;
+ int bkgdcol, wgtscol;
+ int tfields_1, tfields_2;
+ int opcode;
+ int cf_version;
+ long i, j, k, k1, k2;
+ int arg2_scalar;
+ int p_shift;
+ float arg2_val;
+ float swave, sflux, sferr, scnts, scerr, spix;
+ float sbkgd, swgts;
+ long lqual, slcts;
+ short squal;
+ short *qual1, *qual2, *qual_o;
+ float *wave1, *flux1, *flxerr1, *cnts1, *cntserr1;
+ float *flux2, *flxerr2, *cnts2, *cntserr2;
+ float *flux_o, *flxerr_o, *cnts_o, *cntserr_o;
+ float *wave_o;
+ float *wgts1, *wgts2, *wgts_o;
+ float *bkgd1, *bkgd2, *bkgd_o;
+ long *lcts1, *lcts2, *lcts_o;
+ char tformstr[FLEN_CARD];
+ char key_str[FLEN_CARD];
+ char qual_lbl[FLEN_CARD];
+ float f1, f2, fn;
+ float tmp1, tmp2, tmp3, tmp4;
+ float exptime_1, exptime_2, exptime_o;
+ fitsfile *infits_1, *infits_2, *outfits;
+ int chkop();
+ int check_num();
+ void padstr();
+ /* following items used by random number generator */
+ clock_t clock(); /* system clock function */
+ int ns; /* used by random # generator */
+ unsigned long seed; /* random # generator seed */
+ /* char *initstate(), *setstate(); */
+ double rand1();
+
+/* Initialize random number generator state array. */
+ static unsigned long state1[32] = { 3, 0x9a319039,
+ 0x32d9c024, 0x9b663182, 0x5da1f342, 0x7449e56b,
+ 0xbeb1dbb0, 0xab5c5918, 0x946554fd, 0x8c2e680f,
+ 0xeb3d799f, 0xb11ee0b7, 0x2d436b86, 0xda672e2a,
+ 0x1588ca88, 0xe369735d, 0x904f35f7, 0xd7158fd6,
+ 0x6fa6f051, 0x616e6b96, 0xac94efdc, 0xde3b81e0,
+ 0xdf0a6fb5, 0xf103bc02, 0x48f340fb, 0x36413f93,
+ 0xc622c298, 0xf5a42ab8, 0x8a88d77b, 0xf5ad9d0e,
+ 0x8999220b, 0x27fb47b9 };
+
+
+ /* perform an initial call to clock() - clock() returns the elapsed time
+ * since the first call, so in order to use it for a random # generator
+ * seed later we have to get it started here. Subsequent calls follow
+ * opening of the first file, so that should provide some run-to-run
+ * variations.
+ */
+ seed = clock();
+
+ /* Enter a timestamp into the log. */
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ /* Initialize error checking */
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+
+ /* check command line */
+ if (argc != 5) {
+ printf("Usage: cf_arith infile1 op infile2 outfile\n");
+ return 1;
+ }
+
+ strcpy (infile1, argv[1]);
+ strcpy (infile2, argv[3]);
+ strcpy (outfile, argv[4]);
+
+ if ((opcode = chkop (argv[2])) == 0)
+ {
+ sprintf (comment,"Undefined operation: %s\n", argv[2]);
+ cf_if_error (comment);
+ }
+
+ /* Open input file(s) */
+
+ FITS_open_file(&infits_1, infile1, READONLY, &status);
+
+ /* get number of extensions in operand1 */
+ FITS_get_num_hdus (infits_1, &next_1, &status);
+ next_1--;
+
+ /* get exposure time in case we need it later. */
+ ffgky(infits_1, TFLOAT, "EXPTIME", &exptime_1, expt_comment, &status);
+ if (status)
+ {
+ fprintf (stderr, "Keyword EXPTIME not found; set exptime_1=1.0\n");
+ exptime_1 = 1.0;
+ status = 0;
+ }
+ exptime_o = exptime_1;
+
+ /* check nature of second operand: is it a number? */
+ /* can have leading sign, and may contain E,e,D,d and additional sign */
+ arg2_scalar = check_num (argv[3]);
+ if (arg2_scalar)
+ arg2_val = atof (argv[3]);
+
+ /* Also allow the possibility of having argv[3] = "EXPTIME": */
+ if (!strcmp (argv[3], "EXPTIME"))
+ {
+ arg2_scalar = TRUE;
+ arg2_val = exptime_1;
+ }
+
+ /* check for valid operand if operation is SHIFT: */
+ p_shift = 0;
+ if (opcode == SHIFT)
+ {
+ if (!arg2_scalar)
+ cf_if_error ("SHIFT requires scalar argument!\n");
+
+ /* convert argument to an integer */
+ p_shift = (int) strtol (argv[3], (char **)NULL, 10);
+ }
+
+ /* check for valid operand if operation is BIN: */
+ nbin = 1;
+ if (opcode == BIN)
+ {
+ if (!arg2_scalar)
+ cf_if_error ("BIN requires scalar argument!\n");
+
+ /* convert argument to an integer */
+ nbin = (int) strtol (argv[3], (char **)NULL, 10);
+ if (nbin < 1)
+ {
+ sprintf (errstr, "bin factor = %d; must be >0!\n", nbin);
+ cf_if_error (errstr);
+ }
+ }
+
+ /* Check for valid operand if operation is ADDNOISE:
+ * I suppose we could relax this and take a pixel-by-pixel amplitude
+ * from a spectrum, but let's keep it simple for now.
+ * Also initialize random number generator.
+ */
+ if (opcode == ADDNOISE)
+ {
+ if (!arg2_scalar)
+ cf_if_error ("ADDNOISE requires scalar argument!\n");
+
+ /* initialize random number generator */
+ /* the local clock function doesn't change rapidly enough to be
+ * useful, even though it is nominally at microsecond resolution */
+ /* seed = 2 * (clock() & 0x0ffff) + 1; */
+ time (&timeval);
+ seed = 2 * timeval + 1;
+
+ ns = 128;
+ initstate (seed, (char *) state1, ns);
+ setstate ((char *)state1);
+ }
+
+ /* bypass operand2 if op= derivative; we ignore op2 in this case*/
+ if (opcode == DERIV)
+ arg2_scalar = TRUE;
+
+ if (!arg2_scalar)
+ {
+ FITS_open_file (&infits_2, infile2, READONLY, &status);
+ FITS_get_num_hdus (infits_2, &next_2, &status);
+ next_2--;
+
+ if ((next_2 != next_1) && (next_2 != 1))
+ {
+ fprintf (stderr, "file %s has %d extensions.\n", infile1, next_1);
+ fprintf (stderr, "file %s has %d extensions.\n", infile2, next_2);
+ cf_if_error ("Illegal combination, aborting!\n");
+ }
+ ffgky(infits_2, TFLOAT, "EXPTIME", &exptime_2, expt_comment, &status);
+ if (status)
+ {
+ fprintf (stderr, "Keyword EXPTIME not found; set exptime_2=1.0\n");
+ exptime_2 = 1.0;
+ status = 0;
+ }
+ }
+
+ /* open output file */
+
+ remove(outfile); /*In case the old file name exists*/
+ FITS_create_file (&outfits, outfile, &status);
+
+ /* Copy header from first operand. The output file will have the same
+ * number of extensions as operand1.
+ */
+ /* cf_cp_hdr(infits_1, 1, outfits, 1); */
+ FITS_copy_header (infits_1, outfits, &status);
+
+ /* Loop over extensions */
+ for ( i = 1; i <= next_1; i++ )
+ {
+ hdunum_1=i+1;
+
+ FITS_movabs_hdu(infits_1, hdunum_1, &hdutype_1, &status);
+ /* for Calfuse 2 and before, array length is specified by NAXIS2.
+ * For Calfuse 3, need to get it from TFORM1.
+ */
+ FITS_read_key(infits_1, TLONG, "NAXIS2", &naxis2_1, NULL, &status);
+ if (naxis2_1 > 1L)
+ npix_1 = naxis2_1;
+ else
+ {
+ FITS_read_key(infits_1, TSTRING, "TFORM1", tformstr, NULL, &status);
+ sscanf (tformstr, "%ldE", &npix_1);
+ }
+
+
+ /* need to figure out what kind of data we have.
+ * tfields=4 implies very old calfuse files, or effective area files;
+ * tfields=6 implies calfuse 1.8 or 2.x
+ * tfields=7 implies calfuse 3.x
+ * Each has different types of data columns.
+ */
+ FITS_read_key(infits_1, TINT, "TFIELDS", &tfields_1, NULL, &status);
+
+ if ((tfields_1 == 4) || (tfields_1 == 6))
+ cf_version = 2;
+ else if (tfields_1 == 7)
+ cf_version = 3;
+ else
+ {
+ sprintf (errstr, "Expecting 4,6 or 7 cols, found %d\n", tfields_1);
+ cf_if_error (errstr);
+ }
+
+ /* Allocate data arrays */
+ wave1 = (float *) cf_malloc(sizeof(float) * npix_1);
+ flux1 = (float *) cf_malloc(sizeof(float) * npix_1);
+ flxerr1 = (float *) cf_malloc(sizeof(float) * npix_1);
+ qual1 = (short *) cf_malloc(sizeof(short) * npix_1);
+
+ if (cf_version == 2)
+ {
+ cnts1 = (float *) cf_malloc(sizeof(float) * npix_1);
+ cntserr1 = (float *) cf_malloc(sizeof(float) * npix_1);
+ }
+ else
+ {
+ lcts1 = (long *) cf_malloc(sizeof(long) * npix_1);
+ bkgd1 = (float *) cf_malloc(sizeof(float) * npix_1);
+ wgts1 = (float *) cf_malloc(sizeof(float) * npix_1);
+ }
+
+ /* Get the column numbers from file 1 */
+ FITS_read_key(infits_1, TSTRING, "TTYPE2", datatype, NULL, &status);
+ if (!strcmp(datatype, "FLUX"))
+ {
+ areaflag = FALSE;
+ FITS_get_colnum(infits_1, TRUE, "FLUX", &fluxcol, &status);
+ }
+ else
+ {
+ areaflag = TRUE;
+ FITS_get_colnum(infits_1, TRUE, "AREA", &fluxcol, &status);
+ }
+
+ FITS_get_colnum(infits_1, TRUE, "WAVE", &wavecol, &status);
+ FITS_get_colnum(infits_1, TRUE, "ERROR", &errorcol, &status);
+
+ /* don't know at present if calfuse 3.x will use "QUALITY" or
+ * "POTHOLE", so check both.
+ */
+ if (cf_version == 2)
+ FITS_get_colnum(infits_1, TRUE, "QUALITY", &qualcol, &status);
+ else
+ {
+ qualcol = 0;
+ for (j=1; j<=tfields_1; j++)
+ {
+ sprintf (key_str, "TTYPE%1ld", j);
+ FITS_read_key(infits_1, TSTRING, key_str,datatype, NULL, &status);
+ if (!strcmp (datatype, "QUALITY") || !strcmp(datatype,"POTHOLE"))
+ {
+ strcpy (qual_lbl, datatype);
+ qualcol = j;
+ }
+ }
+ if (qualcol == 0)
+ cf_if_error ("QUALITY column not found!");
+ }
+
+ if (tfields_1 == 6)
+ {
+ FITS_get_colnum(infits_1, TRUE, "COUNTS", &cntscol, &status);
+ FITS_get_colnum(infits_1, TRUE, "CNTSERR", &cntserrcol, &status);
+ }
+
+ if (tfields_1 == 7)
+ {
+ FITS_get_colnum(infits_1, TRUE, "COUNTS", &cntscol, &status);
+ FITS_get_colnum(infits_1, TRUE, "WEIGHTS", &wgtscol, &status);
+ FITS_get_colnum(infits_1, TRUE, "BKGD", &bkgdcol, &status);
+ }
+
+ FITS_read_col(infits_1, TFLOAT, fluxcol, 1L, 1L, npix_1,
+ &intnull, flux1, &anynull, &status);
+ FITS_read_col(infits_1, TFLOAT, wavecol, 1L, 1L, npix_1,
+ &intnull, wave1, &anynull, &status);
+ FITS_read_col(infits_1, TFLOAT, errorcol, 1L, 1L, npix_1,
+ &intnull, flxerr1, &anynull, &status);
+ FITS_read_col(infits_1, TSHORT, qualcol, 1L, 1L, npix_1,
+ &intnull, qual1, &anynull, &status);
+
+ if (tfields_1 == 6)
+ {
+ FITS_read_col(infits_1, TFLOAT, cntscol, 1L, 1L, npix_1,
+ &intnull, cnts1, &anynull, &status);
+ FITS_read_col(infits_1, TFLOAT, cntserrcol, 1L, 1L, npix_1,
+ &intnull, cntserr1, &anynull, &status);
+ }
+ else if (tfields_1 == 7)
+ {
+ FITS_read_col(infits_1, TLONG, cntscol, 1L, 1L, npix_1,
+ &intnull, lcts1, &anynull, &status);
+ FITS_read_col(infits_1, TFLOAT, wgtscol, 1L, 1L, npix_1,
+ &intnull, wgts1, &anynull, &status);
+ FITS_read_col(infits_1, TFLOAT, bkgdcol, 1L, 1L, npix_1,
+ &intnull, bkgd1, &anynull, &status);
+ }
+ else
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ cnts1[j] = 0.;
+ cntserr1[j] = 0.001;
+ }
+ }
+
+ if (!arg2_scalar)
+ {
+ /* for file2, stop at first extension if that is all there is */
+ if (i <= next_2)
+ {
+ hdunum_2 = i + 1;
+ FITS_movabs_hdu(infits_2, hdunum_2, &hdutype_2, &status);
+ FITS_read_key(infits_2, TLONG,"NAXIS2",&naxis2_2,NULL,&status);
+ if (naxis2_2 > 1L)
+ npix_2 = naxis2_2;
+ else
+ {
+ FITS_read_key(infits_2, TSTRING, "TFORM1", tformstr, NULL,
+ &status);
+ sscanf (tformstr, "%ldE", &npix_2);
+ }
+
+ FITS_read_key(infits_2, TINT, "TFIELDS", &tfields_2, NULL,
+ &status);
+
+ if (tfields_2 != tfields_1)
+ {
+ sprintf (errstr, "File1 has %d cols; File 2 has %d cols!\n",
+ tfields_1, tfields_2);
+ cf_if_error (errstr);
+ }
+
+ if (npix_2 != npix_1)
+ {
+ fprintf (stderr, "npix1 = %ld, npix2 = %ld\n", npix_1, npix_2);
+ cf_if_error ("Aborting");
+ }
+
+ /* Allocate data arrays */
+ flux2 = (float *) cf_malloc(sizeof(float) * npix_2);
+ flxerr2 = (float *) cf_malloc(sizeof(float) * npix_2);
+ qual2 = (short *) cf_malloc(sizeof(short) * npix_2);
+ if (cf_version == 2)
+ {
+ cnts2 = (float *) cf_malloc(sizeof(float) * npix_2);
+ cntserr2 = (float *) cf_malloc(sizeof(float) * npix_2);
+ }
+ else
+ {
+ lcts2 = (long *) cf_malloc(sizeof(long) * npix_2);
+ wgts2 = (float *) cf_malloc(sizeof(float) * npix_2);
+ bkgd2 = (float *) cf_malloc(sizeof(float) * npix_2);
+ }
+
+ /* Read the data from file 2 */
+
+ if (areaflag)
+ FITS_get_colnum(infits_2, TRUE, "AREA", &fluxcol, &status);
+ else
+ FITS_get_colnum(infits_2, TRUE, "FLUX", &fluxcol, &status);
+
+ FITS_get_colnum(infits_2, TRUE, "ERROR", &errorcol, &status);
+
+ /* don't know at present if calfuse 3.x will use "QUALITY" or
+ * "POTHOLE", so check both.
+ * (there may also be a mix of files present!)
+ */
+ if (cf_version == 2)
+ FITS_get_colnum(infits_2, TRUE, "QUALITY", &qualcol,&status);
+ else
+ {
+ qualcol = 0;
+ for (j=1; j<=tfields_2; j++)
+ {
+ sprintf (key_str, "TTYPE%1ld", j);
+ FITS_read_key(infits_2, TSTRING, key_str,datatype, NULL,
+ &status);
+ if (!strcmp (datatype, "QUALITY") ||
+ !strcmp(datatype,"POTHOLE"))
+ {
+ strcpy (qual_lbl, datatype);
+ qualcol = j;
+ }
+ }
+ if (qualcol == 0)
+ cf_if_error ("QUALITY column not found!");
+ }
+
+ if (tfields_2 == 6)
+ {
+ FITS_get_colnum(infits_2, TRUE, "COUNTS", &cntscol, &status);
+ FITS_get_colnum(infits_2, TRUE, "CNTSERR", &cntserrcol,
+ &status);
+ }
+
+ if (tfields_2 == 7)
+ {
+ FITS_get_colnum(infits_2,TRUE, "COUNTS", &cntscol, &status);
+ FITS_get_colnum(infits_2,TRUE, "WEIGHTS", &wgtscol, &status);
+ FITS_get_colnum(infits_2,TRUE, "BKGD", &bkgdcol, &status);
+ }
+
+ FITS_read_col(infits_2, TFLOAT, fluxcol, 1L, 1L, npix_2,
+ &intnull, flux2, &anynull, &status);
+ FITS_read_col(infits_2, TFLOAT, errorcol, 1L, 1L, npix_2,
+ &intnull, flxerr2, &anynull, &status);
+ FITS_read_col(infits_2, TSHORT, qualcol, 1L, 1L, npix_2,
+ &intnull, qual2, &anynull, &status);
+
+ if (tfields_2 == 6)
+ {
+ FITS_read_col(infits_2, TFLOAT, cntscol, 1L, 1L, npix_2,
+ &intnull, cnts2, &anynull, &status);
+ FITS_read_col(infits_2, TFLOAT, cntserrcol, 1L, 1L, npix_2,
+ &intnull, cntserr2, &anynull, &status);
+ }
+ else if (tfields_1 == 7)
+ {
+ FITS_read_col(infits_2, TLONG, cntscol, 1L, 1L, npix_2,
+ &intnull, lcts2, &anynull, &status);
+ FITS_read_col(infits_2, TFLOAT, wgtscol, 1L, 1L, npix_2,
+ &intnull, wgts2, &anynull, &status);
+ FITS_read_col(infits_2, TFLOAT, bkgdcol, 1L, 1L, npix_2,
+ &intnull, bkgd2, &anynull, &status);
+ }
+ else
+ {
+ for (j=0; j<npix_2; j++)
+ {
+ cnts2[j] = 0.;
+ cntserr2[j] = 0.001;
+ }
+ }
+
+ } /* end of if (i<=next_2) */
+ } /* end of if(!arg2_scalar) */
+
+ if ((opcode == BIN) && (nbin > 1))
+ {
+ if (nbin > npix_1)
+ {
+ sprintf (errstr, "bin factor = %d; must be < npix!\n", nbin);
+ cf_if_error (errstr);
+ }
+ npix_o = npix_1 / nbin;
+ }
+ else
+ npix_o = npix_1;
+
+ /* make space for output arrays */
+ flux_o = (float *) cf_malloc(sizeof(float) * npix_o);
+ flxerr_o = (float *) cf_malloc(sizeof(float) * npix_o);
+ qual_o = (short *) cf_malloc(sizeof(short) * npix_o);
+
+ if (cf_version == 2)
+ {
+ cnts_o = (float *) cf_malloc(sizeof(float) * npix_o);
+ cntserr_o = (float *) cf_malloc(sizeof(float) * npix_o);
+ }
+ else
+ {
+ lcts_o = (long *) cf_malloc(sizeof(long) * npix_o);
+ wgts_o = (float *) cf_malloc(sizeof(float) * npix_o);
+ bkgd_o = (float *) cf_malloc(sizeof(float) * npix_o);
+ }
+
+ if (opcode == BIN)
+ wave_o = (float *) cf_malloc(sizeof(float) * npix_o);
+ else
+ wave_o = wave1;
+
+ /********* perform arithmetic operations here *********/
+ switch (opcode)
+ {
+ case PLUS:
+ if (arg2_scalar)
+ {
+ if (cf_version == 2)
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ flux_o[j] = flux1[j] + arg2_val;
+ flxerr_o[j] = flxerr1[j];
+ cnts_o[j] = cnts1[j];
+ cntserr_o[j] = cntserr1[j];
+ qual_o[j] = qual1[j];
+ }
+ }
+ else
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ flux_o[j] = flux1[j] + arg2_val;
+ flxerr_o[j] = flxerr1[j];
+ lcts_o[j] = lcts1[j];
+ qual_o[j] = qual1[j];
+ bkgd_o[j] = bkgd1[j];
+ wgts_o[j] = wgts1[j];
+ }
+ }
+ } /* end if(arg2_scalar) */
+ else
+ {
+ exptime_o = exptime_1 + exptime_2;
+ if (cf_version == 2)
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ flux_o[j] = flux1[j] + flux2[j];
+ tmp1 = flxerr1[j]*flxerr1[j];
+ tmp2 = flxerr2[j]*flxerr2[j];
+ flxerr_o[j] = sqrt (tmp1 + tmp2);
+ cnts_o[j] = cnts1[j] + cnts2[j];
+ tmp1 = cntserr1[j]*cntserr1[j];
+ tmp2 = cntserr2[j]*cntserr2[j];
+ cntserr_o[j] = sqrt (tmp1 + tmp2);
+ if ((qual1[j] == 0) || (qual2[j] == 0))
+ qual_o[j] = 0;
+ else
+ qual_o[j] = qual1[j];
+ }
+ }
+ else
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ flux_o[j] = flux1[j] + flux2[j];
+ tmp1 = flxerr1[j]*flxerr1[j];
+ tmp2 = flxerr2[j]*flxerr2[j];
+ flxerr_o[j] = sqrt (tmp1 + tmp2);
+ lcts_o[j] = lcts1[j] + lcts2[j];
+ if ((qual1[j] == 0) || (qual2[j] == 0))
+ qual_o[j] = 0;
+ else
+ qual_o[j] = (qual1[j] + qual2[j])/2;
+ bkgd_o[j] = bkgd1[j] + bkgd2[j];
+ wgts_o[j] = wgts1[j] + wgts2[j];
+ }
+ }
+ }
+ break;
+
+ case MINUS:
+ if (arg2_scalar)
+ {
+ if (cf_version == 2)
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ flux_o[j] = flux1[j] - arg2_val;
+ flxerr_o[j] = flxerr1[j];
+ cnts_o[j] = cnts1[j];
+ cntserr_o[j] = cntserr1[j];
+ qual_o[j] = qual1[j];
+ }
+ }
+ else
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ flux_o[j] = flux1[j] - arg2_val;
+ flxerr_o[j] = flxerr1[j];
+ lcts_o[j] = lcts1[j];
+ qual_o[j] = qual1[j];
+ bkgd_o[j] = bkgd1[j];
+ wgts_o[j] = wgts1[j];
+ }
+ }
+ }
+ else
+ {
+ if (cf_version == 2)
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ flux_o[j] = flux1[j] - flux2[j];
+ tmp1 = flxerr1[j]*flxerr1[j];
+ tmp2 = flxerr2[j]*flxerr2[j];
+ flxerr_o[j] = sqrt (tmp1 + tmp2);
+ cnts_o[j] = cnts1[j] - cnts2[j];
+ tmp1 = cntserr1[j]*cntserr1[j];
+ tmp2 = cntserr2[j]*cntserr2[j];
+ cntserr_o[j] = sqrt (tmp1 + tmp2);
+ if ((qual1[j] == 0) || (qual2[j] == 0))
+ qual_o[j] = 0;
+ else
+ qual_o[j] = qual1[j];
+ }
+ }
+ else
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ flux_o[j] = flux1[j] - flux2[j];
+ tmp1 = flxerr1[j]*flxerr1[j];
+ tmp2 = flxerr2[j]*flxerr2[j];
+ flxerr_o[j] = sqrt (tmp1 + tmp2);
+ lcts_o[j] = lcts1[j] - lcts2[j];
+ if ((qual1[j] == 0) || (qual2[j] == 0))
+ qual_o[j] = 0;
+ else
+ qual_o[j] = (qual1[j] + qual2[j])/2;
+ bkgd_o[j] = bkgd1[j] - bkgd2[j];
+ wgts_o[j] = wgts1[j] - wgts2[j];
+ }
+ }
+ }
+ break;
+
+ case MULT:
+ if (arg2_scalar)
+ {
+ if (cf_version == 2)
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ flux_o[j] = flux1[j] * arg2_val;
+ flxerr_o[j] = flxerr1[j] * arg2_val;
+ cnts_o[j] = cnts1[j];
+ cntserr_o[j] = cntserr1[j];
+ qual_o[j] = qual1[j];
+ }
+ }
+ else
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ flux_o[j] = flux1[j] * arg2_val;
+ flxerr_o[j] = flxerr1[j] * arg2_val;
+ lcts_o[j] = lcts1[j];
+ qual_o[j] = qual1[j];
+ bkgd_o[j] = bkgd1[j];
+ wgts_o[j] = wgts1[j];
+ }
+ } /* end cf_version == 3 */
+ } /* end if arg2_scalar */
+ else
+ {
+ if (cf_version == 2)
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ flux_o[j] = flux1[j] * flux2[j];
+ if (flux1[j] == 0.)
+ {
+ flxerr_o[j] = fabs (flux2[j] * flxerr1[j]);
+ }
+ else if (flux2[j] == 0.)
+ {
+ flxerr_o[j] = fabs (flux1[j] * flxerr2[j]);
+ }
+ else
+ {
+ tmp1 = flxerr1[j] / flux1[j];
+ tmp2 = flxerr2[j] / flux2[j];
+ tmp3 = tmp1 * tmp1 + tmp2 * tmp2;
+ flxerr_o[j] = fabs (flux_o[j]) * sqrt (tmp3);
+ }
+ cnts_o[j] = cnts1[j] * cnts2[j];
+ tmp1 = cnts2[j] * cnts2[j] * cntserr1[j]*cntserr1[j];
+ tmp2 = cnts1[j] * cnts1[j] * cntserr2[j]*cntserr2[j];
+ cntserr_o[j] = sqrt (tmp1 + tmp2);
+ if ((qual1[j] == 0) || (qual2[j] == 0))
+ qual_o[j] = 0;
+ else
+ qual_o[j] = qual1[j];
+ } /* end loop over j */
+ } /* end cf_version == 2 */
+ else
+ { /* start cf_version == 3 */
+ for (j=0; j<npix_1; j++)
+ {
+ flux_o[j] = flux1[j] * flux2[j];
+ if (flux1[j] == 0.)
+ {
+ flxerr_o[j] = fabs (flux2[j] * flxerr1[j]);
+ }
+ else if (flux2[j] == 0.)
+ {
+ flxerr_o[j] = fabs (flux1[j] * flxerr2[j]);
+ }
+ else
+ {
+ tmp1 = flxerr1[j] / flux1[j];
+ tmp2 = flxerr2[j] / flux2[j];
+ tmp3 = tmp1 * tmp1 + tmp2 * tmp2;
+ flxerr_o[j] = fabs (flux_o[j]) * sqrt (tmp3);
+ }
+ lcts_o[j] = lcts1[j] * lcts2[j];
+ wgts_o[j] = wgts1[j] * wgts2[j];
+ bkgd_o[j] = bkgd1[j] * bkgd2[j];
+ if ((qual1[j] == 0) || (qual2[j] == 0))
+ qual_o[j] = 0;
+ else
+ qual_o[j] = (qual1[j] + qual2[j])/2;
+ } /* end loop over j */
+ } /* end cf_version == 3 */
+ } /* end !arg2_scalar */
+ break;
+
+ case DIV:
+ if (arg2_scalar)
+ {
+ if (arg2_val == 0.)
+ cf_if_error ("Commanded division by 0!");
+ if (cf_version == 2)
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ flux_o[j] = flux1[j] / arg2_val;
+ flxerr_o[j] = flxerr1[j] / arg2_val;
+ cnts_o[j] = cnts1[j];
+ cntserr_o[j] = cntserr1[j];
+ qual_o[j] = qual1[j];
+ }
+ }
+ else
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ flux_o[j] = flux1[j] / arg2_val;
+ flxerr_o[j] = flxerr1[j] / arg2_val;
+ lcts_o[j] = lcts1[j];
+ qual_o[j] = qual1[j];
+ bkgd_o[j] = bkgd1[j];
+ wgts_o[j] = wgts1[j];
+ }
+ }
+ }
+ else
+ {
+ if (cf_version == 2)
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ if (flux2[j] !=0.)
+ {
+ flux_o[j] = flux1[j] / flux2[j];
+ if (flux1[j] != 0.)
+ {
+ tmp1 = flxerr1[j] / flux1[j];
+ tmp2 = flxerr2[j] / flux2[j];
+ tmp3 = tmp1 * tmp1;
+ tmp4 = tmp2 * tmp2;
+ flxerr_o[j] = fabs (flux_o[j]) * sqrt (tmp3 + tmp4);
+ }
+ else
+ flxerr_o[j] = flxerr1[j] / flux2[j];
+ if ((qual1[j] == 0) || (qual2[j] == 0))
+ qual_o[j] = 0;
+ else
+ qual_o[j] = qual1[j];
+ }
+ else
+ {
+ flux_o[j] = 0.;
+ flxerr_o[j] = flxerr1[j];
+ qual_o[j] = 0;
+ }
+ if (cnts2[j] != 0.)
+ {
+ cnts_o[j] = cnts1[j] / cnts2[j];
+ if (cnts1[j] != 0.)
+ tmp1 = cntserr1[j] / cnts1[j];
+ else
+ tmp1 = 0.;
+ tmp2 = cntserr2[j] / cnts2[j];
+ tmp3 = tmp1 * tmp1;
+ tmp4 = tmp2 * tmp2;
+ cntserr_o[j] = fabs (cnts_o[j]) * sqrt (tmp3 + tmp4);
+ }
+ else
+ {
+ cnts_o[j] = 0.;
+ cntserr_o[j] = cntserr1[j];
+ }
+ } /* end loop over j */
+ } /* end cf_version == 2 */
+ else
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ if (flux2[j] !=0.)
+ {
+ flux_o[j] = flux1[j] / flux2[j];
+ if (flux1[j] != 0.)
+ {
+ tmp1 = flxerr1[j] / flux1[j];
+ tmp2 = flxerr2[j] / flux2[j];
+ tmp3 = tmp1 * tmp1;
+ tmp4 = tmp2 * tmp2;
+ flxerr_o[j] = fabs (flux_o[j]) * sqrt (tmp3 + tmp4);
+ }
+ else
+ flxerr_o[j] = flxerr1[j] / flux2[j];
+ if ((qual1[j] == 0) || (qual2[j] == 0))
+ qual_o[j] = 0;
+ else
+ qual_o[j] = (qual1[j] + qual2[j])/2;
+ }
+ else
+ {
+ flux_o[j] = 0.;
+ flxerr_o[j] = flxerr1[j];
+ qual_o[j] = 0;
+ }
+
+ if (lcts2[j] != 0.)
+ lcts_o[j] = lcts1[j] / lcts2[j];
+ else
+ lcts_o[j] = 0.;
+
+ if (wgts2[j] != 0.)
+ wgts_o[j] = wgts1[j] / wgts2[j];
+ else
+ wgts_o[j] = 0.;
+
+ if (bkgd2[j] != 0.)
+ bkgd_o[j] = bkgd1[j] / bkgd2[j];
+ else
+ bkgd_o[j] = 0.;
+
+ } /* end loop over j */
+ } /* end cf_version == 3 */
+ } /* end !arg2_scalar */
+ break;
+
+ case AVG_T:
+ if (arg2_scalar)
+ {
+ cf_if_error ("Illegal operation with scalar operand!");
+ }
+ else
+ {
+ if (cf_version == 2)
+ {
+ f1 = exptime_1 / (exptime_1 + exptime_2);
+ f2 = exptime_2 / (exptime_1 + exptime_2);
+ exptime_o = exptime_1 + exptime_2;
+ for (j=0; j<npix_1; j++)
+ {
+ flux_o[j] = f1 * flux1[j] + f2 * flux2[j];
+ tmp1 = f1 * f1 * flxerr1[j]*flxerr1[j];
+ tmp2 = f2 * f2 * flxerr2[j]*flxerr2[j];
+ flxerr_o[j] = sqrt (tmp1 + tmp2);
+ cnts_o[j] = f1 * cnts1[j] + f2 * cnts2[j];
+ tmp1 = f1 * f1 * cntserr1[j]*cntserr1[j];
+ tmp2 = f2 * f2 * cntserr2[j]*cntserr2[j];
+ cntserr_o[j] = sqrt (tmp1 + tmp2);
+ if ((qual1[j] == 0) || (qual2[j] == 0))
+ qual_o[j] = 0;
+ else
+ qual_o[j] = qual1[j];
+ }
+ }
+ else
+ {
+ f1 = exptime_1 / (exptime_1 + exptime_2);
+ f2 = exptime_2 / (exptime_1 + exptime_2);
+ exptime_o = exptime_1 + exptime_2;
+ for (j=0; j<npix_1; j++)
+ {
+ flux_o[j] = f1 * flux1[j] + f2 * flux2[j];
+ tmp1 = f1 * f1 * flxerr1[j]*flxerr1[j];
+ tmp2 = f2 * f2 * flxerr2[j]*flxerr2[j];
+ flxerr_o[j] = sqrt (tmp1 + tmp2);
+ lcts_o[j] = lcts1[j] + lcts2[j];
+ wgts_o[j] = wgts1[j] + wgts2[j];
+ bkgd_o[j] = bkgd1[j] + bkgd2[j];
+ if ((qual1[j] == 0) || (qual2[j] == 0))
+ qual_o[j] = 0;
+ else
+ qual_o[j] = (qual1[j] + qual2[j])/2;
+ }
+ }
+ }
+ break;
+
+ case AVG_S:
+ if (arg2_scalar)
+ {
+ cf_if_error ("Illegal operation with scalar operand!");
+ }
+ else
+ {
+ exptime_o = exptime_1 + exptime_2;
+ if (cf_version == 2)
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ if ((flxerr1[j] > 0.) && (flxerr2[j] > 0.))
+ {
+ f1 = 1. / (flxerr1[j] * flxerr1[j]);
+ f2 = 1. / (flxerr2[j] * flxerr2[j]);
+ }
+ else
+ f1 = f2 = 1.;
+ fn = f1 + f2;
+ flux_o[j] = (f1 * flux1[j] + f2 * flux2[j]) / fn;
+ flxerr_o[j] = sqrt (1./fn);
+ if ((cntserr1[j] > 0.) && (cntserr2[j] > 0.))
+ {
+ f1 = 1. / (cntserr1[j] * cntserr1[j]);
+ f2 = 1. / (cntserr2[j] * cntserr2[j]);
+ }
+ else
+ f1 = f2 = 1.;
+ fn = f1 + f2;
+ cnts_o[j] = (f1 * cnts1[j] + f2 * cnts2[j]) / fn;
+ cntserr_o[j] = sqrt (1./fn);
+ if ((qual1[j] == 0) || (qual2[j] == 0))
+ qual_o[j] = 0;
+ else
+ qual_o[j] = qual1[j];
+ }
+ } /* end if cf_version == 2 */
+ else
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ if ((flxerr1[j] > 0.) && (flxerr2[j] > 0.))
+ {
+ f1 = 1. / (flxerr1[j] * flxerr1[j]);
+ f2 = 1. / (flxerr2[j] * flxerr2[j]);
+ }
+ else
+ f1 = f2 = 1.;
+ fn = f1 + f2;
+ flux_o[j] = (f1 * flux1[j] + f2 * flux2[j]) / fn;
+ flxerr_o[j] = sqrt (1./fn);
+ lcts_o[j] = (f1 * lcts1[j] + f2 * lcts2[j]) / fn;
+ wgts_o[j] = (f1 * wgts1[j] + f2 * wgts2[j]) / fn;
+ bkgd_o[j] = (f1 * bkgd1[j] + f2 * bkgd2[j]) / fn;
+ if ((qual1[j] == 0) || (qual2[j] == 0))
+ qual_o[j] = 0;
+ else
+ qual_o[j] = (f1*qual1[j] + f2*qual2[j]) / fn;
+ }
+ }
+ }
+ break;
+
+ case REPL_D:
+ if (arg2_scalar)
+ {
+ if (cf_version == 2)
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ flux_o[j] = arg2_val;
+ flxerr_o[j] = flxerr1[j];
+ cnts_o[j] = cnts1[j];
+ cntserr_o[j] = cntserr1[j];
+ qual_o[j] = qual1[j];
+ }
+ }
+ else
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ flux_o[j] = arg2_val;
+ flxerr_o[j] = flxerr1[j];
+ lcts_o[j] = lcts1[j];
+ qual_o[j] = qual1[j];
+ wgts_o[j] = wgts1[j];
+ bkgd_o[j] = bkgd1[j];
+ }
+ }
+ }
+ else
+ {
+ if (cf_version == 2)
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ flux_o[j] = flux2[j];
+ flxerr_o[j] = flxerr1[j];
+ cnts_o[j] = cnts1[j];
+ cntserr_o[j] = cntserr1[j];
+ if ((qual1[j] == 0) || (qual2[j] == 0))
+ qual_o[j] = 0;
+ else
+ qual_o[j] = qual1[j];
+ }
+ }
+ else
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ flux_o[j] = flux2[j];
+ flxerr_o[j] = flxerr1[j];
+ lcts_o[j] = lcts1[j];
+ wgts_o[j] = wgts1[j];
+ bkgd_o[j] = bkgd1[j];
+ if ((qual1[j] == 0) || (qual2[j] == 0))
+ qual_o[j] = 0;
+ else
+ qual_o[j] = qual1[j];
+ }
+ }
+ }
+ break;
+
+ case REPL_E:
+ if (arg2_scalar)
+ {
+ if (cf_version == 2)
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ flux_o[j] = flux1[j];
+ flxerr_o[j] = arg2_val;
+ cnts_o[j] = cnts1[j];
+ cntserr_o[j] = cntserr1[j];
+ qual_o[j] = qual1[j];
+ }
+ }
+ else
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ flux_o[j] = flux1[j];
+ flxerr_o[j] = arg2_val;
+ lcts_o[j] = lcts1[j];
+ qual_o[j] = qual1[j];
+ wgts_o[j] = wgts1[j];
+ bkgd_o[j] = bkgd1[j];
+ }
+ }
+ }
+ else
+ {
+ if (cf_version == 2)
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ flux_o[j] = flux1[j];
+ flxerr_o[j] = flxerr2[j];
+ cnts_o[j] = cnts1[j];
+ cntserr_o[j] = cntserr1[j];
+ if ((qual1[j] == 0) || (qual2[j] == 0))
+ qual_o[j] = 0;
+ else
+ qual_o[j] = qual1[j];
+ }
+ }
+ else
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ flux_o[j] = flux1[j];
+ flxerr_o[j] = flxerr2[j];
+ lcts_o[j] = lcts1[j];
+ wgts_o[j] = wgts1[j];
+ bkgd_o[j] = bkgd1[j];
+ if ((qual1[j] == 0) || (qual2[j] == 0))
+ qual_o[j] = 0;
+ else
+ qual_o[j] = qual1[j];
+ }
+ }
+ }
+ break;
+
+ case DELTA:
+ /* start by copying input file to output */
+ if (cf_version == 2)
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ flux_o[j] = flux1[j];
+ flxerr_o[j] = flxerr1[j];
+ cnts_o[j] = cnts1[j];
+ cntserr_o[j] = cntserr1[j];
+ qual_o[j] = qual1[j];
+ }
+ }
+ else
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ flux_o[j] = flux1[j];
+ flxerr_o[j] = flxerr1[j];
+ lcts_o[j] = lcts1[j];
+ qual_o[j] = qual1[j];
+ wgts_o[j] = wgts1[j];
+ bkgd_o[j] = bkgd1[j];
+ }
+ }
+ if (arg2_scalar)
+ {
+ for (j=100; j<npix_1; j+=100)
+ {
+ flux_o[j] += arg2_val;
+ if (flux1[j] != 0)
+ {
+ flxerr_o[j] *= fabs (flux_o[j] / flux1[j]);
+ }
+ else
+ {
+ flxerr_o[j] += 0.1 * fabs (flux_o[j]);
+ }
+ }
+ }
+ else
+ {
+ for (j=100; j<npix_1; j+=100)
+ {
+ flux_o[j] += flux2[j];
+ if (flux1[j] != 0)
+ {
+ flxerr_o[j] *= fabs (flux_o[j] / flux1[j]);
+ }
+ else
+ {
+ flxerr_o[j] += 0.1 * fabs (flux_o[j]);
+ }
+ }
+ }
+ break;
+
+ case BOXCAR:
+ if (arg2_scalar)
+ {
+ /* if width is <= 1, just copy input to output */
+ if (arg2_val <= 1.)
+ {
+ if (cf_version == 2)
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ flux_o[j] = flux1[j];;
+ flxerr_o[j] = flxerr1[j];
+ cnts_o[j] = cnts1[j];
+ cntserr_o[j] = cntserr1[j];
+ qual_o[j] = qual1[j];
+ }
+ } /* end if_cf_version == 2 */
+ else
+ { /* cf_version == 3 */
+ for (j=0; j<npix_1; j++)
+ {
+ flux_o[j] = flux1[j];;
+ flxerr_o[j] = flxerr1[j];
+ lcts_o[j] = lcts1[j];
+ qual_o[j] = qual1[j];
+ wgts_o[j] = wgts1[j];
+ bkgd_o[j] = bkgd1[j];
+ }
+ } /* end if cf_version == 3 */
+ } /* end if arg2_val <=1 */
+ else
+ {
+ if (cf_version == 2)
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ k1 = j - arg2_val / 2. + 0.5;
+ k2 = j + arg2_val / 2. + 0.5;
+ if (k1 < 0)
+ k1 = 0;
+ if (k2 > npix_1-1)
+ k2 = npix_1-1;
+ sflux = 0.;
+ sferr = 0.;
+ scnts = 0.;
+ scerr = 0.;
+ lqual = 0;
+ for (k=k1; k<=k2; k++)
+ {
+ sflux += flux1[k];
+ sferr += flxerr1[k] * flxerr1[k];
+ scnts += cnts1[k];
+ scerr += cntserr1[k] * cntserr1[k];
+ lqual += (long) qual1[k];
+ }
+ spix = (float)(k2 - k1 + 1);
+ flux_o[j] = sflux / spix;
+ flxerr_o[j] = sqrt (sferr) / spix;
+ cnts_o[j] = scnts / spix;
+ cntserr_o[j] = sqrt (scerr) / spix;
+ qual_o[j] = (short) (lqual / spix);
+ } /* end of for j... */
+ } /* end if cf_version == 2 */
+ else
+ { /* start cf_version == 3 for scalar smoothing > 1 */
+ for (j=0; j<npix_1; j++)
+ {
+ k1 = j - arg2_val / 2. + 0.5;
+ k2 = j + arg2_val / 2. + 0.5;
+ if (k1 < 0)
+ k1 = 0;
+ if (k2 > npix_1-1)
+ k2 = npix_1-1;
+ sflux = 0.;
+ sferr = 0.;
+ slcts = 0;
+ sbkgd = 0.;
+ swgts = 0.;
+ lqual = 0;
+ for (k=k1; k<=k2; k++)
+ {
+ sflux += flux1[k];
+ sferr += flxerr1[k] * flxerr1[k];
+ slcts += lcts1[k];
+ swgts += wgts1[k];
+ sbkgd += bkgd1[k];
+ lqual += (long) qual1[k];
+ }
+ spix = (float)(k2 - k1 + 1);
+ flux_o[j] = sflux / spix;
+ flxerr_o[j] = sqrt (sferr) / spix;
+ lcts_o[j] = slcts / spix;
+ bkgd_o[j] = sbkgd / spix;
+ wgts_o[j] = swgts / spix;
+ qual_o[j] = (short) (lqual / spix);
+ } /* end of for j... */
+ } /* end cf_version == 3 */
+ } /* end of arg2_scalar > 1 */
+ } /* end of if (arg2_scalar) */
+ else
+ {
+ /* allow the smoothing width to vary pixel-by-pixel */
+ if (cf_version == 2)
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ arg2_val = flux2[j];
+ if (arg2_val < 1.)
+ {
+ flux_o[j] = flux1[j];
+ flxerr_o[j] = flxerr1[j];
+ cnts_o[j] = cnts1[j];
+ cntserr_o[j] = cntserr1[j];
+ qual_o[j] = qual1[j];
+ }
+ else
+ {
+ k1 = j - arg2_val / 2. + 0.5;
+ k2 = j + arg2_val / 2. + 0.5;
+ if (k1 < 0)
+ k1 = 0;
+ if (k2 > npix_1-1)
+ k2 = npix_1-1;
+ sflux = 0.;
+ sferr = 0.;
+ scnts = 0.;
+ scerr = 0.;
+ lqual = 0;
+ for (k=k1; k<=k2; k++)
+ {
+ sflux += flux1[k];
+ sferr += flxerr1[k] * flxerr1[k];
+ scnts += cnts1[k];
+ scerr += cntserr1[k] * cntserr1[k];
+ lqual += (long) qual1[k];
+ }
+ spix = (float)(k2 - k1 + 1);
+ flux_o[j] = sflux / spix;
+ flxerr_o[j] = sqrt (sferr) / spix;
+ cnts_o[j] = scnts / spix;
+ cntserr_o[j] = sqrt (scerr) / spix;
+ qual_o[j] = (short) (lqual / spix);
+ } /* end of arg2_val > 1 */
+ } /* end of for j... */
+ } /* end if cf_version == 2 */
+ else
+ { /* cf_version == 3 */
+ for (j=0; j<npix_1; j++)
+ {
+ arg2_val = flux2[j];
+ if (arg2_val < 1.)
+ {
+ flux_o[j] = flux1[j];
+ flxerr_o[j] = flxerr1[j];
+ lcts_o[j] = lcts1[j];
+ wgts_o[j] = wgts1[j];
+ bkgd_o[j] = bkgd1[j];
+ qual_o[j] = qual1[j];
+ }
+ else
+ {
+ k1 = j - arg2_val / 2. + 0.5;
+ k2 = j + arg2_val / 2. + 0.5;
+ if (k1 < 0)
+ k1 = 0;
+ if (k2 > npix_1-1)
+ k2 = npix_1-1;
+ sflux = 0.;
+ sferr = 0.;
+ slcts = 0;
+ sbkgd = 0.;
+ swgts = 0.;
+ lqual = 0;
+ for (k=k1; k<=k2; k++)
+ {
+ sflux += flux1[k];
+ sferr += flxerr1[k] * flxerr1[k];
+ slcts += lcts1[k];
+ swgts += wgts1[k];
+ sbkgd += bkgd1[k];
+ lqual += (long) qual1[k];
+ }
+ spix = (float)(k2 - k1 + 1);
+ flux_o[j] = sflux / spix;
+ flxerr_o[j] = sqrt (sferr) / spix;
+ lcts_o[j] = slcts / spix;
+ wgts_o[j] = swgts / spix;
+ bkgd_o[j] = sbkgd / spix;
+ qual_o[j] = (short) (lqual / spix);
+ } /* end of arg2_val > 1 */
+ } /* end of for j... */
+ } /* end if cf_version == 3 */
+ } /* end of if (!arg2_scalar) */
+ break; /* end of case BOXCAR */
+
+ case MIN:
+ if (arg2_scalar)
+ {
+ if (cf_version == 2)
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ if (flux1[j] < arg2_val)
+ flux_o[j] = arg2_val;
+ else
+ flux_o[j] = flux1[j];
+ flxerr_o[j] = flxerr1[j];
+ cnts_o[j] = cnts1[j];
+ cntserr_o[j] = cntserr1[j];
+ qual_o[j] = qual1[j];
+ }
+ }
+ else
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ if (flux1[j] < arg2_val)
+ flux_o[j] = arg2_val;
+ else
+ flux_o[j] = flux1[j];
+ flxerr_o[j] = flxerr1[j];
+ lcts_o[j] = lcts1[j];
+ wgts_o[j] = wgts1[j];
+ bkgd_o[j] = bkgd1[j];
+ qual_o[j] = qual1[j];
+ }
+ }
+ }
+ else
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ if (flux1[j] < flux2[j])
+ {
+ flux_o[j] = flux2[j];
+ flxerr_o[j] = flxerr2[j];
+ }
+ else
+ {
+ flux_o[j] = flux1[j];
+ flxerr_o[j] = flxerr1[j];
+ }
+ if ((qual1[j] == 0) || (qual2[j] == 0))
+ qual_o[j] = 0;
+ else
+ qual_o[j] = qual1[j];
+ }
+ if (cf_version == 2)
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ cnts_o[j] = cnts1[j];
+ cntserr_o[j] = cntserr1[j];
+ }
+ }
+ else
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ lcts_o[j] = lcts1[j];
+ wgts_o[j] = wgts1[j];
+ bkgd_o[j] = bkgd1[j];
+ }
+ }
+ }
+ break;
+
+ case MAX:
+ if (arg2_scalar)
+ {
+ if (cf_version == 2)
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ if (flux1[j] > arg2_val)
+ flux_o[j] = arg2_val;
+ else
+ flux_o[j] = flux1[j];
+ flxerr_o[j] = flxerr1[j];
+ cnts_o[j] = cnts1[j];
+ cntserr_o[j] = cntserr1[j];
+ qual_o[j] = qual1[j];
+ }
+ }
+ else
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ if (flux1[j] > arg2_val)
+ flux_o[j] = arg2_val;
+ else
+ flux_o[j] = flux1[j];
+ flxerr_o[j] = flxerr1[j];
+ lcts_o[j] = lcts1[j];
+ wgts_o[j] = wgts1[j];
+ bkgd_o[j] = bkgd1[j];
+ qual_o[j] = qual1[j];
+ }
+ }
+ }
+ else
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ if (flux1[j] > flux2[j])
+ {
+ flux_o[j] = flux2[j];
+ flxerr_o[j] = flxerr2[j];
+ }
+ else
+ {
+ flux_o[j] = flux1[j];
+ flxerr_o[j] = flxerr1[j];
+ }
+ if ((qual1[j] == 0) || (qual2[j] == 0))
+ qual_o[j] = 0;
+ else
+ qual_o[j] = qual1[j];
+ }
+ if (cf_version == 2)
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ cnts_o[j] = cnts1[j];
+ cntserr_o[j] = cntserr1[j];
+ }
+ }
+ else
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ lcts_o[j] = lcts1[j];
+ wgts_o[j] = wgts1[j];
+ bkgd_o[j] = bkgd1[j];
+ }
+ }
+ }
+ break;
+
+ case SHIFT:
+ if (cf_version == 2)
+ {
+ if (p_shift > 0)
+ {
+ for (j=0; j<p_shift; j++)
+ {
+ flux_o[j] = 0.;
+ flxerr_o[j] = DEF_ERROR;
+ cnts_o[j] = 0.;
+ cntserr_o[j] = DEF_ERROR;
+ qual_o[j] = 0;
+ }
+ for (j=p_shift; j<npix_1; j++)
+ {
+ k = j - p_shift;
+ flux_o[j] = flux1[k];
+ flxerr_o[j] = flxerr1[k];
+ cnts_o[j] = cnts1[k];
+ cntserr_o[j] = cntserr1[k];
+ qual_o[j] = qual1[k];
+ }
+ }
+ if (p_shift <= 0)
+ {
+ for (j=npix_1+p_shift; j<npix_1; j++)
+ {
+ flux_o[j] = 0.;
+ flxerr_o[j] = DEF_ERROR;
+ cnts_o[j] = 0.;
+ cntserr_o[j] = DEF_ERROR;
+ qual_o[j] = 0;
+ }
+ for (j=0; j<npix_1+p_shift; j++)
+ {
+ k = j - p_shift;
+ flux_o[j] = flux1[k];
+ flxerr_o[j] = flxerr1[k];
+ cnts_o[j] = cnts1[k];
+ cntserr_o[j] = cntserr1[k];
+ qual_o[j] = qual1[k];
+ }
+ }
+ } /* end if cf_version == 2 */
+ else
+ {
+ if (p_shift > 0)
+ {
+ for (j=0; j<p_shift; j++)
+ {
+ flux_o[j] = 0.;
+ flxerr_o[j] = DEF_ERROR;
+ lcts_o[j] = 0;
+ qual_o[j] = 0;
+ wgts_o[j] = 0.;
+ bkgd_o[j] = 0.;
+ }
+ for (j=p_shift; j<npix_1; j++)
+ {
+ k = j - p_shift;
+ flux_o[j] = flux1[k];
+ flxerr_o[j] = flxerr1[k];
+ lcts_o[j] = lcts1[k];
+ wgts_o[j] = wgts1[k];
+ bkgd_o[j] = bkgd1[k];
+ qual_o[j] = qual1[k];
+ }
+ }
+ if (p_shift <= 0)
+ {
+ for (j=npix_1+p_shift; j<npix_1; j++)
+ {
+ flux_o[j] = 0.;
+ flxerr_o[j] = DEF_ERROR;
+ lcts_o[j] = 0;
+ wgts_o[j] = 0.;
+ bkgd_o[j] = 0.;
+ qual_o[j] = 0;
+ }
+ for (j=0; j<npix_1+p_shift; j++)
+ {
+ k = j - p_shift;
+ flux_o[j] = flux1[k];
+ flxerr_o[j] = flxerr1[k];
+ lcts_o[j] = lcts1[k];
+ wgts_o[j] = wgts1[k];
+ bkgd_o[j] = bkgd1[k];
+ qual_o[j] = qual1[k];
+ }
+ }
+ }
+ break;
+
+ case BIN:
+ /* if nbin = 1, just copy input to output */
+ if (nbin == 1)
+ {
+ if (cf_version == 2)
+ {
+ for (j=0; j<npix_o; j++)
+ {
+ wave_o[j] = wave1[j];
+ flux_o[j] = flux1[j];;
+ flxerr_o[j] = flxerr1[j];
+ cnts_o[j] = cnts1[j];
+ cntserr_o[j] = cntserr1[j];
+ qual_o[j] = qual1[j];
+ }
+ }
+ else
+ {
+ for (j=0; j<npix_o; j++)
+ {
+ wave_o[j] = wave1[j];
+ flux_o[j] = flux1[j];;
+ flxerr_o[j] = flxerr1[j];
+ lcts_o[j] = lcts1[j];
+ wgts_o[j] = wgts1[j];
+ bkgd_o[j] = bkgd1[j];
+ qual_o[j] = qual1[j];
+ }
+ } /* end cf_version == 3 */
+ } /* end nbin == 1 */
+ else
+ {
+ if (cf_version == 2)
+ {
+ for (j=0; j<npix_o; j++)
+ {
+ k1 = j * nbin;
+ k2 = k1 + nbin;
+ if (k2 > npix_1)
+ k2 = npix_1;
+ swave = 0.;
+ sflux = 0.;
+ sferr = 0.;
+ scnts = 0.;
+ scerr = 0.;
+ squal = 0;
+ spix = 0;
+ for (k=k1; k<k2; k++)
+ {
+ swave += wave1[k];
+ if (qual1[k] > 0)
+ {
+ sflux += flux1[k];
+ sferr += flxerr1[k] * flxerr1[k];
+ scnts += cnts1[k];
+ scerr += cntserr1[k] * cntserr1[k];
+ squal += qual1[k];
+ spix++;
+ }
+ }
+ if (spix == 0)
+ spix = 1;
+ wave_o[j] = swave / (float)(k2 - k1);
+ flux_o[j] = sflux / spix;
+ flxerr_o[j] = sqrt (sferr) / spix;
+ cnts_o[j] = scnts;
+ cntserr_o[j] = sqrt (scerr);
+ qual_o[j] = squal;
+ } /* end of for j... */
+ } /* end cf_version == 2 */
+ else
+ {
+ for (j=0; j<npix_o; j++)
+ {
+ k1 = j * nbin;
+ k2 = k1 + nbin;
+ if (k2 > npix_1)
+ k2 = npix_1;
+ swave = 0.;
+ sflux = 0.;
+ sferr = 0.;
+ slcts = 0;
+ swgts = 0.;
+ sbkgd = 0.;
+ squal = 0;
+ spix = 0;
+ for (k=k1; k<k2; k++)
+ {
+ swave += wave1[k];
+ if (qual1[k] > 0)
+ {
+ sflux += flux1[k];
+ sferr += flxerr1[k] * flxerr1[k];
+ slcts += lcts1[k];
+ swgts += wgts1[k];
+ sbkgd += bkgd1[k];
+ squal += qual1[k];
+ spix++;
+ }
+ }
+ if (spix == 0)
+ spix = 1;
+ wave_o[j] = swave / (float)(k2 - k1);
+ flux_o[j] = sflux / spix;
+ flxerr_o[j] = sqrt (sferr) / spix;
+ lcts_o[j] = slcts;
+ qual_o[j] = squal / spix;
+ wgts_o[j] = swgts / spix;
+ bkgd_o[j] = sbkgd;
+ } /* end of for j... */
+ } /* end cf_version == 3 */
+ } /* end of nbin > 1 */
+ break;
+
+ case DERIV:
+ if (cf_version == 2)
+ {
+ for (j=0; j<npix_1-1; j++)
+ {
+ flux_o[j] = flux1[j+1] - flux1[j];
+ tmp1 = flxerr1[j+1]*flxerr1[j+1];
+ tmp2 = flxerr1[j]*flxerr1[j];
+ flxerr_o[j] = sqrt (tmp1 + tmp2);
+ tmp1 = cntserr1[j+1]*cntserr1[j+1];
+ tmp2 = cntserr1[j]*cntserr1[j];
+ cnts_o[j] = cnts1[j+1] - cnts1[j];
+ cntserr_o[j] = sqrt (tmp1 + tmp2);
+ qual_o[j] = qual1[j];
+ }
+ flux_o[npix_1-1] = flux_o[npix_1-2];
+ flxerr_o[npix_1-1] = flxerr_o[npix_1-2];
+ cnts_o[npix_1-1] = cnts_o[npix_1-2];
+ cntserr_o[npix_1-1] = cntserr_o[npix_1-2];
+ } /* end cf_version == 2 */
+ else
+ {
+ for (j=0; j<npix_1-1; j++)
+ {
+ flux_o[j] = flux1[j+1] - flux1[j];
+ tmp1 = flxerr1[j+1]*flxerr1[j+1];
+ tmp2 = flxerr1[j]*flxerr1[j];
+ flxerr_o[j] = sqrt (tmp1 + tmp2);
+ lcts_o[j] = lcts1[j+1] - lcts1[j];
+ qual_o[j] = qual1[j];
+ wgts_o[j] = wgts1[j];
+ bkgd_o[j] = bkgd1[j];
+ }
+ flux_o[npix_1-1] = flux_o[npix_1-2];
+ flxerr_o[npix_1-1] = flxerr_o[npix_1-2];
+ lcts_o[npix_1-1] = lcts_o[npix_1-2];
+ } /* end cf_version == 3 */
+ break;
+
+ case ADDNOISE:
+ if (cf_version == 2)
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ flux_o[j] = flux1[j] + arg2_val * rand1();
+ flxerr_o[j] = flxerr1[j];
+ cnts_o[j] = cnts1[j];
+ cntserr_o[j] = cntserr1[j];
+ qual_o[j] = qual1[j];
+ }
+ }
+ else
+ {
+ for (j=0; j<npix_1; j++)
+ {
+ flux_o[j] = flux1[j] + arg2_val * rand1();
+ flxerr_o[j] = flxerr1[j];
+ lcts_o[j] = lcts1[j];
+ wgts_o[j] = wgts1[j];
+ bkgd_o[j] = bkgd1[j];
+ qual_o[j] = qual1[j];
+ }
+ }
+ break;
+
+ default:
+ cf_if_error ("Illegal opcode; should never get here!");
+ break;
+
+ } /* end switch (opcode) */
+
+ /* write the extension containing the results as a binary table */
+ hdunum_o=i+1;
+
+ /* cf_write_spec creates the new extension and sets the pointer
+ * to it.
+ */
+ if (tfields_1 < 7)
+ cf_wrspec_cf2 (outfits, npix_o, wave_o, flux_o, flxerr_o, qual_o,
+ cnts_o, cntserr_o, tfields_1, areaflag);
+ else
+ cf_wrspec7 (outfits, npix_o, wave_o, flux_o, flxerr_o,
+ lcts_o, wgts_o, bkgd_o, qual_o);
+
+
+ if (wave_o != wave1)
+ free(wave_o);
+ free(wave1);
+ free(flux1);
+ free(flxerr1);
+ free(qual1);
+ free(flux_o);
+ free(flxerr_o);
+ free(qual_o);
+ if (cf_version == 2)
+ {
+ free(cnts1);
+ free(cntserr1);
+ free(cnts_o);
+ free(cntserr_o);
+ }
+ else
+ {
+ free(lcts1);
+ free(bkgd1);
+ free(wgts1);
+ free(lcts_o);
+ free(bkgd_o);
+ free(wgts_o);
+ }
+
+ /* is there only 1 extension in operand 2, so that we need to keep
+ * the data we've read in, or do we need to make space to read the
+ * next extension?
+ */
+ if (!arg2_scalar && (i < next_2))
+ {
+ free(flux2);
+ free(flxerr2);
+ free(qual2);
+ if (cf_version == 2)
+ {
+ free(cnts2);
+ free(cntserr2);
+ }
+ else
+ {
+ free(lcts2);
+ free(wgts2);
+ free(bkgd2);
+ }
+ }
+
+ } /* end of loop over next_1 */
+
+ /* add HISTORY lines to output file */
+ hdunum_o = 1;
+ FITS_movabs_hdu (outfits, hdunum_o, &hdutype_o, &status);
+
+ sprintf (comment, "cf_arith: operation = %s", argv[2]);
+ FITS_write_history (outfits, comment, &status);
+ sprintf (comment, "cf_arith: operand1 = %s", infile1);
+ FITS_write_history (outfits, comment, &status);
+ sprintf (comment, "cf_arith: operand2 = %s", infile2);
+ FITS_write_history (outfits, comment, &status);
+
+ /* update exposure time in output header if necessary */
+ if (exptime_o != exptime_1)
+ {
+ FITS_update_key (outfits, TFLOAT, "EXPTIME", &exptime_o, expt_comment,
+ &status);
+ sprintf (comment, "cf_arith: EXPTIME = EXPTIME1 + EXPTIME2");
+ FITS_write_history (outfits, comment, &status);
+ }
+
+ /* update FILENAME keyword in output file */
+ FITS_update_key (outfits, TSTRING, "FILENAME", outfile, NULL, &status);
+
+ time (&timeval);
+ timestr = ctime (&timeval);
+ sprintf (comment, "cf_arith: completed at %.24s", timestr);
+ /* over-write the trailing \n in timestr */
+/* following not needed when field width is specified as 24 above
+ comment[strlen(comment)-1] = '\0';
+ padstr (comment, FLEN_CARD);
+*/
+ FITS_write_history (outfits, comment, &status);
+
+ /* Close the files. */
+
+ FITS_close_file(infits_1, &status);
+ if (!arg2_scalar)
+ FITS_close_file(infits_2, &status);
+ FITS_close_file(outfits, &status);
+
+ /* Enter a timestamp into the log. */
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+#ifdef SOLARIS
+ ieee_retrospective(stdout);
+#endif
+ return 0;
+}
+
+int chkop (opstr)
+char *opstr;
+{
+ if (!strcmp (opstr, "+"))
+ return (PLUS);
+ else if (!strcmp (opstr, "-"))
+ return (MINUS);
+ else if (!strcmp (opstr, "*"))
+ return (MULT);
+ else if (!strcmp (opstr, "/"))
+ return (DIV);
+ else if (!strcmp (opstr, "avg_t"))
+ return (AVG_T);
+ else if (!strcmp (opstr, "avg_s"))
+ return (AVG_S);
+ else if (!strcmp (opstr, "repl_d"))
+ return (REPL_D);
+ else if (!strcmp (opstr, "repl_e"))
+ return (REPL_E);
+ else if (!strcmp (opstr, "boxcar"))
+ return (BOXCAR);
+ else if (!strcmp (opstr, "delta"))
+ return (DELTA);
+ else if (!strcmp (opstr, "min"))
+ return (MIN);
+ else if (!strcmp (opstr, "max"))
+ return (MAX);
+ else if (!strcmp (opstr, "shift"))
+ return (SHIFT);
+ else if (!strcmp (opstr, "bin"))
+ return (BIN);
+ else if (!strcmp (opstr, "deriv"))
+ return (DERIV);
+ else if (!strcmp (opstr, "addnoise"))
+ return (ADDNOISE);
+ else
+ return (0);
+}
+
+/* check_num (in_str) returns TRUE if in_str is a string representation of
+ * a valid number, FALSE otherwise.
+ * This is a simple-minded check: just see if first char is +,-,digit.
+ */
+int check_num (in_str)
+char *in_str;
+{
+ if ((in_str[0] == '+') || (in_str[0] == '-'))
+ {
+ if (isdigit (in_str[1]))
+ return (TRUE);
+ else
+ return (FALSE);
+ }
+ if (isdigit (in_str[0]))
+ return (TRUE);
+
+ return (FALSE);
+}
+
+void padstr (pstr, len)
+char *pstr;
+int len;
+{
+ int i, slen;
+
+ slen = strlen (pstr);
+ for (i=slen; i<len; i++)
+ *(pstr + i) = ' ';
+
+ return;
+}
+/* return a random number in range -1 -> 1 */
+double rand1 ()
+{
+ long random();
+ double r;
+
+ r = 2. * (double) random() / (double)MAX_RAND - 1.;
+ return (r);
+}
+
diff --git a/src/analysis/cf_coadd.c b/src/analysis/cf_coadd.c
new file mode 100644
index 0000000..eaa5fe2
--- /dev/null
+++ b/src/analysis/cf_coadd.c
@@ -0,0 +1,192 @@
+/******************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ ******************************************************************************
+ *
+ * Synopsis: cf_coadd root_name
+ *
+ * This program calls the routines that produce the exposure-level
+ * all files and the observation-level all, ano, and nvo files.
+ *
+ * 03/29/04 v0.1 bjg Begin work.
+ * 04/05/04 v0.2 bjg Remove unused variables
+ * Include unistd.h
+ * 06/07/04 v0.3 bjg Updated some keywords
+ * 08/12/04 v0.4 bjg Keywords QIK_COR and COMB_COR
+ * now set to COMPLETE.
+ * 08/26/04 v0.5 bjg Handle case aperture=RFPT
+ * 03/17/05 v0.6 tc Rename EXPTIME to OBSTIME in all extensions
+ * 08/22/05 v1.0 wvd Completely re-write for CalFUSE v3.1.7.
+ * Calls cf_make_all_exp for each exposure and
+ * cf_make_all_obs.csh only once.
+ * 08/27/07 v1.1 bot Changed i from int to long to match n
+ * Added L to corresponding values
+ *
+ *****************************************************************************/
+
+
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include "calfuse.h"
+
+static char CF_PRGM_ID[] = "cf_coadd";
+static char CF_VER_NUM[] = "1.1";
+
+
+/*********************************************************************/
+
+int main(int argc, char *argv[])
+{
+
+ char asnf_file[120], filename[120], instmode[100], aper_string[100], aper_num[100];
+ fitsfile *asnf_fits_ptr, *infits;
+ long n;
+ int status = 0;
+ long i;
+ int anynull;
+ FILE * ffile;
+
+
+ char command0[256];
+
+
+ char memname[120], *memname_ptr;
+ char memtype[120], *memtype_ptr;
+ char ** memname_ptr2;
+ char ** memtype_ptr2;
+
+ char NULL_STR[] = {'\0'};
+
+ char file_present;
+ char expo_num_string[10];
+ int expo_num;
+
+ char know=0;
+
+ /* Enter a timestamp into the log. */
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+
+ memname_ptr=memname;
+ memtype_ptr=memtype;
+
+ memname_ptr2=&memname_ptr;
+ memtype_ptr2=&memtype_ptr;
+
+
+ /* Input Parameters */
+ if (argc != 2)
+ cf_if_error("Usage: cf_coadd rootname");
+
+ /*Open association file*/
+
+ strcpy(asnf_file, argv[1]);
+ strcat(asnf_file, "asnf.fit");
+ FITS_open_file(&asnf_fits_ptr, asnf_file, READONLY, &status);
+ FITS_movabs_hdu(asnf_fits_ptr, 2, NULL, &status);
+
+
+ FITS_read_key(asnf_fits_ptr, TLONG, "NAXIS2", &n, NULL, &status);
+
+
+ for (i=0L;i<n;i++){
+
+ cf_if_fits_error(fits_read_col_str(asnf_fits_ptr, 1, i+1L, 1,1, NULL_STR,
+ memname_ptr2, &anynull, &status));
+
+ cf_if_fits_error(fits_read_col_str(asnf_fits_ptr, 2, i+1L, 1,1, NULL_STR,
+ memtype_ptr2, &anynull, &status));
+
+ cf_if_fits_error(fits_read_col_log(asnf_fits_ptr, 3, i+1L, 1, 1, 0,
+ &file_present, &anynull, &status));
+
+ if (file_present == FALSE) continue;
+ if (strncasecmp(memtype,"EXPOSURE",8)) continue;
+
+ strncpy(expo_num_string,&memname[8],3);
+ expo_num=atoi(expo_num_string);
+
+ if (expo_num==701) continue;
+
+ strcpy(filename,memname);
+ strcat(filename,"1ahistfraw.fit");
+ strcpy(instmode,"hist");
+ ffile=fopen(filename,"r");
+ if (ffile == NULL) {
+ strcpy(instmode,"ttag");
+ strcpy(filename,memname);
+ strcat(filename,"1attagfraw.fit");
+ ffile=fopen(filename,"r");
+ if (ffile == NULL) {
+ printf("Warning: Expo %s not present\n",expo_num_string);
+ continue;
+ }
+ fclose(ffile);
+ }
+ else {
+ fclose(ffile);
+ }
+
+
+ if (!know) {
+
+ FITS_open_file(&infits, filename, READONLY, &status);
+ FITS_read_key(infits, TSTRING, "APERTURE", aper_string, NULL, &status);
+
+ if (!strncasecmp(aper_string,"LWRS",4)) strcpy(aper_num,"4");
+ if (!strncasecmp(aper_string,"MDRS",4)) strcpy(aper_num,"2");
+ if (!strncasecmp(aper_string,"HIRS",4)) strcpy(aper_num,"3");
+ if (!strncasecmp(aper_string,"PINH",4)) strcpy(aper_num,"1");
+ if (!strncasecmp(aper_string,"RFPT",4)) strcpy(aper_num,"4");
+
+ FITS_close_file(infits, &status);
+ know=1;
+ }
+
+
+ strcpy(command0,"cf_make_all_exp ");
+ strcat(command0,memname);
+ strcat(command0,"00all");
+ strcat(command0,aper_num);
+ strcat(command0,instmode);
+ strcat(command0,"fcal.fit ");
+ strcat(command0,memname);
+ strcat(command0,"1alif");
+ strcat(command0,aper_num);
+ strcat(command0,instmode);
+ strcat(command0,"fcal.fit ");
+ strcat(command0,memname);
+ strcat(command0,"1blif");
+ strcat(command0,aper_num);
+ strcat(command0,instmode);
+ strcat(command0,"fcal.fit ");
+ strcat(command0,memname);
+ strcat(command0,"2alif");
+ strcat(command0,aper_num);
+ strcat(command0,instmode);
+ strcat(command0,"fcal.fit ");
+ strcat(command0,memname);
+ strcat(command0,"2blif");
+ strcat(command0,aper_num);
+ strcat(command0,instmode);
+ strcat(command0,"fcal.fit ");
+
+ system(command0);
+
+ }
+
+ FITS_close_file(asnf_fits_ptr,&status);
+
+ sprintf(command0,"cf_make_all_obs.csh %s", asnf_file);
+ system(command0);
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done Processing");
+
+ return(EXIT_SUCCESS);
+
+}
diff --git a/src/analysis/cf_combine.c b/src/analysis/cf_combine.c
new file mode 100644
index 0000000..0b91009
--- /dev/null
+++ b/src/analysis/cf_combine.c
@@ -0,0 +1,544 @@
+/*******************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_combine [-ahk] [-v level] file_list output_idf_file
+ *
+ * Description: This is a utility program that combines a series of
+ * FUSE spectra in the form of FITS binary tables as produced
+ * by the CalFUSE pipeline. The files are combined by taking
+ * the exposure-weighted mean of the fluxes and flux errors
+ * and summing the counts.
+ * It is assumed that the error arrays contain standard
+ * deviations, not variances.
+ *
+ *
+ * History: 01/04/00 jwk started work
+ * 05/01/00 v1.2 jwk handle SHORT qual arrays
+ * 09/11/00 v1.3 jwk remove include <sunmath.h>
+ * 10/11/00 v1.4 jwk update FILENAME keyword in output file
+ * 10/27/00 v1.5 peb #ifdef ieee_retrospective
+ * 04/18/01 v1.6 wvd Change declaration of timeval from
+ * long to time_t
+ * 10/29/02 v1.7 wvd Correct error in history line.
+ * 05/19/03 v1.8 wvd Two updates from jwk:
+ * Close each input file in initial loop;
+ * without this cfitsio crashes upon
+ * opening the 60th file.
+ * Weight each pixel by exposure time
+ * after excluding 'bad' pixels.
+ * 12/15/03 v1.9 bjg Changed to work on CalFUSE 3 spectrum
+ * data format
+ * 01/12/04 v1.10 bjg npix_1 is now correct
+ * copy header of 1st file instead of 2nd
+ * Updated the name of some FITS cols that
+ * were still using 2.4 format
+ * 03/09/04 v1.11 wvd Change POTHOLE to QUALITY throughout.
+ * 04/05/04 - bjg Declarations for cf_wrspec7 and
+ * cf_wrspec_cf2
+ * Remove unused variables
+ * 06/07/04 v1.12 bjg Update some keywords (plantime,
+ * rawtime, exp_saa, nbadevnt ...)
+ * 04/07/05 v1.13 tc Read 1D|2D spectrum format. Clean unused
+ * variables. Allows one to shift a 2D
+ * spectrum (2nd column in the filelist).
+ * Use calloc rather than malloc. The
+ * quality value is now the nearest short.
+ * Update ROOTNAME keyword. Change EXP to
+ * OBS if "-k" (optional). Proper use of
+ * fclose() and rewind()
+ * 04/16/05 v1.14 tc Use cf_read_col()
+ * 05/02/05 v1.15 wvd Write NSPEC, SPEC###, WOFF### to
+ * output file header (primary HDU).
+ * 06/03/05 v1.16 wvd Delete unused variables.
+ * 07/06/05 v1.17 wvd Use fgets to read input file.
+ * Change pix_shift to type int.
+ * 07/21/05 v1.18 wvd Adopt the sign convention for spectral
+ * shifts used by FUSE_REGISTER.
+ * 08/26/05 v1.19 wvd Without arguments, don't return an
+ * error. Just print help and exit.
+ * 08/29/05 v1.20 wvd If input list contains only file
+ * names, assume shifts are zero.
+ * 01/31/06 v1.21 wvd Revise creation date of output file.
+ * 05/19/06 v1.22 wvd Use same options as idf_combine.
+ * Ignore spectra with EXP_STAT != 0.
+ * Override with -a option.
+ * 05/22/06 v1.23 wvd Rewrite program using a single while
+ * loop.
+ * 05/23/06 v1.24 wvd Properly normalize quality array.
+ * 05/26/06 v1.25 wvd Include unistd.h
+ * 07/12/06 v1.26 wvd Clean up i/o.
+ * 08/14/06 v1.27 wvd Count SPEC### and WAVE### using ngood,
+ * not nfiles.
+ * 05/04/07 v1.28 wvd If the input file list contains a
+ * blank line, skip to the next line.
+ * 08/27/07 v1.29 bot Changed TINT to TLONG l.412
+ * Added L to long l.125 to 136, 351, 378
+ * 04/04/08 v1.30 wvd If -a flag is set, include files with
+ * positive values of EXP_STAT, but not
+ * those with negative values.
+ * 07/25/08 v1.31 wvd Set output EXP_STAT keyword to lowest
+ * non-negative value among input files.
+ *
+ ****************************************************************************/
+
+#include <time.h>
+#include <math.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include "calfuse.h"
+
+void cf_wrspec7(fitsfile *outfits, long npts, float *wave, float *flux,
+ float *error, long *counts, float *weights,
+ float *bkgd,short *quality);
+void cf_wrspec_cf2(fitsfile *outfits, int npts, float *wave,
+ float *spec, float *errs, short *qual,
+ float *counts, float *cntserr, int ncol,
+ int areaflag);
+
+static char CF_PRGM_ID[] = "cf_combine";
+static char CF_VER_NUM[] = "1.31";
+
+int main(int argc, char *argv[])
+{
+ char *timestr;
+ time_t timeval;
+ char flist[80], infile[80], line[FLEN_CARD], outfile[80], string0[100];
+ char comment[FLEN_CARD];
+ char errstr[80];
+ int nargs, nfiles, ngood;
+ int status=0;
+ int hdutype_1, hdutype_o;
+ int hdunum_1, hdunum_o;
+ long npix_1;
+ int tfields_1, delta = 0;
+ long j;
+ short *quality1;
+ float *wave1, *flux1, *error1, *weights1, *bkgd1;
+
+ double *flux_o, *error_o, *quality_o;
+ float *weights_o, *bkgd_o;
+ long *counts_o, *counts1;
+ float *exptime_p;
+ float f1, shift, wpc;
+
+ float exptime_1, exptime_o = 0.;
+ float rawtime_1, rawtime_o = 0.;
+ long plantime_1, plantime_o = 0L;
+ long nbadevnt_1, nbadevnt_o = 0L;
+ long nbadpha_1 , nbadpha_o = 0L;
+ long exp_bad_1 , exp_bad_o = 0L;
+ long exp_brst_1, exp_brst_o = 0L;
+ long exp_hv_1, exp_hv_o = 0L;
+ long exp_jitr_1, exp_jitr_o = 0L;
+ long exp_lim_1 , exp_lim_o = 0L;
+ long exp_saa_1 , exp_saa_o = 0L;
+ long expnight_1, expnight_o = 0L;
+
+ long nevents_1, nevents_o = 0L;
+ long exp_stat, exp_stat_out=999;
+
+ double mjd_start, mjd_end;
+ double mjd_start_o = 99999., mjd_end_o = 0.;
+ fitsfile *infits_1, *outfits;
+ FILE *ifp;
+ char keyword[FLEN_KEYWORD], root_name[32];
+ int k_flag = 0;
+
+ float *temp_float;
+ short *temp_short;
+ long *temp_long;
+
+ /* Function prototypes*/
+ void getnshift_float(float*, float*, long, int);
+ void getnshift_short(short*, short*, long, int);
+ void getnshift_long(long*, long*, long, int);
+
+ int optc;
+ int ignore_exp_stat=TRUE;
+
+ char opts[] = "ahkv:";
+ char usage[] =
+ "Usage:\n"
+ " cf_combine [-ahk] [-v level] file_list output_idf_file\n";
+ char option[] =
+ "Options:\n"
+ " -h: this help message\n"
+ " -v: verbosity level (=1; 0 is silent)\n"
+ " -a: ignore EXP_STAT keyword\n"
+ " -k: Change EXP keywords to OBS\n";
+
+ verbose_level = 1;
+
+ /* Check number of options and arguments */
+ while ((optc = getopt(argc, argv, opts)) != -1) {
+ switch(optc) {
+
+ case 'h':
+ printf("%s\n%s", usage, option);
+ return 0;
+ case 'a':
+ ignore_exp_stat=FALSE;
+ break;
+ case 'v':
+ verbose_level = atoi(optarg);
+ break;
+ case 'k':
+ k_flag=1;
+ break;
+ }
+ }
+
+ /* Enter a timestamp into the log. */
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ /* Initialize error checking */
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+ if (argc < optind+2) {
+ printf("%s", usage);
+ return 1;
+ }
+
+ strcpy (flist, argv[optind]);
+ strcpy (outfile, argv[optind+1]);
+
+ if ((ifp = fopen (flist, "r")) == NULL)
+ {
+ sprintf (errstr, "Unable to open file %s\n", flist);
+ cf_if_error (errstr);
+ }
+
+ if (ignore_exp_stat)
+ cf_verbose(1,"Will include only files with EXP_STAT=0") ;
+ else
+ cf_verbose(1,"Will include only files with EXP_STAT >= 0") ;
+
+ nfiles = ngood = 0;
+
+ /* BIG LOOP THROUGH INPUT FILES */
+ while (fgets(line, FLEN_CARD, ifp) != NULL) {
+ nargs = sscanf(line, "%s %d", infile, &delta);
+ if (nargs == EOF) continue;
+ if (nargs == 1) delta = 0;
+ nfiles++;
+ cf_verbose (3, "Input file loop: nfiles = %d, file = %s", nfiles, infile);
+
+ /* Open input file */
+ FITS_open_file(&infits_1, infile, READONLY, &status);
+ FITS_read_key(infits_1, TLONG, "EXP_STAT", &exp_stat, NULL, &status);
+ FITS_read_key(infits_1, TDOUBLE, "EXPSTART", &mjd_start, NULL, &status);
+ FITS_read_key(infits_1, TDOUBLE, "EXPEND" , &mjd_end , NULL, &status);
+ FITS_read_key(infits_1, TFLOAT, "EXPTIME" , &exptime_1 , NULL, &status);
+ FITS_read_key(infits_1, TLONG, "NEVENTS", &nevents_1, NULL, &status);
+ FITS_read_key(infits_1, TFLOAT, "RAWTIME" , &rawtime_1 , NULL, &status);
+ FITS_read_key(infits_1, TLONG, "PLANTIME", &plantime_1, NULL, &status);
+ nevents_o += nevents_1;
+ rawtime_o += rawtime_1;
+ plantime_o += plantime_1;
+
+ if (mjd_start < mjd_start_o) mjd_start_o = mjd_start;
+ if (mjd_end > mjd_end_o) mjd_end_o = mjd_end;
+
+ /* Create output file, copy the header from the input file */
+ if (nfiles==1)
+ {
+ /* open output file */
+ remove(outfile); /* In case the old file name exists */
+ FITS_create_file (&outfits, outfile, &status);
+ FITS_copy_header(infits_1, outfits, &status);
+ FITS_write_date(outfits, &status);
+
+ FITS_read_key(infits_1, TFLOAT, "WPC" , &wpc , NULL, &status);
+
+ /* Now go to the second HDU and figure out how long the arrays are. */
+ hdunum_1 = 2;
+ FITS_movabs_hdu(infits_1, hdunum_1, &hdutype_1, &status);
+ FITS_read_key(infits_1, TINT, "TFIELDS", &tfields_1, NULL, &status);
+
+ if (tfields_1 != 7)
+ {
+ sprintf (errstr, "Expecting 7 cols, found %d\n", tfields_1);
+ cf_if_error (errstr);
+ }
+
+ npix_1 = cf_read_col(infits_1, TFLOAT, "WAVE", (void **) &wave1);
+
+ /* Allocate data arrays (calloc initializes to 0 by default). */
+ exptime_p = (float *) cf_calloc(npix_1, sizeof(float));
+
+ flux1 = (float *) cf_calloc(npix_1, sizeof(float));
+ error1 = (float *) cf_calloc(npix_1, sizeof(float));
+ counts1 = (long *) cf_calloc(npix_1, sizeof(long));
+ weights1 = (float *) cf_calloc(npix_1, sizeof(float));
+ bkgd1 = (float *) cf_calloc(npix_1, sizeof(float));
+ quality1 = (short *) cf_calloc(npix_1, sizeof(short));
+
+ flux_o = (double *) cf_calloc(npix_1, sizeof(double));
+ error_o = (double *) cf_calloc(npix_1, sizeof(double));
+ counts_o = (long *) cf_calloc(npix_1, sizeof(long));
+ weights_o = (float *) cf_calloc(npix_1, sizeof(float));
+ bkgd_o = (float *) cf_calloc(npix_1, sizeof(float));
+ quality_o = (double *) cf_calloc(npix_1, sizeof(double));
+
+ hdunum_1 = 1;
+ FITS_movabs_hdu(infits_1, hdunum_1, &hdutype_1, &status);
+
+ } /* end of if(nfiles==1) */
+
+ /* Set EXP_STAT to lowest non-negative value in input files. */
+ if (exp_stat_out > exp_stat && exp_stat >= 0) exp_stat_out = exp_stat;
+
+ /* Skip files with EXP_TIME = 0 or EXP_STAT != 0. */
+ if (ignore_exp_stat && exp_stat != 0) {
+ cf_if_warning("File %s rejected. EXP_STAT not equal to zero. Use -a flag to override.",
+ infile) ;
+ FITS_close_file(infits_1,&status);
+ continue;
+ }
+
+ /* Never include files with negative values of EXP_STAT. */
+ else if (exp_stat < 0) {
+ cf_if_warning("File %s rejected. EXP_STAT less than zero.", infile) ;
+ FITS_close_file(infits_1,&status);
+ continue;
+ }
+
+ if (exptime_1 < 1.) {
+ cf_verbose (3, "Rejecting file %s: EXPTIME = %f", infile, exptime_1);
+ FITS_close_file(infits_1,&status);
+ continue;
+ }
+ ngood++;
+
+ FITS_read_key(infits_1, TLONG, "NBADEVNT", &nbadevnt_1, NULL, &status);
+ FITS_read_key(infits_1, TLONG, "NBADPHA" , &nbadpha_1 , NULL, &status);
+ FITS_read_key(infits_1, TLONG, "EXP_BAD" , &exp_bad_1 , NULL, &status);
+ FITS_read_key(infits_1, TLONG, "EXP_BRST", &exp_brst_1, NULL, &status);
+ FITS_read_key(infits_1, TLONG, "EXP_HV", &exp_hv_1, NULL, &status);
+ FITS_read_key(infits_1, TLONG, "EXP_JITR", &exp_jitr_1, NULL, &status);
+ FITS_read_key(infits_1, TLONG, "EXP_LIM" , &exp_lim_1 , NULL, &status);
+ FITS_read_key(infits_1, TLONG, "EXP_SAA" , &exp_saa_1 , NULL, &status);
+ FITS_read_key(infits_1, TLONG, "EXPNIGHT", &expnight_1, NULL, &status);
+
+ exptime_o += exptime_1;
+ nbadevnt_o += nbadevnt_1;
+ nbadpha_o += nbadpha_1;
+ exp_bad_o += exp_bad_1;
+ exp_saa_o += exp_saa_1;
+ exp_lim_o += exp_lim_1;
+ exp_brst_o += exp_brst_1;
+ exp_hv_o += exp_hv_1;
+ exp_jitr_o += exp_jitr_1;
+ expnight_o += expnight_1;
+
+ /* Read the data from input file (HDU 2) */
+ hdunum_1 = 2;
+ FITS_movabs_hdu(infits_1, hdunum_1, &hdutype_1, &status);
+
+ (void) cf_read_col(infits_1, TFLOAT, "FLUX", (void **) &temp_float);
+ getnshift_float(flux1, temp_float, npix_1, delta);
+ free(temp_float);
+
+ (void) cf_read_col(infits_1, TFLOAT, "ERROR", (void **) &temp_float);
+ getnshift_float(error1, temp_float, npix_1, delta);
+ free(temp_float);
+
+ (void) cf_read_col(infits_1, TSHORT, "QUALITY", (void **) &temp_short);
+ getnshift_short(quality1, temp_short, npix_1, delta);
+ free(temp_short);
+
+ (void) cf_read_col(infits_1, TLONG, "COUNTS", (void **) &temp_long);
+ getnshift_long(counts1, temp_long, npix_1, delta);
+ free(temp_long);
+
+ (void) cf_read_col(infits_1, TFLOAT, "WEIGHTS", (void **) &temp_float);
+ getnshift_float(weights1, temp_float, npix_1, delta);
+ free(temp_float);
+
+ (void) cf_read_col(infits_1, TFLOAT, "BKGD", (void **) &temp_float);
+ getnshift_float(bkgd1, temp_float, npix_1, delta);
+ free(temp_float);
+
+ /* Average fluxes, weighting by exposure time; add counts. */
+ /* Include only pixels with non-zero quality flags. */
+ for (j=0L; j<npix_1; j++) {
+ if (quality1[j] > 0) {
+ f1 = exptime_1;
+ exptime_p[j] += f1;
+ flux_o[j] += f1 * flux1[j];
+ error_o[j] += f1 * f1 * (double) error1[j]*error1[j];
+ counts_o[j] += counts1[j];
+ weights_o[j] += weights1[j];
+ bkgd_o[j] += bkgd1[j];
+ quality_o[j] += f1 * (double) quality1[j];
+ }
+ }
+
+ FITS_close_file(infits_1, &status);
+
+ /* Write input file name and spectral shift to output file header. */
+ sprintf(keyword, "SPEC%03d", ngood);
+ FITS_update_key(outfits, TSTRING, keyword, infile, NULL, &status);
+ sprintf(keyword, "WOFF%03d", ngood);
+ shift = delta * wpc;
+ FITS_update_key(outfits, TFLOAT, keyword, &shift, "[A]", &status);
+
+
+ } /* end of loop over input files */
+
+ /* Convert variances back to sigma. Normalize flux, error, and quality by EXPTIME.
+ Convert from doubles to floats. */
+ for (j=0L; j<npix_1; j++) if (exptime_p[j] > 0.) {
+ flux1[j] = flux_o[j] / exptime_p[j];
+ error1[j] = sqrt(error_o[j]) / exptime_p[j];
+ quality1[j] = cf_nint(quality_o[j] / exptime_p[j]);
+ }
+ else {
+ flux1[j] = error1[j] = 0.;
+ quality1[j] = 0;
+ }
+
+ /* Write the output file (in multi-row format). */
+ cf_wrspec7 (outfits, npix_1, wave1, flux1, error1, counts_o, weights_o, bkgd_o, quality1);
+
+ free(exptime_p);
+ free(wave1);
+ free(flux1);
+ free(error1);
+ free(bkgd1);
+ free(counts1);
+ free(weights1);
+ free(quality1);
+ free(flux_o);
+ free(error_o);
+ free(quality_o);
+ free(bkgd_o);
+ free(counts_o);
+ free(weights_o);
+
+ hdunum_o = 1;
+ FITS_movabs_hdu (outfits, hdunum_o, &hdutype_o, &status);
+
+ /* update output header keywords*/
+
+ FITS_update_key(outfits, TLONG, "EXP_STAT", &exp_stat_out, NULL, &status);
+ FITS_update_key(outfits, TDOUBLE, "EXPSTART", &mjd_start_o, NULL, &status);
+ FITS_update_key(outfits, TDOUBLE, "EXPEND", &mjd_end_o , NULL, &status);
+ FITS_update_key(outfits, TFLOAT, "EXPTIME", &exptime_o , NULL, &status);
+ FITS_update_key(outfits, TLONG, "NEVENTS", &nevents_o, NULL, &status);
+ FITS_update_key(outfits, TFLOAT, "RAWTIME", &rawtime_o , NULL, &status);
+ FITS_update_key(outfits, TLONG, "PLANTIME", &plantime_o, NULL, &status);
+ FITS_update_key(outfits, TLONG, "NBADEVNT", &nbadevnt_o, NULL, &status);
+ FITS_update_key(outfits, TLONG, "NBADPHA" , &nbadpha_o , NULL, &status);
+ FITS_update_key(outfits, TLONG, "EXP_BAD" , &exp_bad_o , NULL, &status);
+ FITS_update_key(outfits, TLONG, "EXP_BRST", &exp_brst_o, NULL, &status);
+ FITS_update_key(outfits, TLONG, "EXP_HV", &exp_hv_o, NULL, &status);
+ FITS_update_key(outfits, TLONG, "EXP_JITR", &exp_jitr_o, NULL, &status);
+ FITS_update_key(outfits, TLONG, "EXP_LIM" , &exp_lim_o , NULL, &status);
+ FITS_update_key(outfits, TLONG, "EXP_SAA" , &exp_saa_o , NULL, &status);
+ FITS_update_key(outfits, TLONG, "EXPNIGHT", &expnight_o, NULL, &status);
+
+ /* update FILENAME keyword in output file */
+ FITS_update_key(outfits, TSTRING, "FILENAME", outfile, NULL, &status);
+
+ strcpy(string0, "COMBINED SPECTRA");
+ FITS_update_key(outfits, TSTRING, "FILETYPE", string0, NULL, &status);
+
+ sprintf(string0, "000");
+ FITS_update_key(outfits, TSTRING, "EXP_ID", string0, NULL, &status);
+
+ FITS_read_key(outfits, TSTRING, "ROOTNAME", root_name, NULL, &status);
+ sprintf(string0, "%.8s000", root_name);
+ FITS_update_key(outfits, TSTRING, "ROOTNAME", string0, NULL, &status);
+
+ FITS_update_key(outfits, TINT, "NSPEC", &ngood,
+ "Number of combined spectral files", &status);
+
+ if (k_flag)
+ {
+ cf_if_fits_error(fits_modify_name(outfits, "EXP_STAT", "OBS_STAT", &status));
+ cf_if_fits_error(fits_modify_name(outfits, "EXPSTART", "OBSSTART", &status));
+ cf_if_fits_error(fits_modify_name(outfits, "EXPEND", "OBSEND", &status));
+ cf_if_fits_error(fits_modify_name(outfits, "EXPTIME", "OBSTIME", &status));
+ cf_if_fits_error(fits_modify_name(outfits, "EXPNIGHT", "OBSNIGHT", &status));
+ }
+ else {
+ /* Add HISTORY lines to output file */
+ if (ignore_exp_stat) {
+ sprintf (comment, "cf_combine: Including only files with EXP_STAT=0");
+ FITS_write_history (outfits, comment, &status);
+ }
+
+ else {
+ sprintf (comment, "cf_combine: Including only files with EXP_STAT >= 0");
+ FITS_write_history (outfits, comment, &status);
+ }
+
+ sprintf (comment, "cf_combine: File list = %s", flist);
+ FITS_write_history (outfits, comment, &status);
+
+ time (&timeval);
+ timestr = ctime (&timeval);
+ sprintf (comment, "cf_combine: Completed on %.24s", timestr);
+ FITS_write_history (outfits, comment, &status);
+ }
+
+ /* Close the files. */
+ fclose(ifp);
+ FITS_close_file(outfits, &status);
+
+ /* Enter a timestamp into the log. */
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+#ifdef SOLARIS
+ ieee_retrospective(stdout);
+#endif
+ return 0;
+}
+
+
+void getnshift_float (float *out_vect, float *in_vect, long n, int delta)
+{
+ long k, ind;
+
+ for (k = 0; k < n; k++)
+ {
+ ind = k - delta;
+ if((ind >= 0) && (ind < n))
+ out_vect[k] = in_vect[ind];
+ else
+ out_vect[k] = 0;
+ }
+}
+
+void getnshift_short (short *out_vect, short *in_vect, long n, int delta)
+{
+ long k, ind;
+
+ for (k = 0; k < n; k++)
+ {
+ ind = k - delta;
+ if((ind >= 0) && (ind < n))
+ out_vect[k] = in_vect[ind];
+ else
+ out_vect[k] = 0;
+ }
+}
+
+void getnshift_long (long *out_vect, long *in_vect, long n, int delta)
+{
+ long k, ind;
+
+ for (k = 0; k < n; k++)
+ {
+ ind = k - delta;
+ if((ind >= 0) && (ind < n))
+ out_vect[k] = in_vect[ind];
+ else
+ out_vect[k] = 0;
+ }
+}
diff --git a/src/analysis/cf_make_900_obs.csh b/src/analysis/cf_make_900_obs.csh
new file mode 100755
index 0000000..9edbc70
--- /dev/null
+++ b/src/analysis/cf_make_900_obs.csh
@@ -0,0 +1,193 @@
+#!/usr/local/bin/tcsh -f
+
+#******************************************************************************
+#* Johns Hopkins University
+#* Center For Astrophysical Sciences
+#* FUSE
+#******************************************************************************
+#*
+#* Synopsis: cf_make_900_obs.csh association_file
+#*
+#* Description: This routine is derived from cf_make_all_obs.csh, but modified
+#* to consider only 900+ (airglow) files. Output is a single
+#* quick-look image of the airglow spactrum.
+#*
+#* Extracted spectra are combined, not IDF files.
+#*
+#* When an expected data set is missing, the script stops, cleans
+#* the directory, and returns 1.
+#*
+#* History: 08/08/08 1.00 wvd Create separate quick-look image
+#* for 900+ (airglow) exposures.
+#* Always combine extracted spectra. If
+#* cf_xcorr fails, combine with no shift.
+#* 08/08/08 1.01 wvd Rename airglow quick-look file to
+#* M112580100000airgttagf.gif
+#*
+#*****************************************************************************/
+
+# Delete files after processing? (Default is no.)
+#set DELETE_IDF # Delete intermediate data files
+set DELETE_BPM # Delete bad-pixel map files
+
+# Set program path
+set rm = "/bin/rm -f"
+
+set cf_xcorr = cf_xcorr
+set cf_combine = cf_combine
+set cf_pack = cf_pack
+set cf_nvo = cf_nvo
+set idl_obsplot = idl_obsplot.pl
+set modhead = modhead
+
+# Init var list
+set detector = (1a 2b)
+set channel = (lif sic)
+set resolution = (2 3 4)
+set obsmod = (hist ttag)
+
+# Determine the root name and the program ID
+set asnf = $1
+set rn = ${asnf:s/000asnf.fit//}
+set pid = `echo $rn | awk '{print substr($1, 1, 4)}'`
+
+# Determine the object class
+set tmp_file = `ls ${rn}*fcal.fit | awk '{if (NR == 1) print}'`
+set tmp_buf = `$modhead $tmp_file OBJCLASS`
+set objclass = $tmp_buf[2]
+
+# Clean tmp files that the script will create (safe)
+$rm tmp_xcorr.res tmp_combine.lis
+$rm tmp_good_exp.lis tmp_exp.lis tmp_seg_dn.lis
+$rm DN_${rn}*.fit
+
+foreach om ($obsmod)
+ foreach res ($resolution)
+ foreach chan ($channel)
+ foreach det ($detector)
+
+ set ignore_exp_stat = ''
+ if ($om == hist) set ignore_exp_stat = -a
+ if ($pid == S100) set ignore_exp_stat = -a
+ if ($pid == M106) set ignore_exp_stat = -a
+
+ # Find exposures that match the current segment
+ set seg = $det$chan$res$om
+ set readfiles = 0
+ ls ${rn}9[0-9][0-9]${seg}fcal.fit |& grep -v 000${seg} > tmp_exp.lis # Keep only "9xx" exposures
+ if ($? == 0) then
+ set readfiles = 2
+ set ignore_exp_stat = -a
+ endif
+
+ if ($readfiles >= 1) then # There are one or more exposures
+
+ echo " "
+ echo "*** Processing: $seg ***"
+ # [1a][lif] -> [1b][lif], [2b][lif] -> [2a][lif] etc...
+ if ($det == 1a) set det2 = 1b
+ if ($det == 2b) set det2 = 2a
+ set seg2 = $det2$chan$res$om
+
+ echo "----- cf_xcorr input -----"
+ cat tmp_exp.lis
+ echo "----------------------------"
+ $cf_xcorr tmp_exp.lis tmp_xcorr.res # Compute shift and sigma_shift
+ echo "----- cf_xcorr results -----"
+ cat tmp_xcorr.res
+ echo "----------------------------"
+
+ awk '{if ($3 >= 0) {print $6, $2} else {print $6}}' tmp_xcorr.res > tmp_good_exp.lis
+
+ #
+ # --- Path 1: Optimize resolution ---
+ #
+
+ echo "Optimize resolution..."
+ set n_good = `cat tmp_good_exp.lis | wc -l`
+
+ # Extract [Day + Night] spectra
+ set s = DN_${rn}900${seg}fcal.fit
+ awk '{print "'$rn'"$1"'$seg'fcal.fit",$2}' tmp_good_exp.lis > tmp_combine.lis # Combine $seg [dn]
+ # echo "----- Combining Files ----- "
+ # cat tmp_combine.lis
+ # echo "Output: " $s
+ $cf_combine -k $ignore_exp_stat tmp_combine.lis $s
+ # $modhead "${s}[1]" NUM_EXP $n_good
+ $modhead "${s}[1]" COMBMETH XCORR
+ echo $s >> tmp_seg_dn.lis
+
+ set s = DN_${rn}900${seg2}fcal.fit
+ awk '{print "'$rn'"$1"'$seg2'fcal.fit",$2}' tmp_good_exp.lis > tmp_combine.lis # Combine $seg2 [dn]
+ # echo "----- Combining Files ----- "
+ # cat tmp_combine.lis
+ # echo "Output: " $s
+ $cf_combine -k $ignore_exp_stat tmp_combine.lis $s
+ # $modhead "${s}[1]" NUM_EXP $n_good
+ $modhead "${s}[1]" COMBMETH XCORR
+ echo $s >> tmp_seg_dn.lis
+
+ endif
+ end
+
+ $rm tmp_xcorr.res tmp_combine.lis
+ $rm tmp_good_exp.lis tmp_exp.lis
+
+ end
+
+ # Pack the 8 [detector][channel] pairs together
+ if (-e tmp_seg_dn.lis) then
+
+ set fcal_all = ${rn}00900all$res${om}fcal.fit # Final output name
+ $rm $fcal_all # Clean (safe)
+ set n_segs = `cat tmp_seg_dn.lis | wc -l`
+
+ if (!($n_segs == 8)) then
+
+ @ mseg = 8 - $n_segs
+ echo "ERROR: $mseg (day + night) segments are missing"
+ $rm tmp_seg_dn.lis
+ goto crash
+
+ else
+
+ $cf_pack tmp_seg_dn.lis $fcal_all
+ $rm tmp_seg_dn.lis
+
+ # Plot figures, delete unwanted files
+ $idl_obsplot {$rn} airglow
+ mv ${rn}00900spec${om}f.gif ${rn}00000airg${om}f.gif
+ $rm ${rn}00900lif*.gif ${rn}00900sic*.gif
+ $rm $fcal_all
+
+ endif
+ endif
+ end
+end
+
+# Clean [dn] files.
+$rm DN_${rn}*.fit
+
+# Delete IDF files
+if $?DELETE_IDF then
+ echo "NOTE: Deleting intermediate data files."
+ $rm ${rn}*idf.fit
+endif
+
+# Delete bad-pixel-map (bpm) files
+if $?DELETE_BPM then
+ echo "NOTE: Deleting bad pixel map (bpm) files."
+ $rm ${rn}*bpm.fit
+endif
+
+exit(0)
+
+crash: # Procedure when script crashes
+
+# Clean directory
+$rm tmp_xcorr.res tmp_combine.lis
+$rm tmp_good_exp.lis tmp_exp.lis tmp_seg_dn.lis
+$rm DN_*.fit
+
+# Return 1
+exit(1)
diff --git a/src/analysis/cf_make_all_exp.c b/src/analysis/cf_make_all_exp.c
new file mode 100644
index 0000000..926ac2c
--- /dev/null
+++ b/src/analysis/cf_make_all_exp.c
@@ -0,0 +1,91 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_make_all_exp output_filename input1 input2 input3 input4
+ *
+ * Description: For a single exposure, copies header of channel with largest
+ * value of EXPTIME into an otherwise empty "all" file.
+ * Input files should represent each of the four FUSE channels.
+ *
+ *
+ * History: 08/11/05 wvd v1.0 Based on cf_quicklook.
+ *
+ ****************************************************************************/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include "calfuse.h"
+
+static char CF_PRGM_ID[]= "cf_make_all_exp";
+static char CF_VER_NUM[]= "1.0";
+
+int main(int argc,char *argv[]){
+
+ char *corrected_filename, *string_pointer;
+ char comment[FLEN_CARD], datestr[FLEN_CARD];
+ int i, nextend=0, ref_file=2, timeref;
+ int status=0;
+ float exptime, max_exptime;
+
+ fitsfile *infits,*outfits;
+
+ if (argc != 6) {
+ printf("Incorrect number of arguments.\n");
+ printf("Calling sequence: cf_make_all_exp output_filename "
+ "input1 input2 input3 input4\n");
+ exit(1);
+ }
+
+ /* Initialize error checking. */
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Started execution.");
+
+ /* Determine the channel with the longest exposure time */
+
+ max_exptime = 0;
+ for (i = 0; i < 4; i++) {
+ FITS_open_file(&infits, argv[2+i], READONLY, &status);
+ FITS_read_key(infits, TFLOAT, "EXPTIME", &exptime, NULL, &status);
+ if (exptime >= max_exptime) {
+ ref_file = 2 + i;
+ max_exptime = exptime;
+ }
+ FITS_close_file(infits, &status);
+ }
+
+ /* Copy header from the reference file to the exposure-level "all" file. */
+
+ FITS_open_file(&infits, argv[ref_file], READONLY, &status);
+ FITS_create_file(&outfits, argv[1], &status);
+ FITS_copy_hdu(infits, outfits, 0, &status);
+
+ /* Modify a few header keywords. */
+ string_pointer = strrchr(argv[1],'/');
+ if (string_pointer == NULL) corrected_filename = argv[1];
+ else corrected_filename = &(string_pointer[1]);
+ FITS_update_key(outfits, TINT, "NEXTEND", &nextend, NULL, &status);
+ FITS_write_date(outfits, &status);
+ FITS_update_key(outfits, TSTRING, "FILENAME", corrected_filename, NULL, &status);
+ FITS_update_key(outfits, TSTRING, "FILETYPE", "EXPOSURE-LEVEL STATUS FILE", NULL, &status);
+
+ /* Add a note warning that this file contains no data. */
+ FITS_write_comment(outfits, " ", &status);
+ FITS_write_comment(outfits,
+ "This file contains no data.", &status);
+ FITS_write_comment(outfits,
+ "Its header keywords are used by the DADS cataloging software.", &status);
+ fits_get_system_time(datestr, &timeref, &status);
+ sprintf(comment, "CalFUSE v%s %.10s", CALFUSE_VERSION, datestr);
+ FITS_write_comment(outfits, comment, &status);
+ FITS_write_comment(outfits, " ", &status);
+
+
+ FITS_close_file(infits, &status);
+ FITS_close_file(outfits,&status);
+
+ return EXIT_SUCCESS;
+}
diff --git a/src/analysis/cf_make_all_obs.csh b/src/analysis/cf_make_all_obs.csh
new file mode 100755
index 0000000..2a97247
--- /dev/null
+++ b/src/analysis/cf_make_all_obs.csh
@@ -0,0 +1,555 @@
+#!/usr/local/bin/tcsh -f
+
+#******************************************************************************
+#* Johns Hopkins University
+#* Center For Astrophysical Sciences
+#* FUSE
+#******************************************************************************
+#*
+#* Synopsis: cf_make_all_obs.csh association_file
+#*
+#* Description: Creates 3 files from Calfuse output (properly run):
+#*
+#* 1) An "all" file containing 1 extension per detector (= 8).
+#* Each extension contains a combined spectrum from the set
+#* of exposures, using "Xcorr" or "Background" method.
+#* 2) In the case of TTAG data, creates an "ano" file. Same as
+#* the "all" file but considering "night only" exposure time.
+#* 3) A National Virtual Observatory "nvo" file. One extension
+#* containing wavelengths that span the whole FUSE range.
+#*
+#* The Xcorr method consists of co-adding spectra, the latter
+#* being corrected for a possible shift. The Background method
+#* consists of combining all the IDF files.
+#*
+#* The Xcorr test is performed on 4 (detector, channel) pairs, the
+#* method of other pairs are given by them:
+#* LiF 1a -> Lif 1b
+#* LiF 2b -> LiF 2a
+#* SiC 1a -> Sic 1b
+#* Sic 2b -> Sic 2a
+#* In the script, the left segments are referred as to $seg (or
+#* $det) and the right segments are referred as to $seg2 (or
+#* $det2).
+#*
+#* When an expected data set is missing, the script stops, cleans
+#* the directory, and returns 1.
+#*
+#* History: 04/15/05 1.0 tc First release
+#* 08/22/05 1.1 wvd Argument is name of association file.
+#* 10/20/05 1.2 wvd Use idl_obsplot.pl to call cf_obsplot.
+#* 10/25/05 1.3 wvd Add option to delete BPM or IDF files.
+#* 03/21/06 1.4 wvd If there's only one exposure, always
+#* follow the cross-correlation path.
+#* Don't check the number of night-only
+#* spectra before calling cf_pack.
+#* 03/28/06 1.5 wvd If there's no good time in any exposure,
+#* follow the cross-correlation path.
+#* 04/27/06 1.6 wvd Be smarter when discarding 000 files.
+#* Always use cross-corr for HIST data.
+#* 05/23/06 1.7 wvd Move -k to proper spot after cf_combine.
+#* 06/02/06 1.8 wvd If OBJCLASS = 7 (Sky Background)
+#* always combine IDF files.
+#* 06/22/06 1.9 wvd Call idf_combine with -z flag.
+#* 05/24/07 1.10 bot If only 900+ spectra are available,
+#* use them.
+#* 04/04/08 1.11 bot Ignore EXP_STAT in cf_combine for HIST
+#* data.
+#* 07/25/08 1.12 wvd Ignore EXP_STAT in cf_combine and
+#* idf_combine for BR-EARTH observations
+#* (S100, M106, and 900+ exposures).
+#* 08/08/08 1.13 wvd Don't ignore EXP_STAT for 900+ exposures.
+#* 08/15/08 1.14 wvd Call cf_make_900_obs.csh
+#* to make quick-look airglow plot.
+#*
+#*****************************************************************************/
+
+# Delete files after processing? (Default is no.)
+#set DELETE_IDF # Delete intermediate data files
+#set DELETE_BPM # Delete bad-pixel map files
+
+# Set program path
+set rm = "/bin/rm -f"
+
+set cf_xcorr = cf_xcorr
+set cf_combine = cf_combine
+set cf_pack = cf_pack
+set cf_nvo = cf_nvo
+set idl_obsplot = idl_obsplot.pl
+set modhead = modhead
+
+#set cf_xcorr = /home/vela/civeit/Work/CalFuse/Xcorr/New/cf_xcorr
+#set cf_combine = /home/vela/civeit/Work/CalFuse/Shiftexp/cf_combine
+#set cf_pack = /home/vela/civeit/Work/CalFuse/Pack/cf_pack
+#set cf_nvo = /home/vela/civeit/Work/CalFuse/Nvo/cf_nvo
+#set modhead = /home/vela/civeit/local/bin/modhead
+
+#set cf_obsplot = /data1/fuse/calfuse/v3.1/idl/cf_obsplot.pro
+
+# Init var list
+set detector = (1a 2b)
+set channel = (lif sic)
+set resolution = (2 3 4)
+set obsmod = (hist ttag)
+
+# Determine the root name and the program ID
+set asnf = $1
+set rn = ${asnf:s/000asnf.fit//}
+set pid = `echo $rn | awk '{print substr($1, 1, 4)}'`
+
+# Determine the object class
+set tmp_file = `ls ${rn}*fcal.fit | awk '{if (NR == 1) print}'`
+set tmp_buf = `$modhead $tmp_file OBJCLASS`
+set objclass = $tmp_buf[2]
+
+# Clean tmp files that the script will create (safe)
+$rm tmp_xcorr.res tmp_bpm1.lis tmp_bpm2.lis tmp_combine.lis tmp_night_exp.lis
+$rm tmp_all_night_exp.lis tmp_good_exp.lis tmp_exp.lis tmp_seg_dn.lis tmp_seg_no.lis
+$rm DN_${rn}*.fit NO_${rn}*.fit
+
+foreach om ($obsmod)
+ foreach res ($resolution)
+ foreach chan ($channel)
+ foreach det ($detector)
+
+ set ignore_exp_stat = ''
+ if ($om == hist) set ignore_exp_stat = -a
+ if ($pid == S100) set ignore_exp_stat = -a
+ if ($pid == M106) set ignore_exp_stat = -a
+
+ # Find exposures that match the current segment
+ set seg = $det$chan$res$om
+ set readfiles = 0
+ ls ${rn}[0-8][0-9][0-9]${seg}fcal.fit |& grep -v 000${seg} > tmp_exp.lis # Reject EXP "9xx" and "000"
+
+ if ($? == 0) then
+ set readfiles = 1
+ else
+ ls ${rn}9[0-9][0-9]${seg}fcal.fit |& grep -v 000${seg} > tmp_exp.lis # Keep only "9xx" exposures
+ if ($? == 0) set readfiles = 2
+ endif
+
+ if ($readfiles >= 1) then # There are one or more exposures
+
+ echo " "
+ echo "*** Processing: $seg ***"
+ # [1a][lif] -> [1b][lif], [2b][lif] -> [2a][lif] etc...
+ if ($det == 1a) set det2 = 1b
+ if ($det == 2b) set det2 = 2a
+ set seg2 = $det2$chan$res$om
+
+ echo "----- cf_xcorr input -----"
+ cat tmp_exp.lis
+ echo "----------------------------"
+ $cf_xcorr tmp_exp.lis tmp_xcorr.res # Compute shift and sigma_shift
+ echo "----- cf_xcorr results -----"
+ cat tmp_xcorr.res
+ echo "----------------------------"
+
+ awk '{if ($5 > 0) print $6, $4, $5}' tmp_xcorr.res > tmp_all_night_exp.lis
+ awk '{if ($3 >= 0) print $6, $2}' tmp_xcorr.res > tmp_good_exp.lis
+ awk '{if (($3 >= 0) && ($5 > 0)) print $6, $2, $4, $5}' tmp_xcorr.res > tmp_night_exp.lis
+ set time_good = `awk 'BEGIN{$t = 0} {if ($3 >= 0) $t = $t + $4} END{print $t}' tmp_xcorr.res`
+ set time_bad = `awk 'BEGIN{$t = 0} {if ($3 < 0) $t = $t + $4} END{print $t}' tmp_xcorr.res`
+ echo "Xcorr time: $time_good - Background time: $time_bad"
+ set n_exp = `cat tmp_xcorr.res | wc -l`
+
+ if (($time_good > 2 * $time_bad && $objclass != 7) || ($time_good == 0 && $time_bad == 0) || $n_exp == 1 || $om == hist) then
+
+ #
+ # --- Path 1: Optimize resolution ---
+ #
+
+ echo "Optimize resolution..."
+ set n_good = `cat tmp_good_exp.lis | wc -l`
+
+ # Extract [Day + Night] spectra
+ set s = DN_${rn}000${seg}fcal.fit
+ awk '{print "'$rn'"$1"'$seg'fcal.fit",$2}' tmp_good_exp.lis > tmp_combine.lis # Combine $seg [dn]
+ # echo "----- Combining Files ----- "
+ # cat tmp_combine.lis
+ # echo "Output: " $s
+ $cf_combine -k $ignore_exp_stat tmp_combine.lis $s
+ # $modhead "${s}[1]" NUM_EXP $n_good
+ $modhead "${s}[1]" COMBMETH XCORR
+ echo $s >> tmp_seg_dn.lis
+
+ set s = DN_${rn}000${seg2}fcal.fit
+ awk '{print "'$rn'"$1"'$seg2'fcal.fit",$2}' tmp_good_exp.lis > tmp_combine.lis # Combine $seg2 [dn]
+ # echo "----- Combining Files ----- "
+ # cat tmp_combine.lis
+ # echo "Output: " $s
+ $cf_combine -k $ignore_exp_stat tmp_combine.lis $s
+ # $modhead "${s}[1]" NUM_EXP $n_good
+ $modhead "${s}[1]" COMBMETH XCORR
+ echo $s >> tmp_seg_dn.lis
+
+ set n_night = `cat tmp_night_exp.lis | wc -l`
+ if ($om == ttag && $n_night > 0) then # Create and combine night only files
+
+ echo "*** Creating night only files ***"
+ set exp_nums = `awk '{print $1}' tmp_night_exp.lis`
+
+ foreach exp ($exp_nums)
+
+ # Create night-only BPM and FCAL files if they do not already exist.
+ set bno1 = NO_$rn$exp$det${om}fbpm.fit # Bad-pixel maps
+ set bno2 = NO_$rn$exp$det2${om}fbpm.fit
+ set cno1 = NO_$rn$exp${seg}fcal.fit # Extracted spectra
+ set cno2 = NO_$rn$exp${seg2}fcal.fit
+
+ set etime = `egrep "^$exp" tmp_night_exp.lis | awk '{print $3}'`
+ set ntime = `egrep "^$exp" tmp_night_exp.lis | awk '{print $4}'`
+ set ratio = `egrep "^$exp" tmp_night_exp.lis | awk '{printf "%.0f", 0.5+$4/$3*10.}'`
+
+ if (!(-e $cno1)) then
+ if ($etime == $ntime) then
+ echo "$cno1 is a symbolic link to $rn$exp${seg}fcal.fit"
+ ln -s $rn$exp${seg}fcal.fit $cno1
+ else
+
+ set idf_file = $rn$exp$det${om}fidf.fit
+ if (!(-e $bno1)) then
+ if ($ratio > 9) then
+ echo "$bno1 is a symbolic link to $rn$exp$det${om}fbpm.fit"
+ ln -s $rn$exp$det${om}fbpm.fit $bno1
+ else
+ echo "Creating BPM: $bno1 ..."
+ cf_bad_pixels -n $bno1 $idf_file
+ endif
+ endif
+
+ echo "Creating (LiF + SiC) FCAL: $cno1 ..."
+ cf_extract_spectra -n $bno1 -r NO_$rn$exp $idf_file # Existence of $bno1 is not required
+ endif
+ endif
+
+ if (!(-e $cno2)) then
+ if ($etime == $ntime) then
+ echo "Using a symbolic link to $cno2"
+ ln -s $rn$exp${seg2}fcal.fit NO_$rn$exp${seg2}fcal.fit
+ else
+
+ set idf_file = $rn$exp$det2${om}fidf.fit
+ if (!(-e $bno2)) then
+ if ($ratio > 9) then
+ echo "Using a symbolic link to $bno2"
+ ln -s $rn$exp$det2${om}fbpm.fit NO_$rn$exp$det2${om}fbpm.fit
+ else
+ echo "Creating BPM: $bno2 ..."
+ cf_bad_pixels -n $bno2 $idf_file
+ endif
+ endif
+
+ echo "Creating (LiF + SiC) FCAL: $cno2 ..."
+ cf_extract_spectra -n $bno2 -r NO_$rn$exp $idf_file # Existence of $bno2 is not required
+ endif
+ endif
+
+ end
+
+ # Combine exposures into a single spectrum.
+ set s = NO_${rn}000${seg}fcal.fit
+ awk '{print "NO_'$rn'"$1"'$seg'fcal.fit",$2}' tmp_night_exp.lis > tmp_combine.lis # Combine $seg [no]
+ $cf_combine -k $ignore_exp_stat tmp_combine.lis $s
+ # $modhead "${s}[1]" NUM_EXP $n_night
+ $modhead "${s}[0]" DAYNIGHT NIGHT
+ $modhead "${s}[1]" COMBMETH XCORR
+ echo $s >> tmp_seg_no.lis
+
+ set s = NO_${rn}000${seg2}fcal.fit
+ awk '{print "NO_'$rn'"$1"'$seg2'fcal.fit",$2}' tmp_night_exp.lis > tmp_combine.lis # Combine $seg2 [no]
+ $cf_combine -k $ignore_exp_stat tmp_combine.lis $s
+ # $modhead "${s}[1]" NUM_EXP $n_night
+ $modhead "${s}[0]" DAYNIGHT NIGHT
+ $modhead "${s}[1]" COMBMETH XCORR
+ echo $s >> tmp_seg_no.lis
+
+ endif
+
+ else
+
+ #
+ # --- Path 2: Optimize background ---
+ #
+
+ echo "Optimize background..."
+
+ # Combine IDF files
+ set idf1_all = DN_${rn}000$det${om}fidf.fit # Same for [dn] and [no]
+ set idf2_all = DN_${rn}000$det2${om}fidf.fit
+
+ if (!(-e $idf1_all)) then
+ echo "Creating IDF: $idf1_all ..."
+ if ($readfiles == 1) then
+ ls ${rn}[0-8][0-9][0-9]$det${om}fidf.fit |& grep -v 000${det} > tmp_idf.lis # Reject EXP "9xx" and "000"
+ else
+ ls ${rn}9[0-9][0-9]$det${om}fidf.fit |& grep -v 000${det} > tmp_idf.lis # Consider only airglow
+ endif
+ if ($? == 0) then # IDF files exist
+
+ set idf_lis = `awk '{printf "%s ",$1}' tmp_idf.lis`
+ # echo "Combining IDF files: " $idf_lis
+ idf_combine -cz $ignore_exp_stat $idf1_all $idf_lis # Create combined IDF file for $seg
+ $rm tmp_idf.lis
+
+ else
+
+ echo "ERROR: IDF files are missing"
+ $rm tmp_idf.lis
+ goto crash
+
+ endif
+ endif
+
+ if (!(-e $idf2_all)) then
+ echo "Creating IDF: $idf2_all ..."
+ if ($readfiles == 1) then
+ ls ${rn}[0-8][0-9][0-9]$det2${om}fidf.fit |& grep -v 000${det2} > tmp_idf.lis # Reject EXP "9xx" and "000"
+ else
+ ls ${rn}9[0-9][0-9]$det2${om}fidf.fit |& grep -v 000${det2} > tmp_idf.lis # Consider only airglow
+ endif
+ if ($? == 0) then # IDF files exist
+
+ set idf_lis = `awk '{printf "%s ",$1}' tmp_idf.lis`
+ # echo "Combining IDF files: " $idf_lis
+ idf_combine -cz $ignore_exp_stat $idf2_all $idf_lis # Create combined IDF file for $seg2
+ $rm tmp_idf.lis
+
+ else
+
+ echo "ERROR: IDF files are missing"
+ $rm tmp_idf.lis
+ goto crash
+
+ endif
+ endif
+
+ # Get the number of (valid) combined IDF files
+ set tmp_buf = `$modhead $idf1_all NSPEC`
+ set n_comb1 = $tmp_buf[3]
+ set tmp_buf = `$modhead $idf1_all SPEC001`
+ set idf1_1 = $tmp_buf[3]
+ set tmp_buf = `$modhead $idf2_all NSPEC`
+ set n_comb2 = $tmp_buf[3]
+ set tmp_buf = `$modhead $idf2_all SPEC001`
+ set idf2_1 = $tmp_buf[3]
+
+ # Combine BPM files
+ set bpm1_all = DN_${rn}000$det${om}fbpm.fit
+ set bpm2_all = DN_${rn}000$det2${om}fbpm.fit
+
+ if (!(-e $bpm1_all)) then
+ echo "Combine all BPM (from IDF): $bpm1_all ..."
+ bpm_combine $bpm1_all $idf1_all # Create combined BPM file [dn] for $seg
+ endif
+
+ if (!(-e $bpm2_all)) then
+ echo "Combine all BPM (from IDF): $bpm2_all ..."
+ bpm_combine $bpm2_all $idf2_all # Idem for $seg2
+ endif
+
+ # Extract [Day + Night] spectra
+ set s = DN_${rn}000${seg}fcal.fit
+ set xxx = DN_${rn}xxx${seg}fcal.fit
+ if (!(-e $xxx)) cf_extract_spectra -r DN_${rn}xxx $idf1_all # Avoid overwrite LiF | SiC
+ echo $xxx > tmp_combine.lis
+ $cf_combine -k $ignore_exp_stat tmp_combine.lis $s
+ $modhead "${s}[0]" NSPEC $n_comb1
+ $modhead "${s}[0]" SPEC001 $idf1_1
+ $modhead "${s}[1]" COMBMETH BACKGRND
+ echo $s >> tmp_seg_dn.lis
+
+ set s = DN_${rn}000${seg2}fcal.fit
+ set xxx = DN_${rn}xxx${seg2}fcal.fit
+ if (!(-e $xxx)) cf_extract_spectra -r DN_${rn}xxx $idf2_all # Avoid overwrite LiF | SiC
+ echo $xxx > tmp_combine.lis
+ $cf_combine -k $ignore_exp_stat tmp_combine.lis $s
+ $modhead "${s}[0]" NSPEC $n_comb2
+ $modhead "${s}[0]" SPEC001 $idf2_1
+ $modhead "${s}[1]" COMBMETH BACKGRND
+ echo $s >> tmp_seg_dn.lis
+
+ set n_night = `cat tmp_all_night_exp.lis | wc -l`
+ if ($om == ttag && $n_night > 0) then # Create and combine night only files
+
+ echo "*** Creating night only files ***"
+ set exp_nums = `awk '{print $1}' tmp_all_night_exp.lis`
+ $rm tmp_bpm1.lis tmp_bpm2.lis
+
+ foreach exp ($exp_nums)
+
+ # Create bpm night only files (if they do not exist yet)
+ set bno1 = NO_$rn$exp$det${om}fbpm.fit
+ set bno2 = NO_$rn$exp$det2${om}fbpm.fit
+
+ set idf_file = $rn$exp$det${om}fidf.fit
+ if (!(-e $bno1)) then
+ echo "Creating BPM: $bno1 ..."
+ cf_bad_pixels -n $bno1 $idf_file
+ endif
+ if (-e $bno1) echo $bno1 >> tmp_bpm1.lis # If valid, add in $seg list
+
+ set idf_file = $rn$exp$det2${om}fidf.fit
+ if (!(-e $bno2)) then
+ echo "Creating BPM: $bno2 ..."
+ cf_bad_pixels -n $bno2 $idf_file
+ endif
+ if (-e $bno2) echo $bno2 >> tmp_bpm2.lis # If valid, add in $seg2 list
+
+ end
+
+
+ # Combine BPM for $seg and extract spectra
+
+ set bpm1_all = NO_${rn}000$det${om}fbpm.fit
+ set n_bpm = `cat tmp_bpm1.lis | wc -l`
+ echo "Number of valid BPM files: $n_bpm"
+
+ if ($n_bpm > 0) then
+
+ echo $n_bpm > tmp_bpm.lis
+ cat tmp_bpm1.lis >> tmp_bpm.lis
+
+ if (!(-e $bpm1_all)) then
+ echo "Combine all BPM (from list): $bpm1_all ..."
+ bpm_combine $bpm1_all tmp_bpm.lis # Create combined BPM file [no] for $seg
+ endif
+ $rm tmp_bpm.lis
+
+ endif
+
+ # Extract [Night only] spectra. The existence of $bpm1_all is not required
+ set s = NO_${rn}000${seg}fcal.fit
+ set xxx = NO_${rn}xxx${seg}fcal.fit
+ if (!(-e $xxx)) cf_extract_spectra -n $bpm1_all -r NO_${rn}xxx $idf1_all # Avoid overwrite LiF | SiC
+ echo $xxx > tmp_combine.lis
+ $cf_combine -k $ignore_exp_stat tmp_combine.lis $s
+ $modhead "${s}[0]" NSPEC $n_comb1
+ $modhead "${s}[0]" SPEC001 $idf1_1
+ $modhead "${s}[1]" COMBMETH BACKGRND
+ echo $s >> tmp_seg_no.lis
+
+
+ # Combine BPM for $seg2 and extract spectra
+
+ set bpm2_all = NO_${rn}000$det2${om}fbpm.fit
+ set n_bpm = `cat tmp_bpm2.lis | wc -l`
+ echo "Number of valid BPM files: $n_bpm"
+
+ if ($n_bpm > 0) then
+
+ echo $n_bpm > tmp_bpm.lis
+ cat tmp_bpm2.lis >> tmp_bpm.lis
+
+ if (!(-e $bpm2_all)) then
+ echo "Combine all BPM (from list): $bpm2_all ..."
+ bpm_combine $bpm2_all tmp_bpm.lis # Create combined BPM file [no] for $seg2
+ endif
+ $rm tmp_bpm.lis
+
+ endif
+
+ # Extract [Night only] spectra. The existence of $bpm2_all is not required
+ set s = NO_${rn}000${seg2}fcal.fit
+ set xxx = NO_${rn}xxx${seg2}fcal.fit
+ if (!(-e $xxx)) cf_extract_spectra -n $bpm2_all -r NO_${rn}xxx $idf2_all # Avoid overwrite LiF | SiC
+ echo $xxx > tmp_combine.lis
+ $cf_combine -k $ignore_exp_stat tmp_combine.lis $s
+ $modhead "${s}[0]" NSPEC $n_comb2
+ $modhead "${s}[0]" SPEC001 $idf2_1
+ $modhead "${s}[1]" COMBMETH BACKGRND
+ echo $s >> tmp_seg_no.lis
+
+ endif
+ endif
+ endif
+ end
+
+ $rm tmp_xcorr.res tmp_bpm1.lis tmp_bpm2.lis tmp_combine.lis
+ $rm tmp_all_night_exp.lis tmp_good_exp.lis tmp_exp.lis tmp_night_exp.lis
+
+ end
+
+ # Pack the 8 [detector][channel] pairs together ([dn] and [no] for ttag)
+ if (-e tmp_seg_dn.lis) then
+
+ set fcal_all = ${rn}00000all$res${om}fcal.fit # Final output name
+ $rm $fcal_all # Clean (safe)
+ set n_segs = `cat tmp_seg_dn.lis | wc -l`
+
+ if (!($n_segs == 8)) then
+
+ @ mseg = 8 - $n_segs
+ echo "ERROR: $mseg (day + night) segments are missing"
+ $rm tmp_seg_dn.lis
+ goto crash
+
+ else
+
+ $cf_pack tmp_seg_dn.lis $fcal_all
+ $rm tmp_seg_dn.lis
+
+ # Plot figures
+ $idl_obsplot {$rn}
+
+ # Create National Virtual Observatory file
+ set nvo_file = ${rn}00000nvo$res${om}fcal.fit
+ $rm $nvo_file # Clean (safe)
+ $cf_nvo $fcal_all $nvo_file # Create file
+
+ if (-e tmp_seg_no.lis) then
+
+ set fcal_all = ${rn}00000ano$res${om}fcal.fit # Final output name
+ $rm $fcal_all # Clean (safe)
+ set n_segs = `cat tmp_seg_no.lis | wc -l`
+
+ # if (!($n_segs == 8)) then
+ #
+ # @ mseg = 8 - $n_segs
+ # echo "ERROR: $mseg (night only) segments are missing"
+ # $rm tmp_seg_no.lis
+ # # goto crash
+ #
+ # else
+
+ $cf_pack tmp_seg_no.lis $fcal_all
+ $rm tmp_seg_no.lis
+
+ # endif
+
+ endif
+ endif
+ endif
+ end
+end
+
+# Clean [dn] and [no] files. Just keep all, (ano) and nvo
+$rm DN_${rn}*.fit NO_${rn}*.fit
+
+# Delete IDF files
+if $?DELETE_IDF then
+ echo "NOTE: Deleting intermediate data files."
+ $rm ${rn}*idf.fit
+endif
+
+# Delete bad-pixel-map (bpm) files
+if $?DELETE_BPM then
+ echo "NOTE: Deleting bad pixel map (bpm) files."
+ $rm ${rn}*bpm.fit
+endif
+
+# Call routine to make quick-look airglow plot.
+cf_make_900_obs.csh $1
+
+exit(0)
+
+crash: # Procedure when script crashes
+
+# Clean directory
+$rm tmp_xcorr.res tmp_bpm1.lis tmp_bpm2.lis tmp_combine.lis tmp_night_exp.lis
+$rm tmp_all_night_exp.lis tmp_good_exp.lis tmp_exp.lis tmp_seg_dn.lis tmp_seg_no.lis
+$rm DN_*.fit NO_*.fit
+
+# Return 1
+exit(1)
diff --git a/src/analysis/cf_nvo.c b/src/analysis/cf_nvo.c
new file mode 100644
index 0000000..4dd9771
--- /dev/null
+++ b/src/analysis/cf_nvo.c
@@ -0,0 +1,497 @@
+/*******************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *******************************************************************************
+ *
+ * Usage: cf_nvo all_segments.fit nvo_file.fit
+ *
+ * Description: Write a National Virtual Observatory (nvo) file. The program
+ * uses the file created by cf_pack, which contains one spectrum
+ * per extension, each corresponding to a detector channel.
+ *
+ * History: 04/11/05 tc v1.0 First release
+ * 05/16/2005 wvd v1.1 Check mean flux of each segment.
+ * If preferred channel is missing,
+ * replace it with another.
+ * 05/19/2005 wvd v1.2 Shift each channel to match
+ * LiF1A between 1045 and 1070 A.
+ * 05/20/2005 wvd v1.3 For emission-line sources,
+ * cross-correlate on O VI lines.
+ * 05/23/2005 wvd v1.4 Don't assume that sides A and B
+ * have the same shift.
+ * 06/01/2005 wvd v1.5 Do assume that sides A and B
+ * have the same shift.
+ * 06/03/2005 wvd v1.6 Delete unused variables.
+ * 06/08/2005 wvd v1.7 Define MAXFLOAT if needed.
+ * 06/16/2005 wvd v1.8 Include values.h
+ * 07/06/2005 wvd v1.9 If FESCENT = FES B, use LiF 2B
+ * as wavelength standard.
+ * 07/12/2005 wvd v1.10 Give up on use of MAXFLOAT.
+ * 08/11/2005 wvd v1.11 Set keyword NEXTEND = 1.
+ * 03/22/2006 wvd v1.12 Allow use of SiC data for
+ * 1000-1100 A region.
+ * Don't cross-correlate segments
+ * with OBSTIME = 0.
+ * 05/16/2006 wvd v1.13 Use Lyman beta to align
+ * background exposures.
+ * Use O VI and C II to align WD's.
+ * 05/19/2006 wvd v1.14 In copy_spec(), test index to
+ * prevent extending past the edge.
+ * For BKGD targets, omit flux
+ * comparison when deciding which
+ * regions to use.
+ * Delete index to the file
+ * extensions from the primary HDU.
+ * Compute mean flux over same
+ * wavelength region for each band.
+ * 05/24/2006 wvd v1.16 For PC targets, don't include
+ * O VI in calculation of mean flux
+ * 12/19/2006 wvd v1.17 Reject segments with
+ * OBSTIME < 10 seconds when full
+ * exposure is longer than 100 s.
+ * 02/19/2008 bot v1.18 Fixed indexing problem in
+ * copy_spec due to shift and n_copy
+ *
+ ******************************************************************************/
+
+#include <math.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "calfuse.h"
+
+#define MAXSHIFT 30
+#define N_SHIFT 61
+#define NVO_MIN 900
+#define NVO_MAX 1190
+
+static char CF_PRGM_ID[] = "cf_nvo";
+static char CF_VER_NUM[] = "1.18";
+
+static int
+compute_shift(fitsfile *pt_fits, int hdu_ref, int hdu, float wmin, float wdelta,
+ float wpc, int *shift, int *quality)
+{
+ char comb[FLEN_VALUE], ref_comb[FLEN_VALUE];
+ int hdutype, status = 0;
+ int ind_chi2_min, nchi;
+ long i, k, n_rows, ref_start, start, n_pix;
+ float *error, *flux, *wave, *ref_error, *ref_flux, *ref_wave;
+ float chi_square[N_SHIFT], chi_square_min, chi_square_max;
+ float ref_obstime, obstime;
+ double scale, sum, var1, var2;
+
+ /* Don't need to shift reference spectrum. */
+ if (hdu_ref == hdu) {
+ *shift = 0;
+ *quality = TRUE;
+ return(0);
+ }
+
+ /* Read data for reference and data channels. */
+ FITS_movabs_hdu(pt_fits, hdu_ref, &hdutype, &status);
+ FITS_read_key(pt_fits, TSTRING, "COMBMETH", &ref_comb, NULL, &status);
+ FITS_read_key(pt_fits, TFLOAT, "OBSTIME", &ref_obstime, NULL, &status);
+ n_rows = cf_read_col(pt_fits, TFLOAT, "WAVE", (void **) &ref_wave);
+ n_rows = cf_read_col(pt_fits, TFLOAT, "FLUX", (void **) &ref_flux);
+ n_rows = cf_read_col(pt_fits, TFLOAT, "ERROR", (void **) &ref_error);
+
+ FITS_movabs_hdu(pt_fits, hdu, &hdutype, &status);
+ FITS_read_key(pt_fits, TSTRING, "COMBMETH", &comb, NULL, &status);
+ FITS_read_key(pt_fits, TFLOAT, "OBSTIME", &obstime, NULL, &status);
+ n_rows = cf_read_col(pt_fits, TFLOAT, "WAVE", (void **) &wave);
+ n_rows = cf_read_col(pt_fits, TFLOAT, "FLUX", (void **) &flux);
+ n_rows = cf_read_col(pt_fits, TFLOAT, "ERROR", (void **) &error);
+
+ /* If either channel was not constructed using cross-correlation,
+ * return a shift of 0. */
+ if (strncmp(ref_comb,"X",1) || strncmp(comb,"X",1)) {
+ *shift = 0;
+ *quality = FALSE;
+ printf("hdu = %d, hdu_ref = %d, COMBMETH != XCORR\n",
+ hdu, hdu_ref);
+ return(0);
+ }
+
+ /* If either channel has OBSTIME = 0, return a shift of 0. */
+ if (ref_obstime < 1 || obstime < 1) {
+ *shift = 0;
+ *quality = FALSE;
+ if (ref_obstime < 1)
+ printf("hdu_ref = %d, OBSTIME = %f\n", hdu_ref, ref_obstime);
+ if (obstime < 1) printf("hdu = %d, OBSTIME = %f\n", hdu, obstime);
+ return(0);
+ }
+
+ /* Compute chi-squared for shifts between +/- MAXSHIFT pixels. */
+ ref_start = cf_nlong((wmin - ref_wave[0]) / wpc) + MAXSHIFT;
+ start = cf_nlong((wmin - wave[0]) / wpc);
+ n_pix = cf_nlong(wdelta / wpc) - (N_SHIFT - 1);
+
+ for (k = 0; k < N_SHIFT; k++) {
+ nchi = 0;
+ sum = 0;
+ for (i = 0; i < n_pix; i++) {
+ var1 = ref_error[ref_start + i] * ref_error[ref_start + i];
+ var2 = error[start + i + k] * error[start + i + k];
+ if ((var1 + var2) > 0.) {
+ sum += (ref_flux[ref_start + i] - flux[start + i + k]) *
+ (ref_flux[ref_start + i] - flux[start + i + k]) /
+ (var1 + var2);
+ nchi++;
+ }
+ }
+ scale = (double) nchi / n_pix;
+ chi_square[k] = sum / scale;
+ }
+
+ /* If chi-squared changes by less than 20% over range of shifts, abort.
+ * Otherwise, return shift corresponding to lowest value of chi-square.
+ */
+ ind_chi2_min = 0;
+ chi_square_min = 1E5;
+ chi_square_max = -1E5;
+ for (k = 0; k < N_SHIFT; k++) {
+ if (chi_square[k] < chi_square_min)
+ {
+ chi_square_min = chi_square[k];
+ ind_chi2_min = k;
+ }
+ else if (chi_square[k] > chi_square_max)
+ chi_square_max = chi_square[k];
+ }
+
+ if (chi_square_max / chi_square_min < 1.2) {
+ *shift = 0;
+ *quality = FALSE;
+ printf("hdu = %d, hdu_ref = %d. Chi-square dist is flat.\n",
+ hdu, hdu_ref);
+ }
+ else {
+ *shift = ind_chi2_min - MAXSHIFT;
+ *quality = TRUE;
+ }
+
+ free(ref_error);
+ free(ref_flux);
+ free(ref_wave);
+ free(error);
+ free(flux);
+ free(wave);
+
+ return(0);
+}
+
+
+static int
+copy_spec(fitsfile *pt_fits, int hdu, float w_min, float w_max, float wpc,
+ int shift, float *flux_nvo, float *error_nvo, long n_nvo)
+{
+ int hdutype, status = 0;
+ long i, i0, n_rows, nvo_start, start, n_copy, n_copy0;
+ float *error, *flux, w0;
+
+ FITS_movabs_hdu(pt_fits, hdu, &hdutype, &status);
+ FITS_read_key(pt_fits, TFLOAT, "W0", &w0, NULL, &status);
+ n_rows = cf_read_col(pt_fits, TFLOAT, "FLUX", (void **) &flux);
+ n_rows = cf_read_col(pt_fits, TFLOAT, "ERROR", (void **) &error);
+
+ nvo_start = cf_nlong(((double) w_min - NVO_MIN) / wpc);
+ start = cf_nlong(((double) w_min - w0) / wpc);
+ n_copy = cf_nlong(((double) w_max - w_min) / wpc) + 1;
+ if (nvo_start + n_copy > n_nvo) {
+ printf ("HDU = %d, w_min = %.1f, w_max = %.1f, wpc = %5.3f\n",
+ hdu, w_min, w_max, wpc);
+ printf ("n_nvo = %ld, nvo_start = %ld, start = %ld, n_copy = %ld\n",
+ n_nvo, nvo_start, start, n_copy);
+ cf_if_error("Can't create NVO array.");
+ }
+
+ n_copy0 = n_copy;
+ if (start + shift + n_copy > n_rows) {
+ n_copy = n_rows - (start + shift);
+ if (hdu == 3) for (i = n_copy; i < n_copy0; i++) {
+ flux_nvo[i+nvo_start] = 0.0;
+ error_nvo[i+nvo_start] = 0.0;
+ }
+ }
+
+ i0 = 0;
+ if (start + shift < 0) {
+ i0 = -(start + shift);
+ for (i = 0; i < i0; i++) {
+ flux_nvo[i+nvo_start] = 0.0;
+ error_nvo[i+nvo_start] = 0.0;
+ }
+ }
+
+ for (i = i0; i < n_copy; i++) {
+ flux_nvo[i+nvo_start] = flux[i+start+shift];
+ error_nvo[i+nvo_start] = error[i+start+shift];
+ }
+
+ free(error);
+ free(flux);
+ return(0);
+}
+
+
+int main(int argc, char *argv[])
+{
+ /* Variables */
+ char program[FLEN_VALUE];
+ double mean_flux[8], sum_flux;
+ float *wave, *flux, w0, wpc, hdu_wpc;
+ float *wave_nvo, *flux_nvo, *error_nvo;
+ float max_obstime, wmin, wdelta;
+ long n_rows, n_nvo;
+ int ref, i, nextend=1, n_hdus, shift[8], quality[8];
+ int bkgd_obs=FALSE, objclass;
+ int nkeys, morekeys=0;
+ long k, n_elem;
+
+ char *ttype[] = { "WAVE", "FLUX", "ERROR" };
+ char *tform[] = { "1E", "1E", "1E" };
+ char *tunit[] = { "ANGSTROMS", "ERG/CM2/S/A", "ERG/CM2/S/A" };
+
+ /* HDU numbers must be consistent with output of cf_pack. */
+ char *extname[] = { "1ASIC", "2BSIC", "1ALIF", "2BLIF", "1BSIC", "2ASIC", "1BLIF", "2ALIF" };
+ int hdu[] = { 6, 8, 2, 4, 7, 9, 3 , 5 };
+ float w_min[] = { 997, 1010, 990, 990, 904, 917.5, 1094 , 1090 };
+ float w_max[] = { 1090, 1104, 1080, 1074, 992, 998, 1190 , 1180 };
+
+ /* Regions to use when computing mean flux. */
+ float *region;
+ float region_array[8][6] = {
+ {0, 0, 1030, 1039, 1045, 1070}, /* 1ASIC */
+ {0, 0, 1030, 1039, 1045, 1070}, /* 2BSIC */
+ {0, 0, 1030, 1039, 1045, 1070}, /* 1ALIF */
+ {0, 0, 1030, 1039, 1045, 1070}, /* 2BLIF */
+ {912, 935, 955, 970, 980, 985}, /* 1BSIC */
+ {912, 935, 955, 970, 980, 985}, /* 2ASIC */
+ {1095, 1130, 1140, 1165, 1170, 1180}, /* 1BLIF */
+ {1095, 1130, 1140, 1165, 1170, 1180} /* 2ALIF */
+ };
+
+ char in_name[80], out_name[80];
+ char extname_key[80], src_type[FLEN_VALUE], sp_type[FLEN_VALUE], fescent[FLEN_VALUE];
+ fitsfile *pt_fits, *pt_fits_out;
+ int status = 0, hdutype;
+
+
+ /***********************************
+ ** Enter a timestamp into the log **
+ ***********************************/
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+
+ /***********************************************************
+ ** Check for proper command-line usage and read arguments **
+ ***********************************************************/
+ if (argc != 3)
+ cf_if_error("Usage: cf_nvo all_segments.fit nvo_file.fit");
+
+ strcpy(in_name, argv[1]);
+ strcpy(out_name, "!");
+ strcat(out_name, argv[2]); /* Force overwrite */
+
+ /*******************************************
+ ** Open input file, read header keywords. **
+ *******************************************/
+ FITS_open_file(&pt_fits, in_name, READONLY, &status);
+ FITS_read_key(pt_fits, TSTRING, "PRGRM_ID", &program, NULL, &status);
+ FITS_read_key(pt_fits, TINT, "OBJCLASS", &objclass, NULL, &status);
+ FITS_read_key(pt_fits, TSTRING, "SP_TYPE", &sp_type, NULL, &status);
+ FITS_read_key(pt_fits, TSTRING, "SRC_TYPE", &src_type, NULL, &status);
+ FITS_read_key(pt_fits, TFLOAT, "OBSTIME", &max_obstime, NULL, &status);
+ FITS_read_key(pt_fits, TFLOAT, "WPC", &wpc, NULL, &status);
+ FITS_read_key(pt_fits, TSTRING, "FESCENT", &fescent, NULL, &status);
+ ref = 2; /* LiF 1A */
+ if (!strncmp(fescent, "FES B", 5)) ref = 3; /* LiF 2B */
+
+ /****************************************************************
+ ** If SRC_TYPE = PC, exclude O VI in calculation of mean flux. **
+ ****************************************************************/
+ if (!strncmp(src_type, "PC", 2))
+ for (i = 0; i < 4; i++)
+ region_array[i][2] = region_array[i][3] = 0;
+
+ /***************************************
+ ** Compute mean flux in each channel. **
+ ***************************************/
+ FITS_get_num_hdus(pt_fits, &n_hdus, &status);
+ if (n_hdus != 9)
+ cf_if_error("Input file must have 9 extensions (%d found)", n_hdus);
+
+ for (i = 0; i < 8; i++) {
+ float obstime;
+ FITS_movabs_hdu(pt_fits, hdu[i], &hdutype, &status);
+ FITS_read_key(pt_fits, TSTRING, "EXTNAME", extname_key, NULL, &status);
+ if (strcmp(extname_key, extname[i]))
+ cf_if_error("Extension %d's name does not match (%s)",
+ hdu[i], extname[i]);
+ FITS_read_key(pt_fits, TFLOAT, "WPC", &hdu_wpc, NULL, &status);
+ if (hdu_wpc != wpc)
+ cf_if_error("Extension %d's WPC does not match primary HDU",
+ hdu[i]);
+ FITS_read_key(pt_fits, TFLOAT, "OBSTIME", &obstime, NULL, &status);
+ if (obstime < 1. || (obstime < 10 && max_obstime > 100))
+ mean_flux[i] = -1;
+ else {
+ n_rows = cf_read_col(pt_fits, TFLOAT, "WAVE", (void **) &wave);
+ n_rows = cf_read_col(pt_fits, TFLOAT, "FLUX", (void **) &flux);
+
+ sum_flux = n_elem = 0;
+ region = region_array[i];
+ for (k = 0; k < n_rows; k++)
+ {
+ if ((wave[k] > region[0] && wave[k] < region[1]) ||
+ (wave[k] > region[2] && wave[k] < region[3]) ||
+ (wave[k] > region[4] && wave[k] < region[5])) {
+ sum_flux += flux[k];
+ n_elem ++;
+ }
+ }
+
+ mean_flux[i] = sum_flux / n_elem;
+ free(wave);
+ free(flux);
+ }
+
+ printf("%s\tmean_flux = %g\n", extname_key, mean_flux[i]);
+ }
+
+ /*******************************************************************
+ * If FESCENT = FES A, compute shifts relative to LiF 1A.
+ * If FESCENT = FES B, use LiF 2B.
+ * For background targets, compare Lyman beta lines.
+ * For other emission-line targets, compare O VI lines.
+ * For white dwarfs, use O VI and C II.
+ * For other continuum sources, use the region between 1045 and 1070 A
+ * for the four 1000-1100 A channels.
+ ******************************************************************/
+
+ if (src_type[1] == 'E') { /* Emission-line source */
+ /* Use Lyman beta to align background observations. */
+ if (objclass == 7 || (program[0] == 'S' && program[2] == '0' && program[3] == '5')) {
+ printf("Assuming background observation.\n");
+ wmin = 1024.;
+ wdelta = 6.;
+ } else { /* Use O VI emission for everything else. */
+ printf("SRC_TYPE = %s. Emission-line target.\n", src_type);
+ wmin = 1030.;
+ wdelta = 9.;
+ }
+ }
+ /* Continuum source */
+ else if (objclass == 17 || objclass == 29 || objclass == 37) {
+ /* Use O VI and C II to align white dwarf spectra. */
+ printf("OBJCLASS = %d. Assuming nearby white dwarf.\n", objclass);
+ wmin = 1030.;
+ wdelta = 9.;
+ }
+ else { /* Use 1045-1070 A region for all other continuum sources. */
+ printf("SRC_TYPE = %s. Continuum target.\n", src_type);
+ wmin = 1045.;
+ wdelta = 25.;
+ }
+
+ for (i = 0; i < 4; i++) {
+ if (mean_flux[i] > -1)
+ compute_shift(pt_fits, hdu[ref], hdu[i], wmin, wdelta, wpc, shift+i, quality+i);
+ else
+ shift[i] = 0;
+ shift[i+4] = shift[i];
+ printf("hdu = %d, hdu_ref = %d, shift = %d\n", hdu[i], hdu[ref], shift[i]);
+ }
+
+ /**************************
+ ** Set up output arrays. **
+ **************************/
+ n_nvo = cf_nlong((double) (NVO_MAX - NVO_MIN) / wpc) + 1;
+ wave_nvo = (float *) cf_calloc(n_nvo, sizeof(float));
+ for (i = 0; i < n_nvo; i++) wave_nvo[i] = NVO_MIN + (double) wpc * i;
+ flux_nvo = (float *) cf_calloc(n_nvo, sizeof(float));
+ error_nvo = (float *) cf_calloc(n_nvo, sizeof(float));
+
+ for (i = 0; i < n_nvo; i++) {
+ flux_nvo[i] = 0.0;
+ error_nvo[i] = 0.0;
+ }
+
+ /**************************************************************
+ ** In each wave band, copy best data set into output arrays. **
+ **************************************************************/
+ /* For BKGD targets, omit flux comparison when selecting which
+ regions to use. */
+ if (objclass == 7 || !strncmp(sp_type, "BKGD", 4)) bkgd_obs = TRUE;
+
+ /* First fill in the 1010-1104 A region with SiC 2B. */
+ copy_spec(pt_fits, hdu[1], w_min[1], w_max[1], wpc, shift[1], flux_nvo, error_nvo, n_nvo);
+
+ /* Replace with SiC 1A if possible. It has a higher S/N, but extends only to 1090 A. */
+ if ((bkgd_obs && mean_flux[0] > -1) || (mean_flux[0] > 0.9 * mean_flux[1]))
+ copy_spec(pt_fits, hdu[0], w_min[0], w_max[0], wpc, shift[0], flux_nvo, error_nvo, n_nvo);
+
+ /* Next overlay the region between 990 and 1080 A with LiF 1A or LiF 2B, if available. */
+ if ((bkgd_obs && mean_flux[2] > -1) || ((mean_flux[2] > 0.9 * mean_flux[3]) &&
+ (mean_flux[2] > 0.7 * mean_flux[0]) && (mean_flux[2] > 0.7 * mean_flux[1])))
+ copy_spec(pt_fits, hdu[2], w_min[2], w_max[2], wpc, shift[2], flux_nvo, error_nvo, n_nvo);
+ else if ((bkgd_obs && mean_flux[3] > -1) ||
+ ((mean_flux[3] > 0.7 * mean_flux[0]) && (mean_flux[3] > 0.7 * mean_flux[1])))
+ copy_spec(pt_fits, hdu[3], w_min[3], w_max[3], wpc, shift[3], flux_nvo, error_nvo, n_nvo);
+ else
+ w_max[5] = 1010, w_min[6] = w_min[7] = 1104;
+ /* If no LiF data, adopt limits of SiC spectra. */
+
+ /* Use SiC 1B to populate the shortest wavelengths. */
+ copy_spec(pt_fits, hdu[4], w_min[4], w_max[4], wpc, shift[4], flux_nvo, error_nvo, n_nvo);
+
+ /* If SiC 2A is good, use it for the main part of 900 - 1000 A. */
+ if ((bkgd_obs && mean_flux[5] > -1) || (mean_flux[5] > 0.9 * mean_flux[4]))
+ copy_spec(pt_fits, hdu[5], w_min[5], w_max[5], wpc, shift[5], flux_nvo, error_nvo, n_nvo);
+
+ /* Use LiF 1B to populate the longest wavelengths. */
+ copy_spec(pt_fits, hdu[6], w_min[6], w_max[6], wpc, shift[6], flux_nvo, error_nvo, n_nvo);
+
+ /* If LiF 2A is good, use it for the main part of 1100 - 1180 A. */
+ if ((bkgd_obs && mean_flux[7] > -1) || (mean_flux[7] > 0.9 * mean_flux[6]))
+ copy_spec(pt_fits, hdu[7], w_min[7], w_max[7], wpc, shift[7], flux_nvo, error_nvo, n_nvo);
+
+
+ for (i = 0; i < n_nvo; i++) {
+ if (flux_nvo[i] >= 1 || error_nvo[i] >= 1) cf_if_error("Bad values in NVO array.");
+ }
+
+ /*********************
+ ** Create NVO file. **
+ *********************/
+ FITS_create_file(&pt_fits_out, out_name, &status);
+ FITS_movabs_hdu(pt_fits, 1, &hdutype, &status);
+ FITS_copy_header(pt_fits, pt_fits_out, &status);
+ FITS_update_key(pt_fits_out, TINT, "NEXTEND", &nextend, NULL, &status);
+ FITS_update_key(pt_fits_out, TSTRING, "FILENAME", (out_name + 1), NULL, &status);
+ FITS_update_key(pt_fits_out, TSTRING, "FILETYPE", "NVO SPECTRUM", NULL, &status);
+ w0 = NVO_MIN;
+ FITS_update_key(pt_fits_out, TFLOAT, "W0", &w0, NULL, &status);
+
+ /* Delete index to file extensions from the primary HDU. */
+ fits_get_hdrspace(pt_fits_out, &nkeys, &morekeys, &status);
+ for (i = nkeys; i > nkeys-12; i--) fits_delete_record(pt_fits_out, i, &status);
+
+ FITS_create_tbl(pt_fits_out, BINARY_TBL, n_nvo, 3, ttype, tform, tunit, "FUSE_SPECTRUM", &status);
+ FITS_write_col(pt_fits_out, TFLOAT, 1, 1L, 1L, n_nvo, wave_nvo, &status);
+ FITS_write_col(pt_fits_out, TFLOAT, 2, 1L, 1L, n_nvo, flux_nvo, &status);
+ FITS_write_col(pt_fits_out, TFLOAT, 3, 1L, 1L, n_nvo, error_nvo, &status);
+
+ free(wave_nvo);
+ free(flux_nvo);
+ free(error_nvo);
+
+ FITS_close_file(pt_fits_out, &status);
+ FITS_close_file(pt_fits, &status);
+
+ return(0);
+}
diff --git a/src/analysis/cf_pack.c b/src/analysis/cf_pack.c
new file mode 100644
index 0000000..a823c22
--- /dev/null
+++ b/src/analysis/cf_pack.c
@@ -0,0 +1,270 @@
+/*******************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *******************************************************************************
+ *
+ * Usage: cf_pack combined_exposure_list out_file_name.fit
+ *
+ * Description: Write the 8 segments (1alif, 1blif etc...) into a single fits
+ * file with 8 extensions (in addition to the primary array).
+ *
+ * History: 04/08/05 tc v1.0 First release
+ * 05/02/05 wvd v1.1 Copy SPEC and WOFF keywords to
+ * output file.
+ * 06/03/05 wvd v1.2 Delete unused variables.
+ * 06/29/05 wvd v1.3 Set keyword COMB_COR = COMPLETE.
+ * 09/30/05 wvd v1.4 Update archive search keywords.
+ * 03/23/06 wvd v1.5 If a segment is missing, write
+ * an empty image extension.
+ * 05/19/06 wvd v1.6 Write an index to the file
+ * extensions to the primary HDU.
+ * 05/24/06 wvd v1.7 Remove SPEC* keywords from
+ * primary HDU.
+ * 05/29/06 wvd v1.8 Use while construction to
+ * delete WOFF* keywords.
+ * 06/22/06 wvd v1.9 Truncate APER_ACT from (for
+ * example) MDRS_LIF to MDRS.
+ * 08/14/06 wvd v1.10 Tinker with code to copy SPEC
+ * keywords to new file header.
+ * 04/07/07 wvd v1.11 Clean up compiler warnings.
+ * 08/27/07 bot v1.12 Changed TINT to TLONG l.163,214,
+ * and 215 ; added L to every number
+ * occurence related to i and j ;
+ * Changed i to k l.123 to 131 to
+ * keep an int in this case
+ *
+ ******************************************************************************/
+
+#include <math.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "calfuse.h"
+
+/* Calfuse variables */
+static char CF_PRGM_ID[] = "cf_pack";
+static char CF_VER_NUM[] = "1.12";
+
+int main(int argc, char *argv[])
+{
+ /* Variables */
+ float obstime, obstime_max, woffset;
+ float w0, wpc;
+ int wave_cnum, flux_cnum, error_cnum;
+ int n_spec, n_best_spec;
+ long i, j, num_exp, n_rows;
+ int k;
+
+ char *ttype[] = { "WAVE", "FLUX", "ERROR" };
+ char *tform[] = { "1E", "1E", "1E" };
+ char *tunit[] = { "ANGSTROMS", "ERG/CM2/S/A", "ERG/CM2/S/A" };
+ char *extname[] = { "1ALIF", "1BLIF", "2BLIF", "2ALIF", "1ASIC", "1BSIC", "2BSIC", "2ASIC" };
+ char spec_list[][80] = { "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL" };
+
+ /* New values for archive search keywords */
+ float bandwid = 285.;
+ float centrwv = 1046.;
+ float wavemin = 904.;
+ float wavemax = 1189.;
+
+ FILE *pt_file;
+ char comment[FLEN_COMMENT], spec_lis[80], out_name[80], spec_name[80];
+ char aper_act[80], detector[80], segment[80];
+ char err_str[80], aper_key[8], combmeth_key[9];
+ char keyname[FLEN_KEYWORD], keyvalue[FLEN_VALUE];
+ fitsfile *pt_fits, *pt_fits_out;
+ int status = 0, hdutype = 0;
+ int nextend_key = 8;
+ float obstime_key = 0;
+
+
+ /***********************************
+ ** Enter a timestamp into the log **
+ ***********************************/
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+
+ /***********************************************************
+ ** Check for proper command-line usage and read arguments **
+ ***********************************************************/
+ if (argc != 3)
+ cf_if_error("Usage: cf_pack combined_exposure_list out_file_name.fit\n");
+
+ strcpy(spec_lis, argv[1]);
+ strcpy(out_name, "!");
+ strcat(out_name, argv[2]); /* Force overwrite */
+
+ /********************
+ ** Open input list **
+ ********************/
+ if ((pt_file = fopen(spec_lis, "r")) == NULL)
+ {
+ sprintf(err_str, "Unable to open file %s\n", spec_lis);
+ cf_if_error(err_str);
+ }
+
+ /* ***********************************************
+ ** Determine which spectrum has maximum OBSTIME **
+ ** Write input file list to spec_list array. **
+ *************************************************/
+ n_best_spec = -1;
+ n_spec = 0;
+ obstime_max = -1;
+
+ while (fscanf(pt_file, "%80s", spec_name) != EOF)
+ {
+ FITS_open_file(&pt_fits, spec_name, READONLY, &status);
+ FITS_read_key(pt_fits, TFLOAT, "OBSTIME" , &obstime, NULL, &status);
+ FITS_read_key(pt_fits, TSTRING, "DETECTOR" , &detector, NULL, &status);
+ FITS_read_key(pt_fits, TSTRING, "APER_ACT" , &aper_act, NULL, &status);
+ FITS_close_file(pt_fits, &status);
+
+ sprintf(segment, "%2s%3s", detector, aper_act+5);
+ for (k=0; k<8; k++)
+ if (!strcmp(segment, extname[k])) {
+ strcpy(spec_list[k], spec_name);
+ break;
+ }
+ if (obstime_max < obstime) {
+ n_best_spec = k;
+ obstime_max = obstime;
+ }
+ n_spec++;
+ }
+ fclose(pt_file);
+ if (n_spec == 0) cf_if_error("No valid segments provided");
+ if (n_spec != 8) cf_if_warning("Combining fewer than 8 segments");
+
+ /* ***************************************************
+ ** Copy header of reference spectrum to output file **
+ ** Update a few header keywords. **
+ *****************************************************/
+
+ FITS_open_file(&pt_fits, spec_list[n_best_spec], READONLY, &status);
+ FITS_create_file(&pt_fits_out, out_name, &status);
+ FITS_copy_header(pt_fits, pt_fits_out, &status);
+ FITS_close_file(pt_fits, &status);
+
+ FITS_update_key(pt_fits_out, TSTRING, "FILENAME", (out_name + 1), NULL, &status);
+ FITS_update_key(pt_fits_out, TSTRING, "DETECTOR", "ALL", NULL, &status);
+ FITS_update_key(pt_fits_out, TSTRING, "COMB_COR", "COMPLETE", NULL, &status);
+
+ sprintf(aper_key, "%4s", aper_act);
+ FITS_update_key(pt_fits_out, TSTRING, "APER_ACT", aper_key, NULL, &status);
+ FITS_update_key(pt_fits_out, TINT, "NEXTEND", &nextend_key, NULL, &status);
+
+ FITS_update_key(pt_fits_out, TFLOAT, "BANDWID", &bandwid, NULL, &status);
+ FITS_update_key(pt_fits_out, TFLOAT, "CENTRWV", &centrwv, NULL, &status);
+ FITS_update_key(pt_fits_out, TFLOAT, "WAVEMIN", &wavemin, NULL, &status);
+ FITS_update_key(pt_fits_out, TFLOAT, "WAVEMAX", &wavemax, NULL, &status);
+
+ FITS_read_key(pt_fits_out, TLONG, "NSPEC", &num_exp, NULL, &status);
+ FITS_delete_key(pt_fits_out, "NSPEC", &status);
+ for (i = 0L; i < num_exp; i++) {
+ sprintf(keyname, "SPEC%03ld", i+1L);
+ FITS_delete_key(pt_fits_out, keyname, &status);
+ sprintf(keyname, "WOFF*%03ld", i+1L);
+ FITS_delete_key(pt_fits_out, keyname, &status);
+ fits_delete_key(pt_fits_out, keyname, &status);
+ if (status != 0) status = 0;
+ }
+
+
+ /* ***************************************************
+ ** Step through detector segments.
+ ** Copy spectra into extensions of output file.
+ *****************************************************/
+ for (i = 0L; i < 8L; i++) {
+
+ if (!strncmp(spec_list[i], "NULL", 4)) {
+ n_rows = 0L;
+ FITS_create_tbl(pt_fits_out, BINARY_TBL, n_rows, 3, ttype, tform,
+ tunit, extname[i], &status);
+ FITS_write_comment(pt_fits_out, "Extension is empty. No data available.", &status);
+ }
+ else {
+ FITS_open_file(&pt_fits, spec_list[i], READONLY, &status);
+
+ FITS_movabs_hdu(pt_fits, 2, &hdutype, &status);
+ FITS_get_colnum(pt_fits, TRUE, "WAVE", &wave_cnum, &status);
+ FITS_get_colnum(pt_fits, TRUE, "FLUX", &flux_cnum, &status);
+ FITS_get_colnum(pt_fits, TRUE, "ERROR", &error_cnum, &status);
+ FITS_get_num_rows(pt_fits, &n_rows, &status);
+
+ FITS_create_tbl(pt_fits_out, BINARY_TBL, n_rows, 3, ttype, tform,
+ tunit, extname[i], &status);
+
+ FITS_copy_col(pt_fits, pt_fits_out, wave_cnum, 1, FALSE, &status);
+ FITS_copy_col(pt_fits, pt_fits_out, flux_cnum, 2, FALSE, &status);
+ FITS_copy_col(pt_fits, pt_fits_out, error_cnum, 3, FALSE, &status);
+
+ /* Copy various header keywords */
+ FITS_read_key(pt_fits, TSTRING, "COMBMETH", combmeth_key, NULL, &status);
+ FITS_update_key(pt_fits_out, TSTRING, "COMBMETH", combmeth_key, NULL, &status);
+
+ FITS_movabs_hdu(pt_fits, 1, &hdutype, &status);
+ FITS_read_key(pt_fits, TFLOAT, "W0", &w0, NULL, &status);
+ FITS_update_key(pt_fits_out, TFLOAT, "W0", &w0, NULL, &status);
+ FITS_read_key(pt_fits, TFLOAT, "WPC", &wpc, NULL, &status);
+ FITS_update_key(pt_fits_out, TFLOAT, "WPC", &wpc, NULL, &status);
+ FITS_read_key(pt_fits, TFLOAT, "OBSTIME", &obstime_key, NULL, &status);
+ FITS_update_key(pt_fits_out, TFLOAT, "OBSTIME", &obstime_key, NULL, &status);
+ FITS_read_key(pt_fits, TLONG, "NSPEC", &num_exp, NULL, &status);
+ FITS_update_key(pt_fits_out, TLONG, "NSPEC", &num_exp, NULL, &status);
+
+ for (j = 0L; j < num_exp; j++) {
+ sprintf(keyname, "SPEC%03ld", j+1L);
+ FITS_read_key(pt_fits, TSTRING, keyname, keyvalue, NULL, &status);
+ FITS_update_key(pt_fits_out, TSTRING, keyname, keyvalue, NULL, &status);
+ sprintf(keyname, "WOFF%03ld", j+1L);
+ fits_read_key(pt_fits, TFLOAT, keyname, &woffset, comment, &status);
+ if (status) {
+ status = 0;
+ woffset = 0.;
+ sprintf(comment, "[A]");
+ }
+ FITS_update_key(pt_fits_out, TFLOAT, keyname, &woffset, comment, &status);
+ }
+ FITS_close_file(pt_fits, &status);
+ }
+ }
+ if (n_spec != 8) {
+ char datestr[FLEN_CARD];
+ int timeref;
+ FITS_movabs_hdu(pt_fits_out, 1, &hdutype, &status);
+ FITS_write_comment(pt_fits_out, " ", &status);
+ sprintf(comment, "Segments");
+ for (i=0L; i<8L; i++) if (!strncmp(spec_list[i], "NULL", 4))
+ sprintf(comment, "%s %s", comment, extname[i]);
+ sprintf(comment, "%s are missing.", comment);
+ FITS_write_comment(pt_fits_out, comment, &status);
+ sprintf(comment, "Extensions");
+ for (i=0L; i<8L; i++) if (!strncmp(spec_list[i], "NULL", 4))
+ sprintf(comment, "%s %ld", comment, i+1L);
+ sprintf(comment, "%s of this file contain no data.", comment);
+ FITS_write_comment(pt_fits_out, comment, &status);
+ fits_get_system_time(datestr, &timeref, &status);
+ sprintf(comment, "CalFUSE v%s %.10s", CALFUSE_VERSION, datestr);
+ FITS_write_comment(pt_fits_out, comment, &status);
+ FITS_write_comment(pt_fits_out, " ", &status);
+ }
+
+ /* Add an index to the file extensions. */
+ FITS_movabs_hdu(pt_fits_out, 1, &hdutype, &status);
+ FITS_write_comment(pt_fits_out, " ", &status);
+ sprintf(comment, "Index to file extensions:");
+ FITS_write_comment(pt_fits_out, comment, &status);
+ sprintf(comment, "Extension 0 This Header");
+ FITS_write_comment(pt_fits_out, comment, &status);
+ for (i=0L; i<8L; i++) {
+ sprintf(comment, "Extension %ld %s", i+1L, extname[i]);
+ FITS_write_comment(pt_fits_out, comment, &status);
+ }
+ FITS_write_comment(pt_fits_out, " ", &status);
+
+ FITS_close_file(pt_fits_out, &status);
+
+ return(0);
+}
diff --git a/src/analysis/cf_reflux.c b/src/analysis/cf_reflux.c
new file mode 100644
index 0000000..1a2511f
--- /dev/null
+++ b/src/analysis/cf_reflux.c
@@ -0,0 +1,148 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *
+ * Synopsis: cf_reflux input_file output_file aeff_cal1 [aeff_cal2]
+ *
+ * Description: Program applies a new flux calibration to an extracted
+ * spectral file. If two effective-area files are given,
+ * program interpolates between them based on the MDJ
+ * of the exposure.
+ * Program writes a history line to output file header.
+ *
+ * Arguments: input_file FUSE extracted spectral file (fcal.fit)
+ * output_file Copy of input file with modified flux cal.
+ * aeff_cal1 Effective-area curve
+ * aeff_cal2 Optional effective-area curve, needed only
+ * if you wish to interpolate.
+ *
+ * Returns: none
+ *
+ * History: 06/02/05 1.1 wvd Based on programs cf_uninterp and
+ * cf_extract_spectra.
+ *
+ ****************************************************************************/
+
+#include <math.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "calfuse.h"
+
+static char CF_PRGM_ID[] = "cf_reflux";
+static char CF_VER_NUM[] = "1.1";
+
+int main(int argc, char *argv[])
+{
+ char aper_act[FLEN_VALUE], datestr[FLEN_VALUE];
+ int status=0, hdutype;
+ int aperture, timeref;
+ long i, frow=1, felement=1, nout;
+ float exptime, wpc;
+ float *wave, *flux, *error, *weights, *bkgd;
+ unsigned char *channel;
+ fitsfile *infits, *outfits;
+
+ /* Enter a timestamp into the log. */
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ /* Initialize error checking */
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+ if (argc < 4) {
+ printf("Usage: cf_reflux input_file output_file aeff_cal1 [aeff_cal2]\n");
+ return 0;
+ }
+
+ /* Copy input spectral file to output. Close input file. */
+ FITS_open_file(&infits, argv[1], READONLY, &status);
+ FITS_create_file(&outfits, argv[2], &status);
+ FITS_copy_hdu(infits, outfits, 0, &status);
+ FITS_movrel_hdu(infits, 1, &hdutype, &status);
+ FITS_copy_hdu(infits, outfits, 0, &status);
+ FITS_close_file(infits, &status);
+
+ /* Modify output file keywords. */
+ FITS_movabs_hdu(outfits, 1, &hdutype, &status);
+ FITS_update_key(outfits, TSTRING, "FILENAME", argv[2], NULL, &status);
+ FITS_update_key(outfits, TSTRING, "AEFF1CAL", argv[3], NULL, &status);
+ if (argc == 5)
+ FITS_update_key(outfits, TSTRING, "AEFF2CAL", argv[4], NULL, &status);
+ else
+ FITS_update_key(outfits, TSTRING, "AEFF2CAL", argv[3], NULL, &status);
+
+ /* Add HISTORY lines to the output file */
+ fits_get_system_time(datestr, &timeref, &status);
+ strcat(datestr, " File recalibrated using cf_reflux");
+ FITS_write_history(outfits, datestr, &status);
+
+ /* Through which aperture was this spectrum obtained? */
+ FITS_read_key(outfits, TSTRING, "APER_ACT", aper_act, NULL, &status);
+ if (!strcmp(aper_act, "HIRS_LIF")) aperture = 1;
+ else if (!strcmp(aper_act, "MDRS_LIF")) aperture = 2;
+ else if (!strcmp(aper_act, "LWRS_LIF")) aperture = 3;
+ else if (!strcmp(aper_act, "HIRS_SIC")) aperture = 5;
+ else if (!strcmp(aper_act, "MDRS_SIC")) aperture = 6;
+ else if (!strcmp(aper_act, "LWRS_SIC")) aperture = 7;
+ else {
+ printf("Unable to interpret header keyword APER_ACT = %s\n", aper_act);
+ FITS_close_file(outfits, &status);
+ return 0;
+ }
+
+ /* Read WAVE, FLUX, ERROR, WEIGHTS, and BKGD arrays */
+ FITS_movabs_hdu(outfits, 2, &hdutype, &status);
+ nout = cf_read_col(outfits, TFLOAT, "WAVE", (void **) &wave);
+ nout = cf_read_col(outfits, TFLOAT, "FLUX", (void **) &flux);
+ nout = cf_read_col(outfits, TFLOAT, "ERROR", (void **) &error);
+ nout = cf_read_col(outfits, TFLOAT, "WEIGHTS", (void **) &weights);
+ nout = cf_read_col(outfits, TFLOAT, "BKGD", (void **) &bkgd);
+ channel = (unsigned char *) cf_malloc(sizeof(unsigned char) * nout);
+
+ /* Compute inputs to flux-calibration routine */
+ for (i = 0; i < nout; i++) {
+ channel[i] = (unsigned char) aperture;
+ if (flux[i] != 0.) error[i] /= flux[i]; /* Relative error */
+ flux[i] = weights[i] - bkgd[i]; /* Units are counts */
+ }
+
+ /* Apply flux calibration */
+ FITS_movabs_hdu(outfits, 1, &hdutype, &status);
+ FITS_update_key(outfits, TSTRING, "FLUX_COR", "PERFORM", NULL, &status) ;
+ cf_convert_to_ergs(outfits, nout, flux, flux, channel, wave);
+
+ /* Convert flux and error arrays to units of erg/cm2/s/A. */
+ FITS_movabs_hdu(outfits, 1, &hdutype, &status);
+ FITS_read_key(outfits, TFLOAT, "EXPTIME", &exptime, NULL, &status);
+ FITS_read_key(outfits, TFLOAT, "WPC", &wpc, NULL, &status);
+ if (exptime < 1) {
+ printf ("EXPTIME = %g. Exiting.\n", exptime);
+ FITS_close_file(outfits, &status);
+ return 0;
+ }
+ for (i = 0; i < nout; i++) {
+ flux[i] /= exptime * wpc;
+ error[i] *= flux[i];
+ }
+
+ /* Write new flux and error arrays to the output file. */
+ FITS_movabs_hdu(outfits, 2, &hdutype, &status);
+ FITS_write_col(outfits, TFLOAT, 2, frow, felement, nout, flux, &status);
+ FITS_write_col(outfits, TFLOAT, 3, frow, felement, nout, error, &status);
+
+ /* Close output file. */
+ FITS_close_file(outfits, &status);
+
+ /* Free memory. */
+ free(wave);
+ free(flux);
+ free(error);
+ free(weights);
+ free(bkgd);
+ free(channel);
+
+ /* Enter a timestamp into the log. */
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+ return 0;
+}
diff --git a/src/analysis/cf_ttag_to_hist.c b/src/analysis/cf_ttag_to_hist.c
new file mode 100644
index 0000000..070a1a6
--- /dev/null
+++ b/src/analysis/cf_ttag_to_hist.c
@@ -0,0 +1,463 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_ttag_to_hist input_file output_file
+ *
+ * Description: Creates a FITS 2D image from a time-tagged data file (FITS
+ * binary table of photon address data). The 2D SIA table is
+ * written to the first extension (HDU=1) and the other four
+ * extensions contain the two apertures and stim-lamp pulses.
+ *
+ *
+ * Arguments: input_file Input raw time-tagged FITS file name
+ * output_file Output raw histogram FITS file name
+ *
+ * Returns: none
+ *
+ * History: 03/28/00 1.01 peb Begin work
+ * 12/21/00 1.03 peb Fixed type mismatched in cfitsio
+ * calls
+ *
+ ****************************************************************************/
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "calfuse.h"
+
+#define STIMX 2048
+
+static char CF_PRGM_ID[] = "cf_ttag_to_hist";
+static char CF_VER_NUM[] = "1.03";
+
+int main(int argc, char *argv[])
+{
+ fitsfile *infits, *outfits;
+ char buffer[FLEN_CARD], *siabuf;
+ int status = 0, intnull, anynull, hdutype, fcol, begkey=5, endkey;
+ int j, k1, kx1, ky1, k2, kx2, ky2, k3, kx3, ky3, k4, kx4, ky4;
+ int naxis, naxis1, naxis2, naxis3, naxis4;
+ int *posx, *posy, npixel, fpixel=1, frow, felem, nrow;
+ int begx1, begy1, begx2, begy2, begx3, begy3, begx4, begy4;
+ int rcnt1, rcnt2, rcnt3, rcnt4, min1, min2, min3, min4;
+ int max1, max2, max3, max4, binx, biny;
+ int keynum, nextend=4, extver=0, bzero=32768, bscale=1;
+ short *outbuf1, *outbuf2, *outbuf3, *outbuf4;
+ long naxes[2], naxes1[2], naxes2[2], naxes3[2], naxes4[2];
+ float fzero=0.0;
+ double ra_targ, dec_targ, pa_aper, equinox;
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ /*
+ * Open input ttag data file and create output file.
+ */
+ FITS_open_file(&infits, argv[1], READONLY, &status);
+ FITS_create_file(&outfits, argv[2], &status);
+ /*
+ * Create primary image header
+ */
+ naxis = 2; naxes[0] = 8; naxes[1] = 64;
+ FITS_create_img(outfits, BYTE_IMG, naxis, naxes, &status);
+ /*
+ * Copy header from primary HDU of the input file to the output file,
+ * but leave the primary HDU data array empty.
+ */
+ FITS_read_key(infits, TINT, "SPECBINX", &binx, buffer, &status);
+ FITS_read_key(infits, TINT, "SPECBINY", &biny, buffer, &status);
+ FITS_get_hdrpos(infits, &endkey, &keynum, &status);
+ for (j = begkey; j <= endkey; j++) {
+ FITS_read_record(infits, j, buffer, &status);
+ FITS_write_record(outfits, buffer, &status);
+ }
+ FITS_update_key(outfits, TINT, "NEXTEND", &nextend, NULL, &status);
+ FITS_update_key(outfits, TSTRING, "FILETYPE", "RAW HISTOGRAM",
+ NULL, &status);
+ FITS_update_key(outfits, TSTRING, "INSTMODE", "HIST", NULL, &status);
+ /*
+ * Populate primary data or SIA table.
+ */
+ npixel = naxes[0]*naxes[1];
+ siabuf = cf_malloc(npixel);
+ memset(siabuf, 1, npixel);
+ FITS_write_img(outfits, TBYTE, fpixel, npixel, siabuf, &status);
+ free(siabuf);
+ /*
+ * Move to the 1st HDU of the input file and read the binary table.
+ */
+ FITS_movabs_hdu(infits, 2, &hdutype, &status);
+ if(hdutype != BINARY_TBL) {
+ cf_if_error("Error: This HDU is not a binary table!");
+ }
+ FITS_read_key(infits, TINT, "NAXIS2", &nrow, buffer, &status);
+ FITS_read_key(infits, TDOUBLE, "RA_TARG", &ra_targ, buffer, &status);
+ FITS_read_key(infits, TDOUBLE, "DEC_TARG", &dec_targ, buffer, &status);
+ FITS_read_key(infits, TDOUBLE, "PA_APER", &pa_aper, buffer, &status);
+ FITS_read_key(infits, TDOUBLE, "EQUINOX", &equinox, buffer, &status);
+ /*
+ * Allocate memory for X, Y photon event arrays
+ */
+ posx = cf_malloc(sizeof(int) * nrow);
+ posy = cf_malloc(sizeof(int) * nrow);
+ /*
+ * Read X and Y from table
+ */
+ frow = felem = 1; intnull = anynull = 0;
+
+ FITS_get_colnum(infits, TRUE, "X", &fcol, &status);
+ FITS_read_col(infits, TINT, fcol, frow, felem, nrow, &intnull,
+ posx, &anynull, &status);
+ FITS_get_colnum(infits, TRUE, "Y", &fcol, &status);
+ FITS_read_col(infits, TINT, fcol, frow, felem, nrow, &intnull,
+ posy, &anynull, &status);
+ /*
+ * Create buffers (outbufn) to hold binned images, and
+ * initialize them.
+ */
+ naxis1 = 2; naxes1[0] = NXMAX; naxes1[1] = 20;
+ begx1 = 0; begy1 = 48; rcnt1 = 56; min1 = max1 = 0;
+ outbuf1 = cf_calloc(naxes1[0]*naxes1[1], sizeof(short));
+
+ naxis2 = 2; naxes2[0] = NXMAX; naxes2[1] = 20;
+ begx2 = 0; begy2 = 76; rcnt2 = 57; min2 = max2 = 0;
+ outbuf2 = cf_calloc(naxes2[0]*naxes2[1], sizeof(short));
+
+ naxis3 = 2; naxes3[0] = STIMX; naxes3[1] = 2;
+ begx3 = 0; begy3 = 76; rcnt3 = 1; min3 = max3 = 0;
+ outbuf3 = cf_calloc(naxes3[0]*naxes3[1], sizeof(short));
+
+ naxis4 = 2; naxes4[0] = STIMX; naxes4[1] = 2;
+ begx4 = 14336; begy4 = 78; rcnt4 = 1; min4 = max4 = 0;
+ outbuf4 = cf_calloc(naxes4[0]*naxes4[1], sizeof(short));
+
+ for(j = 0; j < nrow; j++) {
+ kx1 = posx[j]/binx-begx1;
+ ky1 = posy[j]/biny-begy1;
+ if (kx1 >= 0 && kx1 < naxes1[0] && ky1 >= 0 && ky1 < naxes1[1]) {
+ k1 = naxes1[0]*ky1 + kx1;
+ outbuf1[k1] += 1;
+ if (outbuf1[k1] < min1)
+ min1 = outbuf1[k1];
+ if (outbuf1[k1] > max1)
+ max1 = outbuf1[k1];
+ }
+ kx2 = posx[j]/binx-begx2;
+ ky2 = posy[j]/biny-begy2;
+ if (kx2 >= 0 && kx2 < naxes2[0] && ky2 >= 0 && ky2 < naxes2[1]) {
+ k2 = naxes2[0]*ky2 + kx2;
+ outbuf2[k2] += 1;
+ if (outbuf2[k2] < min2)
+ min2 = outbuf2[k2];
+ if (outbuf2[k2] > max2)
+ max2 = outbuf2[k2];
+ }
+ kx3 = posx[j]/binx-begx3;
+ ky3 = posy[j]/biny-begy3;
+ if (kx3 >= 0 && kx3 < naxes3[0] && ky3 >= 0 && ky3 < naxes3[1]) {
+ k3 = naxes3[0]*ky3 + kx3;
+ outbuf3[k3] += 1;
+ if (outbuf3[k3] < min3)
+ min3 = outbuf3[k3];
+ if (outbuf3[k3] > max3)
+ max3 = outbuf3[k3];
+ }
+ kx4 = posx[j]/binx-begx4;
+ ky4 = posy[j]/biny-begy4;
+ if (kx4 >= 0 && kx4 < naxes4[0] && ky4 >= 0 && ky4 < naxes4[1]) {
+ k4 = naxes4[0]*ky4 + kx4;
+ outbuf4[k4] += 1;
+ if (outbuf4[k4] < min4)
+ min4 = outbuf4[k4];
+ if (outbuf4[k4] > max4)
+ max4 = outbuf4[k4];
+ }
+ }
+ /*
+ * Extension 1
+ */
+ FITS_create_img(outfits, SHORT_IMG, naxis1, naxes1, &status);
+ extver = 1;
+
+ FITS_write_key(outfits, TSTRING, "EXTNAME", "HISTOGRAM",
+ "name of this extension", &status);
+ FITS_write_key(outfits, TINT, "EXTVER" , &extver,
+ "extension version number", &status);
+ FITS_write_key(outfits, TINT, "BZERO" , &bzero,
+ "image brightness offset", &status);
+ FITS_write_key(outfits, TINT, "BSCALE" , &bscale,
+ "image brightness scale", &status);
+
+ FITS_write_comment(outfits, " ", &status);
+ FITS_write_comment(outfits, " ", &status);
+ FITS_write_comment(outfits,
+ " World Coordinate System and Related Parameters",
+ &status);
+ FITS_write_comment(outfits, " ", &status);
+
+ FITS_write_key(outfits, TFLOAT, "CRPIX1", &fzero,
+ "x-coordinate of reference pixel", &status);
+ FITS_write_key(outfits, TFLOAT, "CRPIX2", &fzero,
+ "y-coordinate of reference pixel", &status);
+ FITS_write_key(outfits, TFLOAT, "CRVAL1", &fzero,
+ "first axis value at reference pixel", &status);
+ FITS_write_key(outfits, TFLOAT, "CRVAL2", &fzero,
+ "second axis value at reference pixel", &status);
+ FITS_write_key(outfits, TSTRING, "CTYPE1", "LAMBDA",
+ "the coordinate type for the first axis", &status);
+ FITS_write_key(outfits, TSTRING, "CYTPE2", "ANGLE",
+ "the coordinate type for the second axis", &status);
+ FITS_write_key(outfits, TFLOAT, "CD1_1", &fzero,
+ "partial of first axis coordinate w.r.t. x", &status);
+ FITS_write_key(outfits, TFLOAT, "CD1_2", &fzero,
+ "partial of first axis coordinate w.r.t. y", &status);
+ FITS_write_key(outfits, TFLOAT, "CD2_1", &fzero,
+ "partial of second axis coordinate w.r.t. x", &status);
+ FITS_write_key(outfits, TFLOAT, "CD2_2", &fzero,
+ "partial of second axis coordinate w.r.t. y", &status);
+ FITS_write_key(outfits, TDOUBLE, "RA_TARG", &ra_targ,
+ "RA of reference aperture center", &status);
+ FITS_write_key(outfits, TDOUBLE, "DEC_TARG", &dec_targ,
+ "Declination of reference aperture center", &status);
+ FITS_write_key(outfits, TDOUBLE, "PA_APER", &pa_aper,
+ "Position Angle of reference aperture center", &status);
+ FITS_write_key(outfits, TDOUBLE, "EQUINOX", &equinox,
+ "equinox of celestial coord. system", &status);
+
+ FITS_write_comment(outfits, " ", &status);
+ FITS_write_comment(outfits, " HISTOGRAM REGION PARAMETERS", &status);
+ FITS_write_comment(outfits, " ", &status);
+
+ FITS_write_key(outfits, TINT, "XORIGIN", &begx1,
+ "offset of this region in the x dimension", &status);
+ FITS_write_key(outfits, TINT, "YORIGIN", &begy1,
+ "offset of this region in the y dimension", &status);
+ FITS_write_key(outfits, TINT, "RCOUNT", &rcnt1,
+ "count of rectangles in this region", &status);
+ FITS_write_key(outfits, TINT, "MINVAL", &min1,
+ "minimum value within rectangles", &status);
+ FITS_write_key(outfits, TINT, "MAXVAL", &max1,
+ "maximum value within rectangles", &status);
+
+ FITS_write_img(outfits, TSHORT, fpixel, naxes1[0]*naxes1[1],
+ outbuf1, &status);
+ /*
+ * Extension 2
+ */
+ FITS_create_img(outfits, SHORT_IMG, naxis2, naxes2, &status);
+ extver = 2;
+
+ FITS_write_key(outfits, TSTRING, "EXTNAME", "HISTOGRAM",
+ "name of this extension", &status);
+ FITS_write_key(outfits, TINT, "EXTVER" , &extver,
+ "extension version number", &status);
+ FITS_write_key(outfits, TINT, "BZERO" , &bzero,
+ "image brightness offset", &status);
+ FITS_write_key(outfits, TINT, "BSCALE" , &bscale,
+ "image brightness scale", &status);
+
+ FITS_write_comment(outfits, " ", &status);
+ FITS_write_comment(outfits, " ", &status);
+ FITS_write_comment(outfits,
+ " World Coordinate System and Related Parameters",
+ &status);
+ FITS_write_comment(outfits, " ", &status);
+
+ FITS_write_key(outfits, TFLOAT, "CRPIX1", &fzero,
+ "x-coordinate of reference pixel", &status);
+ FITS_write_key(outfits, TFLOAT, "CRPIX2", &fzero,
+ "y-coordinate of reference pixel", &status);
+ FITS_write_key(outfits, TFLOAT, "CRVAL1", &fzero,
+ "first axis value at reference pixel", &status);
+ FITS_write_key(outfits, TFLOAT, "CRVAL2", &fzero,
+ "second axis value at reference pixel", &status);
+ FITS_write_key(outfits, TSTRING, "CTYPE1", "LAMBDA",
+ "the coordinate type for the first axis", &status);
+ FITS_write_key(outfits, TSTRING, "CYTPE2", "ANGLE",
+ "the coordinate type for the second axis", &status);
+ FITS_write_key(outfits, TFLOAT, "CD1_1", &fzero,
+ "partial of first axis coordinate w.r.t. x", &status);
+ FITS_write_key(outfits, TFLOAT, "CD1_2", &fzero,
+ "partial of first axis coordinate w.r.t. y", &status);
+ FITS_write_key(outfits, TFLOAT, "CD2_1", &fzero,
+ "partial of second axis coordinate w.r.t. x", &status);
+ FITS_write_key(outfits, TFLOAT, "CD2_2", &fzero,
+ "partial of second axis coordinate w.r.t. y", &status);
+ FITS_write_key(outfits, TDOUBLE, "RA_TARG", &ra_targ,
+ "RA of reference aperture center", &status);
+ FITS_write_key(outfits, TDOUBLE, "DEC_TARG", &dec_targ,
+ "Declination of reference aperture center", &status);
+ FITS_write_key(outfits, TDOUBLE, "PA_APER", &pa_aper,
+ "Position Angle of reference aperture center", &status);
+ FITS_write_key(outfits, TDOUBLE, "EQUINOX", &equinox,
+ "equinox of celestial coord. system", &status);
+
+ FITS_write_comment(outfits, " ", &status);
+ FITS_write_comment(outfits, " HISTOGRAM REGION PARAMETERS", &status);
+ FITS_write_comment(outfits, " ", &status);
+
+ FITS_write_key(outfits, TINT, "XORIGIN", &begx2,
+ "offset of this region in the x dimension", &status);
+ FITS_write_key(outfits, TINT, "YORIGIN", &begy2,
+ "offset of this region in the y dimension", &status);
+ FITS_write_key(outfits, TINT, "RCOUNT", &rcnt2,
+ "count of rectangles in this region", &status);
+ FITS_write_key(outfits, TINT, "MINVAL", &min2,
+ "minimum value within rectangles", &status);
+ FITS_write_key(outfits, TINT, "MAXVAL", &max2,
+ "maximum value within rectangles", &status);
+
+ FITS_write_img(outfits, TSHORT, fpixel, naxes2[0]*naxes2[1],
+ outbuf2, &status);
+ /*
+ * Extension 3
+ */
+ FITS_create_img(outfits, SHORT_IMG, naxis3, naxes3, &status);
+ extver = 3;
+
+ FITS_write_key(outfits, TSTRING, "EXTNAME", "HISTOGRAM",
+ "name of this extension", &status);
+ FITS_write_key(outfits, TINT, "EXTVER" , &extver,
+ "extension version number", &status);
+ FITS_write_key(outfits, TINT, "BZERO" , &bzero,
+ "image brightness offset", &status);
+ FITS_write_key(outfits, TINT, "BSCALE" , &bscale,
+ "image brightness scale", &status);
+
+ FITS_write_comment(outfits, " ", &status);
+ FITS_write_comment(outfits, " ", &status);
+ FITS_write_comment(outfits,
+ " World Coordinate System and Related Parameters",
+ &status);
+ FITS_write_comment(outfits, " ", &status);
+
+ FITS_write_key(outfits, TFLOAT, "CRPIX1", &fzero,
+ "x-coordinate of reference pixel", &status);
+ FITS_write_key(outfits, TFLOAT, "CRPIX2", &fzero,
+ "y-coordinate of reference pixel", &status);
+ FITS_write_key(outfits, TFLOAT, "CRVAL1", &fzero,
+ "first axis value at reference pixel", &status);
+ FITS_write_key(outfits, TFLOAT, "CRVAL2", &fzero,
+ "second axis value at reference pixel", &status);
+ FITS_write_key(outfits, TSTRING, "CTYPE1", "LAMBDA",
+ "the coordinate type for the first axis", &status);
+ FITS_write_key(outfits, TSTRING, "CYTPE2", "ANGLE",
+ "the coordinate type for the second axis", &status);
+ FITS_write_key(outfits, TFLOAT, "CD1_1", &fzero,
+ "partial of first axis coordinate w.r.t. x", &status);
+ FITS_write_key(outfits, TFLOAT, "CD1_2", &fzero,
+ "partial of first axis coordinate w.r.t. y", &status);
+ FITS_write_key(outfits, TFLOAT, "CD2_1", &fzero,
+ "partial of second axis coordinate w.r.t. x", &status);
+ FITS_write_key(outfits, TFLOAT, "CD2_2", &fzero,
+ "partial of second axis coordinate w.r.t. y", &status);
+ FITS_write_key(outfits, TDOUBLE, "RA_TARG", &ra_targ,
+ "RA of reference aperture center", &status);
+ FITS_write_key(outfits, TDOUBLE, "DEC_TARG", &dec_targ,
+ "Declination of reference aperture center", &status);
+ FITS_write_key(outfits, TDOUBLE, "PA_APER", &pa_aper,
+ "Position Angle of reference aperture center", &status);
+ FITS_write_key(outfits, TDOUBLE, "EQUINOX", &equinox,
+ "equinox of celestial coord. system", &status);
+
+ FITS_write_comment(outfits, " ", &status);
+ FITS_write_comment(outfits, " HISTOGRAM REGION PARAMETERS", &status);
+ FITS_write_comment(outfits, " ", &status);
+
+ FITS_write_key(outfits, TINT, "XORIGIN", &begx3,
+ "offset of this region in the x dimension", &status);
+ FITS_write_key(outfits, TINT, "YORIGIN", &begy3,
+ "offset of this region in the y dimension", &status);
+ FITS_write_key(outfits, TINT, "RCOUNT", &rcnt3,
+ "count of rectangles in this region", &status);
+ FITS_write_key(outfits, TINT, "MINVAL", &min3,
+ "minimum value within rectangles", &status);
+ FITS_write_key(outfits, TINT, "MAXVAL", &max3,
+ "maximum value within rectangles", &status);
+
+ FITS_write_img(outfits, TSHORT, fpixel, naxes3[0]*naxes3[1],
+ outbuf3, &status);
+ /*
+ * Extension 4
+ */
+ FITS_create_img(outfits, SHORT_IMG, naxis4, naxes4, &status);
+ extver = 4;
+
+ FITS_write_key(outfits, TSTRING, "EXTNAME", "HISTOGRAM",
+ "name of this extension", &status);
+ FITS_write_key(outfits, TINT, "EXTVER" , &extver,
+ "extension version number", &status);
+ FITS_write_key(outfits, TINT, "BZERO" , &bzero,
+ "image brightness offset", &status);
+ FITS_write_key(outfits, TINT, "BSCALE" , &bscale,
+ "image brightness scale", &status);
+
+ FITS_write_comment(outfits, " ", &status);
+ FITS_write_comment(outfits, " ", &status);
+ FITS_write_comment(outfits,
+ " World Coordinate System and Related Parameters",
+ &status);
+ FITS_write_comment(outfits, " ", &status);
+
+ FITS_write_key(outfits, TFLOAT, "CRPIX1", &fzero,
+ "x-coordinate of reference pixel", &status);
+ FITS_write_key(outfits, TFLOAT, "CRPIX2", &fzero,
+ "y-coordinate of reference pixel", &status);
+ FITS_write_key(outfits, TFLOAT, "CRVAL1", &fzero,
+ "first axis value at reference pixel", &status);
+ FITS_write_key(outfits, TFLOAT, "CRVAL2", &fzero,
+ "second axis value at reference pixel", &status);
+ FITS_write_key(outfits, TSTRING, "CTYPE1", "LAMBDA",
+ "the coordinate type for the first axis", &status);
+ FITS_write_key(outfits, TSTRING, "CYTPE2", "ANGLE",
+ "the coordinate type for the second axis", &status);
+ FITS_write_key(outfits, TFLOAT, "CD1_1", &fzero,
+ "partial of first axis coordinate w.r.t. x", &status);
+ FITS_write_key(outfits, TFLOAT, "CD1_2", &fzero,
+ "partial of first axis coordinate w.r.t. y", &status);
+ FITS_write_key(outfits, TFLOAT, "CD2_1", &fzero,
+ "partial of second axis coordinate w.r.t. x", &status);
+ FITS_write_key(outfits, TFLOAT, "CD2_2", &fzero,
+ "partial of second axis coordinate w.r.t. y", &status);
+ FITS_write_key(outfits, TDOUBLE, "RA_TARG", &ra_targ,
+ "RA of reference aperture center", &status);
+ FITS_write_key(outfits, TDOUBLE, "DEC_TARG", &dec_targ,
+ "Declination of reference aperture center", &status);
+ FITS_write_key(outfits, TDOUBLE, "PA_APER", &pa_aper,
+ "Position Angle of reference aperture center", &status);
+ FITS_write_key(outfits, TDOUBLE, "EQUINOX", &equinox,
+ "equinox of celestial coord. system", &status);
+
+ FITS_write_comment(outfits, " ", &status);
+ FITS_write_comment(outfits, " HISTOGRAM REGION PARAMETERS", &status);
+ FITS_write_comment(outfits, " ", &status);
+
+ FITS_write_key(outfits, TINT, "XORIGIN", &begx4,
+ "offset of this region in the x dimension", &status);
+ FITS_write_key(outfits, TINT, "YORIGIN", &begy4,
+ "offset of this region in the y dimension", &status);
+ FITS_write_key(outfits, TINT, "RCOUNT", &rcnt4,
+ "count of rectangles in this region", &status);
+ FITS_write_key(outfits, TINT, "MINVAL", &min4,
+ "minimum value within rectangles", &status);
+ FITS_write_key(outfits, TINT, "MAXVAL", &max4,
+ "maximum value within rectangles", &status);
+
+ FITS_write_img(outfits, TSHORT, fpixel, naxes4[0]*naxes4[1],
+ outbuf4, &status);
+ /*
+ * Free memory and close the input and output files
+ */
+ free(outbuf1);
+ free(outbuf2);
+ free(outbuf3);
+ free(outbuf4);
+ free(posx);
+ free(posy);
+
+ FITS_close_file(outfits, &status);
+ FITS_close_file(infits, &status);
+
+ return 0;
+}
diff --git a/src/analysis/cf_wrspec7.c b/src/analysis/cf_wrspec7.c
new file mode 100644
index 0000000..979046b
--- /dev/null
+++ b/src/analysis/cf_wrspec7.c
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *******************************************************************************
+ *
+ * Synopsis: cf_wrspec7(fitsfile *outfits, long npts, float *wave, float *flux,
+ * float *error, long *counts, float *weights,
+ * float *bkgd,short *pothole)
+ *
+ * Description: Write a file containing a FUSE 2D spectrum.
+ *
+ * Arguments: fitsfile *fname Output FITS file structure
+ *
+ * Returns: none
+ *
+ * History: 12/15/03 bjg Begin work from cf_wrspec4.
+ * 01/12/04 bjg Call to fits_create_tbl with nrow=1
+ * instead of npts
+ * 03/22/04 bjg Change POTHOLE to QUALITY
+ * 03/25/04 bjg Moved time stamp writing to beginning
+ * of routine
+ * 04/07/05 v1.1 tc Create a multi-rows table rather than
+ * a unique vector in a cell
+ *
+ ******************************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "calfuse.h"
+
+static char CF_PRGM_ID[] = "cf_wrspec7";
+static char CF_VER_NUM[] = "1.1";
+
+void cf_wrspec7(fitsfile *outfits, long npts, float *wave, float *flux,
+ float *error, long *counts, float *weights,float *bkgd,short *pothole)
+{
+ char *ttype[] = {"WAVE", "FLUX", "ERROR", "COUNTS", "WEIGHTS", "BKGD", "QUALITY" };
+ char *tform[] = {"1E", "1E", "1E", "1J", "1E", "1E", "1I"};
+ char *tunit[] = {"ANGSTROMS", "ERG/CM2/S/A", "ERG/CM2/S/A", "COUNTS", "COUNTS", "COUNTS", "UNITLESS"};
+ char extname[] = "FUSE 2D Spectrum";
+ int tfields = 7, status = 0;
+
+ /* Write time stamp to log file. */
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "");
+
+ fits_create_tbl(outfits, BINARY_TBL, 1, tfields, ttype, tform, tunit, extname, &status);
+
+ /* Write out the data. */
+ FITS_write_col(outfits, TFLOAT, 1, 1L, 1L, npts, wave, &status);
+ FITS_write_col(outfits, TFLOAT, 2, 1L, 1L, npts, flux, &status);
+ FITS_write_col(outfits, TFLOAT, 3, 1L, 1L, npts, error, &status );
+ FITS_write_col(outfits, TLONG, 4, 1L, 1L, npts, counts, &status);
+ FITS_write_col(outfits, TFLOAT, 5, 1L, 1L, npts, weights, &status);
+ FITS_write_col(outfits, TFLOAT, 6, 1L, 1L, npts, bkgd, &status);
+ FITS_write_col(outfits, TSHORT, 7, 1L, 1L, npts, pothole, &status);
+
+}
diff --git a/src/analysis/cf_wrspec_cf2.c b/src/analysis/cf_wrspec_cf2.c
new file mode 100644
index 0000000..883c3d5
--- /dev/null
+++ b/src/analysis/cf_wrspec_cf2.c
@@ -0,0 +1,120 @@
+/*******************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *******************************************************************************
+ *
+ * Synopsis: cf_wrspec_cf2(fitsfile *outfits, int npts, float *wave,
+ * float *spec, float *errs, short *qual,
+ * float *counts, float *cntserr, int ncol,
+ * int areaflag);
+ *
+ * Description: Write a file containing a FUSE 1D spectrum, in a format
+ * compatible with Calfuse 2.4 and earlier.
+ *
+ * Arguments: char *fname Output file name
+ * float *wave wavelengths
+ * float *spec spectrum
+ * float *errs associated 1-sigma error bars
+ * short *qual associated quality flags
+ * float *counts total counts in column
+ * float *cntserr 1-sigma error bar on total counts
+ * int ncol specifies 4 or 6 column format
+ * int areaflag 0 if spectrum column is FLUX
+ * 1 if spectrum column is AREA
+ *
+ * Returns: none
+ *
+ * History: 05/04/98 gak Begin work.
+ * 04/20/99 emm Added FITS_ error checking routines,
+ * converted qual flags to BYTE.
+ * 06/07/99 1.2 peb Added reporting of version number.
+ * 10/22/99 1.3 emm Added total counts column.
+ * 10/22/99 1.4 emm Added total counts errors column.
+ * 10/22/99 1.5 emm totcnts and errors are just duplicates
+ * of flux and error for now
+ * 10/29/99 1.6 emm counts and cntserr are now read in
+ * from calling program.
+ * 12/21/99 1.7 emm Quality flags now short (1I) instead
+ * of byte char (1B).
+ * 11/30/01 1.8 wvd Don't write timestamp to log file.
+ * 03/08/04 1.9 jwk allow tfields=4 or 6, and option to
+ * change "FLUX" col to "AREA"; for use
+ * with cf_arith
+ * 04/05/04 bjg Include string.h
+ * Write timestamp
+ *
+ ******************************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "calfuse.h"
+
+static char CF_PRGM_ID[] = "cf_wrspec_cf2";
+static char CF_VER_NUM[] = "1.9";
+
+void cf_wrspec_cf2(fitsfile *outfits, int npts, float *wave, float *spec,
+ float *errs, short *qual, float *counts, float *cntserr,
+ int ncol, int areaflag)
+{
+ char *ttype[] = {"WAVE", "FLUX", "ERROR", "QUALITY", "COUNTS","CNTSERR"};
+ char *tform[] = {"1E", "1E", "1E", "1I", "1E", "1E"};
+ char *tunit[] = {"ANGSTROMS", "ERG/CM2/S/A", "ERG/CM2/S/A", " ","COUNTS","COUNTS"};
+ char extname[] = "FUSE 1D Spectrum";
+ int tfields = 6,
+ status = 0;
+ long felem = 1,
+ frow = 1;
+
+/* Write time stamp to log file. */
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "");
+
+
+/* Create the extension for the data in the output file.
+ Columns will be
+ WAVE 1E
+ FLUX 1E
+ ERROR 1E
+ QUALITY 1B
+ TOTAL COUNTS 1E Same as FLUX column for now
+ COUNTS ERRORS 1E Same as ERROR column for now
+*/
+
+ if (ncol == 4)
+ {
+ tfields = 4;
+ if (areaflag)
+ {
+ strcpy(ttype[1], "AREA");
+ strcpy(tunit[1], "CM^2");
+ strcpy(tunit[2], "CM^2");
+ }
+ }
+
+ fits_create_tbl (outfits, BINARY_TBL, (long)npts, tfields, ttype,
+ tform, tunit, extname, &status);
+
+/* Write out the data. */
+ FITS_write_col(outfits, TFLOAT, 1, frow, felem, (long)npts,
+ wave, &status);
+
+ FITS_write_col(outfits, TFLOAT, 2, frow, felem, (long)npts,
+ spec, &status);
+
+ FITS_write_col(outfits, TFLOAT, 3, frow, felem, (long)npts,
+ errs, &status );
+
+ FITS_write_col(outfits, TSHORT, 4, frow, felem, (long)npts,
+ qual, &status);
+
+ if (tfields == 6)
+ {
+ FITS_write_col(outfits, TFLOAT, 5, frow, felem, (long)npts,
+ counts, &status);
+
+ FITS_write_col(outfits, TFLOAT, 6, frow, felem, (long)npts,
+ cntserr, &status);
+ }
+
+}
diff --git a/src/analysis/cf_xcorr.c b/src/analysis/cf_xcorr.c
new file mode 100644
index 0000000..383f281
--- /dev/null
+++ b/src/analysis/cf_xcorr.c
@@ -0,0 +1,303 @@
+/*******************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *******************************************************************************
+ *
+ * Usage: cf_xcorr exposure_list exp_shift_list
+ *
+ * Description: Determine pixel shifts between exposures. The
+ * reference spectrum is the one having the longest exposure
+ * time. The input list (ASCII) is the set of exposures to process,
+ * the output list (ASCII) has 3 columns: exposure name, shift and
+ * sigma_shift. Sigma_shift = -1 corresponds to non-detected shift.
+ * Sigma_shift = 1 indicates a valid shift value.
+ * The reference exposure always has shift and sigma_shift of 0.
+ *
+ * History: 04/07/05 tc v1.0 First release
+ * 04/15/05 tc v1.1 Use cf_read_col
+ * 04/27/05 wvd v1.2 Use variance arrays properly.
+ * Use QUALITY array to identify
+ * bad data.
+ * Change spec array to type INT.
+ * Use chi2, not reduced chi2,
+ * to set error bars.
+ * 05/20/05 wvd v1.3 For continuum spectra, use
+ * single region between 1045 and
+ * 1070 A. For emission-line
+ * targets, use O VI lines.
+ * 06/03/05 wvd v1.4 Delete unused variables.
+ * 07/21/05 wvd v1.5 Adopt the sign convention for
+ * spectral shifts used by
+ * FUSE_REGISTER.
+ * 08/01/05 wvd v1.6 Store EXPNIGHT of reference
+ * spectrum in ref_expnight.
+ * 09/13/05 wvd v1.7 If called with no arguments,
+ * return calling info, not error.
+ * 04/27/06 wvd v1.8 Scale each spectrum to match
+ * mean of reference spectrum.
+ * 05/16/06 wvd v1.9 Use Lyman beta to align
+ * background exposures.
+ * Use O VI and C II to align WD's.
+ * 03/28/08 wvd v1.10 Write value of NORM to output.
+ * For HIST data only: if XCORRR
+ * fails, but NORM > 0.5, then
+ * set shift and sigma to 0.
+ * 08/15/08 wvd v1.11 If EXP_STAT = 2, treat as
+ * background observation.
+ *
+ ******************************************************************************/
+
+#include <math.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "calfuse.h"
+
+/* Calfuse variables */
+static char CF_PRGM_ID[] = "cf_xcorr";
+static char CF_VER_NUM[] = "1.11";
+
+/* Parameters */
+#define MAXSHIFT 20
+#define N_SHIFT 41
+
+int main(int argc, char *argv[])
+{
+ /* Variables */
+ char *spec_lis, *out_name, src_type[FLEN_VALUE];
+ char spec_name[FLEN_FILENAME], ref_spec_name[FLEN_FILENAME];
+ char program[FLEN_VALUE];
+ char instmode[FLEN_CARD] ;
+ double *ref_flux, *ref_error, *flux, *error;
+ double scale, sum, variance, norm, ref_tot, total;
+ float chi_square[N_SHIFT], chi_square_min, chi_square_max;
+ float exptime, exptime_max;
+ float *wave, w0, wpc, wmin, wdelta;
+ int ly_beta=FALSE, exp_stat, objclass, shift, sigma;
+ int ind_chi2_min, N, N_tmp, nchi, n_spec, ind_ref_spec=0;
+ long expnight, ref_expnight, i, k, n_pix, ref_start, start;
+
+ FILE *pt_file, *pt_file_out;
+ fitsfile *in_fits;
+ int status = 0, hdutype = 0;
+
+ /***********************************
+ ** Enter a timestamp into the log **
+ ***********************************/
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+
+ /***********************************************************
+ ** Check for proper command-line usage and read arguments **
+ ***********************************************************/
+ if (argc != 3) {
+ printf("Usage: cf_xcorr exposure_list exp_shift_list\n");
+ return(0);
+ }
+
+ spec_lis = argv[1];
+ out_name = argv[2];
+
+ /********************************************
+ ** Open input list and create output file **
+ ********************************************/
+ if ((pt_file = fopen(spec_lis, "r")) == NULL)
+ {
+ cf_if_error("Unable to open file %s", spec_lis);
+ }
+ pt_file_out = fopen(out_name, "w");
+
+ /********************************************************************
+ ** Set the reference spectrum to the one which has maximum EXPTIME **
+ ********************************************************************/
+ n_spec = 0;
+ exptime_max = -1;
+
+ while (fscanf(pt_file, "%80s", spec_name) != EOF)
+ {
+ FITS_open_file(&in_fits, spec_name, READONLY, &status);
+ FITS_read_key(in_fits, TFLOAT, "EXPTIME", &exptime, NULL, &status);
+ FITS_read_key(in_fits, TLONG, "EXPNIGHT", &expnight, NULL, &status);
+ FITS_close_file(in_fits, &status);
+ if (exptime > exptime_max)
+ {
+ exptime_max = exptime;
+ ind_ref_spec = n_spec;
+ strcpy(ref_spec_name, spec_name);
+ }
+ n_spec++;
+ }
+
+ if (n_spec == 0) cf_if_error("At least one spectrum is required");
+
+ if (n_spec == 1)
+ {
+ fprintf(pt_file_out, "%s %2d %2d %5.0f %5ld %c%c%c 1.0\n", ref_spec_name, 0, 0,
+ exptime_max, expnight, ref_spec_name[8], ref_spec_name[9], ref_spec_name[10]);
+ fclose(pt_file_out);
+ return(0);
+ }
+ printf("n_spec: %d, max exptime: %g, ind_ref: %d, ref_name: %s\n",
+ n_spec, exptime_max, ind_ref_spec, ref_spec_name);
+
+ /* Read source type and set XCORR limits accordingly. */
+ FITS_open_file(&in_fits, ref_spec_name, READONLY, &status);
+ FITS_read_key(in_fits, TINT, "EXP_STAT", &exp_stat, NULL, &status);
+ FITS_read_key(in_fits, TSTRING, "PRGRM_ID", &program, NULL, &status);
+ FITS_read_key(in_fits, TINT, "OBJCLASS", &objclass, NULL, &status);
+ FITS_read_key(in_fits, TSTRING, "SRC_TYPE", &src_type, NULL, &status);
+ FITS_read_key(in_fits, TSTRING, "INSTMODE", instmode, NULL, &status) ;
+ FITS_read_key(in_fits, TFLOAT, "W0", &w0, NULL, &status);
+ FITS_read_key(in_fits, TFLOAT, "WPC", &wpc, NULL, &status);
+ if (src_type[1] == 'E') { /* Emission-line source */
+ /* Use Lyman beta to align background observations. */
+ if (exp_stat == (int) TEMPORAL_LIMB ||
+ objclass == 1 || objclass == 7 || objclass == 90) {
+ printf("Assuming background observation.\n");
+ wmin = 1024.;
+ wdelta = 6.;
+ ly_beta = TRUE;
+ } else { /* Use O VI emission for everything else. */
+ printf("SRC_TYPE = %s. Emission-line target.\n", src_type);
+ wmin = 1030.;
+ wdelta = 9.;
+ }
+ }
+ else if (objclass == 17 || objclass == 29 || objclass == 37) {
+ /* Use O VI and C II to align white dwarf spectra. */
+ printf("OBJCLASS = %d. Assuming nearby white dwarf.\n", objclass);
+ wmin = 1030.;
+ wdelta = 9.;
+ }
+ else { /* Use 1045-1070 A region for all other continuum sources. */
+ printf("SRC_TYPE = %s. Assuming continuum target.\n", src_type);
+ wmin = 1045.;
+ wdelta = 25.;
+ }
+ start = cf_nlong((wmin - w0) / wpc);
+ ref_start = start + MAXSHIFT;
+ n_pix = cf_nlong(wdelta / wpc) - (N_SHIFT - 1);
+
+ /* Read wave, flux, and error arrays from reference exposure. */
+ FITS_read_key(in_fits, TLONG, "EXPNIGHT" , &ref_expnight, NULL, &status);
+ FITS_movabs_hdu(in_fits, 2, &hdutype, &status);
+ if (hdutype != BINARY_TBL) cf_if_error("FITS files must contain BINARY TABLE in HDU #2");
+ N = cf_read_col(in_fits, TFLOAT, "WAVE", (void **) &wave);
+ N = cf_read_col(in_fits, TDOUBLE, "FLUX", (void **) &ref_flux);
+ N = cf_read_col(in_fits, TDOUBLE, "ERROR", (void **) &ref_error);
+ FITS_close_file(in_fits, &status);
+
+ /* Compute total flux of reference spectrum in region of interest. */
+ ref_tot = 0.;
+ for (i = 0; i < n_pix; i++) ref_tot += ref_flux[start+i];
+
+ /*****************************************************************
+ ** Compute the shift of each spectrum relative to the reference **
+ ******************************************************************/
+ n_spec = 0;
+ rewind(pt_file);
+
+ while (fscanf(pt_file, "%80s", spec_name) != EOF)
+ {
+ /* Do nothing if the current spectrum is the reference. */
+ if (n_spec++ == ind_ref_spec) {
+ fprintf(pt_file_out, "%s %3d %2d %5.0f %5ld %c%c%c 1.0\n",
+ ref_spec_name, 0, 0, exptime_max, ref_expnight,
+ ref_spec_name[8], ref_spec_name[9], ref_spec_name[10]);
+ continue;
+ }
+
+ /* Read the next spectrum */
+ FITS_open_file(&in_fits, spec_name, READONLY, &status);
+ FITS_read_key(in_fits, TFLOAT, "EXPTIME", &exptime, NULL, &status);
+ FITS_read_key(in_fits, TLONG, "EXPNIGHT", &expnight, NULL, &status);
+ FITS_movabs_hdu(in_fits, 2, &hdutype, &status);
+ if (hdutype != BINARY_TBL) cf_if_error("FITS files must contain BINARY TABLE in HDU #2");
+ N_tmp = cf_read_col(in_fits, TDOUBLE, "FLUX", (void **) &flux);
+ N_tmp = cf_read_col(in_fits, TDOUBLE, "ERROR", (void **) &error);
+ if (N_tmp != N) cf_if_error("Tables must have the same number of elements");
+ FITS_close_file(in_fits, &status);
+
+ /* If EXPTIME < 1, move on to the next data file. */
+ if (exptime < 1) {
+ fprintf(pt_file_out, "%s %3d %2d %5.0f %5ld %c%c%c 0.0\n",
+ spec_name, 0, -1, exptime, expnight,
+ spec_name[8], spec_name[9], spec_name[10]);
+ continue;
+ }
+
+ /* Compute total flux of data spectrum in region of interest. */
+ norm = 1.;
+ if (!ly_beta) { /* Don't rescale if aligning on airglow. */
+ total = 0.;
+ for (i = 0; i < n_pix; i++) total += flux[start+i];
+ norm = ref_tot / total;
+ }
+
+ /* Compute chi-squared for shifts between +/- MAXSHIFT pixels. */
+ for (k = 0; k < N_SHIFT; k++) {
+ nchi = 0;
+ sum = 0;
+ for (i = 0; i < n_pix; i++) {
+ variance = ref_error[ref_start + i] * ref_error[ref_start + i] +
+ norm * norm * error[start + i + k] * error[start + i + k];
+ if (variance > 0) {
+ sum += (ref_flux[ref_start + i] - norm * flux[start + i + k]) *
+ (ref_flux[ref_start + i] - norm * flux[start + i + k]) / variance;
+ nchi++;
+ }
+ }
+ scale = (double) nchi / n_pix;
+ chi_square[k] = sum / scale;
+ }
+
+ /* Compute min and max values of chi-squared. */
+ ind_chi2_min = 0;
+ chi_square_min = 1E5;
+ chi_square_max = -1E5;
+ for (k = 0; k < N_SHIFT; k++) {
+ if (chi_square[k] < chi_square_min)
+ {
+ chi_square_min = chi_square[k];
+ ind_chi2_min = k;
+ }
+ else if (chi_square[k] > chi_square_max)
+ chi_square_max = chi_square[k];
+ }
+ shift = MAXSHIFT - ind_chi2_min;
+
+ /* If chi-squared changes by less than 20% over range of shifts, bail out.
+ * Otherwise, return shift corresponding to lowest value of chi-square. */
+ if (chi_square_max / chi_square_min < 1.2)
+ sigma = -1;
+ else
+ sigma = 1;
+
+
+ /* If we're in HIST mode and sigma = -1 and NORM < 2,
+ * then set shift = sigma = 0. */
+ if (!(strncasecmp(instmode, "HIST", 4)) && sigma == -1 && norm < 2.0)
+ shift = sigma = 0;
+
+ /* printf ("shift = %d\tchi_square_max / chi_square_min = %g\n",
+ ind_chi2_min - MAXSHIFT, chi_square_max / chi_square_min); */
+
+ fprintf(pt_file_out, "%s %3d %2d %5.0f %5ld %c%c%c %f\n",
+ spec_name, shift, sigma, exptime, expnight,
+ spec_name[8], spec_name[9], spec_name[10], norm);
+
+ free(flux);
+ free(error);
+ }
+
+ free(wave);
+ free(ref_flux);
+ free(ref_error);
+
+ fclose(pt_file);
+ fclose(pt_file_out);
+
+ return(0);
+}
diff --git a/src/analysis/extract_jitter.c b/src/analysis/extract_jitter.c
new file mode 100644
index 0000000..a4ceb4d
--- /dev/null
+++ b/src/analysis/extract_jitter.c
@@ -0,0 +1,198 @@
+
+/*************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *************************************************************************
+ *
+ *
+ * Usage:
+ * extract_jitter [-h] [-v level] input_file
+ *
+ *
+ *
+ * Arguments:
+ * input_file : jitter file
+ *
+ *
+ *
+ *
+ *
+ *
+ * Options:
+ * -h: this help message
+ * -v: verbosity level (=1; 0 is silent)
+ *
+ *
+ *
+ *
+ * History: 11/04/2004 v1.0 bjg
+ * 06/03/2005 v1.1 wvd Fix bug that set expstart=expend.
+ * Delete unused variables.
+ *
+ ***************************************************************************/
+
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <time.h>
+#include <unistd.h>
+#include <math.h>
+
+#include "calfuse.h"
+
+
+static char CF_PRGM_ID[]= "extract_jitter";
+static char CF_VER_NUM[]= "1.0";
+
+
+int main(int argc,char *argv[]){
+
+
+
+ char input_filename[FLEN_CARD];
+ char output_filename_x[FLEN_CARD];
+ char output_filename_y[FLEN_CARD];
+
+ FILE * output_file_x;
+ FILE * output_file_y;
+
+ fitsfile * infits;
+
+
+
+ int intnull=0,anynull;
+ int status=0;
+ int hdutype=0;
+
+ long i, N;
+ int ncol;
+
+ double * hdu2_time;
+ double * hdu2_dx;
+ double * hdu2_dy;
+ int * hdu2_trkflg;
+
+
+
+ double mjd,dx,dy;
+
+ int trkflg;
+
+ double expstart, expend;
+
+ int optc;
+
+ char opts[] = "hfv:";
+ char usage[] =
+ "Usage:\n"
+ " extract_jitter [-h] [-v level] input_file\n\n"
+ "Arguments:\n"
+ " input_file : jitter file (FITS)\n\n";
+ char option[] =
+ "Options:\n"
+ " -h: this help message \n"
+ " -v: verbosity level (=1; 0 is silent) \n";
+
+ verbose_level = 1;
+
+
+ /* Check number of options and arguments */
+ while ((optc = getopt(argc, argv, opts)) != -1) {
+ switch(optc) {
+ case 'h':
+ printf("%s\n%s", usage, option);
+ return EXIT_SUCCESS;
+ case 'v':
+ verbose_level = atoi(optarg);
+ break;
+ }
+ }
+
+ /* Initialize error checking. */
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ if (argc != optind+1)
+ cf_if_error("%s\nIncorrect number of program arguments", usage);
+
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Started execution.");
+
+ strcpy(input_filename,argv[optind]);
+
+
+
+ strcpy(output_filename_x,input_filename);
+ strcpy(output_filename_y,input_filename);
+ strcat(output_filename_x,".jtx");
+ strcat(output_filename_y,".jty");
+
+
+ /* Create the output file */
+ output_file_x = fopen(output_filename_x,"w");
+ output_file_y = fopen(output_filename_y,"w");
+
+
+
+ FITS_open_file(&infits,input_filename,READONLY,&status);
+
+ FITS_read_key(infits,TDOUBLE,"EXPSTART",&expstart,NULL,&status);
+ FITS_read_key(infits,TDOUBLE,"EXPEND",&expend,NULL,&status);
+
+ FITS_movabs_hdu(infits,2,&hdutype,&status);
+
+ FITS_read_key(infits,TLONG,"NAXIS2",&N,NULL,&status);
+
+ hdu2_time=(double *)malloc(N*sizeof(double));
+ hdu2_dx=(double *)malloc(N*sizeof(double));
+ hdu2_dy=(double *)malloc(N*sizeof(double));
+ hdu2_trkflg=(int *)malloc(N*sizeof(int));
+
+ FITS_get_colnum(infits, TRUE, "TIME", &ncol, &status);
+ FITS_read_col(infits, TDOUBLE, ncol, 1, 1, N, &intnull,
+ hdu2_time, &anynull, &status);
+
+ FITS_get_colnum(infits, TRUE, "DX", &ncol, &status);
+ FITS_read_col(infits, TDOUBLE, ncol, 1, 1, N, &intnull,
+ hdu2_dx, &anynull, &status);
+
+ FITS_get_colnum(infits, TRUE, "DY", &ncol, &status);
+ FITS_read_col(infits, TDOUBLE, ncol, 1, 1, N, &intnull,
+ hdu2_dy, &anynull, &status);
+
+ FITS_get_colnum(infits, TRUE, "TRKFLG", &ncol, &status);
+ FITS_read_col(infits, TINT, ncol, 1, 1, N, &intnull,
+ hdu2_trkflg, &anynull, &status);
+
+
+ for (i=0;i<N-100;i++){
+ mjd=expstart+(hdu2_time[i])/(3600.0*24.0);
+ dx=hdu2_dx[i];
+ dy=hdu2_dy[i];
+ trkflg=hdu2_trkflg[i];
+
+ if ((mjd>=expstart) && (mjd<=expend) && (trkflg==5)){
+ fprintf(output_file_x,"%15lf %15lf\n",mjd,dx);
+ fprintf(output_file_y,"%15lf %15lf\n",mjd,dy);
+ }
+ }
+
+
+
+ free(hdu2_time);
+ free(hdu2_dx);
+ free(hdu2_dy);
+ free(hdu2_trkflg);
+
+
+
+ FITS_close_file(infits,&status);
+
+ fclose(output_file_x);
+ fclose(output_file_y);
+
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished execution.");
+ return EXIT_SUCCESS;
+
+}
diff --git a/src/analysis/get_shift.c b/src/analysis/get_shift.c
new file mode 100644
index 0000000..a4c2b70
--- /dev/null
+++ b/src/analysis/get_shift.c
@@ -0,0 +1,164 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: getshift spec1 spec2 w1 w2
+ *
+ * Description: Computes the wavelength shift between the spectra from two
+ * different exposures spec1 and spec2 using a cross-correlation
+ * in the wavelength window defined by w1 and w2
+ *
+ *
+ * History: 01/08/04 bjg 1.0 begin work
+ * 04/05/04 bjg 1.1 Return EXIT_SUCCESS
+ * Correct formats to match
+ * argument types in printf
+ * 08/26/05 wvd 1.2 If given no arguments, don't return error.
+ * Just print message and exit.
+ *
+ ****************************************************************************/
+
+#include <time.h>
+#include <math.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "calfuse.h"
+
+
+#define MAXSHIFT 25
+#define SMOOTH_PAR 4
+
+
+static char CF_PRGM_ID[] = "get_shift";
+static char CF_VER_NUM[] = "1.2";
+
+
+int wave_search(float *table, int i, int j, float elmt){
+
+ int k;
+
+ if (i>=j) return i;
+ if (elmt==table[i]) return i;
+ if (elmt==table[j]) return j;
+ k=(i+j)/2;
+ if (elmt==table[k]) return k;
+ if ((elmt-table[i])*(elmt-table[k])<0) return wave_search(table,i,k,elmt);
+ return wave_search(table,k+1,j,elmt);
+}
+
+int main(int argc, char *argv[])
+{
+
+ int status=0;
+ int hdutype=0;
+
+ long n,n1,n2,laux,i,j,k;
+
+ float *wave, *flux1, *flux2, *flux1s, *flux2s;
+
+ float w1,w2;
+
+ fitsfile *infits1, *infits2;
+
+ float correl[2*MAXSHIFT+1];
+
+
+ /* Enter a timestamp into the log. */
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ /* Initialize error checking */
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+
+ /* check command line */
+ if (argc != 5) {
+ printf("Usage: getshift spec1 spec2 w1 w2 \n");
+ return 1;
+ }
+
+
+ FITS_open_file(&infits1, argv[1], READONLY, &status);
+ FITS_open_file(&infits2, argv[2], READONLY, &status);
+
+ sscanf(argv[3],"%f",&w1);
+ sscanf(argv[4],"%f",&w2);
+
+
+ FITS_movabs_hdu(infits1, 2, &hdutype, &status);
+ FITS_movabs_hdu(infits2, 2, &hdutype, &status);
+
+
+ n=cf_read_col(infits1,TFLOAT,"WAVE",(void **) &wave);
+ n=cf_read_col(infits1,TFLOAT,"FLUX",(void **) &flux1);
+ n=cf_read_col(infits2,TFLOAT,"FLUX",(void **) &flux2);
+
+
+ flux1s=(float*)malloc(n*sizeof(float));
+ flux2s=(float*)malloc(n*sizeof(float));
+
+
+ for (i=0;i<n;i++){
+ flux1s[i]=0;
+ flux2s[i]=0;
+ k=0;
+ for (j=i-SMOOTH_PAR;j<=i+SMOOTH_PAR;j++){
+ if ((j>=0)&&(j<n)) {
+ flux1s[i]+=flux1[j];
+ flux2s[i]+=flux2[j];
+ k=k+1;
+ }
+ }
+ flux1s[i]/=k;
+ flux2s[i]/=k;
+
+
+ }
+
+
+
+ if ((w1-wave[0])*(w1-wave[n-1])>0)
+ cf_if_error("Wavelength parameters out of range\n");
+
+ if ((w2-wave[0])*(w2-wave[n-1])>0)
+ cf_if_error("Wavelength parameters out of range\n");
+
+ n1=wave_search(wave,0,n-1,w1);
+ n2=wave_search(wave,0,n-1,w2);
+
+
+ if (n1>n2) {
+ laux=n2;
+ n2=n1;
+ n1=laux;
+ }
+
+ if ((n1-MAXSHIFT<0)||(n2+MAXSHIFT>=n))
+ cf_if_error("Wavelength parameters too close to bounds\n");
+
+ k=0;
+
+ for (i=0;i<=2*MAXSHIFT;i++){
+ correl[i]=0;
+ for (j=n1;j<=n2;j++){
+ correl[i]=correl[i]+flux1s[j]*flux2s[j+i-MAXSHIFT];
+ }
+ if (correl[i]>correl[k]) k=i;
+ }
+
+
+
+ FITS_close_file(infits1, &status);
+ FITS_close_file(infits2, &status);
+
+ /* Enter a timestamp into the log. */
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+
+ printf("Shift is %ld steps.\n",k-MAXSHIFT);
+
+ return EXIT_SUCCESS;
+
+
+}
diff --git a/src/analysis/gethmjd.c b/src/analysis/gethmjd.c
new file mode 100644
index 0000000..dcb3cdb
--- /dev/null
+++ b/src/analysis/gethmjd.c
@@ -0,0 +1,98 @@
+
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ *
+ * From Modified Julian Day and RA,DEC of target,
+ * computes Heliocentic Modified Julian Day
+ *
+ * Uses slalib to compute the light time delay along the target direction.
+ *
+ *
+ * History: 10/06/04 bjg
+ *
+ ****************************************************************************/
+
+
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <time.h>
+#include <unistd.h>
+#include <math.h>
+
+#ifdef CFORTRAN
+#include "cfortran.h"
+
+PROTOCCALLSFSUB6(SLA_DJCL, sla_djcl, DOUBLE, PINT, PINT, PINT, PDOUBLE, \
+ PINT)
+#define slaDjcl(DJM, IY, IM, ID, FD, J) \
+ CCALLSFSUB6(SLA_DJCL, sla_djcl, DOUBLE, PINT, PINT, PINT, PDOUBLE, \
+ PINT, DJM, IY, IM, ID, FD, J)
+
+
+PROTOCCALLSFSUB6(SLA_CALYD, sla_calyd, INT, INT, INT, PINT, PINT, \
+ PINT)
+#define slaCalyd(IY, IM, ID, NY, ND, J) \
+ CCALLSFSUB6(SLA_CALYD, sla_calyd, INT, INT, INT, PINT, PINT, \
+ PINT, IY, IM, ID, NY, ND, J)
+
+PROTOCCALLSFSUB7(SLA_ECOR, sla_ecor, FLOAT, FLOAT, INT, INT, FLOAT, PFLOAT, \
+ PFLOAT)
+#define slaEcor(RM, DM, IY, ID, FD, RV, TL) \
+ CCALLSFSUB7(SLA_ECOR, sla_ecor, FLOAT, FLOAT, INT, INT, FLOAT, PFLOAT, \
+ PFLOAT, RM, DM, IY, ID, FD, RV, TL)
+
+#else
+#include "slalib.h"
+#include "slamac.h"
+#endif
+
+
+#include "calfuse.h"
+
+
+#define DEG2RAD (M_PI/180.0f)
+
+double gethmjd(double mjd, int ra_h, int ra_m, float ra_s, int dec_d, int dec_m, float dec_s){
+
+
+ int status;
+
+ int year, month, day;
+ int jyear, jday;
+ double frac;
+
+
+ float ra, dec;
+ float lt, v;
+
+ ra = ( ra_h + ra_m/60.0 + ra_s/3600.0 ) * 15.0 * DEG2RAD;
+ dec = ( dec_d + dec_m/60.0 + dec_s/3600.0 ) * DEG2RAD;
+
+
+#ifdef CFORTRAN
+ slaDjcl(mjd, year, month, day, frac, status);
+#else
+ slaDjcl(mjd, &year, &month, &day, &frac, &status);
+#endif
+
+#ifdef CFORTRAN
+ slaCalyd(year, month, day, jyear, jday, status);
+#else
+ slaCalyd(year, month, day, &jyear, &jday, &status);
+#endif
+
+#ifdef CFORTRAN
+ slaEcor(ra, dec, jyear, jday, (float) frac, v, lt);
+#else
+ slaEcor(ra, dec, jyear, jday, (float) frac, &v, &lt);
+#endif
+
+ return (double) (mjd+lt/(3600.0*24.0));
+
+}
diff --git a/src/analysis/idf_combine.c b/src/analysis/idf_combine.c
new file mode 100644
index 0000000..3f1a678
--- /dev/null
+++ b/src/analysis/idf_combine.c
@@ -0,0 +1,945 @@
+
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: idf_combine outfile file1 file2 file3 file4 file5 ...
+ *
+ * Description: Reads multiple contiguous idf files and concatenates them
+ * into a single file.
+ *
+ * History: 08/11/03 bjg Begin work from ttag_combine.c
+ * sort the input files in time order
+ * 08/12/03 bjg v1.0 First usable version
+ * 08/13/03 bjg Some minor changes
+ * 08/14/03 bjg Fixed some important keywords
+ * in the main HDU
+ * 08/20/03 bjg v1.1 Changed the way the binary tables
+ * are read, created and written
+ * (same as cf_ttag_init)
+ * 09/09/03 bjg v1.2 Fixed some keywords
+ * 10/29/03 bjg Changed the scaling format for
+ * output timeline to conform the
+ * new IDF formatting.
+ * 11/17/03 bjg v1.3 Now warns users if the Focal
+ * Plane Assembly has moved between
+ * exposures.
+ * 11/22/03 bjg Now prints the name of the
+ * included files in the main
+ * header.
+ * 12/10/03 bjg Updated NSPEC keyword and
+ * SPECxxx, WOFFLxxx, WOFFSxxx keywords
+ * Removed path in filenames written
+ * into header.
+ * 02/25/04 bjg Bug fix
+ * 03/25/04 bjg Added TZERO and TSCALE values for
+ * AIC and FEC countrates
+ * 04/05/04 bjg Remove unused variables
+ * Change formats to match arg types
+ * in printf
+ * Remove static keyword in struct key
+ * definition
+ * Add braces in TSCAL and TZERO
+ * definitions
+ * 06/08/04 bjg Changes to handle EXP_STAT keyword
+ * 08/13/04 bjg v1.4 Recalculates Y centroid on demand
+ * 10/06/04 bjg v1.5 Added option -b to store
+ * ORBITAL_VEL in a float
+ * 10/26/04 bjg v1.6 Cosmetic change
+ * 01/28/2005 bjg v1.7 Fixed crash within CFITSIO with
+ * with IDF files having empty tables
+ * 02/16/2005 wvd v1.8 Double TSCALE and TZERO
+ * for the AIC_CNT_RATE array.
+ * 03/22/2005 wvd v1.9 Read and write TIME_SUNRISE
+ * and TIME_SUNSET as shorts.
+ * 04/15/2005 tc v1.10 Update PLANTIME keyword
+ * 06/08/2005 tc v1.11 Comment out warning if FPA has
+ * shifted. Pipeline corrects for this.
+ * 09/19/2005 wvd v1.12 Don't even read FPA positions.
+ * 05/22/2006 wvd v1.13 Change most header keyword
+ * types from float to long.
+ * 06/22/2006 wvd v1.14 Add -z flag to force creation of
+ * an output file, even if empty.
+ * 11/10/2006 wvd v1.15 Add comment fields to WOFFS and
+ * WOFFL keywords.
+ * 08/27/2007 bot v1.16 Changed long for int l.138
+ * 07/25/2008 wvd v1.17 Set output EXP_STAT keyword to lowest
+ * non-negative value among input files.
+ * 08/22/2008 wvd v1.18 If -a flag is set, include files with
+ * positive values of EXP_STAT, but not
+ * those with negative values.
+ *
+ ****************************************************************************/
+
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <time.h>
+#include "calfuse.h"
+
+typedef char filename[FLEN_CARD];
+
+struct key {
+ char keyword[FLEN_KEYWORD];
+ float value;
+};
+
+static char CF_PRGM_ID[]= "idf_combine";
+static char CF_VER_NUM[]= "1.18";
+
+int main(int argc,char *argv[]){
+
+ char date[FLEN_CARD]={'\0'};
+ char rootname[FLEN_CARD];
+ char comment[FLEN_COMMENT];
+
+ int felem_hdu2,felem_hdu4,frow_hdu3;
+
+ char stime[FLEN_CARD],keyword[FLEN_CARD],card[FLEN_CARD];
+
+ char fmt_byte[FLEN_CARD],fmt_float[FLEN_CARD],fmt_short[FLEN_CARD];
+
+ char *corrected_filename;
+ char *string_pointer;
+ char string0[100], string1[100];
+
+ time_t vtime;
+
+ fitsfile *infits,*outfits;
+
+ filename *filelist;
+ double *expstartlist;
+ double *expendlist;
+ long *neventslist;
+ long *nrecordslist;
+ long *ngtislist;
+
+ double delta_t;
+
+ float zero=0.0;
+
+ filename tempstring;
+ double tempdouble;
+ long templong;
+ float tempfloat;
+ char tempchar;
+
+ double minexpstart;
+ int minindex;
+
+ int nfiles;
+
+ int intnull=0,anynull;
+ int ncol;
+
+ int status=0;
+ int hdutype=0;
+ int tref = 0;
+
+ int n2;
+
+ int exp_stat, exp_stat_out=99;
+
+ long nevents=0, nrecords=0, ngtis=0;
+ long n_real_events=0;
+
+ long i,j;
+
+ float *floatlist;
+ short *shortlist;
+ char *charlist;
+ double *doublelist;
+
+ float exptime=0, rawtime=0;
+ long neventscreened=0, neventscreenedpha=0, plantime=0, timehv=0;
+ long timescreened=0, timesaa=0, timelowlimbangle=0, timeburst=0,
+ timejitter=0,timenight=0;
+
+ /* float fpasx0, fpasx, fpalx0, fpalx, dfpasx, dfpalx ; */
+ /* int fpa_split = FALSE; */
+
+ int hdu2_tfields=14;
+
+ char hdu2_extname[]="TTAG DATA"; /* Name of this extension */
+
+ char *hdu2_ttype[]={"TIME", "XRAW", "YRAW", "PHA", "WEIGHT", "XFARF",
+ "YFARF", "X", "Y", "CHANNEL", "TIMEFLGS",
+ "LOC_FLGS", "LAMBDA", "ERGCM2" };
+
+ char *hdu2_tform[14]; /* We'll assign values when we know
+ the number of elements in the data set. */
+
+
+ char *hdu2_tunit[]={"SECONDS", "PIXELS", "PIXELS", "UNITLESS", "UNITLESS",
+ "PIXELS", "PIXELS", "PIXELS", "PIXELS", "UNITLESS",
+ "UNITLESS", "UNITLESS", "ANGSTROMS", "ERG CM^-2"};
+
+ struct key hdu2_tscal[] = {{"TSCAL6", 0.25}, {"TSCAL7", 0.1},
+ {"TSCAL8", 0.25}, {"TSCAL9", 0.1}};
+
+ struct key hdu2_tzero[] = {{"TZERO6", 8192.}, {"TZERO7", 0.},
+ {"TZERO8", 8192.}, {"TZERO9", 0.}};
+
+
+
+
+ int hdu3_tfields=2;
+
+ char hdu3_extname[]="GTI"; /* Name of this extension */
+
+ char *hdu3_ttype[]={"START", "STOP" };
+
+ char *hdu3_tform[2]={"1D", "1D" }; /* We'll assign values when we know
+ the number of elements in the data set. */
+
+
+ char *hdu3_tunit[]={"seconds", "seconds"};
+
+ struct key hdu4_tscal[16];
+ struct key hdu4_tzero[16];
+
+ char hdu4_extname[]="TIMELINE";
+ int hdu4_tfields=16; /* output table will have 16 columns */
+ char *hdu4_ttype[]={"TIME", "STATUS_FLAGS", "TIME_SUNRISE", "TIME_SUNSET",
+ "LIMB_ANGLE", "LONGITUDE", "LATITUDE", "ORBITAL_VEL",
+ "HIGH_VOLTAGE", "LIF_CNT_RATE", "SIC_CNT_RATE",
+ "FEC_CNT_RATE", "AIC_CNT_RATE", "BKGD_CNT_RATE",
+ "YCENT_LIF","YCENT_SIC"};
+
+ char *hdu4_tform[16]; /* we will define tform later, when the number
+ of photons is known */
+
+ char *hdu4_tunit[]={"seconds", "unitless", "seconds", "seconds", "degrees",
+ "degrees", "degrees", "km/s", "unitless", "counts/sec",
+ "counts/sec", "counts/sec", "counts/sec", "counts/sec",
+ "pixels","pixels" };
+
+
+ int ignore_exp_stat=0;
+ int do_ycent=0;
+ int big_vel=0;
+ int do_empty=FALSE, empty_output=FALSE;
+
+ float *x=NULL, *y=NULL, *weight=NULL;
+ unsigned char *channel=NULL, *timeflags=NULL, *locflags=NULL;
+
+ int optc;
+
+ char opts[] = "hacbv:z";
+ char usage[] =
+ "Usage:\n"
+ " idf_combine [-ahbcz] [-v level] output_idf_file input_idf_files\n";
+ char option[] =
+ "Options:\n"
+ " -h: this help message\n"
+ " -v: verbosity level (=1; 0 is silent)\n"
+ " -a: ignore EXP_STAT keyword \n"
+ " -c: recalculates Y centroids (use target events) \n"
+ " -b: store ORBITAL_VEL in a float \n"
+ " -z: if no good data, generate empty output file\n";
+
+ verbose_level = 1;
+
+ /* Check number of options and arguments */
+ while ((optc = getopt(argc, argv, opts)) != -1) {
+ switch(optc) {
+
+ case 'h':
+ printf("%s\n%s", usage, option);
+ return 0;
+ case 'a':
+ ignore_exp_stat=1;
+ break;
+ case 'v':
+ verbose_level = atoi(optarg);
+ break;
+ case 'c':
+ do_ycent=1;
+ break;
+ case 'b':
+ big_vel=1;
+ break;
+ case 'z':
+ do_empty=TRUE;
+ break;
+ }
+ }
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+ if (argc < optind+2) {
+ printf("%s", usage);
+ return 1;
+ }
+
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Started execution.");
+
+ /* get and display time */
+ vtime = time(NULL) ;
+ strcpy(stime,ctime(&vtime));
+
+
+ nfiles=argc-optind-1;
+
+ filelist = (filename *)cf_calloc(nfiles, sizeof(filename));
+ expstartlist = (double *)cf_calloc(nfiles, sizeof(double));
+ expendlist = (double *)cf_calloc(nfiles, sizeof(double));
+ neventslist = (long *)cf_calloc(nfiles, sizeof(long));
+ nrecordslist = (long *)cf_calloc(nfiles, sizeof(long));
+ ngtislist = (long *)cf_calloc(nfiles, sizeof(long));
+
+ if (!ignore_exp_stat)
+ cf_verbose(1,"Will include only files with EXP_STAT=0") ;
+ else
+ cf_verbose(1,"Will include only files with EXP_STAT >= 0") ;
+
+ cf_verbose(1,"GETTING INFORMATION ON INPUT FILES") ;
+
+ n2=0;
+
+ for (i=0; i<nfiles;i++) {
+
+ FITS_open_file(&infits,argv[optind+i+1],READONLY,&status);
+
+ FITS_read_key(infits,TINT,"EXP_STAT",&exp_stat,NULL,&status);
+
+ strcpy(filelist[n2],argv[optind+i+1]);
+ FITS_read_key(infits,TDOUBLE,"EXPSTART",&(expstartlist[n2]),NULL,&status);
+ FITS_read_key(infits,TDOUBLE,"EXPEND",&(expendlist[n2]),NULL,&status);
+
+ /* Set EXP_STAT to lowest non-negative value in input files. */
+ if (exp_stat_out > exp_stat && exp_stat >= 0) exp_stat_out = exp_stat;
+
+ /* Skip files with bad values of EXP_STAT. */
+ if (!ignore_exp_stat && exp_stat != 0) {
+ cf_if_warning("File %s rejected. EXP_STAT not equal to zero. Use -a flag to override.",
+ argv[optind+i+1]) ;
+ FITS_close_file(infits,&status);
+ continue;
+ }
+ /* Never include files with negative values of EXP_STAT. */
+ else if (exp_stat < 0) {
+ cf_if_warning("File %s rejected. EXP_STAT less than zero.", argv[optind+i+1]) ;
+ FITS_close_file(infits,&status);
+ continue;
+ }
+
+ FITS_read_key(infits,TFLOAT,"EXPTIME",&(tempfloat),NULL,&status);
+ exptime+=tempfloat;
+ FITS_read_key(infits,TLONG,"NEVENTS",&templong,NULL,&status);
+ n_real_events+=templong;
+ FITS_read_key(infits,TFLOAT,"RAWTIME",&(tempfloat),NULL,&status);
+ rawtime+=tempfloat;
+ FITS_read_key(infits,TLONG,"PLANTIME",&(templong),NULL,&status);
+ plantime+=tempfloat;
+
+ FITS_read_key(infits,TLONG,"NBADEVNT",&templong,NULL,&status);
+ neventscreened+=templong;
+ FITS_read_key(infits,TLONG,"NBADPHA",&templong,NULL,&status);
+ neventscreenedpha+=templong;
+
+ FITS_read_key(infits,TLONG,"EXP_BAD",&templong,NULL,&status);
+ timescreened+=templong;
+ FITS_read_key(infits,TLONG,"EXP_BRST",&templong,NULL,&status);
+ timeburst+=templong;
+ FITS_read_key(infits,TLONG,"EXP_HV",&templong,NULL,&status);
+ timehv+=templong;
+ FITS_read_key(infits,TLONG,"EXP_JITR",&templong,NULL,&status);
+ timejitter+=templong;
+ FITS_read_key(infits,TLONG,"EXP_LIM",&templong,NULL,&status);
+ timelowlimbangle+=templong;
+ FITS_read_key(infits,TLONG,"EXP_SAA",&templong,NULL,&status);
+ timesaa+=templong;
+ FITS_read_key(infits,TLONG,"EXPNIGHT",&templong,NULL,&status);
+ timenight+=templong;
+
+ FITS_movabs_hdu(infits,2,&hdutype,&status);
+ FITS_read_key(infits,TSTRING,"TFORM1",&tempstring,NULL,&status);
+ sscanf(tempstring,"%ld%c",&neventslist[n2],&tempchar);
+ nevents+=neventslist[n2];
+
+ FITS_movabs_hdu(infits,3,&hdutype,&status);
+ FITS_read_key(infits,TLONG,"NAXIS2",&(ngtislist[n2]),NULL,&status);
+ ngtis+=ngtislist[n2];
+
+ FITS_movabs_hdu(infits,4,&hdutype,&status);
+ FITS_read_key(infits,TSTRING,"TFORM1",&tempstring,NULL,&status);
+ sscanf(tempstring,"%ld%c",&nrecordslist[n2],&tempchar);
+ nrecords+=nrecordslist[n2];
+
+ FITS_close_file(infits,&status);
+
+ n2++;
+ }
+
+ nfiles=n2;
+
+ if (nfiles==0){
+ if (do_empty) {
+ cf_verbose(1,"No files to combine. Generating empty output file.");
+ do_ycent = FALSE;
+ empty_output = TRUE;
+ expendlist[0]=expstartlist[0];
+ nfiles = 1;
+ }
+ else {
+ cf_verbose(1,"No files to combine. Exiting.");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished execution.");
+ exit(0);
+ }
+ }
+
+ cf_verbose(1,"SORTING INPUT FILES IN TIME ORDER") ;
+
+ for (i=0; i<nfiles-1;i++) {
+ minexpstart=expstartlist[i];
+ minindex=i;
+ for (j=i+1; j<nfiles;j++) {
+ if (expstartlist[j]<minexpstart){
+ minexpstart=expstartlist[j];
+ minindex=j;
+ }
+ }
+
+ strcpy(tempstring,filelist[minindex]);
+ strcpy(filelist[minindex],filelist[i]);
+ strcpy(filelist[i],tempstring);
+
+ tempdouble=expstartlist[minindex];
+ expstartlist[minindex]=expstartlist[i];
+ expstartlist[i]=tempdouble;
+
+ tempdouble=expendlist[minindex];
+ expendlist[minindex]=expendlist[i];
+ expendlist[i]=tempdouble;
+
+ templong=neventslist[minindex];
+ neventslist[minindex]=neventslist[i];
+ neventslist[i]=templong;
+
+ templong=nrecordslist[minindex];
+ nrecordslist[minindex]=nrecordslist[i];
+ nrecordslist[i]=templong;
+
+ templong=ngtislist[minindex];
+ ngtislist[minindex]=ngtislist[i];
+ ngtislist[i]=templong;
+ }
+
+ cf_verbose(2,
+ "N: Filename ExpStart ExpEnd NEvents NGTIs NSeconds");
+
+ for (i=0; i<nfiles;i++) {
+ cf_verbose(2,"%ld: %s %7.1f %7.1f %4ld %2ld %5ld",i,filelist[i],
+ expstartlist[i],expendlist[i],neventslist[i],ngtislist[i],
+ nrecordslist[i]);
+
+ }
+
+ cf_verbose(1,"CREATING OUTPUT FILE");
+
+ FITS_open_file(&infits,filelist[0],READONLY,&status);
+ FITS_create_file(&outfits,argv[optind],&status);
+
+
+ cf_verbose(1,"WRITING MAIN HEADER");
+
+ FITS_copy_hdu(infits,outfits,0,&status);
+
+ FITS_read_key(infits,TSTRING,"ROOTNAME",rootname,NULL,&status);
+
+ rootname[8]='9';
+ rootname[9]='9';
+ rootname[10]='9';
+
+ FITS_update_key(outfits,TSTRING,"ROOTNAME",rootname,NULL,&status);
+
+ string_pointer=strrchr(argv[optind],'/');
+ if (string_pointer==NULL) corrected_filename=argv[optind];
+ else corrected_filename=&(string_pointer[1]);
+
+ FITS_update_key(outfits,TINT,"EXP_STAT",&exp_stat_out,NULL,&status);
+
+ FITS_update_key(outfits,TSTRING,"FILENAME",corrected_filename,NULL,&status);
+
+ FITS_update_key(outfits,TSTRING,"EXP_ID","999",NULL,&status);
+
+ fits_get_system_time(date, &tref, &status);
+
+ FITS_update_key(outfits,TSTRING,"DATE",date,NULL,&status);
+
+ FITS_update_key(outfits,TDOUBLE,"EXPEND",&expendlist[nfiles-1],NULL,&status);
+ FITS_update_key(outfits,TFLOAT,"EXPTIME",&exptime,NULL,&status);
+ FITS_update_key(outfits,TLONG,"NEVENTS",&n_real_events,NULL,&status);
+ FITS_update_key(outfits,TFLOAT,"RAWTIME",&rawtime,NULL,&status);
+ FITS_update_key(outfits,TLONG,"PLANTIME",&plantime,NULL,&status);
+ FITS_update_key(outfits,TLONG,"NBADEVNT",&neventscreened,NULL,&status);
+ FITS_update_key(outfits,TLONG,"NBADPHA",&neventscreenedpha,NULL,&status);
+ FITS_update_key(outfits,TLONG,"EXP_BAD",&(timescreened),NULL,&status);
+ FITS_update_key(outfits,TLONG,"EXP_BRST",&(timeburst),NULL,&status);
+ FITS_update_key(outfits,TLONG,"EXP_HV",&(timehv),NULL,&status);
+ FITS_update_key(outfits,TLONG,"EXP_JITR",&(timejitter),NULL,&status);
+ FITS_update_key(outfits,TLONG,"EXP_LIM",&(timelowlimbangle),NULL,&status);
+ FITS_update_key(outfits,TLONG,"EXP_SAA",&(timesaa),NULL,&status);
+ FITS_update_key(outfits,TLONG,"EXPNIGHT",&(timenight),NULL,&status);
+
+ if (do_ycent) {
+ strcpy(string0,"PERFORM");
+ FITS_update_key(outfits, TSTRING, "YCNT_COR", string0, NULL, &status);
+
+ for (i = 1; i < 8; i++) {
+ if (i == 4) continue;
+ sprintf(string1, "YQUAL%1ld", i);
+ strcpy(string0,"HIGH");
+ FITS_update_key(outfits, TSTRING, string1, string0, NULL, &status);
+ }
+ }
+
+ /* reset BPM_CAL */
+ fits_read_key(outfits,TSTRING,"BPM_CAL",string0,NULL,&status);
+ if (status!=0) {
+ status = 0;
+ }
+ else {
+ strcpy(string0,"");
+ FITS_update_key(outfits,TSTRING,"BPM_CAL",string0,NULL,&status);
+ }
+
+
+ if (empty_output) {
+ fits_write_history(outfits,"FILE CONTAINS NO DATA.",&status);
+ n2=0;
+ FITS_update_key(outfits,TINT,"NSPEC",&n2,NULL,&status);
+ }
+ else
+ FITS_update_key(outfits,TINT,"NSPEC",&nfiles,NULL,&status);
+
+ fits_write_history(outfits," COMBINED WITH IDF_COMBINE ",&status);
+
+ for (i=0;i<nfiles;i++){
+
+ string_pointer=strrchr(filelist[i],'/');
+ if (string_pointer==NULL) corrected_filename=filelist[i];
+ else corrected_filename=&(string_pointer[1]);
+
+
+ sprintf(keyword, "SPEC%.3ld", i+1);
+ FITS_update_key(outfits,TSTRING,keyword,corrected_filename,NULL,&status);
+ sprintf(keyword, "WOFFL%.3ld", i+1);
+ sprintf(comment, "[Angstroms] Shift applied to LiF spectrum");
+ FITS_update_key(outfits,TFLOAT,keyword,&zero,comment,&status);
+ sprintf(keyword, "WOFFS%.3ld", i+1);
+ sprintf(comment, "[Angstroms] Shift applied to SiC spectrum");
+ FITS_update_key(outfits,TFLOAT,keyword,&zero,comment,&status);
+ }
+
+ FITS_close_file(infits,&status);
+
+ cf_verbose(1,"PREPARING EVENTS LIST HDU");
+
+ /* Generate the tform array */
+ sprintf(fmt_byte, "%ldB", nevents);
+ sprintf(fmt_float, "%ldE", nevents);
+ sprintf(fmt_short, "%ldI", nevents);
+
+ hdu2_tform[0] = fmt_float;
+ hdu2_tform[1] = fmt_short;
+ hdu2_tform[2] = fmt_short;
+ hdu2_tform[3] = fmt_byte;
+ hdu2_tform[4] = fmt_float;
+ for (i=5; i<9; i++)
+ hdu2_tform[i] = fmt_short;
+ for ( ; i<12; i++)
+ hdu2_tform[i] = fmt_byte;
+ hdu2_tform[12] = fmt_float;
+ hdu2_tform[13] = fmt_float;
+
+
+ /* Append a new empty binary table to the output file */
+ FITS_create_tbl(outfits, BINARY_TBL, 1, hdu2_tfields, hdu2_ttype, hdu2_tform,
+ hdu2_tunit, hdu2_extname, &status);
+
+ /* Write TSCALE and TZERO entries to header */
+ for (i=0; i<4; i++) {
+ sprintf(keyword, "TUNIT%ld", i+6);
+ if (fits_read_keyword(outfits, keyword, card, NULL, &status))
+ cf_if_fits_error(status);
+ FITS_insert_key_flt(outfits, hdu2_tscal[i].keyword, hdu2_tscal[i].value,
+ -2, NULL, &status);
+ FITS_insert_key_flt(outfits, hdu2_tzero[i].keyword, hdu2_tzero[i].value,
+ -4, NULL, &status);
+ }
+
+
+
+ cf_verbose(1,"PREPARING GTIs LIST HDU");
+
+ /* Append a new empty binary table to the output file */
+ FITS_create_tbl(outfits, BINARY_TBL, ngtis, hdu3_tfields, hdu3_ttype, hdu3_tform,
+ hdu3_tunit, hdu3_extname, &status);
+
+
+ cf_verbose(1,"PREPARING TIMELINE HDU");
+
+ /* Generate the tform array */
+ sprintf(fmt_byte, "%ldB", nrecords);
+ sprintf(fmt_float, "%ldE", nrecords);
+ sprintf(fmt_short, "%ldI", nrecords);
+
+
+
+ hdu4_tform[0] = fmt_float;
+ hdu4_tform[1] = fmt_byte;
+
+ for (i=2; i<hdu4_tfields; i++) hdu4_tform[i] = fmt_short;
+
+ /* Set TSCALE and TZERO values */
+ /* Not all of these will be used; see below. */
+ for (i=2; i<hdu4_tfields; i++) {
+ sprintf(hdu4_tscal[i].keyword, "TSCAL%ld", i+1);
+ hdu4_tscal[i].value = 0.1;
+ sprintf(hdu4_tzero[i].keyword, "TZERO%ld", i+1);
+ hdu4_tzero[i].value = 0.;
+ }
+
+ /* Let's keep three significant figures for vorb. */
+ hdu4_tscal[7].value = 0.01;
+
+ /* FEC_CNT_RATE and AIC_CNT_RATE can get big, so we
+ use TZERO AND TSCALE to compress them. */
+ hdu4_tscal[11].value = 1;
+ hdu4_tscal[12].value = 2;
+ hdu4_tzero[11].value = 32768;
+ hdu4_tzero[12].value = 65536;
+
+ if (big_vel) hdu4_tform[7]=fmt_float;
+
+ /* Append a new empty binary table to the output file */
+ FITS_create_tbl(outfits, BINARY_TBL, 1, hdu4_tfields, hdu4_ttype, hdu4_tform,
+ hdu4_tunit, hdu4_extname, &status);
+
+
+ /* Write TSCALE and TZERO entries to header */
+ for (i=2; i<hdu4_tfields; i++) {
+
+ if ((i==7)&&(big_vel)) continue;
+
+ /* Omit TSCALE and TZERO for these six arrays. */
+ if (i == 2) continue; /* TIME_SUNRISE */
+ if (i == 3) continue; /* TIME_SUNSET */
+ if (i == 8) continue; /* HIGH_VOLTAGE */
+ if (i == 9) continue; /* LIF_CNT_RATE */
+ if (i == 10) continue; /* SIC_CNT_RATE */
+ if (i == 13) continue; /* BKGD_CNT_RATE */
+
+
+ sprintf(keyword, "TUNIT%ld", i+1);
+ if (fits_read_keyword(outfits, keyword, card, NULL, &status))
+ cf_if_fits_error(status);
+ FITS_insert_key_flt(outfits, hdu4_tscal[i].keyword, hdu4_tscal[i].value,
+ -1, NULL, &status);
+ FITS_insert_key_flt(outfits, hdu4_tzero[i].keyword, hdu4_tzero[i].value,
+ -5, NULL, &status);
+
+ }
+
+
+
+
+
+
+ felem_hdu2=1; frow_hdu3=1; felem_hdu4=1;
+
+
+ cf_verbose(1,"COMBINING HDU");
+
+ for (i=0;i<nfiles;i++){
+
+ cf_verbose(2,"PROCESSING FILE %ld EVENTS LIST",i);
+
+ delta_t=(expstartlist[i]-expstartlist[0])*3600*24;
+
+ FITS_open_file(&infits,filelist[i],READONLY,&status);
+
+ FITS_movabs_hdu(infits, 2, &hdutype, &status);
+ FITS_movabs_hdu(outfits, 2, &hdutype, &status);
+
+ if (neventslist[i]>0){
+ floatlist=(float *)malloc(neventslist[i]*sizeof(float));
+ shortlist=(short *)malloc(neventslist[i]*sizeof(short));
+ charlist=(char *)malloc(neventslist[i]*sizeof(char));
+
+ FITS_get_colnum(infits, TRUE, "TIME", &ncol, &status);
+ FITS_read_col(infits, TFLOAT, ncol, 1, 1, neventslist[i], &intnull,
+ floatlist, &anynull, &status);
+ for (j=0;j<neventslist[i];j++) floatlist[j]+=delta_t;
+ FITS_write_col(outfits, TFLOAT, 1, 1, felem_hdu2, neventslist[i], floatlist, &status);
+
+
+
+ FITS_get_colnum(infits, TRUE, "XRAW", &ncol, &status);
+ FITS_read_col(infits, TSHORT, ncol, 1, 1, neventslist[i], &intnull,
+ shortlist, &anynull, &status);
+ FITS_write_col(outfits, TSHORT, 2, 1, felem_hdu2, neventslist[i], shortlist, &status);
+
+
+
+ FITS_get_colnum(infits, TRUE, "YRAW", &ncol, &status);
+ FITS_read_col(infits, TSHORT, ncol, 1, 1, neventslist[i], &intnull,
+ shortlist, &anynull, &status);
+ FITS_write_col(outfits, TSHORT, 3, 1, felem_hdu2, neventslist[i], shortlist, &status);
+
+
+
+ FITS_get_colnum(infits, TRUE, "PHA", &ncol, &status);
+ FITS_read_col(infits, TBYTE, ncol, 1, 1, neventslist[i], &intnull,
+ charlist, &anynull, &status);
+ FITS_write_col(outfits, TBYTE, 4, 1, felem_hdu2, neventslist[i], charlist, &status);
+
+
+
+ FITS_get_colnum(infits, TRUE, "WEIGHT", &ncol, &status);
+ FITS_read_col(infits, TFLOAT, ncol, 1, 1, neventslist[i], &intnull,
+ floatlist, &anynull, &status);
+ FITS_write_col(outfits, TFLOAT, 5, 1, felem_hdu2, neventslist[i], floatlist, &status);
+
+
+
+ FITS_get_colnum(infits, TRUE, "XFARF", &ncol, &status);
+ FITS_read_col(infits, TFLOAT, ncol, 1, 1, neventslist[i], &intnull,
+ floatlist, &anynull, &status);
+ FITS_write_col(outfits, TFLOAT, 6, 1, felem_hdu2, neventslist[i], floatlist, &status);
+
+
+
+ FITS_get_colnum(infits, TRUE, "YFARF", &ncol, &status);
+ FITS_read_col(infits, TFLOAT, ncol, 1, 1, neventslist[i], &intnull,
+ floatlist, &anynull, &status);
+ FITS_write_col(outfits, TFLOAT, 7, 1, felem_hdu2, neventslist[i], floatlist, &status);
+
+
+
+ FITS_get_colnum(infits, TRUE, "X", &ncol, &status);
+ FITS_read_col(infits, TFLOAT, ncol, 1, 1, neventslist[i], &intnull,
+ floatlist, &anynull, &status);
+ FITS_write_col(outfits, TFLOAT, 8, 1, felem_hdu2, neventslist[i], floatlist, &status);
+
+
+
+ FITS_get_colnum(infits, TRUE, "Y", &ncol, &status);
+ FITS_read_col(infits, TFLOAT, ncol, 1, 1, neventslist[i], &intnull,
+ floatlist, &anynull, &status);
+ FITS_write_col(outfits, TFLOAT, 9, 1, felem_hdu2, neventslist[i], floatlist, &status);
+
+
+
+ FITS_get_colnum(infits, TRUE, "CHANNEL", &ncol, &status);
+ FITS_read_col(infits, TBYTE, ncol, 1, 1, neventslist[i], &intnull,
+ charlist, &anynull, &status);
+ FITS_write_col(outfits, TBYTE, 10, 1, felem_hdu2, neventslist[i], charlist, &status);
+
+
+
+ FITS_get_colnum(infits, TRUE, "TIMEFLGS", &ncol, &status);
+ FITS_read_col(infits, TBYTE, ncol, 1, 1, neventslist[i], &intnull,
+ charlist, &anynull, &status);
+ FITS_write_col(outfits, TBYTE, 11, 1, felem_hdu2, neventslist[i], charlist, &status);
+
+
+
+ FITS_get_colnum(infits, TRUE, "LOC_FLGS", &ncol, &status);
+ FITS_read_col(infits, TBYTE, ncol, 1, 1, neventslist[i], &intnull,
+ charlist, &anynull, &status);
+ FITS_write_col(outfits, TBYTE, 12, 1, felem_hdu2, neventslist[i], charlist, &status);
+
+
+
+ FITS_get_colnum(infits, TRUE, "LAMBDA", &ncol, &status);
+ FITS_read_col(infits, TFLOAT, ncol, 1, 1, neventslist[i], &intnull,
+ floatlist, &anynull, &status);
+ FITS_write_col(outfits, TFLOAT, 13, 1, felem_hdu2, neventslist[i], floatlist, &status);
+
+
+
+ FITS_get_colnum(infits, TRUE, "ERGCM2", &ncol, &status);
+ FITS_read_col(infits, TFLOAT, ncol, 1, 1, neventslist[i], &intnull,
+ floatlist, &anynull, &status);
+ FITS_write_col(outfits, TFLOAT, 14, 1, felem_hdu2, neventslist[i], floatlist, &status);
+
+
+ free(floatlist);
+ free(charlist);
+ free(shortlist);
+ }
+
+ cf_verbose(2,"PROCESSING FILE %ld GTIs LIST",i);
+
+ FITS_movabs_hdu(infits, 3, &hdutype, &status);
+ FITS_movabs_hdu(outfits, 3, &hdutype, &status);
+
+ if (ngtislist[i]>0){
+ doublelist=(double *)malloc(ngtislist[i]*sizeof(double));
+
+ FITS_get_colnum(infits, TRUE, "START", &ncol, &status);
+ FITS_read_col(infits, TDOUBLE, ncol, 1, 1, ngtislist[i], &intnull,
+ doublelist, &anynull, &status);
+ for (j=0;j<ngtislist[i];j++) doublelist[j]+=delta_t;
+ FITS_write_col(outfits, TDOUBLE, 1, frow_hdu3, 1, ngtislist[i], doublelist, &status);
+
+ FITS_get_colnum(infits, TRUE, "STOP", &ncol, &status);
+ FITS_read_col(infits, TDOUBLE, ncol, 1, 1, ngtislist[i], &intnull,
+ doublelist, &anynull, &status);
+ for (j=0;j<ngtislist[i];j++) doublelist[j]+=delta_t;
+ FITS_write_col(outfits, TDOUBLE, 2, frow_hdu3, 1, ngtislist[i], doublelist, &status);
+
+
+ free(doublelist);
+ }
+
+ cf_verbose(2,"PROCESSING FILE %ld TIMELINE",i);
+
+ FITS_movabs_hdu(infits, 4, &hdutype, &status);
+ FITS_movabs_hdu(outfits, 4, &hdutype, &status);
+
+ if (nrecordslist[i]>0){
+ floatlist=(float *)malloc(nrecordslist[i]*sizeof(float));
+ shortlist=(short *)malloc(nrecordslist[i]*sizeof(short));
+ charlist=(char *)malloc(nrecordslist[i]*sizeof(char));
+
+
+ FITS_get_colnum(infits, TRUE, "TIME", &ncol, &status);
+ FITS_read_col(infits, TFLOAT, ncol, 1, 1, nrecordslist[i], &intnull,
+ floatlist, &anynull, &status);
+ for (j=0;j<nrecordslist[i];j++) floatlist[j]+=delta_t;
+ FITS_write_col(outfits, TFLOAT, 1, 1, felem_hdu4, nrecordslist[i], floatlist, &status);
+
+ FITS_get_colnum(infits, TRUE, "STATUS_FLAGS", &ncol, &status);
+ FITS_read_col(infits, TBYTE, ncol, 1, 1, nrecordslist[i], &intnull,
+ charlist, &anynull, &status);
+ FITS_write_col(outfits, TBYTE, 2, 1, felem_hdu4, nrecordslist[i], charlist, &status);
+
+ FITS_get_colnum(infits, TRUE, "TIME_SUNRISE", &ncol, &status);
+ FITS_read_col(infits, TSHORT, ncol, 1, 1, nrecordslist[i], &intnull,
+ shortlist, &anynull, &status);
+ FITS_write_col(outfits, TSHORT, 3, 1, felem_hdu4, nrecordslist[i], shortlist, &status);
+
+ FITS_get_colnum(infits, TRUE, "TIME_SUNSET", &ncol, &status);
+ FITS_read_col(infits, TSHORT, ncol, 1, 1, nrecordslist[i], &intnull,
+ shortlist, &anynull, &status);
+ FITS_write_col(outfits, TSHORT, 4, 1, felem_hdu4, nrecordslist[i], shortlist, &status);
+
+ FITS_get_colnum(infits, TRUE, "LIMB_ANGLE", &ncol, &status);
+ FITS_read_col(infits, TFLOAT, ncol, 1, 1, nrecordslist[i], &intnull,
+ floatlist, &anynull, &status);
+ FITS_write_col(outfits, TFLOAT, 5, 1, felem_hdu4, nrecordslist[i], floatlist, &status);
+
+ FITS_get_colnum(infits, TRUE, "LONGITUDE", &ncol, &status);
+ FITS_read_col(infits, TFLOAT, ncol, 1, 1, nrecordslist[i], &intnull,
+ floatlist, &anynull, &status);
+ FITS_write_col(outfits, TFLOAT, 6, 1, felem_hdu4, nrecordslist[i], floatlist, &status);
+
+ FITS_get_colnum(infits, TRUE, "LATITUDE", &ncol, &status);
+ FITS_read_col(infits, TFLOAT, ncol, 1, 1, nrecordslist[i], &intnull,
+ floatlist, &anynull, &status);
+ FITS_write_col(outfits, TFLOAT, 7, 1, felem_hdu4, nrecordslist[i], floatlist, &status);
+
+ FITS_get_colnum(infits, TRUE, "ORBITAL_VEL", &ncol, &status);
+ FITS_read_col(infits, TFLOAT, ncol, 1, 1, nrecordslist[i], &intnull,
+ floatlist, &anynull, &status);
+ FITS_write_col(outfits, TFLOAT, 8, 1, felem_hdu4, nrecordslist[i], floatlist, &status);
+
+ FITS_get_colnum(infits, TRUE, "HIGH_VOLTAGE", &ncol, &status);
+ FITS_read_col(infits, TFLOAT, ncol, 1, 1, nrecordslist[i], &intnull,
+ floatlist, &anynull, &status);
+ FITS_write_col(outfits, TFLOAT, 9, 1, felem_hdu4, nrecordslist[i], floatlist, &status);
+
+ FITS_get_colnum(infits, TRUE, "LIF_CNT_RATE", &ncol, &status);
+ FITS_read_col(infits, TFLOAT, ncol, 1, 1, nrecordslist[i], &intnull,
+ floatlist, &anynull, &status);
+ FITS_write_col(outfits, TFLOAT, 10, 1, felem_hdu4, nrecordslist[i], floatlist, &status);
+
+ FITS_get_colnum(infits, TRUE, "SIC_CNT_RATE", &ncol, &status);
+ FITS_read_col(infits, TFLOAT, ncol, 1, 1, nrecordslist[i], &intnull,
+ floatlist, &anynull, &status);
+ FITS_write_col(outfits, TFLOAT, 11, 1, felem_hdu4, nrecordslist[i], floatlist, &status);
+
+ FITS_get_colnum(infits, TRUE, "FEC_CNT_RATE", &ncol, &status);
+ FITS_read_col(infits, TFLOAT, ncol, 1, 1, nrecordslist[i], &intnull,
+ floatlist, &anynull, &status);
+ FITS_write_col(outfits, TFLOAT, 12, 1, felem_hdu4, nrecordslist[i], floatlist, &status);
+
+ FITS_get_colnum(infits, TRUE, "AIC_CNT_RATE", &ncol, &status);
+ FITS_read_col(infits, TFLOAT, ncol, 1, 1, nrecordslist[i], &intnull,
+ floatlist, &anynull, &status);
+ FITS_write_col(outfits, TFLOAT, 13, 1, felem_hdu4, nrecordslist[i], floatlist, &status);
+
+ FITS_get_colnum(infits, TRUE, "BKGD_CNT_RATE", &ncol, &status);
+ FITS_read_col(infits, TFLOAT, ncol, 1, 1, nrecordslist[i], &intnull,
+ floatlist, &anynull, &status);
+ FITS_write_col(outfits, TFLOAT, 14, 1, felem_hdu4, nrecordslist[i], floatlist, &status);
+
+ FITS_get_colnum(infits, TRUE, "YCENT_LIF", &ncol, &status);
+ FITS_read_col(infits, TFLOAT, ncol, 1, 1, nrecordslist[i], &intnull,
+ floatlist, &anynull, &status);
+ FITS_write_col(outfits, TFLOAT, 15, 1, felem_hdu4, nrecordslist[i], floatlist, &status);
+
+ FITS_get_colnum(infits, TRUE, "YCENT_SIC", &ncol, &status);
+ FITS_read_col(infits, TFLOAT, ncol, 1, 1, nrecordslist[i], &intnull,
+ floatlist, &anynull, &status);
+ FITS_write_col(outfits, TFLOAT, 16, 1, felem_hdu4, nrecordslist[i], floatlist, &status);
+
+
+
+
+ free(floatlist);
+ free(charlist);
+ free(shortlist);
+ }
+
+
+ felem_hdu2+=neventslist[i];
+ frow_hdu3+=ngtislist[i];
+ felem_hdu4+=nrecordslist[i];
+ FITS_close_file(infits,&status);
+
+
+ }
+
+/*
+ if (fpa_split)
+ cf_if_warning("FPA motion detected. Resolution may be compromised.");
+*/
+
+ if (do_ycent){
+ FITS_movabs_hdu(outfits, 2, &hdutype, &status);
+ nevents = cf_read_col(outfits, TFLOAT, "X", (void **) &x);
+ nevents = cf_read_col(outfits, TFLOAT, "Y", (void **) &y);
+ nevents = cf_read_col(outfits, TFLOAT, "WEIGHT", (void **) &weight);
+ nevents = cf_read_col(outfits, TBYTE, "TIMEFLGS", (void **) &timeflags);
+ nevents = cf_read_col(outfits, TBYTE, "LOC_FLGS", (void **) &locflags);
+ nevents = cf_read_col(outfits, TBYTE, "CHANNEL", (void **) &channel);
+
+ FITS_movabs_hdu(outfits, 1, &hdutype, &status);
+
+ /* Compute centroids. */
+ cf_calculate_y_centroid(outfits, nevents, weight, x, y, channel,
+ timeflags, locflags);
+ }
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ cf_verbose(1,"CLOSING OUTPUT FILE");
+
+ FITS_close_file(outfits,&status);
+
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished execution.");
+ return EXIT_SUCCESS;
+
+}
+
+
diff --git a/src/analysis/idf_cut.c b/src/analysis/idf_cut.c
new file mode 100644
index 0000000..b302c60
--- /dev/null
+++ b/src/analysis/idf_cut.c
@@ -0,0 +1,977 @@
+
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Usage:
+ * idf_cut [-hm] [-v level] idf_file RefTime Period Nout
+ * Arguments:
+ * RefTime : Reference Time in seconds since EXPSTART
+ * Period : Period in seconds
+ * Nout : Number of output files.
+ * Options:
+ * -m : interprets RefTime as MJD
+ * -h : this help message
+ * -v : verbosity level (=1; 0 is silent)
+ *
+ * Description:
+ *
+ * Cuts the IDF file into several smaller IDF files, sorting the
+ * events according to their phase. The GTIs table and timeline get
+ * also cut.
+ * From the input IDF file, idf_cut generates Nout IDF files named
+ * {input_idf_filename}.p{X}.fit with X=0..Nout-1. An event in the
+ * input file is sorted in output file X if it happens in the interval
+ * [RefTime+(k+X/Nout)*Period,RefTime+(k+(X+1)/Nout)*Period[
+ * with k an integer.
+ *
+ * History: 10/08/04 bjg v1.0
+ * 10/26/04 bjg v1.1 Now updates the GTIs table
+ * Fixed EXPNIGHT computation
+ * Added -m switch.
+ * + some cosmetic changes
+ * 12/01/04 bjg v1.2 Free allocated memory in the
+ * subroutines
+ * 12/02/04 bjg v1.3 Fixed bug in make_gtitab
+ * 06/03/05 wvd v1.4 Change nevents and nseconds to longs.
+ * 01/18/06 wvd v1.5 Read arrays with cf_read_col.
+ *
+ ****************************************************************************/
+
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <time.h>
+#include <math.h>
+
+#include "calfuse.h"
+
+#define _MIN(a,b) (((a)<(b))?(a):(b))
+
+typedef char filename[FLEN_CARD];
+
+struct key {
+ char keyword[FLEN_KEYWORD];
+ float value;
+};
+
+static char CF_PRGM_ID[]= "idf_cut";
+static char CF_VER_NUM[]= "1.1";
+
+
+static int _isinphase(double t, double RefTime, double Period, double vinf, double vsup){
+
+ float v;
+
+ v=fmod(t-RefTime,Period);
+ if (v<0) v+=Period;
+
+ return ((v>=vinf)&&(v<vsup));
+}
+
+static double _getphasenextstart(double t, double RefTime, double Period, double vinf, double vsup){
+
+ float v;
+
+ v=fmod(t-RefTime,Period);
+ if (v<0) v+=Period;
+
+ if (v>vinf) return t-v+vinf+Period;
+ else return t-v+vinf;
+
+}
+static double _getphasenextstop(double t, double RefTime, double Period, double vinf, double vsup){
+
+ float v;
+
+ v=fmod(t-RefTime,Period);
+ if (v<0) v+=Period;
+
+ if (v>vsup) return t-v+vsup+Period;
+ else return t-v+vsup;
+}
+
+struct _gti{
+ double start;
+ double stop;
+ struct _gti *next;
+};
+
+typedef struct{
+ struct _gti * gtilist;
+ long N;
+} _tempgtis;
+
+static void _pushgti(double a, double b, _tempgtis * tempgtis){
+ struct _gti *aux;
+
+ aux=tempgtis->gtilist;
+
+ tempgtis->gtilist=malloc(sizeof(struct _gti));
+ tempgtis->N++;
+ tempgtis->gtilist->start=a;
+ tempgtis->gtilist->stop=b;
+ tempgtis->gtilist->next=aux;
+}
+
+static void _popgti(double * a, double * b, _tempgtis * tempgtis){
+ struct _gti *aux;
+
+ *a=tempgtis->gtilist->start;
+ *b=tempgtis->gtilist->stop;
+
+ aux=tempgtis->gtilist;
+ tempgtis->gtilist=tempgtis->gtilist->next;
+ free(aux);
+ tempgtis->N--;
+}
+
+static _tempgtis * _makegtis(){
+ _tempgtis * tempgtis;
+
+ tempgtis=malloc(sizeof(_tempgtis));
+ tempgtis->gtilist=NULL;
+ tempgtis->N=0;
+ return tempgtis;
+}
+
+static void _deletegtis(_tempgtis * tempgtis){
+ double a,b;
+ while (tempgtis->gtilist!=NULL) _popgti(&a,&b,tempgtis);
+ free(tempgtis);
+ tempgtis=NULL;
+}
+
+static long _ngtis(_tempgtis * tempgtis){
+ return tempgtis->N;
+}
+
+
+/****************************************************************************/
+
+long make_evlist(fitsfile *infits,fitsfile *outfits,
+ double RefTime,double Period, long Nout,
+ long phase,char * daynight,
+ long * nbadevnt,long * nbadpha){
+
+
+ int status=0;
+
+ char pha;
+ char loc_flgs;
+ char timeflgs;
+ char time_test;
+
+ char keyword[FLEN_CARD],card[FLEN_CARD];
+
+ char fmt_byte[FLEN_CARD],fmt_float[FLEN_CARD],fmt_short[FLEN_CARD];
+
+ int tfields=14;
+
+ char extname[]="TTAG DATA"; /* Name of this extension */
+
+ char *ttype[]={"TIME", "XRAW", "YRAW", "PHA", "WEIGHT", "XFARF",
+ "YFARF", "X", "Y", "CHANNEL", "TIMEFLGS",
+ "LOC_FLGS", "LAMBDA", "ERGCM2" };
+
+ char *tform[14]; /* We'll assign values when we know
+ the number of elements in the data set. */
+
+
+ char *tunit[]={"SECONDS", "PIXELS", "PIXELS", "UNITLESS", "UNITLESS",
+ "PIXELS", "PIXELS", "PIXELS", "PIXELS", "UNITLESS",
+ "UNITLESS", "UNITLESS", "ANGSTROMS", "ERG CM^-2"};
+
+ struct key tscal[] = {{"TSCAL6", 0.25}, {"TSCAL7", 0.1},
+ {"TSCAL8", 0.25}, {"TSCAL9", 0.1}};
+
+ struct key tzero[] = {{"TZERO6", 8192.}, {"TZERO7", 0.},
+ {"TZERO8", 8192.}, {"TZERO9", 0.}};
+
+ float *i_time;
+ short *i_xraw;
+ short *i_yraw;
+ char *i_pha;
+ float *i_weight;
+ float *i_xfarf;
+ float *i_yfarf;
+ float *i_x;
+ float *i_y;
+ char *i_channel;
+ char *i_timeflgs;
+ char *i_loc_flgs;
+ float *i_lambda;
+ float *i_ergcm2;
+
+
+ float *o_time;
+ short *o_xraw;
+ short *o_yraw;
+ char *o_pha;
+ float *o_weight;
+ float *o_xfarf;
+ float *o_yfarf;
+ float *o_x;
+ float *o_y;
+ char *o_channel;
+ char *o_timeflgs;
+ char *o_loc_flgs;
+ float *o_lambda;
+ float *o_ergcm2;
+
+ long npts;
+
+ long i;
+
+ float vinf,vsup;
+
+ long nevents=0;
+
+ *nbadevnt=0;
+ *nbadpha=0;
+
+
+ npts = cf_read_col(infits, TFLOAT, "TIME", (void **) &i_time);
+ npts = cf_read_col(infits, TSHORT, "XRAW", (void **) &i_xraw);
+ npts = cf_read_col(infits, TSHORT, "YRAW", (void **) &i_yraw);
+ npts = cf_read_col(infits, TBYTE, "PHA", (void **) &i_pha);
+ npts = cf_read_col(infits, TFLOAT, "WEIGHT", (void **) &i_weight);
+ npts = cf_read_col(infits, TFLOAT, "XFARF", (void **) &i_xfarf);
+ npts = cf_read_col(infits, TFLOAT, "YFARF", (void **) &i_yfarf);
+ npts = cf_read_col(infits, TFLOAT, "X", (void **) &i_x);
+ npts = cf_read_col(infits, TFLOAT, "Y", (void **) &i_y);
+ npts = cf_read_col(infits, TBYTE, "CHANNEL", (void **) &i_channel);
+ npts = cf_read_col(infits, TBYTE, "TIMEFLGS", (void **) &i_timeflgs);
+ npts = cf_read_col(infits, TBYTE, "LOC_FLGS", (void **) &i_loc_flgs);
+ npts = cf_read_col(infits, TFLOAT, "LAMBDA", (void **) &i_lambda);
+ npts = cf_read_col(infits, TFLOAT, "ERGCM2", (void **) &i_ergcm2);
+
+
+ o_time = (float *) malloc(npts*sizeof(float));
+ o_xraw = (short *) malloc(npts*sizeof(short));
+ o_yraw = (short *) malloc(npts*sizeof(short));
+ o_pha = (char *) malloc(npts*sizeof(char));
+ o_weight = (float *) malloc(npts*sizeof(float));
+ o_xfarf = (float *) malloc(npts*sizeof(float));
+ o_yfarf = (float *) malloc(npts*sizeof(float));
+ o_x = (float *) malloc(npts*sizeof(float));
+ o_y = (float *) malloc(npts*sizeof(float));
+ o_channel = (char *) malloc(npts*sizeof(char));
+ o_timeflgs = (char *) malloc(npts*sizeof(char));
+ o_loc_flgs = (char *) malloc(npts*sizeof(char));
+ o_lambda = (float *) malloc(npts*sizeof(float));
+ o_ergcm2 = (float *) malloc(npts*sizeof(float));
+
+ vinf=(phase*Period)/((float)Nout);
+ vsup=((phase+1)*Period)/((float)Nout);
+
+
+ for (i=0;i<npts;i++){
+
+ if (_isinphase(i_time[i], RefTime, Period, vinf, vsup)) {
+
+ o_time[nevents] = i_time[i];
+ o_xraw[nevents] = i_xraw[i];
+ o_yraw[nevents] = i_yraw[i];
+ o_pha[nevents] = i_pha[i];
+ o_weight[nevents] = i_weight[i];
+ o_xfarf[nevents] = i_xfarf[i];
+ o_yfarf[nevents] = i_yfarf[i];
+ o_x[nevents] = i_x[i];
+ o_y[nevents] = i_y[i];
+ o_channel[nevents] = i_channel[i];
+ o_timeflgs[nevents] = i_timeflgs[i];
+ o_loc_flgs[nevents] = i_loc_flgs[i];
+ o_lambda[nevents] = i_lambda[i];
+ o_ergcm2[nevents] = i_ergcm2[i];
+
+ pha=i_pha[i];
+ loc_flgs=i_loc_flgs[i];
+ timeflgs=i_timeflgs[i];
+
+ switch(daynight[0]) {
+ case 'D':
+ time_test=timeflgs^TEMPORAL_DAY;
+ break;
+ case 'N':
+ time_test=timeflgs;
+ break;
+ default:
+ time_test=timeflgs&(~TEMPORAL_DAY);
+ }
+
+ if (loc_flgs&LOCATION_PHA){
+ *nbadpha++;
+ }
+
+ if ((loc_flgs&~LOCATION_AIR) || (time_test)) {
+ *nbadevnt++;
+ }
+
+
+ nevents++;
+
+ }
+
+
+ }
+
+
+
+
+ /* Generate the tform array */
+ sprintf(fmt_byte, "%ldB", nevents);
+ sprintf(fmt_float, "%ldE", nevents);
+ sprintf(fmt_short, "%ldI", nevents);
+
+ tform[0] = fmt_float;
+ tform[1] = fmt_short;
+ tform[2] = fmt_short;
+ tform[3] = fmt_byte;
+ tform[4] = fmt_float;
+ for (i=5; i<9; i++)
+ tform[i] = fmt_short;
+ for ( ; i<12; i++)
+ tform[i] = fmt_byte;
+ tform[12] = fmt_float;
+ tform[13] = fmt_float;
+
+
+ /* Append a new empty binary table to the output file */
+ FITS_create_tbl(outfits, BINARY_TBL, 1, tfields, ttype, tform,
+ tunit, extname, &status);
+
+ /* Write TSCALE and TZERO entries to header */
+ for (i=0; i<4; i++) {
+ sprintf(keyword, "TUNIT%ld", i+6);
+ if (fits_read_keyword(outfits, keyword, card, NULL, &status))
+ cf_if_fits_error(status);
+ FITS_insert_key_flt(outfits, tscal[i].keyword, tscal[i].value,
+ -2, NULL, &status);
+ FITS_insert_key_flt(outfits, tzero[i].keyword, tzero[i].value,
+ -4, NULL, &status);
+ }
+
+ if (nevents > 0) {
+
+ FITS_write_col(outfits, TFLOAT, 1, 1, 1, nevents, o_time, &status);
+ FITS_write_col(outfits, TSHORT, 2, 1, 1, nevents, o_xraw, &status);
+ FITS_write_col(outfits, TSHORT, 3, 1, 1, nevents, o_yraw, &status);
+ FITS_write_col(outfits, TBYTE , 4, 1, 1, nevents, o_pha, &status);
+ FITS_write_col(outfits, TFLOAT, 5, 1, 1, nevents, o_weight, &status);
+ FITS_write_col(outfits, TFLOAT, 6, 1, 1, nevents, o_xfarf, &status);
+ FITS_write_col(outfits, TFLOAT, 7, 1, 1, nevents, o_yfarf, &status);
+ FITS_write_col(outfits, TFLOAT, 8, 1, 1, nevents, o_x, &status);
+ FITS_write_col(outfits, TFLOAT, 9, 1, 1, nevents, o_y, &status);
+ FITS_write_col(outfits, TBYTE , 10, 1, 1, nevents, o_channel, &status);
+ FITS_write_col(outfits, TBYTE , 11, 1, 1, nevents, o_timeflgs, &status);
+ FITS_write_col(outfits, TBYTE , 12, 1, 1, nevents, o_loc_flgs, &status);
+ FITS_write_col(outfits, TFLOAT, 13, 1, 1, nevents, o_lambda, &status);
+ FITS_write_col(outfits, TFLOAT, 14, 1, 1, nevents, o_ergcm2, &status);
+ }
+
+ free(o_time);
+ free(o_xraw );
+ free(o_yraw);
+ free(o_pha);
+ free(o_weight);
+ free(o_xfarf);
+ free(o_yfarf);
+ free(o_x);
+ free(o_y);
+ free(o_channel);
+ free(o_timeflgs);
+ free(o_loc_flgs);
+ free(o_lambda);
+ free(o_ergcm2);
+
+ free(i_time);
+ free(i_xraw );
+ free(i_yraw);
+ free(i_pha);
+ free(i_weight);
+ free(i_xfarf);
+ free(i_yfarf);
+ free(i_x);
+ free(i_y);
+ free(i_channel);
+ free(i_timeflgs);
+ free(i_loc_flgs);
+ free(i_lambda);
+ free(i_ergcm2);
+
+ return nevents;
+}
+
+/****************************************************************************/
+long make_gtitab(fitsfile * infits, fitsfile * outfits,
+ double RefTime, double Period, long Nout,
+ long phase){
+
+
+
+ int status=0;
+
+ int tfields=2;
+ char extname[]="GTI"; /* Name of this extension */
+ char *ttype[]={"START", "STOP" };
+ char *tform[2]={"1D", "1D" };
+ char *tunit[]={"seconds", "seconds"};
+
+ double *i_start;
+ double *i_stop;
+ double *o_start;
+ double *o_stop;
+
+ _tempgtis * tempgtis;
+
+ long npts=0;
+ long ngtis=0;
+ long i;
+
+ float vinf,vsup;
+
+ double a,b;
+ double _start, _stop;
+
+ npts = cf_read_col(infits, TDOUBLE, "START", (void **) &i_start);
+ npts = cf_read_col(infits, TDOUBLE, "STOP", (void **) &i_stop);
+
+ vinf=(phase*Period)/((float)Nout);
+ vsup=((phase+1)*Period)/((float)Nout);
+
+ tempgtis=_makegtis();
+ for (i=0;i<npts;i++){
+ cf_verbose(4,"Input GTI %ld = %lf/%lf",i,i_start[i],i_stop[i]);
+ a=i_start[i];
+ b=i_stop[i];
+ if (_isinphase(a,RefTime, Period, vinf, vsup)) _start=a;
+ else _start=_MIN(b,_getphasenextstart(a,RefTime, Period, vinf, vsup));
+
+ while (_start<b){
+ _stop=_MIN(b,_getphasenextstop(_start,RefTime, Period, vinf, vsup));
+ _pushgti(_start,_stop,tempgtis);
+ cf_verbose(4,"Output GTI = %lf,%lf",_start,_stop);
+ _start=_getphasenextstart(_stop,RefTime, Period, vinf, vsup);
+ }
+ }
+
+ ngtis=_ngtis(tempgtis);
+
+ o_start=(double *)malloc(ngtis*sizeof(double));
+ o_stop=(double *)malloc(ngtis*sizeof(double));
+
+ for (i=ngtis-1;i>=0;i--){
+ _popgti(&o_start[i],&o_stop[i],tempgtis);
+ }
+
+ _deletegtis(tempgtis);
+
+ /* Append a new empty binary table to the output file */
+ FITS_create_tbl(outfits, BINARY_TBL, ngtis, tfields, ttype, tform,
+ tunit, extname, &status);
+
+
+ if (ngtis>0){
+ FITS_write_col(outfits, TDOUBLE, 1, 1, 1, ngtis, o_start, &status);
+ FITS_write_col(outfits, TDOUBLE, 2, 1, 1, ngtis, o_stop, &status);
+ }
+
+ return ngtis;
+
+}
+/****************************************************************************/
+long make_timeline(fitsfile *infits, fitsfile *outfits,
+ double RefTime, double Period, long Nout, long phase,
+ char *daynight,
+ double *exptime, double *exp_bad, double *exp_brst, double *exp_hv,
+ double *exp_jitr, double *exp_lim, double *exp_saa, double *expnight){
+
+ char timeflgs;
+ char time_test;
+ int status=0;
+
+ int bigtime=1;
+ int big_vel=1;
+
+ char keyword[FLEN_CARD],card[FLEN_CARD];
+
+ char fmt_byte[FLEN_CARD],fmt_float[FLEN_CARD],fmt_short[FLEN_CARD];
+
+ struct key tscal[16];
+ struct key tzero[16];
+
+ char extname[]="TIMELINE";
+
+ int tfields=16; /* output table will have 16 columns */
+
+ char *ttype[]={"TIME", "STATUS_FLAGS", "TIME_SUNRISE", "TIME_SUNSET",
+ "LIMB_ANGLE", "LONGITUDE", "LATITUDE", "ORBITAL_VEL",
+ "HIGH_VOLTAGE", "LIF_CNT_RATE", "SIC_CNT_RATE",
+ "FEC_CNT_RATE", "AIC_CNT_RATE", "BKGD_CNT_RATE",
+ "YCENT_LIF","YCENT_SIC"};
+
+ char *tform[16]; /* we will define tform later, when the number
+ of photons is known */
+
+ char *tunit[]={"seconds", "unitless", "seconds", "seconds", "degrees",
+ "degrees", "degrees", "km/s", "unitless", "counts/sec",
+ "counts/sec", "counts/sec", "counts/sec", "counts/sec",
+ "pixels","pixels" };
+
+ float *i_time;
+ char *i_status_flags;
+ float *i_time_sunrise;
+ float *i_time_sunset;
+ float *i_limb_angle;
+ float *i_longitude;
+ float *i_latitude;
+ float *i_orbital_vel;
+ short *i_high_voltage;
+ short *i_lif_cnt_rate;
+ short *i_sic_cnt_rate;
+ short *i_fec_cnt_rate;
+ short *i_aic_cnt_rate;
+ short *i_bkgd_cnt_rate;
+ float *i_ycent_lif;
+ float *i_ycent_sic;
+
+ float *o_time;
+ char *o_status_flags;
+ float *o_time_sunrise;
+ float *o_time_sunset;
+ float *o_limb_angle;
+ float *o_longitude;
+ float *o_latitude;
+ float *o_orbital_vel;
+ short *o_high_voltage;
+ short *o_lif_cnt_rate;
+ short *o_sic_cnt_rate;
+ short *o_fec_cnt_rate;
+ short *o_aic_cnt_rate;
+ short *o_bkgd_cnt_rate;
+ float *o_ycent_lif;
+ float *o_ycent_sic;
+
+ long npts;
+
+ long i;
+
+ float vinf,vsup;
+
+ long nseconds=0;
+
+ *exptime=0;
+ *expnight=0;
+ *exp_bad=0;
+ *exp_brst=0;
+ *exp_hv=0;
+ *exp_jitr=0;
+ *exp_lim=0;
+ *exp_saa=0;
+ *expnight=0;
+
+
+
+ npts = cf_read_col(infits, TFLOAT, "TIME" , (void **) &i_time);
+ npts = cf_read_col(infits, TBYTE , "STATUS_FLAGS" , (void **) &i_status_flags);
+ npts = cf_read_col(infits, TFLOAT, "TIME_SUNRISE" , (void **) &i_time_sunrise);
+ npts = cf_read_col(infits, TFLOAT, "TIME_SUNSET" , (void **) &i_time_sunset);
+ npts = cf_read_col(infits, TFLOAT, "LIMB_ANGLE" , (void **) &i_limb_angle);
+ npts = cf_read_col(infits, TFLOAT, "LONGITUDE" , (void **) &i_longitude);
+ npts = cf_read_col(infits, TFLOAT, "LATITUDE" , (void **) &i_latitude);
+ npts = cf_read_col(infits, TFLOAT, "ORBITAL_VEL" , (void **) &i_orbital_vel);
+ npts = cf_read_col(infits, TSHORT, "HIGH_VOLTAGE" , (void **) &i_high_voltage);
+ npts = cf_read_col(infits, TSHORT, "LIF_CNT_RATE" , (void **) &i_lif_cnt_rate);
+ npts = cf_read_col(infits, TSHORT, "SIC_CNT_RATE" , (void **) &i_sic_cnt_rate);
+ npts = cf_read_col(infits, TSHORT, "FEC_CNT_RATE" , (void **) &i_fec_cnt_rate);
+ npts = cf_read_col(infits, TSHORT, "AIC_CNT_RATE" , (void **) &i_aic_cnt_rate);
+ npts = cf_read_col(infits, TSHORT, "BKGD_CNT_RATE" , (void **) &i_bkgd_cnt_rate);
+ npts = cf_read_col(infits, TFLOAT, "YCENT_LIF" , (void **) &i_ycent_lif);
+ npts = cf_read_col(infits, TFLOAT, "YCENT_SIC" , (void **) &i_ycent_sic);
+
+
+ o_time = (float *) malloc(npts*sizeof(float));
+ o_status_flags = (char *) malloc(npts*sizeof(char));
+ o_time_sunrise = (float *) malloc(npts*sizeof(float));
+ o_time_sunset = (float *) malloc(npts*sizeof(float));
+ o_limb_angle = (float *) malloc(npts*sizeof(float));
+ o_longitude = (float *) malloc(npts*sizeof(float));
+ o_latitude = (float *) malloc(npts*sizeof(float));
+ o_orbital_vel = (float *) malloc(npts*sizeof(float));
+ o_high_voltage = (short *) malloc(npts*sizeof(short));
+ o_lif_cnt_rate = (short *) malloc(npts*sizeof(short));
+ o_sic_cnt_rate = (short *) malloc(npts*sizeof(short));
+ o_fec_cnt_rate = (short *) malloc(npts*sizeof(short));
+ o_aic_cnt_rate = (short *) malloc(npts*sizeof(short));
+ o_bkgd_cnt_rate = (short *) malloc(npts*sizeof(short));
+ o_ycent_lif = (float *) malloc(npts*sizeof(float));
+ o_ycent_sic = (float *) malloc(npts*sizeof(float));
+
+
+ vinf=(phase*Period)/((float)Nout);
+ vsup=((phase+1)*Period)/((float)Nout);
+
+
+ for (i=0;i<npts;i++){
+
+ if (_isinphase(i_time[i], RefTime, Period, vinf, vsup)) {
+
+ o_time[nseconds] = i_time[i];
+ o_status_flags[nseconds] = i_status_flags[i];
+ o_time_sunrise[nseconds] = i_time_sunrise[i];
+ o_time_sunset[nseconds] = i_time_sunset[i];
+ o_limb_angle[nseconds] = i_limb_angle[i];
+ o_longitude[nseconds] = i_longitude[i];
+ o_latitude[nseconds] = i_latitude[i];
+ o_orbital_vel[nseconds] = i_orbital_vel[i];
+ o_high_voltage[nseconds] = i_high_voltage[i];
+ o_lif_cnt_rate[nseconds] = i_lif_cnt_rate[i];
+ o_sic_cnt_rate[nseconds] = i_sic_cnt_rate[i];
+ o_fec_cnt_rate[nseconds] = i_fec_cnt_rate[i];
+ o_aic_cnt_rate[nseconds] = i_aic_cnt_rate[i];
+ o_bkgd_cnt_rate[nseconds] = i_bkgd_cnt_rate[i];
+ o_ycent_lif[nseconds] = i_ycent_lif[i];
+ o_ycent_sic[nseconds] = i_ycent_sic[i];
+
+ timeflgs=i_status_flags[i];
+
+ switch(daynight[0]) {
+ case 'D':
+ time_test=timeflgs^TEMPORAL_DAY;
+ break;
+ case 'N':
+ time_test=timeflgs;
+ break;
+ default:
+ time_test=timeflgs&(~TEMPORAL_DAY);
+ }
+
+
+ if (time_test==0) {
+
+ *exptime+=1.0;
+
+ if (!(timeflgs & TEMPORAL_DAY))
+ *expnight+=1.0;
+
+ } else {
+
+ *exp_bad+=1.0;
+
+ if (timeflgs & TEMPORAL_BRST)
+ *exp_brst+=1.0;
+
+ if (timeflgs & TEMPORAL_HV)
+ *exp_hv=+1.0;
+
+ if (timeflgs & TEMPORAL_JITR)
+ *exp_jitr=+1.0;
+
+ if (timeflgs & TEMPORAL_LIMB)
+ *exp_lim=+1.0;
+
+ if (timeflgs & TEMPORAL_SAA)
+ *exp_saa=+1.0;
+
+ }
+
+ nseconds++;
+ }
+ }
+
+ /* Generate the tform array */
+ sprintf(fmt_byte, "%ldB", nseconds);
+ sprintf(fmt_float, "%ldE", nseconds);
+ sprintf(fmt_short, "%ldI", nseconds);
+
+
+ tform[0] = fmt_float;
+ tform[1] = fmt_byte;
+
+ for (i=2; i<tfields; i++) tform[i] = fmt_short;
+
+ /* Set TSCALE and TZERO values */
+ /* Not all of these will be used; see below. */
+ for (i=2; i<tfields; i++) {
+ sprintf(tscal[i].keyword, "TSCAL%ld", i+1);
+ tscal[i].value = 0.1;
+ sprintf(tzero[i].keyword, "TZERO%ld", i+1);
+ tzero[i].value = 0.;
+ }
+
+ /* Need TZEROn = 3000. for tsunrise and tsunset. */
+ tzero[2].value = tzero[3].value = 3000.;
+
+ /* Let's keep three significant figures for vorb. */
+ tscal[7].value = 0.01;
+
+ /* FEC_CNT_RATE and AIC_CNT_RATE can get big, so we
+ (essentially) store them as unsigned shorts. */
+ tscal[11].value = 1;
+ tscal[12].value = 1;
+ tzero[11].value = 32768;
+ tzero[12].value = 32768;
+
+
+ if (bigtime) {
+ tform[2]=tform[3]=fmt_float;
+ }
+
+ if (big_vel) tform[7]=fmt_float;
+
+ /* Append a new empty binary table to the output file */
+ FITS_create_tbl(outfits, BINARY_TBL, 1, tfields, ttype, tform,
+ tunit, extname, &status);
+
+
+
+ /* Write TSCALE and TZERO entries to header */
+ for (i=2; i<tfields; i++) {
+
+ /* If bigtime is TRUE, store tsunrise and tsunset as floats.*/
+ if ((i == 2 || i == 3) && bigtime) continue;
+
+ if ((i==7)&&(big_vel)) continue;
+
+ /* Omit TSCALE and TZERO for these four arrays. */
+ if (i == 8) continue; /* HIGH_VOLTAGE */
+ if (i == 9) continue; /* LIF_CNT_RATE */
+ if (i == 10) continue; /* SIC_CNT_RATE */
+ if (i == 13) continue; /* BKGD_CNT_RATE */
+
+
+ sprintf(keyword, "TUNIT%ld", i+1);
+ if (fits_read_keyword(outfits, keyword, card, NULL, &status))
+ cf_if_fits_error(status);
+ FITS_insert_key_flt(outfits, tscal[i].keyword, tscal[i].value,
+ -1, NULL, &status);
+ FITS_insert_key_flt(outfits, tzero[i].keyword, tzero[i].value,
+ -5, NULL, &status);
+ }
+
+ if (nseconds > 0) {
+
+ FITS_write_col(outfits, TFLOAT, 1, 1, 1, nseconds, o_time , &status);
+ FITS_write_col(outfits, TBYTE , 2, 1, 1, nseconds, o_status_flags , &status);
+ FITS_write_col(outfits, TFLOAT, 3, 1, 1, nseconds, o_time_sunrise , &status);
+ FITS_write_col(outfits, TFLOAT, 4, 1, 1, nseconds, o_time_sunset , &status);
+ FITS_write_col(outfits, TFLOAT, 5, 1, 1, nseconds, o_limb_angle , &status);
+ FITS_write_col(outfits, TFLOAT, 6, 1, 1, nseconds, o_longitude , &status);
+ FITS_write_col(outfits, TFLOAT, 7, 1, 1, nseconds, o_latitude , &status);
+ FITS_write_col(outfits, TFLOAT, 8, 1, 1, nseconds, o_orbital_vel , &status);
+ FITS_write_col(outfits, TSHORT, 9, 1, 1, nseconds, o_high_voltage , &status);
+ FITS_write_col(outfits, TSHORT, 10, 1, 1, nseconds, o_lif_cnt_rate , &status);
+ FITS_write_col(outfits, TSHORT, 11, 1, 1, nseconds, o_sic_cnt_rate , &status);
+ FITS_write_col(outfits, TSHORT, 12, 1, 1, nseconds, o_fec_cnt_rate , &status);
+ FITS_write_col(outfits, TSHORT, 13, 1, 1, nseconds, o_aic_cnt_rate , &status);
+ FITS_write_col(outfits, TSHORT, 14, 1, 1, nseconds, o_bkgd_cnt_rate , &status);
+ FITS_write_col(outfits, TFLOAT, 15, 1, 1, nseconds, o_ycent_lif , &status);
+ FITS_write_col(outfits, TFLOAT, 16, 1, 1, nseconds, o_ycent_sic , &status);
+
+ }
+
+ free(o_time);
+ free(o_status_flags);
+ free(o_time_sunrise);
+ free(o_time_sunset);
+ free(o_limb_angle);
+ free(o_longitude);
+ free(o_latitude);
+ free(o_orbital_vel);
+ free(o_high_voltage);
+ free(o_lif_cnt_rate);
+ free(o_sic_cnt_rate);
+ free(o_fec_cnt_rate);
+ free(o_aic_cnt_rate);
+ free(o_bkgd_cnt_rate);
+ free(o_ycent_lif);
+ free(o_ycent_sic);
+
+ free(i_time);
+ free(i_status_flags);
+ free(i_time_sunrise);
+ free(i_time_sunset);
+ free(i_limb_angle);
+ free(i_longitude);
+ free(i_latitude);
+ free(i_orbital_vel);
+ free(i_high_voltage);
+ free(i_lif_cnt_rate);
+ free(i_sic_cnt_rate);
+ free(i_fec_cnt_rate);
+ free(i_aic_cnt_rate);
+ free(i_bkgd_cnt_rate);
+ free(i_ycent_lif);
+ free(i_ycent_sic);
+
+ return nseconds;
+}
+/****************************************************************************/
+
+
+int main(int argc,char *argv[]){
+ time_t vtime;
+ char stime[FLEN_CARD];
+
+ fitsfile * infits;
+ fitsfile * outfits;
+
+ filename input_filename,output_filename, ifname;
+
+ char string0[FLEN_CARD], daynight[FLEN_CARD];
+
+
+
+ long nevents;
+ long nseconds;
+ long ngtis;
+
+ long nbadevnt;
+ long nbadpha;
+
+ double exptime;
+ double exp_bad;
+ double exp_brst;
+ double exp_hv;
+ double exp_jitr;
+ double exp_lim;
+ double exp_saa;
+ double expnight;
+
+ double RefTime;
+ double Period;
+ long Nout;
+
+ double expstart;
+
+ long i;
+
+ int optc;
+
+ char opts[] = "hmv:";
+ char usage[] =
+ "Usage:\n"
+ " idf_cut [-hm] [-v level] idf_file RefTime Period Nout\n";
+ char argument[] =
+ "Arguments:\n"
+ " RefTime : Reference Time in seconds since EXPSTART\n"
+ " Period : Period in seconds\n"
+ " Nout : Number of output files.\n";
+ char option[] =
+ "Options:\n"
+ " -m: interprets RefTime as MJD\n"
+ " -h: this help message\n"
+ " -v: verbosity level (=1; 0 is silent)\n";
+
+ int hdutype=0;
+ int status=0;
+ int rtime_mjd=0;
+ verbose_level = 1;
+
+ /* Check number of options and arguments */
+ while ((optc = getopt(argc, argv, opts)) != -1) {
+ switch(optc) {
+ case 'h':
+ printf("%s\n%s\n%s", usage, argument, option);
+ return 0;
+ case 'v':
+ verbose_level = atoi(optarg);
+ break;
+ case 'm':
+ rtime_mjd=1;
+ break;
+ }
+ }
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+ if (argc != optind+4) {
+ printf("%s", usage);
+ cf_if_error("Incorrect number of arguments");
+ }
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Started execution.");
+
+ /* get and display time */
+ vtime = time(NULL) ;
+ strcpy(stime,ctime(&vtime));
+
+ strcpy(input_filename,argv[optind]);
+
+ sscanf(argv[optind+1],"%lf",&RefTime);
+ sscanf(argv[optind+2],"%lf",&Period);
+ sscanf(argv[optind+3],"%ld",&Nout);
+
+ FITS_open_file(&infits,input_filename,READONLY,&status);
+ FITS_read_key(infits,TSTRING,"DAYNIGHT",daynight,NULL,&status);
+ FITS_read_key(infits,TSTRING,"FILENAME",ifname,NULL,&status);
+
+ if (rtime_mjd){
+ FITS_read_key(infits,TDOUBLE,"EXPSTART",&expstart,NULL,&status);
+ RefTime=(RefTime-expstart)*3600.0*24.0;
+ }
+
+ for (i=0;i<Nout;i++){
+ FITS_movabs_hdu(infits,1,&hdutype,&status);
+
+
+ strcpy(output_filename,ifname);
+ sprintf(string0,".p%ld.fit",i);
+ strcat(output_filename,string0);
+
+ FITS_create_file(&outfits,output_filename,&status);
+ FITS_copy_hdu(infits,outfits,0,&status);
+
+ FITS_update_key(outfits,TSTRING,"FILENAME",output_filename,NULL,&status);
+
+ cf_verbose(1,"Phase: %ld/%ld",i+1,Nout);
+
+ cf_verbose(2,"Creating Events List");
+ /* Create Events List */
+ FITS_movabs_hdu(infits,2,&hdutype,&status);
+ nevents=make_evlist(infits, outfits, RefTime, Period, Nout, i, daynight,
+ &nbadevnt, &nbadpha);
+ cf_verbose(2,"Number of Events: %ld",nevents);
+
+ cf_verbose(2,"Creating GTI table");
+ /* Create GTIs Table */
+ FITS_movabs_hdu(infits,3,&hdutype,&status);
+ ngtis=make_gtitab(infits, outfits, RefTime, Period, Nout, i);
+ cf_verbose(2,"Number of GTIs: %ld",ngtis);
+
+ cf_verbose(2,"Creating Timeline");
+ /* Create Timeline */
+ FITS_movabs_hdu(infits,4,&hdutype,&status);
+ nseconds=make_timeline(infits, outfits, RefTime, Period, Nout, i, daynight,
+ &exptime, &exp_bad, &exp_brst, &exp_hv, &exp_jitr,
+ &exp_lim, &exp_saa, &expnight);
+ cf_verbose(2,"Number of records in timeline: %ld",nseconds);
+
+
+ /* Update Main Header Keyword */
+ FITS_movabs_hdu(outfits,1,&hdutype,&status);
+
+
+ FITS_update_key(outfits,TDOUBLE ,"EXPTIME" ,&exptime ,NULL,&status);
+ FITS_update_key(outfits,TLONG ,"RAWTIME" ,&nseconds ,NULL,&status);
+ FITS_update_key(outfits,TLONG ,"NEVENTS" ,&nevents ,NULL,&status);
+ FITS_update_key(outfits,TLONG ,"NBADEVNT" ,&nbadevnt ,NULL,&status);
+ FITS_update_key(outfits,TLONG ,"NBADPHA" ,&nbadpha ,NULL,&status);
+ FITS_update_key(outfits,TDOUBLE ,"EXP_BAD" ,&exp_bad ,NULL,&status);
+ FITS_update_key(outfits,TDOUBLE ,"EXP_SAA" ,&exp_saa ,NULL,&status);
+ FITS_update_key(outfits,TDOUBLE ,"EXP_LIM" ,&exp_lim ,NULL,&status);
+ FITS_update_key(outfits,TDOUBLE ,"EXP_BRST" ,&exp_brst ,NULL,&status);
+ FITS_update_key(outfits,TDOUBLE ,"EXP_JITR" ,&exp_jitr ,NULL,&status);
+ FITS_update_key(outfits,TDOUBLE ,"EXPNIGHT" ,&expnight ,NULL,&status);
+
+ FITS_close_file(outfits,&status);
+ }
+ FITS_close_file(infits,&status);
+
+ return (status);
+}
diff --git a/src/analysis/idf_screen.c b/src/analysis/idf_screen.c
new file mode 100644
index 0000000..31aa022
--- /dev/null
+++ b/src/analysis/idf_screen.c
@@ -0,0 +1,339 @@
+
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: idf_screen infits outfits timeflag value
+ *
+ *
+ *
+ * History: 10/05/04 bjg 1.0 Begin work.
+ * 10/26/04 bjg 1.1 Updates important header
+ * keywords.
+ *
+ ****************************************************************************/
+
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <time.h>
+#include "calfuse.h"
+
+
+typedef char filename[FLEN_CARD];
+
+struct key {
+ char keyword[FLEN_KEYWORD];
+ float value;
+};
+
+static char CF_PRGM_ID[]= "idf_screen";
+static char CF_VER_NUM[]= "1.1";
+
+int main(int argc,char *argv[]){
+
+ char tempstring[FLEN_CARD];
+ char daynight[FLEN_CARD];
+ char * corrected_filename;
+ char * string_pointer;
+
+ char time_test;
+
+ int status=0;
+ int hdutype=0;
+
+ long i, npts;
+
+ char * tflags, * lflags;
+
+ fitsfile *infits , *outfits;
+
+ filename input_fname , output_fname;
+
+ char selstr1[FLEN_CARD];
+ char selstr2[FLEN_CARD];
+
+ char sel1;
+ int sel2;
+
+ long nbadevnt=0;
+ long nbadpha=0;
+
+ double exptime=0.0;
+ double exp_bad=0.0;
+ double exp_brst=0.0;
+ double exp_hv=0.0;
+ double exp_jitr=0.0;
+ double exp_lim=0.0;
+ double exp_saa=0.0;
+ double expnight=0.0;
+
+ int optc;
+
+ char opts[] = "hv:";
+ char usage[] =
+ "Usage:\n"
+ " idf_screen [-h] [-v level] input_idf_file output_idf_file \n"
+ " timeflag value\n";
+ char argument[] =
+ "Arguments :\n"
+ " timeflag : USER/JITR/OPUS/BRST/HV/SAA/LIMB/DAY \n"
+ " value : GOOD/BAD/EITHER \n";
+ char option[] =
+ "Options:\n"
+ " -h: this help message\n"
+ " -v: verbosity level (=1; 0 is silent)\n";
+
+ verbose_level = 1;
+
+ /* Check number of options and arguments */
+ while ((optc = getopt(argc, argv, opts)) != -1) {
+ switch(optc) {
+ case 'h':
+ printf("%s\n%s\n%s", usage, argument, option);
+ return 0;
+ case 'v':
+ verbose_level = atoi(optarg);
+ break;
+ }
+ }
+
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+ if (argc != optind+4) {
+ printf("%s", usage);
+ cf_if_error("Incorrect number of arguments");
+ }
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Started execution.");
+
+
+ strcpy(input_fname,argv[optind]);
+ strcpy(output_fname,argv[optind+1]);
+ strcpy(selstr1,argv[optind+2]);
+ strcpy(selstr2,argv[optind+3]);
+
+
+
+ if (!strcasecmp(selstr2,"GOOD")) {
+ sel2=0;
+ } else if (!strcasecmp(selstr2,"BAD")) {
+ sel2=1;
+ } else if (!strcasecmp(selstr2,"EITHER")) {
+ sel2=2;
+ } else {
+ printf("%s", usage);
+ cf_if_error("VALUE not recognized.");
+ }
+
+
+ if (!strcasecmp(selstr1,"USER")) {
+ sel1=TEMPORAL_USER;
+ } else if (!strcasecmp(selstr1,"JITR")) {
+ sel1=TEMPORAL_JITR;
+ } else if (!strcasecmp(selstr1,"OPUS")) {
+ sel1=TEMPORAL_OPUS;
+ } else if (!strcasecmp(selstr1,"BRST")) {
+ sel1=TEMPORAL_BRST;
+ } else if (!strcasecmp(selstr1,"HV")) {
+ sel1=TEMPORAL_HV;
+ } else if (!strcasecmp(selstr1,"SAA")) {
+ sel1=TEMPORAL_SAA;
+ } else if (!strcasecmp(selstr1,"LIMB")) {
+ sel1=TEMPORAL_LIMB;
+ } else if (!strcasecmp(selstr1,"DAY")) {
+ sel1=TEMPORAL_DAY;
+ } else {
+ printf("%s", usage);
+ cf_if_error("TIMEFLAG not recognized.");
+ }
+
+ cf_verbose(1,"Input Filename : %s",input_fname);
+ cf_verbose(1,"Output Filename : %s",output_fname);
+ cf_verbose(1,"FLAG : %s - %d",selstr1,sel1);
+ cf_verbose(1,"VALUE : %s - %d",selstr2,sel2);
+
+ if ((sel1>1)&&(sel2==0)){
+ cf_verbose(1,"Nothing to do.");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished execution.");
+ return EXIT_SUCCESS;
+ }
+
+ cf_verbose(1,"OPENING INPUT FILE");
+ FITS_open_file(&infits,input_fname,READONLY,&status);
+
+ cf_verbose(1,"CREATING OUTPUT FILE");
+ FITS_create_file(&outfits,output_fname,&status);
+ FITS_copy_hdu(infits,outfits,0,&status);
+
+ string_pointer=strrchr(output_fname,'/');
+ if (string_pointer==NULL) corrected_filename=output_fname;
+ else corrected_filename=&(string_pointer[1]);
+
+ FITS_update_key(outfits,TSTRING,"FILENAME",corrected_filename,NULL,&status);
+
+ strcpy(tempstring,"");
+
+ FITS_update_key(outfits,TSTRING,"BPM_CAL",tempstring,NULL,&status);
+
+ if (sel1 == 1) {
+ switch(sel2) {
+ case 0:
+ strcpy(daynight,"NIGHT");
+ break;
+ case 1:
+ strcpy(daynight,"DAY");
+ break;
+ case 2:
+ strcpy(daynight,"BOTH");
+ break;
+ }
+ FITS_update_key(outfits,TSTRING,"DAYNIGHT",daynight,NULL,&status);
+ } else {
+ FITS_read_key(infits,TSTRING,"DAYNIGHT",daynight,NULL,&status);
+ }
+
+
+ FITS_movabs_hdu(infits,2,&hdutype,&status);
+ FITS_create_hdu(outfits,&status);
+ FITS_copy_hdu(infits,outfits,0,&status);
+
+
+ npts = cf_read_col(outfits, TBYTE, "TIMEFLGS", (void **) &tflags);
+ npts = cf_read_col(outfits, TBYTE, "LOC_FLGS", (void **) &lflags);
+ for (i=0;i<npts;i++){
+ if (sel1>1){
+ if (sel2==1){
+ tflags[i]=(tflags[i])^sel1;
+ } else if (sel2==2){
+ tflags[i]=(tflags[i])&(~sel1);
+ }
+ }
+
+ switch(daynight[0]) {
+ case 'D':
+ time_test=tflags[i]^TEMPORAL_DAY;
+ break;
+ case 'N':
+ time_test=tflags[i];
+ break;
+ default:
+ time_test=tflags[i]&(~TEMPORAL_DAY);
+ }
+
+ if (lflags[i]&LOCATION_PHA){
+ nbadpha++;
+ }
+
+ if ((lflags[i]&~LOCATION_AIR) || (time_test)) {
+ nbadevnt++;
+ }
+ }
+
+ if ((sel1>1)&&(sel2>0)){
+ cf_write_col(outfits, TBYTE, "TIMEFLGS", (void *) tflags, npts);
+ }
+
+ free(tflags);
+ free(lflags);
+
+
+ FITS_movabs_hdu(infits,3,&hdutype,&status);
+ FITS_create_hdu(outfits,&status);
+ FITS_copy_hdu(infits,outfits,0,&status);
+
+
+ FITS_movabs_hdu(infits,4,&hdutype,&status);
+ FITS_create_hdu(outfits,&status);
+ FITS_copy_hdu(infits,outfits,0,&status);
+
+
+ npts = cf_read_col(outfits, TBYTE, "STATUS_FLAGS", (void **) &tflags);
+
+ for (i=0;i<npts;i++){
+ if (sel1>1){
+ if (sel2==1){
+ tflags[i]=(tflags[i])^sel1;
+ } else if (sel2==2){
+ tflags[i]=(tflags[i])&(~sel1);
+ }
+ }
+
+ switch(daynight[0]) {
+ case 'D':
+ time_test=tflags[i]^TEMPORAL_DAY;
+ break;
+ case 'N':
+ time_test=tflags[i];
+ break;
+ default:
+ time_test=tflags[i]&(~TEMPORAL_DAY);
+ }
+
+
+ if (time_test==0) {
+
+ exptime+=1.0;
+
+ if (!(tflags[i] & TEMPORAL_DAY))
+ expnight+=1.0;
+
+ } else {
+
+ exp_bad+=1.0;
+
+ if (tflags[i] & TEMPORAL_BRST)
+ exp_brst+=1.0;
+
+ if (tflags[i] & TEMPORAL_HV)
+ exp_hv=+1.0;
+
+ if (tflags[i] & TEMPORAL_JITR)
+ exp_jitr=+1.0;
+
+ if (tflags[i] & TEMPORAL_LIMB)
+ exp_lim=+1.0;
+
+ if (tflags[i] & TEMPORAL_SAA)
+ exp_saa=+1.0;
+ }
+
+ }
+
+ if ((sel1>1)&&(sel2>0)){
+ cf_write_col(outfits, TBYTE, "STATUS_FLAGS", (void *) tflags, npts);
+ }
+
+ free(tflags);
+
+ /* Update Main Header Keyword */
+ FITS_movabs_hdu(outfits,1,&hdutype,&status);
+
+ FITS_update_key(outfits,TDOUBLE ,"EXPTIME" ,&exptime ,NULL,&status);
+ FITS_update_key(outfits,TLONG ,"NBADEVNT" ,&nbadevnt ,NULL,&status);
+ FITS_update_key(outfits,TLONG ,"NBADPHA" ,&nbadpha ,NULL,&status);
+ FITS_update_key(outfits,TDOUBLE ,"EXP_BAD" ,&exp_bad ,NULL,&status);
+ FITS_update_key(outfits,TDOUBLE ,"EXP_SAA" ,&exp_saa ,NULL,&status);
+ FITS_update_key(outfits,TDOUBLE ,"EXP_LIM" ,&exp_lim ,NULL,&status);
+ FITS_update_key(outfits,TDOUBLE ,"EXP_BRST" ,&exp_brst ,NULL,&status);
+ FITS_update_key(outfits,TDOUBLE ,"EXP_JITR" ,&exp_jitr ,NULL,&status);
+ FITS_update_key(outfits,TDOUBLE ,"EXPNIGHT" ,&expnight ,NULL,&status);
+
+ cf_verbose(1,"CLOSING INPUT FILE");
+ FITS_close_file(infits,&status);
+
+ cf_verbose(1,"CLOSING OUTPUT FILE");
+ FITS_close_file(outfits,&status);
+
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished execution.");
+ return EXIT_SUCCESS;
+
+}
+
+
diff --git a/src/analysis/mjd2hjd.c b/src/analysis/mjd2hjd.c
new file mode 100644
index 0000000..e0ecd18
--- /dev/null
+++ b/src/analysis/mjd2hjd.c
@@ -0,0 +1,129 @@
+
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ *
+ *
+ * Usage:
+ * mjd2hjd [-h] [-v level] mjd ra_h ra_m ra_s dec_d dec_m dec_s
+ *
+ *
+ * Arguments:
+ * mjd : Modified Julian Day
+ * ra_h ra_m ra_s dec_d dec_m dec_s : RA and DEC of target : hh mm ss.s dd mm ss.s
+ *
+ *
+ * Options:
+ * -h: this help message
+ * -v: verbosity level (=1; 0 is silent)
+ *
+ *
+ *
+ *
+ *
+ * History: 10/06/04 bjg v1.0
+ * 10/26/04 bjg v1.1 Cosmetic change
+ *
+ ****************************************************************************/
+
+
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <time.h>
+#include <unistd.h>
+#include <math.h>
+
+#include "calfuse.h"
+
+
+
+#define SECONDS_PER_DAY (24.0*3600.0)
+
+static char CF_PRGM_ID[]= "mjd2hjd";
+static char CF_VER_NUM[]= "1.1";
+
+
+double gethmjd(double, int, int, float, int, int, float);
+
+int main(int argc,char *argv[]){
+
+ int optc;
+
+
+
+ double lighttime;
+ double jd, mjd, hjd, hmjd;
+
+ int rah,ram,decd,decm;
+ float ras,decs;
+
+
+ char opts[] = "hv:";
+ char usage[] =
+ "Usage:\n"
+ " mjd2hjd [-h] [-v level] mjd ra_h ra_m ra_s dec_d dec_m dec_s\n";
+ char argument[] =
+ "Arguments:\n"
+ " mjd : Modified Julian Day.\n"
+ " ra_h ra_m ra_s dec_d dec_m dec_s : RA and DEC of target.\n";
+ char option[] =
+ "Options:\n"
+ " -h: this help message\n"
+ " -v: verbosity level (=1; 0 is silent)\n";
+ verbose_level = 1;
+
+
+ /* Check number of options and arguments */
+ while ((optc = getopt(argc, argv, opts)) != -1) {
+ switch(optc) {
+
+ case 'h':
+ printf("%s\n%s\n%s", usage, argument, option);
+ return EXIT_SUCCESS;
+ case 'v':
+ verbose_level = atoi(optarg);
+ break;
+ }
+ }
+
+ /* Initialize error checking. */
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ if (argc != optind+7)
+ cf_if_error("%s\nIncorrect number of program arguments", usage);
+
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Started execution.");
+
+ sscanf(argv[optind],"%lf",&mjd);
+ sscanf(argv[optind+1],"%d",&rah);
+ sscanf(argv[optind+2],"%d",&ram);
+ sscanf(argv[optind+3],"%f",&ras);
+ sscanf(argv[optind+4],"%d",&decd);
+ sscanf(argv[optind+5],"%d",&decm);
+ sscanf(argv[optind+6],"%f",&decs);
+
+
+ hmjd=gethmjd(mjd,rah,ram,ras,decd,decs,decm);
+
+ jd = mjd + 2400000.5;
+ hjd = hmjd + 2400000.5;
+
+ lighttime=(hmjd-mjd)*SECONDS_PER_DAY;
+
+ cf_verbose(1,"Right Ascension of target: %d h %d m %f s",rah,ram,ras);
+ cf_verbose(1,"Declination of target: %d deg %d m %f s",decd,decm,decs);
+ cf_verbose(1,"jd= %lf",jd);
+ cf_verbose(1,"mjd= %lf",mjd);
+ cf_verbose(1,"hjd= %lf",hjd);
+ cf_verbose(1,"hmjd= %lf",hmjd);
+ cf_verbose(1,"heliocentric light time correction = %lf s",lighttime);
+ cf_verbose(1,"---positive when Earth is closer to target than Sun");
+ return EXIT_SUCCESS;
+
+}
+
diff --git a/src/analysis/modhead.c b/src/analysis/modhead.c
new file mode 100644
index 0000000..0ffc40b
--- /dev/null
+++ b/src/analysis/modhead.c
@@ -0,0 +1,114 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: modhead file.fit[ext] KEYWORD NEW_VALUE
+ *
+ * Description: Returns or modifies the value of a header keyword.
+ * If NEW_VALUE is not specified, current value of KEYWORD is
+ * returned. If KEYWORD is not found and NEW_VALUE is given,
+ * KEYWORD is added to header. If an extension beyond the
+ * primary HDU is requested, file name must be given in
+ * parentheses: "file.fit[3]" or an alternate construction
+ * used: file.fit+3 Note that the primary HDU is extension 0.
+ *
+ * History: 05/15/05 tc started work
+ * 08/30/05 wvd Allow multi-word strings.
+ *
+ ****************************************************************************/
+
+#include <string.h>
+#include <stdio.h>
+#include "fitsio.h"
+
+int main(int argc, char *argv[])
+{
+ fitsfile *fptr; /* FITS file pointer, defined in fitsio.h */
+ char card[FLEN_CARD], newcard[FLEN_CARD];
+ char oldvalue[FLEN_VALUE], comment[FLEN_COMMENT];
+ int status = 0; /* CFITSIO status value MUST be initialized to zero! */
+ int i, iomode, keytype;
+
+ if (argc == 3)
+ iomode = READONLY;
+ else if (argc >= 4)
+ iomode = READWRITE;
+ else if (argc < 3) {
+ printf("Usage: modhead filename[ext] keyword new_value\n");
+ printf("\n");
+ printf("Write or modify the value of a header keyword.\n");
+ printf("If 'newvalue' is not specified, then just print \n");
+ printf("the current value. \n");
+ printf("\n");
+ printf("Examples: \n");
+ printf(" modhead file.fits dec - list the DEC keyword \n");
+ printf(" modhead file.fits dec 30.0 - set DEC = 30.0 \n");
+ printf("\n");
+ printf(" modhead \"file.fits[2]\" OBSTIME - list OBSTIME from extention 2 \n");
+ printf(" modhead file.fits+2 OBSTIME - list OBSTIME from extention 2\n");
+ return(0);
+ }
+
+ if (!fits_open_file(&fptr, argv[1], iomode, &status))
+ {
+ if (fits_read_card(fptr,argv[2], card, &status))
+ {
+ printf("Keyword does not exist\n");
+ card[0] = '\0';
+ comment[0] = '\0';
+ status = 0; /* reset status after error */
+ }
+ else
+ printf("%s\n",card);
+
+ if (argc >= 4) /* write or overwrite the keyword */
+ {
+ /* check if this is a protected keyword that must not be changed */
+ if (*card && fits_get_keyclass(card) == TYP_STRUC_KEY)
+ {
+ printf("Protected keyword cannot be modified.\n");
+ }
+ else
+ {
+ /* get the comment string */
+ if (*card)fits_parse_value(card, oldvalue, comment, &status);
+
+ /* construct template for new keyword */
+ strcpy(newcard, argv[2]); /* copy keyword name */
+ strcat(newcard, " = "); /* '=' value delimiter */
+ if (argc == 4) strcat(newcard, argv[3]); /* new value */
+ else {
+ strcat(newcard, "'");
+ for (i = 3; i < argc-1; i++) {
+ strcat(newcard, argv[i]); /* new value */
+ strcat(newcard, " ");
+ }
+ strcat(newcard, argv[i]); /* new value */
+ strcat(newcard, "'");
+ }
+
+ if (*comment) {
+ strcat(newcard, " / "); /* comment delimiter */
+ strcat(newcard, comment); /* append the comment */
+ }
+
+ /* reformat the keyword string to conform to FITS rules */
+ fits_parse_template(newcard, card, &keytype, &status);
+
+ /* overwrite the keyword with the new value */
+ fits_update_card(fptr, argv[2], card, &status);
+
+ printf("Keyword has been changed to:\n");
+ printf("%s\n",card);
+ }
+ } /* if argc == 4 */
+ fits_close_file(fptr, &status);
+ } /* open_file */
+
+ /* if error occured, print out error message */
+ if (status) fits_report_error(stderr, status);
+ return(status);
+}
+
diff --git a/src/analysis/remove_target_orbital_motion.c b/src/analysis/remove_target_orbital_motion.c
new file mode 100644
index 0000000..d104b0d
--- /dev/null
+++ b/src/analysis/remove_target_orbital_motion.c
@@ -0,0 +1,503 @@
+
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ *
+ *
+ * Usage:
+ * remove_target_orbital_motion [-hb] [-v level]
+ * input_idf_file output_idf_file
+ * hjd0 period vrmax
+ * [ra_h ra_m ra_s dec_d dec_m dec_s]
+ *
+ * Arguments:
+ * mjd0 : Heliocentric or Geocentric
+ * Julian Day
+ * of closest approch on orbit.
+ * period : Period in seconds.
+ * vrmax : Maximum radial velocity in km/s
+ * ra_h ra_m ra_s dec_d dec_m dec_s : (Optional) RA and DEC of target.
+ * If present mjd0 is interpreted
+ * as Heliocentric.
+ *
+ * Options:
+ * -h: this help message
+ * -v: verbosity level (=1; 0 is silent)
+ * -b: update timeline doppler information (required for BPM)
+ *
+ *
+ * History: 12/01/03 bjg v1.0 Begin work.
+ * 12/02/03 bjg Changed calling
+ * parameters format.
+ * 12/04/03 bjg Number of elements in HDU2
+ * is now determined from HDU2
+ * header instead of HDU1
+ * header NEVENTS keyword
+ * 12/10/03 bjg Updated header.
+ * 04/05/04 bjg Remove unused variables
+ * 06/10/04 bjg Some code cleaning
+ * 10/07/04 bjg v1.1 Added heliocentric
+ * time correction (optional)
+ * Added timeline doppler
+ * correction information
+ * (optional) for cf_bad_pixels
+ * 10/26/04 bjg v1.2 Cosmetic change
+ *
+ ****************************************************************************/
+
+
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <time.h>
+#include <unistd.h>
+#include <math.h>
+
+#include "calfuse.h"
+
+
+
+
+#define LIGHT_SPEED 299792.458 /* speed of light in kilometers per second */
+#define SECONDS_PER_DAY (24.0*3600.0)
+
+static char CF_PRGM_ID[]= "remove_target_orbital_motion";
+static char CF_VER_NUM[]= "1.2";
+
+struct key {
+ char keyword[FLEN_KEYWORD];
+ float value;
+};
+
+
+double gethmjd(double, int, int, float, int, int, float);
+
+int main(int argc,char *argv[]){
+
+
+ char fmt_byte[FLEN_CARD],fmt_float[FLEN_CARD],fmt_short[FLEN_CARD];
+
+ fitsfile * infits;
+ fitsfile * outfits;
+
+ char input_filename[FLEN_CARD],output_filename[FLEN_CARD];
+ char * corrected_filename;
+ char * string_pointer;
+
+ int intnull=0,anynull;
+ int status=0;
+ int hdutype=0;
+ int ncol;
+ char tempstring[FLEN_CARD];
+ char tempchar;
+ char keyword[FLEN_CARD],card[FLEN_CARD];
+
+
+ struct key hdu4_tscal[16];
+ struct key hdu4_tzero[16];
+
+ char hdu4_extname[]="TIMELINE";
+ int hdu4_tfields=16; /* output table will have 16 columns */
+ char *hdu4_ttype[]={"TIME", "STATUS_FLAGS", "TIME_SUNRISE", "TIME_SUNSET",
+ "LIMB_ANGLE", "LONGITUDE", "LATITUDE", "ORBITAL_VEL",
+ "HIGH_VOLTAGE", "LIF_CNT_RATE", "SIC_CNT_RATE",
+ "FEC_CNT_RATE", "AIC_CNT_RATE", "BKGD_CNT_RATE",
+ "YCENT_LIF","YCENT_SIC"};
+
+ char *hdu4_tform[16]; /* we will define tform later, when the number
+ of photons is known */
+
+ char *hdu4_tunit[]={"seconds", "unitless", "seconds", "seconds", "degrees",
+ "degrees", "degrees", "km/s", "unitless", "counts/sec",
+ "counts/sec", "counts/sec", "counts/sec", "counts/sec",
+ "pixels","pixels" };
+
+
+ long nevents, nrecords;
+ long i;
+
+ float * floatlist;
+ short * shortlist;
+ char * charlist;
+
+ double * hdu4_time;
+ double * hdu4_orbvel;
+
+ double * hdu2_time;
+ double * hdu2_lambda;
+
+ double delta_t;
+ double period, vrmax, mjd0;
+ double expstart, mjd;
+
+ int rah,ram,decd,decm;
+ float ras,decs;
+
+ int optc;
+
+ char opts[] = "hbv:";
+
+ char usage[] =
+ "Usage:\n"
+ " remove_target_orbital_motion [-hb] [-v level] \n"
+ " input_idf_file output_idf_file\n"
+ " mjd0 period vrmax\n"
+ " [ra_h ra_m ra_s dec_d dec_m dec_s]\n";
+ char argument[] =
+ "Arguments:\n"
+ " mjd0 : (Geocentric or Heliocentric) Modified Julian Day\n"
+ " of closest approch on orbit.\n"
+ " period : Period in seconds.\n"
+ " vrmax : Maximum radial velocity in km/s\n"
+ " ra_h ra_m ra_s dec_d dec_m dec_s : Optional RA and DEC of target.\n"
+ " If present mjd0 is interpreted\n"
+ " as Heliocentric. \n";
+
+ char option[] =
+ "Options:\n"
+ " -h: this help message\n"
+ " -v: verbosity level (=1; 0 is silent)\n"
+ " -b: update timeline doppler information (required for BPM)\n";
+
+
+
+ int bigtime=1; /* How to store TSUNRISE and TSUNSET" */
+ int do_timeline=0;
+ int helio_corr=0;
+
+ verbose_level = 1;
+
+
+ /* Check number of options and arguments */
+ while ((optc = getopt(argc, argv, opts)) != -1) {
+ switch(optc) {
+ case 'h':
+ printf("%s\n%s\n%s", usage, argument, option);
+ return EXIT_SUCCESS;
+ case 'v':
+ verbose_level = atoi(optarg);
+ break;
+ case 'b':
+ do_timeline=1;
+ break;
+ }
+ }
+
+ /* Initialize error checking. */
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ if ((argc != optind+11)&&(argc != optind+5))
+ cf_if_error("%s\nIncorrect number of program arguments", usage);
+
+ if (argc==optind+11) helio_corr=1;
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Started execution.");
+
+ strcpy(input_filename,argv[optind]);
+ strcpy(output_filename,argv[optind+1]);
+
+ sscanf(argv[optind+2],"%lf",&mjd0);
+ sscanf(argv[optind+3],"%lf",&period);
+ sscanf(argv[optind+4],"%lf",&vrmax);
+
+ cf_verbose(1,"Target Orbital Motion Doppler Correction");
+ cf_verbose(1,"Processing file %s",input_filename);
+
+ if (helio_corr) {
+ sscanf(argv[optind+5],"%d",&rah);
+ sscanf(argv[optind+6],"%d",&ram);
+ sscanf(argv[optind+7],"%f",&ras);
+ sscanf(argv[optind+8],"%d",&decd);
+ sscanf(argv[optind+9],"%d",&decm);
+ sscanf(argv[optind+10],"%f",&decs);
+ cf_verbose(1,"Right Ascension of target: %d h %d m %f s",rah,ram,ras);
+ cf_verbose(1,"Declination of target: %d deg %d m %f s",decd,decm,decs);
+ cf_verbose(1,"Heliocentric Modified Julian Day of closest approch on orbit: %lf",mjd0);
+ } else {
+ cf_verbose(1,"Geocentric Modified Julian Day of closest approch on orbit: %lf",mjd0);
+ }
+
+ cf_verbose(1,"Period in seconds: %lf",period);
+ cf_verbose(1,"Maximum radial velocity in kilometers per second: %lf",vrmax);
+
+
+
+ FITS_open_file(&infits,input_filename,READONLY,&status);
+ FITS_read_key(infits,TDOUBLE,"EXPSTART",&(expstart),NULL,&status);
+
+ FITS_create_file(&outfits,output_filename,&status);
+ FITS_copy_hdu(infits,outfits,0,&status);
+
+ string_pointer=strrchr(output_filename,'/');
+ if (string_pointer==NULL) corrected_filename=output_filename;
+ else corrected_filename=&(string_pointer[1]);
+
+ FITS_update_key(outfits,TSTRING,"FILENAME",corrected_filename,NULL,&status);
+
+ strcpy(tempstring,"");
+
+ FITS_update_key(outfits,TSTRING,"BPM_CAL",tempstring,NULL,&status);
+
+
+
+ FITS_movabs_hdu(infits,2,&hdutype,&status);
+ FITS_read_key(infits,TSTRING,"TFORM1",tempstring,NULL,&status);
+ sscanf(tempstring,"%ld%c",&nevents,&tempchar);
+
+ FITS_create_hdu(outfits,&status);
+ FITS_copy_hdu(infits,outfits,0,&status);
+
+
+ hdu2_time=(double *)malloc(nevents*sizeof(double));
+ hdu2_lambda=(double *)malloc(nevents*sizeof(double));
+
+
+
+ FITS_get_colnum(infits, TRUE, "TIME", &ncol, &status);
+ FITS_read_col(infits, TDOUBLE, ncol, 1, 1, nevents, &intnull,
+ hdu2_time, &anynull, &status);
+
+ FITS_get_colnum(infits, TRUE, "LAMBDA", &ncol, &status);
+ FITS_read_col(infits, TDOUBLE, ncol, 1, 1, nevents, &intnull,
+ hdu2_lambda, &anynull, &status);
+
+
+
+
+ cf_verbose(1,"Geocentric Modified Julian Day of start of observation/exposure is: %f",expstart);
+ if (helio_corr) {
+ mjd=gethmjd(expstart,rah,ram,ras,decd,decm,decs);
+ cf_verbose(1,"Heliocentric Modified Julian Day of start of observation/exposure is: %f",mjd);
+ }
+
+ for (i=0;i<nevents;i++){
+
+ mjd=expstart+(hdu2_time[i])/SECONDS_PER_DAY;
+
+ if (helio_corr) mjd=gethmjd(mjd,rah,ram,ras,decd,decm,decs);
+
+ delta_t=(mjd-mjd0)*SECONDS_PER_DAY;
+
+ hdu2_lambda[i]=hdu2_lambda[i]*(1-(vrmax/LIGHT_SPEED)*sin(2*M_PI*delta_t/period));
+
+ }
+
+ FITS_get_colnum(outfits, TRUE, "LAMBDA", &ncol, &status);
+ FITS_write_col(outfits, TDOUBLE, ncol, 1, 1, nevents, hdu2_lambda, &status);
+
+
+ free(hdu2_time);
+ free(hdu2_lambda);
+
+
+ FITS_movabs_hdu(infits,3,&hdutype,&status);
+ FITS_create_hdu(outfits,&status);
+ FITS_copy_hdu(infits,outfits,0,&status);
+
+
+ FITS_movabs_hdu(infits,4,&hdutype,&status);
+
+ if (do_timeline) {
+
+ FITS_read_key(infits,TSTRING,"TFORM1",tempstring,NULL,&status);
+ sscanf(tempstring,"%ld%c",&nrecords,&tempchar);
+
+ /* Generate the tform array */
+ sprintf(fmt_byte, "%ldB", nrecords);
+ sprintf(fmt_float, "%ldE", nrecords);
+ sprintf(fmt_short, "%ldI", nrecords);
+
+
+
+ hdu4_tform[0] = fmt_float;
+ hdu4_tform[1] = fmt_byte;
+
+ for (i=2; i<hdu4_tfields; i++) hdu4_tform[i] = fmt_short;
+
+ /* Set TSCALE and TZERO values */
+ /* Not all of these will be used; see below. */
+ for (i=2; i<hdu4_tfields; i++) {
+ sprintf(hdu4_tscal[i].keyword, "TSCAL%ld", i+1);
+ hdu4_tscal[i].value = 0.1;
+ sprintf(hdu4_tzero[i].keyword, "TZERO%ld", i+1);
+ hdu4_tzero[i].value = 0.;
+ }
+
+ /* Need TZEROn = 3000. for tsunrise and tsunset. */
+ hdu4_tzero[2].value = hdu4_tzero[3].value = 3000.;
+
+ /* Let's keep three significant figures for vorb. */
+ hdu4_tscal[7].value = 0.01;
+
+ /* FEC_CNT_RATE and AIC_CNT_RATE can get big, so we
+ (essentially) store them as unsigned shorts. */
+ hdu4_tscal[11].value = 1;
+ hdu4_tscal[12].value = 1;
+ hdu4_tzero[11].value = 32768;
+ hdu4_tzero[12].value = 32768;
+
+
+ if (bigtime) {
+ hdu4_tform[2]=hdu4_tform[3]=fmt_float;
+ }
+
+ hdu4_tform[7]=fmt_float;
+
+ /* Append a new empty binary table to the output file */
+ FITS_create_tbl(outfits, BINARY_TBL, 1, hdu4_tfields, hdu4_ttype, hdu4_tform,
+ hdu4_tunit, hdu4_extname, &status);
+
+
+
+ /* Write TSCALE and TZERO entries to header */
+ for (i=2; i<hdu4_tfields; i++) {
+
+ /* If bigtime is TRUE, store tsunrise and tsunset as floats.*/
+ if ((i == 2 || i == 3) && bigtime) continue;
+
+ /* Omit TSCALE and TZERO for these four arrays. */
+ if (i == 8) continue; /* HIGH_VOLTAGE */
+ if (i == 9) continue; /* LIF_CNT_RATE */
+ if (i == 10) continue; /* SIC_CNT_RATE */
+ if (i == 13) continue; /* BKGD_CNT_RATE */
+
+
+ /* Store ORBITAL_VEL as float */
+ if (i == 7) continue;
+
+
+ sprintf(keyword, "TUNIT%ld", i+1);
+ if (fits_read_keyword(outfits, keyword, card, NULL, &status))
+ cf_if_fits_error(status);
+ FITS_insert_key_flt(outfits, hdu4_tscal[i].keyword, hdu4_tscal[i].value,
+ -1, NULL, &status);
+ FITS_insert_key_flt(outfits, hdu4_tzero[i].keyword, hdu4_tzero[i].value,
+ -5, NULL, &status);
+
+ }
+
+ floatlist=(float *)malloc(nrecords*sizeof(float));
+ shortlist=(short *)malloc(nrecords*sizeof(short));
+ charlist=(char *)malloc(nrecords*sizeof(char));
+ hdu4_time=(double *)malloc(nevents*sizeof(double));
+ hdu4_orbvel=(double *)malloc(nevents*sizeof(double));
+
+ FITS_get_colnum(infits, TRUE, "TIME", &ncol, &status);
+ FITS_read_col(infits, TDOUBLE, ncol, 1, 1, nrecords, &intnull,
+ hdu4_time, &anynull, &status);
+ FITS_write_col(outfits, TDOUBLE, 1, 1, 1, nrecords, hdu4_time, &status);
+
+ FITS_get_colnum(infits, TRUE, "STATUS_FLAGS", &ncol, &status);
+ FITS_read_col(infits, TBYTE, ncol, 1, 1, nrecords, &intnull,
+ charlist, &anynull, &status);
+ FITS_write_col(outfits, TBYTE, 2, 1, 1, nrecords, charlist, &status);
+
+ FITS_get_colnum(infits, TRUE, "TIME_SUNRISE", &ncol, &status);
+ FITS_read_col(infits, TFLOAT, ncol, 1, 1, nrecords, &intnull,
+ floatlist, &anynull, &status);
+ FITS_write_col(outfits, TFLOAT, 3, 1, 1, nrecords, floatlist, &status);
+
+ FITS_get_colnum(infits, TRUE, "TIME_SUNSET", &ncol, &status);
+ FITS_read_col(infits, TFLOAT, ncol, 1, 1, nrecords, &intnull,
+ floatlist, &anynull, &status);
+ FITS_write_col(outfits, TFLOAT, 4, 1, 1, nrecords, floatlist, &status);
+
+ FITS_get_colnum(infits, TRUE, "LIMB_ANGLE", &ncol, &status);
+ FITS_read_col(infits, TFLOAT, ncol, 1, 1, nrecords, &intnull,
+ floatlist, &anynull, &status);
+ FITS_write_col(outfits, TFLOAT, 5, 1, 1, nrecords, floatlist, &status);
+
+ FITS_get_colnum(infits, TRUE, "LONGITUDE", &ncol, &status);
+ FITS_read_col(infits, TFLOAT, ncol, 1, 1, nrecords, &intnull,
+ floatlist, &anynull, &status);
+ FITS_write_col(outfits, TFLOAT, 6, 1, 1, nrecords, floatlist, &status);
+
+ FITS_get_colnum(infits, TRUE, "LATITUDE", &ncol, &status);
+ FITS_read_col(infits, TFLOAT, ncol, 1, 1, nrecords, &intnull,
+ floatlist, &anynull, &status);
+ FITS_write_col(outfits, TFLOAT, 7, 1, 1, nrecords, floatlist, &status);
+
+ FITS_get_colnum(infits, TRUE, "ORBITAL_VEL", &ncol, &status);
+ FITS_read_col(infits, TDOUBLE, ncol, 1, 1, nrecords, &intnull,
+ hdu4_orbvel, &anynull, &status);
+
+ for (i=0;i<nrecords;i++){
+
+ mjd=expstart+(hdu4_time[i])/SECONDS_PER_DAY;
+
+ if (helio_corr) mjd=gethmjd(mjd,rah,ram,ras,decd,decm,decs);
+
+ delta_t=(mjd-mjd0)*SECONDS_PER_DAY;
+
+ hdu4_orbvel[i]=hdu4_orbvel[i]-vrmax*sin(2*M_PI*delta_t/period);
+
+ }
+
+
+ FITS_write_col(outfits, TDOUBLE, 8, 1, 1, nrecords, hdu4_orbvel, &status);
+
+ FITS_get_colnum(infits, TRUE, "HIGH_VOLTAGE", &ncol, &status);
+ FITS_read_col(infits, TFLOAT, ncol, 1, 1, nrecords, &intnull,
+ floatlist, &anynull, &status);
+ FITS_write_col(outfits, TFLOAT, 9, 1, 1, nrecords, floatlist, &status);
+
+ FITS_get_colnum(infits, TRUE, "LIF_CNT_RATE", &ncol, &status);
+ FITS_read_col(infits, TFLOAT, ncol, 1, 1, nrecords, &intnull,
+ floatlist, &anynull, &status);
+ FITS_write_col(outfits, TFLOAT, 10, 1, 1, nrecords, floatlist, &status);
+
+ FITS_get_colnum(infits, TRUE, "SIC_CNT_RATE", &ncol, &status);
+ FITS_read_col(infits, TFLOAT, ncol, 1, 1, nrecords, &intnull,
+ floatlist, &anynull, &status);
+ FITS_write_col(outfits, TFLOAT, 11, 1, 1, nrecords, floatlist, &status);
+
+ FITS_get_colnum(infits, TRUE, "FEC_CNT_RATE", &ncol, &status);
+ FITS_read_col(infits, TFLOAT, ncol, 1, 1, nrecords, &intnull,
+ floatlist, &anynull, &status);
+ FITS_write_col(outfits, TFLOAT, 12, 1, 1, nrecords, floatlist, &status);
+
+ FITS_get_colnum(infits, TRUE, "AIC_CNT_RATE", &ncol, &status);
+ FITS_read_col(infits, TFLOAT, ncol, 1, 1, nrecords, &intnull,
+ floatlist, &anynull, &status);
+ FITS_write_col(outfits, TFLOAT, 13, 1, 1, nrecords, floatlist, &status);
+
+ FITS_get_colnum(infits, TRUE, "BKGD_CNT_RATE", &ncol, &status);
+ FITS_read_col(infits, TFLOAT, ncol, 1, 1, nrecords, &intnull,
+ floatlist, &anynull, &status);
+ FITS_write_col(outfits, TFLOAT, 14, 1, 1, nrecords, floatlist, &status);
+
+ FITS_get_colnum(infits, TRUE, "YCENT_LIF", &ncol, &status);
+ FITS_read_col(infits, TFLOAT, ncol, 1, 1, nrecords, &intnull,
+ floatlist, &anynull, &status);
+ FITS_write_col(outfits, TFLOAT, 15, 1, 1, nrecords, floatlist, &status);
+
+ FITS_get_colnum(infits, TRUE, "YCENT_SIC", &ncol, &status);
+ FITS_read_col(infits, TFLOAT, ncol, 1, 1, nrecords, &intnull,
+ floatlist, &anynull, &status);
+ FITS_write_col(outfits, TFLOAT, 16, 1, 1, nrecords, floatlist, &status);
+
+
+ free(hdu4_time);
+ free(hdu4_orbvel);
+
+ free(floatlist);
+ free(charlist);
+ free(shortlist);
+
+ } else {
+ FITS_create_hdu(outfits,&status);
+ FITS_copy_hdu(infits,outfits,0,&status);
+ }
+
+ FITS_close_file(infits,&status);
+ FITS_close_file(outfits,&status);
+
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished execution.");
+ return EXIT_SUCCESS;
+
+}
+
diff --git a/src/analysis/ttag_combine.c b/src/analysis/ttag_combine.c
new file mode 100644
index 0000000..77da230
--- /dev/null
+++ b/src/analysis/ttag_combine.c
@@ -0,0 +1,520 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: ttag_combine outfile file1 file2 file3 file4 file5 ...
+ *
+ * Description: Reads multiple contiguous ttag files and concatenates them
+ * into a single file. For now, the input files should be
+ * listed in time order.
+ *
+ * History: 08/16/99 emurphy Begin work
+ * 08/27/99 emurphy Added comments. Good time intervals
+ * now match observing times.
+ * 10/09/99 emurphy exptime now sum of individual exptimes
+ * 08/20/01 v1.2 wvd Complain if FPA moves between exposures.
+ * Set MAXGTI = 2000.
+ * 10/01/01 v1.3 RDR Update all segment and active image counters
+ * DATE keyword now contains the date
+ * NEVENTS reflects total number of events in
+ * combined file
+ * EXP_ID defaults to 999 to signify combined
+ * data
+ * Print warning if FPA x position changes
+ * by more than 30 microns
+ * PLANTIME now reflects total planned exposure
+ * Will transfer DX, DY and DNFLG columns
+ * if available
+ * 10/09/01 v1.4 wvd Delete redundant check for FPA splits.
+ * Program complains if input files not in
+ * time order.
+ * 01/15/02 v1.5 wvd Update keyword EXPNIGHT.
+ * 02/13/02 v1.6 wvd Respond gracefully if EXPNIGHT does not exist.
+ * 02/20/02 wvd Update keyword RAWTIME, if it exists.
+ * 04/26/02 v1.7 wvd Change vtime to type time_t
+ * 12/11/02 v1.8 wvd Change EXPNIGHT to type long
+ * 02/20/03 v1.9 wvd Correct errors in pointer use.
+ * Change abs() to fabs().
+ * 03/22/04 v1.10 bjg Change cf_fpa_pos() to cf_read_fpa_pos()
+ * 04/05/04 v1.11 bjg Include math.h
+ * Remove unused variables
+ * Change formats to match arg type
+ * in printf
+ *
+ *
+ ****************************************************************************/
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+#include <math.h>
+#include "calfuse.h"
+
+static char CF_PRGM_ID[] = "ttag_combine";
+static char CF_VER_NUM[] = "1.11";
+
+#define MAXGTI 2000 /* Maximum number of good time intervals */
+
+static int
+cf_dtcor_read_counters(fitsfile *infits, long *de, long *fe, long *ai1a,
+ long *ai1b, long *ai2a, long *ai2b, long *sic, long *lif, long *as,
+ double *ctm )
+{
+ char cntstr[FLEN_CARD], detstr[FLEN_CARD];
+ long de_b, de_e, fe_b, fe_e;
+ long ai1a_b, ai1a_e, ai1b_b, ai1b_e, ai2a_b, ai2a_e, ai2b_b, ai2b_e ;
+ long sic_b, sic_e, lif_b, lif_e, as_b, as_e ;
+ double ctm_b, ctm_e ;
+ int status=0;
+
+ FITS_read_key(infits, TSTRING, "DETECTOR", detstr, NULL, &status);
+
+ /* Segment 1A Counters */
+
+ sprintf(cntstr, "%1.1s%2.2s%4.4s","C",detstr,"DE_B");
+ FITS_read_key(infits, TLONG, cntstr, &de_b, NULL, &status);
+
+ sprintf(cntstr, "%1.1s%2.2s%4.4s","C",detstr,"DE_E");
+ FITS_read_key(infits, TLONG, cntstr, &de_e, NULL, &status);
+
+ sprintf(cntstr, "%1.1s%2.2s%4.4s","C",detstr,"FE_B");
+ FITS_read_key(infits, TLONG, cntstr, &fe_b, NULL, &status);
+
+ sprintf(cntstr, "%1.1s%2.2s%4.4s","C",detstr,"FE_E");
+ FITS_read_key(infits, TLONG, cntstr, &fe_e, NULL, &status);
+
+ sprintf(cntstr, "%1.1s%2.2s%5.5s","C",detstr,"SIC_B");
+ FITS_read_key(infits, TLONG, cntstr, &sic_b, NULL, &status);
+
+ sprintf(cntstr, "%1.1s%2.2s%5.5s","C",detstr,"SIC_E");
+ FITS_read_key(infits, TLONG, cntstr, &sic_e, NULL, &status);
+
+ sprintf(cntstr, "%1.1s%2.2s%5.5s","C",detstr,"LIF_B");
+ FITS_read_key(infits, TLONG, cntstr, &lif_b, NULL, &status);
+
+ sprintf(cntstr, "%1.1s%2.2s%5.5s","C",detstr,"LIF_E");
+ FITS_read_key(infits, TLONG, cntstr, &lif_e, NULL, &status);
+
+ sprintf(cntstr, "%1.1s%2.2s%4.4s","C",detstr,"AS_B");
+ FITS_read_key(infits, TLONG, cntstr, &as_b, NULL, &status);
+
+ sprintf(cntstr, "%1.1s%2.2s%4.4s","C",detstr,"AS_E");
+ FITS_read_key(infits, TLONG, cntstr, &as_e, NULL, &status);
+
+ /* Active Image Counters */
+ FITS_read_key(infits, TLONG, "C1AAI_B", &ai1a_b, NULL, &status);
+ FITS_read_key(infits, TLONG, "C1AAI_E", &ai1a_e, NULL, &status);
+ FITS_read_key(infits, TLONG, "C1BAI_B", &ai1b_b, NULL, &status);
+ FITS_read_key(infits, TLONG, "C1BAI_E", &ai1b_e, NULL, &status);
+ FITS_read_key(infits, TLONG, "C2AAI_B", &ai2a_b, NULL, &status);
+ FITS_read_key(infits, TLONG, "C2AAI_E", &ai2a_e, NULL, &status);
+ FITS_read_key(infits, TLONG, "C2BAI_B", &ai2b_b, NULL, &status);
+ FITS_read_key(infits, TLONG, "C2BAI_E", &ai2b_e, NULL, &status);
+ FITS_read_key(infits, TDOUBLE, "CTIME_B", &ctm_b, NULL, &status);
+ FITS_read_key(infits, TDOUBLE, "CTIME_E", &ctm_e, NULL, &status);
+
+
+ *de = de_e - de_b;
+ *fe= fe_e - fe_b;
+ *ai1a = ai1a_e - ai1a_b ;
+ *ai1b = ai1b_e - ai1b_b ;
+ *ai2a = ai2a_e - ai2a_b ;
+ *ai2b = ai2b_e - ai2b_b ;
+ *sic = sic_e - sic_b ;
+ *lif = lif_e - lif_b ;
+ *as = as_e - as_b ;
+ *ctm = ctm_e - ctm_b ;
+
+ return 0;
+}
+
+int main(int argc, char *argv[])
+{
+ int i, j, k;
+ char buffer[FLEN_CARD], comment[FLEN_CARD], stime[FLEN_CARD];
+ char cntstr[FLEN_CARD], detstr[FLEN_CARD];
+ char expid[FLEN_CARD], procstep[FLEN_CARD] ;
+ long de, fe, de_tot, fe_tot, fe_b, de_b, fe_e, de_e;
+ long ai1a, ai1b, ai2a, ai2b, ai1a_tot, ai1b_tot, ai2a_tot;
+ long ai2b_tot,ai1a_b, ai1a_e, ai1b_b, ai1b_e, ai2a_b ;
+ long ai2a_e, ai2b_b, ai2b_e, sic_b, sic_e, sic_tot, sic ;
+ long lif_b, lif_e, lif_tot, lif, as_b, as_e, as_tot, as ;
+ long expnight, indnight;
+ int status=0, nfiles=0, hdutype=0, nkeys, keynum, anynull;
+ fitsfile *infits, *outfits;
+ long nevents, jrow, ngti, ngti_in;
+ char *pha_in, *dnflg ;
+ short *x_in, *y_in;
+ float *time_in, *gti_start, *gti_stop;
+ float *gti_start_in, *gti_stop_in, *dx, *dy ;
+ float fpasx0, fpasx, fpalx0, fpalx, dfpasx, dfpalx ;
+ double mjd_init, mjd_start, mjd_end, exptime, mjd_last=0, indtime;
+ double rawtime, trawtime;
+ double ctm, ctm_b, ctm_e, ctm_tot ;
+ int plantime, procflg ;
+ long tplantime ;
+ int tcol_in, xcol_in, ycol_in, phacol_in, startcol ,stopcol;
+ int tcol_out, xcol_out, ycol_out, phacol_out;
+ int dxcol_in, dxcol_out, dycol_in, dycol_out,dnflgcol_in;
+ int dnflgcol_out ;
+ int fpa_split = FALSE;
+ time_t vtime;
+
+
+ if (argc < 3) {
+ printf("Incorrect number of arguments.\n");
+ printf("Calling sequence:ttag_combine output_file input_file1 input_file2 input_file3 ...\n");
+ exit(1);
+ }
+
+ /* Initialize error checking. */
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Started execution.");
+
+ /* get and display time */
+ vtime = time(NULL) ;
+ strcpy(stime,ctime(&vtime)) ;
+
+ jrow=1;
+ de_tot=0 ;
+ fe_tot=0 ;
+ ai1a_tot=0 ;
+ ai1b_tot=0 ;
+ ai2a_tot=0 ;
+ ai2b_tot=0 ;
+ sic_tot=0 ;
+ lif_tot=0 ;
+ as_tot=0 ;
+ ctm_tot=0. ;
+ procflg=-1 ;
+ gti_start = (float *) cf_malloc(sizeof(float) * 1000);
+ gti_stop = (float *) cf_malloc(sizeof(float) * 1000);
+
+ gti_start[0] = 0.0;
+ gti_stop[0] = 0.0;
+
+ nfiles = argc-1;
+
+ exptime=0.0;
+ expnight=0;
+ trawtime=0.0;
+ tplantime=0;
+
+ ngti=0; /* is the number of new good time intervals */
+
+ for (i=2; i<=nfiles; i++) {
+ printf("Processing %-60.60s\n",argv[i]);
+ FITS_open_file(&infits, argv[i], READONLY, &status);
+
+ if (i==2) {
+ FITS_read_key(infits, TDOUBLE, "EXPSTART", &mjd_init,
+ NULL, &status);
+ mjd_last=mjd_start=mjd_init;
+ FITS_read_key(infits, TDOUBLE, "EXPEND", &mjd_end,
+ NULL, &status);
+ FITS_read_key(infits, TSTRING, "INIT_COR", procstep,
+ NULL, &status) ;
+ cf_read_fpa_pos (infits, &fpasx0, &fpalx0);
+ FITS_create_file(&outfits, argv[1], &status);
+ FITS_copy_hdu(infits, outfits, 0, &status);
+ FITS_create_hdu(outfits, &status);
+ FITS_movabs_hdu(infits,2,&hdutype,&status);
+ FITS_get_hdrpos(infits, &nkeys, &keynum, &status);
+ for (j=1; j<=nkeys; j++) {
+ FITS_read_record(infits, j, buffer, &status);
+ FITS_write_record(outfits, buffer, &status);
+ }
+ /* adjust some initial keywords */
+ nevents=0;
+ FITS_update_key(outfits, TLONG, "NAXIS2", &nevents,
+ NULL, &status);
+ /* set a flag (procflg) if the file is processed in any way */
+ if ( strncmp(procstep, "COMP", 4) == 0) {
+ printf("file has been processed - setting flag \n") ;
+ procflg = 1 ; }
+ else printf("These are raw data files \n") ;
+ } else {
+ FITS_read_key(infits, TDOUBLE, "EXPSTART", &mjd_start,
+ NULL, &status);
+ if (mjd_start < mjd_last)
+ cf_if_error("Files must be in time order, first to last.");
+ mjd_last=mjd_start;
+ FITS_read_key(infits, TDOUBLE, "EXPEND", &mjd_end,
+ NULL, &status);
+ cf_read_fpa_pos (infits, &fpasx, &fpalx);
+ dfpasx = fpasx - fpasx0 ;
+ dfpalx = fpalx - fpalx0 ;
+ if (fabs((double)dfpasx) > 30.) {
+ printf("\nLarge change in SIC FPA X position: %f \n",dfpasx) ;
+ fpa_split = TRUE;
+ }
+ if (fabs((double)dfpalx) > 30.) {
+ printf("\nLarge change in LIF FPA X position: %f \n",dfpalx) ;
+ fpa_split = TRUE;
+ }
+ }
+
+ FITS_movabs_hdu(infits,1,&hdutype,&status);
+
+ FITS_read_key(infits, TDOUBLE, "EXPTIME", &indtime,
+ NULL, &status);
+ exptime+=indtime;
+
+ fits_read_key(infits, TDOUBLE, "RAWTIME", &rawtime,
+ NULL, &status);
+ if (status)
+ status = 0;
+ else
+ trawtime+=rawtime;
+
+ FITS_read_key(infits, TINT, "PLANTIME", &plantime,
+ NULL, &status);
+ tplantime+=plantime ;
+
+ fits_read_key(infits, TLONG, "EXPNIGHT", &indnight,
+ NULL, &status);
+ if (status)
+ status = 0;
+ else
+ expnight+=indnight;
+
+ cf_dtcor_read_counters(infits,&de,&fe,&ai1a,&ai1b,&ai2a,&ai2b,
+ &sic,&lif,&as,&ctm) ;
+
+ de_tot += de;
+ fe_tot += fe;
+ ai1a_tot += ai1a ;
+ ai1b_tot += ai1b ;
+ ai2a_tot += ai2a ;
+ ai2b_tot += ai2b ;
+ sic_tot += sic ;
+ lif_tot += lif ;
+ as_tot += as ;
+ ctm_tot += ctm ;
+
+ FITS_movabs_hdu(infits,2,&hdutype,&status);
+ /* Get the number of events in the input file. */
+ FITS_read_key(infits, TLONG, "NAXIS2", &nevents, NULL, &status);
+
+ printf(" EXPTIME=%10.3f NEVENTS=%10ld\n",indtime,nevents);
+
+ /* Allocate space for the input and output times, coords,
+ pha */
+ time_in = (float *) cf_malloc(sizeof(float) * nevents);
+ x_in = (short *) cf_malloc(sizeof(short) * nevents);
+ y_in = (short *) cf_malloc(sizeof(short) * nevents);
+ pha_in = (char *) cf_malloc(sizeof(char) * nevents);
+ dx = (float *) cf_malloc(sizeof(float) * nevents);
+ dy = (float *) cf_malloc(sizeof(float) * nevents);
+ dnflg = (char *) cf_malloc(sizeof(char) * nevents);
+
+ FITS_get_colnum(infits, TRUE, "TIME", &tcol_in, &status);
+ FITS_get_colnum(infits, TRUE, "X", &xcol_in, &status);
+ FITS_get_colnum(infits, TRUE, "Y", &ycol_in, &status);
+ FITS_get_colnum(infits, TRUE, "PHA", &phacol_in, &status);
+ if(procflg > 0) {
+ FITS_get_colnum(infits, TRUE, "DX", &dxcol_in, &status);
+ FITS_get_colnum(infits, TRUE, "DY", &dycol_in, &status);
+ FITS_get_colnum(infits, TRUE, "DNFLG",&dnflgcol_in, &status); }
+
+ FITS_get_colnum(outfits, TRUE, "TIME", &tcol_out, &status);
+ FITS_get_colnum(outfits, TRUE, "X", &xcol_out, &status);
+ FITS_get_colnum(outfits, TRUE, "Y", &ycol_out, &status);
+ FITS_get_colnum(outfits, TRUE, "PHA", &phacol_out, &status);
+ if (procflg > 0 ) {
+ FITS_get_colnum(outfits, TRUE, "DX", &dxcol_out, &status);
+ FITS_get_colnum(outfits, TRUE, "DY", &dycol_out, &status);
+ FITS_get_colnum(outfits, TRUE, "DNFLG",&dnflgcol_out, &status);}
+
+ FITS_read_col(infits, TFLOAT, tcol_in, 1, 1, nevents, NULL,
+ time_in, &anynull, &status);
+ FITS_read_col(infits, TSHORT, xcol_in, 1, 1, nevents, NULL,
+ x_in, &anynull, &status);
+ FITS_read_col(infits, TSHORT, ycol_in, 1, 1, nevents, NULL,
+ y_in, &anynull, &status);
+ FITS_read_col(infits, TBYTE, phacol_in, 1, 1, nevents, NULL,
+ pha_in, &anynull, &status);
+ if(procflg > 0) {
+ FITS_read_col(infits, TFLOAT, dxcol_in, 1, 1, nevents, NULL,
+ dx, &anynull, &status);
+ FITS_read_col(infits, TFLOAT, dycol_in, 1, 1, nevents, NULL,
+ dy, &anynull, &status);
+ FITS_read_col(infits, TBYTE, dnflgcol_in, 1, 1, nevents, NULL,
+ dnflg, &anynull, &status);}
+
+ for (j=0; j<nevents; j++){
+ time_in[j]+=(float) ((mjd_start-mjd_init)*86400.0);
+ }
+
+ FITS_write_col(outfits, TFLOAT, tcol_out, jrow, 1,
+ nevents, time_in, &status);
+ FITS_write_col(outfits, TSHORT, xcol_out, jrow, 1,
+ nevents, x_in, &status);
+ FITS_write_col(outfits, TSHORT, ycol_out, jrow, 1,
+ nevents, y_in, &status);
+ FITS_write_col(outfits, TBYTE, phacol_out, jrow, 1,
+ nevents, pha_in, &status);
+ if (procflg > 0) {
+ FITS_write_col(outfits, TFLOAT, dxcol_out, jrow, 1,
+ nevents, dx, &status);
+ FITS_write_col(outfits, TFLOAT, dycol_out, jrow, 1,
+ nevents, dy, &status);
+ FITS_write_col(outfits, TBYTE, dnflgcol_out, jrow, 1,
+ nevents, dnflg, &status); }
+ jrow+=nevents;
+
+ free(time_in);
+ free(x_in);
+ free(y_in);
+ free(pha_in);
+ free(dx) ;
+ free(dy) ;
+ free(dnflg) ;
+
+
+ /* Copy GTI from input to output */
+ FITS_movabs_hdu(infits, 3, &hdutype, &status);
+ FITS_read_key(infits, TLONG, "NAXIS2", &ngti_in, NULL, &status);
+ gti_start_in = (float *) cf_malloc(sizeof(float) * ngti_in);
+ gti_stop_in = (float *) cf_malloc(sizeof(float) * ngti_in);
+ FITS_get_colnum(infits, TRUE, "START", &startcol, &status);
+ FITS_get_colnum(infits, TRUE, "STOP", &stopcol, &status);
+ FITS_read_col(infits, TFLOAT, startcol, 1, 1, ngti_in, 0,
+ gti_start_in, &anynull, &status);
+ FITS_read_col(infits, TFLOAT, stopcol, 1, 1, ngti_in, 0,
+ gti_stop_in, &anynull, &status);
+ for (k=0; k<ngti_in; k++) {
+ gti_start[ngti]=gti_start_in[k]+
+ (float) ((mjd_start-mjd_init)*86400.0);;
+ gti_stop[ngti]=gti_stop_in[k]+
+ (float) ((mjd_start-mjd_init)*86400.0);;
+ ngti++;
+ if (ngti >= MAXGTI) {
+ sprintf(buffer, "More than %d good time intervals.",MAXGTI) ;
+ cf_if_error(buffer);
+ }
+ }
+ free(gti_start_in);
+ free(gti_stop_in);
+
+ FITS_close_file(infits, &status);
+ }
+
+ FITS_flush_file(outfits, &status);
+
+ FITS_movabs_hdu(outfits, 1, &hdutype, &status);
+ jrow=jrow-1 ;
+ FITS_update_key(outfits, TLONG, "NEVENTS", &jrow, 0, &status) ;
+ FITS_update_key(outfits, TDOUBLE, "EXPTIME", &exptime, 0, &status);
+ FITS_update_key(outfits, TDOUBLE, "EXPEND", &mjd_end, 0, &status);
+ FITS_update_key(outfits, TLONG, "PLANTIME", &tplantime, 0, &status) ;
+
+ if (expnight < 0)
+ expnight = 0;
+ FITS_update_key(outfits, TLONG, "EXPNIGHT", &expnight, 0, &status);
+
+ if (trawtime - exptime > -1.)
+ FITS_update_key(outfits, TDOUBLE, "RAWTIME", &trawtime, 0, &status);
+
+ FITS_read_key(outfits, TSTRING, "DETECTOR", detstr, NULL, &status);
+ sprintf(cntstr, "%1.1s%2.2s%4.4s","C",detstr,"FE_B");
+ FITS_read_key(outfits, TLONG, cntstr, &fe_b, NULL, &status);
+ sprintf(cntstr, "%1.1s%2.2s%4.4s","C",detstr,"DE_B");
+ FITS_read_key(outfits, TLONG, cntstr, &de_b, NULL, &status);
+ sprintf(cntstr, "%1.1s%2.2s%5.5s","C",detstr,"SIC_B");
+ FITS_read_key(outfits, TLONG, cntstr, &sic_b, NULL, &status);
+ sprintf(cntstr, "%1.1s%2.2s%5.5s","C",detstr,"LIF_B");
+ FITS_read_key(outfits, TLONG, cntstr, &lif_b, NULL, &status);
+ sprintf(cntstr, "%1.1s%2.2s%4.4s","C",detstr,"AS_B");
+ FITS_read_key(outfits, TLONG, cntstr, &as_b, NULL, &status);
+
+ FITS_read_key(outfits, TLONG, "C1AAI_B", &ai1a_b, NULL, &status);
+ FITS_read_key(outfits, TLONG, "C1BAI_B", &ai1b_b, NULL, &status);
+ FITS_read_key(outfits, TLONG, "C2AAI_B", &ai2a_b, NULL, &status);
+ FITS_read_key(outfits, TLONG, "C2BAI_B", &ai2b_b, NULL, &status);
+ FITS_read_key(outfits, TDOUBLE, "CTIME_B", &ctm_b, NULL, &status);
+
+ sprintf(comment, "New ID for combined data") ;
+ strncpy(expid,"999 ",18) ;
+ expid[18]='\0' ;
+ FITS_update_key(outfits, TSTRING, "EXP_ID", expid, comment, &status);
+
+ sprintf(comment, "Date and time file was created") ;
+ stime[24]='\0' ;
+ FITS_update_key(outfits, TSTRING, "DATE", stime, comment, &status) ;
+
+ de_e = de_tot + de_b;
+ fe_e = fe_tot + fe_b;
+ lif_e = lif_tot + lif_b ;
+ sic_e = sic_tot + sic_b ;
+ as_e = as_tot + as_b ;
+ ctm_e = ctm_tot + ctm_b ;
+ ai1a_e = ai1a_tot + ai1a_b ;
+ ai1b_e = ai1b_tot + ai1b_b ;
+ ai2a_e = ai2a_tot + ai2a_b ;
+ ai2b_e = ai2b_tot + ai2b_b ;
+
+ sprintf(cntstr, "%1.1s%2.2s%4.4s","C",detstr,"DE_E");
+ FITS_update_key(outfits, TLONG, cntstr, &de_e, NULL, &status);
+ sprintf(cntstr, "%1.1s%2.2s%4.4s","C",detstr,"FE_E");
+ FITS_update_key(outfits, TLONG, cntstr, &fe_e, NULL, &status);
+ sprintf(cntstr, "%1.1s%2.2s%5.5s","C",detstr,"SIC_E");
+ FITS_update_key(outfits, TLONG, cntstr, &sic_e, NULL, &status);
+ sprintf(cntstr, "%1.1s%2.2s%5.5s","C",detstr,"LIF_E");
+ FITS_update_key(outfits, TLONG, cntstr, &lif_e, NULL, &status);
+ sprintf(cntstr, "%1.1s%2.2s%4.4s","C",detstr,"AS_E");
+ FITS_update_key(outfits, TLONG, cntstr, &as_e, NULL, &status);
+
+ FITS_update_key(outfits, TLONG, "C1AAI_E", &ai1a_e, NULL, &status);
+ FITS_update_key(outfits, TLONG, "C1BAI_E", &ai1b_e, NULL, &status);
+ FITS_update_key(outfits, TLONG, "C2AAI_E", &ai2a_e, NULL, &status);
+ FITS_update_key(outfits, TLONG, "C2BAI_E", &ai2b_e, NULL, &status);
+ FITS_update_key(outfits, TDOUBLE, "CTIME_E", &ctm_e, NULL, &status);
+
+
+ FITS_write_comment(outfits, " ", &status);
+ FITS_write_comment(outfits, "CF_TTAG_COMBINE", &status);
+ FITS_write_comment(outfits, " ", &status);
+ FITS_write_comment(outfits, "This file is a concatenation of:", &status);
+ for (i=2; i<=nfiles; i++) {
+ FITS_write_comment(outfits, argv[i], &status);
+ }
+
+
+ FITS_open_file(&infits, argv[2], READONLY, &status);
+
+ /* Move to the second extension which contains the goof time intervals. */
+ FITS_movabs_hdu(infits, 3, &hdutype, &status);
+
+ /* Create the second extension in the output file. */
+ FITS_create_hdu(outfits, &status);
+
+ /* Copy the header of the input file to the output file. */
+ FITS_get_hdrpos(infits, &nkeys, &keynum, &status);
+ for (i=1; i<=nkeys; i++) {
+ FITS_read_record(infits, i, buffer, &status);
+ FITS_write_record(outfits, buffer, &status);
+ }
+
+ FITS_get_colnum(outfits,TRUE,"START",&startcol,&status);
+ FITS_get_colnum(outfits,TRUE,"STOP",&stopcol,&status);
+
+ FITS_write_col(outfits, TFLOAT, startcol, 1, 1, ngti, gti_start, &status);
+ FITS_write_col(outfits, TFLOAT, stopcol, 1, 1, ngti, gti_stop, &status);
+
+ free(gti_start);
+ free(gti_stop);
+
+ FITS_close_file(infits, &status);
+ FITS_close_file(outfits, &status);
+
+ if (fpa_split)
+ cf_if_warning("FPA motion detected. Resolution may be compromised.\n");
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished execution.");
+ return 0;
+}
diff --git a/src/analysis/ttag_lightcurve.c b/src/analysis/ttag_lightcurve.c
new file mode 100644
index 0000000..f1a14fa
--- /dev/null
+++ b/src/analysis/ttag_lightcurve.c
@@ -0,0 +1,398 @@
+
+/*************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *************************************************************************
+ *
+ *
+ * Usage:
+ * ttag_lightcurve [-hf] [-v level] input_file output_file windows_file
+ * bins LiForSiC
+ *
+ *
+ * Arguments:
+ * input_file : ttag IDF file
+ * output_file : ASCII file with 2 columns :
+ * - time (MJD)
+ * - countrate
+ *
+ * windows_file : input ASCII file with 2 columns :
+ * - start of spectral windows
+ * - stop of spectral windows
+ *
+ * bins : bin size in seconds
+ * LiForSiC : 1=LiF, 2=SiC
+ *
+ *
+ *
+ *
+ * Options:
+ * -h: this help message
+ * -f: output calibrated flux (erg/cm2/s) instead of countrate
+ * -v: verbosity level (=1; 0 is silent)
+ *
+ *
+ *
+ *
+ * History: 10/06/04 bjg v1.0
+ * 06/03/05 wvd v1.1 Delete unused variables.
+ *
+ ***************************************************************************/
+
+
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <time.h>
+#include <unistd.h>
+#include <math.h>
+
+#include "calfuse.h"
+
+
+
+
+#define N_MAX_WIN 100 /* Maximum number of spectral windows */
+
+typedef struct {
+ float start;
+ float stop;
+} interval; /* type to store a spectral window */
+
+
+int is_inside(float val,interval * interval_ptr, int nintervals);
+int is_good_time(char timeflag,char * daynight);
+int is_in_lif_channel(char channel, char * aperture);
+int is_in_sic_channel(char channel, char * aperture);
+
+
+
+
+
+static char CF_PRGM_ID[]= "ttag_lightcurve";
+static char CF_VER_NUM[]= "1.1";
+
+
+
+
+int main(int argc,char *argv[]){
+
+
+
+ char input_filename[FLEN_CARD];
+ char output_filename[FLEN_CARD];
+ char windefs_filename[FLEN_CARD];
+
+ FILE * output_file;
+ FILE * windefs_file;
+
+ fitsfile * infits;
+
+ interval swindows[N_MAX_WIN]; /* the spectral windows are stored
+ in an array of intervals */
+ int nwindows = 0; /* number of spectral windows TBD */
+
+ float bins;
+
+ int intnull=0,anynull;
+ int status=0;
+ int hdutype=0;
+
+ long nevents;
+ long i;
+ int ncol;
+
+ char tempchar;
+ char tempstring[FLEN_CARD];
+
+ char daynight[FLEN_CARD];
+ char instmode[FLEN_CARD];
+ char aperture[FLEN_CARD];
+
+ double * hdu2_time;
+ double * hdu2_lambda;
+ double * hdu2_weight;
+ char * hdu2_channel;
+ char * hdu2_timeflgs;
+ char * hdu2_loc_flgs;
+
+ float * gti_start;
+ float * gti_stop;
+ int ngtis;
+
+ interval * gtis;
+
+ double t, tmax, ctot;
+
+ double expstart;
+
+ int badtime;
+
+ int LiForSiC;
+
+
+ int optc;
+
+ int do_flux=0;
+
+ char opts[] = "hfv:";
+ char usage[] =
+ "Usage:\n"
+ " ttag_lightcurve [-hf] [-v level] input_file output_file windows_file\n"
+ " bins LiForSiC\n\n"
+ "Arguments:\n"
+ " input_file : ttag IDF file\n\n"
+ " output_file : ASCII file with 2 columns:\n"
+ " - time (MJD)\n"
+ " - countrate corrected for deadtime\n\n"
+ " windows_file : input ASCII file with 2 columns :\n"
+ " - start of spectral windows\n"
+ " - stop of spectral windows\n\n"
+ " bins : bin size in seconds\n"
+ " LiForSiC : 1=LiF, 2=SiC\n";
+ char option[] =
+ "Options:\n"
+ " -h: this help message \n"
+ " -f: output calibrated flux (erg/cm2/s) instead of countrate \n"
+ " -v: verbosity level (=1; 0 is silent) \n";
+
+ verbose_level = 1;
+
+
+ /* Check number of options and arguments */
+ while ((optc = getopt(argc, argv, opts)) != -1) {
+ switch(optc) {
+ case 'h':
+ printf("%s\n%s", usage, option);
+ return EXIT_SUCCESS;
+ case 'v':
+ verbose_level = atoi(optarg);
+ break;
+ case 'f':
+ do_flux=1;
+ break;
+ }
+ }
+
+ /* Initialize error checking. */
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ if (argc != optind+5)
+ cf_if_error("%s\nIncorrect number of program arguments", usage);
+
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Started execution.");
+
+ strcpy(input_filename,argv[optind]);
+ strcpy(output_filename,argv[optind+1]);
+ strcpy(windefs_filename,argv[optind+2]);
+ sscanf(argv[optind+3],"%f",&bins);
+ sscanf(argv[optind+4],"%d",&LiForSiC);
+
+ if ((LiForSiC>2)||(LiForSiC<1)) {
+ cf_if_error("%s\nLiForSiC value must be 1 (LiF) or 2 (SiC)", usage);
+ }
+
+
+ if (bins<=0) {
+ cf_if_error("Time interval is less than or equal to zero.");
+ }
+
+
+ /* Open the spectral windows definition file */
+ if ((windefs_file = fopen (windefs_filename, "r")) == NULL){
+ cf_if_error ("Unable to open file %s\n", windefs_filename);
+ }
+
+
+ /* Read the spectral windows definition file and store the spectral windows */
+ while (fscanf(windefs_file,"%f %f",&((swindows[nwindows]).start),
+ &((swindows[nwindows]).stop))!=EOF)
+ {
+ nwindows++;
+ }
+
+
+
+
+ for (i=0;i<nwindows;i++){
+ printf("Window %ld : %f - %f\n",i+1,swindows[i].start,swindows[i].stop);
+ }
+
+
+
+ /* Create the output file */
+ if ((output_file = fopen(output_filename,"w")) == NULL){
+ fclose(windefs_file);
+ cf_if_error ("Unable to create file %s\n", output_filename);
+ }
+
+
+
+ FITS_open_file(&infits,input_filename,READONLY,&status);
+
+ FITS_read_key(infits,TSTRING,"INSTMODE",instmode,NULL,&status);
+
+ if (strncasecmp(instmode,"TTAG",4)){
+ FITS_close_file(infits,&status);
+ fclose(windefs_file);
+ fclose(output_file);
+ cf_if_error("Input file is not TTAG.");
+ }
+
+ FITS_read_key(infits,TDOUBLE,"EXPSTART",&expstart,NULL,&status);
+
+ FITS_read_key(infits,TSTRING,"DAYNIGHT",daynight,NULL,&status);
+
+ FITS_read_key(infits,TSTRING,"APERTURE",aperture,NULL,&status);
+
+
+ FITS_movabs_hdu(infits,2,&hdutype,&status);
+ FITS_read_key(infits,TSTRING,"TFORM1",tempstring,NULL,&status);
+ sscanf(tempstring,"%ld%c",&nevents,&tempchar);
+
+
+
+
+ hdu2_time=(double *)malloc(nevents*sizeof(double));
+ hdu2_lambda=(double *)malloc(nevents*sizeof(double));
+ hdu2_weight=(double *)malloc(nevents*sizeof(double));
+ hdu2_channel=(char *)malloc(nevents*sizeof(char));
+ hdu2_timeflgs=(char *)malloc(nevents*sizeof(char));
+ hdu2_loc_flgs=(char *)malloc(nevents*sizeof(char));
+
+ FITS_get_colnum(infits, TRUE, "TIME", &ncol, &status);
+ FITS_read_col(infits, TDOUBLE, ncol, 1, 1, nevents, &intnull,
+ hdu2_time, &anynull, &status);
+
+ FITS_get_colnum(infits, TRUE, "LAMBDA", &ncol, &status);
+ FITS_read_col(infits, TDOUBLE, ncol, 1, 1, nevents, &intnull,
+ hdu2_lambda, &anynull, &status);
+
+ if (do_flux) {
+ FITS_get_colnum(infits, TRUE, "ERGCM2", &ncol, &status);
+ FITS_read_col(infits, TDOUBLE, ncol, 1, 1, nevents, &intnull,
+ hdu2_weight, &anynull, &status);
+ } else {
+ FITS_get_colnum(infits, TRUE, "WEIGHT", &ncol, &status);
+ FITS_read_col(infits, TDOUBLE, ncol, 1, 1, nevents, &intnull,
+ hdu2_weight, &anynull, &status);
+ }
+
+ FITS_get_colnum(infits, TRUE, "CHANNEL", &ncol, &status);
+ FITS_read_col(infits, TBYTE, ncol, 1, 1, nevents, &intnull,
+ hdu2_channel, &anynull, &status);
+
+ FITS_get_colnum(infits, TRUE, "TIMEFLGS", &ncol, &status);
+ FITS_read_col(infits, TBYTE, ncol, 1, 1, nevents, &intnull,
+ hdu2_timeflgs, &anynull, &status);
+
+ FITS_get_colnum(infits, TRUE, "LOC_FLGS", &ncol, &status);
+ FITS_read_col(infits, TBYTE, ncol, 1, 1, nevents, &intnull,
+ hdu2_loc_flgs, &anynull, &status);
+
+
+ FITS_movabs_hdu(infits,3,&hdutype,&status);
+
+ ngtis=cf_read_col(infits,TFLOAT,"START",(void **) &gti_start);
+ ngtis=cf_read_col(infits,TFLOAT,"STOP",(void **) &gti_stop);
+
+ gtis=(interval *)malloc(ngtis*sizeof(interval));
+
+ for (i=0;i<ngtis;i++){
+ gtis[i].start=gti_start[i];
+ gtis[i].stop=gti_stop[i];
+ }
+
+
+
+ t=0.0;
+ tmax=bins;
+ i=0;
+ ctot=0.0;
+ badtime=0;
+ while (i<nevents){
+
+ while (hdu2_time[i]>=tmax) {
+ if (!(is_inside(t,gtis,ngtis))) badtime=1;
+ if (!(is_inside(tmax,gtis,ngtis))) badtime=1;
+ if (!badtime) fprintf(output_file,"%15lf %15lf\n",expstart+t/(3600.0*24.0),ctot/bins);
+ t=tmax;
+ tmax=t+bins;
+ ctot=0.0;
+ badtime=0;
+ }
+
+ if (!(is_good_time(hdu2_timeflgs[i],daynight))) badtime=1;
+
+ if (is_inside(hdu2_lambda[i],swindows,nwindows)){
+ if (hdu2_loc_flgs[i]==0){
+ if (LiForSiC==1){
+ if (is_in_lif_channel(hdu2_channel[i],aperture)){
+ ctot+=hdu2_weight[i];
+ }
+ }
+ else {
+ if (is_in_sic_channel(hdu2_channel[i],aperture)){
+ ctot+=hdu2_weight[i];
+ }
+ }
+ }
+ }
+
+ i++;
+ }
+
+ free(hdu2_time);
+ free(hdu2_lambda);
+ free(hdu2_weight);
+ free(hdu2_channel);
+ free(hdu2_timeflgs);
+ free(hdu2_loc_flgs);
+
+
+
+ FITS_close_file(infits,&status);
+ fclose(windefs_file);
+ fclose(output_file);
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished execution.");
+ return EXIT_SUCCESS;
+
+}
+
+int is_inside(float val,interval * interval_ptr, int nintervals){
+ int i;
+ i=0;
+ while (i<nintervals){
+ if ((val<=interval_ptr[i].stop)&&(val>=interval_ptr[i].start)){
+ return 1;
+ }
+ i++;
+ }
+ return 0;
+}
+
+int is_good_time(char timeflag,char * daynight){
+
+ if (!(strncasecmp(daynight,"DAY" ,3))) return (timeflag == 1);
+ if (!(strncasecmp(daynight,"NIGHT",5))) return (timeflag == 0);
+
+ return ((timeflag&254) == 0);
+
+}
+
+int is_in_lif_channel(char channel, char * aperture){
+ if (!strncasecmp(aperture,"LWRS",4)) return (channel == 3);
+ if (!strncasecmp(aperture,"MDRS",4)) return (channel == 2);
+ if (!strncasecmp(aperture,"HIRS",4)) return (channel == 1);
+ return 0;
+}
+
+int is_in_sic_channel(char channel, char * aperture){
+ if (!strncasecmp(aperture,"LWRS",4)) return (channel == 7);
+ if (!strncasecmp(aperture,"MDRS",4)) return (channel == 6);
+ if (!strncasecmp(aperture,"HIRS",4)) return (channel == 5);
+ return 0;
+}
diff --git a/src/analysis/ttag_lightcurve_channel_sum.c b/src/analysis/ttag_lightcurve_channel_sum.c
new file mode 100644
index 0000000..9f76c37
--- /dev/null
+++ b/src/analysis/ttag_lightcurve_channel_sum.c
@@ -0,0 +1,183 @@
+
+/*************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *************************************************************************
+ *
+ *
+ * Usage:
+ * ttag_lightcurve_channel_sum [-h] [-v level] output_file
+ * input_file1 input_file2
+ *
+ *
+ * Arguments:
+ * input_files : ASCII files with 2 columns :
+ * - time
+ * - signal
+ *
+ * output_file : ASCII file with 2 columns :
+ * - time
+ * - signal
+ *
+ *
+ *
+ *
+ *
+ *
+ * Options:
+ * -h: this help message
+ * -v: verbosity level (=1; 0 is silent)
+ *
+ *
+ *
+ *
+ * History: 10/06/04 bjg v1.0
+ * 11/04/04 bjg v1.1 time equality criteria changed
+ *
+ ***************************************************************************/
+
+
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <time.h>
+#include <unistd.h>
+#include <math.h>
+
+#include "calfuse.h"
+
+
+#define MAX_INPUT_FILE 20
+
+static char CF_PRGM_ID[]= "ttag_lightcurve_channel_sum";
+static char CF_VER_NUM[]= "1.1";
+
+
+int is_equal(double a, double b, double delta){
+
+ return ( ((a-b) <= delta) && ((a-b) > -delta) );
+
+}
+
+
+int main(int argc,char *argv[]){
+
+
+
+ char input_filename1[FLEN_CARD];
+ char input_filename2[FLEN_CARD];
+ char output_filename[FLEN_CARD];
+
+
+ FILE * output_file;
+ FILE * input_file1;
+ FILE * input_file2;
+
+ double t1,v1,t2,v2, delta_t;
+
+ int end_of_file;
+
+ int optc;
+
+ char opts[] = "hv:";
+ char usage[] =
+ "Usage:\n"
+ " ttag_lightcurve_channel_sum [-h] [-v level] output_file\n"
+ " input_file1 input_file2\n\n"
+ "Arguments:\n"
+ " input_files : ASCII files with 2 columns :\n"
+ " - time\n"
+ " - signal\n\n"
+ " output_file : ASCII file with 2 columns : \n"
+ " - time \n"
+ " - signal\n";
+ char option[] =
+ "Options:\n"
+ " -h: this help message \n"
+ " -v: verbosity level (=1; 0 is silent) \n";
+
+ verbose_level = 1;
+
+
+ /* Check number of options and arguments */
+ while ((optc = getopt(argc, argv, opts)) != -1) {
+ switch(optc) {
+ case 'h':
+ printf("%s\n%s", usage, option);
+ return EXIT_SUCCESS;
+ case 'v':
+ verbose_level = atoi(optarg);
+ break;
+ }
+ }
+
+ /* Initialize error checking. */
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ if (argc != optind+3)
+ cf_if_error("%s\nIncorrect number of program arguments", usage);
+
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Started execution.");
+
+ strcpy(output_filename,argv[optind]);
+ strcpy(input_filename1,argv[optind+1]);
+ strcpy(input_filename2,argv[optind+2]);
+
+
+
+ if ((input_file1 = fopen(input_filename1,"r")) == NULL){
+ cf_if_error ("Unable to open file %s\n", input_filename1);
+ }
+
+ if ((input_file2 = fopen(input_filename2,"r")) == NULL){
+ fclose(input_file1);
+ cf_if_error ("Unable to open file %s\n", input_filename2);
+ }
+
+
+ /* Create the output file */
+ if ((output_file = fopen(output_filename,"w")) == NULL){
+ fclose(input_file1);
+ fclose(input_file2);
+ cf_if_error ("Unable to create file %s\n", output_filename);
+ }
+
+ fscanf(input_file1,"%lf %lf",&t1,&v1);
+ fscanf(input_file1,"%lf %lf",&t2,&v2);
+ delta_t=t2-t1;
+
+ fseek(input_file1,0,SEEK_SET);
+
+
+ end_of_file=(fscanf(input_file2,"%lf %lf",&t2,&v2)==EOF)||(fscanf(input_file1,"%lf %lf",&t1,&v1)==EOF);
+
+
+ while (!end_of_file){
+ if (is_equal(t2,t1,delta_t/2)){
+ fprintf(output_file,"%15lf %15lf\n",t1,v1+v2);
+ end_of_file=(fscanf(input_file2,"%lf %lf",&t2,&v2)==EOF)||(fscanf(input_file1,"%lf %lf",&t1,&v1)==EOF);
+ }
+ else if (t2<t1) {
+ end_of_file=(fscanf(input_file2,"%lf %lf",&t2,&v2)==EOF);
+ }
+ else {
+ end_of_file=(fscanf(input_file1,"%lf %lf",&t1,&v1)==EOF);
+ }
+
+
+
+ }
+
+
+ fclose(input_file1);
+ fclose(input_file2);
+ fclose(output_file);
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished execution.");
+ return EXIT_SUCCESS;
+
+}
+
+
diff --git a/src/analysis/ttag_lightcurve_combine.c b/src/analysis/ttag_lightcurve_combine.c
new file mode 100644
index 0000000..9947f69
--- /dev/null
+++ b/src/analysis/ttag_lightcurve_combine.c
@@ -0,0 +1,182 @@
+
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: ttag_lightcurve_combine outfile file1 file2 file3 file4 ...
+ *
+ *
+ * History: 09/07/04 bjg v1.0
+ *
+ *
+ ****************************************************************************/
+
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <time.h>
+#include "calfuse.h"
+
+
+typedef char filename[FLEN_CARD];
+
+static char CF_PRGM_ID[]= "ttag_lightcurve_combine";
+static char CF_VER_NUM[]= "1.0";
+
+int main(int argc,char *argv[]){
+
+ char stime[FLEN_CARD];
+ time_t vtime;
+
+
+ filename *filelist;
+ double *expstartlist;
+
+ filename tempstring;
+ double tempdouble;
+
+ double minexpstart;
+ int minindex;
+
+ long nfiles, n2;
+ long i,j;
+
+ double t,v;
+ FILE * fin;
+ FILE * fout;
+
+ int optc;
+
+ char opts[] = "hv:";
+ char usage[] =
+ "Usage:\n"
+ " ttag_lightcurve_combine [-h] [-v level] output_file input_files\n";
+ char option[] =
+ "Options:\n"
+ " -h: this help message\n"
+ " -v: verbosity level (=1; 0 is silent)\n";
+
+ verbose_level = 1;
+
+ /* Check number of options and arguments */
+ while ((optc = getopt(argc, argv, opts)) != -1) {
+ switch(optc) {
+ case 'h':
+ printf("%s\n%s", usage, option);
+ return 0;
+ case 'v':
+ verbose_level = atoi(optarg);
+ break;
+ }
+ }
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+ if (argc < optind+2) {
+ printf("%s", usage);
+ cf_if_error("Incorrect number of arguments");
+ }
+
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Started execution.");
+
+ /* get and display time */
+ vtime = time(NULL) ;
+ strcpy(stime,ctime(&vtime));
+
+
+ nfiles=argc-optind-1;
+
+ filelist = (filename *)malloc(nfiles*sizeof(filename));
+ expstartlist = (double *)malloc(nfiles*sizeof(double));
+
+
+ cf_verbose(1,"GETTING INFORMATION ON INPUT FILES") ;
+
+ n2=0;
+
+ for (i=0; i<nfiles;i++) {
+
+ fin=fopen(argv[optind+i+1],"r");
+
+ if (fin==NULL){
+ cf_if_warning("Could not open file %s. Skipped.",argv[optind+i+1]);
+ continue;
+ }
+
+ fscanf(fin,"%lf %lf",&t,&v);
+
+ expstartlist[n2]=t;
+ strcpy(filelist[n2],argv[optind+i+1]);
+
+ fclose(fin);
+
+ n2++;
+ }
+
+ nfiles=n2;
+
+ if (nfiles==0){
+ cf_verbose(1,"No files to combine. Exiting.");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished execution.");
+ exit(0);
+ }
+
+ cf_verbose(1,"SORTING INPUT FILES IN TIME ORDER") ;
+
+ for (i=0; i<nfiles-1;i++) {
+ minexpstart=expstartlist[i];
+ minindex=i;
+ for (j=i+1; j<nfiles;j++) {
+ if (expstartlist[j]<minexpstart){
+ minexpstart=expstartlist[j];
+ minindex=j;
+ }
+ }
+
+ strcpy(tempstring,filelist[minindex]);
+ strcpy(filelist[minindex],filelist[i]);
+ strcpy(filelist[i],tempstring);
+
+ tempdouble=expstartlist[minindex];
+ expstartlist[minindex]=expstartlist[i];
+ expstartlist[i]=tempdouble;
+
+ }
+
+ cf_verbose(2,"N: Filename ExpStart ");
+
+ for (i=0; i<nfiles;i++) {
+ cf_verbose(2,"%ld: %s %7.1f",i,filelist[i],expstartlist[i]);
+ }
+
+
+ cf_verbose(1,"CREATING OUTPUT FILE");
+ if ((fout = fopen(argv[optind],"w")) == NULL){
+ cf_if_error ("Unable to create file %s\n", argv[optind]);
+ }
+
+
+
+ for (i=0; i<nfiles;i++) {
+ fin=fopen(filelist[i],"r");
+ while (fscanf(fin, "%lf %lf", &t, &v)!=EOF){
+ fprintf(fout, "%15lf %15lf\n", t, v);
+ }
+ fclose(fin);
+ }
+
+
+
+ fclose(fout);
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished execution.");
+ return EXIT_SUCCESS;
+
+}
+
+
diff --git a/src/analysis/ttag_lightcurve_mjd2hmjd.c b/src/analysis/ttag_lightcurve_mjd2hmjd.c
new file mode 100644
index 0000000..def1978
--- /dev/null
+++ b/src/analysis/ttag_lightcurve_mjd2hmjd.c
@@ -0,0 +1,151 @@
+
+/*************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *************************************************************************
+ *
+ *
+ * Usage:
+ * ttag_lightcurve_mjd2hmjd [-h] [-v level] output_file input_file
+ * hh mm ss dd mm ss
+ *
+ *
+ * Arguments:
+ * input_file : ASCII file with 2 columns :
+ * - time (MJD)
+ * - signal
+ *
+ * output_file : ASCII file with 2 columns :
+ * - time (HMJD)
+ * - signal
+ *
+ * hh mm ss dd mm ss : RA and DEC of target
+ *
+ *
+ *
+ *
+ * Options:
+ * -h: this help message
+ * -v: verbosity level (=1; 0 is silent)
+ *
+ *
+ *
+ *
+ * History: 10/06/04 bjg v1.0
+ * 06/03/05 wvd v1.1 Delete unused variables.
+ *
+ ***************************************************************************/
+
+
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <time.h>
+#include <unistd.h>
+#include <math.h>
+
+#include "calfuse.h"
+
+double gethmjd(double, int, int, float, int, int, float);
+
+static char CF_PRGM_ID[]= "ttag_lightcurve_mjd2hmjd";
+static char CF_VER_NUM[]= "1.1";
+
+
+int main(int argc,char *argv[]){
+
+
+
+ char input_filename[FLEN_CARD];
+ char output_filename[FLEN_CARD];
+
+
+ FILE * output_file;
+ FILE * input_file;
+
+
+ double t,t2,v;
+ int rah, ram, decd, decm;
+ float ras, decs;
+
+
+ int optc;
+
+ char opts[] = "hv:";
+ char usage[] =
+ "Usage:\n"
+ " ttag_lightcurve_mjd2hmjd [-h] [-v level] output_file input_file\n"
+ " hh mm ss dd mm ss\n\n"
+ "Arguments:\n"
+ " input_file : ASCII file with 2 columns :\n"
+ " - time (MJD) \n"
+ " - signal\n\n"
+ " output_file : ASCII file with 2 columns : \n"
+ " - time (HMJD) \n"
+ " - signal \n\n"
+ " hh mm ss dd mm ss : RA and DEC of target\n";
+ char option[] =
+ "Options:\n"
+ " -h: this help message \n"
+ " -v: verbosity level (=1; 0 is silent) \n";
+
+ verbose_level = 1;
+
+
+ /* Check number of options and arguments */
+ while ((optc = getopt(argc, argv, opts)) != -1) {
+ switch(optc) {
+ case 'h':
+ printf("%s\n%s", usage, option);
+ return EXIT_SUCCESS;
+ case 'v':
+ verbose_level = atoi(optarg);
+ break;
+ }
+ }
+
+ /* Initialize error checking. */
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ if (argc != optind+8)
+ cf_if_error("%s\nIncorrect number of program arguments", usage);
+
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Started execution.");
+
+ strcpy(output_filename,argv[optind]);
+ strcpy(input_filename,argv[optind+1]);
+ sscanf(argv[optind+2],"%d",&rah);
+ sscanf(argv[optind+3],"%d",&ram);
+ sscanf(argv[optind+4],"%f",&ras);
+ sscanf(argv[optind+5],"%d",&decd);
+ sscanf(argv[optind+6],"%d",&decm);
+ sscanf(argv[optind+7],"%f",&decs);
+
+
+ if ((input_file = fopen(input_filename,"r")) == NULL){
+ cf_if_error ("Unable to open file %s\n", input_filename);
+ }
+
+ /* Create the output file */
+ if ((output_file = fopen(output_filename,"w")) == NULL){
+ fclose(input_file);
+ cf_if_error ("Unable to create file %s\n", output_filename);
+ }
+
+ while(fscanf(input_file,"%lf %lf",&t,&v)!=EOF) {
+ t2=gethmjd(t, rah, ram, ras, decd, decm, decs);
+
+ fprintf(output_file,"%15lf %15lf\n",t2,v);
+ }
+
+ fclose(input_file);
+ fclose(output_file);
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished execution.");
+ return EXIT_SUCCESS;
+
+}
+
+
diff --git a/src/analysis/ttag_lightcurve_periodogram.c b/src/analysis/ttag_lightcurve_periodogram.c
new file mode 100644
index 0000000..939a1ec
--- /dev/null
+++ b/src/analysis/ttag_lightcurve_periodogram.c
@@ -0,0 +1,294 @@
+
+/****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ ****************************************************************************
+ *
+ *
+ * Usage:
+ * ttag_lightcurve_periodogram [-hs] [-v level] input_file output_file
+ * minf maxf stepf
+ *
+ *
+ * Arguments:
+ * input_file : an ASCII file with 2 columns :
+ * - time (days)
+ * - countrate
+ *
+ * output_file : an ASCII file with 2 columns :
+ * - frequency (Hz)
+ * - normalized estimated power spectral density
+ *
+ * minf : start frequency (Hz)
+ * maxf : end frequency (Hz)
+ * stepf : frequency step (Hz)
+ *
+ *
+ *
+ * Options:
+ * -h: this help message
+ * -v: verbosity level (=1; 0 is silent)
+ * -s: time is in seconds instead of days
+ *
+ *
+ **************************************************************************
+ *
+ *
+ *
+ * Description:
+ *
+ * Computes the Lomb periodogram of signal h
+ * from samples (hj) j=1..N at times (tj) j=1..N
+ *
+ *
+ * w=2*pi*f
+ *
+ *
+ *
+ * 1 / (sum_j[(hj-H)*cos(w(tj-tau))])^2
+ * Pn(w) = ----------- | ---------------------------------
+ * 2*sigma2 \ sum_j[(cos(w(tj-tau)))^2]
+ *
+ *
+ * (sum_j[(hj-H)*sin(w(tj-tau))])^2 \
+ * + --------------------------------- |
+ * sum_j[(cos(w(tj-tau)))^2] /
+ *
+ *
+ *
+ *
+ * H=sum_i[hi]/N sigma2=sum_i[(hi-H)^2]/(N-1)
+ *
+ *
+ * sum_j[sin(2*w*tj)]
+ * tan (2*w*tau) = ------------------
+ * sum_j[cos(2*w*tj)]
+ *
+ *
+ * PAINFULLY SLOW
+ * NEED TO BE REWRITTEN TO DO A FAST TRANSFORM (RECURSIVE)
+ *
+ *
+ *
+ *****************************************************************************
+ *
+ * History: 10/07/04 bjg v1.0
+ * 11/04/04 bjg v1.1
+ *
+ * ----v1.1 CHANGES WERE CANCELLED ---
+ * 12/06/04 bjg v1.2
+ * 12/13/04 bjg v1.3 Changed N and i to long
+ * Initialize N to 0
+ * 06/03/05 wvd v1.4 Delete unused variables.
+ *
+ *
+ ***************************************************************************/
+
+
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <time.h>
+#include <unistd.h>
+#include <math.h>
+
+
+#include "calfuse.h"
+
+
+static char CF_PRGM_ID[]= "ttag_lightcurve_periodogram";
+static char CF_VER_NUM[]= "1.1";
+
+
+
+int main(int argc,char *argv[]){
+
+
+
+ char input_filename[FLEN_CARD],output_filename[FLEN_CARD];
+
+ FILE * output_file;
+ FILE * input_file;
+
+ float minf,maxf;
+ float stepf;
+
+
+ double H;
+ double sigma2;
+ double tau;
+
+
+ double val1,val2;
+ double * t;
+ double * h;
+ double total1,total2,total3,total4;
+ double aux;
+ double Pn;
+ double f;
+ double j0=0;
+
+ long i, N;
+ long ndx;
+
+ int time_unit=0;
+
+ int optc;
+
+ char opts[] = "hsv:";
+
+ char usage[] =
+ "Usage:\n"
+ " ttag_lightcurve_periodogram [-hs] [-v level] input_file output_file\n"
+ " minf, maxf, stepf\n"
+ "Arguments:\n"
+ " input_file : an ASCII file with 2 columns :\n"
+ " - time (JD or MJD, Helio- or Geo-centric)\n"
+ " - countrate\n\n"
+ " output_file : an ASCII file with 2 columns :\n"
+ " - frequency (Hz)\n"
+ " - normalized estimated power spectral density\n\n"
+ " minf : start frequency (Hz)\n"
+ " maxf : end frequency (Hz)\n"
+ " stepf : frequency step (Hz)\n";
+
+ char option[] =
+ "Options:\n"
+ " -h: this help message\n"
+ " -v: verbosity level (=1; 0 is silent)\n"
+ " -s: time is in seconds instead of days\n";
+
+ verbose_level = 1;
+
+
+ /* Check number of options and arguments */
+ while ((optc = getopt(argc, argv, opts)) != -1) {
+ switch(optc) {
+ case 'h':
+ printf("%s\n%s", usage, option);
+ return EXIT_SUCCESS;
+ case 'v':
+ verbose_level = atoi(optarg);
+ break;
+ case 's':
+ time_unit=1;
+ break;
+ }
+ }
+
+ /* Initialize error checking. */
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ if (argc != optind+5)
+ cf_if_error("%s\nIncorrect number of program arguments", usage);
+
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Started execution.");
+
+ strcpy(input_filename,argv[optind]);
+ strcpy(output_filename,argv[optind+1]);
+ sscanf(argv[optind+2],"%f",&minf);
+ sscanf(argv[optind+3],"%f",&maxf);
+ sscanf(argv[optind+4],"%f",&stepf);
+
+
+
+ if ((input_file = fopen (input_filename, "r")) == NULL){
+ cf_if_error ("Unable to open file %s\n", input_filename);
+ }
+
+
+ N=0;
+ while (fscanf(input_file,"%lf %lf",&val1,&val2)!=EOF){
+ N++;
+ }
+
+ t=(double *)malloc(N*sizeof(double));
+ h=(double *)malloc(N*sizeof(double));
+
+
+ fseek(input_file,0,SEEK_SET);
+
+ i=0;
+ total1=0;
+ while (fscanf(input_file,"%lf %lf",&val1,&val2)!=EOF){
+ if (i==0) {
+ t[i]=0.0; j0=val1;
+ }
+ else {
+ if (time_unit) t[i]=val1-j0;
+ else t[i]=(val1-j0)*3600.0*24;
+ }
+
+ h[i]=val2;
+
+ total1+=h[i];
+
+ i++;
+
+ }
+
+ H=total1/N;
+
+ total1=0;
+ for (i=0;i<N;i++){
+ aux=(h[i]-H);
+ total1+=aux*aux;
+ }
+
+ sigma2=total1/(N-1);
+
+
+
+ if ((output_file = fopen(output_filename,"w")) == NULL){
+ fclose(input_file);
+ cf_if_error ("Unable to create file %s\n", output_filename);
+ }
+
+ ndx=0;
+ for (f=minf; f<=maxf; f+=stepf){
+ cf_verbose(4,"n=%ld;minf=%f;maxf=%f;freq=%lf",ndx,minf,maxf,f);
+ ndx++;
+ total1=0;
+ total2=0;
+ for (i=0;i<N;i++){
+ total1+=sin(4*M_PI*f*t[i]);
+ total2+=cos(4*M_PI*f*t[i]);
+ }
+
+
+ tau=atan(total1/total2)/(4*M_PI*f);
+
+
+
+ total1=0;
+ total2=0;
+ total3=0;
+ total4=0;
+
+ for (i=0;i<N;i++){
+ aux=cos(2*M_PI*f*(t[i]-tau));
+ total1+=(h[i]-H)*aux;
+ total2+=aux*aux;
+ aux=sin(2*M_PI*f*(t[i]-tau));
+ total3+=(h[i]-H)*aux;
+ total4+=aux*aux;
+ }
+
+ Pn=(total1*total1/total2+total3*total3/total4)/(2*sigma2);
+
+
+ fprintf(output_file,"%10lf %10lf\n",f,Pn);
+
+ }
+
+ fclose(input_file);
+ fclose(output_file);
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished execution.");
+ return EXIT_SUCCESS;
+
+}
+
+
diff --git a/src/cal/geom/Makefile.orig.orig b/src/cal/geom/Makefile.orig.orig
new file mode 100644
index 0000000..5b23afd
--- /dev/null
+++ b/src/cal/geom/Makefile.orig.orig
@@ -0,0 +1,43 @@
+VERSION= v1.8
+
+CALFUSEDIR= ${PWD}/../../..
+
+# Symbols for include directories
+FUSEINCLDIR= -I${CALFUSEDIR}/include
+
+# Symbols used for compiling
+CC= cc
+# Romelfanger's optimizations
+# OPT= -fast -xO5 -xtarget=ultra2 -xarch=v8plusa
+#
+# SunWorld's optimizations
+# OPT= -p -v -xO2 -xdepend -xchip=ultra -xarch=generic
+OPT= -g
+#OPT= -O -DCFORTRAN -KPIC -DSOLARIS
+CFLAGS= ${OPT} ${FUSEINCLDIR}
+
+# Symbols used for creating shared binaries
+FUSEBINDIR= ${CALFUSEDIR}/bin
+FUSELIBDIR= -L${CALFUSEDIR}/lib
+LIBDIR= -L/opt/SUNWspro/lib
+FUSELIBS= -lsla -lcfitsio -lcf
+LIBS= -lc -lm -lnsl -ldl -lsocket -lsunmath -lM77 -lF77
+LDFLAGS=
+
+# binaries to be made
+
+BINS= make_geom_file
+
+all: ${BINS}
+ chmod g+rw ${BINS}
+
+install: all
+ /bin/cp ${BINS} ${FUSEBINDIR}
+
+clean:
+ /bin/rm -f ${BINS}
+
+make_geom_file:
+ ${CC} ${CFLAGS} -o make_geom_file make_geom_file.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
diff --git a/src/cal/geom/make_geom_file b/src/cal/geom/make_geom_file
new file mode 100755
index 0000000..caf2ab1
--- /dev/null
+++ b/src/cal/geom/make_geom_file
Binary files differ
diff --git a/src/cal/geom/make_geom_file.c b/src/cal/geom/make_geom_file.c
new file mode 100644
index 0000000..52789e8
--- /dev/null
+++ b/src/cal/geom/make_geom_file.c
@@ -0,0 +1,185 @@
+/*******************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *******************************************************************************
+ *
+ * Synopsis: make_geom_file
+ *
+ * Description: Make the geom(Y distortion) file: copy the distortion
+ * image from a FITS file produced by Rich Robinson, and
+ * write it out in the format required by CALFUSE.
+ *
+ * Usage: make_geom_file version
+ *
+ * The program will read the files ydist_1a_2d.fit,
+ * ydist_1b_2d.fit, etc and write the files geom1axxx.fit
+ * (where xxx is the version number specified on the command line).
+ *
+ * The output file has an empty primary extension (containing
+ * just header keywords), an empty extension for X distortions
+ * (not presently used as such), and a full-size image containing
+ * the Y distortion as a function of position (FLOAT's).
+ *
+ * History: 10/19/00 jwk Begin work.
+ ******************************************************************************/
+
+#include <stdio.h>
+#include "calfuse.h"
+#define EFFMJD 50000.0
+#define NXMAX 16384
+#define NYMAX 1024
+
+static char CF_PRGM_ID[] = "make_geom_file";
+static char CF_VER_NUM[] = "1.1";
+
+
+int main(int argc, char *argv[])
+{
+ char *segment[]={"1A","1B","2A","2B"};
+ char *segments[]={"1a","1b","2a","2b"};
+ char extname[]="GEOMETRIC DISTORTION";
+ char infile[80];
+ char outfile[80];
+ int version;
+ int i, j, hdutype, status=0, nullval=0, anynull=0;
+ int ix, iy;
+ int ival;
+ int naxis;
+ long naxes[2];
+ int nxpix, nypix;
+ float effmjd;
+ float bscale, bzero, datamin, datamax;
+ float *inbuf;
+ fitsfile *geomfits, *infits;
+
+ /* Initialize error checking */
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+ if (argc != 2)
+ {
+ fprintf (stderr, "Usage: make_geom_file version\n");
+ exit (-1);
+ }
+
+ version = (int) strtol (argv[1], (char **) NULL, 10);
+ if ((version <0) || (version > 999))
+ {
+ fprintf (stderr, "Illegal version value: %s\n", argv[1]);
+ exit (-1);
+ }
+
+
+for (i=0; i<4; i++) { /* 1A,1B,2A,2B */
+ /* open the y-distortion file, move to first extension (the one with
+ the Y distortion image in it) */
+ sprintf(infile, "ydist_%2.2s_2d.fit", segments[i]);
+ FITS_open_file (&infits, infile, READONLY, &status);
+ FITS_movabs_hdu (infits, 2, &hdutype, &status);
+ FITS_read_key (infits, TINT, "NAXIS1", &nxpix, NULL, &status);
+ FITS_read_key (infits, TINT, "NAXIS2", &nypix, NULL, &status);
+ if (nxpix != NXMAX)
+ {
+ fprintf (stderr, "NAXIS1 = %d, not %d\n", nxpix, NXMAX);
+ exit (-1);
+ }
+
+ if (nypix != NYMAX)
+ {
+ fprintf (stderr, "NAXIS2 = %d, not %d\n", nypix, NYMAX);
+ exit (-1);
+ }
+
+ /* buffers to hold one row of data at a time */
+ inbuf = (float *) calloc (nxpix, sizeof(float));
+
+ /* create the output file */
+ naxis = 0;
+ naxes[0] = 0;
+ naxes[1] = 0;
+
+ sprintf(outfile,"geom%2.2s%03d.fit", segments[i], version);
+ printf("%20.20s\n",outfile);
+
+ FITS_create_file (&geomfits,outfile,&status);
+ FITS_create_img (geomfits, SHORT_IMG, naxis, naxes, &status);
+
+ /* populate basic keywords */
+ FITS_write_key (geomfits, TSTRING, "CALFTYPE", "GEOM",
+ "Calibration file type", &status);
+
+ FITS_write_key (geomfits,TINT,"CALFVERS",&version,
+ "Calibration file version", &status);
+
+ FITS_write_key (geomfits,TSTRING,"DETECTOR",segment[i],
+ "detector (1A, 1B, 2A, 2B", &status);
+
+ effmjd=EFFMJD;
+ FITS_write_key (geomfits,TFLOAT,"EFFMJD",&effmjd,
+ "Date on which file should be applied (MJD)", &status);
+
+ ival = 1;
+ FITS_write_key (geomfits, TINT, "SPECBINX", &ival,
+ "Binning in Detector X coordinate for HIST mode", &status);
+
+ FITS_write_key (geomfits, TINT, "SPECBINY", &ival,
+ "Binning in Detector Y coordinate for HIST mode", &status);
+
+ FITS_write_date (geomfits, &status);
+
+ FITS_write_key (geomfits,TSTRING,"AUTHOR","RICH ROBINSON",
+ "Author of file", &status);
+
+ /* create empty first extension (HDU 2) for X distortions;
+ * not used presently, but is kept for possible later use.
+ */
+ FITS_create_img (geomfits, SHORT_IMG, naxis, naxes, &status);
+ FITS_write_comment (geomfits, "No x correction for geometric distortion",
+ &status);
+
+ /* now create extension to hold Y distortions */
+ naxis = 2;
+ naxes[0] = nxpix;
+ naxes[1] = nypix;
+ bzero = 0.;
+ bscale = 0.01;
+ datamin = 0.;
+ datamax = 0.;
+
+ /* use SHORT_IMG to force bitpix=16 */
+ FITS_create_img (geomfits, SHORT_IMG, naxis, naxes, &status);
+ FITS_write_key (geomfits, TFLOAT, "BSCALE", &bscale, "Scale factor",
+ &status);
+ FITS_write_key (geomfits, TFLOAT, "BZERO", &bzero, "Zero level",
+ &status);
+
+ /* now loop over rows of distortion image */
+ for (iy=0; iy<nypix; iy++)
+ {
+ FITS_read_img (infits, TFLOAT, nxpix*iy+1, nxpix, &nullval,
+ inbuf, &anynull, &status);
+ for (ix=0; ix<nxpix; ix++)
+ {
+ if (inbuf[ix] < datamin)
+ datamin = inbuf[ix];
+ if (inbuf[ix] > datamax)
+ datamax = inbuf[ix];
+ }
+ /* cfitsio will do conversion to SHORT using bscale, bzero */
+ FITS_write_img (geomfits, TFLOAT, nxpix*iy+1, nxpix, inbuf, &status);
+ }
+
+ FITS_write_key (geomfits, TFLOAT, "DATAMIN", &datamin, "Minimum value",
+ &status);
+ FITS_write_key (geomfits, TFLOAT, "DATAMAX", &datamax, "Maximum value",
+ &status);
+
+
+ /* done with this segment */
+ FITS_close_file(geomfits, &status);
+ FITS_close_file(infits, &status);
+
+} /* end of loop over segments */
+
+ return 0;
+}
diff --git a/src/cal/get_tle/GetTLE.class b/src/cal/get_tle/GetTLE.class
new file mode 100644
index 0000000..6d32037
--- /dev/null
+++ b/src/cal/get_tle/GetTLE.class
Binary files differ
diff --git a/src/cal/get_tle/GetTLE.java b/src/cal/get_tle/GetTLE.java
new file mode 100644
index 0000000..68e88d3
--- /dev/null
+++ b/src/cal/get_tle/GetTLE.java
@@ -0,0 +1,110 @@
+/*
+ * GetTLE.java
+ *
+ * Created on January 16, 2005, 8:34 PM
+ */
+import java.net.URL;
+import java.net.URLConnection;
+import java.io.*;
+
+import java.util.Map;
+import java.util.List;
+/**
+ *
+ * @author fred
+ */
+public class GetTLE {
+
+ /** Creates a new instance of GetTLE */
+ public GetTLE() {
+ }
+
+ /**
+ * @param args the command line arguments
+ */
+ static final String host="www.space-track.org";
+ static final String loginURL="/perl/login.pl";
+ static final String dataURL="/perl/id_query.pl?ids=25791&timeframe=last5&common_name=yes&sort=catnum&descending=yes&ascii=yes&_submit=Submit&_submitted=1";
+ static final String username="mromelfanger";
+ static final String password="FuseJHU1";
+
+ static final String outputFile = "/data1/fuse/calfuse/caltemp/five.tle";
+ static final String logFile = "/data1/fuse/calfuse/caltemp/get_tle.logfile";
+/*
+ static final String outputFile = "/caltemp/five.tle";
+ static final String logFile = "/caltemp/get_tle.logfile";
+*/
+ public static void main(String[] args) {
+ // TODO code application logic here
+ try {
+ /*
+ * Open the login url and get the session cookie back.
+ */
+ PrintWriter log = new PrintWriter(new OutputStreamWriter(new FileOutputStream(logFile)));
+ PrintWriter out = new PrintWriter(new OutputStreamWriter(new FileOutputStream(outputFile)));
+
+ URL u = new URL("http://"+host+loginURL+"?username="+username+"&password="+password+"&_submitted=1&_submit=Submit");
+
+ URLConnection c = u.openConnection();
+ Map m = c.getHeaderFields();
+ List l = (List) m.get("Set-Cookie");
+ String session = null;
+ for(int i=0;i!=l.size();i++) {
+ String s = (String) l.get(i);
+ if(s.startsWith("spacetrack_session=")) {
+ int end = s.indexOf(";");
+ if(end < 0)
+ end = s.length();
+ session = s.substring(0, end);
+ break;
+ }
+ }
+ InputStream is = c.getInputStream();
+ BufferedReader br = new BufferedReader(new InputStreamReader(is));
+ String s;
+ while((s = br.readLine()) != null)
+ log.println(s);
+ is.close();
+
+ if(session == null) {
+ out.println("Could not get session id");
+ System.exit(1);
+ }
+
+ /*
+ * Use the session cookie to query for the fuse data.
+ */
+
+ u = new URL("http://"+host+dataURL);
+ c = u.openConnection();
+ c.setRequestProperty("Cookie", session);
+ is = c.getInputStream();
+ br = new BufferedReader(new InputStreamReader(is));
+ /*
+ * Read each line and keep what is between the pre's, add an extra
+ * line at the end.
+ */
+ boolean collect = false;
+ out.println();
+ while((s = br.readLine()) != null) {
+ log.println(s);
+ if(s.startsWith("<pre>")) {
+/* br.readLine(); */
+ collect = true;
+ } else if(s.startsWith("</pre>")) {
+ break;
+ } else if(collect) {
+ out.println(s);
+ }
+ }
+ out.println();
+ br.close();
+ is.close();
+ out.close();
+ log.close();
+
+ } catch (Throwable e) {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/src/cal/get_tle/add_tle.pl b/src/cal/get_tle/add_tle.pl
new file mode 100755
index 0000000..feaa1ba
--- /dev/null
+++ b/src/cal/get_tle/add_tle.pl
@@ -0,0 +1,182 @@
+#!/usr/local/bin/perl
+use FileHandle;
+
+# ***************************************************
+# add_tle.pl
+#
+# This Perl module will read in the latest five orbital elements
+# from the file five.tle (which was created by get_tle.pl) and
+# add any new orbital elements to the file FUSE.TLE. The file
+# FUSE.TLE is in descending order (i.e. the most recent elements
+# are first). In order to prepend the new TLE onto the old list
+# I found it was easiest to store everything in a temporary file
+# TEMP.TLE and rewrite FUSE.TLE.
+#
+# Author: Ed Murphy
+#
+# History: Written July 27, 1999
+#
+# ***************************************************
+
+# Define the file names. old_maintle_filename is not actually opened,
+# but is used in a system call at the end of the program.
+
+$input_filename = "/data1/fuse/calfuse/caltemp/five.tle";
+$maintle_filename = "/data1/fuse/calfuse/calfiles/FUSE.TLE";
+$old_maintle_filename = "/data1/fuse/calfuse/caltemp/FUSE.OLD";
+$temp_filename = "/data1/fuse/calfuse/caltemp/TEMP.TLE";
+
+# Open the files.
+open (TLE_INFILE, "<$input_filename") || die "Cannot open $input_filename";
+open (TLE_TEMPFILE, ">$temp_filename") || die "Cannot open $temp_filename";
+open (TLE_MAINFILE, "<$maintle_filename") || die "Cannot open $maintle_filename";
+
+# Read the first two lines from the maintle file to get the date of the
+# most recent set of TLEs. Save these lines for later output.
+ $lineout1 = <TLE_MAINFILE>;
+ $lineout2 = <TLE_MAINFILE>;
+ $last_date = substr($lineout2,18,14);
+
+# get rid of the blank line at the beginning of five.tle file
+ $line = <TLE_INFILE>;
+
+# Cycle through the five.tle file and look for files more recent than
+# last_date.
+ while ($line1 = <TLE_INFILE>) {
+ $sat_name = substr($line1,0,4);
+ $line2 = <TLE_INFILE>;
+ $line3 = <TLE_INFILE>;
+ $tle_date = substr($line2,18,14);
+ $id2 = substr($line2, 2, 5);
+ $id3 = substr($line3, 2, 5);
+ # if the TLE is more recent, print it out to the TEMP file.
+ if (($tle_date > $last_date+0.05) && ($sat_name eq "FUSE") && ($id2 == 25791) && ($id3 == 25791)) {
+ &check_tle;
+ print TLE_TEMPFILE $line1;
+ print TLE_TEMPFILE $line2;
+ print TLE_TEMPFILE $line3;
+ # Send this output to screen to make sure TLEs look OK
+ if ($tle_flag != 0) {
+ print STDOUT "ERROR: Possible error in TLE:\n";
+ }
+ print STDOUT "The new TLEs are:\n";
+ print STDOUT $line1;
+ print STDOUT $line2;
+ print STDOUT $line3;
+ }
+
+ }
+
+# Now add the MAINTLE file to the end of the TEMPFILE
+ print TLE_TEMPFILE $lineout1;
+ print TLE_TEMPFILE $lineout2;
+ while ($line1 = <TLE_MAINFILE>) {
+ print TLE_TEMPFILE $line1;
+ }
+
+ close (TLE_INFILE);
+ close (TLE_MAINFILE);
+ close (TLE_TEMPFILE);
+
+# Move the MAINFILE into the old_maintle filename
+# Move the TEMPFILE to be the MAINFILE
+# Remove the five.tle file.
+ system("mv $maintle_filename $old_maintle_filename");
+ system("mv $temp_filename $maintle_filename");
+ system("chmod ug+rw $maintle_filename");
+ system("chgrp sdp $maintle_filename");
+ system("rm -f $input_filename");
+
+### end of Perl script
+
+sub check_tle {
+
+ $tle_flag = 0;
+
+ &parse_lines;
+
+ &calculate_a0;
+
+ &calculate_orbs;
+
+ if (($mean_mot > 14.391) || ($mean_mot < 14.389)) {
+ $tle_flag = 1;
+ print STDOUT "Possible error in mean motion $mean_mot \n";
+ }
+ if (($incl > 24.990) || ($incl < 24.975)) {
+ $tle_flag = 1;
+ print STDOUT "Possible error in inclination $incl \n";
+ }
+ if (($eccen > 0.00120) || ($eccen < 0.00108)) {
+ $tle_flag = 1;
+ print STDOUT "Possible error in eccentricity $eccen \n";
+ }
+ if (($semiax > 7145.0) || ($semiax < 7143.0)) {
+ $tle_flag = 1;
+ print STDOUT "Possible error in semi-major axis $semia \n";
+ }
+ if (($apogee > 777.0) || ($apogee < 773.0)) {
+ $tle_flag = 1;
+ print STDOUT "Possible error in apogee $apogee \n";
+ }
+ if (($perigee > 760.0) || ($perigee < 756.0)) {
+ $tle_flag = 1;
+ print STDOUT "Possible error in perigee $perigee \n";
+ }
+
+}
+
+sub parse_lines {
+$year = substr($line2, 18, 2);
+$doy = substr($line2, 20, 3);
+$dayfrac = substr($line2, 23, 9);
+$epoch = $year.$doy.$dayfrac;
+$incl = substr($line3, 9, 8);
+$raan = substr($line3, 17,8);
+$eccen = substr($line3, 26, 7);
+$eccen = "0." . $eccen;
+$mean_mot = substr($line3, 52, 11);
+$mean_anom = substr($line3, 43, 8);
+$arg_perig = substr($line3, 34, 8);
+
+
+if ($year > 50) {
+ $year += 1900;
+} else {
+ $year += 2000;
+}
+
+$dayfrac = "0".$dayfrac;
+
+}
+
+sub calculate_a0 {
+
+$mu = 3.986005E5;
+$pi = 3.14159265358979;
+$radian = 0.0174532925200;
+
+$mm=2.0*$pi*$mean_mot/(24.0*60.0);
+$ke=0.74366916E-1;
+$k2=5.413080E-4;
+$a1=($ke/$mm)**(2.0/3.0);
+$inrad = $incl * $radian;
+
+$d1=3.0/2.0*$k2/($a1*$a1)*(3.0*cos($inrad)*cos($inrad)-1.0)/((1.0-$eccen*$eccen)
+**(3.0/2.0));
+$a0=$a1*(1.0-$d1/3.0-$d1*$d1-134.0/81.0*$d1*$d1*$d1);
+$d0=3.0/2.0*$k2/($a0*$a0)*(3.0*cos($inrad)*cos($inrad)-1.0)/((1.0-$eccen*$eccen)
+**(3.0/2.0));
+$semiax=$a0/(1-$d0)*6378.135;
+
+}
+
+sub calculate_orbs {
+
+$period = 60.0*24.0/($mean_mot/(1+$d0));
+$cax=$eccen*$semiax;
+$perigee=$semiax-$cax-6378.1;
+$apogee=$semiax+$cax-6378.1;
+
+}
+
diff --git a/src/cal/get_tle/check_tle.dat b/src/cal/get_tle/check_tle.dat
new file mode 100644
index 0000000..ded4897
--- /dev/null
+++ b/src/cal/get_tle/check_tle.dat
@@ -0,0 +1,266 @@
+108.630 773.22 757.14 7143.28 310.64 24.9828 305.80 54.35 0.001125
+107.936 773.22 757.16 7143.29 314.88 24.9826 313.12 47.02 0.001124
+107.867 773.22 757.16 7143.29 315.30 24.9827 313.87 46.28 0.001124
+105.856 772.97 757.43 7143.30 327.59 24.9817 337.06 23.03 0.001087
+104.677 773.01 757.42 7143.31 334.78 24.9813 348.70 11.35 0.001091
+103.915 772.84 757.59 7143.32 339.44 24.9810 358.03 2.03 0.001068
+103.013 772.85 757.61 7143.33 344.94 24.9809 7.16 352.88 0.001067
+101.973 772.85 757.64 7143.34 351.29 24.9805 17.95 342.06 0.001064
+101.072 772.84 757.67 7143.36 356.79 24.9805 27.25 332.74 0.001062
+100.101 772.84 757.70 7143.37 2.72 24.9799 37.24 322.74 0.001059
+ 99.130 773.00 757.58 7143.39 8.65 24.9798 48.68 311.27 0.001079
+ 98.090 773.16 757.45 7143.41 15.00 24.9802 60.36 299.58 0.001099
+ 97.120 773.16 757.49 7143.42 20.93 24.9804 69.96 289.97 0.001097
+ 96.149 773.25 757.43 7143.44 26.85 24.9807 79.94 279.99 0.001108
+ 95.178 773.40 757.32 7143.46 32.78 24.9813 89.08 270.85 0.001125
+ 94.207 773.53 757.22 7143.47 38.70 24.9816 98.83 261.09 0.001142
+ 92.197 773.67 757.14 7143.50 50.98 24.9822 118.15 241.78 0.001157
+ 90.186 773.65 757.20 7143.53 63.26 24.9830 138.68 221.29 0.001151
+ 89.284 773.57 757.31 7143.54 68.76 24.9832 148.16 211.82 0.001138
+ 88.314 773.61 757.29 7143.55 74.68 24.9836 157.56 202.45 0.001142
+ 88.036 773.64 757.27 7143.55 76.38 24.9839 159.74 200.27 0.001145
+ 87.204 773.59 757.33 7143.56 81.46 24.9841 168.20 191.82 0.001138
+ 86.234 773.53 757.41 7143.57 87.38 24.9842 178.62 181.43 0.001128
+ 84.223 773.35 757.62 7143.59 99.66 24.9845 199.98 160.11 0.001101
+ 83.183 773.34 757.65 7143.59 106.01 24.9846 210.82 149.29 0.001098
+ 82.212 773.34 757.66 7143.60 111.93 24.9846 220.83 139.30 0.001097
+ 81.172 773.32 757.68 7143.60 118.29 24.9843 231.47 128.68 0.001095
+ 80.201 773.31 757.70 7143.61 124.21 24.9841 241.32 118.84 0.001092
+ 79.230 773.35 757.67 7143.61 130.14 24.9837 251.65 108.52 0.001098
+ 77.219 773.26 757.78 7143.62 142.42 24.9829 271.35 88.83 0.001084
+ 75.555 773.24 757.83 7143.64 152.58 24.9825 288.59 71.58 0.001079
+ 73.614 773.17 757.93 7143.65 164.43 24.9823 308.84 51.31 0.001066
+ 72.643 773.11 758.02 7143.66 170.35 24.9825 319.25 40.88 0.001056
+ 71.672 773.11 758.04 7143.67 176.28 24.9826 329.64 30.47 0.001055
+ 70.563 773.10 758.06 7143.68 183.05 24.9828 341.75 18.33 0.001053
+ 68.690 773.13 758.08 7143.70 194.48 24.9834 1.83 358.22 0.001053
+ 67.720 773.15 758.07 7143.71 200.41 24.9838 12.56 347.47 0.001055
+ 66.749 773.21 758.03 7143.72 206.34 24.9838 22.58 337.42 0.001062
+ 65.778 773.26 758.00 7143.73 212.26 24.9841 33.40 326.58 0.001068
+ 64.807 773.34 757.94 7143.74 218.19 24.9845 43.65 316.32 0.001078
+ 63.767 773.41 757.88 7143.75 224.54 24.9849 54.50 305.45 0.001087
+ 63.559 773.45 757.85 7143.75 225.81 24.9850 56.77 303.17 0.001091
+ 61.826 773.42 757.90 7143.76 236.39 24.9855 73.30 286.63 0.001086
+ 60.855 773.42 757.92 7143.77 242.32 24.9863 83.21 276.72 0.001085
+ 59.884 773.48 757.87 7143.78 248.25 24.9869 92.80 267.12 0.001093
+ 58.913 773.49 757.88 7143.78 254.18 24.9873 102.62 257.31 0.001092
+ 57.942 773.58 757.79 7143.79 260.11 24.9875 112.13 247.80 0.001105
+ 56.625 773.64 757.74 7143.79 268.15 24.9875 125.73 234.21 0.001113
+ 55.862 773.67 757.72 7143.79 272.80 24.9873 133.77 226.19 0.001116
+ 54.683 773.63 757.76 7143.80 280.00 24.9871 146.42 213.56 0.001111
+ 53.990 773.61 757.79 7143.80 284.23 24.9870 153.72 206.27 0.001108
+ 53.019 773.71 757.70 7143.80 290.16 24.9867 163.70 196.32 0.001120
+ 52.048 773.76 757.64 7143.80 296.08 24.9868 173.55 186.48 0.001128
+ 51.910 773.76 757.65 7143.81 296.93 24.9870 174.86 185.18 0.001127
+ 48.858 774.02 757.42 7143.82 315.55 24.9866 205.59 154.52 0.001162
+ 48.096 774.05 757.39 7143.82 320.21 24.9864 213.26 146.87 0.001166
+ 47.125 774.07 757.38 7143.83 326.13 24.9864 222.86 137.28 0.001168
+ 46.154 774.07 757.40 7143.84 332.06 24.9866 232.86 127.29 0.001167
+ 45.183 774.02 757.47 7143.84 337.98 24.9869 242.57 117.60 0.001159
+ 44.212 773.95 757.56 7143.85 343.91 24.9869 253.00 107.18 0.001147
+ 42.201 773.81 757.73 7143.87 356.18 24.9867 274.98 85.20 0.001125
+ 41.924 773.72 757.83 7143.87 357.88 24.9866 278.32 81.86 0.001112
+ 41.161 773.74 757.82 7143.88 2.53 24.9865 286.72 73.45 0.001114
+ 40.190 773.68 757.89 7143.89 8.46 24.9864 297.63 62.54 0.001105
+ 38.318 773.62 757.98 7143.90 19.88 24.9860 318.17 41.97 0.001095
+ 35.198 773.64 757.97 7143.91 38.93 24.9862 351.29 8.78 0.001097
+ 34.227 773.65 757.96 7143.91 44.85 24.9863 1.51 358.53 0.001099
+ 33.187 773.86 757.77 7143.91 51.23 24.9855 12.74 347.28 0.001126
+ 32.216 773.88 757.74 7143.91 57.15 24.9855 22.82 337.18 0.001129
+ 31.176 773.89 757.74 7143.91 63.50 24.9852 33.70 326.28 0.001130
+ 30.205 773.92 757.71 7143.92 69.43 24.9850 44.30 315.66 0.001134
+ 29.442 773.94 757.70 7143.92 74.09 24.9849 52.57 307.37 0.001136
+ 27.431 773.34 758.31 7143.93 86.33 24.9851 73.56 286.42 0.001052
+ 25.559 774.03 757.63 7143.93 97.79 24.9844 93.91 266.01 0.001148
+ 23.617 774.17 757.50 7143.94 109.65 24.9842 114.41 245.52 0.001166
+ 22.577 774.22 757.46 7143.94 116.00 24.9839 125.22 234.72 0.001174
+ 22.300 774.22 757.46 7143.94 117.69 24.9838 128.12 231.82 0.001174
+ 21.537 774.27 757.42 7143.94 122.35 24.9840 136.11 223.85 0.001179
+ 20.427 774.36 757.34 7143.95 129.12 24.9842 147.36 212.62 0.001191
+ 19.664 774.32 757.39 7143.96 133.78 24.9840 155.40 204.60 0.001184
+ 18.624 774.28 757.44 7143.96 140.13 24.9842 165.98 194.03 0.001178
+ 17.445 774.31 757.43 7143.97 147.32 24.9848 177.35 182.70 0.001181
+ 14.533 774.04 757.74 7143.99 165.10 24.9856 206.71 153.40 0.001141
+ 13.562 773.98 757.81 7143.99 171.03 24.9857 217.11 143.02 0.001132
+ 12.730 773.96 757.83 7144.00 176.10 24.9854 226.43 133.71 0.001128
+ 11.620 773.94 757.86 7144.00 182.88 24.9855 238.36 121.80 0.001125
+ 10.719 773.96 757.85 7144.00 188.38 24.9854 248.31 111.86 0.001127
+ 9.887 773.95 757.86 7144.00 193.45 24.9854 257.17 103.01 0.001126
+ 6.835 773.86 757.96 7144.01 212.05 24.9869 286.17 74.05 0.001113
+ 5.934 774.02 757.80 7144.01 217.58 24.9856 299.57 60.59 0.001135
+ 5.865 774.02 757.81 7144.01 218.00 24.9857 300.38 59.78 0.001134
+ 4.963 773.98 757.84 7144.01 223.51 24.9860 309.90 50.25 0.001130
+ 3.992 773.96 757.87 7144.02 229.43 24.9861 320.27 39.87 0.001126
+ 3.021 773.98 757.85 7144.02 235.36 24.9860 330.38 29.74 0.001129
+ 1.981 773.99 757.84 7144.02 241.71 24.9860 341.22 18.87 0.001130
+ 1.010 773.98 757.86 7144.02 247.64 24.9859 351.36 8.71 0.001128
+363.098 773.92 757.93 7144.02 265.41 24.9851 21.54 338.46 0.001120
+362.127 773.92 757.94 7144.03 271.34 24.9849 32.01 327.97 0.001118
+361.156 773.92 757.94 7144.03 277.27 24.9846 42.52 317.45 0.001118
+360.116 773.94 757.93 7144.04 283.62 24.9844 53.54 306.41 0.001120
+359.145 773.95 757.93 7144.04 289.54 24.9844 63.93 296.01 0.001121
+357.203 774.01 757.90 7144.05 301.39 24.9845 84.75 275.17 0.001128
+355.192 774.13 757.80 7144.07 313.67 24.9845 105.27 254.65 0.001143
+354.915 774.16 757.77 7144.07 315.36 24.9845 108.09 251.84 0.001147
+354.152 774.20 757.75 7144.07 320.02 24.9845 115.78 244.15 0.001151
+353.181 774.16 757.80 7144.08 325.94 24.9845 125.81 234.14 0.001145
+352.210 774.18 757.79 7144.09 331.87 24.9843 135.40 224.55 0.001147
+351.170 774.20 757.79 7144.10 338.22 24.9847 145.76 214.22 0.001148
+350.338 774.21 757.79 7144.10 343.30 24.9846 154.42 205.57 0.001149
+350.199 774.23 757.78 7144.10 344.14 24.9848 155.57 204.42 0.001151
+348.396 774.19 757.84 7144.11 355.15 24.9849 174.28 185.76 0.001144
+348.188 774.19 757.84 7144.11 356.42 24.9851 176.05 184.00 0.001144
+347.217 774.17 757.87 7144.12 2.34 24.9852 185.78 174.28 0.001141
+346.247 774.15 757.90 7144.12 8.27 24.9852 195.83 164.25 0.001138
+344.235 774.12 757.95 7144.13 20.54 24.9851 216.22 143.91 0.001131
+343.195 774.07 758.00 7144.14 26.89 24.9849 226.99 133.15 0.001125
+342.155 774.04 758.03 7144.14 33.24 24.9847 238.08 122.08 0.001120
+341.531 774.05 758.04 7144.14 37.05 24.9847 244.57 115.60 0.001120
+341.184 773.98 758.11 7144.14 39.16 24.9845 248.20 111.97 0.001111
+340.213 773.97 758.12 7144.15 45.09 24.9844 258.31 101.87 0.001109
+339.242 773.97 758.13 7144.15 51.01 24.9842 268.63 91.55 0.001109
+337.578 773.99 758.12 7144.16 61.17 24.9838 286.25 73.92 0.001110
+337.509 774.00 758.11 7144.16 61.59 24.9838 286.85 73.32 0.001112
+336.538 774.05 758.07 7144.16 67.52 24.9835 297.10 63.07 0.001118
+335.914 774.07 758.05 7144.16 71.33 24.9832 303.71 56.45 0.001121
+334.665 774.05 758.08 7144.17 78.94 24.9829 316.75 43.39 0.001118
+333.556 774.09 758.05 7144.17 85.72 24.9828 328.26 31.85 0.001123
+332.724 774.16 757.99 7144.18 90.79 24.9822 336.99 23.11 0.001132
+330.713 774.27 757.90 7144.19 103.07 24.9815 357.78 2.28 0.001146
+330.019 774.33 757.86 7144.20 107.31 24.9813 4.95 355.09 0.001152
+329.534 774.34 757.86 7144.20 110.27 24.9818 10.30 349.73 0.001153
+328.008 774.38 757.85 7144.21 119.58 24.9820 25.82 334.17 0.001156
+326.829 774.52 757.73 7144.22 126.78 24.9826 38.70 321.27 0.001175
+325.511 774.64 757.62 7144.23 134.85 24.9847 55.33 304.60 0.001191
+322.807 774.75 757.54 7144.25 151.36 24.9836 84.57 275.34 0.001204
+321.628 774.77 757.54 7144.25 158.55 24.9837 96.97 262.94 0.001205
+320.796 774.73 757.59 7144.26 163.62 24.9836 105.46 254.44 0.001200
+318.992 774.59 757.75 7144.27 174.62 24.9830 125.36 234.58 0.001179
+318.854 774.55 757.78 7144.27 175.47 24.9833 127.12 232.82 0.001174
+316.981 774.65 757.74 7144.30 186.90 24.9842 146.44 213.53 0.001183
+316.773 774.86 757.57 7144.31 188.17 24.9851 145.45 214.48 0.001210
+316.010 774.46 757.93 7144.30 192.83 24.9823 153.10 206.89 0.001157
+314.069 774.51 757.91 7144.31 204.67 24.9828 173.02 187.01 0.001162
+313.098 774.52 757.91 7144.32 210.60 24.9828 183.20 176.86 0.001162
+312.127 774.53 757.91 7144.32 216.52 24.9830 193.37 166.71 0.001163
+311.087 774.49 757.96 7144.33 222.87 24.9827 203.97 156.14 0.001157
+310.116 774.40 758.06 7144.33 228.79 24.9823 213.77 146.35 0.001144
+309.145 774.36 758.10 7144.33 234.72 24.9823 223.68 136.46 0.001138
+308.174 774.37 758.10 7144.34 240.64 24.9823 233.84 126.31 0.001138
+307.203 774.35 758.13 7144.34 246.56 24.9824 243.91 116.26 0.001135
+306.163 774.32 758.18 7144.35 252.91 24.9827 254.83 105.35 0.001129
+305.261 774.31 758.19 7144.35 258.41 24.9828 264.22 95.96 0.001128
+302.140 774.24 758.30 7144.37 277.45 24.9830 296.47 63.70 0.001115
+301.239 774.23 758.31 7144.37 282.95 24.9829 306.01 54.14 0.001114
+300.198 774.21 758.35 7144.38 289.30 24.9829 317.27 42.87 0.001110
+299.158 774.03 758.53 7144.38 295.66 24.9835 328.16 31.95 0.001085
+298.118 774.07 758.50 7144.38 302.00 24.9832 339.36 20.73 0.001089
+297.216 774.07 758.51 7144.39 307.50 24.9833 349.08 10.99 0.001089
+295.274 773.98 758.61 7144.40 319.36 24.9834 9.95 350.08 0.001076
+294.165 774.02 758.58 7144.40 326.13 24.9829 21.44 338.56 0.001080
+293.194 774.01 758.60 7144.40 332.05 24.9828 31.55 328.43 0.001078
+292.778 774.01 758.60 7144.41 334.59 24.9827 35.88 324.10 0.001078
+292.154 774.07 758.55 7144.41 338.40 24.9826 43.52 316.44 0.001086
+291.183 774.21 758.42 7144.42 344.33 24.9822 53.84 306.11 0.001105
+289.518 774.24 758.41 7144.43 354.48 24.9823 71.32 288.61 0.001108
+288.478 774.25 758.42 7144.43 0.83 24.9826 82.47 277.46 0.001108
+286.883 774.35 758.34 7144.44 10.56 24.9828 99.39 260.53 0.001120
+285.496 774.38 758.32 7144.45 19.02 24.9830 113.65 246.28 0.001124
+284.664 774.37 758.34 7144.46 24.10 24.9832 122.42 237.53 0.001122
+283.970 774.37 758.35 7144.46 28.33 24.9830 129.71 230.25 0.001122
+280.711 774.40 758.35 7144.47 48.22 24.9832 163.02 196.99 0.001123
+280.017 774.41 758.34 7144.48 52.45 24.9831 170.35 189.68 0.001124
+279.740 774.46 758.29 7144.48 54.15 24.9833 172.76 187.27 0.001132
+278.769 774.41 758.35 7144.48 60.08 24.9828 182.98 177.08 0.001124
+278.075 774.36 758.40 7144.48 64.31 24.9826 190.47 169.60 0.001117
+276.757 774.34 758.43 7144.49 72.35 24.9823 204.41 155.69 0.001113
+276.480 774.39 758.38 7144.48 74.05 24.9818 207.10 153.01 0.001121
+275.578 774.38 758.40 7144.49 79.55 24.9819 216.89 143.24 0.001118
+272.596 774.25 758.55 7144.50 97.75 24.9821 248.02 112.15 0.001099
+271.833 774.34 758.46 7144.50 102.42 24.9829 255.10 105.08 0.001112
+270.932 774.24 758.57 7144.50 107.92 24.9833 263.95 96.23 0.001097
+269.822 773.92 758.90 7144.51 114.70 24.9836 274.80 85.36 0.001051
+268.643 773.94 758.88 7144.51 121.89 24.9835 287.13 73.04 0.001054
+267.880 774.13 758.70 7144.51 126.54 24.9836 295.09 65.08 0.001079
+266.909 774.10 758.74 7144.52 132.46 24.9837 305.28 54.87 0.001075
+266.008 774.09 758.75 7144.52 137.96 24.9838 314.68 45.45 0.001074
+265.037 774.11 758.73 7144.52 143.89 24.9838 325.03 35.09 0.001077
+264.066 774.08 758.77 7144.52 149.81 24.9841 335.51 24.59 0.001072
+263.095 774.09 758.76 7144.53 155.74 24.9841 345.72 14.36 0.001073
+262.887 774.10 758.76 7144.53 157.01 24.9842 348.34 11.74 0.001073
+260.113 774.22 758.65 7144.54 173.94 24.9841 17.33 342.68 0.001089
+259.072 774.27 758.61 7144.54 180.29 24.9841 28.03 331.96 0.001096
+258.171 774.30 758.58 7144.54 185.79 24.9841 37.84 322.14 0.001101
+256.159 774.38 758.51 7144.54 198.06 24.9843 59.30 300.64 0.001110
+255.188 774.42 758.46 7144.54 203.99 24.9841 69.80 290.13 0.001117
+254.217 774.50 758.39 7144.54 209.91 24.9838 80.42 279.50 0.001128
+252.137 774.49 758.41 7144.55 222.61 24.9838 102.32 257.60 0.001125
+251.166 774.57 758.33 7144.55 228.53 24.9838 112.36 247.57 0.001136
+250.334 774.60 758.30 7144.55 233.61 24.9836 121.18 238.76 0.001141
+250.126 774.58 758.32 7144.55 234.88 24.9837 123.34 236.60 0.001138
+249.224 774.62 758.28 7144.55 240.38 24.9836 132.83 227.12 0.001144
+248.184 774.63 758.28 7144.56 246.73 24.9836 143.64 216.33 0.001144
+247.143 774.65 758.28 7144.56 253.08 24.9835 154.31 205.69 0.001146
+246.242 774.69 758.24 7144.57 258.58 24.9836 163.59 196.43 0.001151
+244.161 774.68 758.28 7144.58 271.28 24.9840 184.46 175.60 0.001148
+243.260 774.68 758.28 7144.58 276.78 24.9841 193.50 166.58 0.001148
+242.150 774.65 758.33 7144.59 283.55 24.9841 205.10 155.01 0.001143
+241.456 774.65 758.33 7144.59 287.78 24.9841 212.47 147.65 0.001142
+238.543 774.56 758.45 7144.60 305.56 24.9851 241.95 118.21 0.001128
+237.434 774.52 758.49 7144.61 312.33 24.9853 253.55 106.63 0.001122
+236.463 774.43 758.59 7144.61 318.26 24.9853 263.34 96.84 0.001109
+236.255 774.41 758.62 7144.61 319.53 24.9853 265.51 94.67 0.001105
+235.284 774.40 758.63 7144.61 325.45 24.9852 275.96 84.22 0.001103
+233.619 774.37 758.67 7144.62 335.61 24.9853 293.75 66.41 0.001099
+232.510 774.27 758.77 7144.62 342.38 24.9859 305.48 54.68 0.001085
+230.706 774.36 758.69 7144.62 353.38 24.9854 324.79 35.33 0.001096
+229.597 774.30 758.75 7144.62 0.16 24.9857 336.89 23.20 0.001088
+228.487 774.28 758.77 7144.62 6.93 24.9853 348.47 11.61 0.001085
+227.724 774.33 758.72 7144.63 11.58 24.9851 356.38 3.68 0.001093
+223.563 774.42 758.65 7144.63 36.97 24.9842 41.92 318.04 0.001104
+218.639 774.71 758.38 7144.65 67.02 24.9828 92.62 267.30 0.001143
+216.974 774.83 758.27 7144.65 77.18 24.9829 110.10 249.82 0.001159
+215.726 774.62 758.48 7144.65 84.79 24.9823 122.86 237.09 0.001130
+213.992 774.63 758.50 7144.66 95.37 24.9829 140.93 219.04 0.001129
+213.021 774.72 758.42 7144.67 101.29 24.9830 150.66 209.33 0.001141
+212.882 774.76 758.38 7144.67 102.14 24.9832 151.72 208.27 0.001146
+211.079 774.92 758.23 7144.68 113.14 24.9832 170.09 189.94 0.001168
+210.108 774.90 758.26 7144.68 119.07 24.9830 180.03 180.02 0.001164
+209.137 774.92 758.24 7144.68 124.99 24.9829 190.07 170.00 0.001167
+208.859 774.88 758.28 7144.68 126.68 24.9830 192.78 167.30 0.001162
+208.166 774.88 758.29 7144.68 130.92 24.9829 200.09 160.00 0.001161
+207.126 774.81 758.36 7144.68 137.26 24.9830 210.54 149.58 0.001151
+206.155 774.77 758.40 7144.69 143.19 24.9831 220.62 139.52 0.001146
+205.114 774.74 758.44 7144.69 149.54 24.9835 231.12 129.03 0.001141
+204.213 774.68 758.50 7144.69 155.04 24.9835 240.13 120.03 0.001132
+203.172 774.62 758.57 7144.69 161.38 24.9835 250.92 109.26 0.001123
+202.132 774.57 758.62 7144.69 167.73 24.9837 261.69 98.49 0.001117
+201.161 774.54 758.65 7144.70 173.66 24.9837 271.78 88.39 0.001113
+200.190 774.54 758.65 7144.70 179.58 24.9838 281.91 78.26 0.001112
+200.121 774.52 758.67 7144.70 180.04 24.9842 284.37 75.80 0.001110
+199.219 774.51 758.68 7144.70 185.54 24.9840 293.67 66.50 0.001107
+198.179 774.47 758.73 7144.70 191.89 24.9844 304.62 55.53 0.001102
+197.208 774.43 758.77 7144.70 197.81 24.9845 315.10 45.03 0.001097
+196.167 774.41 758.80 7144.70 204.16 24.9848 326.28 33.84 0.001093
+195.404 774.40 758.81 7144.70 208.81 24.9845 334.28 25.82 0.001091
+195.266 774.39 758.81 7144.70 209.66 24.9847 335.90 24.21 0.001091
+194.225 774.39 758.82 7144.71 216.00 24.9849 347.09 12.99 0.001089
+193.185 774.39 758.82 7144.71 222.35 24.9850 358.14 1.91 0.001090
+192.145 774.40 758.82 7144.71 228.70 24.9850 9.20 350.84 0.001091
+191.243 774.42 758.80 7144.71 234.20 24.9852 18.68 341.33 0.001093
+189.578 774.47 758.75 7144.71 244.35 24.9847 35.63 324.35 0.001100
+188.538 774.53 758.70 7144.72 250.70 24.9847 46.49 313.47 0.001108
+187.567 774.56 758.68 7144.72 256.62 24.9847 56.72 303.22 0.001111
+187.220 774.58 758.66 7144.72 258.73 24.9849 60.33 299.61 0.001115
+186.596 774.58 758.66 7144.72 262.54 24.9848 66.84 293.09 0.001114
+185.556 774.61 758.64 7144.73 268.89 24.9850 77.79 282.14 0.001118
+184.585 774.64 758.62 7144.73 274.81 24.9851 87.90 272.03 0.001121
+183.614 774.64 758.63 7144.73 280.73 24.9851 98.00 261.93 0.001120
+182.643 774.66 758.62 7144.74 286.65 24.9852 108.11 251.82 0.001123
+181.533 774.65 758.63 7144.74 293.42 24.9851 119.74 240.20 0.001121
+180.423 774.66 758.64 7144.75 300.19 24.9851 131.33 228.62 0.001121
+179.730 774.66 758.64 7144.75 304.42 24.9851 138.60 221.36 0.001121
+178.689 774.66 758.65 7144.76 310.76 24.9851 149.51 210.48 0.001120
+178.551 774.66 758.65 7144.76 311.61 24.9851 150.96 209.03 0.001120
+177.926 774.68 758.64 7144.76 315.41 24.9853 157.55 202.45 0.001123
+176.955 774.50 758.84 7144.77 321.34 24.9860 169.04 190.98 0.001096
diff --git a/src/cal/get_tle/check_tle.pl b/src/cal/get_tle/check_tle.pl
new file mode 100755
index 0000000..483692e
--- /dev/null
+++ b/src/cal/get_tle/check_tle.pl
@@ -0,0 +1,100 @@
+#!/usr/local/bin/perl
+use FileHandle;
+
+# ***************************************************
+# add_tle.pl
+#
+# This Perl module will read in the latest five orbital elements
+# from the file five.tle (which was created by get_tle.pl) and
+# add any new orbital elements to the file FUSE.TLE.
+#
+# Author: Ed Murphy
+#
+# History: Written July 27, 1999
+#
+# ***************************************************
+
+# Define the file names. old_maintle_filename is not actually opened,
+# but is used in a system call at the end of the program.
+
+$maintle_filename = "/data1/fuse/calfuse/calfiles/FUSE.TLE";
+$outtle_filename = "check_tle.dat";
+
+# Open the files.
+open (TLE_MAINFILE, "<$maintle_filename") || die "Cannot open $maintle_filename";
+open (TLE_OUT, ">$outtle_filename") || die "Cannot open $outtle_filename";
+
+# Read the first two lines from the maintle file to get the date of the
+# most recent set of TLEs. Save these lines for later output.
+while ($line1 = <TLE_MAINFILE>) {
+ $line2 = <TLE_MAINFILE>;
+ $line3 = <TLE_MAINFILE>;
+
+ &parse_lines;
+
+ &calculate_a0;
+ &calculate_orbs;
+
+ printf TLE_OUT "%7.3f %6.2f %6.2f %7.2f %6.2f %7.4f %6.2f %6.2f %8.6f\n",$day, $apogee, $perigee, $semiax, $raan, $incl, $mean_anom, $arg_perig, $eccen;
+
+}
+
+ close (TLE_MAINFILE);
+ close (TLE_OUT);
+
+### end of Perl script
+
+
+sub parse_lines {
+$year = substr($line2, 18, 2);
+$doy = substr($line2, 20, 3);
+$dayfrac = substr($line2, 23, 9);
+$day=$doy.$dayfrac;
+$epoch = $year.$doy.$dayfrac;
+$incl = substr($line3, 9, 8);
+$raan = substr($line3, 17,8);
+$eccen = substr($line3, 26, 7);
+$eccen = "0." . $eccen;
+$mean_mot = substr($line3, 52, 11);
+$mean_anom = substr($line3, 43, 8);
+$arg_perig = substr($line3, 34, 8);
+
+
+if ($year > 50) {
+ $year += 1900;
+} else {
+ $year += 2000;
+}
+
+$dayfrac = "0".$dayfrac;
+
+}
+
+sub calculate_a0 {
+
+$mu = 3.986005E5;
+$pi = 3.14159265358979;
+$radian = 0.0174532925200;
+
+$mm=2.0*$pi*$mean_mot/(24.0*60.0);
+$ke=0.74366916E-1;
+$k2=5.413080E-4;
+$a1=($ke/$mm)**(2.0/3.0);
+$inrad = $incl * $radian;
+
+$d1=3.0/2.0*$k2/($a1*$a1)*(3.0*cos($inrad)*cos($inrad)-1.0)/((1.0-$eccen*$eccen)**(3.0/2.0));
+$a0=$a1*(1.0-$d1/3.0-$d1*$d1-134.0/81.0*$d1*$d1*$d1);
+$d0=3.0/2.0*$k2/($a0*$a0)*(3.0*cos($inrad)*cos($inrad)-1.0)/((1.0-$eccen*$eccen)**(3.0/2.0));
+$semiax=$a0/(1-$d0)*6378.135;
+
+}
+
+sub calculate_orbs {
+
+$period = 60.0*24.0/($mean_mot/(1+$d0));
+$cax=$eccen*$semiax;
+$perigee=$semiax-$cax-6378.1;
+$apogee=$semiax+$cax-6378.1;
+
+}
+
diff --git a/src/cal/get_tle/check_tle.pro b/src/cal/get_tle/check_tle.pro
new file mode 100644
index 0000000..5388d9d
--- /dev/null
+++ b/src/cal/get_tle/check_tle.pro
@@ -0,0 +1,73 @@
+;
+fname='check_tle.dat'
+get_lun,unit0
+openr,unit0,fname
+day=fltarr(1000)
+apogee=fltarr(1000)
+perigee=fltarr(1000)
+semiax=fltarr(1000)
+raan=fltarr(1000)
+incl=fltarr(1000)
+mean_anom=fltarr(1000)
+arg_perig=fltarr(1000)
+eccen=fltarr(1000)
+d=0.0
+a=0.0
+p=0.0
+sem=0.0
+ra=0.0
+inc=0.0
+ma=0.0
+ap=0.0
+ec=0.0
+j=0
+while (not EOF(unit0)) do begin
+ readf,unit0,d,a,p,sem,ra,inc,ma,ap,ec
+ day[j]=d
+ apogee[j]=a
+ perigee[j]=p
+ semiax[j]=sem
+ raan[j]=ra
+ incl[j]=inc
+ mean_anom[j]=ma
+ arg_perig[j]=ap
+ eccen[j]=ec
+ j=j+1
+endwhile
+day=day(0:j-1)
+apogee=apogee(0:j-1)
+perigee=perigee(0:j-1)
+semiax=semiax(0:j-1)
+raan=raan(0:j-1)
+incl=incl(0:j-1)
+mean_anom=mean_anom(0:j-1)
+arg_perig=arg_perig(0:j-1)
+eccen=eccen(0:j-1)
+close,unit0
+free_lun,unit0
+!x.title='Day of Year 1999'
+!y.title='Arbitrary units'
+!p.title='FUSE Orbital Elements'
+!x.style=1
+!y.range=[0,1000]
+!x.range=[170,day(0)+10]
+!p.charsize=1.7
+!p.linestyle=0
+plot,day,apogee
+oplot,day,perigee
+oplot,day,semiax*100.0-714470.0+700.0
+oplot,day,raan*2.0
+oplot,day,incl*3500.0-87445.0+900.0
+oplot,day,mean_anom*2.0
+oplot,day,arg_perig*2.0
+oplot,day,eccen/2E-6
+xyouts,day(0),apogee(0),"Apogee",charsize=1.0
+xyouts,day(0),perigee(0),"Perigee",charsize=1.0
+xyouts,day(0),semiax(0)*100.0-714470.0+700.0,"Semimajor axis*100",charsize=1.0
+xyouts,day(0),raan(0)*2.0,"RAAN*2",charsize=1.0
+xyouts,day(0),incl(0)*3500.0-87445.0+900.0,"incl*3500",charsize=1.0
+xyouts,day(0),mean_anom(0)*2.0,"mean anomaly*2",charsize=1.0
+xyouts,day(0),arg_perig(0)*2.0,"argument of perigee*2",charsize=1.0
+xyouts,day(0),eccen(0)/2E-6,"eccen/2E-6",charsize=1.0
+
+end
diff --git a/src/cal/get_tle/get_tle.pl b/src/cal/get_tle/get_tle.pl
new file mode 100755
index 0000000..33b72e5
--- /dev/null
+++ b/src/cal/get_tle/get_tle.pl
@@ -0,0 +1,148 @@
+#!/usr/local/bin/perl
+use FileHandle;
+use IPC::Open2;
+
+###
+# OIG TLE retrieval program
+# DJG - 6/14/98
+#
+# Uses a file called "one" which has sat numbers to get
+#
+# Places all output in a single file called "five.tle".
+#
+###
+
+### Configure:
+##$login = "emurphy";
+##$passwd = "bdr529";
+
+$login = "mromelfanger";
+$passwd = "fusejhu";
+$output_filename = "/data1/fuse/calfuse/caltemp/five.tle";
+$log_filename = "/data1/fuse/calfuse/caltemp/get_tle.logfile";
+
+### (end of configure section)
+
+# system("fixlist one tempone");
+# chop($satstoget = `cat tempone`);
+# system("rm -f tempone");
+
+$satstoget = "25791";
+
+# The "output" file collects debugging copies of everything that comes back.
+open(OUT,">$log_filename") || die "Could not open output file";
+
+# The following logs in to OIG and gets the first "continue" code
+
+$host = "oig1.gsfc.nasa.gov";
+#$url = "scripts/foxweb.dll/loginok\@app01?tdac=&ffv01=$login&ffv02=$passwd";
+$url = "scripts/foxweb.exe/loginok\@app01?tdac=&ffv01=$login&ffv02=$passwd";
+
+open2 (\*Reader, \*Writer, "telnet $host 80") || die "Error opening connection";
+Writer->autoflush();
+
+print Reader "telnet $host 80\n";
+print Writer "GET \/$url\n";
+while (<Reader>) {
+ print OUT "$_"; # copy each login screen line to the output file
+ if (/tdac=(\w+)\"/) {
+ $continuecode = $1; # This code is the "continue" code
+ }
+}
+close(Reader);
+close(Writer);
+
+# $continuecode contains the very first "continue" code after login.
+
+print OUT "*** \n Starting User's Home Page output page \n***\n\n";
+
+# This url accesses the next screen (user home page)
+#$url = "scripts/foxweb.dll/favorhome\@app01?tdac=" . $continuecode;
+$url = "scripts/foxweb.exe/favorhome\@app01?tdac=" . $continuecode;
+# print $url; # debug print
+
+open2 (\*Reader, \*Writer, "telnet $host 80") || die "Error opening connection";
+Writer->autoflush();
+
+print Reader "telnet $host 80\n";
+print Writer "GET \/$url\n";
+
+while (<Reader>) {
+ print OUT "$_"; # copy each line to the output file
+
+ if(/tdac=(\w+)\"/) {
+
+# Look for the "tle ad hoc query" code and save it
+ chop($word = "$_");
+ if ($word =~ /ftleadhoc.+tdac=(\w+)\"/) {
+ $tlequerycode = "$1";
+ }
+ }
+}
+# close(HOMEPAGE);
+# This access is to the "TLE ad hoc query" web page.
+#$url = "scripts/foxweb.dll/ftleadhoc\@app01?tdac=" . $tlequerycode;
+$url = "scripts/foxweb.exe/ftleadhoc\@app01?tdac=" . $tlequerycode;
+
+open2 (\*Reader, \*Writer, "telnet $host 80") || die "Error opening connection";
+Writer->autoflush();
+
+print Reader "telnet $host 80\n";
+print Writer "GET \/$url\n";
+
+while (<Reader>) {
+ print OUT "$_"; # copy each login screen line to the output file
+
+ # Look for the TLE "submit" code
+ chop($word = "$_");
+ if ($word =~ /tdac\" VALUE=\"(\w+)\"/) {
+ $gotcode2 = "$1";
+ }
+}
+close(Reader);
+close(Writer);
+
+# Compose the TLE query and submit it
+#$url = "scripts/foxweb.dll/ftleadhoc\@app01?tdac=" . $gotcode2;
+$url = "scripts/foxweb.exe/ftleadhoc\@app01?tdac=" . $gotcode2;
+$url .= "&ffv01=" . $satstoget . "&ffv02=standard&ffv03=catno&ffv04=five";
+
+# print "$url\n"; # debug print
+
+# Read the reply and copy the relevant lines to output_filename
+
+$copy = "no";
+open(TLEOUT,">$output_filename") || die "Error opening $output_filename";
+
+open2 (\*Reader, \*Writer, "telnet $host 80") || die "Error opening connection";
+Writer->autoflush();
+
+print Reader "telnet $host 80\n";
+print Writer "GET \/$url\n";
+
+while (<Reader>) {
+ if ($_ =~ /<P>/) { # End copy operation
+ print "$_"; # write remaining limit to output file
+ $copy = "no";
+ }
+ if ($copy eq "yes") {
+ print TLEOUT "$_"; # copy every line to five.tle
+ # print "$_"; # and to the terminal
+ }
+ if (substr($_,0,5) eq "<PRE>") { # Begin copy operation
+ $copy = "yes";
+ }
+}
+close(Reader);
+close(Writer);
+close(TLEOUT);
+
+# The following will remove all session files. You can comment it
+# out for debugging.
+# system("rm -f output");
+
+# The following script "fixes up" the output
+# system("fix/do.fix.one");
+
+### end of Perl script
+
diff --git a/src/cal/get_tle/get_tle.pl.OIG b/src/cal/get_tle/get_tle.pl.OIG
new file mode 100755
index 0000000..33b72e5
--- /dev/null
+++ b/src/cal/get_tle/get_tle.pl.OIG
@@ -0,0 +1,148 @@
+#!/usr/local/bin/perl
+use FileHandle;
+use IPC::Open2;
+
+###
+# OIG TLE retrieval program
+# DJG - 6/14/98
+#
+# Uses a file called "one" which has sat numbers to get
+#
+# Places all output in a single file called "five.tle".
+#
+###
+
+### Configure:
+##$login = "emurphy";
+##$passwd = "bdr529";
+
+$login = "mromelfanger";
+$passwd = "fusejhu";
+$output_filename = "/data1/fuse/calfuse/caltemp/five.tle";
+$log_filename = "/data1/fuse/calfuse/caltemp/get_tle.logfile";
+
+### (end of configure section)
+
+# system("fixlist one tempone");
+# chop($satstoget = `cat tempone`);
+# system("rm -f tempone");
+
+$satstoget = "25791";
+
+# The "output" file collects debugging copies of everything that comes back.
+open(OUT,">$log_filename") || die "Could not open output file";
+
+# The following logs in to OIG and gets the first "continue" code
+
+$host = "oig1.gsfc.nasa.gov";
+#$url = "scripts/foxweb.dll/loginok\@app01?tdac=&ffv01=$login&ffv02=$passwd";
+$url = "scripts/foxweb.exe/loginok\@app01?tdac=&ffv01=$login&ffv02=$passwd";
+
+open2 (\*Reader, \*Writer, "telnet $host 80") || die "Error opening connection";
+Writer->autoflush();
+
+print Reader "telnet $host 80\n";
+print Writer "GET \/$url\n";
+while (<Reader>) {
+ print OUT "$_"; # copy each login screen line to the output file
+ if (/tdac=(\w+)\"/) {
+ $continuecode = $1; # This code is the "continue" code
+ }
+}
+close(Reader);
+close(Writer);
+
+# $continuecode contains the very first "continue" code after login.
+
+print OUT "*** \n Starting User's Home Page output page \n***\n\n";
+
+# This url accesses the next screen (user home page)
+#$url = "scripts/foxweb.dll/favorhome\@app01?tdac=" . $continuecode;
+$url = "scripts/foxweb.exe/favorhome\@app01?tdac=" . $continuecode;
+# print $url; # debug print
+
+open2 (\*Reader, \*Writer, "telnet $host 80") || die "Error opening connection";
+Writer->autoflush();
+
+print Reader "telnet $host 80\n";
+print Writer "GET \/$url\n";
+
+while (<Reader>) {
+ print OUT "$_"; # copy each line to the output file
+
+ if(/tdac=(\w+)\"/) {
+
+# Look for the "tle ad hoc query" code and save it
+ chop($word = "$_");
+ if ($word =~ /ftleadhoc.+tdac=(\w+)\"/) {
+ $tlequerycode = "$1";
+ }
+ }
+}
+# close(HOMEPAGE);
+# This access is to the "TLE ad hoc query" web page.
+#$url = "scripts/foxweb.dll/ftleadhoc\@app01?tdac=" . $tlequerycode;
+$url = "scripts/foxweb.exe/ftleadhoc\@app01?tdac=" . $tlequerycode;
+
+open2 (\*Reader, \*Writer, "telnet $host 80") || die "Error opening connection";
+Writer->autoflush();
+
+print Reader "telnet $host 80\n";
+print Writer "GET \/$url\n";
+
+while (<Reader>) {
+ print OUT "$_"; # copy each login screen line to the output file
+
+ # Look for the TLE "submit" code
+ chop($word = "$_");
+ if ($word =~ /tdac\" VALUE=\"(\w+)\"/) {
+ $gotcode2 = "$1";
+ }
+}
+close(Reader);
+close(Writer);
+
+# Compose the TLE query and submit it
+#$url = "scripts/foxweb.dll/ftleadhoc\@app01?tdac=" . $gotcode2;
+$url = "scripts/foxweb.exe/ftleadhoc\@app01?tdac=" . $gotcode2;
+$url .= "&ffv01=" . $satstoget . "&ffv02=standard&ffv03=catno&ffv04=five";
+
+# print "$url\n"; # debug print
+
+# Read the reply and copy the relevant lines to output_filename
+
+$copy = "no";
+open(TLEOUT,">$output_filename") || die "Error opening $output_filename";
+
+open2 (\*Reader, \*Writer, "telnet $host 80") || die "Error opening connection";
+Writer->autoflush();
+
+print Reader "telnet $host 80\n";
+print Writer "GET \/$url\n";
+
+while (<Reader>) {
+ if ($_ =~ /<P>/) { # End copy operation
+ print "$_"; # write remaining limit to output file
+ $copy = "no";
+ }
+ if ($copy eq "yes") {
+ print TLEOUT "$_"; # copy every line to five.tle
+ # print "$_"; # and to the terminal
+ }
+ if (substr($_,0,5) eq "<PRE>") { # Begin copy operation
+ $copy = "yes";
+ }
+}
+close(Reader);
+close(Writer);
+close(TLEOUT);
+
+# The following will remove all session files. You can comment it
+# out for debugging.
+# system("rm -f output");
+
+# The following script "fixes up" the output
+# system("fix/do.fix.one");
+
+### end of Perl script
+
diff --git a/src/cal/get_tle/get_tle.pl.orig b/src/cal/get_tle/get_tle.pl.orig
new file mode 100755
index 0000000..28f9229
--- /dev/null
+++ b/src/cal/get_tle/get_tle.pl.orig
@@ -0,0 +1,144 @@
+#!/usr/local/bin/perl
+use FileHandle;
+use IPC::Open2;
+
+###
+# OIG TLE retrieval program
+# DJG - 6/14/98
+#
+# Uses a file called "one" which has sat numbers to get
+#
+# Places all output in a single file called "five.tle".
+#
+###
+
+### Configure:
+##$login = "emurphy";
+##$passwd = "bdr529";
+
+$login = "mromelfanger";
+$passwd = "fusejhu";
+$output_filename = "/data1/fuse/calfuse/caltemp/five.tle";
+$log_filename = "/data1/fuse/calfuse/caltemp/get_tle.logfile";
+
+### (end of configure section)
+
+# system("fixlist one tempone");
+# chop($satstoget = `cat tempone`);
+# system("rm -f tempone");
+
+$satstoget = "25791";
+
+# The "output" file collects debugging copies of everything that comes back.
+open(OUT,">$log_filename") || die "Could not open output file";
+
+# The following logs in to OIG and gets the first "continue" code
+
+$host = "oig1.gsfc.nasa.gov";
+$url = "scripts/foxweb.dll/loginok\@app01?tdac=&ffv01=$login&ffv02=$passwd";
+
+open2 (\*Reader, \*Writer, "telnet $host 80") || die "Error opening connection";
+Writer->autoflush();
+
+print Reader "telnet $host 80\n";
+print Writer "GET \/$url\n";
+while (<Reader>) {
+ print OUT "$_"; # copy each login screen line to the output file
+ if (/tdac=(\w+)\"/) {
+ $continuecode = $1; # This code is the "continue" code
+ }
+}
+close(Reader);
+close(Writer);
+
+# $continuecode contains the very first "continue" code after login.
+
+print OUT "*** \n Starting User's Home Page output page \n***\n\n";
+
+# This url accesses the next screen (user home page)
+$url = "scripts/foxweb.dll/favorhome\@app01?tdac=" . $continuecode;
+# print $url; # debug print
+
+open2 (\*Reader, \*Writer, "telnet $host 80") || die "Error opening connection";
+Writer->autoflush();
+
+print Reader "telnet $host 80\n";
+print Writer "GET \/$url\n";
+
+while (<Reader>) {
+ print OUT "$_"; # copy each line to the output file
+
+ if(/tdac=(\w+)\"/) {
+
+# Look for the "tle ad hoc query" code and save it
+ chop($word = "$_");
+ if ($word =~ /ftleadhoc.+tdac=(\w+)\"/) {
+ $tlequerycode = "$1";
+ }
+ }
+}
+# close(HOMEPAGE);
+# This access is to the "TLE ad hoc query" web page.
+$url = "scripts/foxweb.dll/ftleadhoc\@app01?tdac=" . $tlequerycode;
+
+open2 (\*Reader, \*Writer, "telnet $host 80") || die "Error opening connection";
+Writer->autoflush();
+
+print Reader "telnet $host 80\n";
+print Writer "GET \/$url\n";
+
+while (<Reader>) {
+ print OUT "$_"; # copy each login screen line to the output file
+
+ # Look for the TLE "submit" code
+ chop($word = "$_");
+ if ($word =~ /tdac\" VALUE=\"(\w+)\"/) {
+ $gotcode2 = "$1";
+ }
+}
+close(Reader);
+close(Writer);
+
+# Compose the TLE query and submit it
+$url = "scripts/foxweb.dll/ftleadhoc\@app01?tdac=" . $gotcode2;
+$url .= "&ffv01=" . $satstoget . "&ffv02=standard&ffv03=catno&ffv04=five";
+
+# print "$url\n"; # debug print
+
+# Read the reply and copy the relevant lines to output_filename
+
+$copy = "no";
+open(TLEOUT,">$output_filename") || die "Error opening $output_filename";
+
+open2 (\*Reader, \*Writer, "telnet $host 80") || die "Error opening connection";
+Writer->autoflush();
+
+print Reader "telnet $host 80\n";
+print Writer "GET \/$url\n";
+
+while (<Reader>) {
+ if ($_ =~ /<P>/) { # End copy operation
+ print "$_"; # write remaining limit to output file
+ $copy = "no";
+ }
+ if ($copy eq "yes") {
+ print TLEOUT "$_"; # copy every line to five.tle
+ # print "$_"; # and to the terminal
+ }
+ if (substr($_,0,5) eq "<PRE>") { # Begin copy operation
+ $copy = "yes";
+ }
+}
+close(Reader);
+close(Writer);
+close(TLEOUT);
+
+# The following will remove all session files. You can comment it
+# out for debugging.
+# system("rm -f output");
+
+# The following script "fixes up" the output
+# system("fix/do.fix.one");
+
+### end of Perl script
+
diff --git a/src/cal/get_tle/get_tle.pl.space-track b/src/cal/get_tle/get_tle.pl.space-track
new file mode 100755
index 0000000..60e59d5
--- /dev/null
+++ b/src/cal/get_tle/get_tle.pl.space-track
@@ -0,0 +1,148 @@
+#!/usr/local/bin/perl
+use FileHandle;
+use IPC::Open2;
+
+###
+# OIG TLE retrieval program
+# DJG - 6/14/98
+#
+# Uses a file called "one" which has sat numbers to get
+#
+# Places all output in a single file called "five.tle".
+#
+###
+
+### Configure:
+##$login = "emurphy";
+##$passwd = "bdr529";
+
+$login = "mromelfanger";
+$passwd = "FuseJHU1";
+$output_filename = "/data1/fuse/calfuse/caltemp/five.tle";
+$log_filename = "/data1/fuse/calfuse/caltemp/get_tle.logfile";
+
+### (end of configure section)
+
+# system("fixlist one tempone");
+# chop($satstoget = `cat tempone`);
+# system("rm -f tempone");
+
+$satstoget = "25791";
+
+# The "output" file collects debugging copies of everything that comes back.
+open(OUT,">$log_filename") || die "Could not open output file";
+
+# The following logs in to OIG and gets the first "continue" code
+
+$host = "www.space-track.org";
+#$url = "scripts/foxweb.dll/loginok\@app01?tdac=&ffv01=$login&ffv02=$passwd";
+$url = "scripts/foxweb.exe/loginok\@app01?tdac=&ffv01=$login&ffv02=$passwd";
+
+open2 (\*Reader, \*Writer, "telnet $host 80") || die "Error opening connection";
+Writer->autoflush();
+
+print Reader "telnet $host 80\n";
+print Writer "GET \/$url\n";
+while (<Reader>) {
+ print OUT "$_"; # copy each login screen line to the output file
+ if (/tdac=(\w+)\"/) {
+ $continuecode = $1; # This code is the "continue" code
+ }
+}
+close(Reader);
+close(Writer);
+
+# $continuecode contains the very first "continue" code after login.
+
+print OUT "*** \n Starting User's Home Page output page \n***\n\n";
+
+# This url accesses the next screen (user home page)
+#$url = "scripts/foxweb.dll/favorhome\@app01?tdac=" . $continuecode;
+$url = "scripts/foxweb.exe/favorhome\@app01?tdac=" . $continuecode;
+# print $url; # debug print
+
+open2 (\*Reader, \*Writer, "telnet $host 80") || die "Error opening connection";
+Writer->autoflush();
+
+print Reader "telnet $host 80\n";
+print Writer "GET \/$url\n";
+
+while (<Reader>) {
+ print OUT "$_"; # copy each line to the output file
+
+ if(/tdac=(\w+)\"/) {
+
+# Look for the "tle ad hoc query" code and save it
+ chop($word = "$_");
+ if ($word =~ /ftleadhoc.+tdac=(\w+)\"/) {
+ $tlequerycode = "$1";
+ }
+ }
+}
+# close(HOMEPAGE);
+# This access is to the "TLE ad hoc query" web page.
+#$url = "scripts/foxweb.dll/ftleadhoc\@app01?tdac=" . $tlequerycode;
+$url = "scripts/foxweb.exe/ftleadhoc\@app01?tdac=" . $tlequerycode;
+
+open2 (\*Reader, \*Writer, "telnet $host 80") || die "Error opening connection";
+Writer->autoflush();
+
+print Reader "telnet $host 80\n";
+print Writer "GET \/$url\n";
+
+while (<Reader>) {
+ print OUT "$_"; # copy each login screen line to the output file
+
+ # Look for the TLE "submit" code
+ chop($word = "$_");
+ if ($word =~ /tdac\" VALUE=\"(\w+)\"/) {
+ $gotcode2 = "$1";
+ }
+}
+close(Reader);
+close(Writer);
+
+# Compose the TLE query and submit it
+#$url = "scripts/foxweb.dll/ftleadhoc\@app01?tdac=" . $gotcode2;
+$url = "scripts/foxweb.exe/ftleadhoc\@app01?tdac=" . $gotcode2;
+$url .= "&ffv01=" . $satstoget . "&ffv02=standard&ffv03=catno&ffv04=five";
+
+# print "$url\n"; # debug print
+
+# Read the reply and copy the relevant lines to output_filename
+
+$copy = "no";
+open(TLEOUT,">$output_filename") || die "Error opening $output_filename";
+
+open2 (\*Reader, \*Writer, "telnet $host 80") || die "Error opening connection";
+Writer->autoflush();
+
+print Reader "telnet $host 80\n";
+print Writer "GET \/$url\n";
+
+while (<Reader>) {
+ if ($_ =~ /<P>/) { # End copy operation
+ print "$_"; # write remaining limit to output file
+ $copy = "no";
+ }
+ if ($copy eq "yes") {
+ print TLEOUT "$_"; # copy every line to five.tle
+ # print "$_"; # and to the terminal
+ }
+ if (substr($_,0,5) eq "<PRE>") { # Begin copy operation
+ $copy = "yes";
+ }
+}
+close(Reader);
+close(Writer);
+close(TLEOUT);
+
+# The following will remove all session files. You can comment it
+# out for debugging.
+# system("rm -f output");
+
+# The following script "fixes up" the output
+# system("fix/do.fix.one");
+
+### end of Perl script
+
diff --git a/src/cal/get_tle/make_cvzramtool.pl b/src/cal/get_tle/make_cvzramtool.pl
new file mode 100755
index 0000000..4cb2e01
--- /dev/null
+++ b/src/cal/get_tle/make_cvzramtool.pl
@@ -0,0 +1,215 @@
+#!/usr/local/bin/perl
+use FileHandle;
+
+# This program will read in the latest FUSE TLE and recreate the
+# cvz_ram_tool.html web page.
+
+$output_filename = "/data2/violet/htdocs/support/tools/cvz_ram_tool.html";
+open (OUTF, ">$output_filename") || die "Cannot open cvz_ram_tool.html file";
+
+system("chmod ug+rw $output_filename");
+system("chgrp www $output_filename");
+
+$input_filename = "/data1/fuse/calfuse/calfiles/FUSE.TLE";
+open (INP_TLE, "<$input_filename") || die "Cannot open FUSE.TLE file";
+
+$line1 = <INP_TLE>;
+$line2 = <INP_TLE>;
+$line3 = <INP_TLE>;
+
+$id2 = substr($line2, 2, 5);
+$id3 = substr($line3, 2, 5);
+
+if (($id2 != 25791) || ($id3 != 25791)) {
+ print STDOUT "Error in TLE:\n";
+ print STDOUT $line1;
+ print STDOUT $line2;
+ print STDOUT $line3;
+ die "Error in TLE";
+}
+
+close (INP_TLE);
+
+$year = substr($line2, 18, 2);
+$doy = substr($line2, 20, 3);
+$dayfrac = substr($line2, 23, 9);
+$incl = substr($line3, 9, 8);
+$raan = substr($line3, 17,8);
+$eccen = substr($line3, 26, 7);
+$eccen = "0." . $eccen;
+$mean_mot = substr($line3, 52, 11);
+
+if ($year > 50) {
+ $year += 1900;
+} else {
+ $year += 2000;
+}
+
+$dayfrac = "0".$dayfrac;
+
+&convert_doy;
+&convert_dayfrac;
+&calculate_a0;
+
+$now=`date`;
+$datest = substr($now,4,3)." ".substr($now,8,2).", ".substr($now,24,4);
+
+print OUTF "<TITLE>FUSE CVZ/Ram Calculator</TITLE>\n";
+print OUTF "<h1>FUSE Continuous Viewing Zone and Orbit Ram Calculator V1.3</h1>\n";
+print OUTF "<h2>June 12, 1999 </h2>\n";
+
+print OUTF "The FUSE Continuous Viewing Zone and Orbit Ram \n";
+print OUTF "Calculator can determine when a given target \n";
+print OUTF "direction is in the continuous viewing zone. \n";
+print OUTF "It also calculates when a given target lies \n";
+print OUTF "within 20 degrees of the orbital plane and \n";
+print OUTF "cannot be observed due to ram avoidance\n";
+print OUTF "constraints. The default orbital elements \n";
+print OUTF "were last updated on $month $day, $year. \n";
+
+print OUTF "<HR>\n";
+print OUTF "<P>\n";
+print OUTF "<FORM METHOD=POST ACTION=\"http://fuse.pha.jhu.edu/cgi-bin/cvz_ram_tool\">\n";
+
+print OUTF "<INPUT TYPE=\"submit\" VALUE=\"Calculate CVZ visibilities\">\n";
+print OUTF "<INPUT TYPE=\"reset\" VALUE=\"Erase the input fields\">\n";
+print OUTF "<BR>\n";
+
+print OUTF "<BR>\n";
+print OUTF "<B>Target Parameters:</B>\n";
+print OUTF "<BLOCKQUOTE>\n";
+print OUTF "<BR>\n";
+print OUTF "<B>Right Ascension (format HH:MM:SS.SS):</B>\n";
+print OUTF "<INPUT NAME=\"right_ascension\" SIZE=15> <B>(J2000.0)</B>\n";
+print OUTF "<BR>\n";
+print OUTF "<B>Declination (format -DD:MM:SS.S):</B>\n";
+print OUTF "<INPUT NAME=\"declination\" SIZE=15> <B>(J2000.0)</B>\n";
+print OUTF "<BR>\n";
+print OUTF "</BLOCKQUOTE>\n";
+print OUTF "<BR>\n";
+print OUTF "<B>Output table parameters:</B>\n";
+print OUTF "<BLOCKQUOTE>\n";
+print OUTF "<B> Minimum Earth limb angle: </B><INPUT NAME=\"limb_ang\" SIZE=4 VALUE=\"15.0\"> \n";
+print OUTF "<B>(deg)</B>\n";
+print OUTF "<BR>\n";
+print OUTF "<B>Start Date:</B>\n";
+print OUTF "<SELECT NAME=\"month\">\n";
+print OUTF "<OPTION> <B>$month</B>\n";
+print OUTF "<OPTION> January\n";
+print OUTF "<OPTION> February\n";
+print OUTF "<OPTION> March\n";
+print OUTF "<OPTION> April\n";
+print OUTF "<OPTION> May\n";
+print OUTF "<OPTION> June\n";
+print OUTF "<OPTION> July\n";
+print OUTF "<OPTION> August\n";
+print OUTF "<OPTION> September\n";
+print OUTF "<OPTION> October\n";
+print OUTF "<OPTION> November\n";
+print OUTF "<OPTION> December\n";
+print OUTF "</SELECT>\n";
+print OUTF "<INPUT NAME=\"day\" SIZE=4 VALUE=\"1\">\n";
+print OUTF "<INPUT NAME=\"year\" SIZE=8 VALUE=\"$year\">\n";
+print OUTF "<BR>\n";
+print OUTF "<B>Time step:<INPUT NAME=\"time_step\" SIZE=6 VALUE=\"1.0\">days</B><BR>\n";
+print OUTF "<B>Number of steps:<INPUT NAME=\"number_steps\" SIZE=6 VALUE=\"10\"></B><BR>\n";
+print OUTF "</BLOCKQUOTE>\n";
+print OUTF "<BR>\n";
+print OUTF "<B>FUSE classical Keplarian orbital elements:</B>\n";
+print OUTF "<BLOCKQUOTE>\n";
+print OUTF "<B>Epoch date of elements:</B>\n";
+print OUTF "<SELECT NAME=\"orb_month\">\n";
+print OUTF "<OPTION> $month\n";
+print OUTF "<OPTION> January\n";
+print OUTF "<OPTION> February\n";
+print OUTF "<OPTION> March\n";
+print OUTF "<OPTION> April\n";
+print OUTF "<OPTION> May\n";
+print OUTF "<OPTION> June\n";
+print OUTF "<OPTION> July\n";
+print OUTF "<OPTION> August\n";
+print OUTF "<OPTION> September\n";
+print OUTF "<OPTION> October\n";
+print OUTF "<OPTION> November\n";
+print OUTF "<OPTION> December\n";
+print OUTF "</SELECT>\n";
+print OUTF "<INPUT NAME=\"orb_day\" SIZE=4 VALUE=\"$day\">\n";
+print OUTF "<INPUT NAME=\"orb_year\" SIZE=8 VALUE=\"$year\">\n";
+print OUTF "<BR>\n";
+print OUTF "<B>Epoch UT time of elements (format HH:MM:SS.SS):</B>\n";
+printf OUTF "<INPUT NAME=\"orb_time\" SIZE=12 VALUE=\"%02d:%02d:%05.2f\">\n",$hour,$minute,$second;
+print OUTF "<BR>\n";
+print OUTF "<B>Semi-major axis (km):</B>\n";
+printf OUTF "<INPUT NAME=\"orb_a\" SIZE=15 value=\"%7.3f\"> \n",$semiax;
+print OUTF "<BR>\n";
+print OUTF "<B>Right ascension of the ascending node (degrees):</B>\n";
+print OUTF "<INPUT NAME=\"orb_raan\" SIZE=15 value=\"$raan\">\n";
+print OUTF "<BR>\n";
+print OUTF "<B>Orbit inclination (degrees):</B>\n";
+print OUTF "<INPUT NAME=\"orb_i\" SIZE=15 value=\"$incl\">\n";
+print OUTF "<BR>\n";
+print OUTF "<B>Eccentricity:</B>\n";
+print OUTF "<INPUT NAME=\"orb_e\" SIZE=15 value=\"$eccen\"> \n";
+print OUTF "</BLOCKQUOTE>\n";
+print OUTF "<BR>\n";
+print OUTF "<INPUT TYPE=\"submit\" VALUE=\"Calculate CVZ visibilities\">\n";
+print OUTF "<INPUT TYPE=\"reset\" VALUE=\"Erase the input fields\">\n";
+print OUTF "</FORM>\n";
+
+print OUTF "<HR>\n";
+print OUTF "This page uses the <a href=\"http://star-www.rl.ac.uk/\"> STARLINK </a>\n";
+print OUTF "set of astronomical subroutines.\n";
+print OUTF "<BR>\n";
+print OUTF "This page was automatically generated on $now";
+print OUTF "<BR>\n";
+print OUTF "<a href=\"mailto:emurphy\@pha.jhu.edu\"><address>emurphy\@pha.jhu.edu</address></a>\n";
+
+close (OUTF);
+
+### end of Perl script
+
+
+sub convert_doy {
+ @daytab1 = (0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
+ @daytab2 = (0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
+ @monthstr = ("", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
+
+ if ((($year%4 == 0) && ($year%100 != 0)) || ($year%400 == 0)) {
+ # $year is a leap year use daytab1
+ for ($i = 1; $doy > $daytab1[$i]; $i++) {
+ $doy -= $daytab1[$i];
+ }
+ } else {
+ # $year is not a leap year, use daytab2
+ for ($i = 1; $doy > $daytab2[$i]; $i++) {
+ $doy -= $daytab2[$i];
+ }
+ }
+ $month = $monthstr[$i];
+ $day = $doy;
+}
+
+sub convert_dayfrac {
+ $dayfrac *= 24.0;
+ $hour = int($dayfrac);
+ $minute = int(($dayfrac-$hour)*60.0);
+ $second = ((($dayfrac-$hour)*60.0)-$minute)*60.0;
+}
+
+sub calculate_a0 {
+
+$mu = 3.986005E5;
+$pi = 3.14159265358979;
+$radian = 0.0174532925200;
+
+$mm=2.0*$pi*$mean_mot/(24.0*60.0);
+$ke=0.74366916E-1;
+$k2=5.413080E-4;
+$a1=($ke/$mm)**(2.0/3.0);
+$inrad = $incl * $radian;
+
+$d1=3.0/2.0*$k2/($a1*$a1)*(3.0*cos($inrad)*cos($inrad)-1.0)/((1.0-$eccen*$eccen)**(3.0/2.0));
+$a0=$a1*(1.0-$d1/3.0-$d1*$d1-134.0/81.0*$d1*$d1*$d1);
+$d0=3.0/2.0*$k2/($a0*$a0)*(3.0*cos($inrad)*cos($inrad)-1.0)/((1.0-$eccen*$eccen)**(3.0/2.0));
+$semiax=$a0/(1-$d0)*6378.135;
+}
diff --git a/src/cal/get_tle/make_orbit.pl b/src/cal/get_tle/make_orbit.pl
new file mode 100755
index 0000000..a8f00ff
--- /dev/null
+++ b/src/cal/get_tle/make_orbit.pl
@@ -0,0 +1,233 @@
+#!/usr/local/bin/perl
+use FileHandle;
+
+# Ed Murphy's program to rewrite the orbit page
+# Updated 03/27/00 Changed GSOC to Heavens Above
+
+$output_filename = "/data2/violet/htdocs/users/orbit.html";
+open (OUTF, ">$output_filename") || die "Cannot open $output_filename file";
+
+system("chmod ug+rw $output_filename");
+system("chgrp www $output_filename");
+
+$input_filename = "/data1/fuse/calfuse/calfiles/FUSE.TLE";
+open (INP_TLE, "<$input_filename") || die "Cannot open $input_filename file";
+
+$satid = 25791;
+
+&input_lines;
+
+close (INP_TLE);
+
+&parse_lines;
+
+&convert_doy;
+&convert_dayfrac;
+&calculate_a0;
+&calculate_orbs;
+
+$now=`date`;
+$datest = substr($now,4,3)." ".substr($now,8,2).", ".substr($now,24,4);
+
+print OUTF "<HTML>\n";
+print OUTF "<HEAD>\n";
+print OUTF "<title>FUSE Orbital Elements page</title>\n";
+print OUTF "</HEAD>\n";
+print OUTF "<BODY bgcolor=#ffffff ALINK=\"#000000\" VLINK=\"darkblue\">\n";
+print OUTF "<center>\n";
+print OUTF "<table width=640>\n";
+print OUTF "<tr><td>\n";
+print OUTF "<img src=\"/figures/purple_line2.gif\" width=640>\n";
+print OUTF "<table cellpadding=5 cellspacing=5 width=550>\n";
+print OUTF "<tr>\n";
+print OUTF "<td valign=top align=left>\n";
+print OUTF "<img src=\"/figures/andromeda_moo_small.gif\">\n";
+print OUTF "</td>\n";
+print OUTF "<td valign=top align=left>\n";
+print OUTF "<font size=+3><font color=\"#6666CC\">\n";
+print OUTF "<b>FUSE<P>\n";
+print OUTF "<i>Orbital Elements</font></font></i></b>\n";
+print OUTF "</td>\n";
+print OUTF "</tr>\n";
+print OUTF "</table>\n";
+print OUTF "<img src=\"/figures/purple_line2.gif\" width=640>\n";
+print OUTF "<p>\n";
+print OUTF "<center>\n";
+print OUTF "<font color=\"#CC0099\" size=4><b>\n";
+print OUTF "Where is FUSE now?<br></b></font>\n";
+print OUTF "<font size=4>Check out the\n";
+print OUTF "<a href=\"http://www.heavens-above.com/orbitdisplay.asp?lat=39.3&lng=-76.6&loc=BALTIMORE&TZ=EST&satid=25791\" >\n";
+print OUTF "Heavens-Above Satellite Predictions page </a></font>.\n";
+print OUTF "</center>\n";
+print OUTF "<P>\n";
+print OUTF "<hr>\n";
+print OUTF "<p><pre>\n";
+print OUTF " \n";
+print OUTF "FUSE orbital elements:\n";
+print OUTF " NORAD number 25791\n";
+print OUTF " International ID 99035A\n";
+print OUTF " \n";
+
+&print_orb;
+
+print OUTF "</pre>\n";
+
+&print_tail;
+
+close (OUTF);
+
+### end of Perl script
+
+
+sub convert_doy {
+ @daytab1 = (0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
+ @daytab2 = (0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
+ @monthstr = ("", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
+
+ if ((($year%4 == 0) && ($year%100 != 0)) || ($year%400 == 0)) {
+ # $year is a leap year use daytab1
+ for ($i = 1; $doy > $daytab1[$i]; $i++) {
+ $doy -= $daytab1[$i];
+ }
+ } else {
+ # $year is not a leap year, use daytab2
+ for ($i = 1; $doy > $daytab2[$i]; $i++) {
+ $doy -= $daytab2[$i];
+ }
+ }
+ $month = $monthstr[$i];
+ $day = $doy;
+}
+
+sub convert_dayfrac {
+ $dayfrac *= 24.0;
+ $hour = int($dayfrac);
+ $minute = int(($dayfrac-$hour)*60.0);
+ $second = ((($dayfrac-$hour)*60.0)-$minute)*60.0;
+}
+
+sub input_lines {
+$line1 = <INP_TLE>;
+$line2 = <INP_TLE>;
+$line3 = <INP_TLE>;
+
+$id2 = substr($line2, 2, 5);
+$id3 = substr($line3, 2, 5);
+
+if (($id2 != $satid) || ($id3 != $satid)) {
+ print STDOUT "Error in TLE:\n";
+ print STDOUT $line1;
+ print STDOUT $line2;
+ print STDOUT $line3;
+# die "Error in TLE";
+}
+
+}
+
+sub parse_lines {
+$year = substr($line2, 18, 2);
+$doy = substr($line2, 20, 3);
+$dayfrac = substr($line2, 23, 9);
+$epoch = $year.$doy.$dayfrac;
+$incl = substr($line3, 9, 8);
+$raan = substr($line3, 17,8);
+$eccen = substr($line3, 26, 7);
+$eccen = "0." . $eccen;
+$mean_mot = substr($line3, 52, 11);
+$mean_anom = substr($line3, 43, 8);
+$arg_perig = substr($line3, 34, 8);
+
+
+if ($year > 50) {
+ $year += 1900;
+} else {
+ $year += 2000;
+}
+
+$dayfrac = "0".$dayfrac;
+
+}
+
+sub calculate_a0 {
+
+$mu = 3.986005E5;
+$pi = 3.14159265358979;
+$radian = 0.0174532925200;
+
+$mm=2.0*$pi*$mean_mot/(24.0*60.0);
+$ke=0.74366916E-1;
+$k2=5.413080E-4;
+$a1=($ke/$mm)**(2.0/3.0);
+$inrad = $incl * $radian;
+
+$d1=3.0/2.0*$k2/($a1*$a1)*(3.0*cos($inrad)*cos($inrad)-1.0)/((1.0-$eccen*$eccen)**(3.0/2.0));
+$a0=$a1*(1.0-$d1/3.0-$d1*$d1-134.0/81.0*$d1*$d1*$d1);
+$d0=3.0/2.0*$k2/($a0*$a0)*(3.0*cos($inrad)*cos($inrad)-1.0)/((1.0-$eccen*$eccen)**(3.0/2.0));
+$semiax=$a0/(1-$d0)*6378.135;
+
+}
+
+sub calculate_orbs {
+
+$period = 60.0*24.0/($mean_mot/(1+$d0));
+$cax=$eccen*$semiax;
+$perigee=$semiax-$cax-6378.1;
+$apogee=$semiax+$cax-6378.1;
+
+}
+
+sub print_orb {
+print OUTF " Epoch $epoch\n";
+printf OUTF " Semimajor axis %7.2f km\n",$semiax;
+printf OUTF " Apogee %5.2f km\n",$apogee;
+printf OUTF " Perigee %5.2f km\n",$perigee;
+print OUTF " Eccentricity $eccen\n";
+printf OUTF " Inclination %6.2f degrees\n",$incl;
+printf OUTF " Period %6.2f minutes\n",$period;
+printf OUTF " RA of asc. node %6.2f degrees\n",$raan;
+printf OUTF " Arg. of perigee %6.2f degrees\n",$arg_perig;
+printf OUTF " Mean anomaly %6.2f degrees\n",$mean_anom;
+print OUTF " \n";
+
+}
+
+sub print_tail {
+print OUTF "<p>";
+
+print OUTF "The FUSE Delta II second stage (NORAD #25792) reentered on \n";
+print OUTF "the morning of August 4, 1999 during orbit number 708. \n";
+print OUTF "According to predictions by Alan Pickup, reentry \n";
+print OUTF "occured within 90 minutes of 5:31 UT, probably over the \n";
+print OUTF "Arabian Sea or India. The final orbit was 119 x 103 km (74 x 64 mi).\n";
+print OUTF "<p>";
+print OUTF "<center>";
+print OUTF "<font size=+2><font color=\"#6666CC\">\n";
+print OUTF "<a href=\"reentry.html\"> Could anything have survived reentry?</a></font></font><p>\n";
+print OUTF "</center>";
+print OUTF "<img align=center src=\"delta2decay.gif\">\n";
+print OUTF "<P>These numbers assume a Keplerian orbit; the actual apogee and perigee \n";
+print OUTF "will differ by a few km on an orbit-to-orbit basis.\n";
+print OUTF "<p>";
+print OUTF "<p>The NORAD Two-Line Elements (TLEs) for FUSE can be found in the file \n";
+print OUTF "<a href=\"./FUSE.TLE\" > FUSE.TLE </A>.\n";
+print OUTF "<p> \n";
+print OUTF "This page is automatically updated daily. I wish to thank \n";
+print OUTF "<a href=\"mailto:deej\@deej.com\">Doyle Groves</a> \n";
+print OUTF "for providing a Perl script to access the NASA\n";
+print OUTF "Orbital Information Group web page.\n";
+print OUTF "<p> Ed Murphy, <a href=\"mailto:emurphy\@pha.jhu.edu\">\n";
+print OUTF "<address>emurphy\@pha.jhu.edu</address></a>\n";
+print OUTF "<P>\n";
+print OUTF "<img src=\"/figures/purple_line2.gif\" width=640>\n";
+print OUTF "<P>\n";
+print OUTF "Last changed: $datest.\n";
+print OUTF "<P>\n";
+print OUTF "<i><a href=\"/index.shtml\">Return to the FUSE home page.</a></i><br clear=left>\n";
+print OUTF "<p>\n";
+print OUTF "</td></tr>\n";
+print OUTF "</table>\n";
+print OUTF "</center>\n";
+print OUTF "</BODY>\n";
+print OUTF "</HTML>\n";
+
+}
diff --git a/src/cal/get_tle/test_get_tle.pl b/src/cal/get_tle/test_get_tle.pl
new file mode 100755
index 0000000..33b72e5
--- /dev/null
+++ b/src/cal/get_tle/test_get_tle.pl
@@ -0,0 +1,148 @@
+#!/usr/local/bin/perl
+use FileHandle;
+use IPC::Open2;
+
+###
+# OIG TLE retrieval program
+# DJG - 6/14/98
+#
+# Uses a file called "one" which has sat numbers to get
+#
+# Places all output in a single file called "five.tle".
+#
+###
+
+### Configure:
+##$login = "emurphy";
+##$passwd = "bdr529";
+
+$login = "mromelfanger";
+$passwd = "fusejhu";
+$output_filename = "/data1/fuse/calfuse/caltemp/five.tle";
+$log_filename = "/data1/fuse/calfuse/caltemp/get_tle.logfile";
+
+### (end of configure section)
+
+# system("fixlist one tempone");
+# chop($satstoget = `cat tempone`);
+# system("rm -f tempone");
+
+$satstoget = "25791";
+
+# The "output" file collects debugging copies of everything that comes back.
+open(OUT,">$log_filename") || die "Could not open output file";
+
+# The following logs in to OIG and gets the first "continue" code
+
+$host = "oig1.gsfc.nasa.gov";
+#$url = "scripts/foxweb.dll/loginok\@app01?tdac=&ffv01=$login&ffv02=$passwd";
+$url = "scripts/foxweb.exe/loginok\@app01?tdac=&ffv01=$login&ffv02=$passwd";
+
+open2 (\*Reader, \*Writer, "telnet $host 80") || die "Error opening connection";
+Writer->autoflush();
+
+print Reader "telnet $host 80\n";
+print Writer "GET \/$url\n";
+while (<Reader>) {
+ print OUT "$_"; # copy each login screen line to the output file
+ if (/tdac=(\w+)\"/) {
+ $continuecode = $1; # This code is the "continue" code
+ }
+}
+close(Reader);
+close(Writer);
+
+# $continuecode contains the very first "continue" code after login.
+
+print OUT "*** \n Starting User's Home Page output page \n***\n\n";
+
+# This url accesses the next screen (user home page)
+#$url = "scripts/foxweb.dll/favorhome\@app01?tdac=" . $continuecode;
+$url = "scripts/foxweb.exe/favorhome\@app01?tdac=" . $continuecode;
+# print $url; # debug print
+
+open2 (\*Reader, \*Writer, "telnet $host 80") || die "Error opening connection";
+Writer->autoflush();
+
+print Reader "telnet $host 80\n";
+print Writer "GET \/$url\n";
+
+while (<Reader>) {
+ print OUT "$_"; # copy each line to the output file
+
+ if(/tdac=(\w+)\"/) {
+
+# Look for the "tle ad hoc query" code and save it
+ chop($word = "$_");
+ if ($word =~ /ftleadhoc.+tdac=(\w+)\"/) {
+ $tlequerycode = "$1";
+ }
+ }
+}
+# close(HOMEPAGE);
+# This access is to the "TLE ad hoc query" web page.
+#$url = "scripts/foxweb.dll/ftleadhoc\@app01?tdac=" . $tlequerycode;
+$url = "scripts/foxweb.exe/ftleadhoc\@app01?tdac=" . $tlequerycode;
+
+open2 (\*Reader, \*Writer, "telnet $host 80") || die "Error opening connection";
+Writer->autoflush();
+
+print Reader "telnet $host 80\n";
+print Writer "GET \/$url\n";
+
+while (<Reader>) {
+ print OUT "$_"; # copy each login screen line to the output file
+
+ # Look for the TLE "submit" code
+ chop($word = "$_");
+ if ($word =~ /tdac\" VALUE=\"(\w+)\"/) {
+ $gotcode2 = "$1";
+ }
+}
+close(Reader);
+close(Writer);
+
+# Compose the TLE query and submit it
+#$url = "scripts/foxweb.dll/ftleadhoc\@app01?tdac=" . $gotcode2;
+$url = "scripts/foxweb.exe/ftleadhoc\@app01?tdac=" . $gotcode2;
+$url .= "&ffv01=" . $satstoget . "&ffv02=standard&ffv03=catno&ffv04=five";
+
+# print "$url\n"; # debug print
+
+# Read the reply and copy the relevant lines to output_filename
+
+$copy = "no";
+open(TLEOUT,">$output_filename") || die "Error opening $output_filename";
+
+open2 (\*Reader, \*Writer, "telnet $host 80") || die "Error opening connection";
+Writer->autoflush();
+
+print Reader "telnet $host 80\n";
+print Writer "GET \/$url\n";
+
+while (<Reader>) {
+ if ($_ =~ /<P>/) { # End copy operation
+ print "$_"; # write remaining limit to output file
+ $copy = "no";
+ }
+ if ($copy eq "yes") {
+ print TLEOUT "$_"; # copy every line to five.tle
+ # print "$_"; # and to the terminal
+ }
+ if (substr($_,0,5) eq "<PRE>") { # Begin copy operation
+ $copy = "yes";
+ }
+}
+close(Reader);
+close(Writer);
+close(TLEOUT);
+
+# The following will remove all session files. You can comment it
+# out for debugging.
+# system("rm -f output");
+
+# The following script "fixes up" the output
+# system("fix/do.fix.one");
+
+### end of Perl script
+
diff --git a/src/cal/get_tle/test_tle.csh b/src/cal/get_tle/test_tle.csh
new file mode 100755
index 0000000..5431552
--- /dev/null
+++ b/src/cal/get_tle/test_tle.csh
@@ -0,0 +1,50 @@
+#!/bin/csh -f
+#******************************************************************************
+#* Johns Hopkins University
+#* Center For Astrophysical Sciences
+#* FUSE
+#*****************************************************************************
+#*
+#* Synopsis: update_tle
+#*
+#* Description: Shell script for automatically downloading the latest
+#* orbital elements from the GSFC OIG, and placing these
+#* elements in the FUSE.TLE file. It will also update
+#* the cvz_ram_tool.html calculator.
+#*
+#* All messages are to stdout or stderr.
+#*
+#* Arguments: None
+#*
+#* Returns: Exit codes:
+#* 0 successful execution
+#*
+#* History: 07/27/99 emm Begin work.
+#******************************************************************************/
+
+set tlestat=0
+
+# Step 1
+/usr/local/fusesw/calfuse/current/src/cal/get_tle/get_tle.pl
+set cfstat=$status
+
+# Step 2
+if !({$cfstat}) then
+ /usr/local/fusesw/calfuse/current/src/cal/get_tle/add_tle.pl
+ set cfstat=$status
+endif
+
+# Step 3
+if !({$cfstat}) then
+ /usr/local/fusesw/calfuse/current/src/cal/get_tle/make_cvzramtool.pl
+ set cfstat=$status
+endif
+
+# Step 4
+if !({$cfstat}) then
+ /usr/local/fusesw/calfuse/current/src/cal/get_tle/make_orbit.pl
+ set cfstat=$status
+endif
+
+exit($cfstat)
+
diff --git a/src/cal/get_tle/tmp/FUSE.OLD b/src/cal/get_tle/tmp/FUSE.OLD
new file mode 100644
index 0000000..75e788e
--- /dev/null
+++ b/src/cal/get_tle/tmp/FUSE.OLD
@@ -0,0 +1,5205 @@
+FUSE 1
+1 25791U 99035A 03334.81529517 .00000629 00000-0 13611-3 0 73
+2 25791 24.9828 141.7372 0010396 237.2837 122.6662 14.41449325233814
+FUSE 1
+1 25791U 99035A 03332.32285756 .00000721 00000-0 16400-3 0 51
+2 25791 24.9827 157.0092 0010498 210.6638 149.3252 14.41447882233456
+FUSE 1
+1 25791U 99035A 03331.90745146 +.00000729 +00000-0 +16628-3 0 00081
+2 25791 024.9828 159.5554 0010553 206.5242 153.4727 14.41447542233393
+FUSE 1
+1 25791U 99035A 03331.14587356 .00000725 00000-0 16505-3 0 40
+2 25791 24.9828 164.2238 0010646 198.4715 161.5398 14.41446726233287
+FUSE 1
+1 25791U 99035A 03329.89965515 .00000696 00000-0 15651-3 0 33
+2 25791 24.9826 171.8592 0010670 185.6347 174.4062 14.41445181233104
+FUSE 1
+1 25791U 99035A 03328.86113523 +.00000610 +00000-0 +13023-3 0 00030
+2 25791 024.9825 178.2061 0010624 174.6707 185.3915 14.41444336232953
+FUSE 1
+1 25791U 99035A 03328.79190076 .00000678 00000-0 15092-3 0 21
+2 25791 24.9829 178.6308 0010612 173.9957 186.0679 14.41444516232945
+FUSE 1
+1 25791U 99035A 03327.89185200 +.00000523 +00000-0 +10396-3 0 00058
+2 25791 024.9836 184.1428 0010625 164.7116 195.3708 14.41443393232811
+FUSE 1
+1 25791U 99035A 03327.06103806 .00000946 00000-0 23212-3 0 15
+2 25791 24.9839 189.2348 0010607 156.0117 204.0892 14.41443370232699
+FUSE 1
+1 25791U 99035A 03326.92256930 +.00001217 +00000-0 +31425-3 0 00068
+2 25791 024.9831 190.0850 0010666 154.7022 205.4026 14.41443784232675
+FUSE 1
+1 25791U 99035A 03325.81481645 .00001001 00000-0 24877-3 0 06
+2 25791 24.9833 196.8767 0010686 142.8583 217.2666 14.41441143232511
+FUSE 1
+1 25791U 99035A 03324.91476442 +.00000578 +00000-0 +12056-3 0 00021
+2 25791 024.9828 202.3884 0010744 133.5472 226.5911 14.41438825232381
+FUSE 1
+1 25791U 99035A 03323.94547862 +.00000358 +00000-0 +54039-4 0 00011
+2 25791 024.9832 208.3404 0010860 124.8670 235.2866 14.41437713232248
+FUSE 1
+1 25791U 99035A 03322.90695295 +.00000456 +00000-0 +83650-4 0 00009
+2 25791 024.9834 214.7019 0010853 115.1433 245.0191 14.41437815232091
+FUSE 1
+1 25791U 99035A 03321.93766319 +.00000482 +00000-0 +91492-4 0 00223
+2 25791 024.9834 220.6386 0010837 104.6262 255.5450 14.41437349231959
+FUSE 1
+1 25791U 99035A 03320.89913707 +.00000498 +00000-0 +96406-4 0 09969
+2 25791 024.9836 226.9996 0010817 093.6241 266.5508 14.41436631231802
+FUSE 1
+1 25791U 99035A 03319.92984440 +.00000599 +00000-0 +12716-3 0 09988
+2 25791 024.9836 232.9378 0010741 083.7324 276.4412 14.41436361231669
+FUSE 1
+1 25791U 99035A 03318.96055095 +.00000529 +00000-0 +10579-3 0 00064
+2 25791 024.9837 238.8759 0010678 074.0237 286.1451 14.41435571231521
+FUSE 1
+1 25791U 99035A 03317.92202182 +.00000413 +00000-0 +70728-4 0 00021
+2 25791 024.9840 245.2398 0010704 063.5995 296.5616 14.41434631231377
+FUSE 1
+1 25791U 99035A 03316.95272605 +.00000470 +00000-0 +88022-4 0 09972
+2 25791 024.9836 251.1803 0010590 053.6350 306.5138 14.41434475231239
+FUSE 1
+1 25791U 99035A 03315.91419451 +.00000359 +00000-0 +54432-4 0 09951
+2 25791 024.9837 257.5405 0010596 042.7776 317.3563 14.41433347231087
+FUSE 1
+1 25791U 99035A 03314.94489683 +.00000376 +00000-0 +59442-4 0 00177
+2 25791 024.9838 263.4782 0010541 032.5623 327.5544 14.41433068230946
+FUSE 1
+1 25791U 99035A 03313.97559885 +.00000299 +00000-0 +36081-4 0 09921
+2 25791 024.9837 269.4165 0010540 022.3690 337.7277 14.41432334230802
+FUSE 1
+1 25791U 99035A 03312.93706443 +.00000584 +00000-0 +12243-3 0 09931
+2 25791 024.9834 275.7793 0010504 011.6272 348.4499 14.41433055230652
+FUSE 1
+1 25791U 99035A 03311.96776569 +.00000350 +00000-0 +51482-4 0 09939
+2 25791 024.9833 281.7181 0010408 001.6598 358.3945 14.41431695230511
+FUSE 1
+1 25791U 99035A 03310.65228737 +.00000444 +00000-0 +80221-4 0 09930
+2 25791 024.9835 289.7793 0010257 347.5217 012.5005 14.41431193230320
+FUSE 1
+1 25791U 99035A 03309.40604522 +.00000467 +00000-0 +87049-4 0 00145
+2 25791 024.9835 297.4135 0010238 333.3895 026.6085 14.41430141230146
+FUSE 1
+1 25791U 99035A 03308.78292393 +.00000641 +00000-0 +13975-3 0 09895
+2 25791 024.9836 301.2316 0010231 327.1757 032.8108 14.41430126230051
+FUSE 1
+1 25791U 99035A 03307.39821018 +.00000487 +00000-0 +93143-4 0 09853
+2 25791 024.9836 309.7266 0009954 308.3405 051.6212 14.41427785229857
+FUSE 1
+1 25791U 99035A 03306.42890957 +.00001374 +00000-0 +36220-3 0 09920
+2 25791 024.9826 315.6681 0010109 298.0220 061.9265 14.41428485229712
+FUSE 1
+1 25791U 99035A 03305.45960939 +.00002012 +00000-0 +55551-3 0 00086
+2 25791 024.9823 321.6056 0010134 287.9208 072.0205 14.41427385229572
+FUSE 1
+1 25791U 99035A 03304.49030907 +.00002090 +00000-0 +57918-3 0 09839
+2 25791 024.9820 327.5453 0010274 277.3913 082.5438 14.41423770229439
+FUSE 1
+1 25791U 99035A 03303.52100790 +.00001430 +00000-0 +37917-3 0 09979
+2 25791 024.9824 333.4868 0010388 267.0794 092.8530 14.41418570229291
+FUSE 1
+1 25791U 99035A 03303.24406524 .00000959 00000-0 23638-3 0 9826
+2 25791 24.9827 335.1872 0010550 264.3245 95.6061 14.41416153229251
+FUSE 1
+1 25791U 99035A 03302.20552450 .00001096 00000-0 27769-3 0 9812
+2 25791 24.9825 341.5507 0010562 253.8882 106.0488 14.41414636229106
+FUSE 1
+1 25791U 99035A 03300.54385630 .00000645 00000-0 14088-3 0 9809
+2 25791 24.9828 351.7298 0010742 236.4738 123.4745 14.41411128228860
+FUSE 1
+1 25791U 99035A 03299.22836924 .00000522 00000-0 10377-3 0 9797
+2 25791 24.9826 359.7898 0010802 223.1838 136.7831 14.41409442228671
+FUSE 1
+1 25791U 99035A 03297.56670010 .00000441 00000-0 79217-4 0 9782
+2 25791 24.9828 9.9670 0010755 205.8604 154.1368 14.41407956228431
+FUSE 1
+1 25791U 99035A 03295.69732098 +.00000439 +00000-0 +78644-4 0 09778
+2 25791 024.9823 021.4161 0010726 186.3436 173.6933 14.41406877228169
+FUSE 1
+1 25791U 99035A 03294.58954049 .00000442 00000-0 79553-4 0 9760
+2 25791 24.9822 28.2003 0010717 174.4425 185.6202 14.41406259228003
+FUSE 1
+1 25791U 99035A 03293.68946830 +.00000437 +00000-0 +78059-4 0 09808
+2 25791 024.9822 033.7128 0010712 164.9748 195.1079 14.41405735227879
+FUSE 1
+1 25791U 99035A 03293.55099557 .00000435 00000-0 77377-4 0 9753
+2 25791 24.9823 34.5611 0010708 163.5206 196.5648 14.41405674227852
+FUSE 1
+1 25791U 99035A 03292.85863226 +.00000395 +00000-0 +65203-4 0 00006
+2 25791 024.9822 038.8017 0010732 156.0067 204.0939 14.41405084227759
+FUSE 1
+1 25791U 99035A 03292.09703250 .00000466 00000-0 86677-4 0 9749
+2 25791 24.9816 43.4715 0010662 147.9465 212.1683 14.41404859227645
+FUSE 1
+1 25791U 99035A 03290.98925305 .00000496 00000-0 95741-4 0 9736
+2 25791 24.9815 50.2722 0010596 136.9264 223.2143 14.41404097227489
+FUSE 1
+1 25791U 99035A 03289.81223159 .00000457 00000-0 84144-4 0 9725
+2 25791 24.9826 57.4936 0010620 125.6318 234.5184 14.41403544227318
+FUSE 1
+1 25791U 99035A 03288.77368245 +.00000424 +00000-0 +74086-4 0 09802
+2 25791 024.9826 063.8560 0010538 115.2199 244.9403 14.41402817227166
+FUSE 1
+1 25791U 99035A 03288.56597245 .00000409 00000-0 69342-4 0 9715
+2 25791 24.9830 65.1298 0010470 113.2118 246.9490 14.41402657227135
+FUSE 1
+1 25791U 99035A 03287.80436833 +.00000487 +00000-0 +93214-4 0 09863
+2 25791 024.9823 069.7945 0010522 105.3271 254.8405 14.41402718227026
+FUSE 1
+1 25791U 99035A 03286.83505381 .00000474 00000-0 89149-4 0 9701
+2 25791 24.9821 75.7317 0010429 95.3344 264.8358 14.41401993226884
+FUSE 1
+1 25791U 99035A 03285.86573823 +.00000465 +00000-0 +86378-4 0 09878
+2 25791 024.9822 081.6696 0010346 085.1348 275.0344 14.41401345226745
+FUSE 1
+1 25791U 99035A 03285.58879111 .00000442 00000-0 79392-4 0 9699
+2 25791 24.9825 83.3678 0010296 82.0216 278.1456 14.41400988226707
+FUSE 1
+1 25791U 99035A 03284.55023662 .00000447 00000-0 80990-4 0 9687
+2 25791 24.9825 89.7291 0010201 70.9880 289.1734 14.41400492226551
+FUSE 1
+1 25791U 99035A 03282.88854730 .00000440 00000-0 79027-4 0 9670
+2 25791 24.9825 99.9047 0010178 53.4478 306.6963 14.41399534226312
+FUSE 1
+1 25791U 99035A 03281.84998986 .00000468 00000-0 87538-4 0 9662
+2 25791 24.9822 106.2646 0010191 42.5792 317.5504 14.41399184226165
+FUSE 1
+1 25791U 99035A 03280.94990632 +.00000467 +00000-0 +87263-4 0 09712
+2 25791 024.9824 111.7767 0010189 033.0995 327.0149 14.41398673226038
+FUSE 1
+1 25791U 99035A 03280.81143207 .00000455 00000-0 83540-4 0 9650
+2 25791 24.9826 112.6255 0010186 31.4564 328.6551 14.41398503226017
+FUSE 1
+1 25791U 99035A 03279.91134723 +.00000485 +00000-0 +92641-4 0 09747
+2 25791 024.9824 118.1376 0010154 021.8776 338.2165 14.41398227225888
+FUSE 1
+1 25791U 99035A 03279.01126251 .00000481 00000-0 91312-4 0 9644
+2 25791 24.9824 123.6499 0010153 12.3561 347.7194 14.41397643225755
+FUSE 1
+1 25791U 99035A 03278.94202521 +.00000481 +00000-0 +91337-4 0 09906
+2 25791 024.9824 124.0738 0010152 011.6408 348.4333 14.41397601225743
+FUSE 1
+1 25791U 99035A 03277.97270237 +.00000495 +00000-0 +95508-4 0 09681
+2 25791 024.9827 130.0106 0010132 001.2425 358.8110 14.41397155225601
+FUSE 1
+1 25791U 99035A 03277.90346511 .00000490 00000-0 94065-4 0 9630
+2 25791 24.9828 130.4350 0010138 0.4734 359.5783 14.41397083225599
+FUSE 1
+1 25791U 99035A 03276.03405565 .00000520 00000-0 10314-3 0 9625
+2 25791 24.9827 141.8830 0010124 340.4951 19.5169 14.41396123225326
+FUSE 1
+1 25791U 99035A 03275.96481828 +.00000519 +00000-0 +10285-3 0 09740
+2 25791 024.9827 142.3069 0010124 339.7655 020.2450 14.41396066225315
+FUSE 1
+1 25791U 99035A 03274.99549511 .00000510 00000-0 10007-3 0 9615
+2 25791 24.9826 148.2432 0010136 329.5837 30.4082 14.41395326225171
+FUSE 1
+1 25791U 99035A 03273.95693438 +.00000508 +00000-0 +99668-4 0 09650
+2 25791 024.9828 154.6032 0010134 318.6446 041.3297 14.41394631225024
+FUSE 1
+1 25791U 99035A 03273.88769694 .00000499 00000-0 96894-4 0 9602
+2 25791 24.9830 155.0276 0010143 317.9041 42.0681 14.41394528225014
+FUSE 1
+1 25791U 99035A 03272.91837360 +.00000497 +00000-0 +96337-4 0 09713
+2 25791 024.9831 160.9638 0010155 307.6849 052.2737 14.41393912224871
+FUSE 1
+1 25791U 99035A 03272.15676230 .00000502 00000-0 97734-4 0 9591
+2 25791 24.9829 165.6274 0010158 299.6477 60.3019 14.41393430224762
+FUSE 1
+1 25791U 99035A 03270.91049028 .00000459 00000-0 84530-4 0 9582
+2 25791 24.9828 173.2617 0010180 286.1903 73.7484 14.41392360224582
+FUSE 1
+1 25791U 99035A 03269.59498120 .00000447 00000-0 80950-4 0 9573
+2 25791 24.9826 181.3203 0010142 272.2580 87.6765 14.41391553224394
+FUSE 1
+1 25791U 99035A 03268.97184558 +.00000445 +00000-0 +80376-4 0 09728
+2 25791 024.9827 185.1382 0010173 265.5171 094.4175 14.41391194224303
+FUSE 1
+1 25791U 99035A 03268.21023535 .00000414 00000-0 70946-4 0 9562
+2 25791 24.9826 189.8028 0010188 257.2495 102.6873 14.41390641224193
+FUSE 1
+1 25791U 99035A 03266.96396409 +.00000465 +00000-0 +86405-4 0 09591
+2 25791 024.9820 197.4355 0010222 244.5075 115.4384 14.41390276224011
+FUSE 1
+1 25791U 99035A 03266.89472691 .00000397 00000-0 65865-4 0 9558
+2 25791 24.9820 197.8595 0010244 243.7321 116.2133 14.41389876224004
+FUSE 1
+1 25791U 99035A 03265.92540594 +.00000421 +00000-0 +73184-4 0 09583
+2 25791 024.9820 203.7991 0010303 233.3804 126.5767 14.41389519223862
+FUSE 1
+1 25791U 99035A 03265.85616889 .00000313 00000-0 40304-4 0 9540
+2 25791 24.9821 204.2231 0010301 232.5282 127.4287 14.41388972223853
+FUSE 1
+1 25791U 99035A 03264.95608437 +.00000413 +00000-0 +70600-4 0 09600
+2 25791 024.9825 209.7349 0010306 222.8574 137.1133 14.41389145223725
+FUSE 1
+1 25791U 99035A 03264.47142380 .00000318 00000-0 41810-4 0 9534
+2 25791 24.9828 212.7038 0010331 217.6796 142.2976 14.41388613223656
+FUSE 1
+1 25791U 99035A 03263.98676299 +.00000580 +00000-0 +12130-3 0 09634
+2 25791 024.9828 215.6716 0010371 212.5398 147.4473 14.41389300223582
+FUSE 1
+1 25791U 99035A 03263.22515633 .00000537 00000-0 10820-3 0 9529
+2 25791 24.9833 220.3517 0010502 204.2952 155.7061 14.41388708223474
+FUSE 1
+1 25791U 99035A 03262.18659921 .00000379 00000-0 60457-4 0 9517
+2 25791 24.9840 226.7147 0010614 193.4882 166.5362 14.41387701223326
+FUSE 1
+1 25791U 99035A 03260.94032957 +.00000309 +00000-0 +39078-4 0 09544
+2 25791 024.9847 234.3525 0010738 180.7298 179.3196 14.41387027223143
+FUSE 1
+1 25791U 99035A 03260.59414308 .00000321 00000-0 42703-4 0 9508
+2 25791 24.9846 236.4723 0010751 177.3006 182.7566 14.41387012223096
+FUSE 1
+1 25791U 99035A 03259.62482160 +.00000345 +00000-0 +49962-4 0 09512
+2 25791 024.9849 242.4122 0010762 167.3136 192.7647 14.41386920222956
+FUSE 1
+1 25791U 99035A 03259.48634698 .00000346 00000-0 50207-4 0 9493
+2 25791 24.9851 243.2626 0010790 166.2982 193.7819 14.41386915222939
+FUSE 1
+1 25791U 99035A 03258.79397436 +.00000352 +00000-0 +52081-4 0 09637
+2 25791 024.9852 247.5042 0010849 159.0756 201.0196 14.41386761222832
+FUSE 1
+1 25791U 99035A 03258.24007588 .00000371 00000-0 57900-4 0 9482
+2 25791 24.9858 250.9015 0011010 153.8841 206.2222 14.41386865222757
+FUSE 1
+1 25791U 99035A 03257.33999071 +.00000378 +00000-0 +60212-4 0 09553
+2 25791 024.9856 256.4136 0010989 144.6365 215.4873 14.41386567222622
+FUSE 1
+1 25791U 99035A 03257.20151615 .00000373 00000-0 58654-4 0 9476
+2 25791 24.9858 257.2623 0010972 143.2340 216.8919 14.41386487222609
+FUSE 1
+1 25791U 99035A 03255.47058133 .00000387 00000-0 62819-4 0 9466
+2 25791 24.9862 267.8626 0010955 125.3598 234.7940 14.41385975222357
+FUSE 1
+1 25791U 99035A 03254.50125662 +.00000395 +00000-0 +65424-4 0 09599
+2 25791 024.9864 273.7990 0010932 115.3011 244.8633 14.41385685222217
+FUSE 1
+1 25791U 99035A 03254.22430627 .00000409 00000-0 69456-4 0 9458
+2 25791 24.9864 275.4955 0010924 112.3361 247.8299 14.41385695222170
+FUSE 1
+1 25791U 99035A 03253.46269339 +.00000419 +00000-0 +72692-4 0 09663
+2 25791 024.9863 280.1591 0010929 104.3257 255.8466 14.41385425222062
+FUSE 1
+1 25791U 99035A 03252.49336705 .00000424 00000-0 74176-4 0 9448
+2 25791 24.9866 286.0950 0010932 94.0918 266.0842 14.41385027221926
+FUSE 1
+1 25791U 99035A 03251.52403956 +.00000424 +00000-0 +73986-4 0 09576
+2 25791 024.9869 292.0308 0010917 083.9198 276.2554 14.41384578221780
+FUSE 1
+1 25791U 99035A 03251.24708871 .00000426 00000-0 74604-4 0 9434
+2 25791 24.9872 293.7274 0010909 80.9459 279.2282 14.41384483221744
+FUSE 1
+1 25791U 99035A 03250.97013781 +.00000418 +00000-0 +72375-4 0 09740
+2 25791 024.9873 295.4231 0010905 078.1232 282.0498 14.41384291221705
+FUSE 1
+1 25791U 99035A 03249.86233339 +.00000400 +00000-0 +66776-4 0 09423
+2 25791 024.9871 302.2068 0010890 066.3519 293.8131 14.41383569221541
+FUSE 1
+1 25791U 99035A 03248.96224150 +.00000395 +00000-0 +65318-4 0 09428
+2 25791 024.9864 307.7247 0010716 058.1747 301.9802 14.41383147221415
+FUSE 1
+1 25791U 99035A 03248.82376522 .00000395 00000-0 65312-4 0 9417
+2 25791 24.9864 308.5726 0010716 56.7210 303.4300 14.41383087221395
+FUSE 1
+1 25791U 99035A 03247.57748243 .00000413 00000-0 70836-4 0 9408
+2 25791 24.9872 316.2080 0010565 43.8549 316.2796 14.41382788221216
+FUSE 1
+1 25791U 99035A 03246.53891243 .00000409 00000-0 69731-4 0 9397
+2 25791 24.9871 322.5678 0010569 32.9529 327.1635 14.41382255221064
+FUSE 1
+1 25791U 99035A 03245.63881795 +.00000407 +00000-0 +68920-4 0 09609
+2 25791 024.9867 328.0798 0010586 023.6313 336.4682 14.41381788220930
+FUSE 1
+1 25791U 99035A 03244.87719914 +.00000397 +00000-0 +66048-4 0 09390
+2 25791 024.9864 332.7446 0010573 015.6956 344.3874 14.41381338220829
+FUSE 1
+1 25791U 99035A 03244.80796102 .00000402 00000-0 67416-4 0 9383
+2 25791 24.9865 333.1693 0010551 14.8812 345.2004 14.41381368220814
+FUSE 1
+1 25791U 99035A 03243.56167487 .00000400 00000-0 66930-4 0 9370
+2 25791 24.9861 340.8025 0010455 2.0304 358.0247 14.41380812220636
+FUSE 1
+1 25791U 99035A 03242.10768214 .00000384 00000-0 61838-4 0 9366
+2 25791 24.9858 349.7084 0010398 346.8053 13.2597 14.41380003220428
+FUSE 1
+1 25791U 99035A 03240.86139314 .00000177 00000-0 -91380-6 0 9357
+2 25791 24.9845 357.3695 0010244 330.3925 29.6003 14.41377473220243
+FUSE 1
+1 25791U 99035A 03239.19967539 .00000180 00000-0 -11405-6 0 9342
+2 25791 24.9845 7.5442 0010244 312.9466 47.0181 14.41377475220000
+FUSE 1
+1 25791U 99035A 03237.81491175 .00000180 00000-0 -10791-6 0 9333
+2 25791 24.9845 16.0231 0010244 298.4083 61.5391 14.41377477219806
+FUSE 1
+1 25791U 99035A 03236.70710174 +.00000180 +00000-0 -12297-6 0 09505
+2 25791 024.9845 022.8062 0010244 286.7778 073.1606 14.41377478219645
+FUSE 1
+1 25791U 99035A 03235.87624491 .00000430 00000-0 75902-4 0 9325
+2 25791 24.9843 27.8971 0010286 277.4878 82.4467 14.41377926219524
+FUSE 1
+1 25791U 99035A 03234.56072309 .00000420 00000-0 72808-4 0 9315
+2 25791 24.9844 35.9594 0010466 263.3036 96.6284 14.41377185219336
+FUSE 1
+1 25791U 99035A 03232.89901222 .00000471 00000-0 88341-4 0 9308
+2 25791 24.9843 46.1371 0010503 245.8515 114.0899 14.41376268219092
+FUSE 1
+1 25791U 99035A 03231.92968258 +.00000350 +00000-0 +51702-4 0 09300
+2 25791 024.9843 052.0765 0010506 236.3120 123.6400 14.41375219218958
+FUSE 1
+1 25791U 99035A 03231.86044481 .00000313 00000-0 40315-4 0 9291
+2 25791 24.9843 52.5008 0010526 235.7646 124.1874 14.41375001218940
+FUSE 1
+1 25791U 99035A 03230.89111324 +.00000349 +00000-0 +51379-4 0 09464
+2 25791 024.9839 058.4375 0010590 225.8512 134.1126 14.41374740218805
+FUSE 1
+1 25791U 99035A 03229.99102053 .00000344 00000-0 49608-4 0 9289
+2 25791 24.9838 63.9510 0010593 216.5837 143.3947 14.41374377218670
+FUSE 1
+1 25791U 99035A 03228.88321397 .00000376 00000-0 59327-4 0 9273
+2 25791 24.9835 70.7358 0010594 204.9564 155.0432 14.41374173218518
+FUSE 1
+1 25791U 99035A 03227.84464580 .00000382 00000-0 61272-4 0 9268
+2 25791 24.9832 77.0969 0010595 194.0430 165.9784 14.41373732218368
+FUSE 1
+1 25791U 99035A 03226.18293582 .00000373 00000-0 58388-4 0 9259
+2 25791 24.9829 87.2795 0010731 178.1810 181.8718 14.41372848218126
+FUSE 1
+1 25791U 99035A 03225.07512980 .00000318 00000-0 41806-4 0 9247
+2 25791 24.9835 94.0680 0010816 167.1667 192.9121 14.41372136217966
+FUSE 1
+1 25791U 99035A 03223.96732209 +.00000355 +00000-0 +53136-4 0 09274
+2 25791 024.9833 100.8554 0010794 156.0215 204.0798 14.41372011217801
+FUSE 1
+1 25791U 99035A 03223.89808455 .00000296 00000-0 35300-4 0 9236
+2 25791 24.9836 101.2807 0010797 155.4595 204.6427 14.41371615217799
+FUSE 1
+1 25791U 99035A 03222.92875220 +.00000342 +00000-0 +49175-4 0 09263
+2 25791 024.9836 107.2168 0010792 144.9594 215.1626 14.41371640217653
+FUSE 1
+1 25791U 99035A 03222.85951409 .00000389 00000-0 63357-4 0 9224
+2 25791 24.9835 107.6416 0010784 144.0445 216.0785 14.41371877217646
+FUSE 1
+1 25791U 99035A 03221.12856271 .00000472 00000-0 88663-4 0 9213
+2 25791 24.9830 118.2449 0010733 126.0331 234.1179 14.41371231217397
+FUSE 1
+1 25791U 99035A 03219.95151328 +.00000389 +00000-0 +63388-4 0 09249
+2 25791 024.9833 125.4565 0010532 114.7019 245.4588 14.41370330217223
+FUSE 1
+1 25791U 99035A 03219.88227503 .00000360 00000-0 54766-4 0 9205
+2 25791 24.9833 125.8804 0010481 114.1240 246.0365 14.41370138217211
+FUSE 1
+1 25791U 99035A 03218.98217790 +.00000310 +00000-0 +39570-4 0 09270
+2 25791 024.9834 131.3939 0010359 104.8947 255.2709 14.41369450217081
+FUSE 1
+1 25791U 99035A 03218.22055588 .00000325 00000-0 43896-4 0 9195
+2 25791 24.9833 136.0582 0010328 97.1561 263.0126 14.41369334216976
+FUSE 1
+1 25791U 99035A 03216.97426484 +.00000324 +00000-0 +43677-4 0 09200
+2 25791 024.9831 143.6927 0010266 083.9318 276.2359 14.41368918216796
+FUSE 1
+1 25791U 99035A 03216.90502635 .00000324 00000-0 43789-4 0 9187
+2 25791 24.9831 144.1168 0010254 83.2226 276.9448 14.41368901216784
+FUSE 1
+1 25791U 99035A 03215.93568806 +.00000306 +00000-0 +38302-4 0 09186
+2 25791 024.9831 150.0535 0010228 073.0379 287.1257 14.41368459216640
+FUSE 1
+1 25791U 99035A 03215.86644944 .00000306 00000-0 38426-4 0 9172
+2 25791 24.9830 150.4777 0010251 72.2855 287.8766 14.41368430216637
+FUSE 1
+1 25791U 99035A 03214.27396229 .00000303 00000-0 37387-4 0 9167
+2 25791 24.9829 160.2299 0010215 55.5824 304.5651 14.41367999216407
+FUSE 1
+1 25791U 99035A 03213.23538267 .00000307 00000-0 38665-4 0 9155
+2 25791 24.9828 166.5915 0010190 44.3110 315.8212 14.41367720216259
+FUSE 1
+1 25791U 99035A 03211.98908622 +.00000313 +00000-0 +40404-4 0 09196
+2 25791 024.9827 174.2250 0010179 031.1264 328.9848 14.41367405216077
+FUSE 1
+1 25791U 99035A 03211.29669883 .00000314 00000-0 40736-4 0 9147
+2 25791 24.9825 178.4652 0010188 23.8546 336.2433 14.41367209215970
+FUSE 1
+1 25791U 99035A 03210.95050531 +.00000311 +00000-0 +39816-4 0 09147
+2 25791 024.9826 180.5863 0010167 019.9914 340.1003 14.41367090215921
+FUSE 1
+1 25791U 99035A 03210.25811739 .00000298 00000-0 35831-4 0 9131
+2 25791 24.9827 184.8260 0010169 12.8248 347.2517 14.41366825215826
+FUSE 1
+1 25791U 99035A 03209.98116198 +.00000355 +00000-0 +53278-4 0 09203
+2 25791 024.9828 186.5250 0010134 009.7829 350.2881 14.41367237215788
+FUSE 1
+1 25791U 99035A 03209.21953520 .00000362 00000-0 55372-4 0 9123
+2 25791 24.9829 191.1892 0010126 1.8534 358.2012 14.41367046215670
+FUSE 1
+1 25791U 99035A 03207.41932608 .00000397 00000-0 65919-4 0 9112
+2 25791 24.9834 202.2142 0010129 342.4913 17.5242 14.41366581215411
+FUSE 1
+1 25791U 99035A 03206.24226672 .00000379 00000-0 60573-4 0 9109
+2 25791 24.9836 209.4233 0010138 329.9393 30.0533 14.41365965215244
+FUSE 1
+1 25791U 99035A 03204.85749015 .00000390 00000-0 63688-4 0 9096
+2 25791 24.9836 217.9044 0010134 314.4685 45.4984 14.41365469215044
+FUSE 1
+1 25791U 99035A 03203.47271543 .00000301 00000-0 36716-4 0 9082
+2 25791 24.9838 226.3867 0010127 298.5921 61.3578 14.41364370214843
+FUSE 1
+1 25791U 99035A 03202.50337269 +.00000333 +00000-0 +46557-4 0 09082
+2 25791 024.9834 232.3257 0010184 287.7687 072.1712 14.41364273214708
+FUSE 1
+1 25791U 99035A 03202.43413602 .00000335 00000-0 47009-4 0 9074
+2 25791 24.9835 232.7499 0010187 287.0863 72.8636 14.41364263214692
+FUSE 1
+1 25791U 99035A 03200.49545146 .00000183 00000-0 84321-6 0 9067
+2 25791 24.9838 244.6283 0010314 266.2072 93.7255 14.41363179214415
+FUSE 1
+1 25791U 99035A 03199.24916265 .00000402 00000-0 67231-4 0 9053
+2 25791 24.9834 252.3006 0010423 253.2621 106.6748 14.41363500214236
+FUSE 1
+1 25791U 99035A 03197.58743701 .00000400 00000-0 66746-4 0 9048
+2 25791 24.9833 262.4772 0010401 235.9965 123.9556 14.41362839213996
+FUSE 1
+1 25791U 99035A 03196.61809736 +.00000504 +00000-0 +98396-4 0 09043
+2 25791 024.9830 268.4132 0010415 225.8377 134.1285 14.41362729213855
+FUSE 1
+1 25791U 99035A 03196.54885888 .00000449 00000-0 81664-4 0 9034
+2 25791 24.9830 268.8370 0010432 225.2935 134.6725 14.41362452213842
+FUSE 1
+1 25791U 99035A 03195.64875805 +.00000455 +00000-0 +83486-4 0 09224
+2 25791 024.9829 274.3493 0010447 216.0256 143.9548 14.41361982213717
+FUSE 1
+1 25791U 99035A 03194.88713482 +.00000400 +00000-0 +66658-4 0 09032
+2 25791 024.9833 279.0133 0010462 208.0340 151.9610 14.41361395213602
+FUSE 1
+1 25791U 99035A 03194.81789616 .00000397 00000-0 65761-4 0 9025
+2 25791 24.9833 279.4379 0010462 207.3064 152.6887 14.41361358213594
+FUSE 1
+1 25791U 99035A 03193.57160311 .00000394 00000-0 64958-4 0 9015
+2 25791 24.9835 287.0727 0010549 194.3193 165.7017 14.41360869213419
+FUSE 1
+1 25791U 99035A 03192.53302554 .00000384 00000-0 62038-4 0 9002
+2 25791 24.9837 293.4343 0010602 183.6268 176.4166 14.41360386213261
+FUSE 1
+1 25791U 99035A 03191.35597034 .00000393 00000-0 64745-4 0 8994
+2 25791 24.9836 300.6430 0010601 171.2654 188.8044 14.41359972213091
+FUSE 1
+1 25791U 99035A 03190.17891471 .00000398 00000-0 66148-4 0 8988
+2 25791 24.9835 307.8521 0010640 158.8269 201.2681 14.41359500212921
+FUSE 1
+1 25791U 99035A 03188.93261973 +.00000398 +00000-0 +66190-4 0 08984
+2 25791 024.9836 315.4853 0010668 145.8317 214.2878 14.41358965212741
+FUSE 1
+1 25791U 99035A 03188.86338107 .00000398 00000-0 66279-4 0 8977
+2 25791 24.9837 315.9093 0010668 145.1176 215.0032 14.41358942212734
+FUSE 1
+1 25791U 99035A 03187.89403965 +.00000399 +00000-0 +66534-4 0 09149
+2 25791 024.9837 321.8470 0010683 135.2787 224.8581 14.41358544212593
+FUSE 1
+1 25791U 99035A 03187.54784627 .00000403 00000-0 67680-4 0 8966
+2 25791 24.9839 323.9680 0010707 131.6538 228.4889 14.41358445212548
+FUSE 1
+1 25791U 99035A 03186.23230982 .00000406 00000-0 68626-4 0 8954
+2 25791 24.9839 332.0260 0010696 118.3365 241.8223 14.41357879212350
+FUSE 1
+1 25791U 99035A 03185.12448869 .00000396 00000-0 65488-4 0 8946
+2 25791 24.9837 338.8117 0010654 106.8250 253.3431 14.41357267212194
+FUSE 1
+1 25791U 99035A 03183.87818800 .00000395 00000-0 65374-4 0 8934
+2 25791 24.9840 346.4456 0010638 93.9282 266.2445 14.41356752212019
+FUSE 1
+1 25791U 99035A 03182.90884166 +.00000400 +00000-0 +66995-4 0 09146
+2 25791 024.9842 352.3832 0010602 083.8848 276.2865 14.41356408211870
+FUSE 1
+1 25791U 99035A 03182.56264693 .00000389 00000-0 63591-4 0 8925
+2 25791 24.9841 354.5053 0010564 80.1314 280.0389 14.41356127211820
+FUSE 1
+1 25791U 99035A 03181.93949462 +.00000396 +00000-0 +65802-4 0 09194
+2 25791 024.9843 358.3221 0010512 073.9292 286.2372 14.41355980211735
+FUSE 1
+1 25791U 99035A 03181.17786419 .00000395 00000-0 65266-4 0 8913
+2 25791 24.9844 2.9874 0010488 65.8262 294.3343 14.41355639211628
+FUSE 1
+1 25791U 99035A 03180.13927548 .00000410 00000-0 69784-4 0 8904
+2 25791 24.9846 9.3489 0010422 55.0943 305.0535 14.41355362211477
+FUSE 1
+1 25791U 99035A 03178.89296857 .00000417 00000-0 72182-4 0 8897
+2 25791 24.9844 16.9825 0010375 41.8562 318.2738 14.41354851211293
+FUSE 1
+1 25791U 99035A 03177.85437834 .00000422 00000-0 73448-4 0 8885
+2 25791 24.9849 23.3439 0010297 30.9792 329.1322 14.41354454211141
+FUSE 1
+1 25791U 99035A 03176.95426603 +.00000430 +00000-0 +76000-4 0 09042
+2 25791 024.9848 028.8557 0010293 021.4500 338.6436 14.41354102211016
+FUSE 1
+1 25791U 99035A 03176.05415314 .00000443 00000-0 79845-4 0 8874
+2 25791 24.9846 34.3674 0010294 11.9009 348.1738 14.41353789210880
+FUSE 1
+1 25791U 99035A 03175.01556135 .00000450 00000-0 82065-4 0 8861
+2 25791 24.9847 40.7274 0010280 1.0899 358.9629 14.41353338210732
+FUSE 1
+1 25791U 99035A 03173.97697009 +.00000396 +00000-0 +65568-4 0 08903
+2 25791 024.9822 047.0922 0010249 350.3402 009.6908 14.41352733210581
+FUSE 1
+1 25791U 99035A 03173.90773105 .00000369 00000-0 57536-4 0 8858
+2 25791 24.9822 47.5172 0010351 349.7832 10.2465 14.41352535210571
+FUSE 1
+1 25791U 99035A 03172.86913829 .00000604 00000-0 12883-3 0 8847
+2 25791 24.9818 53.8803 0010249 338.4160 21.5913 14.41352920210427
+FUSE 1
+1 25791U 99035A 03171.48434975 .00000462 00000-0 85627-4 0 8832
+2 25791 24.9815 62.3608 0010207 323.6696 36.3121 14.41351186210222
+FUSE 1
+1 25791U 99035A 03170.93043425 +.00000466 +00000-0 +86941-4 0 08965
+2 25791 024.9816 065.7566 0010267 317.5345 042.4371 14.41350839210142
+FUSE 1
+1 25791U 99035A 03170.16879981 .00000418 00000-0 72429-4 0 8822
+2 25791 24.9818 70.4234 0010268 308.4790 51.4798 14.41350330210030
+FUSE 1
+1 25791U 99035A 03169.96108168 +.00000420 +00000-0 +73009-4 0 08907
+2 25791 024.9818 071.6973 0010259 306.2163 053.7398 14.41350228210007
+FUSE 1
+1 25791U 99035A 03169.13020792 .00000418 00000-0 72287-4 0 8816
+2 25791 24.9816 76.7849 0010262 297.4420 62.5043 14.41349800209887
+FUSE 1
+1 25791U 99035A 03167.95313733 +.00000423 +00000-0 +73631-4 0 08836
+2 25791 024.9816 083.9955 0010237 284.2230 075.7140 14.41349347209712
+FUSE 1
+1 25791U 99035A 03167.88389799 .00000435 00000-0 77426-4 0 8809
+2 25791 24.9815 84.4197 0010234 283.5451 76.3924 14.41349399209702
+FUSE 1
+1 25791U 99035A 03166.98378580 +.00000412 +00000-0 +70359-4 0 08897
+2 25791 024.9815 089.9316 0010231 274.0471 085.8867 14.41348763209579
+FUSE 1
+1 25791U 99035A 03166.56834950 .00000395 00000-0 65244-4 0 8795
+2 25791 24.9815 92.4756 0010212 269.5845 90.3483 14.41348446209516
+FUSE 1
+1 25791U 99035A 03165.25280226 .00000385 00000-0 62295-4 0 8782
+2 25791 24.9816 100.5354 0010250 255.6305 104.3063 14.41347768209326
+FUSE 1
+1 25791U 99035A 03164.21421250 .00000364 00000-0 55776-4 0 8773
+2 25791 24.9817 106.8968 0010263 244.7090 115.2352 14.41347204209171
+FUSE 1
+1 25791U 99035A 03163.93725544 +.00000369 +00000-0 +57280-4 0 09097
+2 25791 024.9817 108.5944 0010284 241.8348 118.1121 14.41347113209132
+FUSE 1
+1 25791U 99035A 03162.96790594 +.00000356 +00000-0 +53409-4 0 08809
+2 25791 024.9817 114.5342 0010284 232.0618 127.8964 14.41346608208996
+FUSE 1
+1 25791U 99035A 03162.89866691 .00000344 00000-0 49614-4 0 8768
+2 25791 24.9818 114.9584 0010288 231.3218 128.6380 14.41346492208982
+FUSE 1
+1 25791U 99035A 03161.92931687 +.00000312 +00000-0 +39943-4 0 08814
+2 25791 024.9818 120.8944 0010301 221.0945 138.8793 14.41345978208841
+FUSE 1
+1 25791U 99035A 03161.51388123 .00000295 00000-0 34834-4 0 8757
+2 25791 24.9820 123.4393 0010342 216.6080 143.3724 14.41345778208782
+FUSE 1
+1 25791U 99035A 03160.95996814 +.00000250 +00000-0 +21193-4 0 08773
+2 25791 024.9821 126.8372 0010451 211.1438 148.8456 14.41345263208708
+FUSE 1
+1 25791U 99035A 03160.40605336 .00000261 00000-0 24623-4 0 8749
+2 25791 24.9820 130.2299 0010533 205.5270 154.4717 14.41345268208625
+FUSE 1
+1 25791U 99035A 03159.99061818 +.00000273 +00000-0 +28036-4 0 08815
+2 25791 024.9819 132.7771 0010571 201.2873 158.7201 14.41345234208560
+FUSE 1
+1 25791U 99035A 03159.22898615 .00000265 00000-0 25800-4 0 8732
+2 25791 24.9819 137.4409 0010567 193.3150 166.7080 14.41345034208454
+FUSE 1
+1 25791U 99035A 03158.19039828 .00000250 00000-0 21230-4 0 8726
+2 25791 24.9819 143.8080 0010564 183.2476 176.7970 14.41344597208302
+FUSE 1
+1 25791U 99035A 03156.66713447 .00000150 00000-0 -91100-5 0 8715
+2 25791 24.9821 153.1385 0010638 167.6080 192.4690 14.41343778208085
+FUSE 1
+1 25791U 99035A 03155.42082656 .00000252 00000-0 21776-4 0 8701
+2 25791 24.9824 160.7774 0010914 155.1123 204.9913 14.41344428207901
+FUSE 1
+1 25791U 99035A 03154.45147561 +.00000386 +00000-0 +62443-4 0 08827
+2 25791 024.9823 166.7138 0010921 144.9592 215.1639 14.41344834207768
+FUSE 1
+1 25791U 99035A 03154.24375716 .00000440 00000-0 78935-4 0 8698
+2 25791 24.9823 167.9870 0010912 142.7461 217.3784 14.41345004207737
+FUSE 1
+1 25791U 99035A 03152.72049180 .00000524 00000-0 10445-3 0 8685
+2 25791 24.9821 177.3180 0010876 127.0026 233.1484 14.41344268207516
+FUSE 1
+1 25791U 99035A 03151.54342182 .00000483 00000-0 91927-4 0 8670
+2 25791 24.9825 184.5392 0010739 116.1807 243.9807 14.41343273207343
+FUSE 1
+1 25791U 99035A 03150.22787149 .00000462 00000-0 85706-4 0 8664
+2 25791 24.9829 192.6106 0010589 103.2247 256.9442 14.41342447207158
+FUSE 1
+1 25791U 99035A 03148.56611937 .00000483 00000-0 92184-4 0 8659
+2 25791 24.9829 202.7908 0010554 85.9076 274.2645 14.41341656206911
+FUSE 1
+1 25791U 99035A 03147.52752265 +.00000485 +00000-0 +92660-4 0 08802
+2 25791 024.9829 209.1535 0010502 074.9181 285.2489 14.41341031206764
+FUSE 1
+1 25791U 99035A 03147.25056401 .00000444 00000-0 80285-4 0 8648
+2 25791 24.9832 210.8523 0010387 71.8386 288.3258 14.41340505206727
+FUSE 1
+1 25791U 99035A 03145.65804606 .00000436 00000-0 77914-4 0 8633
+2 25791 24.9834 220.6078 0010334 54.9657 305.1825 14.41339591206493
+FUSE 1
+1 25791U 99035A 03144.55020623 .00000437 00000-0 78023-4 0 8622
+2 25791 24.9834 227.3948 0010384 43.0456 317.0865 14.41338981206335
+FUSE 1
+1 25791U 99035A 03143.51160500 .00000421 00000-0 73254-4 0 8619
+2 25791 24.9837 233.7586 0010263 31.8445 328.2684 14.41338349206180
+FUSE 1
+1 25791U 99035A 03142.68072397 +.00000390 +00000-0 +63795-4 0 08751
+2 25791 024.9839 238.8486 0010272 023.0015 337.0956 14.41337687206064
+FUSE 1
+1 25791U 99035A 03142.33452356 .00000379 00000-0 60393-4 0 8602
+2 25791 24.9841 240.9721 0010255 19.1006 340.9888 14.41337442206011
+FUSE 1
+1 25791U 99035A 03141.71136164 +.00000379 +00000-0 +60626-4 0 08800
+2 25791 024.9840 244.7879 0010278 012.6009 347.4755 14.41337187205922
+FUSE 1
+1 25791U 99035A 03140.74199907 .00000370 00000-0 57735-4 0 8590
+2 25791 24.9841 250.7264 0010336 2.4159 357.6402 14.41336697205787
+FUSE 1
+1 25791U 99035A 03139.77263585 +.00000354 +00000-0 +52942-4 0 08660
+2 25791 024.9844 256.6661 0010354 351.8435 008.1907 14.41336219205647
+FUSE 1
+1 25791U 99035A 03139.56491547 .00000328 00000-0 45098-4 0 8584
+2 25791 24.9847 257.9406 0010399 349.2190 10.8094 14.41335926205617
+FUSE 1
+1 25791U 99035A 03138.73403226 +.00000337 +00000-0 +47751-4 0 08790
+2 25791 024.9846 263.0295 0010413 340.7827 019.2287 14.41335717205491
+FUSE 1
+1 25791U 99035A 03137.76466903 .00000347 00000-0 50863-4 0 8578
+2 25791 24.9846 268.9696 0010450 330.8995 29.0930 14.41335458205358
+FUSE 1
+1 25791U 99035A 03136.65682420 .00000390 00000-0 63870-4 0 8568
+2 25791 24.9845 275.7569 0010467 319.1949 40.7776 14.41335447205197
+FUSE 1
+1 25791U 99035A 03135.68746059 +.00000395 +00000-0 +65459-4 0 08569
+2 25791 024.9844 281.6931 0010472 309.0975 050.8590 14.41335072205053
+FUSE 1
+1 25791U 99035A 03135.54898003 .00000409 00000-0 69659-4 0 8552
+2 25791 24.9844 282.5416 0010458 307.6606 52.2948 14.41335149205036
+FUSE 1
+1 25791U 99035A 03134.51037701 +.00000418 +00000-0 +72356-4 0 08578
+2 25791 024.9842 288.9014 0010448 296.9961 062.9478 14.41334711204883
+FUSE 1
+1 25791U 99035A 03133.88721559 .00000426 00000-0 74642-4 0 8544
+2 25791 24.9841 292.7176 0010439 290.6823 69.2571 14.41334447204792
+FUSE 1
+1 25791U 99035A 03132.84861269 +.00000430 +00000-0 +75920-4 0 08592
+2 25791 024.9841 299.0779 0010500 279.5447 080.3876 14.41333984204649
+FUSE 1
+1 25791U 99035A 03132.57165180 .00000452 00000-0 82534-4 0 8538
+2 25791 24.9840 300.7743 0010474 276.5765 83.3548 14.41334042204600
+FUSE 1
+1 25791U 99035A 03131.87925065 +.00000453 +00000-0 +82898-4 0 08732
+2 25791 024.9839 305.0137 0010463 269.3387 090.5924 14.41333669204502
+FUSE 1
+1 25791U 99035A 03130.90988891 .00000490 00000-0 94080-4 0 8525
+2 25791 24.9837 310.9515 0010487 259.0381 100.8949 14.41333434204367
+FUSE 1
+1 25791U 99035A 03129.87128778 .00000523 00000-0 10424-3 0 8514
+2 25791 24.9835 317.3134 0010521 248.2159 111.7230 14.41333026204210
+FUSE 1
+1 25791U 99035A 03128.90192725 +.00000552 +00000-0 +11296-3 0 08532
+2 25791 024.9833 323.2517 0010552 238.0980 121.8502 14.41332579204072
+FUSE 1
+1 25791U 99035A 03128.83268738 .00000545 00000-0 11086-3 0 8508
+2 25791 24.9833 323.6764 0010568 237.4929 122.4559 14.41332467204067
+FUSE 1
+1 25791U 99035A 03127.93256604 +.00000601 +00000-0 +12794-3 0 08608
+2 25791 024.9830 329.1896 0010698 227.9538 132.0061 14.41332295203934
+FUSE 1
+1 25791U 99035A 03126.96320595 .00000625 00000-0 13528-3 0 8490
+2 25791 24.9830 335.1268 0010736 217.7754 142.2000 14.41331691203793
+FUSE 1
+1 25791U 99035A 03125.92460573 .00000669 00000-0 14867-3 0 8480
+2 25791 24.9827 341.4877 0010781 206.7283 153.2669 14.41331116203649
+FUSE 1
+1 25791U 99035A 03124.95524601 +.00000691 +00000-0 +15516-3 0 08505
+2 25791 024.9825 347.4243 0010785 196.3122 163.7039 14.41330332203501
+FUSE 1
+1 25791U 99035A 03124.88600610 .00000690 00000-0 15495-3 0 8473
+2 25791 24.9826 347.8485 0010786 195.5964 164.4215 14.41330260203492
+FUSE 1
+1 25791U 99035A 03123.91664594 +.00000696 +00000-0 +15682-3 0 08516
+2 25791 024.9825 353.7856 0010797 185.6495 174.3891 14.41329308203356
+FUSE 1
+1 25791U 99035A 03123.84740597 .00000693 00000-0 15596-3 0 8461
+2 25791 24.9825 354.2099 0010797 185.0043 175.0358 14.41329216203347
+FUSE 1
+1 25791U 99035A 03122.11640408 .00000703 00000-0 15884-3 0 8451
+2 25791 24.9822 4.8109 0010810 167.4774 192.6009 14.41327425203095
+FUSE 1
+1 25791U 99035A 03121.07780243 .00000667 00000-0 14783-3 0 8442
+2 25791 24.9822 11.1719 0010728 156.8103 203.2890 14.41325997202941
+FUSE 1
+1 25791U 99035A 03119.96995900 +.00000637 +00000-0 +13898-3 0 08471
+2 25791 024.9824 017.9568 0010660 145.4593 214.6611 14.41324655202780
+FUSE 1
+1 25791U 99035A 03119.90071904 .00000619 00000-0 13339-3 0 8430
+2 25791 24.9826 18.3811 0010636 144.7680 215.3531 14.41324414202771
+FUSE 1
+1 25791U 99035A 03118.86211447 .00000584 00000-0 12289-3 0 8425
+2 25791 24.9826 24.7417 0010559 134.0951 226.0434 14.41323141202622
+FUSE 1
+1 25791U 99035A 03117.96198940 +.00000540 +00000-0 +10940-3 0 08522
+2 25791 024.9829 030.2539 0010497 124.5628 235.5873 14.41321998202493
+FUSE 1
+1 25791U 99035A 03117.20034409 .00000515 00000-0 10194-3 0 8419
+2 25791 24.9829 34.9180 0010485 116.4587 243.7000 14.41321200202384
+FUSE 1
+1 25791U 99035A 03115.88477360 .00000443 00000-0 80015-4 0 8407
+2 25791 24.9830 42.9750 0010371 102.4463 257.7219 14.41319637202197
+FUSE 1
+1 25791U 99035A 03114.98464436 +.00000405 +00000-0 +68282-4 0 08441
+2 25791 024.9831 048.4873 0010313 092.7862 267.3832 14.41318779202065
+FUSE 1
+1 25791U 99035A 03114.84616281 .00000401 00000-0 67228-4 0 8392
+2 25791 24.9830 49.3353 0010321 91.2914 268.8779 14.41318665202046
+FUSE 1
+1 25791U 99035A 03113.94603175 +.00000392 +00000-0 +64358-4 0 08457
+2 25791 024.9830 054.8471 0010295 081.7820 278.3859 14.41318172201911
+FUSE 1
+1 25791U 99035A 03113.25362240 .00000391 00000-0 64235-4 0 8381
+2 25791 24.9829 59.0866 0010297 74.5006 285.6639 14.41317864201815
+FUSE 1
+1 25791U 99035A 03112.97665904 +.00000377 +00000-0 +60036-4 0 08459
+2 25791 024.9831 060.7830 0010270 071.4871 288.6765 14.41317625201778
+FUSE 1
+1 25791U 99035A 03112.21500808 .00000363 00000-0 55711-4 0 8377
+2 25791 24.9831 65.4465 0010279 63.4745 296.6818 14.41317184201660
+FUSE 1
+1 25791U 99035A 03111.17639208 .00000363 00000-0 55548-4 0 8365
+2 25791 24.9830 71.8062 0010279 52.4799 307.6644 14.41316776201510
+FUSE 1
+1 25791U 99035A 03110.96866852 +.00000365 +00000-0 +56405-4 0 08600
+2 25791 024.9830 073.0785 0010262 050.2094 309.9312 14.41316734201489
+FUSE 1
+1 25791U 99035A 03109.58384492 +.00000379 +00000-0 +60572-4 0 08369
+2 25791 024.9829 081.5576 0010264 035.5220 324.5953 14.41316327201288
+FUSE 1
+1 25791U 99035A 03109.37612134 .00000390 00000-0 63811-4 0 8354
+2 25791 24.9831 82.8309 0010191 33.2102 326.9042 14.41316389201252
+FUSE 1
+1 25791U 99035A 03108.33750280 .00000419 00000-0 72748-4 0 8344
+2 25791 24.9833 89.1917 0010176 22.3826 337.7123 14.41316238201101
+FUSE 1
+1 25791U 99035A 03107.22964140 .00000487 00000-0 93318-4 0 8333
+2 25791 24.9837 95.9773 0010052 10.7357 349.3362 14.41316429200940
+FUSE 1
+1 25791U 99035A 03105.98329705 +.00000572 +00000-0 +11935-3 0 08346
+2 25791 024.9839 103.6091 0010055 357.5958 002.4500 14.41316519200765
+FUSE 1
+1 25791U 99035A 03105.42936709 .00000573 00000-0 11956-3 0 8325
+2 25791 24.9839 107.0005 0010053 351.7713 8.2628 14.41316090200681
+FUSE 1
+1 25791U 99035A 03104.39074737 .00000618 00000-0 13316-3 0 8315
+2 25791 24.9841 113.3600 0010076 341.0911 18.9221 14.41315709200539
+FUSE 1
+1 25791U 99035A 03103.83681675 +.00000642 +00000-0 +14053-3 0 08493
+2 25791 024.9841 116.7516 0010112 335.4399 024.5624 14.41315476200452
+FUSE 1
+1 25791U 99035A 03103.21364467 .00000672 00000-0 14956-3 0 8307
+2 25791 24.9843 120.5685 0010100 328.7321 31.2586 14.41315278200363
+FUSE 1
+1 25791U 99035A 03101.89805968 .00000719 00000-0 16399-3 0 8298
+2 25791 24.9841 128.6245 0010100 314.9047 45.0638 14.41314506200177
+FUSE 1
+1 25791U 99035A 03100.72095835 .00000735 00000-0 16862-3 0 8285
+2 25791 24.9823 135.8422 0010255 300.3804 59.5679 14.41313234200009
+FUSE 1
+1 25791U 99035A 03099.95930502 +.00000731 +00000-0 +16758-3 0 08321
+2 25791 024.9822 140.5054 0010257 292.8087 067.1336 14.41312329199895
+FUSE 1
+1 25791U 99035A 03099.54386033 .00000758 00000-0 17568-3 0 8273
+2 25791 24.9817 143.0635 0010123 287.3571 72.5830 14.41312013199834
+FUSE 1
+1 25791U 99035A 03098.92068851 +.00000723 +00000-0 +16491-3 0 08499
+2 25791 024.9816 146.8804 0010159 280.5747 079.3533 14.41310909199748
+FUSE 1
+1 25791U 99035A 03098.22827686 .00000751 00000-0 17368-3 0 8261
+2 25791 24.9821 151.1234 0010310 272.8590 87.0746 14.41310499199644
+FUSE 1
+1 25791U 99035A 03097.18965913 .00000710 00000-0 16100-3 0 8258
+2 25791 24.9822 157.4830 0010353 261.6244 98.3091 14.41308833199495
+FUSE 1
+1 25791U 99035A 03095.94331601 .00000705 00000-0 15943-3 0 8248
+2 25791 24.9828 165.1153 0010485 248.0340 111.9051 14.41307527199315
+FUSE 1
+1 25791U 99035A 03094.55849177 .00000687 00000-0 15400-3 0 8232
+2 25791 24.9837 173.5981 0010507 233.7648 126.1888 14.41305878199115
+FUSE 1
+1 25791U 99035A 03093.79684032 +.00000617 +00000-0 +13296-3 0 08340
+2 25791 024.9830 178.2689 0010658 225.6842 134.2806 14.41303892199000
+FUSE 1
+1 25791U 99035A 03093.45063419 .00000588 00000-0 12399-3 0 8220
+2 25791 24.9830 180.3890 0010661 222.1502 137.8185 14.41303261198959
+FUSE 1
+1 25791U 99035A 03092.06580825 .00000498 00000-0 96689-4 0 8215
+2 25791 24.9829 188.8687 0010595 207.4856 152.5026 14.41301203198758
+FUSE 1
+1 25791U 99035A 03090.88870503 .00000512 00000-0 10095-3 0 8200
+2 25791 24.9830 196.0770 0010689 195.3984 164.6200 14.41300573198583
+FUSE 1
+1 25791U 99035A 03089.91932625 +.00000473 +00000-0 +89013-4 0 08355
+2 25791 024.9831 202.0132 0010707 185.2549 174.7855 14.41299501198441
+FUSE 1
+1 25791U 99035A 03089.57311974 .00000447 00000-0 81025-4 0 8193
+2 25791 24.9832 204.1347 0010678 181.8480 178.1989 14.41298969198393
+FUSE 1
+1 25791U 99035A 03088.18829319 .00000422 00000-0 73584-4 0 8189
+2 25791 24.9836 212.6159 0010751 167.8506 192.2415 14.41297973198190
+FUSE 1
+1 25791U 99035A 03087.14967143 .00000439 00000-0 78641-4 0 8178
+2 25791 24.9834 218.9892 0010499 154.7731 205.3306 14.41297621198044
+FUSE 1
+1 25791U 99035A 03086.94194663 +.00000428 +00000-0 +75286-4 0 08488
+2 25791 024.9835 220.2611 0010504 152.4498 207.6568 14.41297416198016
+FUSE 1
+1 25791U 99035A 03085.90332252 .00000414 00000-0 71085-4 0 8164
+2 25791 24.9838 226.6261 0010293 142.1870 217.9362 14.41296881197868
+FUSE 1
+1 25791U 99035A 03085.90332251 +.00000414 +00000-0 +71084-4 0 08173
+2 25791 024.9838 226.6261 0010293 142.1870 217.9361 14.41296881197867
+FUSE 1
+1 25791U 99035A 03084.86469882 .00000343 00000-0 49516-4 0 8152
+2 25791 24.9847 232.9875 0010201 130.8102 229.3297 14.41295801197719
+FUSE 1
+1 25791U 99035A 03083.89531250 +.00000489 +00000-0 +93920-4 0 08321
+2 25791 024.9844 238.9268 0010672 122.1781 237.9761 14.41296727197570
+FUSE 1
+1 25791U 99035A 03083.54910375 .00000503 00000-0 98232-4 0 8140
+2 25791 24.9844 241.0479 0010701 118.5123 241.6462 14.41296648197528
+FUSE 1
+1 25791U 99035A 03082.92592724 +.00000523 +00000-0 +10446-3 0 08451
+2 25791 024.9843 244.8641 0010700 112.2904 247.8737 14.41296449197438
+FUSE 1
+1 25791U 99035A 03082.16426759 .00000526 00000-0 10521-3 0 8133
+2 25791 24.9841 249.5294 0010669 104.2866 255.8838 14.41295912197327
+FUSE 1
+1 25791U 99035A 03081.12563750 .00000612 00000-0 13128-3 0 8122
+2 25791 24.9842 255.8923 0010711 94.3078 265.8647 14.41296014197175
+FUSE 1
+1 25791U 99035A 03079.87928172 .00000670 00000-0 14898-3 0 8112
+2 25791 24.9845 263.5260 0010772 80.9467 279.2259 14.41295470196990
+FUSE 1
+1 25791U 99035A 03078.90989285 +.00000680 +00000-0 +15204-3 0 08356
+2 25791 024.9842 269.4617 0010753 070.0356 290.1308 14.41294541196854
+FUSE 1
+1 25791U 99035A 03078.56368187 .00000702 00000-0 15885-3 0 8103
+2 25791 24.9840 271.5817 0010757 66.2560 293.9075 14.41294387196801
+FUSE 1
+1 25791U 99035A 03077.17883857 .00000638 00000-0 13930-3 0 8090
+2 25791 24.9843 280.0617 0010654 50.7889 309.3564 14.41292379196607
+FUSE 1
+1 25791U 99035A 03076.14020216 .00000782 00000-0 18324-3 0 8089
+2 25791 24.9848 286.4255 0010468 43.0582 317.0743 14.41292815196451
+FUSE 1
+1 25791U 99035A 03074.89383969 .00000825 00000-0 19632-3 0 8076
+2 25791 24.9853 294.0604 0010385 30.7066 329.4048 14.41291731196279
+FUSE 1
+1 25791U 99035A 03073.43974802 .00000854 00000-0 20497-3 0 8069
+2 25791 24.9852 302.9660 0010367 15.2865 344.7954 14.41290069196060
+FUSE 1
+1 25791U 99035A 03072.19338203 .00000856 00000-0 20554-3 0 8055
+2 25791 24.9854 310.5981 0010287 2.1680 357.8866 14.41288422195880
+FUSE 1
+1 25791U 99035A 03071.08550087 .00000818 00000-0 19402-3 0 8045
+2 25791 24.9860 317.3842 0010263 349.9948 10.0353 14.41286657195721
+FUSE 1
+1 25791U 99035A 03069.97761880 +.00000763 +00000-0 +17745-3 0 08086
+2 25791 024.9860 324.1683 0010236 338.1839 021.8232 14.41284751195560
+FUSE 1
+1 25791U 99035A 03069.90837617 .00000758 00000-0 17585-3 0 8032
+2 25791 24.9860 324.5922 0010236 337.4031 22.6028 14.41284617195558
+FUSE 1
+1 25791U 99035A 03068.93897780 +.00000723 +00000-0 +16521-3 0 08098
+2 25791 024.9864 330.5285 0010290 326.4566 033.5291 14.41283191195416
+FUSE 1
+1 25791U 99035A 03068.86973524 .00000716 00000-0 16303-3 0 8024
+2 25791 24.9864 330.9527 0010287 325.7078 34.2768 14.41283044195408
+FUSE 1
+1 25791U 99035A 03067.55412264 .00000656 00000-0 14496-3 0 8011
+2 25791 24.9864 339.0080 0010311 311.6370 48.3251 14.41281081195210
+FUSE 1
+1 25791U 99035A 03066.44623884 .00000578 00000-0 12112-3 0 8005
+2 25791 24.9864 345.7927 0010333 299.7399 60.2082 14.41279280195050
+FUSE 1
+1 25791U 99035A 03065.40759665 .00000526 00000-0 10514-3 0 7991
+2 25791 24.9863 352.1521 0010350 288.8170 71.1215 14.41277936194904
+FUSE 1
+1 25791U 99035A 03064.23046813 .00000487 00000-0 93421-4 0 7989
+2 25791 24.9864 359.3605 0010411 275.9615 83.9706 14.41276773194731
+FUSE 1
+1 25791U 99035A 03062.98409806 +.00000428 +00000-0 +75413-4 0 08015
+2 25791 024.9863 006.9942 0010426 262.5976 097.3348 14.41275346194553
+FUSE 1
+1 25791U 99035A 03062.91485526 .00000425 00000-0 74460-4 0 7973
+2 25791 24.9862 7.4181 0010421 261.8604 98.0722 14.41275270194547
+FUSE 1
+1 25791U 99035A 03061.94545741 +.00000420 +00000-0 +73017-4 0 08008
+2 25791 024.9848 013.3688 0010509 252.6434 107.2924 14.41274844194403
+FUSE 1
+1 25791U 99035A 03061.66848589 .00000420 00000-0 73002-4 0 7961
+2 25791 24.9848 15.0645 0010505 249.7386 110.1988 14.41274707194360
+FUSE 1
+1 25791U 99035A 03060.49135828 .00000388 00000-0 63176-4 0 7959
+2 25791 24.9852 22.2747 0010610 237.5708 122.3771 14.41273890194196
+FUSE 1
+1 25791U 99035A 03059.24498747 .00000395 00000-0 65325-4 0 7947
+2 25791 24.9851 29.9090 0010713 224.4424 135.5221 14.41273446194018
+FUSE 1
+1 25791U 99035A 03058.96801613 +.00000410 +00000-0 +70039-4 0 08335
+2 25791 024.9848 031.6055 0010711 221.6605 138.3087 14.41273447193979
+FUSE 1
+1 25791U 99035A 03057.79088784 .00000466 00000-0 86878-4 0 7935
+2 25791 24.9852 38.8148 0010787 209.3160 150.6743 14.41273450193800
+FUSE 1
+1 25791U 99035A 03056.75224577 .00000511 00000-0 10064-3 0 7925
+2 25791 24.9849 45.1756 0010796 198.5017 161.5097 14.41273260193657
+FUSE 1
+1 25791U 99035A 03055.71360371 .00000543 00000-0 11053-3 0 7916
+2 25791 24.9851 51.5371 0010893 187.8825 172.1502 14.41272912193506
+FUSE 1
+1 25791U 99035A 03054.81344706 +.00000592 +00000-0 +12526-3 0 07943
+2 25791 024.9854 057.0504 0010975 178.3725 181.6813 14.41272772193372
+FUSE 1
+1 25791U 99035A 03054.53647601 .00000595 00000-0 12630-3 0 7907
+2 25791 24.9855 58.7463 0010996 175.5448 184.5158 14.41272591193338
+FUSE 1
+1 25791U 99035A 03053.22086164 .00000648 00000-0 14239-3 0 7897
+2 25791 24.9854 66.8027 0011082 162.1387 197.9511 14.41272079193145
+FUSE 1
+1 25791U 99035A 03052.18221916 .00000654 00000-0 14422-3 0 7887
+2 25791 24.9857 73.1612 0010974 150.9371 209.1749 14.41271157192993
+FUSE 1
+1 25791U 99035A 03051.69751897 +.00000653 +00000-0 +14404-3 0 08192
+2 25791 024.9857 076.1286 0010974 145.8259 214.2956 14.41270685192926
+FUSE 1
+1 25791U 99035A 03050.86660284 .00000682 00000-0 15278-3 0 7875
+2 25791 24.9852 81.2163 0010966 137.4487 222.6871 14.41270247192803
+FUSE 1
+1 25791U 99035A 03049.55098927 .00000679 00000-0 15178-3 0 7862
+2 25791 24.9830 89.2921 0010776 123.5065 236.6474 14.41268750192615
+FUSE 1
+1 25791U 99035A 03046.91974757 .00000708 00000-0 16072-3 0 7848
+2 25791 24.9828 105.4061 0010755 96.1405 264.0326 14.41266314192231
+FUSE 1
+1 25791U 99035A 03045.81185480 .00000675 00000-0 15076-3 0 7838
+2 25791 24.9829 112.1925 0010804 84.5002 275.6738 14.41264829192071
+FUSE 1
+1 25791U 99035A 03044.56547187 .00000671 00000-0 14933-3 0 7821
+2 25791 24.9825 119.8235 0010884 72.1647 288.0048 14.41263465191897
+FUSE 1
+1 25791U 99035A 03043.87303595 +.00000663 +00000-0 +14707-3 0 08086
+2 25791 024.9823 124.0647 0010837 064.8117 295.3515 14.41262691191797
+FUSE 1
+1 25791U 99035A 03043.24984329 .00000652 00000-0 14385-3 0 7817
+2 25791 24.9824 127.8828 0010807 58.4950 301.6614 14.41261995191709
+FUSE 1
+1 25791U 99035A 03042.07269992 .00000613 00000-0 13188-3 0 7805
+2 25791 24.9827 135.0921 0010730 46.2939 313.8459 14.41260560191534
+FUSE 1
+1 25791U 99035A 03040.82631031 .00000590 00000-0 12473-3 0 7791
+2 25791 24.9825 142.7255 0010676 33.4461 326.6705 14.41259243191356
+FUSE 1
+1 25791U 99035A 03039.57991945 .00000595 00000-0 12637-3 0 7780
+2 25791 24.9832 150.3613 0010568 20.6980 339.3959 14.41258343191173
+FUSE 1
+1 25791U 99035A 03038.54125940 .00000562 00000-0 11637-3 0 7772
+2 25791 24.9831 156.7218 0010533 9.4132 350.6584 14.41257190191022
+FUSE 1
+1 25791U 99035A 03037.01788880 .00000562 00000-0 11641-3 0 7765
+2 25791 24.9831 166.0494 0010450 353.4940 6.5445 14.41256054190805
+FUSE 1
+1 25791U 99035A 03035.90998290 +.00000529 +00000-0 +10615-3 0 07762
+2 25791 024.9834 172.8362 0010444 341.3662 018.6462 14.41254945190649
+FUSE 1
+1 25791U 99035A 03035.84073869 .00000529 00000-0 10615-3 0 7750
+2 25791 24.9834 173.2601 0010444 340.6394 19.3715 14.41254896190637
+FUSE 1
+1 25791U 99035A 03034.94056470 +.00000514 +00000-0 +10178-3 0 07937
+2 25791 024.9830 178.7729 0010445 331.0545 028.9383 14.41254106190504
+FUSE 1
+1 25791U 99035A 03034.59434384 .00000508 00000-0 99976-4 0 7748
+2 25791 24.9829 180.8929 0010469 327.4109 32.5752 14.41253798190450
+FUSE 1
+1 25791U 99035A 03033.55568063 .00000512 00000-0 10098-3 0 7736
+2 25791 24.9832 187.2531 0010490 316.1247 43.8429 14.41253174190304
+FUSE 1
+1 25791U 99035A 03032.24004087 .00000509 00000-0 10030-3 0 7723
+2 25791 24.9833 195.3101 0010479 301.8051 58.1431 14.41252308190118
+FUSE 1
+1 25791U 99035A 03031.13213438 .00000500 00000-0 97473-4 0 7719
+2 25791 24.9834 202.0943 0010489 289.8402 70.0976 14.41251485189957
+FUSE 1
+1 25791U 99035A 03029.95498370 +.00000507 +00000-0 +99455-4 0 07726
+2 25791 024.9833 209.3044 0010568 277.2138 082.7170 14.41250807189787
+FUSE 1
+1 25791U 99035A 03029.88573951 .00000506 00000-0 99284-4 0 7704
+2 25791 24.9834 209.7284 0010567 276.4676 83.4627 14.41250759189775
+FUSE 1
+1 25791U 99035A 03028.91632543 +.00000457 +00000-0 +84396-4 0 07714
+2 25791 024.9829 215.6872 0010688 267.6409 092.2873 14.41250112189637
+FUSE 1
+1 25791U 99035A 03028.84708138 .00000459 00000-0 84922-4 0 7694
+2 25791 24.9829 216.1111 0010685 266.8899 93.0390 14.41250090189627
+FUSE 1
+1 25791U 99035A 03027.94690786 +.00000485 +00000-0 +92887-4 0 07916
+2 25791 024.9829 221.6256 0010733 257.2339 102.6968 14.41249791189494
+FUSE 1
+1 25791U 99035A 03027.39295481 .00000522 00000-0 10395-3 0 7687
+2 25791 24.9825 225.0181 0010750 251.6346 108.2992 14.41249718189410
+FUSE 1
+1 25791U 99035A 03026.90824636 +.00000535 +00000-0 +10794-3 0 07938
+2 25791 024.9827 227.9872 0010755 246.4607 113.4770 14.41249533189346
+FUSE 1
+1 25791U 99035A 03026.21580544 .00000600 00000-0 12773-3 0 7672
+2 25791 24.9822 232.2291 0010751 239.2471 120.6976 14.41249537189241
+FUSE 1
+1 25791U 99035A 03024.90017016 .00000620 00000-0 13395-3 0 7667
+2 25791 24.9825 240.2875 0010606 224.5201 135.4454 14.41248661189059
+FUSE 1
+1 25791U 99035A 03023.86150943 .00000683 00000-0 15306-3 0 7650
+2 25791 24.9823 246.6490 0010698 213.6230 146.3601 14.41248266188901
+FUSE 1
+1 25791U 99035A 03022.96133739 +.00000720 +00000-0 +16435-3 0 07885
+2 25791 024.9822 252.1619 0010714 203.8994 156.1017 14.41247660188774
+FUSE 1
+1 25791U 99035A 03022.47662920 .00000753 00000-0 17422-3 0 7647
+2 25791 24.9818 255.1315 0010728 199.1571 160.8533 14.41247360188703
+FUSE 1
+1 25791U 99035A 03021.23023620 .00000814 00000-0 19309-3 0 7631
+2 25791 24.9818 262.7649 0010872 186.1483 173.8893 14.41246466188524
+FUSE 1
+1 25791U 99035A 03020.19157559 .00000839 00000-0 20070-3 0 7627
+2 25791 24.9818 269.1258 0010854 175.1951 184.8664 14.41245346188376
+FUSE 1
+1 25791U 99035A 03019.15291393 .00000874 00000-0 21118-3 0 7618
+2 25791 24.9818 275.4875 0010879 164.2609 195.8238 14.41244267188221
+FUSE 1
+1 25791U 99035A 03017.90651918 .00000882 00000-0 21358-3 0 7606
+2 25791 24.9820 283.1229 0010889 151.5092 208.6013 14.41242588188047
+FUSE 1
+1 25791U 99035A 03016.86785572 .00000849 00000-0 20352-3 0 7598
+2 25791 24.9821 289.4833 0010877 140.6893 219.4408 14.41240829187899
+FUSE 1
+1 25791U 99035A 03015.96767820 +.00000843 +00000-0 +20187-3 0 07628
+2 25791 024.9820 294.9922 0010992 131.6564 228.4886 14.41239598187768
+FUSE 1
+1 25791U 99035A 03015.41372249 .00000840 00000-0 20100-3 0 7582
+2 25791 24.9820 298.3836 0010997 125.8349 234.3181 14.41238834187688
+FUSE 1
+1 25791U 99035A 03014.23656622 .00000784 00000-0 18395-3 0 7570
+2 25791 24.9824 305.5944 0010955 113.8675 246.2990 14.41236827187518
+FUSE 1
+1 25791U 99035A 03013.19789667 .00000698 00000-0 15769-3 0 7565
+2 25791 24.9829 311.9557 0010860 103.1125 257.0596 14.41234894187368
+FUSE 1
+1 25791U 99035A 03012.92091841 +.00000651 +00000-0 +14337-3 0 07913
+2 25791 024.9830 313.6530 0010837 100.3922 259.7809 14.41234171187328
+FUSE 1
+1 25791U 99035A 03011.95149077 +.00000591 +00000-0 +12511-3 0 07599
+2 25791 024.9833 319.5894 0010774 090.1943 269.9802 14.41232741187189
+FUSE 1
+1 25791U 99035A 03011.88224586 .00000585 00000-0 12347-3 0 7556
+2 25791 24.9834 320.0134 0010776 89.4952 270.6791 14.41232635187174
+FUSE 1
+1 25791U 99035A 03010.49734521 .00000571 00000-0 11922-3 0 7549
+2 25791 24.9836 328.4940 0010755 75.1825 284.9873 14.41231417186974
+FUSE 1
+1 25791U 99035A 03009.38942288 .00000562 00000-0 11651-3 0 7534
+2 25791 24.9838 335.2793 0010726 63.5938 296.5669 14.41230504186813
+FUSE 1
+1 25791U 99035A 03008.21225405 .00000536 00000-0 10847-3 0 7526
+2 25791 24.9841 342.4893 0010658 51.4879 308.6589 14.41229428186642
+FUSE 1
+1 25791U 99035A 03007.17357430 .00000496 00000-0 96283-4 0 7517
+2 25791 24.9846 348.8510 0010606 40.2151 319.9146 14.41228391186490
+FUSE 1
+1 25791U 99035A 03005.71941978 .00000492 00000-0 95196-4 0 7508
+2 25791 24.9848 357.7568 0010489 25.1948 334.9069 14.41227497186283
+FUSE 1
+1 25791U 99035A 03004.54224559 .00000519 00000-0 10345-3 0 7497
+2 25791 24.9849 4.9669 0010381 12.5994 347.4773 14.41226999186118
+FUSE 1
+1 25791U 99035A 03003.22657791 .00000659 00000-0 14583-3 0 7481
+2 25791 24.9844 13.0234 0010171 358.9129 1.1355 14.41227192185920
+FUSE 1
+1 25791U 99035A 03001.70317381 +.00000783 +00000-0 +18366-3 0 07470
+2 25791 024.9836 022.3505 0010142 342.3951 017.6202 14.41226616185702
+FUSE 1
+1 25791U 99035A 02365.66448900 .00000905 00000-0 22093-3 0 7466
+2 25791 24.9828 28.7111 0010120 331.1925 28.8023 14.41226254185555
+FUSE 1
+1 25791U 99035A 02364.55655917 .00001003 00000-0 25056-3 0 7452
+2 25791 24.9823 35.4963 0010124 319.5885 40.3870 14.41225360185397
+FUSE 1
+1 25791U 99035A 02363.24089208 .00001123 00000-0 28737-3 0 7442
+2 25791 24.9817 43.5541 0010043 305.4795 54.4774 14.41224128185206
+FUSE 1
+1 25791U 99035A 02361.85597983 .00001182 00000-0 30525-3 0 7433
+2 25791 24.9811 52.0336 0010047 290.8057 69.1372 14.41221885185001
+FUSE 1
+1 25791U 99035A 02360.81729577 .00001190 00000-0 30775-3 0 7429
+2 25791 24.9811 58.3946 0010013 279.4423 80.4952 14.41219863184855
+FUSE 1
+1 25791U 99035A 02359.98634816 +.00001193 +00000-0 +30865-3 0 07531
+2 25791 024.9811 063.4834 0010006 270.4269 089.5092 14.41218193184736
+FUSE 1
+1 25791U 99035A 02359.57087417 .00001197 00000-0 30966-3 0 7418
+2 25791 24.9812 66.0284 0010007 265.9037 94.0326 14.41217390184670
+FUSE 1
+1 25791U 99035A 02356.87029074 .00001204 00000-0 31182-3 0 7390
+2 25791 24.9811 82.5668 0009938 236.3646 123.5914 14.41211956184287
+FUSE 1
+1 25791U 99035A 02355.55462023 .00001090 00000-0 27728-3 0 7382
+2 25791 24.9809 90.6214 0010165 222.2949 137.6776 14.41208399184093
+FUSE 1
+1 25791U 99035A 02354.51593217 .00001046 00000-0 26390-3 0 7371
+2 25791 24.9811 96.9840 0010179 211.0308 148.9598 14.41206118183947
+FUSE 1
+1 25791U 99035A 02353.13101277 .00001006 00000-0 25162-3 0 7360
+2 25791 24.9814 105.4674 0010149 196.0465 163.9721 14.41203384183749
+FUSE 1
+1 25791U 99035A 02351.95382922 +.00000934 +00000-0 +22963-3 0 07372
+2 25791 024.9817 112.6764 0010197 184.0228 176.0200 14.41200867183570
+FUSE 1
+1 25791U 99035A 02351.88458303 .00000934 00000-0 22971-3 0 7358
+2 25791 24.9817 113.1005 0010193 183.2930 176.7513 14.41200763183569
+FUSE 1
+1 25791U 99035A 02350.91513627 +.00000904 +00000-0 +22045-3 0 07519
+2 25791 024.9819 119.0445 0010562 174.0065 186.0569 14.41199099183420
+FUSE 1
+1 25791U 99035A 02350.56890542 .00000886 00000-0 21508-3 0 7347
+2 25791 24.9818 121.1673 0010554 170.6826 189.3879 14.41198405183378
+FUSE 1
+1 25791U 99035A 02349.11473244 .00000853 00000-0 20507-3 0 7333
+2 25791 24.9823 130.0779 0010595 156.0675 204.0329 14.41196121183160
+FUSE 1
+1 25791U 99035A 02347.86829613 .00000843 00000-0 20210-3 0 7327
+2 25791 24.9826 137.7176 0010579 143.6291 216.4936 14.41194381182982
+FUSE 1
+1 25791U 99035A 02346.96809054 +.00000846 +00000-0 +20310-3 0 07328
+2 25791 024.9827 143.2322 0010589 134.4622 225.6760 14.41193196182851
+FUSE 1
+1 25791U 99035A 02346.82959720 .00000840 00000-0 20129-3 0 7310
+2 25791 24.9828 144.0807 0010580 133.0588 227.0808 14.41192967182838
+FUSE 1
+1 25791U 99035A 02345.92939017 +.00000816 +00000-0 +19371-3 0 07418
+2 25791 024.9830 149.5942 0010509 123.9678 236.1843 14.41191589182705
+FUSE 1
+1 25791U 99035A 02345.58315657 .00000792 00000-0 18653-3 0 7301
+2 25791 24.9831 151.7183 0010408 120.6946 239.4591 14.41190929182655
+FUSE 1
+1 25791U 99035A 02344.89068773 +.00000785 +00000-0 +18451-3 0 07429
+2 25791 024.9831 155.9574 0010423 113.3541 246.8055 14.41190019182558
+FUSE 1
+1 25791U 99035A 02344.54445368 .00000789 00000-0 18568-3 0 7298
+2 25791 24.9831 158.0799 0010476 110.1229 250.0410 14.41189637182508
+FUSE 1
+1 25791U 99035A 02343.15951322 .00000783 00000-0 18396-3 0 7288
+2 25791 24.9834 166.5623 0010426 96.2869 263.8829 14.41187968182309
+FUSE 1
+1 25791U 99035A 02342.88252492 +.00000775 +00000-0 +18152-3 0 07460
+2 25791 024.9835 168.2588 0010398 093.2895 266.8803 14.41187559182269
+FUSE 1
+1 25791U 99035A 02341.98231177 .00000761 00000-0 17708-3 0 7277
+2 25791 24.9836 173.7711 0010366 83.7509 276.4178 14.41186369182136
+FUSE 1
+1 25791U 99035A 02340.87435475 .00000768 00000-0 17944-3 0 7269
+2 25791 24.9836 180.5545 0010319 72.0817 288.0815 14.41185129181979
+FUSE 1
+1 25791U 99035A 02339.90489123 +.00000743 +00000-0 +17159-3 0 07373
+2 25791 024.9838 186.4897 0010302 061.8181 298.3364 14.41183804181834
+FUSE 1
+1 25791U 99035A 02339.00467365 .00000760 00000-0 17694-3 0 7258
+2 25791 24.9837 192.0009 0010340 52.4233 307.7215 14.41182886181702
+FUSE 1
+1 25791U 99035A 02337.96595978 +.00000747 +00000-0 +17292-3 0 07274
+2 25791 024.9838 198.3601 0010349 041.4682 318.6611 14.41181581181550
+FUSE 1
+1 25791U 99035A 02337.89671225 .00000735 00000-0 16930-3 0 7248
+2 25791 24.9838 198.7841 0010344 40.6825 319.4454 14.41181406181544
+FUSE 1
+1 25791U 99035A 02336.92724431 +.00000730 +00000-0 +16784-3 0 07263
+2 25791 024.9839 204.7190 0010345 030.4753 329.6355 14.41180304181402
+FUSE 1
+1 25791U 99035A 02336.85799660 .00000726 00000-0 16666-3 0 7232
+2 25791 24.9840 205.1432 0010343 29.6910 330.4183 14.41180198181399
+FUSE 1
+1 25791U 99035A 02335.95777534 +.00000723 +00000-0 +16574-3 0 07378
+2 25791 024.9840 210.6541 0010353 020.2600 339.8318 14.41179182181265
+FUSE 1
+1 25791U 99035A 02335.12680126 .00000724 00000-0 16595-3 0 7225
+2 25791 24.9839 215.7423 0010346 11.4473 348.6270 14.41178242181148
+FUSE 1
+1 25791U 99035A 02333.88033836 .00000777 00000-0 18215-3 0 7214
+2 25791 24.9838 223.3729 0010367 358.4414 1.6064 14.41177194180964
+FUSE 1
+1 25791U 99035A 02332.21838680 .00000738 00000-0 17012-3 0 7200
+2 25791 24.9840 233.5483 0010369 340.4562 19.5551 14.41175004180725
+FUSE 1
+1 25791U 99035A 02330.97192266 +.00000736 +00000-0 +16945-3 0 07228
+2 25791 024.9841 241.1847 0010383 327.1955 032.7907 14.41173576180543
+FUSE 1
+1 25791U 99035A 02330.90267454 .00000744 00000-0 17204-3 0 7197
+2 25791 24.9842 241.6086 0010384 326.4698 33.5151 14.41173549180530
+FUSE 1
+1 25791U 99035A 02329.93320137 +.00000795 +00000-0 +18754-3 0 07238
+2 25791 024.9841 247.5450 0010325 316.0567 043.9119 14.41172687180399
+FUSE 1
+1 25791U 99035A 02329.86395339 .00000793 00000-0 18694-3 0 7181
+2 25791 24.9841 247.9690 0010320 315.3599 44.6079 14.41172585180380
+FUSE 1
+1 25791U 99035A 02328.96372831 +.00000874 +00000-0 +21177-3 0 07262
+2 25791 024.9839 253.4818 0010301 306.0731 053.8822 14.41171745180256
+FUSE 1
+1 25791U 99035A 02328.47899189 .00000852 00000-0 20479-3 0 7178
+2 25791 24.9839 256.4492 0010283 300.9882 58.9620 14.41170988180188
+FUSE 1
+1 25791U 99035A 02327.23252631 .00000997 00000-0 24907-3 0 7165
+2 25791 24.9837 264.0850 0010209 287.9702 71.9692 14.41169674180007
+FUSE 1
+1 25791U 99035A 02325.91681241 .00001075 00000-0 27280-3 0 7155
+2 25791 24.9835 272.1466 0010275 274.0090 85.9246 14.41167756179814
+FUSE 1
+1 25791U 99035A 02324.94733872 +.00001074 +00000-0 +27250-3 0 07151
+2 25791 024.9837 278.0849 0010343 263.9267 096.0064 14.41166020179673
+FUSE 1
+1 25791U 99035A 02324.67034596 .00001073 00000-0 27216-3 0 7148
+2 25791 24.9837 279.7804 0010340 261.0175 98.9158 14.41165514179634
+FUSE 1
+1 25791U 99035A 02323.97786359 +.00001085 +00000-0 +27593-3 0 07186
+2 25791 024.9834 284.0218 0010561 253.2107 106.7242 14.41164354179534
+FUSE 1
+1 25791U 99035A 02323.56237448 .00001085 00000-0 27595-3 0 7138
+2 25791 24.9834 286.5654 0010546 248.8875 111.0502 14.41163593179475
+FUSE 1
+1 25791U 99035A 02322.24665714 .00001162 00000-0 29927-3 0 7129
+2 25791 24.9833 294.6241 0010703 233.4813 126.4702 14.41161870179280
+FUSE 1
+1 25791U 99035A 02321.20793280 .00001220 00000-0 31720-3 0 7112
+2 25791 24.9829 300.9847 0010808 222.5858 137.3810 14.41160264179133
+FUSE 1
+1 25791U 99035A 02319.40747635 .00001263 00000-0 33024-3 0 7109
+2 25791 24.9825 312.0065 0010876 203.7169 156.2843 14.41156787178877
+FUSE 1
+1 25791U 99035A 02318.64574421 +.00001273 +00000-0 +33320-3 0 07183
+2 25791 024.9823 316.6719 0010904 195.8401 164.1766 14.41155172178760
+FUSE 1
+1 25791U 99035A 02317.81476349 +.00001220 +00000-0 +31728-3 0 07352
+2 25791 024.9826 321.7601 0010933 187.6105 172.4237 14.41152903178643
+FUSE 1
+1 25791U 99035A 02316.84528386 .00001225 00000-0 31884-3 0 7081
+2 25791 24.9827 327.6980 0010976 177.5120 182.5438 14.41150915178502
+FUSE 1
+1 25791U 99035A 02315.59880787 .00001242 00000-0 32394-3 0 7073
+2 25791 24.9825 335.3293 0011048 164.4233 195.6623 14.41148412178324
+FUSE 1
+1 25791U 99035A 02314.69857361 +.00001241 +00000-0 +32373-3 0 07071
+2 25791 024.9823 340.8415 0011033 155.1164 204.9876 14.41146449178190
+FUSE 1
+1 25791U 99035A 02314.56007609 .00001242 00000-0 32393-3 0 7061
+2 25791 24.9823 341.6892 0011038 153.6592 206.4489 14.41146160178176
+FUSE 1
+1 25791U 99035A 02313.24434699 .00001193 00000-0 30916-3 0 7051
+2 25791 24.9828 349.7471 0011087 140.1634 219.9694 14.41143010177981
+FUSE 1
+1 25791U 99035A 02312.20561116 .00001132 00000-0 29035-3 0 7043
+2 25791 24.9834 356.1079 0011110 129.7443 230.4048 14.41140389177833
+FUSE 1
+1 25791U 99035A 02311.92861422 +.00001126 +00000-0 +28868-3 0 07309
+2 25791 024.9835 357.8035 0011119 126.7910 233.3617 14.41139808177792
+FUSE 1
+1 25791U 99035A 02310.95912468 +.00001083 +00000-0 +27550-3 0 07048
+2 25791 024.9837 003.7403 0011086 116.7489 243.4157 14.41137566177658
+FUSE 1
+1 25791U 99035A 02310.82062580 .00001082 00000-0 27519-3 0 7038
+2 25791 24.9837 4.5881 0011089 115.2851 244.8806 14.41137305177632
+FUSE 1
+1 25791U 99035A 02309.78188408 +.00001035 +00000-0 +26086-3 0 07068
+2 25791 024.9840 010.9478 0011067 104.2526 255.9212 14.41135021177482
+FUSE 1
+1 25791U 99035A 02309.57413526 .00001031 00000-0 25964-3 0 7023
+2 25791 24.9841 12.2196 0011058 102.0689 258.1059 14.41134631177458
+FUSE 1
+1 25791U 99035A 02308.67388968 +.00001007 +00000-0 +25233-3 0 07048
+2 25791 024.9841 017.7307 0011071 092.5180 267.6595 14.41132871177326
+FUSE 1
+1 25791U 99035A 02308.53539014 .00001005 00000-0 25166-3 0 7013
+2 25791 24.9842 18.5786 0011066 91.0739 269.1037 14.41132629177302
+FUSE 1
+1 25791U 99035A 02307.08114362 .00000944 00000-0 23310-3 0 7006
+2 25791 24.9847 27.4838 0011100 76.0546 284.1186 14.41129780177094
+FUSE 1
+1 25791U 99035A 02306.04239290 .00000935 00000-0 23046-3 0 6992
+2 25791 24.9847 33.8456 0011062 65.0552 295.1089 14.41128082176944
+FUSE 1
+1 25791U 99035A 02304.86513927 .00000956 00000-0 23688-3 0 6986
+2 25791 24.9847 41.0556 0010946 52.9833 307.1674 14.41126496176775
+FUSE 1
+1 25791U 99035A 02303.89563460 +.00000960 +00000-0 +23806-3 0 06982
+2 25791 024.9849 046.9935 0010898 043.0452 317.0893 14.41125049176637
+FUSE 1
+1 25791U 99035A 02303.82638415 .00000966 00000-0 23984-3 0 6970
+2 25791 24.9849 47.4173 0010865 42.3451 317.7891 14.41125000176623
+FUSE 1
+1 25791U 99035A 02302.71837611 +.00001023 +00000-0 +25722-3 0 07019
+2 25791 024.9847 054.2005 0010813 031.1742 328.9406 14.41123746176466
+FUSE 1
+1 25791U 99035A 02302.57987459 .00001040 00000-0 26254-3 0 6962
+2 25791 24.9846 55.0483 0010830 29.7688 330.3422 14.41123680176445
+FUSE 1
+1 25791U 99035A 02300.98711079 .00001096 00000-0 27956-3 0 6958
+2 25791 24.9841 64.7981 0010843 13.0413 347.0373 14.41121314176213
+FUSE 1
+1 25791U 99035A 02299.87909991 .00001128 00000-0 28943-3 0 6947
+2 25791 24.9841 71.5856 0010786 1.4027 358.6513 14.41119575176050
+FUSE 1
+1 25791U 99035A 02298.84033835 .00001169 00000-0 30201-3 0 6932
+2 25791 24.9842 77.9480 0010811 350.6657 9.3651 14.41117963175906
+FUSE 1
+1 25791U 99035A 02297.94007642 +.00001182 +00000-0 +30577-3 0 06941
+2 25791 024.9844 083.4626 0010597 339.8645 020.1444 14.41116418175779
+FUSE 1
+1 25791U 99035A 02297.80157473 .00001180 00000-0 30538-3 0 6927
+2 25791 24.9845 84.3107 0010600 338.3923 21.6137 14.41116135175751
+FUSE 1
+1 25791U 99035A 02296.90131265 +.00001199 +00000-0 +31112-3 0 07052
+2 25791 024.9844 089.8231 0010565 328.5579 031.4298 14.41114507175620
+FUSE 1
+1 25791U 99035A 02296.55505701 .00001238 00000-0 32303-3 0 6914
+2 25791 24.9844 91.9448 0010517 324.3002 35.6802 14.41114238175578
+FUSE 1
+1 25791U 99035A 02295.93179849 +.00001243 +00000-0 +32465-3 0 07023
+2 25791 024.9845 095.7602 0010517 317.7975 042.1726 14.41112961175487
+FUSE 1
+1 25791U 99035A 02295.51629228 .00001254 00000-0 32781-3 0 6907
+2 25791 24.9843 98.3052 0010532 313.0139 46.9486 14.41112188175421
+FUSE 1
+1 25791U 99035A 02294.96228418 +.00001256 +00000-0 +32856-3 0 07075
+2 25791 024.9843 101.6963 0010529 307.2176 052.7370 14.41111015175348
+FUSE 1
+1 25791U 99035A 02294.13127216 .00001240 00000-0 32359-3 0 6898
+2 25791 24.9841 106.7843 0010541 298.5475 61.3971 14.41109044175226
+FUSE 1
+1 25791U 99035A 02293.92351906 +.00001239 +00000-0 +32344-3 0 07139
+2 25791 024.9843 108.0569 0010535 296.3424 063.6002 14.41108613175198
+FUSE 1
+1 25791U 99035A 02292.95400352 +.00001237 +00000-0 +32256-3 0 06905
+2 25791 024.9842 113.9928 0010572 285.9862 073.9481 14.41106520175057
+FUSE 1
+1 25791U 99035A 02292.88475244 .00001234 00000-0 32188-3 0 6887
+2 25791 24.9842 114.4167 0010574 285.2452 74.6888 14.41106349175045
+FUSE 1
+1 25791U 99035A 02291.56898052 .00001216 00000-0 31640-3 0 6878
+2 25791 24.9839 122.4724 0010637 271.2762 88.6530 14.41103373174859
+FUSE 1
+1 25791U 99035A 02290.94572017 +.00001195 +00000-0 +30991-3 0 07009
+2 25791 024.9844 126.2889 0010671 264.7560 095.1729 14.41101851174762
+FUSE 1
+1 25791U 99035A 02290.18395700 .00001174 00000-0 30345-3 0 6860
+2 25791 24.9843 130.9526 0010673 256.7111 103.2208 14.41100044174650
+FUSE 1
+1 25791U 99035A 02288.86818259 .00001140 00000-0 29323-3 0 6857
+2 25791 24.9845 139.0064 0010704 243.0013 116.9405 14.41097023174465
+FUSE 1
+1 25791U 99035A 02287.89866426 +.00001136 +00000-0 +29186-3 0 06894
+2 25791 024.9843 144.9409 0010684 232.7314 127.2281 14.41095095174326
+FUSE 1
+1 25791U 99035A 02287.20614986 .00001151 00000-0 29649-3 0 6847
+2 25791 24.9827 149.1875 0010669 225.6654 134.2979 14.41093836174225
+FUSE 1
+1 25791U 99035A 02285.89037225 .00001130 00000-0 29004-3 0 6836
+2 25791 24.9828 157.2454 0010692 211.9002 148.0860 14.41091133174039
+FUSE 1
+1 25791U 99035A 02284.85159928 .00001103 00000-0 28186-3 0 6825
+2 25791 24.9828 163.6064 0010728 200.9652 159.0419 14.41088960173884
+FUSE 1
+1 25791U 99035A 02283.32806291 .00001033 00000-0 26046-3 0 6812
+2 25791 24.9830 172.9322 0010689 184.6616 175.3793 14.41085821173666
+FUSE 1
+1 25791U 99035A 02282.98180447 +.00000996 +00000-0 +24906-3 0 06844
+2 25791 024.9832 175.0528 0010704 180.9650 179.0837 14.41085010173610
+FUSE 1
+1 25791U 99035A 02282.22003459 .00001026 00000-0 25852-3 0 6800
+2 25791 24.9831 179.7159 0010708 172.9134 187.1536 14.41083903173505
+FUSE 1
+1 25791U 99035A 02280.97350077 +.00000830 +00000-0 +19849-3 0 06802
+2 25791 024.9833 187.3563 0011025 161.6340 198.4554 14.41080808173324
+FUSE 1
+1 25791U 99035A 02280.90424885 .00000955 00000-0 23675-3 0 6792
+2 25791 24.9831 187.7802 0010991 160.8057 199.2869 14.41081211173315
+FUSE 1
+1 25791U 99035A 02279.93472079 +.00001010 +00000-0 +25355-3 0 06825
+2 25791 024.9829 193.7205 0011006 150.8784 209.2336 14.41079909173176
+FUSE 1
+1 25791U 99035A 02279.38070408 .00001043 00000-0 26359-3 0 6780
+2 25791 24.9829 197.1114 0011002 144.9425 215.1807 14.41079042173093
+FUSE 1
+1 25791U 99035A 02278.20341727 .00000963 00000-0 23930-3 0 6776
+2 25791 24.9832 204.3229 0011020 133.2028 226.9401 14.41076821172928
+FUSE 1
+1 25791U 99035A 02276.88762358 .00000955 00000-0 23667-3 0 6762
+2 25791 24.9828 212.3833 0011005 119.6564 240.5042 14.41074562172731
+FUSE 1
+1 25791U 99035A 02275.50257357 .00000810 00000-0 19257-3 0 6757
+2 25791 24.9832 220.8633 0010929 105.5890 254.5823 14.41071888172536
+FUSE 1
+1 25791U 99035A 02274.94855287 +.00000769 +00000-0 +18010-3 0 06782
+2 25791 024.9832 224.2597 0010747 099.8528 260.3191 14.41070889172458
+FUSE 1
+1 25791U 99035A 02274.39453091 .00000766 00000-0 17925-3 0 6745
+2 25791 24.9832 227.6504 0010741 94.0800 266.0941 14.41070217172379
+FUSE 1
+1 25791U 99035A 02273.97901442 +.00000752 +00000-0 +17475-3 0 06831
+2 25791 024.9833 230.1965 0010675 089.7969 270.3764 14.41069590172310
+FUSE 1
+1 25791U 99035A 02273.21723299 .00000755 00000-0 17576-3 0 6734
+2 25791 24.9834 234.8609 0010679 81.6884 278.4835 14.41068740172200
+FUSE 1
+1 25791U 99035A 02272.94022098 +.00000777 +00000-0 +18254-3 0 07023
+2 25791 024.9832 236.5583 0010621 078.7403 281.4295 14.41068586172166
+FUSE 1
+1 25791U 99035A 02271.97067853 +.00000808 +00000-0 +19195-3 0 06741
+2 25791 024.9832 242.4959 0010491 068.8195 291.3434 14.41067715172025
+FUSE 1
+1 25791U 99035A 02271.55516014 .00000808 00000-0 19212-3 0 6721
+2 25791 24.9832 245.0390 0010492 64.4543 295.7048 14.41067193171964
+FUSE 1
+1 25791U 99035A 02270.51636263 .00000857 00000-0 20706-3 0 6718
+2 25791 24.9832 251.3989 0010443 53.4959 306.6509 14.41066244171817
+FUSE 1
+1 25791U 99035A 02269.33905765 .00000893 00000-0 21807-3 0 6704
+2 25791 24.9833 258.6080 0010394 40.7861 319.3423 14.41064845171648
+FUSE 1
+1 25791U 99035A 02268.23100366 .00000992 00000-0 24815-3 0 6696
+2 25791 24.9827 265.3949 0010332 28.8061 331.3014 14.41063880171481
+FUSE 1
+1 25791U 99035A 02267.19220147 .00001098 00000-0 28063-3 0 6686
+2 25791 24.9823 271.7543 0010324 17.9281 342.1586 14.41062934171339
+FUSE 1
+1 25791U 99035A 02265.66862362 .00001232 00000-0 32165-3 0 6674
+2 25791 24.9816 281.0815 0010329 1.9220 358.1327 14.41060966171117
+FUSE 1
+1 25791U 99035A 02264.56056684 .00001222 00000-0 31866-3 0 6669
+2 25791 24.9817 287.8674 0010319 349.8851 10.1457 14.41058532170954
+FUSE 1
+1 25791U 99035A 02263.52176164 .00001227 00000-0 32006-3 0 6651
+2 25791 24.9817 294.2294 0010341 338.4888 21.5185 14.41056345170801
+FUSE 1
+1 25791U 99035A 02262.62146251 +.00001266 +00000-0 +33195-3 0 06726
+2 25791 024.9813 299.7417 0010331 328.9476 031.0420 14.41054666170677
+FUSE 1
+1 25791U 99035A 02262.41370124 .00001257 00000-0 32914-3 0 6640
+2 25791 24.9813 301.0139 0010341 326.6238 33.3618 14.41054137170641
+FUSE 1
+1 25791U 99035A 02261.23638509 .00001327 00000-0 35045-3 0 6638
+2 25791 24.9808 308.2225 0010336 313.5426 46.4225 14.41052008170473
+FUSE 1
+1 25791U 99035A 02260.19757547 .00001443 00000-0 38612-3 0 6627
+2 25791 24.9803 314.5833 0010346 302.4458 57.5047 14.41050420170321
+FUSE 1
+1 25791U 99035A 02259.71279796 +.00001450 +00000-0 +38808-3 0 06904
+2 25791 024.9803 317.5503 0010348 297.3449 062.6007 14.41049231170255
+FUSE 1
+1 25791U 99035A 02258.81249669 .00001457 00000-0 39044-3 0 6618
+2 25791 24.9801 323.0624 0010344 288.1227 71.8153 14.41046928170127
+FUSE 1
+1 25791U 99035A 02257.56592355 .00001607 00000-0 43604-3 0 6605
+2 25791 24.9798 330.6972 0010331 274.6720 85.2607 14.41044565169942
+FUSE 1
+1 25791U 99035A 02256.52711275 .00001599 00000-0 43384-3 0 6597
+2 25791 24.9793 337.0578 0010393 263.4699 96.4645 14.41041446169793
+FUSE 1
+1 25791U 99035A 02255.41904580 .00001584 00000-0 42933-3 0 6589
+2 25791 24.9787 343.8424 0010407 251.9278 108.0095 14.41038086169630
+FUSE 1
+1 25791U 99035A 02254.72650348 +.00001491 +00000-0 +40078-3 0 06835
+2 25791 024.9788 348.0813 0010411 244.6244 115.3195 14.41035736169537
+FUSE 1
+1 25791U 99035A 02253.89545131 .00001396 00000-0 37159-3 0 6576
+2 25791 24.9785 353.1698 0010435 235.7390 124.2119 14.41033155169416
+FUSE 1
+1 25791U 99035A 02252.92589091 +.00001057 +00000-0 +26812-3 0 06570
+2 25791 024.9789 359.1085 0010610 225.0767 134.8879 14.41029740169270
+FUSE 1
+1 25791U 99035A 02252.85663624 .00001059 00000-0 26870-3 0 6562
+2 25791 24.9790 359.5326 0010621 224.3210 135.6441 14.41029635169267
+FUSE 1
+1 25791U 99035A 02251.95632761 +.00001005 +00000-0 +25223-3 0 06562
+2 25791 024.9790 005.0443 0010707 214.4524 145.5288 14.41027801169131
+FUSE 1
+1 25791U 99035A 02251.81781883 .00001011 00000-0 25399-3 0 6557
+2 25791 24.9790 5.8921 0010710 212.9295 147.0567 14.41027608169112
+FUSE 1
+1 25791U 99035A 02250.70974565 +.00000905 +00000-0 +22152-3 0 06628
+2 25791 024.9792 012.6758 0010740 201.5396 158.4662 14.41025222168950
+FUSE 1
+1 25791U 99035A 02250.57123644 .00000892 00000-0 21766-3 0 6543
+2 25791 24.9793 13.5236 0010741 200.1557 159.8528 14.41024911168935
+FUSE 1
+1 25791U 99035A 02248.90912382 .00000783 00000-0 18435-3 0 6539
+2 25791 24.9796 23.6965 0010767 182.5930 177.4521 14.41021797168696
+FUSE 1
+1 25791U 99035A 02247.93955749 +.00000652 +00000-0 +14418-3 0 06762
+2 25791 024.9802 029.6342 0010910 173.0331 187.0327 14.41019680168553
+FUSE 1
+1 25791U 99035A 02247.24700867 .00000614 00000-0 13267-3 0 6528
+2 25791 24.9803 33.8749 0010996 165.8745 194.2065 14.41018736168453
+FUSE 1
+1 25791U 99035A 02246.13892944 .00000537 00000-0 10933-3 0 6513
+2 25791 24.9806 40.6587 0011018 154.5982 205.5064 14.41017206168294
+FUSE 1
+1 25791U 99035A 02244.89233811 .00000526 00000-0 10578-3 0 6508
+2 25791 24.9810 48.2931 0011178 142.1273 218.0023 14.41016304168112
+FUSE 1
+1 25791U 99035A 02243.57648803 .00000736 00000-0 16997-3 0 6495
+2 25791 24.9800 56.3527 0011307 128.8388 231.3126 14.41016815167921
+FUSE 1
+1 25791U 99035A 02242.12212513 .00001042 00000-0 26353-3 0 6487
+2 25791 24.9790 65.2545 0011385 113.4504 246.7186 14.41017164167715
+FUSE 1
+1 25791U 99035A 02241.15254607 .00001586 00000-0 42999-3 0 6475
+2 25791 24.9772 71.1895 0011244 103.6925 256.4821 14.41018933167574
+FUSE 1
+1 25791U 99035A 02240.87553062 .00000969 00000-0 24140-3 0 6461
+2 25791 24.9785 72.8895 0010796 101.1155 259.0566 14.41013762167531
+FUSE 1
+1 25791U 99035A 02239.90595273 +.00001112 +00000-0 +28499-3 0 06645
+2 25791 024.9781 078.8252 0010791 090.9038 269.2706 14.41013017167396
+FUSE 1
+1 25791U 99035A 02239.21339631 .00001213 00000-0 31602-3 0 6454
+2 25791 24.9777 83.0642 0010776 83.4859 276.6874 14.41012252167290
+FUSE 1
+1 25791U 99035A 02237.96679327 +.00001439 +00000-0 +38514-3 0 06496
+2 25791 024.9774 090.6979 0010768 071.0115 289.1558 14.41010739167110
+FUSE 1
+1 25791U 99035A 02237.89753765 .00001477 00000-0 39690-3 0 6440
+2 25791 24.9773 91.1232 0010788 70.3652 289.8019 14.41010744167101
+FUSE 1
+1 25791U 99035A 02236.44316461 .00001500 00000-0 40378-3 0 6439
+2 25791 24.9767 100.0287 0010670 55.6564 304.4950 14.41006864166893
+FUSE 1
+1 25791U 99035A 02235.19655478 .00001345 00000-0 35650-3 0 6427
+2 25791 24.9770 107.6610 0010486 43.1111 317.0209 14.41003175166715
+FUSE 1
+1 25791U 99035A 02233.94994384 +.00001071 +00000-0 +27257-3 0 06453
+2 25791 024.9778 115.2923 0010434 030.0321 330.0788 14.40999043166530
+FUSE 1
+1 25791U 99035A 02233.88068763 .00001046 00000-0 26501-3 0 6418
+2 25791 24.9780 115.7163 0010425 29.2338 330.8754 14.40998751166527
+FUSE 1
+1 25791U 99035A 02232.49555828 .00000919 00000-0 22621-3 0 6403
+2 25791 24.9786 124.1958 0010414 14.6083 345.4723 14.40995445166325
+FUSE 1
+1 25791U 99035A 02231.94150552 +.00000876 +00000-0 +21309-3 0 06546
+2 25791 024.9788 127.5880 0010407 008.4765 351.5919 14.40994234166249
+FUSE 1
+1 25791U 99035A 02231.38745204 .00000845 00000-0 20367-3 0 6390
+2 25791 24.9789 130.9790 0010378 2.6277 357.4296 14.40993213166169
+FUSE 1
+1 25791U 99035A 02230.97191224 +.00000798 +00000-0 +18928-3 0 06602
+2 25791 024.9793 133.5251 0010384 358.0335 002.0134 14.40992235166106
+FUSE 1
+1 25791U 99035A 02230.21008800 .00000719 00000-0 16493-3 0 6389
+2 25791 24.9799 138.1891 0010364 349.8416 10.1882 14.40990663165998
+FUSE 1
+1 25791U 99035A 02228.89420846 .00000570 00000-0 11957-3 0 6372
+2 25791 24.9808 146.2460 0010327 335.3789 24.6230 14.40988149165806
+FUSE 1
+1 25791U 99035A 02227.85535415 .00000520 00000-0 10422-3 0 6366
+2 25791 24.9812 152.6068 0010343 324.1332 35.8482 14.40986913165657
+FUSE 1
+1 25791U 99035A 02226.95501315 +.00000506 +00000-0 +99908-4 0 06426
+2 25791 024.9813 158.1197 0010337 314.4756 045.4908 14.40986180165529
+FUSE 1
+1 25791U 99035A 02226.47021386 .00000502 00000-0 98661-4 0 6351
+2 25791 24.9813 161.0865 0010330 309.4557 50.5037 14.40985822165454
+FUSE 1
+1 25791U 99035A 02225.98541513 +.00000476 +00000-0 +90569-4 0 06422
+2 25791 024.9815 164.0553 0010405 304.3474 055.6046 14.40985257165388
+FUSE 1
+1 25791U 99035A 02225.22358750 .00000482 00000-0 92578-4 0 6348
+2 25791 24.9816 168.7186 0010417 296.1218 63.8218 14.40984875165274
+FUSE 1
+1 25791U 99035A 02223.97696163 +.00000481 +00000-0 +92220-4 0 06412
+2 25791 024.9814 176.3517 0010455 283.1411 076.7930 14.40984067165095
+FUSE 1
+1 25791U 99035A 02223.49216218 .00000489 00000-0 94620-4 0 6333
+2 25791 24.9814 179.3194 0010476 277.8554 82.0754 14.40983850165026
+FUSE 1
+1 25791U 99035A 02222.93810641 +.00000509 +00000-0 +10073-3 0 06456
+2 25791 024.9812 182.7128 0010537 272.0359 087.8941 14.40983654164940
+FUSE 1
+1 25791U 99035A 02222.24553673 .00000508 00000-0 10033-3 0 6320
+2 25791 24.9814 186.9527 0010565 264.8001 95.1296 14.40983198164842
+FUSE 1
+1 25791U 99035A 02220.72188492 .00000514 00000-0 10213-3 0 6310
+2 25791 24.9811 196.2838 0010649 248.9270 111.0101 14.40982128164623
+FUSE 1
+1 25791U 99035A 02219.96005888 +.00000589 +00000-0 +12528-3 0 06358
+2 25791 024.9808 200.9504 0010520 240.1664 119.7798 14.40982235164515
+FUSE 1
+1 25791U 99035A 02219.54451761 .00000591 00000-0 12583-3 0 6306
+2 25791 24.9809 203.4950 0010565 235.7070 124.2439 14.40981930164456
+FUSE 1
+1 25791U 99035A 02218.50566444 .00000591 00000-0 12589-3 0 6290
+2 25791 24.9810 209.8564 0010671 225.0521 134.9121 14.40981088164304
+FUSE 1
+1 25791U 99035A 02217.67458222 +.00000586 +00000-0 +12427-3 0 06319
+2 25791 024.9810 214.9451 0010742 216.2683 143.7098 14.40980335164187
+FUSE 1
+1 25791U 99035A 02217.46681143 .00000587 00000-0 12450-3 0 6289
+2 25791 24.9811 216.2175 0010798 214.1027 145.8787 14.40980196164156
+FUSE 1
+1 25791U 99035A 02216.77424262 +.00000608 +00000-0 +13094-3 0 06446
+2 25791 024.9810 220.4589 0010860 206.6184 153.3766 14.40979799164058
+FUSE 1
+1 25791U 99035A 02216.22018763 .00000623 00000-0 13547-3 0 6272
+2 25791 24.9812 223.8548 0011013 200.8472 159.1590 14.40979503163971
+FUSE 1
+1 25791U 99035A 02215.18133380 .00000638 00000-0 14024-3 0 6265
+2 25791 24.9811 230.2141 0011063 190.3957 169.6323 14.40978710163820
+FUSE 1
+1 25791U 99035A 02213.72693828 .00000645 00000-0 14244-3 0 6252
+2 25791 24.9811 239.1154 0011038 174.9987 185.0630 14.40977412163613
+FUSE 1
+1 25791U 99035A 02212.54957017 .00000624 00000-0 13599-3 0 6242
+2 25791 24.9812 246.3230 0011021 162.5693 197.5196 14.40976134163444
+FUSE 1
+1 25791U 99035A 02211.71848578 +.00000610 +00000-0 +13168-3 0 06428
+2 25791 024.9811 251.4099 0011007 153.9347 206.1718 14.40975246163324
+FUSE 1
+1 25791U 99035A 02211.23368603 .00000608 00000-0 13095-3 0 6236
+2 25791 24.9811 254.3777 0010998 148.9909 211.1249 14.40974805163252
+FUSE 1
+1 25791U 99035A 02210.74888612 +.00000597 +00000-0 +12772-3 0 06506
+2 25791 024.9812 257.3445 0011002 143.8708 216.2543 14.40974298163187
+FUSE 1
+1 25791U 99035A 02209.98705743 +.00000587 +00000-0 +12459-3 0 06234
+2 25791 024.9812 262.0081 0011027 135.8366 224.3023 14.40973550163075
+FUSE 1
+1 25791U 99035A 02209.84854304 .00000587 00000-0 12459-3 0 6226
+2 25791 24.9812 262.8557 0011027 134.3832 225.7585 14.40973436163052
+FUSE 1
+1 25791U 99035A 02208.87894183 +.00000550 +00000-0 +11335-3 0 06274
+2 25791 024.9814 268.7902 0011057 124.1443 236.0120 14.40972331162918
+FUSE 1
+1 25791U 99035A 02208.53265521 .00000545 00000-0 11191-3 0 6213
+2 25791 24.9816 270.9107 0011057 120.4890 239.6710 14.40972045162867
+FUSE 1
+1 25791U 99035A 02207.21676421 .00000548 00000-0 11278-3 0 6200
+2 25791 24.9817 278.9666 0011052 107.3653 252.8065 14.40971121162675
+FUSE 1
+1 25791U 99035A 02206.87047673 +.00000547 +00000-0 +11238-3 0 06588
+2 25791 024.9817 281.0857 0011055 103.7292 256.4448 14.40970853162625
+FUSE 1
+1 25791U 99035A 02205.97012911 +.00000514 +00000-0 +10239-3 0 06208
+2 25791 024.9822 286.5981 0010989 094.6865 265.4898 14.40969946162493
+FUSE 1
+1 25791U 99035A 02205.83161386 .00000516 00000-0 10301-3 0 6194
+2 25791 24.9822 287.4462 0010983 93.2503 266.9261 14.40969873162472
+FUSE 1
+1 25791U 99035A 02204.86200730 +.00000468 +00000-0 +88363-4 0 06306
+2 25791 024.9826 293.3810 0010949 083.1743 277.0007 14.40968846162330
+FUSE 1
+1 25791U 99035A 02204.58497626 .00000484 00000-0 93112-4 0 6189
+2 25791 24.9826 295.0773 0010951 80.5497 279.6249 14.40968840162292
+FUSE 1
+1 25791U 99035A 02203.89239905 +.00000449 +00000-0 +82482-4 0 06488
+2 25791 024.9828 299.3172 0010890 073.2055 286.9638 14.40968123162191
+FUSE 1
+1 25791U 99035A 02203.13056333 .00000422 00000-0 74306-4 0 6170
+2 25791 24.9830 303.9805 0010839 65.4604 294.7027 14.40967491162089
+FUSE 1
+1 25791U 99035A 02201.88392126 .00000430 00000-0 76591-4 0 6169
+2 25791 24.9831 311.6129 0010788 52.8603 307.2893 14.40966950161907
+FUSE 1
+1 25791U 99035A 02200.84505139 .00000426 00000-0 75310-4 0 6156
+2 25791 24.9831 317.9723 0010726 42.0624 318.0702 14.40966400161754
+FUSE 1
+1 25791U 99035A 02199.94469674 +.00000428 +00000-0 +76045-4 0 06177
+2 25791 024.9831 323.4842 0010660 032.3527 327.7634 14.40965983161621
+FUSE 1
+1 25791U 99035A 02199.80618047 .00000429 00000-0 76448-4 0 6147
+2 25791 24.9831 324.3321 0010640 30.8653 329.2479 14.40965931161609
+FUSE 1
+1 25791U 99035A 02198.90582495 +.00000439 +00000-0 +79526-4 0 06303
+2 25791 024.9831 329.8436 0010600 021.3948 338.6994 14.40965565161478
+FUSE 1
+1 25791U 99035A 02198.55953443 .00000442 00000-0 80466-4 0 6139
+2 25791 24.9831 331.9633 0010574 17.8270 342.2607 14.40965414161429
+FUSE 1
+1 25791U 99035A 02197.93621100 +.00000444 +00000-0 +80937-4 0 06362
+2 25791 024.9831 335.7781 0010561 011.3039 348.7699 14.40965095161330
+FUSE 1
+1 25791U 99035A 02197.24362949 .00000444 00000-0 80988-4 0 6129
+2 25791 24.9831 340.0166 0010550 3.9600 356.0998 14.40964729161231
+FUSE 1
+1 25791U 99035A 02196.20475640 .00000449 00000-0 82478-4 0 6117
+2 25791 24.9832 346.3749 0010499 353.1602 6.8760 14.40964234161083
+FUSE 1
+1 25791U 99035A 02195.92772353 +.00000455 +00000-0 +84353-4 0 06533
+2 25791 024.9833 348.0711 0010484 350.1147 009.9154 14.40964150161041
+FUSE 1
+1 25791U 99035A 02194.95810905 +.00000446 +00000-0 +81482-4 0 06126
+2 25791 024.9834 354.0072 0010473 339.7777 020.2317 14.40963538160909
+FUSE 1
+1 25791U 99035A 02194.88885078 .00000448 00000-0 82042-4 0 6104
+2 25791 24.9834 354.4313 0010464 339.0255 20.9823 14.40963525160898
+FUSE 1
+1 25791U 99035A 02193.84997767 .00000458 00000-0 85132-4 0 6090
+2 25791 24.9833 0.7908 0010468 328.1332 31.8541 14.40963009160746
+FUSE 1
+1 25791U 99035A 02192.94962101 +.00000463 +00000-0 +86594-4 0 06116
+2 25791 024.9833 006.3022 0010480 318.4949 041.4767 14.40962539160615
+FUSE 1
+1 25791U 99035A 02192.81110453 .00000461 00000-0 86250-4 0 6080
+2 25791 24.9833 7.1500 0010464 316.9667 43.0024 14.40962462160593
+FUSE 1
+1 25791U 99035A 02191.91074766 +.00000486 +00000-0 +93771-4 0 06270
+2 25791 024.9834 012.6624 0010451 307.1503 052.8049 14.40962172160468
+FUSE 1
+1 25791U 99035A 02191.56445709 .00000480 00000-0 91884-4 0 6075
+2 25791 24.9832 14.7827 0010464 303.4798 56.4711 14.40961871160419
+FUSE 1
+1 25791U 99035A 02190.94113347 +.00000477 +00000-0 +90930-4 0 06343
+2 25791 024.9834 018.5979 0010445 296.7402 063.2037 14.40961502160324
+FUSE 1
+1 25791U 99035A 02190.17929374 .00000481 00000-0 92165-4 0 6069
+2 25791 24.9832 23.2616 0010481 288.6533 71.2835 14.40961043160211
+FUSE 1
+1 25791U 99035A 02189.14042204 .00000483 00000-0 92846-4 0 6059
+2 25791 24.9831 29.6230 0010511 277.8585 82.0723 14.40960393160069
+FUSE 1
+1 25791U 99035A 02187.89377604 .00000505 00000-0 99522-4 0 6046
+2 25791 24.9830 37.2551 0010534 264.3308 95.5998 14.40959812159883
+FUSE 1
+1 25791U 99035A 02186.43935654 .00000501 00000-0 98297-4 0 6033
+2 25791 24.9829 46.1591 0010579 249.0358 110.8998 14.40958795159675
+FUSE 1
+1 25791U 99035A 02185.19271205 .00000504 00000-0 99265-4 0 6028
+2 25791 24.9830 53.7902 0010629 236.0216 123.9281 14.40958001159492
+FUSE 1
+1 25791U 99035A 02184.15384184 .00000513 00000-0 10203-3 0 6017
+2 25791 24.9831 60.1514 0010674 224.8693 135.0951 14.40957412159345
+FUSE 1
+1 25791U 99035A 02182.97645554 +.00000516 +00000-0 +10283-3 0 06062
+2 25791 024.9830 067.3585 0010725 212.3891 147.5958 14.40956658159177
+FUSE 1
+1 25791U 99035A 02182.90719767 .00000519 00000-0 10371-3 0 6008
+2 25791 24.9829 67.7832 0010724 211.7115 148.2747 14.40956613159169
+FUSE 1
+1 25791U 99035A 02181.93758516 +.00000548 +00000-0 +11261-3 0 06062
+2 25791 024.9828 073.7191 0010818 201.1978 158.8084 14.40956221159028
+FUSE 1
+1 25791U 99035A 02181.86832717 .00000553 00000-0 11428-3 0 5992
+2 25791 24.9828 74.1435 0010825 200.5146 159.4931 14.40956212159019
+FUSE 1
+1 25791U 99035A 02180.96797324 +.00000532 +00000-0 +10787-3 0 06159
+2 25791 024.9829 079.6553 0010847 191.2420 168.7845 14.40955372158883
+FUSE 1
+1 25791U 99035A 02180.55242493 .00000529 00000-0 10681-3 0 5985
+2 25791 24.9829 82.1984 0010852 186.9486 173.0868 14.40955042158821
+FUSE 1
+1 25791U 99035A 02179.92910226 +.00000542 +00000-0 +11095-3 0 06155
+2 25791 024.9830 086.0152 0010926 180.7342 179.3149 14.40954738158730
+FUSE 1
+1 25791U 99035A 02179.23652162 .00000551 00000-0 11359-3 0 5973
+2 25791 24.9830 90.2545 0010946 173.5199 186.5457 14.40954304158635
+FUSE 1
+1 25791U 99035A 02177.98987603 +.00000542 +00000-0 +11095-3 0 06006
+2 25791 024.9832 097.8882 0011031 160.8337 199.2588 14.40953321158457
+FUSE 1
+1 25791U 99035A 02177.85135981 .00000538 00000-0 10963-3 0 5968
+2 25791 24.9832 98.7360 0011031 159.3474 200.7478 14.40953176158435
+FUSE 1
+1 25791U 99035A 02176.95100402 +.00000504 +00000-0 +99300-4 0 06022
+2 25791 024.9833 104.2472 0011004 150.1851 209.9284 14.40952226158308
+FUSE 1
+1 25791U 99035A 02176.46619641 .00000500 00000-0 98147-4 0 5953
+2 25791 24.9832 107.2138 0011008 145.0625 215.0606 14.40951875158232
+FUSE 1
+1 25791U 99035A 02175.21954740 .00000495 00000-0 96657-4 0 5943
+2 25791 24.9834 114.8444 0011052 132.0019 228.1431 14.40951047158052
+FUSE 1
+1 25791U 99035A 02173.90363925 .00000444 00000-0 81013-4 0 5939
+2 25791 24.9837 122.9038 0011028 119.1777 240.9836 14.40949793157868
+FUSE 1
+1 25791U 99035A 02172.51846935 .00000425 00000-0 75104-4 0 5924
+2 25791 24.9839 131.3835 0010980 104.9187 255.2530 14.40948920157661
+FUSE 1
+1 25791U 99035A 02171.41033186 .00000417 00000-0 72553-4 0 5913
+2 25791 24.9844 138.1686 0010902 93.6662 266.5092 14.40948370157502
+FUSE 1
+1 25791U 99035A 02170.50996877 +.00000436 +00000-0 +78639-4 0 05975
+2 25791 024.9843 143.6798 0010904 084.4115 275.7637 14.40948095157375
+FUSE 1
+1 25791U 99035A 02170.23293415 .00000423 00000-0 74576-4 0 5908
+2 25791 24.9845 145.3761 0010901 81.5059 278.6684 14.40947844157339
+FUSE 1
+1 25791U 99035A 02169.19405227 .00000425 00000-0 75062-4 0 5898
+2 25791 24.9846 151.7361 0010811 70.7002 289.4672 14.40947374157183
+FUSE 1
+1 25791U 99035A 02167.60109739 .00000492 00000-0 95589-4 0 5880
+2 25791 24.9842 161.4859 0010787 54.1241 306.0266 14.40947018156956
+FUSE 1
+1 25791U 99035A 02166.56221265 .00000534 00000-0 10864-3 0 5871
+2 25791 24.9839 167.8442 0010791 43.1206 317.0146 14.40946662156801
+FUSE 1
+1 25791U 99035A 02165.24629112 .00000568 00000-0 11909-3 0 5865
+2 25791 24.9843 175.9013 0010722 29.2251 330.8852 14.40946031156615
+FUSE 1
+1 25791U 99035A 02163.86110918 .00000595 00000-0 12719-3 0 5859
+2 25791 24.9845 184.3792 0010702 14.8284 345.2538 14.40945180156412
+FUSE 1
+1 25791U 99035A 02162.54518530 .00000658 00000-0 14664-3 0 5845
+2 25791 24.9846 192.4369 0010588 1.1350 358.9185 14.40944578156226
+FUSE 1
+1 25791U 99035A 02161.85259359 +.00000674 +00000-0 +15131-3 0 06107
+2 25791 024.9846 196.6771 0010590 353.7741 006.2633 14.40944011156124
+FUSE 1
+1 25791U 99035A 02161.22926069 .00000700 00000-0 15929-3 0 5831
+2 25791 24.9847 200.4935 0010585 347.0023 13.0212 14.40943608156034
+FUSE 1
+1 25791U 99035A 02159.84407613 .00000743 00000-0 17262-3 0 5823
+2 25791 24.9846 208.9724 0010588 332.2220 27.7726 14.40942460155834
+FUSE 1
+1 25791U 99035A 02158.80518770 .00000793 00000-0 18784-3 0 5819
+2 25791 24.9846 215.3341 0010581 321.3048 38.6704 14.40941632155681
+FUSE 1
+1 25791U 99035A 02157.97407665 +.00000825 +00000-0 +19757-3 0 05879
+2 25791 024.9847 220.4222 0010562 312.3796 047.5815 14.40940838155562
+FUSE 1
+1 25791U 99035A 02157.55852103 .00000870 00000-0 21141-3 0 5807
+2 25791 24.9847 222.9680 0010439 307.4635 52.4923 14.40940695155507
+FUSE 1
+1 25791U 99035A 02156.86592860 +.00000855 +00000-0 +20693-3 0 06042
+2 25791 024.9846 227.2073 0010554 299.6921 060.2540 14.40939609155402
+FUSE 1
+1 25791U 99035A 02156.24259499 .00000899 00000-0 22019-3 0 5795
+2 25791 24.9846 231.0244 0010551 292.5198 67.4193 14.40939088155314
+FUSE 1
+1 25791U 99035A 02155.06518757 .00000887 00000-0 21661-3 0 5787
+2 25791 24.9851 238.2318 0010502 278.6019 81.3297 14.40937436155140
+FUSE 1
+1 25791U 99035A 02154.92666911 +.00000889 +00000-0 +21739-3 0 06067
+2 25791 024.9851 239.0795 0010509 277.1250 082.8066 14.40937258155126
+FUSE 1
+1 25791U 99035A 02153.88777948 .00000883 00000-0 21546-3 0 5771
+2 25791 24.9856 245.4403 0010777 265.3681 94.5596 14.40935853154971
+FUSE 1
+1 25791U 99035A 02152.57185272 .00000902 00000-0 22117-3 0 5765
+2 25791 24.9868 253.4989 0011060 249.3519 110.5805 14.40934379154783
+FUSE 1
+1 25791U 99035A 02151.53296309 .00000970 00000-0 24192-3 0 5753
+2 25791 24.9869 259.8581 0011180 238.2453 121.6966 14.40933320154639
+FUSE 1
+1 25791U 99035A 02150.70185103 +.00001051 +00000-0 +26686-3 0 05975
+2 25791 024.9867 264.9433 0011243 229.4877 130.4651 14.40932501154518
+FUSE 1
+1 25791U 99035A 02149.93999876 .00001091 00000-0 27908-3 0 5745
+2 25791 24.9867 269.6053 0011249 221.4930 138.4719 14.40931407154401
+FUSE 1
+1 25791U 99035A 02148.90111038 +.00001229 +00000-0 +32134-3 0 05769
+2 25791 024.9863 275.9625 0011269 210.6845 149.3088 14.40930136154250
+FUSE 1
+1 25791U 99035A 02148.83185155 .00000938 00000-0 23221-3 0 5732
+2 25791 24.9851 276.3822 0010775 212.4019 147.5850 14.40927933154242
+FUSE 1
+1 25791U 99035A 02147.93147934 +.00000813 +00000-0 +19395-3 0 05958
+2 25791 024.9857 281.8960 0010898 202.6278 157.3749 14.40926137154113
+FUSE 1
+1 25791U 99035A 02147.58518187 .00001001 00000-0 25172-3 0 5726
+2 25791 24.9861 284.0183 0011012 197.6860 162.3263 14.40926704154060
+FUSE 1
+1 25791U 99035A 02146.54628978 .00000913 00000-0 22451-3 0 5718
+2 25791 24.9845 290.3753 0010754 189.6041 170.4268 14.40924183153916
+FUSE 1
+1 25791U 99035A 02145.16109886 .00000752 00000-0 17520-3 0 5708
+2 25791 24.9854 298.8585 0011057 175.5591 184.5015 14.40921808153718
+FUSE 1
+1 25791U 99035A 02144.12220258 .00000806 00000-0 19188-3 0 5690
+2 25791 24.9858 305.2220 0011313 166.0837 193.9972 14.40920971153563
+FUSE 1
+1 25791U 99035A 02143.91442346 +.00000815 +00000-0 +19451-3 0 06009
+2 25791 024.9859 306.4952 0011363 164.3048 195.7813 14.40920803153534
+FUSE 1
+1 25791U 99035A 02142.94478746 +.00000943 +00000-0 +23384-3 0 05690
+2 25791 024.9854 312.4312 0011411 153.9631 206.1530 14.40920479153398
+FUSE 1
+1 25791U 99035A 02142.87552765 .00000884 00000-0 21574-3 0 5688
+2 25791 24.9848 312.8512 0010954 151.9799 208.1299 14.40919629153389
+FUSE 1
+1 25791U 99035A 02141.90588955 +.00000926 +00000-0 +22857-3 0 05874
+2 25791 024.9841 318.7826 0010700 140.9341 219.1940 14.40918429153242
+FUSE 1
+1 25791U 99035A 02141.55958991 .00000963 00000-0 23993-3 0 5677
+2 25791 24.9839 320.9048 0010714 137.4073 222.7267 14.40918220153193
+FUSE 1
+1 25791U 99035A 02140.17438775 .00001057 00000-0 26889-3 0 5668
+2 25791 24.9835 329.3818 0010822 124.7440 235.4086 14.40916869152998
+FUSE 1
+1 25791U 99035A 02139.96660755 +.00001083 +00000-0 +27692-3 0 05884
+2 25791 024.9836 330.6540 0010888 122.4431 237.7130 14.40916754152968
+FUSE 1
+1 25791U 99035A 02139.06622508 .00001163 00000-0 30126-3 0 5659
+2 25791 24.9830 336.1650 0010863 113.3928 246.7719 14.40915711152839
+FUSE 1
+1 25791U 99035A 02137.88879990 .00001296 00000-0 34198-3 0 5645
+2 25791 24.9826 343.3712 0010907 101.0863 259.0871 14.40914401152666
+FUSE 1
+1 25791U 99035A 02136.91915471 +.00001350 +00000-0 +35875-3 0 05816
+2 25791 024.9827 349.3060 0010932 090.9446 269.2314 14.40912681152528
+FUSE 1
+1 25791U 99035A 02136.22654987 .00001376 00000-0 36654-3 0 5636
+2 25791 24.9826 353.5443 0010936 83.6416 276.5336 14.40911244152427
+FUSE 1
+1 25791U 99035A 02135.94950762 +.00001397 +00000-0 +37325-3 0 05723
+2 25791 024.9825 355.2400 0010966 080.7402 279.4344 14.40910769152381
+FUSE 1
+1 25791U 99035A 02135.18764091 .00001413 00000-0 37797-3 0 5628
+2 25791 24.9824 359.9024 0010965 72.6730 287.4977 14.40909002152273
+FUSE 1
+1 25791U 99035A 02134.91059834 +.00001415 +00000-0 +37857-3 0 05922
+2 25791 024.9825 001.5980 0010968 069.7349 290.4345 14.40908337152230
+FUSE 1
+1 25791U 99035A 02133.94094738 +.00001415 +00000-0 +37859-3 0 05636
+2 25791 024.9824 007.5352 0010877 059.9778 300.1809 14.40905944152093
+FUSE 1
+1 25791U 99035A 02133.87168652 .00001412 00000-0 37775-3 0 5617
+2 25791 24.9825 7.9592 0010873 59.2261 300.9315 14.40905750152084
+FUSE 1
+1 25791U 99035A 02132.48646600 .00001369 00000-0 36456-3 0 5602
+2 25791 24.9823 16.4325 0010684 45.9733 314.1653 14.40902098151888
+FUSE 1
+1 25791U 99035A 02131.30902586 .00001353 00000-0 35975-3 0 5596
+2 25791 24.9822 23.6391 0010610 33.6244 326.4935 14.40899142151716
+FUSE 1
+1 25791U 99035A 02130.20084454 .00001308 00000-0 34583-3 0 5582
+2 25791 24.9820 30.4208 0010580 22.0031 338.0932 14.40896173151558
+FUSE 1
+1 25791U 99035A 02129.16192230 .00001226 00000-0 32085-3 0 5570
+2 25791 24.9821 36.7788 0010481 11.1643 348.9097 14.40893274151404
+FUSE 1
+1 25791U 99035A 02128.95413775 +.00001211 +00000-0 +31627-3 0 05931
+2 25791 024.9821 038.0520 0010468 008.7737 351.2951 14.40892692151379
+FUSE 1
+1 25791U 99035A 02127.98447523 +.00001111 +00000-0 +28565-3 0 05601
+2 25791 024.9824 043.9896 0010296 357.7755 002.2712 14.40889924151236
+FUSE 1
+1 25791U 99035A 02127.91521357 .00001094 00000-0 28026-3 0 5569
+2 25791 24.9824 44.4136 0010284 357.0692 2.9753 14.40889652151228
+FUSE 1
+1 25791U 99035A 02126.94554859 +.00001060 +00000-0 +27008-3 0 05601
+2 25791 024.9824 050.3495 0010262 346.7330 013.2907 14.40887620151085
+FUSE 1
+1 25791U 99035A 02126.87628689 .00001055 00000-0 26832-3 0 5558
+2 25791 24.9824 50.7736 0010263 346.0680 13.9545 14.40887452151076
+FUSE 1
+1 25791U 99035A 02125.97588259 +.00001014 +00000-0 +25588-3 0 05671
+2 25791 024.9823 056.2855 0010259 336.2920 023.7116 14.40885529150942
+FUSE 1
+1 25791U 99035A 02125.42178682 .00001006 00000-0 25328-3 0 5545
+2 25791 24.9822 59.6761 0010255 330.4733 29.5196 14.40884531150863
+FUSE 1
+1 25791U 99035A 02124.38285672 .00001011 00000-0 25509-3 0 5533
+2 25791 24.9820 66.0352 0010273 319.4923 40.4821 14.40882801150716
+FUSE 1
+1 25791U 99035A 02123.20540156 .00000953 00000-0 23705-3 0 5523
+2 25791 24.9824 73.2432 0010279 305.7597 54.1955 14.40880460150540
+FUSE 1
+1 25791U 99035A 02121.95868326 +.00001002 +00000-0 +25225-3 0 05542
+2 25791 024.9819 080.8762 0010331 292.1373 067.8041 14.40878747150366
+FUSE 1
+1 25791U 99035A 02121.54311021 .00001003 00000-0 25248-3 0 5515
+2 25791 24.9819 83.4189 0010337 287.6956 72.2421 14.40878063150307
+FUSE 1
+1 25791U 99035A 02120.98901322 +.00001023 +00000-0 +25857-3 0 05632
+2 25791 024.9818 086.8098 0010306 282.1201 077.8157 14.40877264150221
+FUSE 1
+1 25791U 99035A 02120.22712923 .00001015 00000-0 25630-3 0 5502
+2 25791 24.9819 91.4718 0010318 274.0246 85.9082 14.40875930150118
+FUSE 1
+1 25791U 99035A 02119.95008070 +.00001028 +00000-0 +26024-3 0 05648
+2 25791 024.9817 093.1681 0010309 271.2034 088.7294 14.40875508150070
+FUSE 1
+1 25791U 99035A 02119.18819734 .00000984 00000-0 24661-3 0 5498
+2 25791 24.9821 97.8348 0010364 262.8749 97.0580 14.40873938149968
+FUSE 1
+1 25791U 99035A 02117.59516608 .00000965 00000-0 24087-3 0 5485
+2 25791 24.9822 107.5863 0010462 245.7519 114.1894 14.40871219149738
+FUSE 1
+1 25791U 99035A 02116.55623223 .00001014 00000-0 25598-3 0 5475
+2 25791 24.9819 113.9469 0010496 234.8360 125.1166 14.40869721149589
+FUSE 1
+1 25791U 99035A 02115.24024880 .00000904 00000-0 22221-3 0 5460
+2 25791 24.9822 122.0047 0010673 220.6675 139.3037 14.40867070149393
+FUSE 1
+1 25791U 99035A 02113.64721393 .00000997 00000-0 25068-3 0 5458
+2 25791 24.9820 131.7593 0010921 204.4419 155.5575 14.40864885149169
+FUSE 1
+1 25791U 99035A 02112.60827693 .00001229 00000-0 32167-3 0 5449
+2 25791 24.9818 138.1223 0011109 194.3356 165.6844 14.40863758149016
+FUSE 1
+1 25791U 99035A 02111.70786489 +.00001579 +00000-0 +42935-3 0 05459
+2 25791 024.9818 143.6347 0011005 184.3083 175.7332 14.40862715148885
+FUSE 1
+1 25791U 99035A 02111.56934007 .00001615 00000-0 44009-3 0 5437
+2 25791 24.9819 144.4840 0011022 182.6205 177.4245 14.40862480148868
+FUSE 1
+1 25791U 99035A 02110.53040188 .00001831 00000-0 50650-3 0 5429
+2 25791 24.9817 150.8474 0011038 171.9009 188.1678 14.40859918148715
+FUSE 1
+1 25791U 99035A 02109.21441033 .00001839 00000-0 50903-3 0 5414
+2 25791 24.9818 158.9076 0011058 159.5103 200.5858 14.40855347148522
+FUSE 1
+1 25791U 99035A 02107.75988762 .00001806 00000-0 49905-3 0 5409
+2 25791 24.9818 167.8101 0011016 144.5815 215.5425 14.40850340148319
+FUSE 1
+1 25791U 99035A 02106.72093909 .00001824 00000-0 50445-3 0 5394
+2 25791 24.9819 174.1696 0011038 134.1147 226.0286 14.40847102148164
+FUSE 1
+1 25791U 99035A 02105.61272498 .00001733 00000-0 47679-3 0 5386
+2 25791 24.9822 180.9533 0010987 122.6889 237.4679 14.40842753148002
+FUSE 1
+1 25791U 99035A 02104.85082480 +.00001713 +00000-0 +47068-3 0 05437
+2 25791 024.9823 185.6152 0010986 114.8415 245.3238 14.40840218147898
+FUSE 1
+1 25791U 99035A 02104.57377071 .00001648 00000-0 45060-3 0 5379
+2 25791 24.9828 187.3119 0010910 112.4216 247.7465 14.40838832147858
+FUSE 1
+1 25791U 99035A 02102.91143625 .00001546 00000-0 41945-3 0 5365
+2 25791 24.9833 197.4876 0010832 95.2901 264.8851 14.40833179147610
+FUSE 1
+1 25791U 99035A 02101.94173617 +.00001486 +00000-0 +40101-3 0 05367
+2 25791 024.9836 203.4219 0010768 085.1671 275.0035 14.40830065147475
+FUSE 1
+1 25791U 99035A 02101.87247187 .00001527 00000-0 41368-3 0 5354
+2 25791 24.9836 203.8460 0010860 84.9976 275.1776 14.40830297147464
+FUSE 1
+1 25791U 99035A 02100.90276910 +.00001525 +00000-0 +41312-3 0 05406
+2 25791 024.9836 209.7805 0010820 074.8575 285.3127 14.40827651147329
+FUSE 1
+1 25791U 99035A 02100.55644706 .00001466 00000-0 39504-3 0 5346
+2 25791 24.9839 211.9005 0010785 71.2224 288.9455 14.40826227147276
+FUSE 1
+1 25791U 99035A 02099.72527026 +.00001468 +00000-0 +39557-3 0 05369
+2 25791 024.9839 216.9860 0010792 062.4507 297.7098 14.40824076147152
+FUSE 1
+1 25791U 99035A 02099.51747561 .00001466 00000-0 39497-3 0 5332
+2 25791 24.9839 218.2573 0010790 60.2600 299.8974 14.40823521147123
+FUSE 1
+1 25791U 99035A 02098.96335660 +.00001461 +00000-0 +39351-3 0 05517
+2 25791 024.9839 221.6473 0010791 054.4596 305.6917 14.40822053147043
+FUSE 1
+1 25791U 99035A 02097.99364657 .00001460 00000-0 39305-3 0 5324
+2 25791 24.9840 227.5821 0010785 44.3275 315.8094 14.40819548146900
+FUSE 1
+1 25791U 99035A 02096.88540384 .00001474 00000-0 39764-3 0 5317
+2 25791 24.9839 234.3643 0010788 32.8173 327.3012 14.40816799146743
+FUSE 1
+1 25791U 99035A 02095.63862735 .00001487 00000-0 40141-3 0 5300
+2 25791 24.9840 241.9943 0010816 19.8188 340.2741 14.40813643146563
+FUSE 1
+1 25791U 99035A 02094.59964440 .00001479 00000-0 39900-3 0 5290
+2 25791 24.9841 248.3515 0010781 8.9830 351.0866 14.40810859146412
+FUSE 1
+1 25791U 99035A 02093.56066001 .00001449 00000-0 39004-3 0 5283
+2 25791 24.9842 254.7110 0010724 357.7982 2.2481 14.40807913146263
+FUSE 1
+1 25791U 99035A 02092.17534371 .00001416 00000-0 37974-3 0 5276
+2 25791 24.9846 263.1915 0010706 342.3947 17.6181 14.40804146146065
+FUSE 1
+1 25791U 99035A 02091.06708795 .00001473 00000-0 39722-3 0 5261
+2 25791 24.9844 269.9758 0010605 329.8586 30.1311 14.40801748145901
+FUSE 1
+1 25791U 99035A 02090.92855601 +.00001487 +00000-0 +40157-3 0 05410
+2 25791 024.9846 270.8250 0010580 328.4929 031.4942 14.40801529145887
+FUSE 1
+1 25791U 99035A 02089.95883174 +.00001422 +00000-0 +38169-3 0 05269
+2 25791 024.9848 276.7588 0010511 318.2311 041.7395 14.40798658145743
+FUSE 1
+1 25791U 99035A 02089.88956560 .00001421 00000-0 38139-3 0 5256
+2 25791 24.9849 277.1827 0010506 317.5131 42.4562 14.40798492145730
+FUSE 1
+1 25791U 99035A 02088.15791078 .00001515 00000-0 41010-3 0 5241
+2 25791 24.9847 287.7803 0010520 298.7755 61.1699 14.40794544145482
+FUSE 1
+1 25791U 99035A 02087.95011214 +.00001499 +00000-0 +40534-3 0 05370
+2 25791 024.9848 289.0527 0010533 296.5864 063.3562 14.40793924145453
+FUSE 1
+1 25791U 99035A 02086.91111703 .00001749 00000-0 48209-3 0 5239
+2 25791 24.9841 295.4106 0010495 285.4100 74.5251 14.40792142145301
+FUSE 1
+1 25791U 99035A 02085.94138844 +.00001800 +00000-0 +49790-3 0 05230
+2 25791 024.9840 301.3448 0010492 275.1890 084.7423 14.40789187145168
+FUSE 1
+1 25791U 99035A 02085.87212209 .00001800 00000-0 49784-3 0 5222
+2 25791 24.9839 301.7687 0010498 274.4524 85.4786 14.40788939145150
+FUSE 1
+1 25791U 99035A 02084.20972717 .00001789 00000-0 49461-3 0 5212
+2 25791 24.9837 311.9410 0010520 257.1269 102.8063 14.40783400144918
+FUSE 1
+1 25791U 99035A 02083.17072852 .00001737 00000-0 47850-3 0 5200
+2 25791 24.9841 318.3008 0010603 246.6391 113.2992 14.40779739144768
+FUSE 1
+1 25791U 99035A 02081.92392783 .00001713 00000-0 47112-3 0 5192
+2 25791 24.9843 325.9324 0010711 233.7134 126.2384 14.40775609144588
+FUSE 1
+1 25791U 99035A 02080.88492453 .00001724 00000-0 47457-3 0 5184
+2 25791 24.9839 332.2902 0010758 223.1027 136.8641 14.40772451144430
+FUSE 1
+1 25791U 99035A 02079.98445671 +.00001660 +00000-0 +45511-3 0 05248
+2 25791 024.9866 337.8089 0010640 212.3177 147.6681 14.40769396144307
+FUSE 1
+1 25791U 99035A 02079.36105289 .00001660 00000-0 45502-3 0 5170
+2 25791 24.9864 341.6231 0010625 205.7116 154.2858 14.40767508144212
+FUSE 1
+1 25791U 99035A 02078.94545013 +.00001663 +00000-0 +45593-3 0 05203
+2 25791 024.9866 344.1681 0010662 201.5314 158.4745 14.40766326144157
+FUSE 1
+1 25791U 99035A 02078.18351059 .00001670 00000-0 45823-3 0 5163
+2 25791 24.9867 348.8302 0010676 193.5096 166.5127 14.40764131144045
+FUSE 1
+1 25791U 99035A 02076.93669799 +.00001712 +00000-0 +47120-3 0 05188
+2 25791 024.9862 356.4616 0010674 180.4765 179.5730 14.40760708143868
+FUSE 1
+1 25791U 99035A 02076.86743038 .00001720 00000-0 47342-3 0 5151
+2 25791 24.9861 356.8853 0010677 179.8078 180.2432 14.40760558143856
+FUSE 1
+1 25791U 99035A 02075.34354341 .00001769 00000-0 48858-3 0 5143
+2 25791 24.9857 6.2089 0010689 164.1831 195.9013 14.40756227143637
+FUSE 1
+1 25791U 99035A 02074.23525935 .00001789 00000-0 49489-3 0 5131
+2 25791 24.9864 12.9917 0010652 152.3559 207.7514 14.40752965143470
+FUSE 1
+1 25791U 99035A 02073.95818794 +.00001809 +00000-0 +50096-3 0 05215
+2 25791 024.9863 014.6889 0010627 149.3903 210.7224 14.40752237143437
+FUSE 1
+1 25791U 99035A 02073.19624002 .00001826 00000-0 50609-3 0 5127
+2 25791 24.9865 19.3522 0010642 141.9145 218.2115 14.40749948143323
+FUSE 1
+1 25791U 99035A 02072.91916797 +.00001841 +00000-0 +51076-3 0 05363
+2 25791 024.9864 021.0498 0010609 139.0566 221.0741 14.40749171143282
+FUSE 1
+1 25791U 99035A 02071.53380359 .00001868 00000-0 51930-3 0 5110
+2 25791 24.9870 29.5310 0010560 125.3666 234.7831 14.40744898143080
+FUSE 1
+1 25791U 99035A 02070.97965627 +.00001883 +00000-0 +52391-3 0 05124
+2 25791 024.9873 032.9250 0010530 120.0536 240.1014 14.40743233143007
+FUSE 1
+1 25791U 99035A 02070.49477683 .00001888 00000-0 52553-3 0 5104
+2 25791 24.9873 35.8909 0010528 115.0412 245.1193 14.40741625142931
+FUSE 1
+1 25791U 99035A 02069.24793971 .00001911 00000-0 53253-3 0 5099
+2 25791 24.9880 43.5225 0010388 102.6935 257.4711 14.40737632142757
+FUSE 1
+1 25791U 99035A 02068.20890526 .00001963 00000-0 54852-3 0 5080
+2 25791 24.9877 49.8807 0010265 92.5971 267.5712 14.40734504142601
+FUSE 1
+1 25791U 99035A 02066.40790516 .00002019 00000-0 56597-3 0 5078
+2 25791 24.9882 60.8982 0010140 74.0227 286.1405 14.40728545142340
+FUSE 1
+1 25791U 99035A 02065.23032416 .00001976 00000-0 55274-3 0 5067
+2 25791 24.9890 68.1059 0009928 61.2977 298.8527 14.40723876142175
+FUSE 1
+1 25791U 99035A 02063.63711823 +.00001966 +00000-0 +54965-3 0 05060
+2 25791 024.9889 077.8519 0009855 044.5446 315.5856 14.40718057141946
+FUSE 1
+1 25791U 99035A 02063.56784827 .00001964 00000-0 54915-3 0 5058
+2 25791 24.9890 78.2758 0009853 43.7948 316.3342 14.40717794141939
+FUSE 1
+1 25791U 99035A 02062.25171546 .00001967 00000-0 55002-3 0 5041
+2 25791 24.9898 86.3315 0009720 29.5760 330.5288 14.40713207141744
+FUSE 1
+1 25791U 99035A 02060.72776629 .00001974 00000-0 55231-3 0 5035
+2 25791 24.9904 95.6541 0009691 13.5587 346.5178 14.40707846141526
+FUSE 1
+1 25791U 99035A 02059.68870443 .00002061 00000-0 57921-3 0 5022
+2 25791 24.9908 102.0122 0009670 2.3178 357.7366 14.40705063141372
+FUSE 1
+1 25791U 99035A 02058.58037276 +.00001937 +00000-0 +54089-3 0 05190
+2 25791 024.9855 108.7808 0010347 348.8163 011.2115 14.40699031141216
+FUSE 1
+1 25791U 99035A 02058.23401784 .00001930 00000-0 53890-3 0 5014
+2 25791 24.9854 110.8994 0010344 345.1099 14.9105 14.40697723141169
+FUSE 1
+1 25791U 99035A 02057.95693361 +.00001927 +00000-0 +53794-3 0 05295
+2 25791 024.9853 112.5943 0010342 342.2401 017.7744 14.40696709141123
+FUSE 1
+1 25791U 99035A 02056.98714049 +.00001855 +00000-0 +51590-3 0 05016
+2 25791 024.9848 118.5439 0010389 330.7846 029.2084 14.40692621140986
+FUSE 1
+1 25791U 99035A 02056.84859804 .00001856 00000-0 51612-3 0 5005
+2 25791 24.9848 119.3917 0010396 329.3558 30.6348 14.40692155140967
+FUSE 1
+1 25791U 99035A 02055.87879896 +.00001862 +00000-0 +51795-3 0 05009
+2 25791 024.9847 125.3251 0010386 318.7436 041.2281 14.40688909140821
+FUSE 1
+1 25791U 99035A 02055.80952754 .00001868 00000-0 51976-3 0 4991
+2 25791 24.9847 125.7494 0010379 317.8153 42.1555 14.40688735140812
+FUSE 1
+1 25791U 99035A 02054.56264168 .00001830 00000-0 50822-3 0 4985
+2 25791 24.9853 133.3826 0010404 303.6462 56.3056 14.40684284140636
+FUSE 1
+1 25791U 99035A 02051.93031607 +.00001939 +00000-0 +54187-3 0 04981
+2 25791 024.9846 149.4920 0010329 274.4706 085.4618 14.40676334140255
+FUSE 1
+1 25791U 99035A 02051.86104389 .00001949 00000-0 54496-3 0 4963
+2 25791 24.9847 149.9167 0010322 273.5085 86.4222 14.40676201140241
+FUSE 1
+1 25791U 99035A 02050.89124093 +.00001793 +00000-0 +49705-3 0 04963
+2 25791 024.9879 155.8456 0009888 267.6928 092.2444 14.40671793140105
+FUSE 1
+1 25791U 99035A 02050.82196891 .00001795 00000-0 49764-3 0 4957
+2 25791 24.9879 156.2699 0009920 266.9073 93.0299 14.40671596140095
+FUSE 1
+1 25791U 99035A 02049.85216173 +.00001762 +00000-0 +48738-3 0 05049
+2 25791 024.9881 162.2061 0009833 257.1871 102.7547 14.40668129139954
+FUSE 1
+1 25791U 99035A 02049.57507351 .00001745 00000-0 48221-3 0 4945
+2 25791 24.9884 163.9032 0009829 254.4578 105.4840 14.40667101139913
+FUSE 1
+1 25791U 99035A 02048.18962711 .00001789 00000-0 49573-3 0 4934
+2 25791 24.9865 172.3765 0010089 240.4382 119.5119 14.40662912139715
+FUSE 1
+1 25791U 99035A 02047.15054256 .00001796 00000-0 49804-3 0 4920
+2 25791 24.9866 178.7417 0010129 229.8799 130.0812 14.40659621139562
+FUSE 1
+1 25791U 99035A 02045.83436523 .00001840 00000-0 51150-3 0 4910
+2 25791 24.9866 186.7961 0010148 215.4593 144.5240 14.40655733139373
+FUSE 1
+1 25791U 99035A 02044.79527556 +.00001873 +00000-0 +52184-3 0 04971
+2 25791 024.9863 193.1524 0010137 204.2065 155.7965 14.40652516139223
+FUSE 1
+1 25791U 99035A 02044.51818359 .00001925 00000-0 53776-3 0 4904
+2 25791 24.9860 194.8476 0010191 201.0271 158.9809 14.40652078139188
+FUSE 1
+1 25791U 99035A 02043.82545578 +.00001946 +00000-0 +54433-3 0 04990
+2 25791 024.9858 199.0847 0010200 193.6793 166.3433 14.40649817139082
+FUSE 1
+1 25791U 99035A 02042.92490752 .00001992 00000-0 55840-3 0 4896
+2 25791 24.9856 204.5925 0010259 184.1947 175.8472 14.40647025138951
+FUSE 1
+1 25791U 99035A 02041.95508458 +.00002053 +00000-0 +57741-3 0 04892
+2 25791 024.9856 210.5265 0010300 173.9651 186.0980 14.40644069138818
+FUSE 1
+1 25791U 99035A 02041.88581150 .00002073 00000-0 58348-3 0 4889
+2 25791 24.9861 210.9521 0010311 172.9624 187.1028 14.40644058138806
+FUSE 1
+1 25791U 99035A 02040.56961753 .00002206 00000-0 62450-3 0 4870
+2 25791 24.9858 219.0013 0010484 159.5673 200.5249 14.40640287138618
+FUSE 1
+1 25791U 99035A 02039.53051625 .00002255 00000-0 63954-3 0 4866
+2 25791 24.9858 225.3571 0010553 148.4366 211.6776 14.40636535138462
+FUSE 1
+1 25791U 99035A 02038.14504167 .00002351 00000-0 66921-3 0 4859
+2 25791 24.9858 233.8326 0010636 134.1993 225.9382 14.40631676138264
+FUSE 1
+1 25791U 99035A 02037.93721974 +.00002397 +00000-0 +68340-3 0 04938
+2 25791 024.9861 235.1054 0010736 131.7488 228.3923 14.40631273138232
+FUSE 1
+1 25791U 99035A 02036.89810875 .00002492 00000-0 71274-3 0 4847
+2 25791 24.9862 241.4623 0010829 122.1317 238.0237 14.40627644138089
+FUSE 1
+1 25791U 99035A 02035.92826968 +.00002548 +00000-0 +73019-3 0 04841
+2 25791 024.9863 247.3934 0010862 112.4256 247.7399 14.40623688137945
+FUSE 1
+1 25791U 99035A 02035.85899543 .00002552 00000-0 73123-3 0 4832
+2 25791 24.9863 247.8171 0010864 111.6988 248.4676 14.40623397137930
+FUSE 1
+1 25791U 99035A 02034.95842869 +.00002563 +00000-0 +73476-3 0 04924
+2 25791 024.9867 253.3259 0010904 102.2272 257.9457 14.40619245137805
+FUSE 1
+1 25791U 99035A 02034.26568177 .00002587 00000-0 74211-3 0 4828
+2 25791 24.9865 257.5631 0010840 95.4477 264.7266 14.40616180137700
+FUSE 1
+1 25791U 99035A 02033.22656041 .00002588 00000-0 74253-3 0 4817
+2 25791 24.9868 263.9212 0010966 84.6163 275.5595 14.40611176137558
+FUSE 1
+1 25791U 99035A 02032.18743380 .00002587 00000-0 74231-3 0 4808
+2 25791 24.9869 270.2766 0010977 73.7493 286.4230 14.40606150137408
+FUSE 1
+1 25791U 99035A 02030.94047759 +.00002528 +00000-0 +72437-3 0 04808
+2 25791 024.9874 277.9037 0011018 060.9223 299.2389 14.40599492137222
+FUSE 1
+1 25791U 99035A 02030.87120198 .00002526 00000-0 72362-3 0 4792
+2 25791 24.9874 278.3273 0011014 60.1902 299.9702 14.40599135137210
+FUSE 1
+1 25791U 99035A 02029.34713303 .00002495 00000-0 71439-3 0 4786
+2 25791 24.9875 287.6482 0010997 44.3035 315.8351 14.40591646136997
+FUSE 1
+1 25791U 99035A 02028.93147652 +.00002479 +00000-0 +70929-3 0 04862
+2 25791 024.9876 290.1899 0010994 039.9697 320.1619 14.40589498136932
+FUSE 1
+1 25791U 99035A 02028.16943701 .00002474 00000-0 70791-3 0 4778
+2 25791 24.9876 294.8500 0011006 32.1353 327.9821 14.40585928136823
+FUSE 1
+1 25791U 99035A 02027.96161389 +.00002407 +00000-0 +68742-3 0 05050
+2 25791 024.9874 296.1287 0010582 028.3810 331.7529 14.40584028136795
+FUSE 1
+1 25791U 99035A 02026.92246706 .00002341 00000-0 66697-3 0 4763
+2 25791 24.9799 302.5272 0010059 16.0811 344.0013 14.40577732136644
+FUSE 1
+1 25791U 99035A 02025.39837504 .00002257 00000-0 64121-3 0 4750
+2 25791 24.9803 311.8488 0010138 359.9596 0.0915 14.40570421136423
+FUSE 1
+1 25791U 99035A 02024.22066220 .00002170 00000-0 61445-3 0 4749
+2 25791 24.9808 319.0539 0010178 346.9833 13.0414 14.40564803136255
+FUSE 1
+1 25791U 99035A 02023.94355340 +.00002127 +00000-0 +60118-3 0 04963
+2 25791 024.9808 320.7502 0010231 343.9239 016.0947 14.40563257136213
+FUSE 1
+1 25791U 99035A 02022.97366856 +.00002070 +00000-0 +58368-3 0 04746
+2 25791 024.9809 326.6854 0010289 333.5703 026.4279 14.40558911136071
+FUSE 1
+1 25791U 99035A 02022.90439095 .00002070 00000-0 58368-3 0 4734
+2 25791 24.9809 327.1090 0010289 332.8439 27.1535 14.40558648136066
+FUSE 1
+1 25791U 99035A 02021.93450374 +.00001972 +00000-0 +55342-3 0 04738
+2 25791 024.9815 333.0432 0010420 322.2211 037.7568 14.40554066135924
+FUSE 1
+1 25791U 99035A 02021.51883604 .00001971 00000-0 55294-3 0 4722
+2 25791 24.9815 335.5850 0010420 317.8920 42.0786 14.40552554135866
+FUSE 1
+1 25791U 99035A 02020.34111020 .00001902 00000-0 53176-3 0 4718
+2 25791 24.9819 342.7879 0010496 305.4885 54.4643 14.40547753135692
+FUSE 1
+1 25791U 99035A 02019.23265919 .00001870 00000-0 52196-3 0 4705
+2 25791 24.9819 349.5667 0010511 294.0221 65.9186 14.40543639135538
+FUSE 1
+1 25791U 99035A 02018.19348466 .00001814 00000-0 50458-3 0 4693
+2 25791 24.9822 355.9219 0010534 283.3551 76.5783 14.40539652135382
+FUSE 1
+1 25791U 99035A 02016.60007962 .00001743 00000-0 48297-3 0 4688
+2 25791 24.9823 5.6676 0010591 266.8378 93.0919 14.40533828135154
+FUSE 1
+1 25791U 99035A 02015.76873696 +.00001678 +00000-0 +46283-3 0 04713
+2 25791 024.9823 010.7535 0010644 258.3411 101.5912 14.40530615135034
+FUSE 1
+1 25791U 99035A 02015.56090099 .00001670 00000-0 46017-3 0 4671
+2 25791 24.9825 12.0258 0010623 256.2726 103.6602 14.40529913135001
+FUSE 1
+1 25791U 99035A 02014.59099802 +.00001637 +00000-0 +45017-3 0 04801
+2 25791 024.9827 017.9579 0010652 246.2520 113.6872 14.40526735134868
+FUSE 1
+1 25791U 99035A 02014.24460394 .00001618 00000-0 44436-3 0 4668
+2 25791 24.9826 20.0778 0010710 242.8070 117.1346 14.40525522134813
+FUSE 1
+1 25791U 99035A 02012.65118694 .00001644 00000-0 45243-3 0 4659
+2 25791 24.9821 29.8239 0010731 226.1513 133.8108 14.40521061134586
+FUSE 1
+1 25791U 99035A 02011.54272015 .00001715 00000-0 47438-3 0 4640
+2 25791 24.9815 36.6044 0010793 214.5223 145.4584 14.40518322134422
+FUSE 1
+1 25791U 99035A 02010.43425174 .00001799 00000-0 50019-3 0 4633
+2 25791 24.9809 43.3849 0010812 202.7174 157.2854 14.40515528134267
+FUSE 1
+1 25791U 99035A 02009.25649964 .00002024 00000-0 56982-3 0 4622
+2 25791 24.9789 50.5894 0010900 190.2577 169.7698 14.40513435134090
+FUSE 1
+1 25791U 99035A 02007.73234977 .00002144 00000-0 60706-3 0 4618
+2 25791 24.9780 59.9106 0010959 174.4447 185.6181 14.40508676133874
+FUSE 1
+1 25791U 99035A 02006.55459467 .00002207 00000-0 62629-3 0 4605
+2 25791 24.9776 67.1133 0010962 161.9239 198.1657 14.40504470133701
+FUSE 1
+1 25791U 99035A 02005.93107615 +.00002223 +00000-0 +63140-3 0 04899
+2 25791 024.9772 070.9268 0010959 155.3799 204.7234 14.40502008133612
+FUSE 1
+1 25791U 99035A 02005.23827537 .00002302 00000-0 65586-3 0 4595
+2 25791 24.9762 75.1663 0011117 148.7865 211.3305 14.40499774133511
+FUSE 1
+1 25791U 99035A 02003.92195234 .00002277 00000-0 64830-3 0 4582
+2 25791 24.9761 83.2157 0011128 134.9320 225.2086 14.40493934133324
+FUSE 1
+1 25791U 99035A 02002.88274676 .00002253 00000-0 64083-3 0 4577
+2 25791 24.9763 89.5747 0011378 124.3397 235.8189 14.40489372133179
+FUSE 1
+1 25791U 99035A 02001.91281822 +.00002146 +00000-0 +60789-3 0 04694
+2 25791 024.9768 095.5070 0011442 114.6843 245.4859 14.40484505133039
+FUSE 1
+1 25791U 99035A 02001.56641338 .00002152 00000-0 60976-3 0 4568
+2 25791 24.9764 97.6258 0011412 111.4641 248.7084 14.40483142132989
+FUSE 1
+1 25791U 99035A 01365.87360347 +.00002106 +00000-0 +59549-3 0 04723
+2 25791 024.9765 101.8629 0011436 104.3050 255.8720 14.40480024132882
+FUSE 1
+1 25791U 99035A 01365.52719815 .00002060 00000-0 58137-3 0 4555
+2 25791 24.9767 103.9819 0011371 101.3489 258.8298 14.40478294132833
+FUSE 1
+1 25791U 99035A 01364.14157199 .00001894 00000-0 53009-3 0 4549
+2 25791 24.9776 112.4568 0011372 87.4678 272.7139 14.40471893132639
+FUSE 1
+1 25791U 99035A 01362.89450064 .00001855 00000-0 51805-3 0 4534
+2 25791 24.9779 120.0847 0011421 75.1248 285.0524 14.40467329132453
+FUSE 1
+1 25791U 99035A 01361.92455302 +.00001831 +00000-0 +51089-3 0 04748
+2 25791 024.9778 126.0189 0011472 065.3088 294.8603 14.40463838132318
+FUSE 1
+1 25791U 99035A 01361.57814148 .00001900 00000-0 53207-3 0 4523
+2 25791 24.9772 128.1378 0011523 62.3118 297.8556 14.40463267132263
+FUSE 1
+1 25791U 99035A 01360.95460072 +.00001920 +00000-0 +53816-3 0 04716
+2 25791 024.9770 131.9515 0011492 055.8592 304.2995 14.40461264132179
+FUSE 1
+1 25791U 99035A 01360.53891054 .00002081 00000-0 58819-3 0 4513
+2 25791 24.9761 134.4940 0011549 52.3362 307.8493 14.40461175132116
+FUSE 1
+1 25791U 99035A 01360.19249807 .00001557 00000-0 42615-3 0 4501
+2 25791 24.9814 136.6178 0011030 44.8843 315.2554 14.40455881132069
+FUSE 1
+1 25791U 99035A 01358.87612700 .00001498 00000-0 40783-3 0 4495
+2 25791 24.9820 144.6693 0010973 30.9588 329.1578 14.40451843131876
+FUSE 1
+1 25791U 99035A 01357.55975188 .00001377 00000-0 37042-3 0 4480
+2 25791 24.9830 152.7226 0010843 16.8175 343.2692 14.40447508131686
+FUSE 1
+1 25791U 99035A 01356.24337185 .00001363 00000-0 36634-3 0 4474
+2 25791 24.9832 160.7748 0010783 3.1653 356.8921 14.40444244131497
+FUSE 1
+1 25791U 99035A 01355.13483804 .00001399 00000-0 37745-3 0 4463
+2 25791 24.9832 167.5556 0010791 351.3648 8.6665 14.40441877131339
+FUSE 1
+1 25791U 99035A 01353.88773524 .00001488 00000-0 40499-3 0 4452
+2 25791 24.9831 175.1848 0010716 338.1167 21.8882 14.40439533131157
+FUSE 1
+1 25791U 99035A 01352.91776521 +.00001536 +00000-0 +41984-3 0 04527
+2 25791 024.9828 181.1169 0010739 327.7733 032.2118 14.40437323131012
+FUSE 1
+1 25791U 99035A 01352.57134719 .00001547 00000-0 42314-3 0 4447
+2 25791 24.9827 183.2356 0010758 324.0828 35.8958 14.40436465130968
+FUSE 1
+1 25791U 99035A 01351.39352449 .00001601 00000-0 43981-3 0 4439
+2 25791 24.9825 190.4393 0010750 311.5670 48.3911 14.40433644130790
+FUSE 1
+1 25791U 99035A 01350.90853821 +.00001630 +00000-0 +44889-3 0 04570
+2 25791 024.9828 193.4057 0010738 306.2371 053.7148 14.40432555130723
+FUSE 1
+1 25791U 99035A 01350.21570001 .00001672 00000-0 46189-3 0 4425
+2 25791 24.9825 197.6430 0010796 298.8753 61.0671 14.40430851130624
+FUSE 1
+1 25791U 99035A 01349.17644244 .00001720 00000-0 47692-3 0 4412
+2 25791 24.9826 203.9992 0010810 288.0247 71.9089 14.40428119130475
+FUSE 1
+1 25791U 99035A 01348.13718358 .00001739 00000-0 48271-3 0 4408
+2 25791 24.9830 210.3552 0010817 277.4348 82.4917 14.40425082130322
+FUSE 1
+1 25791U 99035A 01346.95935558 +.00001792 +00000-0 +49923-3 0 04414
+2 25791 024.9832 217.5601 0010828 264.7976 095.1293 14.40421820130151
+FUSE 1
+1 25791U 99035A 01346.89007156 .00001798 00000-0 50103-3 0 4396
+2 25791 24.9831 217.9838 0010822 264.0722 95.8552 14.40421637130142
+FUSE 1
+1 25791U 99035A 01345.92009452 +.00001804 +00000-0 +50297-3 0 04561
+2 25791 024.9834 223.9163 0010848 253.7226 106.2093 14.40418551130008
+FUSE 1
+1 25791U 99035A 01345.50438976 .00001829 00000-0 51074-3 0 4383
+2 25791 24.9833 226.4598 0010750 249.3404 110.5947 14.40417367129949
+FUSE 1
+1 25791U 99035A 01344.95011669 +.00001830 +00000-0 +51089-3 0 04543
+2 25791 024.9832 229.8499 0010756 243.5301 116.4117 14.40415519129865
+FUSE 1
+1 25791U 99035A 01344.18799003 .00001792 00000-0 49923-3 0 4375
+2 25791 24.9834 234.5123 0010818 235.5423 124.4062 14.40412721129757
+FUSE 1
+1 25791U 99035A 01343.14872416 .00001816 00000-0 50671-3 0 4368
+2 25791 24.9837 240.8680 0010867 223.8806 136.0838 14.40409582129602
+FUSE 1
+1 25791U 99035A 01341.90160523 .00001680 00000-0 46452-3 0 4359
+2 25791 24.9841 248.4975 0010871 211.3142 148.6721 14.40404442129428
+FUSE 1
+1 25791U 99035A 01340.93162024 +.00001621 +00000-0 +44627-3 0 04479
+2 25791 024.9843 254.4284 0010863 200.7838 159.2234 14.40401129129285
+FUSE 1
+1 25791U 99035A 01340.37734226 .00001562 00000-0 42806-3 0 4343
+2 25791 24.9846 257.8173 0010861 194.8366 165.1825 14.40399138129209
+FUSE 1
+1 25791U 99035A 01339.19949999 .00001406 00000-0 37978-3 0 4336
+2 25791 24.9853 265.0213 0010893 182.8071 177.2377 14.40394882129036
+FUSE 1
+1 25791U 99035A 01337.95236873 .00001264 00000-0 33601-3 0 4328
+2 25791 24.9859 272.6472 0011030 169.6495 190.4242 14.40391020128858
+FUSE 1
+1 25791U 99035A 01336.98237488 +.00001205 +00000-0 +31765-3 0 04350
+2 25791 024.9862 278.5777 0011067 159.5220 200.5735 14.40388553128711
+FUSE 1
+1 25791U 99035A 01336.91308955 .00001199 00000-0 31585-3 0 4319
+2 25791 24.9862 279.0014 0011071 158.8008 201.2962 14.40388365128702
+FUSE 1
+1 25791U 99035A 01335.52738000 .00001234 00000-0 32682-3 0 4301
+2 25791 24.9862 287.4731 0011104 144.1718 215.9555 14.40385754128501
+FUSE 1
+1 25791U 99035A 01334.21095244 .00001172 00000-0 30740-3 0 4294
+2 25791 24.9865 295.5226 0011153 130.8481 229.2994 14.40382693128319
+FUSE 1
+1 25791U 99035A 01333.17166461 .00001237 00000-0 32780-3 0 4285
+2 25791 24.9866 301.8786 0011197 121.1081 239.0526 14.40380912128164
+FUSE 1
+1 25791U 99035A 01331.78594478 .00001365 00000-0 36732-3 0 4275
+2 25791 24.9865 310.3519 0011209 106.8472 253.3273 14.40378324127969
+FUSE 1
+1 25791U 99035A 01330.67736645 +.00001415 +00000-0 +38296-3 0 04303
+2 25791 024.9868 317.1335 0011064 094.8355 265.3420 14.40375646127802
+FUSE 1
+1 25791U 99035A 01330.53879352 .00001567 00000-0 43006-3 0 4269
+2 25791 24.9872 317.9818 0011229 93.6128 266.5666 14.40376029127787
+FUSE 1
+1 25791U 99035A 01329.70735725 +.00001621 +00000-0 +44667-3 0 04457
+2 25791 024.9872 323.0652 0011232 084.6461 275.5327 14.40373883127661
+FUSE 1
+1 25791U 99035A 01329.22235264 .00001585 00000-0 43552-3 0 4256
+2 25791 24.9876 326.0324 0011267 80.2956 279.8829 14.40372335127590
+FUSE 1
+1 25791U 99035A 01327.83661937 .00001684 00000-0 46626-3 0 4245
+2 25791 24.9875 334.5052 0011431 65.9356 294.2344 14.40369004127398
+FUSE 1
+1 25791U 99035A 01326.52016884 .00001740 00000-0 48380-3 0 4236
+2 25791 24.9874 342.5535 0011585 52.2073 307.9485 14.40365366127202
+FUSE 1
+1 25791U 99035A 01325.41157411 .00001880 00000-0 52699-3 0 4227
+2 25791 24.9858 349.3412 0010869 41.2944 318.8383 14.40362474127049
+FUSE 1
+1 25791U 99035A 01324.92656363 +.00001916 +00000-0 +53838-3 0 04486
+2 25791 024.9856 352.3075 0010879 036.2259 323.8984 14.40361028126978
+FUSE 1
+1 25791U 99035A 01324.23369056 .00001967 00000-0 55417-3 0 4212
+2 25791 24.9855 356.5485 0010758 28.8088 331.3014 14.40358919126873
+FUSE 1
+1 25791U 99035A 01323.67939132 +.00001961 +00000-0 +55223-3 0 04407
+2 25791 024.9854 359.9372 0010776 023.0532 337.0460 14.40356881126790
+FUSE 1
+1 25791U 99035A 01322.70936542 .00001987 00000-0 56035-3 0 4198
+2 25791 24.9853 5.8688 0010772 12.9432 347.1352 14.40353526126658
+FUSE 1
+1 25791U 99035A 01321.67005005 .00001934 00000-0 54405-3 0 4184
+2 25791 24.9852 12.2257 0010726 1.9216 358.1340 14.40349375126508
+FUSE 1
+1 25791U 99035A 01320.56144300 .00001920 00000-0 53980-3 0 4174
+2 25791 24.9852 19.0058 0010683 350.0478 9.9818 14.40345343126346
+FUSE 1
+1 25791U 99035A 01319.52212142 .00001855 00000-0 51954-3 0 4163
+2 25791 24.9851 25.3612 0010623 338.9778 21.0292 14.40341342126192
+FUSE 1
+1 25791U 99035A 01318.82923904 +.00001856 +00000-0 +52003-3 0 04314
+2 25791 024.9847 029.5994 0010595 331.5863 028.4066 14.40338911126095
+FUSE 1
+1 25791U 99035A 01318.41350910 .00001890 00000-0 53052-3 0 4155
+2 25791 24.9848 32.1452 0010575 326.5664 33.4173 14.40337609126038
+FUSE 1
+1 25791U 99035A 01316.88916357 .00001729 00000-0 48061-3 0 4141
+2 25791 24.9843 41.4680 0010423 310.4505 49.5094 14.40331762125816
+FUSE 1
+1 25791U 99035A 01315.78054605 .00002207 00000-0 62878-3 0 4131
+2 25791 24.9835 48.2543 0010468 297.9246 62.0232 14.40329121125652
+FUSE 1
+1 25791U 99035A 01314.67192519 .00002266 00000-0 64699-3 0 4122
+2 25791 24.9832 55.0359 0010699 286.0302 73.9029 14.40324776125496
+FUSE 1
+1 25791U 99035A 01313.56330279 .00002157 00000-0 61343-3 0 4117
+2 25791 24.9831 61.8147 0010834 274.3350 85.5922 14.40319729125335
+FUSE 1
+1 25791U 99035A 01312.52396703 .00002119 00000-0 60174-3 0 4104
+2 25791 24.9829 68.1695 0010860 263.6572 96.2701 14.40315363125183
+FUSE 1
+1 25791U 99035A 01311.76178660 +.00001972 +00000-0 +55623-3 0 04344
+2 25791 024.9830 072.8283 0010752 255.8544 104.0769 14.40311922125079
+FUSE 1
+1 25791U 99035A 01310.99960448 .00001931 00000-0 54345-3 0 4098
+2 25791 24.9829 77.4894 0010755 247.9477 111.9889 14.40308978124960
+FUSE 1
+1 25791U 99035A 01309.96026276 +.00001965 +00000-0 +55405-3 0 04090
+2 25791 024.9829 083.8473 0010851 237.1463 122.8002 14.40305487124811
+FUSE 1
+1 25791U 99035A 01309.89097339 .00001972 00000-0 55619-3 0 4084
+2 25791 24.9829 84.2713 0010836 236.3815 123.5665 14.40305298124800
+FUSE 1
+1 25791U 99035A 01308.57447006 .00002179 00000-0 62044-3 0 4077
+2 25791 24.9822 92.3254 0010825 222.6458 137.3208 14.40301956124614
+FUSE 1
+1 25791U 99035A 01307.53512328 .00002351 00000-0 67374-3 0 4064
+2 25791 24.9814 98.6808 0010806 211.6998 148.2862 14.40299019124461
+FUSE 1
+1 25791U 99035A 01305.94145638 +.00002419 +00000-0 +69493-3 0 04062
+2 25791 024.9809 108.4263 0010833 195.2773 164.7418 14.40292404124234
+FUSE 1
+1 25791U 99035A 01305.87216636 .00002410 00000-0 69213-3 0 4051
+2 25791 24.9811 108.8509 0010847 194.5526 165.4669 14.40292047124225
+FUSE 1
+1 25791U 99035A 01304.90210496 +.00002483 +00000-0 +71481-3 0 04210
+2 25791 024.9807 114.7853 0010812 184.6053 175.4356 14.40288074124088
+FUSE 1
+1 25791U 99035A 01304.55565381 .00002564 00000-0 73991-3 0 4046
+2 25791 24.9803 116.9068 0010808 180.8733 179.1763 14.40287007124037
+FUSE 1
+1 25791U 99035A 01303.93204085 +.00002548 +00000-0 +73522-3 0 04141
+2 25791 024.9803 120.7190 0010799 174.3529 185.7099 14.40283909123947
+FUSE 1
+1 25791U 99035A 01303.03126575 .00002520 00000-0 72659-3 0 4037
+2 25791 24.9800 126.2295 0010755 164.6304 195.4536 14.40279287123810
+FUSE 1
+1 25791U 99035A 01301.78402958 .00002608 00000-0 75393-3 0 4023
+2 25791 24.9799 133.8566 0011062 153.3348 206.7722 14.40274032123633
+FUSE 1
+1 25791U 99035A 01299.91316810 .00002915 00000-0 84930-3 0 4012
+2 25791 24.9792 145.2965 0011048 134.0555 226.0864 14.40265988123368
+FUSE 1
+1 25791U 99035A 01298.18087804 .00003212 00000-0 94181-3 0 4007
+2 25791 24.9785 155.8916 0011040 115.9737 244.1911 14.40256974123117
+FUSE 1
+1 25791U 99035A 01297.97300262 +.00003234 +00000-0 +94848-3 0 04115
+2 25791 024.9787 157.1643 0011055 113.7776 246.3895 14.40255785123086
+FUSE 1
+1 25791U 99035A 01297.07220791 .00002684 00000-0 77791-3 0 3995
+2 25791 24.9787 162.6747 0010929 104.4008 255.7717 14.40248557122957
+FUSE 1
+1 25791U 99035A 01295.96352986 +.00002126 +00000-0 +60489-3 0 04025
+2 25791 024.9793 169.4508 0010628 092.8140 267.3584 14.40240931122798
+FUSE 1
+1 25791U 99035A 01295.89423827 .00002043 00000-0 57915-3 0 3982
+2 25791 24.9794 169.8749 0010644 91.9762 268.1968 14.40240146122780
+FUSE 1
+1 25791U 99035A 01294.92413976 +.00001853 +00000-0 +51998-3 0 04152
+2 25791 024.9798 175.8066 0010633 081.1941 278.9772 14.40235323122649
+FUSE 1
+1 25791U 99035A 01294.30050214 .00001823 00000-0 51089-3 0 3973
+2 25791 24.9799 179.6196 0010702 74.5779 285.5911 14.40232995122559
+FUSE 1
+1 25791U 99035A 01293.26110316 .00001744 00000-0 48616-3 0 3960
+2 25791 24.9799 185.9754 0010658 63.5604 296.6004 14.40228963122404
+FUSE 1
+1 25791U 99035A 01292.22169993 .00001707 00000-0 47471-3 0 3956
+2 25791 24.9799 192.3301 0010648 52.4658 307.6827 14.40225399122258
+FUSE 1
+1 25791U 99035A 01290.97441176 +.00001672 +00000-0 +46391-3 0 03975
+2 25791 024.9797 199.9582 0010599 039.1258 321.0014 14.40221249122071
+FUSE 1
+1 25791U 99035A 01290.90511781 .00001674 00000-0 46472-3 0 3947
+2 25791 24.9797 200.3818 0010601 38.3799 321.7462 14.40221053122061
+FUSE 1
+1 25791U 99035A 01289.44994252 .00001682 00000-0 46703-3 0 3937
+2 25791 24.9794 209.2810 0010620 22.7711 337.3265 14.40216632121857
+FUSE 1
+1 25791U 99035A 01288.96488349 +.00001640 +00000-0 +45420-3 0 04039
+2 25791 024.9794 212.2491 0010567 017.4224 342.6645 14.40214807121781
+FUSE 1
+1 25791U 99035A 01288.41052915 .00001638 00000-0 45357-3 0 3928
+2 25791 24.9794 215.6384 0010635 11.8186 348.2573 14.40213128121709
+FUSE 1
+1 25791U 99035A 01287.23252352 .00001574 00000-0 43355-3 0 3918
+2 25791 24.9794 222.8447 0010562 358.4459 1.6013 14.40209149121539
+FUSE 1
+1 25791U 99035A 01285.91592729 .00001390 00000-0 37646-3 0 3907
+2 25791 24.9795 230.9044 0010544 342.9330 17.0829 14.40203938121344
+FUSE 1
+1 25791U 99035A 01284.39144118 .00001300 00000-0 34838-3 0 3892
+2 25791 24.9795 240.2335 0010739 326.2228 33.7597 14.40199484121121
+FUSE 1
+1 25791U 99035A 01283.97567245 +.00001223 +00000-0 +32457-3 0 03894
+2 25791 024.9792 242.7798 0010828 320.9649 039.0093 14.40197815121064
+FUSE 1
+1 25791U 99035A 01283.35201646 .00001212 00000-0 32118-3 0 3887
+2 25791 24.9792 246.5916 0010829 314.6054 45.3576 14.40196427120972
+FUSE 1
+1 25791U 99035A 01282.31258856 +.00001218 +00000-0 +32310-3 0 03876
+2 25791 024.9792 252.9458 0010895 303.3438 056.6026 14.40194305120820
+FUSE 1
+1 25791U 99035A 01281.96611121 +.00001476 +00000-0 +40318-3 0 03877
+2 25791 024.9786 255.0631 0010800 300.4688 059.4739 14.40195140120775
+FUSE 1
+1 25791U 99035A 01281.27315947 .00001503 00000-0 41154-3 0 3867
+2 25791 24.9785 259.2981 0010800 293.1387 66.7977 14.40193471120671
+FUSE 1
+1 25791U 99035A 01280.23373114 .00001657 00000-0 45958-3 0 3857
+2 25791 24.9781 265.6543 0010925 282.3330 77.5954 14.40191161120521
+FUSE 1
+1 25791U 99035A 01279.19430003 .00002067 00000-0 58705-3 0 3840
+2 25791 24.9775 272.0130 0011160 270.5332 89.3900 14.40189300120378
+FUSE 1
+1 25791U 99035A 01277.60050645 .00002136 00000-0 60847-3 0 3830
+2 25791 24.9771 281.7563 0011259 253.7403 106.1876 14.40183292120141
+FUSE 1
+1 25791U 99035A 01276.69966572 +.00002038 +00000-0 +57797-3 0 03834
+2 25791 024.9770 287.2658 0011436 244.9457 114.9868 14.40179081120019
+FUSE 1
+1 25791U 99035A 01276.56107445 .00002038 00000-0 57794-3 0 3822
+2 25791 24.9770 288.1132 0011429 243.5500 116.3834 14.40178557119993
+FUSE 1
+1 25791U 99035A 01275.59093557 +.00002005 +00000-0 +56772-3 0 03900
+2 25791 024.9769 294.0432 0011469 233.5602 126.3872 14.40174627119858
+FUSE 1
+1 25791U 99035A 01275.24445817 .00001894 00000-0 53340-3 0 3815
+2 25791 24.9772 296.1661 0011642 231.1207 128.8260 14.40172274119806
+FUSE 1
+1 25791U 99035A 01274.20502117 .00001837 00000-0 51559-3 0 3803
+2 25791 24.9774 302.5234 0011565 220.9357 139.0293 14.40168098119654
+FUSE 1
+1 25791U 99035A 01272.54191528 .00001742 00000-0 48618-3 0 3793
+2 25791 24.9776 312.6900 0011479 204.0234 155.9738 14.40161743119414
+FUSE 1
+1 25791U 99035A 01271.22528748 .00001537 00000-0 42239-3 0 3789
+2 25791 24.9783 320.7396 0011360 191.6142 168.4111 14.40155760119224
+FUSE 1
+1 25791U 99035A 01270.18584050 .00001414 00000-0 38420-3 0 3771
+2 25791 24.9786 327.0943 0011214 181.1674 178.8811 14.40151731119076
+FUSE 1
+1 25791U 99035A 01268.59201413 .00001316 00000-0 35376-3 0 3769
+2 25791 24.9790 336.8359 0011124 164.6593 195.4255 14.40146964118849
+FUSE 1
+1 25791U 99035A 01267.55255878 .00001264 00000-0 33768-3 0 3752
+2 25791 24.9791 343.1899 0011084 153.8979 206.2088 14.40144164118691
+FUSE 1
+1 25791U 99035A 01266.85958720 +.00001236 +00000-0 +32881-3 0 04003
+2 25791 024.9791 347.4254 0011062 146.6571 213.4636 14.40142395118599
+FUSE 1
+1 25791U 99035A 01266.23591181 .00001222 00000-0 32443-3 0 3748
+2 25791 24.9790 351.2395 0010997 140.3022 219.8292 14.40140919118504
+FUSE 1
+1 25791U 99035A 01264.84996263 .00001228 00000-0 32643-3 0 3730
+2 25791 24.9790 359.7127 0010966 126.1194 234.0331 14.40138072118306
+FUSE 1
+1 25791U 99035A 01263.81049784 .00001251 00000-0 33374-3 0 3720
+2 25791 24.9787 6.0658 0010961 115.2876 244.8774 14.40136053118154
+FUSE 1
+1 25791U 99035A 01262.90962669 +.00001258 +00000-0 +33575-3 0 03770
+2 25791 024.9786 011.5725 0010944 105.8616 254.3099 14.40134145118029
+FUSE 1
+1 25791U 99035A 01262.56313782 .00001225 00000-0 32562-3 0 3711
+2 25791 24.9789 13.6910 0010897 102.2762 257.8965 14.40133131117978
+FUSE 1
+1 25791U 99035A 01261.73156198 +.00001238 +00000-0 +32981-3 0 03916
+2 25791 024.9787 018.7732 0010906 093.5350 266.6406 14.40131469117857
+FUSE 1
+1 25791U 99035A 01260.76138915 .00001191 00000-0 31510-3 0 3707
+2 25791 24.9789 24.7033 0010879 83.2256 276.9490 14.40129023117715
+FUSE 1
+1 25791U 99035A 01259.92981039 +.00001175 +00000-0 +31013-3 0 03874
+2 25791 024.9786 029.7863 0010871 074.4468 285.7243 14.40127147117592
+FUSE 1
+1 25791U 99035A 01259.58331925 .00001147 00000-0 30130-3 0 3697
+2 25791 24.9787 31.9057 0010852 70.6480 289.5197 14.40126176117540
+FUSE 1
+1 25791U 99035A 01258.95963335 +.00001144 +00000-0 +30044-3 0 03874
+2 25791 024.9786 035.7176 0010865 064.0853 296.0773 14.40124921117457
+FUSE 1
+1 25791U 99035A 01258.54384331 .00001102 00000-0 28749-3 0 3684
+2 25791 24.9787 38.2594 0010849 59.6296 300.5294 14.40123716117396
+FUSE 1
+1 25791U 99035A 01256.88067564 .00001029 00000-0 26472-3 0 3673
+2 25791 24.9789 48.4246 0010881 42.1181 318.0162 14.40120076117159
+FUSE 1
+1 25791U 99035A 01255.84119312 +.00000982 +00000-0 +24994-3 0 03828
+2 25791 024.9791 054.7780 0010906 031.2706 328.8450 14.40117913117004
+FUSE 1
+1 25791U 99035A 01255.56399752 .00000973 00000-0 24725-3 0 3669
+2 25791 24.9790 56.4726 0010911 28.3803 331.7300 14.40117363116963
+FUSE 1
+1 25791U 99035A 01254.17801710 .00000928 00000-0 23335-3 0 3652
+2 25791 24.9790 64.9453 0010913 13.8647 346.2161 14.40114762116765
+FUSE 1
+1 25791U 99035A 01253.13853000 .00000871 00000-0 21540-3 0 3648
+2 25791 24.9793 71.2996 0010924 2.8497 357.2074 14.40112768116617
+FUSE 1
+1 25791U 99035A 01251.89114396 .00000824 00000-0 20070-3 0 3631
+2 25791 24.9796 78.9282 0010899 349.5744 10.4536 14.40110640116437
+FUSE 1
+1 25791U 99035A 01250.57445682 .00000789 00000-0 18992-3 0 3629
+2 25791 24.9798 86.9794 0010848 335.6563 24.3436 14.40108640116244
+FUSE 1
+1 25791U 99035A 01249.39636695 .00000757 00000-0 18011-3 0 3619
+2 25791 24.9802 94.1822 0010810 323.2224 36.7543 14.40106962116071
+FUSE 1
+1 25791U 99035A 01248.91127102 +.00000751 +00000-0 +17803-3 0 03830
+2 25791 024.9803 097.1479 0010787 318.2500 041.7192 14.40106349116005
+FUSE 1
+1 25791U 99035A 01248.21827703 .00000711 00000-0 16549-3 0 3604
+2 25791 24.9806 101.3869 0010851 311.0280 48.9290 14.40105201115909
+FUSE 1
+1 25791U 99035A 01247.94107926 +.00000692 +00000-0 +15961-3 0 03998
+2 25791 024.9808 103.0812 0010848 308.0548 051.8982 14.40104743115863
+FUSE 1
+1 25791U 99035A 01246.97088639 +.00000665 +00000-0 +15119-3 0 03624
+2 25791 024.9811 109.0135 0010822 297.4688 062.4719 14.40103568115724
+FUSE 1
+1 25791U 99035A 01246.90158683 .00000665 00000-0 15140-3 0 3594
+2 25791 24.9811 109.4371 0010823 296.7486 63.1913 14.40103507115715
+FUSE 1
+1 25791U 99035A 01245.86209396 .00000696 00000-0 16089-3 0 3582
+2 25791 24.9808 115.7946 0010841 285.1746 74.7568 14.40102728115561
+FUSE 1
+1 25791U 99035A 01244.47610489 .00000659 00000-0 14935-3 0 3573
+2 25791 24.9811 124.2700 0010831 270.7608 89.1659 14.40100949115366
+FUSE 1
+1 25791U 99035A 01243.36731275 .00000662 00000-0 15021-3 0 3567
+2 25791 24.9811 131.0482 0010866 258.9721 100.9574 14.40099892115206
+FUSE 1
+1 25791U 99035A 01242.25852056 .00000648 00000-0 14586-3 0 3553
+2 25791 24.9814 137.8264 0010894 247.3559 112.5794 14.40098711115047
+FUSE 1
+1 25791U 99035A 01241.98132292 +.00000630 +00000-0 +14046-3 0 03737
+2 25791 024.9816 139.5223 0010941 244.5808 115.3567 14.40098300115001
+FUSE 1
+1 25791U 99035A 01241.21902828 .00000629 00000-0 14009-3 0 3549
+2 25791 24.9817 144.1835 0011009 236.5844 123.3610 14.40097610114897
+FUSE 1
+1 25791U 99035A 01239.97163784 +.00000567 +00000-0 +12075-3 0 03541
+2 25791 024.9822 151.8119 0011137 224.0036 135.9578 14.40096009114714
+FUSE 1
+1 25791U 99035A 01239.90233840 .00000573 00000-0 12271-3 0 3539
+2 25791 24.9822 152.2355 0011140 223.3426 136.6211 14.40096007114709
+FUSE 1
+1 25791U 99035A 01238.93214506 +.00000578 +00000-0 +12417-3 0 03569
+2 25791 024.9822 158.1667 0011192 213.0996 146.8828 14.40095287114565
+FUSE 1
+1 25791U 99035A 01238.44704821 .00000558 00000-0 11791-3 0 3527
+2 25791 24.9823 161.1314 0011195 208.1454 151.8451 14.40094733114491
+FUSE 1
+1 25791U 99035A 01237.19965619 .00000543 00000-0 11309-3 0 3510
+2 25791 24.9826 168.7556 0011260 195.0033 165.0141 14.40093691114311
+FUSE 1
+1 25791U 99035A 01235.46716564 .00000559 00000-0 11830-3 0 3506
+2 25791 24.9826 179.3436 0011265 177.0928 182.9645 14.40092549114064
+FUSE 1
+1 25791U 99035A 01234.91276874 +.00000555 +00000-0 +11697-3 0 03518
+2 25791 024.9826 182.7322 0011267 171.3778 188.6930 14.40092091113980
+FUSE 1
+1 25791U 99035A 01234.21977186 .00000553 00000-0 11627-3 0 3493
+2 25791 24.9827 186.9667 0011270 164.0792 196.0070 14.40091557113881
+FUSE 1
+1 25791U 99035A 01233.18027640 .00000553 00000-0 11642-3 0 3485
+2 25791 24.9827 193.3193 0011293 153.2255 206.8853 14.40090779113734
+FUSE 1
+1 25791U 99035A 01231.72498050 .00000562 00000-0 11920-3 0 3478
+2 25791 24.9824 202.2156 0011301 138.1751 221.9616 14.40089739113529
+FUSE 1
+1 25791U 99035A 01230.54688298 .00000525 00000-0 10770-3 0 3462
+2 25791 24.9834 209.4179 0011313 126.3801 233.7753 14.40088665113353
+FUSE 1
+1 25791U 99035A 01229.23018362 .00000520 00000-0 10610-3 0 3452
+2 25791 24.9836 217.4680 0011315 112.6116 247.5590 14.40087703113163
+FUSE 1
+1 25791U 99035A 01228.81438323 +.00000515 +00000-0 +10467-3 0 03665
+2 25791 024.9835 220.0093 0011311 108.2127 251.9609 14.40087362113104
+FUSE 1
+1 25791U 99035A 01227.84418190 .00000497 00000-0 98977-4 0 3445
+2 25791 24.9840 225.9413 0011274 98.5742 261.6044 14.40086582112969
+FUSE 1
+1 25791U 99035A 01226.66607788 +.00000493 +00000-0 +97886-4 0 03463
+2 25791 024.9839 233.1408 0011275 086.3501 273.8298 14.40085796112794
+FUSE 1
+1 25791U 99035A 01226.52747722 .00000492 00000-0 97361-4 0 3435
+2 25791 24.9840 233.9884 0011272 84.8774 275.3014 14.40085704112774
+FUSE 1
+1 25791U 99035A 01225.21077022 .00000514 00000-0 10445-3 0 3420
+2 25791 24.9840 242.0362 0011245 71.4518 288.7213 14.40085082112581
+FUSE 1
+1 25791U 99035A 01223.89406193 .00000470 00000-0 90604-4 0 3413
+2 25791 24.9848 250.0849 0011117 57.6806 302.4776 14.40083898112392
+FUSE 1
+1 25791U 99035A 01222.78525341 .00000440 00000-0 81399-4 0 3404
+2 25791 24.9853 256.8629 0011047 46.0947 314.0477 14.40083059112237
+FUSE 1
+1 25791U 99035A 01221.95364609 +.00000421 +00000-0 +75317-4 0 03435
+2 25791 024.9857 261.9471 0011006 037.3315 322.7958 14.40082476112119
+FUSE 1
+1 25791U 99035A 01221.53784190 .00000421 00000-0 75510-4 0 3390
+2 25791 24.9858 264.4889 0010990 32.9399 327.1792 14.40082299112056
+FUSE 1
+1 25791U 99035A 01220.98343688 +.00000390 +00000-0 +65848-4 0 03579
+2 25791 024.9859 267.8782 0010962 026.9957 333.1120 14.40081738111977
+FUSE 1
+1 25791U 99035A 01220.22112886 .00000387 00000-0 64765-4 0 3382
+2 25791 24.9860 272.5393 0010909 18.8496 341.2417 14.40081380111869
+FUSE 1
+1 25791U 99035A 01218.97371408 .00000391 00000-0 65912-4 0 3377
+2 25791 24.9861 280.1628 0010876 5.5029 354.5594 14.40080902111686
+FUSE 1
+1 25791U 99035A 01217.86490136 .00000373 00000-0 60393-4 0 3361
+2 25791 24.9866 286.9411 0010853 353.7666 6.2707 14.40080339111529
+FUSE 1
+1 25791U 99035A 01216.82538872 .00000371 00000-0 59777-4 0 3357
+2 25791 24.9868 293.2962 0010793 342.5968 17.4161 14.40079940111374
+FUSE 1
+1 25791U 99035A 01215.57797329 .00000400 00000-0 68747-4 0 3341
+2 25791 24.9867 300.9214 0010734 329.1452 30.8424 14.40079711111190
+FUSE 1
+1 25791U 99035A 01214.88496511 +.00000411 +00000-0 +72102-4 0 03738
+2 25791 024.9865 305.1569 0010752 321.8056 038.1700 14.40079469111094
+FUSE 1
+1 25791U 99035A 01213.91475370 +.00000418 +00000-0 +74537-4 0 03349
+2 25791 024.9864 311.0878 0010770 311.6786 048.2800 14.40079073110957
+FUSE 1
+1 25791U 99035A 01213.84545284 .00000418 00000-0 74517-4 0 3330
+2 25791 24.9864 311.5114 0010770 310.9520 49.0052 14.40079040110944
+FUSE 1
+1 25791U 99035A 01212.94454257 +.00000434 +00000-0 +79248-4 0 03344
+2 25791 024.9864 317.0188 0010768 301.3288 058.6164 14.40078734110813
+FUSE 1
+1 25791U 99035A 01212.80594067 .00000444 00000-0 82373-4 0 3325
+2 25791 24.9863 317.8657 0010766 299.6889 60.2542 14.40078761110791
+FUSE 1
+1 25791U 99035A 01211.90503055 +.00000468 +00000-0 +90090-4 0 03446
+2 25791 024.9863 323.3726 0010776 290.0365 069.8977 14.40078499110666
+FUSE 1
+1 25791U 99035A 01211.55852704 .00000460 00000-0 87431-4 0 3318
+2 25791 24.9864 325.4904 0010823 286.2525 73.6791 14.40078234110615
+FUSE 1
+1 25791U 99035A 01210.93482022 +.00000472 +00000-0 +91278-4 0 03633
+2 25791 024.9864 329.3017 0010848 279.6419 080.2862 14.40077996110525
+FUSE 1
+1 25791U 99035A 01210.17251264 .00000478 00000-0 93199-4 0 3305
+2 25791 24.9863 333.9619 0010873 271.6318 88.2943 14.40077601110410
+FUSE 1
+1 25791U 99035A 01208.85579991 .00000490 00000-0 96802-4 0 3293
+2 25791 24.9866 342.0099 0010922 257.5431 102.3853 14.40076934110225
+FUSE 1
+1 25791U 99035A 01207.81629030 .00000501 00000-0 10023-3 0 3280
+2 25791 24.9867 348.3635 0010966 246.5884 113.3470 14.40076398110073
+FUSE 1
+1 25791U 99035A 01206.91538249 +.00000508 +00000-0 +10250-3 0 03415
+2 25791 024.9866 353.8713 0010987 237.1497 122.7945 14.40075887109946
+FUSE 1
+1 25791U 99035A 01206.56887963 .00000511 00000-0 10326-3 0 3278
+2 25791 24.9867 355.9893 0011012 233.5318 126.4174 14.40075691109893
+FUSE 1
+1 25791U 99035A 01205.87587337 +.00000527 +00000-0 +10839-3 0 03505
+2 25791 024.9868 000.2251 0011076 226.2868 133.6720 14.40075413109799
+FUSE 1
+1 25791U 99035A 01205.25216864 .00000510 00000-0 10313-3 0 3263
+2 25791 24.9867 4.0363 0011090 219.8115 140.1582 14.40074798109708
+FUSE 1
+1 25791U 99035A 01203.93545728 +.00000516 +00000-0 +10479-3 0 03269
+2 25791 024.9866 012.0811 0011114 206.0591 153.9357 14.40073969109517
+FUSE 1
+1 25791U 99035A 01203.86615663 .00000516 00000-0 10479-3 0 3256
+2 25791 24.9866 12.5045 0011114 205.3331 154.6628 14.40073923109503
+FUSE 1
+1 25791U 99035A 01202.96524958 +.00000508 +00000-0 +10233-3 0 03486
+2 25791 024.9865 018.0111 0011154 196.1382 163.8780 14.40073233109374
+FUSE 1
+1 25791U 99035A 01202.54944641 .00000493 00000-0 97826-4 0 3246
+2 25791 24.9863 20.5527 0011169 191.8050 168.2200 14.40072784109311
+FUSE 1
+1 25791U 99035A 01201.16343360 .00000507 00000-0 10206-3 0 3235
+2 25791 24.9866 29.0225 0011223 177.3906 182.6661 14.40072075109115
+FUSE 1
+1 25791U 99035A 01200.12393049 .00000384 00000-0 63784-4 0 3221
+2 25791 24.9826 35.4045 0011352 165.2759 194.8082 14.40070335108968
+FUSE 1
+1 25791U 99035A 01198.94581712 +.00000454 +00000-0 +85448-4 0 03255
+2 25791 024.9819 042.6054 0011509 153.7866 206.3225 14.40070361108793
+FUSE 1
+1 25791U 99035A 01198.87651654 .00000454 00000-0 85668-4 0 3210
+2 25791 24.9819 43.0290 0011506 153.0511 207.0603 14.40070330108780
+FUSE 1
+1 25791U 99035A 01197.90630513 +.00000543 +00000-0 +11321-3 0 03251
+2 25791 024.9814 048.9614 0011667 143.2067 216.9249 14.40070553108641
+FUSE 1
+1 25791U 99035A 01197.83700416 .00000546 00000-0 11423-3 0 3204
+2 25791 24.9813 49.3856 0011672 142.5933 217.5379 14.40070523108630
+FUSE 1
+1 25791U 99035A 01196.93609183 +.00000693 +00000-0 +16016-3 0 03423
+2 25791 024.9796 054.8902 0011793 132.6084 227.5393 14.40070954108505
+FUSE 1
+1 25791U 99035A 01196.45099063 .00000473 00000-0 91615-4 0 3199
+2 25791 24.9825 57.8656 0011228 128.4789 231.6720 14.40068671108430
+FUSE 1
+1 25791U 99035A 01195.20357322 .00000505 00000-0 10164-3 0 3180
+2 25791 24.9825 65.4916 0011215 116.0156 244.1500 14.40068220108256
+FUSE 1
+1 25791U 99035A 01194.02545613 .00000499 00000-0 99733-4 0 3172
+2 25791 24.9826 72.6920 0011188 103.4129 256.7628 14.40067381108089
+FUSE 1
+1 25791U 99035A 01193.95615541 +.00000494 +00000-0 +98068-4 0 03356
+2 25791 024.9827 073.1157 0011179 102.6649 257.5123 14.40067286108078
+FUSE 1
+1 25791U 99035A 01192.50083132 .00000493 00000-0 97812-4 0 3165
+2 25791 24.9831 82.0131 0011146 87.3221 272.8568 14.40066408107867
+FUSE 1
+1 25791U 99035A 01191.94642156 +.00000499 +00000-0 +99730-4 0 03267
+2 25791 024.9831 085.4021 0011170 081.6595 278.5190 14.40066125107781
+FUSE 1
+1 25791U 99035A 01191.18410683 .00000513 00000-0 10412-3 0 3155
+2 25791 24.9835 90.0635 0011114 74.2217 285.9515 14.40065843107672
+FUSE 1
+1 25791U 99035A 01190.14458616 .00000519 00000-0 10586-3 0 3145
+2 25791 24.9834 96.4153 0011128 63.2236 296.9407 14.40065179107528
+FUSE 1
+1 25791U 99035A 01188.89716000 .00000517 00000-0 10535-3 0 3139
+2 25791 24.9835 104.0390 0011105 50.1547 309.9937 14.40064329107342
+FUSE 1
+1 25791U 99035A 01187.85763598 .00000560 00000-0 11885-3 0 3124
+2 25791 24.9834 110.3927 0011027 39.7903 320.3413 14.40064059107198
+FUSE 1
+1 25791U 99035A 01186.26369845 .00000576 00000-0 12383-3 0 3115
+2 25791 24.9833 120.1320 0011040 23.1413 336.9590 14.40062964106967
+FUSE 1
+1 25791U 99035A 01185.22417234 .00000611 00000-0 13466-3 0 3108
+2 25791 24.9832 126.4851 0010938 12.2821 347.7952 14.40062479106818
+FUSE 1
+1 25791U 99035A 01183.90743981 .00000616 00000-0 13632-3 0 3090
+2 25791 24.9835 134.5338 0011000 358.4299 1.6173 14.40061396106623
+FUSE 1
+1 25791U 99035A 01182.72930922 .00000647 00000-0 14599-3 0 3088
+2 25791 24.9835 141.7349 0010932 346.1083 13.9122 14.40060663106450
+FUSE 1
+1 25791U 99035A 01181.55117807 .00000655 00000-0 14826-3 0 3078
+2 25791 24.9833 148.9349 0010989 333.0109 26.9827 14.40059608106287
+FUSE 1
+1 25791U 99035A 01180.23444311 .00000674 00000-0 15430-3 0 3067
+2 25791 24.9834 156.9835 0010915 318.5214 41.4471 14.40058589106094
+FUSE 1
+1 25791U 99035A 01179.95723625 +.00000660 +00000-0 +14998-3 0 03537
+2 25791 024.9835 158.6778 0010936 315.4784 044.4860 14.40058184106053
+FUSE 1
+1 25791U 99035A 01178.98701077 +.00000700 +00000-0 +16223-3 0 03095
+2 25791 024.9839 164.6103 0010804 304.5310 055.4225 14.40057715105914
+FUSE 1
+1 25791U 99035A 01178.91770917 .00000670 00000-0 15306-3 0 3050
+2 25791 24.9837 165.0340 0010775 303.9328 56.0166 14.40057316105906
+FUSE 1
+1 25791U 99035A 01177.94748394 +.00000667 +00000-0 +15215-3 0 03051
+2 25791 024.9839 170.9631 0010758 293.8032 066.1362 14.40056346105762
+FUSE 1
+1 25791U 99035A 01177.80888028 .00000659 00000-0 14952-3 0 3042
+2 25791 24.9838 171.8101 0010748 292.4036 67.5332 14.40056120105741
+FUSE 1
+1 25791U 99035A 01176.83865444 +.00000669 +00000-0 +15256-3 0 03062
+2 25791 024.9836 177.7390 0010771 281.9230 078.0068 14.40055269105600
+FUSE 1
+1 25791U 99035A 01176.56144703 .00000675 00000-0 15449-3 0 3038
+2 25791 24.9837 179.4333 0010795 278.8637 81.0649 14.40055073105566
+FUSE 1
+1 25791U 99035A 01175.86842919 +.00000678 +00000-0 +15546-3 0 03316
+2 25791 024.9837 183.6698 0010800 271.5427 088.3843 14.40054412105462
+FUSE 1
+1 25791U 99035A 01175.24471298 .00000688 00000-0 15855-3 0 3028
+2 25791 24.9839 187.4824 0010794 264.9104 95.0170 14.40053918105375
+FUSE 1
+1 25791U 99035A 01173.85867780 .00000677 00000-0 15522-3 0 3016
+2 25791 24.9839 195.9535 0010801 250.3967 109.5372 14.40052381105179
+FUSE 1
+1 25791U 99035A 01172.95775496 +.00000670 +00000-0 +15307-3 0 03067
+2 25791 024.9841 201.4598 0010826 240.8926 119.0499 14.40051405105048
+FUSE 1
+1 25791U 99035A 01172.54194415 .00000672 00000-0 15364-3 0 3007
+2 25791 24.9843 204.0010 0010840 236.4724 123.4748 14.40051033104986
+FUSE 1
+1 25791U 99035A 01171.98753138 +.00000679 +00000-0 +15575-3 0 03288
+2 25791 024.9843 207.3895 0010842 230.3514 129.6117 14.40050582104903
+FUSE 1
+1 25791U 99035A 01171.22521133 .00000677 00000-0 15522-3 0 2990
+2 25791 24.9854 212.0560 0010996 222.3356 137.6304 14.40049810104798
+FUSE 1
+1 25791U 99035A 01169.97777976 +.00000651 +00000-0 +14719-3 0 02996
+2 25791 024.9854 219.6805 0010993 209.2640 150.7249 14.40048323104613
+FUSE 1
+1 25791U 99035A 01169.83917607 .00000653 00000-0 14780-3 0 2987
+2 25791 24.9854 220.5274 0010997 207.8311 152.1606 14.40048213104595
+FUSE 1
+1 25791U 99035A 01168.93825267 +.00000639 +00000-0 +14331-3 0 02983
+2 25791 024.9853 226.0330 0011011 198.4101 161.6008 14.40047199104467
+FUSE 1
+1 25791U 99035A 01168.79964884 .00000639 00000-0 14331-3 0 2975
+2 25791 24.9853 226.8798 0011011 196.9581 163.0554 14.40047071104447
+FUSE 1
+1 25791U 99035A 01167.55221537 .00000637 00000-0 14282-3 0 2961
+2 25791 24.9855 234.5040 0011049 184.0993 175.9424 14.40045914104263
+FUSE 1
+1 25791U 99035A 01166.51268687 .00000629 00000-0 14035-3 0 2959
+2 25791 24.9856 240.8573 0011071 173.3506 186.7149 14.40044884104114
+FUSE 1
+1 25791U 99035A 01165.95827450 +.00000603 +00000-0 +13200-3 0 03120
+2 25791 024.9848 244.2600 0010963 166.9546 193.1247 14.40044112104031
+FUSE 1
+1 25791U 99035A 01165.40385861 .00000599 00000-0 13098-3 0 2943
+2 25791 24.9849 247.6487 0010973 161.1937 198.8977 14.40043624103953
+FUSE 1
+1 25791U 99035A 01164.22572358 .00000615 00000-0 13598-3 0 2934
+2 25791 24.9850 254.8490 0011010 149.2494 210.8676 14.40042799103781
+FUSE 1
+1 25791U 99035A 01163.87921276 +.00000615 +00000-0 +13599-3 0 03270
+2 25791 024.9849 256.9662 0011011 145.6235 214.4988 14.40042491103737
+FUSE 1
+1 25791U 99035A 01163.18619226 .00000575 00000-0 12336-3 0 2927
+2 25791 24.9852 261.2039 0011012 139.1112 221.0231 14.40041529103636
+FUSE 1
+1 25791U 99035A 01162.90898327 +.00000573 +00000-0 +12283-3 0 03321
+2 25791 024.9853 262.8977 0011009 136.1629 223.9749 14.40041298103594
+FUSE 1
+1 25791U 99035A 01161.86945008 .00000570 00000-0 12199-3 0 2911
+2 25791 24.9855 269.2523 0011028 125.4435 234.7103 14.40040463103442
+FUSE 1
+1 25791U 99035A 01160.55270529 .00000600 00000-0 13110-3 0 2902
+2 25791 24.9853 277.3011 0011033 112.2693 247.8985 14.40039697103257
+FUSE 1
+1 25791U 99035A 01159.51316909 .00000608 00000-0 13389-3 0 2893
+2 25791 24.9855 283.6566 0011020 101.4944 258.6799 14.40038905103107
+FUSE 1
+1 25791U 99035A 01158.95874900 +.00000619 +00000-0 +13726-3 0 03157
+2 25791 024.9854 287.0455 0011021 095.8528 264.3235 14.40038518103026
+FUSE 1
+1 25791U 99035A 01158.40432836 .00000637 00000-0 14284-3 0 2884
+2 25791 24.9854 290.4346 0011007 89.9818 270.1950 14.40038207102947
+FUSE 1
+1 25791U 99035A 01157.22618367 .00000647 00000-0 14588-3 0 2875
+2 25791 24.9857 297.6350 0011049 77.7985 282.3753 14.40037223102774
+FUSE 1
+1 25791U 99035A 01156.18664290 .00000642 00000-0 14440-3 0 2866
+2 25791 24.9861 303.9893 0011005 67.0287 293.1376 14.40036236102629
+FUSE 1
+1 25791U 99035A 01154.86988814 .00000664 00000-0 15129-3 0 2858
+2 25791 24.9862 312.0359 0010968 53.2775 306.8736 14.40035235102433
+FUSE 1
+1 25791U 99035A 01153.55313207 .00000654 00000-0 14823-3 0 2849
+2 25791 24.9862 320.0822 0010917 39.4182 320.7119 14.40033855102244
+FUSE 1
+1 25791U 99035A 01152.51358604 .00000656 00000-0 14876-3 0 2833
+2 25791 24.9862 326.4348 0010879 28.5266 331.5835 14.40032889102090
+FUSE 1
+1 25791U 99035A 01151.95916093 +.00000658 +00000-0 +14954-3 0 03067
+2 25791 024.9864 329.8227 0010858 022.6676 337.4309 14.40032401102015
+FUSE 1
+1 25791U 99035A 01151.33543277 .00000649 00000-0 14671-3 0 2828
+2 25791 24.9863 333.6343 0010866 15.9419 344.1429 14.40031685101925
+FUSE 1
+1 25791U 99035A 01150.15727791 .00000654 00000-0 14810-3 0 2812
+2 25791 24.9864 340.8337 0010840 3.4915 356.5667 14.40030638101753
+FUSE 1
+1 25791U 99035A 01149.88006493 +.00000653 +00000-0 +14785-3 0 03135
+2 25791 024.9866 342.5280 0010826 000.5019 359.5497 14.40030376101717
+FUSE 1
+1 25791U 99035A 01148.90982283 .00000634 00000-0 14209-3 0 2800
+2 25791 24.9866 348.4566 0010800 350.2840 9.7632 14.40029222101575
+FUSE 1
+1 25791U 99035A 01147.38515028 .00000579 00000-0 12480-3 0 2795
+2 25791 24.9837 357.7948 0010793 333.6467 26.3492 14.40027134101356
+FUSE 1
+1 25791U 99035A 01146.20699331 .00000565 00000-0 12045-3 0 2786
+2 25791 24.9838 4.9959 0010786 321.0840 38.8893 14.40026061101180
+FUSE 1
+1 25791U 99035A 01144.89022932 .00000533 00000-0 11042-3 0 2776
+2 25791 24.9841 13.0436 0010817 306.9215 53.0301 14.40024823100993
+FUSE 1
+1 25791U 99035A 01143.91998144 +.00000546 +00000-0 +11428-3 0 02924
+2 25791 024.9842 018.9724 0010816 296.5378 063.4019 14.40024274100857
+FUSE 1
+1 25791U 99035A 01143.36555441 .00000551 00000-0 11588-3 0 2767
+2 25791 24.9842 22.3601 0010810 290.7426 69.1925 14.40023904100773
+FUSE 1
+1 25791U 99035A 01142.94973432 +.00000553 +00000-0 +11652-3 0 02881
+2 25791 024.9843 024.9015 0010807 286.3744 073.5580 14.40023633100710
+FUSE 1
+1 25791U 99035A 01142.32600379 .00000567 00000-0 12088-3 0 2755
+2 25791 24.9842 28.7136 0010785 279.8487 80.0792 14.40023279100625
+FUSE 1
+1 25791U 99035A 01141.91018440 +.00000540 +00000-0 +11242-3 0 02900
+2 25791 024.9840 031.2547 0010893 276.2467 083.6799 14.40022637100563
+FUSE 1
+1 25791U 99035A 01141.21715079 .00000549 00000-0 11542-3 0 2749
+2 25791 24.9840 35.4898 0010896 268.8475 91.0785 14.40022229100461
+FUSE 1
+1 25791U 99035A 01139.90038775 .00000571 00000-0 12219-3 0 2739
+2 25791 24.9839 43.5397 0010931 255.0386 104.8911 14.40021439100277
+FUSE 1
+1 25791U 99035A 01138.58362425 .00000609 00000-0 13389-3 0 2724
+2 25791 24.9837 51.5882 0011072 241.1629 118.7758 14.40020744100086
+FUSE 1
+1 25791U 99035A 01137.33616481 .00000661 00000-0 15031-3 0 2713
+2 25791 24.9839 59.2112 0011101 227.8811 132.0752 14.40020162 99901
+FUSE 1
+1 25791U 99035A 01136.22731284 .00000674 00000-0 15435-3 0 2700
+2 25791 24.9841 65.9875 0011119 216.3279 143.6473 14.40019220 99747
+FUSE 1
+1 25791U 99035A 01134.97985363 +.00000712 +00000-0 +16613-3 0 02734
+2 25791 024.9840 073.6131 0011195 203.7721 156.2269 14.40018339099566
+FUSE 1
+1 25791U 99035A 01134.91055026 .00000715 00000-0 16725-3 0 2694
+2 25791 24.9839 74.0366 0011202 203.0881 156.9123 14.40018302 99553
+FUSE 1
+1 25791U 99035A 01133.94030404 +.00000743 +00000-0 +17573-3 0 02737
+2 25791 024.9839 079.9663 0011198 193.0427 166.9790 14.40017554099419
+FUSE 1
+1 25791U 99035A 01133.45518076 .00000746 00000-0 17689-3 0 2684
+2 25791 24.9839 82.9302 0011209 188.0450 171.9871 14.40017047 99341
+FUSE 1
+1 25791U 99035A 01132.20772024 .00000785 00000-0 18898-3 0 2676
+2 25791 24.9839 90.5544 0011269 175.2870 184.7740 14.40016047 99160
+FUSE 1
+1 25791U 99035A 01130.96025905 +.00000820 +00000-0 +19980-3 0 02691
+2 25791 024.9841 098.1782 0011296 162.1732 197.9172 14.40014946098983
+FUSE 1
+1 25791U 99035A 01130.89095562 .00000820 00000-0 20001-3 0 2662
+2 25791 24.9841 98.6016 0011296 161.4536 198.6384 14.40014866 98975
+FUSE 1
+1 25791U 99035A 01129.92071030 +.00000847 +00000-0 +20834-3 0 02661
+2 25791 024.9833 104.5520 0011085 151.6354 208.4757 14.40014053098835
+FUSE 1
+1 25791U 99035A 01129.85140680 .00000850 00000-0 20936-3 0 2657
+2 25791 24.9832 104.9757 0011084 150.9394 209.1729 14.40013984 98823
+FUSE 1
+1 25791U 99035A 01128.95046107 +.00000863 +00000-0 +21348-3 0 02704
+2 25791 024.9831 110.4816 0011082 141.5157 218.6142 14.40012890098695
+FUSE 1
+1 25791U 99035A 01128.53463956 .00000867 00000-0 21456-3 0 2640
+2 25791 24.9830 113.0225 0011082 137.1961 222.9409 14.40012343 98632
+FUSE 1
+1 25791U 99035A 01127.98021059 +.00000880 +00000-0 +21866-3 0 02822
+2 25791 024.9832 116.4114 0011088 131.3728 228.7736 14.40011719098555
+FUSE 1
+1 25791U 99035A 01127.21786998 .00000884 00000-0 22005-3 0 2637
+2 25791 24.9831 121.0699 0011080 123.3961 236.7608 14.40010685 98442
+FUSE 1
+1 25791U 99035A 01125.90109773 .00000892 00000-0 22255-3 0 2626
+2 25791 24.9833 129.1184 0011028 109.9749 250.1950 14.40008904 98258
+FUSE 1
+1 25791U 99035A 01124.86153846 .00000895 00000-0 22336-3 0 2612
+2 25791 24.9835 135.4720 0010976 99.2838 260.8908 14.40007464 98102
+FUSE 1
+1 25791U 99035A 01123.82197729 .00000903 00000-0 22598-3 0 2604
+2 25791 24.9836 141.8244 0010956 88.5472 271.6290 14.40006059 97953
+FUSE 1
+1 25791U 99035A 01122.78241421 .00000914 00000-0 22957-3 0 2596
+2 25791 24.9838 148.1778 0010906 77.7606 282.4122 14.40004664 97809
+FUSE 1
+1 25791U 99035A 01121.74284958 .00000909 00000-0 22797-3 0 2588
+2 25791 24.9840 154.5310 0010872 66.8417 293.3235 14.40003100 97659
+FUSE 1
+1 25791U 99035A 01120.98050140 +.00000892 +00000-0 +22245-3 0 02632
+2 25791 024.9840 159.1901 0010848 058.8234 301.3337 14.40001802097545
+FUSE 1
+1 25791U 99035A 01120.56467427 .00000893 00000-0 22276-3 0 2574
+2 25791 24.9840 161.7307 0010845 54.4415 305.7103 14.40001218 97487
+FUSE 1
+1 25791U 99035A 01119.24788803 .00000840 00000-0 20637-3 0 2561
+2 25791 24.9839 169.7779 0010778 40.3623 319.7683 14.39998784 97294
+FUSE 1
+1 25791U 99035A 01117.23804969 .00000814 00000-0 19817-3 0 2547
+2 25791 24.9840 182.0587 0010772 19.4486 340.6431 14.39995823 97003
+FUSE 1
+1 25791U 99035A 01116.96083039 +.00000802 +00000-0 +19449-3 0 02877
+2 25791 024.9843 183.7523 0010778 016.6787 343.4072 14.39995329096960
+FUSE 1
+1 25791U 99035A 01116.19847490 .00001304 00000-0 35116-3 0 2531
+2 25791 24.9827 188.4092 0011139 8.8375 351.2331 14.39996795 96854
+FUSE 1
+1 25791U 99035A 01114.88168133 +.00000626 +00000-0 +13955-3 0 02538
+2 25791 024.9832 196.4565 0011007 354.8618 005.1760 14.39992143096665
+FUSE 1
+1 25791U 99035A 01114.81237588 .00000730 00000-0 17192-3 0 2524
+2 25791 24.9832 196.8805 0010974 353.8797 6.1556 14.39992378 96658
+FUSE 1
+1 25791U 99035A 01113.91141013 +.00001105 +00000-0 +28900-3 0 02583
+2 25791 024.9832 202.3874 0010818 344.5129 015.5072 14.39992088096521
+FUSE 1
+1 25791U 99035A 01113.56488467 .00000804 00000-0 19509-3 0 2514
+2 25791 24.9836 204.5049 0010848 340.9754 19.0347 14.39990691 96476
+FUSE 1
+1 25791U 99035A 01112.87183381 +.00000588 +00000-0 +12770-3 0 02853
+2 25791 024.9838 208.7401 0010866 334.2845 025.7120 14.39989069096372
+FUSE 1
+1 25791U 99035A 01112.24808739 .00000697 00000-0 16161-3 0 2506
+2 25791 24.9837 212.5519 0010856 327.7806 32.2065 14.39988758 96282
+FUSE 1
+1 25791U 99035A 01110.86198210 .00000839 00000-0 20609-3 0 2496
+2 25791 24.9833 221.0217 0010828 312.9646 46.9953 14.39987824 96084
+FUSE 1
+1 25791U 99035A 01109.96101490 +.00000640 +00000-0 +14376-3 0 02662
+2 25791 024.9835 226.5270 0010746 303.7230 056.2253 14.39986069095953
+FUSE 1
+1 25791U 99035A 01109.54518505 .00000698 00000-0 16199-3 0 2483
+2 25791 24.9825 229.0749 0010853 299.3689 60.5757 14.39985563 95896
+FUSE 1
+1 25791U 99035A 01108.92143892 +.00000424 +00000-0 +76456-4 0 02689
+2 25791 024.9835 232.8933 0010773 292.5014 067.4341 14.39984084095805
+FUSE 1
+1 25791U 99035A 01108.43630231 .00000475 00000-0 92307-4 0 2479
+2 25791 24.9841 235.8622 0010842 287.1593 72.7725 14.39984197 95731
+FUSE 1
+1 25791U 99035A 01107.25811420 .00000342 00000-0 50688-4 0 2467
+2 25791 24.9840 243.0654 0010850 274.6194 85.3080 14.39982982 95568
+FUSE 1
+1 25791U 99035A 01106.91158787 +.00000319 +00000-0 +43545-4 0 02816
+2 25791 024.9842 245.1833 0010843 270.9361 088.9901 14.39982821095517
+FUSE 1
+1 25791U 99035A 01105.94131510 +.00000457 +00000-0 +86612-4 0 02469
+2 25791 024.9838 251.1154 0010905 261.3015 098.6260 14.39982811095373
+FUSE 1
+1 25791U 99035A 01105.87200985 .00000459 00000-0 87250-4 0 2454
+2 25791 24.9840 251.5393 0010901 260.6320 99.2952 14.39982811 95366
+FUSE 1
+1 25791U 99035A 01104.55520998 .00001008 00000-0 25888-3 0 2445
+2 25791 24.9829 259.5887 0011021 247.1818 112.7523 14.39983372 95172
+FUSE 1
+1 25791U 99035A 01103.51562954 .00001492 00000-0 40988-3 0 2432
+2 25791 24.9842 265.9425 0010869 234.0542 125.8931 14.39984015 95021
+FUSE 1
+1 25791U 99035A 01102.89188107 +.00001731 +00000-0 +48461-3 0 02649
+2 25791 024.9844 269.7554 0011059 227.9140 132.0419 14.39983703094938
+FUSE 1
+1 25791U 99035A 01102.54535407 .00001893 00000-0 53504-3 0 2429
+2 25791 24.9846 271.8734 0010921 223.7407 136.2232 14.39983757 94883
+FUSE 1
+1 25791U 99035A 01101.92160517 +.00002030 +00000-0 +57800-3 0 02647
+2 25791 024.9848 275.6854 0011217 217.6844 142.2874 14.39982801094794
+FUSE 1
+1 25791U 99035A 01101.57507715 .00002190 00000-0 62781-3 0 2419
+2 25791 24.9854 277.8031 0010956 213.3871 146.5941 14.39983161 94741
+FUSE 1
+1 25791U 99035A 01100.88202474 +.00002253 +00000-0 +64777-3 0 02660
+2 25791 024.9853 282.0379 0011053 206.6572 153.3357 14.39981020094643
+FUSE 1
+1 25791U 99035A 01100.18897006 .00002361 00000-0 68129-3 0 2401
+2 25791 24.9852 286.2722 0011029 198.9302 161.0725 14.39979226 94546
+FUSE 1
+1 25791U 99035A 01099.91174907 +.00002395 +00000-0 +69207-3 0 02750
+2 25791 024.9855 287.9660 0011230 196.5404 163.4735 14.39978461094502
+FUSE 1
+1 25791U 99035A 01098.94147224 +.00002530 +00000-0 +73411-3 0 02421
+2 25791 024.9854 293.8958 0011234 186.4584 173.5772 14.39975567094369
+FUSE 1
+1 25791U 99035A 01098.87216662 .00002543 00000-0 73810-3 0 2399
+2 25791 24.9855 294.3194 0011295 185.6074 174.4304 14.39975420 94358
+FUSE 1
+1 25791U 99035A 01097.55535820 .00002756 00000-0 80493-3 0 2383
+2 25791 24.9857 302.3671 0011209 171.5084 188.5605 14.39971661 94162
+FUSE 1
+1 25791U 99035A 01096.51577572 .00001819 00000-0 51232-3 0 2375
+2 25791 24.9851 308.7196 0011060 159.9502 200.1452 14.39962260 94018
+FUSE 1
+1 25791U 99035A 01095.19896006 .00002137 00000-0 61186-3 0 2366
+2 25791 24.9847 316.7677 0011044 146.2105 213.9107 14.39958939 93821
+FUSE 1
+1 25791U 99035A 01094.92173520 +.00002224 +00000-0 +63882-3 0 02749
+2 25791 024.9845 318.4612 0011055 143.4912 216.6355 14.39958128093784
+FUSE 1
+1 25791U 99035A 01093.95144716 +.00002409 +00000-0 +69674-3 0 02410
+2 25791 024.9843 324.3915 0011216 133.1891 226.9554 14.39954609093645
+FUSE 1
+1 25791U 99035A 01093.88214064 .00002499 00000-0 72482-3 0 2359
+2 25791 24.9842 324.8152 0011197 132.3778 227.7676 14.39954543 93635
+FUSE 1
+1 25791U 99035A 01092.91184954 +.00003251 +00000-0 +95975-3 0 02557
+2 25791 024.9837 330.7471 0011246 122.5955 237.5655 14.39950967093498
+FUSE 1
+1 25791U 99035A 01091.17917824 .00003186 00000-0 93968-3 0 2337
+2 25791 24.9835 341.3417 0011318 105.3746 254.8012 14.39939177 93243
+FUSE 1
+1 25791U 99035A 01090.13956723 .00002972 00000-0 87297-3 0 2322
+2 25791 24.9838 347.6958 0011329 94.7440 265.4361 14.39932401 93090
+FUSE 1
+1 25791U 99035A 01088.96133501 +.00002837 +00000-0 +83108-3 0 02339
+2 25791 024.9838 354.9011 0011327 083.2313 276.9488 14.39925595092925
+FUSE 1
+1 25791U 99035A 01088.89202703 .00002815 00000-0 82399-3 0 2317
+2 25791 24.9839 355.3247 0011337 82.5196 277.6602 14.39925159 92915
+FUSE 1
+1 25791U 99035A 01087.92171315 +.00001946 +00000-0 +55260-3 0 02360
+2 25791 024.9847 001.2552 0011205 072.8181 287.3553 14.39918251092772
+FUSE 1
+1 25791U 99035A 01087.85240649 .00001697 00000-0 47485-3 0 2306
+2 25791 24.9849 1.6791 0011193 72.3247 287.8536 14.39917141 92769
+FUSE 1
+1 25791U 99035A 01082.51561712 .00000996 00000-0 25569-3 0 2266
+2 25791 24.9850 34.2906 0010848 15.4515 344.6316 14.39903030 91997
+FUSE 1
+1 25791U 99035A 01081.96114279 +.00000895 +00000-0 +22411-3 0 02357
+2 25791 024.9850 037.6798 0010802 008.8785 351.1917 14.39901631091915
+FUSE 1
+1 25791U 99035A 01081.33735740 .00000887 00000-0 22159-3 0 2259
+2 25791 24.9850 41.4919 0010779 2.2856 357.7699 14.39900735 91826
+FUSE 1
+1 25791U 99035A 01080.92150068 +.00000863 +00000-0 +21388-3 0 02333
+2 25791 024.9849 044.0329 0010784 357.8343 002.2118 14.39899989091763
+FUSE 1
+1 25791U 99035A 01080.22840542 .00000844 00000-0 20810-3 0 2247
+2 25791 24.9848 48.2669 0010801 350.7139 9.3171 14.39898909 91667
+FUSE 1
+1 25791U 99035A 01079.95116702 +.00000849 +00000-0 +20965-3 0 02537
+2 25791 024.9848 049.9618 0010808 347.8135 012.2110 14.39898588091624
+FUSE 1
+1 25791U 99035A 01078.98083194 +.00000863 +00000-0 +21409-3 0 02245
+2 25791 024.9850 055.8907 0010787 337.5934 022.4103 14.39897482091484
+FUSE 1
+1 25791U 99035A 01078.91152241 .00000863 00000-0 21400-3 0 2238
+2 25791 24.9849 56.3142 0010787 336.8603 23.1424 14.39897379 91472
+FUSE 1
+1 25791U 99035A 01077.94118795 +.00000865 +00000-0 +21466-3 0 02296
+2 25791 024.9846 062.2492 0010753 326.7694 033.2147 14.39896112091337
+FUSE 1
+1 25791U 99035A 01077.52532984 .00000862 00000-0 21353-3 0 2225
+2 25791 24.9844 64.7900 0010747 322.4604 37.5154 14.39895491 91270
+FUSE 1
+1 25791U 99035A 01076.48568446 .00000836 00000-0 20539-3 0 2216
+2 25791 24.9842 71.1417 0010785 311.0390 48.9185 14.39893786 91120
+FUSE 1
+1 25791U 99035A 01075.23810913 .00000832 00000-0 20428-3 0 2209
+2 25791 24.9846 78.7649 0010811 297.7413 62.1997 14.39892127 90946
+FUSE 1
+1 25791U 99035A 01073.99053383 +.00000816 +00000-0 +19913-3 0 02209
+2 25791 024.9845 086.3872 0010797 284.5974 075.3336 14.39890279090766
+FUSE 1
+1 25791U 99035A 01073.92122749 .00000816 00000-0 19910-3 0 2190
+2 25791 24.9845 86.8106 0010797 283.8732 76.0753 14.39890190 90757
+FUSE 1
+1 25791U 99035A 01072.88158105 +.00000784 +00000-0 +18923-3 0 02220
+2 25791 024.9830 093.1816 0010740 272.7044 087.2233 14.39888516090601
+FUSE 1
+1 25791U 99035A 01072.53503188 .00000787 00000-0 19030-3 0 2185
+2 25791 24.9830 95.2987 0010757 268.9911 90.9362 14.39888127 90557
+FUSE 1
+1 25791U 99035A 01071.98055429 +.00000763 +00000-0 +18258-3 0 02201
+2 25791 024.9833 098.6880 0010753 263.1759 096.7529 14.39887246090473
+FUSE 1
+1 25791U 99035A 01071.49538471 .00000791 00000-0 19130-3 0 2177
+2 25791 24.9831 101.6522 0010849 257.9268 102.0023 14.39886914 90405
+FUSE 1
+1 25791U 99035A 01070.94090658 +.00000785 +00000-0 +18959-3 0 02469
+2 25791 024.9831 105.0409 0010844 252.1036 107.8288 14.39886182090326
+FUSE 1
+1 25791U 99035A 01070.24780824 .00000809 00000-0 19709-3 0 2161
+2 25791 24.9831 109.2771 0010871 244.6528 115.2853 14.39885565 90220
+FUSE 1
+1 25791U 99035A 01069.20816158 .00000791 00000-0 19153-3 0 2157
+2 25791 24.9832 115.6328 0011054 233.9117 126.0367 14.39884078 90070
+FUSE 1
+1 25791U 99035A 01067.82196489 .00000809 00000-0 19705-3 0 2143
+2 25791 24.9830 124.1033 0011113 218.9869 140.9835 14.39882486 89871
+FUSE 1
+1 25791U 99035A 01066.64369761 +.00000799 +00000-0 +19374-3 0 02169
+2 25791 024.9830 131.3033 0011151 207.0123 152.9803 14.39880895089707
+FUSE 1
+1 25791U 99035A 01066.50507788 .00000796 00000-0 19291-3 0 2139
+2 25791 24.9830 132.1500 0011152 205.5911 154.4046 14.39880702 89684
+FUSE 1
+1 25791U 99035A 01065.88128936 +.00000790 +00000-0 +19103-3 0 02397
+2 25791 024.9831 135.9622 0011122 198.9598 161.0503 14.39879873089593
+FUSE 1
+1 25791U 99035A 01065.18819067 .00000783 00000-0 18885-3 0 2121
+2 25791 24.9834 140.1989 0011152 191.7198 168.3068 14.39878991 89495
+FUSE 1
+1 25791U 99035A 01064.91095089 +.00000771 +00000-0 +18518-3 0 02446
+2 25791 024.9835 141.8928 0011125 188.7032 171.3283 14.39878539089457
+FUSE 1
+1 25791U 99035A 01063.87130138 .00000765 00000-0 18340-3 0 2115
+2 25791 24.9836 148.2465 0011125 177.9406 182.1148 14.39877264 89308
+FUSE 1
+1 25791U 99035A 01063.87130137 +.00000767 +00000-0 +18406-3 0 02120
+2 25791 024.9835 148.2460 0011132 177.9393 182.1166 14.39877276089308
+FUSE 1
+1 25791U 99035A 01062.90096058 +.00000769 +00000-0 +18444-3 0 02210
+2 25791 024.9839 154.1757 0011132 167.8039 192.2735 14.39876200089166
+FUSE 1
+1 25791U 99035A 01062.55441017 .00000773 00000-0 18590-3 0 2105
+2 25791 24.9841 156.2936 0011137 164.3299 195.7558 14.39875851 89113
+FUSE 1
+1 25791U 99035A 01061.30682837 .00000772 00000-0 18556-3 0 2093
+2 25791 24.9841 163.9191 0011157 150.7881 209.3252 14.39874318 88938
+FUSE 1
+1 25791U 99035A 01060.82165726 +.00000760 +00000-0 +18192-3 0 02488
+2 25791 024.9843 166.8839 0011144 145.5272 214.5963 14.39873647088866
+FUSE 1
+1 25791U 99035A 01059.92062424 +.00000739 +00000-0 +17528-3 0 02194
+2 25791 024.9846 172.3899 0011179 135.9727 224.1680 14.39872415088734
+FUSE 1
+1 25791U 99035A 01059.57407284 .00000713 00000-0 16698-3 0 2089
+2 25791 24.9853 174.5090 0011130 132.3934 227.7515 14.39871839 88686
+FUSE 1
+1 25791U 99035A 01058.25717454 .00000711 00000-0 16656-3 0 2077
+2 25791 24.9850 182.5567 0011163 119.2623 240.9005 14.39870406 88495
+FUSE 1
+1 25791U 99035A 01057.91062171 +.00000714 +00000-0 +16747-3 0 02319
+2 25791 024.9852 184.6743 0011160 115.8000 244.3659 14.39870084088444
+FUSE 1
+1 25791U 99035A 01056.87096351 .00000689 00000-0 15951-3 0 2069
+2 25791 24.9851 191.0276 0011173 104.7434 255.4312 14.39868715 88298
+FUSE 1
+1 25791U 99035A 01055.90061376 +.00000679 +00000-0 +15637-3 0 02285
+2 25791 024.9850 196.9579 0011170 094.7617 265.4158 14.39867625088158
+FUSE 1
+1 25791U 99035A 01055.55406001 .00000689 00000-0 15968-3 0 2057
+2 25791 24.9853 199.0771 0011176 91.3496 268.8293 14.39867412 88109
+FUSE 1
+1 25791U 99035A 01054.23715345 .00000689 00000-0 15972-3 0 2049
+2 25791 24.9854 207.1235 0011152 77.7001 282.4754 14.39866067 87917
+FUSE 1
+1 25791U 99035A 01053.89059839 +.00000696 +00000-0 +16187-3 0 02158
+2 25791 024.9856 209.2409 0011136 074.1479 286.0253 14.39865797087864
+FUSE 1
+1 25791U 99035A 01052.92024384 +.00000702 +00000-0 +16372-3 0 02040
+2 25791 024.9854 215.1686 0011139 064.1094 296.0556 14.39864826087724
+FUSE 1
+1 25791U 99035A 01052.85093275 .00000705 00000-0 16455-3 0 2031
+2 25791 24.9853 215.5920 0011131 63.4459 296.7188 14.39864778 87710
+FUSE 1
+1 25791U 99035A 01051.88057587 +.00000742 +00000-0 +17626-3 0 02031
+2 25791 024.9846 221.5212 0010994 053.4019 306.7497 14.39864094087570
+FUSE 1
+1 25791U 99035A 01049.17743500 .00000805 00000-0 19598-3 0 2004
+2 25791 24.9852 238.0376 0010943 24.9759 335.1274 14.39861598 87181
+FUSE 1
+1 25791U 99035A 01048.13776370 .00000818 00000-0 20021-3 0 1994
+2 25791 24.9855 244.3897 0010946 14.2126 345.8687 14.39860443 87033
+FUSE 1
+1 25791U 99035A 01046.95946808 +.00000826 +00000-0 +20265-3 0 02009
+2 25791 024.9856 251.5883 0010925 001.7292 358.3251 14.39859035086862
+FUSE 1
+1 25791U 99035A 01046.89015657 .00000828 00000-0 20328-3 0 1989
+2 25791 24.9856 252.0117 0010921 1.0228 359.0304 14.39858972 86851
+FUSE 1
+1 25791U 99035A 01045.91979473 +.00000825 +00000-0 +20234-3 0 02104
+2 25791 024.9857 257.9395 0010895 350.7865 009.2444 14.39857693086718
+FUSE 1
+1 25791U 99035A 01045.57323730 .00000822 00000-0 20128-3 0 1978
+2 25791 24.9855 260.0575 0010891 347.1542 12.8705 14.39857185 86669
+FUSE 1
+1 25791U 99035A 01044.32563210 .00000852 00000-0 21070-3 0 1968
+2 25791 24.9845 267.6885 0010940 335.0275 24.9843 14.39855877 86482
+FUSE 1
+1 25791U 99035A 01043.90976161 +.00000818 +00000-0 +19993-3 0 02047
+2 25791 024.9856 270.2365 0010879 331.1039 028.8868 14.39855093086427
+FUSE 1
+1 25791U 99035A 01043.21664491 .00000820 00000-0 20056-3 0 1955
+2 25791 24.9857 274.4720 0010879 323.9471 36.0302 14.39854225 86327
+FUSE 1
+1 25791U 99035A 01042.93939835 +.00000809 +00000-0 +19728-3 0 02345
+2 25791 024.9860 276.1661 0010879 321.0294 038.9430 14.39853798086288
+FUSE 1
+1 25791U 99035A 01041.89972384 .00000762 00000-0 18265-3 0 1943
+2 25791 24.9864 282.5199 0010886 310.1836 49.7717 14.39852068 86139
+FUSE 1
+1 25791U 99035A 01040.86004627 .00000786 00000-0 18998-3 0 1933
+2 25791 24.9864 288.8712 0010909 298.1189 61.8216 14.39851115 85984
+FUSE 1
+1 25791U 99035A 01039.88968203 +.00000776 +00000-0 +18695-3 0 01946
+2 25791 024.9866 294.8003 0010918 287.8124 072.1191 14.39849851085846
+FUSE 1
+1 25791U 99035A 01039.54312320 .00000778 00000-0 18759-3 0 1923
+2 25791 24.9865 296.9171 0010912 284.1925 75.7371 14.39849453 85798
+FUSE 1
+1 25791U 99035A 01038.91931566 +.00000841 +00000-0 +20715-3 0 01973
+2 25791 024.9853 300.7300 0011058 276.2116 083.7128 14.39849226085707
+FUSE 1
+1 25791U 99035A 01038.36482175 .00000851 00000-0 21041-3 0 1917
+2 25791 24.9852 304.1176 0011034 270.4549 89.4688 14.39848568 85628
+FUSE 1
+1 25791U 99035A 01037.94895133 +.00000854 +00000-0 +21128-3 0 02024
+2 25791 024.9850 306.6578 0011082 266.4454 093.4786 14.39848015085566
+FUSE 1
+1 25791U 99035A 01037.18652191 .00000871 00000-0 21669-3 0 1900
+2 25791 24.9854 311.3163 0011114 258.2637 101.6623 14.39847183 85456
+FUSE 1
+1 25791U 99035A 01035.93891068 +.00000893 +00000-0 +22356-3 0 01974
+2 25791 024.9856 318.9409 0011155 245.1344 114.8003 14.39845662085277
+FUSE 1
+1 25791U 99035A 01035.86959892 .00000895 00000-0 22415-3 0 1895
+2 25791 24.9856 319.3643 0011153 244.4229 115.5125 14.39845576 85260
+FUSE 1
+1 25791U 99035A 01034.96854630 +.00000904 +00000-0 +22698-3 0 02030
+2 25791 024.9856 324.8713 0011214 234.8399 125.1056 14.39844383085139
+FUSE 1
+1 25791U 99035A 01034.48336452 .00000891 00000-0 22284-3 0 1882
+2 25791 24.9853 327.8353 0011183 229.6286 130.3245 14.39843518 85060
+FUSE 1
+1 25791U 99035A 01033.23575272 .00000882 00000-0 22011-3 0 1876
+2 25791 24.9856 335.4581 0011214 216.6240 143.3500 14.39841675 84881
+FUSE 1
+1 25791U 99035A 01031.91882870 .00000844 00000-0 20813-3 0 1869
+2 25791 24.9858 343.5045 0011276 203.2127 156.7872 14.39839469 84699
+FUSE 1
+1 25791U 99035A 01031.91882869 +.00000845 +00000-0 +20836-3 0 01874
+2 25791 024.9858 343.5045 0011276 203.2090 156.7909 14.39839478084699
+FUSE 1
+1 25791U 99035A 01030.94846209 +.00000841 +00000-0 +20712-3 0 01918
+2 25791 024.9858 349.4319 0011289 193.2674 166.7539 14.39838132084559
+FUSE 1
+1 25791U 99035A 01030.46327849 .00000841 00000-0 20740-3 0 1853
+2 25791 24.9859 352.3959 0011304 188.2132 171.8192 14.39837508 84484
+FUSE 1
+1 25791U 99035A 01029.97809487 +.00000835 +00000-0 +20546-3 0 01981
+2 25791 024.9857 355.3599 0011303 183.2284 176.8152 14.39836776084417
+FUSE 1
+1 25791U 99035A 01029.21566280 .00000836 00000-0 20576-3 0 1848
+2 25791 24.9858 0.0180 0011350 175.3074 184.7541 14.39835807 84301
+FUSE 1
+1 25791U 99035A 01028.93841499 +.00000830 +00000-0 +20392-3 0 02294
+2 25791 024.9857 001.7120 0011345 172.4854 187.5833 14.39835361084265
+FUSE 1
+1 25791U 99035A 01027.96804596 +.00000821 +00000-0 +20111-3 0 01864
+2 25791 024.9857 007.6404 0011373 162.4249 197.6654 14.39833987084123
+FUSE 1
+1 25791U 99035A 01026.85905350 .00000774 00000-0 18631-3 0 1828
+2 25791 24.9845 14.4272 0011225 151.2576 208.8553 14.39832070 83960
+FUSE 1
+1 25791U 99035A 01025.95799395 +.00000773 +00000-0 +18616-3 0 01909
+2 25791 024.9845 019.9320 0011218 141.9876 218.1434 14.39830995083837
+FUSE 1
+1 25791U 99035A 01025.47280699 .00000781 00000-0 18854-3 0 1811
+2 25791 24.9846 22.8964 0011235 137.2317 222.9063 14.39830514 83762
+FUSE 1
+1 25791U 99035A 01024.91830785 +.00000785 +00000-0 +18987-3 0 01952
+2 25791 024.9848 026.2846 0011214 131.5244 228.6226 14.39829899083683
+FUSE 1
+1 25791U 99035A 01024.22518426 .00000758 00000-0 18147-3 0 1803
+2 25791 24.9850 30.5196 0011218 123.7953 236.3624 14.39828802 83586
+FUSE 1
+1 25791U 99035A 01022.97755790 +.00000765 +00000-0 +18342-3 0 01805
+2 25791 024.9847 038.1420 0011197 110.9464 249.2242 14.39827391083409
+FUSE 1
+1 25791U 99035A 01022.90824523 .00000765 00000-0 18346-3 0 1791
+2 25791 24.9847 38.5654 0011197 110.2109 249.9602 14.39827310 83397
+FUSE 1
+1 25791U 99035A 01021.93786714 +.00000792 +00000-0 +19214-3 0 01821
+2 25791 024.9847 044.4944 0011176 100.2360 259.9412 14.39826436083253
+FUSE 1
+1 25791U 99035A 01021.52199043 .00000791 00000-0 19188-3 0 1783
+2 25791 24.9847 47.0345 0011184 95.8875 264.2905 14.39825918 83199
+FUSE 1
+1 25791U 99035A 01020.48229781 .00000782 00000-0 18904-3 0 1774
+2 25791 24.9841 53.3876 0011058 84.9507 275.2262 14.39824524 83047
+FUSE 1
+1 25791U 99035A 01019.23466394 .00000810 00000-0 19778-3 0 1769
+2 25791 24.9842 61.0115 0011055 71.9716 288.1993 14.39823278 82863
+FUSE 1
+1 25791U 99035A 01018.81878536 +.00000815 +00000-0 +19923-3 0 02046
+2 25791 024.9840 063.5519 0011051 067.5973 292.5699 14.39822788082809
+FUSE 1
+1 25791U 99035A 01017.84840102 .00000828 00000-0 20329-3 0 1759
+2 25791 24.9838 69.4799 0011044 57.4205 302.7356 14.39821674 82660
+FUSE 1
+1 25791U 99035A 01016.80870221 +.00000844 +00000-0 +20844-3 0 01759
+2 25791 024.9839 075.8311 0011035 046.6049 313.5376 14.39820510082512
+FUSE 1
+1 25791U 99035A 01012.85783892 .00000765 00000-0 18364-3 0 1719
+2 25791 24.9824 99.9904 0011095 5.3964 354.6663 14.39814661 81946
+FUSE 1
+1 25791U 99035A 01011.81813392 .00000754 00000-0 18014-3 0 1702
+2 25791 24.9823 106.3421 0011120 354.5641 5.4745 14.39813318 81795
+FUSE 1
+1 25791U 99035A 01010.84774202 +.00000728 +00000-0 +17200-3 0 01820
+2 25791 024.9826 112.2708 0011146 344.3870 015.6294 14.39811988081659
+FUSE 1
+1 25791U 99035A 01010.57048690 .00000725 00000-0 17100-3 0 1696
+2 25791 24.9825 113.9647 0011158 341.3954 18.6145 14.39811641 81611
+FUSE 1
+1 25791U 99035A 01009.87734870 +.00000732 +00000-0 +17321-3 0 02008
+2 25791 024.9824 118.1992 0011164 334.0178 025.9768 14.39810940081516
+FUSE 1
+1 25791U 99035A 01006.55028272 .00000853 00000-0 21119-3 0 1667
+2 25791 24.9829 138.5275 0011161 298.7980 61.1405 14.39808266 81030
+FUSE 1
+1 25791U 99035A 01005.23331831 .00000949 00000-0 24121-3 0 1650
+2 25791 24.9829 146.5736 0011130 284.7867 75.1402 14.39807380 80842
+FUSE 1
+1 25791U 99035A 01004.95606288 +.00000961 +00000-0 +24508-3 0 01933
+2 25791 024.9830 148.2673 0011129 281.7309 078.1948 14.39807093080804
+FUSE 1
+1 25791U 99035A 01004.12429643 .00001014 00000-0 26161-3 0 1645
+2 25791 24.9831 153.3490 0011081 272.9218 87.0015 14.39806304 80681
+FUSE 1
+1 25791U 99035A 01003.91635493 +.00001024 +00000-0 +26479-3 0 02041
+2 25791 024.9833 154.6194 0011082 270.5710 089.3526 14.39806079080658
+FUSE 1
+1 25791U 99035A 01002.94596086 +.00001080 +00000-0 +28217-3 0 01657
+2 25791 024.9835 160.5480 0011065 260.2028 099.7226 14.39805000080513
+FUSE 1
+1 25791U 99035A 01002.87664699 .00001085 00000-0 28401-3 0 1633
+2 25791 24.9835 160.9715 0011055 259.4691 100.4567 14.39804944 80506
+FUSE 1
+1 25791U 99035A 01001.90625279 +.00001148 +00000-0 +30354-3 0 01851
+2 25791 024.9836 166.9004 0011074 249.1527 110.7793 14.39803819080368
+FUSE 1
+1 25791U 99035A 01001.55968328 .00001172 00000-0 31103-3 0 1622
+2 25791 24.9835 169.0177 0011071 245.6535 114.2814 14.39803412 80316
+FUSE 1
+1 25791U 99035A 00366.24272051 .00001201 00000-0 32013-3 0 1615
+2 25791 24.9835 177.0632 0011054 231.9139 128.0369 14.39801117 80127
+FUSE 1
+1 25791U 99035A 00365.13370179 .00001276 00000-0 34372-3 0 1603
+2 25791 24.9782 183.8601 0011264 220.6704 139.2961 14.39798988 79968
+FUSE 1
+1 25791U 99035A 00363.88605187 .00001279 00000-0 34462-3 0 1594
+2 25791 24.9781 191.4825 0011236 207.4675 152.5240 14.39796242 79788
+FUSE 1
+1 25791U 99035A 00362.91565615 +.00001282 +00000-0 +34567-3 0 01880
+2 25791 024.9781 197.4116 0011250 197.2959 162.7167 14.39794117079649
+FUSE 1
+1 25791U 99035A 00361.52937650 .00001173 00000-0 31161-3 0 1570
+2 25791 24.9788 205.8833 0011253 183.0025 177.0420 14.39790123 79448
+FUSE 1
+1 25791U 99035A 00360.21240650 .00001095 00000-0 28697-3 0 1564
+2 25791 24.9795 213.9300 0011256 169.4207 190.6539 14.39786866 79258
+FUSE 1
+1 25791U 99035A 00358.89543401 .00000997 00000-0 25633-3 0 1551
+2 25791 24.9802 221.9784 0011166 156.0199 204.0842 14.39783673 79063
+FUSE 1
+1 25791U 99035A 00357.57846016 .00000809 00000-0 19747-3 0 1543
+2 25791 24.9811 230.0287 0011220 142.5559 217.5744 14.39779898 78875
+FUSE 1
+1 25791U 99035A 00356.33079409 .00000742 00000-0 17656-3 0 1532
+2 25791 24.9815 237.6510 0011207 129.3758 230.7742 14.39777765 78696
+FUSE 1
+1 25791U 99035A 00355.91490500 +.00000715 +00000-0 +16811-3 0 01738
+2 25791 024.9818 240.1930 0011125 125.1559 234.9994 14.39777043078634
+FUSE 1
+1 25791U 99035A 00355.22175552 .00000689 00000-0 15980-3 0 1522
+2 25791 24.9818 244.4279 0011116 117.9072 242.2571 14.39776049 78533
+FUSE 1
+1 25791U 99035A 00354.94449551 +.00000671 +00000-0 +15421-3 0 01715
+2 25791 024.9820 246.1228 0011092 115.1399 245.0262 14.39775609078498
+FUSE 1
+1 25791U 99035A 00354.18203097 .00000667 00000-0 15302-3 0 1515
+2 25791 24.9821 250.7805 0011090 107.2769 252.9059 14.39774846 78383
+FUSE 1
+1 25791U 99035A 00353.14230184 .00000588 00000-0 12827-3 0 1507
+2 25791 24.9841 257.1312 0011153 94.7945 265.3836 14.39773357 78236
+FUSE 1
+1 25791U 99035A 00351.89462457 .00000618 00000-0 13768-3 0 1494
+2 25791 24.9843 264.7546 0011143 81.4463 278.7305 14.39772637 78057
+FUSE 1
+1 25791U 99035A 00350.57762798 .00000713 00000-0 16757-3 0 1485
+2 25791 24.9838 272.8003 0011117 67.5108 292.6555 14.39772305 77863
+FUSE 1
+1 25791U 99035A 00349.95378601 +.00000801 +00000-0 +19521-3 0 01751
+2 25791 024.9839 276.6107 0011037 061.1524 299.0082 14.39772533077773
+FUSE 1
+1 25791U 99035A 00348.91404926 +.00000938 +00000-0 +23822-3 0 01543
+2 25791 024.9841 282.9613 0011060 050.5076 309.6402 14.39772572077629
+FUSE 1
+1 25791U 99035A 00348.22089271 .00000955 00000-0 24346-3 0 1472
+2 25791 24.9841 287.1948 0011058 43.2638 316.8736 14.39771669 77522
+FUSE 1
+1 25791U 99035A 00347.94362883 +.00001009 +00000-0 +26044-3 0 01831
+2 25791 024.9842 288.8885 0011102 040.6503 319.4819 14.39771783077486
+FUSE 1
+1 25791U 99035A 00344.20056550 .00001466 00000-0 40388-3 0 1450
+2 25791 24.9857 311.7525 0010921 1.7998 358.2548 14.39768887 76944
+FUSE 1
+1 25791U 99035A 00342.95287422 +.00001623 +00000-0 +45287-3 0 02453
+2 25791 024.9861 319.3741 0010868 348.9036 011.1207 14.39767344076766
+FUSE 1
+1 25791U 99035A 00341.91313263 +.00001697 +00000-0 +47635-3 0 02169
+2 25791 024.9862 325.7251 0010827 338.0727 021.9314 14.39765205076612
+FUSE 1
+1 25791U 99035A 00340.80407309 +.00001773 +00000-0 +50001-3 0 01795
+2 25791 024.9865 332.4995 0010780 326.3093 033.6722 14.39762765076452
+FUSE 1
+1 25791U 99035A 00339.97228129 +.00001440 +00000-0 +39551-3 0 01453
+2 25791 024.9788 337.5913 0010715 317.2047 042.7636 14.39758312076333
+FUSE 1
+1 25791U 99035A 00339.90296490 .00001431 00000-0 39277-3 0 1446
+2 25791 24.9788 338.0153 0010711 316.5102 43.4556 14.39758072 76326
+FUSE 1
+1 25791U 99035A 00338.93253567 +.00001650 +00000-0 +46156-3 0 01892
+2 25791 024.9780 343.9450 0010727 305.4403 054.5107 14.39756594076187
+FUSE 1
+1 25791U 99035A 00337.89278976 +.00002012 +00000-0 +57514-3 0 01474
+2 25791 024.9771 350.3001 0010560 294.2116 065.7285 14.39754923076031
+FUSE 1
+1 25791U 99035A 00337.54620726 .00002120 00000-0 60886-3 0 1432
+2 25791 24.9769 352.4170 0010591 290.1130 69.8236 14.39754084 75985
+FUSE 1
+1 25791U 99035A 00336.78372846 +.00002078 +00000-0 +59583-3 0 02103
+2 25791 024.9767 357.0797 0010598 283.2388 076.6938 14.39750755075878
+FUSE 1
+1 25791U 99035A 00335.81329748 +.00001963 +00000-0 +55983-3 0 01784
+2 25791 024.9768 003.0088 0010682 272.4500 087.4788 14.39746543075738
+FUSE 1
+1 25791U 99035A 00332.55541084 .00001441 00000-0 39598-3 0 1416
+2 25791 24.9789 22.9137 0010823 238.8335 121.1112 14.39732709 75269
+FUSE 1
+1 25791U 99035A 00329.50545449 .00001099 00000-0 28863-3 0 1407
+2 25791 24.9807 41.5484 0010919 206.6216 153.3741 14.39723397 74828
+FUSE 1
+1 25791U 99035A 00326.80207218 .00000755 00000-0 18065-3 0 1395
+2 25791 24.9826 58.0674 0010967 178.4838 181.5705 14.39716699 74439
+FUSE 1
+1 25791U 99035A 00325.90094187 +.00000678 +00000-0 +15666-3 0 02663
+2 25791 024.9830 063.5734 0010889 169.1263 190.9481 14.39715100074301
+FUSE 1
+1 25791U 99035A 00324.86117451 +.00000608 +00000-0 +13450-3 0 02311
+2 25791 024.9833 069.9269 0010882 158.3926 201.7040 14.39713575074155
+FUSE 1
+1 25791U 99035A 00323.96004177 +.00000488 +00000-0 +96967-4 0 01894
+2 25791 024.9842 075.4361 0010837 150.2956 209.8168 14.39712104074027
+FUSE 1
+1 25791U 99035A 00322.92027010 +.00000542 +00000-0 +11394-3 0 01510
+2 25791 024.9842 081.7899 0010800 140.3373 219.7924 14.39711850073875
+FUSE 1
+1 25791U 99035A 00322.57367987 .00000544 00000-0 11471-3 0 1384
+2 25791 24.9842 83.9087 0010770 137.0085 223.1269 14.39711602 73828
+FUSE 1
+1 25791U 99035A 00321.88049734 +.00000639 +00000-0 +14444-3 0 02068
+2 25791 024.9838 088.1431 0010747 130.4414 229.7025 14.39711664073729
+FUSE 1
+1 25791U 99035A 00319.45435949 .00001051 00000-0 27399-3 0 1370
+2 25791 24.9822 102.9641 0011109 102.6166 257.5577 14.39710812 73374
+FUSE 1
+1 25791U 99035A 00318.83049407 +.00001135 +00000-0 +30023-3 0 02126
+2 25791 024.9820 106.7751 0011100 096.2751 263.9015 14.39710072073281
+FUSE 1
+1 25791U 99035A 00317.92935383 +.00001328 +00000-0 +36094-3 0 01927
+2 25791 024.9815 112.2808 0011081 086.9676 273.2095 14.39708951073151
+FUSE 1
+1 25791U 99035A 00316.95889405 +.00001476 +00000-0 +40722-3 0 01547
+2 25791 024.9811 118.2117 0011162 076.8388 283.3367 14.39707302073012
+FUSE 1
+1 25791U 99035A 00316.54298192 .00001536 00000-0 42622-3 0 1367
+2 25791 24.9808 120.7548 0011167 72.5609 287.6119 14.39706598 72958
+FUSE 1
+1 25791U 99035A 00312.17588299 .00001526 00000-0 42309-3 0 1352
+2 25791 24.9810 147.4346 0011047 26.6311 333.4765 14.39694429 72327
+FUSE 1
+1 25791U 99035A 00311.89860506 +.00001531 +00000-0 +42464-3 0 02432
+2 25791 024.9811 149.1285 0011021 023.7582 336.3433 14.39693742072285
+FUSE 1
+1 25791U 99035A 00310.92813172 +.00001533 +00000-0 +42529-3 0 02234
+2 25791 024.9811 155.0570 0011011 013.6669 346.4135 14.39691108072141
+FUSE 1
+1 25791U 99035A 00309.95765612 +.00001545 +00000-0 +42918-3 0 01953
+2 25791 024.9811 160.9853 0010987 003.5007 356.5574 14.39688573072001
+FUSE 1
+1 25791U 99035A 00308.91785913 +.00001558 +00000-0 +43320-3 0 01631
+2 25791 024.9811 167.3377 0010936 352.6420 007.3927 14.39685825071856
+FUSE 1
+1 25791U 99035A 00307.94738084 .00001523 00000-0 42238-3 0 1347
+2 25791 24.9813 173.2666 0010902 342.2944 17.7187 14.39682876 71715
+FUSE 1
+1 25791U 99035A 00306.90758062 +.00001494 +00000-0 +41322-3 0 02161
+2 25791 024.9816 179.6189 0010843 331.2370 028.7545 14.39679852071566
+FUSE 1
+1 25791U 99035A 00305.93709941 +.00001422 +00000-0 +39070-3 0 01847
+2 25791 024.9820 185.5476 0010836 320.8016 039.1721 14.39676778071420
+FUSE 1
+1 25791U 99035A 00304.96661633 +.00001342 +00000-0 +36540-3 0 01518
+2 25791 024.9825 191.4771 0010878 310.3487 049.6069 14.39673761071285
+FUSE 1
+1 25791U 99035A 00304.48137472 .00001294 00000-0 35039-3 0 1332
+2 25791 24.9827 194.4415 0010840 305.2721 54.6774 14.39672228 71217
+FUSE 1
+1 25791U 99035A 00300.94603167 +.00001128 +00000-0 +29826-3 0 01487
+2 25791 024.9836 216.0428 0010846 267.5163 092.4104 14.39663463070709
+FUSE 1
+1 25791U 99035A 00300.32214586 .00001125 00000-0 29742-3 0 1329
+2 25791 24.9837 219.8536 0010864 260.8686 99.0595 14.39662271 70610
+FUSE 1
+1 25791U 99035A 00299.97554307 +.00001099 +00000-0 +28908-3 0 02622
+2 25791 024.9840 221.9723 0010883 257.3195 102.6096 14.39661414070562
+FUSE 1
+1 25791U 99035A 00298.93573357 +.00001095 +00000-0 +28804-3 0 02219
+2 25791 024.9842 228.3263 0010808 246.2256 113.7131 14.39659498070412
+FUSE 1
+1 25791U 99035A 00297.96524296 +.00001101 +00000-0 +28980-3 0 01840
+2 25791 024.9843 234.2549 0010819 235.8887 124.0592 14.39657800070277
+FUSE 1
+1 25791U 99035A 00296.92543051 +.00001198 +00000-0 +32020-3 0 01469
+2 25791 024.9839 240.6071 0010755 225.0055 134.9574 14.39656593070122
+FUSE 1
+1 25791U 99035A 00296.23222249 .00001231 00000-0 33056-3 0 1318
+2 25791 24.9837 244.8414 0010747 217.7619 142.2134 14.39655396 70025
+FUSE 1
+1 25791U 99035A 00295.95493830 +.00001341 +00000-0 +36537-3 0 02570
+2 25791 024.9831 246.5364 0010694 214.7072 145.2732 14.39655631069985
+FUSE 1
+1 25791U 99035A 00294.98444509 +.00001216 +00000-0 +32610-3 0 02121
+2 25791 024.9831 252.4518 0011171 205.6776 154.3176 14.39652293069842
+FUSE 1
+1 25791U 99035A 00292.97413670 .00001233 00000-0 33120-3 0 1465
+2 25791 24.9832 264.7305 0011154 184.3003 175.7409 14.39648196 69551
+FUSE 1
+1 25791U 99035A 00292.21160463 .00001227 00000-0 32957-3 0 1304
+2 25791 24.9833 269.3878 0011141 176.2888 183.7705 14.39646543 69445
+FUSE 1
+1 25791U 99035A 00290.96382404 .00001125 00000-0 29744-3 0 2033
+2 25791 24.9839 277.0093 0011248 162.9629 197.1281 14.39643362 69263
+FUSE 1
+1 25791U 99035A 00289.92400452 .00001005 00000-0 25962-3 0 1697
+2 25791 24.9842 283.3623 0011271 152.1446 207.9673 14.39640561 69117
+FUSE 1
+1 25791U 99035A 00288.88418235 .00000939 00000-0 23889-3 0 1296
+2 25791 24.9839 289.7161 0011345 141.9406 218.1903 14.39638291 68963
+FUSE 1
+1 25791U 99035A 00286.94317390 .00000937 00000-0 23849-3 0 2050
+2 25791 24.9842 301.5720 0011377 121.8967 238.2636 14.39635355 68688
+FUSE 1
+1 25791U 99035A 00284.93283722 .00000946 00000-0 24124-3 0 1290
+2 25791 24.9844 313.8517 0011349 101.4953 258.6830 14.39632282 68394
+FUSE 1
+1 25791U 99035A 00283.82368229 .00001113 00000-0 29370-3 0 2356
+2 25791 24.9845 320.6276 0011360 90.5778 269.6031 14.39631230 68239
+FUSE 1
+1 25791U 99035A 00281.18943126 .00001671 00000-0 46933-3 0 1271
+2 25791 24.9838 336.7203 0011242 63.6820 296.4846 14.39626315 67854
+FUSE 1
+1 25791U 99035A 00279.87230155 .00001498 00000-0 41495-3 0 1843
+2 25791 24.9836 344.7657 0011284 49.9927 310.1569 14.39621506 67667
+FUSE 1
+1 25791U 99035A 00278.13922732 .00001349 00000-0 36829-3 0 1266
+2 25791 24.9841 355.3497 0011217 31.6026 328.5162 14.39615977 67417
+FUSE 1
+1 25791U 99035A 00275.92088045 +.00001249 +00000-0 +33679-3 0 02260
+2 25791 024.9846 008.8984 0011149 008.1796 351.8898 14.39610187067097
+FUSE 1
+1 25791U 99035A 00274.88102724 +.00001183 +00000-0 +31605-3 0 01932
+2 25791 024.9847 015.2496 0011092 357.4607 002.5840 14.39607485066943
+FUSE 1
+1 25791U 99035A 00273.91049603 +.00001143 +00000-0 +30335-3 0 01587
+2 25791 024.9849 021.1778 0011061 347.4078 012.6154 14.39605252066806
+FUSE 1
+1 25791U 99035A 00272.87063947 .00001058 00000-0 27682-3 0 1258
+2 25791 24.9850 27.5285 0010951 336.1587 23.8412 14.39602697 66652
+FUSE 1
+1 25791U 99035A 00271.90010587 +.00000952 +00000-0 +24332-3 0 02019
+2 25791 024.9849 033.4553 0010904 326.2752 033.7061 14.39600291066519
+FUSE 1
+1 25791U 99035A 00270.86024700 +.00000806 +00000-0 +19727-3 0 01755
+2 25791 024.9848 039.8050 0010873 315.4400 044.5233 14.39597817066368
+FUSE 1
+1 25791U 99035A 00269.95903493 +.00000698 +00000-0 +16343-3 0 01422
+2 25791 024.9847 045.3098 0010847 305.7600 054.1897 14.39596109066238
+FUSE 1
+1 25791U 99035A 00269.19647060 .00000662 00000-0 15206-3 0 1241
+2 25791 24.9847 49.9681 0010790 297.8206 62.1208 14.39595085 66121
+FUSE 1
+1 25791U 99035A 00265.93823791 +.00000839 +00000-0 +20769-3 0 01602
+2 25791 024.9853 069.8642 0010925 262.8653 097.0612 14.39592139065654
+FUSE 1
+1 25791U 99035A 00264.89837713 .00000866 00000-0 21632-3 0 1234
+2 25791 24.9853 76.2157 0010914 251.7893 108.1424 14.39590766 65501
+FUSE 1
+1 25791U 99035A 00263.85851584 +.00000759 +00000-0 +18267-3 0 02468
+2 25791 024.9844 082.5656 0011036 240.7792 119.1611 14.39588783065356
+FUSE 1
+1 25791U 99035A 00262.95730211 +.00000987 +00000-0 +25418-3 0 02190
+2 25791 024.9843 088.0698 0011108 231.2492 128.7025 14.39588229065220
+FUSE 1
+1 25791U 99035A 00261.91744362 +.00000854 +00000-0 +21237-3 0 01903
+2 25791 024.9840 094.4417 0011199 219.5461 140.4230 14.39586929065079
+FUSE 1
+1 25791U 99035A 00260.94690555 +.00000874 +00000-0 +21887-3 0 01496
+2 25791 024.9839 100.3694 0011196 209.3232 150.6648 14.39585857064930
+FUSE 1
+1 25791U 99035A 00260.60028428 .00000895 00000-0 22526-3 0 1228
+2 25791 24.9838 102.4866 0011182 205.8154 154.1794 14.39585645 64882
+FUSE 1
+1 25791U 99035A 00257.89664249 +.00000980 +00000-0 +25207-3 0 01574
+2 25791 024.9797 119.0147 0011228 178.5341 181.5202 14.39582285064499
+FUSE 1
+1 25791U 99035A 00256.92610205 +.00001007 +00000-0 +26048-3 0 01317
+2 25791 024.9796 124.9428 0011260 168.6067 191.4699 14.39580956064354
+FUSE 1
+1 25791U 99035A 00256.57948045 .00001009 00000-0 26113-3 0 1218
+2 25791 24.9796 127.0600 0011258 164.9452 195.1394 14.39580392 64306
+FUSE 1
+1 25791U 99035A 00255.95556083 +.00001022 +00000-0 +26540-3 0 02272
+2 25791 024.9796 130.8705 0011304 158.5484 201.5503 14.39579482064212
+FUSE 1
+1 25791U 99035A 00254.91569423 +.00001012 +00000-0 +26236-3 0 01998
+2 25791 024.9795 137.2214 0011318 147.7697 212.3506 14.39577628064064
+FUSE 1
+1 25791U 99035A 00253.94515052 +.00000993 +00000-0 +25614-3 0 01704
+2 25791 024.9796 143.1491 0011353 137.8454 222.2931 14.39575858063927
+FUSE 1
+1 25791U 99035A 00252.90528132 +.00000931 +00000-0 +23692-3 0 01337
+2 25791 024.9802 149.5025 0011353 127.3223 232.8322 14.39573664063773
+FUSE 1
+1 25791U 99035A 00252.21203297 .00000929 00000-0 23624-3 0 1201
+2 25791 24.9802 153.7367 0011354 120.2792 239.8836 14.39572606 63674
+FUSE 1
+1 25791U 99035A 00250.96418540 +.00000820 +00000-0 +20171-3 0 02317
+2 25791 024.9813 161.3571 0011231 106.6703 253.5039 14.39569924063499
+FUSE 1
+1 25791U 99035A 00249.92430983 +.00000751 +00000-0 +18005-3 0 01973
+2 25791 024.9819 167.7098 0011202 095.9335 264.2451 14.39568010063344
+FUSE 1
+1 25791U 99035A 00248.95375648 +.00000728 +00000-0 +17305-3 0 01641
+2 25791 024.9822 173.6380 0011200 085.7277 274.4508 14.39566715063209
+FUSE 1
+1 25791U 99035A 00247.98320188 +.00000685 +00000-0 +15936-3 0 01204
+2 25791 024.9827 179.5664 0011177 075.4057 284.7689 14.39565289063062
+FUSE 1
+1 25791U 99035A 00247.91387641 .00000685 00000-0 15938-3 0 1194
+2 25791 24.9827 179.9897 0011176 74.6798 285.4945 14.39565219 63051
+FUSE 1
+1 25791U 99035A 00243.89298918 +.00000627 +00000-0 +14121-3 0 01217
+2 25791 024.9838 204.5495 0011279 032.6718 327.4493 14.39560964062474
+FUSE 1
+1 25791U 99035A 00243.54635985 .00000620 00000-0 13900-3 0 1181
+2 25791 24.9838 206.6661 0011299 29.0913 331.0222 14.39560578 62428
+FUSE 1
+1 25791U 99035A 00242.92242652 +.00000636 +00000-0 +14397-3 0 02524
+2 25791 024.9839 210.4766 0011308 022.5635 337.5375 14.39560193062331
+FUSE 1
+1 25791U 99035A 00241.95186248 +.00000663 +00000-0 +15237-3 0 02180
+2 25791 024.9839 216.4045 0011240 012.3907 347.6875 14.39559570062199
+FUSE 1
+1 25791U 99035A 00241.11995000 +.00000705 +00000-0 +16585-3 0 01905
+2 25791 024.9843 221.4849 0011230 004.1902 355.8697 14.39559225062072
+FUSE 1
+1 25791U 99035A 00240.14938556 +.00000715 +00000-0 +16878-3 0 01535
+2 25791 024.9843 227.4129 0011265 353.6646 006.3718 14.39558267061935
+FUSE 1
+1 25791U 99035A 00239.24814579 .00000768 00000-0 18562-3 0 1172
+2 25791 24.9851 232.9197 0011057 343.6898 16.3253 14.39557918 61800
+FUSE 1
+1 25791U 99035A 00237.16836108 +.00000937 +00000-0 +23867-3 0 01265
+2 25791 024.9852 245.6242 0010930 321.1150 038.8565 14.39556840061509
+FUSE 1
+1 25791U 99035A 00236.47509969 .00000981 00000-0 25253-3 0 1169
+2 25791 24.9852 249.8576 0010910 313.5211 46.4389 14.39556202 61406
+FUSE 1
+1 25791U 99035A 00236.12846894 +.00001006 +00000-0 +26041-3 0 02540
+2 25791 024.9853 251.9740 0010908 310.0331 049.9215 14.39555895061353
+FUSE 1
+1 25791U 99035A 00234.18733724 +.00001106 +00000-0 +29194-3 0 01914
+2 25791 024.9856 263.8291 0010929 289.3257 070.6065 14.39553537061071
+FUSE 1
+1 25791U 99035A 00233.97935917 +.00001108 +00000-0 +29254-3 0 01827
+2 25791 024.9855 265.0992 0010925 287.2111 072.7202 14.39553153061041
+FUSE 1
+1 25791U 99035A 00232.93946679 +.00001150 +00000-0 +30606-3 0 01414
+2 25791 024.9859 271.4505 0010949 275.8605 084.0653 14.39551685060899
+FUSE 1
+1 25791U 99035A 00232.24620540 .00001162 00000-0 30984-3 0 1157
+2 25791 24.9861 275.6842 0010947 268.2547 91.6703 14.39550498 60791
+FUSE 1
+1 25791U 99035A 00230.85968265 +.00001168 +00000-0 +31152-3 0 01841
+2 25791 024.9861 284.1498 0010908 253.3956 106.5351 14.39547810060596
+FUSE 1
+1 25791U 99035A 00229.88911656 +.00001173 +00000-0 +31324-3 0 01650
+2 25791 024.9862 290.0753 0010918 243.1432 116.7994 14.39545953060451
+FUSE 1
+1 25791U 99035A 00228.84922713 +.00001681 +00000-0 +47341-3 0 01392
+2 25791 024.9833 296.4467 0010541 233.3366 126.6176 14.39544754060304
+FUSE 1
+1 25791U 99035A 00228.22529183 .00001437 00000-0 39642-3 0 1145
+2 25791 24.9839 300.2597 0010660 226.7882 133.1742 14.39542247 60216
+FUSE 1
+1 25791U 99035A 00227.87866114 +.00001204 +00000-0 +32286-3 0 01748
+2 25791 024.9843 302.3743 0010672 222.4107 137.5583 14.39540549060161
+FUSE 1
+1 25791U 99035A 00226.90809209 +.00001066 +00000-0 +27935-3 0 01531
+2 25791 024.9844 308.3015 0010818 212.0864 147.8990 14.39538035060025
+FUSE 1
+1 25791U 99035A 00225.86819636 +.00000875 +00000-0 +21927-3 0 01240
+2 25791 024.9839 314.6498 0010966 200.7238 159.2827 14.39535222059879
+FUSE 1
+1 25791U 99035A 00225.59089041 .00000839 00000-0 20809-3 0 1135
+2 25791 24.9841 316.3434 0010990 198.0059 162.0059 14.39534638 59833
+FUSE 1
+1 25791U 99035A 00222.88715209 +.00000729 +00000-0 +17338-3 0 01575
+2 25791 024.9839 332.8560 0011113 170.5138 189.5580 14.39530485059440
+FUSE 1
+1 25791U 99035A 00221.91657699 +.00000732 +00000-0 +17430-3 0 01315
+2 25791 024.9840 338.7844 0011141 160.6691 199.4239 14.39529454059307
+FUSE 1
+1 25791U 99035A 00221.15398144 .00000741 00000-0 17714-3 0 1122
+2 25791 24.9839 343.4418 0011158 152.7937 207.3154 14.39528689 59199
+FUSE 1
+1 25791U 99035A 00219.90609556 +.00000787 +00000-0 +19148-3 0 01712
+2 25791 024.9839 351.0626 0011186 140.1583 219.9740 14.39527697059013
+FUSE 1
+1 25791U 99035A 00218.93551634 +.00000842 +00000-0 +20903-3 0 01383
+2 25791 024.9842 356.9905 0011221 130.2195 229.9294 14.39527076058879
+FUSE 1
+1 25791U 99035A 00218.24224392 .00000911 00000-0 23076-3 0 1117
+2 25791 24.9837 1.2239 0011126 122.7808 237.3779 14.39526803 58771
+FUSE 1
+1 25791U 99035A 00216.92502528 +.00000994 +00000-0 +25698-3 0 01359
+2 25791 024.9840 009.2668 0011090 109.2022 250.9670 14.39525666058583
+FUSE 1
+1 25791U 99035A 00215.95444232 +.00001073 +00000-0 +28173-3 0 01224
+2 25791 024.9846 015.1947 0011165 099.5630 260.6137 14.39524901058446
+FUSE 1
+1 25791U 99035A 00215.19184019 .00001121 00000-0 29713-3 0 1106
+2 25791 24.9845 19.8506 0011155 91.5631 268.6149 14.39524011 58330
+FUSE 1
+1 25791U 99035A 00213.87461582 +.00001234 +00000-0 +33255-3 0 01563
+2 25791 024.9851 027.8945 0011173 078.5475 281.6282 14.39522670058145
+FUSE 1
+1 25791U 99035A 00212.90402845 +.00001276 +00000-0 +34584-3 0 01363
+2 25791 024.9853 033.8211 0011136 068.8066 291.3628 14.39521095058004
+FUSE 1
+1 25791U 99035A 00212.14142266 .00001313 00000-0 35764-3 0 1090
+2 25791 24.9850 38.4778 0011130 60.7162 299.4447 14.39519790 57895
+FUSE 1
+1 25791U 99035A 00209.92292793 +.00001396 +00000-0 +38383-3 0 01533
+2 25791 024.9849 052.0258 0011073 037.5021 322.6251 14.39515598057579
+FUSE 1
+1 25791U 99035A 00208.95233548 +.00001473 +00000-0 +40802-3 0 01252
+2 25791 024.9837 057.9580 0011424 026.9665 333.1435 14.39514058057430
+FUSE 1
+1 25791U 99035A 00208.18972549 .00001576 00000-0 44071-3 0 1085
+2 25791 24.9833 62.6176 0011472 18.7210 341.3716 14.39512347 57328
+FUSE 1
+1 25791U 99035A 00206.94181514 +.00001511 +00000-0 +42008-3 0 01921
+2 25791 024.9854 070.2405 0011038 006.6126 353.4533 14.39509278057141
+FUSE 1
+1 25791U 99035A 00205.97121710 +.00001487 +00000-0 +41266-3 0 01685
+2 25791 024.9852 076.1701 0011017 356.2364 003.8067 14.39506509057005
+FUSE 1
+1 25791U 99035A 00204.93128816 +.00001476 +00000-0 +40903-3 0 01386
+2 25791 024.9852 082.5219 0010972 345.2641 014.7546 14.39503741056855
+FUSE 1
+1 25791U 99035A 00203.96068597 +.00001638 +00000-0 +46010-3 0 01113
+2 25791 024.9851 088.4485 0010910 335.3315 024.6669 14.39501677056711
+FUSE 1
+1 25791U 99035A 00203.89135786 .00001602 00000-0 44873-3 0 1071
+2 25791 24.9852 88.8720 0010897 334.6954 25.3042 14.39501366 56700
+FUSE 1
+1 25791U 99035A 00201.95014789 +.00001572 +00000-0 +43936-3 0 01799
+2 25791 024.9852 100.7256 0010918 312.2678 047.6911 14.39496898056421
+FUSE 1
+1 25791U 99035A 00200.97954187 +.00001738 +00000-0 +49182-3 0 01451
+2 25791 024.9852 106.6535 0010962 301.6227 058.3210 14.39494751056288
+FUSE 1
+1 25791U 99035A 00199.93960649 +.00001805 +00000-0 +51300-3 0 01117
+2 25791 024.9853 113.0050 0010969 290.2578 069.6750 14.39491667056133
+FUSE 1
+1 25791U 99035A 00199.87027750 .00001803 00000-0 51229-3 0 1069
+2 25791 24.9852 113.4283 0010971 289.5399 70.3926 14.39491421 56120
+FUSE 1
+1 25791U 99035A 00198.96900068 +.00001318 +00000-0 +35923-3 0 01266
+2 25791 024.9850 118.9330 0011332 279.9281 079.9947 14.39486512055993
+FUSE 1
+1 25791U 99035A 00198.20638092 .00001053 00000-0 27558-3 0 1056
+2 25791 24.9852 123.5922 0011255 271.8947 88.0275 14.39483842 55884
+FUSE 1
+1 25791U 99035A 00195.91851583 .00000689 00000-0 16100-3 0 1047
+2 25791 24.9847 137.5630 0011254 247.8427 112.0894 14.39478555 55558
+FUSE 1
+1 25791U 99035A 00194.94790513 +.00000622 +00000-0 +13965-3 0 02217
+2 25791 024.9845 143.4897 0011244 237.8927 122.0496 14.39476756055415
+FUSE 1
+1 25791U 99035A 00193.97729403 +.00000584 +00000-0 +12775-3 0 01820
+2 25791 024.9847 149.4236 0011293 228.1708 131.7837 14.39475391055278
+FUSE 1
+1 25791U 99035A 00192.93735201 +.00000550 +00000-0 +11684-3 0 01414
+2 25791 024.9846 155.7737 0011308 217.3578 142.6152 14.39474212055121
+FUSE 1
+1 25791U 99035A 00191.96673850 +.00000542 +00000-0 +11437-3 0 01065
+2 25791 024.9844 161.7002 0011295 207.2529 152.7388 14.39473399054981
+FUSE 1
+1 25791U 99035A 00191.89740911 .00000540 00000-0 11391-3 0 1034
+2 25791 24.9843 162.1235 0011294 206.5071 153.4866 14.39473330 54979
+FUSE 1
+1 25791U 99035A 00188.91623713 +.00000545 +00000-0 +11536-3 0 01387
+2 25791 024.9846 180.3280 0011401 175.5058 184.5555 14.39471262054549
+FUSE 1
+1 25791U 99035A 00187.94562172 +.00000562 +00000-0 +12095-3 0 01032
+2 25791 024.9848 186.2545 0011434 165.3569 194.7270 14.39470796054403
+FUSE 1
+1 25791U 99035A 00187.87629207 .00000562 00000-0 12095-3 0 1026
+2 25791 24.9848 186.6777 0011434 164.6313 195.4544 14.39470742 54394
+FUSE 1
+1 25791U 99035A 00183.57784536 .00000667 00000-0 15416-3 0 1011
+2 25791 24.9855 212.9320 0011413 120.5817 239.5821 14.39468389 53779
+FUSE 1
+1 25791U 99035A 00181.91392783 +.00000671 +00000-0 +15546-3 0 01789
+2 25791 024.9854 223.1058 0011337 102.1276 258.0499 14.39467140053535
+FUSE 1
+1 25791U 99035A 00180.87397553 +.00000700 +00000-0 +16442-3 0 01445
+2 25791 024.9852 229.4559 0011322 091.4012 268.7791 14.39466353053381
+FUSE 1
+1 25791U 99035A 00179.97268238 +.00000726 +00000-0 +17280-3 0 01057
+2 25791 024.9855 234.9604 0011315 082.3086 277.8702 14.39465677053255
+FUSE 1
+1 25791U 99035A 00179.55670036 .00000742 00000-0 17762-3 0 1002
+2 25791 24.9855 237.5004 0011277 78.2476 281.9296 14.39465389 53199
+FUSE 1
+1 25791U 99035A 00178.86339700 +.00000752 +00000-0 +18089-3 0 02381
+2 25791 024.9856 241.7337 0011290 070.9195 289.2531 14.39464704053090
+FUSE 1
+1 25791U 99035A 00177.89277115 +.00000766 +00000-0 +18548-3 0 02031
+2 25791 024.9859 247.6607 0011289 060.8540 299.3095 14.39463739052956
+FUSE 1
+1 25791U 99035A 00176.92214342 +.00000800 +00000-0 +19601-3 0 01665
+2 25791 024.9859 253.5881 0011190 051.0927 309.0575 14.39462915052810
+FUSE 1
+1 25791U 99035A 00175.88218431 +.00000816 +00000-0 +20117-3 0 01315
+2 25791 024.9862 259.9387 0011137 040.3293 319.8037 14.39461801052661
+FUSE 1
+1 25791U 99035A 00175.25820859 .00000821 00000-0 20275-3 0 993
+2 25791 24.9863 263.7490 0011148 33.8548 326.2678 14.39461054 52575
+FUSE 1
+1 25791U 99035A 00173.87159264 +.00000872 +00000-0 +21895-3 0 01978
+2 25791 024.9863 272.2156 0011038 020.3739 339.7205 14.39459774052379
+FUSE 1
+1 25791U 99035A 00172.90096122 +.00000862 +00000-0 +21562-3 0 01592
+2 25791 024.9869 278.1422 0011016 010.0480 350.0243 14.39458368052232
+FUSE 1
+1 25791U 99035A 00171.93032817 +.00000868 +00000-0 +21744-3 0 01290
+2 25791 024.9870 284.0679 0010950 359.6225 000.4272 14.39457116052091
+FUSE 1
+1 25791U 99035A 00170.95969467 +.00000873 +00000-0 +21901-3 0 01001
+2 25791 024.9872 289.9957 0010930 349.1807 010.8463 14.39455848051955
+FUSE 1
+1 25791U 99035A 00170.89036360 .00000875 00000-0 21983-3 0 989
+2 25791 24.9872 290.4190 0010916 348.4366 11.5890 14.39455786 51949
+FUSE 1
+1 25791U 99035A 00167.83979740 +.00000834 +00000-0 +20689-3 0 01244
+2 25791 024.9865 309.0441 0011049 315.9144 044.0481 14.39451106051509
+FUSE 1
+1 25791U 99035A 00166.93849291 +.00000817 +00000-0 +20146-3 0 00991
+2 25791 024.9866 314.5466 0011043 306.5008 053.4481 14.39449711051375
+FUSE 1
+1 25791U 99035A 00166.86916175 .00000816 00000-0 20127-3 0 975
+2 25791 24.9867 314.9701 0011045 305.7696 54.1782 14.39449617 51364
+FUSE 1
+1 25791U 99035A 00165.89852612 +.00001393 +00000-0 +38331-3 0 01420
+2 25791 024.9880 320.9003 0010529 293.0245 066.9309 14.39451820051226
+FUSE 1
+1 25791U 99035A 00164.92788963 +.00001058 +00000-0 +27751-3 0 01130
+2 25791 024.9900 326.8234 0010700 286.6900 073.2425 14.39448463051080
+FUSE 1
+1 25791U 99035A 00164.58123317 .00001414 00000-0 39006-3 0 960
+2 25791 24.9895 328.9405 0010608 283.0060 76.9260 14.39449353 51032
+FUSE 1
+1 25791U 99035A 00163.88792360 +.00001009 +00000-0 +26201-3 0 01988
+2 25791 024.9902 333.1737 0010422 276.0922 083.8398 14.39446429050938
+FUSE 1
+1 25791U 99035A 00162.91728936 +.00000838 +00000-0 +20810-3 0 01731
+2 25791 024.9924 339.1014 0009907 267.6684 092.2688 14.39444419050790
+FUSE
+1 25791U 99035A 00160.90668101 .00000585 00000-0 12820-3 0 1084
+2 25791 24.9857 351.3806 0010965 243.0464 116.8920 14.39441160 50501
+FUSE
+1 25791U 99035A 00159.93604429 .00000520 00000-0 10769-3 0 2088
+2 25791 24.9857 357.3078 0010932 232.6720 127.2791 14.39439999 50364
+FUSE
+1 25791U 99035A 00158.89607500 .00000535 00000-0 11232-3 0 1828
+2 25791 24.9859 3.6563 0011010 221.7464 138.2204 14.39439406 50216
+FUSE
+1 25791U 99035A 00157.92543755 .00000593 00000-0 13055-3 0 1551
+2 25791 24.9862 9.5835 0010973 212.1855 147.7986 14.39438945 50075
+FUSE
+1 25791U 99035A 00156.95479994 .00000684 00000-0 15953-3 0 1220
+2 25791 24.9855 15.5108 0010936 202.2301 157.7734 14.39438339 49934
+FUSE
+1 25791U 99035A 00153.90422121 .00000864 00000-0 21631-3 0 1165
+2 25791 24.9865 34.1388 0011133 170.3555 189.7168 14.39436079 49494
+FUSE
+1 25791U 99035A 00152.93358165 .00000892 00000-0 22526-3 0 1001
+2 25791 24.9870 40.0657 0011211 160.4686 199.6263 14.39435106 49358
+FUSE
+1 25791U 99035A 00151.96294208 .00000727 00000-0 17304-3 0 1612
+2 25791 24.9867 45.9944 0011211 149.4582 210.6578 14.39433226 49218
+FUSE 1
+1 25791U 99035A 00150.92296786 +.00000783 +00000-0 +19073-3 0 01460
+2 25791 024.9865 052.3453 0011336 140.3401 219.7938 14.39432403049060
+FUSE 1
+1 25791U 99035A 00149.95232539 +.00000829 +00000-0 +20521-3 0 01198
+2 25791 024.9864 058.2759 0011314 130.9449 229.2035 14.39431340048923
+FUSE 1
+1 25791U 99035A 00148.91235042 .00001108 00000-0 29356-3 0 921
+2 25791 24.9862 64.6309 0011392 119.2869 240.8777 14.39431427 48776
+FUSE 1
+1 25791U 99035A 00146.97105909 +.00001049 +00000-0 +27490-3 0 01217
+2 25791 024.9860 076.4928 0011034 100.1008 260.0730 14.39427312048499
+FUSE 1
+1 25791U 99035A 00145.93107729 +.00001195 +00000-0 +32101-3 0 01053
+2 25791 024.9858 082.8448 0010906 089.5878 270.5877 14.39425983048340
+FUSE 1
+1 25791U 99035A 00144.96042610 +.00001210 +00000-0 +32585-3 0 00943
+2 25791 024.9858 088.7713 0010797 079.6238 280.5487 14.39424047048201
+FUSE 1
+1 25791U 99035A 00144.89109336 .00001242 00000-0 33587-3 0 919
+2 25791 24.9856 89.1955 0010755 78.9603 281.2108 14.39424127 48199
+FUSE 1
+1 25791U 99035A 00143.92043990 +.00001286 +00000-0 +34981-3 0 01362
+2 25791 024.9853 095.1215 0010661 068.9516 291.2131 14.39422329048054
+FUSE 1
+1 25791U 99035A 00142.94978508 +.00001390 +00000-0 +38255-3 0 01224
+2 25791 024.9849 101.0495 0010673 058.3816 301.7746 14.39420789047916
+FUSE 1
+1 25791U 99035A 00141.97912863 +.00001410 +00000-0 +38914-3 0 01076
+2 25791 024.9848 106.9769 0010693 048.0107 312.1315 14.39418518047773
+FUSE 1
+1 25791U 99035A 00140.31514173 .00001395 00000-0 38437-3 0 908
+2 25791 24.9846 117.1387 0010720 30.1996 329.9129 14.39414225 47534
+FUSE 1
+1 25791U 99035A 00139.96847802 +.00001336 +00000-0 +36555-3 0 01225
+2 25791 024.9846 119.2585 0010753 026.5593 333.5472 14.39413031047485
+FUSE 1
+1 25791U 99035A 00138.30448417 +.00000986 +00000-0 +25496-3 0 01032
+2 25791 024.9849 129.4190 0010807 008.4590 351.6103 14.39408079047241
+FUSE 1
+1 25791U 99035A 00138.16581799 +.00000917 +00000-0 +23330-3 0 00989
+2 25791 024.9852 130.2683 0010800 006.3941 353.6704 14.39407532047222
+FUSE 1
+1 25791U 99035A 00137.33381884 .00000891 00000-0 22495-3 0 892
+2 25791 24.9849 135.3478 0010942 358.1038 1.9431 14.39406114 47100
+FUSE 1
+1 25791U 99035A 00137.12581947 +.00000782 +00000-0 +19067-3 0 01443
+2 25791 024.9853 136.6194 0010936 354.9891 005.0518 14.39405165047070
+FUSE 1
+1 25791U 99035A 00136.15515183 +.00000717 +00000-0 +17007-3 0 01309
+2 25791 024.9856 142.5472 0011025 344.6838 015.3341 14.39403617046937
+FUSE 1
+1 25791U 99035A 00135.11514942 +.00000688 +00000-0 +16101-3 0 01150
+2 25791 024.9856 148.8977 0011074 333.6712 026.3233 14.39402271046789
+FUSE 1
+1 25791U 99035A 00134.14447983 +.00000686 +00000-0 +16024-3 0 01019
+2 25791 024.9858 154.8255 0011141 323.3354 036.6390 14.39401238046645
+FUSE 1
+1 25791U 99035A 00133.24314397 .00000697 00000-0 16371-3 0 882
+2 25791 24.9859 160.3315 0011225 313.9280 46.0306 14.39400350 46513
+FUSE 1
+1 25791U 99035A 00132.13380598 +.00000799 +00000-0 +19602-3 0 01249
+2 25791 024.9855 167.1074 0011235 302.2916 057.6506 14.39399858046356
+FUSE 1
+1 25791U 99035A 00130.46979970 +.00000876 +00000-0 +22019-3 0 01108
+2 25791 024.9854 177.2667 0011205 284.7991 075.1274 14.39398379046117
+FUSE 1
+1 25791U 99035A 00129.42979604 +.00000935 +00000-0 +23904-3 0 00958
+2 25791 024.9855 183.6177 0011214 273.6439 086.2789 14.39397418045968
+FUSE 1
+1 25791U 99035A 00129.22179542 .00000943 00000-0 24155-3 0 878
+2 25791 24.9857 184.8897 0011260 271.3687 88.5531 14.39397203 45932
+FUSE 1
+1 25791U 99035A 00124.57644568 .00001168 00000-0 31255-3 0 864
+2 25791 24.9853 213.2548 0011424 222.2133 137.7495 14.39390992 45261
+FUSE 1
+1 25791U 99035A 00123.60577526 +.00001181 +00000-0 +31680-3 0 01291
+2 25791 024.9854 219.1824 0011455 212.1770 147.8041 14.39389176045129
+FUSE 1
+1 25791U 99035A 00122.63510361 +.00001231 +00000-0 +33248-3 0 01161
+2 25791 024.9854 225.1097 0011461 201.9716 158.0303 14.39387621044982
+FUSE 1
+1 25791U 99035A 00121.66443151 +.00001251 +00000-0 +33895-3 0 01031
+2 25791 024.9854 231.0388 0011524 192.1664 167.8570 14.39385753044847
+FUSE 1
+1 25791U 99035A 00120.69375881 +.00001261 +00000-0 +34204-3 0 00919
+2 25791 024.9855 236.9674 0011466 182.0966 177.9496 14.39383716044709
+FUSE 1
+1 25791U 99035A 00120.55509156 .00001252 00000-0 33924-3 0 859
+2 25791 24.9857 237.8165 0011446 180.8748 179.1742 14.39383343 44689
+FUSE 1
+1 25791U 99035A 00118.68307534 +.00001268 +00000-0 +34428-3 0 01247
+2 25791 024.9853 249.2479 0011337 161.2641 198.8291 14.39379290044418
+FUSE 1
+1 25791U 99035A 00117.71239774 +.00001285 +00000-0 +34957-3 0 01099
+2 25791 024.9854 255.1775 0011271 151.1573 208.9557 14.39377287044279
+FUSE 1
+1 25791U 99035A 00116.74171833 +.00001334 +00000-0 +36531-3 0 00984
+2 25791 024.9851 261.1035 0011286 140.4017 219.7326 14.39375466044138
+FUSE 1
+1 25791U 99035A 00115.77103748 .00001336 00000-0 36589-3 0 846
+2 25791 24.9850 267.0332 0011164 130.0444 230.1046 14.39373163 43997
+FUSE 1
+1 25791U 99035A 00114.80035556 +.00001323 +00000-0 +36184-3 0 01051
+2 25791 024.9850 272.9636 0011139 118.8594 241.3037 14.39370701043855
+FUSE 1
+1 25791U 99035A 00113.48299633 +.00001343 +00000-0 +36805-3 0 00918
+2 25791 024.9847 281.0129 0011026 104.5281 255.6449 14.39367716043665
+FUSE 1
+1 25791U 99035A 00112.58164220 +.00001325 +00000-0 +36244-3 0 00895
+2 25791 024.9847 286.5147 0010991 094.9470 265.2284 14.39365442043531
+FUSE 1
+1 25791U 99035A 00111.61095147 .00001385 00000-0 38153-3 0 830
+2 25791 24.9843 292.4418 0011151 84.3852 275.7943 14.39363622 43390
+FUSE 1
+1 25791U 99035A 00110.57092100 +.00001565 +00000-0 +43855-3 0 00880
+2 25791 024.9834 298.7936 0011325 073.8814 286.2937 14.39362514043241
+FUSE 1
+1 25791U 99035A 00108.62952641 +.00001728 +00000-0 +49007-3 0 00851
+2 25791 024.9828 310.6444 0011254 054.3518 305.8020 14.39358127042962
+FUSE 1
+1 25791U 99035A 00107.93616998 +.00001752 +00000-0 +49756-3 0 00843
+2 25791 024.9826 314.8766 0011241 047.0226 313.1227 14.39356131042867
+FUSE 1
+1 25791U 99035A 00107.86683435 .00001753 00000-0 49803-3 0 827
+2 25791 24.9827 315.3009 0011242 46.2771 313.8667 14.39355927 42857
+FUSE 1
+1 25791U 99035A 00105.85608578 .00002056 00000-0 59388-3 0 814
+2 25791 24.9817 327.5892 0010873 23.0273 337.0569 14.39351807 42560
+FUSE 1
+1 25791U 99035A 00104.67736936 +.00002243 +00000-0 +65292-3 0 00823
+2 25791 024.9813 334.7843 0010911 011.3549 348.7002 14.39348712042394
+FUSE 1
+1 25791U 99035A 00103.91467118 +.00002381 +00000-0 +69669-3 0 00816
+2 25791 024.9810 339.4400 0010675 002.0282 358.0252 14.39346695042287
+FUSE 1
+1 25791U 99035A 00103.01329876 +.00002405 +00000-0 +70441-3 0 01194
+2 25791 024.9809 344.9404 0010670 352.8750 007.1606 14.39342875042158
+FUSE 1
+1 25791U 99035A 00101.97324977 +.00002555 +00000-0 +75197-3 0 01137
+2 25791 024.9805 351.2909 0010643 342.0641 017.9481 14.39339226042005
+FUSE 1
+1 25791U 99035A 00101.07187295 +.00002583 +00000-0 +76093-3 0 01124
+2 25791 024.9805 356.7922 0010619 332.7422 027.2531 14.39335099041874
+FUSE 1
+1 25791U 99035A 00100.10115731 +.00002671 +00000-0 +78880-3 0 00968
+2 25791 024.9799 002.7214 0010593 322.7422 037.2356 14.39330819041734
+FUSE 1
+1 25791U 99035A 00099.13043908 .00002590 00000-0 76309-3 0 799
+2 25791 24.9798 8.6538 0010792 311.2745 48.6840 14.39325505 41593
+FUSE 1
+1 25791U 99035A 00098.09037990 +.00002445 +00000-0 +71735-3 0 00851
+2 25791 024.9802 015.0028 0010995 299.5824 060.3584 14.39319881041446
+FUSE 1
+1 25791U 99035A 00097.11965747 +.00002329 +00000-0 +68059-3 0 00815
+2 25791 024.9804 020.9278 0010970 289.9717 069.9613 14.39314724041301
+FUSE 1
+1 25791U 99035A 00096.14893064 +.00002270 +00000-0 +66193-3 0 00877
+2 25791 024.9807 026.8527 0011076 279.9873 079.9390 14.39310047041167
+FUSE 1
+1 25791U 99035A 00095.17820409 +.00002063 +00000-0 +59661-3 0 00795
+2 25791 024.9813 032.7786 0011255 270.8469 089.0777 14.39304208041025
+FUSE 1
+1 25791U 99035A 00094.20747091 .00001992 00000-0 57410-3 0 771
+2 25791 24.9816 38.7034 0011419 261.0932 98.8284 14.39299966 40887
+FUSE 1
+1 25791U 99035A 00092.19666424 .00001729 00000-0 49103-3 0 764
+2 25791 24.9822 50.9810 0011573 241.7849 118.1493 14.39290662 40595
+FUSE 1
+1 25791U 99035A 00090.18584768 +.00001549 +00000-0 +43389-3 0 00794
+2 25791 024.9830 063.2550 0011512 221.2878 138.6763 14.39283008040302
+FUSE 1
+1 25791U 99035A 00089.28444503 .00001459 00000-0 40539-3 0 755
+2 25791 24.9832 68.7566 0011380 211.8222 148.1602 14.39279719 40179
+FUSE 1
+1 25791U 99035A 00088.31370039 +.00001360 +00000-0 +37404-3 0 00961
+2 25791 024.9836 074.6816 0011423 202.4456 157.5555 14.39276438040031
+FUSE 1
+1 25791U 99035A 00088.03634565 +.00001304 +00000-0 +35643-3 0 00913
+2 25791 024.9839 076.3760 0011454 200.2734 159.7366 14.39275277039997
+FUSE 1
+1 25791U 99035A 00087.20427617 +.00001254 +00000-0 +34072-3 0 00840
+2 25791 024.9841 081.4558 0011382 191.8207 168.2033 14.39272923039870
+FUSE 1
+1 25791U 99035A 00086.23352802 .00001203 00000-0 32440-3 0 745
+2 25791 24.9842 87.3815 0011279 181.4280 178.6196 14.39270365 39731
+FUSE 1
+1 25791U 99035A 00084.22268757 +.00001077 +00000-0 +28473-3 0 00961
+2 25791 024.9845 099.6586 0011009 160.1136 199.9804 14.39265143039448
+FUSE 1
+1 25791U 99035A 00083.18259301 +.00001067 +00000-0 +28137-3 0 00832
+2 25791 024.9846 106.0081 0010977 149.2929 210.8223 14.39263170039292
+FUSE 1
+1 25791U 99035A 00082.21183569 .00001096 00000-0 29069-3 0 733
+2 25791 24.9846 111.9346 0010974 139.3047 220.8279 14.39261692 39153
+FUSE 1
+1 25791U 99035A 00081.17173683 +.00001160 +00000-0 +31097-3 0 01011
+2 25791 024.9843 118.2860 0010946 128.6797 231.4693 14.39260290039008
+FUSE 1
+1 25791U 99035A 00080.20097578 +.00001213 +00000-0 +32794-3 0 00880
+2 25791 024.9841 124.2128 0010923 118.8383 241.3214 14.39258856038864
+FUSE 1
+1 25791U 99035A 00079.23021298 .00001324 00000-0 36292-3 0 720
+2 25791 24.9837 130.1398 0010979 108.5196 251.6496 14.39257774 38722
+FUSE 1
+1 25791U 99035A 00077.21934109 +.00001513 +00000-0 +42309-3 0 00861
+2 25791 024.9829 142.4172 0010838 088.8266 271.3475 14.39254631038434
+FUSE 1
+1 25791U 99035A 00075.55516719 .00001577 00000-0 44314-3 0 711
+2 25791 24.9825 152.5756 0010789 71.5815 288.5864 14.39250628 38191
+FUSE 1
+1 25791U 99035A 00073.61362244 +.00001623 +00000-0 +45792-3 0 01149
+2 25791 024.9823 164.4274 0010664 051.3108 308.8354 14.39245491037910
+FUSE 1
+1 25791U 99035A 00072.64284711 +.00001597 +00000-0 +44979-3 0 01015
+2 25791 024.9825 170.3543 0010564 040.8844 319.2456 14.39242488037772
+FUSE 1
+1 25791U 99035A 00071.67206979 +.00001573 +00000-0 +44222-3 0 00864
+2 25791 024.9826 176.2815 0010546 030.4691 329.6435 14.39239518037632
+FUSE 1
+1 25791U 99035A 00070.56260671 .00001532 00000-0 42912-3 0 702
+2 25791 24.9828 183.0544 0010529 18.3343 341.7543 14.39236091 37479
+FUSE 1
+1 25791U 99035A 00068.69038219 +.00001413 +00000-0 +39162-3 0 00952
+2 25791 024.9834 194.4830 0010533 358.2154 001.8316 14.39230155037209
+FUSE 1
+1 25791U 99035A 00067.71959612 +.00001335 +00000-0 +36691-3 0 00815
+2 25791 024.9838 200.4095 0010552 347.4671 012.5574 14.39227138037065
+FUSE 1
+1 25791U 99035A 00066.74880810 .00001316 00000-0 36063-3 0 698
+2 25791 24.9838 206.3364 0010621 337.4200 22.5842 14.39224685 36920
+FUSE 1
+1 25791U 99035A 00065.77801832 +.00001263 +00000-0 +34378-3 0 00998
+2 25791 024.9841 212.2629 0010676 326.5841 033.3993 14.39222062036782
+FUSE 1
+1 25791U 99035A 00064.80722849 +.00001189 +00000-0 +32036-3 0 00830
+2 25791 024.9845 218.1911 0010778 316.3193 043.6474 14.39219324036645
+FUSE 1
+1 25791U 99035A 00063.76709448 +.00001101 +00000-0 +29240-3 0 00718
+2 25791 024.9849 224.5412 0010871 305.4534 054.4961 14.39216487036499
+FUSE 1
+1 25791U 99035A 00063.55906739 .00001088 00000-0 28832-3 0 683
+2 25791 24.9850 225.8120 0010913 303.1719 56.7740 14.39215991 36464
+FUSE 1
+1 25791U 99035A 00061.82550819 +.00000982 +00000-0 +25477-3 0 00960
+2 25791 024.9855 236.3933 0010864 286.6270 073.3045 14.39211998036219
+FUSE 1
+1 25791U 99035A 00060.85471378 +.00000901 +00000-0 +22923-3 0 00845
+2 25791 024.9863 242.3201 0010848 276.7178 083.2098 14.39209859036077
+FUSE 1
+1 25791U 99035A 00059.88391871 .00000826 00000-0 20540-3 0 675
+2 25791 24.9869 248.2490 0010930 267.1229 92.8030 14.39207865 35932
+FUSE 1
+1 25791U 99035A 00058.91312284 +.00000781 +00000-0 +19097-3 0 00977
+2 25791 024.9873 254.1768 0010925 257.3125 102.6165 14.39206249035799
+FUSE 1
+1 25791U 99035A 00057.94232639 +.00000728 +00000-0 +17411-3 0 00816
+2 25791 024.9875 260.1056 0011055 247.8021 112.1316 14.39204614035655
+FUSE 1
+1 25791U 99035A 00056.62481384 +.00000758 +00000-0 +18375-3 0 00670
+2 25791 024.9875 268.1502 0011129 234.2119 125.7313 14.39203424035463
+FUSE 1
+1 25791U 99035A 00055.86204329 .00000793 00000-0 19497-3 0 661
+2 25791 24.9873 272.8046 0011161 226.1863 133.7679 14.39202825 35354
+FUSE 1
+1 25791U 99035A 00054.68321769 +.00000848 +00000-0 +21235-3 0 01001
+2 25791 024.9871 279.9967 0011112 213.5611 146.4207 14.39201763035188
+FUSE 1
+1 25791U 99035A 00053.98979045 +.00000850 +00000-0 +21296-3 0 00974
+2 25791 024.9870 284.2284 0011076 206.2727 153.7221 14.39200822035085
+FUSE 1
+1 25791U 99035A 00053.01899083 +.00000935 +00000-0 +24004-3 0 00830
+2 25791 024.9867 290.1552 0011204 196.3192 163.6959 14.39200205034940
+FUSE 1
+1 25791U 99035A 00052.04819115 +.00000994 +00000-0 +25875-3 0 00719
+2 25791 024.9868 296.0811 0011283 186.4833 173.5531 14.39199236034805
+FUSE 1
+1 25791U 99035A 00051.90950592 .00000987 00000-0 25647-3 0 650
+2 25791 24.9870 296.9294 0011270 185.1807 174.8586 14.39198964 34783
+FUSE 1
+1 25791U 99035A 00048.85841520 .00001297 00000-0 35475-3 0 644
+2 25791 24.9866 315.5528 0011618 154.5181 205.5896 14.39195818 34340
+FUSE 1
+1 25791U 99035A 00048.09564157 +.00001343 +00000-0 +36946-3 0 01229
+2 25791 024.9864 320.2075 0011655 146.8674 213.2566 14.39194413034238
+FUSE 1
+1 25791U 99035A 00047.12483713 +.00001391 +00000-0 +38482-3 0 01095
+2 25791 024.9864 326.1324 0011683 137.2771 222.8642 14.39192494034095
+FUSE 1
+1 25791U 99035A 00046.15403192 +.00001360 +00000-0 +37483-3 0 00949
+2 25791 024.9866 332.0573 0011665 127.2938 232.8638 14.39189972033950
+FUSE 1
+1 25791U 99035A 00045.18322419 +.00001296 +00000-0 +35475-3 0 00793
+2 25791 024.9869 337.9835 0011586 117.6016 242.5669 14.39187410033812
+FUSE 1
+1 25791U 99035A 00044.21241546 .00001146 00000-0 30690-3 0 638
+2 25791 24.9869 343.9091 0011473 107.1762 253.0006 14.39184536 33672
+FUSE 1
+1 25791U 99035A 00042.20144618 +.00000911 +00000-0 +23237-3 0 00758
+2 25791 024.9867 356.1818 0011249 085.1954 274.9841 14.39179242033387
+FUSE 1
+1 25791U 99035A 00041.92407140 .00000833 00000-0 20764-3 0 629
+2 25791 24.9866 357.8759 0011123 81.8578 278.3201 14.39178018 33348
+FUSE 1
+1 25791U 99035A 00041.16128579 +.00000812 +00000-0 +20105-3 0 01066
+2 25791 024.9865 002.5305 0011143 073.4503 286.7237 14.39176773033231
+FUSE 1
+1 25791U 99035A 00040.19046659 +.00000730 +00000-0 +17515-3 0 00919
+2 25791 024.9864 008.4561 0011054 062.5359 297.6273 14.39174760033097
+FUSE 1
+1 25791U 99035A 00038.31816651 .00000622 00000-0 14075-3 0 612
+2 25791 24.9860 19.8837 0010946 41.9661 318.1684 14.39171741 32822
+FUSE 1
+1 25791U 99035A 00035.19765343 +.00000599 +00000-0 +13337-3 0 00754
+2 25791 024.9862 038.9297 0010966 008.7816 351.2878 14.39168833032372
+FUSE 1
+1 25791U 99035A 00034.22682512 .00000609 00000-0 13670-3 0 609
+2 25791 24.9863 44.8546 0010985 358.5324 1.5150 14.39168123 32232
+FUSE 1
+1 25791U 99035A 00033.18665576 +.00000568 +00000-0 +12356-3 0 01126
+2 25791 024.9855 051.2265 0011261 347.2812 012.7409 14.39167162032084
+FUSE 1
+1 25791U 99035A 00032.21582678 +.00000591 +00000-0 +13078-3 0 00970
+2 25791 024.9855 057.1532 0011294 337.1761 022.8245 14.39166555031942
+FUSE 1
+1 25791U 99035A 00031.17565214 +.00000642 +00000-0 +14694-3 0 00805
+2 25791 024.9852 063.5033 0011303 326.2800 033.6988 14.39166094031795
+FUSE 1
+1 25791U 99035A 00030.20482266 +.00000686 +00000-0 +16093-3 0 00659
+2 25791 024.9850 069.4311 0011343 315.6598 044.3015 14.39165560031659
+FUSE 1
+1 25791U 99035A 00029.44202816 .00000689 00000-0 16196-3 0 594
+2 25791 24.9849 74.0872 0011363 307.3743 52.5733 14.39164796 31549
+FUSE 1
+1 25791U 99035A 00027.43102888 .00000569 00000-0 18032-3 0 586
+2 25791 24.9851 86.3260 0010521 286.4177 73.5622 14.39162573 31251
+FUSE 1
+1 25791U 99035A 00025.55871179 .00000869 00000-0 21924-3 0 579
+2 25791 24.9844 97.7947 0011481 266.0116 93.9082 14.39161817 30989
+FUSE 1
+1 25791U 99035A 00023.61705451 +.00000924 +00000-0 +23647-3 0 00872
+2 25791 024.9842 109.6465 0011662 245.5194 114.4098 14.39159561030703
+FUSE 1
+1 25791U 99035A 00022.57688135 +.00000962 +00000-0 +24873-3 0 00723
+2 25791 024.9839 115.9974 0011736 234.7227 125.2184 14.39158302030554
+FUSE 1
+1 25791U 99035A 00022.29950177 +.00001003 +00000-0 +26163-3 0 00619
+2 25791 024.9838 117.6930 0011736 231.8231 128.1224 14.39158246030517
+FUSE 1
+1 25791U 99035A 00021.53670825 .00000998 00000-0 26013-3 0 564
+2 25791 24.9840 122.3487 0011792 223.8474 136.1104 14.39156968 30405
+FUSE 1
+1 25791U 99035A 00020.42719000 +.00000962 +00000-0 +24860-3 0 00907
+2 25791 024.9842 129.1211 0011913 212.6223 147.3555 14.39154882030249
+FUSE 1
+1 25791U 99035A 00019.66439581 +.00000966 +00000-0 +24995-3 0 00839
+2 25791 024.9840 133.7768 0011844 204.5957 155.3985 14.39153669030138
+FUSE 1
+1 25791U 99035A 00018.62422196 +.00000928 +00000-0 +23794-3 0 00696
+2 25791 024.9842 140.1276 0011782 194.0350 165.9832 14.39151690029988
+FUSE 1
+1 25791U 99035A 00017.44535596 .00000854 00000-0 21447-3 0 550
+2 25791 24.9848 147.3221 0011810 182.6957 177.3499 14.39149382 29814
+FUSE 1
+1 25791U 99035A 00014.53285856 .00000615 00000-0 13854-3 0 545
+2 25791 24.9856 165.1015 0011407 153.4049 206.7053 14.39143679 29391
+FUSE 1
+1 25791U 99035A 00013.56202232 +.00000571 +00000-0 +12445-3 0 00786
+2 25791 024.9857 171.0254 0011318 143.0152 217.1149 14.39142418029251
+FUSE 1
+1 25791U 99035A 00012.72987589 +.00000562 +00000-0 +12183-3 0 00732
+2 25791 024.9854 176.1050 0011284 133.7108 226.4334 14.39141611029137
+FUSE 1
+1 25791U 99035A 00011.62034564 +.00000527 +00000-0 +11055-3 0 00633
+2 25791 024.9855 182.8750 0011249 121.8036 238.3572 14.39140431028974
+FUSE 1
+1 25791U 99035A 00010.71885112 +.00000512 +00000-0 +10577-3 0 00569
+2 25791 024.9854 188.3761 0011274 111.8566 248.3147 14.39139621028845
+FUSE 1
+1 25791U 99035A 00009.88670072 .00000501 00000-0 10250-3 0 535
+2 25791 24.9854 193.4536 0011262 103.0112 257.1659 14.39138969 28726
+FUSE 1
+1 25791U 99035A 00006.83547797 .00000337 00000-0 10675-3 0 521
+2 25791 24.9869 212.0479 0011133 74.0467 286.1742 14.39136665 28280
+FUSE 1
+1 25791U 99035A 00005.93397487 +.00000522 +00000-0 +10899-3 0 00546
+2 25791 024.9856 217.5808 0011349 060.5895 299.5747 14.39136473028152
+FUSE 1
+1 25791U 99035A 00005.86462875 .00000520 00000-0 10857-3 0 511
+2 25791 24.9857 218.0047 0011344 59.7788 300.3845 14.39136413 28143
+FUSE 1
+1 25791U 99035A 00004.96312675 +.00000518 +00000-0 +10767-3 0 01139
+2 25791 024.9860 223.5077 0011297 050.2547 309.8954 14.39135812028010
+FUSE 1
+1 25791U 99035A 00003.99227761 +.00000520 +00000-0 +10842-3 0 00981
+2 25791 024.9861 229.4342 0011263 039.8658 320.2678 14.39135178027878
+FUSE 1
+1 25791U 99035A 00003.02142715 +.00000562 +00000-0 +12179-3 0 00835
+2 25791 024.9860 235.3606 0011286 029.7368 330.3779 14.39134850027732
+FUSE 1
+1 25791U 99035A 00001.98122961 +.00000601 +00000-0 +13433-3 0 00657
+2 25791 024.9860 241.7105 0011303 018.8712 341.2214 14.39134376027580
+FUSE 1
+1 25791U 99035A 00001.01037721 .00000666 00000-0 15478-3 0 506
+2 25791 24.9859 247.6366 0011281 8.7106 351.3596 14.39134101 27448
+FUSE 1
+1 25791U 99035A 99363.09781835 .00000899 00000-0 22901-3 0 490
+2 25791 24.9851 265.4129 0011197 338.4602 21.5436 14.39132626 27028
+FUSE 1
+1 25791U 99035A 99362.12696497 +.00000961 +00000-0 +24848-3 0 00922
+2 25791 024.9849 271.3386 0011184 327.9746 032.0084 14.39131724026881
+FUSE 1
+1 25791U 99035A 99361.15611130 +.00001034 +00000-0 +27194-3 0 00799
+2 25791 024.9846 277.2653 0011182 317.4471 042.5171 14.39130801026740
+FUSE 1
+1 25791U 99035A 99360.11591130 +.00001087 +00000-0 +28861-3 0 00623
+2 25791 024.9844 283.6152 0011205 306.4053 053.5421 14.39129438026590
+FUSE 1
+1 25791U 99035A 99359.14505772 .00001123 00000-0 30012-3 0 487
+2 25791 24.9844 289.5405 0011210 296.0081 63.9276 14.39127971 26455
+FUSE 1
+1 25791U 99035A 99357.20334989 +.00001185 +00000-0 +31974-3 0 00927
+2 25791 024.9845 301.3934 0011276 275.1736 084.7487 14.39124778026179
+FUSE 1
+1 25791U 99035A 99355.19229507 +.00001143 +00000-0 +30633-3 0 00589
+2 25791 024.9845 313.6688 0011427 254.6519 105.2727 14.39120370025887
+FUSE 1
+1 25791U 99035A 99354.91490853 .00001110 00000-0 29599-3 0 473
+2 25791 24.9845 315.3629 0011470 251.8385 108.0875 14.39119513 25847
+FUSE 1
+1 25791U 99035A 99354.15209340 +.00001101 +00000-0 +29307-3 0 01038
+2 25791 024.9845 320.0181 0011509 244.1536 115.7785 14.39117975025732
+FUSE 1
+1 25791U 99035A 99353.18123792 +.00001083 +00000-0 +28726-3 0 00881
+2 25791 024.9845 325.9428 0011452 234.1361 125.8092 14.39115978025590
+FUSE 1
+1 25791U 99035A 99352.21038154 +.00001042 +00000-0 +27447-3 0 00762
+2 25791 024.9843 331.8688 0011469 224.5539 135.4048 14.39113821025458
+FUSE 1
+1 25791U 99035A 99351.17017792 +.00000973 +00000-0 +25237-3 0 00577
+2 25791 024.9847 338.2189 0011485 214.2213 145.7558 14.39111421025300
+FUSE 1
+1 25791U 99035A 99350.33801333 .00000951 00000-0 24529-3 0 463
+2 25791 24.9846 343.2967 0011487 205.5729 154.4211 14.39109889 25180
+FUSE 1
+1 25791U 99035A 99350.19931958 +.00000933 +00000-0 +23956-3 0 00962
+2 25791 024.9848 344.1445 0011512 204.4239 155.5731 14.39109519025163
+FUSE 1
+1 25791U 99035A 99348.39629426 +.00000823 +00000-0 +20475-3 0 00865
+2 25791 024.9849 355.1452 0011441 185.7566 174.2811 14.39105974024908
+FUSE 1
+1 25791U 99035A 99348.18825288 +.00000798 +00000-0 +19683-3 0 00787
+2 25791 024.9851 356.4159 0011443 183.9954 176.0469 14.39105492024872
+FUSE 1
+1 25791U 99035A 99347.21739099 +.00000760 +00000-0 +18478-3 0 00593
+2 25791 024.9852 002.3410 0011413 174.2811 185.7832 14.39103915024736
+FUSE 1
+1 25791U 99035A 99346.24652782 .00000754 00000-0 18291-3 0 459
+2 25791 24.9852 8.2668 0011377 164.2548 195.8318 14.39102692 24597
+FUSE 1
+1 25791U 99035A 99344.23544964 +.00000756 +00000-0 +18345-3 0 00821
+2 25791 024.9851 020.5393 0011315 143.9081 216.2195 14.39100353024308
+FUSE 1
+1 25791U 99035A 99343.19523523 +.00000758 +00000-0 +18405-3 0 00642
+2 25791 024.9849 026.8884 0011251 133.1541 226.9914 14.39099103024150
+FUSE 1
+1 25791U 99035A 99342.15501899 +.00000788 +00000-0 +19383-3 0 00479
+2 25791 024.9847 033.2384 0011205 122.0799 238.0799 14.39098132024006
+FUSE 1
+1 25791U 99035A 99341.53088842 .00000788 00000-0 19382-3 0 444
+2 25791 24.9847 37.0461 0011204 115.5981 244.5688 14.39097368 23911
+FUSE 1
+1 25791U 99035A 99341.18414898 +.00000797 +00000-0 +19666-3 0 00927
+2 25791 024.9845 039.1646 0011110 111.9666 248.2014 14.39096976023865
+FUSE 1
+1 25791U 99035A 99340.21327751 +.00000821 +00000-0 +20422-3 0 00796
+2 25791 024.9844 045.0894 0011092 101.8687 258.3063 14.39095956023723
+FUSE 1
+1 25791U 99035A 99339.24240445 +.00000860 +00000-0 +21656-3 0 00626
+2 25791 024.9842 051.0146 0011088 091.5490 268.6286 14.39094994023586
+FUSE 1
+1 25791U 99035A 99337.57804728 +.00000910 +00000-0 +23264-3 0 00454
+2 25791 024.9838 061.1710 0011103 073.9223 286.2502 14.39093024023340
+FUSE 1
+1 25791U 99035A 99337.50869901 .00000916 00000-0 23465-3 0 438
+2 25791 24.9838 61.5940 0011123 73.3216 286.8513 14.39092988 23332
+FUSE 1
+1 25791U 99035A 99336.53782164 +.00000978 +00000-0 +25413-3 0 00775
+2 25791 024.9835 067.5184 0011185 063.0696 297.0953 14.39091962023198
+FUSE 1
+1 25791U 99035A 99335.91368480 +.00001057 +00000-0 +27938-3 0 00668
+2 25791 024.9832 071.3272 0011211 056.4491 303.7082 14.39091557023104
+FUSE 1
+1 25791U 99035A 99334.66541084 +.00001103 +00000-0 +29413-3 0 00563
+2 25791 024.9829 078.9441 0011175 043.3897 316.7490 14.39089668022921
+FUSE 1
+1 25791U 99035A 99333.55583168 .00001182 00000-0 31912-3 0 428
+2 25791 24.9828 85.7150 0011228 31.8546 328.2638 14.39088163 22768
+FUSE 1
+1 25791U 99035A 99332.72364624 +.00001252 +00000-0 +34147-3 0 00926
+2 25791 024.9822 090.7928 0011318 023.1121 336.9895 14.39086934022646
+FUSE 1
+1 25791U 99035A 99330.71252915 +.00001370 +00000-0 +37884-3 0 00621
+2 25791 024.9815 103.0720 0011456 002.2762 357.7803 14.39083149022351
+FUSE 1
+1 25791U 99035A 99330.01903979 +.00001341 +00000-0 +36977-3 0 00515
+2 25791 024.9813 107.3056 0011522 355.0936 004.9469 14.39081189022254
+FUSE 1
+1 25791U 99035A 99329.53359692 .00001309 00000-0 35954-3 0 414
+2 25791 24.9818 110.2720 0011533 349.7266 10.3016 14.39079811 22188
+FUSE 1
+1 25791U 99035A 99328.00791539 +.00001217 +00000-0 +33021-3 0 00742
+2 25791 024.9820 119.5846 0011565 334.1745 025.8190 14.39075614021963
+FUSE 1
+1 25791U 99035A 99326.82897714 +.00001154 +00000-0 +31024-3 0 00585
+2 25791 024.9826 126.7842 0011751 321.2678 038.6990 14.39072676021790
+FUSE 1
+1 25791U 99035A 99325.51133788 .00001054 00000-0 27855-3 0 401
+2 25791 24.9847 134.8467 0011912 304.6034 55.3277 14.39069633 21609
+FUSE 1
+1 25791U 99035A 99322.80670431 +.00001256 +00000-0 +34276-3 0 00411
+2 25791 024.9836 151.3552 0012041 275.3401 084.5737 14.39066077021213
+FUSE 1
+1 25791U 99035A 99321.62776187 +.00001252 +00000-0 +34139-3 0 00408
+2 25791 024.9837 158.5475 0012055 262.9443 096.9715 14.39063501021043
+FUSE 1
+1 25791U 99035A 99320.79556237 .00001252 00000-0 34144-3 0 391
+2 25791 24.9836 163.6246 0012002 254.4359 105.4616 14.39061664 20929
+FUSE 1
+1 25791U 99035A 99318.99247388 +.00001603 +00000-0 +45300-3 0 00424
+2 25791 024.9830 174.6225 0011785 234.5772 125.3639 14.39059706020668
+FUSE 1
+1 25791U 99035A 99318.85377493 .00001636 00000-0 46351-3 0 388
+2 25791 24.9833 175.4706 0011739 232.8226 127.1216 14.39059600 20640
+FUSE 1
+1 25791U 99035A 99316.98133499 .00000949 00000-0 24506-3 0 379
+2 25791 24.9842 186.9003 0011834 213.5350 146.4412 14.39050830 20375
+FUSE 1
+1 25791U 99035A 99316.77328072 .00000093 00000-0 -27298-4 0 361
+2 25791 24.9851 188.1733 0012103 214.4787 145.4516 14.39045117 20346
+FUSE 1
+1 25791U 99035A 99316.01043130 .00001289 00000-0 35317-3 0 353
+2 25791 24.9823 192.8263 0011574 206.8856 153.1047 14.39050776 20238
+FUSE 1
+1 25791U 99035A 99314.06863125 +.00000807 +00000-0 +19978-3 0 00675
+2 25791 024.9828 204.6728 0011620 187.0114 173.0230 14.39045484019952
+FUSE 1
+1 25791U 99035A 99313.09772812 +.00000806 +00000-0 +19960-3 0 00668
+2 25791 024.9828 210.5953 0011621 176.8561 183.2018 14.39044261019815
+FUSE 1
+1 25791U 99035A 99312.12682443 +.00000807 +00000-0 +20004-3 0 00607
+2 25791 024.9830 216.5187 0011630 166.7136 193.3684 14.39043064019674
+FUSE 1
+1 25791U 99035A 99311.08656905 +.00000824 +00000-0 +20537-3 0 00492
+2 25791 024.9827 222.8664 0011566 156.1383 203.9662 14.39041822019523
+FUSE 1
+1 25791U 99035A 99310.11566272 .00000873 00000-0 22108-3 0 346
+2 25791 24.9823 228.7931 0011439 146.3502 213.7733 14.39040863 19380
+FUSE 1
+1 25791U 99035A 99309.14475480 +.00000912 +00000-0 +23325-3 0 00624
+2 25791 024.9823 234.7169 0011382 136.4568 223.6834 14.39039788019240
+FUSE 1
+1 25791U 99035A 99308.17384628 +.00000917 +00000-0 +23509-3 0 00594
+2 25791 024.9823 240.6396 0011384 126.3110 233.8450 14.39038400019103
+FUSE 1
+1 25791U 99035A 99307.20293604 +.00000929 +00000-0 +23900-3 0 00509
+2 25791 024.9824 246.5634 0011348 116.2606 243.9068 14.39037064018967
+FUSE 1
+1 25791U 99035A 99306.16267374 +.00000901 +00000-0 +22981-3 0 00427
+2 25791 024.9827 252.9105 0011294 105.3472 254.8283 14.39035306018815
+FUSE 1
+1 25791U 99035A 99305.26111145 .00000880 00000-0 22322-3 0 336
+2 25791 24.9828 258.4108 0011278 95.9573 264.2230 14.39033878 18682
+FUSE 1
+1 25791U 99035A 99302.14030694 +.00000777 +00000-0 +19052-3 0 00420
+2 25791 024.9830 277.4546 0011155 063.6998 296.4659 14.39029030018237
+FUSE 1
+1 25791U 99035A 99301.23873747 .00000793 00000-0 19553-3 0 326
+2 25791 24.9829 282.9548 0011144 54.1449 306.0093 14.39027991 18102
+FUSE 1
+1 25791U 99035A 99300.19846426 +.00000688 +00000-0 +16220-3 0 00785
+2 25791 024.9829 289.3031 0011097 042.8698 317.2674 14.39026119017959
+FUSE 1
+1 25791U 99035A 99299.15818884 +.00000714 +00000-0 +17059-3 0 00607
+2 25791 024.9835 295.6560 0010854 031.9536 328.1631 14.39025229017802
+FUSE 1
+1 25791U 99035A 99298.11791199 +.00000847 +00000-0 +21277-3 0 00447
+2 25791 024.9832 302.0031 0010894 020.7345 339.3596 14.39024199017655
+FUSE 1
+1 25791U 99035A 99297.21633808 .00000871 00000-0 22050-3 0 312
+2 25791 24.9833 307.5043 0010887 10.9937 349.0810 14.39022966 17522
+FUSE 1
+1 25791U 99035A 99295.27448293 +.00000936 +00000-0 +24130-3 0 00647
+2 25791 024.9834 319.3563 0010756 350.0772 009.9521 14.39020654017243
+FUSE 1
+1 25791U 99035A 99294.16484983 +.00001000 +00000-0 +26157-3 0 00453
+2 25791 024.9829 326.1256 0010800 338.5647 021.4408 14.39019299017082
+FUSE 1
+1 25791U 99035A 99293.19392082 .00001020 00000-0 26791-3 0 303
+2 25791 24.9828 332.0506 0010781 328.4327 31.5533 14.39017852 16944
+FUSE 1
+1 25791U 99035A 99292.77780736 +.00001020 +00000-0 +26806-3 0 00883
+2 25791 024.9827 334.5890 0010781 324.0963 035.8778 14.39017148016883
+FUSE 1
+1 25791U 99035A 99292.15363794 +.00001076 +00000-0 +28568-3 0 00761
+2 25791 024.9826 338.3998 0010857 316.4441 043.5205 14.39016547016796
+FUSE 1
+1 25791U 99035A 99291.18270908 +.00001062 +00000-0 +28130-3 0 00587
+2 25791 024.9822 344.3280 0011053 306.1106 053.8378 14.39014543016650
+FUSE 1
+1 25791U 99035A 99289.51825652 +.00001008 +00000-0 +26405-3 0 00430
+2 25791 024.9823 354.4815 0011076 288.6058 071.3246 14.39011177016415
+FUSE 1
+1 25791U 99035A 99288.47797288 .00000951 00000-0 24613-3 0 296
+2 25791 24.9826 0.8275 0011076 277.4591 82.4657 14.39009052 16269
+FUSE 1
+1 25791U 99035A 99286.88287063 +.00000861 +00000-0 +21717-3 0 00634
+2 25791 024.9828 010.5602 0011200 260.5300 099.3940 14.39005892016038
+FUSE 1
+1 25791U 99035A 99285.49582403 +.00000795 +00000-0 +19630-3 0 00486
+2 25791 024.9830 019.0217 0011238 246.2842 113.6491 14.39003480015839
+FUSE 1
+1 25791U 99035A 99284.66359563 +.00000761 +00000-0 +18552-3 0 00398
+2 25791 024.9832 024.0989 0011221 237.5271 122.4154 14.39002187015718
+FUSE 1
+1 25791U 99035A 99283.97007305 .00000754 00000-0 18327-3 0 285
+2 25791 24.9830 28.3293 0011217 230.2490 129.7115 14.39001280 15618
+FUSE 1
+1 25791U 99035A 99280.71050717 +.00000608 +00000-0 +13659-3 0 00426
+2 25791 024.9832 048.2231 0011233 196.9935 163.0195 14.38996802015142
+FUSE 1
+1 25791U 99035A 99280.01698155 +.00000604 +00000-0 +13553-3 0 00286
+2 25791 024.9831 052.4539 0011244 189.6758 170.3528 14.38996155015044
+FUSE 1
+1 25791U 99035A 99279.73957122 .00000606 00000-0 13609-3 0 278
+2 25791 24.9833 54.1486 0011318 187.2744 172.7600 14.38995976 15000
+FUSE 1
+1 25791U 99035A 99278.76863587 +.00000623 +00000-0 +14143-3 0 00780
+2 25791 024.9828 060.0769 0011243 177.0793 182.9783 14.38995168014863
+FUSE 1
+1 25791U 99035A 99278.07510995 +.00000624 +00000-0 +14185-3 0 00637
+2 25791 024.9826 064.3088 0011169 169.6029 190.4711 14.38994496014765
+FUSE 1
+1 25791U 99035A 99276.75740903 +.00000633 +00000-0 +14460-3 0 00461
+2 25791 024.9823 072.3487 0011129 155.6892 204.4141 14.38993316014575
+FUSE 1
+1 25791U 99035A 99276.47999801 +.00000694 +00000-0 +16404-3 0 00358
+2 25791 024.9818 074.0450 0011207 153.0078 207.1024 14.38993598014531
+FUSE 1
+1 25791U 99035A 99275.57841241 .00000671 00000-0 15672-3 0 263
+2 25791 24.9819 79.5451 0011185 143.2379 216.8904 14.38992466 14406
+FUSE 1
+1 25791U 99035A 99272.59623714 +.00000619 +00000-0 +14032-3 0 00288
+2 25791 024.9821 097.7456 0010986 112.1476 248.0207 14.38989140013976
+FUSE 1
+1 25791U 99035A 99271.83335507 +.00000694 +00000-0 +16423-3 0 00261
+2 25791 024.9829 102.4180 0011115 105.0840 255.0961 14.38989289013860
+FUSE 1
+1 25791U 99035A 99270.93176357 .00000625 00000-0 14212-3 0 254
+2 25791 24.9833 107.9206 0010968 96.2277 263.9501 14.38987831 13739
+FUSE 1
+1 25791U 99035A 99269.82210754 +.00000624 +00000-0 +14194-3 0 00270
+2 25791 024.9836 114.6962 0010511 085.3632 274.8041 14.38987014013579
+FUSE 1
+1 25791U 99035A 99268.64310209 +.00000665 +00000-0 +15491-3 0 00260
+2 25791 024.9835 121.8881 0010538 073.0440 287.1349 14.38986259013408
+FUSE 1
+1 25791U 99035A 99267.88021393 +.00000624 +00000-0 +14182-3 0 00258
+2 25791 024.9836 126.5415 0010795 065.0791 295.0869 14.38985118013294
+FUSE 1
+1 25791U 99035A 99266.90926343 .00000583 00000-0 12888-3 0 243
+2 25791 24.9837 132.4642 0010750 54.8710 305.2813 14.38983972 13155
+FUSE 1
+1 25791U 99035A 99266.00766538 +.00000570 +00000-0 +12480-3 0 00561
+2 25791 024.9838 137.9635 0010739 045.4550 314.6838 14.38983153013021
+FUSE 1
+1 25791U 99035A 99265.03671293 +.00000579 +00000-0 +12751-3 0 00498
+2 25791 024.9838 143.8883 0010767 035.0894 325.0328 14.38982440012880
+FUSE 1
+1 25791U 99035A 99264.06575950 +.00000540 +00000-0 +11503-3 0 00439
+2 25791 024.9841 149.8130 0010718 024.5892 335.5124 14.38981393012743
+FUSE 1
+1 25791U 99035A 99263.09480512 +.00000542 +00000-0 +11581-3 0 00315
+2 25791 024.9841 155.7371 0010726 014.3641 345.7173 14.38980695012600
+FUSE 1
+1 25791U 99035A 99262.88674378 .00000509 00000-0 10546-3 0 230
+2 25791 24.9842 157.0081 0010731 11.7394 348.3365 14.38980270 12573
+FUSE 1
+1 25791U 99035A 99260.11258537 +.00000453 +00000-0 +87384-4 0 00502
+2 25791 024.9841 173.9362 0010893 342.6831 017.3307 14.38977970012170
+FUSE 1
+1 25791U 99035A 99259.07227521 +.00000447 +00000-0 +85573-4 0 00347
+2 25791 024.9841 180.2856 0010956 331.9610 028.0309 14.38977330012020
+FUSE 1
+1 25791U 99035A 99258.17067241 .00000427 00000-0 79225-4 0 220
+2 25791 24.9841 185.7874 0011007 322.1366 37.8369 14.38976734 11893
+FUSE 1
+1 25791U 99035A 99256.15940484 +.00000459 +00000-0 +89377-4 0 00465
+2 25791 024.9843 198.0620 0011104 300.6420 059.2997 14.38975981011608
+FUSE 1
+1 25791U 99035A 99255.18844792 +.00000499 +00000-0 +10205-3 0 00357
+2 25791 024.9841 203.9868 0011170 290.1305 069.8003 14.38975748011464
+FUSE 1
+1 25791U 99035A 99254.21749084 .00000578 00000-0 12715-3 0 219
+2 25791 24.9838 209.9117 0011276 279.5024 80.4212 14.38975778 11328
+FUSE 1
+1 25791U 99035A 99252.13687317 +.00000703 +00000-0 +16695-3 0 00422
+2 25791 024.9838 222.6085 0011253 257.6029 102.3226 14.38974995011027
+FUSE 1
+1 25791U 99035A 99251.16591877 +.00000740 +00000-0 +17891-3 0 00306
+2 25791 024.9838 228.5342 0011361 247.5654 112.3649 14.38974264010882
+FUSE 1
+1 25791U 99035A 99250.33367230 .00000790 00000-0 19473-3 0 200
+2 25791 24.9836 233.6120 0011410 238.7623 121.1773 14.38973707 10768
+FUSE 1
+1 25791U 99035A 99250.12561055 +.00000806 +00000-0 +20003-3 0 00780
+2 25791 024.9837 234.8822 0011380 236.5967 123.3441 14.38973616010736
+FUSE 1
+1 25791U 99035A 99249.22401093 +.00000850 +00000-0 +21378-3 0 00688
+2 25791 024.9836 240.3848 0011437 227.1228 132.8321 14.38972820010608
+FUSE 1
+1 25791U 99035A 99248.18370392 +.00000868 +00000-0 +21968-3 0 00504
+2 25791 024.9836 246.7339 0011442 216.3322 143.6406 14.38971553010453
+FUSE 1
+1 25791U 99035A 99247.14339628 +.00000893 +00000-0 +22765-3 0 00331
+2 25791 024.9835 253.0817 0011458 205.6866 154.3072 14.38970276010308
+FUSE 1
+1 25791U 99035A 99246.24179636 .00000875 00000-0 22203-3 0 193
+2 25791 24.9836 258.5836 0011512 196.4275 163.5862 14.38968832 10171
+FUSE 1
+1 25791U 99035A 99244.16117925 +.00000770 +00000-0 +18839-3 0 00526
+2 25791 024.9840 271.2810 0011478 175.5983 184.4632 14.38965078009876
+FUSE 1
+1 25791U 99035A 99243.25957613 +.00000746 +00000-0 +18082-3 0 00412
+2 25791 024.9841 276.7823 0011475 166.5838 193.4978 14.38963795009740
+FUSE 1
+1 25791U 99035A 99242.14991061 +.00000697 +00000-0 +16531-3 0 00214
+2 25791 024.9841 283.5545 0011425 155.0075 205.0993 14.38962068009589
+FUSE 1
+1 25791U 99035A 99241.45636787 .00000690 00000-0 16312-3 0 184
+2 25791 24.9841 287.7844 0011423 147.6480 212.4734 14.38961291 9483
+FUSE 1
+1 25791U 99035A 99238.54348289 +.00000555 +00000-0 +12005-3 0 00339
+2 25791 024.9851 305.5600 0011277 118.2109 241.9541 14.38957529009068
+FUSE 1
+1 25791U 99035A 99237.43380917 .00000519 00000-0 10841-3 0 178
+2 25791 24.9853 312.3322 0011217 106.6278 253.5464 14.38956402 8903
+FUSE 1
+1 25791U 99035A 99236.46284262 +.00000461 +00000-0 +90008-4 0 00705
+2 25791 024.9853 318.2560 0011086 096.8361 263.3410 14.38955295008762
+FUSE 1
+1 25791U 99035A 99236.25477872 +.00000452 +00000-0 +87040-4 0 00615
+2 25791 024.9853 319.5272 0011052 094.6665 265.5117 14.38955073008731
+FUSE 1
+1 25791U 99035A 99235.28381051 +.00000458 +00000-0 +89138-4 0 00470
+2 25791 024.9852 325.4528 0011033 084.2171 275.9597 14.38954552008598
+FUSE 1
+1 25791U 99035A 99233.61929130 +.00000451 +00000-0 +86895-4 0 00303
+2 25791 024.9853 335.6110 0010986 066.4129 293.7536 14.38953524008353
+FUSE 1
+1 25791U 99035A 99232.50961001 .00000368 00000-0 60512-4 0 162
+2 25791 24.9859 342.3821 0010848 54.6767 305.4755 14.38952340 8198
+FUSE 1
+1 25791U 99035A 99230.70637369 +.00000429 +00000-0 +79925-4 0 00424
+2 25791 024.9854 353.3830 0010964 035.3348 324.7888 14.38952031007934
+FUSE 1
+1 25791U 99035A 99229.59668927 +.00000395 +00000-0 +68969-4 0 00285
+2 25791 024.9857 000.1562 0010882 023.2043 336.8948 14.38951224007779
+FUSE 1
+1 25791U 99035A 99228.48700287 +.00000471 +00000-0 +93172-4 0 00221
+2 25791 024.9853 006.9252 0010851 011.6095 348.4667 14.38951260007619
+FUSE 1
+1 25791U 99035A 99227.72409421 .00000487 00000-0 98308-4 0 158
+2 25791 24.9851 11.5809 0010930 3.6815 356.3773 14.38950858 7502
+FUSE 1
+1 25791U 99035A 99223.56276789 .00000619 00000-0 14028-3 0 147
+2 25791 24.9842 36.9742 0011040 318.0438 41.9206 14.38948712 6903
+FUSE 1
+1 25791U 99035A 99218.63853449 .00000720 00000-0 17250-3 0 135
+2 25791 24.9828 67.0232 0011431 267.3032 92.6167 14.38944759 6193
+FUSE 1
+1 25791U 99035A 99216.97400544 +.00000683 +00000-0 +16063-3 0 00166
+2 25791 024.9829 077.1763 0011588 249.8240 110.1026 14.38942807005959
+FUSE 1
+1 25791U 99035A 99215.72561041 .00001104 00000-0 29513-3 0 127
+2 25791 24.9823 84.7905 0011295 237.0915 122.8597 14.38943232 5774
+FUSE 1
+1 25791U 99035A 99213.99172686 +.00000755 +00000-0 +18386-3 0 00281
+2 25791 024.9829 095.3690 0011291 219.0401 140.9295 14.38939332005520
+FUSE 1
+1 25791U 99035A 99213.02075147 +.00000641 +00000-0 +14744-3 0 00175
+2 25791 024.9830 101.2939 0011410 209.3286 150.6585 14.38937829005384
+FUSE 1
+1 25791U 99035A 99212.88204088 .00000581 00000-0 12826-3 0 112
+2 25791 24.9832 102.1415 0011463 208.2710 151.7177 14.38937383 5365
+FUSE 1
+1 25791U 99035A 99211.07879897 +.00000483 +00000-0 +96970-4 0 00493
+2 25791 024.9832 113.1440 0011683 189.9414 170.0864 14.38935491005102
+FUSE 1
+1 25791U 99035A 99210.10782220 +.00000457 +00000-0 +88695-4 0 00361
+2 25791 024.9830 119.0680 0011645 180.0206 180.0306 14.38934715004963
+FUSE 1
+1 25791U 99035A 99209.13684459 +.00000476 +00000-0 +94628-4 0 00215
+2 25791 024.9829 124.9914 0011669 170.0019 190.0732 14.38934254004820
+FUSE 1
+1 25791U 99035A 99208.85942248 .00000483 00000-0 96822-4 0 100
+2 25791 24.9830 126.6849 0011617 167.3014 192.7802 14.38934135 4785
+FUSE 1
+1 25791U 99035A 99208.16586648 +.00000509 +00000-0 +10534-3 0 00689
+2 25791 024.9829 130.9163 0011612 160.0034 200.0933 14.38933809004681
+FUSE 1
+1 25791U 99035A 99207.12553224 +.00000477 +00000-0 +95090-4 0 00537
+2 25791 024.9830 137.2648 0011506 149.5759 210.5420 14.38933010004534
+FUSE 1
+1 25791U 99035A 99206.15455295 +.00000436 +00000-0 +81952-4 0 00388
+2 25791 024.9831 143.1889 0011456 139.5200 220.6160 14.38932240004393
+FUSE 1
+1 25791U 99035A 99205.11421632 +.00000433 +00000-0 +81097-4 0 00221
+2 25791 024.9835 149.5359 0011411 129.0298 231.1227 14.38931694004248
+FUSE 1
+1 25791U 99035A 99204.21259024 .00000427 00000-0 79119-4 0 95
+2 25791 24.9835 155.0370 0011324 120.0292 240.1341 14.38931194 4119
+FUSE 1
+1 25791U 99035A 99203.17225182 +.00000414 +00000-0 +74992-4 0 00525
+2 25791 024.9835 161.3843 0011233 109.2556 250.9169 14.38930540003968
+FUSE 1
+1 25791U 99035A 99202.13191170 +.00000423 +00000-0 +77980-4 0 00383
+2 25791 024.9837 167.7323 0011168 098.4908 261.6865 14.38930164003818
+FUSE 1
+1 25791U 99035A 99201.16092631 +.00000440 +00000-0 +83410-4 0 00235
+2 25791 024.9837 173.6562 0011126 088.3941 271.7841 14.38929874003674
+FUSE 1
+1 25791U 99035A 99200.18994021 .00000454 00000-0 87696-4 0 88
+2 25791 24.9838 179.5806 0011119 78.2644 281.9107 14.38929532 3535
+FUSE 1
+1 25791U 99035A 99200.12059101 +.00000432 +00000-0 +80931-4 0 00725
+2 25791 024.9842 180.0407 0011095 075.8036 284.3701 14.38929430003528
+FUSE 1
+1 25791U 99035A 99199.21895964 +.00000465 +00000-0 +91252-4 0 00631
+2 25791 024.9840 185.5408 0011075 066.4980 293.6690 14.38929231003393
+FUSE 1
+1 25791U 99035A 99198.17861506 +.00000472 +00000-0 +93642-4 0 00475
+2 25791 024.9844 191.8880 0011017 055.5344 304.6202 14.38928745003245
+FUSE 1
+1 25791U 99035A 99197.20762573 +.00000483 +00000-0 +97242-4 0 00328
+2 25791 024.9845 197.8116 0010965 045.0350 315.1043 14.38928247003108
+FUSE 1
+1 25791U 99035A 99196.16727896 +.00000496 +00000-0 +10136-3 0 00130
+2 25791 024.9848 204.1584 0010927 033.8431 326.2770 14.38927757002952
+FUSE 1
+1 25791U 99035A 99195.40435724 .00000525 00000-0 11052-3 0 76
+2 25791 24.9845 208.8116 0010908 25.8212 334.2838 14.38927498 2842
+FUSE 1
+1 25791U 99035A 99195.26564445 +.00000515 +00000-0 +10744-3 0 00732
+2 25791 024.9847 209.6583 0010905 024.2058 335.8962 14.38927325002821
+FUSE 1
+1 25791U 99035A 99194.22529636 +.00000515 +00000-0 +10742-3 0 00547
+2 25791 024.9849 216.0045 0010895 012.9914 347.0873 14.38926634002672
+FUSE 1
+1 25791U 99035A 99193.18494715 +.00000545 +00000-0 +11704-3 0 00384
+2 25791 024.9850 222.3506 0010896 001.9128 358.1416 14.38926205002526
+FUSE 1
+1 25791U 99035A 99192.14459780 +.00000580 +00000-0 +12797-3 0 00193
+2 25791 024.9850 228.6966 0010908 350.8363 009.1951 14.38925741002370
+FUSE 1
+1 25791U 99035A 99191.24296126 .00000600 00000-0 13459-3 0 61
+2 25791 24.9852 234.1962 0010933 341.3306 18.6794 14.38925220 2248
+FUSE 1
+1 25791U 99035A 99189.57840234 +.00000688 +00000-0 +16244-3 0 00431
+2 25791 024.9847 244.3496 0011003 324.3520 035.6271 14.38924327002005
+FUSE 1
+1 25791U 99035A 99188.53805210 +.00000745 +00000-0 +18074-3 0 00304
+2 25791 024.9847 250.6956 0011082 313.4689 046.4896 14.38923665001857
+FUSE 1
+1 25791U 99035A 99187.56705911 +.00000776 +00000-0 +19053-3 0 00181
+2 25791 024.9847 256.6180 0011114 303.2228 056.7215 14.38922773001717
+FUSE 1
+1 25791U 99035A 99187.22027565 .00000809 00000-0 20103-3 0 57
+2 25791 24.9849 258.7334 0011145 299.6070 60.3328 14.38922625 1666
+FUSE 1
+1 25791U 99035A 99186.59606618 +.00000806 +00000-0 +20001-3 0 00658
+2 25791 024.9848 262.5402 0011144 293.0885 066.8449 14.38921812001577
+FUSE 1
+1 25791U 99035A 99185.55571694 +.00000781 +00000-0 +19209-3 0 00489
+2 25791 024.9850 268.8854 0011179 282.1384 077.7873 14.38920354001427
+FUSE 1
+1 25791U 99035A 99184.58472411 +.00000771 +00000-0 +18889-3 0 00356
+2 25791 024.9851 274.8074 0011210 272.0258 087.8967 14.38919111001282
+FUSE 1
+1 25791U 99035A 99183.61373101 +.00000806 +00000-0 +20014-3 0 00199
+2 25791 024.9851 280.7294 0011202 261.9284 097.9951 14.38918148001148
+FUSE
+1 25791U 99035A 99182.64273781 .00000831 00000-0 20827-3 0 48
+2 25791 24.9852 286.6514 0011228 251.8187 108.1089 14.38917064 1005
+FUSE
+1 25791U 99035A 99181.53303177 +.00000885 +00000-0 +22535-3 0 00326
+2 25791 024.9851 293.4193 0011207 240.2024 119.7372 14.38915842000848
+FUSE
+1 25791U 99035A 99180.42332586 +.00000769 +00000-0 +18844-3 0 00250
+2 25791 024.9851 300.1870 0011210 228.6224 131.3324 14.38913850000688
+FUSE
+1 25791U 99035A 99179.72975929 +.00000701 +00000-0 +16654-3 0 00225
+2 25791 024.9851 304.4168 0011211 221.3620 138.6046 14.38912818000589
+FUSE
+1 25791U 99035A 99178.68940879 +.00000540 +00000-0 +11515-3 0 00070
+2 25791 024.9851 310.7614 0011204 210.4757 149.5099 14.38911405000431
+FUSE
+1 25791U 99035A 99178.55069535 .00000518 00000-0 10814-3 0 39
+2 25791 24.9851 311.6073 0011204 209.0295 150.9590 14.38911233 410
+FUSE
+1 25791U 99035A 99177.92648488 +.00000082 +00000-0 -31136-4 0 00408
+2 25791 024.9853 315.4140 0011227 202.4549 157.5464 14.38909900000324
+FUSE
+1 25791U 99035A 99176.95549150 -.00001333 +00000-0 -48314-3 0 00075
+2 25791 024.9860 321.3361 0010962 190.9807 169.0438 14.38907601000185
diff --git a/src/cal/get_tle/tmp/FUSE.TLE b/src/cal/get_tle/tmp/FUSE.TLE
new file mode 100644
index 0000000..75e788e
--- /dev/null
+++ b/src/cal/get_tle/tmp/FUSE.TLE
@@ -0,0 +1,5205 @@
+FUSE 1
+1 25791U 99035A 03334.81529517 .00000629 00000-0 13611-3 0 73
+2 25791 24.9828 141.7372 0010396 237.2837 122.6662 14.41449325233814
+FUSE 1
+1 25791U 99035A 03332.32285756 .00000721 00000-0 16400-3 0 51
+2 25791 24.9827 157.0092 0010498 210.6638 149.3252 14.41447882233456
+FUSE 1
+1 25791U 99035A 03331.90745146 +.00000729 +00000-0 +16628-3 0 00081
+2 25791 024.9828 159.5554 0010553 206.5242 153.4727 14.41447542233393
+FUSE 1
+1 25791U 99035A 03331.14587356 .00000725 00000-0 16505-3 0 40
+2 25791 24.9828 164.2238 0010646 198.4715 161.5398 14.41446726233287
+FUSE 1
+1 25791U 99035A 03329.89965515 .00000696 00000-0 15651-3 0 33
+2 25791 24.9826 171.8592 0010670 185.6347 174.4062 14.41445181233104
+FUSE 1
+1 25791U 99035A 03328.86113523 +.00000610 +00000-0 +13023-3 0 00030
+2 25791 024.9825 178.2061 0010624 174.6707 185.3915 14.41444336232953
+FUSE 1
+1 25791U 99035A 03328.79190076 .00000678 00000-0 15092-3 0 21
+2 25791 24.9829 178.6308 0010612 173.9957 186.0679 14.41444516232945
+FUSE 1
+1 25791U 99035A 03327.89185200 +.00000523 +00000-0 +10396-3 0 00058
+2 25791 024.9836 184.1428 0010625 164.7116 195.3708 14.41443393232811
+FUSE 1
+1 25791U 99035A 03327.06103806 .00000946 00000-0 23212-3 0 15
+2 25791 24.9839 189.2348 0010607 156.0117 204.0892 14.41443370232699
+FUSE 1
+1 25791U 99035A 03326.92256930 +.00001217 +00000-0 +31425-3 0 00068
+2 25791 024.9831 190.0850 0010666 154.7022 205.4026 14.41443784232675
+FUSE 1
+1 25791U 99035A 03325.81481645 .00001001 00000-0 24877-3 0 06
+2 25791 24.9833 196.8767 0010686 142.8583 217.2666 14.41441143232511
+FUSE 1
+1 25791U 99035A 03324.91476442 +.00000578 +00000-0 +12056-3 0 00021
+2 25791 024.9828 202.3884 0010744 133.5472 226.5911 14.41438825232381
+FUSE 1
+1 25791U 99035A 03323.94547862 +.00000358 +00000-0 +54039-4 0 00011
+2 25791 024.9832 208.3404 0010860 124.8670 235.2866 14.41437713232248
+FUSE 1
+1 25791U 99035A 03322.90695295 +.00000456 +00000-0 +83650-4 0 00009
+2 25791 024.9834 214.7019 0010853 115.1433 245.0191 14.41437815232091
+FUSE 1
+1 25791U 99035A 03321.93766319 +.00000482 +00000-0 +91492-4 0 00223
+2 25791 024.9834 220.6386 0010837 104.6262 255.5450 14.41437349231959
+FUSE 1
+1 25791U 99035A 03320.89913707 +.00000498 +00000-0 +96406-4 0 09969
+2 25791 024.9836 226.9996 0010817 093.6241 266.5508 14.41436631231802
+FUSE 1
+1 25791U 99035A 03319.92984440 +.00000599 +00000-0 +12716-3 0 09988
+2 25791 024.9836 232.9378 0010741 083.7324 276.4412 14.41436361231669
+FUSE 1
+1 25791U 99035A 03318.96055095 +.00000529 +00000-0 +10579-3 0 00064
+2 25791 024.9837 238.8759 0010678 074.0237 286.1451 14.41435571231521
+FUSE 1
+1 25791U 99035A 03317.92202182 +.00000413 +00000-0 +70728-4 0 00021
+2 25791 024.9840 245.2398 0010704 063.5995 296.5616 14.41434631231377
+FUSE 1
+1 25791U 99035A 03316.95272605 +.00000470 +00000-0 +88022-4 0 09972
+2 25791 024.9836 251.1803 0010590 053.6350 306.5138 14.41434475231239
+FUSE 1
+1 25791U 99035A 03315.91419451 +.00000359 +00000-0 +54432-4 0 09951
+2 25791 024.9837 257.5405 0010596 042.7776 317.3563 14.41433347231087
+FUSE 1
+1 25791U 99035A 03314.94489683 +.00000376 +00000-0 +59442-4 0 00177
+2 25791 024.9838 263.4782 0010541 032.5623 327.5544 14.41433068230946
+FUSE 1
+1 25791U 99035A 03313.97559885 +.00000299 +00000-0 +36081-4 0 09921
+2 25791 024.9837 269.4165 0010540 022.3690 337.7277 14.41432334230802
+FUSE 1
+1 25791U 99035A 03312.93706443 +.00000584 +00000-0 +12243-3 0 09931
+2 25791 024.9834 275.7793 0010504 011.6272 348.4499 14.41433055230652
+FUSE 1
+1 25791U 99035A 03311.96776569 +.00000350 +00000-0 +51482-4 0 09939
+2 25791 024.9833 281.7181 0010408 001.6598 358.3945 14.41431695230511
+FUSE 1
+1 25791U 99035A 03310.65228737 +.00000444 +00000-0 +80221-4 0 09930
+2 25791 024.9835 289.7793 0010257 347.5217 012.5005 14.41431193230320
+FUSE 1
+1 25791U 99035A 03309.40604522 +.00000467 +00000-0 +87049-4 0 00145
+2 25791 024.9835 297.4135 0010238 333.3895 026.6085 14.41430141230146
+FUSE 1
+1 25791U 99035A 03308.78292393 +.00000641 +00000-0 +13975-3 0 09895
+2 25791 024.9836 301.2316 0010231 327.1757 032.8108 14.41430126230051
+FUSE 1
+1 25791U 99035A 03307.39821018 +.00000487 +00000-0 +93143-4 0 09853
+2 25791 024.9836 309.7266 0009954 308.3405 051.6212 14.41427785229857
+FUSE 1
+1 25791U 99035A 03306.42890957 +.00001374 +00000-0 +36220-3 0 09920
+2 25791 024.9826 315.6681 0010109 298.0220 061.9265 14.41428485229712
+FUSE 1
+1 25791U 99035A 03305.45960939 +.00002012 +00000-0 +55551-3 0 00086
+2 25791 024.9823 321.6056 0010134 287.9208 072.0205 14.41427385229572
+FUSE 1
+1 25791U 99035A 03304.49030907 +.00002090 +00000-0 +57918-3 0 09839
+2 25791 024.9820 327.5453 0010274 277.3913 082.5438 14.41423770229439
+FUSE 1
+1 25791U 99035A 03303.52100790 +.00001430 +00000-0 +37917-3 0 09979
+2 25791 024.9824 333.4868 0010388 267.0794 092.8530 14.41418570229291
+FUSE 1
+1 25791U 99035A 03303.24406524 .00000959 00000-0 23638-3 0 9826
+2 25791 24.9827 335.1872 0010550 264.3245 95.6061 14.41416153229251
+FUSE 1
+1 25791U 99035A 03302.20552450 .00001096 00000-0 27769-3 0 9812
+2 25791 24.9825 341.5507 0010562 253.8882 106.0488 14.41414636229106
+FUSE 1
+1 25791U 99035A 03300.54385630 .00000645 00000-0 14088-3 0 9809
+2 25791 24.9828 351.7298 0010742 236.4738 123.4745 14.41411128228860
+FUSE 1
+1 25791U 99035A 03299.22836924 .00000522 00000-0 10377-3 0 9797
+2 25791 24.9826 359.7898 0010802 223.1838 136.7831 14.41409442228671
+FUSE 1
+1 25791U 99035A 03297.56670010 .00000441 00000-0 79217-4 0 9782
+2 25791 24.9828 9.9670 0010755 205.8604 154.1368 14.41407956228431
+FUSE 1
+1 25791U 99035A 03295.69732098 +.00000439 +00000-0 +78644-4 0 09778
+2 25791 024.9823 021.4161 0010726 186.3436 173.6933 14.41406877228169
+FUSE 1
+1 25791U 99035A 03294.58954049 .00000442 00000-0 79553-4 0 9760
+2 25791 24.9822 28.2003 0010717 174.4425 185.6202 14.41406259228003
+FUSE 1
+1 25791U 99035A 03293.68946830 +.00000437 +00000-0 +78059-4 0 09808
+2 25791 024.9822 033.7128 0010712 164.9748 195.1079 14.41405735227879
+FUSE 1
+1 25791U 99035A 03293.55099557 .00000435 00000-0 77377-4 0 9753
+2 25791 24.9823 34.5611 0010708 163.5206 196.5648 14.41405674227852
+FUSE 1
+1 25791U 99035A 03292.85863226 +.00000395 +00000-0 +65203-4 0 00006
+2 25791 024.9822 038.8017 0010732 156.0067 204.0939 14.41405084227759
+FUSE 1
+1 25791U 99035A 03292.09703250 .00000466 00000-0 86677-4 0 9749
+2 25791 24.9816 43.4715 0010662 147.9465 212.1683 14.41404859227645
+FUSE 1
+1 25791U 99035A 03290.98925305 .00000496 00000-0 95741-4 0 9736
+2 25791 24.9815 50.2722 0010596 136.9264 223.2143 14.41404097227489
+FUSE 1
+1 25791U 99035A 03289.81223159 .00000457 00000-0 84144-4 0 9725
+2 25791 24.9826 57.4936 0010620 125.6318 234.5184 14.41403544227318
+FUSE 1
+1 25791U 99035A 03288.77368245 +.00000424 +00000-0 +74086-4 0 09802
+2 25791 024.9826 063.8560 0010538 115.2199 244.9403 14.41402817227166
+FUSE 1
+1 25791U 99035A 03288.56597245 .00000409 00000-0 69342-4 0 9715
+2 25791 24.9830 65.1298 0010470 113.2118 246.9490 14.41402657227135
+FUSE 1
+1 25791U 99035A 03287.80436833 +.00000487 +00000-0 +93214-4 0 09863
+2 25791 024.9823 069.7945 0010522 105.3271 254.8405 14.41402718227026
+FUSE 1
+1 25791U 99035A 03286.83505381 .00000474 00000-0 89149-4 0 9701
+2 25791 24.9821 75.7317 0010429 95.3344 264.8358 14.41401993226884
+FUSE 1
+1 25791U 99035A 03285.86573823 +.00000465 +00000-0 +86378-4 0 09878
+2 25791 024.9822 081.6696 0010346 085.1348 275.0344 14.41401345226745
+FUSE 1
+1 25791U 99035A 03285.58879111 .00000442 00000-0 79392-4 0 9699
+2 25791 24.9825 83.3678 0010296 82.0216 278.1456 14.41400988226707
+FUSE 1
+1 25791U 99035A 03284.55023662 .00000447 00000-0 80990-4 0 9687
+2 25791 24.9825 89.7291 0010201 70.9880 289.1734 14.41400492226551
+FUSE 1
+1 25791U 99035A 03282.88854730 .00000440 00000-0 79027-4 0 9670
+2 25791 24.9825 99.9047 0010178 53.4478 306.6963 14.41399534226312
+FUSE 1
+1 25791U 99035A 03281.84998986 .00000468 00000-0 87538-4 0 9662
+2 25791 24.9822 106.2646 0010191 42.5792 317.5504 14.41399184226165
+FUSE 1
+1 25791U 99035A 03280.94990632 +.00000467 +00000-0 +87263-4 0 09712
+2 25791 024.9824 111.7767 0010189 033.0995 327.0149 14.41398673226038
+FUSE 1
+1 25791U 99035A 03280.81143207 .00000455 00000-0 83540-4 0 9650
+2 25791 24.9826 112.6255 0010186 31.4564 328.6551 14.41398503226017
+FUSE 1
+1 25791U 99035A 03279.91134723 +.00000485 +00000-0 +92641-4 0 09747
+2 25791 024.9824 118.1376 0010154 021.8776 338.2165 14.41398227225888
+FUSE 1
+1 25791U 99035A 03279.01126251 .00000481 00000-0 91312-4 0 9644
+2 25791 24.9824 123.6499 0010153 12.3561 347.7194 14.41397643225755
+FUSE 1
+1 25791U 99035A 03278.94202521 +.00000481 +00000-0 +91337-4 0 09906
+2 25791 024.9824 124.0738 0010152 011.6408 348.4333 14.41397601225743
+FUSE 1
+1 25791U 99035A 03277.97270237 +.00000495 +00000-0 +95508-4 0 09681
+2 25791 024.9827 130.0106 0010132 001.2425 358.8110 14.41397155225601
+FUSE 1
+1 25791U 99035A 03277.90346511 .00000490 00000-0 94065-4 0 9630
+2 25791 24.9828 130.4350 0010138 0.4734 359.5783 14.41397083225599
+FUSE 1
+1 25791U 99035A 03276.03405565 .00000520 00000-0 10314-3 0 9625
+2 25791 24.9827 141.8830 0010124 340.4951 19.5169 14.41396123225326
+FUSE 1
+1 25791U 99035A 03275.96481828 +.00000519 +00000-0 +10285-3 0 09740
+2 25791 024.9827 142.3069 0010124 339.7655 020.2450 14.41396066225315
+FUSE 1
+1 25791U 99035A 03274.99549511 .00000510 00000-0 10007-3 0 9615
+2 25791 24.9826 148.2432 0010136 329.5837 30.4082 14.41395326225171
+FUSE 1
+1 25791U 99035A 03273.95693438 +.00000508 +00000-0 +99668-4 0 09650
+2 25791 024.9828 154.6032 0010134 318.6446 041.3297 14.41394631225024
+FUSE 1
+1 25791U 99035A 03273.88769694 .00000499 00000-0 96894-4 0 9602
+2 25791 24.9830 155.0276 0010143 317.9041 42.0681 14.41394528225014
+FUSE 1
+1 25791U 99035A 03272.91837360 +.00000497 +00000-0 +96337-4 0 09713
+2 25791 024.9831 160.9638 0010155 307.6849 052.2737 14.41393912224871
+FUSE 1
+1 25791U 99035A 03272.15676230 .00000502 00000-0 97734-4 0 9591
+2 25791 24.9829 165.6274 0010158 299.6477 60.3019 14.41393430224762
+FUSE 1
+1 25791U 99035A 03270.91049028 .00000459 00000-0 84530-4 0 9582
+2 25791 24.9828 173.2617 0010180 286.1903 73.7484 14.41392360224582
+FUSE 1
+1 25791U 99035A 03269.59498120 .00000447 00000-0 80950-4 0 9573
+2 25791 24.9826 181.3203 0010142 272.2580 87.6765 14.41391553224394
+FUSE 1
+1 25791U 99035A 03268.97184558 +.00000445 +00000-0 +80376-4 0 09728
+2 25791 024.9827 185.1382 0010173 265.5171 094.4175 14.41391194224303
+FUSE 1
+1 25791U 99035A 03268.21023535 .00000414 00000-0 70946-4 0 9562
+2 25791 24.9826 189.8028 0010188 257.2495 102.6873 14.41390641224193
+FUSE 1
+1 25791U 99035A 03266.96396409 +.00000465 +00000-0 +86405-4 0 09591
+2 25791 024.9820 197.4355 0010222 244.5075 115.4384 14.41390276224011
+FUSE 1
+1 25791U 99035A 03266.89472691 .00000397 00000-0 65865-4 0 9558
+2 25791 24.9820 197.8595 0010244 243.7321 116.2133 14.41389876224004
+FUSE 1
+1 25791U 99035A 03265.92540594 +.00000421 +00000-0 +73184-4 0 09583
+2 25791 024.9820 203.7991 0010303 233.3804 126.5767 14.41389519223862
+FUSE 1
+1 25791U 99035A 03265.85616889 .00000313 00000-0 40304-4 0 9540
+2 25791 24.9821 204.2231 0010301 232.5282 127.4287 14.41388972223853
+FUSE 1
+1 25791U 99035A 03264.95608437 +.00000413 +00000-0 +70600-4 0 09600
+2 25791 024.9825 209.7349 0010306 222.8574 137.1133 14.41389145223725
+FUSE 1
+1 25791U 99035A 03264.47142380 .00000318 00000-0 41810-4 0 9534
+2 25791 24.9828 212.7038 0010331 217.6796 142.2976 14.41388613223656
+FUSE 1
+1 25791U 99035A 03263.98676299 +.00000580 +00000-0 +12130-3 0 09634
+2 25791 024.9828 215.6716 0010371 212.5398 147.4473 14.41389300223582
+FUSE 1
+1 25791U 99035A 03263.22515633 .00000537 00000-0 10820-3 0 9529
+2 25791 24.9833 220.3517 0010502 204.2952 155.7061 14.41388708223474
+FUSE 1
+1 25791U 99035A 03262.18659921 .00000379 00000-0 60457-4 0 9517
+2 25791 24.9840 226.7147 0010614 193.4882 166.5362 14.41387701223326
+FUSE 1
+1 25791U 99035A 03260.94032957 +.00000309 +00000-0 +39078-4 0 09544
+2 25791 024.9847 234.3525 0010738 180.7298 179.3196 14.41387027223143
+FUSE 1
+1 25791U 99035A 03260.59414308 .00000321 00000-0 42703-4 0 9508
+2 25791 24.9846 236.4723 0010751 177.3006 182.7566 14.41387012223096
+FUSE 1
+1 25791U 99035A 03259.62482160 +.00000345 +00000-0 +49962-4 0 09512
+2 25791 024.9849 242.4122 0010762 167.3136 192.7647 14.41386920222956
+FUSE 1
+1 25791U 99035A 03259.48634698 .00000346 00000-0 50207-4 0 9493
+2 25791 24.9851 243.2626 0010790 166.2982 193.7819 14.41386915222939
+FUSE 1
+1 25791U 99035A 03258.79397436 +.00000352 +00000-0 +52081-4 0 09637
+2 25791 024.9852 247.5042 0010849 159.0756 201.0196 14.41386761222832
+FUSE 1
+1 25791U 99035A 03258.24007588 .00000371 00000-0 57900-4 0 9482
+2 25791 24.9858 250.9015 0011010 153.8841 206.2222 14.41386865222757
+FUSE 1
+1 25791U 99035A 03257.33999071 +.00000378 +00000-0 +60212-4 0 09553
+2 25791 024.9856 256.4136 0010989 144.6365 215.4873 14.41386567222622
+FUSE 1
+1 25791U 99035A 03257.20151615 .00000373 00000-0 58654-4 0 9476
+2 25791 24.9858 257.2623 0010972 143.2340 216.8919 14.41386487222609
+FUSE 1
+1 25791U 99035A 03255.47058133 .00000387 00000-0 62819-4 0 9466
+2 25791 24.9862 267.8626 0010955 125.3598 234.7940 14.41385975222357
+FUSE 1
+1 25791U 99035A 03254.50125662 +.00000395 +00000-0 +65424-4 0 09599
+2 25791 024.9864 273.7990 0010932 115.3011 244.8633 14.41385685222217
+FUSE 1
+1 25791U 99035A 03254.22430627 .00000409 00000-0 69456-4 0 9458
+2 25791 24.9864 275.4955 0010924 112.3361 247.8299 14.41385695222170
+FUSE 1
+1 25791U 99035A 03253.46269339 +.00000419 +00000-0 +72692-4 0 09663
+2 25791 024.9863 280.1591 0010929 104.3257 255.8466 14.41385425222062
+FUSE 1
+1 25791U 99035A 03252.49336705 .00000424 00000-0 74176-4 0 9448
+2 25791 24.9866 286.0950 0010932 94.0918 266.0842 14.41385027221926
+FUSE 1
+1 25791U 99035A 03251.52403956 +.00000424 +00000-0 +73986-4 0 09576
+2 25791 024.9869 292.0308 0010917 083.9198 276.2554 14.41384578221780
+FUSE 1
+1 25791U 99035A 03251.24708871 .00000426 00000-0 74604-4 0 9434
+2 25791 24.9872 293.7274 0010909 80.9459 279.2282 14.41384483221744
+FUSE 1
+1 25791U 99035A 03250.97013781 +.00000418 +00000-0 +72375-4 0 09740
+2 25791 024.9873 295.4231 0010905 078.1232 282.0498 14.41384291221705
+FUSE 1
+1 25791U 99035A 03249.86233339 +.00000400 +00000-0 +66776-4 0 09423
+2 25791 024.9871 302.2068 0010890 066.3519 293.8131 14.41383569221541
+FUSE 1
+1 25791U 99035A 03248.96224150 +.00000395 +00000-0 +65318-4 0 09428
+2 25791 024.9864 307.7247 0010716 058.1747 301.9802 14.41383147221415
+FUSE 1
+1 25791U 99035A 03248.82376522 .00000395 00000-0 65312-4 0 9417
+2 25791 24.9864 308.5726 0010716 56.7210 303.4300 14.41383087221395
+FUSE 1
+1 25791U 99035A 03247.57748243 .00000413 00000-0 70836-4 0 9408
+2 25791 24.9872 316.2080 0010565 43.8549 316.2796 14.41382788221216
+FUSE 1
+1 25791U 99035A 03246.53891243 .00000409 00000-0 69731-4 0 9397
+2 25791 24.9871 322.5678 0010569 32.9529 327.1635 14.41382255221064
+FUSE 1
+1 25791U 99035A 03245.63881795 +.00000407 +00000-0 +68920-4 0 09609
+2 25791 024.9867 328.0798 0010586 023.6313 336.4682 14.41381788220930
+FUSE 1
+1 25791U 99035A 03244.87719914 +.00000397 +00000-0 +66048-4 0 09390
+2 25791 024.9864 332.7446 0010573 015.6956 344.3874 14.41381338220829
+FUSE 1
+1 25791U 99035A 03244.80796102 .00000402 00000-0 67416-4 0 9383
+2 25791 24.9865 333.1693 0010551 14.8812 345.2004 14.41381368220814
+FUSE 1
+1 25791U 99035A 03243.56167487 .00000400 00000-0 66930-4 0 9370
+2 25791 24.9861 340.8025 0010455 2.0304 358.0247 14.41380812220636
+FUSE 1
+1 25791U 99035A 03242.10768214 .00000384 00000-0 61838-4 0 9366
+2 25791 24.9858 349.7084 0010398 346.8053 13.2597 14.41380003220428
+FUSE 1
+1 25791U 99035A 03240.86139314 .00000177 00000-0 -91380-6 0 9357
+2 25791 24.9845 357.3695 0010244 330.3925 29.6003 14.41377473220243
+FUSE 1
+1 25791U 99035A 03239.19967539 .00000180 00000-0 -11405-6 0 9342
+2 25791 24.9845 7.5442 0010244 312.9466 47.0181 14.41377475220000
+FUSE 1
+1 25791U 99035A 03237.81491175 .00000180 00000-0 -10791-6 0 9333
+2 25791 24.9845 16.0231 0010244 298.4083 61.5391 14.41377477219806
+FUSE 1
+1 25791U 99035A 03236.70710174 +.00000180 +00000-0 -12297-6 0 09505
+2 25791 024.9845 022.8062 0010244 286.7778 073.1606 14.41377478219645
+FUSE 1
+1 25791U 99035A 03235.87624491 .00000430 00000-0 75902-4 0 9325
+2 25791 24.9843 27.8971 0010286 277.4878 82.4467 14.41377926219524
+FUSE 1
+1 25791U 99035A 03234.56072309 .00000420 00000-0 72808-4 0 9315
+2 25791 24.9844 35.9594 0010466 263.3036 96.6284 14.41377185219336
+FUSE 1
+1 25791U 99035A 03232.89901222 .00000471 00000-0 88341-4 0 9308
+2 25791 24.9843 46.1371 0010503 245.8515 114.0899 14.41376268219092
+FUSE 1
+1 25791U 99035A 03231.92968258 +.00000350 +00000-0 +51702-4 0 09300
+2 25791 024.9843 052.0765 0010506 236.3120 123.6400 14.41375219218958
+FUSE 1
+1 25791U 99035A 03231.86044481 .00000313 00000-0 40315-4 0 9291
+2 25791 24.9843 52.5008 0010526 235.7646 124.1874 14.41375001218940
+FUSE 1
+1 25791U 99035A 03230.89111324 +.00000349 +00000-0 +51379-4 0 09464
+2 25791 024.9839 058.4375 0010590 225.8512 134.1126 14.41374740218805
+FUSE 1
+1 25791U 99035A 03229.99102053 .00000344 00000-0 49608-4 0 9289
+2 25791 24.9838 63.9510 0010593 216.5837 143.3947 14.41374377218670
+FUSE 1
+1 25791U 99035A 03228.88321397 .00000376 00000-0 59327-4 0 9273
+2 25791 24.9835 70.7358 0010594 204.9564 155.0432 14.41374173218518
+FUSE 1
+1 25791U 99035A 03227.84464580 .00000382 00000-0 61272-4 0 9268
+2 25791 24.9832 77.0969 0010595 194.0430 165.9784 14.41373732218368
+FUSE 1
+1 25791U 99035A 03226.18293582 .00000373 00000-0 58388-4 0 9259
+2 25791 24.9829 87.2795 0010731 178.1810 181.8718 14.41372848218126
+FUSE 1
+1 25791U 99035A 03225.07512980 .00000318 00000-0 41806-4 0 9247
+2 25791 24.9835 94.0680 0010816 167.1667 192.9121 14.41372136217966
+FUSE 1
+1 25791U 99035A 03223.96732209 +.00000355 +00000-0 +53136-4 0 09274
+2 25791 024.9833 100.8554 0010794 156.0215 204.0798 14.41372011217801
+FUSE 1
+1 25791U 99035A 03223.89808455 .00000296 00000-0 35300-4 0 9236
+2 25791 24.9836 101.2807 0010797 155.4595 204.6427 14.41371615217799
+FUSE 1
+1 25791U 99035A 03222.92875220 +.00000342 +00000-0 +49175-4 0 09263
+2 25791 024.9836 107.2168 0010792 144.9594 215.1626 14.41371640217653
+FUSE 1
+1 25791U 99035A 03222.85951409 .00000389 00000-0 63357-4 0 9224
+2 25791 24.9835 107.6416 0010784 144.0445 216.0785 14.41371877217646
+FUSE 1
+1 25791U 99035A 03221.12856271 .00000472 00000-0 88663-4 0 9213
+2 25791 24.9830 118.2449 0010733 126.0331 234.1179 14.41371231217397
+FUSE 1
+1 25791U 99035A 03219.95151328 +.00000389 +00000-0 +63388-4 0 09249
+2 25791 024.9833 125.4565 0010532 114.7019 245.4588 14.41370330217223
+FUSE 1
+1 25791U 99035A 03219.88227503 .00000360 00000-0 54766-4 0 9205
+2 25791 24.9833 125.8804 0010481 114.1240 246.0365 14.41370138217211
+FUSE 1
+1 25791U 99035A 03218.98217790 +.00000310 +00000-0 +39570-4 0 09270
+2 25791 024.9834 131.3939 0010359 104.8947 255.2709 14.41369450217081
+FUSE 1
+1 25791U 99035A 03218.22055588 .00000325 00000-0 43896-4 0 9195
+2 25791 24.9833 136.0582 0010328 97.1561 263.0126 14.41369334216976
+FUSE 1
+1 25791U 99035A 03216.97426484 +.00000324 +00000-0 +43677-4 0 09200
+2 25791 024.9831 143.6927 0010266 083.9318 276.2359 14.41368918216796
+FUSE 1
+1 25791U 99035A 03216.90502635 .00000324 00000-0 43789-4 0 9187
+2 25791 24.9831 144.1168 0010254 83.2226 276.9448 14.41368901216784
+FUSE 1
+1 25791U 99035A 03215.93568806 +.00000306 +00000-0 +38302-4 0 09186
+2 25791 024.9831 150.0535 0010228 073.0379 287.1257 14.41368459216640
+FUSE 1
+1 25791U 99035A 03215.86644944 .00000306 00000-0 38426-4 0 9172
+2 25791 24.9830 150.4777 0010251 72.2855 287.8766 14.41368430216637
+FUSE 1
+1 25791U 99035A 03214.27396229 .00000303 00000-0 37387-4 0 9167
+2 25791 24.9829 160.2299 0010215 55.5824 304.5651 14.41367999216407
+FUSE 1
+1 25791U 99035A 03213.23538267 .00000307 00000-0 38665-4 0 9155
+2 25791 24.9828 166.5915 0010190 44.3110 315.8212 14.41367720216259
+FUSE 1
+1 25791U 99035A 03211.98908622 +.00000313 +00000-0 +40404-4 0 09196
+2 25791 024.9827 174.2250 0010179 031.1264 328.9848 14.41367405216077
+FUSE 1
+1 25791U 99035A 03211.29669883 .00000314 00000-0 40736-4 0 9147
+2 25791 24.9825 178.4652 0010188 23.8546 336.2433 14.41367209215970
+FUSE 1
+1 25791U 99035A 03210.95050531 +.00000311 +00000-0 +39816-4 0 09147
+2 25791 024.9826 180.5863 0010167 019.9914 340.1003 14.41367090215921
+FUSE 1
+1 25791U 99035A 03210.25811739 .00000298 00000-0 35831-4 0 9131
+2 25791 24.9827 184.8260 0010169 12.8248 347.2517 14.41366825215826
+FUSE 1
+1 25791U 99035A 03209.98116198 +.00000355 +00000-0 +53278-4 0 09203
+2 25791 024.9828 186.5250 0010134 009.7829 350.2881 14.41367237215788
+FUSE 1
+1 25791U 99035A 03209.21953520 .00000362 00000-0 55372-4 0 9123
+2 25791 24.9829 191.1892 0010126 1.8534 358.2012 14.41367046215670
+FUSE 1
+1 25791U 99035A 03207.41932608 .00000397 00000-0 65919-4 0 9112
+2 25791 24.9834 202.2142 0010129 342.4913 17.5242 14.41366581215411
+FUSE 1
+1 25791U 99035A 03206.24226672 .00000379 00000-0 60573-4 0 9109
+2 25791 24.9836 209.4233 0010138 329.9393 30.0533 14.41365965215244
+FUSE 1
+1 25791U 99035A 03204.85749015 .00000390 00000-0 63688-4 0 9096
+2 25791 24.9836 217.9044 0010134 314.4685 45.4984 14.41365469215044
+FUSE 1
+1 25791U 99035A 03203.47271543 .00000301 00000-0 36716-4 0 9082
+2 25791 24.9838 226.3867 0010127 298.5921 61.3578 14.41364370214843
+FUSE 1
+1 25791U 99035A 03202.50337269 +.00000333 +00000-0 +46557-4 0 09082
+2 25791 024.9834 232.3257 0010184 287.7687 072.1712 14.41364273214708
+FUSE 1
+1 25791U 99035A 03202.43413602 .00000335 00000-0 47009-4 0 9074
+2 25791 24.9835 232.7499 0010187 287.0863 72.8636 14.41364263214692
+FUSE 1
+1 25791U 99035A 03200.49545146 .00000183 00000-0 84321-6 0 9067
+2 25791 24.9838 244.6283 0010314 266.2072 93.7255 14.41363179214415
+FUSE 1
+1 25791U 99035A 03199.24916265 .00000402 00000-0 67231-4 0 9053
+2 25791 24.9834 252.3006 0010423 253.2621 106.6748 14.41363500214236
+FUSE 1
+1 25791U 99035A 03197.58743701 .00000400 00000-0 66746-4 0 9048
+2 25791 24.9833 262.4772 0010401 235.9965 123.9556 14.41362839213996
+FUSE 1
+1 25791U 99035A 03196.61809736 +.00000504 +00000-0 +98396-4 0 09043
+2 25791 024.9830 268.4132 0010415 225.8377 134.1285 14.41362729213855
+FUSE 1
+1 25791U 99035A 03196.54885888 .00000449 00000-0 81664-4 0 9034
+2 25791 24.9830 268.8370 0010432 225.2935 134.6725 14.41362452213842
+FUSE 1
+1 25791U 99035A 03195.64875805 +.00000455 +00000-0 +83486-4 0 09224
+2 25791 024.9829 274.3493 0010447 216.0256 143.9548 14.41361982213717
+FUSE 1
+1 25791U 99035A 03194.88713482 +.00000400 +00000-0 +66658-4 0 09032
+2 25791 024.9833 279.0133 0010462 208.0340 151.9610 14.41361395213602
+FUSE 1
+1 25791U 99035A 03194.81789616 .00000397 00000-0 65761-4 0 9025
+2 25791 24.9833 279.4379 0010462 207.3064 152.6887 14.41361358213594
+FUSE 1
+1 25791U 99035A 03193.57160311 .00000394 00000-0 64958-4 0 9015
+2 25791 24.9835 287.0727 0010549 194.3193 165.7017 14.41360869213419
+FUSE 1
+1 25791U 99035A 03192.53302554 .00000384 00000-0 62038-4 0 9002
+2 25791 24.9837 293.4343 0010602 183.6268 176.4166 14.41360386213261
+FUSE 1
+1 25791U 99035A 03191.35597034 .00000393 00000-0 64745-4 0 8994
+2 25791 24.9836 300.6430 0010601 171.2654 188.8044 14.41359972213091
+FUSE 1
+1 25791U 99035A 03190.17891471 .00000398 00000-0 66148-4 0 8988
+2 25791 24.9835 307.8521 0010640 158.8269 201.2681 14.41359500212921
+FUSE 1
+1 25791U 99035A 03188.93261973 +.00000398 +00000-0 +66190-4 0 08984
+2 25791 024.9836 315.4853 0010668 145.8317 214.2878 14.41358965212741
+FUSE 1
+1 25791U 99035A 03188.86338107 .00000398 00000-0 66279-4 0 8977
+2 25791 24.9837 315.9093 0010668 145.1176 215.0032 14.41358942212734
+FUSE 1
+1 25791U 99035A 03187.89403965 +.00000399 +00000-0 +66534-4 0 09149
+2 25791 024.9837 321.8470 0010683 135.2787 224.8581 14.41358544212593
+FUSE 1
+1 25791U 99035A 03187.54784627 .00000403 00000-0 67680-4 0 8966
+2 25791 24.9839 323.9680 0010707 131.6538 228.4889 14.41358445212548
+FUSE 1
+1 25791U 99035A 03186.23230982 .00000406 00000-0 68626-4 0 8954
+2 25791 24.9839 332.0260 0010696 118.3365 241.8223 14.41357879212350
+FUSE 1
+1 25791U 99035A 03185.12448869 .00000396 00000-0 65488-4 0 8946
+2 25791 24.9837 338.8117 0010654 106.8250 253.3431 14.41357267212194
+FUSE 1
+1 25791U 99035A 03183.87818800 .00000395 00000-0 65374-4 0 8934
+2 25791 24.9840 346.4456 0010638 93.9282 266.2445 14.41356752212019
+FUSE 1
+1 25791U 99035A 03182.90884166 +.00000400 +00000-0 +66995-4 0 09146
+2 25791 024.9842 352.3832 0010602 083.8848 276.2865 14.41356408211870
+FUSE 1
+1 25791U 99035A 03182.56264693 .00000389 00000-0 63591-4 0 8925
+2 25791 24.9841 354.5053 0010564 80.1314 280.0389 14.41356127211820
+FUSE 1
+1 25791U 99035A 03181.93949462 +.00000396 +00000-0 +65802-4 0 09194
+2 25791 024.9843 358.3221 0010512 073.9292 286.2372 14.41355980211735
+FUSE 1
+1 25791U 99035A 03181.17786419 .00000395 00000-0 65266-4 0 8913
+2 25791 24.9844 2.9874 0010488 65.8262 294.3343 14.41355639211628
+FUSE 1
+1 25791U 99035A 03180.13927548 .00000410 00000-0 69784-4 0 8904
+2 25791 24.9846 9.3489 0010422 55.0943 305.0535 14.41355362211477
+FUSE 1
+1 25791U 99035A 03178.89296857 .00000417 00000-0 72182-4 0 8897
+2 25791 24.9844 16.9825 0010375 41.8562 318.2738 14.41354851211293
+FUSE 1
+1 25791U 99035A 03177.85437834 .00000422 00000-0 73448-4 0 8885
+2 25791 24.9849 23.3439 0010297 30.9792 329.1322 14.41354454211141
+FUSE 1
+1 25791U 99035A 03176.95426603 +.00000430 +00000-0 +76000-4 0 09042
+2 25791 024.9848 028.8557 0010293 021.4500 338.6436 14.41354102211016
+FUSE 1
+1 25791U 99035A 03176.05415314 .00000443 00000-0 79845-4 0 8874
+2 25791 24.9846 34.3674 0010294 11.9009 348.1738 14.41353789210880
+FUSE 1
+1 25791U 99035A 03175.01556135 .00000450 00000-0 82065-4 0 8861
+2 25791 24.9847 40.7274 0010280 1.0899 358.9629 14.41353338210732
+FUSE 1
+1 25791U 99035A 03173.97697009 +.00000396 +00000-0 +65568-4 0 08903
+2 25791 024.9822 047.0922 0010249 350.3402 009.6908 14.41352733210581
+FUSE 1
+1 25791U 99035A 03173.90773105 .00000369 00000-0 57536-4 0 8858
+2 25791 24.9822 47.5172 0010351 349.7832 10.2465 14.41352535210571
+FUSE 1
+1 25791U 99035A 03172.86913829 .00000604 00000-0 12883-3 0 8847
+2 25791 24.9818 53.8803 0010249 338.4160 21.5913 14.41352920210427
+FUSE 1
+1 25791U 99035A 03171.48434975 .00000462 00000-0 85627-4 0 8832
+2 25791 24.9815 62.3608 0010207 323.6696 36.3121 14.41351186210222
+FUSE 1
+1 25791U 99035A 03170.93043425 +.00000466 +00000-0 +86941-4 0 08965
+2 25791 024.9816 065.7566 0010267 317.5345 042.4371 14.41350839210142
+FUSE 1
+1 25791U 99035A 03170.16879981 .00000418 00000-0 72429-4 0 8822
+2 25791 24.9818 70.4234 0010268 308.4790 51.4798 14.41350330210030
+FUSE 1
+1 25791U 99035A 03169.96108168 +.00000420 +00000-0 +73009-4 0 08907
+2 25791 024.9818 071.6973 0010259 306.2163 053.7398 14.41350228210007
+FUSE 1
+1 25791U 99035A 03169.13020792 .00000418 00000-0 72287-4 0 8816
+2 25791 24.9816 76.7849 0010262 297.4420 62.5043 14.41349800209887
+FUSE 1
+1 25791U 99035A 03167.95313733 +.00000423 +00000-0 +73631-4 0 08836
+2 25791 024.9816 083.9955 0010237 284.2230 075.7140 14.41349347209712
+FUSE 1
+1 25791U 99035A 03167.88389799 .00000435 00000-0 77426-4 0 8809
+2 25791 24.9815 84.4197 0010234 283.5451 76.3924 14.41349399209702
+FUSE 1
+1 25791U 99035A 03166.98378580 +.00000412 +00000-0 +70359-4 0 08897
+2 25791 024.9815 089.9316 0010231 274.0471 085.8867 14.41348763209579
+FUSE 1
+1 25791U 99035A 03166.56834950 .00000395 00000-0 65244-4 0 8795
+2 25791 24.9815 92.4756 0010212 269.5845 90.3483 14.41348446209516
+FUSE 1
+1 25791U 99035A 03165.25280226 .00000385 00000-0 62295-4 0 8782
+2 25791 24.9816 100.5354 0010250 255.6305 104.3063 14.41347768209326
+FUSE 1
+1 25791U 99035A 03164.21421250 .00000364 00000-0 55776-4 0 8773
+2 25791 24.9817 106.8968 0010263 244.7090 115.2352 14.41347204209171
+FUSE 1
+1 25791U 99035A 03163.93725544 +.00000369 +00000-0 +57280-4 0 09097
+2 25791 024.9817 108.5944 0010284 241.8348 118.1121 14.41347113209132
+FUSE 1
+1 25791U 99035A 03162.96790594 +.00000356 +00000-0 +53409-4 0 08809
+2 25791 024.9817 114.5342 0010284 232.0618 127.8964 14.41346608208996
+FUSE 1
+1 25791U 99035A 03162.89866691 .00000344 00000-0 49614-4 0 8768
+2 25791 24.9818 114.9584 0010288 231.3218 128.6380 14.41346492208982
+FUSE 1
+1 25791U 99035A 03161.92931687 +.00000312 +00000-0 +39943-4 0 08814
+2 25791 024.9818 120.8944 0010301 221.0945 138.8793 14.41345978208841
+FUSE 1
+1 25791U 99035A 03161.51388123 .00000295 00000-0 34834-4 0 8757
+2 25791 24.9820 123.4393 0010342 216.6080 143.3724 14.41345778208782
+FUSE 1
+1 25791U 99035A 03160.95996814 +.00000250 +00000-0 +21193-4 0 08773
+2 25791 024.9821 126.8372 0010451 211.1438 148.8456 14.41345263208708
+FUSE 1
+1 25791U 99035A 03160.40605336 .00000261 00000-0 24623-4 0 8749
+2 25791 24.9820 130.2299 0010533 205.5270 154.4717 14.41345268208625
+FUSE 1
+1 25791U 99035A 03159.99061818 +.00000273 +00000-0 +28036-4 0 08815
+2 25791 024.9819 132.7771 0010571 201.2873 158.7201 14.41345234208560
+FUSE 1
+1 25791U 99035A 03159.22898615 .00000265 00000-0 25800-4 0 8732
+2 25791 24.9819 137.4409 0010567 193.3150 166.7080 14.41345034208454
+FUSE 1
+1 25791U 99035A 03158.19039828 .00000250 00000-0 21230-4 0 8726
+2 25791 24.9819 143.8080 0010564 183.2476 176.7970 14.41344597208302
+FUSE 1
+1 25791U 99035A 03156.66713447 .00000150 00000-0 -91100-5 0 8715
+2 25791 24.9821 153.1385 0010638 167.6080 192.4690 14.41343778208085
+FUSE 1
+1 25791U 99035A 03155.42082656 .00000252 00000-0 21776-4 0 8701
+2 25791 24.9824 160.7774 0010914 155.1123 204.9913 14.41344428207901
+FUSE 1
+1 25791U 99035A 03154.45147561 +.00000386 +00000-0 +62443-4 0 08827
+2 25791 024.9823 166.7138 0010921 144.9592 215.1639 14.41344834207768
+FUSE 1
+1 25791U 99035A 03154.24375716 .00000440 00000-0 78935-4 0 8698
+2 25791 24.9823 167.9870 0010912 142.7461 217.3784 14.41345004207737
+FUSE 1
+1 25791U 99035A 03152.72049180 .00000524 00000-0 10445-3 0 8685
+2 25791 24.9821 177.3180 0010876 127.0026 233.1484 14.41344268207516
+FUSE 1
+1 25791U 99035A 03151.54342182 .00000483 00000-0 91927-4 0 8670
+2 25791 24.9825 184.5392 0010739 116.1807 243.9807 14.41343273207343
+FUSE 1
+1 25791U 99035A 03150.22787149 .00000462 00000-0 85706-4 0 8664
+2 25791 24.9829 192.6106 0010589 103.2247 256.9442 14.41342447207158
+FUSE 1
+1 25791U 99035A 03148.56611937 .00000483 00000-0 92184-4 0 8659
+2 25791 24.9829 202.7908 0010554 85.9076 274.2645 14.41341656206911
+FUSE 1
+1 25791U 99035A 03147.52752265 +.00000485 +00000-0 +92660-4 0 08802
+2 25791 024.9829 209.1535 0010502 074.9181 285.2489 14.41341031206764
+FUSE 1
+1 25791U 99035A 03147.25056401 .00000444 00000-0 80285-4 0 8648
+2 25791 24.9832 210.8523 0010387 71.8386 288.3258 14.41340505206727
+FUSE 1
+1 25791U 99035A 03145.65804606 .00000436 00000-0 77914-4 0 8633
+2 25791 24.9834 220.6078 0010334 54.9657 305.1825 14.41339591206493
+FUSE 1
+1 25791U 99035A 03144.55020623 .00000437 00000-0 78023-4 0 8622
+2 25791 24.9834 227.3948 0010384 43.0456 317.0865 14.41338981206335
+FUSE 1
+1 25791U 99035A 03143.51160500 .00000421 00000-0 73254-4 0 8619
+2 25791 24.9837 233.7586 0010263 31.8445 328.2684 14.41338349206180
+FUSE 1
+1 25791U 99035A 03142.68072397 +.00000390 +00000-0 +63795-4 0 08751
+2 25791 024.9839 238.8486 0010272 023.0015 337.0956 14.41337687206064
+FUSE 1
+1 25791U 99035A 03142.33452356 .00000379 00000-0 60393-4 0 8602
+2 25791 24.9841 240.9721 0010255 19.1006 340.9888 14.41337442206011
+FUSE 1
+1 25791U 99035A 03141.71136164 +.00000379 +00000-0 +60626-4 0 08800
+2 25791 024.9840 244.7879 0010278 012.6009 347.4755 14.41337187205922
+FUSE 1
+1 25791U 99035A 03140.74199907 .00000370 00000-0 57735-4 0 8590
+2 25791 24.9841 250.7264 0010336 2.4159 357.6402 14.41336697205787
+FUSE 1
+1 25791U 99035A 03139.77263585 +.00000354 +00000-0 +52942-4 0 08660
+2 25791 024.9844 256.6661 0010354 351.8435 008.1907 14.41336219205647
+FUSE 1
+1 25791U 99035A 03139.56491547 .00000328 00000-0 45098-4 0 8584
+2 25791 24.9847 257.9406 0010399 349.2190 10.8094 14.41335926205617
+FUSE 1
+1 25791U 99035A 03138.73403226 +.00000337 +00000-0 +47751-4 0 08790
+2 25791 024.9846 263.0295 0010413 340.7827 019.2287 14.41335717205491
+FUSE 1
+1 25791U 99035A 03137.76466903 .00000347 00000-0 50863-4 0 8578
+2 25791 24.9846 268.9696 0010450 330.8995 29.0930 14.41335458205358
+FUSE 1
+1 25791U 99035A 03136.65682420 .00000390 00000-0 63870-4 0 8568
+2 25791 24.9845 275.7569 0010467 319.1949 40.7776 14.41335447205197
+FUSE 1
+1 25791U 99035A 03135.68746059 +.00000395 +00000-0 +65459-4 0 08569
+2 25791 024.9844 281.6931 0010472 309.0975 050.8590 14.41335072205053
+FUSE 1
+1 25791U 99035A 03135.54898003 .00000409 00000-0 69659-4 0 8552
+2 25791 24.9844 282.5416 0010458 307.6606 52.2948 14.41335149205036
+FUSE 1
+1 25791U 99035A 03134.51037701 +.00000418 +00000-0 +72356-4 0 08578
+2 25791 024.9842 288.9014 0010448 296.9961 062.9478 14.41334711204883
+FUSE 1
+1 25791U 99035A 03133.88721559 .00000426 00000-0 74642-4 0 8544
+2 25791 24.9841 292.7176 0010439 290.6823 69.2571 14.41334447204792
+FUSE 1
+1 25791U 99035A 03132.84861269 +.00000430 +00000-0 +75920-4 0 08592
+2 25791 024.9841 299.0779 0010500 279.5447 080.3876 14.41333984204649
+FUSE 1
+1 25791U 99035A 03132.57165180 .00000452 00000-0 82534-4 0 8538
+2 25791 24.9840 300.7743 0010474 276.5765 83.3548 14.41334042204600
+FUSE 1
+1 25791U 99035A 03131.87925065 +.00000453 +00000-0 +82898-4 0 08732
+2 25791 024.9839 305.0137 0010463 269.3387 090.5924 14.41333669204502
+FUSE 1
+1 25791U 99035A 03130.90988891 .00000490 00000-0 94080-4 0 8525
+2 25791 24.9837 310.9515 0010487 259.0381 100.8949 14.41333434204367
+FUSE 1
+1 25791U 99035A 03129.87128778 .00000523 00000-0 10424-3 0 8514
+2 25791 24.9835 317.3134 0010521 248.2159 111.7230 14.41333026204210
+FUSE 1
+1 25791U 99035A 03128.90192725 +.00000552 +00000-0 +11296-3 0 08532
+2 25791 024.9833 323.2517 0010552 238.0980 121.8502 14.41332579204072
+FUSE 1
+1 25791U 99035A 03128.83268738 .00000545 00000-0 11086-3 0 8508
+2 25791 24.9833 323.6764 0010568 237.4929 122.4559 14.41332467204067
+FUSE 1
+1 25791U 99035A 03127.93256604 +.00000601 +00000-0 +12794-3 0 08608
+2 25791 024.9830 329.1896 0010698 227.9538 132.0061 14.41332295203934
+FUSE 1
+1 25791U 99035A 03126.96320595 .00000625 00000-0 13528-3 0 8490
+2 25791 24.9830 335.1268 0010736 217.7754 142.2000 14.41331691203793
+FUSE 1
+1 25791U 99035A 03125.92460573 .00000669 00000-0 14867-3 0 8480
+2 25791 24.9827 341.4877 0010781 206.7283 153.2669 14.41331116203649
+FUSE 1
+1 25791U 99035A 03124.95524601 +.00000691 +00000-0 +15516-3 0 08505
+2 25791 024.9825 347.4243 0010785 196.3122 163.7039 14.41330332203501
+FUSE 1
+1 25791U 99035A 03124.88600610 .00000690 00000-0 15495-3 0 8473
+2 25791 24.9826 347.8485 0010786 195.5964 164.4215 14.41330260203492
+FUSE 1
+1 25791U 99035A 03123.91664594 +.00000696 +00000-0 +15682-3 0 08516
+2 25791 024.9825 353.7856 0010797 185.6495 174.3891 14.41329308203356
+FUSE 1
+1 25791U 99035A 03123.84740597 .00000693 00000-0 15596-3 0 8461
+2 25791 24.9825 354.2099 0010797 185.0043 175.0358 14.41329216203347
+FUSE 1
+1 25791U 99035A 03122.11640408 .00000703 00000-0 15884-3 0 8451
+2 25791 24.9822 4.8109 0010810 167.4774 192.6009 14.41327425203095
+FUSE 1
+1 25791U 99035A 03121.07780243 .00000667 00000-0 14783-3 0 8442
+2 25791 24.9822 11.1719 0010728 156.8103 203.2890 14.41325997202941
+FUSE 1
+1 25791U 99035A 03119.96995900 +.00000637 +00000-0 +13898-3 0 08471
+2 25791 024.9824 017.9568 0010660 145.4593 214.6611 14.41324655202780
+FUSE 1
+1 25791U 99035A 03119.90071904 .00000619 00000-0 13339-3 0 8430
+2 25791 24.9826 18.3811 0010636 144.7680 215.3531 14.41324414202771
+FUSE 1
+1 25791U 99035A 03118.86211447 .00000584 00000-0 12289-3 0 8425
+2 25791 24.9826 24.7417 0010559 134.0951 226.0434 14.41323141202622
+FUSE 1
+1 25791U 99035A 03117.96198940 +.00000540 +00000-0 +10940-3 0 08522
+2 25791 024.9829 030.2539 0010497 124.5628 235.5873 14.41321998202493
+FUSE 1
+1 25791U 99035A 03117.20034409 .00000515 00000-0 10194-3 0 8419
+2 25791 24.9829 34.9180 0010485 116.4587 243.7000 14.41321200202384
+FUSE 1
+1 25791U 99035A 03115.88477360 .00000443 00000-0 80015-4 0 8407
+2 25791 24.9830 42.9750 0010371 102.4463 257.7219 14.41319637202197
+FUSE 1
+1 25791U 99035A 03114.98464436 +.00000405 +00000-0 +68282-4 0 08441
+2 25791 024.9831 048.4873 0010313 092.7862 267.3832 14.41318779202065
+FUSE 1
+1 25791U 99035A 03114.84616281 .00000401 00000-0 67228-4 0 8392
+2 25791 24.9830 49.3353 0010321 91.2914 268.8779 14.41318665202046
+FUSE 1
+1 25791U 99035A 03113.94603175 +.00000392 +00000-0 +64358-4 0 08457
+2 25791 024.9830 054.8471 0010295 081.7820 278.3859 14.41318172201911
+FUSE 1
+1 25791U 99035A 03113.25362240 .00000391 00000-0 64235-4 0 8381
+2 25791 24.9829 59.0866 0010297 74.5006 285.6639 14.41317864201815
+FUSE 1
+1 25791U 99035A 03112.97665904 +.00000377 +00000-0 +60036-4 0 08459
+2 25791 024.9831 060.7830 0010270 071.4871 288.6765 14.41317625201778
+FUSE 1
+1 25791U 99035A 03112.21500808 .00000363 00000-0 55711-4 0 8377
+2 25791 24.9831 65.4465 0010279 63.4745 296.6818 14.41317184201660
+FUSE 1
+1 25791U 99035A 03111.17639208 .00000363 00000-0 55548-4 0 8365
+2 25791 24.9830 71.8062 0010279 52.4799 307.6644 14.41316776201510
+FUSE 1
+1 25791U 99035A 03110.96866852 +.00000365 +00000-0 +56405-4 0 08600
+2 25791 024.9830 073.0785 0010262 050.2094 309.9312 14.41316734201489
+FUSE 1
+1 25791U 99035A 03109.58384492 +.00000379 +00000-0 +60572-4 0 08369
+2 25791 024.9829 081.5576 0010264 035.5220 324.5953 14.41316327201288
+FUSE 1
+1 25791U 99035A 03109.37612134 .00000390 00000-0 63811-4 0 8354
+2 25791 24.9831 82.8309 0010191 33.2102 326.9042 14.41316389201252
+FUSE 1
+1 25791U 99035A 03108.33750280 .00000419 00000-0 72748-4 0 8344
+2 25791 24.9833 89.1917 0010176 22.3826 337.7123 14.41316238201101
+FUSE 1
+1 25791U 99035A 03107.22964140 .00000487 00000-0 93318-4 0 8333
+2 25791 24.9837 95.9773 0010052 10.7357 349.3362 14.41316429200940
+FUSE 1
+1 25791U 99035A 03105.98329705 +.00000572 +00000-0 +11935-3 0 08346
+2 25791 024.9839 103.6091 0010055 357.5958 002.4500 14.41316519200765
+FUSE 1
+1 25791U 99035A 03105.42936709 .00000573 00000-0 11956-3 0 8325
+2 25791 24.9839 107.0005 0010053 351.7713 8.2628 14.41316090200681
+FUSE 1
+1 25791U 99035A 03104.39074737 .00000618 00000-0 13316-3 0 8315
+2 25791 24.9841 113.3600 0010076 341.0911 18.9221 14.41315709200539
+FUSE 1
+1 25791U 99035A 03103.83681675 +.00000642 +00000-0 +14053-3 0 08493
+2 25791 024.9841 116.7516 0010112 335.4399 024.5624 14.41315476200452
+FUSE 1
+1 25791U 99035A 03103.21364467 .00000672 00000-0 14956-3 0 8307
+2 25791 24.9843 120.5685 0010100 328.7321 31.2586 14.41315278200363
+FUSE 1
+1 25791U 99035A 03101.89805968 .00000719 00000-0 16399-3 0 8298
+2 25791 24.9841 128.6245 0010100 314.9047 45.0638 14.41314506200177
+FUSE 1
+1 25791U 99035A 03100.72095835 .00000735 00000-0 16862-3 0 8285
+2 25791 24.9823 135.8422 0010255 300.3804 59.5679 14.41313234200009
+FUSE 1
+1 25791U 99035A 03099.95930502 +.00000731 +00000-0 +16758-3 0 08321
+2 25791 024.9822 140.5054 0010257 292.8087 067.1336 14.41312329199895
+FUSE 1
+1 25791U 99035A 03099.54386033 .00000758 00000-0 17568-3 0 8273
+2 25791 24.9817 143.0635 0010123 287.3571 72.5830 14.41312013199834
+FUSE 1
+1 25791U 99035A 03098.92068851 +.00000723 +00000-0 +16491-3 0 08499
+2 25791 024.9816 146.8804 0010159 280.5747 079.3533 14.41310909199748
+FUSE 1
+1 25791U 99035A 03098.22827686 .00000751 00000-0 17368-3 0 8261
+2 25791 24.9821 151.1234 0010310 272.8590 87.0746 14.41310499199644
+FUSE 1
+1 25791U 99035A 03097.18965913 .00000710 00000-0 16100-3 0 8258
+2 25791 24.9822 157.4830 0010353 261.6244 98.3091 14.41308833199495
+FUSE 1
+1 25791U 99035A 03095.94331601 .00000705 00000-0 15943-3 0 8248
+2 25791 24.9828 165.1153 0010485 248.0340 111.9051 14.41307527199315
+FUSE 1
+1 25791U 99035A 03094.55849177 .00000687 00000-0 15400-3 0 8232
+2 25791 24.9837 173.5981 0010507 233.7648 126.1888 14.41305878199115
+FUSE 1
+1 25791U 99035A 03093.79684032 +.00000617 +00000-0 +13296-3 0 08340
+2 25791 024.9830 178.2689 0010658 225.6842 134.2806 14.41303892199000
+FUSE 1
+1 25791U 99035A 03093.45063419 .00000588 00000-0 12399-3 0 8220
+2 25791 24.9830 180.3890 0010661 222.1502 137.8185 14.41303261198959
+FUSE 1
+1 25791U 99035A 03092.06580825 .00000498 00000-0 96689-4 0 8215
+2 25791 24.9829 188.8687 0010595 207.4856 152.5026 14.41301203198758
+FUSE 1
+1 25791U 99035A 03090.88870503 .00000512 00000-0 10095-3 0 8200
+2 25791 24.9830 196.0770 0010689 195.3984 164.6200 14.41300573198583
+FUSE 1
+1 25791U 99035A 03089.91932625 +.00000473 +00000-0 +89013-4 0 08355
+2 25791 024.9831 202.0132 0010707 185.2549 174.7855 14.41299501198441
+FUSE 1
+1 25791U 99035A 03089.57311974 .00000447 00000-0 81025-4 0 8193
+2 25791 24.9832 204.1347 0010678 181.8480 178.1989 14.41298969198393
+FUSE 1
+1 25791U 99035A 03088.18829319 .00000422 00000-0 73584-4 0 8189
+2 25791 24.9836 212.6159 0010751 167.8506 192.2415 14.41297973198190
+FUSE 1
+1 25791U 99035A 03087.14967143 .00000439 00000-0 78641-4 0 8178
+2 25791 24.9834 218.9892 0010499 154.7731 205.3306 14.41297621198044
+FUSE 1
+1 25791U 99035A 03086.94194663 +.00000428 +00000-0 +75286-4 0 08488
+2 25791 024.9835 220.2611 0010504 152.4498 207.6568 14.41297416198016
+FUSE 1
+1 25791U 99035A 03085.90332252 .00000414 00000-0 71085-4 0 8164
+2 25791 24.9838 226.6261 0010293 142.1870 217.9362 14.41296881197868
+FUSE 1
+1 25791U 99035A 03085.90332251 +.00000414 +00000-0 +71084-4 0 08173
+2 25791 024.9838 226.6261 0010293 142.1870 217.9361 14.41296881197867
+FUSE 1
+1 25791U 99035A 03084.86469882 .00000343 00000-0 49516-4 0 8152
+2 25791 24.9847 232.9875 0010201 130.8102 229.3297 14.41295801197719
+FUSE 1
+1 25791U 99035A 03083.89531250 +.00000489 +00000-0 +93920-4 0 08321
+2 25791 024.9844 238.9268 0010672 122.1781 237.9761 14.41296727197570
+FUSE 1
+1 25791U 99035A 03083.54910375 .00000503 00000-0 98232-4 0 8140
+2 25791 24.9844 241.0479 0010701 118.5123 241.6462 14.41296648197528
+FUSE 1
+1 25791U 99035A 03082.92592724 +.00000523 +00000-0 +10446-3 0 08451
+2 25791 024.9843 244.8641 0010700 112.2904 247.8737 14.41296449197438
+FUSE 1
+1 25791U 99035A 03082.16426759 .00000526 00000-0 10521-3 0 8133
+2 25791 24.9841 249.5294 0010669 104.2866 255.8838 14.41295912197327
+FUSE 1
+1 25791U 99035A 03081.12563750 .00000612 00000-0 13128-3 0 8122
+2 25791 24.9842 255.8923 0010711 94.3078 265.8647 14.41296014197175
+FUSE 1
+1 25791U 99035A 03079.87928172 .00000670 00000-0 14898-3 0 8112
+2 25791 24.9845 263.5260 0010772 80.9467 279.2259 14.41295470196990
+FUSE 1
+1 25791U 99035A 03078.90989285 +.00000680 +00000-0 +15204-3 0 08356
+2 25791 024.9842 269.4617 0010753 070.0356 290.1308 14.41294541196854
+FUSE 1
+1 25791U 99035A 03078.56368187 .00000702 00000-0 15885-3 0 8103
+2 25791 24.9840 271.5817 0010757 66.2560 293.9075 14.41294387196801
+FUSE 1
+1 25791U 99035A 03077.17883857 .00000638 00000-0 13930-3 0 8090
+2 25791 24.9843 280.0617 0010654 50.7889 309.3564 14.41292379196607
+FUSE 1
+1 25791U 99035A 03076.14020216 .00000782 00000-0 18324-3 0 8089
+2 25791 24.9848 286.4255 0010468 43.0582 317.0743 14.41292815196451
+FUSE 1
+1 25791U 99035A 03074.89383969 .00000825 00000-0 19632-3 0 8076
+2 25791 24.9853 294.0604 0010385 30.7066 329.4048 14.41291731196279
+FUSE 1
+1 25791U 99035A 03073.43974802 .00000854 00000-0 20497-3 0 8069
+2 25791 24.9852 302.9660 0010367 15.2865 344.7954 14.41290069196060
+FUSE 1
+1 25791U 99035A 03072.19338203 .00000856 00000-0 20554-3 0 8055
+2 25791 24.9854 310.5981 0010287 2.1680 357.8866 14.41288422195880
+FUSE 1
+1 25791U 99035A 03071.08550087 .00000818 00000-0 19402-3 0 8045
+2 25791 24.9860 317.3842 0010263 349.9948 10.0353 14.41286657195721
+FUSE 1
+1 25791U 99035A 03069.97761880 +.00000763 +00000-0 +17745-3 0 08086
+2 25791 024.9860 324.1683 0010236 338.1839 021.8232 14.41284751195560
+FUSE 1
+1 25791U 99035A 03069.90837617 .00000758 00000-0 17585-3 0 8032
+2 25791 24.9860 324.5922 0010236 337.4031 22.6028 14.41284617195558
+FUSE 1
+1 25791U 99035A 03068.93897780 +.00000723 +00000-0 +16521-3 0 08098
+2 25791 024.9864 330.5285 0010290 326.4566 033.5291 14.41283191195416
+FUSE 1
+1 25791U 99035A 03068.86973524 .00000716 00000-0 16303-3 0 8024
+2 25791 24.9864 330.9527 0010287 325.7078 34.2768 14.41283044195408
+FUSE 1
+1 25791U 99035A 03067.55412264 .00000656 00000-0 14496-3 0 8011
+2 25791 24.9864 339.0080 0010311 311.6370 48.3251 14.41281081195210
+FUSE 1
+1 25791U 99035A 03066.44623884 .00000578 00000-0 12112-3 0 8005
+2 25791 24.9864 345.7927 0010333 299.7399 60.2082 14.41279280195050
+FUSE 1
+1 25791U 99035A 03065.40759665 .00000526 00000-0 10514-3 0 7991
+2 25791 24.9863 352.1521 0010350 288.8170 71.1215 14.41277936194904
+FUSE 1
+1 25791U 99035A 03064.23046813 .00000487 00000-0 93421-4 0 7989
+2 25791 24.9864 359.3605 0010411 275.9615 83.9706 14.41276773194731
+FUSE 1
+1 25791U 99035A 03062.98409806 +.00000428 +00000-0 +75413-4 0 08015
+2 25791 024.9863 006.9942 0010426 262.5976 097.3348 14.41275346194553
+FUSE 1
+1 25791U 99035A 03062.91485526 .00000425 00000-0 74460-4 0 7973
+2 25791 24.9862 7.4181 0010421 261.8604 98.0722 14.41275270194547
+FUSE 1
+1 25791U 99035A 03061.94545741 +.00000420 +00000-0 +73017-4 0 08008
+2 25791 024.9848 013.3688 0010509 252.6434 107.2924 14.41274844194403
+FUSE 1
+1 25791U 99035A 03061.66848589 .00000420 00000-0 73002-4 0 7961
+2 25791 24.9848 15.0645 0010505 249.7386 110.1988 14.41274707194360
+FUSE 1
+1 25791U 99035A 03060.49135828 .00000388 00000-0 63176-4 0 7959
+2 25791 24.9852 22.2747 0010610 237.5708 122.3771 14.41273890194196
+FUSE 1
+1 25791U 99035A 03059.24498747 .00000395 00000-0 65325-4 0 7947
+2 25791 24.9851 29.9090 0010713 224.4424 135.5221 14.41273446194018
+FUSE 1
+1 25791U 99035A 03058.96801613 +.00000410 +00000-0 +70039-4 0 08335
+2 25791 024.9848 031.6055 0010711 221.6605 138.3087 14.41273447193979
+FUSE 1
+1 25791U 99035A 03057.79088784 .00000466 00000-0 86878-4 0 7935
+2 25791 24.9852 38.8148 0010787 209.3160 150.6743 14.41273450193800
+FUSE 1
+1 25791U 99035A 03056.75224577 .00000511 00000-0 10064-3 0 7925
+2 25791 24.9849 45.1756 0010796 198.5017 161.5097 14.41273260193657
+FUSE 1
+1 25791U 99035A 03055.71360371 .00000543 00000-0 11053-3 0 7916
+2 25791 24.9851 51.5371 0010893 187.8825 172.1502 14.41272912193506
+FUSE 1
+1 25791U 99035A 03054.81344706 +.00000592 +00000-0 +12526-3 0 07943
+2 25791 024.9854 057.0504 0010975 178.3725 181.6813 14.41272772193372
+FUSE 1
+1 25791U 99035A 03054.53647601 .00000595 00000-0 12630-3 0 7907
+2 25791 24.9855 58.7463 0010996 175.5448 184.5158 14.41272591193338
+FUSE 1
+1 25791U 99035A 03053.22086164 .00000648 00000-0 14239-3 0 7897
+2 25791 24.9854 66.8027 0011082 162.1387 197.9511 14.41272079193145
+FUSE 1
+1 25791U 99035A 03052.18221916 .00000654 00000-0 14422-3 0 7887
+2 25791 24.9857 73.1612 0010974 150.9371 209.1749 14.41271157192993
+FUSE 1
+1 25791U 99035A 03051.69751897 +.00000653 +00000-0 +14404-3 0 08192
+2 25791 024.9857 076.1286 0010974 145.8259 214.2956 14.41270685192926
+FUSE 1
+1 25791U 99035A 03050.86660284 .00000682 00000-0 15278-3 0 7875
+2 25791 24.9852 81.2163 0010966 137.4487 222.6871 14.41270247192803
+FUSE 1
+1 25791U 99035A 03049.55098927 .00000679 00000-0 15178-3 0 7862
+2 25791 24.9830 89.2921 0010776 123.5065 236.6474 14.41268750192615
+FUSE 1
+1 25791U 99035A 03046.91974757 .00000708 00000-0 16072-3 0 7848
+2 25791 24.9828 105.4061 0010755 96.1405 264.0326 14.41266314192231
+FUSE 1
+1 25791U 99035A 03045.81185480 .00000675 00000-0 15076-3 0 7838
+2 25791 24.9829 112.1925 0010804 84.5002 275.6738 14.41264829192071
+FUSE 1
+1 25791U 99035A 03044.56547187 .00000671 00000-0 14933-3 0 7821
+2 25791 24.9825 119.8235 0010884 72.1647 288.0048 14.41263465191897
+FUSE 1
+1 25791U 99035A 03043.87303595 +.00000663 +00000-0 +14707-3 0 08086
+2 25791 024.9823 124.0647 0010837 064.8117 295.3515 14.41262691191797
+FUSE 1
+1 25791U 99035A 03043.24984329 .00000652 00000-0 14385-3 0 7817
+2 25791 24.9824 127.8828 0010807 58.4950 301.6614 14.41261995191709
+FUSE 1
+1 25791U 99035A 03042.07269992 .00000613 00000-0 13188-3 0 7805
+2 25791 24.9827 135.0921 0010730 46.2939 313.8459 14.41260560191534
+FUSE 1
+1 25791U 99035A 03040.82631031 .00000590 00000-0 12473-3 0 7791
+2 25791 24.9825 142.7255 0010676 33.4461 326.6705 14.41259243191356
+FUSE 1
+1 25791U 99035A 03039.57991945 .00000595 00000-0 12637-3 0 7780
+2 25791 24.9832 150.3613 0010568 20.6980 339.3959 14.41258343191173
+FUSE 1
+1 25791U 99035A 03038.54125940 .00000562 00000-0 11637-3 0 7772
+2 25791 24.9831 156.7218 0010533 9.4132 350.6584 14.41257190191022
+FUSE 1
+1 25791U 99035A 03037.01788880 .00000562 00000-0 11641-3 0 7765
+2 25791 24.9831 166.0494 0010450 353.4940 6.5445 14.41256054190805
+FUSE 1
+1 25791U 99035A 03035.90998290 +.00000529 +00000-0 +10615-3 0 07762
+2 25791 024.9834 172.8362 0010444 341.3662 018.6462 14.41254945190649
+FUSE 1
+1 25791U 99035A 03035.84073869 .00000529 00000-0 10615-3 0 7750
+2 25791 24.9834 173.2601 0010444 340.6394 19.3715 14.41254896190637
+FUSE 1
+1 25791U 99035A 03034.94056470 +.00000514 +00000-0 +10178-3 0 07937
+2 25791 024.9830 178.7729 0010445 331.0545 028.9383 14.41254106190504
+FUSE 1
+1 25791U 99035A 03034.59434384 .00000508 00000-0 99976-4 0 7748
+2 25791 24.9829 180.8929 0010469 327.4109 32.5752 14.41253798190450
+FUSE 1
+1 25791U 99035A 03033.55568063 .00000512 00000-0 10098-3 0 7736
+2 25791 24.9832 187.2531 0010490 316.1247 43.8429 14.41253174190304
+FUSE 1
+1 25791U 99035A 03032.24004087 .00000509 00000-0 10030-3 0 7723
+2 25791 24.9833 195.3101 0010479 301.8051 58.1431 14.41252308190118
+FUSE 1
+1 25791U 99035A 03031.13213438 .00000500 00000-0 97473-4 0 7719
+2 25791 24.9834 202.0943 0010489 289.8402 70.0976 14.41251485189957
+FUSE 1
+1 25791U 99035A 03029.95498370 +.00000507 +00000-0 +99455-4 0 07726
+2 25791 024.9833 209.3044 0010568 277.2138 082.7170 14.41250807189787
+FUSE 1
+1 25791U 99035A 03029.88573951 .00000506 00000-0 99284-4 0 7704
+2 25791 24.9834 209.7284 0010567 276.4676 83.4627 14.41250759189775
+FUSE 1
+1 25791U 99035A 03028.91632543 +.00000457 +00000-0 +84396-4 0 07714
+2 25791 024.9829 215.6872 0010688 267.6409 092.2873 14.41250112189637
+FUSE 1
+1 25791U 99035A 03028.84708138 .00000459 00000-0 84922-4 0 7694
+2 25791 24.9829 216.1111 0010685 266.8899 93.0390 14.41250090189627
+FUSE 1
+1 25791U 99035A 03027.94690786 +.00000485 +00000-0 +92887-4 0 07916
+2 25791 024.9829 221.6256 0010733 257.2339 102.6968 14.41249791189494
+FUSE 1
+1 25791U 99035A 03027.39295481 .00000522 00000-0 10395-3 0 7687
+2 25791 24.9825 225.0181 0010750 251.6346 108.2992 14.41249718189410
+FUSE 1
+1 25791U 99035A 03026.90824636 +.00000535 +00000-0 +10794-3 0 07938
+2 25791 024.9827 227.9872 0010755 246.4607 113.4770 14.41249533189346
+FUSE 1
+1 25791U 99035A 03026.21580544 .00000600 00000-0 12773-3 0 7672
+2 25791 24.9822 232.2291 0010751 239.2471 120.6976 14.41249537189241
+FUSE 1
+1 25791U 99035A 03024.90017016 .00000620 00000-0 13395-3 0 7667
+2 25791 24.9825 240.2875 0010606 224.5201 135.4454 14.41248661189059
+FUSE 1
+1 25791U 99035A 03023.86150943 .00000683 00000-0 15306-3 0 7650
+2 25791 24.9823 246.6490 0010698 213.6230 146.3601 14.41248266188901
+FUSE 1
+1 25791U 99035A 03022.96133739 +.00000720 +00000-0 +16435-3 0 07885
+2 25791 024.9822 252.1619 0010714 203.8994 156.1017 14.41247660188774
+FUSE 1
+1 25791U 99035A 03022.47662920 .00000753 00000-0 17422-3 0 7647
+2 25791 24.9818 255.1315 0010728 199.1571 160.8533 14.41247360188703
+FUSE 1
+1 25791U 99035A 03021.23023620 .00000814 00000-0 19309-3 0 7631
+2 25791 24.9818 262.7649 0010872 186.1483 173.8893 14.41246466188524
+FUSE 1
+1 25791U 99035A 03020.19157559 .00000839 00000-0 20070-3 0 7627
+2 25791 24.9818 269.1258 0010854 175.1951 184.8664 14.41245346188376
+FUSE 1
+1 25791U 99035A 03019.15291393 .00000874 00000-0 21118-3 0 7618
+2 25791 24.9818 275.4875 0010879 164.2609 195.8238 14.41244267188221
+FUSE 1
+1 25791U 99035A 03017.90651918 .00000882 00000-0 21358-3 0 7606
+2 25791 24.9820 283.1229 0010889 151.5092 208.6013 14.41242588188047
+FUSE 1
+1 25791U 99035A 03016.86785572 .00000849 00000-0 20352-3 0 7598
+2 25791 24.9821 289.4833 0010877 140.6893 219.4408 14.41240829187899
+FUSE 1
+1 25791U 99035A 03015.96767820 +.00000843 +00000-0 +20187-3 0 07628
+2 25791 024.9820 294.9922 0010992 131.6564 228.4886 14.41239598187768
+FUSE 1
+1 25791U 99035A 03015.41372249 .00000840 00000-0 20100-3 0 7582
+2 25791 24.9820 298.3836 0010997 125.8349 234.3181 14.41238834187688
+FUSE 1
+1 25791U 99035A 03014.23656622 .00000784 00000-0 18395-3 0 7570
+2 25791 24.9824 305.5944 0010955 113.8675 246.2990 14.41236827187518
+FUSE 1
+1 25791U 99035A 03013.19789667 .00000698 00000-0 15769-3 0 7565
+2 25791 24.9829 311.9557 0010860 103.1125 257.0596 14.41234894187368
+FUSE 1
+1 25791U 99035A 03012.92091841 +.00000651 +00000-0 +14337-3 0 07913
+2 25791 024.9830 313.6530 0010837 100.3922 259.7809 14.41234171187328
+FUSE 1
+1 25791U 99035A 03011.95149077 +.00000591 +00000-0 +12511-3 0 07599
+2 25791 024.9833 319.5894 0010774 090.1943 269.9802 14.41232741187189
+FUSE 1
+1 25791U 99035A 03011.88224586 .00000585 00000-0 12347-3 0 7556
+2 25791 24.9834 320.0134 0010776 89.4952 270.6791 14.41232635187174
+FUSE 1
+1 25791U 99035A 03010.49734521 .00000571 00000-0 11922-3 0 7549
+2 25791 24.9836 328.4940 0010755 75.1825 284.9873 14.41231417186974
+FUSE 1
+1 25791U 99035A 03009.38942288 .00000562 00000-0 11651-3 0 7534
+2 25791 24.9838 335.2793 0010726 63.5938 296.5669 14.41230504186813
+FUSE 1
+1 25791U 99035A 03008.21225405 .00000536 00000-0 10847-3 0 7526
+2 25791 24.9841 342.4893 0010658 51.4879 308.6589 14.41229428186642
+FUSE 1
+1 25791U 99035A 03007.17357430 .00000496 00000-0 96283-4 0 7517
+2 25791 24.9846 348.8510 0010606 40.2151 319.9146 14.41228391186490
+FUSE 1
+1 25791U 99035A 03005.71941978 .00000492 00000-0 95196-4 0 7508
+2 25791 24.9848 357.7568 0010489 25.1948 334.9069 14.41227497186283
+FUSE 1
+1 25791U 99035A 03004.54224559 .00000519 00000-0 10345-3 0 7497
+2 25791 24.9849 4.9669 0010381 12.5994 347.4773 14.41226999186118
+FUSE 1
+1 25791U 99035A 03003.22657791 .00000659 00000-0 14583-3 0 7481
+2 25791 24.9844 13.0234 0010171 358.9129 1.1355 14.41227192185920
+FUSE 1
+1 25791U 99035A 03001.70317381 +.00000783 +00000-0 +18366-3 0 07470
+2 25791 024.9836 022.3505 0010142 342.3951 017.6202 14.41226616185702
+FUSE 1
+1 25791U 99035A 02365.66448900 .00000905 00000-0 22093-3 0 7466
+2 25791 24.9828 28.7111 0010120 331.1925 28.8023 14.41226254185555
+FUSE 1
+1 25791U 99035A 02364.55655917 .00001003 00000-0 25056-3 0 7452
+2 25791 24.9823 35.4963 0010124 319.5885 40.3870 14.41225360185397
+FUSE 1
+1 25791U 99035A 02363.24089208 .00001123 00000-0 28737-3 0 7442
+2 25791 24.9817 43.5541 0010043 305.4795 54.4774 14.41224128185206
+FUSE 1
+1 25791U 99035A 02361.85597983 .00001182 00000-0 30525-3 0 7433
+2 25791 24.9811 52.0336 0010047 290.8057 69.1372 14.41221885185001
+FUSE 1
+1 25791U 99035A 02360.81729577 .00001190 00000-0 30775-3 0 7429
+2 25791 24.9811 58.3946 0010013 279.4423 80.4952 14.41219863184855
+FUSE 1
+1 25791U 99035A 02359.98634816 +.00001193 +00000-0 +30865-3 0 07531
+2 25791 024.9811 063.4834 0010006 270.4269 089.5092 14.41218193184736
+FUSE 1
+1 25791U 99035A 02359.57087417 .00001197 00000-0 30966-3 0 7418
+2 25791 24.9812 66.0284 0010007 265.9037 94.0326 14.41217390184670
+FUSE 1
+1 25791U 99035A 02356.87029074 .00001204 00000-0 31182-3 0 7390
+2 25791 24.9811 82.5668 0009938 236.3646 123.5914 14.41211956184287
+FUSE 1
+1 25791U 99035A 02355.55462023 .00001090 00000-0 27728-3 0 7382
+2 25791 24.9809 90.6214 0010165 222.2949 137.6776 14.41208399184093
+FUSE 1
+1 25791U 99035A 02354.51593217 .00001046 00000-0 26390-3 0 7371
+2 25791 24.9811 96.9840 0010179 211.0308 148.9598 14.41206118183947
+FUSE 1
+1 25791U 99035A 02353.13101277 .00001006 00000-0 25162-3 0 7360
+2 25791 24.9814 105.4674 0010149 196.0465 163.9721 14.41203384183749
+FUSE 1
+1 25791U 99035A 02351.95382922 +.00000934 +00000-0 +22963-3 0 07372
+2 25791 024.9817 112.6764 0010197 184.0228 176.0200 14.41200867183570
+FUSE 1
+1 25791U 99035A 02351.88458303 .00000934 00000-0 22971-3 0 7358
+2 25791 24.9817 113.1005 0010193 183.2930 176.7513 14.41200763183569
+FUSE 1
+1 25791U 99035A 02350.91513627 +.00000904 +00000-0 +22045-3 0 07519
+2 25791 024.9819 119.0445 0010562 174.0065 186.0569 14.41199099183420
+FUSE 1
+1 25791U 99035A 02350.56890542 .00000886 00000-0 21508-3 0 7347
+2 25791 24.9818 121.1673 0010554 170.6826 189.3879 14.41198405183378
+FUSE 1
+1 25791U 99035A 02349.11473244 .00000853 00000-0 20507-3 0 7333
+2 25791 24.9823 130.0779 0010595 156.0675 204.0329 14.41196121183160
+FUSE 1
+1 25791U 99035A 02347.86829613 .00000843 00000-0 20210-3 0 7327
+2 25791 24.9826 137.7176 0010579 143.6291 216.4936 14.41194381182982
+FUSE 1
+1 25791U 99035A 02346.96809054 +.00000846 +00000-0 +20310-3 0 07328
+2 25791 024.9827 143.2322 0010589 134.4622 225.6760 14.41193196182851
+FUSE 1
+1 25791U 99035A 02346.82959720 .00000840 00000-0 20129-3 0 7310
+2 25791 24.9828 144.0807 0010580 133.0588 227.0808 14.41192967182838
+FUSE 1
+1 25791U 99035A 02345.92939017 +.00000816 +00000-0 +19371-3 0 07418
+2 25791 024.9830 149.5942 0010509 123.9678 236.1843 14.41191589182705
+FUSE 1
+1 25791U 99035A 02345.58315657 .00000792 00000-0 18653-3 0 7301
+2 25791 24.9831 151.7183 0010408 120.6946 239.4591 14.41190929182655
+FUSE 1
+1 25791U 99035A 02344.89068773 +.00000785 +00000-0 +18451-3 0 07429
+2 25791 024.9831 155.9574 0010423 113.3541 246.8055 14.41190019182558
+FUSE 1
+1 25791U 99035A 02344.54445368 .00000789 00000-0 18568-3 0 7298
+2 25791 24.9831 158.0799 0010476 110.1229 250.0410 14.41189637182508
+FUSE 1
+1 25791U 99035A 02343.15951322 .00000783 00000-0 18396-3 0 7288
+2 25791 24.9834 166.5623 0010426 96.2869 263.8829 14.41187968182309
+FUSE 1
+1 25791U 99035A 02342.88252492 +.00000775 +00000-0 +18152-3 0 07460
+2 25791 024.9835 168.2588 0010398 093.2895 266.8803 14.41187559182269
+FUSE 1
+1 25791U 99035A 02341.98231177 .00000761 00000-0 17708-3 0 7277
+2 25791 24.9836 173.7711 0010366 83.7509 276.4178 14.41186369182136
+FUSE 1
+1 25791U 99035A 02340.87435475 .00000768 00000-0 17944-3 0 7269
+2 25791 24.9836 180.5545 0010319 72.0817 288.0815 14.41185129181979
+FUSE 1
+1 25791U 99035A 02339.90489123 +.00000743 +00000-0 +17159-3 0 07373
+2 25791 024.9838 186.4897 0010302 061.8181 298.3364 14.41183804181834
+FUSE 1
+1 25791U 99035A 02339.00467365 .00000760 00000-0 17694-3 0 7258
+2 25791 24.9837 192.0009 0010340 52.4233 307.7215 14.41182886181702
+FUSE 1
+1 25791U 99035A 02337.96595978 +.00000747 +00000-0 +17292-3 0 07274
+2 25791 024.9838 198.3601 0010349 041.4682 318.6611 14.41181581181550
+FUSE 1
+1 25791U 99035A 02337.89671225 .00000735 00000-0 16930-3 0 7248
+2 25791 24.9838 198.7841 0010344 40.6825 319.4454 14.41181406181544
+FUSE 1
+1 25791U 99035A 02336.92724431 +.00000730 +00000-0 +16784-3 0 07263
+2 25791 024.9839 204.7190 0010345 030.4753 329.6355 14.41180304181402
+FUSE 1
+1 25791U 99035A 02336.85799660 .00000726 00000-0 16666-3 0 7232
+2 25791 24.9840 205.1432 0010343 29.6910 330.4183 14.41180198181399
+FUSE 1
+1 25791U 99035A 02335.95777534 +.00000723 +00000-0 +16574-3 0 07378
+2 25791 024.9840 210.6541 0010353 020.2600 339.8318 14.41179182181265
+FUSE 1
+1 25791U 99035A 02335.12680126 .00000724 00000-0 16595-3 0 7225
+2 25791 24.9839 215.7423 0010346 11.4473 348.6270 14.41178242181148
+FUSE 1
+1 25791U 99035A 02333.88033836 .00000777 00000-0 18215-3 0 7214
+2 25791 24.9838 223.3729 0010367 358.4414 1.6064 14.41177194180964
+FUSE 1
+1 25791U 99035A 02332.21838680 .00000738 00000-0 17012-3 0 7200
+2 25791 24.9840 233.5483 0010369 340.4562 19.5551 14.41175004180725
+FUSE 1
+1 25791U 99035A 02330.97192266 +.00000736 +00000-0 +16945-3 0 07228
+2 25791 024.9841 241.1847 0010383 327.1955 032.7907 14.41173576180543
+FUSE 1
+1 25791U 99035A 02330.90267454 .00000744 00000-0 17204-3 0 7197
+2 25791 24.9842 241.6086 0010384 326.4698 33.5151 14.41173549180530
+FUSE 1
+1 25791U 99035A 02329.93320137 +.00000795 +00000-0 +18754-3 0 07238
+2 25791 024.9841 247.5450 0010325 316.0567 043.9119 14.41172687180399
+FUSE 1
+1 25791U 99035A 02329.86395339 .00000793 00000-0 18694-3 0 7181
+2 25791 24.9841 247.9690 0010320 315.3599 44.6079 14.41172585180380
+FUSE 1
+1 25791U 99035A 02328.96372831 +.00000874 +00000-0 +21177-3 0 07262
+2 25791 024.9839 253.4818 0010301 306.0731 053.8822 14.41171745180256
+FUSE 1
+1 25791U 99035A 02328.47899189 .00000852 00000-0 20479-3 0 7178
+2 25791 24.9839 256.4492 0010283 300.9882 58.9620 14.41170988180188
+FUSE 1
+1 25791U 99035A 02327.23252631 .00000997 00000-0 24907-3 0 7165
+2 25791 24.9837 264.0850 0010209 287.9702 71.9692 14.41169674180007
+FUSE 1
+1 25791U 99035A 02325.91681241 .00001075 00000-0 27280-3 0 7155
+2 25791 24.9835 272.1466 0010275 274.0090 85.9246 14.41167756179814
+FUSE 1
+1 25791U 99035A 02324.94733872 +.00001074 +00000-0 +27250-3 0 07151
+2 25791 024.9837 278.0849 0010343 263.9267 096.0064 14.41166020179673
+FUSE 1
+1 25791U 99035A 02324.67034596 .00001073 00000-0 27216-3 0 7148
+2 25791 24.9837 279.7804 0010340 261.0175 98.9158 14.41165514179634
+FUSE 1
+1 25791U 99035A 02323.97786359 +.00001085 +00000-0 +27593-3 0 07186
+2 25791 024.9834 284.0218 0010561 253.2107 106.7242 14.41164354179534
+FUSE 1
+1 25791U 99035A 02323.56237448 .00001085 00000-0 27595-3 0 7138
+2 25791 24.9834 286.5654 0010546 248.8875 111.0502 14.41163593179475
+FUSE 1
+1 25791U 99035A 02322.24665714 .00001162 00000-0 29927-3 0 7129
+2 25791 24.9833 294.6241 0010703 233.4813 126.4702 14.41161870179280
+FUSE 1
+1 25791U 99035A 02321.20793280 .00001220 00000-0 31720-3 0 7112
+2 25791 24.9829 300.9847 0010808 222.5858 137.3810 14.41160264179133
+FUSE 1
+1 25791U 99035A 02319.40747635 .00001263 00000-0 33024-3 0 7109
+2 25791 24.9825 312.0065 0010876 203.7169 156.2843 14.41156787178877
+FUSE 1
+1 25791U 99035A 02318.64574421 +.00001273 +00000-0 +33320-3 0 07183
+2 25791 024.9823 316.6719 0010904 195.8401 164.1766 14.41155172178760
+FUSE 1
+1 25791U 99035A 02317.81476349 +.00001220 +00000-0 +31728-3 0 07352
+2 25791 024.9826 321.7601 0010933 187.6105 172.4237 14.41152903178643
+FUSE 1
+1 25791U 99035A 02316.84528386 .00001225 00000-0 31884-3 0 7081
+2 25791 24.9827 327.6980 0010976 177.5120 182.5438 14.41150915178502
+FUSE 1
+1 25791U 99035A 02315.59880787 .00001242 00000-0 32394-3 0 7073
+2 25791 24.9825 335.3293 0011048 164.4233 195.6623 14.41148412178324
+FUSE 1
+1 25791U 99035A 02314.69857361 +.00001241 +00000-0 +32373-3 0 07071
+2 25791 024.9823 340.8415 0011033 155.1164 204.9876 14.41146449178190
+FUSE 1
+1 25791U 99035A 02314.56007609 .00001242 00000-0 32393-3 0 7061
+2 25791 24.9823 341.6892 0011038 153.6592 206.4489 14.41146160178176
+FUSE 1
+1 25791U 99035A 02313.24434699 .00001193 00000-0 30916-3 0 7051
+2 25791 24.9828 349.7471 0011087 140.1634 219.9694 14.41143010177981
+FUSE 1
+1 25791U 99035A 02312.20561116 .00001132 00000-0 29035-3 0 7043
+2 25791 24.9834 356.1079 0011110 129.7443 230.4048 14.41140389177833
+FUSE 1
+1 25791U 99035A 02311.92861422 +.00001126 +00000-0 +28868-3 0 07309
+2 25791 024.9835 357.8035 0011119 126.7910 233.3617 14.41139808177792
+FUSE 1
+1 25791U 99035A 02310.95912468 +.00001083 +00000-0 +27550-3 0 07048
+2 25791 024.9837 003.7403 0011086 116.7489 243.4157 14.41137566177658
+FUSE 1
+1 25791U 99035A 02310.82062580 .00001082 00000-0 27519-3 0 7038
+2 25791 24.9837 4.5881 0011089 115.2851 244.8806 14.41137305177632
+FUSE 1
+1 25791U 99035A 02309.78188408 +.00001035 +00000-0 +26086-3 0 07068
+2 25791 024.9840 010.9478 0011067 104.2526 255.9212 14.41135021177482
+FUSE 1
+1 25791U 99035A 02309.57413526 .00001031 00000-0 25964-3 0 7023
+2 25791 24.9841 12.2196 0011058 102.0689 258.1059 14.41134631177458
+FUSE 1
+1 25791U 99035A 02308.67388968 +.00001007 +00000-0 +25233-3 0 07048
+2 25791 024.9841 017.7307 0011071 092.5180 267.6595 14.41132871177326
+FUSE 1
+1 25791U 99035A 02308.53539014 .00001005 00000-0 25166-3 0 7013
+2 25791 24.9842 18.5786 0011066 91.0739 269.1037 14.41132629177302
+FUSE 1
+1 25791U 99035A 02307.08114362 .00000944 00000-0 23310-3 0 7006
+2 25791 24.9847 27.4838 0011100 76.0546 284.1186 14.41129780177094
+FUSE 1
+1 25791U 99035A 02306.04239290 .00000935 00000-0 23046-3 0 6992
+2 25791 24.9847 33.8456 0011062 65.0552 295.1089 14.41128082176944
+FUSE 1
+1 25791U 99035A 02304.86513927 .00000956 00000-0 23688-3 0 6986
+2 25791 24.9847 41.0556 0010946 52.9833 307.1674 14.41126496176775
+FUSE 1
+1 25791U 99035A 02303.89563460 +.00000960 +00000-0 +23806-3 0 06982
+2 25791 024.9849 046.9935 0010898 043.0452 317.0893 14.41125049176637
+FUSE 1
+1 25791U 99035A 02303.82638415 .00000966 00000-0 23984-3 0 6970
+2 25791 24.9849 47.4173 0010865 42.3451 317.7891 14.41125000176623
+FUSE 1
+1 25791U 99035A 02302.71837611 +.00001023 +00000-0 +25722-3 0 07019
+2 25791 024.9847 054.2005 0010813 031.1742 328.9406 14.41123746176466
+FUSE 1
+1 25791U 99035A 02302.57987459 .00001040 00000-0 26254-3 0 6962
+2 25791 24.9846 55.0483 0010830 29.7688 330.3422 14.41123680176445
+FUSE 1
+1 25791U 99035A 02300.98711079 .00001096 00000-0 27956-3 0 6958
+2 25791 24.9841 64.7981 0010843 13.0413 347.0373 14.41121314176213
+FUSE 1
+1 25791U 99035A 02299.87909991 .00001128 00000-0 28943-3 0 6947
+2 25791 24.9841 71.5856 0010786 1.4027 358.6513 14.41119575176050
+FUSE 1
+1 25791U 99035A 02298.84033835 .00001169 00000-0 30201-3 0 6932
+2 25791 24.9842 77.9480 0010811 350.6657 9.3651 14.41117963175906
+FUSE 1
+1 25791U 99035A 02297.94007642 +.00001182 +00000-0 +30577-3 0 06941
+2 25791 024.9844 083.4626 0010597 339.8645 020.1444 14.41116418175779
+FUSE 1
+1 25791U 99035A 02297.80157473 .00001180 00000-0 30538-3 0 6927
+2 25791 24.9845 84.3107 0010600 338.3923 21.6137 14.41116135175751
+FUSE 1
+1 25791U 99035A 02296.90131265 +.00001199 +00000-0 +31112-3 0 07052
+2 25791 024.9844 089.8231 0010565 328.5579 031.4298 14.41114507175620
+FUSE 1
+1 25791U 99035A 02296.55505701 .00001238 00000-0 32303-3 0 6914
+2 25791 24.9844 91.9448 0010517 324.3002 35.6802 14.41114238175578
+FUSE 1
+1 25791U 99035A 02295.93179849 +.00001243 +00000-0 +32465-3 0 07023
+2 25791 024.9845 095.7602 0010517 317.7975 042.1726 14.41112961175487
+FUSE 1
+1 25791U 99035A 02295.51629228 .00001254 00000-0 32781-3 0 6907
+2 25791 24.9843 98.3052 0010532 313.0139 46.9486 14.41112188175421
+FUSE 1
+1 25791U 99035A 02294.96228418 +.00001256 +00000-0 +32856-3 0 07075
+2 25791 024.9843 101.6963 0010529 307.2176 052.7370 14.41111015175348
+FUSE 1
+1 25791U 99035A 02294.13127216 .00001240 00000-0 32359-3 0 6898
+2 25791 24.9841 106.7843 0010541 298.5475 61.3971 14.41109044175226
+FUSE 1
+1 25791U 99035A 02293.92351906 +.00001239 +00000-0 +32344-3 0 07139
+2 25791 024.9843 108.0569 0010535 296.3424 063.6002 14.41108613175198
+FUSE 1
+1 25791U 99035A 02292.95400352 +.00001237 +00000-0 +32256-3 0 06905
+2 25791 024.9842 113.9928 0010572 285.9862 073.9481 14.41106520175057
+FUSE 1
+1 25791U 99035A 02292.88475244 .00001234 00000-0 32188-3 0 6887
+2 25791 24.9842 114.4167 0010574 285.2452 74.6888 14.41106349175045
+FUSE 1
+1 25791U 99035A 02291.56898052 .00001216 00000-0 31640-3 0 6878
+2 25791 24.9839 122.4724 0010637 271.2762 88.6530 14.41103373174859
+FUSE 1
+1 25791U 99035A 02290.94572017 +.00001195 +00000-0 +30991-3 0 07009
+2 25791 024.9844 126.2889 0010671 264.7560 095.1729 14.41101851174762
+FUSE 1
+1 25791U 99035A 02290.18395700 .00001174 00000-0 30345-3 0 6860
+2 25791 24.9843 130.9526 0010673 256.7111 103.2208 14.41100044174650
+FUSE 1
+1 25791U 99035A 02288.86818259 .00001140 00000-0 29323-3 0 6857
+2 25791 24.9845 139.0064 0010704 243.0013 116.9405 14.41097023174465
+FUSE 1
+1 25791U 99035A 02287.89866426 +.00001136 +00000-0 +29186-3 0 06894
+2 25791 024.9843 144.9409 0010684 232.7314 127.2281 14.41095095174326
+FUSE 1
+1 25791U 99035A 02287.20614986 .00001151 00000-0 29649-3 0 6847
+2 25791 24.9827 149.1875 0010669 225.6654 134.2979 14.41093836174225
+FUSE 1
+1 25791U 99035A 02285.89037225 .00001130 00000-0 29004-3 0 6836
+2 25791 24.9828 157.2454 0010692 211.9002 148.0860 14.41091133174039
+FUSE 1
+1 25791U 99035A 02284.85159928 .00001103 00000-0 28186-3 0 6825
+2 25791 24.9828 163.6064 0010728 200.9652 159.0419 14.41088960173884
+FUSE 1
+1 25791U 99035A 02283.32806291 .00001033 00000-0 26046-3 0 6812
+2 25791 24.9830 172.9322 0010689 184.6616 175.3793 14.41085821173666
+FUSE 1
+1 25791U 99035A 02282.98180447 +.00000996 +00000-0 +24906-3 0 06844
+2 25791 024.9832 175.0528 0010704 180.9650 179.0837 14.41085010173610
+FUSE 1
+1 25791U 99035A 02282.22003459 .00001026 00000-0 25852-3 0 6800
+2 25791 24.9831 179.7159 0010708 172.9134 187.1536 14.41083903173505
+FUSE 1
+1 25791U 99035A 02280.97350077 +.00000830 +00000-0 +19849-3 0 06802
+2 25791 024.9833 187.3563 0011025 161.6340 198.4554 14.41080808173324
+FUSE 1
+1 25791U 99035A 02280.90424885 .00000955 00000-0 23675-3 0 6792
+2 25791 24.9831 187.7802 0010991 160.8057 199.2869 14.41081211173315
+FUSE 1
+1 25791U 99035A 02279.93472079 +.00001010 +00000-0 +25355-3 0 06825
+2 25791 024.9829 193.7205 0011006 150.8784 209.2336 14.41079909173176
+FUSE 1
+1 25791U 99035A 02279.38070408 .00001043 00000-0 26359-3 0 6780
+2 25791 24.9829 197.1114 0011002 144.9425 215.1807 14.41079042173093
+FUSE 1
+1 25791U 99035A 02278.20341727 .00000963 00000-0 23930-3 0 6776
+2 25791 24.9832 204.3229 0011020 133.2028 226.9401 14.41076821172928
+FUSE 1
+1 25791U 99035A 02276.88762358 .00000955 00000-0 23667-3 0 6762
+2 25791 24.9828 212.3833 0011005 119.6564 240.5042 14.41074562172731
+FUSE 1
+1 25791U 99035A 02275.50257357 .00000810 00000-0 19257-3 0 6757
+2 25791 24.9832 220.8633 0010929 105.5890 254.5823 14.41071888172536
+FUSE 1
+1 25791U 99035A 02274.94855287 +.00000769 +00000-0 +18010-3 0 06782
+2 25791 024.9832 224.2597 0010747 099.8528 260.3191 14.41070889172458
+FUSE 1
+1 25791U 99035A 02274.39453091 .00000766 00000-0 17925-3 0 6745
+2 25791 24.9832 227.6504 0010741 94.0800 266.0941 14.41070217172379
+FUSE 1
+1 25791U 99035A 02273.97901442 +.00000752 +00000-0 +17475-3 0 06831
+2 25791 024.9833 230.1965 0010675 089.7969 270.3764 14.41069590172310
+FUSE 1
+1 25791U 99035A 02273.21723299 .00000755 00000-0 17576-3 0 6734
+2 25791 24.9834 234.8609 0010679 81.6884 278.4835 14.41068740172200
+FUSE 1
+1 25791U 99035A 02272.94022098 +.00000777 +00000-0 +18254-3 0 07023
+2 25791 024.9832 236.5583 0010621 078.7403 281.4295 14.41068586172166
+FUSE 1
+1 25791U 99035A 02271.97067853 +.00000808 +00000-0 +19195-3 0 06741
+2 25791 024.9832 242.4959 0010491 068.8195 291.3434 14.41067715172025
+FUSE 1
+1 25791U 99035A 02271.55516014 .00000808 00000-0 19212-3 0 6721
+2 25791 24.9832 245.0390 0010492 64.4543 295.7048 14.41067193171964
+FUSE 1
+1 25791U 99035A 02270.51636263 .00000857 00000-0 20706-3 0 6718
+2 25791 24.9832 251.3989 0010443 53.4959 306.6509 14.41066244171817
+FUSE 1
+1 25791U 99035A 02269.33905765 .00000893 00000-0 21807-3 0 6704
+2 25791 24.9833 258.6080 0010394 40.7861 319.3423 14.41064845171648
+FUSE 1
+1 25791U 99035A 02268.23100366 .00000992 00000-0 24815-3 0 6696
+2 25791 24.9827 265.3949 0010332 28.8061 331.3014 14.41063880171481
+FUSE 1
+1 25791U 99035A 02267.19220147 .00001098 00000-0 28063-3 0 6686
+2 25791 24.9823 271.7543 0010324 17.9281 342.1586 14.41062934171339
+FUSE 1
+1 25791U 99035A 02265.66862362 .00001232 00000-0 32165-3 0 6674
+2 25791 24.9816 281.0815 0010329 1.9220 358.1327 14.41060966171117
+FUSE 1
+1 25791U 99035A 02264.56056684 .00001222 00000-0 31866-3 0 6669
+2 25791 24.9817 287.8674 0010319 349.8851 10.1457 14.41058532170954
+FUSE 1
+1 25791U 99035A 02263.52176164 .00001227 00000-0 32006-3 0 6651
+2 25791 24.9817 294.2294 0010341 338.4888 21.5185 14.41056345170801
+FUSE 1
+1 25791U 99035A 02262.62146251 +.00001266 +00000-0 +33195-3 0 06726
+2 25791 024.9813 299.7417 0010331 328.9476 031.0420 14.41054666170677
+FUSE 1
+1 25791U 99035A 02262.41370124 .00001257 00000-0 32914-3 0 6640
+2 25791 24.9813 301.0139 0010341 326.6238 33.3618 14.41054137170641
+FUSE 1
+1 25791U 99035A 02261.23638509 .00001327 00000-0 35045-3 0 6638
+2 25791 24.9808 308.2225 0010336 313.5426 46.4225 14.41052008170473
+FUSE 1
+1 25791U 99035A 02260.19757547 .00001443 00000-0 38612-3 0 6627
+2 25791 24.9803 314.5833 0010346 302.4458 57.5047 14.41050420170321
+FUSE 1
+1 25791U 99035A 02259.71279796 +.00001450 +00000-0 +38808-3 0 06904
+2 25791 024.9803 317.5503 0010348 297.3449 062.6007 14.41049231170255
+FUSE 1
+1 25791U 99035A 02258.81249669 .00001457 00000-0 39044-3 0 6618
+2 25791 24.9801 323.0624 0010344 288.1227 71.8153 14.41046928170127
+FUSE 1
+1 25791U 99035A 02257.56592355 .00001607 00000-0 43604-3 0 6605
+2 25791 24.9798 330.6972 0010331 274.6720 85.2607 14.41044565169942
+FUSE 1
+1 25791U 99035A 02256.52711275 .00001599 00000-0 43384-3 0 6597
+2 25791 24.9793 337.0578 0010393 263.4699 96.4645 14.41041446169793
+FUSE 1
+1 25791U 99035A 02255.41904580 .00001584 00000-0 42933-3 0 6589
+2 25791 24.9787 343.8424 0010407 251.9278 108.0095 14.41038086169630
+FUSE 1
+1 25791U 99035A 02254.72650348 +.00001491 +00000-0 +40078-3 0 06835
+2 25791 024.9788 348.0813 0010411 244.6244 115.3195 14.41035736169537
+FUSE 1
+1 25791U 99035A 02253.89545131 .00001396 00000-0 37159-3 0 6576
+2 25791 24.9785 353.1698 0010435 235.7390 124.2119 14.41033155169416
+FUSE 1
+1 25791U 99035A 02252.92589091 +.00001057 +00000-0 +26812-3 0 06570
+2 25791 024.9789 359.1085 0010610 225.0767 134.8879 14.41029740169270
+FUSE 1
+1 25791U 99035A 02252.85663624 .00001059 00000-0 26870-3 0 6562
+2 25791 24.9790 359.5326 0010621 224.3210 135.6441 14.41029635169267
+FUSE 1
+1 25791U 99035A 02251.95632761 +.00001005 +00000-0 +25223-3 0 06562
+2 25791 024.9790 005.0443 0010707 214.4524 145.5288 14.41027801169131
+FUSE 1
+1 25791U 99035A 02251.81781883 .00001011 00000-0 25399-3 0 6557
+2 25791 24.9790 5.8921 0010710 212.9295 147.0567 14.41027608169112
+FUSE 1
+1 25791U 99035A 02250.70974565 +.00000905 +00000-0 +22152-3 0 06628
+2 25791 024.9792 012.6758 0010740 201.5396 158.4662 14.41025222168950
+FUSE 1
+1 25791U 99035A 02250.57123644 .00000892 00000-0 21766-3 0 6543
+2 25791 24.9793 13.5236 0010741 200.1557 159.8528 14.41024911168935
+FUSE 1
+1 25791U 99035A 02248.90912382 .00000783 00000-0 18435-3 0 6539
+2 25791 24.9796 23.6965 0010767 182.5930 177.4521 14.41021797168696
+FUSE 1
+1 25791U 99035A 02247.93955749 +.00000652 +00000-0 +14418-3 0 06762
+2 25791 024.9802 029.6342 0010910 173.0331 187.0327 14.41019680168553
+FUSE 1
+1 25791U 99035A 02247.24700867 .00000614 00000-0 13267-3 0 6528
+2 25791 24.9803 33.8749 0010996 165.8745 194.2065 14.41018736168453
+FUSE 1
+1 25791U 99035A 02246.13892944 .00000537 00000-0 10933-3 0 6513
+2 25791 24.9806 40.6587 0011018 154.5982 205.5064 14.41017206168294
+FUSE 1
+1 25791U 99035A 02244.89233811 .00000526 00000-0 10578-3 0 6508
+2 25791 24.9810 48.2931 0011178 142.1273 218.0023 14.41016304168112
+FUSE 1
+1 25791U 99035A 02243.57648803 .00000736 00000-0 16997-3 0 6495
+2 25791 24.9800 56.3527 0011307 128.8388 231.3126 14.41016815167921
+FUSE 1
+1 25791U 99035A 02242.12212513 .00001042 00000-0 26353-3 0 6487
+2 25791 24.9790 65.2545 0011385 113.4504 246.7186 14.41017164167715
+FUSE 1
+1 25791U 99035A 02241.15254607 .00001586 00000-0 42999-3 0 6475
+2 25791 24.9772 71.1895 0011244 103.6925 256.4821 14.41018933167574
+FUSE 1
+1 25791U 99035A 02240.87553062 .00000969 00000-0 24140-3 0 6461
+2 25791 24.9785 72.8895 0010796 101.1155 259.0566 14.41013762167531
+FUSE 1
+1 25791U 99035A 02239.90595273 +.00001112 +00000-0 +28499-3 0 06645
+2 25791 024.9781 078.8252 0010791 090.9038 269.2706 14.41013017167396
+FUSE 1
+1 25791U 99035A 02239.21339631 .00001213 00000-0 31602-3 0 6454
+2 25791 24.9777 83.0642 0010776 83.4859 276.6874 14.41012252167290
+FUSE 1
+1 25791U 99035A 02237.96679327 +.00001439 +00000-0 +38514-3 0 06496
+2 25791 024.9774 090.6979 0010768 071.0115 289.1558 14.41010739167110
+FUSE 1
+1 25791U 99035A 02237.89753765 .00001477 00000-0 39690-3 0 6440
+2 25791 24.9773 91.1232 0010788 70.3652 289.8019 14.41010744167101
+FUSE 1
+1 25791U 99035A 02236.44316461 .00001500 00000-0 40378-3 0 6439
+2 25791 24.9767 100.0287 0010670 55.6564 304.4950 14.41006864166893
+FUSE 1
+1 25791U 99035A 02235.19655478 .00001345 00000-0 35650-3 0 6427
+2 25791 24.9770 107.6610 0010486 43.1111 317.0209 14.41003175166715
+FUSE 1
+1 25791U 99035A 02233.94994384 +.00001071 +00000-0 +27257-3 0 06453
+2 25791 024.9778 115.2923 0010434 030.0321 330.0788 14.40999043166530
+FUSE 1
+1 25791U 99035A 02233.88068763 .00001046 00000-0 26501-3 0 6418
+2 25791 24.9780 115.7163 0010425 29.2338 330.8754 14.40998751166527
+FUSE 1
+1 25791U 99035A 02232.49555828 .00000919 00000-0 22621-3 0 6403
+2 25791 24.9786 124.1958 0010414 14.6083 345.4723 14.40995445166325
+FUSE 1
+1 25791U 99035A 02231.94150552 +.00000876 +00000-0 +21309-3 0 06546
+2 25791 024.9788 127.5880 0010407 008.4765 351.5919 14.40994234166249
+FUSE 1
+1 25791U 99035A 02231.38745204 .00000845 00000-0 20367-3 0 6390
+2 25791 24.9789 130.9790 0010378 2.6277 357.4296 14.40993213166169
+FUSE 1
+1 25791U 99035A 02230.97191224 +.00000798 +00000-0 +18928-3 0 06602
+2 25791 024.9793 133.5251 0010384 358.0335 002.0134 14.40992235166106
+FUSE 1
+1 25791U 99035A 02230.21008800 .00000719 00000-0 16493-3 0 6389
+2 25791 24.9799 138.1891 0010364 349.8416 10.1882 14.40990663165998
+FUSE 1
+1 25791U 99035A 02228.89420846 .00000570 00000-0 11957-3 0 6372
+2 25791 24.9808 146.2460 0010327 335.3789 24.6230 14.40988149165806
+FUSE 1
+1 25791U 99035A 02227.85535415 .00000520 00000-0 10422-3 0 6366
+2 25791 24.9812 152.6068 0010343 324.1332 35.8482 14.40986913165657
+FUSE 1
+1 25791U 99035A 02226.95501315 +.00000506 +00000-0 +99908-4 0 06426
+2 25791 024.9813 158.1197 0010337 314.4756 045.4908 14.40986180165529
+FUSE 1
+1 25791U 99035A 02226.47021386 .00000502 00000-0 98661-4 0 6351
+2 25791 24.9813 161.0865 0010330 309.4557 50.5037 14.40985822165454
+FUSE 1
+1 25791U 99035A 02225.98541513 +.00000476 +00000-0 +90569-4 0 06422
+2 25791 024.9815 164.0553 0010405 304.3474 055.6046 14.40985257165388
+FUSE 1
+1 25791U 99035A 02225.22358750 .00000482 00000-0 92578-4 0 6348
+2 25791 24.9816 168.7186 0010417 296.1218 63.8218 14.40984875165274
+FUSE 1
+1 25791U 99035A 02223.97696163 +.00000481 +00000-0 +92220-4 0 06412
+2 25791 024.9814 176.3517 0010455 283.1411 076.7930 14.40984067165095
+FUSE 1
+1 25791U 99035A 02223.49216218 .00000489 00000-0 94620-4 0 6333
+2 25791 24.9814 179.3194 0010476 277.8554 82.0754 14.40983850165026
+FUSE 1
+1 25791U 99035A 02222.93810641 +.00000509 +00000-0 +10073-3 0 06456
+2 25791 024.9812 182.7128 0010537 272.0359 087.8941 14.40983654164940
+FUSE 1
+1 25791U 99035A 02222.24553673 .00000508 00000-0 10033-3 0 6320
+2 25791 24.9814 186.9527 0010565 264.8001 95.1296 14.40983198164842
+FUSE 1
+1 25791U 99035A 02220.72188492 .00000514 00000-0 10213-3 0 6310
+2 25791 24.9811 196.2838 0010649 248.9270 111.0101 14.40982128164623
+FUSE 1
+1 25791U 99035A 02219.96005888 +.00000589 +00000-0 +12528-3 0 06358
+2 25791 024.9808 200.9504 0010520 240.1664 119.7798 14.40982235164515
+FUSE 1
+1 25791U 99035A 02219.54451761 .00000591 00000-0 12583-3 0 6306
+2 25791 24.9809 203.4950 0010565 235.7070 124.2439 14.40981930164456
+FUSE 1
+1 25791U 99035A 02218.50566444 .00000591 00000-0 12589-3 0 6290
+2 25791 24.9810 209.8564 0010671 225.0521 134.9121 14.40981088164304
+FUSE 1
+1 25791U 99035A 02217.67458222 +.00000586 +00000-0 +12427-3 0 06319
+2 25791 024.9810 214.9451 0010742 216.2683 143.7098 14.40980335164187
+FUSE 1
+1 25791U 99035A 02217.46681143 .00000587 00000-0 12450-3 0 6289
+2 25791 24.9811 216.2175 0010798 214.1027 145.8787 14.40980196164156
+FUSE 1
+1 25791U 99035A 02216.77424262 +.00000608 +00000-0 +13094-3 0 06446
+2 25791 024.9810 220.4589 0010860 206.6184 153.3766 14.40979799164058
+FUSE 1
+1 25791U 99035A 02216.22018763 .00000623 00000-0 13547-3 0 6272
+2 25791 24.9812 223.8548 0011013 200.8472 159.1590 14.40979503163971
+FUSE 1
+1 25791U 99035A 02215.18133380 .00000638 00000-0 14024-3 0 6265
+2 25791 24.9811 230.2141 0011063 190.3957 169.6323 14.40978710163820
+FUSE 1
+1 25791U 99035A 02213.72693828 .00000645 00000-0 14244-3 0 6252
+2 25791 24.9811 239.1154 0011038 174.9987 185.0630 14.40977412163613
+FUSE 1
+1 25791U 99035A 02212.54957017 .00000624 00000-0 13599-3 0 6242
+2 25791 24.9812 246.3230 0011021 162.5693 197.5196 14.40976134163444
+FUSE 1
+1 25791U 99035A 02211.71848578 +.00000610 +00000-0 +13168-3 0 06428
+2 25791 024.9811 251.4099 0011007 153.9347 206.1718 14.40975246163324
+FUSE 1
+1 25791U 99035A 02211.23368603 .00000608 00000-0 13095-3 0 6236
+2 25791 24.9811 254.3777 0010998 148.9909 211.1249 14.40974805163252
+FUSE 1
+1 25791U 99035A 02210.74888612 +.00000597 +00000-0 +12772-3 0 06506
+2 25791 024.9812 257.3445 0011002 143.8708 216.2543 14.40974298163187
+FUSE 1
+1 25791U 99035A 02209.98705743 +.00000587 +00000-0 +12459-3 0 06234
+2 25791 024.9812 262.0081 0011027 135.8366 224.3023 14.40973550163075
+FUSE 1
+1 25791U 99035A 02209.84854304 .00000587 00000-0 12459-3 0 6226
+2 25791 24.9812 262.8557 0011027 134.3832 225.7585 14.40973436163052
+FUSE 1
+1 25791U 99035A 02208.87894183 +.00000550 +00000-0 +11335-3 0 06274
+2 25791 024.9814 268.7902 0011057 124.1443 236.0120 14.40972331162918
+FUSE 1
+1 25791U 99035A 02208.53265521 .00000545 00000-0 11191-3 0 6213
+2 25791 24.9816 270.9107 0011057 120.4890 239.6710 14.40972045162867
+FUSE 1
+1 25791U 99035A 02207.21676421 .00000548 00000-0 11278-3 0 6200
+2 25791 24.9817 278.9666 0011052 107.3653 252.8065 14.40971121162675
+FUSE 1
+1 25791U 99035A 02206.87047673 +.00000547 +00000-0 +11238-3 0 06588
+2 25791 024.9817 281.0857 0011055 103.7292 256.4448 14.40970853162625
+FUSE 1
+1 25791U 99035A 02205.97012911 +.00000514 +00000-0 +10239-3 0 06208
+2 25791 024.9822 286.5981 0010989 094.6865 265.4898 14.40969946162493
+FUSE 1
+1 25791U 99035A 02205.83161386 .00000516 00000-0 10301-3 0 6194
+2 25791 24.9822 287.4462 0010983 93.2503 266.9261 14.40969873162472
+FUSE 1
+1 25791U 99035A 02204.86200730 +.00000468 +00000-0 +88363-4 0 06306
+2 25791 024.9826 293.3810 0010949 083.1743 277.0007 14.40968846162330
+FUSE 1
+1 25791U 99035A 02204.58497626 .00000484 00000-0 93112-4 0 6189
+2 25791 24.9826 295.0773 0010951 80.5497 279.6249 14.40968840162292
+FUSE 1
+1 25791U 99035A 02203.89239905 +.00000449 +00000-0 +82482-4 0 06488
+2 25791 024.9828 299.3172 0010890 073.2055 286.9638 14.40968123162191
+FUSE 1
+1 25791U 99035A 02203.13056333 .00000422 00000-0 74306-4 0 6170
+2 25791 24.9830 303.9805 0010839 65.4604 294.7027 14.40967491162089
+FUSE 1
+1 25791U 99035A 02201.88392126 .00000430 00000-0 76591-4 0 6169
+2 25791 24.9831 311.6129 0010788 52.8603 307.2893 14.40966950161907
+FUSE 1
+1 25791U 99035A 02200.84505139 .00000426 00000-0 75310-4 0 6156
+2 25791 24.9831 317.9723 0010726 42.0624 318.0702 14.40966400161754
+FUSE 1
+1 25791U 99035A 02199.94469674 +.00000428 +00000-0 +76045-4 0 06177
+2 25791 024.9831 323.4842 0010660 032.3527 327.7634 14.40965983161621
+FUSE 1
+1 25791U 99035A 02199.80618047 .00000429 00000-0 76448-4 0 6147
+2 25791 24.9831 324.3321 0010640 30.8653 329.2479 14.40965931161609
+FUSE 1
+1 25791U 99035A 02198.90582495 +.00000439 +00000-0 +79526-4 0 06303
+2 25791 024.9831 329.8436 0010600 021.3948 338.6994 14.40965565161478
+FUSE 1
+1 25791U 99035A 02198.55953443 .00000442 00000-0 80466-4 0 6139
+2 25791 24.9831 331.9633 0010574 17.8270 342.2607 14.40965414161429
+FUSE 1
+1 25791U 99035A 02197.93621100 +.00000444 +00000-0 +80937-4 0 06362
+2 25791 024.9831 335.7781 0010561 011.3039 348.7699 14.40965095161330
+FUSE 1
+1 25791U 99035A 02197.24362949 .00000444 00000-0 80988-4 0 6129
+2 25791 24.9831 340.0166 0010550 3.9600 356.0998 14.40964729161231
+FUSE 1
+1 25791U 99035A 02196.20475640 .00000449 00000-0 82478-4 0 6117
+2 25791 24.9832 346.3749 0010499 353.1602 6.8760 14.40964234161083
+FUSE 1
+1 25791U 99035A 02195.92772353 +.00000455 +00000-0 +84353-4 0 06533
+2 25791 024.9833 348.0711 0010484 350.1147 009.9154 14.40964150161041
+FUSE 1
+1 25791U 99035A 02194.95810905 +.00000446 +00000-0 +81482-4 0 06126
+2 25791 024.9834 354.0072 0010473 339.7777 020.2317 14.40963538160909
+FUSE 1
+1 25791U 99035A 02194.88885078 .00000448 00000-0 82042-4 0 6104
+2 25791 24.9834 354.4313 0010464 339.0255 20.9823 14.40963525160898
+FUSE 1
+1 25791U 99035A 02193.84997767 .00000458 00000-0 85132-4 0 6090
+2 25791 24.9833 0.7908 0010468 328.1332 31.8541 14.40963009160746
+FUSE 1
+1 25791U 99035A 02192.94962101 +.00000463 +00000-0 +86594-4 0 06116
+2 25791 024.9833 006.3022 0010480 318.4949 041.4767 14.40962539160615
+FUSE 1
+1 25791U 99035A 02192.81110453 .00000461 00000-0 86250-4 0 6080
+2 25791 24.9833 7.1500 0010464 316.9667 43.0024 14.40962462160593
+FUSE 1
+1 25791U 99035A 02191.91074766 +.00000486 +00000-0 +93771-4 0 06270
+2 25791 024.9834 012.6624 0010451 307.1503 052.8049 14.40962172160468
+FUSE 1
+1 25791U 99035A 02191.56445709 .00000480 00000-0 91884-4 0 6075
+2 25791 24.9832 14.7827 0010464 303.4798 56.4711 14.40961871160419
+FUSE 1
+1 25791U 99035A 02190.94113347 +.00000477 +00000-0 +90930-4 0 06343
+2 25791 024.9834 018.5979 0010445 296.7402 063.2037 14.40961502160324
+FUSE 1
+1 25791U 99035A 02190.17929374 .00000481 00000-0 92165-4 0 6069
+2 25791 24.9832 23.2616 0010481 288.6533 71.2835 14.40961043160211
+FUSE 1
+1 25791U 99035A 02189.14042204 .00000483 00000-0 92846-4 0 6059
+2 25791 24.9831 29.6230 0010511 277.8585 82.0723 14.40960393160069
+FUSE 1
+1 25791U 99035A 02187.89377604 .00000505 00000-0 99522-4 0 6046
+2 25791 24.9830 37.2551 0010534 264.3308 95.5998 14.40959812159883
+FUSE 1
+1 25791U 99035A 02186.43935654 .00000501 00000-0 98297-4 0 6033
+2 25791 24.9829 46.1591 0010579 249.0358 110.8998 14.40958795159675
+FUSE 1
+1 25791U 99035A 02185.19271205 .00000504 00000-0 99265-4 0 6028
+2 25791 24.9830 53.7902 0010629 236.0216 123.9281 14.40958001159492
+FUSE 1
+1 25791U 99035A 02184.15384184 .00000513 00000-0 10203-3 0 6017
+2 25791 24.9831 60.1514 0010674 224.8693 135.0951 14.40957412159345
+FUSE 1
+1 25791U 99035A 02182.97645554 +.00000516 +00000-0 +10283-3 0 06062
+2 25791 024.9830 067.3585 0010725 212.3891 147.5958 14.40956658159177
+FUSE 1
+1 25791U 99035A 02182.90719767 .00000519 00000-0 10371-3 0 6008
+2 25791 24.9829 67.7832 0010724 211.7115 148.2747 14.40956613159169
+FUSE 1
+1 25791U 99035A 02181.93758516 +.00000548 +00000-0 +11261-3 0 06062
+2 25791 024.9828 073.7191 0010818 201.1978 158.8084 14.40956221159028
+FUSE 1
+1 25791U 99035A 02181.86832717 .00000553 00000-0 11428-3 0 5992
+2 25791 24.9828 74.1435 0010825 200.5146 159.4931 14.40956212159019
+FUSE 1
+1 25791U 99035A 02180.96797324 +.00000532 +00000-0 +10787-3 0 06159
+2 25791 024.9829 079.6553 0010847 191.2420 168.7845 14.40955372158883
+FUSE 1
+1 25791U 99035A 02180.55242493 .00000529 00000-0 10681-3 0 5985
+2 25791 24.9829 82.1984 0010852 186.9486 173.0868 14.40955042158821
+FUSE 1
+1 25791U 99035A 02179.92910226 +.00000542 +00000-0 +11095-3 0 06155
+2 25791 024.9830 086.0152 0010926 180.7342 179.3149 14.40954738158730
+FUSE 1
+1 25791U 99035A 02179.23652162 .00000551 00000-0 11359-3 0 5973
+2 25791 24.9830 90.2545 0010946 173.5199 186.5457 14.40954304158635
+FUSE 1
+1 25791U 99035A 02177.98987603 +.00000542 +00000-0 +11095-3 0 06006
+2 25791 024.9832 097.8882 0011031 160.8337 199.2588 14.40953321158457
+FUSE 1
+1 25791U 99035A 02177.85135981 .00000538 00000-0 10963-3 0 5968
+2 25791 24.9832 98.7360 0011031 159.3474 200.7478 14.40953176158435
+FUSE 1
+1 25791U 99035A 02176.95100402 +.00000504 +00000-0 +99300-4 0 06022
+2 25791 024.9833 104.2472 0011004 150.1851 209.9284 14.40952226158308
+FUSE 1
+1 25791U 99035A 02176.46619641 .00000500 00000-0 98147-4 0 5953
+2 25791 24.9832 107.2138 0011008 145.0625 215.0606 14.40951875158232
+FUSE 1
+1 25791U 99035A 02175.21954740 .00000495 00000-0 96657-4 0 5943
+2 25791 24.9834 114.8444 0011052 132.0019 228.1431 14.40951047158052
+FUSE 1
+1 25791U 99035A 02173.90363925 .00000444 00000-0 81013-4 0 5939
+2 25791 24.9837 122.9038 0011028 119.1777 240.9836 14.40949793157868
+FUSE 1
+1 25791U 99035A 02172.51846935 .00000425 00000-0 75104-4 0 5924
+2 25791 24.9839 131.3835 0010980 104.9187 255.2530 14.40948920157661
+FUSE 1
+1 25791U 99035A 02171.41033186 .00000417 00000-0 72553-4 0 5913
+2 25791 24.9844 138.1686 0010902 93.6662 266.5092 14.40948370157502
+FUSE 1
+1 25791U 99035A 02170.50996877 +.00000436 +00000-0 +78639-4 0 05975
+2 25791 024.9843 143.6798 0010904 084.4115 275.7637 14.40948095157375
+FUSE 1
+1 25791U 99035A 02170.23293415 .00000423 00000-0 74576-4 0 5908
+2 25791 24.9845 145.3761 0010901 81.5059 278.6684 14.40947844157339
+FUSE 1
+1 25791U 99035A 02169.19405227 .00000425 00000-0 75062-4 0 5898
+2 25791 24.9846 151.7361 0010811 70.7002 289.4672 14.40947374157183
+FUSE 1
+1 25791U 99035A 02167.60109739 .00000492 00000-0 95589-4 0 5880
+2 25791 24.9842 161.4859 0010787 54.1241 306.0266 14.40947018156956
+FUSE 1
+1 25791U 99035A 02166.56221265 .00000534 00000-0 10864-3 0 5871
+2 25791 24.9839 167.8442 0010791 43.1206 317.0146 14.40946662156801
+FUSE 1
+1 25791U 99035A 02165.24629112 .00000568 00000-0 11909-3 0 5865
+2 25791 24.9843 175.9013 0010722 29.2251 330.8852 14.40946031156615
+FUSE 1
+1 25791U 99035A 02163.86110918 .00000595 00000-0 12719-3 0 5859
+2 25791 24.9845 184.3792 0010702 14.8284 345.2538 14.40945180156412
+FUSE 1
+1 25791U 99035A 02162.54518530 .00000658 00000-0 14664-3 0 5845
+2 25791 24.9846 192.4369 0010588 1.1350 358.9185 14.40944578156226
+FUSE 1
+1 25791U 99035A 02161.85259359 +.00000674 +00000-0 +15131-3 0 06107
+2 25791 024.9846 196.6771 0010590 353.7741 006.2633 14.40944011156124
+FUSE 1
+1 25791U 99035A 02161.22926069 .00000700 00000-0 15929-3 0 5831
+2 25791 24.9847 200.4935 0010585 347.0023 13.0212 14.40943608156034
+FUSE 1
+1 25791U 99035A 02159.84407613 .00000743 00000-0 17262-3 0 5823
+2 25791 24.9846 208.9724 0010588 332.2220 27.7726 14.40942460155834
+FUSE 1
+1 25791U 99035A 02158.80518770 .00000793 00000-0 18784-3 0 5819
+2 25791 24.9846 215.3341 0010581 321.3048 38.6704 14.40941632155681
+FUSE 1
+1 25791U 99035A 02157.97407665 +.00000825 +00000-0 +19757-3 0 05879
+2 25791 024.9847 220.4222 0010562 312.3796 047.5815 14.40940838155562
+FUSE 1
+1 25791U 99035A 02157.55852103 .00000870 00000-0 21141-3 0 5807
+2 25791 24.9847 222.9680 0010439 307.4635 52.4923 14.40940695155507
+FUSE 1
+1 25791U 99035A 02156.86592860 +.00000855 +00000-0 +20693-3 0 06042
+2 25791 024.9846 227.2073 0010554 299.6921 060.2540 14.40939609155402
+FUSE 1
+1 25791U 99035A 02156.24259499 .00000899 00000-0 22019-3 0 5795
+2 25791 24.9846 231.0244 0010551 292.5198 67.4193 14.40939088155314
+FUSE 1
+1 25791U 99035A 02155.06518757 .00000887 00000-0 21661-3 0 5787
+2 25791 24.9851 238.2318 0010502 278.6019 81.3297 14.40937436155140
+FUSE 1
+1 25791U 99035A 02154.92666911 +.00000889 +00000-0 +21739-3 0 06067
+2 25791 024.9851 239.0795 0010509 277.1250 082.8066 14.40937258155126
+FUSE 1
+1 25791U 99035A 02153.88777948 .00000883 00000-0 21546-3 0 5771
+2 25791 24.9856 245.4403 0010777 265.3681 94.5596 14.40935853154971
+FUSE 1
+1 25791U 99035A 02152.57185272 .00000902 00000-0 22117-3 0 5765
+2 25791 24.9868 253.4989 0011060 249.3519 110.5805 14.40934379154783
+FUSE 1
+1 25791U 99035A 02151.53296309 .00000970 00000-0 24192-3 0 5753
+2 25791 24.9869 259.8581 0011180 238.2453 121.6966 14.40933320154639
+FUSE 1
+1 25791U 99035A 02150.70185103 +.00001051 +00000-0 +26686-3 0 05975
+2 25791 024.9867 264.9433 0011243 229.4877 130.4651 14.40932501154518
+FUSE 1
+1 25791U 99035A 02149.93999876 .00001091 00000-0 27908-3 0 5745
+2 25791 24.9867 269.6053 0011249 221.4930 138.4719 14.40931407154401
+FUSE 1
+1 25791U 99035A 02148.90111038 +.00001229 +00000-0 +32134-3 0 05769
+2 25791 024.9863 275.9625 0011269 210.6845 149.3088 14.40930136154250
+FUSE 1
+1 25791U 99035A 02148.83185155 .00000938 00000-0 23221-3 0 5732
+2 25791 24.9851 276.3822 0010775 212.4019 147.5850 14.40927933154242
+FUSE 1
+1 25791U 99035A 02147.93147934 +.00000813 +00000-0 +19395-3 0 05958
+2 25791 024.9857 281.8960 0010898 202.6278 157.3749 14.40926137154113
+FUSE 1
+1 25791U 99035A 02147.58518187 .00001001 00000-0 25172-3 0 5726
+2 25791 24.9861 284.0183 0011012 197.6860 162.3263 14.40926704154060
+FUSE 1
+1 25791U 99035A 02146.54628978 .00000913 00000-0 22451-3 0 5718
+2 25791 24.9845 290.3753 0010754 189.6041 170.4268 14.40924183153916
+FUSE 1
+1 25791U 99035A 02145.16109886 .00000752 00000-0 17520-3 0 5708
+2 25791 24.9854 298.8585 0011057 175.5591 184.5015 14.40921808153718
+FUSE 1
+1 25791U 99035A 02144.12220258 .00000806 00000-0 19188-3 0 5690
+2 25791 24.9858 305.2220 0011313 166.0837 193.9972 14.40920971153563
+FUSE 1
+1 25791U 99035A 02143.91442346 +.00000815 +00000-0 +19451-3 0 06009
+2 25791 024.9859 306.4952 0011363 164.3048 195.7813 14.40920803153534
+FUSE 1
+1 25791U 99035A 02142.94478746 +.00000943 +00000-0 +23384-3 0 05690
+2 25791 024.9854 312.4312 0011411 153.9631 206.1530 14.40920479153398
+FUSE 1
+1 25791U 99035A 02142.87552765 .00000884 00000-0 21574-3 0 5688
+2 25791 24.9848 312.8512 0010954 151.9799 208.1299 14.40919629153389
+FUSE 1
+1 25791U 99035A 02141.90588955 +.00000926 +00000-0 +22857-3 0 05874
+2 25791 024.9841 318.7826 0010700 140.9341 219.1940 14.40918429153242
+FUSE 1
+1 25791U 99035A 02141.55958991 .00000963 00000-0 23993-3 0 5677
+2 25791 24.9839 320.9048 0010714 137.4073 222.7267 14.40918220153193
+FUSE 1
+1 25791U 99035A 02140.17438775 .00001057 00000-0 26889-3 0 5668
+2 25791 24.9835 329.3818 0010822 124.7440 235.4086 14.40916869152998
+FUSE 1
+1 25791U 99035A 02139.96660755 +.00001083 +00000-0 +27692-3 0 05884
+2 25791 024.9836 330.6540 0010888 122.4431 237.7130 14.40916754152968
+FUSE 1
+1 25791U 99035A 02139.06622508 .00001163 00000-0 30126-3 0 5659
+2 25791 24.9830 336.1650 0010863 113.3928 246.7719 14.40915711152839
+FUSE 1
+1 25791U 99035A 02137.88879990 .00001296 00000-0 34198-3 0 5645
+2 25791 24.9826 343.3712 0010907 101.0863 259.0871 14.40914401152666
+FUSE 1
+1 25791U 99035A 02136.91915471 +.00001350 +00000-0 +35875-3 0 05816
+2 25791 024.9827 349.3060 0010932 090.9446 269.2314 14.40912681152528
+FUSE 1
+1 25791U 99035A 02136.22654987 .00001376 00000-0 36654-3 0 5636
+2 25791 24.9826 353.5443 0010936 83.6416 276.5336 14.40911244152427
+FUSE 1
+1 25791U 99035A 02135.94950762 +.00001397 +00000-0 +37325-3 0 05723
+2 25791 024.9825 355.2400 0010966 080.7402 279.4344 14.40910769152381
+FUSE 1
+1 25791U 99035A 02135.18764091 .00001413 00000-0 37797-3 0 5628
+2 25791 24.9824 359.9024 0010965 72.6730 287.4977 14.40909002152273
+FUSE 1
+1 25791U 99035A 02134.91059834 +.00001415 +00000-0 +37857-3 0 05922
+2 25791 024.9825 001.5980 0010968 069.7349 290.4345 14.40908337152230
+FUSE 1
+1 25791U 99035A 02133.94094738 +.00001415 +00000-0 +37859-3 0 05636
+2 25791 024.9824 007.5352 0010877 059.9778 300.1809 14.40905944152093
+FUSE 1
+1 25791U 99035A 02133.87168652 .00001412 00000-0 37775-3 0 5617
+2 25791 24.9825 7.9592 0010873 59.2261 300.9315 14.40905750152084
+FUSE 1
+1 25791U 99035A 02132.48646600 .00001369 00000-0 36456-3 0 5602
+2 25791 24.9823 16.4325 0010684 45.9733 314.1653 14.40902098151888
+FUSE 1
+1 25791U 99035A 02131.30902586 .00001353 00000-0 35975-3 0 5596
+2 25791 24.9822 23.6391 0010610 33.6244 326.4935 14.40899142151716
+FUSE 1
+1 25791U 99035A 02130.20084454 .00001308 00000-0 34583-3 0 5582
+2 25791 24.9820 30.4208 0010580 22.0031 338.0932 14.40896173151558
+FUSE 1
+1 25791U 99035A 02129.16192230 .00001226 00000-0 32085-3 0 5570
+2 25791 24.9821 36.7788 0010481 11.1643 348.9097 14.40893274151404
+FUSE 1
+1 25791U 99035A 02128.95413775 +.00001211 +00000-0 +31627-3 0 05931
+2 25791 024.9821 038.0520 0010468 008.7737 351.2951 14.40892692151379
+FUSE 1
+1 25791U 99035A 02127.98447523 +.00001111 +00000-0 +28565-3 0 05601
+2 25791 024.9824 043.9896 0010296 357.7755 002.2712 14.40889924151236
+FUSE 1
+1 25791U 99035A 02127.91521357 .00001094 00000-0 28026-3 0 5569
+2 25791 24.9824 44.4136 0010284 357.0692 2.9753 14.40889652151228
+FUSE 1
+1 25791U 99035A 02126.94554859 +.00001060 +00000-0 +27008-3 0 05601
+2 25791 024.9824 050.3495 0010262 346.7330 013.2907 14.40887620151085
+FUSE 1
+1 25791U 99035A 02126.87628689 .00001055 00000-0 26832-3 0 5558
+2 25791 24.9824 50.7736 0010263 346.0680 13.9545 14.40887452151076
+FUSE 1
+1 25791U 99035A 02125.97588259 +.00001014 +00000-0 +25588-3 0 05671
+2 25791 024.9823 056.2855 0010259 336.2920 023.7116 14.40885529150942
+FUSE 1
+1 25791U 99035A 02125.42178682 .00001006 00000-0 25328-3 0 5545
+2 25791 24.9822 59.6761 0010255 330.4733 29.5196 14.40884531150863
+FUSE 1
+1 25791U 99035A 02124.38285672 .00001011 00000-0 25509-3 0 5533
+2 25791 24.9820 66.0352 0010273 319.4923 40.4821 14.40882801150716
+FUSE 1
+1 25791U 99035A 02123.20540156 .00000953 00000-0 23705-3 0 5523
+2 25791 24.9824 73.2432 0010279 305.7597 54.1955 14.40880460150540
+FUSE 1
+1 25791U 99035A 02121.95868326 +.00001002 +00000-0 +25225-3 0 05542
+2 25791 024.9819 080.8762 0010331 292.1373 067.8041 14.40878747150366
+FUSE 1
+1 25791U 99035A 02121.54311021 .00001003 00000-0 25248-3 0 5515
+2 25791 24.9819 83.4189 0010337 287.6956 72.2421 14.40878063150307
+FUSE 1
+1 25791U 99035A 02120.98901322 +.00001023 +00000-0 +25857-3 0 05632
+2 25791 024.9818 086.8098 0010306 282.1201 077.8157 14.40877264150221
+FUSE 1
+1 25791U 99035A 02120.22712923 .00001015 00000-0 25630-3 0 5502
+2 25791 24.9819 91.4718 0010318 274.0246 85.9082 14.40875930150118
+FUSE 1
+1 25791U 99035A 02119.95008070 +.00001028 +00000-0 +26024-3 0 05648
+2 25791 024.9817 093.1681 0010309 271.2034 088.7294 14.40875508150070
+FUSE 1
+1 25791U 99035A 02119.18819734 .00000984 00000-0 24661-3 0 5498
+2 25791 24.9821 97.8348 0010364 262.8749 97.0580 14.40873938149968
+FUSE 1
+1 25791U 99035A 02117.59516608 .00000965 00000-0 24087-3 0 5485
+2 25791 24.9822 107.5863 0010462 245.7519 114.1894 14.40871219149738
+FUSE 1
+1 25791U 99035A 02116.55623223 .00001014 00000-0 25598-3 0 5475
+2 25791 24.9819 113.9469 0010496 234.8360 125.1166 14.40869721149589
+FUSE 1
+1 25791U 99035A 02115.24024880 .00000904 00000-0 22221-3 0 5460
+2 25791 24.9822 122.0047 0010673 220.6675 139.3037 14.40867070149393
+FUSE 1
+1 25791U 99035A 02113.64721393 .00000997 00000-0 25068-3 0 5458
+2 25791 24.9820 131.7593 0010921 204.4419 155.5575 14.40864885149169
+FUSE 1
+1 25791U 99035A 02112.60827693 .00001229 00000-0 32167-3 0 5449
+2 25791 24.9818 138.1223 0011109 194.3356 165.6844 14.40863758149016
+FUSE 1
+1 25791U 99035A 02111.70786489 +.00001579 +00000-0 +42935-3 0 05459
+2 25791 024.9818 143.6347 0011005 184.3083 175.7332 14.40862715148885
+FUSE 1
+1 25791U 99035A 02111.56934007 .00001615 00000-0 44009-3 0 5437
+2 25791 24.9819 144.4840 0011022 182.6205 177.4245 14.40862480148868
+FUSE 1
+1 25791U 99035A 02110.53040188 .00001831 00000-0 50650-3 0 5429
+2 25791 24.9817 150.8474 0011038 171.9009 188.1678 14.40859918148715
+FUSE 1
+1 25791U 99035A 02109.21441033 .00001839 00000-0 50903-3 0 5414
+2 25791 24.9818 158.9076 0011058 159.5103 200.5858 14.40855347148522
+FUSE 1
+1 25791U 99035A 02107.75988762 .00001806 00000-0 49905-3 0 5409
+2 25791 24.9818 167.8101 0011016 144.5815 215.5425 14.40850340148319
+FUSE 1
+1 25791U 99035A 02106.72093909 .00001824 00000-0 50445-3 0 5394
+2 25791 24.9819 174.1696 0011038 134.1147 226.0286 14.40847102148164
+FUSE 1
+1 25791U 99035A 02105.61272498 .00001733 00000-0 47679-3 0 5386
+2 25791 24.9822 180.9533 0010987 122.6889 237.4679 14.40842753148002
+FUSE 1
+1 25791U 99035A 02104.85082480 +.00001713 +00000-0 +47068-3 0 05437
+2 25791 024.9823 185.6152 0010986 114.8415 245.3238 14.40840218147898
+FUSE 1
+1 25791U 99035A 02104.57377071 .00001648 00000-0 45060-3 0 5379
+2 25791 24.9828 187.3119 0010910 112.4216 247.7465 14.40838832147858
+FUSE 1
+1 25791U 99035A 02102.91143625 .00001546 00000-0 41945-3 0 5365
+2 25791 24.9833 197.4876 0010832 95.2901 264.8851 14.40833179147610
+FUSE 1
+1 25791U 99035A 02101.94173617 +.00001486 +00000-0 +40101-3 0 05367
+2 25791 024.9836 203.4219 0010768 085.1671 275.0035 14.40830065147475
+FUSE 1
+1 25791U 99035A 02101.87247187 .00001527 00000-0 41368-3 0 5354
+2 25791 24.9836 203.8460 0010860 84.9976 275.1776 14.40830297147464
+FUSE 1
+1 25791U 99035A 02100.90276910 +.00001525 +00000-0 +41312-3 0 05406
+2 25791 024.9836 209.7805 0010820 074.8575 285.3127 14.40827651147329
+FUSE 1
+1 25791U 99035A 02100.55644706 .00001466 00000-0 39504-3 0 5346
+2 25791 24.9839 211.9005 0010785 71.2224 288.9455 14.40826227147276
+FUSE 1
+1 25791U 99035A 02099.72527026 +.00001468 +00000-0 +39557-3 0 05369
+2 25791 024.9839 216.9860 0010792 062.4507 297.7098 14.40824076147152
+FUSE 1
+1 25791U 99035A 02099.51747561 .00001466 00000-0 39497-3 0 5332
+2 25791 24.9839 218.2573 0010790 60.2600 299.8974 14.40823521147123
+FUSE 1
+1 25791U 99035A 02098.96335660 +.00001461 +00000-0 +39351-3 0 05517
+2 25791 024.9839 221.6473 0010791 054.4596 305.6917 14.40822053147043
+FUSE 1
+1 25791U 99035A 02097.99364657 .00001460 00000-0 39305-3 0 5324
+2 25791 24.9840 227.5821 0010785 44.3275 315.8094 14.40819548146900
+FUSE 1
+1 25791U 99035A 02096.88540384 .00001474 00000-0 39764-3 0 5317
+2 25791 24.9839 234.3643 0010788 32.8173 327.3012 14.40816799146743
+FUSE 1
+1 25791U 99035A 02095.63862735 .00001487 00000-0 40141-3 0 5300
+2 25791 24.9840 241.9943 0010816 19.8188 340.2741 14.40813643146563
+FUSE 1
+1 25791U 99035A 02094.59964440 .00001479 00000-0 39900-3 0 5290
+2 25791 24.9841 248.3515 0010781 8.9830 351.0866 14.40810859146412
+FUSE 1
+1 25791U 99035A 02093.56066001 .00001449 00000-0 39004-3 0 5283
+2 25791 24.9842 254.7110 0010724 357.7982 2.2481 14.40807913146263
+FUSE 1
+1 25791U 99035A 02092.17534371 .00001416 00000-0 37974-3 0 5276
+2 25791 24.9846 263.1915 0010706 342.3947 17.6181 14.40804146146065
+FUSE 1
+1 25791U 99035A 02091.06708795 .00001473 00000-0 39722-3 0 5261
+2 25791 24.9844 269.9758 0010605 329.8586 30.1311 14.40801748145901
+FUSE 1
+1 25791U 99035A 02090.92855601 +.00001487 +00000-0 +40157-3 0 05410
+2 25791 024.9846 270.8250 0010580 328.4929 031.4942 14.40801529145887
+FUSE 1
+1 25791U 99035A 02089.95883174 +.00001422 +00000-0 +38169-3 0 05269
+2 25791 024.9848 276.7588 0010511 318.2311 041.7395 14.40798658145743
+FUSE 1
+1 25791U 99035A 02089.88956560 .00001421 00000-0 38139-3 0 5256
+2 25791 24.9849 277.1827 0010506 317.5131 42.4562 14.40798492145730
+FUSE 1
+1 25791U 99035A 02088.15791078 .00001515 00000-0 41010-3 0 5241
+2 25791 24.9847 287.7803 0010520 298.7755 61.1699 14.40794544145482
+FUSE 1
+1 25791U 99035A 02087.95011214 +.00001499 +00000-0 +40534-3 0 05370
+2 25791 024.9848 289.0527 0010533 296.5864 063.3562 14.40793924145453
+FUSE 1
+1 25791U 99035A 02086.91111703 .00001749 00000-0 48209-3 0 5239
+2 25791 24.9841 295.4106 0010495 285.4100 74.5251 14.40792142145301
+FUSE 1
+1 25791U 99035A 02085.94138844 +.00001800 +00000-0 +49790-3 0 05230
+2 25791 024.9840 301.3448 0010492 275.1890 084.7423 14.40789187145168
+FUSE 1
+1 25791U 99035A 02085.87212209 .00001800 00000-0 49784-3 0 5222
+2 25791 24.9839 301.7687 0010498 274.4524 85.4786 14.40788939145150
+FUSE 1
+1 25791U 99035A 02084.20972717 .00001789 00000-0 49461-3 0 5212
+2 25791 24.9837 311.9410 0010520 257.1269 102.8063 14.40783400144918
+FUSE 1
+1 25791U 99035A 02083.17072852 .00001737 00000-0 47850-3 0 5200
+2 25791 24.9841 318.3008 0010603 246.6391 113.2992 14.40779739144768
+FUSE 1
+1 25791U 99035A 02081.92392783 .00001713 00000-0 47112-3 0 5192
+2 25791 24.9843 325.9324 0010711 233.7134 126.2384 14.40775609144588
+FUSE 1
+1 25791U 99035A 02080.88492453 .00001724 00000-0 47457-3 0 5184
+2 25791 24.9839 332.2902 0010758 223.1027 136.8641 14.40772451144430
+FUSE 1
+1 25791U 99035A 02079.98445671 +.00001660 +00000-0 +45511-3 0 05248
+2 25791 024.9866 337.8089 0010640 212.3177 147.6681 14.40769396144307
+FUSE 1
+1 25791U 99035A 02079.36105289 .00001660 00000-0 45502-3 0 5170
+2 25791 24.9864 341.6231 0010625 205.7116 154.2858 14.40767508144212
+FUSE 1
+1 25791U 99035A 02078.94545013 +.00001663 +00000-0 +45593-3 0 05203
+2 25791 024.9866 344.1681 0010662 201.5314 158.4745 14.40766326144157
+FUSE 1
+1 25791U 99035A 02078.18351059 .00001670 00000-0 45823-3 0 5163
+2 25791 24.9867 348.8302 0010676 193.5096 166.5127 14.40764131144045
+FUSE 1
+1 25791U 99035A 02076.93669799 +.00001712 +00000-0 +47120-3 0 05188
+2 25791 024.9862 356.4616 0010674 180.4765 179.5730 14.40760708143868
+FUSE 1
+1 25791U 99035A 02076.86743038 .00001720 00000-0 47342-3 0 5151
+2 25791 24.9861 356.8853 0010677 179.8078 180.2432 14.40760558143856
+FUSE 1
+1 25791U 99035A 02075.34354341 .00001769 00000-0 48858-3 0 5143
+2 25791 24.9857 6.2089 0010689 164.1831 195.9013 14.40756227143637
+FUSE 1
+1 25791U 99035A 02074.23525935 .00001789 00000-0 49489-3 0 5131
+2 25791 24.9864 12.9917 0010652 152.3559 207.7514 14.40752965143470
+FUSE 1
+1 25791U 99035A 02073.95818794 +.00001809 +00000-0 +50096-3 0 05215
+2 25791 024.9863 014.6889 0010627 149.3903 210.7224 14.40752237143437
+FUSE 1
+1 25791U 99035A 02073.19624002 .00001826 00000-0 50609-3 0 5127
+2 25791 24.9865 19.3522 0010642 141.9145 218.2115 14.40749948143323
+FUSE 1
+1 25791U 99035A 02072.91916797 +.00001841 +00000-0 +51076-3 0 05363
+2 25791 024.9864 021.0498 0010609 139.0566 221.0741 14.40749171143282
+FUSE 1
+1 25791U 99035A 02071.53380359 .00001868 00000-0 51930-3 0 5110
+2 25791 24.9870 29.5310 0010560 125.3666 234.7831 14.40744898143080
+FUSE 1
+1 25791U 99035A 02070.97965627 +.00001883 +00000-0 +52391-3 0 05124
+2 25791 024.9873 032.9250 0010530 120.0536 240.1014 14.40743233143007
+FUSE 1
+1 25791U 99035A 02070.49477683 .00001888 00000-0 52553-3 0 5104
+2 25791 24.9873 35.8909 0010528 115.0412 245.1193 14.40741625142931
+FUSE 1
+1 25791U 99035A 02069.24793971 .00001911 00000-0 53253-3 0 5099
+2 25791 24.9880 43.5225 0010388 102.6935 257.4711 14.40737632142757
+FUSE 1
+1 25791U 99035A 02068.20890526 .00001963 00000-0 54852-3 0 5080
+2 25791 24.9877 49.8807 0010265 92.5971 267.5712 14.40734504142601
+FUSE 1
+1 25791U 99035A 02066.40790516 .00002019 00000-0 56597-3 0 5078
+2 25791 24.9882 60.8982 0010140 74.0227 286.1405 14.40728545142340
+FUSE 1
+1 25791U 99035A 02065.23032416 .00001976 00000-0 55274-3 0 5067
+2 25791 24.9890 68.1059 0009928 61.2977 298.8527 14.40723876142175
+FUSE 1
+1 25791U 99035A 02063.63711823 +.00001966 +00000-0 +54965-3 0 05060
+2 25791 024.9889 077.8519 0009855 044.5446 315.5856 14.40718057141946
+FUSE 1
+1 25791U 99035A 02063.56784827 .00001964 00000-0 54915-3 0 5058
+2 25791 24.9890 78.2758 0009853 43.7948 316.3342 14.40717794141939
+FUSE 1
+1 25791U 99035A 02062.25171546 .00001967 00000-0 55002-3 0 5041
+2 25791 24.9898 86.3315 0009720 29.5760 330.5288 14.40713207141744
+FUSE 1
+1 25791U 99035A 02060.72776629 .00001974 00000-0 55231-3 0 5035
+2 25791 24.9904 95.6541 0009691 13.5587 346.5178 14.40707846141526
+FUSE 1
+1 25791U 99035A 02059.68870443 .00002061 00000-0 57921-3 0 5022
+2 25791 24.9908 102.0122 0009670 2.3178 357.7366 14.40705063141372
+FUSE 1
+1 25791U 99035A 02058.58037276 +.00001937 +00000-0 +54089-3 0 05190
+2 25791 024.9855 108.7808 0010347 348.8163 011.2115 14.40699031141216
+FUSE 1
+1 25791U 99035A 02058.23401784 .00001930 00000-0 53890-3 0 5014
+2 25791 24.9854 110.8994 0010344 345.1099 14.9105 14.40697723141169
+FUSE 1
+1 25791U 99035A 02057.95693361 +.00001927 +00000-0 +53794-3 0 05295
+2 25791 024.9853 112.5943 0010342 342.2401 017.7744 14.40696709141123
+FUSE 1
+1 25791U 99035A 02056.98714049 +.00001855 +00000-0 +51590-3 0 05016
+2 25791 024.9848 118.5439 0010389 330.7846 029.2084 14.40692621140986
+FUSE 1
+1 25791U 99035A 02056.84859804 .00001856 00000-0 51612-3 0 5005
+2 25791 24.9848 119.3917 0010396 329.3558 30.6348 14.40692155140967
+FUSE 1
+1 25791U 99035A 02055.87879896 +.00001862 +00000-0 +51795-3 0 05009
+2 25791 024.9847 125.3251 0010386 318.7436 041.2281 14.40688909140821
+FUSE 1
+1 25791U 99035A 02055.80952754 .00001868 00000-0 51976-3 0 4991
+2 25791 24.9847 125.7494 0010379 317.8153 42.1555 14.40688735140812
+FUSE 1
+1 25791U 99035A 02054.56264168 .00001830 00000-0 50822-3 0 4985
+2 25791 24.9853 133.3826 0010404 303.6462 56.3056 14.40684284140636
+FUSE 1
+1 25791U 99035A 02051.93031607 +.00001939 +00000-0 +54187-3 0 04981
+2 25791 024.9846 149.4920 0010329 274.4706 085.4618 14.40676334140255
+FUSE 1
+1 25791U 99035A 02051.86104389 .00001949 00000-0 54496-3 0 4963
+2 25791 24.9847 149.9167 0010322 273.5085 86.4222 14.40676201140241
+FUSE 1
+1 25791U 99035A 02050.89124093 +.00001793 +00000-0 +49705-3 0 04963
+2 25791 024.9879 155.8456 0009888 267.6928 092.2444 14.40671793140105
+FUSE 1
+1 25791U 99035A 02050.82196891 .00001795 00000-0 49764-3 0 4957
+2 25791 24.9879 156.2699 0009920 266.9073 93.0299 14.40671596140095
+FUSE 1
+1 25791U 99035A 02049.85216173 +.00001762 +00000-0 +48738-3 0 05049
+2 25791 024.9881 162.2061 0009833 257.1871 102.7547 14.40668129139954
+FUSE 1
+1 25791U 99035A 02049.57507351 .00001745 00000-0 48221-3 0 4945
+2 25791 24.9884 163.9032 0009829 254.4578 105.4840 14.40667101139913
+FUSE 1
+1 25791U 99035A 02048.18962711 .00001789 00000-0 49573-3 0 4934
+2 25791 24.9865 172.3765 0010089 240.4382 119.5119 14.40662912139715
+FUSE 1
+1 25791U 99035A 02047.15054256 .00001796 00000-0 49804-3 0 4920
+2 25791 24.9866 178.7417 0010129 229.8799 130.0812 14.40659621139562
+FUSE 1
+1 25791U 99035A 02045.83436523 .00001840 00000-0 51150-3 0 4910
+2 25791 24.9866 186.7961 0010148 215.4593 144.5240 14.40655733139373
+FUSE 1
+1 25791U 99035A 02044.79527556 +.00001873 +00000-0 +52184-3 0 04971
+2 25791 024.9863 193.1524 0010137 204.2065 155.7965 14.40652516139223
+FUSE 1
+1 25791U 99035A 02044.51818359 .00001925 00000-0 53776-3 0 4904
+2 25791 24.9860 194.8476 0010191 201.0271 158.9809 14.40652078139188
+FUSE 1
+1 25791U 99035A 02043.82545578 +.00001946 +00000-0 +54433-3 0 04990
+2 25791 024.9858 199.0847 0010200 193.6793 166.3433 14.40649817139082
+FUSE 1
+1 25791U 99035A 02042.92490752 .00001992 00000-0 55840-3 0 4896
+2 25791 24.9856 204.5925 0010259 184.1947 175.8472 14.40647025138951
+FUSE 1
+1 25791U 99035A 02041.95508458 +.00002053 +00000-0 +57741-3 0 04892
+2 25791 024.9856 210.5265 0010300 173.9651 186.0980 14.40644069138818
+FUSE 1
+1 25791U 99035A 02041.88581150 .00002073 00000-0 58348-3 0 4889
+2 25791 24.9861 210.9521 0010311 172.9624 187.1028 14.40644058138806
+FUSE 1
+1 25791U 99035A 02040.56961753 .00002206 00000-0 62450-3 0 4870
+2 25791 24.9858 219.0013 0010484 159.5673 200.5249 14.40640287138618
+FUSE 1
+1 25791U 99035A 02039.53051625 .00002255 00000-0 63954-3 0 4866
+2 25791 24.9858 225.3571 0010553 148.4366 211.6776 14.40636535138462
+FUSE 1
+1 25791U 99035A 02038.14504167 .00002351 00000-0 66921-3 0 4859
+2 25791 24.9858 233.8326 0010636 134.1993 225.9382 14.40631676138264
+FUSE 1
+1 25791U 99035A 02037.93721974 +.00002397 +00000-0 +68340-3 0 04938
+2 25791 024.9861 235.1054 0010736 131.7488 228.3923 14.40631273138232
+FUSE 1
+1 25791U 99035A 02036.89810875 .00002492 00000-0 71274-3 0 4847
+2 25791 24.9862 241.4623 0010829 122.1317 238.0237 14.40627644138089
+FUSE 1
+1 25791U 99035A 02035.92826968 +.00002548 +00000-0 +73019-3 0 04841
+2 25791 024.9863 247.3934 0010862 112.4256 247.7399 14.40623688137945
+FUSE 1
+1 25791U 99035A 02035.85899543 .00002552 00000-0 73123-3 0 4832
+2 25791 24.9863 247.8171 0010864 111.6988 248.4676 14.40623397137930
+FUSE 1
+1 25791U 99035A 02034.95842869 +.00002563 +00000-0 +73476-3 0 04924
+2 25791 024.9867 253.3259 0010904 102.2272 257.9457 14.40619245137805
+FUSE 1
+1 25791U 99035A 02034.26568177 .00002587 00000-0 74211-3 0 4828
+2 25791 24.9865 257.5631 0010840 95.4477 264.7266 14.40616180137700
+FUSE 1
+1 25791U 99035A 02033.22656041 .00002588 00000-0 74253-3 0 4817
+2 25791 24.9868 263.9212 0010966 84.6163 275.5595 14.40611176137558
+FUSE 1
+1 25791U 99035A 02032.18743380 .00002587 00000-0 74231-3 0 4808
+2 25791 24.9869 270.2766 0010977 73.7493 286.4230 14.40606150137408
+FUSE 1
+1 25791U 99035A 02030.94047759 +.00002528 +00000-0 +72437-3 0 04808
+2 25791 024.9874 277.9037 0011018 060.9223 299.2389 14.40599492137222
+FUSE 1
+1 25791U 99035A 02030.87120198 .00002526 00000-0 72362-3 0 4792
+2 25791 24.9874 278.3273 0011014 60.1902 299.9702 14.40599135137210
+FUSE 1
+1 25791U 99035A 02029.34713303 .00002495 00000-0 71439-3 0 4786
+2 25791 24.9875 287.6482 0010997 44.3035 315.8351 14.40591646136997
+FUSE 1
+1 25791U 99035A 02028.93147652 +.00002479 +00000-0 +70929-3 0 04862
+2 25791 024.9876 290.1899 0010994 039.9697 320.1619 14.40589498136932
+FUSE 1
+1 25791U 99035A 02028.16943701 .00002474 00000-0 70791-3 0 4778
+2 25791 24.9876 294.8500 0011006 32.1353 327.9821 14.40585928136823
+FUSE 1
+1 25791U 99035A 02027.96161389 +.00002407 +00000-0 +68742-3 0 05050
+2 25791 024.9874 296.1287 0010582 028.3810 331.7529 14.40584028136795
+FUSE 1
+1 25791U 99035A 02026.92246706 .00002341 00000-0 66697-3 0 4763
+2 25791 24.9799 302.5272 0010059 16.0811 344.0013 14.40577732136644
+FUSE 1
+1 25791U 99035A 02025.39837504 .00002257 00000-0 64121-3 0 4750
+2 25791 24.9803 311.8488 0010138 359.9596 0.0915 14.40570421136423
+FUSE 1
+1 25791U 99035A 02024.22066220 .00002170 00000-0 61445-3 0 4749
+2 25791 24.9808 319.0539 0010178 346.9833 13.0414 14.40564803136255
+FUSE 1
+1 25791U 99035A 02023.94355340 +.00002127 +00000-0 +60118-3 0 04963
+2 25791 024.9808 320.7502 0010231 343.9239 016.0947 14.40563257136213
+FUSE 1
+1 25791U 99035A 02022.97366856 +.00002070 +00000-0 +58368-3 0 04746
+2 25791 024.9809 326.6854 0010289 333.5703 026.4279 14.40558911136071
+FUSE 1
+1 25791U 99035A 02022.90439095 .00002070 00000-0 58368-3 0 4734
+2 25791 24.9809 327.1090 0010289 332.8439 27.1535 14.40558648136066
+FUSE 1
+1 25791U 99035A 02021.93450374 +.00001972 +00000-0 +55342-3 0 04738
+2 25791 024.9815 333.0432 0010420 322.2211 037.7568 14.40554066135924
+FUSE 1
+1 25791U 99035A 02021.51883604 .00001971 00000-0 55294-3 0 4722
+2 25791 24.9815 335.5850 0010420 317.8920 42.0786 14.40552554135866
+FUSE 1
+1 25791U 99035A 02020.34111020 .00001902 00000-0 53176-3 0 4718
+2 25791 24.9819 342.7879 0010496 305.4885 54.4643 14.40547753135692
+FUSE 1
+1 25791U 99035A 02019.23265919 .00001870 00000-0 52196-3 0 4705
+2 25791 24.9819 349.5667 0010511 294.0221 65.9186 14.40543639135538
+FUSE 1
+1 25791U 99035A 02018.19348466 .00001814 00000-0 50458-3 0 4693
+2 25791 24.9822 355.9219 0010534 283.3551 76.5783 14.40539652135382
+FUSE 1
+1 25791U 99035A 02016.60007962 .00001743 00000-0 48297-3 0 4688
+2 25791 24.9823 5.6676 0010591 266.8378 93.0919 14.40533828135154
+FUSE 1
+1 25791U 99035A 02015.76873696 +.00001678 +00000-0 +46283-3 0 04713
+2 25791 024.9823 010.7535 0010644 258.3411 101.5912 14.40530615135034
+FUSE 1
+1 25791U 99035A 02015.56090099 .00001670 00000-0 46017-3 0 4671
+2 25791 24.9825 12.0258 0010623 256.2726 103.6602 14.40529913135001
+FUSE 1
+1 25791U 99035A 02014.59099802 +.00001637 +00000-0 +45017-3 0 04801
+2 25791 024.9827 017.9579 0010652 246.2520 113.6872 14.40526735134868
+FUSE 1
+1 25791U 99035A 02014.24460394 .00001618 00000-0 44436-3 0 4668
+2 25791 24.9826 20.0778 0010710 242.8070 117.1346 14.40525522134813
+FUSE 1
+1 25791U 99035A 02012.65118694 .00001644 00000-0 45243-3 0 4659
+2 25791 24.9821 29.8239 0010731 226.1513 133.8108 14.40521061134586
+FUSE 1
+1 25791U 99035A 02011.54272015 .00001715 00000-0 47438-3 0 4640
+2 25791 24.9815 36.6044 0010793 214.5223 145.4584 14.40518322134422
+FUSE 1
+1 25791U 99035A 02010.43425174 .00001799 00000-0 50019-3 0 4633
+2 25791 24.9809 43.3849 0010812 202.7174 157.2854 14.40515528134267
+FUSE 1
+1 25791U 99035A 02009.25649964 .00002024 00000-0 56982-3 0 4622
+2 25791 24.9789 50.5894 0010900 190.2577 169.7698 14.40513435134090
+FUSE 1
+1 25791U 99035A 02007.73234977 .00002144 00000-0 60706-3 0 4618
+2 25791 24.9780 59.9106 0010959 174.4447 185.6181 14.40508676133874
+FUSE 1
+1 25791U 99035A 02006.55459467 .00002207 00000-0 62629-3 0 4605
+2 25791 24.9776 67.1133 0010962 161.9239 198.1657 14.40504470133701
+FUSE 1
+1 25791U 99035A 02005.93107615 +.00002223 +00000-0 +63140-3 0 04899
+2 25791 024.9772 070.9268 0010959 155.3799 204.7234 14.40502008133612
+FUSE 1
+1 25791U 99035A 02005.23827537 .00002302 00000-0 65586-3 0 4595
+2 25791 24.9762 75.1663 0011117 148.7865 211.3305 14.40499774133511
+FUSE 1
+1 25791U 99035A 02003.92195234 .00002277 00000-0 64830-3 0 4582
+2 25791 24.9761 83.2157 0011128 134.9320 225.2086 14.40493934133324
+FUSE 1
+1 25791U 99035A 02002.88274676 .00002253 00000-0 64083-3 0 4577
+2 25791 24.9763 89.5747 0011378 124.3397 235.8189 14.40489372133179
+FUSE 1
+1 25791U 99035A 02001.91281822 +.00002146 +00000-0 +60789-3 0 04694
+2 25791 024.9768 095.5070 0011442 114.6843 245.4859 14.40484505133039
+FUSE 1
+1 25791U 99035A 02001.56641338 .00002152 00000-0 60976-3 0 4568
+2 25791 24.9764 97.6258 0011412 111.4641 248.7084 14.40483142132989
+FUSE 1
+1 25791U 99035A 01365.87360347 +.00002106 +00000-0 +59549-3 0 04723
+2 25791 024.9765 101.8629 0011436 104.3050 255.8720 14.40480024132882
+FUSE 1
+1 25791U 99035A 01365.52719815 .00002060 00000-0 58137-3 0 4555
+2 25791 24.9767 103.9819 0011371 101.3489 258.8298 14.40478294132833
+FUSE 1
+1 25791U 99035A 01364.14157199 .00001894 00000-0 53009-3 0 4549
+2 25791 24.9776 112.4568 0011372 87.4678 272.7139 14.40471893132639
+FUSE 1
+1 25791U 99035A 01362.89450064 .00001855 00000-0 51805-3 0 4534
+2 25791 24.9779 120.0847 0011421 75.1248 285.0524 14.40467329132453
+FUSE 1
+1 25791U 99035A 01361.92455302 +.00001831 +00000-0 +51089-3 0 04748
+2 25791 024.9778 126.0189 0011472 065.3088 294.8603 14.40463838132318
+FUSE 1
+1 25791U 99035A 01361.57814148 .00001900 00000-0 53207-3 0 4523
+2 25791 24.9772 128.1378 0011523 62.3118 297.8556 14.40463267132263
+FUSE 1
+1 25791U 99035A 01360.95460072 +.00001920 +00000-0 +53816-3 0 04716
+2 25791 024.9770 131.9515 0011492 055.8592 304.2995 14.40461264132179
+FUSE 1
+1 25791U 99035A 01360.53891054 .00002081 00000-0 58819-3 0 4513
+2 25791 24.9761 134.4940 0011549 52.3362 307.8493 14.40461175132116
+FUSE 1
+1 25791U 99035A 01360.19249807 .00001557 00000-0 42615-3 0 4501
+2 25791 24.9814 136.6178 0011030 44.8843 315.2554 14.40455881132069
+FUSE 1
+1 25791U 99035A 01358.87612700 .00001498 00000-0 40783-3 0 4495
+2 25791 24.9820 144.6693 0010973 30.9588 329.1578 14.40451843131876
+FUSE 1
+1 25791U 99035A 01357.55975188 .00001377 00000-0 37042-3 0 4480
+2 25791 24.9830 152.7226 0010843 16.8175 343.2692 14.40447508131686
+FUSE 1
+1 25791U 99035A 01356.24337185 .00001363 00000-0 36634-3 0 4474
+2 25791 24.9832 160.7748 0010783 3.1653 356.8921 14.40444244131497
+FUSE 1
+1 25791U 99035A 01355.13483804 .00001399 00000-0 37745-3 0 4463
+2 25791 24.9832 167.5556 0010791 351.3648 8.6665 14.40441877131339
+FUSE 1
+1 25791U 99035A 01353.88773524 .00001488 00000-0 40499-3 0 4452
+2 25791 24.9831 175.1848 0010716 338.1167 21.8882 14.40439533131157
+FUSE 1
+1 25791U 99035A 01352.91776521 +.00001536 +00000-0 +41984-3 0 04527
+2 25791 024.9828 181.1169 0010739 327.7733 032.2118 14.40437323131012
+FUSE 1
+1 25791U 99035A 01352.57134719 .00001547 00000-0 42314-3 0 4447
+2 25791 24.9827 183.2356 0010758 324.0828 35.8958 14.40436465130968
+FUSE 1
+1 25791U 99035A 01351.39352449 .00001601 00000-0 43981-3 0 4439
+2 25791 24.9825 190.4393 0010750 311.5670 48.3911 14.40433644130790
+FUSE 1
+1 25791U 99035A 01350.90853821 +.00001630 +00000-0 +44889-3 0 04570
+2 25791 024.9828 193.4057 0010738 306.2371 053.7148 14.40432555130723
+FUSE 1
+1 25791U 99035A 01350.21570001 .00001672 00000-0 46189-3 0 4425
+2 25791 24.9825 197.6430 0010796 298.8753 61.0671 14.40430851130624
+FUSE 1
+1 25791U 99035A 01349.17644244 .00001720 00000-0 47692-3 0 4412
+2 25791 24.9826 203.9992 0010810 288.0247 71.9089 14.40428119130475
+FUSE 1
+1 25791U 99035A 01348.13718358 .00001739 00000-0 48271-3 0 4408
+2 25791 24.9830 210.3552 0010817 277.4348 82.4917 14.40425082130322
+FUSE 1
+1 25791U 99035A 01346.95935558 +.00001792 +00000-0 +49923-3 0 04414
+2 25791 024.9832 217.5601 0010828 264.7976 095.1293 14.40421820130151
+FUSE 1
+1 25791U 99035A 01346.89007156 .00001798 00000-0 50103-3 0 4396
+2 25791 24.9831 217.9838 0010822 264.0722 95.8552 14.40421637130142
+FUSE 1
+1 25791U 99035A 01345.92009452 +.00001804 +00000-0 +50297-3 0 04561
+2 25791 024.9834 223.9163 0010848 253.7226 106.2093 14.40418551130008
+FUSE 1
+1 25791U 99035A 01345.50438976 .00001829 00000-0 51074-3 0 4383
+2 25791 24.9833 226.4598 0010750 249.3404 110.5947 14.40417367129949
+FUSE 1
+1 25791U 99035A 01344.95011669 +.00001830 +00000-0 +51089-3 0 04543
+2 25791 024.9832 229.8499 0010756 243.5301 116.4117 14.40415519129865
+FUSE 1
+1 25791U 99035A 01344.18799003 .00001792 00000-0 49923-3 0 4375
+2 25791 24.9834 234.5123 0010818 235.5423 124.4062 14.40412721129757
+FUSE 1
+1 25791U 99035A 01343.14872416 .00001816 00000-0 50671-3 0 4368
+2 25791 24.9837 240.8680 0010867 223.8806 136.0838 14.40409582129602
+FUSE 1
+1 25791U 99035A 01341.90160523 .00001680 00000-0 46452-3 0 4359
+2 25791 24.9841 248.4975 0010871 211.3142 148.6721 14.40404442129428
+FUSE 1
+1 25791U 99035A 01340.93162024 +.00001621 +00000-0 +44627-3 0 04479
+2 25791 024.9843 254.4284 0010863 200.7838 159.2234 14.40401129129285
+FUSE 1
+1 25791U 99035A 01340.37734226 .00001562 00000-0 42806-3 0 4343
+2 25791 24.9846 257.8173 0010861 194.8366 165.1825 14.40399138129209
+FUSE 1
+1 25791U 99035A 01339.19949999 .00001406 00000-0 37978-3 0 4336
+2 25791 24.9853 265.0213 0010893 182.8071 177.2377 14.40394882129036
+FUSE 1
+1 25791U 99035A 01337.95236873 .00001264 00000-0 33601-3 0 4328
+2 25791 24.9859 272.6472 0011030 169.6495 190.4242 14.40391020128858
+FUSE 1
+1 25791U 99035A 01336.98237488 +.00001205 +00000-0 +31765-3 0 04350
+2 25791 024.9862 278.5777 0011067 159.5220 200.5735 14.40388553128711
+FUSE 1
+1 25791U 99035A 01336.91308955 .00001199 00000-0 31585-3 0 4319
+2 25791 24.9862 279.0014 0011071 158.8008 201.2962 14.40388365128702
+FUSE 1
+1 25791U 99035A 01335.52738000 .00001234 00000-0 32682-3 0 4301
+2 25791 24.9862 287.4731 0011104 144.1718 215.9555 14.40385754128501
+FUSE 1
+1 25791U 99035A 01334.21095244 .00001172 00000-0 30740-3 0 4294
+2 25791 24.9865 295.5226 0011153 130.8481 229.2994 14.40382693128319
+FUSE 1
+1 25791U 99035A 01333.17166461 .00001237 00000-0 32780-3 0 4285
+2 25791 24.9866 301.8786 0011197 121.1081 239.0526 14.40380912128164
+FUSE 1
+1 25791U 99035A 01331.78594478 .00001365 00000-0 36732-3 0 4275
+2 25791 24.9865 310.3519 0011209 106.8472 253.3273 14.40378324127969
+FUSE 1
+1 25791U 99035A 01330.67736645 +.00001415 +00000-0 +38296-3 0 04303
+2 25791 024.9868 317.1335 0011064 094.8355 265.3420 14.40375646127802
+FUSE 1
+1 25791U 99035A 01330.53879352 .00001567 00000-0 43006-3 0 4269
+2 25791 24.9872 317.9818 0011229 93.6128 266.5666 14.40376029127787
+FUSE 1
+1 25791U 99035A 01329.70735725 +.00001621 +00000-0 +44667-3 0 04457
+2 25791 024.9872 323.0652 0011232 084.6461 275.5327 14.40373883127661
+FUSE 1
+1 25791U 99035A 01329.22235264 .00001585 00000-0 43552-3 0 4256
+2 25791 24.9876 326.0324 0011267 80.2956 279.8829 14.40372335127590
+FUSE 1
+1 25791U 99035A 01327.83661937 .00001684 00000-0 46626-3 0 4245
+2 25791 24.9875 334.5052 0011431 65.9356 294.2344 14.40369004127398
+FUSE 1
+1 25791U 99035A 01326.52016884 .00001740 00000-0 48380-3 0 4236
+2 25791 24.9874 342.5535 0011585 52.2073 307.9485 14.40365366127202
+FUSE 1
+1 25791U 99035A 01325.41157411 .00001880 00000-0 52699-3 0 4227
+2 25791 24.9858 349.3412 0010869 41.2944 318.8383 14.40362474127049
+FUSE 1
+1 25791U 99035A 01324.92656363 +.00001916 +00000-0 +53838-3 0 04486
+2 25791 024.9856 352.3075 0010879 036.2259 323.8984 14.40361028126978
+FUSE 1
+1 25791U 99035A 01324.23369056 .00001967 00000-0 55417-3 0 4212
+2 25791 24.9855 356.5485 0010758 28.8088 331.3014 14.40358919126873
+FUSE 1
+1 25791U 99035A 01323.67939132 +.00001961 +00000-0 +55223-3 0 04407
+2 25791 024.9854 359.9372 0010776 023.0532 337.0460 14.40356881126790
+FUSE 1
+1 25791U 99035A 01322.70936542 .00001987 00000-0 56035-3 0 4198
+2 25791 24.9853 5.8688 0010772 12.9432 347.1352 14.40353526126658
+FUSE 1
+1 25791U 99035A 01321.67005005 .00001934 00000-0 54405-3 0 4184
+2 25791 24.9852 12.2257 0010726 1.9216 358.1340 14.40349375126508
+FUSE 1
+1 25791U 99035A 01320.56144300 .00001920 00000-0 53980-3 0 4174
+2 25791 24.9852 19.0058 0010683 350.0478 9.9818 14.40345343126346
+FUSE 1
+1 25791U 99035A 01319.52212142 .00001855 00000-0 51954-3 0 4163
+2 25791 24.9851 25.3612 0010623 338.9778 21.0292 14.40341342126192
+FUSE 1
+1 25791U 99035A 01318.82923904 +.00001856 +00000-0 +52003-3 0 04314
+2 25791 024.9847 029.5994 0010595 331.5863 028.4066 14.40338911126095
+FUSE 1
+1 25791U 99035A 01318.41350910 .00001890 00000-0 53052-3 0 4155
+2 25791 24.9848 32.1452 0010575 326.5664 33.4173 14.40337609126038
+FUSE 1
+1 25791U 99035A 01316.88916357 .00001729 00000-0 48061-3 0 4141
+2 25791 24.9843 41.4680 0010423 310.4505 49.5094 14.40331762125816
+FUSE 1
+1 25791U 99035A 01315.78054605 .00002207 00000-0 62878-3 0 4131
+2 25791 24.9835 48.2543 0010468 297.9246 62.0232 14.40329121125652
+FUSE 1
+1 25791U 99035A 01314.67192519 .00002266 00000-0 64699-3 0 4122
+2 25791 24.9832 55.0359 0010699 286.0302 73.9029 14.40324776125496
+FUSE 1
+1 25791U 99035A 01313.56330279 .00002157 00000-0 61343-3 0 4117
+2 25791 24.9831 61.8147 0010834 274.3350 85.5922 14.40319729125335
+FUSE 1
+1 25791U 99035A 01312.52396703 .00002119 00000-0 60174-3 0 4104
+2 25791 24.9829 68.1695 0010860 263.6572 96.2701 14.40315363125183
+FUSE 1
+1 25791U 99035A 01311.76178660 +.00001972 +00000-0 +55623-3 0 04344
+2 25791 024.9830 072.8283 0010752 255.8544 104.0769 14.40311922125079
+FUSE 1
+1 25791U 99035A 01310.99960448 .00001931 00000-0 54345-3 0 4098
+2 25791 24.9829 77.4894 0010755 247.9477 111.9889 14.40308978124960
+FUSE 1
+1 25791U 99035A 01309.96026276 +.00001965 +00000-0 +55405-3 0 04090
+2 25791 024.9829 083.8473 0010851 237.1463 122.8002 14.40305487124811
+FUSE 1
+1 25791U 99035A 01309.89097339 .00001972 00000-0 55619-3 0 4084
+2 25791 24.9829 84.2713 0010836 236.3815 123.5665 14.40305298124800
+FUSE 1
+1 25791U 99035A 01308.57447006 .00002179 00000-0 62044-3 0 4077
+2 25791 24.9822 92.3254 0010825 222.6458 137.3208 14.40301956124614
+FUSE 1
+1 25791U 99035A 01307.53512328 .00002351 00000-0 67374-3 0 4064
+2 25791 24.9814 98.6808 0010806 211.6998 148.2862 14.40299019124461
+FUSE 1
+1 25791U 99035A 01305.94145638 +.00002419 +00000-0 +69493-3 0 04062
+2 25791 024.9809 108.4263 0010833 195.2773 164.7418 14.40292404124234
+FUSE 1
+1 25791U 99035A 01305.87216636 .00002410 00000-0 69213-3 0 4051
+2 25791 24.9811 108.8509 0010847 194.5526 165.4669 14.40292047124225
+FUSE 1
+1 25791U 99035A 01304.90210496 +.00002483 +00000-0 +71481-3 0 04210
+2 25791 024.9807 114.7853 0010812 184.6053 175.4356 14.40288074124088
+FUSE 1
+1 25791U 99035A 01304.55565381 .00002564 00000-0 73991-3 0 4046
+2 25791 24.9803 116.9068 0010808 180.8733 179.1763 14.40287007124037
+FUSE 1
+1 25791U 99035A 01303.93204085 +.00002548 +00000-0 +73522-3 0 04141
+2 25791 024.9803 120.7190 0010799 174.3529 185.7099 14.40283909123947
+FUSE 1
+1 25791U 99035A 01303.03126575 .00002520 00000-0 72659-3 0 4037
+2 25791 24.9800 126.2295 0010755 164.6304 195.4536 14.40279287123810
+FUSE 1
+1 25791U 99035A 01301.78402958 .00002608 00000-0 75393-3 0 4023
+2 25791 24.9799 133.8566 0011062 153.3348 206.7722 14.40274032123633
+FUSE 1
+1 25791U 99035A 01299.91316810 .00002915 00000-0 84930-3 0 4012
+2 25791 24.9792 145.2965 0011048 134.0555 226.0864 14.40265988123368
+FUSE 1
+1 25791U 99035A 01298.18087804 .00003212 00000-0 94181-3 0 4007
+2 25791 24.9785 155.8916 0011040 115.9737 244.1911 14.40256974123117
+FUSE 1
+1 25791U 99035A 01297.97300262 +.00003234 +00000-0 +94848-3 0 04115
+2 25791 024.9787 157.1643 0011055 113.7776 246.3895 14.40255785123086
+FUSE 1
+1 25791U 99035A 01297.07220791 .00002684 00000-0 77791-3 0 3995
+2 25791 24.9787 162.6747 0010929 104.4008 255.7717 14.40248557122957
+FUSE 1
+1 25791U 99035A 01295.96352986 +.00002126 +00000-0 +60489-3 0 04025
+2 25791 024.9793 169.4508 0010628 092.8140 267.3584 14.40240931122798
+FUSE 1
+1 25791U 99035A 01295.89423827 .00002043 00000-0 57915-3 0 3982
+2 25791 24.9794 169.8749 0010644 91.9762 268.1968 14.40240146122780
+FUSE 1
+1 25791U 99035A 01294.92413976 +.00001853 +00000-0 +51998-3 0 04152
+2 25791 024.9798 175.8066 0010633 081.1941 278.9772 14.40235323122649
+FUSE 1
+1 25791U 99035A 01294.30050214 .00001823 00000-0 51089-3 0 3973
+2 25791 24.9799 179.6196 0010702 74.5779 285.5911 14.40232995122559
+FUSE 1
+1 25791U 99035A 01293.26110316 .00001744 00000-0 48616-3 0 3960
+2 25791 24.9799 185.9754 0010658 63.5604 296.6004 14.40228963122404
+FUSE 1
+1 25791U 99035A 01292.22169993 .00001707 00000-0 47471-3 0 3956
+2 25791 24.9799 192.3301 0010648 52.4658 307.6827 14.40225399122258
+FUSE 1
+1 25791U 99035A 01290.97441176 +.00001672 +00000-0 +46391-3 0 03975
+2 25791 024.9797 199.9582 0010599 039.1258 321.0014 14.40221249122071
+FUSE 1
+1 25791U 99035A 01290.90511781 .00001674 00000-0 46472-3 0 3947
+2 25791 24.9797 200.3818 0010601 38.3799 321.7462 14.40221053122061
+FUSE 1
+1 25791U 99035A 01289.44994252 .00001682 00000-0 46703-3 0 3937
+2 25791 24.9794 209.2810 0010620 22.7711 337.3265 14.40216632121857
+FUSE 1
+1 25791U 99035A 01288.96488349 +.00001640 +00000-0 +45420-3 0 04039
+2 25791 024.9794 212.2491 0010567 017.4224 342.6645 14.40214807121781
+FUSE 1
+1 25791U 99035A 01288.41052915 .00001638 00000-0 45357-3 0 3928
+2 25791 24.9794 215.6384 0010635 11.8186 348.2573 14.40213128121709
+FUSE 1
+1 25791U 99035A 01287.23252352 .00001574 00000-0 43355-3 0 3918
+2 25791 24.9794 222.8447 0010562 358.4459 1.6013 14.40209149121539
+FUSE 1
+1 25791U 99035A 01285.91592729 .00001390 00000-0 37646-3 0 3907
+2 25791 24.9795 230.9044 0010544 342.9330 17.0829 14.40203938121344
+FUSE 1
+1 25791U 99035A 01284.39144118 .00001300 00000-0 34838-3 0 3892
+2 25791 24.9795 240.2335 0010739 326.2228 33.7597 14.40199484121121
+FUSE 1
+1 25791U 99035A 01283.97567245 +.00001223 +00000-0 +32457-3 0 03894
+2 25791 024.9792 242.7798 0010828 320.9649 039.0093 14.40197815121064
+FUSE 1
+1 25791U 99035A 01283.35201646 .00001212 00000-0 32118-3 0 3887
+2 25791 24.9792 246.5916 0010829 314.6054 45.3576 14.40196427120972
+FUSE 1
+1 25791U 99035A 01282.31258856 +.00001218 +00000-0 +32310-3 0 03876
+2 25791 024.9792 252.9458 0010895 303.3438 056.6026 14.40194305120820
+FUSE 1
+1 25791U 99035A 01281.96611121 +.00001476 +00000-0 +40318-3 0 03877
+2 25791 024.9786 255.0631 0010800 300.4688 059.4739 14.40195140120775
+FUSE 1
+1 25791U 99035A 01281.27315947 .00001503 00000-0 41154-3 0 3867
+2 25791 24.9785 259.2981 0010800 293.1387 66.7977 14.40193471120671
+FUSE 1
+1 25791U 99035A 01280.23373114 .00001657 00000-0 45958-3 0 3857
+2 25791 24.9781 265.6543 0010925 282.3330 77.5954 14.40191161120521
+FUSE 1
+1 25791U 99035A 01279.19430003 .00002067 00000-0 58705-3 0 3840
+2 25791 24.9775 272.0130 0011160 270.5332 89.3900 14.40189300120378
+FUSE 1
+1 25791U 99035A 01277.60050645 .00002136 00000-0 60847-3 0 3830
+2 25791 24.9771 281.7563 0011259 253.7403 106.1876 14.40183292120141
+FUSE 1
+1 25791U 99035A 01276.69966572 +.00002038 +00000-0 +57797-3 0 03834
+2 25791 024.9770 287.2658 0011436 244.9457 114.9868 14.40179081120019
+FUSE 1
+1 25791U 99035A 01276.56107445 .00002038 00000-0 57794-3 0 3822
+2 25791 24.9770 288.1132 0011429 243.5500 116.3834 14.40178557119993
+FUSE 1
+1 25791U 99035A 01275.59093557 +.00002005 +00000-0 +56772-3 0 03900
+2 25791 024.9769 294.0432 0011469 233.5602 126.3872 14.40174627119858
+FUSE 1
+1 25791U 99035A 01275.24445817 .00001894 00000-0 53340-3 0 3815
+2 25791 24.9772 296.1661 0011642 231.1207 128.8260 14.40172274119806
+FUSE 1
+1 25791U 99035A 01274.20502117 .00001837 00000-0 51559-3 0 3803
+2 25791 24.9774 302.5234 0011565 220.9357 139.0293 14.40168098119654
+FUSE 1
+1 25791U 99035A 01272.54191528 .00001742 00000-0 48618-3 0 3793
+2 25791 24.9776 312.6900 0011479 204.0234 155.9738 14.40161743119414
+FUSE 1
+1 25791U 99035A 01271.22528748 .00001537 00000-0 42239-3 0 3789
+2 25791 24.9783 320.7396 0011360 191.6142 168.4111 14.40155760119224
+FUSE 1
+1 25791U 99035A 01270.18584050 .00001414 00000-0 38420-3 0 3771
+2 25791 24.9786 327.0943 0011214 181.1674 178.8811 14.40151731119076
+FUSE 1
+1 25791U 99035A 01268.59201413 .00001316 00000-0 35376-3 0 3769
+2 25791 24.9790 336.8359 0011124 164.6593 195.4255 14.40146964118849
+FUSE 1
+1 25791U 99035A 01267.55255878 .00001264 00000-0 33768-3 0 3752
+2 25791 24.9791 343.1899 0011084 153.8979 206.2088 14.40144164118691
+FUSE 1
+1 25791U 99035A 01266.85958720 +.00001236 +00000-0 +32881-3 0 04003
+2 25791 024.9791 347.4254 0011062 146.6571 213.4636 14.40142395118599
+FUSE 1
+1 25791U 99035A 01266.23591181 .00001222 00000-0 32443-3 0 3748
+2 25791 24.9790 351.2395 0010997 140.3022 219.8292 14.40140919118504
+FUSE 1
+1 25791U 99035A 01264.84996263 .00001228 00000-0 32643-3 0 3730
+2 25791 24.9790 359.7127 0010966 126.1194 234.0331 14.40138072118306
+FUSE 1
+1 25791U 99035A 01263.81049784 .00001251 00000-0 33374-3 0 3720
+2 25791 24.9787 6.0658 0010961 115.2876 244.8774 14.40136053118154
+FUSE 1
+1 25791U 99035A 01262.90962669 +.00001258 +00000-0 +33575-3 0 03770
+2 25791 024.9786 011.5725 0010944 105.8616 254.3099 14.40134145118029
+FUSE 1
+1 25791U 99035A 01262.56313782 .00001225 00000-0 32562-3 0 3711
+2 25791 24.9789 13.6910 0010897 102.2762 257.8965 14.40133131117978
+FUSE 1
+1 25791U 99035A 01261.73156198 +.00001238 +00000-0 +32981-3 0 03916
+2 25791 024.9787 018.7732 0010906 093.5350 266.6406 14.40131469117857
+FUSE 1
+1 25791U 99035A 01260.76138915 .00001191 00000-0 31510-3 0 3707
+2 25791 24.9789 24.7033 0010879 83.2256 276.9490 14.40129023117715
+FUSE 1
+1 25791U 99035A 01259.92981039 +.00001175 +00000-0 +31013-3 0 03874
+2 25791 024.9786 029.7863 0010871 074.4468 285.7243 14.40127147117592
+FUSE 1
+1 25791U 99035A 01259.58331925 .00001147 00000-0 30130-3 0 3697
+2 25791 24.9787 31.9057 0010852 70.6480 289.5197 14.40126176117540
+FUSE 1
+1 25791U 99035A 01258.95963335 +.00001144 +00000-0 +30044-3 0 03874
+2 25791 024.9786 035.7176 0010865 064.0853 296.0773 14.40124921117457
+FUSE 1
+1 25791U 99035A 01258.54384331 .00001102 00000-0 28749-3 0 3684
+2 25791 24.9787 38.2594 0010849 59.6296 300.5294 14.40123716117396
+FUSE 1
+1 25791U 99035A 01256.88067564 .00001029 00000-0 26472-3 0 3673
+2 25791 24.9789 48.4246 0010881 42.1181 318.0162 14.40120076117159
+FUSE 1
+1 25791U 99035A 01255.84119312 +.00000982 +00000-0 +24994-3 0 03828
+2 25791 024.9791 054.7780 0010906 031.2706 328.8450 14.40117913117004
+FUSE 1
+1 25791U 99035A 01255.56399752 .00000973 00000-0 24725-3 0 3669
+2 25791 24.9790 56.4726 0010911 28.3803 331.7300 14.40117363116963
+FUSE 1
+1 25791U 99035A 01254.17801710 .00000928 00000-0 23335-3 0 3652
+2 25791 24.9790 64.9453 0010913 13.8647 346.2161 14.40114762116765
+FUSE 1
+1 25791U 99035A 01253.13853000 .00000871 00000-0 21540-3 0 3648
+2 25791 24.9793 71.2996 0010924 2.8497 357.2074 14.40112768116617
+FUSE 1
+1 25791U 99035A 01251.89114396 .00000824 00000-0 20070-3 0 3631
+2 25791 24.9796 78.9282 0010899 349.5744 10.4536 14.40110640116437
+FUSE 1
+1 25791U 99035A 01250.57445682 .00000789 00000-0 18992-3 0 3629
+2 25791 24.9798 86.9794 0010848 335.6563 24.3436 14.40108640116244
+FUSE 1
+1 25791U 99035A 01249.39636695 .00000757 00000-0 18011-3 0 3619
+2 25791 24.9802 94.1822 0010810 323.2224 36.7543 14.40106962116071
+FUSE 1
+1 25791U 99035A 01248.91127102 +.00000751 +00000-0 +17803-3 0 03830
+2 25791 024.9803 097.1479 0010787 318.2500 041.7192 14.40106349116005
+FUSE 1
+1 25791U 99035A 01248.21827703 .00000711 00000-0 16549-3 0 3604
+2 25791 24.9806 101.3869 0010851 311.0280 48.9290 14.40105201115909
+FUSE 1
+1 25791U 99035A 01247.94107926 +.00000692 +00000-0 +15961-3 0 03998
+2 25791 024.9808 103.0812 0010848 308.0548 051.8982 14.40104743115863
+FUSE 1
+1 25791U 99035A 01246.97088639 +.00000665 +00000-0 +15119-3 0 03624
+2 25791 024.9811 109.0135 0010822 297.4688 062.4719 14.40103568115724
+FUSE 1
+1 25791U 99035A 01246.90158683 .00000665 00000-0 15140-3 0 3594
+2 25791 24.9811 109.4371 0010823 296.7486 63.1913 14.40103507115715
+FUSE 1
+1 25791U 99035A 01245.86209396 .00000696 00000-0 16089-3 0 3582
+2 25791 24.9808 115.7946 0010841 285.1746 74.7568 14.40102728115561
+FUSE 1
+1 25791U 99035A 01244.47610489 .00000659 00000-0 14935-3 0 3573
+2 25791 24.9811 124.2700 0010831 270.7608 89.1659 14.40100949115366
+FUSE 1
+1 25791U 99035A 01243.36731275 .00000662 00000-0 15021-3 0 3567
+2 25791 24.9811 131.0482 0010866 258.9721 100.9574 14.40099892115206
+FUSE 1
+1 25791U 99035A 01242.25852056 .00000648 00000-0 14586-3 0 3553
+2 25791 24.9814 137.8264 0010894 247.3559 112.5794 14.40098711115047
+FUSE 1
+1 25791U 99035A 01241.98132292 +.00000630 +00000-0 +14046-3 0 03737
+2 25791 024.9816 139.5223 0010941 244.5808 115.3567 14.40098300115001
+FUSE 1
+1 25791U 99035A 01241.21902828 .00000629 00000-0 14009-3 0 3549
+2 25791 24.9817 144.1835 0011009 236.5844 123.3610 14.40097610114897
+FUSE 1
+1 25791U 99035A 01239.97163784 +.00000567 +00000-0 +12075-3 0 03541
+2 25791 024.9822 151.8119 0011137 224.0036 135.9578 14.40096009114714
+FUSE 1
+1 25791U 99035A 01239.90233840 .00000573 00000-0 12271-3 0 3539
+2 25791 24.9822 152.2355 0011140 223.3426 136.6211 14.40096007114709
+FUSE 1
+1 25791U 99035A 01238.93214506 +.00000578 +00000-0 +12417-3 0 03569
+2 25791 024.9822 158.1667 0011192 213.0996 146.8828 14.40095287114565
+FUSE 1
+1 25791U 99035A 01238.44704821 .00000558 00000-0 11791-3 0 3527
+2 25791 24.9823 161.1314 0011195 208.1454 151.8451 14.40094733114491
+FUSE 1
+1 25791U 99035A 01237.19965619 .00000543 00000-0 11309-3 0 3510
+2 25791 24.9826 168.7556 0011260 195.0033 165.0141 14.40093691114311
+FUSE 1
+1 25791U 99035A 01235.46716564 .00000559 00000-0 11830-3 0 3506
+2 25791 24.9826 179.3436 0011265 177.0928 182.9645 14.40092549114064
+FUSE 1
+1 25791U 99035A 01234.91276874 +.00000555 +00000-0 +11697-3 0 03518
+2 25791 024.9826 182.7322 0011267 171.3778 188.6930 14.40092091113980
+FUSE 1
+1 25791U 99035A 01234.21977186 .00000553 00000-0 11627-3 0 3493
+2 25791 24.9827 186.9667 0011270 164.0792 196.0070 14.40091557113881
+FUSE 1
+1 25791U 99035A 01233.18027640 .00000553 00000-0 11642-3 0 3485
+2 25791 24.9827 193.3193 0011293 153.2255 206.8853 14.40090779113734
+FUSE 1
+1 25791U 99035A 01231.72498050 .00000562 00000-0 11920-3 0 3478
+2 25791 24.9824 202.2156 0011301 138.1751 221.9616 14.40089739113529
+FUSE 1
+1 25791U 99035A 01230.54688298 .00000525 00000-0 10770-3 0 3462
+2 25791 24.9834 209.4179 0011313 126.3801 233.7753 14.40088665113353
+FUSE 1
+1 25791U 99035A 01229.23018362 .00000520 00000-0 10610-3 0 3452
+2 25791 24.9836 217.4680 0011315 112.6116 247.5590 14.40087703113163
+FUSE 1
+1 25791U 99035A 01228.81438323 +.00000515 +00000-0 +10467-3 0 03665
+2 25791 024.9835 220.0093 0011311 108.2127 251.9609 14.40087362113104
+FUSE 1
+1 25791U 99035A 01227.84418190 .00000497 00000-0 98977-4 0 3445
+2 25791 24.9840 225.9413 0011274 98.5742 261.6044 14.40086582112969
+FUSE 1
+1 25791U 99035A 01226.66607788 +.00000493 +00000-0 +97886-4 0 03463
+2 25791 024.9839 233.1408 0011275 086.3501 273.8298 14.40085796112794
+FUSE 1
+1 25791U 99035A 01226.52747722 .00000492 00000-0 97361-4 0 3435
+2 25791 24.9840 233.9884 0011272 84.8774 275.3014 14.40085704112774
+FUSE 1
+1 25791U 99035A 01225.21077022 .00000514 00000-0 10445-3 0 3420
+2 25791 24.9840 242.0362 0011245 71.4518 288.7213 14.40085082112581
+FUSE 1
+1 25791U 99035A 01223.89406193 .00000470 00000-0 90604-4 0 3413
+2 25791 24.9848 250.0849 0011117 57.6806 302.4776 14.40083898112392
+FUSE 1
+1 25791U 99035A 01222.78525341 .00000440 00000-0 81399-4 0 3404
+2 25791 24.9853 256.8629 0011047 46.0947 314.0477 14.40083059112237
+FUSE 1
+1 25791U 99035A 01221.95364609 +.00000421 +00000-0 +75317-4 0 03435
+2 25791 024.9857 261.9471 0011006 037.3315 322.7958 14.40082476112119
+FUSE 1
+1 25791U 99035A 01221.53784190 .00000421 00000-0 75510-4 0 3390
+2 25791 24.9858 264.4889 0010990 32.9399 327.1792 14.40082299112056
+FUSE 1
+1 25791U 99035A 01220.98343688 +.00000390 +00000-0 +65848-4 0 03579
+2 25791 024.9859 267.8782 0010962 026.9957 333.1120 14.40081738111977
+FUSE 1
+1 25791U 99035A 01220.22112886 .00000387 00000-0 64765-4 0 3382
+2 25791 24.9860 272.5393 0010909 18.8496 341.2417 14.40081380111869
+FUSE 1
+1 25791U 99035A 01218.97371408 .00000391 00000-0 65912-4 0 3377
+2 25791 24.9861 280.1628 0010876 5.5029 354.5594 14.40080902111686
+FUSE 1
+1 25791U 99035A 01217.86490136 .00000373 00000-0 60393-4 0 3361
+2 25791 24.9866 286.9411 0010853 353.7666 6.2707 14.40080339111529
+FUSE 1
+1 25791U 99035A 01216.82538872 .00000371 00000-0 59777-4 0 3357
+2 25791 24.9868 293.2962 0010793 342.5968 17.4161 14.40079940111374
+FUSE 1
+1 25791U 99035A 01215.57797329 .00000400 00000-0 68747-4 0 3341
+2 25791 24.9867 300.9214 0010734 329.1452 30.8424 14.40079711111190
+FUSE 1
+1 25791U 99035A 01214.88496511 +.00000411 +00000-0 +72102-4 0 03738
+2 25791 024.9865 305.1569 0010752 321.8056 038.1700 14.40079469111094
+FUSE 1
+1 25791U 99035A 01213.91475370 +.00000418 +00000-0 +74537-4 0 03349
+2 25791 024.9864 311.0878 0010770 311.6786 048.2800 14.40079073110957
+FUSE 1
+1 25791U 99035A 01213.84545284 .00000418 00000-0 74517-4 0 3330
+2 25791 24.9864 311.5114 0010770 310.9520 49.0052 14.40079040110944
+FUSE 1
+1 25791U 99035A 01212.94454257 +.00000434 +00000-0 +79248-4 0 03344
+2 25791 024.9864 317.0188 0010768 301.3288 058.6164 14.40078734110813
+FUSE 1
+1 25791U 99035A 01212.80594067 .00000444 00000-0 82373-4 0 3325
+2 25791 24.9863 317.8657 0010766 299.6889 60.2542 14.40078761110791
+FUSE 1
+1 25791U 99035A 01211.90503055 +.00000468 +00000-0 +90090-4 0 03446
+2 25791 024.9863 323.3726 0010776 290.0365 069.8977 14.40078499110666
+FUSE 1
+1 25791U 99035A 01211.55852704 .00000460 00000-0 87431-4 0 3318
+2 25791 24.9864 325.4904 0010823 286.2525 73.6791 14.40078234110615
+FUSE 1
+1 25791U 99035A 01210.93482022 +.00000472 +00000-0 +91278-4 0 03633
+2 25791 024.9864 329.3017 0010848 279.6419 080.2862 14.40077996110525
+FUSE 1
+1 25791U 99035A 01210.17251264 .00000478 00000-0 93199-4 0 3305
+2 25791 24.9863 333.9619 0010873 271.6318 88.2943 14.40077601110410
+FUSE 1
+1 25791U 99035A 01208.85579991 .00000490 00000-0 96802-4 0 3293
+2 25791 24.9866 342.0099 0010922 257.5431 102.3853 14.40076934110225
+FUSE 1
+1 25791U 99035A 01207.81629030 .00000501 00000-0 10023-3 0 3280
+2 25791 24.9867 348.3635 0010966 246.5884 113.3470 14.40076398110073
+FUSE 1
+1 25791U 99035A 01206.91538249 +.00000508 +00000-0 +10250-3 0 03415
+2 25791 024.9866 353.8713 0010987 237.1497 122.7945 14.40075887109946
+FUSE 1
+1 25791U 99035A 01206.56887963 .00000511 00000-0 10326-3 0 3278
+2 25791 24.9867 355.9893 0011012 233.5318 126.4174 14.40075691109893
+FUSE 1
+1 25791U 99035A 01205.87587337 +.00000527 +00000-0 +10839-3 0 03505
+2 25791 024.9868 000.2251 0011076 226.2868 133.6720 14.40075413109799
+FUSE 1
+1 25791U 99035A 01205.25216864 .00000510 00000-0 10313-3 0 3263
+2 25791 24.9867 4.0363 0011090 219.8115 140.1582 14.40074798109708
+FUSE 1
+1 25791U 99035A 01203.93545728 +.00000516 +00000-0 +10479-3 0 03269
+2 25791 024.9866 012.0811 0011114 206.0591 153.9357 14.40073969109517
+FUSE 1
+1 25791U 99035A 01203.86615663 .00000516 00000-0 10479-3 0 3256
+2 25791 24.9866 12.5045 0011114 205.3331 154.6628 14.40073923109503
+FUSE 1
+1 25791U 99035A 01202.96524958 +.00000508 +00000-0 +10233-3 0 03486
+2 25791 024.9865 018.0111 0011154 196.1382 163.8780 14.40073233109374
+FUSE 1
+1 25791U 99035A 01202.54944641 .00000493 00000-0 97826-4 0 3246
+2 25791 24.9863 20.5527 0011169 191.8050 168.2200 14.40072784109311
+FUSE 1
+1 25791U 99035A 01201.16343360 .00000507 00000-0 10206-3 0 3235
+2 25791 24.9866 29.0225 0011223 177.3906 182.6661 14.40072075109115
+FUSE 1
+1 25791U 99035A 01200.12393049 .00000384 00000-0 63784-4 0 3221
+2 25791 24.9826 35.4045 0011352 165.2759 194.8082 14.40070335108968
+FUSE 1
+1 25791U 99035A 01198.94581712 +.00000454 +00000-0 +85448-4 0 03255
+2 25791 024.9819 042.6054 0011509 153.7866 206.3225 14.40070361108793
+FUSE 1
+1 25791U 99035A 01198.87651654 .00000454 00000-0 85668-4 0 3210
+2 25791 24.9819 43.0290 0011506 153.0511 207.0603 14.40070330108780
+FUSE 1
+1 25791U 99035A 01197.90630513 +.00000543 +00000-0 +11321-3 0 03251
+2 25791 024.9814 048.9614 0011667 143.2067 216.9249 14.40070553108641
+FUSE 1
+1 25791U 99035A 01197.83700416 .00000546 00000-0 11423-3 0 3204
+2 25791 24.9813 49.3856 0011672 142.5933 217.5379 14.40070523108630
+FUSE 1
+1 25791U 99035A 01196.93609183 +.00000693 +00000-0 +16016-3 0 03423
+2 25791 024.9796 054.8902 0011793 132.6084 227.5393 14.40070954108505
+FUSE 1
+1 25791U 99035A 01196.45099063 .00000473 00000-0 91615-4 0 3199
+2 25791 24.9825 57.8656 0011228 128.4789 231.6720 14.40068671108430
+FUSE 1
+1 25791U 99035A 01195.20357322 .00000505 00000-0 10164-3 0 3180
+2 25791 24.9825 65.4916 0011215 116.0156 244.1500 14.40068220108256
+FUSE 1
+1 25791U 99035A 01194.02545613 .00000499 00000-0 99733-4 0 3172
+2 25791 24.9826 72.6920 0011188 103.4129 256.7628 14.40067381108089
+FUSE 1
+1 25791U 99035A 01193.95615541 +.00000494 +00000-0 +98068-4 0 03356
+2 25791 024.9827 073.1157 0011179 102.6649 257.5123 14.40067286108078
+FUSE 1
+1 25791U 99035A 01192.50083132 .00000493 00000-0 97812-4 0 3165
+2 25791 24.9831 82.0131 0011146 87.3221 272.8568 14.40066408107867
+FUSE 1
+1 25791U 99035A 01191.94642156 +.00000499 +00000-0 +99730-4 0 03267
+2 25791 024.9831 085.4021 0011170 081.6595 278.5190 14.40066125107781
+FUSE 1
+1 25791U 99035A 01191.18410683 .00000513 00000-0 10412-3 0 3155
+2 25791 24.9835 90.0635 0011114 74.2217 285.9515 14.40065843107672
+FUSE 1
+1 25791U 99035A 01190.14458616 .00000519 00000-0 10586-3 0 3145
+2 25791 24.9834 96.4153 0011128 63.2236 296.9407 14.40065179107528
+FUSE 1
+1 25791U 99035A 01188.89716000 .00000517 00000-0 10535-3 0 3139
+2 25791 24.9835 104.0390 0011105 50.1547 309.9937 14.40064329107342
+FUSE 1
+1 25791U 99035A 01187.85763598 .00000560 00000-0 11885-3 0 3124
+2 25791 24.9834 110.3927 0011027 39.7903 320.3413 14.40064059107198
+FUSE 1
+1 25791U 99035A 01186.26369845 .00000576 00000-0 12383-3 0 3115
+2 25791 24.9833 120.1320 0011040 23.1413 336.9590 14.40062964106967
+FUSE 1
+1 25791U 99035A 01185.22417234 .00000611 00000-0 13466-3 0 3108
+2 25791 24.9832 126.4851 0010938 12.2821 347.7952 14.40062479106818
+FUSE 1
+1 25791U 99035A 01183.90743981 .00000616 00000-0 13632-3 0 3090
+2 25791 24.9835 134.5338 0011000 358.4299 1.6173 14.40061396106623
+FUSE 1
+1 25791U 99035A 01182.72930922 .00000647 00000-0 14599-3 0 3088
+2 25791 24.9835 141.7349 0010932 346.1083 13.9122 14.40060663106450
+FUSE 1
+1 25791U 99035A 01181.55117807 .00000655 00000-0 14826-3 0 3078
+2 25791 24.9833 148.9349 0010989 333.0109 26.9827 14.40059608106287
+FUSE 1
+1 25791U 99035A 01180.23444311 .00000674 00000-0 15430-3 0 3067
+2 25791 24.9834 156.9835 0010915 318.5214 41.4471 14.40058589106094
+FUSE 1
+1 25791U 99035A 01179.95723625 +.00000660 +00000-0 +14998-3 0 03537
+2 25791 024.9835 158.6778 0010936 315.4784 044.4860 14.40058184106053
+FUSE 1
+1 25791U 99035A 01178.98701077 +.00000700 +00000-0 +16223-3 0 03095
+2 25791 024.9839 164.6103 0010804 304.5310 055.4225 14.40057715105914
+FUSE 1
+1 25791U 99035A 01178.91770917 .00000670 00000-0 15306-3 0 3050
+2 25791 24.9837 165.0340 0010775 303.9328 56.0166 14.40057316105906
+FUSE 1
+1 25791U 99035A 01177.94748394 +.00000667 +00000-0 +15215-3 0 03051
+2 25791 024.9839 170.9631 0010758 293.8032 066.1362 14.40056346105762
+FUSE 1
+1 25791U 99035A 01177.80888028 .00000659 00000-0 14952-3 0 3042
+2 25791 24.9838 171.8101 0010748 292.4036 67.5332 14.40056120105741
+FUSE 1
+1 25791U 99035A 01176.83865444 +.00000669 +00000-0 +15256-3 0 03062
+2 25791 024.9836 177.7390 0010771 281.9230 078.0068 14.40055269105600
+FUSE 1
+1 25791U 99035A 01176.56144703 .00000675 00000-0 15449-3 0 3038
+2 25791 24.9837 179.4333 0010795 278.8637 81.0649 14.40055073105566
+FUSE 1
+1 25791U 99035A 01175.86842919 +.00000678 +00000-0 +15546-3 0 03316
+2 25791 024.9837 183.6698 0010800 271.5427 088.3843 14.40054412105462
+FUSE 1
+1 25791U 99035A 01175.24471298 .00000688 00000-0 15855-3 0 3028
+2 25791 24.9839 187.4824 0010794 264.9104 95.0170 14.40053918105375
+FUSE 1
+1 25791U 99035A 01173.85867780 .00000677 00000-0 15522-3 0 3016
+2 25791 24.9839 195.9535 0010801 250.3967 109.5372 14.40052381105179
+FUSE 1
+1 25791U 99035A 01172.95775496 +.00000670 +00000-0 +15307-3 0 03067
+2 25791 024.9841 201.4598 0010826 240.8926 119.0499 14.40051405105048
+FUSE 1
+1 25791U 99035A 01172.54194415 .00000672 00000-0 15364-3 0 3007
+2 25791 24.9843 204.0010 0010840 236.4724 123.4748 14.40051033104986
+FUSE 1
+1 25791U 99035A 01171.98753138 +.00000679 +00000-0 +15575-3 0 03288
+2 25791 024.9843 207.3895 0010842 230.3514 129.6117 14.40050582104903
+FUSE 1
+1 25791U 99035A 01171.22521133 .00000677 00000-0 15522-3 0 2990
+2 25791 24.9854 212.0560 0010996 222.3356 137.6304 14.40049810104798
+FUSE 1
+1 25791U 99035A 01169.97777976 +.00000651 +00000-0 +14719-3 0 02996
+2 25791 024.9854 219.6805 0010993 209.2640 150.7249 14.40048323104613
+FUSE 1
+1 25791U 99035A 01169.83917607 .00000653 00000-0 14780-3 0 2987
+2 25791 24.9854 220.5274 0010997 207.8311 152.1606 14.40048213104595
+FUSE 1
+1 25791U 99035A 01168.93825267 +.00000639 +00000-0 +14331-3 0 02983
+2 25791 024.9853 226.0330 0011011 198.4101 161.6008 14.40047199104467
+FUSE 1
+1 25791U 99035A 01168.79964884 .00000639 00000-0 14331-3 0 2975
+2 25791 24.9853 226.8798 0011011 196.9581 163.0554 14.40047071104447
+FUSE 1
+1 25791U 99035A 01167.55221537 .00000637 00000-0 14282-3 0 2961
+2 25791 24.9855 234.5040 0011049 184.0993 175.9424 14.40045914104263
+FUSE 1
+1 25791U 99035A 01166.51268687 .00000629 00000-0 14035-3 0 2959
+2 25791 24.9856 240.8573 0011071 173.3506 186.7149 14.40044884104114
+FUSE 1
+1 25791U 99035A 01165.95827450 +.00000603 +00000-0 +13200-3 0 03120
+2 25791 024.9848 244.2600 0010963 166.9546 193.1247 14.40044112104031
+FUSE 1
+1 25791U 99035A 01165.40385861 .00000599 00000-0 13098-3 0 2943
+2 25791 24.9849 247.6487 0010973 161.1937 198.8977 14.40043624103953
+FUSE 1
+1 25791U 99035A 01164.22572358 .00000615 00000-0 13598-3 0 2934
+2 25791 24.9850 254.8490 0011010 149.2494 210.8676 14.40042799103781
+FUSE 1
+1 25791U 99035A 01163.87921276 +.00000615 +00000-0 +13599-3 0 03270
+2 25791 024.9849 256.9662 0011011 145.6235 214.4988 14.40042491103737
+FUSE 1
+1 25791U 99035A 01163.18619226 .00000575 00000-0 12336-3 0 2927
+2 25791 24.9852 261.2039 0011012 139.1112 221.0231 14.40041529103636
+FUSE 1
+1 25791U 99035A 01162.90898327 +.00000573 +00000-0 +12283-3 0 03321
+2 25791 024.9853 262.8977 0011009 136.1629 223.9749 14.40041298103594
+FUSE 1
+1 25791U 99035A 01161.86945008 .00000570 00000-0 12199-3 0 2911
+2 25791 24.9855 269.2523 0011028 125.4435 234.7103 14.40040463103442
+FUSE 1
+1 25791U 99035A 01160.55270529 .00000600 00000-0 13110-3 0 2902
+2 25791 24.9853 277.3011 0011033 112.2693 247.8985 14.40039697103257
+FUSE 1
+1 25791U 99035A 01159.51316909 .00000608 00000-0 13389-3 0 2893
+2 25791 24.9855 283.6566 0011020 101.4944 258.6799 14.40038905103107
+FUSE 1
+1 25791U 99035A 01158.95874900 +.00000619 +00000-0 +13726-3 0 03157
+2 25791 024.9854 287.0455 0011021 095.8528 264.3235 14.40038518103026
+FUSE 1
+1 25791U 99035A 01158.40432836 .00000637 00000-0 14284-3 0 2884
+2 25791 24.9854 290.4346 0011007 89.9818 270.1950 14.40038207102947
+FUSE 1
+1 25791U 99035A 01157.22618367 .00000647 00000-0 14588-3 0 2875
+2 25791 24.9857 297.6350 0011049 77.7985 282.3753 14.40037223102774
+FUSE 1
+1 25791U 99035A 01156.18664290 .00000642 00000-0 14440-3 0 2866
+2 25791 24.9861 303.9893 0011005 67.0287 293.1376 14.40036236102629
+FUSE 1
+1 25791U 99035A 01154.86988814 .00000664 00000-0 15129-3 0 2858
+2 25791 24.9862 312.0359 0010968 53.2775 306.8736 14.40035235102433
+FUSE 1
+1 25791U 99035A 01153.55313207 .00000654 00000-0 14823-3 0 2849
+2 25791 24.9862 320.0822 0010917 39.4182 320.7119 14.40033855102244
+FUSE 1
+1 25791U 99035A 01152.51358604 .00000656 00000-0 14876-3 0 2833
+2 25791 24.9862 326.4348 0010879 28.5266 331.5835 14.40032889102090
+FUSE 1
+1 25791U 99035A 01151.95916093 +.00000658 +00000-0 +14954-3 0 03067
+2 25791 024.9864 329.8227 0010858 022.6676 337.4309 14.40032401102015
+FUSE 1
+1 25791U 99035A 01151.33543277 .00000649 00000-0 14671-3 0 2828
+2 25791 24.9863 333.6343 0010866 15.9419 344.1429 14.40031685101925
+FUSE 1
+1 25791U 99035A 01150.15727791 .00000654 00000-0 14810-3 0 2812
+2 25791 24.9864 340.8337 0010840 3.4915 356.5667 14.40030638101753
+FUSE 1
+1 25791U 99035A 01149.88006493 +.00000653 +00000-0 +14785-3 0 03135
+2 25791 024.9866 342.5280 0010826 000.5019 359.5497 14.40030376101717
+FUSE 1
+1 25791U 99035A 01148.90982283 .00000634 00000-0 14209-3 0 2800
+2 25791 24.9866 348.4566 0010800 350.2840 9.7632 14.40029222101575
+FUSE 1
+1 25791U 99035A 01147.38515028 .00000579 00000-0 12480-3 0 2795
+2 25791 24.9837 357.7948 0010793 333.6467 26.3492 14.40027134101356
+FUSE 1
+1 25791U 99035A 01146.20699331 .00000565 00000-0 12045-3 0 2786
+2 25791 24.9838 4.9959 0010786 321.0840 38.8893 14.40026061101180
+FUSE 1
+1 25791U 99035A 01144.89022932 .00000533 00000-0 11042-3 0 2776
+2 25791 24.9841 13.0436 0010817 306.9215 53.0301 14.40024823100993
+FUSE 1
+1 25791U 99035A 01143.91998144 +.00000546 +00000-0 +11428-3 0 02924
+2 25791 024.9842 018.9724 0010816 296.5378 063.4019 14.40024274100857
+FUSE 1
+1 25791U 99035A 01143.36555441 .00000551 00000-0 11588-3 0 2767
+2 25791 24.9842 22.3601 0010810 290.7426 69.1925 14.40023904100773
+FUSE 1
+1 25791U 99035A 01142.94973432 +.00000553 +00000-0 +11652-3 0 02881
+2 25791 024.9843 024.9015 0010807 286.3744 073.5580 14.40023633100710
+FUSE 1
+1 25791U 99035A 01142.32600379 .00000567 00000-0 12088-3 0 2755
+2 25791 24.9842 28.7136 0010785 279.8487 80.0792 14.40023279100625
+FUSE 1
+1 25791U 99035A 01141.91018440 +.00000540 +00000-0 +11242-3 0 02900
+2 25791 024.9840 031.2547 0010893 276.2467 083.6799 14.40022637100563
+FUSE 1
+1 25791U 99035A 01141.21715079 .00000549 00000-0 11542-3 0 2749
+2 25791 24.9840 35.4898 0010896 268.8475 91.0785 14.40022229100461
+FUSE 1
+1 25791U 99035A 01139.90038775 .00000571 00000-0 12219-3 0 2739
+2 25791 24.9839 43.5397 0010931 255.0386 104.8911 14.40021439100277
+FUSE 1
+1 25791U 99035A 01138.58362425 .00000609 00000-0 13389-3 0 2724
+2 25791 24.9837 51.5882 0011072 241.1629 118.7758 14.40020744100086
+FUSE 1
+1 25791U 99035A 01137.33616481 .00000661 00000-0 15031-3 0 2713
+2 25791 24.9839 59.2112 0011101 227.8811 132.0752 14.40020162 99901
+FUSE 1
+1 25791U 99035A 01136.22731284 .00000674 00000-0 15435-3 0 2700
+2 25791 24.9841 65.9875 0011119 216.3279 143.6473 14.40019220 99747
+FUSE 1
+1 25791U 99035A 01134.97985363 +.00000712 +00000-0 +16613-3 0 02734
+2 25791 024.9840 073.6131 0011195 203.7721 156.2269 14.40018339099566
+FUSE 1
+1 25791U 99035A 01134.91055026 .00000715 00000-0 16725-3 0 2694
+2 25791 24.9839 74.0366 0011202 203.0881 156.9123 14.40018302 99553
+FUSE 1
+1 25791U 99035A 01133.94030404 +.00000743 +00000-0 +17573-3 0 02737
+2 25791 024.9839 079.9663 0011198 193.0427 166.9790 14.40017554099419
+FUSE 1
+1 25791U 99035A 01133.45518076 .00000746 00000-0 17689-3 0 2684
+2 25791 24.9839 82.9302 0011209 188.0450 171.9871 14.40017047 99341
+FUSE 1
+1 25791U 99035A 01132.20772024 .00000785 00000-0 18898-3 0 2676
+2 25791 24.9839 90.5544 0011269 175.2870 184.7740 14.40016047 99160
+FUSE 1
+1 25791U 99035A 01130.96025905 +.00000820 +00000-0 +19980-3 0 02691
+2 25791 024.9841 098.1782 0011296 162.1732 197.9172 14.40014946098983
+FUSE 1
+1 25791U 99035A 01130.89095562 .00000820 00000-0 20001-3 0 2662
+2 25791 24.9841 98.6016 0011296 161.4536 198.6384 14.40014866 98975
+FUSE 1
+1 25791U 99035A 01129.92071030 +.00000847 +00000-0 +20834-3 0 02661
+2 25791 024.9833 104.5520 0011085 151.6354 208.4757 14.40014053098835
+FUSE 1
+1 25791U 99035A 01129.85140680 .00000850 00000-0 20936-3 0 2657
+2 25791 24.9832 104.9757 0011084 150.9394 209.1729 14.40013984 98823
+FUSE 1
+1 25791U 99035A 01128.95046107 +.00000863 +00000-0 +21348-3 0 02704
+2 25791 024.9831 110.4816 0011082 141.5157 218.6142 14.40012890098695
+FUSE 1
+1 25791U 99035A 01128.53463956 .00000867 00000-0 21456-3 0 2640
+2 25791 24.9830 113.0225 0011082 137.1961 222.9409 14.40012343 98632
+FUSE 1
+1 25791U 99035A 01127.98021059 +.00000880 +00000-0 +21866-3 0 02822
+2 25791 024.9832 116.4114 0011088 131.3728 228.7736 14.40011719098555
+FUSE 1
+1 25791U 99035A 01127.21786998 .00000884 00000-0 22005-3 0 2637
+2 25791 24.9831 121.0699 0011080 123.3961 236.7608 14.40010685 98442
+FUSE 1
+1 25791U 99035A 01125.90109773 .00000892 00000-0 22255-3 0 2626
+2 25791 24.9833 129.1184 0011028 109.9749 250.1950 14.40008904 98258
+FUSE 1
+1 25791U 99035A 01124.86153846 .00000895 00000-0 22336-3 0 2612
+2 25791 24.9835 135.4720 0010976 99.2838 260.8908 14.40007464 98102
+FUSE 1
+1 25791U 99035A 01123.82197729 .00000903 00000-0 22598-3 0 2604
+2 25791 24.9836 141.8244 0010956 88.5472 271.6290 14.40006059 97953
+FUSE 1
+1 25791U 99035A 01122.78241421 .00000914 00000-0 22957-3 0 2596
+2 25791 24.9838 148.1778 0010906 77.7606 282.4122 14.40004664 97809
+FUSE 1
+1 25791U 99035A 01121.74284958 .00000909 00000-0 22797-3 0 2588
+2 25791 24.9840 154.5310 0010872 66.8417 293.3235 14.40003100 97659
+FUSE 1
+1 25791U 99035A 01120.98050140 +.00000892 +00000-0 +22245-3 0 02632
+2 25791 024.9840 159.1901 0010848 058.8234 301.3337 14.40001802097545
+FUSE 1
+1 25791U 99035A 01120.56467427 .00000893 00000-0 22276-3 0 2574
+2 25791 24.9840 161.7307 0010845 54.4415 305.7103 14.40001218 97487
+FUSE 1
+1 25791U 99035A 01119.24788803 .00000840 00000-0 20637-3 0 2561
+2 25791 24.9839 169.7779 0010778 40.3623 319.7683 14.39998784 97294
+FUSE 1
+1 25791U 99035A 01117.23804969 .00000814 00000-0 19817-3 0 2547
+2 25791 24.9840 182.0587 0010772 19.4486 340.6431 14.39995823 97003
+FUSE 1
+1 25791U 99035A 01116.96083039 +.00000802 +00000-0 +19449-3 0 02877
+2 25791 024.9843 183.7523 0010778 016.6787 343.4072 14.39995329096960
+FUSE 1
+1 25791U 99035A 01116.19847490 .00001304 00000-0 35116-3 0 2531
+2 25791 24.9827 188.4092 0011139 8.8375 351.2331 14.39996795 96854
+FUSE 1
+1 25791U 99035A 01114.88168133 +.00000626 +00000-0 +13955-3 0 02538
+2 25791 024.9832 196.4565 0011007 354.8618 005.1760 14.39992143096665
+FUSE 1
+1 25791U 99035A 01114.81237588 .00000730 00000-0 17192-3 0 2524
+2 25791 24.9832 196.8805 0010974 353.8797 6.1556 14.39992378 96658
+FUSE 1
+1 25791U 99035A 01113.91141013 +.00001105 +00000-0 +28900-3 0 02583
+2 25791 024.9832 202.3874 0010818 344.5129 015.5072 14.39992088096521
+FUSE 1
+1 25791U 99035A 01113.56488467 .00000804 00000-0 19509-3 0 2514
+2 25791 24.9836 204.5049 0010848 340.9754 19.0347 14.39990691 96476
+FUSE 1
+1 25791U 99035A 01112.87183381 +.00000588 +00000-0 +12770-3 0 02853
+2 25791 024.9838 208.7401 0010866 334.2845 025.7120 14.39989069096372
+FUSE 1
+1 25791U 99035A 01112.24808739 .00000697 00000-0 16161-3 0 2506
+2 25791 24.9837 212.5519 0010856 327.7806 32.2065 14.39988758 96282
+FUSE 1
+1 25791U 99035A 01110.86198210 .00000839 00000-0 20609-3 0 2496
+2 25791 24.9833 221.0217 0010828 312.9646 46.9953 14.39987824 96084
+FUSE 1
+1 25791U 99035A 01109.96101490 +.00000640 +00000-0 +14376-3 0 02662
+2 25791 024.9835 226.5270 0010746 303.7230 056.2253 14.39986069095953
+FUSE 1
+1 25791U 99035A 01109.54518505 .00000698 00000-0 16199-3 0 2483
+2 25791 24.9825 229.0749 0010853 299.3689 60.5757 14.39985563 95896
+FUSE 1
+1 25791U 99035A 01108.92143892 +.00000424 +00000-0 +76456-4 0 02689
+2 25791 024.9835 232.8933 0010773 292.5014 067.4341 14.39984084095805
+FUSE 1
+1 25791U 99035A 01108.43630231 .00000475 00000-0 92307-4 0 2479
+2 25791 24.9841 235.8622 0010842 287.1593 72.7725 14.39984197 95731
+FUSE 1
+1 25791U 99035A 01107.25811420 .00000342 00000-0 50688-4 0 2467
+2 25791 24.9840 243.0654 0010850 274.6194 85.3080 14.39982982 95568
+FUSE 1
+1 25791U 99035A 01106.91158787 +.00000319 +00000-0 +43545-4 0 02816
+2 25791 024.9842 245.1833 0010843 270.9361 088.9901 14.39982821095517
+FUSE 1
+1 25791U 99035A 01105.94131510 +.00000457 +00000-0 +86612-4 0 02469
+2 25791 024.9838 251.1154 0010905 261.3015 098.6260 14.39982811095373
+FUSE 1
+1 25791U 99035A 01105.87200985 .00000459 00000-0 87250-4 0 2454
+2 25791 24.9840 251.5393 0010901 260.6320 99.2952 14.39982811 95366
+FUSE 1
+1 25791U 99035A 01104.55520998 .00001008 00000-0 25888-3 0 2445
+2 25791 24.9829 259.5887 0011021 247.1818 112.7523 14.39983372 95172
+FUSE 1
+1 25791U 99035A 01103.51562954 .00001492 00000-0 40988-3 0 2432
+2 25791 24.9842 265.9425 0010869 234.0542 125.8931 14.39984015 95021
+FUSE 1
+1 25791U 99035A 01102.89188107 +.00001731 +00000-0 +48461-3 0 02649
+2 25791 024.9844 269.7554 0011059 227.9140 132.0419 14.39983703094938
+FUSE 1
+1 25791U 99035A 01102.54535407 .00001893 00000-0 53504-3 0 2429
+2 25791 24.9846 271.8734 0010921 223.7407 136.2232 14.39983757 94883
+FUSE 1
+1 25791U 99035A 01101.92160517 +.00002030 +00000-0 +57800-3 0 02647
+2 25791 024.9848 275.6854 0011217 217.6844 142.2874 14.39982801094794
+FUSE 1
+1 25791U 99035A 01101.57507715 .00002190 00000-0 62781-3 0 2419
+2 25791 24.9854 277.8031 0010956 213.3871 146.5941 14.39983161 94741
+FUSE 1
+1 25791U 99035A 01100.88202474 +.00002253 +00000-0 +64777-3 0 02660
+2 25791 024.9853 282.0379 0011053 206.6572 153.3357 14.39981020094643
+FUSE 1
+1 25791U 99035A 01100.18897006 .00002361 00000-0 68129-3 0 2401
+2 25791 24.9852 286.2722 0011029 198.9302 161.0725 14.39979226 94546
+FUSE 1
+1 25791U 99035A 01099.91174907 +.00002395 +00000-0 +69207-3 0 02750
+2 25791 024.9855 287.9660 0011230 196.5404 163.4735 14.39978461094502
+FUSE 1
+1 25791U 99035A 01098.94147224 +.00002530 +00000-0 +73411-3 0 02421
+2 25791 024.9854 293.8958 0011234 186.4584 173.5772 14.39975567094369
+FUSE 1
+1 25791U 99035A 01098.87216662 .00002543 00000-0 73810-3 0 2399
+2 25791 24.9855 294.3194 0011295 185.6074 174.4304 14.39975420 94358
+FUSE 1
+1 25791U 99035A 01097.55535820 .00002756 00000-0 80493-3 0 2383
+2 25791 24.9857 302.3671 0011209 171.5084 188.5605 14.39971661 94162
+FUSE 1
+1 25791U 99035A 01096.51577572 .00001819 00000-0 51232-3 0 2375
+2 25791 24.9851 308.7196 0011060 159.9502 200.1452 14.39962260 94018
+FUSE 1
+1 25791U 99035A 01095.19896006 .00002137 00000-0 61186-3 0 2366
+2 25791 24.9847 316.7677 0011044 146.2105 213.9107 14.39958939 93821
+FUSE 1
+1 25791U 99035A 01094.92173520 +.00002224 +00000-0 +63882-3 0 02749
+2 25791 024.9845 318.4612 0011055 143.4912 216.6355 14.39958128093784
+FUSE 1
+1 25791U 99035A 01093.95144716 +.00002409 +00000-0 +69674-3 0 02410
+2 25791 024.9843 324.3915 0011216 133.1891 226.9554 14.39954609093645
+FUSE 1
+1 25791U 99035A 01093.88214064 .00002499 00000-0 72482-3 0 2359
+2 25791 24.9842 324.8152 0011197 132.3778 227.7676 14.39954543 93635
+FUSE 1
+1 25791U 99035A 01092.91184954 +.00003251 +00000-0 +95975-3 0 02557
+2 25791 024.9837 330.7471 0011246 122.5955 237.5655 14.39950967093498
+FUSE 1
+1 25791U 99035A 01091.17917824 .00003186 00000-0 93968-3 0 2337
+2 25791 24.9835 341.3417 0011318 105.3746 254.8012 14.39939177 93243
+FUSE 1
+1 25791U 99035A 01090.13956723 .00002972 00000-0 87297-3 0 2322
+2 25791 24.9838 347.6958 0011329 94.7440 265.4361 14.39932401 93090
+FUSE 1
+1 25791U 99035A 01088.96133501 +.00002837 +00000-0 +83108-3 0 02339
+2 25791 024.9838 354.9011 0011327 083.2313 276.9488 14.39925595092925
+FUSE 1
+1 25791U 99035A 01088.89202703 .00002815 00000-0 82399-3 0 2317
+2 25791 24.9839 355.3247 0011337 82.5196 277.6602 14.39925159 92915
+FUSE 1
+1 25791U 99035A 01087.92171315 +.00001946 +00000-0 +55260-3 0 02360
+2 25791 024.9847 001.2552 0011205 072.8181 287.3553 14.39918251092772
+FUSE 1
+1 25791U 99035A 01087.85240649 .00001697 00000-0 47485-3 0 2306
+2 25791 24.9849 1.6791 0011193 72.3247 287.8536 14.39917141 92769
+FUSE 1
+1 25791U 99035A 01082.51561712 .00000996 00000-0 25569-3 0 2266
+2 25791 24.9850 34.2906 0010848 15.4515 344.6316 14.39903030 91997
+FUSE 1
+1 25791U 99035A 01081.96114279 +.00000895 +00000-0 +22411-3 0 02357
+2 25791 024.9850 037.6798 0010802 008.8785 351.1917 14.39901631091915
+FUSE 1
+1 25791U 99035A 01081.33735740 .00000887 00000-0 22159-3 0 2259
+2 25791 24.9850 41.4919 0010779 2.2856 357.7699 14.39900735 91826
+FUSE 1
+1 25791U 99035A 01080.92150068 +.00000863 +00000-0 +21388-3 0 02333
+2 25791 024.9849 044.0329 0010784 357.8343 002.2118 14.39899989091763
+FUSE 1
+1 25791U 99035A 01080.22840542 .00000844 00000-0 20810-3 0 2247
+2 25791 24.9848 48.2669 0010801 350.7139 9.3171 14.39898909 91667
+FUSE 1
+1 25791U 99035A 01079.95116702 +.00000849 +00000-0 +20965-3 0 02537
+2 25791 024.9848 049.9618 0010808 347.8135 012.2110 14.39898588091624
+FUSE 1
+1 25791U 99035A 01078.98083194 +.00000863 +00000-0 +21409-3 0 02245
+2 25791 024.9850 055.8907 0010787 337.5934 022.4103 14.39897482091484
+FUSE 1
+1 25791U 99035A 01078.91152241 .00000863 00000-0 21400-3 0 2238
+2 25791 24.9849 56.3142 0010787 336.8603 23.1424 14.39897379 91472
+FUSE 1
+1 25791U 99035A 01077.94118795 +.00000865 +00000-0 +21466-3 0 02296
+2 25791 024.9846 062.2492 0010753 326.7694 033.2147 14.39896112091337
+FUSE 1
+1 25791U 99035A 01077.52532984 .00000862 00000-0 21353-3 0 2225
+2 25791 24.9844 64.7900 0010747 322.4604 37.5154 14.39895491 91270
+FUSE 1
+1 25791U 99035A 01076.48568446 .00000836 00000-0 20539-3 0 2216
+2 25791 24.9842 71.1417 0010785 311.0390 48.9185 14.39893786 91120
+FUSE 1
+1 25791U 99035A 01075.23810913 .00000832 00000-0 20428-3 0 2209
+2 25791 24.9846 78.7649 0010811 297.7413 62.1997 14.39892127 90946
+FUSE 1
+1 25791U 99035A 01073.99053383 +.00000816 +00000-0 +19913-3 0 02209
+2 25791 024.9845 086.3872 0010797 284.5974 075.3336 14.39890279090766
+FUSE 1
+1 25791U 99035A 01073.92122749 .00000816 00000-0 19910-3 0 2190
+2 25791 24.9845 86.8106 0010797 283.8732 76.0753 14.39890190 90757
+FUSE 1
+1 25791U 99035A 01072.88158105 +.00000784 +00000-0 +18923-3 0 02220
+2 25791 024.9830 093.1816 0010740 272.7044 087.2233 14.39888516090601
+FUSE 1
+1 25791U 99035A 01072.53503188 .00000787 00000-0 19030-3 0 2185
+2 25791 24.9830 95.2987 0010757 268.9911 90.9362 14.39888127 90557
+FUSE 1
+1 25791U 99035A 01071.98055429 +.00000763 +00000-0 +18258-3 0 02201
+2 25791 024.9833 098.6880 0010753 263.1759 096.7529 14.39887246090473
+FUSE 1
+1 25791U 99035A 01071.49538471 .00000791 00000-0 19130-3 0 2177
+2 25791 24.9831 101.6522 0010849 257.9268 102.0023 14.39886914 90405
+FUSE 1
+1 25791U 99035A 01070.94090658 +.00000785 +00000-0 +18959-3 0 02469
+2 25791 024.9831 105.0409 0010844 252.1036 107.8288 14.39886182090326
+FUSE 1
+1 25791U 99035A 01070.24780824 .00000809 00000-0 19709-3 0 2161
+2 25791 24.9831 109.2771 0010871 244.6528 115.2853 14.39885565 90220
+FUSE 1
+1 25791U 99035A 01069.20816158 .00000791 00000-0 19153-3 0 2157
+2 25791 24.9832 115.6328 0011054 233.9117 126.0367 14.39884078 90070
+FUSE 1
+1 25791U 99035A 01067.82196489 .00000809 00000-0 19705-3 0 2143
+2 25791 24.9830 124.1033 0011113 218.9869 140.9835 14.39882486 89871
+FUSE 1
+1 25791U 99035A 01066.64369761 +.00000799 +00000-0 +19374-3 0 02169
+2 25791 024.9830 131.3033 0011151 207.0123 152.9803 14.39880895089707
+FUSE 1
+1 25791U 99035A 01066.50507788 .00000796 00000-0 19291-3 0 2139
+2 25791 24.9830 132.1500 0011152 205.5911 154.4046 14.39880702 89684
+FUSE 1
+1 25791U 99035A 01065.88128936 +.00000790 +00000-0 +19103-3 0 02397
+2 25791 024.9831 135.9622 0011122 198.9598 161.0503 14.39879873089593
+FUSE 1
+1 25791U 99035A 01065.18819067 .00000783 00000-0 18885-3 0 2121
+2 25791 24.9834 140.1989 0011152 191.7198 168.3068 14.39878991 89495
+FUSE 1
+1 25791U 99035A 01064.91095089 +.00000771 +00000-0 +18518-3 0 02446
+2 25791 024.9835 141.8928 0011125 188.7032 171.3283 14.39878539089457
+FUSE 1
+1 25791U 99035A 01063.87130138 .00000765 00000-0 18340-3 0 2115
+2 25791 24.9836 148.2465 0011125 177.9406 182.1148 14.39877264 89308
+FUSE 1
+1 25791U 99035A 01063.87130137 +.00000767 +00000-0 +18406-3 0 02120
+2 25791 024.9835 148.2460 0011132 177.9393 182.1166 14.39877276089308
+FUSE 1
+1 25791U 99035A 01062.90096058 +.00000769 +00000-0 +18444-3 0 02210
+2 25791 024.9839 154.1757 0011132 167.8039 192.2735 14.39876200089166
+FUSE 1
+1 25791U 99035A 01062.55441017 .00000773 00000-0 18590-3 0 2105
+2 25791 24.9841 156.2936 0011137 164.3299 195.7558 14.39875851 89113
+FUSE 1
+1 25791U 99035A 01061.30682837 .00000772 00000-0 18556-3 0 2093
+2 25791 24.9841 163.9191 0011157 150.7881 209.3252 14.39874318 88938
+FUSE 1
+1 25791U 99035A 01060.82165726 +.00000760 +00000-0 +18192-3 0 02488
+2 25791 024.9843 166.8839 0011144 145.5272 214.5963 14.39873647088866
+FUSE 1
+1 25791U 99035A 01059.92062424 +.00000739 +00000-0 +17528-3 0 02194
+2 25791 024.9846 172.3899 0011179 135.9727 224.1680 14.39872415088734
+FUSE 1
+1 25791U 99035A 01059.57407284 .00000713 00000-0 16698-3 0 2089
+2 25791 24.9853 174.5090 0011130 132.3934 227.7515 14.39871839 88686
+FUSE 1
+1 25791U 99035A 01058.25717454 .00000711 00000-0 16656-3 0 2077
+2 25791 24.9850 182.5567 0011163 119.2623 240.9005 14.39870406 88495
+FUSE 1
+1 25791U 99035A 01057.91062171 +.00000714 +00000-0 +16747-3 0 02319
+2 25791 024.9852 184.6743 0011160 115.8000 244.3659 14.39870084088444
+FUSE 1
+1 25791U 99035A 01056.87096351 .00000689 00000-0 15951-3 0 2069
+2 25791 24.9851 191.0276 0011173 104.7434 255.4312 14.39868715 88298
+FUSE 1
+1 25791U 99035A 01055.90061376 +.00000679 +00000-0 +15637-3 0 02285
+2 25791 024.9850 196.9579 0011170 094.7617 265.4158 14.39867625088158
+FUSE 1
+1 25791U 99035A 01055.55406001 .00000689 00000-0 15968-3 0 2057
+2 25791 24.9853 199.0771 0011176 91.3496 268.8293 14.39867412 88109
+FUSE 1
+1 25791U 99035A 01054.23715345 .00000689 00000-0 15972-3 0 2049
+2 25791 24.9854 207.1235 0011152 77.7001 282.4754 14.39866067 87917
+FUSE 1
+1 25791U 99035A 01053.89059839 +.00000696 +00000-0 +16187-3 0 02158
+2 25791 024.9856 209.2409 0011136 074.1479 286.0253 14.39865797087864
+FUSE 1
+1 25791U 99035A 01052.92024384 +.00000702 +00000-0 +16372-3 0 02040
+2 25791 024.9854 215.1686 0011139 064.1094 296.0556 14.39864826087724
+FUSE 1
+1 25791U 99035A 01052.85093275 .00000705 00000-0 16455-3 0 2031
+2 25791 24.9853 215.5920 0011131 63.4459 296.7188 14.39864778 87710
+FUSE 1
+1 25791U 99035A 01051.88057587 +.00000742 +00000-0 +17626-3 0 02031
+2 25791 024.9846 221.5212 0010994 053.4019 306.7497 14.39864094087570
+FUSE 1
+1 25791U 99035A 01049.17743500 .00000805 00000-0 19598-3 0 2004
+2 25791 24.9852 238.0376 0010943 24.9759 335.1274 14.39861598 87181
+FUSE 1
+1 25791U 99035A 01048.13776370 .00000818 00000-0 20021-3 0 1994
+2 25791 24.9855 244.3897 0010946 14.2126 345.8687 14.39860443 87033
+FUSE 1
+1 25791U 99035A 01046.95946808 +.00000826 +00000-0 +20265-3 0 02009
+2 25791 024.9856 251.5883 0010925 001.7292 358.3251 14.39859035086862
+FUSE 1
+1 25791U 99035A 01046.89015657 .00000828 00000-0 20328-3 0 1989
+2 25791 24.9856 252.0117 0010921 1.0228 359.0304 14.39858972 86851
+FUSE 1
+1 25791U 99035A 01045.91979473 +.00000825 +00000-0 +20234-3 0 02104
+2 25791 024.9857 257.9395 0010895 350.7865 009.2444 14.39857693086718
+FUSE 1
+1 25791U 99035A 01045.57323730 .00000822 00000-0 20128-3 0 1978
+2 25791 24.9855 260.0575 0010891 347.1542 12.8705 14.39857185 86669
+FUSE 1
+1 25791U 99035A 01044.32563210 .00000852 00000-0 21070-3 0 1968
+2 25791 24.9845 267.6885 0010940 335.0275 24.9843 14.39855877 86482
+FUSE 1
+1 25791U 99035A 01043.90976161 +.00000818 +00000-0 +19993-3 0 02047
+2 25791 024.9856 270.2365 0010879 331.1039 028.8868 14.39855093086427
+FUSE 1
+1 25791U 99035A 01043.21664491 .00000820 00000-0 20056-3 0 1955
+2 25791 24.9857 274.4720 0010879 323.9471 36.0302 14.39854225 86327
+FUSE 1
+1 25791U 99035A 01042.93939835 +.00000809 +00000-0 +19728-3 0 02345
+2 25791 024.9860 276.1661 0010879 321.0294 038.9430 14.39853798086288
+FUSE 1
+1 25791U 99035A 01041.89972384 .00000762 00000-0 18265-3 0 1943
+2 25791 24.9864 282.5199 0010886 310.1836 49.7717 14.39852068 86139
+FUSE 1
+1 25791U 99035A 01040.86004627 .00000786 00000-0 18998-3 0 1933
+2 25791 24.9864 288.8712 0010909 298.1189 61.8216 14.39851115 85984
+FUSE 1
+1 25791U 99035A 01039.88968203 +.00000776 +00000-0 +18695-3 0 01946
+2 25791 024.9866 294.8003 0010918 287.8124 072.1191 14.39849851085846
+FUSE 1
+1 25791U 99035A 01039.54312320 .00000778 00000-0 18759-3 0 1923
+2 25791 24.9865 296.9171 0010912 284.1925 75.7371 14.39849453 85798
+FUSE 1
+1 25791U 99035A 01038.91931566 +.00000841 +00000-0 +20715-3 0 01973
+2 25791 024.9853 300.7300 0011058 276.2116 083.7128 14.39849226085707
+FUSE 1
+1 25791U 99035A 01038.36482175 .00000851 00000-0 21041-3 0 1917
+2 25791 24.9852 304.1176 0011034 270.4549 89.4688 14.39848568 85628
+FUSE 1
+1 25791U 99035A 01037.94895133 +.00000854 +00000-0 +21128-3 0 02024
+2 25791 024.9850 306.6578 0011082 266.4454 093.4786 14.39848015085566
+FUSE 1
+1 25791U 99035A 01037.18652191 .00000871 00000-0 21669-3 0 1900
+2 25791 24.9854 311.3163 0011114 258.2637 101.6623 14.39847183 85456
+FUSE 1
+1 25791U 99035A 01035.93891068 +.00000893 +00000-0 +22356-3 0 01974
+2 25791 024.9856 318.9409 0011155 245.1344 114.8003 14.39845662085277
+FUSE 1
+1 25791U 99035A 01035.86959892 .00000895 00000-0 22415-3 0 1895
+2 25791 24.9856 319.3643 0011153 244.4229 115.5125 14.39845576 85260
+FUSE 1
+1 25791U 99035A 01034.96854630 +.00000904 +00000-0 +22698-3 0 02030
+2 25791 024.9856 324.8713 0011214 234.8399 125.1056 14.39844383085139
+FUSE 1
+1 25791U 99035A 01034.48336452 .00000891 00000-0 22284-3 0 1882
+2 25791 24.9853 327.8353 0011183 229.6286 130.3245 14.39843518 85060
+FUSE 1
+1 25791U 99035A 01033.23575272 .00000882 00000-0 22011-3 0 1876
+2 25791 24.9856 335.4581 0011214 216.6240 143.3500 14.39841675 84881
+FUSE 1
+1 25791U 99035A 01031.91882870 .00000844 00000-0 20813-3 0 1869
+2 25791 24.9858 343.5045 0011276 203.2127 156.7872 14.39839469 84699
+FUSE 1
+1 25791U 99035A 01031.91882869 +.00000845 +00000-0 +20836-3 0 01874
+2 25791 024.9858 343.5045 0011276 203.2090 156.7909 14.39839478084699
+FUSE 1
+1 25791U 99035A 01030.94846209 +.00000841 +00000-0 +20712-3 0 01918
+2 25791 024.9858 349.4319 0011289 193.2674 166.7539 14.39838132084559
+FUSE 1
+1 25791U 99035A 01030.46327849 .00000841 00000-0 20740-3 0 1853
+2 25791 24.9859 352.3959 0011304 188.2132 171.8192 14.39837508 84484
+FUSE 1
+1 25791U 99035A 01029.97809487 +.00000835 +00000-0 +20546-3 0 01981
+2 25791 024.9857 355.3599 0011303 183.2284 176.8152 14.39836776084417
+FUSE 1
+1 25791U 99035A 01029.21566280 .00000836 00000-0 20576-3 0 1848
+2 25791 24.9858 0.0180 0011350 175.3074 184.7541 14.39835807 84301
+FUSE 1
+1 25791U 99035A 01028.93841499 +.00000830 +00000-0 +20392-3 0 02294
+2 25791 024.9857 001.7120 0011345 172.4854 187.5833 14.39835361084265
+FUSE 1
+1 25791U 99035A 01027.96804596 +.00000821 +00000-0 +20111-3 0 01864
+2 25791 024.9857 007.6404 0011373 162.4249 197.6654 14.39833987084123
+FUSE 1
+1 25791U 99035A 01026.85905350 .00000774 00000-0 18631-3 0 1828
+2 25791 24.9845 14.4272 0011225 151.2576 208.8553 14.39832070 83960
+FUSE 1
+1 25791U 99035A 01025.95799395 +.00000773 +00000-0 +18616-3 0 01909
+2 25791 024.9845 019.9320 0011218 141.9876 218.1434 14.39830995083837
+FUSE 1
+1 25791U 99035A 01025.47280699 .00000781 00000-0 18854-3 0 1811
+2 25791 24.9846 22.8964 0011235 137.2317 222.9063 14.39830514 83762
+FUSE 1
+1 25791U 99035A 01024.91830785 +.00000785 +00000-0 +18987-3 0 01952
+2 25791 024.9848 026.2846 0011214 131.5244 228.6226 14.39829899083683
+FUSE 1
+1 25791U 99035A 01024.22518426 .00000758 00000-0 18147-3 0 1803
+2 25791 24.9850 30.5196 0011218 123.7953 236.3624 14.39828802 83586
+FUSE 1
+1 25791U 99035A 01022.97755790 +.00000765 +00000-0 +18342-3 0 01805
+2 25791 024.9847 038.1420 0011197 110.9464 249.2242 14.39827391083409
+FUSE 1
+1 25791U 99035A 01022.90824523 .00000765 00000-0 18346-3 0 1791
+2 25791 24.9847 38.5654 0011197 110.2109 249.9602 14.39827310 83397
+FUSE 1
+1 25791U 99035A 01021.93786714 +.00000792 +00000-0 +19214-3 0 01821
+2 25791 024.9847 044.4944 0011176 100.2360 259.9412 14.39826436083253
+FUSE 1
+1 25791U 99035A 01021.52199043 .00000791 00000-0 19188-3 0 1783
+2 25791 24.9847 47.0345 0011184 95.8875 264.2905 14.39825918 83199
+FUSE 1
+1 25791U 99035A 01020.48229781 .00000782 00000-0 18904-3 0 1774
+2 25791 24.9841 53.3876 0011058 84.9507 275.2262 14.39824524 83047
+FUSE 1
+1 25791U 99035A 01019.23466394 .00000810 00000-0 19778-3 0 1769
+2 25791 24.9842 61.0115 0011055 71.9716 288.1993 14.39823278 82863
+FUSE 1
+1 25791U 99035A 01018.81878536 +.00000815 +00000-0 +19923-3 0 02046
+2 25791 024.9840 063.5519 0011051 067.5973 292.5699 14.39822788082809
+FUSE 1
+1 25791U 99035A 01017.84840102 .00000828 00000-0 20329-3 0 1759
+2 25791 24.9838 69.4799 0011044 57.4205 302.7356 14.39821674 82660
+FUSE 1
+1 25791U 99035A 01016.80870221 +.00000844 +00000-0 +20844-3 0 01759
+2 25791 024.9839 075.8311 0011035 046.6049 313.5376 14.39820510082512
+FUSE 1
+1 25791U 99035A 01012.85783892 .00000765 00000-0 18364-3 0 1719
+2 25791 24.9824 99.9904 0011095 5.3964 354.6663 14.39814661 81946
+FUSE 1
+1 25791U 99035A 01011.81813392 .00000754 00000-0 18014-3 0 1702
+2 25791 24.9823 106.3421 0011120 354.5641 5.4745 14.39813318 81795
+FUSE 1
+1 25791U 99035A 01010.84774202 +.00000728 +00000-0 +17200-3 0 01820
+2 25791 024.9826 112.2708 0011146 344.3870 015.6294 14.39811988081659
+FUSE 1
+1 25791U 99035A 01010.57048690 .00000725 00000-0 17100-3 0 1696
+2 25791 24.9825 113.9647 0011158 341.3954 18.6145 14.39811641 81611
+FUSE 1
+1 25791U 99035A 01009.87734870 +.00000732 +00000-0 +17321-3 0 02008
+2 25791 024.9824 118.1992 0011164 334.0178 025.9768 14.39810940081516
+FUSE 1
+1 25791U 99035A 01006.55028272 .00000853 00000-0 21119-3 0 1667
+2 25791 24.9829 138.5275 0011161 298.7980 61.1405 14.39808266 81030
+FUSE 1
+1 25791U 99035A 01005.23331831 .00000949 00000-0 24121-3 0 1650
+2 25791 24.9829 146.5736 0011130 284.7867 75.1402 14.39807380 80842
+FUSE 1
+1 25791U 99035A 01004.95606288 +.00000961 +00000-0 +24508-3 0 01933
+2 25791 024.9830 148.2673 0011129 281.7309 078.1948 14.39807093080804
+FUSE 1
+1 25791U 99035A 01004.12429643 .00001014 00000-0 26161-3 0 1645
+2 25791 24.9831 153.3490 0011081 272.9218 87.0015 14.39806304 80681
+FUSE 1
+1 25791U 99035A 01003.91635493 +.00001024 +00000-0 +26479-3 0 02041
+2 25791 024.9833 154.6194 0011082 270.5710 089.3526 14.39806079080658
+FUSE 1
+1 25791U 99035A 01002.94596086 +.00001080 +00000-0 +28217-3 0 01657
+2 25791 024.9835 160.5480 0011065 260.2028 099.7226 14.39805000080513
+FUSE 1
+1 25791U 99035A 01002.87664699 .00001085 00000-0 28401-3 0 1633
+2 25791 24.9835 160.9715 0011055 259.4691 100.4567 14.39804944 80506
+FUSE 1
+1 25791U 99035A 01001.90625279 +.00001148 +00000-0 +30354-3 0 01851
+2 25791 024.9836 166.9004 0011074 249.1527 110.7793 14.39803819080368
+FUSE 1
+1 25791U 99035A 01001.55968328 .00001172 00000-0 31103-3 0 1622
+2 25791 24.9835 169.0177 0011071 245.6535 114.2814 14.39803412 80316
+FUSE 1
+1 25791U 99035A 00366.24272051 .00001201 00000-0 32013-3 0 1615
+2 25791 24.9835 177.0632 0011054 231.9139 128.0369 14.39801117 80127
+FUSE 1
+1 25791U 99035A 00365.13370179 .00001276 00000-0 34372-3 0 1603
+2 25791 24.9782 183.8601 0011264 220.6704 139.2961 14.39798988 79968
+FUSE 1
+1 25791U 99035A 00363.88605187 .00001279 00000-0 34462-3 0 1594
+2 25791 24.9781 191.4825 0011236 207.4675 152.5240 14.39796242 79788
+FUSE 1
+1 25791U 99035A 00362.91565615 +.00001282 +00000-0 +34567-3 0 01880
+2 25791 024.9781 197.4116 0011250 197.2959 162.7167 14.39794117079649
+FUSE 1
+1 25791U 99035A 00361.52937650 .00001173 00000-0 31161-3 0 1570
+2 25791 24.9788 205.8833 0011253 183.0025 177.0420 14.39790123 79448
+FUSE 1
+1 25791U 99035A 00360.21240650 .00001095 00000-0 28697-3 0 1564
+2 25791 24.9795 213.9300 0011256 169.4207 190.6539 14.39786866 79258
+FUSE 1
+1 25791U 99035A 00358.89543401 .00000997 00000-0 25633-3 0 1551
+2 25791 24.9802 221.9784 0011166 156.0199 204.0842 14.39783673 79063
+FUSE 1
+1 25791U 99035A 00357.57846016 .00000809 00000-0 19747-3 0 1543
+2 25791 24.9811 230.0287 0011220 142.5559 217.5744 14.39779898 78875
+FUSE 1
+1 25791U 99035A 00356.33079409 .00000742 00000-0 17656-3 0 1532
+2 25791 24.9815 237.6510 0011207 129.3758 230.7742 14.39777765 78696
+FUSE 1
+1 25791U 99035A 00355.91490500 +.00000715 +00000-0 +16811-3 0 01738
+2 25791 024.9818 240.1930 0011125 125.1559 234.9994 14.39777043078634
+FUSE 1
+1 25791U 99035A 00355.22175552 .00000689 00000-0 15980-3 0 1522
+2 25791 24.9818 244.4279 0011116 117.9072 242.2571 14.39776049 78533
+FUSE 1
+1 25791U 99035A 00354.94449551 +.00000671 +00000-0 +15421-3 0 01715
+2 25791 024.9820 246.1228 0011092 115.1399 245.0262 14.39775609078498
+FUSE 1
+1 25791U 99035A 00354.18203097 .00000667 00000-0 15302-3 0 1515
+2 25791 24.9821 250.7805 0011090 107.2769 252.9059 14.39774846 78383
+FUSE 1
+1 25791U 99035A 00353.14230184 .00000588 00000-0 12827-3 0 1507
+2 25791 24.9841 257.1312 0011153 94.7945 265.3836 14.39773357 78236
+FUSE 1
+1 25791U 99035A 00351.89462457 .00000618 00000-0 13768-3 0 1494
+2 25791 24.9843 264.7546 0011143 81.4463 278.7305 14.39772637 78057
+FUSE 1
+1 25791U 99035A 00350.57762798 .00000713 00000-0 16757-3 0 1485
+2 25791 24.9838 272.8003 0011117 67.5108 292.6555 14.39772305 77863
+FUSE 1
+1 25791U 99035A 00349.95378601 +.00000801 +00000-0 +19521-3 0 01751
+2 25791 024.9839 276.6107 0011037 061.1524 299.0082 14.39772533077773
+FUSE 1
+1 25791U 99035A 00348.91404926 +.00000938 +00000-0 +23822-3 0 01543
+2 25791 024.9841 282.9613 0011060 050.5076 309.6402 14.39772572077629
+FUSE 1
+1 25791U 99035A 00348.22089271 .00000955 00000-0 24346-3 0 1472
+2 25791 24.9841 287.1948 0011058 43.2638 316.8736 14.39771669 77522
+FUSE 1
+1 25791U 99035A 00347.94362883 +.00001009 +00000-0 +26044-3 0 01831
+2 25791 024.9842 288.8885 0011102 040.6503 319.4819 14.39771783077486
+FUSE 1
+1 25791U 99035A 00344.20056550 .00001466 00000-0 40388-3 0 1450
+2 25791 24.9857 311.7525 0010921 1.7998 358.2548 14.39768887 76944
+FUSE 1
+1 25791U 99035A 00342.95287422 +.00001623 +00000-0 +45287-3 0 02453
+2 25791 024.9861 319.3741 0010868 348.9036 011.1207 14.39767344076766
+FUSE 1
+1 25791U 99035A 00341.91313263 +.00001697 +00000-0 +47635-3 0 02169
+2 25791 024.9862 325.7251 0010827 338.0727 021.9314 14.39765205076612
+FUSE 1
+1 25791U 99035A 00340.80407309 +.00001773 +00000-0 +50001-3 0 01795
+2 25791 024.9865 332.4995 0010780 326.3093 033.6722 14.39762765076452
+FUSE 1
+1 25791U 99035A 00339.97228129 +.00001440 +00000-0 +39551-3 0 01453
+2 25791 024.9788 337.5913 0010715 317.2047 042.7636 14.39758312076333
+FUSE 1
+1 25791U 99035A 00339.90296490 .00001431 00000-0 39277-3 0 1446
+2 25791 24.9788 338.0153 0010711 316.5102 43.4556 14.39758072 76326
+FUSE 1
+1 25791U 99035A 00338.93253567 +.00001650 +00000-0 +46156-3 0 01892
+2 25791 024.9780 343.9450 0010727 305.4403 054.5107 14.39756594076187
+FUSE 1
+1 25791U 99035A 00337.89278976 +.00002012 +00000-0 +57514-3 0 01474
+2 25791 024.9771 350.3001 0010560 294.2116 065.7285 14.39754923076031
+FUSE 1
+1 25791U 99035A 00337.54620726 .00002120 00000-0 60886-3 0 1432
+2 25791 24.9769 352.4170 0010591 290.1130 69.8236 14.39754084 75985
+FUSE 1
+1 25791U 99035A 00336.78372846 +.00002078 +00000-0 +59583-3 0 02103
+2 25791 024.9767 357.0797 0010598 283.2388 076.6938 14.39750755075878
+FUSE 1
+1 25791U 99035A 00335.81329748 +.00001963 +00000-0 +55983-3 0 01784
+2 25791 024.9768 003.0088 0010682 272.4500 087.4788 14.39746543075738
+FUSE 1
+1 25791U 99035A 00332.55541084 .00001441 00000-0 39598-3 0 1416
+2 25791 24.9789 22.9137 0010823 238.8335 121.1112 14.39732709 75269
+FUSE 1
+1 25791U 99035A 00329.50545449 .00001099 00000-0 28863-3 0 1407
+2 25791 24.9807 41.5484 0010919 206.6216 153.3741 14.39723397 74828
+FUSE 1
+1 25791U 99035A 00326.80207218 .00000755 00000-0 18065-3 0 1395
+2 25791 24.9826 58.0674 0010967 178.4838 181.5705 14.39716699 74439
+FUSE 1
+1 25791U 99035A 00325.90094187 +.00000678 +00000-0 +15666-3 0 02663
+2 25791 024.9830 063.5734 0010889 169.1263 190.9481 14.39715100074301
+FUSE 1
+1 25791U 99035A 00324.86117451 +.00000608 +00000-0 +13450-3 0 02311
+2 25791 024.9833 069.9269 0010882 158.3926 201.7040 14.39713575074155
+FUSE 1
+1 25791U 99035A 00323.96004177 +.00000488 +00000-0 +96967-4 0 01894
+2 25791 024.9842 075.4361 0010837 150.2956 209.8168 14.39712104074027
+FUSE 1
+1 25791U 99035A 00322.92027010 +.00000542 +00000-0 +11394-3 0 01510
+2 25791 024.9842 081.7899 0010800 140.3373 219.7924 14.39711850073875
+FUSE 1
+1 25791U 99035A 00322.57367987 .00000544 00000-0 11471-3 0 1384
+2 25791 24.9842 83.9087 0010770 137.0085 223.1269 14.39711602 73828
+FUSE 1
+1 25791U 99035A 00321.88049734 +.00000639 +00000-0 +14444-3 0 02068
+2 25791 024.9838 088.1431 0010747 130.4414 229.7025 14.39711664073729
+FUSE 1
+1 25791U 99035A 00319.45435949 .00001051 00000-0 27399-3 0 1370
+2 25791 24.9822 102.9641 0011109 102.6166 257.5577 14.39710812 73374
+FUSE 1
+1 25791U 99035A 00318.83049407 +.00001135 +00000-0 +30023-3 0 02126
+2 25791 024.9820 106.7751 0011100 096.2751 263.9015 14.39710072073281
+FUSE 1
+1 25791U 99035A 00317.92935383 +.00001328 +00000-0 +36094-3 0 01927
+2 25791 024.9815 112.2808 0011081 086.9676 273.2095 14.39708951073151
+FUSE 1
+1 25791U 99035A 00316.95889405 +.00001476 +00000-0 +40722-3 0 01547
+2 25791 024.9811 118.2117 0011162 076.8388 283.3367 14.39707302073012
+FUSE 1
+1 25791U 99035A 00316.54298192 .00001536 00000-0 42622-3 0 1367
+2 25791 24.9808 120.7548 0011167 72.5609 287.6119 14.39706598 72958
+FUSE 1
+1 25791U 99035A 00312.17588299 .00001526 00000-0 42309-3 0 1352
+2 25791 24.9810 147.4346 0011047 26.6311 333.4765 14.39694429 72327
+FUSE 1
+1 25791U 99035A 00311.89860506 +.00001531 +00000-0 +42464-3 0 02432
+2 25791 024.9811 149.1285 0011021 023.7582 336.3433 14.39693742072285
+FUSE 1
+1 25791U 99035A 00310.92813172 +.00001533 +00000-0 +42529-3 0 02234
+2 25791 024.9811 155.0570 0011011 013.6669 346.4135 14.39691108072141
+FUSE 1
+1 25791U 99035A 00309.95765612 +.00001545 +00000-0 +42918-3 0 01953
+2 25791 024.9811 160.9853 0010987 003.5007 356.5574 14.39688573072001
+FUSE 1
+1 25791U 99035A 00308.91785913 +.00001558 +00000-0 +43320-3 0 01631
+2 25791 024.9811 167.3377 0010936 352.6420 007.3927 14.39685825071856
+FUSE 1
+1 25791U 99035A 00307.94738084 .00001523 00000-0 42238-3 0 1347
+2 25791 24.9813 173.2666 0010902 342.2944 17.7187 14.39682876 71715
+FUSE 1
+1 25791U 99035A 00306.90758062 +.00001494 +00000-0 +41322-3 0 02161
+2 25791 024.9816 179.6189 0010843 331.2370 028.7545 14.39679852071566
+FUSE 1
+1 25791U 99035A 00305.93709941 +.00001422 +00000-0 +39070-3 0 01847
+2 25791 024.9820 185.5476 0010836 320.8016 039.1721 14.39676778071420
+FUSE 1
+1 25791U 99035A 00304.96661633 +.00001342 +00000-0 +36540-3 0 01518
+2 25791 024.9825 191.4771 0010878 310.3487 049.6069 14.39673761071285
+FUSE 1
+1 25791U 99035A 00304.48137472 .00001294 00000-0 35039-3 0 1332
+2 25791 24.9827 194.4415 0010840 305.2721 54.6774 14.39672228 71217
+FUSE 1
+1 25791U 99035A 00300.94603167 +.00001128 +00000-0 +29826-3 0 01487
+2 25791 024.9836 216.0428 0010846 267.5163 092.4104 14.39663463070709
+FUSE 1
+1 25791U 99035A 00300.32214586 .00001125 00000-0 29742-3 0 1329
+2 25791 24.9837 219.8536 0010864 260.8686 99.0595 14.39662271 70610
+FUSE 1
+1 25791U 99035A 00299.97554307 +.00001099 +00000-0 +28908-3 0 02622
+2 25791 024.9840 221.9723 0010883 257.3195 102.6096 14.39661414070562
+FUSE 1
+1 25791U 99035A 00298.93573357 +.00001095 +00000-0 +28804-3 0 02219
+2 25791 024.9842 228.3263 0010808 246.2256 113.7131 14.39659498070412
+FUSE 1
+1 25791U 99035A 00297.96524296 +.00001101 +00000-0 +28980-3 0 01840
+2 25791 024.9843 234.2549 0010819 235.8887 124.0592 14.39657800070277
+FUSE 1
+1 25791U 99035A 00296.92543051 +.00001198 +00000-0 +32020-3 0 01469
+2 25791 024.9839 240.6071 0010755 225.0055 134.9574 14.39656593070122
+FUSE 1
+1 25791U 99035A 00296.23222249 .00001231 00000-0 33056-3 0 1318
+2 25791 24.9837 244.8414 0010747 217.7619 142.2134 14.39655396 70025
+FUSE 1
+1 25791U 99035A 00295.95493830 +.00001341 +00000-0 +36537-3 0 02570
+2 25791 024.9831 246.5364 0010694 214.7072 145.2732 14.39655631069985
+FUSE 1
+1 25791U 99035A 00294.98444509 +.00001216 +00000-0 +32610-3 0 02121
+2 25791 024.9831 252.4518 0011171 205.6776 154.3176 14.39652293069842
+FUSE 1
+1 25791U 99035A 00292.97413670 .00001233 00000-0 33120-3 0 1465
+2 25791 24.9832 264.7305 0011154 184.3003 175.7409 14.39648196 69551
+FUSE 1
+1 25791U 99035A 00292.21160463 .00001227 00000-0 32957-3 0 1304
+2 25791 24.9833 269.3878 0011141 176.2888 183.7705 14.39646543 69445
+FUSE 1
+1 25791U 99035A 00290.96382404 .00001125 00000-0 29744-3 0 2033
+2 25791 24.9839 277.0093 0011248 162.9629 197.1281 14.39643362 69263
+FUSE 1
+1 25791U 99035A 00289.92400452 .00001005 00000-0 25962-3 0 1697
+2 25791 24.9842 283.3623 0011271 152.1446 207.9673 14.39640561 69117
+FUSE 1
+1 25791U 99035A 00288.88418235 .00000939 00000-0 23889-3 0 1296
+2 25791 24.9839 289.7161 0011345 141.9406 218.1903 14.39638291 68963
+FUSE 1
+1 25791U 99035A 00286.94317390 .00000937 00000-0 23849-3 0 2050
+2 25791 24.9842 301.5720 0011377 121.8967 238.2636 14.39635355 68688
+FUSE 1
+1 25791U 99035A 00284.93283722 .00000946 00000-0 24124-3 0 1290
+2 25791 24.9844 313.8517 0011349 101.4953 258.6830 14.39632282 68394
+FUSE 1
+1 25791U 99035A 00283.82368229 .00001113 00000-0 29370-3 0 2356
+2 25791 24.9845 320.6276 0011360 90.5778 269.6031 14.39631230 68239
+FUSE 1
+1 25791U 99035A 00281.18943126 .00001671 00000-0 46933-3 0 1271
+2 25791 24.9838 336.7203 0011242 63.6820 296.4846 14.39626315 67854
+FUSE 1
+1 25791U 99035A 00279.87230155 .00001498 00000-0 41495-3 0 1843
+2 25791 24.9836 344.7657 0011284 49.9927 310.1569 14.39621506 67667
+FUSE 1
+1 25791U 99035A 00278.13922732 .00001349 00000-0 36829-3 0 1266
+2 25791 24.9841 355.3497 0011217 31.6026 328.5162 14.39615977 67417
+FUSE 1
+1 25791U 99035A 00275.92088045 +.00001249 +00000-0 +33679-3 0 02260
+2 25791 024.9846 008.8984 0011149 008.1796 351.8898 14.39610187067097
+FUSE 1
+1 25791U 99035A 00274.88102724 +.00001183 +00000-0 +31605-3 0 01932
+2 25791 024.9847 015.2496 0011092 357.4607 002.5840 14.39607485066943
+FUSE 1
+1 25791U 99035A 00273.91049603 +.00001143 +00000-0 +30335-3 0 01587
+2 25791 024.9849 021.1778 0011061 347.4078 012.6154 14.39605252066806
+FUSE 1
+1 25791U 99035A 00272.87063947 .00001058 00000-0 27682-3 0 1258
+2 25791 24.9850 27.5285 0010951 336.1587 23.8412 14.39602697 66652
+FUSE 1
+1 25791U 99035A 00271.90010587 +.00000952 +00000-0 +24332-3 0 02019
+2 25791 024.9849 033.4553 0010904 326.2752 033.7061 14.39600291066519
+FUSE 1
+1 25791U 99035A 00270.86024700 +.00000806 +00000-0 +19727-3 0 01755
+2 25791 024.9848 039.8050 0010873 315.4400 044.5233 14.39597817066368
+FUSE 1
+1 25791U 99035A 00269.95903493 +.00000698 +00000-0 +16343-3 0 01422
+2 25791 024.9847 045.3098 0010847 305.7600 054.1897 14.39596109066238
+FUSE 1
+1 25791U 99035A 00269.19647060 .00000662 00000-0 15206-3 0 1241
+2 25791 24.9847 49.9681 0010790 297.8206 62.1208 14.39595085 66121
+FUSE 1
+1 25791U 99035A 00265.93823791 +.00000839 +00000-0 +20769-3 0 01602
+2 25791 024.9853 069.8642 0010925 262.8653 097.0612 14.39592139065654
+FUSE 1
+1 25791U 99035A 00264.89837713 .00000866 00000-0 21632-3 0 1234
+2 25791 24.9853 76.2157 0010914 251.7893 108.1424 14.39590766 65501
+FUSE 1
+1 25791U 99035A 00263.85851584 +.00000759 +00000-0 +18267-3 0 02468
+2 25791 024.9844 082.5656 0011036 240.7792 119.1611 14.39588783065356
+FUSE 1
+1 25791U 99035A 00262.95730211 +.00000987 +00000-0 +25418-3 0 02190
+2 25791 024.9843 088.0698 0011108 231.2492 128.7025 14.39588229065220
+FUSE 1
+1 25791U 99035A 00261.91744362 +.00000854 +00000-0 +21237-3 0 01903
+2 25791 024.9840 094.4417 0011199 219.5461 140.4230 14.39586929065079
+FUSE 1
+1 25791U 99035A 00260.94690555 +.00000874 +00000-0 +21887-3 0 01496
+2 25791 024.9839 100.3694 0011196 209.3232 150.6648 14.39585857064930
+FUSE 1
+1 25791U 99035A 00260.60028428 .00000895 00000-0 22526-3 0 1228
+2 25791 24.9838 102.4866 0011182 205.8154 154.1794 14.39585645 64882
+FUSE 1
+1 25791U 99035A 00257.89664249 +.00000980 +00000-0 +25207-3 0 01574
+2 25791 024.9797 119.0147 0011228 178.5341 181.5202 14.39582285064499
+FUSE 1
+1 25791U 99035A 00256.92610205 +.00001007 +00000-0 +26048-3 0 01317
+2 25791 024.9796 124.9428 0011260 168.6067 191.4699 14.39580956064354
+FUSE 1
+1 25791U 99035A 00256.57948045 .00001009 00000-0 26113-3 0 1218
+2 25791 24.9796 127.0600 0011258 164.9452 195.1394 14.39580392 64306
+FUSE 1
+1 25791U 99035A 00255.95556083 +.00001022 +00000-0 +26540-3 0 02272
+2 25791 024.9796 130.8705 0011304 158.5484 201.5503 14.39579482064212
+FUSE 1
+1 25791U 99035A 00254.91569423 +.00001012 +00000-0 +26236-3 0 01998
+2 25791 024.9795 137.2214 0011318 147.7697 212.3506 14.39577628064064
+FUSE 1
+1 25791U 99035A 00253.94515052 +.00000993 +00000-0 +25614-3 0 01704
+2 25791 024.9796 143.1491 0011353 137.8454 222.2931 14.39575858063927
+FUSE 1
+1 25791U 99035A 00252.90528132 +.00000931 +00000-0 +23692-3 0 01337
+2 25791 024.9802 149.5025 0011353 127.3223 232.8322 14.39573664063773
+FUSE 1
+1 25791U 99035A 00252.21203297 .00000929 00000-0 23624-3 0 1201
+2 25791 24.9802 153.7367 0011354 120.2792 239.8836 14.39572606 63674
+FUSE 1
+1 25791U 99035A 00250.96418540 +.00000820 +00000-0 +20171-3 0 02317
+2 25791 024.9813 161.3571 0011231 106.6703 253.5039 14.39569924063499
+FUSE 1
+1 25791U 99035A 00249.92430983 +.00000751 +00000-0 +18005-3 0 01973
+2 25791 024.9819 167.7098 0011202 095.9335 264.2451 14.39568010063344
+FUSE 1
+1 25791U 99035A 00248.95375648 +.00000728 +00000-0 +17305-3 0 01641
+2 25791 024.9822 173.6380 0011200 085.7277 274.4508 14.39566715063209
+FUSE 1
+1 25791U 99035A 00247.98320188 +.00000685 +00000-0 +15936-3 0 01204
+2 25791 024.9827 179.5664 0011177 075.4057 284.7689 14.39565289063062
+FUSE 1
+1 25791U 99035A 00247.91387641 .00000685 00000-0 15938-3 0 1194
+2 25791 24.9827 179.9897 0011176 74.6798 285.4945 14.39565219 63051
+FUSE 1
+1 25791U 99035A 00243.89298918 +.00000627 +00000-0 +14121-3 0 01217
+2 25791 024.9838 204.5495 0011279 032.6718 327.4493 14.39560964062474
+FUSE 1
+1 25791U 99035A 00243.54635985 .00000620 00000-0 13900-3 0 1181
+2 25791 24.9838 206.6661 0011299 29.0913 331.0222 14.39560578 62428
+FUSE 1
+1 25791U 99035A 00242.92242652 +.00000636 +00000-0 +14397-3 0 02524
+2 25791 024.9839 210.4766 0011308 022.5635 337.5375 14.39560193062331
+FUSE 1
+1 25791U 99035A 00241.95186248 +.00000663 +00000-0 +15237-3 0 02180
+2 25791 024.9839 216.4045 0011240 012.3907 347.6875 14.39559570062199
+FUSE 1
+1 25791U 99035A 00241.11995000 +.00000705 +00000-0 +16585-3 0 01905
+2 25791 024.9843 221.4849 0011230 004.1902 355.8697 14.39559225062072
+FUSE 1
+1 25791U 99035A 00240.14938556 +.00000715 +00000-0 +16878-3 0 01535
+2 25791 024.9843 227.4129 0011265 353.6646 006.3718 14.39558267061935
+FUSE 1
+1 25791U 99035A 00239.24814579 .00000768 00000-0 18562-3 0 1172
+2 25791 24.9851 232.9197 0011057 343.6898 16.3253 14.39557918 61800
+FUSE 1
+1 25791U 99035A 00237.16836108 +.00000937 +00000-0 +23867-3 0 01265
+2 25791 024.9852 245.6242 0010930 321.1150 038.8565 14.39556840061509
+FUSE 1
+1 25791U 99035A 00236.47509969 .00000981 00000-0 25253-3 0 1169
+2 25791 24.9852 249.8576 0010910 313.5211 46.4389 14.39556202 61406
+FUSE 1
+1 25791U 99035A 00236.12846894 +.00001006 +00000-0 +26041-3 0 02540
+2 25791 024.9853 251.9740 0010908 310.0331 049.9215 14.39555895061353
+FUSE 1
+1 25791U 99035A 00234.18733724 +.00001106 +00000-0 +29194-3 0 01914
+2 25791 024.9856 263.8291 0010929 289.3257 070.6065 14.39553537061071
+FUSE 1
+1 25791U 99035A 00233.97935917 +.00001108 +00000-0 +29254-3 0 01827
+2 25791 024.9855 265.0992 0010925 287.2111 072.7202 14.39553153061041
+FUSE 1
+1 25791U 99035A 00232.93946679 +.00001150 +00000-0 +30606-3 0 01414
+2 25791 024.9859 271.4505 0010949 275.8605 084.0653 14.39551685060899
+FUSE 1
+1 25791U 99035A 00232.24620540 .00001162 00000-0 30984-3 0 1157
+2 25791 24.9861 275.6842 0010947 268.2547 91.6703 14.39550498 60791
+FUSE 1
+1 25791U 99035A 00230.85968265 +.00001168 +00000-0 +31152-3 0 01841
+2 25791 024.9861 284.1498 0010908 253.3956 106.5351 14.39547810060596
+FUSE 1
+1 25791U 99035A 00229.88911656 +.00001173 +00000-0 +31324-3 0 01650
+2 25791 024.9862 290.0753 0010918 243.1432 116.7994 14.39545953060451
+FUSE 1
+1 25791U 99035A 00228.84922713 +.00001681 +00000-0 +47341-3 0 01392
+2 25791 024.9833 296.4467 0010541 233.3366 126.6176 14.39544754060304
+FUSE 1
+1 25791U 99035A 00228.22529183 .00001437 00000-0 39642-3 0 1145
+2 25791 24.9839 300.2597 0010660 226.7882 133.1742 14.39542247 60216
+FUSE 1
+1 25791U 99035A 00227.87866114 +.00001204 +00000-0 +32286-3 0 01748
+2 25791 024.9843 302.3743 0010672 222.4107 137.5583 14.39540549060161
+FUSE 1
+1 25791U 99035A 00226.90809209 +.00001066 +00000-0 +27935-3 0 01531
+2 25791 024.9844 308.3015 0010818 212.0864 147.8990 14.39538035060025
+FUSE 1
+1 25791U 99035A 00225.86819636 +.00000875 +00000-0 +21927-3 0 01240
+2 25791 024.9839 314.6498 0010966 200.7238 159.2827 14.39535222059879
+FUSE 1
+1 25791U 99035A 00225.59089041 .00000839 00000-0 20809-3 0 1135
+2 25791 24.9841 316.3434 0010990 198.0059 162.0059 14.39534638 59833
+FUSE 1
+1 25791U 99035A 00222.88715209 +.00000729 +00000-0 +17338-3 0 01575
+2 25791 024.9839 332.8560 0011113 170.5138 189.5580 14.39530485059440
+FUSE 1
+1 25791U 99035A 00221.91657699 +.00000732 +00000-0 +17430-3 0 01315
+2 25791 024.9840 338.7844 0011141 160.6691 199.4239 14.39529454059307
+FUSE 1
+1 25791U 99035A 00221.15398144 .00000741 00000-0 17714-3 0 1122
+2 25791 24.9839 343.4418 0011158 152.7937 207.3154 14.39528689 59199
+FUSE 1
+1 25791U 99035A 00219.90609556 +.00000787 +00000-0 +19148-3 0 01712
+2 25791 024.9839 351.0626 0011186 140.1583 219.9740 14.39527697059013
+FUSE 1
+1 25791U 99035A 00218.93551634 +.00000842 +00000-0 +20903-3 0 01383
+2 25791 024.9842 356.9905 0011221 130.2195 229.9294 14.39527076058879
+FUSE 1
+1 25791U 99035A 00218.24224392 .00000911 00000-0 23076-3 0 1117
+2 25791 24.9837 1.2239 0011126 122.7808 237.3779 14.39526803 58771
+FUSE 1
+1 25791U 99035A 00216.92502528 +.00000994 +00000-0 +25698-3 0 01359
+2 25791 024.9840 009.2668 0011090 109.2022 250.9670 14.39525666058583
+FUSE 1
+1 25791U 99035A 00215.95444232 +.00001073 +00000-0 +28173-3 0 01224
+2 25791 024.9846 015.1947 0011165 099.5630 260.6137 14.39524901058446
+FUSE 1
+1 25791U 99035A 00215.19184019 .00001121 00000-0 29713-3 0 1106
+2 25791 24.9845 19.8506 0011155 91.5631 268.6149 14.39524011 58330
+FUSE 1
+1 25791U 99035A 00213.87461582 +.00001234 +00000-0 +33255-3 0 01563
+2 25791 024.9851 027.8945 0011173 078.5475 281.6282 14.39522670058145
+FUSE 1
+1 25791U 99035A 00212.90402845 +.00001276 +00000-0 +34584-3 0 01363
+2 25791 024.9853 033.8211 0011136 068.8066 291.3628 14.39521095058004
+FUSE 1
+1 25791U 99035A 00212.14142266 .00001313 00000-0 35764-3 0 1090
+2 25791 24.9850 38.4778 0011130 60.7162 299.4447 14.39519790 57895
+FUSE 1
+1 25791U 99035A 00209.92292793 +.00001396 +00000-0 +38383-3 0 01533
+2 25791 024.9849 052.0258 0011073 037.5021 322.6251 14.39515598057579
+FUSE 1
+1 25791U 99035A 00208.95233548 +.00001473 +00000-0 +40802-3 0 01252
+2 25791 024.9837 057.9580 0011424 026.9665 333.1435 14.39514058057430
+FUSE 1
+1 25791U 99035A 00208.18972549 .00001576 00000-0 44071-3 0 1085
+2 25791 24.9833 62.6176 0011472 18.7210 341.3716 14.39512347 57328
+FUSE 1
+1 25791U 99035A 00206.94181514 +.00001511 +00000-0 +42008-3 0 01921
+2 25791 024.9854 070.2405 0011038 006.6126 353.4533 14.39509278057141
+FUSE 1
+1 25791U 99035A 00205.97121710 +.00001487 +00000-0 +41266-3 0 01685
+2 25791 024.9852 076.1701 0011017 356.2364 003.8067 14.39506509057005
+FUSE 1
+1 25791U 99035A 00204.93128816 +.00001476 +00000-0 +40903-3 0 01386
+2 25791 024.9852 082.5219 0010972 345.2641 014.7546 14.39503741056855
+FUSE 1
+1 25791U 99035A 00203.96068597 +.00001638 +00000-0 +46010-3 0 01113
+2 25791 024.9851 088.4485 0010910 335.3315 024.6669 14.39501677056711
+FUSE 1
+1 25791U 99035A 00203.89135786 .00001602 00000-0 44873-3 0 1071
+2 25791 24.9852 88.8720 0010897 334.6954 25.3042 14.39501366 56700
+FUSE 1
+1 25791U 99035A 00201.95014789 +.00001572 +00000-0 +43936-3 0 01799
+2 25791 024.9852 100.7256 0010918 312.2678 047.6911 14.39496898056421
+FUSE 1
+1 25791U 99035A 00200.97954187 +.00001738 +00000-0 +49182-3 0 01451
+2 25791 024.9852 106.6535 0010962 301.6227 058.3210 14.39494751056288
+FUSE 1
+1 25791U 99035A 00199.93960649 +.00001805 +00000-0 +51300-3 0 01117
+2 25791 024.9853 113.0050 0010969 290.2578 069.6750 14.39491667056133
+FUSE 1
+1 25791U 99035A 00199.87027750 .00001803 00000-0 51229-3 0 1069
+2 25791 24.9852 113.4283 0010971 289.5399 70.3926 14.39491421 56120
+FUSE 1
+1 25791U 99035A 00198.96900068 +.00001318 +00000-0 +35923-3 0 01266
+2 25791 024.9850 118.9330 0011332 279.9281 079.9947 14.39486512055993
+FUSE 1
+1 25791U 99035A 00198.20638092 .00001053 00000-0 27558-3 0 1056
+2 25791 24.9852 123.5922 0011255 271.8947 88.0275 14.39483842 55884
+FUSE 1
+1 25791U 99035A 00195.91851583 .00000689 00000-0 16100-3 0 1047
+2 25791 24.9847 137.5630 0011254 247.8427 112.0894 14.39478555 55558
+FUSE 1
+1 25791U 99035A 00194.94790513 +.00000622 +00000-0 +13965-3 0 02217
+2 25791 024.9845 143.4897 0011244 237.8927 122.0496 14.39476756055415
+FUSE 1
+1 25791U 99035A 00193.97729403 +.00000584 +00000-0 +12775-3 0 01820
+2 25791 024.9847 149.4236 0011293 228.1708 131.7837 14.39475391055278
+FUSE 1
+1 25791U 99035A 00192.93735201 +.00000550 +00000-0 +11684-3 0 01414
+2 25791 024.9846 155.7737 0011308 217.3578 142.6152 14.39474212055121
+FUSE 1
+1 25791U 99035A 00191.96673850 +.00000542 +00000-0 +11437-3 0 01065
+2 25791 024.9844 161.7002 0011295 207.2529 152.7388 14.39473399054981
+FUSE 1
+1 25791U 99035A 00191.89740911 .00000540 00000-0 11391-3 0 1034
+2 25791 24.9843 162.1235 0011294 206.5071 153.4866 14.39473330 54979
+FUSE 1
+1 25791U 99035A 00188.91623713 +.00000545 +00000-0 +11536-3 0 01387
+2 25791 024.9846 180.3280 0011401 175.5058 184.5555 14.39471262054549
+FUSE 1
+1 25791U 99035A 00187.94562172 +.00000562 +00000-0 +12095-3 0 01032
+2 25791 024.9848 186.2545 0011434 165.3569 194.7270 14.39470796054403
+FUSE 1
+1 25791U 99035A 00187.87629207 .00000562 00000-0 12095-3 0 1026
+2 25791 24.9848 186.6777 0011434 164.6313 195.4544 14.39470742 54394
+FUSE 1
+1 25791U 99035A 00183.57784536 .00000667 00000-0 15416-3 0 1011
+2 25791 24.9855 212.9320 0011413 120.5817 239.5821 14.39468389 53779
+FUSE 1
+1 25791U 99035A 00181.91392783 +.00000671 +00000-0 +15546-3 0 01789
+2 25791 024.9854 223.1058 0011337 102.1276 258.0499 14.39467140053535
+FUSE 1
+1 25791U 99035A 00180.87397553 +.00000700 +00000-0 +16442-3 0 01445
+2 25791 024.9852 229.4559 0011322 091.4012 268.7791 14.39466353053381
+FUSE 1
+1 25791U 99035A 00179.97268238 +.00000726 +00000-0 +17280-3 0 01057
+2 25791 024.9855 234.9604 0011315 082.3086 277.8702 14.39465677053255
+FUSE 1
+1 25791U 99035A 00179.55670036 .00000742 00000-0 17762-3 0 1002
+2 25791 24.9855 237.5004 0011277 78.2476 281.9296 14.39465389 53199
+FUSE 1
+1 25791U 99035A 00178.86339700 +.00000752 +00000-0 +18089-3 0 02381
+2 25791 024.9856 241.7337 0011290 070.9195 289.2531 14.39464704053090
+FUSE 1
+1 25791U 99035A 00177.89277115 +.00000766 +00000-0 +18548-3 0 02031
+2 25791 024.9859 247.6607 0011289 060.8540 299.3095 14.39463739052956
+FUSE 1
+1 25791U 99035A 00176.92214342 +.00000800 +00000-0 +19601-3 0 01665
+2 25791 024.9859 253.5881 0011190 051.0927 309.0575 14.39462915052810
+FUSE 1
+1 25791U 99035A 00175.88218431 +.00000816 +00000-0 +20117-3 0 01315
+2 25791 024.9862 259.9387 0011137 040.3293 319.8037 14.39461801052661
+FUSE 1
+1 25791U 99035A 00175.25820859 .00000821 00000-0 20275-3 0 993
+2 25791 24.9863 263.7490 0011148 33.8548 326.2678 14.39461054 52575
+FUSE 1
+1 25791U 99035A 00173.87159264 +.00000872 +00000-0 +21895-3 0 01978
+2 25791 024.9863 272.2156 0011038 020.3739 339.7205 14.39459774052379
+FUSE 1
+1 25791U 99035A 00172.90096122 +.00000862 +00000-0 +21562-3 0 01592
+2 25791 024.9869 278.1422 0011016 010.0480 350.0243 14.39458368052232
+FUSE 1
+1 25791U 99035A 00171.93032817 +.00000868 +00000-0 +21744-3 0 01290
+2 25791 024.9870 284.0679 0010950 359.6225 000.4272 14.39457116052091
+FUSE 1
+1 25791U 99035A 00170.95969467 +.00000873 +00000-0 +21901-3 0 01001
+2 25791 024.9872 289.9957 0010930 349.1807 010.8463 14.39455848051955
+FUSE 1
+1 25791U 99035A 00170.89036360 .00000875 00000-0 21983-3 0 989
+2 25791 24.9872 290.4190 0010916 348.4366 11.5890 14.39455786 51949
+FUSE 1
+1 25791U 99035A 00167.83979740 +.00000834 +00000-0 +20689-3 0 01244
+2 25791 024.9865 309.0441 0011049 315.9144 044.0481 14.39451106051509
+FUSE 1
+1 25791U 99035A 00166.93849291 +.00000817 +00000-0 +20146-3 0 00991
+2 25791 024.9866 314.5466 0011043 306.5008 053.4481 14.39449711051375
+FUSE 1
+1 25791U 99035A 00166.86916175 .00000816 00000-0 20127-3 0 975
+2 25791 24.9867 314.9701 0011045 305.7696 54.1782 14.39449617 51364
+FUSE 1
+1 25791U 99035A 00165.89852612 +.00001393 +00000-0 +38331-3 0 01420
+2 25791 024.9880 320.9003 0010529 293.0245 066.9309 14.39451820051226
+FUSE 1
+1 25791U 99035A 00164.92788963 +.00001058 +00000-0 +27751-3 0 01130
+2 25791 024.9900 326.8234 0010700 286.6900 073.2425 14.39448463051080
+FUSE 1
+1 25791U 99035A 00164.58123317 .00001414 00000-0 39006-3 0 960
+2 25791 24.9895 328.9405 0010608 283.0060 76.9260 14.39449353 51032
+FUSE 1
+1 25791U 99035A 00163.88792360 +.00001009 +00000-0 +26201-3 0 01988
+2 25791 024.9902 333.1737 0010422 276.0922 083.8398 14.39446429050938
+FUSE 1
+1 25791U 99035A 00162.91728936 +.00000838 +00000-0 +20810-3 0 01731
+2 25791 024.9924 339.1014 0009907 267.6684 092.2688 14.39444419050790
+FUSE
+1 25791U 99035A 00160.90668101 .00000585 00000-0 12820-3 0 1084
+2 25791 24.9857 351.3806 0010965 243.0464 116.8920 14.39441160 50501
+FUSE
+1 25791U 99035A 00159.93604429 .00000520 00000-0 10769-3 0 2088
+2 25791 24.9857 357.3078 0010932 232.6720 127.2791 14.39439999 50364
+FUSE
+1 25791U 99035A 00158.89607500 .00000535 00000-0 11232-3 0 1828
+2 25791 24.9859 3.6563 0011010 221.7464 138.2204 14.39439406 50216
+FUSE
+1 25791U 99035A 00157.92543755 .00000593 00000-0 13055-3 0 1551
+2 25791 24.9862 9.5835 0010973 212.1855 147.7986 14.39438945 50075
+FUSE
+1 25791U 99035A 00156.95479994 .00000684 00000-0 15953-3 0 1220
+2 25791 24.9855 15.5108 0010936 202.2301 157.7734 14.39438339 49934
+FUSE
+1 25791U 99035A 00153.90422121 .00000864 00000-0 21631-3 0 1165
+2 25791 24.9865 34.1388 0011133 170.3555 189.7168 14.39436079 49494
+FUSE
+1 25791U 99035A 00152.93358165 .00000892 00000-0 22526-3 0 1001
+2 25791 24.9870 40.0657 0011211 160.4686 199.6263 14.39435106 49358
+FUSE
+1 25791U 99035A 00151.96294208 .00000727 00000-0 17304-3 0 1612
+2 25791 24.9867 45.9944 0011211 149.4582 210.6578 14.39433226 49218
+FUSE 1
+1 25791U 99035A 00150.92296786 +.00000783 +00000-0 +19073-3 0 01460
+2 25791 024.9865 052.3453 0011336 140.3401 219.7938 14.39432403049060
+FUSE 1
+1 25791U 99035A 00149.95232539 +.00000829 +00000-0 +20521-3 0 01198
+2 25791 024.9864 058.2759 0011314 130.9449 229.2035 14.39431340048923
+FUSE 1
+1 25791U 99035A 00148.91235042 .00001108 00000-0 29356-3 0 921
+2 25791 24.9862 64.6309 0011392 119.2869 240.8777 14.39431427 48776
+FUSE 1
+1 25791U 99035A 00146.97105909 +.00001049 +00000-0 +27490-3 0 01217
+2 25791 024.9860 076.4928 0011034 100.1008 260.0730 14.39427312048499
+FUSE 1
+1 25791U 99035A 00145.93107729 +.00001195 +00000-0 +32101-3 0 01053
+2 25791 024.9858 082.8448 0010906 089.5878 270.5877 14.39425983048340
+FUSE 1
+1 25791U 99035A 00144.96042610 +.00001210 +00000-0 +32585-3 0 00943
+2 25791 024.9858 088.7713 0010797 079.6238 280.5487 14.39424047048201
+FUSE 1
+1 25791U 99035A 00144.89109336 .00001242 00000-0 33587-3 0 919
+2 25791 24.9856 89.1955 0010755 78.9603 281.2108 14.39424127 48199
+FUSE 1
+1 25791U 99035A 00143.92043990 +.00001286 +00000-0 +34981-3 0 01362
+2 25791 024.9853 095.1215 0010661 068.9516 291.2131 14.39422329048054
+FUSE 1
+1 25791U 99035A 00142.94978508 +.00001390 +00000-0 +38255-3 0 01224
+2 25791 024.9849 101.0495 0010673 058.3816 301.7746 14.39420789047916
+FUSE 1
+1 25791U 99035A 00141.97912863 +.00001410 +00000-0 +38914-3 0 01076
+2 25791 024.9848 106.9769 0010693 048.0107 312.1315 14.39418518047773
+FUSE 1
+1 25791U 99035A 00140.31514173 .00001395 00000-0 38437-3 0 908
+2 25791 24.9846 117.1387 0010720 30.1996 329.9129 14.39414225 47534
+FUSE 1
+1 25791U 99035A 00139.96847802 +.00001336 +00000-0 +36555-3 0 01225
+2 25791 024.9846 119.2585 0010753 026.5593 333.5472 14.39413031047485
+FUSE 1
+1 25791U 99035A 00138.30448417 +.00000986 +00000-0 +25496-3 0 01032
+2 25791 024.9849 129.4190 0010807 008.4590 351.6103 14.39408079047241
+FUSE 1
+1 25791U 99035A 00138.16581799 +.00000917 +00000-0 +23330-3 0 00989
+2 25791 024.9852 130.2683 0010800 006.3941 353.6704 14.39407532047222
+FUSE 1
+1 25791U 99035A 00137.33381884 .00000891 00000-0 22495-3 0 892
+2 25791 24.9849 135.3478 0010942 358.1038 1.9431 14.39406114 47100
+FUSE 1
+1 25791U 99035A 00137.12581947 +.00000782 +00000-0 +19067-3 0 01443
+2 25791 024.9853 136.6194 0010936 354.9891 005.0518 14.39405165047070
+FUSE 1
+1 25791U 99035A 00136.15515183 +.00000717 +00000-0 +17007-3 0 01309
+2 25791 024.9856 142.5472 0011025 344.6838 015.3341 14.39403617046937
+FUSE 1
+1 25791U 99035A 00135.11514942 +.00000688 +00000-0 +16101-3 0 01150
+2 25791 024.9856 148.8977 0011074 333.6712 026.3233 14.39402271046789
+FUSE 1
+1 25791U 99035A 00134.14447983 +.00000686 +00000-0 +16024-3 0 01019
+2 25791 024.9858 154.8255 0011141 323.3354 036.6390 14.39401238046645
+FUSE 1
+1 25791U 99035A 00133.24314397 .00000697 00000-0 16371-3 0 882
+2 25791 24.9859 160.3315 0011225 313.9280 46.0306 14.39400350 46513
+FUSE 1
+1 25791U 99035A 00132.13380598 +.00000799 +00000-0 +19602-3 0 01249
+2 25791 024.9855 167.1074 0011235 302.2916 057.6506 14.39399858046356
+FUSE 1
+1 25791U 99035A 00130.46979970 +.00000876 +00000-0 +22019-3 0 01108
+2 25791 024.9854 177.2667 0011205 284.7991 075.1274 14.39398379046117
+FUSE 1
+1 25791U 99035A 00129.42979604 +.00000935 +00000-0 +23904-3 0 00958
+2 25791 024.9855 183.6177 0011214 273.6439 086.2789 14.39397418045968
+FUSE 1
+1 25791U 99035A 00129.22179542 .00000943 00000-0 24155-3 0 878
+2 25791 24.9857 184.8897 0011260 271.3687 88.5531 14.39397203 45932
+FUSE 1
+1 25791U 99035A 00124.57644568 .00001168 00000-0 31255-3 0 864
+2 25791 24.9853 213.2548 0011424 222.2133 137.7495 14.39390992 45261
+FUSE 1
+1 25791U 99035A 00123.60577526 +.00001181 +00000-0 +31680-3 0 01291
+2 25791 024.9854 219.1824 0011455 212.1770 147.8041 14.39389176045129
+FUSE 1
+1 25791U 99035A 00122.63510361 +.00001231 +00000-0 +33248-3 0 01161
+2 25791 024.9854 225.1097 0011461 201.9716 158.0303 14.39387621044982
+FUSE 1
+1 25791U 99035A 00121.66443151 +.00001251 +00000-0 +33895-3 0 01031
+2 25791 024.9854 231.0388 0011524 192.1664 167.8570 14.39385753044847
+FUSE 1
+1 25791U 99035A 00120.69375881 +.00001261 +00000-0 +34204-3 0 00919
+2 25791 024.9855 236.9674 0011466 182.0966 177.9496 14.39383716044709
+FUSE 1
+1 25791U 99035A 00120.55509156 .00001252 00000-0 33924-3 0 859
+2 25791 24.9857 237.8165 0011446 180.8748 179.1742 14.39383343 44689
+FUSE 1
+1 25791U 99035A 00118.68307534 +.00001268 +00000-0 +34428-3 0 01247
+2 25791 024.9853 249.2479 0011337 161.2641 198.8291 14.39379290044418
+FUSE 1
+1 25791U 99035A 00117.71239774 +.00001285 +00000-0 +34957-3 0 01099
+2 25791 024.9854 255.1775 0011271 151.1573 208.9557 14.39377287044279
+FUSE 1
+1 25791U 99035A 00116.74171833 +.00001334 +00000-0 +36531-3 0 00984
+2 25791 024.9851 261.1035 0011286 140.4017 219.7326 14.39375466044138
+FUSE 1
+1 25791U 99035A 00115.77103748 .00001336 00000-0 36589-3 0 846
+2 25791 24.9850 267.0332 0011164 130.0444 230.1046 14.39373163 43997
+FUSE 1
+1 25791U 99035A 00114.80035556 +.00001323 +00000-0 +36184-3 0 01051
+2 25791 024.9850 272.9636 0011139 118.8594 241.3037 14.39370701043855
+FUSE 1
+1 25791U 99035A 00113.48299633 +.00001343 +00000-0 +36805-3 0 00918
+2 25791 024.9847 281.0129 0011026 104.5281 255.6449 14.39367716043665
+FUSE 1
+1 25791U 99035A 00112.58164220 +.00001325 +00000-0 +36244-3 0 00895
+2 25791 024.9847 286.5147 0010991 094.9470 265.2284 14.39365442043531
+FUSE 1
+1 25791U 99035A 00111.61095147 .00001385 00000-0 38153-3 0 830
+2 25791 24.9843 292.4418 0011151 84.3852 275.7943 14.39363622 43390
+FUSE 1
+1 25791U 99035A 00110.57092100 +.00001565 +00000-0 +43855-3 0 00880
+2 25791 024.9834 298.7936 0011325 073.8814 286.2937 14.39362514043241
+FUSE 1
+1 25791U 99035A 00108.62952641 +.00001728 +00000-0 +49007-3 0 00851
+2 25791 024.9828 310.6444 0011254 054.3518 305.8020 14.39358127042962
+FUSE 1
+1 25791U 99035A 00107.93616998 +.00001752 +00000-0 +49756-3 0 00843
+2 25791 024.9826 314.8766 0011241 047.0226 313.1227 14.39356131042867
+FUSE 1
+1 25791U 99035A 00107.86683435 .00001753 00000-0 49803-3 0 827
+2 25791 24.9827 315.3009 0011242 46.2771 313.8667 14.39355927 42857
+FUSE 1
+1 25791U 99035A 00105.85608578 .00002056 00000-0 59388-3 0 814
+2 25791 24.9817 327.5892 0010873 23.0273 337.0569 14.39351807 42560
+FUSE 1
+1 25791U 99035A 00104.67736936 +.00002243 +00000-0 +65292-3 0 00823
+2 25791 024.9813 334.7843 0010911 011.3549 348.7002 14.39348712042394
+FUSE 1
+1 25791U 99035A 00103.91467118 +.00002381 +00000-0 +69669-3 0 00816
+2 25791 024.9810 339.4400 0010675 002.0282 358.0252 14.39346695042287
+FUSE 1
+1 25791U 99035A 00103.01329876 +.00002405 +00000-0 +70441-3 0 01194
+2 25791 024.9809 344.9404 0010670 352.8750 007.1606 14.39342875042158
+FUSE 1
+1 25791U 99035A 00101.97324977 +.00002555 +00000-0 +75197-3 0 01137
+2 25791 024.9805 351.2909 0010643 342.0641 017.9481 14.39339226042005
+FUSE 1
+1 25791U 99035A 00101.07187295 +.00002583 +00000-0 +76093-3 0 01124
+2 25791 024.9805 356.7922 0010619 332.7422 027.2531 14.39335099041874
+FUSE 1
+1 25791U 99035A 00100.10115731 +.00002671 +00000-0 +78880-3 0 00968
+2 25791 024.9799 002.7214 0010593 322.7422 037.2356 14.39330819041734
+FUSE 1
+1 25791U 99035A 00099.13043908 .00002590 00000-0 76309-3 0 799
+2 25791 24.9798 8.6538 0010792 311.2745 48.6840 14.39325505 41593
+FUSE 1
+1 25791U 99035A 00098.09037990 +.00002445 +00000-0 +71735-3 0 00851
+2 25791 024.9802 015.0028 0010995 299.5824 060.3584 14.39319881041446
+FUSE 1
+1 25791U 99035A 00097.11965747 +.00002329 +00000-0 +68059-3 0 00815
+2 25791 024.9804 020.9278 0010970 289.9717 069.9613 14.39314724041301
+FUSE 1
+1 25791U 99035A 00096.14893064 +.00002270 +00000-0 +66193-3 0 00877
+2 25791 024.9807 026.8527 0011076 279.9873 079.9390 14.39310047041167
+FUSE 1
+1 25791U 99035A 00095.17820409 +.00002063 +00000-0 +59661-3 0 00795
+2 25791 024.9813 032.7786 0011255 270.8469 089.0777 14.39304208041025
+FUSE 1
+1 25791U 99035A 00094.20747091 .00001992 00000-0 57410-3 0 771
+2 25791 24.9816 38.7034 0011419 261.0932 98.8284 14.39299966 40887
+FUSE 1
+1 25791U 99035A 00092.19666424 .00001729 00000-0 49103-3 0 764
+2 25791 24.9822 50.9810 0011573 241.7849 118.1493 14.39290662 40595
+FUSE 1
+1 25791U 99035A 00090.18584768 +.00001549 +00000-0 +43389-3 0 00794
+2 25791 024.9830 063.2550 0011512 221.2878 138.6763 14.39283008040302
+FUSE 1
+1 25791U 99035A 00089.28444503 .00001459 00000-0 40539-3 0 755
+2 25791 24.9832 68.7566 0011380 211.8222 148.1602 14.39279719 40179
+FUSE 1
+1 25791U 99035A 00088.31370039 +.00001360 +00000-0 +37404-3 0 00961
+2 25791 024.9836 074.6816 0011423 202.4456 157.5555 14.39276438040031
+FUSE 1
+1 25791U 99035A 00088.03634565 +.00001304 +00000-0 +35643-3 0 00913
+2 25791 024.9839 076.3760 0011454 200.2734 159.7366 14.39275277039997
+FUSE 1
+1 25791U 99035A 00087.20427617 +.00001254 +00000-0 +34072-3 0 00840
+2 25791 024.9841 081.4558 0011382 191.8207 168.2033 14.39272923039870
+FUSE 1
+1 25791U 99035A 00086.23352802 .00001203 00000-0 32440-3 0 745
+2 25791 24.9842 87.3815 0011279 181.4280 178.6196 14.39270365 39731
+FUSE 1
+1 25791U 99035A 00084.22268757 +.00001077 +00000-0 +28473-3 0 00961
+2 25791 024.9845 099.6586 0011009 160.1136 199.9804 14.39265143039448
+FUSE 1
+1 25791U 99035A 00083.18259301 +.00001067 +00000-0 +28137-3 0 00832
+2 25791 024.9846 106.0081 0010977 149.2929 210.8223 14.39263170039292
+FUSE 1
+1 25791U 99035A 00082.21183569 .00001096 00000-0 29069-3 0 733
+2 25791 24.9846 111.9346 0010974 139.3047 220.8279 14.39261692 39153
+FUSE 1
+1 25791U 99035A 00081.17173683 +.00001160 +00000-0 +31097-3 0 01011
+2 25791 024.9843 118.2860 0010946 128.6797 231.4693 14.39260290039008
+FUSE 1
+1 25791U 99035A 00080.20097578 +.00001213 +00000-0 +32794-3 0 00880
+2 25791 024.9841 124.2128 0010923 118.8383 241.3214 14.39258856038864
+FUSE 1
+1 25791U 99035A 00079.23021298 .00001324 00000-0 36292-3 0 720
+2 25791 24.9837 130.1398 0010979 108.5196 251.6496 14.39257774 38722
+FUSE 1
+1 25791U 99035A 00077.21934109 +.00001513 +00000-0 +42309-3 0 00861
+2 25791 024.9829 142.4172 0010838 088.8266 271.3475 14.39254631038434
+FUSE 1
+1 25791U 99035A 00075.55516719 .00001577 00000-0 44314-3 0 711
+2 25791 24.9825 152.5756 0010789 71.5815 288.5864 14.39250628 38191
+FUSE 1
+1 25791U 99035A 00073.61362244 +.00001623 +00000-0 +45792-3 0 01149
+2 25791 024.9823 164.4274 0010664 051.3108 308.8354 14.39245491037910
+FUSE 1
+1 25791U 99035A 00072.64284711 +.00001597 +00000-0 +44979-3 0 01015
+2 25791 024.9825 170.3543 0010564 040.8844 319.2456 14.39242488037772
+FUSE 1
+1 25791U 99035A 00071.67206979 +.00001573 +00000-0 +44222-3 0 00864
+2 25791 024.9826 176.2815 0010546 030.4691 329.6435 14.39239518037632
+FUSE 1
+1 25791U 99035A 00070.56260671 .00001532 00000-0 42912-3 0 702
+2 25791 24.9828 183.0544 0010529 18.3343 341.7543 14.39236091 37479
+FUSE 1
+1 25791U 99035A 00068.69038219 +.00001413 +00000-0 +39162-3 0 00952
+2 25791 024.9834 194.4830 0010533 358.2154 001.8316 14.39230155037209
+FUSE 1
+1 25791U 99035A 00067.71959612 +.00001335 +00000-0 +36691-3 0 00815
+2 25791 024.9838 200.4095 0010552 347.4671 012.5574 14.39227138037065
+FUSE 1
+1 25791U 99035A 00066.74880810 .00001316 00000-0 36063-3 0 698
+2 25791 24.9838 206.3364 0010621 337.4200 22.5842 14.39224685 36920
+FUSE 1
+1 25791U 99035A 00065.77801832 +.00001263 +00000-0 +34378-3 0 00998
+2 25791 024.9841 212.2629 0010676 326.5841 033.3993 14.39222062036782
+FUSE 1
+1 25791U 99035A 00064.80722849 +.00001189 +00000-0 +32036-3 0 00830
+2 25791 024.9845 218.1911 0010778 316.3193 043.6474 14.39219324036645
+FUSE 1
+1 25791U 99035A 00063.76709448 +.00001101 +00000-0 +29240-3 0 00718
+2 25791 024.9849 224.5412 0010871 305.4534 054.4961 14.39216487036499
+FUSE 1
+1 25791U 99035A 00063.55906739 .00001088 00000-0 28832-3 0 683
+2 25791 24.9850 225.8120 0010913 303.1719 56.7740 14.39215991 36464
+FUSE 1
+1 25791U 99035A 00061.82550819 +.00000982 +00000-0 +25477-3 0 00960
+2 25791 024.9855 236.3933 0010864 286.6270 073.3045 14.39211998036219
+FUSE 1
+1 25791U 99035A 00060.85471378 +.00000901 +00000-0 +22923-3 0 00845
+2 25791 024.9863 242.3201 0010848 276.7178 083.2098 14.39209859036077
+FUSE 1
+1 25791U 99035A 00059.88391871 .00000826 00000-0 20540-3 0 675
+2 25791 24.9869 248.2490 0010930 267.1229 92.8030 14.39207865 35932
+FUSE 1
+1 25791U 99035A 00058.91312284 +.00000781 +00000-0 +19097-3 0 00977
+2 25791 024.9873 254.1768 0010925 257.3125 102.6165 14.39206249035799
+FUSE 1
+1 25791U 99035A 00057.94232639 +.00000728 +00000-0 +17411-3 0 00816
+2 25791 024.9875 260.1056 0011055 247.8021 112.1316 14.39204614035655
+FUSE 1
+1 25791U 99035A 00056.62481384 +.00000758 +00000-0 +18375-3 0 00670
+2 25791 024.9875 268.1502 0011129 234.2119 125.7313 14.39203424035463
+FUSE 1
+1 25791U 99035A 00055.86204329 .00000793 00000-0 19497-3 0 661
+2 25791 24.9873 272.8046 0011161 226.1863 133.7679 14.39202825 35354
+FUSE 1
+1 25791U 99035A 00054.68321769 +.00000848 +00000-0 +21235-3 0 01001
+2 25791 024.9871 279.9967 0011112 213.5611 146.4207 14.39201763035188
+FUSE 1
+1 25791U 99035A 00053.98979045 +.00000850 +00000-0 +21296-3 0 00974
+2 25791 024.9870 284.2284 0011076 206.2727 153.7221 14.39200822035085
+FUSE 1
+1 25791U 99035A 00053.01899083 +.00000935 +00000-0 +24004-3 0 00830
+2 25791 024.9867 290.1552 0011204 196.3192 163.6959 14.39200205034940
+FUSE 1
+1 25791U 99035A 00052.04819115 +.00000994 +00000-0 +25875-3 0 00719
+2 25791 024.9868 296.0811 0011283 186.4833 173.5531 14.39199236034805
+FUSE 1
+1 25791U 99035A 00051.90950592 .00000987 00000-0 25647-3 0 650
+2 25791 24.9870 296.9294 0011270 185.1807 174.8586 14.39198964 34783
+FUSE 1
+1 25791U 99035A 00048.85841520 .00001297 00000-0 35475-3 0 644
+2 25791 24.9866 315.5528 0011618 154.5181 205.5896 14.39195818 34340
+FUSE 1
+1 25791U 99035A 00048.09564157 +.00001343 +00000-0 +36946-3 0 01229
+2 25791 024.9864 320.2075 0011655 146.8674 213.2566 14.39194413034238
+FUSE 1
+1 25791U 99035A 00047.12483713 +.00001391 +00000-0 +38482-3 0 01095
+2 25791 024.9864 326.1324 0011683 137.2771 222.8642 14.39192494034095
+FUSE 1
+1 25791U 99035A 00046.15403192 +.00001360 +00000-0 +37483-3 0 00949
+2 25791 024.9866 332.0573 0011665 127.2938 232.8638 14.39189972033950
+FUSE 1
+1 25791U 99035A 00045.18322419 +.00001296 +00000-0 +35475-3 0 00793
+2 25791 024.9869 337.9835 0011586 117.6016 242.5669 14.39187410033812
+FUSE 1
+1 25791U 99035A 00044.21241546 .00001146 00000-0 30690-3 0 638
+2 25791 24.9869 343.9091 0011473 107.1762 253.0006 14.39184536 33672
+FUSE 1
+1 25791U 99035A 00042.20144618 +.00000911 +00000-0 +23237-3 0 00758
+2 25791 024.9867 356.1818 0011249 085.1954 274.9841 14.39179242033387
+FUSE 1
+1 25791U 99035A 00041.92407140 .00000833 00000-0 20764-3 0 629
+2 25791 24.9866 357.8759 0011123 81.8578 278.3201 14.39178018 33348
+FUSE 1
+1 25791U 99035A 00041.16128579 +.00000812 +00000-0 +20105-3 0 01066
+2 25791 024.9865 002.5305 0011143 073.4503 286.7237 14.39176773033231
+FUSE 1
+1 25791U 99035A 00040.19046659 +.00000730 +00000-0 +17515-3 0 00919
+2 25791 024.9864 008.4561 0011054 062.5359 297.6273 14.39174760033097
+FUSE 1
+1 25791U 99035A 00038.31816651 .00000622 00000-0 14075-3 0 612
+2 25791 24.9860 19.8837 0010946 41.9661 318.1684 14.39171741 32822
+FUSE 1
+1 25791U 99035A 00035.19765343 +.00000599 +00000-0 +13337-3 0 00754
+2 25791 024.9862 038.9297 0010966 008.7816 351.2878 14.39168833032372
+FUSE 1
+1 25791U 99035A 00034.22682512 .00000609 00000-0 13670-3 0 609
+2 25791 24.9863 44.8546 0010985 358.5324 1.5150 14.39168123 32232
+FUSE 1
+1 25791U 99035A 00033.18665576 +.00000568 +00000-0 +12356-3 0 01126
+2 25791 024.9855 051.2265 0011261 347.2812 012.7409 14.39167162032084
+FUSE 1
+1 25791U 99035A 00032.21582678 +.00000591 +00000-0 +13078-3 0 00970
+2 25791 024.9855 057.1532 0011294 337.1761 022.8245 14.39166555031942
+FUSE 1
+1 25791U 99035A 00031.17565214 +.00000642 +00000-0 +14694-3 0 00805
+2 25791 024.9852 063.5033 0011303 326.2800 033.6988 14.39166094031795
+FUSE 1
+1 25791U 99035A 00030.20482266 +.00000686 +00000-0 +16093-3 0 00659
+2 25791 024.9850 069.4311 0011343 315.6598 044.3015 14.39165560031659
+FUSE 1
+1 25791U 99035A 00029.44202816 .00000689 00000-0 16196-3 0 594
+2 25791 24.9849 74.0872 0011363 307.3743 52.5733 14.39164796 31549
+FUSE 1
+1 25791U 99035A 00027.43102888 .00000569 00000-0 18032-3 0 586
+2 25791 24.9851 86.3260 0010521 286.4177 73.5622 14.39162573 31251
+FUSE 1
+1 25791U 99035A 00025.55871179 .00000869 00000-0 21924-3 0 579
+2 25791 24.9844 97.7947 0011481 266.0116 93.9082 14.39161817 30989
+FUSE 1
+1 25791U 99035A 00023.61705451 +.00000924 +00000-0 +23647-3 0 00872
+2 25791 024.9842 109.6465 0011662 245.5194 114.4098 14.39159561030703
+FUSE 1
+1 25791U 99035A 00022.57688135 +.00000962 +00000-0 +24873-3 0 00723
+2 25791 024.9839 115.9974 0011736 234.7227 125.2184 14.39158302030554
+FUSE 1
+1 25791U 99035A 00022.29950177 +.00001003 +00000-0 +26163-3 0 00619
+2 25791 024.9838 117.6930 0011736 231.8231 128.1224 14.39158246030517
+FUSE 1
+1 25791U 99035A 00021.53670825 .00000998 00000-0 26013-3 0 564
+2 25791 24.9840 122.3487 0011792 223.8474 136.1104 14.39156968 30405
+FUSE 1
+1 25791U 99035A 00020.42719000 +.00000962 +00000-0 +24860-3 0 00907
+2 25791 024.9842 129.1211 0011913 212.6223 147.3555 14.39154882030249
+FUSE 1
+1 25791U 99035A 00019.66439581 +.00000966 +00000-0 +24995-3 0 00839
+2 25791 024.9840 133.7768 0011844 204.5957 155.3985 14.39153669030138
+FUSE 1
+1 25791U 99035A 00018.62422196 +.00000928 +00000-0 +23794-3 0 00696
+2 25791 024.9842 140.1276 0011782 194.0350 165.9832 14.39151690029988
+FUSE 1
+1 25791U 99035A 00017.44535596 .00000854 00000-0 21447-3 0 550
+2 25791 24.9848 147.3221 0011810 182.6957 177.3499 14.39149382 29814
+FUSE 1
+1 25791U 99035A 00014.53285856 .00000615 00000-0 13854-3 0 545
+2 25791 24.9856 165.1015 0011407 153.4049 206.7053 14.39143679 29391
+FUSE 1
+1 25791U 99035A 00013.56202232 +.00000571 +00000-0 +12445-3 0 00786
+2 25791 024.9857 171.0254 0011318 143.0152 217.1149 14.39142418029251
+FUSE 1
+1 25791U 99035A 00012.72987589 +.00000562 +00000-0 +12183-3 0 00732
+2 25791 024.9854 176.1050 0011284 133.7108 226.4334 14.39141611029137
+FUSE 1
+1 25791U 99035A 00011.62034564 +.00000527 +00000-0 +11055-3 0 00633
+2 25791 024.9855 182.8750 0011249 121.8036 238.3572 14.39140431028974
+FUSE 1
+1 25791U 99035A 00010.71885112 +.00000512 +00000-0 +10577-3 0 00569
+2 25791 024.9854 188.3761 0011274 111.8566 248.3147 14.39139621028845
+FUSE 1
+1 25791U 99035A 00009.88670072 .00000501 00000-0 10250-3 0 535
+2 25791 24.9854 193.4536 0011262 103.0112 257.1659 14.39138969 28726
+FUSE 1
+1 25791U 99035A 00006.83547797 .00000337 00000-0 10675-3 0 521
+2 25791 24.9869 212.0479 0011133 74.0467 286.1742 14.39136665 28280
+FUSE 1
+1 25791U 99035A 00005.93397487 +.00000522 +00000-0 +10899-3 0 00546
+2 25791 024.9856 217.5808 0011349 060.5895 299.5747 14.39136473028152
+FUSE 1
+1 25791U 99035A 00005.86462875 .00000520 00000-0 10857-3 0 511
+2 25791 24.9857 218.0047 0011344 59.7788 300.3845 14.39136413 28143
+FUSE 1
+1 25791U 99035A 00004.96312675 +.00000518 +00000-0 +10767-3 0 01139
+2 25791 024.9860 223.5077 0011297 050.2547 309.8954 14.39135812028010
+FUSE 1
+1 25791U 99035A 00003.99227761 +.00000520 +00000-0 +10842-3 0 00981
+2 25791 024.9861 229.4342 0011263 039.8658 320.2678 14.39135178027878
+FUSE 1
+1 25791U 99035A 00003.02142715 +.00000562 +00000-0 +12179-3 0 00835
+2 25791 024.9860 235.3606 0011286 029.7368 330.3779 14.39134850027732
+FUSE 1
+1 25791U 99035A 00001.98122961 +.00000601 +00000-0 +13433-3 0 00657
+2 25791 024.9860 241.7105 0011303 018.8712 341.2214 14.39134376027580
+FUSE 1
+1 25791U 99035A 00001.01037721 .00000666 00000-0 15478-3 0 506
+2 25791 24.9859 247.6366 0011281 8.7106 351.3596 14.39134101 27448
+FUSE 1
+1 25791U 99035A 99363.09781835 .00000899 00000-0 22901-3 0 490
+2 25791 24.9851 265.4129 0011197 338.4602 21.5436 14.39132626 27028
+FUSE 1
+1 25791U 99035A 99362.12696497 +.00000961 +00000-0 +24848-3 0 00922
+2 25791 024.9849 271.3386 0011184 327.9746 032.0084 14.39131724026881
+FUSE 1
+1 25791U 99035A 99361.15611130 +.00001034 +00000-0 +27194-3 0 00799
+2 25791 024.9846 277.2653 0011182 317.4471 042.5171 14.39130801026740
+FUSE 1
+1 25791U 99035A 99360.11591130 +.00001087 +00000-0 +28861-3 0 00623
+2 25791 024.9844 283.6152 0011205 306.4053 053.5421 14.39129438026590
+FUSE 1
+1 25791U 99035A 99359.14505772 .00001123 00000-0 30012-3 0 487
+2 25791 24.9844 289.5405 0011210 296.0081 63.9276 14.39127971 26455
+FUSE 1
+1 25791U 99035A 99357.20334989 +.00001185 +00000-0 +31974-3 0 00927
+2 25791 024.9845 301.3934 0011276 275.1736 084.7487 14.39124778026179
+FUSE 1
+1 25791U 99035A 99355.19229507 +.00001143 +00000-0 +30633-3 0 00589
+2 25791 024.9845 313.6688 0011427 254.6519 105.2727 14.39120370025887
+FUSE 1
+1 25791U 99035A 99354.91490853 .00001110 00000-0 29599-3 0 473
+2 25791 24.9845 315.3629 0011470 251.8385 108.0875 14.39119513 25847
+FUSE 1
+1 25791U 99035A 99354.15209340 +.00001101 +00000-0 +29307-3 0 01038
+2 25791 024.9845 320.0181 0011509 244.1536 115.7785 14.39117975025732
+FUSE 1
+1 25791U 99035A 99353.18123792 +.00001083 +00000-0 +28726-3 0 00881
+2 25791 024.9845 325.9428 0011452 234.1361 125.8092 14.39115978025590
+FUSE 1
+1 25791U 99035A 99352.21038154 +.00001042 +00000-0 +27447-3 0 00762
+2 25791 024.9843 331.8688 0011469 224.5539 135.4048 14.39113821025458
+FUSE 1
+1 25791U 99035A 99351.17017792 +.00000973 +00000-0 +25237-3 0 00577
+2 25791 024.9847 338.2189 0011485 214.2213 145.7558 14.39111421025300
+FUSE 1
+1 25791U 99035A 99350.33801333 .00000951 00000-0 24529-3 0 463
+2 25791 24.9846 343.2967 0011487 205.5729 154.4211 14.39109889 25180
+FUSE 1
+1 25791U 99035A 99350.19931958 +.00000933 +00000-0 +23956-3 0 00962
+2 25791 024.9848 344.1445 0011512 204.4239 155.5731 14.39109519025163
+FUSE 1
+1 25791U 99035A 99348.39629426 +.00000823 +00000-0 +20475-3 0 00865
+2 25791 024.9849 355.1452 0011441 185.7566 174.2811 14.39105974024908
+FUSE 1
+1 25791U 99035A 99348.18825288 +.00000798 +00000-0 +19683-3 0 00787
+2 25791 024.9851 356.4159 0011443 183.9954 176.0469 14.39105492024872
+FUSE 1
+1 25791U 99035A 99347.21739099 +.00000760 +00000-0 +18478-3 0 00593
+2 25791 024.9852 002.3410 0011413 174.2811 185.7832 14.39103915024736
+FUSE 1
+1 25791U 99035A 99346.24652782 .00000754 00000-0 18291-3 0 459
+2 25791 24.9852 8.2668 0011377 164.2548 195.8318 14.39102692 24597
+FUSE 1
+1 25791U 99035A 99344.23544964 +.00000756 +00000-0 +18345-3 0 00821
+2 25791 024.9851 020.5393 0011315 143.9081 216.2195 14.39100353024308
+FUSE 1
+1 25791U 99035A 99343.19523523 +.00000758 +00000-0 +18405-3 0 00642
+2 25791 024.9849 026.8884 0011251 133.1541 226.9914 14.39099103024150
+FUSE 1
+1 25791U 99035A 99342.15501899 +.00000788 +00000-0 +19383-3 0 00479
+2 25791 024.9847 033.2384 0011205 122.0799 238.0799 14.39098132024006
+FUSE 1
+1 25791U 99035A 99341.53088842 .00000788 00000-0 19382-3 0 444
+2 25791 24.9847 37.0461 0011204 115.5981 244.5688 14.39097368 23911
+FUSE 1
+1 25791U 99035A 99341.18414898 +.00000797 +00000-0 +19666-3 0 00927
+2 25791 024.9845 039.1646 0011110 111.9666 248.2014 14.39096976023865
+FUSE 1
+1 25791U 99035A 99340.21327751 +.00000821 +00000-0 +20422-3 0 00796
+2 25791 024.9844 045.0894 0011092 101.8687 258.3063 14.39095956023723
+FUSE 1
+1 25791U 99035A 99339.24240445 +.00000860 +00000-0 +21656-3 0 00626
+2 25791 024.9842 051.0146 0011088 091.5490 268.6286 14.39094994023586
+FUSE 1
+1 25791U 99035A 99337.57804728 +.00000910 +00000-0 +23264-3 0 00454
+2 25791 024.9838 061.1710 0011103 073.9223 286.2502 14.39093024023340
+FUSE 1
+1 25791U 99035A 99337.50869901 .00000916 00000-0 23465-3 0 438
+2 25791 24.9838 61.5940 0011123 73.3216 286.8513 14.39092988 23332
+FUSE 1
+1 25791U 99035A 99336.53782164 +.00000978 +00000-0 +25413-3 0 00775
+2 25791 024.9835 067.5184 0011185 063.0696 297.0953 14.39091962023198
+FUSE 1
+1 25791U 99035A 99335.91368480 +.00001057 +00000-0 +27938-3 0 00668
+2 25791 024.9832 071.3272 0011211 056.4491 303.7082 14.39091557023104
+FUSE 1
+1 25791U 99035A 99334.66541084 +.00001103 +00000-0 +29413-3 0 00563
+2 25791 024.9829 078.9441 0011175 043.3897 316.7490 14.39089668022921
+FUSE 1
+1 25791U 99035A 99333.55583168 .00001182 00000-0 31912-3 0 428
+2 25791 24.9828 85.7150 0011228 31.8546 328.2638 14.39088163 22768
+FUSE 1
+1 25791U 99035A 99332.72364624 +.00001252 +00000-0 +34147-3 0 00926
+2 25791 024.9822 090.7928 0011318 023.1121 336.9895 14.39086934022646
+FUSE 1
+1 25791U 99035A 99330.71252915 +.00001370 +00000-0 +37884-3 0 00621
+2 25791 024.9815 103.0720 0011456 002.2762 357.7803 14.39083149022351
+FUSE 1
+1 25791U 99035A 99330.01903979 +.00001341 +00000-0 +36977-3 0 00515
+2 25791 024.9813 107.3056 0011522 355.0936 004.9469 14.39081189022254
+FUSE 1
+1 25791U 99035A 99329.53359692 .00001309 00000-0 35954-3 0 414
+2 25791 24.9818 110.2720 0011533 349.7266 10.3016 14.39079811 22188
+FUSE 1
+1 25791U 99035A 99328.00791539 +.00001217 +00000-0 +33021-3 0 00742
+2 25791 024.9820 119.5846 0011565 334.1745 025.8190 14.39075614021963
+FUSE 1
+1 25791U 99035A 99326.82897714 +.00001154 +00000-0 +31024-3 0 00585
+2 25791 024.9826 126.7842 0011751 321.2678 038.6990 14.39072676021790
+FUSE 1
+1 25791U 99035A 99325.51133788 .00001054 00000-0 27855-3 0 401
+2 25791 24.9847 134.8467 0011912 304.6034 55.3277 14.39069633 21609
+FUSE 1
+1 25791U 99035A 99322.80670431 +.00001256 +00000-0 +34276-3 0 00411
+2 25791 024.9836 151.3552 0012041 275.3401 084.5737 14.39066077021213
+FUSE 1
+1 25791U 99035A 99321.62776187 +.00001252 +00000-0 +34139-3 0 00408
+2 25791 024.9837 158.5475 0012055 262.9443 096.9715 14.39063501021043
+FUSE 1
+1 25791U 99035A 99320.79556237 .00001252 00000-0 34144-3 0 391
+2 25791 24.9836 163.6246 0012002 254.4359 105.4616 14.39061664 20929
+FUSE 1
+1 25791U 99035A 99318.99247388 +.00001603 +00000-0 +45300-3 0 00424
+2 25791 024.9830 174.6225 0011785 234.5772 125.3639 14.39059706020668
+FUSE 1
+1 25791U 99035A 99318.85377493 .00001636 00000-0 46351-3 0 388
+2 25791 24.9833 175.4706 0011739 232.8226 127.1216 14.39059600 20640
+FUSE 1
+1 25791U 99035A 99316.98133499 .00000949 00000-0 24506-3 0 379
+2 25791 24.9842 186.9003 0011834 213.5350 146.4412 14.39050830 20375
+FUSE 1
+1 25791U 99035A 99316.77328072 .00000093 00000-0 -27298-4 0 361
+2 25791 24.9851 188.1733 0012103 214.4787 145.4516 14.39045117 20346
+FUSE 1
+1 25791U 99035A 99316.01043130 .00001289 00000-0 35317-3 0 353
+2 25791 24.9823 192.8263 0011574 206.8856 153.1047 14.39050776 20238
+FUSE 1
+1 25791U 99035A 99314.06863125 +.00000807 +00000-0 +19978-3 0 00675
+2 25791 024.9828 204.6728 0011620 187.0114 173.0230 14.39045484019952
+FUSE 1
+1 25791U 99035A 99313.09772812 +.00000806 +00000-0 +19960-3 0 00668
+2 25791 024.9828 210.5953 0011621 176.8561 183.2018 14.39044261019815
+FUSE 1
+1 25791U 99035A 99312.12682443 +.00000807 +00000-0 +20004-3 0 00607
+2 25791 024.9830 216.5187 0011630 166.7136 193.3684 14.39043064019674
+FUSE 1
+1 25791U 99035A 99311.08656905 +.00000824 +00000-0 +20537-3 0 00492
+2 25791 024.9827 222.8664 0011566 156.1383 203.9662 14.39041822019523
+FUSE 1
+1 25791U 99035A 99310.11566272 .00000873 00000-0 22108-3 0 346
+2 25791 24.9823 228.7931 0011439 146.3502 213.7733 14.39040863 19380
+FUSE 1
+1 25791U 99035A 99309.14475480 +.00000912 +00000-0 +23325-3 0 00624
+2 25791 024.9823 234.7169 0011382 136.4568 223.6834 14.39039788019240
+FUSE 1
+1 25791U 99035A 99308.17384628 +.00000917 +00000-0 +23509-3 0 00594
+2 25791 024.9823 240.6396 0011384 126.3110 233.8450 14.39038400019103
+FUSE 1
+1 25791U 99035A 99307.20293604 +.00000929 +00000-0 +23900-3 0 00509
+2 25791 024.9824 246.5634 0011348 116.2606 243.9068 14.39037064018967
+FUSE 1
+1 25791U 99035A 99306.16267374 +.00000901 +00000-0 +22981-3 0 00427
+2 25791 024.9827 252.9105 0011294 105.3472 254.8283 14.39035306018815
+FUSE 1
+1 25791U 99035A 99305.26111145 .00000880 00000-0 22322-3 0 336
+2 25791 24.9828 258.4108 0011278 95.9573 264.2230 14.39033878 18682
+FUSE 1
+1 25791U 99035A 99302.14030694 +.00000777 +00000-0 +19052-3 0 00420
+2 25791 024.9830 277.4546 0011155 063.6998 296.4659 14.39029030018237
+FUSE 1
+1 25791U 99035A 99301.23873747 .00000793 00000-0 19553-3 0 326
+2 25791 24.9829 282.9548 0011144 54.1449 306.0093 14.39027991 18102
+FUSE 1
+1 25791U 99035A 99300.19846426 +.00000688 +00000-0 +16220-3 0 00785
+2 25791 024.9829 289.3031 0011097 042.8698 317.2674 14.39026119017959
+FUSE 1
+1 25791U 99035A 99299.15818884 +.00000714 +00000-0 +17059-3 0 00607
+2 25791 024.9835 295.6560 0010854 031.9536 328.1631 14.39025229017802
+FUSE 1
+1 25791U 99035A 99298.11791199 +.00000847 +00000-0 +21277-3 0 00447
+2 25791 024.9832 302.0031 0010894 020.7345 339.3596 14.39024199017655
+FUSE 1
+1 25791U 99035A 99297.21633808 .00000871 00000-0 22050-3 0 312
+2 25791 24.9833 307.5043 0010887 10.9937 349.0810 14.39022966 17522
+FUSE 1
+1 25791U 99035A 99295.27448293 +.00000936 +00000-0 +24130-3 0 00647
+2 25791 024.9834 319.3563 0010756 350.0772 009.9521 14.39020654017243
+FUSE 1
+1 25791U 99035A 99294.16484983 +.00001000 +00000-0 +26157-3 0 00453
+2 25791 024.9829 326.1256 0010800 338.5647 021.4408 14.39019299017082
+FUSE 1
+1 25791U 99035A 99293.19392082 .00001020 00000-0 26791-3 0 303
+2 25791 24.9828 332.0506 0010781 328.4327 31.5533 14.39017852 16944
+FUSE 1
+1 25791U 99035A 99292.77780736 +.00001020 +00000-0 +26806-3 0 00883
+2 25791 024.9827 334.5890 0010781 324.0963 035.8778 14.39017148016883
+FUSE 1
+1 25791U 99035A 99292.15363794 +.00001076 +00000-0 +28568-3 0 00761
+2 25791 024.9826 338.3998 0010857 316.4441 043.5205 14.39016547016796
+FUSE 1
+1 25791U 99035A 99291.18270908 +.00001062 +00000-0 +28130-3 0 00587
+2 25791 024.9822 344.3280 0011053 306.1106 053.8378 14.39014543016650
+FUSE 1
+1 25791U 99035A 99289.51825652 +.00001008 +00000-0 +26405-3 0 00430
+2 25791 024.9823 354.4815 0011076 288.6058 071.3246 14.39011177016415
+FUSE 1
+1 25791U 99035A 99288.47797288 .00000951 00000-0 24613-3 0 296
+2 25791 24.9826 0.8275 0011076 277.4591 82.4657 14.39009052 16269
+FUSE 1
+1 25791U 99035A 99286.88287063 +.00000861 +00000-0 +21717-3 0 00634
+2 25791 024.9828 010.5602 0011200 260.5300 099.3940 14.39005892016038
+FUSE 1
+1 25791U 99035A 99285.49582403 +.00000795 +00000-0 +19630-3 0 00486
+2 25791 024.9830 019.0217 0011238 246.2842 113.6491 14.39003480015839
+FUSE 1
+1 25791U 99035A 99284.66359563 +.00000761 +00000-0 +18552-3 0 00398
+2 25791 024.9832 024.0989 0011221 237.5271 122.4154 14.39002187015718
+FUSE 1
+1 25791U 99035A 99283.97007305 .00000754 00000-0 18327-3 0 285
+2 25791 24.9830 28.3293 0011217 230.2490 129.7115 14.39001280 15618
+FUSE 1
+1 25791U 99035A 99280.71050717 +.00000608 +00000-0 +13659-3 0 00426
+2 25791 024.9832 048.2231 0011233 196.9935 163.0195 14.38996802015142
+FUSE 1
+1 25791U 99035A 99280.01698155 +.00000604 +00000-0 +13553-3 0 00286
+2 25791 024.9831 052.4539 0011244 189.6758 170.3528 14.38996155015044
+FUSE 1
+1 25791U 99035A 99279.73957122 .00000606 00000-0 13609-3 0 278
+2 25791 24.9833 54.1486 0011318 187.2744 172.7600 14.38995976 15000
+FUSE 1
+1 25791U 99035A 99278.76863587 +.00000623 +00000-0 +14143-3 0 00780
+2 25791 024.9828 060.0769 0011243 177.0793 182.9783 14.38995168014863
+FUSE 1
+1 25791U 99035A 99278.07510995 +.00000624 +00000-0 +14185-3 0 00637
+2 25791 024.9826 064.3088 0011169 169.6029 190.4711 14.38994496014765
+FUSE 1
+1 25791U 99035A 99276.75740903 +.00000633 +00000-0 +14460-3 0 00461
+2 25791 024.9823 072.3487 0011129 155.6892 204.4141 14.38993316014575
+FUSE 1
+1 25791U 99035A 99276.47999801 +.00000694 +00000-0 +16404-3 0 00358
+2 25791 024.9818 074.0450 0011207 153.0078 207.1024 14.38993598014531
+FUSE 1
+1 25791U 99035A 99275.57841241 .00000671 00000-0 15672-3 0 263
+2 25791 24.9819 79.5451 0011185 143.2379 216.8904 14.38992466 14406
+FUSE 1
+1 25791U 99035A 99272.59623714 +.00000619 +00000-0 +14032-3 0 00288
+2 25791 024.9821 097.7456 0010986 112.1476 248.0207 14.38989140013976
+FUSE 1
+1 25791U 99035A 99271.83335507 +.00000694 +00000-0 +16423-3 0 00261
+2 25791 024.9829 102.4180 0011115 105.0840 255.0961 14.38989289013860
+FUSE 1
+1 25791U 99035A 99270.93176357 .00000625 00000-0 14212-3 0 254
+2 25791 24.9833 107.9206 0010968 96.2277 263.9501 14.38987831 13739
+FUSE 1
+1 25791U 99035A 99269.82210754 +.00000624 +00000-0 +14194-3 0 00270
+2 25791 024.9836 114.6962 0010511 085.3632 274.8041 14.38987014013579
+FUSE 1
+1 25791U 99035A 99268.64310209 +.00000665 +00000-0 +15491-3 0 00260
+2 25791 024.9835 121.8881 0010538 073.0440 287.1349 14.38986259013408
+FUSE 1
+1 25791U 99035A 99267.88021393 +.00000624 +00000-0 +14182-3 0 00258
+2 25791 024.9836 126.5415 0010795 065.0791 295.0869 14.38985118013294
+FUSE 1
+1 25791U 99035A 99266.90926343 .00000583 00000-0 12888-3 0 243
+2 25791 24.9837 132.4642 0010750 54.8710 305.2813 14.38983972 13155
+FUSE 1
+1 25791U 99035A 99266.00766538 +.00000570 +00000-0 +12480-3 0 00561
+2 25791 024.9838 137.9635 0010739 045.4550 314.6838 14.38983153013021
+FUSE 1
+1 25791U 99035A 99265.03671293 +.00000579 +00000-0 +12751-3 0 00498
+2 25791 024.9838 143.8883 0010767 035.0894 325.0328 14.38982440012880
+FUSE 1
+1 25791U 99035A 99264.06575950 +.00000540 +00000-0 +11503-3 0 00439
+2 25791 024.9841 149.8130 0010718 024.5892 335.5124 14.38981393012743
+FUSE 1
+1 25791U 99035A 99263.09480512 +.00000542 +00000-0 +11581-3 0 00315
+2 25791 024.9841 155.7371 0010726 014.3641 345.7173 14.38980695012600
+FUSE 1
+1 25791U 99035A 99262.88674378 .00000509 00000-0 10546-3 0 230
+2 25791 24.9842 157.0081 0010731 11.7394 348.3365 14.38980270 12573
+FUSE 1
+1 25791U 99035A 99260.11258537 +.00000453 +00000-0 +87384-4 0 00502
+2 25791 024.9841 173.9362 0010893 342.6831 017.3307 14.38977970012170
+FUSE 1
+1 25791U 99035A 99259.07227521 +.00000447 +00000-0 +85573-4 0 00347
+2 25791 024.9841 180.2856 0010956 331.9610 028.0309 14.38977330012020
+FUSE 1
+1 25791U 99035A 99258.17067241 .00000427 00000-0 79225-4 0 220
+2 25791 24.9841 185.7874 0011007 322.1366 37.8369 14.38976734 11893
+FUSE 1
+1 25791U 99035A 99256.15940484 +.00000459 +00000-0 +89377-4 0 00465
+2 25791 024.9843 198.0620 0011104 300.6420 059.2997 14.38975981011608
+FUSE 1
+1 25791U 99035A 99255.18844792 +.00000499 +00000-0 +10205-3 0 00357
+2 25791 024.9841 203.9868 0011170 290.1305 069.8003 14.38975748011464
+FUSE 1
+1 25791U 99035A 99254.21749084 .00000578 00000-0 12715-3 0 219
+2 25791 24.9838 209.9117 0011276 279.5024 80.4212 14.38975778 11328
+FUSE 1
+1 25791U 99035A 99252.13687317 +.00000703 +00000-0 +16695-3 0 00422
+2 25791 024.9838 222.6085 0011253 257.6029 102.3226 14.38974995011027
+FUSE 1
+1 25791U 99035A 99251.16591877 +.00000740 +00000-0 +17891-3 0 00306
+2 25791 024.9838 228.5342 0011361 247.5654 112.3649 14.38974264010882
+FUSE 1
+1 25791U 99035A 99250.33367230 .00000790 00000-0 19473-3 0 200
+2 25791 24.9836 233.6120 0011410 238.7623 121.1773 14.38973707 10768
+FUSE 1
+1 25791U 99035A 99250.12561055 +.00000806 +00000-0 +20003-3 0 00780
+2 25791 024.9837 234.8822 0011380 236.5967 123.3441 14.38973616010736
+FUSE 1
+1 25791U 99035A 99249.22401093 +.00000850 +00000-0 +21378-3 0 00688
+2 25791 024.9836 240.3848 0011437 227.1228 132.8321 14.38972820010608
+FUSE 1
+1 25791U 99035A 99248.18370392 +.00000868 +00000-0 +21968-3 0 00504
+2 25791 024.9836 246.7339 0011442 216.3322 143.6406 14.38971553010453
+FUSE 1
+1 25791U 99035A 99247.14339628 +.00000893 +00000-0 +22765-3 0 00331
+2 25791 024.9835 253.0817 0011458 205.6866 154.3072 14.38970276010308
+FUSE 1
+1 25791U 99035A 99246.24179636 .00000875 00000-0 22203-3 0 193
+2 25791 24.9836 258.5836 0011512 196.4275 163.5862 14.38968832 10171
+FUSE 1
+1 25791U 99035A 99244.16117925 +.00000770 +00000-0 +18839-3 0 00526
+2 25791 024.9840 271.2810 0011478 175.5983 184.4632 14.38965078009876
+FUSE 1
+1 25791U 99035A 99243.25957613 +.00000746 +00000-0 +18082-3 0 00412
+2 25791 024.9841 276.7823 0011475 166.5838 193.4978 14.38963795009740
+FUSE 1
+1 25791U 99035A 99242.14991061 +.00000697 +00000-0 +16531-3 0 00214
+2 25791 024.9841 283.5545 0011425 155.0075 205.0993 14.38962068009589
+FUSE 1
+1 25791U 99035A 99241.45636787 .00000690 00000-0 16312-3 0 184
+2 25791 24.9841 287.7844 0011423 147.6480 212.4734 14.38961291 9483
+FUSE 1
+1 25791U 99035A 99238.54348289 +.00000555 +00000-0 +12005-3 0 00339
+2 25791 024.9851 305.5600 0011277 118.2109 241.9541 14.38957529009068
+FUSE 1
+1 25791U 99035A 99237.43380917 .00000519 00000-0 10841-3 0 178
+2 25791 24.9853 312.3322 0011217 106.6278 253.5464 14.38956402 8903
+FUSE 1
+1 25791U 99035A 99236.46284262 +.00000461 +00000-0 +90008-4 0 00705
+2 25791 024.9853 318.2560 0011086 096.8361 263.3410 14.38955295008762
+FUSE 1
+1 25791U 99035A 99236.25477872 +.00000452 +00000-0 +87040-4 0 00615
+2 25791 024.9853 319.5272 0011052 094.6665 265.5117 14.38955073008731
+FUSE 1
+1 25791U 99035A 99235.28381051 +.00000458 +00000-0 +89138-4 0 00470
+2 25791 024.9852 325.4528 0011033 084.2171 275.9597 14.38954552008598
+FUSE 1
+1 25791U 99035A 99233.61929130 +.00000451 +00000-0 +86895-4 0 00303
+2 25791 024.9853 335.6110 0010986 066.4129 293.7536 14.38953524008353
+FUSE 1
+1 25791U 99035A 99232.50961001 .00000368 00000-0 60512-4 0 162
+2 25791 24.9859 342.3821 0010848 54.6767 305.4755 14.38952340 8198
+FUSE 1
+1 25791U 99035A 99230.70637369 +.00000429 +00000-0 +79925-4 0 00424
+2 25791 024.9854 353.3830 0010964 035.3348 324.7888 14.38952031007934
+FUSE 1
+1 25791U 99035A 99229.59668927 +.00000395 +00000-0 +68969-4 0 00285
+2 25791 024.9857 000.1562 0010882 023.2043 336.8948 14.38951224007779
+FUSE 1
+1 25791U 99035A 99228.48700287 +.00000471 +00000-0 +93172-4 0 00221
+2 25791 024.9853 006.9252 0010851 011.6095 348.4667 14.38951260007619
+FUSE 1
+1 25791U 99035A 99227.72409421 .00000487 00000-0 98308-4 0 158
+2 25791 24.9851 11.5809 0010930 3.6815 356.3773 14.38950858 7502
+FUSE 1
+1 25791U 99035A 99223.56276789 .00000619 00000-0 14028-3 0 147
+2 25791 24.9842 36.9742 0011040 318.0438 41.9206 14.38948712 6903
+FUSE 1
+1 25791U 99035A 99218.63853449 .00000720 00000-0 17250-3 0 135
+2 25791 24.9828 67.0232 0011431 267.3032 92.6167 14.38944759 6193
+FUSE 1
+1 25791U 99035A 99216.97400544 +.00000683 +00000-0 +16063-3 0 00166
+2 25791 024.9829 077.1763 0011588 249.8240 110.1026 14.38942807005959
+FUSE 1
+1 25791U 99035A 99215.72561041 .00001104 00000-0 29513-3 0 127
+2 25791 24.9823 84.7905 0011295 237.0915 122.8597 14.38943232 5774
+FUSE 1
+1 25791U 99035A 99213.99172686 +.00000755 +00000-0 +18386-3 0 00281
+2 25791 024.9829 095.3690 0011291 219.0401 140.9295 14.38939332005520
+FUSE 1
+1 25791U 99035A 99213.02075147 +.00000641 +00000-0 +14744-3 0 00175
+2 25791 024.9830 101.2939 0011410 209.3286 150.6585 14.38937829005384
+FUSE 1
+1 25791U 99035A 99212.88204088 .00000581 00000-0 12826-3 0 112
+2 25791 24.9832 102.1415 0011463 208.2710 151.7177 14.38937383 5365
+FUSE 1
+1 25791U 99035A 99211.07879897 +.00000483 +00000-0 +96970-4 0 00493
+2 25791 024.9832 113.1440 0011683 189.9414 170.0864 14.38935491005102
+FUSE 1
+1 25791U 99035A 99210.10782220 +.00000457 +00000-0 +88695-4 0 00361
+2 25791 024.9830 119.0680 0011645 180.0206 180.0306 14.38934715004963
+FUSE 1
+1 25791U 99035A 99209.13684459 +.00000476 +00000-0 +94628-4 0 00215
+2 25791 024.9829 124.9914 0011669 170.0019 190.0732 14.38934254004820
+FUSE 1
+1 25791U 99035A 99208.85942248 .00000483 00000-0 96822-4 0 100
+2 25791 24.9830 126.6849 0011617 167.3014 192.7802 14.38934135 4785
+FUSE 1
+1 25791U 99035A 99208.16586648 +.00000509 +00000-0 +10534-3 0 00689
+2 25791 024.9829 130.9163 0011612 160.0034 200.0933 14.38933809004681
+FUSE 1
+1 25791U 99035A 99207.12553224 +.00000477 +00000-0 +95090-4 0 00537
+2 25791 024.9830 137.2648 0011506 149.5759 210.5420 14.38933010004534
+FUSE 1
+1 25791U 99035A 99206.15455295 +.00000436 +00000-0 +81952-4 0 00388
+2 25791 024.9831 143.1889 0011456 139.5200 220.6160 14.38932240004393
+FUSE 1
+1 25791U 99035A 99205.11421632 +.00000433 +00000-0 +81097-4 0 00221
+2 25791 024.9835 149.5359 0011411 129.0298 231.1227 14.38931694004248
+FUSE 1
+1 25791U 99035A 99204.21259024 .00000427 00000-0 79119-4 0 95
+2 25791 24.9835 155.0370 0011324 120.0292 240.1341 14.38931194 4119
+FUSE 1
+1 25791U 99035A 99203.17225182 +.00000414 +00000-0 +74992-4 0 00525
+2 25791 024.9835 161.3843 0011233 109.2556 250.9169 14.38930540003968
+FUSE 1
+1 25791U 99035A 99202.13191170 +.00000423 +00000-0 +77980-4 0 00383
+2 25791 024.9837 167.7323 0011168 098.4908 261.6865 14.38930164003818
+FUSE 1
+1 25791U 99035A 99201.16092631 +.00000440 +00000-0 +83410-4 0 00235
+2 25791 024.9837 173.6562 0011126 088.3941 271.7841 14.38929874003674
+FUSE 1
+1 25791U 99035A 99200.18994021 .00000454 00000-0 87696-4 0 88
+2 25791 24.9838 179.5806 0011119 78.2644 281.9107 14.38929532 3535
+FUSE 1
+1 25791U 99035A 99200.12059101 +.00000432 +00000-0 +80931-4 0 00725
+2 25791 024.9842 180.0407 0011095 075.8036 284.3701 14.38929430003528
+FUSE 1
+1 25791U 99035A 99199.21895964 +.00000465 +00000-0 +91252-4 0 00631
+2 25791 024.9840 185.5408 0011075 066.4980 293.6690 14.38929231003393
+FUSE 1
+1 25791U 99035A 99198.17861506 +.00000472 +00000-0 +93642-4 0 00475
+2 25791 024.9844 191.8880 0011017 055.5344 304.6202 14.38928745003245
+FUSE 1
+1 25791U 99035A 99197.20762573 +.00000483 +00000-0 +97242-4 0 00328
+2 25791 024.9845 197.8116 0010965 045.0350 315.1043 14.38928247003108
+FUSE 1
+1 25791U 99035A 99196.16727896 +.00000496 +00000-0 +10136-3 0 00130
+2 25791 024.9848 204.1584 0010927 033.8431 326.2770 14.38927757002952
+FUSE 1
+1 25791U 99035A 99195.40435724 .00000525 00000-0 11052-3 0 76
+2 25791 24.9845 208.8116 0010908 25.8212 334.2838 14.38927498 2842
+FUSE 1
+1 25791U 99035A 99195.26564445 +.00000515 +00000-0 +10744-3 0 00732
+2 25791 024.9847 209.6583 0010905 024.2058 335.8962 14.38927325002821
+FUSE 1
+1 25791U 99035A 99194.22529636 +.00000515 +00000-0 +10742-3 0 00547
+2 25791 024.9849 216.0045 0010895 012.9914 347.0873 14.38926634002672
+FUSE 1
+1 25791U 99035A 99193.18494715 +.00000545 +00000-0 +11704-3 0 00384
+2 25791 024.9850 222.3506 0010896 001.9128 358.1416 14.38926205002526
+FUSE 1
+1 25791U 99035A 99192.14459780 +.00000580 +00000-0 +12797-3 0 00193
+2 25791 024.9850 228.6966 0010908 350.8363 009.1951 14.38925741002370
+FUSE 1
+1 25791U 99035A 99191.24296126 .00000600 00000-0 13459-3 0 61
+2 25791 24.9852 234.1962 0010933 341.3306 18.6794 14.38925220 2248
+FUSE 1
+1 25791U 99035A 99189.57840234 +.00000688 +00000-0 +16244-3 0 00431
+2 25791 024.9847 244.3496 0011003 324.3520 035.6271 14.38924327002005
+FUSE 1
+1 25791U 99035A 99188.53805210 +.00000745 +00000-0 +18074-3 0 00304
+2 25791 024.9847 250.6956 0011082 313.4689 046.4896 14.38923665001857
+FUSE 1
+1 25791U 99035A 99187.56705911 +.00000776 +00000-0 +19053-3 0 00181
+2 25791 024.9847 256.6180 0011114 303.2228 056.7215 14.38922773001717
+FUSE 1
+1 25791U 99035A 99187.22027565 .00000809 00000-0 20103-3 0 57
+2 25791 24.9849 258.7334 0011145 299.6070 60.3328 14.38922625 1666
+FUSE 1
+1 25791U 99035A 99186.59606618 +.00000806 +00000-0 +20001-3 0 00658
+2 25791 024.9848 262.5402 0011144 293.0885 066.8449 14.38921812001577
+FUSE 1
+1 25791U 99035A 99185.55571694 +.00000781 +00000-0 +19209-3 0 00489
+2 25791 024.9850 268.8854 0011179 282.1384 077.7873 14.38920354001427
+FUSE 1
+1 25791U 99035A 99184.58472411 +.00000771 +00000-0 +18889-3 0 00356
+2 25791 024.9851 274.8074 0011210 272.0258 087.8967 14.38919111001282
+FUSE 1
+1 25791U 99035A 99183.61373101 +.00000806 +00000-0 +20014-3 0 00199
+2 25791 024.9851 280.7294 0011202 261.9284 097.9951 14.38918148001148
+FUSE
+1 25791U 99035A 99182.64273781 .00000831 00000-0 20827-3 0 48
+2 25791 24.9852 286.6514 0011228 251.8187 108.1089 14.38917064 1005
+FUSE
+1 25791U 99035A 99181.53303177 +.00000885 +00000-0 +22535-3 0 00326
+2 25791 024.9851 293.4193 0011207 240.2024 119.7372 14.38915842000848
+FUSE
+1 25791U 99035A 99180.42332586 +.00000769 +00000-0 +18844-3 0 00250
+2 25791 024.9851 300.1870 0011210 228.6224 131.3324 14.38913850000688
+FUSE
+1 25791U 99035A 99179.72975929 +.00000701 +00000-0 +16654-3 0 00225
+2 25791 024.9851 304.4168 0011211 221.3620 138.6046 14.38912818000589
+FUSE
+1 25791U 99035A 99178.68940879 +.00000540 +00000-0 +11515-3 0 00070
+2 25791 024.9851 310.7614 0011204 210.4757 149.5099 14.38911405000431
+FUSE
+1 25791U 99035A 99178.55069535 .00000518 00000-0 10814-3 0 39
+2 25791 24.9851 311.6073 0011204 209.0295 150.9590 14.38911233 410
+FUSE
+1 25791U 99035A 99177.92648488 +.00000082 +00000-0 -31136-4 0 00408
+2 25791 024.9853 315.4140 0011227 202.4549 157.5464 14.38909900000324
+FUSE
+1 25791U 99035A 99176.95549150 -.00001333 +00000-0 -48314-3 0 00075
+2 25791 024.9860 321.3361 0010962 190.9807 169.0438 14.38907601000185
diff --git a/src/cal/get_tle/tmp/FUSE.TLE.NEW b/src/cal/get_tle/tmp/FUSE.TLE.NEW
new file mode 100644
index 0000000..f70af2e
--- /dev/null
+++ b/src/cal/get_tle/tmp/FUSE.TLE.NEW
@@ -0,0 +1,15 @@
+FUSE 1
+1 25791U 99035A 03334.81529517 .00000629 00000-0 13611-3 0 73
+2 25791 24.9828 141.7372 0010396 237.2837 122.6662 14.41449325233814
+FUSE 1
+1 25791U 99035A 03332.32285756 .00000721 00000-0 16400-3 0 51
+2 25791 24.9827 157.0092 0010498 210.6638 149.3252 14.41447882233456
+FUSE 1
+1 25791U 99035A 03331.90745146 +.00000729 +00000-0 +16628-3 0 00081
+2 25791 024.9828 159.5554 0010553 206.5242 153.4727 14.41447542233393
+FUSE 1
+1 25791U 99035A 03331.14587356 .00000725 00000-0 16505-3 0 40
+2 25791 24.9828 164.2238 0010646 198.4715 161.5398 14.41446726233287
+FUSE 1
+1 25791U 99035A 03330.86893587 +.00000724 +00000-0 +16482-3 0 00069
+2 25791 024.9826 165.9208 0010698 195.8086 164.2086 14.41446474233249
diff --git a/src/cal/get_tle/tmp/FUSE.TLE.awf b/src/cal/get_tle/tmp/FUSE.TLE.awf
new file mode 100644
index 0000000..867ba5f
--- /dev/null
+++ b/src/cal/get_tle/tmp/FUSE.TLE.awf
@@ -0,0 +1,4419 @@
+FUSE 1
+1 25791U 99035A 03107.22964140 .00000487 00000-0 93318-4 0 8333
+2 25791 24.9837 95.9773 0010052 10.7357 349.3362 14.41316429200940
+FUSE 1
+1 25791U 99035A 03105.98329705 +.00000572 +00000-0 +11935-3 0 08346
+2 25791 024.9839 103.6091 0010055 357.5958 002.4500 14.41316519200765
+FUSE 1
+1 25791U 99035A 03105.42936709 .00000573 00000-0 11956-3 0 8325
+2 25791 24.9839 107.0005 0010053 351.7713 8.2628 14.41316090200681
+FUSE 1
+1 25791U 99035A 03104.39074737 .00000618 00000-0 13316-3 0 8315
+2 25791 24.9841 113.3600 0010076 341.0911 18.9221 14.41315709200539
+FUSE 1
+1 25791U 99035A 03103.83681675 +.00000642 +00000-0 +14053-3 0 08493
+2 25791 024.9841 116.7516 0010112 335.4399 024.5624 14.41315476200452
+FUSE 1
+1 25791U 99035A 03103.21364467 .00000672 00000-0 14956-3 0 8307
+2 25791 24.9843 120.5685 0010100 328.7321 31.2586 14.41315278200363
+FUSE 1
+1 25791U 99035A 03101.89805968 .00000719 00000-0 16399-3 0 8298
+2 25791 24.9841 128.6245 0010100 314.9047 45.0638 14.41314506200177
+FUSE 1
+1 25791U 99035A 03100.72095835 .00000735 00000-0 16862-3 0 8285
+2 25791 24.9823 135.8422 0010255 300.3804 59.5679 14.41313234200009
+FUSE 1
+1 25791U 99035A 03099.95930502 +.00000731 +00000-0 +16758-3 0 08321
+2 25791 024.9822 140.5054 0010257 292.8087 067.1336 14.41312329199895
+FUSE 1
+1 25791U 99035A 03099.54386033 .00000758 00000-0 17568-3 0 8273
+2 25791 24.9817 143.0635 0010123 287.3571 72.5830 14.41312013199834
+FUSE 1
+1 25791U 99035A 03098.92068851 +.00000723 +00000-0 +16491-3 0 08499
+2 25791 024.9816 146.8804 0010159 280.5747 079.3533 14.41310909199748
+FUSE 1
+1 25791U 99035A 03098.22827686 .00000751 00000-0 17368-3 0 8261
+2 25791 24.9821 151.1234 0010310 272.8590 87.0746 14.41310499199644
+FUSE 1
+1 25791U 99035A 03097.18965913 .00000710 00000-0 16100-3 0 8258
+2 25791 24.9822 157.4830 0010353 261.6244 98.3091 14.41308833199495
+FUSE 1
+1 25791U 99035A 03095.94331601 .00000705 00000-0 15943-3 0 8248
+2 25791 24.9828 165.1153 0010485 248.0340 111.9051 14.41307527199315
+FUSE 1
+1 25791U 99035A 03094.55849177 .00000687 00000-0 15400-3 0 8232
+2 25791 24.9837 173.5981 0010507 233.7648 126.1888 14.41305878199115
+FUSE 1
+1 25791U 99035A 03093.79684032 +.00000617 +00000-0 +13296-3 0 08340
+2 25791 024.9830 178.2689 0010658 225.6842 134.2806 14.41303892199000
+FUSE 1
+1 25791U 99035A 03093.45063419 .00000588 00000-0 12399-3 0 8220
+2 25791 24.9830 180.3890 0010661 222.1502 137.8185 14.41303261198959
+FUSE 1
+1 25791U 99035A 03092.06580825 .00000498 00000-0 96689-4 0 8215
+2 25791 24.9829 188.8687 0010595 207.4856 152.5026 14.41301203198758
+FUSE 1
+1 25791U 99035A 03090.88870503 .00000512 00000-0 10095-3 0 8200
+2 25791 24.9830 196.0770 0010689 195.3984 164.6200 14.41300573198583
+FUSE 1
+1 25791U 99035A 03089.91932625 +.00000473 +00000-0 +89013-4 0 08355
+2 25791 024.9831 202.0132 0010707 185.2549 174.7855 14.41299501198441
+FUSE 1
+1 25791U 99035A 03089.57311974 .00000447 00000-0 81025-4 0 8193
+2 25791 24.9832 204.1347 0010678 181.8480 178.1989 14.41298969198393
+FUSE 1
+1 25791U 99035A 03088.18829319 .00000422 00000-0 73584-4 0 8189
+2 25791 24.9836 212.6159 0010751 167.8506 192.2415 14.41297973198190
+FUSE 1
+1 25791U 99035A 03087.14967143 .00000439 00000-0 78641-4 0 8178
+2 25791 24.9834 218.9892 0010499 154.7731 205.3306 14.41297621198044
+FUSE 1
+1 25791U 99035A 03086.94194663 +.00000428 +00000-0 +75286-4 0 08488
+2 25791 024.9835 220.2611 0010504 152.4498 207.6568 14.41297416198016
+FUSE 1
+1 25791U 99035A 03085.90332252 .00000414 00000-0 71085-4 0 8164
+2 25791 24.9838 226.6261 0010293 142.1870 217.9362 14.41296881197868
+FUSE 1
+1 25791U 99035A 03085.90332251 +.00000414 +00000-0 +71084-4 0 08173
+2 25791 024.9838 226.6261 0010293 142.1870 217.9361 14.41296881197867
+FUSE 1
+1 25791U 99035A 03084.86469882 .00000343 00000-0 49516-4 0 8152
+2 25791 24.9847 232.9875 0010201 130.8102 229.3297 14.41295801197719
+FUSE 1
+1 25791U 99035A 03083.89531250 +.00000489 +00000-0 +93920-4 0 08321
+2 25791 024.9844 238.9268 0010672 122.1781 237.9761 14.41296727197570
+FUSE 1
+1 25791U 99035A 03083.54910375 .00000503 00000-0 98232-4 0 8140
+2 25791 24.9844 241.0479 0010701 118.5123 241.6462 14.41296648197528
+FUSE 1
+1 25791U 99035A 03082.92592724 +.00000523 +00000-0 +10446-3 0 08451
+2 25791 024.9843 244.8641 0010700 112.2904 247.8737 14.41296449197438
+FUSE 1
+1 25791U 99035A 03082.16426759 .00000526 00000-0 10521-3 0 8133
+2 25791 24.9841 249.5294 0010669 104.2866 255.8838 14.41295912197327
+FUSE 1
+1 25791U 99035A 03081.12563750 .00000612 00000-0 13128-3 0 8122
+2 25791 24.9842 255.8923 0010711 94.3078 265.8647 14.41296014197175
+FUSE 1
+1 25791U 99035A 03079.87928172 .00000670 00000-0 14898-3 0 8112
+2 25791 24.9845 263.5260 0010772 80.9467 279.2259 14.41295470196990
+FUSE 1
+1 25791U 99035A 03078.90989285 +.00000680 +00000-0 +15204-3 0 08356
+2 25791 024.9842 269.4617 0010753 070.0356 290.1308 14.41294541196854
+FUSE 1
+1 25791U 99035A 03078.56368187 .00000702 00000-0 15885-3 0 8103
+2 25791 24.9840 271.5817 0010757 66.2560 293.9075 14.41294387196801
+FUSE 1
+1 25791U 99035A 03077.17883857 .00000638 00000-0 13930-3 0 8090
+2 25791 24.9843 280.0617 0010654 50.7889 309.3564 14.41292379196607
+FUSE 1
+1 25791U 99035A 03076.14020216 .00000782 00000-0 18324-3 0 8089
+2 25791 24.9848 286.4255 0010468 43.0582 317.0743 14.41292815196451
+FUSE 1
+1 25791U 99035A 03074.89383969 .00000825 00000-0 19632-3 0 8076
+2 25791 24.9853 294.0604 0010385 30.7066 329.4048 14.41291731196279
+FUSE 1
+1 25791U 99035A 03073.43974802 .00000854 00000-0 20497-3 0 8069
+2 25791 24.9852 302.9660 0010367 15.2865 344.7954 14.41290069196060
+FUSE 1
+1 25791U 99035A 03072.19338203 .00000856 00000-0 20554-3 0 8055
+2 25791 24.9854 310.5981 0010287 2.1680 357.8866 14.41288422195880
+FUSE 1
+1 25791U 99035A 03071.08550087 .00000818 00000-0 19402-3 0 8045
+2 25791 24.9860 317.3842 0010263 349.9948 10.0353 14.41286657195721
+FUSE 1
+1 25791U 99035A 03069.97761880 +.00000763 +00000-0 +17745-3 0 08086
+2 25791 024.9860 324.1683 0010236 338.1839 021.8232 14.41284751195560
+FUSE 1
+1 25791U 99035A 03069.90837617 .00000758 00000-0 17585-3 0 8032
+2 25791 24.9860 324.5922 0010236 337.4031 22.6028 14.41284617195558
+FUSE 1
+1 25791U 99035A 03068.93897780 +.00000723 +00000-0 +16521-3 0 08098
+2 25791 024.9864 330.5285 0010290 326.4566 033.5291 14.41283191195416
+FUSE 1
+1 25791U 99035A 03068.86973524 .00000716 00000-0 16303-3 0 8024
+2 25791 24.9864 330.9527 0010287 325.7078 34.2768 14.41283044195408
+FUSE 1
+1 25791U 99035A 03067.55412264 .00000656 00000-0 14496-3 0 8011
+2 25791 24.9864 339.0080 0010311 311.6370 48.3251 14.41281081195210
+FUSE 1
+1 25791U 99035A 03066.44623884 .00000578 00000-0 12112-3 0 8005
+2 25791 24.9864 345.7927 0010333 299.7399 60.2082 14.41279280195050
+FUSE 1
+1 25791U 99035A 03065.40759665 .00000526 00000-0 10514-3 0 7991
+2 25791 24.9863 352.1521 0010350 288.8170 71.1215 14.41277936194904
+FUSE 1
+1 25791U 99035A 03064.23046813 .00000487 00000-0 93421-4 0 7989
+2 25791 24.9864 359.3605 0010411 275.9615 83.9706 14.41276773194731
+FUSE 1
+1 25791U 99035A 03062.98409806 +.00000428 +00000-0 +75413-4 0 08015
+2 25791 024.9863 006.9942 0010426 262.5976 097.3348 14.41275346194553
+FUSE 1
+1 25791U 99035A 03062.91485526 .00000425 00000-0 74460-4 0 7973
+2 25791 24.9862 7.4181 0010421 261.8604 98.0722 14.41275270194547
+FUSE 1
+1 25791U 99035A 03061.94545741 +.00000420 +00000-0 +73017-4 0 08008
+2 25791 024.9848 013.3688 0010509 252.6434 107.2924 14.41274844194403
+FUSE 1
+1 25791U 99035A 03061.66848589 .00000420 00000-0 73002-4 0 7961
+2 25791 24.9848 15.0645 0010505 249.7386 110.1988 14.41274707194360
+FUSE 1
+1 25791U 99035A 03060.49135828 .00000388 00000-0 63176-4 0 7959
+2 25791 24.9852 22.2747 0010610 237.5708 122.3771 14.41273890194196
+FUSE 1
+1 25791U 99035A 03059.24498747 .00000395 00000-0 65325-4 0 7947
+2 25791 24.9851 29.9090 0010713 224.4424 135.5221 14.41273446194018
+FUSE 1
+1 25791U 99035A 03058.96801613 +.00000410 +00000-0 +70039-4 0 08335
+2 25791 024.9848 031.6055 0010711 221.6605 138.3087 14.41273447193979
+FUSE 1
+1 25791U 99035A 03057.79088784 .00000466 00000-0 86878-4 0 7935
+2 25791 24.9852 38.8148 0010787 209.3160 150.6743 14.41273450193800
+FUSE 1
+1 25791U 99035A 03056.75224577 .00000511 00000-0 10064-3 0 7925
+2 25791 24.9849 45.1756 0010796 198.5017 161.5097 14.41273260193657
+FUSE 1
+1 25791U 99035A 03055.71360371 .00000543 00000-0 11053-3 0 7916
+2 25791 24.9851 51.5371 0010893 187.8825 172.1502 14.41272912193506
+FUSE 1
+1 25791U 99035A 03054.81344706 +.00000592 +00000-0 +12526-3 0 07943
+2 25791 024.9854 057.0504 0010975 178.3725 181.6813 14.41272772193372
+FUSE 1
+1 25791U 99035A 03054.53647601 .00000595 00000-0 12630-3 0 7907
+2 25791 24.9855 58.7463 0010996 175.5448 184.5158 14.41272591193338
+FUSE 1
+1 25791U 99035A 03053.22086164 .00000648 00000-0 14239-3 0 7897
+2 25791 24.9854 66.8027 0011082 162.1387 197.9511 14.41272079193145
+FUSE 1
+1 25791U 99035A 03052.18221916 .00000654 00000-0 14422-3 0 7887
+2 25791 24.9857 73.1612 0010974 150.9371 209.1749 14.41271157192993
+FUSE 1
+1 25791U 99035A 03051.69751897 +.00000653 +00000-0 +14404-3 0 08192
+2 25791 024.9857 076.1286 0010974 145.8259 214.2956 14.41270685192926
+FUSE 1
+1 25791U 99035A 03050.86660284 .00000682 00000-0 15278-3 0 7875
+2 25791 24.9852 81.2163 0010966 137.4487 222.6871 14.41270247192803
+FUSE 1
+1 25791U 99035A 03049.55098927 .00000679 00000-0 15178-3 0 7862
+2 25791 24.9830 89.2921 0010776 123.5065 236.6474 14.41268750192615
+FUSE 1
+1 25791U 99035A 03046.91974757 .00000708 00000-0 16072-3 0 7848
+2 25791 24.9828 105.4061 0010755 96.1405 264.0326 14.41266314192231
+FUSE 1
+1 25791U 99035A 03045.81185480 .00000675 00000-0 15076-3 0 7838
+2 25791 24.9829 112.1925 0010804 84.5002 275.6738 14.41264829192071
+FUSE 1
+1 25791U 99035A 03044.56547187 .00000671 00000-0 14933-3 0 7821
+2 25791 24.9825 119.8235 0010884 72.1647 288.0048 14.41263465191897
+FUSE 1
+1 25791U 99035A 03043.87303595 +.00000663 +00000-0 +14707-3 0 08086
+2 25791 024.9823 124.0647 0010837 064.8117 295.3515 14.41262691191797
+FUSE 1
+1 25791U 99035A 03043.24984329 .00000652 00000-0 14385-3 0 7817
+2 25791 24.9824 127.8828 0010807 58.4950 301.6614 14.41261995191709
+FUSE 1
+1 25791U 99035A 03042.07269992 .00000613 00000-0 13188-3 0 7805
+2 25791 24.9827 135.0921 0010730 46.2939 313.8459 14.41260560191534
+FUSE 1
+1 25791U 99035A 03040.82631031 .00000590 00000-0 12473-3 0 7791
+2 25791 24.9825 142.7255 0010676 33.4461 326.6705 14.41259243191356
+FUSE 1
+1 25791U 99035A 03039.57991945 .00000595 00000-0 12637-3 0 7780
+2 25791 24.9832 150.3613 0010568 20.6980 339.3959 14.41258343191173
+FUSE 1
+1 25791U 99035A 03038.54125940 .00000562 00000-0 11637-3 0 7772
+2 25791 24.9831 156.7218 0010533 9.4132 350.6584 14.41257190191022
+FUSE 1
+1 25791U 99035A 03037.01788880 .00000562 00000-0 11641-3 0 7765
+2 25791 24.9831 166.0494 0010450 353.4940 6.5445 14.41256054190805
+FUSE 1
+1 25791U 99035A 03035.90998290 +.00000529 +00000-0 +10615-3 0 07762
+2 25791 024.9834 172.8362 0010444 341.3662 018.6462 14.41254945190649
+FUSE 1
+1 25791U 99035A 03035.84073869 .00000529 00000-0 10615-3 0 7750
+2 25791 24.9834 173.2601 0010444 340.6394 19.3715 14.41254896190637
+FUSE 1
+1 25791U 99035A 03034.94056470 +.00000514 +00000-0 +10178-3 0 07937
+2 25791 024.9830 178.7729 0010445 331.0545 028.9383 14.41254106190504
+FUSE 1
+1 25791U 99035A 03034.59434384 .00000508 00000-0 99976-4 0 7748
+2 25791 24.9829 180.8929 0010469 327.4109 32.5752 14.41253798190450
+FUSE 1
+1 25791U 99035A 03033.55568063 .00000512 00000-0 10098-3 0 7736
+2 25791 24.9832 187.2531 0010490 316.1247 43.8429 14.41253174190304
+FUSE 1
+1 25791U 99035A 03032.24004087 .00000509 00000-0 10030-3 0 7723
+2 25791 24.9833 195.3101 0010479 301.8051 58.1431 14.41252308190118
+FUSE 1
+1 25791U 99035A 03031.13213438 .00000500 00000-0 97473-4 0 7719
+2 25791 24.9834 202.0943 0010489 289.8402 70.0976 14.41251485189957
+FUSE 1
+1 25791U 99035A 03029.95498370 +.00000507 +00000-0 +99455-4 0 07726
+2 25791 024.9833 209.3044 0010568 277.2138 082.7170 14.41250807189787
+FUSE 1
+1 25791U 99035A 03029.88573951 .00000506 00000-0 99284-4 0 7704
+2 25791 24.9834 209.7284 0010567 276.4676 83.4627 14.41250759189775
+FUSE 1
+1 25791U 99035A 03028.91632543 +.00000457 +00000-0 +84396-4 0 07714
+2 25791 024.9829 215.6872 0010688 267.6409 092.2873 14.41250112189637
+FUSE 1
+1 25791U 99035A 03028.84708138 .00000459 00000-0 84922-4 0 7694
+2 25791 24.9829 216.1111 0010685 266.8899 93.0390 14.41250090189627
+FUSE 1
+1 25791U 99035A 03027.94690786 +.00000485 +00000-0 +92887-4 0 07916
+2 25791 024.9829 221.6256 0010733 257.2339 102.6968 14.41249791189494
+FUSE 1
+1 25791U 99035A 03027.39295481 .00000522 00000-0 10395-3 0 7687
+2 25791 24.9825 225.0181 0010750 251.6346 108.2992 14.41249718189410
+FUSE 1
+1 25791U 99035A 03026.90824636 +.00000535 +00000-0 +10794-3 0 07938
+2 25791 024.9827 227.9872 0010755 246.4607 113.4770 14.41249533189346
+FUSE 1
+1 25791U 99035A 03026.21580544 .00000600 00000-0 12773-3 0 7672
+2 25791 24.9822 232.2291 0010751 239.2471 120.6976 14.41249537189241
+FUSE 1
+1 25791U 99035A 03024.90017016 .00000620 00000-0 13395-3 0 7667
+2 25791 24.9825 240.2875 0010606 224.5201 135.4454 14.41248661189059
+FUSE 1
+1 25791U 99035A 03023.86150943 .00000683 00000-0 15306-3 0 7650
+2 25791 24.9823 246.6490 0010698 213.6230 146.3601 14.41248266188901
+FUSE 1
+1 25791U 99035A 03022.96133739 +.00000720 +00000-0 +16435-3 0 07885
+2 25791 024.9822 252.1619 0010714 203.8994 156.1017 14.41247660188774
+FUSE 1
+1 25791U 99035A 03022.47662920 .00000753 00000-0 17422-3 0 7647
+2 25791 24.9818 255.1315 0010728 199.1571 160.8533 14.41247360188703
+FUSE 1
+1 25791U 99035A 03021.23023620 .00000814 00000-0 19309-3 0 7631
+2 25791 24.9818 262.7649 0010872 186.1483 173.8893 14.41246466188524
+FUSE 1
+1 25791U 99035A 03020.19157559 .00000839 00000-0 20070-3 0 7627
+2 25791 24.9818 269.1258 0010854 175.1951 184.8664 14.41245346188376
+FUSE 1
+1 25791U 99035A 03019.15291393 .00000874 00000-0 21118-3 0 7618
+2 25791 24.9818 275.4875 0010879 164.2609 195.8238 14.41244267188221
+FUSE 1
+1 25791U 99035A 03017.90651918 .00000882 00000-0 21358-3 0 7606
+2 25791 24.9820 283.1229 0010889 151.5092 208.6013 14.41242588188047
+FUSE 1
+1 25791U 99035A 03016.86785572 .00000849 00000-0 20352-3 0 7598
+2 25791 24.9821 289.4833 0010877 140.6893 219.4408 14.41240829187899
+FUSE 1
+1 25791U 99035A 03015.96767820 +.00000843 +00000-0 +20187-3 0 07628
+2 25791 024.9820 294.9922 0010992 131.6564 228.4886 14.41239598187768
+FUSE 1
+1 25791U 99035A 03015.41372249 .00000840 00000-0 20100-3 0 7582
+2 25791 24.9820 298.3836 0010997 125.8349 234.3181 14.41238834187688
+FUSE 1
+1 25791U 99035A 03014.23656622 .00000784 00000-0 18395-3 0 7570
+2 25791 24.9824 305.5944 0010955 113.8675 246.2990 14.41236827187518
+FUSE 1
+1 25791U 99035A 03013.19789667 .00000698 00000-0 15769-3 0 7565
+2 25791 24.9829 311.9557 0010860 103.1125 257.0596 14.41234894187368
+FUSE 1
+1 25791U 99035A 03012.92091841 +.00000651 +00000-0 +14337-3 0 07913
+2 25791 024.9830 313.6530 0010837 100.3922 259.7809 14.41234171187328
+FUSE 1
+1 25791U 99035A 03011.95149077 +.00000591 +00000-0 +12511-3 0 07599
+2 25791 024.9833 319.5894 0010774 090.1943 269.9802 14.41232741187189
+FUSE 1
+1 25791U 99035A 03011.88224586 .00000585 00000-0 12347-3 0 7556
+2 25791 24.9834 320.0134 0010776 89.4952 270.6791 14.41232635187174
+FUSE 1
+1 25791U 99035A 03010.49734521 .00000571 00000-0 11922-3 0 7549
+2 25791 24.9836 328.4940 0010755 75.1825 284.9873 14.41231417186974
+FUSE 1
+1 25791U 99035A 03009.38942288 .00000562 00000-0 11651-3 0 7534
+2 25791 24.9838 335.2793 0010726 63.5938 296.5669 14.41230504186813
+FUSE 1
+1 25791U 99035A 03008.21225405 .00000536 00000-0 10847-3 0 7526
+2 25791 24.9841 342.4893 0010658 51.4879 308.6589 14.41229428186642
+FUSE 1
+1 25791U 99035A 03007.17357430 .00000496 00000-0 96283-4 0 7517
+2 25791 24.9846 348.8510 0010606 40.2151 319.9146 14.41228391186490
+FUSE 1
+1 25791U 99035A 03005.71941978 .00000492 00000-0 95196-4 0 7508
+2 25791 24.9848 357.7568 0010489 25.1948 334.9069 14.41227497186283
+FUSE 1
+1 25791U 99035A 03004.54224559 .00000519 00000-0 10345-3 0 7497
+2 25791 24.9849 4.9669 0010381 12.5994 347.4773 14.41226999186118
+FUSE 1
+1 25791U 99035A 03003.22657791 .00000659 00000-0 14583-3 0 7481
+2 25791 24.9844 13.0234 0010171 358.9129 1.1355 14.41227192185920
+FUSE 1
+1 25791U 99035A 03001.70317381 +.00000783 +00000-0 +18366-3 0 07470
+2 25791 024.9836 022.3505 0010142 342.3951 017.6202 14.41226616185702
+FUSE 1
+1 25791U 99035A 02365.66448900 .00000905 00000-0 22093-3 0 7466
+2 25791 24.9828 28.7111 0010120 331.1925 28.8023 14.41226254185555
+FUSE 1
+1 25791U 99035A 02364.55655917 .00001003 00000-0 25056-3 0 7452
+2 25791 24.9823 35.4963 0010124 319.5885 40.3870 14.41225360185397
+FUSE 1
+1 25791U 99035A 02363.24089208 .00001123 00000-0 28737-3 0 7442
+2 25791 24.9817 43.5541 0010043 305.4795 54.4774 14.41224128185206
+FUSE 1
+1 25791U 99035A 02361.85597983 .00001182 00000-0 30525-3 0 7433
+2 25791 24.9811 52.0336 0010047 290.8057 69.1372 14.41221885185001
+FUSE 1
+1 25791U 99035A 02360.81729577 .00001190 00000-0 30775-3 0 7429
+2 25791 24.9811 58.3946 0010013 279.4423 80.4952 14.41219863184855
+FUSE 1
+1 25791U 99035A 02359.98634816 +.00001193 +00000-0 +30865-3 0 07531
+2 25791 024.9811 063.4834 0010006 270.4269 089.5092 14.41218193184736
+FUSE 1
+1 25791U 99035A 02359.57087417 .00001197 00000-0 30966-3 0 7418
+2 25791 24.9812 66.0284 0010007 265.9037 94.0326 14.41217390184670
+FUSE 1
+1 25791U 99035A 02356.87029074 .00001204 00000-0 31182-3 0 7390
+2 25791 24.9811 82.5668 0009938 236.3646 123.5914 14.41211956184287
+FUSE 1
+1 25791U 99035A 02355.55462023 .00001090 00000-0 27728-3 0 7382
+2 25791 24.9809 90.6214 0010165 222.2949 137.6776 14.41208399184093
+FUSE 1
+1 25791U 99035A 02354.51593217 .00001046 00000-0 26390-3 0 7371
+2 25791 24.9811 96.9840 0010179 211.0308 148.9598 14.41206118183947
+FUSE 1
+1 25791U 99035A 02353.13101277 .00001006 00000-0 25162-3 0 7360
+2 25791 24.9814 105.4674 0010149 196.0465 163.9721 14.41203384183749
+FUSE 1
+1 25791U 99035A 02351.95382922 +.00000934 +00000-0 +22963-3 0 07372
+2 25791 024.9817 112.6764 0010197 184.0228 176.0200 14.41200867183570
+FUSE 1
+1 25791U 99035A 02351.88458303 .00000934 00000-0 22971-3 0 7358
+2 25791 24.9817 113.1005 0010193 183.2930 176.7513 14.41200763183569
+FUSE 1
+1 25791U 99035A 02350.91513627 +.00000904 +00000-0 +22045-3 0 07519
+2 25791 024.9819 119.0445 0010562 174.0065 186.0569 14.41199099183420
+FUSE 1
+1 25791U 99035A 02350.56890542 .00000886 00000-0 21508-3 0 7347
+2 25791 24.9818 121.1673 0010554 170.6826 189.3879 14.41198405183378
+FUSE 1
+1 25791U 99035A 02349.11473244 .00000853 00000-0 20507-3 0 7333
+2 25791 24.9823 130.0779 0010595 156.0675 204.0329 14.41196121183160
+FUSE 1
+1 25791U 99035A 02347.86829613 .00000843 00000-0 20210-3 0 7327
+2 25791 24.9826 137.7176 0010579 143.6291 216.4936 14.41194381182982
+FUSE 1
+1 25791U 99035A 02346.96809054 +.00000846 +00000-0 +20310-3 0 07328
+2 25791 024.9827 143.2322 0010589 134.4622 225.6760 14.41193196182851
+FUSE 1
+1 25791U 99035A 02346.82959720 .00000840 00000-0 20129-3 0 7310
+2 25791 24.9828 144.0807 0010580 133.0588 227.0808 14.41192967182838
+FUSE 1
+1 25791U 99035A 02345.92939017 +.00000816 +00000-0 +19371-3 0 07418
+2 25791 024.9830 149.5942 0010509 123.9678 236.1843 14.41191589182705
+FUSE 1
+1 25791U 99035A 02345.58315657 .00000792 00000-0 18653-3 0 7301
+2 25791 24.9831 151.7183 0010408 120.6946 239.4591 14.41190929182655
+FUSE 1
+1 25791U 99035A 02344.89068773 +.00000785 +00000-0 +18451-3 0 07429
+2 25791 024.9831 155.9574 0010423 113.3541 246.8055 14.41190019182558
+FUSE 1
+1 25791U 99035A 02344.54445368 .00000789 00000-0 18568-3 0 7298
+2 25791 24.9831 158.0799 0010476 110.1229 250.0410 14.41189637182508
+FUSE 1
+1 25791U 99035A 02343.15951322 .00000783 00000-0 18396-3 0 7288
+2 25791 24.9834 166.5623 0010426 96.2869 263.8829 14.41187968182309
+FUSE 1
+1 25791U 99035A 02342.88252492 +.00000775 +00000-0 +18152-3 0 07460
+2 25791 024.9835 168.2588 0010398 093.2895 266.8803 14.41187559182269
+FUSE 1
+1 25791U 99035A 02341.98231177 .00000761 00000-0 17708-3 0 7277
+2 25791 24.9836 173.7711 0010366 83.7509 276.4178 14.41186369182136
+FUSE 1
+1 25791U 99035A 02340.87435475 .00000768 00000-0 17944-3 0 7269
+2 25791 24.9836 180.5545 0010319 72.0817 288.0815 14.41185129181979
+FUSE 1
+1 25791U 99035A 02339.90489123 +.00000743 +00000-0 +17159-3 0 07373
+2 25791 024.9838 186.4897 0010302 061.8181 298.3364 14.41183804181834
+FUSE 1
+1 25791U 99035A 02339.00467365 .00000760 00000-0 17694-3 0 7258
+2 25791 24.9837 192.0009 0010340 52.4233 307.7215 14.41182886181702
+FUSE 1
+1 25791U 99035A 02337.96595978 +.00000747 +00000-0 +17292-3 0 07274
+2 25791 024.9838 198.3601 0010349 041.4682 318.6611 14.41181581181550
+FUSE 1
+1 25791U 99035A 02337.89671225 .00000735 00000-0 16930-3 0 7248
+2 25791 24.9838 198.7841 0010344 40.6825 319.4454 14.41181406181544
+FUSE 1
+1 25791U 99035A 02336.92724431 +.00000730 +00000-0 +16784-3 0 07263
+2 25791 024.9839 204.7190 0010345 030.4753 329.6355 14.41180304181402
+FUSE 1
+1 25791U 99035A 02336.85799660 .00000726 00000-0 16666-3 0 7232
+2 25791 24.9840 205.1432 0010343 29.6910 330.4183 14.41180198181399
+FUSE 1
+1 25791U 99035A 02335.95777534 +.00000723 +00000-0 +16574-3 0 07378
+2 25791 024.9840 210.6541 0010353 020.2600 339.8318 14.41179182181265
+FUSE 1
+1 25791U 99035A 02335.12680126 .00000724 00000-0 16595-3 0 7225
+2 25791 24.9839 215.7423 0010346 11.4473 348.6270 14.41178242181148
+FUSE 1
+1 25791U 99035A 02333.88033836 .00000777 00000-0 18215-3 0 7214
+2 25791 24.9838 223.3729 0010367 358.4414 1.6064 14.41177194180964
+FUSE 1
+1 25791U 99035A 02332.21838680 .00000738 00000-0 17012-3 0 7200
+2 25791 24.9840 233.5483 0010369 340.4562 19.5551 14.41175004180725
+FUSE 1
+1 25791U 99035A 02330.97192266 +.00000736 +00000-0 +16945-3 0 07228
+2 25791 024.9841 241.1847 0010383 327.1955 032.7907 14.41173576180543
+FUSE 1
+1 25791U 99035A 02330.90267454 .00000744 00000-0 17204-3 0 7197
+2 25791 24.9842 241.6086 0010384 326.4698 33.5151 14.41173549180530
+FUSE 1
+1 25791U 99035A 02329.93320137 +.00000795 +00000-0 +18754-3 0 07238
+2 25791 024.9841 247.5450 0010325 316.0567 043.9119 14.41172687180399
+FUSE 1
+1 25791U 99035A 02329.86395339 .00000793 00000-0 18694-3 0 7181
+2 25791 24.9841 247.9690 0010320 315.3599 44.6079 14.41172585180380
+FUSE 1
+1 25791U 99035A 02328.96372831 +.00000874 +00000-0 +21177-3 0 07262
+2 25791 024.9839 253.4818 0010301 306.0731 053.8822 14.41171745180256
+FUSE 1
+1 25791U 99035A 02328.47899189 .00000852 00000-0 20479-3 0 7178
+2 25791 24.9839 256.4492 0010283 300.9882 58.9620 14.41170988180188
+FUSE 1
+1 25791U 99035A 02327.23252631 .00000997 00000-0 24907-3 0 7165
+2 25791 24.9837 264.0850 0010209 287.9702 71.9692 14.41169674180007
+FUSE 1
+1 25791U 99035A 02325.91681241 .00001075 00000-0 27280-3 0 7155
+2 25791 24.9835 272.1466 0010275 274.0090 85.9246 14.41167756179814
+FUSE 1
+1 25791U 99035A 02324.94733872 +.00001074 +00000-0 +27250-3 0 07151
+2 25791 024.9837 278.0849 0010343 263.9267 096.0064 14.41166020179673
+FUSE 1
+1 25791U 99035A 02324.67034596 .00001073 00000-0 27216-3 0 7148
+2 25791 24.9837 279.7804 0010340 261.0175 98.9158 14.41165514179634
+FUSE 1
+1 25791U 99035A 02323.97786359 +.00001085 +00000-0 +27593-3 0 07186
+2 25791 024.9834 284.0218 0010561 253.2107 106.7242 14.41164354179534
+FUSE 1
+1 25791U 99035A 02323.56237448 .00001085 00000-0 27595-3 0 7138
+2 25791 24.9834 286.5654 0010546 248.8875 111.0502 14.41163593179475
+FUSE 1
+1 25791U 99035A 02322.24665714 .00001162 00000-0 29927-3 0 7129
+2 25791 24.9833 294.6241 0010703 233.4813 126.4702 14.41161870179280
+FUSE 1
+1 25791U 99035A 02321.20793280 .00001220 00000-0 31720-3 0 7112
+2 25791 24.9829 300.9847 0010808 222.5858 137.3810 14.41160264179133
+FUSE 1
+1 25791U 99035A 02319.40747635 .00001263 00000-0 33024-3 0 7109
+2 25791 24.9825 312.0065 0010876 203.7169 156.2843 14.41156787178877
+FUSE 1
+1 25791U 99035A 02318.64574421 +.00001273 +00000-0 +33320-3 0 07183
+2 25791 024.9823 316.6719 0010904 195.8401 164.1766 14.41155172178760
+FUSE 1
+1 25791U 99035A 02317.81476349 +.00001220 +00000-0 +31728-3 0 07352
+2 25791 024.9826 321.7601 0010933 187.6105 172.4237 14.41152903178643
+FUSE 1
+1 25791U 99035A 02316.84528386 .00001225 00000-0 31884-3 0 7081
+2 25791 24.9827 327.6980 0010976 177.5120 182.5438 14.41150915178502
+FUSE 1
+1 25791U 99035A 02315.59880787 .00001242 00000-0 32394-3 0 7073
+2 25791 24.9825 335.3293 0011048 164.4233 195.6623 14.41148412178324
+FUSE 1
+1 25791U 99035A 02314.69857361 +.00001241 +00000-0 +32373-3 0 07071
+2 25791 024.9823 340.8415 0011033 155.1164 204.9876 14.41146449178190
+FUSE 1
+1 25791U 99035A 02314.56007609 .00001242 00000-0 32393-3 0 7061
+2 25791 24.9823 341.6892 0011038 153.6592 206.4489 14.41146160178176
+FUSE 1
+1 25791U 99035A 02313.24434699 .00001193 00000-0 30916-3 0 7051
+2 25791 24.9828 349.7471 0011087 140.1634 219.9694 14.41143010177981
+FUSE 1
+1 25791U 99035A 02312.20561116 .00001132 00000-0 29035-3 0 7043
+2 25791 24.9834 356.1079 0011110 129.7443 230.4048 14.41140389177833
+FUSE 1
+1 25791U 99035A 02311.92861422 +.00001126 +00000-0 +28868-3 0 07309
+2 25791 024.9835 357.8035 0011119 126.7910 233.3617 14.41139808177792
+FUSE 1
+1 25791U 99035A 02310.95912468 +.00001083 +00000-0 +27550-3 0 07048
+2 25791 024.9837 003.7403 0011086 116.7489 243.4157 14.41137566177658
+FUSE 1
+1 25791U 99035A 02310.82062580 .00001082 00000-0 27519-3 0 7038
+2 25791 24.9837 4.5881 0011089 115.2851 244.8806 14.41137305177632
+FUSE 1
+1 25791U 99035A 02309.78188408 +.00001035 +00000-0 +26086-3 0 07068
+2 25791 024.9840 010.9478 0011067 104.2526 255.9212 14.41135021177482
+FUSE 1
+1 25791U 99035A 02309.57413526 .00001031 00000-0 25964-3 0 7023
+2 25791 24.9841 12.2196 0011058 102.0689 258.1059 14.41134631177458
+FUSE 1
+1 25791U 99035A 02308.67388968 +.00001007 +00000-0 +25233-3 0 07048
+2 25791 024.9841 017.7307 0011071 092.5180 267.6595 14.41132871177326
+FUSE 1
+1 25791U 99035A 02308.53539014 .00001005 00000-0 25166-3 0 7013
+2 25791 24.9842 18.5786 0011066 91.0739 269.1037 14.41132629177302
+FUSE 1
+1 25791U 99035A 02307.08114362 .00000944 00000-0 23310-3 0 7006
+2 25791 24.9847 27.4838 0011100 76.0546 284.1186 14.41129780177094
+FUSE 1
+1 25791U 99035A 02306.04239290 .00000935 00000-0 23046-3 0 6992
+2 25791 24.9847 33.8456 0011062 65.0552 295.1089 14.41128082176944
+FUSE 1
+1 25791U 99035A 02304.86513927 .00000956 00000-0 23688-3 0 6986
+2 25791 24.9847 41.0556 0010946 52.9833 307.1674 14.41126496176775
+FUSE 1
+1 25791U 99035A 02303.89563460 +.00000960 +00000-0 +23806-3 0 06982
+2 25791 024.9849 046.9935 0010898 043.0452 317.0893 14.41125049176637
+FUSE 1
+1 25791U 99035A 02303.82638415 .00000966 00000-0 23984-3 0 6970
+2 25791 24.9849 47.4173 0010865 42.3451 317.7891 14.41125000176623
+FUSE 1
+1 25791U 99035A 02302.71837611 +.00001023 +00000-0 +25722-3 0 07019
+2 25791 024.9847 054.2005 0010813 031.1742 328.9406 14.41123746176466
+FUSE 1
+1 25791U 99035A 02302.57987459 .00001040 00000-0 26254-3 0 6962
+2 25791 24.9846 55.0483 0010830 29.7688 330.3422 14.41123680176445
+FUSE 1
+1 25791U 99035A 02300.98711079 .00001096 00000-0 27956-3 0 6958
+2 25791 24.9841 64.7981 0010843 13.0413 347.0373 14.41121314176213
+FUSE 1
+1 25791U 99035A 02299.87909991 .00001128 00000-0 28943-3 0 6947
+2 25791 24.9841 71.5856 0010786 1.4027 358.6513 14.41119575176050
+FUSE 1
+1 25791U 99035A 02298.84033835 .00001169 00000-0 30201-3 0 6932
+2 25791 24.9842 77.9480 0010811 350.6657 9.3651 14.41117963175906
+FUSE 1
+1 25791U 99035A 02297.94007642 +.00001182 +00000-0 +30577-3 0 06941
+2 25791 024.9844 083.4626 0010597 339.8645 020.1444 14.41116418175779
+FUSE 1
+1 25791U 99035A 02297.80157473 .00001180 00000-0 30538-3 0 6927
+2 25791 24.9845 84.3107 0010600 338.3923 21.6137 14.41116135175751
+FUSE 1
+1 25791U 99035A 02296.90131265 +.00001199 +00000-0 +31112-3 0 07052
+2 25791 024.9844 089.8231 0010565 328.5579 031.4298 14.41114507175620
+FUSE 1
+1 25791U 99035A 02296.55505701 .00001238 00000-0 32303-3 0 6914
+2 25791 24.9844 91.9448 0010517 324.3002 35.6802 14.41114238175578
+FUSE 1
+1 25791U 99035A 02295.93179849 +.00001243 +00000-0 +32465-3 0 07023
+2 25791 024.9845 095.7602 0010517 317.7975 042.1726 14.41112961175487
+FUSE 1
+1 25791U 99035A 02295.51629228 .00001254 00000-0 32781-3 0 6907
+2 25791 24.9843 98.3052 0010532 313.0139 46.9486 14.41112188175421
+FUSE 1
+1 25791U 99035A 02294.96228418 +.00001256 +00000-0 +32856-3 0 07075
+2 25791 024.9843 101.6963 0010529 307.2176 052.7370 14.41111015175348
+FUSE 1
+1 25791U 99035A 02294.13127216 .00001240 00000-0 32359-3 0 6898
+2 25791 24.9841 106.7843 0010541 298.5475 61.3971 14.41109044175226
+FUSE 1
+1 25791U 99035A 02293.92351906 +.00001239 +00000-0 +32344-3 0 07139
+2 25791 024.9843 108.0569 0010535 296.3424 063.6002 14.41108613175198
+FUSE 1
+1 25791U 99035A 02292.95400352 +.00001237 +00000-0 +32256-3 0 06905
+2 25791 024.9842 113.9928 0010572 285.9862 073.9481 14.41106520175057
+FUSE 1
+1 25791U 99035A 02292.88475244 .00001234 00000-0 32188-3 0 6887
+2 25791 24.9842 114.4167 0010574 285.2452 74.6888 14.41106349175045
+FUSE 1
+1 25791U 99035A 02291.56898052 .00001216 00000-0 31640-3 0 6878
+2 25791 24.9839 122.4724 0010637 271.2762 88.6530 14.41103373174859
+FUSE 1
+1 25791U 99035A 02290.94572017 +.00001195 +00000-0 +30991-3 0 07009
+2 25791 024.9844 126.2889 0010671 264.7560 095.1729 14.41101851174762
+FUSE 1
+1 25791U 99035A 02290.18395700 .00001174 00000-0 30345-3 0 6860
+2 25791 24.9843 130.9526 0010673 256.7111 103.2208 14.41100044174650
+FUSE 1
+1 25791U 99035A 02288.86818259 .00001140 00000-0 29323-3 0 6857
+2 25791 24.9845 139.0064 0010704 243.0013 116.9405 14.41097023174465
+FUSE 1
+1 25791U 99035A 02287.89866426 +.00001136 +00000-0 +29186-3 0 06894
+2 25791 024.9843 144.9409 0010684 232.7314 127.2281 14.41095095174326
+FUSE 1
+1 25791U 99035A 02287.20614986 .00001151 00000-0 29649-3 0 6847
+2 25791 24.9827 149.1875 0010669 225.6654 134.2979 14.41093836174225
+FUSE 1
+1 25791U 99035A 02285.89037225 .00001130 00000-0 29004-3 0 6836
+2 25791 24.9828 157.2454 0010692 211.9002 148.0860 14.41091133174039
+FUSE 1
+1 25791U 99035A 02284.85159928 .00001103 00000-0 28186-3 0 6825
+2 25791 24.9828 163.6064 0010728 200.9652 159.0419 14.41088960173884
+FUSE 1
+1 25791U 99035A 02283.32806291 .00001033 00000-0 26046-3 0 6812
+2 25791 24.9830 172.9322 0010689 184.6616 175.3793 14.41085821173666
+FUSE 1
+1 25791U 99035A 02282.98180447 +.00000996 +00000-0 +24906-3 0 06844
+2 25791 024.9832 175.0528 0010704 180.9650 179.0837 14.41085010173610
+FUSE 1
+1 25791U 99035A 02282.22003459 .00001026 00000-0 25852-3 0 6800
+2 25791 24.9831 179.7159 0010708 172.9134 187.1536 14.41083903173505
+FUSE 1
+1 25791U 99035A 02280.97350077 +.00000830 +00000-0 +19849-3 0 06802
+2 25791 024.9833 187.3563 0011025 161.6340 198.4554 14.41080808173324
+FUSE 1
+1 25791U 99035A 02280.90424885 .00000955 00000-0 23675-3 0 6792
+2 25791 24.9831 187.7802 0010991 160.8057 199.2869 14.41081211173315
+FUSE 1
+1 25791U 99035A 02279.93472079 +.00001010 +00000-0 +25355-3 0 06825
+2 25791 024.9829 193.7205 0011006 150.8784 209.2336 14.41079909173176
+FUSE 1
+1 25791U 99035A 02279.38070408 .00001043 00000-0 26359-3 0 6780
+2 25791 24.9829 197.1114 0011002 144.9425 215.1807 14.41079042173093
+FUSE 1
+1 25791U 99035A 02278.20341727 .00000963 00000-0 23930-3 0 6776
+2 25791 24.9832 204.3229 0011020 133.2028 226.9401 14.41076821172928
+FUSE 1
+1 25791U 99035A 02276.88762358 .00000955 00000-0 23667-3 0 6762
+2 25791 24.9828 212.3833 0011005 119.6564 240.5042 14.41074562172731
+FUSE 1
+1 25791U 99035A 02275.50257357 .00000810 00000-0 19257-3 0 6757
+2 25791 24.9832 220.8633 0010929 105.5890 254.5823 14.41071888172536
+FUSE 1
+1 25791U 99035A 02274.94855287 +.00000769 +00000-0 +18010-3 0 06782
+2 25791 024.9832 224.2597 0010747 099.8528 260.3191 14.41070889172458
+FUSE 1
+1 25791U 99035A 02274.39453091 .00000766 00000-0 17925-3 0 6745
+2 25791 24.9832 227.6504 0010741 94.0800 266.0941 14.41070217172379
+FUSE 1
+1 25791U 99035A 02273.97901442 +.00000752 +00000-0 +17475-3 0 06831
+2 25791 024.9833 230.1965 0010675 089.7969 270.3764 14.41069590172310
+FUSE 1
+1 25791U 99035A 02273.21723299 .00000755 00000-0 17576-3 0 6734
+2 25791 24.9834 234.8609 0010679 81.6884 278.4835 14.41068740172200
+FUSE 1
+1 25791U 99035A 02272.94022098 +.00000777 +00000-0 +18254-3 0 07023
+2 25791 024.9832 236.5583 0010621 078.7403 281.4295 14.41068586172166
+FUSE 1
+1 25791U 99035A 02271.97067853 +.00000808 +00000-0 +19195-3 0 06741
+2 25791 024.9832 242.4959 0010491 068.8195 291.3434 14.41067715172025
+FUSE 1
+1 25791U 99035A 02271.55516014 .00000808 00000-0 19212-3 0 6721
+2 25791 24.9832 245.0390 0010492 64.4543 295.7048 14.41067193171964
+FUSE 1
+1 25791U 99035A 02270.51636263 .00000857 00000-0 20706-3 0 6718
+2 25791 24.9832 251.3989 0010443 53.4959 306.6509 14.41066244171817
+FUSE 1
+1 25791U 99035A 02269.33905765 .00000893 00000-0 21807-3 0 6704
+2 25791 24.9833 258.6080 0010394 40.7861 319.3423 14.41064845171648
+FUSE 1
+1 25791U 99035A 02268.23100366 .00000992 00000-0 24815-3 0 6696
+2 25791 24.9827 265.3949 0010332 28.8061 331.3014 14.41063880171481
+FUSE 1
+1 25791U 99035A 02267.19220147 .00001098 00000-0 28063-3 0 6686
+2 25791 24.9823 271.7543 0010324 17.9281 342.1586 14.41062934171339
+FUSE 1
+1 25791U 99035A 02265.66862362 .00001232 00000-0 32165-3 0 6674
+2 25791 24.9816 281.0815 0010329 1.9220 358.1327 14.41060966171117
+FUSE 1
+1 25791U 99035A 02264.56056684 .00001222 00000-0 31866-3 0 6669
+2 25791 24.9817 287.8674 0010319 349.8851 10.1457 14.41058532170954
+FUSE 1
+1 25791U 99035A 02263.52176164 .00001227 00000-0 32006-3 0 6651
+2 25791 24.9817 294.2294 0010341 338.4888 21.5185 14.41056345170801
+FUSE 1
+1 25791U 99035A 02262.62146251 +.00001266 +00000-0 +33195-3 0 06726
+2 25791 024.9813 299.7417 0010331 328.9476 031.0420 14.41054666170677
+FUSE 1
+1 25791U 99035A 02262.41370124 .00001257 00000-0 32914-3 0 6640
+2 25791 24.9813 301.0139 0010341 326.6238 33.3618 14.41054137170641
+FUSE 1
+1 25791U 99035A 02261.23638509 .00001327 00000-0 35045-3 0 6638
+2 25791 24.9808 308.2225 0010336 313.5426 46.4225 14.41052008170473
+FUSE 1
+1 25791U 99035A 02260.19757547 .00001443 00000-0 38612-3 0 6627
+2 25791 24.9803 314.5833 0010346 302.4458 57.5047 14.41050420170321
+FUSE 1
+1 25791U 99035A 02259.71279796 +.00001450 +00000-0 +38808-3 0 06904
+2 25791 024.9803 317.5503 0010348 297.3449 062.6007 14.41049231170255
+FUSE 1
+1 25791U 99035A 02258.81249669 .00001457 00000-0 39044-3 0 6618
+2 25791 24.9801 323.0624 0010344 288.1227 71.8153 14.41046928170127
+FUSE 1
+1 25791U 99035A 02257.56592355 .00001607 00000-0 43604-3 0 6605
+2 25791 24.9798 330.6972 0010331 274.6720 85.2607 14.41044565169942
+FUSE 1
+1 25791U 99035A 02256.52711275 .00001599 00000-0 43384-3 0 6597
+2 25791 24.9793 337.0578 0010393 263.4699 96.4645 14.41041446169793
+FUSE 1
+1 25791U 99035A 02255.41904580 .00001584 00000-0 42933-3 0 6589
+2 25791 24.9787 343.8424 0010407 251.9278 108.0095 14.41038086169630
+FUSE 1
+1 25791U 99035A 02254.72650348 +.00001491 +00000-0 +40078-3 0 06835
+2 25791 024.9788 348.0813 0010411 244.6244 115.3195 14.41035736169537
+FUSE 1
+1 25791U 99035A 02253.89545131 .00001396 00000-0 37159-3 0 6576
+2 25791 24.9785 353.1698 0010435 235.7390 124.2119 14.41033155169416
+FUSE 1
+1 25791U 99035A 02252.92589091 +.00001057 +00000-0 +26812-3 0 06570
+2 25791 024.9789 359.1085 0010610 225.0767 134.8879 14.41029740169270
+FUSE 1
+1 25791U 99035A 02252.85663624 .00001059 00000-0 26870-3 0 6562
+2 25791 24.9790 359.5326 0010621 224.3210 135.6441 14.41029635169267
+FUSE 1
+1 25791U 99035A 02251.95632761 +.00001005 +00000-0 +25223-3 0 06562
+2 25791 024.9790 005.0443 0010707 214.4524 145.5288 14.41027801169131
+FUSE 1
+1 25791U 99035A 02251.81781883 .00001011 00000-0 25399-3 0 6557
+2 25791 24.9790 5.8921 0010710 212.9295 147.0567 14.41027608169112
+FUSE 1
+1 25791U 99035A 02250.70974565 +.00000905 +00000-0 +22152-3 0 06628
+2 25791 024.9792 012.6758 0010740 201.5396 158.4662 14.41025222168950
+FUSE 1
+1 25791U 99035A 02250.57123644 .00000892 00000-0 21766-3 0 6543
+2 25791 24.9793 13.5236 0010741 200.1557 159.8528 14.41024911168935
+FUSE 1
+1 25791U 99035A 02248.90912382 .00000783 00000-0 18435-3 0 6539
+2 25791 24.9796 23.6965 0010767 182.5930 177.4521 14.41021797168696
+FUSE 1
+1 25791U 99035A 02247.93955749 +.00000652 +00000-0 +14418-3 0 06762
+2 25791 024.9802 029.6342 0010910 173.0331 187.0327 14.41019680168553
+FUSE 1
+1 25791U 99035A 02247.24700867 .00000614 00000-0 13267-3 0 6528
+2 25791 24.9803 33.8749 0010996 165.8745 194.2065 14.41018736168453
+FUSE 1
+1 25791U 99035A 02246.13892944 .00000537 00000-0 10933-3 0 6513
+2 25791 24.9806 40.6587 0011018 154.5982 205.5064 14.41017206168294
+FUSE 1
+1 25791U 99035A 02244.89233811 .00000526 00000-0 10578-3 0 6508
+2 25791 24.9810 48.2931 0011178 142.1273 218.0023 14.41016304168112
+FUSE 1
+1 25791U 99035A 02243.57648803 .00000736 00000-0 16997-3 0 6495
+2 25791 24.9800 56.3527 0011307 128.8388 231.3126 14.41016815167921
+FUSE 1
+1 25791U 99035A 02242.12212513 .00001042 00000-0 26353-3 0 6487
+2 25791 24.9790 65.2545 0011385 113.4504 246.7186 14.41017164167715
+FUSE 1
+1 25791U 99035A 02241.15254607 .00001586 00000-0 42999-3 0 6475
+2 25791 24.9772 71.1895 0011244 103.6925 256.4821 14.41018933167574
+FUSE 1
+1 25791U 99035A 02240.87553062 .00000969 00000-0 24140-3 0 6461
+2 25791 24.9785 72.8895 0010796 101.1155 259.0566 14.41013762167531
+FUSE 1
+1 25791U 99035A 02239.90595273 +.00001112 +00000-0 +28499-3 0 06645
+2 25791 024.9781 078.8252 0010791 090.9038 269.2706 14.41013017167396
+FUSE 1
+1 25791U 99035A 02239.21339631 .00001213 00000-0 31602-3 0 6454
+2 25791 24.9777 83.0642 0010776 83.4859 276.6874 14.41012252167290
+FUSE 1
+1 25791U 99035A 02237.96679327 +.00001439 +00000-0 +38514-3 0 06496
+2 25791 024.9774 090.6979 0010768 071.0115 289.1558 14.41010739167110
+FUSE 1
+1 25791U 99035A 02237.89753765 .00001477 00000-0 39690-3 0 6440
+2 25791 24.9773 91.1232 0010788 70.3652 289.8019 14.41010744167101
+FUSE 1
+1 25791U 99035A 02236.44316461 .00001500 00000-0 40378-3 0 6439
+2 25791 24.9767 100.0287 0010670 55.6564 304.4950 14.41006864166893
+FUSE 1
+1 25791U 99035A 02235.19655478 .00001345 00000-0 35650-3 0 6427
+2 25791 24.9770 107.6610 0010486 43.1111 317.0209 14.41003175166715
+FUSE 1
+1 25791U 99035A 02233.94994384 +.00001071 +00000-0 +27257-3 0 06453
+2 25791 024.9778 115.2923 0010434 030.0321 330.0788 14.40999043166530
+FUSE 1
+1 25791U 99035A 02233.88068763 .00001046 00000-0 26501-3 0 6418
+2 25791 24.9780 115.7163 0010425 29.2338 330.8754 14.40998751166527
+FUSE 1
+1 25791U 99035A 02232.49555828 .00000919 00000-0 22621-3 0 6403
+2 25791 24.9786 124.1958 0010414 14.6083 345.4723 14.40995445166325
+FUSE 1
+1 25791U 99035A 02231.94150552 +.00000876 +00000-0 +21309-3 0 06546
+2 25791 024.9788 127.5880 0010407 008.4765 351.5919 14.40994234166249
+FUSE 1
+1 25791U 99035A 02231.38745204 .00000845 00000-0 20367-3 0 6390
+2 25791 24.9789 130.9790 0010378 2.6277 357.4296 14.40993213166169
+FUSE 1
+1 25791U 99035A 02230.97191224 +.00000798 +00000-0 +18928-3 0 06602
+2 25791 024.9793 133.5251 0010384 358.0335 002.0134 14.40992235166106
+FUSE 1
+1 25791U 99035A 02230.21008800 .00000719 00000-0 16493-3 0 6389
+2 25791 24.9799 138.1891 0010364 349.8416 10.1882 14.40990663165998
+FUSE 1
+1 25791U 99035A 02228.89420846 .00000570 00000-0 11957-3 0 6372
+2 25791 24.9808 146.2460 0010327 335.3789 24.6230 14.40988149165806
+FUSE 1
+1 25791U 99035A 02227.85535415 .00000520 00000-0 10422-3 0 6366
+2 25791 24.9812 152.6068 0010343 324.1332 35.8482 14.40986913165657
+FUSE 1
+1 25791U 99035A 02226.95501315 +.00000506 +00000-0 +99908-4 0 06426
+2 25791 024.9813 158.1197 0010337 314.4756 045.4908 14.40986180165529
+FUSE 1
+1 25791U 99035A 02226.47021386 .00000502 00000-0 98661-4 0 6351
+2 25791 24.9813 161.0865 0010330 309.4557 50.5037 14.40985822165454
+FUSE 1
+1 25791U 99035A 02225.98541513 +.00000476 +00000-0 +90569-4 0 06422
+2 25791 024.9815 164.0553 0010405 304.3474 055.6046 14.40985257165388
+FUSE 1
+1 25791U 99035A 02225.22358750 .00000482 00000-0 92578-4 0 6348
+2 25791 24.9816 168.7186 0010417 296.1218 63.8218 14.40984875165274
+FUSE 1
+1 25791U 99035A 02223.97696163 +.00000481 +00000-0 +92220-4 0 06412
+2 25791 024.9814 176.3517 0010455 283.1411 076.7930 14.40984067165095
+FUSE 1
+1 25791U 99035A 02223.49216218 .00000489 00000-0 94620-4 0 6333
+2 25791 24.9814 179.3194 0010476 277.8554 82.0754 14.40983850165026
+FUSE 1
+1 25791U 99035A 02222.93810641 +.00000509 +00000-0 +10073-3 0 06456
+2 25791 024.9812 182.7128 0010537 272.0359 087.8941 14.40983654164940
+FUSE 1
+1 25791U 99035A 02222.24553673 .00000508 00000-0 10033-3 0 6320
+2 25791 24.9814 186.9527 0010565 264.8001 95.1296 14.40983198164842
+FUSE 1
+1 25791U 99035A 02220.72188492 .00000514 00000-0 10213-3 0 6310
+2 25791 24.9811 196.2838 0010649 248.9270 111.0101 14.40982128164623
+FUSE 1
+1 25791U 99035A 02219.96005888 +.00000589 +00000-0 +12528-3 0 06358
+2 25791 024.9808 200.9504 0010520 240.1664 119.7798 14.40982235164515
+FUSE 1
+1 25791U 99035A 02219.54451761 .00000591 00000-0 12583-3 0 6306
+2 25791 24.9809 203.4950 0010565 235.7070 124.2439 14.40981930164456
+FUSE 1
+1 25791U 99035A 02218.50566444 .00000591 00000-0 12589-3 0 6290
+2 25791 24.9810 209.8564 0010671 225.0521 134.9121 14.40981088164304
+FUSE 1
+1 25791U 99035A 02217.67458222 +.00000586 +00000-0 +12427-3 0 06319
+2 25791 024.9810 214.9451 0010742 216.2683 143.7098 14.40980335164187
+FUSE 1
+1 25791U 99035A 02217.46681143 .00000587 00000-0 12450-3 0 6289
+2 25791 24.9811 216.2175 0010798 214.1027 145.8787 14.40980196164156
+FUSE 1
+1 25791U 99035A 02216.77424262 +.00000608 +00000-0 +13094-3 0 06446
+2 25791 024.9810 220.4589 0010860 206.6184 153.3766 14.40979799164058
+FUSE 1
+1 25791U 99035A 02216.22018763 .00000623 00000-0 13547-3 0 6272
+2 25791 24.9812 223.8548 0011013 200.8472 159.1590 14.40979503163971
+FUSE 1
+1 25791U 99035A 02215.18133380 .00000638 00000-0 14024-3 0 6265
+2 25791 24.9811 230.2141 0011063 190.3957 169.6323 14.40978710163820
+FUSE 1
+1 25791U 99035A 02213.72693828 .00000645 00000-0 14244-3 0 6252
+2 25791 24.9811 239.1154 0011038 174.9987 185.0630 14.40977412163613
+FUSE 1
+1 25791U 99035A 02212.54957017 .00000624 00000-0 13599-3 0 6242
+2 25791 24.9812 246.3230 0011021 162.5693 197.5196 14.40976134163444
+FUSE 1
+1 25791U 99035A 02211.71848578 +.00000610 +00000-0 +13168-3 0 06428
+2 25791 024.9811 251.4099 0011007 153.9347 206.1718 14.40975246163324
+FUSE 1
+1 25791U 99035A 02211.23368603 .00000608 00000-0 13095-3 0 6236
+2 25791 24.9811 254.3777 0010998 148.9909 211.1249 14.40974805163252
+FUSE 1
+1 25791U 99035A 02210.74888612 +.00000597 +00000-0 +12772-3 0 06506
+2 25791 024.9812 257.3445 0011002 143.8708 216.2543 14.40974298163187
+FUSE 1
+1 25791U 99035A 02209.98705743 +.00000587 +00000-0 +12459-3 0 06234
+2 25791 024.9812 262.0081 0011027 135.8366 224.3023 14.40973550163075
+FUSE 1
+1 25791U 99035A 02209.84854304 .00000587 00000-0 12459-3 0 6226
+2 25791 24.9812 262.8557 0011027 134.3832 225.7585 14.40973436163052
+FUSE 1
+1 25791U 99035A 02208.87894183 +.00000550 +00000-0 +11335-3 0 06274
+2 25791 024.9814 268.7902 0011057 124.1443 236.0120 14.40972331162918
+FUSE 1
+1 25791U 99035A 02208.53265521 .00000545 00000-0 11191-3 0 6213
+2 25791 24.9816 270.9107 0011057 120.4890 239.6710 14.40972045162867
+FUSE 1
+1 25791U 99035A 02207.21676421 .00000548 00000-0 11278-3 0 6200
+2 25791 24.9817 278.9666 0011052 107.3653 252.8065 14.40971121162675
+FUSE 1
+1 25791U 99035A 02206.87047673 +.00000547 +00000-0 +11238-3 0 06588
+2 25791 024.9817 281.0857 0011055 103.7292 256.4448 14.40970853162625
+FUSE 1
+1 25791U 99035A 02205.97012911 +.00000514 +00000-0 +10239-3 0 06208
+2 25791 024.9822 286.5981 0010989 094.6865 265.4898 14.40969946162493
+FUSE 1
+1 25791U 99035A 02205.83161386 .00000516 00000-0 10301-3 0 6194
+2 25791 24.9822 287.4462 0010983 93.2503 266.9261 14.40969873162472
+FUSE 1
+1 25791U 99035A 02204.86200730 +.00000468 +00000-0 +88363-4 0 06306
+2 25791 024.9826 293.3810 0010949 083.1743 277.0007 14.40968846162330
+FUSE 1
+1 25791U 99035A 02204.58497626 .00000484 00000-0 93112-4 0 6189
+2 25791 24.9826 295.0773 0010951 80.5497 279.6249 14.40968840162292
+FUSE 1
+1 25791U 99035A 02203.89239905 +.00000449 +00000-0 +82482-4 0 06488
+2 25791 024.9828 299.3172 0010890 073.2055 286.9638 14.40968123162191
+FUSE 1
+1 25791U 99035A 02203.13056333 .00000422 00000-0 74306-4 0 6170
+2 25791 24.9830 303.9805 0010839 65.4604 294.7027 14.40967491162089
+FUSE 1
+1 25791U 99035A 02201.88392126 .00000430 00000-0 76591-4 0 6169
+2 25791 24.9831 311.6129 0010788 52.8603 307.2893 14.40966950161907
+FUSE 1
+1 25791U 99035A 02200.84505139 .00000426 00000-0 75310-4 0 6156
+2 25791 24.9831 317.9723 0010726 42.0624 318.0702 14.40966400161754
+FUSE 1
+1 25791U 99035A 02199.94469674 +.00000428 +00000-0 +76045-4 0 06177
+2 25791 024.9831 323.4842 0010660 032.3527 327.7634 14.40965983161621
+FUSE 1
+1 25791U 99035A 02199.80618047 .00000429 00000-0 76448-4 0 6147
+2 25791 24.9831 324.3321 0010640 30.8653 329.2479 14.40965931161609
+FUSE 1
+1 25791U 99035A 02198.90582495 +.00000439 +00000-0 +79526-4 0 06303
+2 25791 024.9831 329.8436 0010600 021.3948 338.6994 14.40965565161478
+FUSE 1
+1 25791U 99035A 02198.55953443 .00000442 00000-0 80466-4 0 6139
+2 25791 24.9831 331.9633 0010574 17.8270 342.2607 14.40965414161429
+FUSE 1
+1 25791U 99035A 02197.93621100 +.00000444 +00000-0 +80937-4 0 06362
+2 25791 024.9831 335.7781 0010561 011.3039 348.7699 14.40965095161330
+FUSE 1
+1 25791U 99035A 02197.24362949 .00000444 00000-0 80988-4 0 6129
+2 25791 24.9831 340.0166 0010550 3.9600 356.0998 14.40964729161231
+FUSE 1
+1 25791U 99035A 02196.20475640 .00000449 00000-0 82478-4 0 6117
+2 25791 24.9832 346.3749 0010499 353.1602 6.8760 14.40964234161083
+FUSE 1
+1 25791U 99035A 02195.92772353 +.00000455 +00000-0 +84353-4 0 06533
+2 25791 024.9833 348.0711 0010484 350.1147 009.9154 14.40964150161041
+FUSE 1
+1 25791U 99035A 02194.95810905 +.00000446 +00000-0 +81482-4 0 06126
+2 25791 024.9834 354.0072 0010473 339.7777 020.2317 14.40963538160909
+FUSE 1
+1 25791U 99035A 02194.88885078 .00000448 00000-0 82042-4 0 6104
+2 25791 24.9834 354.4313 0010464 339.0255 20.9823 14.40963525160898
+FUSE 1
+1 25791U 99035A 02193.84997767 .00000458 00000-0 85132-4 0 6090
+2 25791 24.9833 0.7908 0010468 328.1332 31.8541 14.40963009160746
+FUSE 1
+1 25791U 99035A 02192.94962101 +.00000463 +00000-0 +86594-4 0 06116
+2 25791 024.9833 006.3022 0010480 318.4949 041.4767 14.40962539160615
+FUSE 1
+1 25791U 99035A 02192.81110453 .00000461 00000-0 86250-4 0 6080
+2 25791 24.9833 7.1500 0010464 316.9667 43.0024 14.40962462160593
+FUSE 1
+1 25791U 99035A 02191.91074766 +.00000486 +00000-0 +93771-4 0 06270
+2 25791 024.9834 012.6624 0010451 307.1503 052.8049 14.40962172160468
+FUSE 1
+1 25791U 99035A 02191.56445709 .00000480 00000-0 91884-4 0 6075
+2 25791 24.9832 14.7827 0010464 303.4798 56.4711 14.40961871160419
+FUSE 1
+1 25791U 99035A 02190.94113347 +.00000477 +00000-0 +90930-4 0 06343
+2 25791 024.9834 018.5979 0010445 296.7402 063.2037 14.40961502160324
+FUSE 1
+1 25791U 99035A 02190.17929374 .00000481 00000-0 92165-4 0 6069
+2 25791 24.9832 23.2616 0010481 288.6533 71.2835 14.40961043160211
+FUSE 1
+1 25791U 99035A 02189.14042204 .00000483 00000-0 92846-4 0 6059
+2 25791 24.9831 29.6230 0010511 277.8585 82.0723 14.40960393160069
+FUSE 1
+1 25791U 99035A 02187.89377604 .00000505 00000-0 99522-4 0 6046
+2 25791 24.9830 37.2551 0010534 264.3308 95.5998 14.40959812159883
+FUSE 1
+1 25791U 99035A 02186.43935654 .00000501 00000-0 98297-4 0 6033
+2 25791 24.9829 46.1591 0010579 249.0358 110.8998 14.40958795159675
+FUSE 1
+1 25791U 99035A 02185.19271205 .00000504 00000-0 99265-4 0 6028
+2 25791 24.9830 53.7902 0010629 236.0216 123.9281 14.40958001159492
+FUSE 1
+1 25791U 99035A 02184.15384184 .00000513 00000-0 10203-3 0 6017
+2 25791 24.9831 60.1514 0010674 224.8693 135.0951 14.40957412159345
+FUSE 1
+1 25791U 99035A 02182.97645554 +.00000516 +00000-0 +10283-3 0 06062
+2 25791 024.9830 067.3585 0010725 212.3891 147.5958 14.40956658159177
+FUSE 1
+1 25791U 99035A 02182.90719767 .00000519 00000-0 10371-3 0 6008
+2 25791 24.9829 67.7832 0010724 211.7115 148.2747 14.40956613159169
+FUSE 1
+1 25791U 99035A 02181.93758516 +.00000548 +00000-0 +11261-3 0 06062
+2 25791 024.9828 073.7191 0010818 201.1978 158.8084 14.40956221159028
+FUSE 1
+1 25791U 99035A 02181.86832717 .00000553 00000-0 11428-3 0 5992
+2 25791 24.9828 74.1435 0010825 200.5146 159.4931 14.40956212159019
+FUSE 1
+1 25791U 99035A 02180.96797324 +.00000532 +00000-0 +10787-3 0 06159
+2 25791 024.9829 079.6553 0010847 191.2420 168.7845 14.40955372158883
+FUSE 1
+1 25791U 99035A 02180.55242493 .00000529 00000-0 10681-3 0 5985
+2 25791 24.9829 82.1984 0010852 186.9486 173.0868 14.40955042158821
+FUSE 1
+1 25791U 99035A 02179.92910226 +.00000542 +00000-0 +11095-3 0 06155
+2 25791 024.9830 086.0152 0010926 180.7342 179.3149 14.40954738158730
+FUSE 1
+1 25791U 99035A 02179.23652162 .00000551 00000-0 11359-3 0 5973
+2 25791 24.9830 90.2545 0010946 173.5199 186.5457 14.40954304158635
+FUSE 1
+1 25791U 99035A 02177.98987603 +.00000542 +00000-0 +11095-3 0 06006
+2 25791 024.9832 097.8882 0011031 160.8337 199.2588 14.40953321158457
+FUSE 1
+1 25791U 99035A 02177.85135981 .00000538 00000-0 10963-3 0 5968
+2 25791 24.9832 98.7360 0011031 159.3474 200.7478 14.40953176158435
+FUSE 1
+1 25791U 99035A 02176.95100402 +.00000504 +00000-0 +99300-4 0 06022
+2 25791 024.9833 104.2472 0011004 150.1851 209.9284 14.40952226158308
+FUSE 1
+1 25791U 99035A 02176.46619641 .00000500 00000-0 98147-4 0 5953
+2 25791 24.9832 107.2138 0011008 145.0625 215.0606 14.40951875158232
+FUSE 1
+1 25791U 99035A 02175.21954740 .00000495 00000-0 96657-4 0 5943
+2 25791 24.9834 114.8444 0011052 132.0019 228.1431 14.40951047158052
+FUSE 1
+1 25791U 99035A 02173.90363925 .00000444 00000-0 81013-4 0 5939
+2 25791 24.9837 122.9038 0011028 119.1777 240.9836 14.40949793157868
+FUSE 1
+1 25791U 99035A 02172.51846935 .00000425 00000-0 75104-4 0 5924
+2 25791 24.9839 131.3835 0010980 104.9187 255.2530 14.40948920157661
+FUSE 1
+1 25791U 99035A 02171.41033186 .00000417 00000-0 72553-4 0 5913
+2 25791 24.9844 138.1686 0010902 93.6662 266.5092 14.40948370157502
+FUSE 1
+1 25791U 99035A 02170.50996877 +.00000436 +00000-0 +78639-4 0 05975
+2 25791 024.9843 143.6798 0010904 084.4115 275.7637 14.40948095157375
+FUSE 1
+1 25791U 99035A 02170.23293415 .00000423 00000-0 74576-4 0 5908
+2 25791 24.9845 145.3761 0010901 81.5059 278.6684 14.40947844157339
+FUSE 1
+1 25791U 99035A 02169.19405227 .00000425 00000-0 75062-4 0 5898
+2 25791 24.9846 151.7361 0010811 70.7002 289.4672 14.40947374157183
+FUSE 1
+1 25791U 99035A 02167.60109739 .00000492 00000-0 95589-4 0 5880
+2 25791 24.9842 161.4859 0010787 54.1241 306.0266 14.40947018156956
+FUSE 1
+1 25791U 99035A 02166.56221265 .00000534 00000-0 10864-3 0 5871
+2 25791 24.9839 167.8442 0010791 43.1206 317.0146 14.40946662156801
+FUSE 1
+1 25791U 99035A 02165.24629112 .00000568 00000-0 11909-3 0 5865
+2 25791 24.9843 175.9013 0010722 29.2251 330.8852 14.40946031156615
+FUSE 1
+1 25791U 99035A 02163.86110918 .00000595 00000-0 12719-3 0 5859
+2 25791 24.9845 184.3792 0010702 14.8284 345.2538 14.40945180156412
+FUSE 1
+1 25791U 99035A 02162.54518530 .00000658 00000-0 14664-3 0 5845
+2 25791 24.9846 192.4369 0010588 1.1350 358.9185 14.40944578156226
+FUSE 1
+1 25791U 99035A 02161.85259359 +.00000674 +00000-0 +15131-3 0 06107
+2 25791 024.9846 196.6771 0010590 353.7741 006.2633 14.40944011156124
+FUSE 1
+1 25791U 99035A 02161.22926069 .00000700 00000-0 15929-3 0 5831
+2 25791 24.9847 200.4935 0010585 347.0023 13.0212 14.40943608156034
+FUSE 1
+1 25791U 99035A 02159.84407613 .00000743 00000-0 17262-3 0 5823
+2 25791 24.9846 208.9724 0010588 332.2220 27.7726 14.40942460155834
+FUSE 1
+1 25791U 99035A 02158.80518770 .00000793 00000-0 18784-3 0 5819
+2 25791 24.9846 215.3341 0010581 321.3048 38.6704 14.40941632155681
+FUSE 1
+1 25791U 99035A 02157.97407665 +.00000825 +00000-0 +19757-3 0 05879
+2 25791 024.9847 220.4222 0010562 312.3796 047.5815 14.40940838155562
+FUSE 1
+1 25791U 99035A 02157.55852103 .00000870 00000-0 21141-3 0 5807
+2 25791 24.9847 222.9680 0010439 307.4635 52.4923 14.40940695155507
+FUSE 1
+1 25791U 99035A 02156.86592860 +.00000855 +00000-0 +20693-3 0 06042
+2 25791 024.9846 227.2073 0010554 299.6921 060.2540 14.40939609155402
+FUSE 1
+1 25791U 99035A 02156.24259499 .00000899 00000-0 22019-3 0 5795
+2 25791 24.9846 231.0244 0010551 292.5198 67.4193 14.40939088155314
+FUSE 1
+1 25791U 99035A 02155.06518757 .00000887 00000-0 21661-3 0 5787
+2 25791 24.9851 238.2318 0010502 278.6019 81.3297 14.40937436155140
+FUSE 1
+1 25791U 99035A 02154.92666911 +.00000889 +00000-0 +21739-3 0 06067
+2 25791 024.9851 239.0795 0010509 277.1250 082.8066 14.40937258155126
+FUSE 1
+1 25791U 99035A 02153.88777948 .00000883 00000-0 21546-3 0 5771
+2 25791 24.9856 245.4403 0010777 265.3681 94.5596 14.40935853154971
+FUSE 1
+1 25791U 99035A 02152.57185272 .00000902 00000-0 22117-3 0 5765
+2 25791 24.9868 253.4989 0011060 249.3519 110.5805 14.40934379154783
+FUSE 1
+1 25791U 99035A 02151.53296309 .00000970 00000-0 24192-3 0 5753
+2 25791 24.9869 259.8581 0011180 238.2453 121.6966 14.40933320154639
+FUSE 1
+1 25791U 99035A 02150.70185103 +.00001051 +00000-0 +26686-3 0 05975
+2 25791 024.9867 264.9433 0011243 229.4877 130.4651 14.40932501154518
+FUSE 1
+1 25791U 99035A 02149.93999876 .00001091 00000-0 27908-3 0 5745
+2 25791 24.9867 269.6053 0011249 221.4930 138.4719 14.40931407154401
+FUSE 1
+1 25791U 99035A 02148.90111038 +.00001229 +00000-0 +32134-3 0 05769
+2 25791 024.9863 275.9625 0011269 210.6845 149.3088 14.40930136154250
+FUSE 1
+1 25791U 99035A 02148.83185155 .00000938 00000-0 23221-3 0 5732
+2 25791 24.9851 276.3822 0010775 212.4019 147.5850 14.40927933154242
+FUSE 1
+1 25791U 99035A 02147.93147934 +.00000813 +00000-0 +19395-3 0 05958
+2 25791 024.9857 281.8960 0010898 202.6278 157.3749 14.40926137154113
+FUSE 1
+1 25791U 99035A 02147.58518187 .00001001 00000-0 25172-3 0 5726
+2 25791 24.9861 284.0183 0011012 197.6860 162.3263 14.40926704154060
+FUSE 1
+1 25791U 99035A 02146.54628978 .00000913 00000-0 22451-3 0 5718
+2 25791 24.9845 290.3753 0010754 189.6041 170.4268 14.40924183153916
+FUSE 1
+1 25791U 99035A 02145.16109886 .00000752 00000-0 17520-3 0 5708
+2 25791 24.9854 298.8585 0011057 175.5591 184.5015 14.40921808153718
+FUSE 1
+1 25791U 99035A 02144.12220258 .00000806 00000-0 19188-3 0 5690
+2 25791 24.9858 305.2220 0011313 166.0837 193.9972 14.40920971153563
+FUSE 1
+1 25791U 99035A 02143.91442346 +.00000815 +00000-0 +19451-3 0 06009
+2 25791 024.9859 306.4952 0011363 164.3048 195.7813 14.40920803153534
+FUSE 1
+1 25791U 99035A 02142.94478746 +.00000943 +00000-0 +23384-3 0 05690
+2 25791 024.9854 312.4312 0011411 153.9631 206.1530 14.40920479153398
+FUSE 1
+1 25791U 99035A 02142.87552765 .00000884 00000-0 21574-3 0 5688
+2 25791 24.9848 312.8512 0010954 151.9799 208.1299 14.40919629153389
+FUSE 1
+1 25791U 99035A 02141.90588955 +.00000926 +00000-0 +22857-3 0 05874
+2 25791 024.9841 318.7826 0010700 140.9341 219.1940 14.40918429153242
+FUSE 1
+1 25791U 99035A 02141.55958991 .00000963 00000-0 23993-3 0 5677
+2 25791 24.9839 320.9048 0010714 137.4073 222.7267 14.40918220153193
+FUSE 1
+1 25791U 99035A 02140.17438775 .00001057 00000-0 26889-3 0 5668
+2 25791 24.9835 329.3818 0010822 124.7440 235.4086 14.40916869152998
+FUSE 1
+1 25791U 99035A 02139.96660755 +.00001083 +00000-0 +27692-3 0 05884
+2 25791 024.9836 330.6540 0010888 122.4431 237.7130 14.40916754152968
+FUSE 1
+1 25791U 99035A 02139.06622508 .00001163 00000-0 30126-3 0 5659
+2 25791 24.9830 336.1650 0010863 113.3928 246.7719 14.40915711152839
+FUSE 1
+1 25791U 99035A 02137.88879990 .00001296 00000-0 34198-3 0 5645
+2 25791 24.9826 343.3712 0010907 101.0863 259.0871 14.40914401152666
+FUSE 1
+1 25791U 99035A 02136.91915471 +.00001350 +00000-0 +35875-3 0 05816
+2 25791 024.9827 349.3060 0010932 090.9446 269.2314 14.40912681152528
+FUSE 1
+1 25791U 99035A 02136.22654987 .00001376 00000-0 36654-3 0 5636
+2 25791 24.9826 353.5443 0010936 83.6416 276.5336 14.40911244152427
+FUSE 1
+1 25791U 99035A 02135.94950762 +.00001397 +00000-0 +37325-3 0 05723
+2 25791 024.9825 355.2400 0010966 080.7402 279.4344 14.40910769152381
+FUSE 1
+1 25791U 99035A 02135.18764091 .00001413 00000-0 37797-3 0 5628
+2 25791 24.9824 359.9024 0010965 72.6730 287.4977 14.40909002152273
+FUSE 1
+1 25791U 99035A 02134.91059834 +.00001415 +00000-0 +37857-3 0 05922
+2 25791 024.9825 001.5980 0010968 069.7349 290.4345 14.40908337152230
+FUSE 1
+1 25791U 99035A 02133.94094738 +.00001415 +00000-0 +37859-3 0 05636
+2 25791 024.9824 007.5352 0010877 059.9778 300.1809 14.40905944152093
+FUSE 1
+1 25791U 99035A 02133.87168652 .00001412 00000-0 37775-3 0 5617
+2 25791 24.9825 7.9592 0010873 59.2261 300.9315 14.40905750152084
+FUSE 1
+1 25791U 99035A 02132.48646600 .00001369 00000-0 36456-3 0 5602
+2 25791 24.9823 16.4325 0010684 45.9733 314.1653 14.40902098151888
+FUSE 1
+1 25791U 99035A 02131.30902586 .00001353 00000-0 35975-3 0 5596
+2 25791 24.9822 23.6391 0010610 33.6244 326.4935 14.40899142151716
+FUSE 1
+1 25791U 99035A 02130.20084454 .00001308 00000-0 34583-3 0 5582
+2 25791 24.9820 30.4208 0010580 22.0031 338.0932 14.40896173151558
+FUSE 1
+1 25791U 99035A 02129.16192230 .00001226 00000-0 32085-3 0 5570
+2 25791 24.9821 36.7788 0010481 11.1643 348.9097 14.40893274151404
+FUSE 1
+1 25791U 99035A 02128.95413775 +.00001211 +00000-0 +31627-3 0 05931
+2 25791 024.9821 038.0520 0010468 008.7737 351.2951 14.40892692151379
+FUSE 1
+1 25791U 99035A 02127.98447523 +.00001111 +00000-0 +28565-3 0 05601
+2 25791 024.9824 043.9896 0010296 357.7755 002.2712 14.40889924151236
+FUSE 1
+1 25791U 99035A 02127.91521357 .00001094 00000-0 28026-3 0 5569
+2 25791 24.9824 44.4136 0010284 357.0692 2.9753 14.40889652151228
+FUSE 1
+1 25791U 99035A 02126.94554859 +.00001060 +00000-0 +27008-3 0 05601
+2 25791 024.9824 050.3495 0010262 346.7330 013.2907 14.40887620151085
+FUSE 1
+1 25791U 99035A 02126.87628689 .00001055 00000-0 26832-3 0 5558
+2 25791 24.9824 50.7736 0010263 346.0680 13.9545 14.40887452151076
+FUSE 1
+1 25791U 99035A 02125.97588259 +.00001014 +00000-0 +25588-3 0 05671
+2 25791 024.9823 056.2855 0010259 336.2920 023.7116 14.40885529150942
+FUSE 1
+1 25791U 99035A 02125.42178682 .00001006 00000-0 25328-3 0 5545
+2 25791 24.9822 59.6761 0010255 330.4733 29.5196 14.40884531150863
+FUSE 1
+1 25791U 99035A 02124.38285672 .00001011 00000-0 25509-3 0 5533
+2 25791 24.9820 66.0352 0010273 319.4923 40.4821 14.40882801150716
+FUSE 1
+1 25791U 99035A 02123.20540156 .00000953 00000-0 23705-3 0 5523
+2 25791 24.9824 73.2432 0010279 305.7597 54.1955 14.40880460150540
+FUSE 1
+1 25791U 99035A 02121.95868326 +.00001002 +00000-0 +25225-3 0 05542
+2 25791 024.9819 080.8762 0010331 292.1373 067.8041 14.40878747150366
+FUSE 1
+1 25791U 99035A 02121.54311021 .00001003 00000-0 25248-3 0 5515
+2 25791 24.9819 83.4189 0010337 287.6956 72.2421 14.40878063150307
+FUSE 1
+1 25791U 99035A 02120.98901322 +.00001023 +00000-0 +25857-3 0 05632
+2 25791 024.9818 086.8098 0010306 282.1201 077.8157 14.40877264150221
+FUSE 1
+1 25791U 99035A 02120.22712923 .00001015 00000-0 25630-3 0 5502
+2 25791 24.9819 91.4718 0010318 274.0246 85.9082 14.40875930150118
+FUSE 1
+1 25791U 99035A 02119.95008070 +.00001028 +00000-0 +26024-3 0 05648
+2 25791 024.9817 093.1681 0010309 271.2034 088.7294 14.40875508150070
+FUSE 1
+1 25791U 99035A 02119.18819734 .00000984 00000-0 24661-3 0 5498
+2 25791 24.9821 97.8348 0010364 262.8749 97.0580 14.40873938149968
+FUSE 1
+1 25791U 99035A 02117.59516608 .00000965 00000-0 24087-3 0 5485
+2 25791 24.9822 107.5863 0010462 245.7519 114.1894 14.40871219149738
+FUSE 1
+1 25791U 99035A 02116.55623223 .00001014 00000-0 25598-3 0 5475
+2 25791 24.9819 113.9469 0010496 234.8360 125.1166 14.40869721149589
+FUSE 1
+1 25791U 99035A 02115.24024880 .00000904 00000-0 22221-3 0 5460
+2 25791 24.9822 122.0047 0010673 220.6675 139.3037 14.40867070149393
+FUSE 1
+1 25791U 99035A 02113.64721393 .00000997 00000-0 25068-3 0 5458
+2 25791 24.9820 131.7593 0010921 204.4419 155.5575 14.40864885149169
+FUSE 1
+1 25791U 99035A 02112.60827693 .00001229 00000-0 32167-3 0 5449
+2 25791 24.9818 138.1223 0011109 194.3356 165.6844 14.40863758149016
+FUSE 1
+1 25791U 99035A 02111.70786489 +.00001579 +00000-0 +42935-3 0 05459
+2 25791 024.9818 143.6347 0011005 184.3083 175.7332 14.40862715148885
+FUSE 1
+1 25791U 99035A 02111.56934007 .00001615 00000-0 44009-3 0 5437
+2 25791 24.9819 144.4840 0011022 182.6205 177.4245 14.40862480148868
+FUSE 1
+1 25791U 99035A 02110.53040188 .00001831 00000-0 50650-3 0 5429
+2 25791 24.9817 150.8474 0011038 171.9009 188.1678 14.40859918148715
+FUSE 1
+1 25791U 99035A 02109.21441033 .00001839 00000-0 50903-3 0 5414
+2 25791 24.9818 158.9076 0011058 159.5103 200.5858 14.40855347148522
+FUSE 1
+1 25791U 99035A 02107.75988762 .00001806 00000-0 49905-3 0 5409
+2 25791 24.9818 167.8101 0011016 144.5815 215.5425 14.40850340148319
+FUSE 1
+1 25791U 99035A 02106.72093909 .00001824 00000-0 50445-3 0 5394
+2 25791 24.9819 174.1696 0011038 134.1147 226.0286 14.40847102148164
+FUSE 1
+1 25791U 99035A 02105.61272498 .00001733 00000-0 47679-3 0 5386
+2 25791 24.9822 180.9533 0010987 122.6889 237.4679 14.40842753148002
+FUSE 1
+1 25791U 99035A 02104.85082480 +.00001713 +00000-0 +47068-3 0 05437
+2 25791 024.9823 185.6152 0010986 114.8415 245.3238 14.40840218147898
+FUSE 1
+1 25791U 99035A 02104.57377071 .00001648 00000-0 45060-3 0 5379
+2 25791 24.9828 187.3119 0010910 112.4216 247.7465 14.40838832147858
+FUSE 1
+1 25791U 99035A 02102.91143625 .00001546 00000-0 41945-3 0 5365
+2 25791 24.9833 197.4876 0010832 95.2901 264.8851 14.40833179147610
+FUSE 1
+1 25791U 99035A 02101.94173617 +.00001486 +00000-0 +40101-3 0 05367
+2 25791 024.9836 203.4219 0010768 085.1671 275.0035 14.40830065147475
+FUSE 1
+1 25791U 99035A 02101.87247187 .00001527 00000-0 41368-3 0 5354
+2 25791 24.9836 203.8460 0010860 84.9976 275.1776 14.40830297147464
+FUSE 1
+1 25791U 99035A 02100.90276910 +.00001525 +00000-0 +41312-3 0 05406
+2 25791 024.9836 209.7805 0010820 074.8575 285.3127 14.40827651147329
+FUSE 1
+1 25791U 99035A 02100.55644706 .00001466 00000-0 39504-3 0 5346
+2 25791 24.9839 211.9005 0010785 71.2224 288.9455 14.40826227147276
+FUSE 1
+1 25791U 99035A 02099.72527026 +.00001468 +00000-0 +39557-3 0 05369
+2 25791 024.9839 216.9860 0010792 062.4507 297.7098 14.40824076147152
+FUSE 1
+1 25791U 99035A 02099.51747561 .00001466 00000-0 39497-3 0 5332
+2 25791 24.9839 218.2573 0010790 60.2600 299.8974 14.40823521147123
+FUSE 1
+1 25791U 99035A 02098.96335660 +.00001461 +00000-0 +39351-3 0 05517
+2 25791 024.9839 221.6473 0010791 054.4596 305.6917 14.40822053147043
+FUSE 1
+1 25791U 99035A 02097.99364657 .00001460 00000-0 39305-3 0 5324
+2 25791 24.9840 227.5821 0010785 44.3275 315.8094 14.40819548146900
+FUSE 1
+1 25791U 99035A 02096.88540384 .00001474 00000-0 39764-3 0 5317
+2 25791 24.9839 234.3643 0010788 32.8173 327.3012 14.40816799146743
+FUSE 1
+1 25791U 99035A 02095.63862735 .00001487 00000-0 40141-3 0 5300
+2 25791 24.9840 241.9943 0010816 19.8188 340.2741 14.40813643146563
+FUSE 1
+1 25791U 99035A 02094.59964440 .00001479 00000-0 39900-3 0 5290
+2 25791 24.9841 248.3515 0010781 8.9830 351.0866 14.40810859146412
+FUSE 1
+1 25791U 99035A 02093.56066001 .00001449 00000-0 39004-3 0 5283
+2 25791 24.9842 254.7110 0010724 357.7982 2.2481 14.40807913146263
+FUSE 1
+1 25791U 99035A 02092.17534371 .00001416 00000-0 37974-3 0 5276
+2 25791 24.9846 263.1915 0010706 342.3947 17.6181 14.40804146146065
+FUSE 1
+1 25791U 99035A 02091.06708795 .00001473 00000-0 39722-3 0 5261
+2 25791 24.9844 269.9758 0010605 329.8586 30.1311 14.40801748145901
+FUSE 1
+1 25791U 99035A 02090.92855601 +.00001487 +00000-0 +40157-3 0 05410
+2 25791 024.9846 270.8250 0010580 328.4929 031.4942 14.40801529145887
+FUSE 1
+1 25791U 99035A 02089.95883174 +.00001422 +00000-0 +38169-3 0 05269
+2 25791 024.9848 276.7588 0010511 318.2311 041.7395 14.40798658145743
+FUSE 1
+1 25791U 99035A 02089.88956560 .00001421 00000-0 38139-3 0 5256
+2 25791 24.9849 277.1827 0010506 317.5131 42.4562 14.40798492145730
+FUSE 1
+1 25791U 99035A 02088.15791078 .00001515 00000-0 41010-3 0 5241
+2 25791 24.9847 287.7803 0010520 298.7755 61.1699 14.40794544145482
+FUSE 1
+1 25791U 99035A 02087.95011214 +.00001499 +00000-0 +40534-3 0 05370
+2 25791 024.9848 289.0527 0010533 296.5864 063.3562 14.40793924145453
+FUSE 1
+1 25791U 99035A 02086.91111703 .00001749 00000-0 48209-3 0 5239
+2 25791 24.9841 295.4106 0010495 285.4100 74.5251 14.40792142145301
+FUSE 1
+1 25791U 99035A 02085.94138844 +.00001800 +00000-0 +49790-3 0 05230
+2 25791 024.9840 301.3448 0010492 275.1890 084.7423 14.40789187145168
+FUSE 1
+1 25791U 99035A 02085.87212209 .00001800 00000-0 49784-3 0 5222
+2 25791 24.9839 301.7687 0010498 274.4524 85.4786 14.40788939145150
+FUSE 1
+1 25791U 99035A 02084.20972717 .00001789 00000-0 49461-3 0 5212
+2 25791 24.9837 311.9410 0010520 257.1269 102.8063 14.40783400144918
+FUSE 1
+1 25791U 99035A 02083.17072852 .00001737 00000-0 47850-3 0 5200
+2 25791 24.9841 318.3008 0010603 246.6391 113.2992 14.40779739144768
+FUSE 1
+1 25791U 99035A 02081.92392783 .00001713 00000-0 47112-3 0 5192
+2 25791 24.9843 325.9324 0010711 233.7134 126.2384 14.40775609144588
+FUSE 1
+1 25791U 99035A 02080.88492453 .00001724 00000-0 47457-3 0 5184
+2 25791 24.9839 332.2902 0010758 223.1027 136.8641 14.40772451144430
+FUSE 1
+1 25791U 99035A 02079.98445671 +.00001660 +00000-0 +45511-3 0 05248
+2 25791 024.9866 337.8089 0010640 212.3177 147.6681 14.40769396144307
+FUSE 1
+1 25791U 99035A 02079.36105289 .00001660 00000-0 45502-3 0 5170
+2 25791 24.9864 341.6231 0010625 205.7116 154.2858 14.40767508144212
+FUSE 1
+1 25791U 99035A 02078.94545013 +.00001663 +00000-0 +45593-3 0 05203
+2 25791 024.9866 344.1681 0010662 201.5314 158.4745 14.40766326144157
+FUSE 1
+1 25791U 99035A 02078.18351059 .00001670 00000-0 45823-3 0 5163
+2 25791 24.9867 348.8302 0010676 193.5096 166.5127 14.40764131144045
+FUSE 1
+1 25791U 99035A 02076.93669799 +.00001712 +00000-0 +47120-3 0 05188
+2 25791 024.9862 356.4616 0010674 180.4765 179.5730 14.40760708143868
+FUSE 1
+1 25791U 99035A 02076.86743038 .00001720 00000-0 47342-3 0 5151
+2 25791 24.9861 356.8853 0010677 179.8078 180.2432 14.40760558143856
+FUSE 1
+1 25791U 99035A 02075.34354341 .00001769 00000-0 48858-3 0 5143
+2 25791 24.9857 6.2089 0010689 164.1831 195.9013 14.40756227143637
+FUSE 1
+1 25791U 99035A 02074.23525935 .00001789 00000-0 49489-3 0 5131
+2 25791 24.9864 12.9917 0010652 152.3559 207.7514 14.40752965143470
+FUSE 1
+1 25791U 99035A 02073.95818794 +.00001809 +00000-0 +50096-3 0 05215
+2 25791 024.9863 014.6889 0010627 149.3903 210.7224 14.40752237143437
+FUSE 1
+1 25791U 99035A 02073.19624002 .00001826 00000-0 50609-3 0 5127
+2 25791 24.9865 19.3522 0010642 141.9145 218.2115 14.40749948143323
+FUSE 1
+1 25791U 99035A 02072.91916797 +.00001841 +00000-0 +51076-3 0 05363
+2 25791 024.9864 021.0498 0010609 139.0566 221.0741 14.40749171143282
+FUSE 1
+1 25791U 99035A 02071.53380359 .00001868 00000-0 51930-3 0 5110
+2 25791 24.9870 29.5310 0010560 125.3666 234.7831 14.40744898143080
+FUSE 1
+1 25791U 99035A 02070.97965627 +.00001883 +00000-0 +52391-3 0 05124
+2 25791 024.9873 032.9250 0010530 120.0536 240.1014 14.40743233143007
+FUSE 1
+1 25791U 99035A 02070.49477683 .00001888 00000-0 52553-3 0 5104
+2 25791 24.9873 35.8909 0010528 115.0412 245.1193 14.40741625142931
+FUSE 1
+1 25791U 99035A 02069.24793971 .00001911 00000-0 53253-3 0 5099
+2 25791 24.9880 43.5225 0010388 102.6935 257.4711 14.40737632142757
+FUSE 1
+1 25791U 99035A 02068.20890526 .00001963 00000-0 54852-3 0 5080
+2 25791 24.9877 49.8807 0010265 92.5971 267.5712 14.40734504142601
+FUSE 1
+1 25791U 99035A 02066.40790516 .00002019 00000-0 56597-3 0 5078
+2 25791 24.9882 60.8982 0010140 74.0227 286.1405 14.40728545142340
+FUSE 1
+1 25791U 99035A 02065.23032416 .00001976 00000-0 55274-3 0 5067
+2 25791 24.9890 68.1059 0009928 61.2977 298.8527 14.40723876142175
+FUSE 1
+1 25791U 99035A 02063.63711823 +.00001966 +00000-0 +54965-3 0 05060
+2 25791 024.9889 077.8519 0009855 044.5446 315.5856 14.40718057141946
+FUSE 1
+1 25791U 99035A 02063.56784827 .00001964 00000-0 54915-3 0 5058
+2 25791 24.9890 78.2758 0009853 43.7948 316.3342 14.40717794141939
+FUSE 1
+1 25791U 99035A 02062.25171546 .00001967 00000-0 55002-3 0 5041
+2 25791 24.9898 86.3315 0009720 29.5760 330.5288 14.40713207141744
+FUSE 1
+1 25791U 99035A 02060.72776629 .00001974 00000-0 55231-3 0 5035
+2 25791 24.9904 95.6541 0009691 13.5587 346.5178 14.40707846141526
+FUSE 1
+1 25791U 99035A 02059.68870443 .00002061 00000-0 57921-3 0 5022
+2 25791 24.9908 102.0122 0009670 2.3178 357.7366 14.40705063141372
+FUSE 1
+1 25791U 99035A 02058.58037276 +.00001937 +00000-0 +54089-3 0 05190
+2 25791 024.9855 108.7808 0010347 348.8163 011.2115 14.40699031141216
+FUSE 1
+1 25791U 99035A 02058.23401784 .00001930 00000-0 53890-3 0 5014
+2 25791 24.9854 110.8994 0010344 345.1099 14.9105 14.40697723141169
+FUSE 1
+1 25791U 99035A 02057.95693361 +.00001927 +00000-0 +53794-3 0 05295
+2 25791 024.9853 112.5943 0010342 342.2401 017.7744 14.40696709141123
+FUSE 1
+1 25791U 99035A 02056.98714049 +.00001855 +00000-0 +51590-3 0 05016
+2 25791 024.9848 118.5439 0010389 330.7846 029.2084 14.40692621140986
+FUSE 1
+1 25791U 99035A 02056.84859804 .00001856 00000-0 51612-3 0 5005
+2 25791 24.9848 119.3917 0010396 329.3558 30.6348 14.40692155140967
+FUSE 1
+1 25791U 99035A 02055.87879896 +.00001862 +00000-0 +51795-3 0 05009
+2 25791 024.9847 125.3251 0010386 318.7436 041.2281 14.40688909140821
+FUSE 1
+1 25791U 99035A 02055.80952754 .00001868 00000-0 51976-3 0 4991
+2 25791 24.9847 125.7494 0010379 317.8153 42.1555 14.40688735140812
+FUSE 1
+1 25791U 99035A 02054.56264168 .00001830 00000-0 50822-3 0 4985
+2 25791 24.9853 133.3826 0010404 303.6462 56.3056 14.40684284140636
+FUSE 1
+1 25791U 99035A 02051.93031607 +.00001939 +00000-0 +54187-3 0 04981
+2 25791 024.9846 149.4920 0010329 274.4706 085.4618 14.40676334140255
+FUSE 1
+1 25791U 99035A 02051.86104389 .00001949 00000-0 54496-3 0 4963
+2 25791 24.9847 149.9167 0010322 273.5085 86.4222 14.40676201140241
+FUSE 1
+1 25791U 99035A 02050.89124093 +.00001793 +00000-0 +49705-3 0 04963
+2 25791 024.9879 155.8456 0009888 267.6928 092.2444 14.40671793140105
+FUSE 1
+1 25791U 99035A 02050.82196891 .00001795 00000-0 49764-3 0 4957
+2 25791 24.9879 156.2699 0009920 266.9073 93.0299 14.40671596140095
+FUSE 1
+1 25791U 99035A 02049.85216173 +.00001762 +00000-0 +48738-3 0 05049
+2 25791 024.9881 162.2061 0009833 257.1871 102.7547 14.40668129139954
+FUSE 1
+1 25791U 99035A 02049.57507351 .00001745 00000-0 48221-3 0 4945
+2 25791 24.9884 163.9032 0009829 254.4578 105.4840 14.40667101139913
+FUSE 1
+1 25791U 99035A 02048.18962711 .00001789 00000-0 49573-3 0 4934
+2 25791 24.9865 172.3765 0010089 240.4382 119.5119 14.40662912139715
+FUSE 1
+1 25791U 99035A 02047.15054256 .00001796 00000-0 49804-3 0 4920
+2 25791 24.9866 178.7417 0010129 229.8799 130.0812 14.40659621139562
+FUSE 1
+1 25791U 99035A 02045.83436523 .00001840 00000-0 51150-3 0 4910
+2 25791 24.9866 186.7961 0010148 215.4593 144.5240 14.40655733139373
+FUSE 1
+1 25791U 99035A 02044.79527556 +.00001873 +00000-0 +52184-3 0 04971
+2 25791 024.9863 193.1524 0010137 204.2065 155.7965 14.40652516139223
+FUSE 1
+1 25791U 99035A 02044.51818359 .00001925 00000-0 53776-3 0 4904
+2 25791 24.9860 194.8476 0010191 201.0271 158.9809 14.40652078139188
+FUSE 1
+1 25791U 99035A 02043.82545578 +.00001946 +00000-0 +54433-3 0 04990
+2 25791 024.9858 199.0847 0010200 193.6793 166.3433 14.40649817139082
+FUSE 1
+1 25791U 99035A 02042.92490752 .00001992 00000-0 55840-3 0 4896
+2 25791 24.9856 204.5925 0010259 184.1947 175.8472 14.40647025138951
+FUSE 1
+1 25791U 99035A 02041.95508458 +.00002053 +00000-0 +57741-3 0 04892
+2 25791 024.9856 210.5265 0010300 173.9651 186.0980 14.40644069138818
+FUSE 1
+1 25791U 99035A 02041.88581150 .00002073 00000-0 58348-3 0 4889
+2 25791 24.9861 210.9521 0010311 172.9624 187.1028 14.40644058138806
+FUSE 1
+1 25791U 99035A 02040.56961753 .00002206 00000-0 62450-3 0 4870
+2 25791 24.9858 219.0013 0010484 159.5673 200.5249 14.40640287138618
+FUSE 1
+1 25791U 99035A 02039.53051625 .00002255 00000-0 63954-3 0 4866
+2 25791 24.9858 225.3571 0010553 148.4366 211.6776 14.40636535138462
+FUSE 1
+1 25791U 99035A 02038.14504167 .00002351 00000-0 66921-3 0 4859
+2 25791 24.9858 233.8326 0010636 134.1993 225.9382 14.40631676138264
+FUSE 1
+1 25791U 99035A 02037.93721974 +.00002397 +00000-0 +68340-3 0 04938
+2 25791 024.9861 235.1054 0010736 131.7488 228.3923 14.40631273138232
+FUSE 1
+1 25791U 99035A 02036.89810875 .00002492 00000-0 71274-3 0 4847
+2 25791 24.9862 241.4623 0010829 122.1317 238.0237 14.40627644138089
+FUSE 1
+1 25791U 99035A 02035.92826968 +.00002548 +00000-0 +73019-3 0 04841
+2 25791 024.9863 247.3934 0010862 112.4256 247.7399 14.40623688137945
+FUSE 1
+1 25791U 99035A 02035.85899543 .00002552 00000-0 73123-3 0 4832
+2 25791 24.9863 247.8171 0010864 111.6988 248.4676 14.40623397137930
+FUSE 1
+1 25791U 99035A 02034.95842869 +.00002563 +00000-0 +73476-3 0 04924
+2 25791 024.9867 253.3259 0010904 102.2272 257.9457 14.40619245137805
+FUSE 1
+1 25791U 99035A 02034.26568177 .00002587 00000-0 74211-3 0 4828
+2 25791 24.9865 257.5631 0010840 95.4477 264.7266 14.40616180137700
+FUSE 1
+1 25791U 99035A 02033.22656041 .00002588 00000-0 74253-3 0 4817
+2 25791 24.9868 263.9212 0010966 84.6163 275.5595 14.40611176137558
+FUSE 1
+1 25791U 99035A 02032.18743380 .00002587 00000-0 74231-3 0 4808
+2 25791 24.9869 270.2766 0010977 73.7493 286.4230 14.40606150137408
+FUSE 1
+1 25791U 99035A 02030.94047759 +.00002528 +00000-0 +72437-3 0 04808
+2 25791 024.9874 277.9037 0011018 060.9223 299.2389 14.40599492137222
+FUSE 1
+1 25791U 99035A 02030.87120198 .00002526 00000-0 72362-3 0 4792
+2 25791 24.9874 278.3273 0011014 60.1902 299.9702 14.40599135137210
+FUSE 1
+1 25791U 99035A 02029.34713303 .00002495 00000-0 71439-3 0 4786
+2 25791 24.9875 287.6482 0010997 44.3035 315.8351 14.40591646136997
+FUSE 1
+1 25791U 99035A 02028.93147652 +.00002479 +00000-0 +70929-3 0 04862
+2 25791 024.9876 290.1899 0010994 039.9697 320.1619 14.40589498136932
+FUSE 1
+1 25791U 99035A 02028.16943701 .00002474 00000-0 70791-3 0 4778
+2 25791 24.9876 294.8500 0011006 32.1353 327.9821 14.40585928136823
+FUSE 1
+1 25791U 99035A 02027.96161389 +.00002407 +00000-0 +68742-3 0 05050
+2 25791 024.9874 296.1287 0010582 028.3810 331.7529 14.40584028136795
+FUSE 1
+1 25791U 99035A 02026.92246706 .00002341 00000-0 66697-3 0 4763
+2 25791 24.9799 302.5272 0010059 16.0811 344.0013 14.40577732136644
+FUSE 1
+1 25791U 99035A 02025.39837504 .00002257 00000-0 64121-3 0 4750
+2 25791 24.9803 311.8488 0010138 359.9596 0.0915 14.40570421136423
+FUSE 1
+1 25791U 99035A 02024.22066220 .00002170 00000-0 61445-3 0 4749
+2 25791 24.9808 319.0539 0010178 346.9833 13.0414 14.40564803136255
+FUSE 1
+1 25791U 99035A 02023.94355340 +.00002127 +00000-0 +60118-3 0 04963
+2 25791 024.9808 320.7502 0010231 343.9239 016.0947 14.40563257136213
+FUSE 1
+1 25791U 99035A 02022.97366856 +.00002070 +00000-0 +58368-3 0 04746
+2 25791 024.9809 326.6854 0010289 333.5703 026.4279 14.40558911136071
+FUSE 1
+1 25791U 99035A 02022.90439095 .00002070 00000-0 58368-3 0 4734
+2 25791 24.9809 327.1090 0010289 332.8439 27.1535 14.40558648136066
+FUSE 1
+1 25791U 99035A 02021.93450374 +.00001972 +00000-0 +55342-3 0 04738
+2 25791 024.9815 333.0432 0010420 322.2211 037.7568 14.40554066135924
+FUSE 1
+1 25791U 99035A 02021.51883604 .00001971 00000-0 55294-3 0 4722
+2 25791 24.9815 335.5850 0010420 317.8920 42.0786 14.40552554135866
+FUSE 1
+1 25791U 99035A 02020.34111020 .00001902 00000-0 53176-3 0 4718
+2 25791 24.9819 342.7879 0010496 305.4885 54.4643 14.40547753135692
+FUSE 1
+1 25791U 99035A 02019.23265919 .00001870 00000-0 52196-3 0 4705
+2 25791 24.9819 349.5667 0010511 294.0221 65.9186 14.40543639135538
+FUSE 1
+1 25791U 99035A 02018.19348466 .00001814 00000-0 50458-3 0 4693
+2 25791 24.9822 355.9219 0010534 283.3551 76.5783 14.40539652135382
+FUSE 1
+1 25791U 99035A 02016.60007962 .00001743 00000-0 48297-3 0 4688
+2 25791 24.9823 5.6676 0010591 266.8378 93.0919 14.40533828135154
+FUSE 1
+1 25791U 99035A 02015.76873696 +.00001678 +00000-0 +46283-3 0 04713
+2 25791 024.9823 010.7535 0010644 258.3411 101.5912 14.40530615135034
+FUSE 1
+1 25791U 99035A 02015.56090099 .00001670 00000-0 46017-3 0 4671
+2 25791 24.9825 12.0258 0010623 256.2726 103.6602 14.40529913135001
+FUSE 1
+1 25791U 99035A 02014.59099802 +.00001637 +00000-0 +45017-3 0 04801
+2 25791 024.9827 017.9579 0010652 246.2520 113.6872 14.40526735134868
+FUSE 1
+1 25791U 99035A 02014.24460394 .00001618 00000-0 44436-3 0 4668
+2 25791 24.9826 20.0778 0010710 242.8070 117.1346 14.40525522134813
+FUSE 1
+1 25791U 99035A 02012.65118694 .00001644 00000-0 45243-3 0 4659
+2 25791 24.9821 29.8239 0010731 226.1513 133.8108 14.40521061134586
+FUSE 1
+1 25791U 99035A 02011.54272015 .00001715 00000-0 47438-3 0 4640
+2 25791 24.9815 36.6044 0010793 214.5223 145.4584 14.40518322134422
+FUSE 1
+1 25791U 99035A 02010.43425174 .00001799 00000-0 50019-3 0 4633
+2 25791 24.9809 43.3849 0010812 202.7174 157.2854 14.40515528134267
+FUSE 1
+1 25791U 99035A 02009.25649964 .00002024 00000-0 56982-3 0 4622
+2 25791 24.9789 50.5894 0010900 190.2577 169.7698 14.40513435134090
+FUSE 1
+1 25791U 99035A 02007.73234977 .00002144 00000-0 60706-3 0 4618
+2 25791 24.9780 59.9106 0010959 174.4447 185.6181 14.40508676133874
+FUSE 1
+1 25791U 99035A 02006.55459467 .00002207 00000-0 62629-3 0 4605
+2 25791 24.9776 67.1133 0010962 161.9239 198.1657 14.40504470133701
+FUSE 1
+1 25791U 99035A 02005.93107615 +.00002223 +00000-0 +63140-3 0 04899
+2 25791 024.9772 070.9268 0010959 155.3799 204.7234 14.40502008133612
+FUSE 1
+1 25791U 99035A 02005.23827537 .00002302 00000-0 65586-3 0 4595
+2 25791 24.9762 75.1663 0011117 148.7865 211.3305 14.40499774133511
+FUSE 1
+1 25791U 99035A 02003.92195234 .00002277 00000-0 64830-3 0 4582
+2 25791 24.9761 83.2157 0011128 134.9320 225.2086 14.40493934133324
+FUSE 1
+1 25791U 99035A 02002.88274676 .00002253 00000-0 64083-3 0 4577
+2 25791 24.9763 89.5747 0011378 124.3397 235.8189 14.40489372133179
+FUSE 1
+1 25791U 99035A 02001.91281822 +.00002146 +00000-0 +60789-3 0 04694
+2 25791 024.9768 095.5070 0011442 114.6843 245.4859 14.40484505133039
+FUSE 1
+1 25791U 99035A 02001.56641338 .00002152 00000-0 60976-3 0 4568
+2 25791 24.9764 97.6258 0011412 111.4641 248.7084 14.40483142132989
+FUSE 1
+1 25791U 99035A 01365.87360347 +.00002106 +00000-0 +59549-3 0 04723
+2 25791 024.9765 101.8629 0011436 104.3050 255.8720 14.40480024132882
+FUSE 1
+1 25791U 99035A 01365.52719815 .00002060 00000-0 58137-3 0 4555
+2 25791 24.9767 103.9819 0011371 101.3489 258.8298 14.40478294132833
+FUSE 1
+1 25791U 99035A 01364.14157199 .00001894 00000-0 53009-3 0 4549
+2 25791 24.9776 112.4568 0011372 87.4678 272.7139 14.40471893132639
+FUSE 1
+1 25791U 99035A 01362.89450064 .00001855 00000-0 51805-3 0 4534
+2 25791 24.9779 120.0847 0011421 75.1248 285.0524 14.40467329132453
+FUSE 1
+1 25791U 99035A 01361.92455302 +.00001831 +00000-0 +51089-3 0 04748
+2 25791 024.9778 126.0189 0011472 065.3088 294.8603 14.40463838132318
+FUSE 1
+1 25791U 99035A 01361.57814148 .00001900 00000-0 53207-3 0 4523
+2 25791 24.9772 128.1378 0011523 62.3118 297.8556 14.40463267132263
+FUSE 1
+1 25791U 99035A 01360.95460072 +.00001920 +00000-0 +53816-3 0 04716
+2 25791 024.9770 131.9515 0011492 055.8592 304.2995 14.40461264132179
+FUSE 1
+1 25791U 99035A 01360.53891054 .00002081 00000-0 58819-3 0 4513
+2 25791 24.9761 134.4940 0011549 52.3362 307.8493 14.40461175132116
+FUSE 1
+1 25791U 99035A 01360.19249807 .00001557 00000-0 42615-3 0 4501
+2 25791 24.9814 136.6178 0011030 44.8843 315.2554 14.40455881132069
+FUSE 1
+1 25791U 99035A 01358.87612700 .00001498 00000-0 40783-3 0 4495
+2 25791 24.9820 144.6693 0010973 30.9588 329.1578 14.40451843131876
+FUSE 1
+1 25791U 99035A 01357.55975188 .00001377 00000-0 37042-3 0 4480
+2 25791 24.9830 152.7226 0010843 16.8175 343.2692 14.40447508131686
+FUSE 1
+1 25791U 99035A 01356.24337185 .00001363 00000-0 36634-3 0 4474
+2 25791 24.9832 160.7748 0010783 3.1653 356.8921 14.40444244131497
+FUSE 1
+1 25791U 99035A 01355.13483804 .00001399 00000-0 37745-3 0 4463
+2 25791 24.9832 167.5556 0010791 351.3648 8.6665 14.40441877131339
+FUSE 1
+1 25791U 99035A 01353.88773524 .00001488 00000-0 40499-3 0 4452
+2 25791 24.9831 175.1848 0010716 338.1167 21.8882 14.40439533131157
+FUSE 1
+1 25791U 99035A 01352.91776521 +.00001536 +00000-0 +41984-3 0 04527
+2 25791 024.9828 181.1169 0010739 327.7733 032.2118 14.40437323131012
+FUSE 1
+1 25791U 99035A 01352.57134719 .00001547 00000-0 42314-3 0 4447
+2 25791 24.9827 183.2356 0010758 324.0828 35.8958 14.40436465130968
+FUSE 1
+1 25791U 99035A 01351.39352449 .00001601 00000-0 43981-3 0 4439
+2 25791 24.9825 190.4393 0010750 311.5670 48.3911 14.40433644130790
+FUSE 1
+1 25791U 99035A 01350.90853821 +.00001630 +00000-0 +44889-3 0 04570
+2 25791 024.9828 193.4057 0010738 306.2371 053.7148 14.40432555130723
+FUSE 1
+1 25791U 99035A 01350.21570001 .00001672 00000-0 46189-3 0 4425
+2 25791 24.9825 197.6430 0010796 298.8753 61.0671 14.40430851130624
+FUSE 1
+1 25791U 99035A 01349.17644244 .00001720 00000-0 47692-3 0 4412
+2 25791 24.9826 203.9992 0010810 288.0247 71.9089 14.40428119130475
+FUSE 1
+1 25791U 99035A 01348.13718358 .00001739 00000-0 48271-3 0 4408
+2 25791 24.9830 210.3552 0010817 277.4348 82.4917 14.40425082130322
+FUSE 1
+1 25791U 99035A 01346.95935558 +.00001792 +00000-0 +49923-3 0 04414
+2 25791 024.9832 217.5601 0010828 264.7976 095.1293 14.40421820130151
+FUSE 1
+1 25791U 99035A 01346.89007156 .00001798 00000-0 50103-3 0 4396
+2 25791 24.9831 217.9838 0010822 264.0722 95.8552 14.40421637130142
+FUSE 1
+1 25791U 99035A 01345.92009452 +.00001804 +00000-0 +50297-3 0 04561
+2 25791 024.9834 223.9163 0010848 253.7226 106.2093 14.40418551130008
+FUSE 1
+1 25791U 99035A 01345.50438976 .00001829 00000-0 51074-3 0 4383
+2 25791 24.9833 226.4598 0010750 249.3404 110.5947 14.40417367129949
+FUSE 1
+1 25791U 99035A 01344.95011669 +.00001830 +00000-0 +51089-3 0 04543
+2 25791 024.9832 229.8499 0010756 243.5301 116.4117 14.40415519129865
+FUSE 1
+1 25791U 99035A 01344.18799003 .00001792 00000-0 49923-3 0 4375
+2 25791 24.9834 234.5123 0010818 235.5423 124.4062 14.40412721129757
+FUSE 1
+1 25791U 99035A 01343.14872416 .00001816 00000-0 50671-3 0 4368
+2 25791 24.9837 240.8680 0010867 223.8806 136.0838 14.40409582129602
+FUSE 1
+1 25791U 99035A 01341.90160523 .00001680 00000-0 46452-3 0 4359
+2 25791 24.9841 248.4975 0010871 211.3142 148.6721 14.40404442129428
+FUSE 1
+1 25791U 99035A 01340.93162024 +.00001621 +00000-0 +44627-3 0 04479
+2 25791 024.9843 254.4284 0010863 200.7838 159.2234 14.40401129129285
+FUSE 1
+1 25791U 99035A 01340.37734226 .00001562 00000-0 42806-3 0 4343
+2 25791 24.9846 257.8173 0010861 194.8366 165.1825 14.40399138129209
+FUSE 1
+1 25791U 99035A 01339.19949999 .00001406 00000-0 37978-3 0 4336
+2 25791 24.9853 265.0213 0010893 182.8071 177.2377 14.40394882129036
+FUSE 1
+1 25791U 99035A 01337.95236873 .00001264 00000-0 33601-3 0 4328
+2 25791 24.9859 272.6472 0011030 169.6495 190.4242 14.40391020128858
+FUSE 1
+1 25791U 99035A 01336.98237488 +.00001205 +00000-0 +31765-3 0 04350
+2 25791 024.9862 278.5777 0011067 159.5220 200.5735 14.40388553128711
+FUSE 1
+1 25791U 99035A 01336.91308955 .00001199 00000-0 31585-3 0 4319
+2 25791 24.9862 279.0014 0011071 158.8008 201.2962 14.40388365128702
+FUSE 1
+1 25791U 99035A 01335.52738000 .00001234 00000-0 32682-3 0 4301
+2 25791 24.9862 287.4731 0011104 144.1718 215.9555 14.40385754128501
+FUSE 1
+1 25791U 99035A 01334.21095244 .00001172 00000-0 30740-3 0 4294
+2 25791 24.9865 295.5226 0011153 130.8481 229.2994 14.40382693128319
+FUSE 1
+1 25791U 99035A 01333.17166461 .00001237 00000-0 32780-3 0 4285
+2 25791 24.9866 301.8786 0011197 121.1081 239.0526 14.40380912128164
+FUSE 1
+1 25791U 99035A 01331.78594478 .00001365 00000-0 36732-3 0 4275
+2 25791 24.9865 310.3519 0011209 106.8472 253.3273 14.40378324127969
+FUSE 1
+1 25791U 99035A 01330.67736645 +.00001415 +00000-0 +38296-3 0 04303
+2 25791 024.9868 317.1335 0011064 094.8355 265.3420 14.40375646127802
+FUSE 1
+1 25791U 99035A 01330.53879352 .00001567 00000-0 43006-3 0 4269
+2 25791 24.9872 317.9818 0011229 93.6128 266.5666 14.40376029127787
+FUSE 1
+1 25791U 99035A 01329.70735725 +.00001621 +00000-0 +44667-3 0 04457
+2 25791 024.9872 323.0652 0011232 084.6461 275.5327 14.40373883127661
+FUSE 1
+1 25791U 99035A 01329.22235264 .00001585 00000-0 43552-3 0 4256
+2 25791 24.9876 326.0324 0011267 80.2956 279.8829 14.40372335127590
+FUSE 1
+1 25791U 99035A 01327.83661937 .00001684 00000-0 46626-3 0 4245
+2 25791 24.9875 334.5052 0011431 65.9356 294.2344 14.40369004127398
+FUSE 1
+1 25791U 99035A 01326.52016884 .00001740 00000-0 48380-3 0 4236
+2 25791 24.9874 342.5535 0011585 52.2073 307.9485 14.40365366127202
+FUSE 1
+1 25791U 99035A 01325.41157411 .00001880 00000-0 52699-3 0 4227
+2 25791 24.9858 349.3412 0010869 41.2944 318.8383 14.40362474127049
+FUSE 1
+1 25791U 99035A 01324.92656363 +.00001916 +00000-0 +53838-3 0 04486
+2 25791 024.9856 352.3075 0010879 036.2259 323.8984 14.40361028126978
+FUSE 1
+1 25791U 99035A 01324.23369056 .00001967 00000-0 55417-3 0 4212
+2 25791 24.9855 356.5485 0010758 28.8088 331.3014 14.40358919126873
+FUSE 1
+1 25791U 99035A 01323.67939132 +.00001961 +00000-0 +55223-3 0 04407
+2 25791 024.9854 359.9372 0010776 023.0532 337.0460 14.40356881126790
+FUSE 1
+1 25791U 99035A 01322.70936542 .00001987 00000-0 56035-3 0 4198
+2 25791 24.9853 5.8688 0010772 12.9432 347.1352 14.40353526126658
+FUSE 1
+1 25791U 99035A 01321.67005005 .00001934 00000-0 54405-3 0 4184
+2 25791 24.9852 12.2257 0010726 1.9216 358.1340 14.40349375126508
+FUSE 1
+1 25791U 99035A 01320.56144300 .00001920 00000-0 53980-3 0 4174
+2 25791 24.9852 19.0058 0010683 350.0478 9.9818 14.40345343126346
+FUSE 1
+1 25791U 99035A 01319.52212142 .00001855 00000-0 51954-3 0 4163
+2 25791 24.9851 25.3612 0010623 338.9778 21.0292 14.40341342126192
+FUSE 1
+1 25791U 99035A 01318.82923904 +.00001856 +00000-0 +52003-3 0 04314
+2 25791 024.9847 029.5994 0010595 331.5863 028.4066 14.40338911126095
+FUSE 1
+1 25791U 99035A 01318.41350910 .00001890 00000-0 53052-3 0 4155
+2 25791 24.9848 32.1452 0010575 326.5664 33.4173 14.40337609126038
+FUSE 1
+1 25791U 99035A 01316.88916357 .00001729 00000-0 48061-3 0 4141
+2 25791 24.9843 41.4680 0010423 310.4505 49.5094 14.40331762125816
+FUSE 1
+1 25791U 99035A 01315.78054605 .00002207 00000-0 62878-3 0 4131
+2 25791 24.9835 48.2543 0010468 297.9246 62.0232 14.40329121125652
+FUSE 1
+1 25791U 99035A 01314.67192519 .00002266 00000-0 64699-3 0 4122
+2 25791 24.9832 55.0359 0010699 286.0302 73.9029 14.40324776125496
+FUSE 1
+1 25791U 99035A 01313.56330279 .00002157 00000-0 61343-3 0 4117
+2 25791 24.9831 61.8147 0010834 274.3350 85.5922 14.40319729125335
+FUSE 1
+1 25791U 99035A 01312.52396703 .00002119 00000-0 60174-3 0 4104
+2 25791 24.9829 68.1695 0010860 263.6572 96.2701 14.40315363125183
+FUSE 1
+1 25791U 99035A 01311.76178660 +.00001972 +00000-0 +55623-3 0 04344
+2 25791 024.9830 072.8283 0010752 255.8544 104.0769 14.40311922125079
+FUSE 1
+1 25791U 99035A 01310.99960448 .00001931 00000-0 54345-3 0 4098
+2 25791 24.9829 77.4894 0010755 247.9477 111.9889 14.40308978124960
+FUSE 1
+1 25791U 99035A 01309.96026276 +.00001965 +00000-0 +55405-3 0 04090
+2 25791 024.9829 083.8473 0010851 237.1463 122.8002 14.40305487124811
+FUSE 1
+1 25791U 99035A 01309.89097339 .00001972 00000-0 55619-3 0 4084
+2 25791 24.9829 84.2713 0010836 236.3815 123.5665 14.40305298124800
+FUSE 1
+1 25791U 99035A 01308.57447006 .00002179 00000-0 62044-3 0 4077
+2 25791 24.9822 92.3254 0010825 222.6458 137.3208 14.40301956124614
+FUSE 1
+1 25791U 99035A 01307.53512328 .00002351 00000-0 67374-3 0 4064
+2 25791 24.9814 98.6808 0010806 211.6998 148.2862 14.40299019124461
+FUSE 1
+1 25791U 99035A 01305.94145638 +.00002419 +00000-0 +69493-3 0 04062
+2 25791 024.9809 108.4263 0010833 195.2773 164.7418 14.40292404124234
+FUSE 1
+1 25791U 99035A 01305.87216636 .00002410 00000-0 69213-3 0 4051
+2 25791 24.9811 108.8509 0010847 194.5526 165.4669 14.40292047124225
+FUSE 1
+1 25791U 99035A 01304.90210496 +.00002483 +00000-0 +71481-3 0 04210
+2 25791 024.9807 114.7853 0010812 184.6053 175.4356 14.40288074124088
+FUSE 1
+1 25791U 99035A 01304.55565381 .00002564 00000-0 73991-3 0 4046
+2 25791 24.9803 116.9068 0010808 180.8733 179.1763 14.40287007124037
+FUSE 1
+1 25791U 99035A 01303.93204085 +.00002548 +00000-0 +73522-3 0 04141
+2 25791 024.9803 120.7190 0010799 174.3529 185.7099 14.40283909123947
+FUSE 1
+1 25791U 99035A 01303.03126575 .00002520 00000-0 72659-3 0 4037
+2 25791 24.9800 126.2295 0010755 164.6304 195.4536 14.40279287123810
+FUSE 1
+1 25791U 99035A 01301.78402958 .00002608 00000-0 75393-3 0 4023
+2 25791 24.9799 133.8566 0011062 153.3348 206.7722 14.40274032123633
+FUSE 1
+1 25791U 99035A 01299.91316810 .00002915 00000-0 84930-3 0 4012
+2 25791 24.9792 145.2965 0011048 134.0555 226.0864 14.40265988123368
+FUSE 1
+1 25791U 99035A 01298.18087804 .00003212 00000-0 94181-3 0 4007
+2 25791 24.9785 155.8916 0011040 115.9737 244.1911 14.40256974123117
+FUSE 1
+1 25791U 99035A 01297.97300262 +.00003234 +00000-0 +94848-3 0 04115
+2 25791 024.9787 157.1643 0011055 113.7776 246.3895 14.40255785123086
+FUSE 1
+1 25791U 99035A 01297.07220791 .00002684 00000-0 77791-3 0 3995
+2 25791 24.9787 162.6747 0010929 104.4008 255.7717 14.40248557122957
+FUSE 1
+1 25791U 99035A 01295.96352986 +.00002126 +00000-0 +60489-3 0 04025
+2 25791 024.9793 169.4508 0010628 092.8140 267.3584 14.40240931122798
+FUSE 1
+1 25791U 99035A 01295.89423827 .00002043 00000-0 57915-3 0 3982
+2 25791 24.9794 169.8749 0010644 91.9762 268.1968 14.40240146122780
+FUSE 1
+1 25791U 99035A 01294.92413976 +.00001853 +00000-0 +51998-3 0 04152
+2 25791 024.9798 175.8066 0010633 081.1941 278.9772 14.40235323122649
+FUSE 1
+1 25791U 99035A 01294.30050214 .00001823 00000-0 51089-3 0 3973
+2 25791 24.9799 179.6196 0010702 74.5779 285.5911 14.40232995122559
+FUSE 1
+1 25791U 99035A 01293.26110316 .00001744 00000-0 48616-3 0 3960
+2 25791 24.9799 185.9754 0010658 63.5604 296.6004 14.40228963122404
+FUSE 1
+1 25791U 99035A 01292.22169993 .00001707 00000-0 47471-3 0 3956
+2 25791 24.9799 192.3301 0010648 52.4658 307.6827 14.40225399122258
+FUSE 1
+1 25791U 99035A 01290.97441176 +.00001672 +00000-0 +46391-3 0 03975
+2 25791 024.9797 199.9582 0010599 039.1258 321.0014 14.40221249122071
+FUSE 1
+1 25791U 99035A 01290.90511781 .00001674 00000-0 46472-3 0 3947
+2 25791 24.9797 200.3818 0010601 38.3799 321.7462 14.40221053122061
+FUSE 1
+1 25791U 99035A 01289.44994252 .00001682 00000-0 46703-3 0 3937
+2 25791 24.9794 209.2810 0010620 22.7711 337.3265 14.40216632121857
+FUSE 1
+1 25791U 99035A 01288.96488349 +.00001640 +00000-0 +45420-3 0 04039
+2 25791 024.9794 212.2491 0010567 017.4224 342.6645 14.40214807121781
+FUSE 1
+1 25791U 99035A 01288.41052915 .00001638 00000-0 45357-3 0 3928
+2 25791 24.9794 215.6384 0010635 11.8186 348.2573 14.40213128121709
+FUSE 1
+1 25791U 99035A 01287.23252352 .00001574 00000-0 43355-3 0 3918
+2 25791 24.9794 222.8447 0010562 358.4459 1.6013 14.40209149121539
+FUSE 1
+1 25791U 99035A 01285.91592729 .00001390 00000-0 37646-3 0 3907
+2 25791 24.9795 230.9044 0010544 342.9330 17.0829 14.40203938121344
+FUSE 1
+1 25791U 99035A 01284.39144118 .00001300 00000-0 34838-3 0 3892
+2 25791 24.9795 240.2335 0010739 326.2228 33.7597 14.40199484121121
+FUSE 1
+1 25791U 99035A 01283.97567245 +.00001223 +00000-0 +32457-3 0 03894
+2 25791 024.9792 242.7798 0010828 320.9649 039.0093 14.40197815121064
+FUSE 1
+1 25791U 99035A 01283.35201646 .00001212 00000-0 32118-3 0 3887
+2 25791 24.9792 246.5916 0010829 314.6054 45.3576 14.40196427120972
+FUSE 1
+1 25791U 99035A 01282.31258856 +.00001218 +00000-0 +32310-3 0 03876
+2 25791 024.9792 252.9458 0010895 303.3438 056.6026 14.40194305120820
+FUSE 1
+1 25791U 99035A 01281.96611121 +.00001476 +00000-0 +40318-3 0 03877
+2 25791 024.9786 255.0631 0010800 300.4688 059.4739 14.40195140120775
+FUSE 1
+1 25791U 99035A 01281.27315947 .00001503 00000-0 41154-3 0 3867
+2 25791 24.9785 259.2981 0010800 293.1387 66.7977 14.40193471120671
+FUSE 1
+1 25791U 99035A 01280.23373114 .00001657 00000-0 45958-3 0 3857
+2 25791 24.9781 265.6543 0010925 282.3330 77.5954 14.40191161120521
+FUSE 1
+1 25791U 99035A 01279.19430003 .00002067 00000-0 58705-3 0 3840
+2 25791 24.9775 272.0130 0011160 270.5332 89.3900 14.40189300120378
+FUSE 1
+1 25791U 99035A 01277.60050645 .00002136 00000-0 60847-3 0 3830
+2 25791 24.9771 281.7563 0011259 253.7403 106.1876 14.40183292120141
+FUSE 1
+1 25791U 99035A 01276.69966572 +.00002038 +00000-0 +57797-3 0 03834
+2 25791 024.9770 287.2658 0011436 244.9457 114.9868 14.40179081120019
+FUSE 1
+1 25791U 99035A 01276.56107445 .00002038 00000-0 57794-3 0 3822
+2 25791 24.9770 288.1132 0011429 243.5500 116.3834 14.40178557119993
+FUSE 1
+1 25791U 99035A 01275.59093557 +.00002005 +00000-0 +56772-3 0 03900
+2 25791 024.9769 294.0432 0011469 233.5602 126.3872 14.40174627119858
+FUSE 1
+1 25791U 99035A 01275.24445817 .00001894 00000-0 53340-3 0 3815
+2 25791 24.9772 296.1661 0011642 231.1207 128.8260 14.40172274119806
+FUSE 1
+1 25791U 99035A 01274.20502117 .00001837 00000-0 51559-3 0 3803
+2 25791 24.9774 302.5234 0011565 220.9357 139.0293 14.40168098119654
+FUSE 1
+1 25791U 99035A 01272.54191528 .00001742 00000-0 48618-3 0 3793
+2 25791 24.9776 312.6900 0011479 204.0234 155.9738 14.40161743119414
+FUSE 1
+1 25791U 99035A 01271.22528748 .00001537 00000-0 42239-3 0 3789
+2 25791 24.9783 320.7396 0011360 191.6142 168.4111 14.40155760119224
+FUSE 1
+1 25791U 99035A 01270.18584050 .00001414 00000-0 38420-3 0 3771
+2 25791 24.9786 327.0943 0011214 181.1674 178.8811 14.40151731119076
+FUSE 1
+1 25791U 99035A 01268.59201413 .00001316 00000-0 35376-3 0 3769
+2 25791 24.9790 336.8359 0011124 164.6593 195.4255 14.40146964118849
+FUSE 1
+1 25791U 99035A 01267.55255878 .00001264 00000-0 33768-3 0 3752
+2 25791 24.9791 343.1899 0011084 153.8979 206.2088 14.40144164118691
+FUSE 1
+1 25791U 99035A 01266.85958720 +.00001236 +00000-0 +32881-3 0 04003
+2 25791 024.9791 347.4254 0011062 146.6571 213.4636 14.40142395118599
+FUSE 1
+1 25791U 99035A 01266.23591181 .00001222 00000-0 32443-3 0 3748
+2 25791 24.9790 351.2395 0010997 140.3022 219.8292 14.40140919118504
+FUSE 1
+1 25791U 99035A 01264.84996263 .00001228 00000-0 32643-3 0 3730
+2 25791 24.9790 359.7127 0010966 126.1194 234.0331 14.40138072118306
+FUSE 1
+1 25791U 99035A 01263.81049784 .00001251 00000-0 33374-3 0 3720
+2 25791 24.9787 6.0658 0010961 115.2876 244.8774 14.40136053118154
+FUSE 1
+1 25791U 99035A 01262.90962669 +.00001258 +00000-0 +33575-3 0 03770
+2 25791 024.9786 011.5725 0010944 105.8616 254.3099 14.40134145118029
+FUSE 1
+1 25791U 99035A 01262.56313782 .00001225 00000-0 32562-3 0 3711
+2 25791 24.9789 13.6910 0010897 102.2762 257.8965 14.40133131117978
+FUSE 1
+1 25791U 99035A 01261.73156198 +.00001238 +00000-0 +32981-3 0 03916
+2 25791 024.9787 018.7732 0010906 093.5350 266.6406 14.40131469117857
+FUSE 1
+1 25791U 99035A 01260.76138915 .00001191 00000-0 31510-3 0 3707
+2 25791 24.9789 24.7033 0010879 83.2256 276.9490 14.40129023117715
+FUSE 1
+1 25791U 99035A 01259.92981039 +.00001175 +00000-0 +31013-3 0 03874
+2 25791 024.9786 029.7863 0010871 074.4468 285.7243 14.40127147117592
+FUSE 1
+1 25791U 99035A 01259.58331925 .00001147 00000-0 30130-3 0 3697
+2 25791 24.9787 31.9057 0010852 70.6480 289.5197 14.40126176117540
+FUSE 1
+1 25791U 99035A 01258.95963335 +.00001144 +00000-0 +30044-3 0 03874
+2 25791 024.9786 035.7176 0010865 064.0853 296.0773 14.40124921117457
+FUSE 1
+1 25791U 99035A 01258.54384331 .00001102 00000-0 28749-3 0 3684
+2 25791 24.9787 38.2594 0010849 59.6296 300.5294 14.40123716117396
+FUSE 1
+1 25791U 99035A 01256.88067564 .00001029 00000-0 26472-3 0 3673
+2 25791 24.9789 48.4246 0010881 42.1181 318.0162 14.40120076117159
+FUSE 1
+1 25791U 99035A 01255.84119312 +.00000982 +00000-0 +24994-3 0 03828
+2 25791 024.9791 054.7780 0010906 031.2706 328.8450 14.40117913117004
+FUSE 1
+1 25791U 99035A 01255.56399752 .00000973 00000-0 24725-3 0 3669
+2 25791 24.9790 56.4726 0010911 28.3803 331.7300 14.40117363116963
+FUSE 1
+1 25791U 99035A 01254.17801710 .00000928 00000-0 23335-3 0 3652
+2 25791 24.9790 64.9453 0010913 13.8647 346.2161 14.40114762116765
+FUSE 1
+1 25791U 99035A 01253.13853000 .00000871 00000-0 21540-3 0 3648
+2 25791 24.9793 71.2996 0010924 2.8497 357.2074 14.40112768116617
+FUSE 1
+1 25791U 99035A 01251.89114396 .00000824 00000-0 20070-3 0 3631
+2 25791 24.9796 78.9282 0010899 349.5744 10.4536 14.40110640116437
+FUSE 1
+1 25791U 99035A 01250.57445682 .00000789 00000-0 18992-3 0 3629
+2 25791 24.9798 86.9794 0010848 335.6563 24.3436 14.40108640116244
+FUSE 1
+1 25791U 99035A 01249.39636695 .00000757 00000-0 18011-3 0 3619
+2 25791 24.9802 94.1822 0010810 323.2224 36.7543 14.40106962116071
+FUSE 1
+1 25791U 99035A 01248.91127102 +.00000751 +00000-0 +17803-3 0 03830
+2 25791 024.9803 097.1479 0010787 318.2500 041.7192 14.40106349116005
+FUSE 1
+1 25791U 99035A 01248.21827703 .00000711 00000-0 16549-3 0 3604
+2 25791 24.9806 101.3869 0010851 311.0280 48.9290 14.40105201115909
+FUSE 1
+1 25791U 99035A 01247.94107926 +.00000692 +00000-0 +15961-3 0 03998
+2 25791 024.9808 103.0812 0010848 308.0548 051.8982 14.40104743115863
+FUSE 1
+1 25791U 99035A 01246.97088639 +.00000665 +00000-0 +15119-3 0 03624
+2 25791 024.9811 109.0135 0010822 297.4688 062.4719 14.40103568115724
+FUSE 1
+1 25791U 99035A 01246.90158683 .00000665 00000-0 15140-3 0 3594
+2 25791 24.9811 109.4371 0010823 296.7486 63.1913 14.40103507115715
+FUSE 1
+1 25791U 99035A 01245.86209396 .00000696 00000-0 16089-3 0 3582
+2 25791 24.9808 115.7946 0010841 285.1746 74.7568 14.40102728115561
+FUSE 1
+1 25791U 99035A 01244.47610489 .00000659 00000-0 14935-3 0 3573
+2 25791 24.9811 124.2700 0010831 270.7608 89.1659 14.40100949115366
+FUSE 1
+1 25791U 99035A 01243.36731275 .00000662 00000-0 15021-3 0 3567
+2 25791 24.9811 131.0482 0010866 258.9721 100.9574 14.40099892115206
+FUSE 1
+1 25791U 99035A 01242.25852056 .00000648 00000-0 14586-3 0 3553
+2 25791 24.9814 137.8264 0010894 247.3559 112.5794 14.40098711115047
+FUSE 1
+1 25791U 99035A 01241.98132292 +.00000630 +00000-0 +14046-3 0 03737
+2 25791 024.9816 139.5223 0010941 244.5808 115.3567 14.40098300115001
+FUSE 1
+1 25791U 99035A 01241.21902828 .00000629 00000-0 14009-3 0 3549
+2 25791 24.9817 144.1835 0011009 236.5844 123.3610 14.40097610114897
+FUSE 1
+1 25791U 99035A 01239.97163784 +.00000567 +00000-0 +12075-3 0 03541
+2 25791 024.9822 151.8119 0011137 224.0036 135.9578 14.40096009114714
+FUSE 1
+1 25791U 99035A 01239.90233840 .00000573 00000-0 12271-3 0 3539
+2 25791 24.9822 152.2355 0011140 223.3426 136.6211 14.40096007114709
+FUSE 1
+1 25791U 99035A 01238.93214506 +.00000578 +00000-0 +12417-3 0 03569
+2 25791 024.9822 158.1667 0011192 213.0996 146.8828 14.40095287114565
+FUSE 1
+1 25791U 99035A 01238.44704821 .00000558 00000-0 11791-3 0 3527
+2 25791 24.9823 161.1314 0011195 208.1454 151.8451 14.40094733114491
+FUSE 1
+1 25791U 99035A 01237.19965619 .00000543 00000-0 11309-3 0 3510
+2 25791 24.9826 168.7556 0011260 195.0033 165.0141 14.40093691114311
+FUSE 1
+1 25791U 99035A 01235.46716564 .00000559 00000-0 11830-3 0 3506
+2 25791 24.9826 179.3436 0011265 177.0928 182.9645 14.40092549114064
+FUSE 1
+1 25791U 99035A 01234.91276874 +.00000555 +00000-0 +11697-3 0 03518
+2 25791 024.9826 182.7322 0011267 171.3778 188.6930 14.40092091113980
+FUSE 1
+1 25791U 99035A 01234.21977186 .00000553 00000-0 11627-3 0 3493
+2 25791 24.9827 186.9667 0011270 164.0792 196.0070 14.40091557113881
+FUSE 1
+1 25791U 99035A 01233.18027640 .00000553 00000-0 11642-3 0 3485
+2 25791 24.9827 193.3193 0011293 153.2255 206.8853 14.40090779113734
+FUSE 1
+1 25791U 99035A 01231.72498050 .00000562 00000-0 11920-3 0 3478
+2 25791 24.9824 202.2156 0011301 138.1751 221.9616 14.40089739113529
+FUSE 1
+1 25791U 99035A 01230.54688298 .00000525 00000-0 10770-3 0 3462
+2 25791 24.9834 209.4179 0011313 126.3801 233.7753 14.40088665113353
+FUSE 1
+1 25791U 99035A 01229.23018362 .00000520 00000-0 10610-3 0 3452
+2 25791 24.9836 217.4680 0011315 112.6116 247.5590 14.40087703113163
+FUSE 1
+1 25791U 99035A 01228.81438323 +.00000515 +00000-0 +10467-3 0 03665
+2 25791 024.9835 220.0093 0011311 108.2127 251.9609 14.40087362113104
+FUSE 1
+1 25791U 99035A 01227.84418190 .00000497 00000-0 98977-4 0 3445
+2 25791 24.9840 225.9413 0011274 98.5742 261.6044 14.40086582112969
+FUSE 1
+1 25791U 99035A 01226.66607788 +.00000493 +00000-0 +97886-4 0 03463
+2 25791 024.9839 233.1408 0011275 086.3501 273.8298 14.40085796112794
+FUSE 1
+1 25791U 99035A 01226.52747722 .00000492 00000-0 97361-4 0 3435
+2 25791 24.9840 233.9884 0011272 84.8774 275.3014 14.40085704112774
+FUSE 1
+1 25791U 99035A 01225.21077022 .00000514 00000-0 10445-3 0 3420
+2 25791 24.9840 242.0362 0011245 71.4518 288.7213 14.40085082112581
+FUSE 1
+1 25791U 99035A 01223.89406193 .00000470 00000-0 90604-4 0 3413
+2 25791 24.9848 250.0849 0011117 57.6806 302.4776 14.40083898112392
+FUSE 1
+1 25791U 99035A 01222.78525341 .00000440 00000-0 81399-4 0 3404
+2 25791 24.9853 256.8629 0011047 46.0947 314.0477 14.40083059112237
+FUSE 1
+1 25791U 99035A 01221.95364609 +.00000421 +00000-0 +75317-4 0 03435
+2 25791 024.9857 261.9471 0011006 037.3315 322.7958 14.40082476112119
+FUSE 1
+1 25791U 99035A 01221.53784190 .00000421 00000-0 75510-4 0 3390
+2 25791 24.9858 264.4889 0010990 32.9399 327.1792 14.40082299112056
+FUSE 1
+1 25791U 99035A 01220.98343688 +.00000390 +00000-0 +65848-4 0 03579
+2 25791 024.9859 267.8782 0010962 026.9957 333.1120 14.40081738111977
+FUSE 1
+1 25791U 99035A 01220.22112886 .00000387 00000-0 64765-4 0 3382
+2 25791 24.9860 272.5393 0010909 18.8496 341.2417 14.40081380111869
+FUSE 1
+1 25791U 99035A 01218.97371408 .00000391 00000-0 65912-4 0 3377
+2 25791 24.9861 280.1628 0010876 5.5029 354.5594 14.40080902111686
+FUSE 1
+1 25791U 99035A 01217.86490136 .00000373 00000-0 60393-4 0 3361
+2 25791 24.9866 286.9411 0010853 353.7666 6.2707 14.40080339111529
+FUSE 1
+1 25791U 99035A 01216.82538872 .00000371 00000-0 59777-4 0 3357
+2 25791 24.9868 293.2962 0010793 342.5968 17.4161 14.40079940111374
+FUSE 1
+1 25791U 99035A 01215.57797329 .00000400 00000-0 68747-4 0 3341
+2 25791 24.9867 300.9214 0010734 329.1452 30.8424 14.40079711111190
+FUSE 1
+1 25791U 99035A 01214.88496511 +.00000411 +00000-0 +72102-4 0 03738
+2 25791 024.9865 305.1569 0010752 321.8056 038.1700 14.40079469111094
+FUSE 1
+1 25791U 99035A 01213.91475370 +.00000418 +00000-0 +74537-4 0 03349
+2 25791 024.9864 311.0878 0010770 311.6786 048.2800 14.40079073110957
+FUSE 1
+1 25791U 99035A 01213.84545284 .00000418 00000-0 74517-4 0 3330
+2 25791 24.9864 311.5114 0010770 310.9520 49.0052 14.40079040110944
+FUSE 1
+1 25791U 99035A 01212.94454257 +.00000434 +00000-0 +79248-4 0 03344
+2 25791 024.9864 317.0188 0010768 301.3288 058.6164 14.40078734110813
+FUSE 1
+1 25791U 99035A 01212.80594067 .00000444 00000-0 82373-4 0 3325
+2 25791 24.9863 317.8657 0010766 299.6889 60.2542 14.40078761110791
+FUSE 1
+1 25791U 99035A 01211.90503055 +.00000468 +00000-0 +90090-4 0 03446
+2 25791 024.9863 323.3726 0010776 290.0365 069.8977 14.40078499110666
+FUSE 1
+1 25791U 99035A 01211.55852704 .00000460 00000-0 87431-4 0 3318
+2 25791 24.9864 325.4904 0010823 286.2525 73.6791 14.40078234110615
+FUSE 1
+1 25791U 99035A 01210.93482022 +.00000472 +00000-0 +91278-4 0 03633
+2 25791 024.9864 329.3017 0010848 279.6419 080.2862 14.40077996110525
+FUSE 1
+1 25791U 99035A 01210.17251264 .00000478 00000-0 93199-4 0 3305
+2 25791 24.9863 333.9619 0010873 271.6318 88.2943 14.40077601110410
+FUSE 1
+1 25791U 99035A 01208.85579991 .00000490 00000-0 96802-4 0 3293
+2 25791 24.9866 342.0099 0010922 257.5431 102.3853 14.40076934110225
+FUSE 1
+1 25791U 99035A 01207.81629030 .00000501 00000-0 10023-3 0 3280
+2 25791 24.9867 348.3635 0010966 246.5884 113.3470 14.40076398110073
+FUSE 1
+1 25791U 99035A 01206.91538249 +.00000508 +00000-0 +10250-3 0 03415
+2 25791 024.9866 353.8713 0010987 237.1497 122.7945 14.40075887109946
+FUSE 1
+1 25791U 99035A 01206.56887963 .00000511 00000-0 10326-3 0 3278
+2 25791 24.9867 355.9893 0011012 233.5318 126.4174 14.40075691109893
+FUSE 1
+1 25791U 99035A 01205.87587337 +.00000527 +00000-0 +10839-3 0 03505
+2 25791 024.9868 000.2251 0011076 226.2868 133.6720 14.40075413109799
+FUSE 1
+1 25791U 99035A 01205.25216864 .00000510 00000-0 10313-3 0 3263
+2 25791 24.9867 4.0363 0011090 219.8115 140.1582 14.40074798109708
+FUSE 1
+1 25791U 99035A 01203.93545728 +.00000516 +00000-0 +10479-3 0 03269
+2 25791 024.9866 012.0811 0011114 206.0591 153.9357 14.40073969109517
+FUSE 1
+1 25791U 99035A 01203.86615663 .00000516 00000-0 10479-3 0 3256
+2 25791 24.9866 12.5045 0011114 205.3331 154.6628 14.40073923109503
+FUSE 1
+1 25791U 99035A 01202.96524958 +.00000508 +00000-0 +10233-3 0 03486
+2 25791 024.9865 018.0111 0011154 196.1382 163.8780 14.40073233109374
+FUSE 1
+1 25791U 99035A 01202.54944641 .00000493 00000-0 97826-4 0 3246
+2 25791 24.9863 20.5527 0011169 191.8050 168.2200 14.40072784109311
+FUSE 1
+1 25791U 99035A 01201.16343360 .00000507 00000-0 10206-3 0 3235
+2 25791 24.9866 29.0225 0011223 177.3906 182.6661 14.40072075109115
+FUSE 1
+1 25791U 99035A 01200.12393049 .00000384 00000-0 63784-4 0 3221
+2 25791 24.9826 35.4045 0011352 165.2759 194.8082 14.40070335108968
+FUSE 1
+1 25791U 99035A 01198.94581712 +.00000454 +00000-0 +85448-4 0 03255
+2 25791 024.9819 042.6054 0011509 153.7866 206.3225 14.40070361108793
+FUSE 1
+1 25791U 99035A 01198.87651654 .00000454 00000-0 85668-4 0 3210
+2 25791 24.9819 43.0290 0011506 153.0511 207.0603 14.40070330108780
+FUSE 1
+1 25791U 99035A 01197.90630513 +.00000543 +00000-0 +11321-3 0 03251
+2 25791 024.9814 048.9614 0011667 143.2067 216.9249 14.40070553108641
+FUSE 1
+1 25791U 99035A 01197.83700416 .00000546 00000-0 11423-3 0 3204
+2 25791 24.9813 49.3856 0011672 142.5933 217.5379 14.40070523108630
+FUSE 1
+1 25791U 99035A 01196.93609183 +.00000693 +00000-0 +16016-3 0 03423
+2 25791 024.9796 054.8902 0011793 132.6084 227.5393 14.40070954108505
+FUSE 1
+1 25791U 99035A 01196.45099063 .00000473 00000-0 91615-4 0 3199
+2 25791 24.9825 57.8656 0011228 128.4789 231.6720 14.40068671108430
+FUSE 1
+1 25791U 99035A 01195.20357322 .00000505 00000-0 10164-3 0 3180
+2 25791 24.9825 65.4916 0011215 116.0156 244.1500 14.40068220108256
+FUSE 1
+1 25791U 99035A 01194.02545613 .00000499 00000-0 99733-4 0 3172
+2 25791 24.9826 72.6920 0011188 103.4129 256.7628 14.40067381108089
+FUSE 1
+1 25791U 99035A 01193.95615541 +.00000494 +00000-0 +98068-4 0 03356
+2 25791 024.9827 073.1157 0011179 102.6649 257.5123 14.40067286108078
+FUSE 1
+1 25791U 99035A 01192.50083132 .00000493 00000-0 97812-4 0 3165
+2 25791 24.9831 82.0131 0011146 87.3221 272.8568 14.40066408107867
+FUSE 1
+1 25791U 99035A 01191.94642156 +.00000499 +00000-0 +99730-4 0 03267
+2 25791 024.9831 085.4021 0011170 081.6595 278.5190 14.40066125107781
+FUSE 1
+1 25791U 99035A 01191.18410683 .00000513 00000-0 10412-3 0 3155
+2 25791 24.9835 90.0635 0011114 74.2217 285.9515 14.40065843107672
+FUSE 1
+1 25791U 99035A 01190.14458616 .00000519 00000-0 10586-3 0 3145
+2 25791 24.9834 96.4153 0011128 63.2236 296.9407 14.40065179107528
+FUSE 1
+1 25791U 99035A 01188.89716000 .00000517 00000-0 10535-3 0 3139
+2 25791 24.9835 104.0390 0011105 50.1547 309.9937 14.40064329107342
+FUSE 1
+1 25791U 99035A 01187.85763598 .00000560 00000-0 11885-3 0 3124
+2 25791 24.9834 110.3927 0011027 39.7903 320.3413 14.40064059107198
+FUSE 1
+1 25791U 99035A 01186.26369845 .00000576 00000-0 12383-3 0 3115
+2 25791 24.9833 120.1320 0011040 23.1413 336.9590 14.40062964106967
+FUSE 1
+1 25791U 99035A 01185.22417234 .00000611 00000-0 13466-3 0 3108
+2 25791 24.9832 126.4851 0010938 12.2821 347.7952 14.40062479106818
+FUSE 1
+1 25791U 99035A 01183.90743981 .00000616 00000-0 13632-3 0 3090
+2 25791 24.9835 134.5338 0011000 358.4299 1.6173 14.40061396106623
+FUSE 1
+1 25791U 99035A 01182.72930922 .00000647 00000-0 14599-3 0 3088
+2 25791 24.9835 141.7349 0010932 346.1083 13.9122 14.40060663106450
+FUSE 1
+1 25791U 99035A 01181.55117807 .00000655 00000-0 14826-3 0 3078
+2 25791 24.9833 148.9349 0010989 333.0109 26.9827 14.40059608106287
+FUSE 1
+1 25791U 99035A 01180.23444311 .00000674 00000-0 15430-3 0 3067
+2 25791 24.9834 156.9835 0010915 318.5214 41.4471 14.40058589106094
+FUSE 1
+1 25791U 99035A 01179.95723625 +.00000660 +00000-0 +14998-3 0 03537
+2 25791 024.9835 158.6778 0010936 315.4784 044.4860 14.40058184106053
+FUSE 1
+1 25791U 99035A 01178.98701077 +.00000700 +00000-0 +16223-3 0 03095
+2 25791 024.9839 164.6103 0010804 304.5310 055.4225 14.40057715105914
+FUSE 1
+1 25791U 99035A 01178.91770917 .00000670 00000-0 15306-3 0 3050
+2 25791 24.9837 165.0340 0010775 303.9328 56.0166 14.40057316105906
+FUSE 1
+1 25791U 99035A 01177.94748394 +.00000667 +00000-0 +15215-3 0 03051
+2 25791 024.9839 170.9631 0010758 293.8032 066.1362 14.40056346105762
+FUSE 1
+1 25791U 99035A 01177.80888028 .00000659 00000-0 14952-3 0 3042
+2 25791 24.9838 171.8101 0010748 292.4036 67.5332 14.40056120105741
+FUSE 1
+1 25791U 99035A 01176.83865444 +.00000669 +00000-0 +15256-3 0 03062
+2 25791 024.9836 177.7390 0010771 281.9230 078.0068 14.40055269105600
+FUSE 1
+1 25791U 99035A 01176.56144703 .00000675 00000-0 15449-3 0 3038
+2 25791 24.9837 179.4333 0010795 278.8637 81.0649 14.40055073105566
+FUSE 1
+1 25791U 99035A 01175.86842919 +.00000678 +00000-0 +15546-3 0 03316
+2 25791 024.9837 183.6698 0010800 271.5427 088.3843 14.40054412105462
+FUSE 1
+1 25791U 99035A 01175.24471298 .00000688 00000-0 15855-3 0 3028
+2 25791 24.9839 187.4824 0010794 264.9104 95.0170 14.40053918105375
+FUSE 1
+1 25791U 99035A 01173.85867780 .00000677 00000-0 15522-3 0 3016
+2 25791 24.9839 195.9535 0010801 250.3967 109.5372 14.40052381105179
+FUSE 1
+1 25791U 99035A 01172.95775496 +.00000670 +00000-0 +15307-3 0 03067
+2 25791 024.9841 201.4598 0010826 240.8926 119.0499 14.40051405105048
+FUSE 1
+1 25791U 99035A 01172.54194415 .00000672 00000-0 15364-3 0 3007
+2 25791 24.9843 204.0010 0010840 236.4724 123.4748 14.40051033104986
+FUSE 1
+1 25791U 99035A 01171.98753138 +.00000679 +00000-0 +15575-3 0 03288
+2 25791 024.9843 207.3895 0010842 230.3514 129.6117 14.40050582104903
+FUSE 1
+1 25791U 99035A 01171.22521133 .00000677 00000-0 15522-3 0 2990
+2 25791 24.9854 212.0560 0010996 222.3356 137.6304 14.40049810104798
+FUSE 1
+1 25791U 99035A 01169.97777976 +.00000651 +00000-0 +14719-3 0 02996
+2 25791 024.9854 219.6805 0010993 209.2640 150.7249 14.40048323104613
+FUSE 1
+1 25791U 99035A 01169.83917607 .00000653 00000-0 14780-3 0 2987
+2 25791 24.9854 220.5274 0010997 207.8311 152.1606 14.40048213104595
+FUSE 1
+1 25791U 99035A 01168.93825267 +.00000639 +00000-0 +14331-3 0 02983
+2 25791 024.9853 226.0330 0011011 198.4101 161.6008 14.40047199104467
+FUSE 1
+1 25791U 99035A 01168.79964884 .00000639 00000-0 14331-3 0 2975
+2 25791 24.9853 226.8798 0011011 196.9581 163.0554 14.40047071104447
+FUSE 1
+1 25791U 99035A 01167.55221537 .00000637 00000-0 14282-3 0 2961
+2 25791 24.9855 234.5040 0011049 184.0993 175.9424 14.40045914104263
+FUSE 1
+1 25791U 99035A 01166.51268687 .00000629 00000-0 14035-3 0 2959
+2 25791 24.9856 240.8573 0011071 173.3506 186.7149 14.40044884104114
+FUSE 1
+1 25791U 99035A 01165.95827450 +.00000603 +00000-0 +13200-3 0 03120
+2 25791 024.9848 244.2600 0010963 166.9546 193.1247 14.40044112104031
+FUSE 1
+1 25791U 99035A 01165.40385861 .00000599 00000-0 13098-3 0 2943
+2 25791 24.9849 247.6487 0010973 161.1937 198.8977 14.40043624103953
+FUSE 1
+1 25791U 99035A 01164.22572358 .00000615 00000-0 13598-3 0 2934
+2 25791 24.9850 254.8490 0011010 149.2494 210.8676 14.40042799103781
+FUSE 1
+1 25791U 99035A 01163.87921276 +.00000615 +00000-0 +13599-3 0 03270
+2 25791 024.9849 256.9662 0011011 145.6235 214.4988 14.40042491103737
+FUSE 1
+1 25791U 99035A 01163.18619226 .00000575 00000-0 12336-3 0 2927
+2 25791 24.9852 261.2039 0011012 139.1112 221.0231 14.40041529103636
+FUSE 1
+1 25791U 99035A 01162.90898327 +.00000573 +00000-0 +12283-3 0 03321
+2 25791 024.9853 262.8977 0011009 136.1629 223.9749 14.40041298103594
+FUSE 1
+1 25791U 99035A 01161.86945008 .00000570 00000-0 12199-3 0 2911
+2 25791 24.9855 269.2523 0011028 125.4435 234.7103 14.40040463103442
+FUSE 1
+1 25791U 99035A 01160.55270529 .00000600 00000-0 13110-3 0 2902
+2 25791 24.9853 277.3011 0011033 112.2693 247.8985 14.40039697103257
+FUSE 1
+1 25791U 99035A 01159.51316909 .00000608 00000-0 13389-3 0 2893
+2 25791 24.9855 283.6566 0011020 101.4944 258.6799 14.40038905103107
+FUSE 1
+1 25791U 99035A 01158.95874900 +.00000619 +00000-0 +13726-3 0 03157
+2 25791 024.9854 287.0455 0011021 095.8528 264.3235 14.40038518103026
+FUSE 1
+1 25791U 99035A 01158.40432836 .00000637 00000-0 14284-3 0 2884
+2 25791 24.9854 290.4346 0011007 89.9818 270.1950 14.40038207102947
+FUSE 1
+1 25791U 99035A 01157.22618367 .00000647 00000-0 14588-3 0 2875
+2 25791 24.9857 297.6350 0011049 77.7985 282.3753 14.40037223102774
+FUSE 1
+1 25791U 99035A 01156.18664290 .00000642 00000-0 14440-3 0 2866
+2 25791 24.9861 303.9893 0011005 67.0287 293.1376 14.40036236102629
+FUSE 1
+1 25791U 99035A 01154.86988814 .00000664 00000-0 15129-3 0 2858
+2 25791 24.9862 312.0359 0010968 53.2775 306.8736 14.40035235102433
+FUSE 1
+1 25791U 99035A 01153.55313207 .00000654 00000-0 14823-3 0 2849
+2 25791 24.9862 320.0822 0010917 39.4182 320.7119 14.40033855102244
+FUSE 1
+1 25791U 99035A 01152.51358604 .00000656 00000-0 14876-3 0 2833
+2 25791 24.9862 326.4348 0010879 28.5266 331.5835 14.40032889102090
+FUSE 1
+1 25791U 99035A 01151.95916093 +.00000658 +00000-0 +14954-3 0 03067
+2 25791 024.9864 329.8227 0010858 022.6676 337.4309 14.40032401102015
+FUSE 1
+1 25791U 99035A 01151.33543277 .00000649 00000-0 14671-3 0 2828
+2 25791 24.9863 333.6343 0010866 15.9419 344.1429 14.40031685101925
+FUSE 1
+1 25791U 99035A 01150.15727791 .00000654 00000-0 14810-3 0 2812
+2 25791 24.9864 340.8337 0010840 3.4915 356.5667 14.40030638101753
+FUSE 1
+1 25791U 99035A 01149.88006493 +.00000653 +00000-0 +14785-3 0 03135
+2 25791 024.9866 342.5280 0010826 000.5019 359.5497 14.40030376101717
+FUSE 1
+1 25791U 99035A 01148.90982283 .00000634 00000-0 14209-3 0 2800
+2 25791 24.9866 348.4566 0010800 350.2840 9.7632 14.40029222101575
+FUSE 1
+1 25791U 99035A 01147.38515028 .00000579 00000-0 12480-3 0 2795
+2 25791 24.9837 357.7948 0010793 333.6467 26.3492 14.40027134101356
+FUSE 1
+1 25791U 99035A 01146.20699331 .00000565 00000-0 12045-3 0 2786
+2 25791 24.9838 4.9959 0010786 321.0840 38.8893 14.40026061101180
+FUSE 1
+1 25791U 99035A 01144.89022932 .00000533 00000-0 11042-3 0 2776
+2 25791 24.9841 13.0436 0010817 306.9215 53.0301 14.40024823100993
+FUSE 1
+1 25791U 99035A 01143.91998144 +.00000546 +00000-0 +11428-3 0 02924
+2 25791 024.9842 018.9724 0010816 296.5378 063.4019 14.40024274100857
+FUSE 1
+1 25791U 99035A 01143.36555441 .00000551 00000-0 11588-3 0 2767
+2 25791 24.9842 22.3601 0010810 290.7426 69.1925 14.40023904100773
+FUSE 1
+1 25791U 99035A 01142.94973432 +.00000553 +00000-0 +11652-3 0 02881
+2 25791 024.9843 024.9015 0010807 286.3744 073.5580 14.40023633100710
+FUSE 1
+1 25791U 99035A 01142.32600379 .00000567 00000-0 12088-3 0 2755
+2 25791 24.9842 28.7136 0010785 279.8487 80.0792 14.40023279100625
+FUSE 1
+1 25791U 99035A 01141.91018440 +.00000540 +00000-0 +11242-3 0 02900
+2 25791 024.9840 031.2547 0010893 276.2467 083.6799 14.40022637100563
+FUSE 1
+1 25791U 99035A 01141.21715079 .00000549 00000-0 11542-3 0 2749
+2 25791 24.9840 35.4898 0010896 268.8475 91.0785 14.40022229100461
+FUSE 1
+1 25791U 99035A 01139.90038775 .00000571 00000-0 12219-3 0 2739
+2 25791 24.9839 43.5397 0010931 255.0386 104.8911 14.40021439100277
+FUSE 1
+1 25791U 99035A 01138.58362425 .00000609 00000-0 13389-3 0 2724
+2 25791 24.9837 51.5882 0011072 241.1629 118.7758 14.40020744100086
+FUSE 1
+1 25791U 99035A 01137.33616481 .00000661 00000-0 15031-3 0 2713
+2 25791 24.9839 59.2112 0011101 227.8811 132.0752 14.40020162 99901
+FUSE 1
+1 25791U 99035A 01136.22731284 .00000674 00000-0 15435-3 0 2700
+2 25791 24.9841 65.9875 0011119 216.3279 143.6473 14.40019220 99747
+FUSE 1
+1 25791U 99035A 01134.97985363 +.00000712 +00000-0 +16613-3 0 02734
+2 25791 024.9840 073.6131 0011195 203.7721 156.2269 14.40018339099566
+FUSE 1
+1 25791U 99035A 01134.91055026 .00000715 00000-0 16725-3 0 2694
+2 25791 24.9839 74.0366 0011202 203.0881 156.9123 14.40018302 99553
+FUSE 1
+1 25791U 99035A 01133.94030404 +.00000743 +00000-0 +17573-3 0 02737
+2 25791 024.9839 079.9663 0011198 193.0427 166.9790 14.40017554099419
+FUSE 1
+1 25791U 99035A 01133.45518076 .00000746 00000-0 17689-3 0 2684
+2 25791 24.9839 82.9302 0011209 188.0450 171.9871 14.40017047 99341
+FUSE 1
+1 25791U 99035A 01132.20772024 .00000785 00000-0 18898-3 0 2676
+2 25791 24.9839 90.5544 0011269 175.2870 184.7740 14.40016047 99160
+FUSE 1
+1 25791U 99035A 01130.96025905 +.00000820 +00000-0 +19980-3 0 02691
+2 25791 024.9841 098.1782 0011296 162.1732 197.9172 14.40014946098983
+FUSE 1
+1 25791U 99035A 01130.89095562 .00000820 00000-0 20001-3 0 2662
+2 25791 24.9841 98.6016 0011296 161.4536 198.6384 14.40014866 98975
+FUSE 1
+1 25791U 99035A 01129.92071030 +.00000847 +00000-0 +20834-3 0 02661
+2 25791 024.9833 104.5520 0011085 151.6354 208.4757 14.40014053098835
+FUSE 1
+1 25791U 99035A 01129.85140680 .00000850 00000-0 20936-3 0 2657
+2 25791 24.9832 104.9757 0011084 150.9394 209.1729 14.40013984 98823
+FUSE 1
+1 25791U 99035A 01128.95046107 +.00000863 +00000-0 +21348-3 0 02704
+2 25791 024.9831 110.4816 0011082 141.5157 218.6142 14.40012890098695
+FUSE 1
+1 25791U 99035A 01128.53463956 .00000867 00000-0 21456-3 0 2640
+2 25791 24.9830 113.0225 0011082 137.1961 222.9409 14.40012343 98632
+FUSE 1
+1 25791U 99035A 01127.98021059 +.00000880 +00000-0 +21866-3 0 02822
+2 25791 024.9832 116.4114 0011088 131.3728 228.7736 14.40011719098555
+FUSE 1
+1 25791U 99035A 01127.21786998 .00000884 00000-0 22005-3 0 2637
+2 25791 24.9831 121.0699 0011080 123.3961 236.7608 14.40010685 98442
+FUSE 1
+1 25791U 99035A 01125.90109773 .00000892 00000-0 22255-3 0 2626
+2 25791 24.9833 129.1184 0011028 109.9749 250.1950 14.40008904 98258
+FUSE 1
+1 25791U 99035A 01124.86153846 .00000895 00000-0 22336-3 0 2612
+2 25791 24.9835 135.4720 0010976 99.2838 260.8908 14.40007464 98102
+FUSE 1
+1 25791U 99035A 01123.82197729 .00000903 00000-0 22598-3 0 2604
+2 25791 24.9836 141.8244 0010956 88.5472 271.6290 14.40006059 97953
+FUSE 1
+1 25791U 99035A 01122.78241421 .00000914 00000-0 22957-3 0 2596
+2 25791 24.9838 148.1778 0010906 77.7606 282.4122 14.40004664 97809
+FUSE 1
+1 25791U 99035A 01121.74284958 .00000909 00000-0 22797-3 0 2588
+2 25791 24.9840 154.5310 0010872 66.8417 293.3235 14.40003100 97659
+FUSE 1
+1 25791U 99035A 01120.98050140 +.00000892 +00000-0 +22245-3 0 02632
+2 25791 024.9840 159.1901 0010848 058.8234 301.3337 14.40001802097545
+FUSE 1
+1 25791U 99035A 01120.56467427 .00000893 00000-0 22276-3 0 2574
+2 25791 24.9840 161.7307 0010845 54.4415 305.7103 14.40001218 97487
+FUSE 1
+1 25791U 99035A 01119.24788803 .00000840 00000-0 20637-3 0 2561
+2 25791 24.9839 169.7779 0010778 40.3623 319.7683 14.39998784 97294
+FUSE 1
+1 25791U 99035A 01117.23804969 .00000814 00000-0 19817-3 0 2547
+2 25791 24.9840 182.0587 0010772 19.4486 340.6431 14.39995823 97003
+FUSE 1
+1 25791U 99035A 01116.96083039 +.00000802 +00000-0 +19449-3 0 02877
+2 25791 024.9843 183.7523 0010778 016.6787 343.4072 14.39995329096960
+FUSE 1
+1 25791U 99035A 01116.19847490 .00001304 00000-0 35116-3 0 2531
+2 25791 24.9827 188.4092 0011139 8.8375 351.2331 14.39996795 96854
+FUSE 1
+1 25791U 99035A 01114.88168133 +.00000626 +00000-0 +13955-3 0 02538
+2 25791 024.9832 196.4565 0011007 354.8618 005.1760 14.39992143096665
+FUSE 1
+1 25791U 99035A 01114.81237588 .00000730 00000-0 17192-3 0 2524
+2 25791 24.9832 196.8805 0010974 353.8797 6.1556 14.39992378 96658
+FUSE 1
+1 25791U 99035A 01113.91141013 +.00001105 +00000-0 +28900-3 0 02583
+2 25791 024.9832 202.3874 0010818 344.5129 015.5072 14.39992088096521
+FUSE 1
+1 25791U 99035A 01113.56488467 .00000804 00000-0 19509-3 0 2514
+2 25791 24.9836 204.5049 0010848 340.9754 19.0347 14.39990691 96476
+FUSE 1
+1 25791U 99035A 01112.87183381 +.00000588 +00000-0 +12770-3 0 02853
+2 25791 024.9838 208.7401 0010866 334.2845 025.7120 14.39989069096372
+FUSE 1
+1 25791U 99035A 01112.24808739 .00000697 00000-0 16161-3 0 2506
+2 25791 24.9837 212.5519 0010856 327.7806 32.2065 14.39988758 96282
+FUSE 1
+1 25791U 99035A 01110.86198210 .00000839 00000-0 20609-3 0 2496
+2 25791 24.9833 221.0217 0010828 312.9646 46.9953 14.39987824 96084
+FUSE 1
+1 25791U 99035A 01109.96101490 +.00000640 +00000-0 +14376-3 0 02662
+2 25791 024.9835 226.5270 0010746 303.7230 056.2253 14.39986069095953
+FUSE 1
+1 25791U 99035A 01109.54518505 .00000698 00000-0 16199-3 0 2483
+2 25791 24.9825 229.0749 0010853 299.3689 60.5757 14.39985563 95896
+FUSE 1
+1 25791U 99035A 01108.92143892 +.00000424 +00000-0 +76456-4 0 02689
+2 25791 024.9835 232.8933 0010773 292.5014 067.4341 14.39984084095805
+FUSE 1
+1 25791U 99035A 01108.43630231 .00000475 00000-0 92307-4 0 2479
+2 25791 24.9841 235.8622 0010842 287.1593 72.7725 14.39984197 95731
+FUSE 1
+1 25791U 99035A 01107.25811420 .00000342 00000-0 50688-4 0 2467
+2 25791 24.9840 243.0654 0010850 274.6194 85.3080 14.39982982 95568
+FUSE 1
+1 25791U 99035A 01106.91158787 +.00000319 +00000-0 +43545-4 0 02816
+2 25791 024.9842 245.1833 0010843 270.9361 088.9901 14.39982821095517
+FUSE 1
+1 25791U 99035A 01105.94131510 +.00000457 +00000-0 +86612-4 0 02469
+2 25791 024.9838 251.1154 0010905 261.3015 098.6260 14.39982811095373
+FUSE 1
+1 25791U 99035A 01105.87200985 .00000459 00000-0 87250-4 0 2454
+2 25791 24.9840 251.5393 0010901 260.6320 99.2952 14.39982811 95366
+FUSE 1
+1 25791U 99035A 01104.55520998 .00001008 00000-0 25888-3 0 2445
+2 25791 24.9829 259.5887 0011021 247.1818 112.7523 14.39983372 95172
+FUSE 1
+1 25791U 99035A 01103.51562954 .00001492 00000-0 40988-3 0 2432
+2 25791 24.9842 265.9425 0010869 234.0542 125.8931 14.39984015 95021
+FUSE 1
+1 25791U 99035A 01102.89188107 +.00001731 +00000-0 +48461-3 0 02649
+2 25791 024.9844 269.7554 0011059 227.9140 132.0419 14.39983703094938
+FUSE 1
+1 25791U 99035A 01102.54535407 .00001893 00000-0 53504-3 0 2429
+2 25791 24.9846 271.8734 0010921 223.7407 136.2232 14.39983757 94883
+FUSE 1
+1 25791U 99035A 01101.92160517 +.00002030 +00000-0 +57800-3 0 02647
+2 25791 024.9848 275.6854 0011217 217.6844 142.2874 14.39982801094794
+FUSE 1
+1 25791U 99035A 01101.57507715 .00002190 00000-0 62781-3 0 2419
+2 25791 24.9854 277.8031 0010956 213.3871 146.5941 14.39983161 94741
+FUSE 1
+1 25791U 99035A 01100.88202474 +.00002253 +00000-0 +64777-3 0 02660
+2 25791 024.9853 282.0379 0011053 206.6572 153.3357 14.39981020094643
+FUSE 1
+1 25791U 99035A 01100.18897006 .00002361 00000-0 68129-3 0 2401
+2 25791 24.9852 286.2722 0011029 198.9302 161.0725 14.39979226 94546
+FUSE 1
+1 25791U 99035A 01099.91174907 +.00002395 +00000-0 +69207-3 0 02750
+2 25791 024.9855 287.9660 0011230 196.5404 163.4735 14.39978461094502
+FUSE 1
+1 25791U 99035A 01098.94147224 +.00002530 +00000-0 +73411-3 0 02421
+2 25791 024.9854 293.8958 0011234 186.4584 173.5772 14.39975567094369
+FUSE 1
+1 25791U 99035A 01098.87216662 .00002543 00000-0 73810-3 0 2399
+2 25791 24.9855 294.3194 0011295 185.6074 174.4304 14.39975420 94358
+FUSE 1
+1 25791U 99035A 01097.55535820 .00002756 00000-0 80493-3 0 2383
+2 25791 24.9857 302.3671 0011209 171.5084 188.5605 14.39971661 94162
+FUSE 1
+1 25791U 99035A 01096.51577572 .00001819 00000-0 51232-3 0 2375
+2 25791 24.9851 308.7196 0011060 159.9502 200.1452 14.39962260 94018
+FUSE 1
+1 25791U 99035A 01095.19896006 .00002137 00000-0 61186-3 0 2366
+2 25791 24.9847 316.7677 0011044 146.2105 213.9107 14.39958939 93821
+FUSE 1
+1 25791U 99035A 01094.92173520 +.00002224 +00000-0 +63882-3 0 02749
+2 25791 024.9845 318.4612 0011055 143.4912 216.6355 14.39958128093784
+FUSE 1
+1 25791U 99035A 01093.95144716 +.00002409 +00000-0 +69674-3 0 02410
+2 25791 024.9843 324.3915 0011216 133.1891 226.9554 14.39954609093645
+FUSE 1
+1 25791U 99035A 01093.88214064 .00002499 00000-0 72482-3 0 2359
+2 25791 24.9842 324.8152 0011197 132.3778 227.7676 14.39954543 93635
+FUSE 1
+1 25791U 99035A 01092.91184954 +.00003251 +00000-0 +95975-3 0 02557
+2 25791 024.9837 330.7471 0011246 122.5955 237.5655 14.39950967093498
+FUSE 1
+1 25791U 99035A 01091.17917824 .00003186 00000-0 93968-3 0 2337
+2 25791 24.9835 341.3417 0011318 105.3746 254.8012 14.39939177 93243
+FUSE 1
+1 25791U 99035A 01090.13956723 .00002972 00000-0 87297-3 0 2322
+2 25791 24.9838 347.6958 0011329 94.7440 265.4361 14.39932401 93090
+FUSE 1
+1 25791U 99035A 01088.96133501 +.00002837 +00000-0 +83108-3 0 02339
+2 25791 024.9838 354.9011 0011327 083.2313 276.9488 14.39925595092925
+FUSE 1
+1 25791U 99035A 01088.89202703 .00002815 00000-0 82399-3 0 2317
+2 25791 24.9839 355.3247 0011337 82.5196 277.6602 14.39925159 92915
+FUSE 1
+1 25791U 99035A 01087.92171315 +.00001946 +00000-0 +55260-3 0 02360
+2 25791 024.9847 001.2552 0011205 072.8181 287.3553 14.39918251092772
+FUSE 1
+1 25791U 99035A 01087.85240649 .00001697 00000-0 47485-3 0 2306
+2 25791 24.9849 1.6791 0011193 72.3247 287.8536 14.39917141 92769
+FUSE 1
+1 25791U 99035A 01082.51561712 .00000996 00000-0 25569-3 0 2266
+2 25791 24.9850 34.2906 0010848 15.4515 344.6316 14.39903030 91997
+FUSE 1
+1 25791U 99035A 01081.96114279 +.00000895 +00000-0 +22411-3 0 02357
+2 25791 024.9850 037.6798 0010802 008.8785 351.1917 14.39901631091915
+FUSE 1
+1 25791U 99035A 01081.33735740 .00000887 00000-0 22159-3 0 2259
+2 25791 24.9850 41.4919 0010779 2.2856 357.7699 14.39900735 91826
+FUSE 1
+1 25791U 99035A 01080.92150068 +.00000863 +00000-0 +21388-3 0 02333
+2 25791 024.9849 044.0329 0010784 357.8343 002.2118 14.39899989091763
+FUSE 1
+1 25791U 99035A 01080.22840542 .00000844 00000-0 20810-3 0 2247
+2 25791 24.9848 48.2669 0010801 350.7139 9.3171 14.39898909 91667
+FUSE 1
+1 25791U 99035A 01079.95116702 +.00000849 +00000-0 +20965-3 0 02537
+2 25791 024.9848 049.9618 0010808 347.8135 012.2110 14.39898588091624
+FUSE 1
+1 25791U 99035A 01078.98083194 +.00000863 +00000-0 +21409-3 0 02245
+2 25791 024.9850 055.8907 0010787 337.5934 022.4103 14.39897482091484
+FUSE 1
+1 25791U 99035A 01078.91152241 .00000863 00000-0 21400-3 0 2238
+2 25791 24.9849 56.3142 0010787 336.8603 23.1424 14.39897379 91472
+FUSE 1
+1 25791U 99035A 01077.94118795 +.00000865 +00000-0 +21466-3 0 02296
+2 25791 024.9846 062.2492 0010753 326.7694 033.2147 14.39896112091337
+FUSE 1
+1 25791U 99035A 01077.52532984 .00000862 00000-0 21353-3 0 2225
+2 25791 24.9844 64.7900 0010747 322.4604 37.5154 14.39895491 91270
+FUSE 1
+1 25791U 99035A 01076.48568446 .00000836 00000-0 20539-3 0 2216
+2 25791 24.9842 71.1417 0010785 311.0390 48.9185 14.39893786 91120
+FUSE 1
+1 25791U 99035A 01075.23810913 .00000832 00000-0 20428-3 0 2209
+2 25791 24.9846 78.7649 0010811 297.7413 62.1997 14.39892127 90946
+FUSE 1
+1 25791U 99035A 01073.99053383 +.00000816 +00000-0 +19913-3 0 02209
+2 25791 024.9845 086.3872 0010797 284.5974 075.3336 14.39890279090766
+FUSE 1
+1 25791U 99035A 01073.92122749 .00000816 00000-0 19910-3 0 2190
+2 25791 24.9845 86.8106 0010797 283.8732 76.0753 14.39890190 90757
+FUSE 1
+1 25791U 99035A 01072.88158105 +.00000784 +00000-0 +18923-3 0 02220
+2 25791 024.9830 093.1816 0010740 272.7044 087.2233 14.39888516090601
+FUSE 1
+1 25791U 99035A 01072.53503188 .00000787 00000-0 19030-3 0 2185
+2 25791 24.9830 95.2987 0010757 268.9911 90.9362 14.39888127 90557
+FUSE 1
+1 25791U 99035A 01071.98055429 +.00000763 +00000-0 +18258-3 0 02201
+2 25791 024.9833 098.6880 0010753 263.1759 096.7529 14.39887246090473
+FUSE 1
+1 25791U 99035A 01071.49538471 .00000791 00000-0 19130-3 0 2177
+2 25791 24.9831 101.6522 0010849 257.9268 102.0023 14.39886914 90405
+FUSE 1
+1 25791U 99035A 01070.94090658 +.00000785 +00000-0 +18959-3 0 02469
+2 25791 024.9831 105.0409 0010844 252.1036 107.8288 14.39886182090326
+FUSE 1
+1 25791U 99035A 01070.24780824 .00000809 00000-0 19709-3 0 2161
+2 25791 24.9831 109.2771 0010871 244.6528 115.2853 14.39885565 90220
+FUSE 1
+1 25791U 99035A 01069.20816158 .00000791 00000-0 19153-3 0 2157
+2 25791 24.9832 115.6328 0011054 233.9117 126.0367 14.39884078 90070
+FUSE 1
+1 25791U 99035A 01067.82196489 .00000809 00000-0 19705-3 0 2143
+2 25791 24.9830 124.1033 0011113 218.9869 140.9835 14.39882486 89871
+FUSE 1
+1 25791U 99035A 01066.64369761 +.00000799 +00000-0 +19374-3 0 02169
+2 25791 024.9830 131.3033 0011151 207.0123 152.9803 14.39880895089707
+FUSE 1
+1 25791U 99035A 01066.50507788 .00000796 00000-0 19291-3 0 2139
+2 25791 24.9830 132.1500 0011152 205.5911 154.4046 14.39880702 89684
+FUSE 1
+1 25791U 99035A 01065.88128936 +.00000790 +00000-0 +19103-3 0 02397
+2 25791 024.9831 135.9622 0011122 198.9598 161.0503 14.39879873089593
+FUSE 1
+1 25791U 99035A 01065.18819067 .00000783 00000-0 18885-3 0 2121
+2 25791 24.9834 140.1989 0011152 191.7198 168.3068 14.39878991 89495
+FUSE 1
+1 25791U 99035A 01064.91095089 +.00000771 +00000-0 +18518-3 0 02446
+2 25791 024.9835 141.8928 0011125 188.7032 171.3283 14.39878539089457
+FUSE 1
+1 25791U 99035A 01063.87130138 .00000765 00000-0 18340-3 0 2115
+2 25791 24.9836 148.2465 0011125 177.9406 182.1148 14.39877264 89308
+FUSE 1
+1 25791U 99035A 01063.87130137 +.00000767 +00000-0 +18406-3 0 02120
+2 25791 024.9835 148.2460 0011132 177.9393 182.1166 14.39877276089308
+FUSE 1
+1 25791U 99035A 01062.90096058 +.00000769 +00000-0 +18444-3 0 02210
+2 25791 024.9839 154.1757 0011132 167.8039 192.2735 14.39876200089166
+FUSE 1
+1 25791U 99035A 01062.55441017 .00000773 00000-0 18590-3 0 2105
+2 25791 24.9841 156.2936 0011137 164.3299 195.7558 14.39875851 89113
+FUSE 1
+1 25791U 99035A 01061.30682837 .00000772 00000-0 18556-3 0 2093
+2 25791 24.9841 163.9191 0011157 150.7881 209.3252 14.39874318 88938
+FUSE 1
+1 25791U 99035A 01060.82165726 +.00000760 +00000-0 +18192-3 0 02488
+2 25791 024.9843 166.8839 0011144 145.5272 214.5963 14.39873647088866
+FUSE 1
+1 25791U 99035A 01059.92062424 +.00000739 +00000-0 +17528-3 0 02194
+2 25791 024.9846 172.3899 0011179 135.9727 224.1680 14.39872415088734
+FUSE 1
+1 25791U 99035A 01059.57407284 .00000713 00000-0 16698-3 0 2089
+2 25791 24.9853 174.5090 0011130 132.3934 227.7515 14.39871839 88686
+FUSE 1
+1 25791U 99035A 01058.25717454 .00000711 00000-0 16656-3 0 2077
+2 25791 24.9850 182.5567 0011163 119.2623 240.9005 14.39870406 88495
+FUSE 1
+1 25791U 99035A 01057.91062171 +.00000714 +00000-0 +16747-3 0 02319
+2 25791 024.9852 184.6743 0011160 115.8000 244.3659 14.39870084088444
+FUSE 1
+1 25791U 99035A 01056.87096351 .00000689 00000-0 15951-3 0 2069
+2 25791 24.9851 191.0276 0011173 104.7434 255.4312 14.39868715 88298
+FUSE 1
+1 25791U 99035A 01055.90061376 +.00000679 +00000-0 +15637-3 0 02285
+2 25791 024.9850 196.9579 0011170 094.7617 265.4158 14.39867625088158
+FUSE 1
+1 25791U 99035A 01055.55406001 .00000689 00000-0 15968-3 0 2057
+2 25791 24.9853 199.0771 0011176 91.3496 268.8293 14.39867412 88109
+FUSE 1
+1 25791U 99035A 01054.23715345 .00000689 00000-0 15972-3 0 2049
+2 25791 24.9854 207.1235 0011152 77.7001 282.4754 14.39866067 87917
+FUSE 1
+1 25791U 99035A 01053.89059839 +.00000696 +00000-0 +16187-3 0 02158
+2 25791 024.9856 209.2409 0011136 074.1479 286.0253 14.39865797087864
+FUSE 1
+1 25791U 99035A 01052.92024384 +.00000702 +00000-0 +16372-3 0 02040
+2 25791 024.9854 215.1686 0011139 064.1094 296.0556 14.39864826087724
+FUSE 1
+1 25791U 99035A 01052.85093275 .00000705 00000-0 16455-3 0 2031
+2 25791 24.9853 215.5920 0011131 63.4459 296.7188 14.39864778 87710
+FUSE 1
+1 25791U 99035A 01051.88057587 +.00000742 +00000-0 +17626-3 0 02031
+2 25791 024.9846 221.5212 0010994 053.4019 306.7497 14.39864094087570
+FUSE 1
+1 25791U 99035A 01049.17743500 .00000805 00000-0 19598-3 0 2004
+2 25791 24.9852 238.0376 0010943 24.9759 335.1274 14.39861598 87181
+FUSE 1
+1 25791U 99035A 01048.13776370 .00000818 00000-0 20021-3 0 1994
+2 25791 24.9855 244.3897 0010946 14.2126 345.8687 14.39860443 87033
+FUSE 1
+1 25791U 99035A 01046.95946808 +.00000826 +00000-0 +20265-3 0 02009
+2 25791 024.9856 251.5883 0010925 001.7292 358.3251 14.39859035086862
+FUSE 1
+1 25791U 99035A 01046.89015657 .00000828 00000-0 20328-3 0 1989
+2 25791 24.9856 252.0117 0010921 1.0228 359.0304 14.39858972 86851
+FUSE 1
+1 25791U 99035A 01045.91979473 +.00000825 +00000-0 +20234-3 0 02104
+2 25791 024.9857 257.9395 0010895 350.7865 009.2444 14.39857693086718
+FUSE 1
+1 25791U 99035A 01045.57323730 .00000822 00000-0 20128-3 0 1978
+2 25791 24.9855 260.0575 0010891 347.1542 12.8705 14.39857185 86669
+FUSE 1
+1 25791U 99035A 01044.32563210 .00000852 00000-0 21070-3 0 1968
+2 25791 24.9845 267.6885 0010940 335.0275 24.9843 14.39855877 86482
+FUSE 1
+1 25791U 99035A 01043.90976161 +.00000818 +00000-0 +19993-3 0 02047
+2 25791 024.9856 270.2365 0010879 331.1039 028.8868 14.39855093086427
+FUSE 1
+1 25791U 99035A 01043.21664491 .00000820 00000-0 20056-3 0 1955
+2 25791 24.9857 274.4720 0010879 323.9471 36.0302 14.39854225 86327
+FUSE 1
+1 25791U 99035A 01042.93939835 +.00000809 +00000-0 +19728-3 0 02345
+2 25791 024.9860 276.1661 0010879 321.0294 038.9430 14.39853798086288
+FUSE 1
+1 25791U 99035A 01041.89972384 .00000762 00000-0 18265-3 0 1943
+2 25791 24.9864 282.5199 0010886 310.1836 49.7717 14.39852068 86139
+FUSE 1
+1 25791U 99035A 01040.86004627 .00000786 00000-0 18998-3 0 1933
+2 25791 24.9864 288.8712 0010909 298.1189 61.8216 14.39851115 85984
+FUSE 1
+1 25791U 99035A 01039.88968203 +.00000776 +00000-0 +18695-3 0 01946
+2 25791 024.9866 294.8003 0010918 287.8124 072.1191 14.39849851085846
+FUSE 1
+1 25791U 99035A 01039.54312320 .00000778 00000-0 18759-3 0 1923
+2 25791 24.9865 296.9171 0010912 284.1925 75.7371 14.39849453 85798
+FUSE 1
+1 25791U 99035A 01038.91931566 +.00000841 +00000-0 +20715-3 0 01973
+2 25791 024.9853 300.7300 0011058 276.2116 083.7128 14.39849226085707
+FUSE 1
+1 25791U 99035A 01038.36482175 .00000851 00000-0 21041-3 0 1917
+2 25791 24.9852 304.1176 0011034 270.4549 89.4688 14.39848568 85628
+FUSE 1
+1 25791U 99035A 01037.94895133 +.00000854 +00000-0 +21128-3 0 02024
+2 25791 024.9850 306.6578 0011082 266.4454 093.4786 14.39848015085566
+FUSE 1
+1 25791U 99035A 01037.18652191 .00000871 00000-0 21669-3 0 1900
+2 25791 24.9854 311.3163 0011114 258.2637 101.6623 14.39847183 85456
+FUSE 1
+1 25791U 99035A 01035.93891068 +.00000893 +00000-0 +22356-3 0 01974
+2 25791 024.9856 318.9409 0011155 245.1344 114.8003 14.39845662085277
+FUSE 1
+1 25791U 99035A 01035.86959892 .00000895 00000-0 22415-3 0 1895
+2 25791 24.9856 319.3643 0011153 244.4229 115.5125 14.39845576 85260
+FUSE 1
+1 25791U 99035A 01034.96854630 +.00000904 +00000-0 +22698-3 0 02030
+2 25791 024.9856 324.8713 0011214 234.8399 125.1056 14.39844383085139
+FUSE 1
+1 25791U 99035A 01034.48336452 .00000891 00000-0 22284-3 0 1882
+2 25791 24.9853 327.8353 0011183 229.6286 130.3245 14.39843518 85060
+FUSE 1
+1 25791U 99035A 01033.23575272 .00000882 00000-0 22011-3 0 1876
+2 25791 24.9856 335.4581 0011214 216.6240 143.3500 14.39841675 84881
+FUSE 1
+1 25791U 99035A 01031.91882870 .00000844 00000-0 20813-3 0 1869
+2 25791 24.9858 343.5045 0011276 203.2127 156.7872 14.39839469 84699
+FUSE 1
+1 25791U 99035A 01031.91882869 +.00000845 +00000-0 +20836-3 0 01874
+2 25791 024.9858 343.5045 0011276 203.2090 156.7909 14.39839478084699
+FUSE 1
+1 25791U 99035A 01030.94846209 +.00000841 +00000-0 +20712-3 0 01918
+2 25791 024.9858 349.4319 0011289 193.2674 166.7539 14.39838132084559
+FUSE 1
+1 25791U 99035A 01030.46327849 .00000841 00000-0 20740-3 0 1853
+2 25791 24.9859 352.3959 0011304 188.2132 171.8192 14.39837508 84484
+FUSE 1
+1 25791U 99035A 01029.97809487 +.00000835 +00000-0 +20546-3 0 01981
+2 25791 024.9857 355.3599 0011303 183.2284 176.8152 14.39836776084417
+FUSE 1
+1 25791U 99035A 01029.21566280 .00000836 00000-0 20576-3 0 1848
+2 25791 24.9858 0.0180 0011350 175.3074 184.7541 14.39835807 84301
+FUSE 1
+1 25791U 99035A 01028.93841499 +.00000830 +00000-0 +20392-3 0 02294
+2 25791 024.9857 001.7120 0011345 172.4854 187.5833 14.39835361084265
+FUSE 1
+1 25791U 99035A 01027.96804596 +.00000821 +00000-0 +20111-3 0 01864
+2 25791 024.9857 007.6404 0011373 162.4249 197.6654 14.39833987084123
+FUSE 1
+1 25791U 99035A 01026.85905350 .00000774 00000-0 18631-3 0 1828
+2 25791 24.9845 14.4272 0011225 151.2576 208.8553 14.39832070 83960
+FUSE 1
+1 25791U 99035A 01025.95799395 +.00000773 +00000-0 +18616-3 0 01909
+2 25791 024.9845 019.9320 0011218 141.9876 218.1434 14.39830995083837
+FUSE 1
+1 25791U 99035A 01025.47280699 .00000781 00000-0 18854-3 0 1811
+2 25791 24.9846 22.8964 0011235 137.2317 222.9063 14.39830514 83762
+FUSE 1
+1 25791U 99035A 01024.91830785 +.00000785 +00000-0 +18987-3 0 01952
+2 25791 024.9848 026.2846 0011214 131.5244 228.6226 14.39829899083683
+FUSE 1
+1 25791U 99035A 01024.22518426 .00000758 00000-0 18147-3 0 1803
+2 25791 24.9850 30.5196 0011218 123.7953 236.3624 14.39828802 83586
+FUSE 1
+1 25791U 99035A 01022.97755790 +.00000765 +00000-0 +18342-3 0 01805
+2 25791 024.9847 038.1420 0011197 110.9464 249.2242 14.39827391083409
+FUSE 1
+1 25791U 99035A 01022.90824523 .00000765 00000-0 18346-3 0 1791
+2 25791 24.9847 38.5654 0011197 110.2109 249.9602 14.39827310 83397
+FUSE 1
+1 25791U 99035A 01021.93786714 +.00000792 +00000-0 +19214-3 0 01821
+2 25791 024.9847 044.4944 0011176 100.2360 259.9412 14.39826436083253
+FUSE 1
+1 25791U 99035A 01021.52199043 .00000791 00000-0 19188-3 0 1783
+2 25791 24.9847 47.0345 0011184 95.8875 264.2905 14.39825918 83199
+FUSE 1
+1 25791U 99035A 01020.48229781 .00000782 00000-0 18904-3 0 1774
+2 25791 24.9841 53.3876 0011058 84.9507 275.2262 14.39824524 83047
+FUSE 1
+1 25791U 99035A 01019.23466394 .00000810 00000-0 19778-3 0 1769
+2 25791 24.9842 61.0115 0011055 71.9716 288.1993 14.39823278 82863
+FUSE 1
+1 25791U 99035A 01018.81878536 +.00000815 +00000-0 +19923-3 0 02046
+2 25791 024.9840 063.5519 0011051 067.5973 292.5699 14.39822788082809
+FUSE 1
+1 25791U 99035A 01017.84840102 .00000828 00000-0 20329-3 0 1759
+2 25791 24.9838 69.4799 0011044 57.4205 302.7356 14.39821674 82660
+FUSE 1
+1 25791U 99035A 01016.80870221 +.00000844 +00000-0 +20844-3 0 01759
+2 25791 024.9839 075.8311 0011035 046.6049 313.5376 14.39820510082512
+FUSE 1
+1 25791U 99035A 01012.85783892 .00000765 00000-0 18364-3 0 1719
+2 25791 24.9824 99.9904 0011095 5.3964 354.6663 14.39814661 81946
+FUSE 1
+1 25791U 99035A 01011.81813392 .00000754 00000-0 18014-3 0 1702
+2 25791 24.9823 106.3421 0011120 354.5641 5.4745 14.39813318 81795
+FUSE 1
+1 25791U 99035A 01010.84774202 +.00000728 +00000-0 +17200-3 0 01820
+2 25791 024.9826 112.2708 0011146 344.3870 015.6294 14.39811988081659
+FUSE 1
+1 25791U 99035A 01010.57048690 .00000725 00000-0 17100-3 0 1696
+2 25791 24.9825 113.9647 0011158 341.3954 18.6145 14.39811641 81611
+FUSE 1
+1 25791U 99035A 01009.87734870 +.00000732 +00000-0 +17321-3 0 02008
+2 25791 024.9824 118.1992 0011164 334.0178 025.9768 14.39810940081516
+FUSE 1
+1 25791U 99035A 01006.55028272 .00000853 00000-0 21119-3 0 1667
+2 25791 24.9829 138.5275 0011161 298.7980 61.1405 14.39808266 81030
+FUSE 1
+1 25791U 99035A 01005.23331831 .00000949 00000-0 24121-3 0 1650
+2 25791 24.9829 146.5736 0011130 284.7867 75.1402 14.39807380 80842
+FUSE 1
+1 25791U 99035A 01004.95606288 +.00000961 +00000-0 +24508-3 0 01933
+2 25791 024.9830 148.2673 0011129 281.7309 078.1948 14.39807093080804
+FUSE 1
+1 25791U 99035A 01004.12429643 .00001014 00000-0 26161-3 0 1645
+2 25791 24.9831 153.3490 0011081 272.9218 87.0015 14.39806304 80681
+FUSE 1
+1 25791U 99035A 01003.91635493 +.00001024 +00000-0 +26479-3 0 02041
+2 25791 024.9833 154.6194 0011082 270.5710 089.3526 14.39806079080658
+FUSE 1
+1 25791U 99035A 01002.94596086 +.00001080 +00000-0 +28217-3 0 01657
+2 25791 024.9835 160.5480 0011065 260.2028 099.7226 14.39805000080513
+FUSE 1
+1 25791U 99035A 01002.87664699 .00001085 00000-0 28401-3 0 1633
+2 25791 24.9835 160.9715 0011055 259.4691 100.4567 14.39804944 80506
+FUSE 1
+1 25791U 99035A 01001.90625279 +.00001148 +00000-0 +30354-3 0 01851
+2 25791 024.9836 166.9004 0011074 249.1527 110.7793 14.39803819080368
+FUSE 1
+1 25791U 99035A 01001.55968328 .00001172 00000-0 31103-3 0 1622
+2 25791 24.9835 169.0177 0011071 245.6535 114.2814 14.39803412 80316
+FUSE 1
+1 25791U 99035A 00366.24272051 .00001201 00000-0 32013-3 0 1615
+2 25791 24.9835 177.0632 0011054 231.9139 128.0369 14.39801117 80127
+FUSE 1
+1 25791U 99035A 00365.13370179 .00001276 00000-0 34372-3 0 1603
+2 25791 24.9782 183.8601 0011264 220.6704 139.2961 14.39798988 79968
+FUSE 1
+1 25791U 99035A 00363.88605187 .00001279 00000-0 34462-3 0 1594
+2 25791 24.9781 191.4825 0011236 207.4675 152.5240 14.39796242 79788
+FUSE 1
+1 25791U 99035A 00362.91565615 +.00001282 +00000-0 +34567-3 0 01880
+2 25791 024.9781 197.4116 0011250 197.2959 162.7167 14.39794117079649
+FUSE 1
+1 25791U 99035A 00361.52937650 .00001173 00000-0 31161-3 0 1570
+2 25791 24.9788 205.8833 0011253 183.0025 177.0420 14.39790123 79448
+FUSE 1
+1 25791U 99035A 00360.21240650 .00001095 00000-0 28697-3 0 1564
+2 25791 24.9795 213.9300 0011256 169.4207 190.6539 14.39786866 79258
+FUSE 1
+1 25791U 99035A 00358.89543401 .00000997 00000-0 25633-3 0 1551
+2 25791 24.9802 221.9784 0011166 156.0199 204.0842 14.39783673 79063
+FUSE 1
+1 25791U 99035A 00357.57846016 .00000809 00000-0 19747-3 0 1543
+2 25791 24.9811 230.0287 0011220 142.5559 217.5744 14.39779898 78875
+FUSE 1
+1 25791U 99035A 00356.33079409 .00000742 00000-0 17656-3 0 1532
+2 25791 24.9815 237.6510 0011207 129.3758 230.7742 14.39777765 78696
+FUSE 1
+1 25791U 99035A 00355.91490500 +.00000715 +00000-0 +16811-3 0 01738
+2 25791 024.9818 240.1930 0011125 125.1559 234.9994 14.39777043078634
+FUSE 1
+1 25791U 99035A 00355.22175552 .00000689 00000-0 15980-3 0 1522
+2 25791 24.9818 244.4279 0011116 117.9072 242.2571 14.39776049 78533
+FUSE 1
+1 25791U 99035A 00354.94449551 +.00000671 +00000-0 +15421-3 0 01715
+2 25791 024.9820 246.1228 0011092 115.1399 245.0262 14.39775609078498
+FUSE 1
+1 25791U 99035A 00354.18203097 .00000667 00000-0 15302-3 0 1515
+2 25791 24.9821 250.7805 0011090 107.2769 252.9059 14.39774846 78383
+FUSE 1
+1 25791U 99035A 00353.14230184 .00000588 00000-0 12827-3 0 1507
+2 25791 24.9841 257.1312 0011153 94.7945 265.3836 14.39773357 78236
+FUSE 1
+1 25791U 99035A 00351.89462457 .00000618 00000-0 13768-3 0 1494
+2 25791 24.9843 264.7546 0011143 81.4463 278.7305 14.39772637 78057
+FUSE 1
+1 25791U 99035A 00350.57762798 .00000713 00000-0 16757-3 0 1485
+2 25791 24.9838 272.8003 0011117 67.5108 292.6555 14.39772305 77863
+FUSE 1
+1 25791U 99035A 00349.95378601 +.00000801 +00000-0 +19521-3 0 01751
+2 25791 024.9839 276.6107 0011037 061.1524 299.0082 14.39772533077773
+FUSE 1
+1 25791U 99035A 00348.91404926 +.00000938 +00000-0 +23822-3 0 01543
+2 25791 024.9841 282.9613 0011060 050.5076 309.6402 14.39772572077629
+FUSE 1
+1 25791U 99035A 00348.22089271 .00000955 00000-0 24346-3 0 1472
+2 25791 24.9841 287.1948 0011058 43.2638 316.8736 14.39771669 77522
+FUSE 1
+1 25791U 99035A 00347.94362883 +.00001009 +00000-0 +26044-3 0 01831
+2 25791 024.9842 288.8885 0011102 040.6503 319.4819 14.39771783077486
+FUSE 1
+1 25791U 99035A 00344.20056550 .00001466 00000-0 40388-3 0 1450
+2 25791 24.9857 311.7525 0010921 1.7998 358.2548 14.39768887 76944
+FUSE 1
+1 25791U 99035A 00342.95287422 +.00001623 +00000-0 +45287-3 0 02453
+2 25791 024.9861 319.3741 0010868 348.9036 011.1207 14.39767344076766
+FUSE 1
+1 25791U 99035A 00341.91313263 +.00001697 +00000-0 +47635-3 0 02169
+2 25791 024.9862 325.7251 0010827 338.0727 021.9314 14.39765205076612
+FUSE 1
+1 25791U 99035A 00340.80407309 +.00001773 +00000-0 +50001-3 0 01795
+2 25791 024.9865 332.4995 0010780 326.3093 033.6722 14.39762765076452
+FUSE 1
+1 25791U 99035A 00339.97228129 +.00001440 +00000-0 +39551-3 0 01453
+2 25791 024.9788 337.5913 0010715 317.2047 042.7636 14.39758312076333
+FUSE 1
+1 25791U 99035A 00339.90296490 .00001431 00000-0 39277-3 0 1446
+2 25791 24.9788 338.0153 0010711 316.5102 43.4556 14.39758072 76326
+FUSE 1
+1 25791U 99035A 00338.93253567 +.00001650 +00000-0 +46156-3 0 01892
+2 25791 024.9780 343.9450 0010727 305.4403 054.5107 14.39756594076187
+FUSE 1
+1 25791U 99035A 00337.89278976 +.00002012 +00000-0 +57514-3 0 01474
+2 25791 024.9771 350.3001 0010560 294.2116 065.7285 14.39754923076031
+FUSE 1
+1 25791U 99035A 00337.54620726 .00002120 00000-0 60886-3 0 1432
+2 25791 24.9769 352.4170 0010591 290.1130 69.8236 14.39754084 75985
+FUSE 1
+1 25791U 99035A 00336.78372846 +.00002078 +00000-0 +59583-3 0 02103
+2 25791 024.9767 357.0797 0010598 283.2388 076.6938 14.39750755075878
+FUSE 1
+1 25791U 99035A 00335.81329748 +.00001963 +00000-0 +55983-3 0 01784
+2 25791 024.9768 003.0088 0010682 272.4500 087.4788 14.39746543075738
+FUSE 1
+1 25791U 99035A 00332.55541084 .00001441 00000-0 39598-3 0 1416
+2 25791 24.9789 22.9137 0010823 238.8335 121.1112 14.39732709 75269
+FUSE 1
+1 25791U 99035A 00329.50545449 .00001099 00000-0 28863-3 0 1407
+2 25791 24.9807 41.5484 0010919 206.6216 153.3741 14.39723397 74828
+FUSE 1
+1 25791U 99035A 00326.80207218 .00000755 00000-0 18065-3 0 1395
+2 25791 24.9826 58.0674 0010967 178.4838 181.5705 14.39716699 74439
+FUSE 1
+1 25791U 99035A 00325.90094187 +.00000678 +00000-0 +15666-3 0 02663
+2 25791 024.9830 063.5734 0010889 169.1263 190.9481 14.39715100074301
+FUSE 1
+1 25791U 99035A 00324.86117451 +.00000608 +00000-0 +13450-3 0 02311
+2 25791 024.9833 069.9269 0010882 158.3926 201.7040 14.39713575074155
+FUSE 1
+1 25791U 99035A 00323.96004177 +.00000488 +00000-0 +96967-4 0 01894
+2 25791 024.9842 075.4361 0010837 150.2956 209.8168 14.39712104074027
+FUSE 1
+1 25791U 99035A 00322.92027010 +.00000542 +00000-0 +11394-3 0 01510
+2 25791 024.9842 081.7899 0010800 140.3373 219.7924 14.39711850073875
+FUSE 1
+1 25791U 99035A 00322.57367987 .00000544 00000-0 11471-3 0 1384
+2 25791 24.9842 83.9087 0010770 137.0085 223.1269 14.39711602 73828
+FUSE 1
+1 25791U 99035A 00321.88049734 +.00000639 +00000-0 +14444-3 0 02068
+2 25791 024.9838 088.1431 0010747 130.4414 229.7025 14.39711664073729
+FUSE 1
+1 25791U 99035A 00319.45435949 .00001051 00000-0 27399-3 0 1370
+2 25791 24.9822 102.9641 0011109 102.6166 257.5577 14.39710812 73374
+FUSE 1
+1 25791U 99035A 00318.83049407 +.00001135 +00000-0 +30023-3 0 02126
+2 25791 024.9820 106.7751 0011100 096.2751 263.9015 14.39710072073281
+FUSE 1
+1 25791U 99035A 00317.92935383 +.00001328 +00000-0 +36094-3 0 01927
+2 25791 024.9815 112.2808 0011081 086.9676 273.2095 14.39708951073151
+FUSE 1
+1 25791U 99035A 00316.95889405 +.00001476 +00000-0 +40722-3 0 01547
+2 25791 024.9811 118.2117 0011162 076.8388 283.3367 14.39707302073012
+FUSE 1
+1 25791U 99035A 00316.54298192 .00001536 00000-0 42622-3 0 1367
+2 25791 24.9808 120.7548 0011167 72.5609 287.6119 14.39706598 72958
+FUSE 1
+1 25791U 99035A 00312.17588299 .00001526 00000-0 42309-3 0 1352
+2 25791 24.9810 147.4346 0011047 26.6311 333.4765 14.39694429 72327
+FUSE 1
+1 25791U 99035A 00311.89860506 +.00001531 +00000-0 +42464-3 0 02432
+2 25791 024.9811 149.1285 0011021 023.7582 336.3433 14.39693742072285
+FUSE 1
+1 25791U 99035A 00310.92813172 +.00001533 +00000-0 +42529-3 0 02234
+2 25791 024.9811 155.0570 0011011 013.6669 346.4135 14.39691108072141
+FUSE 1
+1 25791U 99035A 00309.95765612 +.00001545 +00000-0 +42918-3 0 01953
+2 25791 024.9811 160.9853 0010987 003.5007 356.5574 14.39688573072001
+FUSE 1
+1 25791U 99035A 00308.91785913 +.00001558 +00000-0 +43320-3 0 01631
+2 25791 024.9811 167.3377 0010936 352.6420 007.3927 14.39685825071856
+FUSE 1
+1 25791U 99035A 00307.94738084 .00001523 00000-0 42238-3 0 1347
+2 25791 24.9813 173.2666 0010902 342.2944 17.7187 14.39682876 71715
+FUSE 1
+1 25791U 99035A 00306.90758062 +.00001494 +00000-0 +41322-3 0 02161
+2 25791 024.9816 179.6189 0010843 331.2370 028.7545 14.39679852071566
+FUSE 1
+1 25791U 99035A 00305.93709941 +.00001422 +00000-0 +39070-3 0 01847
+2 25791 024.9820 185.5476 0010836 320.8016 039.1721 14.39676778071420
+FUSE 1
+1 25791U 99035A 00304.96661633 +.00001342 +00000-0 +36540-3 0 01518
+2 25791 024.9825 191.4771 0010878 310.3487 049.6069 14.39673761071285
+FUSE 1
+1 25791U 99035A 00304.48137472 .00001294 00000-0 35039-3 0 1332
+2 25791 24.9827 194.4415 0010840 305.2721 54.6774 14.39672228 71217
+FUSE 1
+1 25791U 99035A 00300.94603167 +.00001128 +00000-0 +29826-3 0 01487
+2 25791 024.9836 216.0428 0010846 267.5163 092.4104 14.39663463070709
+FUSE 1
+1 25791U 99035A 00300.32214586 .00001125 00000-0 29742-3 0 1329
+2 25791 24.9837 219.8536 0010864 260.8686 99.0595 14.39662271 70610
+FUSE 1
+1 25791U 99035A 00299.97554307 +.00001099 +00000-0 +28908-3 0 02622
+2 25791 024.9840 221.9723 0010883 257.3195 102.6096 14.39661414070562
+FUSE 1
+1 25791U 99035A 00298.93573357 +.00001095 +00000-0 +28804-3 0 02219
+2 25791 024.9842 228.3263 0010808 246.2256 113.7131 14.39659498070412
+FUSE 1
+1 25791U 99035A 00297.96524296 +.00001101 +00000-0 +28980-3 0 01840
+2 25791 024.9843 234.2549 0010819 235.8887 124.0592 14.39657800070277
+FUSE 1
+1 25791U 99035A 00296.92543051 +.00001198 +00000-0 +32020-3 0 01469
+2 25791 024.9839 240.6071 0010755 225.0055 134.9574 14.39656593070122
+FUSE 1
+1 25791U 99035A 00296.23222249 .00001231 00000-0 33056-3 0 1318
+2 25791 24.9837 244.8414 0010747 217.7619 142.2134 14.39655396 70025
+FUSE 1
+1 25791U 99035A 00295.95493830 +.00001341 +00000-0 +36537-3 0 02570
+2 25791 024.9831 246.5364 0010694 214.7072 145.2732 14.39655631069985
+FUSE 1
+1 25791U 99035A 00294.98444509 +.00001216 +00000-0 +32610-3 0 02121
+2 25791 024.9831 252.4518 0011171 205.6776 154.3176 14.39652293069842
+FUSE 1
+1 25791U 99035A 00292.97413670 .00001233 00000-0 33120-3 0 1465
+2 25791 24.9832 264.7305 0011154 184.3003 175.7409 14.39648196 69551
+FUSE 1
+1 25791U 99035A 00292.21160463 .00001227 00000-0 32957-3 0 1304
+2 25791 24.9833 269.3878 0011141 176.2888 183.7705 14.39646543 69445
+FUSE 1
+1 25791U 99035A 00290.96382404 .00001125 00000-0 29744-3 0 2033
+2 25791 24.9839 277.0093 0011248 162.9629 197.1281 14.39643362 69263
+FUSE 1
+1 25791U 99035A 00289.92400452 .00001005 00000-0 25962-3 0 1697
+2 25791 24.9842 283.3623 0011271 152.1446 207.9673 14.39640561 69117
+FUSE 1
+1 25791U 99035A 00288.88418235 .00000939 00000-0 23889-3 0 1296
+2 25791 24.9839 289.7161 0011345 141.9406 218.1903 14.39638291 68963
+FUSE 1
+1 25791U 99035A 00286.94317390 .00000937 00000-0 23849-3 0 2050
+2 25791 24.9842 301.5720 0011377 121.8967 238.2636 14.39635355 68688
+FUSE 1
+1 25791U 99035A 00284.93283722 .00000946 00000-0 24124-3 0 1290
+2 25791 24.9844 313.8517 0011349 101.4953 258.6830 14.39632282 68394
+FUSE 1
+1 25791U 99035A 00283.82368229 .00001113 00000-0 29370-3 0 2356
+2 25791 24.9845 320.6276 0011360 90.5778 269.6031 14.39631230 68239
+FUSE 1
+1 25791U 99035A 00281.18943126 .00001671 00000-0 46933-3 0 1271
+2 25791 24.9838 336.7203 0011242 63.6820 296.4846 14.39626315 67854
+FUSE 1
+1 25791U 99035A 00279.87230155 .00001498 00000-0 41495-3 0 1843
+2 25791 24.9836 344.7657 0011284 49.9927 310.1569 14.39621506 67667
+FUSE 1
+1 25791U 99035A 00278.13922732 .00001349 00000-0 36829-3 0 1266
+2 25791 24.9841 355.3497 0011217 31.6026 328.5162 14.39615977 67417
+FUSE 1
+1 25791U 99035A 00275.92088045 +.00001249 +00000-0 +33679-3 0 02260
+2 25791 024.9846 008.8984 0011149 008.1796 351.8898 14.39610187067097
+FUSE 1
+1 25791U 99035A 00274.88102724 +.00001183 +00000-0 +31605-3 0 01932
+2 25791 024.9847 015.2496 0011092 357.4607 002.5840 14.39607485066943
+FUSE 1
+1 25791U 99035A 00273.91049603 +.00001143 +00000-0 +30335-3 0 01587
+2 25791 024.9849 021.1778 0011061 347.4078 012.6154 14.39605252066806
+FUSE 1
+1 25791U 99035A 00272.87063947 .00001058 00000-0 27682-3 0 1258
+2 25791 24.9850 27.5285 0010951 336.1587 23.8412 14.39602697 66652
+FUSE 1
+1 25791U 99035A 00271.90010587 +.00000952 +00000-0 +24332-3 0 02019
+2 25791 024.9849 033.4553 0010904 326.2752 033.7061 14.39600291066519
+FUSE 1
+1 25791U 99035A 00270.86024700 +.00000806 +00000-0 +19727-3 0 01755
+2 25791 024.9848 039.8050 0010873 315.4400 044.5233 14.39597817066368
+FUSE 1
+1 25791U 99035A 00269.95903493 +.00000698 +00000-0 +16343-3 0 01422
+2 25791 024.9847 045.3098 0010847 305.7600 054.1897 14.39596109066238
+FUSE 1
+1 25791U 99035A 00269.19647060 .00000662 00000-0 15206-3 0 1241
+2 25791 24.9847 49.9681 0010790 297.8206 62.1208 14.39595085 66121
+FUSE 1
+1 25791U 99035A 00265.93823791 +.00000839 +00000-0 +20769-3 0 01602
+2 25791 024.9853 069.8642 0010925 262.8653 097.0612 14.39592139065654
+FUSE 1
+1 25791U 99035A 00264.89837713 .00000866 00000-0 21632-3 0 1234
+2 25791 24.9853 76.2157 0010914 251.7893 108.1424 14.39590766 65501
+FUSE 1
+1 25791U 99035A 00263.85851584 +.00000759 +00000-0 +18267-3 0 02468
+2 25791 024.9844 082.5656 0011036 240.7792 119.1611 14.39588783065356
+FUSE 1
+1 25791U 99035A 00262.95730211 +.00000987 +00000-0 +25418-3 0 02190
+2 25791 024.9843 088.0698 0011108 231.2492 128.7025 14.39588229065220
+FUSE 1
+1 25791U 99035A 00261.91744362 +.00000854 +00000-0 +21237-3 0 01903
+2 25791 024.9840 094.4417 0011199 219.5461 140.4230 14.39586929065079
+FUSE 1
+1 25791U 99035A 00260.94690555 +.00000874 +00000-0 +21887-3 0 01496
+2 25791 024.9839 100.3694 0011196 209.3232 150.6648 14.39585857064930
+FUSE 1
+1 25791U 99035A 00260.60028428 .00000895 00000-0 22526-3 0 1228
+2 25791 24.9838 102.4866 0011182 205.8154 154.1794 14.39585645 64882
+FUSE 1
+1 25791U 99035A 00257.89664249 +.00000980 +00000-0 +25207-3 0 01574
+2 25791 024.9797 119.0147 0011228 178.5341 181.5202 14.39582285064499
+FUSE 1
+1 25791U 99035A 00256.92610205 +.00001007 +00000-0 +26048-3 0 01317
+2 25791 024.9796 124.9428 0011260 168.6067 191.4699 14.39580956064354
+FUSE 1
+1 25791U 99035A 00256.57948045 .00001009 00000-0 26113-3 0 1218
+2 25791 24.9796 127.0600 0011258 164.9452 195.1394 14.39580392 64306
+FUSE 1
+1 25791U 99035A 00255.95556083 +.00001022 +00000-0 +26540-3 0 02272
+2 25791 024.9796 130.8705 0011304 158.5484 201.5503 14.39579482064212
+FUSE 1
+1 25791U 99035A 00254.91569423 +.00001012 +00000-0 +26236-3 0 01998
+2 25791 024.9795 137.2214 0011318 147.7697 212.3506 14.39577628064064
+FUSE 1
+1 25791U 99035A 00253.94515052 +.00000993 +00000-0 +25614-3 0 01704
+2 25791 024.9796 143.1491 0011353 137.8454 222.2931 14.39575858063927
+FUSE 1
+1 25791U 99035A 00252.90528132 +.00000931 +00000-0 +23692-3 0 01337
+2 25791 024.9802 149.5025 0011353 127.3223 232.8322 14.39573664063773
+FUSE 1
+1 25791U 99035A 00252.21203297 .00000929 00000-0 23624-3 0 1201
+2 25791 24.9802 153.7367 0011354 120.2792 239.8836 14.39572606 63674
+FUSE 1
+1 25791U 99035A 00250.96418540 +.00000820 +00000-0 +20171-3 0 02317
+2 25791 024.9813 161.3571 0011231 106.6703 253.5039 14.39569924063499
+FUSE 1
+1 25791U 99035A 00249.92430983 +.00000751 +00000-0 +18005-3 0 01973
+2 25791 024.9819 167.7098 0011202 095.9335 264.2451 14.39568010063344
+FUSE 1
+1 25791U 99035A 00248.95375648 +.00000728 +00000-0 +17305-3 0 01641
+2 25791 024.9822 173.6380 0011200 085.7277 274.4508 14.39566715063209
+FUSE 1
+1 25791U 99035A 00247.98320188 +.00000685 +00000-0 +15936-3 0 01204
+2 25791 024.9827 179.5664 0011177 075.4057 284.7689 14.39565289063062
+FUSE 1
+1 25791U 99035A 00247.91387641 .00000685 00000-0 15938-3 0 1194
+2 25791 24.9827 179.9897 0011176 74.6798 285.4945 14.39565219 63051
+FUSE 1
+1 25791U 99035A 00243.89298918 +.00000627 +00000-0 +14121-3 0 01217
+2 25791 024.9838 204.5495 0011279 032.6718 327.4493 14.39560964062474
+FUSE 1
+1 25791U 99035A 00243.54635985 .00000620 00000-0 13900-3 0 1181
+2 25791 24.9838 206.6661 0011299 29.0913 331.0222 14.39560578 62428
+FUSE 1
+1 25791U 99035A 00242.92242652 +.00000636 +00000-0 +14397-3 0 02524
+2 25791 024.9839 210.4766 0011308 022.5635 337.5375 14.39560193062331
+FUSE 1
+1 25791U 99035A 00241.95186248 +.00000663 +00000-0 +15237-3 0 02180
+2 25791 024.9839 216.4045 0011240 012.3907 347.6875 14.39559570062199
+FUSE 1
+1 25791U 99035A 00241.11995000 +.00000705 +00000-0 +16585-3 0 01905
+2 25791 024.9843 221.4849 0011230 004.1902 355.8697 14.39559225062072
+FUSE 1
+1 25791U 99035A 00240.14938556 +.00000715 +00000-0 +16878-3 0 01535
+2 25791 024.9843 227.4129 0011265 353.6646 006.3718 14.39558267061935
+FUSE 1
+1 25791U 99035A 00239.24814579 .00000768 00000-0 18562-3 0 1172
+2 25791 24.9851 232.9197 0011057 343.6898 16.3253 14.39557918 61800
+FUSE 1
+1 25791U 99035A 00237.16836108 +.00000937 +00000-0 +23867-3 0 01265
+2 25791 024.9852 245.6242 0010930 321.1150 038.8565 14.39556840061509
+FUSE 1
+1 25791U 99035A 00236.47509969 .00000981 00000-0 25253-3 0 1169
+2 25791 24.9852 249.8576 0010910 313.5211 46.4389 14.39556202 61406
+FUSE 1
+1 25791U 99035A 00236.12846894 +.00001006 +00000-0 +26041-3 0 02540
+2 25791 024.9853 251.9740 0010908 310.0331 049.9215 14.39555895061353
+FUSE 1
+1 25791U 99035A 00234.18733724 +.00001106 +00000-0 +29194-3 0 01914
+2 25791 024.9856 263.8291 0010929 289.3257 070.6065 14.39553537061071
+FUSE 1
+1 25791U 99035A 00233.97935917 +.00001108 +00000-0 +29254-3 0 01827
+2 25791 024.9855 265.0992 0010925 287.2111 072.7202 14.39553153061041
+FUSE 1
+1 25791U 99035A 00232.93946679 +.00001150 +00000-0 +30606-3 0 01414
+2 25791 024.9859 271.4505 0010949 275.8605 084.0653 14.39551685060899
+FUSE 1
+1 25791U 99035A 00232.24620540 .00001162 00000-0 30984-3 0 1157
+2 25791 24.9861 275.6842 0010947 268.2547 91.6703 14.39550498 60791
+FUSE 1
+1 25791U 99035A 00230.85968265 +.00001168 +00000-0 +31152-3 0 01841
+2 25791 024.9861 284.1498 0010908 253.3956 106.5351 14.39547810060596
+FUSE 1
+1 25791U 99035A 00229.88911656 +.00001173 +00000-0 +31324-3 0 01650
+2 25791 024.9862 290.0753 0010918 243.1432 116.7994 14.39545953060451
+FUSE 1
+1 25791U 99035A 00228.84922713 +.00001681 +00000-0 +47341-3 0 01392
+2 25791 024.9833 296.4467 0010541 233.3366 126.6176 14.39544754060304
+FUSE 1
+1 25791U 99035A 00228.22529183 .00001437 00000-0 39642-3 0 1145
+2 25791 24.9839 300.2597 0010660 226.7882 133.1742 14.39542247 60216
+FUSE 1
+1 25791U 99035A 00227.87866114 +.00001204 +00000-0 +32286-3 0 01748
+2 25791 024.9843 302.3743 0010672 222.4107 137.5583 14.39540549060161
+FUSE 1
+1 25791U 99035A 00226.90809209 +.00001066 +00000-0 +27935-3 0 01531
+2 25791 024.9844 308.3015 0010818 212.0864 147.8990 14.39538035060025
+FUSE 1
+1 25791U 99035A 00225.86819636 +.00000875 +00000-0 +21927-3 0 01240
+2 25791 024.9839 314.6498 0010966 200.7238 159.2827 14.39535222059879
+FUSE 1
+1 25791U 99035A 00225.59089041 .00000839 00000-0 20809-3 0 1135
+2 25791 24.9841 316.3434 0010990 198.0059 162.0059 14.39534638 59833
+FUSE 1
+1 25791U 99035A 00222.88715209 +.00000729 +00000-0 +17338-3 0 01575
+2 25791 024.9839 332.8560 0011113 170.5138 189.5580 14.39530485059440
+FUSE 1
+1 25791U 99035A 00221.91657699 +.00000732 +00000-0 +17430-3 0 01315
+2 25791 024.9840 338.7844 0011141 160.6691 199.4239 14.39529454059307
+FUSE 1
+1 25791U 99035A 00221.15398144 .00000741 00000-0 17714-3 0 1122
+2 25791 24.9839 343.4418 0011158 152.7937 207.3154 14.39528689 59199
+FUSE 1
+1 25791U 99035A 00219.90609556 +.00000787 +00000-0 +19148-3 0 01712
+2 25791 024.9839 351.0626 0011186 140.1583 219.9740 14.39527697059013
+FUSE 1
+1 25791U 99035A 00218.93551634 +.00000842 +00000-0 +20903-3 0 01383
+2 25791 024.9842 356.9905 0011221 130.2195 229.9294 14.39527076058879
+FUSE 1
+1 25791U 99035A 00218.24224392 .00000911 00000-0 23076-3 0 1117
+2 25791 24.9837 1.2239 0011126 122.7808 237.3779 14.39526803 58771
+FUSE 1
+1 25791U 99035A 00216.92502528 +.00000994 +00000-0 +25698-3 0 01359
+2 25791 024.9840 009.2668 0011090 109.2022 250.9670 14.39525666058583
+FUSE 1
+1 25791U 99035A 00215.95444232 +.00001073 +00000-0 +28173-3 0 01224
+2 25791 024.9846 015.1947 0011165 099.5630 260.6137 14.39524901058446
+FUSE 1
+1 25791U 99035A 00215.19184019 .00001121 00000-0 29713-3 0 1106
+2 25791 24.9845 19.8506 0011155 91.5631 268.6149 14.39524011 58330
+FUSE 1
+1 25791U 99035A 00213.87461582 +.00001234 +00000-0 +33255-3 0 01563
+2 25791 024.9851 027.8945 0011173 078.5475 281.6282 14.39522670058145
+FUSE 1
+1 25791U 99035A 00212.90402845 +.00001276 +00000-0 +34584-3 0 01363
+2 25791 024.9853 033.8211 0011136 068.8066 291.3628 14.39521095058004
+FUSE 1
+1 25791U 99035A 00212.14142266 .00001313 00000-0 35764-3 0 1090
+2 25791 24.9850 38.4778 0011130 60.7162 299.4447 14.39519790 57895
+FUSE 1
+1 25791U 99035A 00209.92292793 +.00001396 +00000-0 +38383-3 0 01533
+2 25791 024.9849 052.0258 0011073 037.5021 322.6251 14.39515598057579
+FUSE 1
+1 25791U 99035A 00208.95233548 +.00001473 +00000-0 +40802-3 0 01252
+2 25791 024.9837 057.9580 0011424 026.9665 333.1435 14.39514058057430
+FUSE 1
+1 25791U 99035A 00208.18972549 .00001576 00000-0 44071-3 0 1085
+2 25791 24.9833 62.6176 0011472 18.7210 341.3716 14.39512347 57328
+FUSE 1
+1 25791U 99035A 00206.94181514 +.00001511 +00000-0 +42008-3 0 01921
+2 25791 024.9854 070.2405 0011038 006.6126 353.4533 14.39509278057141
+FUSE 1
+1 25791U 99035A 00205.97121710 +.00001487 +00000-0 +41266-3 0 01685
+2 25791 024.9852 076.1701 0011017 356.2364 003.8067 14.39506509057005
+FUSE 1
+1 25791U 99035A 00204.93128816 +.00001476 +00000-0 +40903-3 0 01386
+2 25791 024.9852 082.5219 0010972 345.2641 014.7546 14.39503741056855
+FUSE 1
+1 25791U 99035A 00203.96068597 +.00001638 +00000-0 +46010-3 0 01113
+2 25791 024.9851 088.4485 0010910 335.3315 024.6669 14.39501677056711
+FUSE 1
+1 25791U 99035A 00203.89135786 .00001602 00000-0 44873-3 0 1071
+2 25791 24.9852 88.8720 0010897 334.6954 25.3042 14.39501366 56700
+FUSE 1
+1 25791U 99035A 00201.95014789 +.00001572 +00000-0 +43936-3 0 01799
+2 25791 024.9852 100.7256 0010918 312.2678 047.6911 14.39496898056421
+FUSE 1
+1 25791U 99035A 00200.97954187 +.00001738 +00000-0 +49182-3 0 01451
+2 25791 024.9852 106.6535 0010962 301.6227 058.3210 14.39494751056288
+FUSE 1
+1 25791U 99035A 00199.93960649 +.00001805 +00000-0 +51300-3 0 01117
+2 25791 024.9853 113.0050 0010969 290.2578 069.6750 14.39491667056133
+FUSE 1
+1 25791U 99035A 00199.87027750 .00001803 00000-0 51229-3 0 1069
+2 25791 24.9852 113.4283 0010971 289.5399 70.3926 14.39491421 56120
+FUSE 1
+1 25791U 99035A 00198.96900068 +.00001318 +00000-0 +35923-3 0 01266
+2 25791 024.9850 118.9330 0011332 279.9281 079.9947 14.39486512055993
+FUSE 1
+1 25791U 99035A 00198.20638092 .00001053 00000-0 27558-3 0 1056
+2 25791 24.9852 123.5922 0011255 271.8947 88.0275 14.39483842 55884
+FUSE 1
+1 25791U 99035A 00195.91851583 .00000689 00000-0 16100-3 0 1047
+2 25791 24.9847 137.5630 0011254 247.8427 112.0894 14.39478555 55558
+FUSE 1
+1 25791U 99035A 00194.94790513 +.00000622 +00000-0 +13965-3 0 02217
+2 25791 024.9845 143.4897 0011244 237.8927 122.0496 14.39476756055415
+FUSE 1
+1 25791U 99035A 00193.97729403 +.00000584 +00000-0 +12775-3 0 01820
+2 25791 024.9847 149.4236 0011293 228.1708 131.7837 14.39475391055278
+FUSE 1
+1 25791U 99035A 00192.93735201 +.00000550 +00000-0 +11684-3 0 01414
+2 25791 024.9846 155.7737 0011308 217.3578 142.6152 14.39474212055121
+FUSE 1
+1 25791U 99035A 00191.96673850 +.00000542 +00000-0 +11437-3 0 01065
+2 25791 024.9844 161.7002 0011295 207.2529 152.7388 14.39473399054981
+FUSE 1
+1 25791U 99035A 00191.89740911 .00000540 00000-0 11391-3 0 1034
+2 25791 24.9843 162.1235 0011294 206.5071 153.4866 14.39473330 54979
+FUSE 1
+1 25791U 99035A 00188.91623713 +.00000545 +00000-0 +11536-3 0 01387
+2 25791 024.9846 180.3280 0011401 175.5058 184.5555 14.39471262054549
+FUSE 1
+1 25791U 99035A 00187.94562172 +.00000562 +00000-0 +12095-3 0 01032
+2 25791 024.9848 186.2545 0011434 165.3569 194.7270 14.39470796054403
+FUSE 1
+1 25791U 99035A 00187.87629207 .00000562 00000-0 12095-3 0 1026
+2 25791 24.9848 186.6777 0011434 164.6313 195.4544 14.39470742 54394
+FUSE 1
+1 25791U 99035A 00183.57784536 .00000667 00000-0 15416-3 0 1011
+2 25791 24.9855 212.9320 0011413 120.5817 239.5821 14.39468389 53779
+FUSE 1
+1 25791U 99035A 00181.91392783 +.00000671 +00000-0 +15546-3 0 01789
+2 25791 024.9854 223.1058 0011337 102.1276 258.0499 14.39467140053535
+FUSE 1
+1 25791U 99035A 00180.87397553 +.00000700 +00000-0 +16442-3 0 01445
+2 25791 024.9852 229.4559 0011322 091.4012 268.7791 14.39466353053381
+FUSE 1
+1 25791U 99035A 00179.97268238 +.00000726 +00000-0 +17280-3 0 01057
+2 25791 024.9855 234.9604 0011315 082.3086 277.8702 14.39465677053255
+FUSE 1
+1 25791U 99035A 00179.55670036 .00000742 00000-0 17762-3 0 1002
+2 25791 24.9855 237.5004 0011277 78.2476 281.9296 14.39465389 53199
+FUSE 1
+1 25791U 99035A 00178.86339700 +.00000752 +00000-0 +18089-3 0 02381
+2 25791 024.9856 241.7337 0011290 070.9195 289.2531 14.39464704053090
+FUSE 1
+1 25791U 99035A 00177.89277115 +.00000766 +00000-0 +18548-3 0 02031
+2 25791 024.9859 247.6607 0011289 060.8540 299.3095 14.39463739052956
+FUSE 1
+1 25791U 99035A 00176.92214342 +.00000800 +00000-0 +19601-3 0 01665
+2 25791 024.9859 253.5881 0011190 051.0927 309.0575 14.39462915052810
+FUSE 1
+1 25791U 99035A 00175.88218431 +.00000816 +00000-0 +20117-3 0 01315
+2 25791 024.9862 259.9387 0011137 040.3293 319.8037 14.39461801052661
+FUSE 1
+1 25791U 99035A 00175.25820859 .00000821 00000-0 20275-3 0 993
+2 25791 24.9863 263.7490 0011148 33.8548 326.2678 14.39461054 52575
+FUSE 1
+1 25791U 99035A 00173.87159264 +.00000872 +00000-0 +21895-3 0 01978
+2 25791 024.9863 272.2156 0011038 020.3739 339.7205 14.39459774052379
+FUSE 1
+1 25791U 99035A 00172.90096122 +.00000862 +00000-0 +21562-3 0 01592
+2 25791 024.9869 278.1422 0011016 010.0480 350.0243 14.39458368052232
+FUSE 1
+1 25791U 99035A 00171.93032817 +.00000868 +00000-0 +21744-3 0 01290
+2 25791 024.9870 284.0679 0010950 359.6225 000.4272 14.39457116052091
+FUSE 1
+1 25791U 99035A 00170.95969467 +.00000873 +00000-0 +21901-3 0 01001
+2 25791 024.9872 289.9957 0010930 349.1807 010.8463 14.39455848051955
+FUSE 1
+1 25791U 99035A 00170.89036360 .00000875 00000-0 21983-3 0 989
+2 25791 24.9872 290.4190 0010916 348.4366 11.5890 14.39455786 51949
+FUSE 1
+1 25791U 99035A 00167.83979740 +.00000834 +00000-0 +20689-3 0 01244
+2 25791 024.9865 309.0441 0011049 315.9144 044.0481 14.39451106051509
+FUSE 1
+1 25791U 99035A 00166.93849291 +.00000817 +00000-0 +20146-3 0 00991
+2 25791 024.9866 314.5466 0011043 306.5008 053.4481 14.39449711051375
+FUSE 1
+1 25791U 99035A 00166.86916175 .00000816 00000-0 20127-3 0 975
+2 25791 24.9867 314.9701 0011045 305.7696 54.1782 14.39449617 51364
+FUSE 1
+1 25791U 99035A 00165.89852612 +.00001393 +00000-0 +38331-3 0 01420
+2 25791 024.9880 320.9003 0010529 293.0245 066.9309 14.39451820051226
+FUSE 1
+1 25791U 99035A 00164.92788963 +.00001058 +00000-0 +27751-3 0 01130
+2 25791 024.9900 326.8234 0010700 286.6900 073.2425 14.39448463051080
+FUSE 1
+1 25791U 99035A 00164.58123317 .00001414 00000-0 39006-3 0 960
+2 25791 24.9895 328.9405 0010608 283.0060 76.9260 14.39449353 51032
+FUSE 1
+1 25791U 99035A 00163.88792360 +.00001009 +00000-0 +26201-3 0 01988
+2 25791 024.9902 333.1737 0010422 276.0922 083.8398 14.39446429050938
+FUSE 1
+1 25791U 99035A 00162.91728936 +.00000838 +00000-0 +20810-3 0 01731
+2 25791 024.9924 339.1014 0009907 267.6684 092.2688 14.39444419050790
+FUSE
+1 25791U 99035A 00160.90668101 .00000585 00000-0 12820-3 0 1084
+2 25791 24.9857 351.3806 0010965 243.0464 116.8920 14.39441160 50501
+FUSE
+1 25791U 99035A 00159.93604429 .00000520 00000-0 10769-3 0 2088
+2 25791 24.9857 357.3078 0010932 232.6720 127.2791 14.39439999 50364
+FUSE
+1 25791U 99035A 00158.89607500 .00000535 00000-0 11232-3 0 1828
+2 25791 24.9859 3.6563 0011010 221.7464 138.2204 14.39439406 50216
+FUSE
+1 25791U 99035A 00157.92543755 .00000593 00000-0 13055-3 0 1551
+2 25791 24.9862 9.5835 0010973 212.1855 147.7986 14.39438945 50075
+FUSE
+1 25791U 99035A 00156.95479994 .00000684 00000-0 15953-3 0 1220
+2 25791 24.9855 15.5108 0010936 202.2301 157.7734 14.39438339 49934
+FUSE
+1 25791U 99035A 00153.90422121 .00000864 00000-0 21631-3 0 1165
+2 25791 24.9865 34.1388 0011133 170.3555 189.7168 14.39436079 49494
+FUSE
+1 25791U 99035A 00152.93358165 .00000892 00000-0 22526-3 0 1001
+2 25791 24.9870 40.0657 0011211 160.4686 199.6263 14.39435106 49358
+FUSE
+1 25791U 99035A 00151.96294208 .00000727 00000-0 17304-3 0 1612
+2 25791 24.9867 45.9944 0011211 149.4582 210.6578 14.39433226 49218
+FUSE 1
+1 25791U 99035A 00150.92296786 +.00000783 +00000-0 +19073-3 0 01460
+2 25791 024.9865 052.3453 0011336 140.3401 219.7938 14.39432403049060
+FUSE 1
+1 25791U 99035A 00149.95232539 +.00000829 +00000-0 +20521-3 0 01198
+2 25791 024.9864 058.2759 0011314 130.9449 229.2035 14.39431340048923
+FUSE 1
+1 25791U 99035A 00148.91235042 .00001108 00000-0 29356-3 0 921
+2 25791 24.9862 64.6309 0011392 119.2869 240.8777 14.39431427 48776
+FUSE 1
+1 25791U 99035A 00146.97105909 +.00001049 +00000-0 +27490-3 0 01217
+2 25791 024.9860 076.4928 0011034 100.1008 260.0730 14.39427312048499
+FUSE 1
+1 25791U 99035A 00145.93107729 +.00001195 +00000-0 +32101-3 0 01053
+2 25791 024.9858 082.8448 0010906 089.5878 270.5877 14.39425983048340
+FUSE 1
+1 25791U 99035A 00144.96042610 +.00001210 +00000-0 +32585-3 0 00943
+2 25791 024.9858 088.7713 0010797 079.6238 280.5487 14.39424047048201
+FUSE 1
+1 25791U 99035A 00144.89109336 .00001242 00000-0 33587-3 0 919
+2 25791 24.9856 89.1955 0010755 78.9603 281.2108 14.39424127 48199
+FUSE 1
+1 25791U 99035A 00143.92043990 +.00001286 +00000-0 +34981-3 0 01362
+2 25791 024.9853 095.1215 0010661 068.9516 291.2131 14.39422329048054
+FUSE 1
+1 25791U 99035A 00142.94978508 +.00001390 +00000-0 +38255-3 0 01224
+2 25791 024.9849 101.0495 0010673 058.3816 301.7746 14.39420789047916
+FUSE 1
+1 25791U 99035A 00141.97912863 +.00001410 +00000-0 +38914-3 0 01076
+2 25791 024.9848 106.9769 0010693 048.0107 312.1315 14.39418518047773
+FUSE 1
+1 25791U 99035A 00140.31514173 .00001395 00000-0 38437-3 0 908
+2 25791 24.9846 117.1387 0010720 30.1996 329.9129 14.39414225 47534
+FUSE 1
+1 25791U 99035A 00139.96847802 +.00001336 +00000-0 +36555-3 0 01225
+2 25791 024.9846 119.2585 0010753 026.5593 333.5472 14.39413031047485
+FUSE 1
+1 25791U 99035A 00138.30448417 +.00000986 +00000-0 +25496-3 0 01032
+2 25791 024.9849 129.4190 0010807 008.4590 351.6103 14.39408079047241
+FUSE 1
+1 25791U 99035A 00138.16581799 +.00000917 +00000-0 +23330-3 0 00989
+2 25791 024.9852 130.2683 0010800 006.3941 353.6704 14.39407532047222
+FUSE 1
+1 25791U 99035A 00137.33381884 .00000891 00000-0 22495-3 0 892
+2 25791 24.9849 135.3478 0010942 358.1038 1.9431 14.39406114 47100
+FUSE 1
+1 25791U 99035A 00137.12581947 +.00000782 +00000-0 +19067-3 0 01443
+2 25791 024.9853 136.6194 0010936 354.9891 005.0518 14.39405165047070
+FUSE 1
+1 25791U 99035A 00136.15515183 +.00000717 +00000-0 +17007-3 0 01309
+2 25791 024.9856 142.5472 0011025 344.6838 015.3341 14.39403617046937
+FUSE 1
+1 25791U 99035A 00135.11514942 +.00000688 +00000-0 +16101-3 0 01150
+2 25791 024.9856 148.8977 0011074 333.6712 026.3233 14.39402271046789
+FUSE 1
+1 25791U 99035A 00134.14447983 +.00000686 +00000-0 +16024-3 0 01019
+2 25791 024.9858 154.8255 0011141 323.3354 036.6390 14.39401238046645
+FUSE 1
+1 25791U 99035A 00133.24314397 .00000697 00000-0 16371-3 0 882
+2 25791 24.9859 160.3315 0011225 313.9280 46.0306 14.39400350 46513
+FUSE 1
+1 25791U 99035A 00132.13380598 +.00000799 +00000-0 +19602-3 0 01249
+2 25791 024.9855 167.1074 0011235 302.2916 057.6506 14.39399858046356
+FUSE 1
+1 25791U 99035A 00130.46979970 +.00000876 +00000-0 +22019-3 0 01108
+2 25791 024.9854 177.2667 0011205 284.7991 075.1274 14.39398379046117
+FUSE 1
+1 25791U 99035A 00129.42979604 +.00000935 +00000-0 +23904-3 0 00958
+2 25791 024.9855 183.6177 0011214 273.6439 086.2789 14.39397418045968
+FUSE 1
+1 25791U 99035A 00129.22179542 .00000943 00000-0 24155-3 0 878
+2 25791 24.9857 184.8897 0011260 271.3687 88.5531 14.39397203 45932
+FUSE 1
+1 25791U 99035A 00124.57644568 .00001168 00000-0 31255-3 0 864
+2 25791 24.9853 213.2548 0011424 222.2133 137.7495 14.39390992 45261
+FUSE 1
+1 25791U 99035A 00123.60577526 +.00001181 +00000-0 +31680-3 0 01291
+2 25791 024.9854 219.1824 0011455 212.1770 147.8041 14.39389176045129
+FUSE 1
+1 25791U 99035A 00122.63510361 +.00001231 +00000-0 +33248-3 0 01161
+2 25791 024.9854 225.1097 0011461 201.9716 158.0303 14.39387621044982
+FUSE 1
+1 25791U 99035A 00121.66443151 +.00001251 +00000-0 +33895-3 0 01031
+2 25791 024.9854 231.0388 0011524 192.1664 167.8570 14.39385753044847
+FUSE 1
+1 25791U 99035A 00120.69375881 +.00001261 +00000-0 +34204-3 0 00919
+2 25791 024.9855 236.9674 0011466 182.0966 177.9496 14.39383716044709
+FUSE 1
+1 25791U 99035A 00120.55509156 .00001252 00000-0 33924-3 0 859
+2 25791 24.9857 237.8165 0011446 180.8748 179.1742 14.39383343 44689
+FUSE 1
+1 25791U 99035A 00118.68307534 +.00001268 +00000-0 +34428-3 0 01247
+2 25791 024.9853 249.2479 0011337 161.2641 198.8291 14.39379290044418
+FUSE 1
+1 25791U 99035A 00117.71239774 +.00001285 +00000-0 +34957-3 0 01099
+2 25791 024.9854 255.1775 0011271 151.1573 208.9557 14.39377287044279
+FUSE 1
+1 25791U 99035A 00116.74171833 +.00001334 +00000-0 +36531-3 0 00984
+2 25791 024.9851 261.1035 0011286 140.4017 219.7326 14.39375466044138
+FUSE 1
+1 25791U 99035A 00115.77103748 .00001336 00000-0 36589-3 0 846
+2 25791 24.9850 267.0332 0011164 130.0444 230.1046 14.39373163 43997
+FUSE 1
+1 25791U 99035A 00114.80035556 +.00001323 +00000-0 +36184-3 0 01051
+2 25791 024.9850 272.9636 0011139 118.8594 241.3037 14.39370701043855
+FUSE 1
+1 25791U 99035A 00113.48299633 +.00001343 +00000-0 +36805-3 0 00918
+2 25791 024.9847 281.0129 0011026 104.5281 255.6449 14.39367716043665
+FUSE 1
+1 25791U 99035A 00112.58164220 +.00001325 +00000-0 +36244-3 0 00895
+2 25791 024.9847 286.5147 0010991 094.9470 265.2284 14.39365442043531
+FUSE 1
+1 25791U 99035A 00111.61095147 .00001385 00000-0 38153-3 0 830
+2 25791 24.9843 292.4418 0011151 84.3852 275.7943 14.39363622 43390
+FUSE 1
+1 25791U 99035A 00110.57092100 +.00001565 +00000-0 +43855-3 0 00880
+2 25791 024.9834 298.7936 0011325 073.8814 286.2937 14.39362514043241
+FUSE 1
+1 25791U 99035A 00108.62952641 +.00001728 +00000-0 +49007-3 0 00851
+2 25791 024.9828 310.6444 0011254 054.3518 305.8020 14.39358127042962
+FUSE 1
+1 25791U 99035A 00107.93616998 +.00001752 +00000-0 +49756-3 0 00843
+2 25791 024.9826 314.8766 0011241 047.0226 313.1227 14.39356131042867
+FUSE 1
+1 25791U 99035A 00107.86683435 .00001753 00000-0 49803-3 0 827
+2 25791 24.9827 315.3009 0011242 46.2771 313.8667 14.39355927 42857
+FUSE 1
+1 25791U 99035A 00105.85608578 .00002056 00000-0 59388-3 0 814
+2 25791 24.9817 327.5892 0010873 23.0273 337.0569 14.39351807 42560
+FUSE 1
+1 25791U 99035A 00104.67736936 +.00002243 +00000-0 +65292-3 0 00823
+2 25791 024.9813 334.7843 0010911 011.3549 348.7002 14.39348712042394
+FUSE 1
+1 25791U 99035A 00103.91467118 +.00002381 +00000-0 +69669-3 0 00816
+2 25791 024.9810 339.4400 0010675 002.0282 358.0252 14.39346695042287
+FUSE 1
+1 25791U 99035A 00103.01329876 +.00002405 +00000-0 +70441-3 0 01194
+2 25791 024.9809 344.9404 0010670 352.8750 007.1606 14.39342875042158
+FUSE 1
+1 25791U 99035A 00101.97324977 +.00002555 +00000-0 +75197-3 0 01137
+2 25791 024.9805 351.2909 0010643 342.0641 017.9481 14.39339226042005
+FUSE 1
+1 25791U 99035A 00101.07187295 +.00002583 +00000-0 +76093-3 0 01124
+2 25791 024.9805 356.7922 0010619 332.7422 027.2531 14.39335099041874
+FUSE 1
+1 25791U 99035A 00100.10115731 +.00002671 +00000-0 +78880-3 0 00968
+2 25791 024.9799 002.7214 0010593 322.7422 037.2356 14.39330819041734
+FUSE 1
+1 25791U 99035A 00099.13043908 .00002590 00000-0 76309-3 0 799
+2 25791 24.9798 8.6538 0010792 311.2745 48.6840 14.39325505 41593
+FUSE 1
+1 25791U 99035A 00098.09037990 +.00002445 +00000-0 +71735-3 0 00851
+2 25791 024.9802 015.0028 0010995 299.5824 060.3584 14.39319881041446
+FUSE 1
+1 25791U 99035A 00097.11965747 +.00002329 +00000-0 +68059-3 0 00815
+2 25791 024.9804 020.9278 0010970 289.9717 069.9613 14.39314724041301
+FUSE 1
+1 25791U 99035A 00096.14893064 +.00002270 +00000-0 +66193-3 0 00877
+2 25791 024.9807 026.8527 0011076 279.9873 079.9390 14.39310047041167
+FUSE 1
+1 25791U 99035A 00095.17820409 +.00002063 +00000-0 +59661-3 0 00795
+2 25791 024.9813 032.7786 0011255 270.8469 089.0777 14.39304208041025
+FUSE 1
+1 25791U 99035A 00094.20747091 .00001992 00000-0 57410-3 0 771
+2 25791 24.9816 38.7034 0011419 261.0932 98.8284 14.39299966 40887
+FUSE 1
+1 25791U 99035A 00092.19666424 .00001729 00000-0 49103-3 0 764
+2 25791 24.9822 50.9810 0011573 241.7849 118.1493 14.39290662 40595
+FUSE 1
+1 25791U 99035A 00090.18584768 +.00001549 +00000-0 +43389-3 0 00794
+2 25791 024.9830 063.2550 0011512 221.2878 138.6763 14.39283008040302
+FUSE 1
+1 25791U 99035A 00089.28444503 .00001459 00000-0 40539-3 0 755
+2 25791 24.9832 68.7566 0011380 211.8222 148.1602 14.39279719 40179
+FUSE 1
+1 25791U 99035A 00088.31370039 +.00001360 +00000-0 +37404-3 0 00961
+2 25791 024.9836 074.6816 0011423 202.4456 157.5555 14.39276438040031
+FUSE 1
+1 25791U 99035A 00088.03634565 +.00001304 +00000-0 +35643-3 0 00913
+2 25791 024.9839 076.3760 0011454 200.2734 159.7366 14.39275277039997
+FUSE 1
+1 25791U 99035A 00087.20427617 +.00001254 +00000-0 +34072-3 0 00840
+2 25791 024.9841 081.4558 0011382 191.8207 168.2033 14.39272923039870
+FUSE 1
+1 25791U 99035A 00086.23352802 .00001203 00000-0 32440-3 0 745
+2 25791 24.9842 87.3815 0011279 181.4280 178.6196 14.39270365 39731
+FUSE 1
+1 25791U 99035A 00084.22268757 +.00001077 +00000-0 +28473-3 0 00961
+2 25791 024.9845 099.6586 0011009 160.1136 199.9804 14.39265143039448
+FUSE 1
+1 25791U 99035A 00083.18259301 +.00001067 +00000-0 +28137-3 0 00832
+2 25791 024.9846 106.0081 0010977 149.2929 210.8223 14.39263170039292
+FUSE 1
+1 25791U 99035A 00082.21183569 .00001096 00000-0 29069-3 0 733
+2 25791 24.9846 111.9346 0010974 139.3047 220.8279 14.39261692 39153
+FUSE 1
+1 25791U 99035A 00081.17173683 +.00001160 +00000-0 +31097-3 0 01011
+2 25791 024.9843 118.2860 0010946 128.6797 231.4693 14.39260290039008
+FUSE 1
+1 25791U 99035A 00080.20097578 +.00001213 +00000-0 +32794-3 0 00880
+2 25791 024.9841 124.2128 0010923 118.8383 241.3214 14.39258856038864
+FUSE 1
+1 25791U 99035A 00079.23021298 .00001324 00000-0 36292-3 0 720
+2 25791 24.9837 130.1398 0010979 108.5196 251.6496 14.39257774 38722
+FUSE 1
+1 25791U 99035A 00077.21934109 +.00001513 +00000-0 +42309-3 0 00861
+2 25791 024.9829 142.4172 0010838 088.8266 271.3475 14.39254631038434
+FUSE 1
+1 25791U 99035A 00075.55516719 .00001577 00000-0 44314-3 0 711
+2 25791 24.9825 152.5756 0010789 71.5815 288.5864 14.39250628 38191
+FUSE 1
+1 25791U 99035A 00073.61362244 +.00001623 +00000-0 +45792-3 0 01149
+2 25791 024.9823 164.4274 0010664 051.3108 308.8354 14.39245491037910
+FUSE 1
+1 25791U 99035A 00072.64284711 +.00001597 +00000-0 +44979-3 0 01015
+2 25791 024.9825 170.3543 0010564 040.8844 319.2456 14.39242488037772
+FUSE 1
+1 25791U 99035A 00071.67206979 +.00001573 +00000-0 +44222-3 0 00864
+2 25791 024.9826 176.2815 0010546 030.4691 329.6435 14.39239518037632
+FUSE 1
+1 25791U 99035A 00070.56260671 .00001532 00000-0 42912-3 0 702
+2 25791 24.9828 183.0544 0010529 18.3343 341.7543 14.39236091 37479
+FUSE 1
+1 25791U 99035A 00068.69038219 +.00001413 +00000-0 +39162-3 0 00952
+2 25791 024.9834 194.4830 0010533 358.2154 001.8316 14.39230155037209
+FUSE 1
+1 25791U 99035A 00067.71959612 +.00001335 +00000-0 +36691-3 0 00815
+2 25791 024.9838 200.4095 0010552 347.4671 012.5574 14.39227138037065
+FUSE 1
+1 25791U 99035A 00066.74880810 .00001316 00000-0 36063-3 0 698
+2 25791 24.9838 206.3364 0010621 337.4200 22.5842 14.39224685 36920
+FUSE 1
+1 25791U 99035A 00065.77801832 +.00001263 +00000-0 +34378-3 0 00998
+2 25791 024.9841 212.2629 0010676 326.5841 033.3993 14.39222062036782
+FUSE 1
+1 25791U 99035A 00064.80722849 +.00001189 +00000-0 +32036-3 0 00830
+2 25791 024.9845 218.1911 0010778 316.3193 043.6474 14.39219324036645
+FUSE 1
+1 25791U 99035A 00063.76709448 +.00001101 +00000-0 +29240-3 0 00718
+2 25791 024.9849 224.5412 0010871 305.4534 054.4961 14.39216487036499
+FUSE 1
+1 25791U 99035A 00063.55906739 .00001088 00000-0 28832-3 0 683
+2 25791 24.9850 225.8120 0010913 303.1719 56.7740 14.39215991 36464
+FUSE 1
+1 25791U 99035A 00061.82550819 +.00000982 +00000-0 +25477-3 0 00960
+2 25791 024.9855 236.3933 0010864 286.6270 073.3045 14.39211998036219
+FUSE 1
+1 25791U 99035A 00060.85471378 +.00000901 +00000-0 +22923-3 0 00845
+2 25791 024.9863 242.3201 0010848 276.7178 083.2098 14.39209859036077
+FUSE 1
+1 25791U 99035A 00059.88391871 .00000826 00000-0 20540-3 0 675
+2 25791 24.9869 248.2490 0010930 267.1229 92.8030 14.39207865 35932
+FUSE 1
+1 25791U 99035A 00058.91312284 +.00000781 +00000-0 +19097-3 0 00977
+2 25791 024.9873 254.1768 0010925 257.3125 102.6165 14.39206249035799
+FUSE 1
+1 25791U 99035A 00057.94232639 +.00000728 +00000-0 +17411-3 0 00816
+2 25791 024.9875 260.1056 0011055 247.8021 112.1316 14.39204614035655
+FUSE 1
+1 25791U 99035A 00056.62481384 +.00000758 +00000-0 +18375-3 0 00670
+2 25791 024.9875 268.1502 0011129 234.2119 125.7313 14.39203424035463
+FUSE 1
+1 25791U 99035A 00055.86204329 .00000793 00000-0 19497-3 0 661
+2 25791 24.9873 272.8046 0011161 226.1863 133.7679 14.39202825 35354
+FUSE 1
+1 25791U 99035A 00054.68321769 +.00000848 +00000-0 +21235-3 0 01001
+2 25791 024.9871 279.9967 0011112 213.5611 146.4207 14.39201763035188
+FUSE 1
+1 25791U 99035A 00053.98979045 +.00000850 +00000-0 +21296-3 0 00974
+2 25791 024.9870 284.2284 0011076 206.2727 153.7221 14.39200822035085
+FUSE 1
+1 25791U 99035A 00053.01899083 +.00000935 +00000-0 +24004-3 0 00830
+2 25791 024.9867 290.1552 0011204 196.3192 163.6959 14.39200205034940
+FUSE 1
+1 25791U 99035A 00052.04819115 +.00000994 +00000-0 +25875-3 0 00719
+2 25791 024.9868 296.0811 0011283 186.4833 173.5531 14.39199236034805
+FUSE 1
+1 25791U 99035A 00051.90950592 .00000987 00000-0 25647-3 0 650
+2 25791 24.9870 296.9294 0011270 185.1807 174.8586 14.39198964 34783
+FUSE 1
+1 25791U 99035A 00048.85841520 .00001297 00000-0 35475-3 0 644
+2 25791 24.9866 315.5528 0011618 154.5181 205.5896 14.39195818 34340
+FUSE 1
+1 25791U 99035A 00048.09564157 +.00001343 +00000-0 +36946-3 0 01229
+2 25791 024.9864 320.2075 0011655 146.8674 213.2566 14.39194413034238
+FUSE 1
+1 25791U 99035A 00047.12483713 +.00001391 +00000-0 +38482-3 0 01095
+2 25791 024.9864 326.1324 0011683 137.2771 222.8642 14.39192494034095
+FUSE 1
+1 25791U 99035A 00046.15403192 +.00001360 +00000-0 +37483-3 0 00949
+2 25791 024.9866 332.0573 0011665 127.2938 232.8638 14.39189972033950
+FUSE 1
+1 25791U 99035A 00045.18322419 +.00001296 +00000-0 +35475-3 0 00793
+2 25791 024.9869 337.9835 0011586 117.6016 242.5669 14.39187410033812
+FUSE 1
+1 25791U 99035A 00044.21241546 .00001146 00000-0 30690-3 0 638
+2 25791 24.9869 343.9091 0011473 107.1762 253.0006 14.39184536 33672
+FUSE 1
+1 25791U 99035A 00042.20144618 +.00000911 +00000-0 +23237-3 0 00758
+2 25791 024.9867 356.1818 0011249 085.1954 274.9841 14.39179242033387
+FUSE 1
+1 25791U 99035A 00041.92407140 .00000833 00000-0 20764-3 0 629
+2 25791 24.9866 357.8759 0011123 81.8578 278.3201 14.39178018 33348
+FUSE 1
+1 25791U 99035A 00041.16128579 +.00000812 +00000-0 +20105-3 0 01066
+2 25791 024.9865 002.5305 0011143 073.4503 286.7237 14.39176773033231
+FUSE 1
+1 25791U 99035A 00040.19046659 +.00000730 +00000-0 +17515-3 0 00919
+2 25791 024.9864 008.4561 0011054 062.5359 297.6273 14.39174760033097
+FUSE 1
+1 25791U 99035A 00038.31816651 .00000622 00000-0 14075-3 0 612
+2 25791 24.9860 19.8837 0010946 41.9661 318.1684 14.39171741 32822
+FUSE 1
+1 25791U 99035A 00035.19765343 +.00000599 +00000-0 +13337-3 0 00754
+2 25791 024.9862 038.9297 0010966 008.7816 351.2878 14.39168833032372
+FUSE 1
+1 25791U 99035A 00034.22682512 .00000609 00000-0 13670-3 0 609
+2 25791 24.9863 44.8546 0010985 358.5324 1.5150 14.39168123 32232
+FUSE 1
+1 25791U 99035A 00033.18665576 +.00000568 +00000-0 +12356-3 0 01126
+2 25791 024.9855 051.2265 0011261 347.2812 012.7409 14.39167162032084
+FUSE 1
+1 25791U 99035A 00032.21582678 +.00000591 +00000-0 +13078-3 0 00970
+2 25791 024.9855 057.1532 0011294 337.1761 022.8245 14.39166555031942
+FUSE 1
+1 25791U 99035A 00031.17565214 +.00000642 +00000-0 +14694-3 0 00805
+2 25791 024.9852 063.5033 0011303 326.2800 033.6988 14.39166094031795
+FUSE 1
+1 25791U 99035A 00030.20482266 +.00000686 +00000-0 +16093-3 0 00659
+2 25791 024.9850 069.4311 0011343 315.6598 044.3015 14.39165560031659
+FUSE 1
+1 25791U 99035A 00029.44202816 .00000689 00000-0 16196-3 0 594
+2 25791 24.9849 74.0872 0011363 307.3743 52.5733 14.39164796 31549
+FUSE 1
+1 25791U 99035A 00027.43102888 .00000569 00000-0 18032-3 0 586
+2 25791 24.9851 86.3260 0010521 286.4177 73.5622 14.39162573 31251
+FUSE 1
+1 25791U 99035A 00025.55871179 .00000869 00000-0 21924-3 0 579
+2 25791 24.9844 97.7947 0011481 266.0116 93.9082 14.39161817 30989
+FUSE 1
+1 25791U 99035A 00023.61705451 +.00000924 +00000-0 +23647-3 0 00872
+2 25791 024.9842 109.6465 0011662 245.5194 114.4098 14.39159561030703
+FUSE 1
+1 25791U 99035A 00022.57688135 +.00000962 +00000-0 +24873-3 0 00723
+2 25791 024.9839 115.9974 0011736 234.7227 125.2184 14.39158302030554
+FUSE 1
+1 25791U 99035A 00022.29950177 +.00001003 +00000-0 +26163-3 0 00619
+2 25791 024.9838 117.6930 0011736 231.8231 128.1224 14.39158246030517
+FUSE 1
+1 25791U 99035A 00021.53670825 .00000998 00000-0 26013-3 0 564
+2 25791 24.9840 122.3487 0011792 223.8474 136.1104 14.39156968 30405
+FUSE 1
+1 25791U 99035A 00020.42719000 +.00000962 +00000-0 +24860-3 0 00907
+2 25791 024.9842 129.1211 0011913 212.6223 147.3555 14.39154882030249
+FUSE 1
+1 25791U 99035A 00019.66439581 +.00000966 +00000-0 +24995-3 0 00839
+2 25791 024.9840 133.7768 0011844 204.5957 155.3985 14.39153669030138
+FUSE 1
+1 25791U 99035A 00018.62422196 +.00000928 +00000-0 +23794-3 0 00696
+2 25791 024.9842 140.1276 0011782 194.0350 165.9832 14.39151690029988
+FUSE 1
+1 25791U 99035A 00017.44535596 .00000854 00000-0 21447-3 0 550
+2 25791 24.9848 147.3221 0011810 182.6957 177.3499 14.39149382 29814
+FUSE 1
+1 25791U 99035A 00014.53285856 .00000615 00000-0 13854-3 0 545
+2 25791 24.9856 165.1015 0011407 153.4049 206.7053 14.39143679 29391
+FUSE 1
+1 25791U 99035A 00013.56202232 +.00000571 +00000-0 +12445-3 0 00786
+2 25791 024.9857 171.0254 0011318 143.0152 217.1149 14.39142418029251
+FUSE 1
+1 25791U 99035A 00012.72987589 +.00000562 +00000-0 +12183-3 0 00732
+2 25791 024.9854 176.1050 0011284 133.7108 226.4334 14.39141611029137
+FUSE 1
+1 25791U 99035A 00011.62034564 +.00000527 +00000-0 +11055-3 0 00633
+2 25791 024.9855 182.8750 0011249 121.8036 238.3572 14.39140431028974
+FUSE 1
+1 25791U 99035A 00010.71885112 +.00000512 +00000-0 +10577-3 0 00569
+2 25791 024.9854 188.3761 0011274 111.8566 248.3147 14.39139621028845
+FUSE 1
+1 25791U 99035A 00009.88670072 .00000501 00000-0 10250-3 0 535
+2 25791 24.9854 193.4536 0011262 103.0112 257.1659 14.39138969 28726
+FUSE 1
+1 25791U 99035A 00006.83547797 .00000337 00000-0 10675-3 0 521
+2 25791 24.9869 212.0479 0011133 74.0467 286.1742 14.39136665 28280
+FUSE 1
+1 25791U 99035A 00005.93397487 +.00000522 +00000-0 +10899-3 0 00546
+2 25791 024.9856 217.5808 0011349 060.5895 299.5747 14.39136473028152
+FUSE 1
+1 25791U 99035A 00005.86462875 .00000520 00000-0 10857-3 0 511
+2 25791 24.9857 218.0047 0011344 59.7788 300.3845 14.39136413 28143
+FUSE 1
+1 25791U 99035A 00004.96312675 +.00000518 +00000-0 +10767-3 0 01139
+2 25791 024.9860 223.5077 0011297 050.2547 309.8954 14.39135812028010
+FUSE 1
+1 25791U 99035A 00003.99227761 +.00000520 +00000-0 +10842-3 0 00981
+2 25791 024.9861 229.4342 0011263 039.8658 320.2678 14.39135178027878
+FUSE 1
+1 25791U 99035A 00003.02142715 +.00000562 +00000-0 +12179-3 0 00835
+2 25791 024.9860 235.3606 0011286 029.7368 330.3779 14.39134850027732
+FUSE 1
+1 25791U 99035A 00001.98122961 +.00000601 +00000-0 +13433-3 0 00657
+2 25791 024.9860 241.7105 0011303 018.8712 341.2214 14.39134376027580
+FUSE 1
+1 25791U 99035A 00001.01037721 .00000666 00000-0 15478-3 0 506
+2 25791 24.9859 247.6366 0011281 8.7106 351.3596 14.39134101 27448
+FUSE 1
+1 25791U 99035A 99363.09781835 .00000899 00000-0 22901-3 0 490
+2 25791 24.9851 265.4129 0011197 338.4602 21.5436 14.39132626 27028
+FUSE 1
+1 25791U 99035A 99362.12696497 +.00000961 +00000-0 +24848-3 0 00922
+2 25791 024.9849 271.3386 0011184 327.9746 032.0084 14.39131724026881
+FUSE 1
+1 25791U 99035A 99361.15611130 +.00001034 +00000-0 +27194-3 0 00799
+2 25791 024.9846 277.2653 0011182 317.4471 042.5171 14.39130801026740
+FUSE 1
+1 25791U 99035A 99360.11591130 +.00001087 +00000-0 +28861-3 0 00623
+2 25791 024.9844 283.6152 0011205 306.4053 053.5421 14.39129438026590
+FUSE 1
+1 25791U 99035A 99359.14505772 .00001123 00000-0 30012-3 0 487
+2 25791 24.9844 289.5405 0011210 296.0081 63.9276 14.39127971 26455
+FUSE 1
+1 25791U 99035A 99357.20334989 +.00001185 +00000-0 +31974-3 0 00927
+2 25791 024.9845 301.3934 0011276 275.1736 084.7487 14.39124778026179
+FUSE 1
+1 25791U 99035A 99355.19229507 +.00001143 +00000-0 +30633-3 0 00589
+2 25791 024.9845 313.6688 0011427 254.6519 105.2727 14.39120370025887
+FUSE 1
+1 25791U 99035A 99354.91490853 .00001110 00000-0 29599-3 0 473
+2 25791 24.9845 315.3629 0011470 251.8385 108.0875 14.39119513 25847
+FUSE 1
+1 25791U 99035A 99354.15209340 +.00001101 +00000-0 +29307-3 0 01038
+2 25791 024.9845 320.0181 0011509 244.1536 115.7785 14.39117975025732
+FUSE 1
+1 25791U 99035A 99353.18123792 +.00001083 +00000-0 +28726-3 0 00881
+2 25791 024.9845 325.9428 0011452 234.1361 125.8092 14.39115978025590
+FUSE 1
+1 25791U 99035A 99352.21038154 +.00001042 +00000-0 +27447-3 0 00762
+2 25791 024.9843 331.8688 0011469 224.5539 135.4048 14.39113821025458
+FUSE 1
+1 25791U 99035A 99351.17017792 +.00000973 +00000-0 +25237-3 0 00577
+2 25791 024.9847 338.2189 0011485 214.2213 145.7558 14.39111421025300
+FUSE 1
+1 25791U 99035A 99350.33801333 .00000951 00000-0 24529-3 0 463
+2 25791 24.9846 343.2967 0011487 205.5729 154.4211 14.39109889 25180
+FUSE 1
+1 25791U 99035A 99350.19931958 +.00000933 +00000-0 +23956-3 0 00962
+2 25791 024.9848 344.1445 0011512 204.4239 155.5731 14.39109519025163
+FUSE 1
+1 25791U 99035A 99348.39629426 +.00000823 +00000-0 +20475-3 0 00865
+2 25791 024.9849 355.1452 0011441 185.7566 174.2811 14.39105974024908
+FUSE 1
+1 25791U 99035A 99348.18825288 +.00000798 +00000-0 +19683-3 0 00787
+2 25791 024.9851 356.4159 0011443 183.9954 176.0469 14.39105492024872
+FUSE 1
+1 25791U 99035A 99347.21739099 +.00000760 +00000-0 +18478-3 0 00593
+2 25791 024.9852 002.3410 0011413 174.2811 185.7832 14.39103915024736
+FUSE 1
+1 25791U 99035A 99346.24652782 .00000754 00000-0 18291-3 0 459
+2 25791 24.9852 8.2668 0011377 164.2548 195.8318 14.39102692 24597
+FUSE 1
+1 25791U 99035A 99344.23544964 +.00000756 +00000-0 +18345-3 0 00821
+2 25791 024.9851 020.5393 0011315 143.9081 216.2195 14.39100353024308
+FUSE 1
+1 25791U 99035A 99343.19523523 +.00000758 +00000-0 +18405-3 0 00642
+2 25791 024.9849 026.8884 0011251 133.1541 226.9914 14.39099103024150
+FUSE 1
+1 25791U 99035A 99342.15501899 +.00000788 +00000-0 +19383-3 0 00479
+2 25791 024.9847 033.2384 0011205 122.0799 238.0799 14.39098132024006
+FUSE 1
+1 25791U 99035A 99341.53088842 .00000788 00000-0 19382-3 0 444
+2 25791 24.9847 37.0461 0011204 115.5981 244.5688 14.39097368 23911
+FUSE 1
+1 25791U 99035A 99341.18414898 +.00000797 +00000-0 +19666-3 0 00927
+2 25791 024.9845 039.1646 0011110 111.9666 248.2014 14.39096976023865
+FUSE 1
+1 25791U 99035A 99340.21327751 +.00000821 +00000-0 +20422-3 0 00796
+2 25791 024.9844 045.0894 0011092 101.8687 258.3063 14.39095956023723
+FUSE 1
+1 25791U 99035A 99339.24240445 +.00000860 +00000-0 +21656-3 0 00626
+2 25791 024.9842 051.0146 0011088 091.5490 268.6286 14.39094994023586
+FUSE 1
+1 25791U 99035A 99337.57804728 +.00000910 +00000-0 +23264-3 0 00454
+2 25791 024.9838 061.1710 0011103 073.9223 286.2502 14.39093024023340
+FUSE 1
+1 25791U 99035A 99337.50869901 .00000916 00000-0 23465-3 0 438
+2 25791 24.9838 61.5940 0011123 73.3216 286.8513 14.39092988 23332
+FUSE 1
+1 25791U 99035A 99336.53782164 +.00000978 +00000-0 +25413-3 0 00775
+2 25791 024.9835 067.5184 0011185 063.0696 297.0953 14.39091962023198
+FUSE 1
+1 25791U 99035A 99335.91368480 +.00001057 +00000-0 +27938-3 0 00668
+2 25791 024.9832 071.3272 0011211 056.4491 303.7082 14.39091557023104
+FUSE 1
+1 25791U 99035A 99334.66541084 +.00001103 +00000-0 +29413-3 0 00563
+2 25791 024.9829 078.9441 0011175 043.3897 316.7490 14.39089668022921
+FUSE 1
+1 25791U 99035A 99333.55583168 .00001182 00000-0 31912-3 0 428
+2 25791 24.9828 85.7150 0011228 31.8546 328.2638 14.39088163 22768
+FUSE 1
+1 25791U 99035A 99332.72364624 +.00001252 +00000-0 +34147-3 0 00926
+2 25791 024.9822 090.7928 0011318 023.1121 336.9895 14.39086934022646
+FUSE 1
+1 25791U 99035A 99330.71252915 +.00001370 +00000-0 +37884-3 0 00621
+2 25791 024.9815 103.0720 0011456 002.2762 357.7803 14.39083149022351
+FUSE 1
+1 25791U 99035A 99330.01903979 +.00001341 +00000-0 +36977-3 0 00515
+2 25791 024.9813 107.3056 0011522 355.0936 004.9469 14.39081189022254
+FUSE 1
+1 25791U 99035A 99329.53359692 .00001309 00000-0 35954-3 0 414
+2 25791 24.9818 110.2720 0011533 349.7266 10.3016 14.39079811 22188
+FUSE 1
+1 25791U 99035A 99328.00791539 +.00001217 +00000-0 +33021-3 0 00742
+2 25791 024.9820 119.5846 0011565 334.1745 025.8190 14.39075614021963
+FUSE 1
+1 25791U 99035A 99326.82897714 +.00001154 +00000-0 +31024-3 0 00585
+2 25791 024.9826 126.7842 0011751 321.2678 038.6990 14.39072676021790
+FUSE 1
+1 25791U 99035A 99325.51133788 .00001054 00000-0 27855-3 0 401
+2 25791 24.9847 134.8467 0011912 304.6034 55.3277 14.39069633 21609
+FUSE 1
+1 25791U 99035A 99322.80670431 +.00001256 +00000-0 +34276-3 0 00411
+2 25791 024.9836 151.3552 0012041 275.3401 084.5737 14.39066077021213
+FUSE 1
+1 25791U 99035A 99321.62776187 +.00001252 +00000-0 +34139-3 0 00408
+2 25791 024.9837 158.5475 0012055 262.9443 096.9715 14.39063501021043
+FUSE 1
+1 25791U 99035A 99320.79556237 .00001252 00000-0 34144-3 0 391
+2 25791 24.9836 163.6246 0012002 254.4359 105.4616 14.39061664 20929
+FUSE 1
+1 25791U 99035A 99318.99247388 +.00001603 +00000-0 +45300-3 0 00424
+2 25791 024.9830 174.6225 0011785 234.5772 125.3639 14.39059706020668
+FUSE 1
+1 25791U 99035A 99318.85377493 .00001636 00000-0 46351-3 0 388
+2 25791 24.9833 175.4706 0011739 232.8226 127.1216 14.39059600 20640
+FUSE 1
+1 25791U 99035A 99316.98133499 .00000949 00000-0 24506-3 0 379
+2 25791 24.9842 186.9003 0011834 213.5350 146.4412 14.39050830 20375
+FUSE 1
+1 25791U 99035A 99316.77328072 .00000093 00000-0 -27298-4 0 361
+2 25791 24.9851 188.1733 0012103 214.4787 145.4516 14.39045117 20346
+FUSE 1
+1 25791U 99035A 99316.01043130 .00001289 00000-0 35317-3 0 353
+2 25791 24.9823 192.8263 0011574 206.8856 153.1047 14.39050776 20238
+FUSE 1
+1 25791U 99035A 99314.06863125 +.00000807 +00000-0 +19978-3 0 00675
+2 25791 024.9828 204.6728 0011620 187.0114 173.0230 14.39045484019952
+FUSE 1
+1 25791U 99035A 99313.09772812 +.00000806 +00000-0 +19960-3 0 00668
+2 25791 024.9828 210.5953 0011621 176.8561 183.2018 14.39044261019815
+FUSE 1
+1 25791U 99035A 99312.12682443 +.00000807 +00000-0 +20004-3 0 00607
+2 25791 024.9830 216.5187 0011630 166.7136 193.3684 14.39043064019674
+FUSE 1
+1 25791U 99035A 99311.08656905 +.00000824 +00000-0 +20537-3 0 00492
+2 25791 024.9827 222.8664 0011566 156.1383 203.9662 14.39041822019523
+FUSE 1
+1 25791U 99035A 99310.11566272 .00000873 00000-0 22108-3 0 346
+2 25791 24.9823 228.7931 0011439 146.3502 213.7733 14.39040863 19380
+FUSE 1
+1 25791U 99035A 99309.14475480 +.00000912 +00000-0 +23325-3 0 00624
+2 25791 024.9823 234.7169 0011382 136.4568 223.6834 14.39039788019240
+FUSE 1
+1 25791U 99035A 99308.17384628 +.00000917 +00000-0 +23509-3 0 00594
+2 25791 024.9823 240.6396 0011384 126.3110 233.8450 14.39038400019103
+FUSE 1
+1 25791U 99035A 99307.20293604 +.00000929 +00000-0 +23900-3 0 00509
+2 25791 024.9824 246.5634 0011348 116.2606 243.9068 14.39037064018967
+FUSE 1
+1 25791U 99035A 99306.16267374 +.00000901 +00000-0 +22981-3 0 00427
+2 25791 024.9827 252.9105 0011294 105.3472 254.8283 14.39035306018815
+FUSE 1
+1 25791U 99035A 99305.26111145 .00000880 00000-0 22322-3 0 336
+2 25791 24.9828 258.4108 0011278 95.9573 264.2230 14.39033878 18682
+FUSE 1
+1 25791U 99035A 99302.14030694 +.00000777 +00000-0 +19052-3 0 00420
+2 25791 024.9830 277.4546 0011155 063.6998 296.4659 14.39029030018237
+FUSE 1
+1 25791U 99035A 99301.23873747 .00000793 00000-0 19553-3 0 326
+2 25791 24.9829 282.9548 0011144 54.1449 306.0093 14.39027991 18102
+FUSE 1
+1 25791U 99035A 99300.19846426 +.00000688 +00000-0 +16220-3 0 00785
+2 25791 024.9829 289.3031 0011097 042.8698 317.2674 14.39026119017959
+FUSE 1
+1 25791U 99035A 99299.15818884 +.00000714 +00000-0 +17059-3 0 00607
+2 25791 024.9835 295.6560 0010854 031.9536 328.1631 14.39025229017802
+FUSE 1
+1 25791U 99035A 99298.11791199 +.00000847 +00000-0 +21277-3 0 00447
+2 25791 024.9832 302.0031 0010894 020.7345 339.3596 14.39024199017655
+FUSE 1
+1 25791U 99035A 99297.21633808 .00000871 00000-0 22050-3 0 312
+2 25791 24.9833 307.5043 0010887 10.9937 349.0810 14.39022966 17522
+FUSE 1
+1 25791U 99035A 99295.27448293 +.00000936 +00000-0 +24130-3 0 00647
+2 25791 024.9834 319.3563 0010756 350.0772 009.9521 14.39020654017243
+FUSE 1
+1 25791U 99035A 99294.16484983 +.00001000 +00000-0 +26157-3 0 00453
+2 25791 024.9829 326.1256 0010800 338.5647 021.4408 14.39019299017082
+FUSE 1
+1 25791U 99035A 99293.19392082 .00001020 00000-0 26791-3 0 303
+2 25791 24.9828 332.0506 0010781 328.4327 31.5533 14.39017852 16944
+FUSE 1
+1 25791U 99035A 99292.77780736 +.00001020 +00000-0 +26806-3 0 00883
+2 25791 024.9827 334.5890 0010781 324.0963 035.8778 14.39017148016883
+FUSE 1
+1 25791U 99035A 99292.15363794 +.00001076 +00000-0 +28568-3 0 00761
+2 25791 024.9826 338.3998 0010857 316.4441 043.5205 14.39016547016796
+FUSE 1
+1 25791U 99035A 99291.18270908 +.00001062 +00000-0 +28130-3 0 00587
+2 25791 024.9822 344.3280 0011053 306.1106 053.8378 14.39014543016650
+FUSE 1
+1 25791U 99035A 99289.51825652 +.00001008 +00000-0 +26405-3 0 00430
+2 25791 024.9823 354.4815 0011076 288.6058 071.3246 14.39011177016415
+FUSE 1
+1 25791U 99035A 99288.47797288 .00000951 00000-0 24613-3 0 296
+2 25791 24.9826 0.8275 0011076 277.4591 82.4657 14.39009052 16269
+FUSE 1
+1 25791U 99035A 99286.88287063 +.00000861 +00000-0 +21717-3 0 00634
+2 25791 024.9828 010.5602 0011200 260.5300 099.3940 14.39005892016038
+FUSE 1
+1 25791U 99035A 99285.49582403 +.00000795 +00000-0 +19630-3 0 00486
+2 25791 024.9830 019.0217 0011238 246.2842 113.6491 14.39003480015839
+FUSE 1
+1 25791U 99035A 99284.66359563 +.00000761 +00000-0 +18552-3 0 00398
+2 25791 024.9832 024.0989 0011221 237.5271 122.4154 14.39002187015718
+FUSE 1
+1 25791U 99035A 99283.97007305 .00000754 00000-0 18327-3 0 285
+2 25791 24.9830 28.3293 0011217 230.2490 129.7115 14.39001280 15618
+FUSE 1
+1 25791U 99035A 99280.71050717 +.00000608 +00000-0 +13659-3 0 00426
+2 25791 024.9832 048.2231 0011233 196.9935 163.0195 14.38996802015142
+FUSE 1
+1 25791U 99035A 99280.01698155 +.00000604 +00000-0 +13553-3 0 00286
+2 25791 024.9831 052.4539 0011244 189.6758 170.3528 14.38996155015044
+FUSE 1
+1 25791U 99035A 99279.73957122 .00000606 00000-0 13609-3 0 278
+2 25791 24.9833 54.1486 0011318 187.2744 172.7600 14.38995976 15000
+FUSE 1
+1 25791U 99035A 99278.76863587 +.00000623 +00000-0 +14143-3 0 00780
+2 25791 024.9828 060.0769 0011243 177.0793 182.9783 14.38995168014863
+FUSE 1
+1 25791U 99035A 99278.07510995 +.00000624 +00000-0 +14185-3 0 00637
+2 25791 024.9826 064.3088 0011169 169.6029 190.4711 14.38994496014765
+FUSE 1
+1 25791U 99035A 99276.75740903 +.00000633 +00000-0 +14460-3 0 00461
+2 25791 024.9823 072.3487 0011129 155.6892 204.4141 14.38993316014575
+FUSE 1
+1 25791U 99035A 99276.47999801 +.00000694 +00000-0 +16404-3 0 00358
+2 25791 024.9818 074.0450 0011207 153.0078 207.1024 14.38993598014531
+FUSE 1
+1 25791U 99035A 99275.57841241 .00000671 00000-0 15672-3 0 263
+2 25791 24.9819 79.5451 0011185 143.2379 216.8904 14.38992466 14406
+FUSE 1
+1 25791U 99035A 99272.59623714 +.00000619 +00000-0 +14032-3 0 00288
+2 25791 024.9821 097.7456 0010986 112.1476 248.0207 14.38989140013976
+FUSE 1
+1 25791U 99035A 99271.83335507 +.00000694 +00000-0 +16423-3 0 00261
+2 25791 024.9829 102.4180 0011115 105.0840 255.0961 14.38989289013860
+FUSE 1
+1 25791U 99035A 99270.93176357 .00000625 00000-0 14212-3 0 254
+2 25791 24.9833 107.9206 0010968 96.2277 263.9501 14.38987831 13739
+FUSE 1
+1 25791U 99035A 99269.82210754 +.00000624 +00000-0 +14194-3 0 00270
+2 25791 024.9836 114.6962 0010511 085.3632 274.8041 14.38987014013579
+FUSE 1
+1 25791U 99035A 99268.64310209 +.00000665 +00000-0 +15491-3 0 00260
+2 25791 024.9835 121.8881 0010538 073.0440 287.1349 14.38986259013408
+FUSE 1
+1 25791U 99035A 99267.88021393 +.00000624 +00000-0 +14182-3 0 00258
+2 25791 024.9836 126.5415 0010795 065.0791 295.0869 14.38985118013294
+FUSE 1
+1 25791U 99035A 99266.90926343 .00000583 00000-0 12888-3 0 243
+2 25791 24.9837 132.4642 0010750 54.8710 305.2813 14.38983972 13155
+FUSE 1
+1 25791U 99035A 99266.00766538 +.00000570 +00000-0 +12480-3 0 00561
+2 25791 024.9838 137.9635 0010739 045.4550 314.6838 14.38983153013021
+FUSE 1
+1 25791U 99035A 99265.03671293 +.00000579 +00000-0 +12751-3 0 00498
+2 25791 024.9838 143.8883 0010767 035.0894 325.0328 14.38982440012880
+FUSE 1
+1 25791U 99035A 99264.06575950 +.00000540 +00000-0 +11503-3 0 00439
+2 25791 024.9841 149.8130 0010718 024.5892 335.5124 14.38981393012743
+FUSE 1
+1 25791U 99035A 99263.09480512 +.00000542 +00000-0 +11581-3 0 00315
+2 25791 024.9841 155.7371 0010726 014.3641 345.7173 14.38980695012600
+FUSE 1
+1 25791U 99035A 99262.88674378 .00000509 00000-0 10546-3 0 230
+2 25791 24.9842 157.0081 0010731 11.7394 348.3365 14.38980270 12573
+FUSE 1
+1 25791U 99035A 99260.11258537 +.00000453 +00000-0 +87384-4 0 00502
+2 25791 024.9841 173.9362 0010893 342.6831 017.3307 14.38977970012170
+FUSE 1
+1 25791U 99035A 99259.07227521 +.00000447 +00000-0 +85573-4 0 00347
+2 25791 024.9841 180.2856 0010956 331.9610 028.0309 14.38977330012020
+FUSE 1
+1 25791U 99035A 99258.17067241 .00000427 00000-0 79225-4 0 220
+2 25791 24.9841 185.7874 0011007 322.1366 37.8369 14.38976734 11893
+FUSE 1
+1 25791U 99035A 99256.15940484 +.00000459 +00000-0 +89377-4 0 00465
+2 25791 024.9843 198.0620 0011104 300.6420 059.2997 14.38975981011608
+FUSE 1
+1 25791U 99035A 99255.18844792 +.00000499 +00000-0 +10205-3 0 00357
+2 25791 024.9841 203.9868 0011170 290.1305 069.8003 14.38975748011464
+FUSE 1
+1 25791U 99035A 99254.21749084 .00000578 00000-0 12715-3 0 219
+2 25791 24.9838 209.9117 0011276 279.5024 80.4212 14.38975778 11328
+FUSE 1
+1 25791U 99035A 99252.13687317 +.00000703 +00000-0 +16695-3 0 00422
+2 25791 024.9838 222.6085 0011253 257.6029 102.3226 14.38974995011027
+FUSE 1
+1 25791U 99035A 99251.16591877 +.00000740 +00000-0 +17891-3 0 00306
+2 25791 024.9838 228.5342 0011361 247.5654 112.3649 14.38974264010882
+FUSE 1
+1 25791U 99035A 99250.33367230 .00000790 00000-0 19473-3 0 200
+2 25791 24.9836 233.6120 0011410 238.7623 121.1773 14.38973707 10768
+FUSE 1
+1 25791U 99035A 99250.12561055 +.00000806 +00000-0 +20003-3 0 00780
+2 25791 024.9837 234.8822 0011380 236.5967 123.3441 14.38973616010736
+FUSE 1
+1 25791U 99035A 99249.22401093 +.00000850 +00000-0 +21378-3 0 00688
+2 25791 024.9836 240.3848 0011437 227.1228 132.8321 14.38972820010608
+FUSE 1
+1 25791U 99035A 99248.18370392 +.00000868 +00000-0 +21968-3 0 00504
+2 25791 024.9836 246.7339 0011442 216.3322 143.6406 14.38971553010453
+FUSE 1
+1 25791U 99035A 99247.14339628 +.00000893 +00000-0 +22765-3 0 00331
+2 25791 024.9835 253.0817 0011458 205.6866 154.3072 14.38970276010308
+FUSE 1
+1 25791U 99035A 99246.24179636 .00000875 00000-0 22203-3 0 193
+2 25791 24.9836 258.5836 0011512 196.4275 163.5862 14.38968832 10171
+FUSE 1
+1 25791U 99035A 99244.16117925 +.00000770 +00000-0 +18839-3 0 00526
+2 25791 024.9840 271.2810 0011478 175.5983 184.4632 14.38965078009876
+FUSE 1
+1 25791U 99035A 99243.25957613 +.00000746 +00000-0 +18082-3 0 00412
+2 25791 024.9841 276.7823 0011475 166.5838 193.4978 14.38963795009740
+FUSE 1
+1 25791U 99035A 99242.14991061 +.00000697 +00000-0 +16531-3 0 00214
+2 25791 024.9841 283.5545 0011425 155.0075 205.0993 14.38962068009589
+FUSE 1
+1 25791U 99035A 99241.45636787 .00000690 00000-0 16312-3 0 184
+2 25791 24.9841 287.7844 0011423 147.6480 212.4734 14.38961291 9483
+FUSE 1
+1 25791U 99035A 99238.54348289 +.00000555 +00000-0 +12005-3 0 00339
+2 25791 024.9851 305.5600 0011277 118.2109 241.9541 14.38957529009068
+FUSE 1
+1 25791U 99035A 99237.43380917 .00000519 00000-0 10841-3 0 178
+2 25791 24.9853 312.3322 0011217 106.6278 253.5464 14.38956402 8903
+FUSE 1
+1 25791U 99035A 99236.46284262 +.00000461 +00000-0 +90008-4 0 00705
+2 25791 024.9853 318.2560 0011086 096.8361 263.3410 14.38955295008762
+FUSE 1
+1 25791U 99035A 99236.25477872 +.00000452 +00000-0 +87040-4 0 00615
+2 25791 024.9853 319.5272 0011052 094.6665 265.5117 14.38955073008731
+FUSE 1
+1 25791U 99035A 99235.28381051 +.00000458 +00000-0 +89138-4 0 00470
+2 25791 024.9852 325.4528 0011033 084.2171 275.9597 14.38954552008598
+FUSE 1
+1 25791U 99035A 99233.61929130 +.00000451 +00000-0 +86895-4 0 00303
+2 25791 024.9853 335.6110 0010986 066.4129 293.7536 14.38953524008353
+FUSE 1
+1 25791U 99035A 99232.50961001 .00000368 00000-0 60512-4 0 162
+2 25791 24.9859 342.3821 0010848 54.6767 305.4755 14.38952340 8198
+FUSE 1
+1 25791U 99035A 99230.70637369 +.00000429 +00000-0 +79925-4 0 00424
+2 25791 024.9854 353.3830 0010964 035.3348 324.7888 14.38952031007934
+FUSE 1
+1 25791U 99035A 99229.59668927 +.00000395 +00000-0 +68969-4 0 00285
+2 25791 024.9857 000.1562 0010882 023.2043 336.8948 14.38951224007779
+FUSE 1
+1 25791U 99035A 99228.48700287 +.00000471 +00000-0 +93172-4 0 00221
+2 25791 024.9853 006.9252 0010851 011.6095 348.4667 14.38951260007619
+FUSE 1
+1 25791U 99035A 99227.72409421 .00000487 00000-0 98308-4 0 158
+2 25791 24.9851 11.5809 0010930 3.6815 356.3773 14.38950858 7502
+FUSE 1
+1 25791U 99035A 99223.56276789 .00000619 00000-0 14028-3 0 147
+2 25791 24.9842 36.9742 0011040 318.0438 41.9206 14.38948712 6903
+FUSE 1
+1 25791U 99035A 99218.63853449 .00000720 00000-0 17250-3 0 135
+2 25791 24.9828 67.0232 0011431 267.3032 92.6167 14.38944759 6193
+FUSE 1
+1 25791U 99035A 99216.97400544 +.00000683 +00000-0 +16063-3 0 00166
+2 25791 024.9829 077.1763 0011588 249.8240 110.1026 14.38942807005959
+FUSE 1
+1 25791U 99035A 99215.72561041 .00001104 00000-0 29513-3 0 127
+2 25791 24.9823 84.7905 0011295 237.0915 122.8597 14.38943232 5774
+FUSE 1
+1 25791U 99035A 99213.99172686 +.00000755 +00000-0 +18386-3 0 00281
+2 25791 024.9829 095.3690 0011291 219.0401 140.9295 14.38939332005520
+FUSE 1
+1 25791U 99035A 99213.02075147 +.00000641 +00000-0 +14744-3 0 00175
+2 25791 024.9830 101.2939 0011410 209.3286 150.6585 14.38937829005384
+FUSE 1
+1 25791U 99035A 99212.88204088 .00000581 00000-0 12826-3 0 112
+2 25791 24.9832 102.1415 0011463 208.2710 151.7177 14.38937383 5365
+FUSE 1
+1 25791U 99035A 99211.07879897 +.00000483 +00000-0 +96970-4 0 00493
+2 25791 024.9832 113.1440 0011683 189.9414 170.0864 14.38935491005102
+FUSE 1
+1 25791U 99035A 99210.10782220 +.00000457 +00000-0 +88695-4 0 00361
+2 25791 024.9830 119.0680 0011645 180.0206 180.0306 14.38934715004963
+FUSE 1
+1 25791U 99035A 99209.13684459 +.00000476 +00000-0 +94628-4 0 00215
+2 25791 024.9829 124.9914 0011669 170.0019 190.0732 14.38934254004820
+FUSE 1
+1 25791U 99035A 99208.85942248 .00000483 00000-0 96822-4 0 100
+2 25791 24.9830 126.6849 0011617 167.3014 192.7802 14.38934135 4785
+FUSE 1
+1 25791U 99035A 99208.16586648 +.00000509 +00000-0 +10534-3 0 00689
+2 25791 024.9829 130.9163 0011612 160.0034 200.0933 14.38933809004681
+FUSE 1
+1 25791U 99035A 99207.12553224 +.00000477 +00000-0 +95090-4 0 00537
+2 25791 024.9830 137.2648 0011506 149.5759 210.5420 14.38933010004534
+FUSE 1
+1 25791U 99035A 99206.15455295 +.00000436 +00000-0 +81952-4 0 00388
+2 25791 024.9831 143.1889 0011456 139.5200 220.6160 14.38932240004393
+FUSE 1
+1 25791U 99035A 99205.11421632 +.00000433 +00000-0 +81097-4 0 00221
+2 25791 024.9835 149.5359 0011411 129.0298 231.1227 14.38931694004248
+FUSE 1
+1 25791U 99035A 99204.21259024 .00000427 00000-0 79119-4 0 95
+2 25791 24.9835 155.0370 0011324 120.0292 240.1341 14.38931194 4119
+FUSE 1
+1 25791U 99035A 99203.17225182 +.00000414 +00000-0 +74992-4 0 00525
+2 25791 024.9835 161.3843 0011233 109.2556 250.9169 14.38930540003968
+FUSE 1
+1 25791U 99035A 99202.13191170 +.00000423 +00000-0 +77980-4 0 00383
+2 25791 024.9837 167.7323 0011168 098.4908 261.6865 14.38930164003818
+FUSE 1
+1 25791U 99035A 99201.16092631 +.00000440 +00000-0 +83410-4 0 00235
+2 25791 024.9837 173.6562 0011126 088.3941 271.7841 14.38929874003674
+FUSE 1
+1 25791U 99035A 99200.18994021 .00000454 00000-0 87696-4 0 88
+2 25791 24.9838 179.5806 0011119 78.2644 281.9107 14.38929532 3535
+FUSE 1
+1 25791U 99035A 99200.12059101 +.00000432 +00000-0 +80931-4 0 00725
+2 25791 024.9842 180.0407 0011095 075.8036 284.3701 14.38929430003528
+FUSE 1
+1 25791U 99035A 99199.21895964 +.00000465 +00000-0 +91252-4 0 00631
+2 25791 024.9840 185.5408 0011075 066.4980 293.6690 14.38929231003393
+FUSE 1
+1 25791U 99035A 99198.17861506 +.00000472 +00000-0 +93642-4 0 00475
+2 25791 024.9844 191.8880 0011017 055.5344 304.6202 14.38928745003245
+FUSE 1
+1 25791U 99035A 99197.20762573 +.00000483 +00000-0 +97242-4 0 00328
+2 25791 024.9845 197.8116 0010965 045.0350 315.1043 14.38928247003108
+FUSE 1
+1 25791U 99035A 99196.16727896 +.00000496 +00000-0 +10136-3 0 00130
+2 25791 024.9848 204.1584 0010927 033.8431 326.2770 14.38927757002952
+FUSE 1
+1 25791U 99035A 99195.40435724 .00000525 00000-0 11052-3 0 76
+2 25791 24.9845 208.8116 0010908 25.8212 334.2838 14.38927498 2842
+FUSE 1
+1 25791U 99035A 99195.26564445 +.00000515 +00000-0 +10744-3 0 00732
+2 25791 024.9847 209.6583 0010905 024.2058 335.8962 14.38927325002821
+FUSE 1
+1 25791U 99035A 99194.22529636 +.00000515 +00000-0 +10742-3 0 00547
+2 25791 024.9849 216.0045 0010895 012.9914 347.0873 14.38926634002672
+FUSE 1
+1 25791U 99035A 99193.18494715 +.00000545 +00000-0 +11704-3 0 00384
+2 25791 024.9850 222.3506 0010896 001.9128 358.1416 14.38926205002526
+FUSE 1
+1 25791U 99035A 99192.14459780 +.00000580 +00000-0 +12797-3 0 00193
+2 25791 024.9850 228.6966 0010908 350.8363 009.1951 14.38925741002370
+FUSE 1
+1 25791U 99035A 99191.24296126 .00000600 00000-0 13459-3 0 61
+2 25791 24.9852 234.1962 0010933 341.3306 18.6794 14.38925220 2248
+FUSE 1
+1 25791U 99035A 99189.57840234 +.00000688 +00000-0 +16244-3 0 00431
+2 25791 024.9847 244.3496 0011003 324.3520 035.6271 14.38924327002005
+FUSE 1
+1 25791U 99035A 99188.53805210 +.00000745 +00000-0 +18074-3 0 00304
+2 25791 024.9847 250.6956 0011082 313.4689 046.4896 14.38923665001857
+FUSE 1
+1 25791U 99035A 99187.56705911 +.00000776 +00000-0 +19053-3 0 00181
+2 25791 024.9847 256.6180 0011114 303.2228 056.7215 14.38922773001717
+FUSE 1
+1 25791U 99035A 99187.22027565 .00000809 00000-0 20103-3 0 57
+2 25791 24.9849 258.7334 0011145 299.6070 60.3328 14.38922625 1666
+FUSE 1
+1 25791U 99035A 99186.59606618 +.00000806 +00000-0 +20001-3 0 00658
+2 25791 024.9848 262.5402 0011144 293.0885 066.8449 14.38921812001577
+FUSE 1
+1 25791U 99035A 99185.55571694 +.00000781 +00000-0 +19209-3 0 00489
+2 25791 024.9850 268.8854 0011179 282.1384 077.7873 14.38920354001427
+FUSE 1
+1 25791U 99035A 99184.58472411 +.00000771 +00000-0 +18889-3 0 00356
+2 25791 024.9851 274.8074 0011210 272.0258 087.8967 14.38919111001282
+FUSE 1
+1 25791U 99035A 99183.61373101 +.00000806 +00000-0 +20014-3 0 00199
+2 25791 024.9851 280.7294 0011202 261.9284 097.9951 14.38918148001148
+FUSE
+1 25791U 99035A 99182.64273781 .00000831 00000-0 20827-3 0 48
+2 25791 24.9852 286.6514 0011228 251.8187 108.1089 14.38917064 1005
+FUSE
+1 25791U 99035A 99181.53303177 +.00000885 +00000-0 +22535-3 0 00326
+2 25791 024.9851 293.4193 0011207 240.2024 119.7372 14.38915842000848
+FUSE
+1 25791U 99035A 99180.42332586 +.00000769 +00000-0 +18844-3 0 00250
+2 25791 024.9851 300.1870 0011210 228.6224 131.3324 14.38913850000688
+FUSE
+1 25791U 99035A 99179.72975929 +.00000701 +00000-0 +16654-3 0 00225
+2 25791 024.9851 304.4168 0011211 221.3620 138.6046 14.38912818000589
+FUSE
+1 25791U 99035A 99178.68940879 +.00000540 +00000-0 +11515-3 0 00070
+2 25791 024.9851 310.7614 0011204 210.4757 149.5099 14.38911405000431
+FUSE
+1 25791U 99035A 99178.55069535 .00000518 00000-0 10814-3 0 39
+2 25791 24.9851 311.6073 0011204 209.0295 150.9590 14.38911233 410
+FUSE
+1 25791U 99035A 99177.92648488 +.00000082 +00000-0 -31136-4 0 00408
+2 25791 024.9853 315.4140 0011227 202.4549 157.5464 14.38909900000324
+FUSE
+1 25791U 99035A 99176.95549150 -.00001333 +00000-0 -48314-3 0 00075
+2 25791 024.9860 321.3361 0010962 190.9807 169.0438 14.38907601000185
diff --git a/src/cal/get_tle/tmp/FUSE.TLE.kruk b/src/cal/get_tle/tmp/FUSE.TLE.kruk
new file mode 100644
index 0000000..a15222b
--- /dev/null
+++ b/src/cal/get_tle/tmp/FUSE.TLE.kruk
@@ -0,0 +1,4578 @@
+FUSE 1
+1 25791U 99035A 03150.22787149 .00000462 00000-0 85706-4 0 8664
+2 25791 24.9829 192.6106 0010589 103.2247 256.9442 14.41342447207158
+FUSE 1
+1 25791U 99035A 03148.56611937 .00000483 00000-0 92184-4 0 8659
+2 25791 24.9829 202.7908 0010554 85.9076 274.2645 14.41341656206911
+FUSE 1
+1 25791U 99035A 03147.52752265 +.00000485 +00000-0 +92660-4 0 08802
+2 25791 024.9829 209.1535 0010502 074.9181 285.2489 14.41341031206764
+FUSE 1
+1 25791U 99035A 03147.25056401 .00000444 00000-0 80285-4 0 8648
+2 25791 24.9832 210.8523 0010387 71.8386 288.3258 14.41340505206727
+FUSE 1
+1 25791U 99035A 03145.65804606 .00000436 00000-0 77914-4 0 8633
+2 25791 24.9834 220.6078 0010334 54.9657 305.1825 14.41339591206493
+FUSE 1
+1 25791U 99035A 03144.55020623 .00000437 00000-0 78023-4 0 8622
+2 25791 24.9834 227.3948 0010384 43.0456 317.0865 14.41338981206335
+FUSE 1
+1 25791U 99035A 03143.51160500 .00000421 00000-0 73254-4 0 8619
+2 25791 24.9837 233.7586 0010263 31.8445 328.2684 14.41338349206180
+FUSE 1
+1 25791U 99035A 03142.68072397 +.00000390 +00000-0 +63795-4 0 08751
+2 25791 024.9839 238.8486 0010272 023.0015 337.0956 14.41337687206064
+FUSE 1
+1 25791U 99035A 03142.33452356 .00000379 00000-0 60393-4 0 8602
+2 25791 24.9841 240.9721 0010255 19.1006 340.9888 14.41337442206011
+FUSE 1
+1 25791U 99035A 03141.71136164 +.00000379 +00000-0 +60626-4 0 08800
+2 25791 024.9840 244.7879 0010278 012.6009 347.4755 14.41337187205922
+FUSE 1
+1 25791U 99035A 03140.74199907 .00000370 00000-0 57735-4 0 8590
+2 25791 24.9841 250.7264 0010336 2.4159 357.6402 14.41336697205787
+FUSE 1
+1 25791U 99035A 03139.77263585 +.00000354 +00000-0 +52942-4 0 08660
+2 25791 024.9844 256.6661 0010354 351.8435 008.1907 14.41336219205647
+FUSE 1
+1 25791U 99035A 03139.56491547 .00000328 00000-0 45098-4 0 8584
+2 25791 24.9847 257.9406 0010399 349.2190 10.8094 14.41335926205617
+FUSE 1
+1 25791U 99035A 03138.73403226 +.00000337 +00000-0 +47751-4 0 08790
+2 25791 024.9846 263.0295 0010413 340.7827 019.2287 14.41335717205491
+FUSE 1
+1 25791U 99035A 03137.76466903 .00000347 00000-0 50863-4 0 8578
+2 25791 24.9846 268.9696 0010450 330.8995 29.0930 14.41335458205358
+FUSE 1
+1 25791U 99035A 03136.65682420 .00000390 00000-0 63870-4 0 8568
+2 25791 24.9845 275.7569 0010467 319.1949 40.7776 14.41335447205197
+FUSE 1
+1 25791U 99035A 03135.68746059 +.00000395 +00000-0 +65459-4 0 08569
+2 25791 024.9844 281.6931 0010472 309.0975 050.8590 14.41335072205053
+FUSE 1
+1 25791U 99035A 03135.54898003 .00000409 00000-0 69659-4 0 8552
+2 25791 24.9844 282.5416 0010458 307.6606 52.2948 14.41335149205036
+FUSE 1
+1 25791U 99035A 03134.51037701 +.00000418 +00000-0 +72356-4 0 08578
+2 25791 024.9842 288.9014 0010448 296.9961 062.9478 14.41334711204883
+FUSE 1
+1 25791U 99035A 03133.88721559 .00000426 00000-0 74642-4 0 8544
+2 25791 24.9841 292.7176 0010439 290.6823 69.2571 14.41334447204792
+FUSE 1
+1 25791U 99035A 03132.84861269 +.00000430 +00000-0 +75920-4 0 08592
+2 25791 024.9841 299.0779 0010500 279.5447 080.3876 14.41333984204649
+FUSE 1
+1 25791U 99035A 03132.57165180 .00000452 00000-0 82534-4 0 8538
+2 25791 24.9840 300.7743 0010474 276.5765 83.3548 14.41334042204600
+FUSE 1
+1 25791U 99035A 03131.87925065 +.00000453 +00000-0 +82898-4 0 08732
+2 25791 024.9839 305.0137 0010463 269.3387 090.5924 14.41333669204502
+FUSE 1
+1 25791U 99035A 03130.90988891 .00000490 00000-0 94080-4 0 8525
+2 25791 24.9837 310.9515 0010487 259.0381 100.8949 14.41333434204367
+FUSE 1
+1 25791U 99035A 03129.87128778 .00000523 00000-0 10424-3 0 8514
+2 25791 24.9835 317.3134 0010521 248.2159 111.7230 14.41333026204210
+FUSE 1
+1 25791U 99035A 03128.90192725 +.00000552 +00000-0 +11296-3 0 08532
+2 25791 024.9833 323.2517 0010552 238.0980 121.8502 14.41332579204072
+FUSE 1
+1 25791U 99035A 03128.83268738 .00000545 00000-0 11086-3 0 8508
+2 25791 24.9833 323.6764 0010568 237.4929 122.4559 14.41332467204067
+FUSE 1
+1 25791U 99035A 03127.93256604 +.00000601 +00000-0 +12794-3 0 08608
+2 25791 024.9830 329.1896 0010698 227.9538 132.0061 14.41332295203934
+FUSE 1
+1 25791U 99035A 03126.96320595 .00000625 00000-0 13528-3 0 8490
+2 25791 24.9830 335.1268 0010736 217.7754 142.2000 14.41331691203793
+FUSE 1
+1 25791U 99035A 03125.92460573 .00000669 00000-0 14867-3 0 8480
+2 25791 24.9827 341.4877 0010781 206.7283 153.2669 14.41331116203649
+FUSE 1
+1 25791U 99035A 03124.95524601 +.00000691 +00000-0 +15516-3 0 08505
+2 25791 024.9825 347.4243 0010785 196.3122 163.7039 14.41330332203501
+FUSE 1
+1 25791U 99035A 03124.88600610 .00000690 00000-0 15495-3 0 8473
+2 25791 24.9826 347.8485 0010786 195.5964 164.4215 14.41330260203492
+FUSE 1
+1 25791U 99035A 03123.91664594 +.00000696 +00000-0 +15682-3 0 08516
+2 25791 024.9825 353.7856 0010797 185.6495 174.3891 14.41329308203356
+FUSE 1
+1 25791U 99035A 03123.84740597 .00000693 00000-0 15596-3 0 8461
+2 25791 24.9825 354.2099 0010797 185.0043 175.0358 14.41329216203347
+FUSE 1
+1 25791U 99035A 03122.11640408 .00000703 00000-0 15884-3 0 8451
+2 25791 24.9822 4.8109 0010810 167.4774 192.6009 14.41327425203095
+FUSE 1
+1 25791U 99035A 03121.07780243 .00000667 00000-0 14783-3 0 8442
+2 25791 24.9822 11.1719 0010728 156.8103 203.2890 14.41325997202941
+FUSE 1
+1 25791U 99035A 03119.96995900 +.00000637 +00000-0 +13898-3 0 08471
+2 25791 024.9824 017.9568 0010660 145.4593 214.6611 14.41324655202780
+FUSE 1
+1 25791U 99035A 03119.90071904 .00000619 00000-0 13339-3 0 8430
+2 25791 24.9826 18.3811 0010636 144.7680 215.3531 14.41324414202771
+FUSE 1
+1 25791U 99035A 03118.86211447 .00000584 00000-0 12289-3 0 8425
+2 25791 24.9826 24.7417 0010559 134.0951 226.0434 14.41323141202622
+FUSE 1
+1 25791U 99035A 03117.96198940 +.00000540 +00000-0 +10940-3 0 08522
+2 25791 024.9829 030.2539 0010497 124.5628 235.5873 14.41321998202493
+FUSE 1
+1 25791U 99035A 03117.20034409 .00000515 00000-0 10194-3 0 8419
+2 25791 24.9829 34.9180 0010485 116.4587 243.7000 14.41321200202384
+FUSE 1
+1 25791U 99035A 03115.88477360 .00000443 00000-0 80015-4 0 8407
+2 25791 24.9830 42.9750 0010371 102.4463 257.7219 14.41319637202197
+FUSE 1
+1 25791U 99035A 03114.98464436 +.00000405 +00000-0 +68282-4 0 08441
+2 25791 024.9831 048.4873 0010313 092.7862 267.3832 14.41318779202065
+FUSE 1
+1 25791U 99035A 03114.84616281 .00000401 00000-0 67228-4 0 8392
+2 25791 24.9830 49.3353 0010321 91.2914 268.8779 14.41318665202046
+FUSE 1
+1 25791U 99035A 03113.94603175 +.00000392 +00000-0 +64358-4 0 08457
+2 25791 024.9830 054.8471 0010295 081.7820 278.3859 14.41318172201911
+FUSE 1
+1 25791U 99035A 03113.25362240 .00000391 00000-0 64235-4 0 8381
+2 25791 24.9829 59.0866 0010297 74.5006 285.6639 14.41317864201815
+FUSE 1
+1 25791U 99035A 03112.97665904 +.00000377 +00000-0 +60036-4 0 08459
+2 25791 024.9831 060.7830 0010270 071.4871 288.6765 14.41317625201778
+FUSE 1
+1 25791U 99035A 03112.21500808 .00000363 00000-0 55711-4 0 8377
+2 25791 24.9831 65.4465 0010279 63.4745 296.6818 14.41317184201660
+FUSE 1
+1 25791U 99035A 03111.17639208 .00000363 00000-0 55548-4 0 8365
+2 25791 24.9830 71.8062 0010279 52.4799 307.6644 14.41316776201510
+FUSE 1
+1 25791U 99035A 03110.96866852 +.00000365 +00000-0 +56405-4 0 08600
+2 25791 024.9830 073.0785 0010262 050.2094 309.9312 14.41316734201489
+FUSE 1
+1 25791U 99035A 03109.58384492 +.00000379 +00000-0 +60572-4 0 08369
+2 25791 024.9829 081.5576 0010264 035.5220 324.5953 14.41316327201288
+FUSE 1
+1 25791U 99035A 03109.37612134 .00000390 00000-0 63811-4 0 8354
+2 25791 24.9831 82.8309 0010191 33.2102 326.9042 14.41316389201252
+FUSE 1
+1 25791U 99035A 03108.33750280 .00000419 00000-0 72748-4 0 8344
+2 25791 24.9833 89.1917 0010176 22.3826 337.7123 14.41316238201101
+FUSE 1
+1 25791U 99035A 03107.22964140 .00000487 00000-0 93318-4 0 8333
+2 25791 24.9837 95.9773 0010052 10.7357 349.3362 14.41316429200940
+FUSE 1
+1 25791U 99035A 03105.98329705 +.00000572 +00000-0 +11935-3 0 08346
+2 25791 024.9839 103.6091 0010055 357.5958 002.4500 14.41316519200765
+FUSE 1
+1 25791U 99035A 03105.42936709 .00000573 00000-0 11956-3 0 8325
+2 25791 24.9839 107.0005 0010053 351.7713 8.2628 14.41316090200681
+FUSE 1
+1 25791U 99035A 03104.39074737 .00000618 00000-0 13316-3 0 8315
+2 25791 24.9841 113.3600 0010076 341.0911 18.9221 14.41315709200539
+FUSE 1
+1 25791U 99035A 03103.83681675 +.00000642 +00000-0 +14053-3 0 08493
+2 25791 024.9841 116.7516 0010112 335.4399 024.5624 14.41315476200452
+FUSE 1
+1 25791U 99035A 03103.21364467 .00000672 00000-0 14956-3 0 8307
+2 25791 24.9843 120.5685 0010100 328.7321 31.2586 14.41315278200363
+FUSE 1
+1 25791U 99035A 03101.89805968 .00000719 00000-0 16399-3 0 8298
+2 25791 24.9841 128.6245 0010100 314.9047 45.0638 14.41314506200177
+FUSE 1
+1 25791U 99035A 03100.72095835 .00000735 00000-0 16862-3 0 8285
+2 25791 24.9823 135.8422 0010255 300.3804 59.5679 14.41313234200009
+FUSE 1
+1 25791U 99035A 03099.95930502 +.00000731 +00000-0 +16758-3 0 08321
+2 25791 024.9822 140.5054 0010257 292.8087 067.1336 14.41312329199895
+FUSE 1
+1 25791U 99035A 03099.54386033 .00000758 00000-0 17568-3 0 8273
+2 25791 24.9817 143.0635 0010123 287.3571 72.5830 14.41312013199834
+FUSE 1
+1 25791U 99035A 03098.92068851 +.00000723 +00000-0 +16491-3 0 08499
+2 25791 024.9816 146.8804 0010159 280.5747 079.3533 14.41310909199748
+FUSE 1
+1 25791U 99035A 03098.22827686 .00000751 00000-0 17368-3 0 8261
+2 25791 24.9821 151.1234 0010310 272.8590 87.0746 14.41310499199644
+FUSE 1
+1 25791U 99035A 03097.18965913 .00000710 00000-0 16100-3 0 8258
+2 25791 24.9822 157.4830 0010353 261.6244 98.3091 14.41308833199495
+FUSE 1
+1 25791U 99035A 03095.94331601 .00000705 00000-0 15943-3 0 8248
+2 25791 24.9828 165.1153 0010485 248.0340 111.9051 14.41307527199315
+FUSE 1
+1 25791U 99035A 03094.55849177 .00000687 00000-0 15400-3 0 8232
+2 25791 24.9837 173.5981 0010507 233.7648 126.1888 14.41305878199115
+FUSE 1
+1 25791U 99035A 03093.79684032 +.00000617 +00000-0 +13296-3 0 08340
+2 25791 024.9830 178.2689 0010658 225.6842 134.2806 14.41303892199000
+FUSE 1
+1 25791U 99035A 03093.45063419 .00000588 00000-0 12399-3 0 8220
+2 25791 24.9830 180.3890 0010661 222.1502 137.8185 14.41303261198959
+FUSE 1
+1 25791U 99035A 03092.06580825 .00000498 00000-0 96689-4 0 8215
+2 25791 24.9829 188.8687 0010595 207.4856 152.5026 14.41301203198758
+FUSE 1
+1 25791U 99035A 03090.88870503 .00000512 00000-0 10095-3 0 8200
+2 25791 24.9830 196.0770 0010689 195.3984 164.6200 14.41300573198583
+FUSE 1
+1 25791U 99035A 03089.91932625 +.00000473 +00000-0 +89013-4 0 08355
+2 25791 024.9831 202.0132 0010707 185.2549 174.7855 14.41299501198441
+FUSE 1
+1 25791U 99035A 03089.57311974 .00000447 00000-0 81025-4 0 8193
+2 25791 24.9832 204.1347 0010678 181.8480 178.1989 14.41298969198393
+FUSE 1
+1 25791U 99035A 03088.18829319 .00000422 00000-0 73584-4 0 8189
+2 25791 24.9836 212.6159 0010751 167.8506 192.2415 14.41297973198190
+FUSE 1
+1 25791U 99035A 03087.14967143 .00000439 00000-0 78641-4 0 8178
+2 25791 24.9834 218.9892 0010499 154.7731 205.3306 14.41297621198044
+FUSE 1
+1 25791U 99035A 03086.94194663 +.00000428 +00000-0 +75286-4 0 08488
+2 25791 024.9835 220.2611 0010504 152.4498 207.6568 14.41297416198016
+FUSE 1
+1 25791U 99035A 03085.90332252 .00000414 00000-0 71085-4 0 8164
+2 25791 24.9838 226.6261 0010293 142.1870 217.9362 14.41296881197868
+FUSE 1
+1 25791U 99035A 03085.90332251 +.00000414 +00000-0 +71084-4 0 08173
+2 25791 024.9838 226.6261 0010293 142.1870 217.9361 14.41296881197867
+FUSE 1
+1 25791U 99035A 03084.86469882 .00000343 00000-0 49516-4 0 8152
+2 25791 24.9847 232.9875 0010201 130.8102 229.3297 14.41295801197719
+FUSE 1
+1 25791U 99035A 03083.89531250 +.00000489 +00000-0 +93920-4 0 08321
+2 25791 024.9844 238.9268 0010672 122.1781 237.9761 14.41296727197570
+FUSE 1
+1 25791U 99035A 03083.54910375 .00000503 00000-0 98232-4 0 8140
+2 25791 24.9844 241.0479 0010701 118.5123 241.6462 14.41296648197528
+FUSE 1
+1 25791U 99035A 03082.92592724 +.00000523 +00000-0 +10446-3 0 08451
+2 25791 024.9843 244.8641 0010700 112.2904 247.8737 14.41296449197438
+FUSE 1
+1 25791U 99035A 03082.16426759 .00000526 00000-0 10521-3 0 8133
+2 25791 24.9841 249.5294 0010669 104.2866 255.8838 14.41295912197327
+FUSE 1
+1 25791U 99035A 03081.12563750 .00000612 00000-0 13128-3 0 8122
+2 25791 24.9842 255.8923 0010711 94.3078 265.8647 14.41296014197175
+FUSE 1
+1 25791U 99035A 03079.87928172 .00000670 00000-0 14898-3 0 8112
+2 25791 24.9845 263.5260 0010772 80.9467 279.2259 14.41295470196990
+FUSE 1
+1 25791U 99035A 03078.90989285 +.00000680 +00000-0 +15204-3 0 08356
+2 25791 024.9842 269.4617 0010753 070.0356 290.1308 14.41294541196854
+FUSE 1
+1 25791U 99035A 03078.56368187 .00000702 00000-0 15885-3 0 8103
+2 25791 24.9840 271.5817 0010757 66.2560 293.9075 14.41294387196801
+FUSE 1
+1 25791U 99035A 03077.17883857 .00000638 00000-0 13930-3 0 8090
+2 25791 24.9843 280.0617 0010654 50.7889 309.3564 14.41292379196607
+FUSE 1
+1 25791U 99035A 03076.14020216 .00000782 00000-0 18324-3 0 8089
+2 25791 24.9848 286.4255 0010468 43.0582 317.0743 14.41292815196451
+FUSE 1
+1 25791U 99035A 03074.89383969 .00000825 00000-0 19632-3 0 8076
+2 25791 24.9853 294.0604 0010385 30.7066 329.4048 14.41291731196279
+FUSE 1
+1 25791U 99035A 03073.43974802 .00000854 00000-0 20497-3 0 8069
+2 25791 24.9852 302.9660 0010367 15.2865 344.7954 14.41290069196060
+FUSE 1
+1 25791U 99035A 03072.19338203 .00000856 00000-0 20554-3 0 8055
+2 25791 24.9854 310.5981 0010287 2.1680 357.8866 14.41288422195880
+FUSE 1
+1 25791U 99035A 03071.08550087 .00000818 00000-0 19402-3 0 8045
+2 25791 24.9860 317.3842 0010263 349.9948 10.0353 14.41286657195721
+FUSE 1
+1 25791U 99035A 03069.97761880 +.00000763 +00000-0 +17745-3 0 08086
+2 25791 024.9860 324.1683 0010236 338.1839 021.8232 14.41284751195560
+FUSE 1
+1 25791U 99035A 03069.90837617 .00000758 00000-0 17585-3 0 8032
+2 25791 24.9860 324.5922 0010236 337.4031 22.6028 14.41284617195558
+FUSE 1
+1 25791U 99035A 03068.93897780 +.00000723 +00000-0 +16521-3 0 08098
+2 25791 024.9864 330.5285 0010290 326.4566 033.5291 14.41283191195416
+FUSE 1
+1 25791U 99035A 03068.86973524 .00000716 00000-0 16303-3 0 8024
+2 25791 24.9864 330.9527 0010287 325.7078 34.2768 14.41283044195408
+FUSE 1
+1 25791U 99035A 03067.55412264 .00000656 00000-0 14496-3 0 8011
+2 25791 24.9864 339.0080 0010311 311.6370 48.3251 14.41281081195210
+FUSE 1
+1 25791U 99035A 03066.44623884 .00000578 00000-0 12112-3 0 8005
+2 25791 24.9864 345.7927 0010333 299.7399 60.2082 14.41279280195050
+FUSE 1
+1 25791U 99035A 03065.40759665 .00000526 00000-0 10514-3 0 7991
+2 25791 24.9863 352.1521 0010350 288.8170 71.1215 14.41277936194904
+FUSE 1
+1 25791U 99035A 03064.23046813 .00000487 00000-0 93421-4 0 7989
+2 25791 24.9864 359.3605 0010411 275.9615 83.9706 14.41276773194731
+FUSE 1
+1 25791U 99035A 03062.98409806 +.00000428 +00000-0 +75413-4 0 08015
+2 25791 024.9863 006.9942 0010426 262.5976 097.3348 14.41275346194553
+FUSE 1
+1 25791U 99035A 03062.91485526 .00000425 00000-0 74460-4 0 7973
+2 25791 24.9862 7.4181 0010421 261.8604 98.0722 14.41275270194547
+FUSE 1
+1 25791U 99035A 03061.94545741 +.00000420 +00000-0 +73017-4 0 08008
+2 25791 024.9848 013.3688 0010509 252.6434 107.2924 14.41274844194403
+FUSE 1
+1 25791U 99035A 03061.66848589 .00000420 00000-0 73002-4 0 7961
+2 25791 24.9848 15.0645 0010505 249.7386 110.1988 14.41274707194360
+FUSE 1
+1 25791U 99035A 03060.49135828 .00000388 00000-0 63176-4 0 7959
+2 25791 24.9852 22.2747 0010610 237.5708 122.3771 14.41273890194196
+FUSE 1
+1 25791U 99035A 03059.24498747 .00000395 00000-0 65325-4 0 7947
+2 25791 24.9851 29.9090 0010713 224.4424 135.5221 14.41273446194018
+FUSE 1
+1 25791U 99035A 03058.96801613 +.00000410 +00000-0 +70039-4 0 08335
+2 25791 024.9848 031.6055 0010711 221.6605 138.3087 14.41273447193979
+FUSE 1
+1 25791U 99035A 03057.79088784 .00000466 00000-0 86878-4 0 7935
+2 25791 24.9852 38.8148 0010787 209.3160 150.6743 14.41273450193800
+FUSE 1
+1 25791U 99035A 03056.75224577 .00000511 00000-0 10064-3 0 7925
+2 25791 24.9849 45.1756 0010796 198.5017 161.5097 14.41273260193657
+FUSE 1
+1 25791U 99035A 03055.71360371 .00000543 00000-0 11053-3 0 7916
+2 25791 24.9851 51.5371 0010893 187.8825 172.1502 14.41272912193506
+FUSE 1
+1 25791U 99035A 03054.81344706 +.00000592 +00000-0 +12526-3 0 07943
+2 25791 024.9854 057.0504 0010975 178.3725 181.6813 14.41272772193372
+FUSE 1
+1 25791U 99035A 03054.53647601 .00000595 00000-0 12630-3 0 7907
+2 25791 24.9855 58.7463 0010996 175.5448 184.5158 14.41272591193338
+FUSE 1
+1 25791U 99035A 03053.22086164 .00000648 00000-0 14239-3 0 7897
+2 25791 24.9854 66.8027 0011082 162.1387 197.9511 14.41272079193145
+FUSE 1
+1 25791U 99035A 03052.18221916 .00000654 00000-0 14422-3 0 7887
+2 25791 24.9857 73.1612 0010974 150.9371 209.1749 14.41271157192993
+FUSE 1
+1 25791U 99035A 03051.69751897 +.00000653 +00000-0 +14404-3 0 08192
+2 25791 024.9857 076.1286 0010974 145.8259 214.2956 14.41270685192926
+FUSE 1
+1 25791U 99035A 03050.86660284 .00000682 00000-0 15278-3 0 7875
+2 25791 24.9852 81.2163 0010966 137.4487 222.6871 14.41270247192803
+FUSE 1
+1 25791U 99035A 03049.55098927 .00000679 00000-0 15178-3 0 7862
+2 25791 24.9830 89.2921 0010776 123.5065 236.6474 14.41268750192615
+FUSE 1
+1 25791U 99035A 03046.91974757 .00000708 00000-0 16072-3 0 7848
+2 25791 24.9828 105.4061 0010755 96.1405 264.0326 14.41266314192231
+FUSE 1
+1 25791U 99035A 03045.81185480 .00000675 00000-0 15076-3 0 7838
+2 25791 24.9829 112.1925 0010804 84.5002 275.6738 14.41264829192071
+FUSE 1
+1 25791U 99035A 03044.56547187 .00000671 00000-0 14933-3 0 7821
+2 25791 24.9825 119.8235 0010884 72.1647 288.0048 14.41263465191897
+FUSE 1
+1 25791U 99035A 03043.87303595 +.00000663 +00000-0 +14707-3 0 08086
+2 25791 024.9823 124.0647 0010837 064.8117 295.3515 14.41262691191797
+FUSE 1
+1 25791U 99035A 03043.24984329 .00000652 00000-0 14385-3 0 7817
+2 25791 24.9824 127.8828 0010807 58.4950 301.6614 14.41261995191709
+FUSE 1
+1 25791U 99035A 03042.07269992 .00000613 00000-0 13188-3 0 7805
+2 25791 24.9827 135.0921 0010730 46.2939 313.8459 14.41260560191534
+FUSE 1
+1 25791U 99035A 03040.82631031 .00000590 00000-0 12473-3 0 7791
+2 25791 24.9825 142.7255 0010676 33.4461 326.6705 14.41259243191356
+FUSE 1
+1 25791U 99035A 03039.57991945 .00000595 00000-0 12637-3 0 7780
+2 25791 24.9832 150.3613 0010568 20.6980 339.3959 14.41258343191173
+FUSE 1
+1 25791U 99035A 03038.54125940 .00000562 00000-0 11637-3 0 7772
+2 25791 24.9831 156.7218 0010533 9.4132 350.6584 14.41257190191022
+FUSE 1
+1 25791U 99035A 03037.01788880 .00000562 00000-0 11641-3 0 7765
+2 25791 24.9831 166.0494 0010450 353.4940 6.5445 14.41256054190805
+FUSE 1
+1 25791U 99035A 03035.90998290 +.00000529 +00000-0 +10615-3 0 07762
+2 25791 024.9834 172.8362 0010444 341.3662 018.6462 14.41254945190649
+FUSE 1
+1 25791U 99035A 03035.84073869 .00000529 00000-0 10615-3 0 7750
+2 25791 24.9834 173.2601 0010444 340.6394 19.3715 14.41254896190637
+FUSE 1
+1 25791U 99035A 03034.94056470 +.00000514 +00000-0 +10178-3 0 07937
+2 25791 024.9830 178.7729 0010445 331.0545 028.9383 14.41254106190504
+FUSE 1
+1 25791U 99035A 03034.59434384 .00000508 00000-0 99976-4 0 7748
+2 25791 24.9829 180.8929 0010469 327.4109 32.5752 14.41253798190450
+FUSE 1
+1 25791U 99035A 03033.55568063 .00000512 00000-0 10098-3 0 7736
+2 25791 24.9832 187.2531 0010490 316.1247 43.8429 14.41253174190304
+FUSE 1
+1 25791U 99035A 03032.24004087 .00000509 00000-0 10030-3 0 7723
+2 25791 24.9833 195.3101 0010479 301.8051 58.1431 14.41252308190118
+FUSE 1
+1 25791U 99035A 03031.13213438 .00000500 00000-0 97473-4 0 7719
+2 25791 24.9834 202.0943 0010489 289.8402 70.0976 14.41251485189957
+FUSE 1
+1 25791U 99035A 03029.95498370 +.00000507 +00000-0 +99455-4 0 07726
+2 25791 024.9833 209.3044 0010568 277.2138 082.7170 14.41250807189787
+FUSE 1
+1 25791U 99035A 03029.88573951 .00000506 00000-0 99284-4 0 7704
+2 25791 24.9834 209.7284 0010567 276.4676 83.4627 14.41250759189775
+FUSE 1
+1 25791U 99035A 03028.91632543 +.00000457 +00000-0 +84396-4 0 07714
+2 25791 024.9829 215.6872 0010688 267.6409 092.2873 14.41250112189637
+FUSE 1
+1 25791U 99035A 03028.84708138 .00000459 00000-0 84922-4 0 7694
+2 25791 24.9829 216.1111 0010685 266.8899 93.0390 14.41250090189627
+FUSE 1
+1 25791U 99035A 03027.94690786 +.00000485 +00000-0 +92887-4 0 07916
+2 25791 024.9829 221.6256 0010733 257.2339 102.6968 14.41249791189494
+FUSE 1
+1 25791U 99035A 03027.39295481 .00000522 00000-0 10395-3 0 7687
+2 25791 24.9825 225.0181 0010750 251.6346 108.2992 14.41249718189410
+FUSE 1
+1 25791U 99035A 03026.90824636 +.00000535 +00000-0 +10794-3 0 07938
+2 25791 024.9827 227.9872 0010755 246.4607 113.4770 14.41249533189346
+FUSE 1
+1 25791U 99035A 03026.21580544 .00000600 00000-0 12773-3 0 7672
+2 25791 24.9822 232.2291 0010751 239.2471 120.6976 14.41249537189241
+FUSE 1
+1 25791U 99035A 03024.90017016 .00000620 00000-0 13395-3 0 7667
+2 25791 24.9825 240.2875 0010606 224.5201 135.4454 14.41248661189059
+FUSE 1
+1 25791U 99035A 03023.86150943 .00000683 00000-0 15306-3 0 7650
+2 25791 24.9823 246.6490 0010698 213.6230 146.3601 14.41248266188901
+FUSE 1
+1 25791U 99035A 03022.96133739 +.00000720 +00000-0 +16435-3 0 07885
+2 25791 024.9822 252.1619 0010714 203.8994 156.1017 14.41247660188774
+FUSE 1
+1 25791U 99035A 03022.47662920 .00000753 00000-0 17422-3 0 7647
+2 25791 24.9818 255.1315 0010728 199.1571 160.8533 14.41247360188703
+FUSE 1
+1 25791U 99035A 03021.23023620 .00000814 00000-0 19309-3 0 7631
+2 25791 24.9818 262.7649 0010872 186.1483 173.8893 14.41246466188524
+FUSE 1
+1 25791U 99035A 03020.19157559 .00000839 00000-0 20070-3 0 7627
+2 25791 24.9818 269.1258 0010854 175.1951 184.8664 14.41245346188376
+FUSE 1
+1 25791U 99035A 03019.15291393 .00000874 00000-0 21118-3 0 7618
+2 25791 24.9818 275.4875 0010879 164.2609 195.8238 14.41244267188221
+FUSE 1
+1 25791U 99035A 03017.90651918 .00000882 00000-0 21358-3 0 7606
+2 25791 24.9820 283.1229 0010889 151.5092 208.6013 14.41242588188047
+FUSE 1
+1 25791U 99035A 03016.86785572 .00000849 00000-0 20352-3 0 7598
+2 25791 24.9821 289.4833 0010877 140.6893 219.4408 14.41240829187899
+FUSE 1
+1 25791U 99035A 03015.96767820 +.00000843 +00000-0 +20187-3 0 07628
+2 25791 024.9820 294.9922 0010992 131.6564 228.4886 14.41239598187768
+FUSE 1
+1 25791U 99035A 03015.41372249 .00000840 00000-0 20100-3 0 7582
+2 25791 24.9820 298.3836 0010997 125.8349 234.3181 14.41238834187688
+FUSE 1
+1 25791U 99035A 03014.23656622 .00000784 00000-0 18395-3 0 7570
+2 25791 24.9824 305.5944 0010955 113.8675 246.2990 14.41236827187518
+FUSE 1
+1 25791U 99035A 03013.19789667 .00000698 00000-0 15769-3 0 7565
+2 25791 24.9829 311.9557 0010860 103.1125 257.0596 14.41234894187368
+FUSE 1
+1 25791U 99035A 03012.92091841 +.00000651 +00000-0 +14337-3 0 07913
+2 25791 024.9830 313.6530 0010837 100.3922 259.7809 14.41234171187328
+FUSE 1
+1 25791U 99035A 03011.95149077 +.00000591 +00000-0 +12511-3 0 07599
+2 25791 024.9833 319.5894 0010774 090.1943 269.9802 14.41232741187189
+FUSE 1
+1 25791U 99035A 03011.88224586 .00000585 00000-0 12347-3 0 7556
+2 25791 24.9834 320.0134 0010776 89.4952 270.6791 14.41232635187174
+FUSE 1
+1 25791U 99035A 03010.49734521 .00000571 00000-0 11922-3 0 7549
+2 25791 24.9836 328.4940 0010755 75.1825 284.9873 14.41231417186974
+FUSE 1
+1 25791U 99035A 03009.38942288 .00000562 00000-0 11651-3 0 7534
+2 25791 24.9838 335.2793 0010726 63.5938 296.5669 14.41230504186813
+FUSE 1
+1 25791U 99035A 03008.21225405 .00000536 00000-0 10847-3 0 7526
+2 25791 24.9841 342.4893 0010658 51.4879 308.6589 14.41229428186642
+FUSE 1
+1 25791U 99035A 03007.17357430 .00000496 00000-0 96283-4 0 7517
+2 25791 24.9846 348.8510 0010606 40.2151 319.9146 14.41228391186490
+FUSE 1
+1 25791U 99035A 03005.71941978 .00000492 00000-0 95196-4 0 7508
+2 25791 24.9848 357.7568 0010489 25.1948 334.9069 14.41227497186283
+FUSE 1
+1 25791U 99035A 03004.54224559 .00000519 00000-0 10345-3 0 7497
+2 25791 24.9849 4.9669 0010381 12.5994 347.4773 14.41226999186118
+FUSE 1
+1 25791U 99035A 03003.22657791 .00000659 00000-0 14583-3 0 7481
+2 25791 24.9844 13.0234 0010171 358.9129 1.1355 14.41227192185920
+FUSE 1
+1 25791U 99035A 03001.70317381 +.00000783 +00000-0 +18366-3 0 07470
+2 25791 024.9836 022.3505 0010142 342.3951 017.6202 14.41226616185702
+FUSE 1
+1 25791U 99035A 02365.66448900 .00000905 00000-0 22093-3 0 7466
+2 25791 24.9828 28.7111 0010120 331.1925 28.8023 14.41226254185555
+FUSE 1
+1 25791U 99035A 02364.55655917 .00001003 00000-0 25056-3 0 7452
+2 25791 24.9823 35.4963 0010124 319.5885 40.3870 14.41225360185397
+FUSE 1
+1 25791U 99035A 02363.24089208 .00001123 00000-0 28737-3 0 7442
+2 25791 24.9817 43.5541 0010043 305.4795 54.4774 14.41224128185206
+FUSE 1
+1 25791U 99035A 02361.85597983 .00001182 00000-0 30525-3 0 7433
+2 25791 24.9811 52.0336 0010047 290.8057 69.1372 14.41221885185001
+FUSE 1
+1 25791U 99035A 02360.81729577 .00001190 00000-0 30775-3 0 7429
+2 25791 24.9811 58.3946 0010013 279.4423 80.4952 14.41219863184855
+FUSE 1
+1 25791U 99035A 02359.98634816 +.00001193 +00000-0 +30865-3 0 07531
+2 25791 024.9811 063.4834 0010006 270.4269 089.5092 14.41218193184736
+FUSE 1
+1 25791U 99035A 02359.57087417 .00001197 00000-0 30966-3 0 7418
+2 25791 24.9812 66.0284 0010007 265.9037 94.0326 14.41217390184670
+FUSE 1
+1 25791U 99035A 02356.87029074 .00001204 00000-0 31182-3 0 7390
+2 25791 24.9811 82.5668 0009938 236.3646 123.5914 14.41211956184287
+FUSE 1
+1 25791U 99035A 02355.55462023 .00001090 00000-0 27728-3 0 7382
+2 25791 24.9809 90.6214 0010165 222.2949 137.6776 14.41208399184093
+FUSE 1
+1 25791U 99035A 02354.51593217 .00001046 00000-0 26390-3 0 7371
+2 25791 24.9811 96.9840 0010179 211.0308 148.9598 14.41206118183947
+FUSE 1
+1 25791U 99035A 02353.13101277 .00001006 00000-0 25162-3 0 7360
+2 25791 24.9814 105.4674 0010149 196.0465 163.9721 14.41203384183749
+FUSE 1
+1 25791U 99035A 02351.95382922 +.00000934 +00000-0 +22963-3 0 07372
+2 25791 024.9817 112.6764 0010197 184.0228 176.0200 14.41200867183570
+FUSE 1
+1 25791U 99035A 02351.88458303 .00000934 00000-0 22971-3 0 7358
+2 25791 24.9817 113.1005 0010193 183.2930 176.7513 14.41200763183569
+FUSE 1
+1 25791U 99035A 02350.91513627 +.00000904 +00000-0 +22045-3 0 07519
+2 25791 024.9819 119.0445 0010562 174.0065 186.0569 14.41199099183420
+FUSE 1
+1 25791U 99035A 02350.56890542 .00000886 00000-0 21508-3 0 7347
+2 25791 24.9818 121.1673 0010554 170.6826 189.3879 14.41198405183378
+FUSE 1
+1 25791U 99035A 02349.11473244 .00000853 00000-0 20507-3 0 7333
+2 25791 24.9823 130.0779 0010595 156.0675 204.0329 14.41196121183160
+FUSE 1
+1 25791U 99035A 02347.86829613 .00000843 00000-0 20210-3 0 7327
+2 25791 24.9826 137.7176 0010579 143.6291 216.4936 14.41194381182982
+FUSE 1
+1 25791U 99035A 02346.96809054 +.00000846 +00000-0 +20310-3 0 07328
+2 25791 024.9827 143.2322 0010589 134.4622 225.6760 14.41193196182851
+FUSE 1
+1 25791U 99035A 02346.82959720 .00000840 00000-0 20129-3 0 7310
+2 25791 24.9828 144.0807 0010580 133.0588 227.0808 14.41192967182838
+FUSE 1
+1 25791U 99035A 02345.92939017 +.00000816 +00000-0 +19371-3 0 07418
+2 25791 024.9830 149.5942 0010509 123.9678 236.1843 14.41191589182705
+FUSE 1
+1 25791U 99035A 02345.58315657 .00000792 00000-0 18653-3 0 7301
+2 25791 24.9831 151.7183 0010408 120.6946 239.4591 14.41190929182655
+FUSE 1
+1 25791U 99035A 02344.89068773 +.00000785 +00000-0 +18451-3 0 07429
+2 25791 024.9831 155.9574 0010423 113.3541 246.8055 14.41190019182558
+FUSE 1
+1 25791U 99035A 02344.54445368 .00000789 00000-0 18568-3 0 7298
+2 25791 24.9831 158.0799 0010476 110.1229 250.0410 14.41189637182508
+FUSE 1
+1 25791U 99035A 02343.15951322 .00000783 00000-0 18396-3 0 7288
+2 25791 24.9834 166.5623 0010426 96.2869 263.8829 14.41187968182309
+FUSE 1
+1 25791U 99035A 02342.88252492 +.00000775 +00000-0 +18152-3 0 07460
+2 25791 024.9835 168.2588 0010398 093.2895 266.8803 14.41187559182269
+FUSE 1
+1 25791U 99035A 02341.98231177 .00000761 00000-0 17708-3 0 7277
+2 25791 24.9836 173.7711 0010366 83.7509 276.4178 14.41186369182136
+FUSE 1
+1 25791U 99035A 02340.87435475 .00000768 00000-0 17944-3 0 7269
+2 25791 24.9836 180.5545 0010319 72.0817 288.0815 14.41185129181979
+FUSE 1
+1 25791U 99035A 02339.90489123 +.00000743 +00000-0 +17159-3 0 07373
+2 25791 024.9838 186.4897 0010302 061.8181 298.3364 14.41183804181834
+FUSE 1
+1 25791U 99035A 02339.00467365 .00000760 00000-0 17694-3 0 7258
+2 25791 24.9837 192.0009 0010340 52.4233 307.7215 14.41182886181702
+FUSE 1
+1 25791U 99035A 02337.96595978 +.00000747 +00000-0 +17292-3 0 07274
+2 25791 024.9838 198.3601 0010349 041.4682 318.6611 14.41181581181550
+FUSE 1
+1 25791U 99035A 02337.89671225 .00000735 00000-0 16930-3 0 7248
+2 25791 24.9838 198.7841 0010344 40.6825 319.4454 14.41181406181544
+FUSE 1
+1 25791U 99035A 02336.92724431 +.00000730 +00000-0 +16784-3 0 07263
+2 25791 024.9839 204.7190 0010345 030.4753 329.6355 14.41180304181402
+FUSE 1
+1 25791U 99035A 02336.85799660 .00000726 00000-0 16666-3 0 7232
+2 25791 24.9840 205.1432 0010343 29.6910 330.4183 14.41180198181399
+FUSE 1
+1 25791U 99035A 02335.95777534 +.00000723 +00000-0 +16574-3 0 07378
+2 25791 024.9840 210.6541 0010353 020.2600 339.8318 14.41179182181265
+FUSE 1
+1 25791U 99035A 02335.12680126 .00000724 00000-0 16595-3 0 7225
+2 25791 24.9839 215.7423 0010346 11.4473 348.6270 14.41178242181148
+FUSE 1
+1 25791U 99035A 02333.88033836 .00000777 00000-0 18215-3 0 7214
+2 25791 24.9838 223.3729 0010367 358.4414 1.6064 14.41177194180964
+FUSE 1
+1 25791U 99035A 02332.21838680 .00000738 00000-0 17012-3 0 7200
+2 25791 24.9840 233.5483 0010369 340.4562 19.5551 14.41175004180725
+FUSE 1
+1 25791U 99035A 02330.97192266 +.00000736 +00000-0 +16945-3 0 07228
+2 25791 024.9841 241.1847 0010383 327.1955 032.7907 14.41173576180543
+FUSE 1
+1 25791U 99035A 02330.90267454 .00000744 00000-0 17204-3 0 7197
+2 25791 24.9842 241.6086 0010384 326.4698 33.5151 14.41173549180530
+FUSE 1
+1 25791U 99035A 02329.93320137 +.00000795 +00000-0 +18754-3 0 07238
+2 25791 024.9841 247.5450 0010325 316.0567 043.9119 14.41172687180399
+FUSE 1
+1 25791U 99035A 02329.86395339 .00000793 00000-0 18694-3 0 7181
+2 25791 24.9841 247.9690 0010320 315.3599 44.6079 14.41172585180380
+FUSE 1
+1 25791U 99035A 02328.96372831 +.00000874 +00000-0 +21177-3 0 07262
+2 25791 024.9839 253.4818 0010301 306.0731 053.8822 14.41171745180256
+FUSE 1
+1 25791U 99035A 02328.47899189 .00000852 00000-0 20479-3 0 7178
+2 25791 24.9839 256.4492 0010283 300.9882 58.9620 14.41170988180188
+FUSE 1
+1 25791U 99035A 02327.23252631 .00000997 00000-0 24907-3 0 7165
+2 25791 24.9837 264.0850 0010209 287.9702 71.9692 14.41169674180007
+FUSE 1
+1 25791U 99035A 02325.91681241 .00001075 00000-0 27280-3 0 7155
+2 25791 24.9835 272.1466 0010275 274.0090 85.9246 14.41167756179814
+FUSE 1
+1 25791U 99035A 02324.94733872 +.00001074 +00000-0 +27250-3 0 07151
+2 25791 024.9837 278.0849 0010343 263.9267 096.0064 14.41166020179673
+FUSE 1
+1 25791U 99035A 02324.67034596 .00001073 00000-0 27216-3 0 7148
+2 25791 24.9837 279.7804 0010340 261.0175 98.9158 14.41165514179634
+FUSE 1
+1 25791U 99035A 02323.97786359 +.00001085 +00000-0 +27593-3 0 07186
+2 25791 024.9834 284.0218 0010561 253.2107 106.7242 14.41164354179534
+FUSE 1
+1 25791U 99035A 02323.56237448 .00001085 00000-0 27595-3 0 7138
+2 25791 24.9834 286.5654 0010546 248.8875 111.0502 14.41163593179475
+FUSE 1
+1 25791U 99035A 02322.24665714 .00001162 00000-0 29927-3 0 7129
+2 25791 24.9833 294.6241 0010703 233.4813 126.4702 14.41161870179280
+FUSE 1
+1 25791U 99035A 02321.20793280 .00001220 00000-0 31720-3 0 7112
+2 25791 24.9829 300.9847 0010808 222.5858 137.3810 14.41160264179133
+FUSE 1
+1 25791U 99035A 02319.40747635 .00001263 00000-0 33024-3 0 7109
+2 25791 24.9825 312.0065 0010876 203.7169 156.2843 14.41156787178877
+FUSE 1
+1 25791U 99035A 02318.64574421 +.00001273 +00000-0 +33320-3 0 07183
+2 25791 024.9823 316.6719 0010904 195.8401 164.1766 14.41155172178760
+FUSE 1
+1 25791U 99035A 02317.81476349 +.00001220 +00000-0 +31728-3 0 07352
+2 25791 024.9826 321.7601 0010933 187.6105 172.4237 14.41152903178643
+FUSE 1
+1 25791U 99035A 02316.84528386 .00001225 00000-0 31884-3 0 7081
+2 25791 24.9827 327.6980 0010976 177.5120 182.5438 14.41150915178502
+FUSE 1
+1 25791U 99035A 02315.59880787 .00001242 00000-0 32394-3 0 7073
+2 25791 24.9825 335.3293 0011048 164.4233 195.6623 14.41148412178324
+FUSE 1
+1 25791U 99035A 02314.69857361 +.00001241 +00000-0 +32373-3 0 07071
+2 25791 024.9823 340.8415 0011033 155.1164 204.9876 14.41146449178190
+FUSE 1
+1 25791U 99035A 02314.56007609 .00001242 00000-0 32393-3 0 7061
+2 25791 24.9823 341.6892 0011038 153.6592 206.4489 14.41146160178176
+FUSE 1
+1 25791U 99035A 02313.24434699 .00001193 00000-0 30916-3 0 7051
+2 25791 24.9828 349.7471 0011087 140.1634 219.9694 14.41143010177981
+FUSE 1
+1 25791U 99035A 02312.20561116 .00001132 00000-0 29035-3 0 7043
+2 25791 24.9834 356.1079 0011110 129.7443 230.4048 14.41140389177833
+FUSE 1
+1 25791U 99035A 02311.92861422 +.00001126 +00000-0 +28868-3 0 07309
+2 25791 024.9835 357.8035 0011119 126.7910 233.3617 14.41139808177792
+FUSE 1
+1 25791U 99035A 02310.95912468 +.00001083 +00000-0 +27550-3 0 07048
+2 25791 024.9837 003.7403 0011086 116.7489 243.4157 14.41137566177658
+FUSE 1
+1 25791U 99035A 02310.82062580 .00001082 00000-0 27519-3 0 7038
+2 25791 24.9837 4.5881 0011089 115.2851 244.8806 14.41137305177632
+FUSE 1
+1 25791U 99035A 02309.78188408 +.00001035 +00000-0 +26086-3 0 07068
+2 25791 024.9840 010.9478 0011067 104.2526 255.9212 14.41135021177482
+FUSE 1
+1 25791U 99035A 02309.57413526 .00001031 00000-0 25964-3 0 7023
+2 25791 24.9841 12.2196 0011058 102.0689 258.1059 14.41134631177458
+FUSE 1
+1 25791U 99035A 02308.67388968 +.00001007 +00000-0 +25233-3 0 07048
+2 25791 024.9841 017.7307 0011071 092.5180 267.6595 14.41132871177326
+FUSE 1
+1 25791U 99035A 02308.53539014 .00001005 00000-0 25166-3 0 7013
+2 25791 24.9842 18.5786 0011066 91.0739 269.1037 14.41132629177302
+FUSE 1
+1 25791U 99035A 02307.08114362 .00000944 00000-0 23310-3 0 7006
+2 25791 24.9847 27.4838 0011100 76.0546 284.1186 14.41129780177094
+FUSE 1
+1 25791U 99035A 02306.04239290 .00000935 00000-0 23046-3 0 6992
+2 25791 24.9847 33.8456 0011062 65.0552 295.1089 14.41128082176944
+FUSE 1
+1 25791U 99035A 02304.86513927 .00000956 00000-0 23688-3 0 6986
+2 25791 24.9847 41.0556 0010946 52.9833 307.1674 14.41126496176775
+FUSE 1
+1 25791U 99035A 02303.89563460 +.00000960 +00000-0 +23806-3 0 06982
+2 25791 024.9849 046.9935 0010898 043.0452 317.0893 14.41125049176637
+FUSE 1
+1 25791U 99035A 02303.82638415 .00000966 00000-0 23984-3 0 6970
+2 25791 24.9849 47.4173 0010865 42.3451 317.7891 14.41125000176623
+FUSE 1
+1 25791U 99035A 02302.71837611 +.00001023 +00000-0 +25722-3 0 07019
+2 25791 024.9847 054.2005 0010813 031.1742 328.9406 14.41123746176466
+FUSE 1
+1 25791U 99035A 02302.57987459 .00001040 00000-0 26254-3 0 6962
+2 25791 24.9846 55.0483 0010830 29.7688 330.3422 14.41123680176445
+FUSE 1
+1 25791U 99035A 02300.98711079 .00001096 00000-0 27956-3 0 6958
+2 25791 24.9841 64.7981 0010843 13.0413 347.0373 14.41121314176213
+FUSE 1
+1 25791U 99035A 02299.87909991 .00001128 00000-0 28943-3 0 6947
+2 25791 24.9841 71.5856 0010786 1.4027 358.6513 14.41119575176050
+FUSE 1
+1 25791U 99035A 02298.84033835 .00001169 00000-0 30201-3 0 6932
+2 25791 24.9842 77.9480 0010811 350.6657 9.3651 14.41117963175906
+FUSE 1
+1 25791U 99035A 02297.94007642 +.00001182 +00000-0 +30577-3 0 06941
+2 25791 024.9844 083.4626 0010597 339.8645 020.1444 14.41116418175779
+FUSE 1
+1 25791U 99035A 02297.80157473 .00001180 00000-0 30538-3 0 6927
+2 25791 24.9845 84.3107 0010600 338.3923 21.6137 14.41116135175751
+FUSE 1
+1 25791U 99035A 02296.90131265 +.00001199 +00000-0 +31112-3 0 07052
+2 25791 024.9844 089.8231 0010565 328.5579 031.4298 14.41114507175620
+FUSE 1
+1 25791U 99035A 02296.55505701 .00001238 00000-0 32303-3 0 6914
+2 25791 24.9844 91.9448 0010517 324.3002 35.6802 14.41114238175578
+FUSE 1
+1 25791U 99035A 02295.93179849 +.00001243 +00000-0 +32465-3 0 07023
+2 25791 024.9845 095.7602 0010517 317.7975 042.1726 14.41112961175487
+FUSE 1
+1 25791U 99035A 02295.51629228 .00001254 00000-0 32781-3 0 6907
+2 25791 24.9843 98.3052 0010532 313.0139 46.9486 14.41112188175421
+FUSE 1
+1 25791U 99035A 02294.96228418 +.00001256 +00000-0 +32856-3 0 07075
+2 25791 024.9843 101.6963 0010529 307.2176 052.7370 14.41111015175348
+FUSE 1
+1 25791U 99035A 02294.13127216 .00001240 00000-0 32359-3 0 6898
+2 25791 24.9841 106.7843 0010541 298.5475 61.3971 14.41109044175226
+FUSE 1
+1 25791U 99035A 02293.92351906 +.00001239 +00000-0 +32344-3 0 07139
+2 25791 024.9843 108.0569 0010535 296.3424 063.6002 14.41108613175198
+FUSE 1
+1 25791U 99035A 02292.95400352 +.00001237 +00000-0 +32256-3 0 06905
+2 25791 024.9842 113.9928 0010572 285.9862 073.9481 14.41106520175057
+FUSE 1
+1 25791U 99035A 02292.88475244 .00001234 00000-0 32188-3 0 6887
+2 25791 24.9842 114.4167 0010574 285.2452 74.6888 14.41106349175045
+FUSE 1
+1 25791U 99035A 02291.56898052 .00001216 00000-0 31640-3 0 6878
+2 25791 24.9839 122.4724 0010637 271.2762 88.6530 14.41103373174859
+FUSE 1
+1 25791U 99035A 02290.94572017 +.00001195 +00000-0 +30991-3 0 07009
+2 25791 024.9844 126.2889 0010671 264.7560 095.1729 14.41101851174762
+FUSE 1
+1 25791U 99035A 02290.18395700 .00001174 00000-0 30345-3 0 6860
+2 25791 24.9843 130.9526 0010673 256.7111 103.2208 14.41100044174650
+FUSE 1
+1 25791U 99035A 02288.86818259 .00001140 00000-0 29323-3 0 6857
+2 25791 24.9845 139.0064 0010704 243.0013 116.9405 14.41097023174465
+FUSE 1
+1 25791U 99035A 02287.89866426 +.00001136 +00000-0 +29186-3 0 06894
+2 25791 024.9843 144.9409 0010684 232.7314 127.2281 14.41095095174326
+FUSE 1
+1 25791U 99035A 02287.20614986 .00001151 00000-0 29649-3 0 6847
+2 25791 24.9827 149.1875 0010669 225.6654 134.2979 14.41093836174225
+FUSE 1
+1 25791U 99035A 02285.89037225 .00001130 00000-0 29004-3 0 6836
+2 25791 24.9828 157.2454 0010692 211.9002 148.0860 14.41091133174039
+FUSE 1
+1 25791U 99035A 02284.85159928 .00001103 00000-0 28186-3 0 6825
+2 25791 24.9828 163.6064 0010728 200.9652 159.0419 14.41088960173884
+FUSE 1
+1 25791U 99035A 02283.32806291 .00001033 00000-0 26046-3 0 6812
+2 25791 24.9830 172.9322 0010689 184.6616 175.3793 14.41085821173666
+FUSE 1
+1 25791U 99035A 02282.98180447 +.00000996 +00000-0 +24906-3 0 06844
+2 25791 024.9832 175.0528 0010704 180.9650 179.0837 14.41085010173610
+FUSE 1
+1 25791U 99035A 02282.22003459 .00001026 00000-0 25852-3 0 6800
+2 25791 24.9831 179.7159 0010708 172.9134 187.1536 14.41083903173505
+FUSE 1
+1 25791U 99035A 02280.97350077 +.00000830 +00000-0 +19849-3 0 06802
+2 25791 024.9833 187.3563 0011025 161.6340 198.4554 14.41080808173324
+FUSE 1
+1 25791U 99035A 02280.90424885 .00000955 00000-0 23675-3 0 6792
+2 25791 24.9831 187.7802 0010991 160.8057 199.2869 14.41081211173315
+FUSE 1
+1 25791U 99035A 02279.93472079 +.00001010 +00000-0 +25355-3 0 06825
+2 25791 024.9829 193.7205 0011006 150.8784 209.2336 14.41079909173176
+FUSE 1
+1 25791U 99035A 02279.38070408 .00001043 00000-0 26359-3 0 6780
+2 25791 24.9829 197.1114 0011002 144.9425 215.1807 14.41079042173093
+FUSE 1
+1 25791U 99035A 02278.20341727 .00000963 00000-0 23930-3 0 6776
+2 25791 24.9832 204.3229 0011020 133.2028 226.9401 14.41076821172928
+FUSE 1
+1 25791U 99035A 02276.88762358 .00000955 00000-0 23667-3 0 6762
+2 25791 24.9828 212.3833 0011005 119.6564 240.5042 14.41074562172731
+FUSE 1
+1 25791U 99035A 02275.50257357 .00000810 00000-0 19257-3 0 6757
+2 25791 24.9832 220.8633 0010929 105.5890 254.5823 14.41071888172536
+FUSE 1
+1 25791U 99035A 02274.94855287 +.00000769 +00000-0 +18010-3 0 06782
+2 25791 024.9832 224.2597 0010747 099.8528 260.3191 14.41070889172458
+FUSE 1
+1 25791U 99035A 02274.39453091 .00000766 00000-0 17925-3 0 6745
+2 25791 24.9832 227.6504 0010741 94.0800 266.0941 14.41070217172379
+FUSE 1
+1 25791U 99035A 02273.97901442 +.00000752 +00000-0 +17475-3 0 06831
+2 25791 024.9833 230.1965 0010675 089.7969 270.3764 14.41069590172310
+FUSE 1
+1 25791U 99035A 02273.21723299 .00000755 00000-0 17576-3 0 6734
+2 25791 24.9834 234.8609 0010679 81.6884 278.4835 14.41068740172200
+FUSE 1
+1 25791U 99035A 02272.94022098 +.00000777 +00000-0 +18254-3 0 07023
+2 25791 024.9832 236.5583 0010621 078.7403 281.4295 14.41068586172166
+FUSE 1
+1 25791U 99035A 02271.97067853 +.00000808 +00000-0 +19195-3 0 06741
+2 25791 024.9832 242.4959 0010491 068.8195 291.3434 14.41067715172025
+FUSE 1
+1 25791U 99035A 02271.55516014 .00000808 00000-0 19212-3 0 6721
+2 25791 24.9832 245.0390 0010492 64.4543 295.7048 14.41067193171964
+FUSE 1
+1 25791U 99035A 02270.51636263 .00000857 00000-0 20706-3 0 6718
+2 25791 24.9832 251.3989 0010443 53.4959 306.6509 14.41066244171817
+FUSE 1
+1 25791U 99035A 02269.33905765 .00000893 00000-0 21807-3 0 6704
+2 25791 24.9833 258.6080 0010394 40.7861 319.3423 14.41064845171648
+FUSE 1
+1 25791U 99035A 02268.23100366 .00000992 00000-0 24815-3 0 6696
+2 25791 24.9827 265.3949 0010332 28.8061 331.3014 14.41063880171481
+FUSE 1
+1 25791U 99035A 02267.19220147 .00001098 00000-0 28063-3 0 6686
+2 25791 24.9823 271.7543 0010324 17.9281 342.1586 14.41062934171339
+FUSE 1
+1 25791U 99035A 02265.66862362 .00001232 00000-0 32165-3 0 6674
+2 25791 24.9816 281.0815 0010329 1.9220 358.1327 14.41060966171117
+FUSE 1
+1 25791U 99035A 02264.56056684 .00001222 00000-0 31866-3 0 6669
+2 25791 24.9817 287.8674 0010319 349.8851 10.1457 14.41058532170954
+FUSE 1
+1 25791U 99035A 02263.52176164 .00001227 00000-0 32006-3 0 6651
+2 25791 24.9817 294.2294 0010341 338.4888 21.5185 14.41056345170801
+FUSE 1
+1 25791U 99035A 02262.62146251 +.00001266 +00000-0 +33195-3 0 06726
+2 25791 024.9813 299.7417 0010331 328.9476 031.0420 14.41054666170677
+FUSE 1
+1 25791U 99035A 02262.41370124 .00001257 00000-0 32914-3 0 6640
+2 25791 24.9813 301.0139 0010341 326.6238 33.3618 14.41054137170641
+FUSE 1
+1 25791U 99035A 02261.23638509 .00001327 00000-0 35045-3 0 6638
+2 25791 24.9808 308.2225 0010336 313.5426 46.4225 14.41052008170473
+FUSE 1
+1 25791U 99035A 02260.19757547 .00001443 00000-0 38612-3 0 6627
+2 25791 24.9803 314.5833 0010346 302.4458 57.5047 14.41050420170321
+FUSE 1
+1 25791U 99035A 02259.71279796 +.00001450 +00000-0 +38808-3 0 06904
+2 25791 024.9803 317.5503 0010348 297.3449 062.6007 14.41049231170255
+FUSE 1
+1 25791U 99035A 02258.81249669 .00001457 00000-0 39044-3 0 6618
+2 25791 24.9801 323.0624 0010344 288.1227 71.8153 14.41046928170127
+FUSE 1
+1 25791U 99035A 02257.56592355 .00001607 00000-0 43604-3 0 6605
+2 25791 24.9798 330.6972 0010331 274.6720 85.2607 14.41044565169942
+FUSE 1
+1 25791U 99035A 02256.52711275 .00001599 00000-0 43384-3 0 6597
+2 25791 24.9793 337.0578 0010393 263.4699 96.4645 14.41041446169793
+FUSE 1
+1 25791U 99035A 02255.41904580 .00001584 00000-0 42933-3 0 6589
+2 25791 24.9787 343.8424 0010407 251.9278 108.0095 14.41038086169630
+FUSE 1
+1 25791U 99035A 02254.72650348 +.00001491 +00000-0 +40078-3 0 06835
+2 25791 024.9788 348.0813 0010411 244.6244 115.3195 14.41035736169537
+FUSE 1
+1 25791U 99035A 02253.89545131 .00001396 00000-0 37159-3 0 6576
+2 25791 24.9785 353.1698 0010435 235.7390 124.2119 14.41033155169416
+FUSE 1
+1 25791U 99035A 02252.92589091 +.00001057 +00000-0 +26812-3 0 06570
+2 25791 024.9789 359.1085 0010610 225.0767 134.8879 14.41029740169270
+FUSE 1
+1 25791U 99035A 02252.85663624 .00001059 00000-0 26870-3 0 6562
+2 25791 24.9790 359.5326 0010621 224.3210 135.6441 14.41029635169267
+FUSE 1
+1 25791U 99035A 02251.95632761 +.00001005 +00000-0 +25223-3 0 06562
+2 25791 024.9790 005.0443 0010707 214.4524 145.5288 14.41027801169131
+FUSE 1
+1 25791U 99035A 02251.81781883 .00001011 00000-0 25399-3 0 6557
+2 25791 24.9790 5.8921 0010710 212.9295 147.0567 14.41027608169112
+FUSE 1
+1 25791U 99035A 02250.70974565 +.00000905 +00000-0 +22152-3 0 06628
+2 25791 024.9792 012.6758 0010740 201.5396 158.4662 14.41025222168950
+FUSE 1
+1 25791U 99035A 02250.57123644 .00000892 00000-0 21766-3 0 6543
+2 25791 24.9793 13.5236 0010741 200.1557 159.8528 14.41024911168935
+FUSE 1
+1 25791U 99035A 02248.90912382 .00000783 00000-0 18435-3 0 6539
+2 25791 24.9796 23.6965 0010767 182.5930 177.4521 14.41021797168696
+FUSE 1
+1 25791U 99035A 02247.93955749 +.00000652 +00000-0 +14418-3 0 06762
+2 25791 024.9802 029.6342 0010910 173.0331 187.0327 14.41019680168553
+FUSE 1
+1 25791U 99035A 02247.24700867 .00000614 00000-0 13267-3 0 6528
+2 25791 24.9803 33.8749 0010996 165.8745 194.2065 14.41018736168453
+FUSE 1
+1 25791U 99035A 02246.13892944 .00000537 00000-0 10933-3 0 6513
+2 25791 24.9806 40.6587 0011018 154.5982 205.5064 14.41017206168294
+FUSE 1
+1 25791U 99035A 02244.89233811 .00000526 00000-0 10578-3 0 6508
+2 25791 24.9810 48.2931 0011178 142.1273 218.0023 14.41016304168112
+FUSE 1
+1 25791U 99035A 02243.57648803 .00000736 00000-0 16997-3 0 6495
+2 25791 24.9800 56.3527 0011307 128.8388 231.3126 14.41016815167921
+FUSE 1
+1 25791U 99035A 02242.12212513 .00001042 00000-0 26353-3 0 6487
+2 25791 24.9790 65.2545 0011385 113.4504 246.7186 14.41017164167715
+FUSE 1
+1 25791U 99035A 02241.15254607 .00001586 00000-0 42999-3 0 6475
+2 25791 24.9772 71.1895 0011244 103.6925 256.4821 14.41018933167574
+FUSE 1
+1 25791U 99035A 02240.87553062 .00000969 00000-0 24140-3 0 6461
+2 25791 24.9785 72.8895 0010796 101.1155 259.0566 14.41013762167531
+FUSE 1
+1 25791U 99035A 02239.90595273 +.00001112 +00000-0 +28499-3 0 06645
+2 25791 024.9781 078.8252 0010791 090.9038 269.2706 14.41013017167396
+FUSE 1
+1 25791U 99035A 02239.21339631 .00001213 00000-0 31602-3 0 6454
+2 25791 24.9777 83.0642 0010776 83.4859 276.6874 14.41012252167290
+FUSE 1
+1 25791U 99035A 02237.96679327 +.00001439 +00000-0 +38514-3 0 06496
+2 25791 024.9774 090.6979 0010768 071.0115 289.1558 14.41010739167110
+FUSE 1
+1 25791U 99035A 02237.89753765 .00001477 00000-0 39690-3 0 6440
+2 25791 24.9773 91.1232 0010788 70.3652 289.8019 14.41010744167101
+FUSE 1
+1 25791U 99035A 02236.44316461 .00001500 00000-0 40378-3 0 6439
+2 25791 24.9767 100.0287 0010670 55.6564 304.4950 14.41006864166893
+FUSE 1
+1 25791U 99035A 02235.19655478 .00001345 00000-0 35650-3 0 6427
+2 25791 24.9770 107.6610 0010486 43.1111 317.0209 14.41003175166715
+FUSE 1
+1 25791U 99035A 02233.94994384 +.00001071 +00000-0 +27257-3 0 06453
+2 25791 024.9778 115.2923 0010434 030.0321 330.0788 14.40999043166530
+FUSE 1
+1 25791U 99035A 02233.88068763 .00001046 00000-0 26501-3 0 6418
+2 25791 24.9780 115.7163 0010425 29.2338 330.8754 14.40998751166527
+FUSE 1
+1 25791U 99035A 02232.49555828 .00000919 00000-0 22621-3 0 6403
+2 25791 24.9786 124.1958 0010414 14.6083 345.4723 14.40995445166325
+FUSE 1
+1 25791U 99035A 02231.94150552 +.00000876 +00000-0 +21309-3 0 06546
+2 25791 024.9788 127.5880 0010407 008.4765 351.5919 14.40994234166249
+FUSE 1
+1 25791U 99035A 02231.38745204 .00000845 00000-0 20367-3 0 6390
+2 25791 24.9789 130.9790 0010378 2.6277 357.4296 14.40993213166169
+FUSE 1
+1 25791U 99035A 02230.97191224 +.00000798 +00000-0 +18928-3 0 06602
+2 25791 024.9793 133.5251 0010384 358.0335 002.0134 14.40992235166106
+FUSE 1
+1 25791U 99035A 02230.21008800 .00000719 00000-0 16493-3 0 6389
+2 25791 24.9799 138.1891 0010364 349.8416 10.1882 14.40990663165998
+FUSE 1
+1 25791U 99035A 02228.89420846 .00000570 00000-0 11957-3 0 6372
+2 25791 24.9808 146.2460 0010327 335.3789 24.6230 14.40988149165806
+FUSE 1
+1 25791U 99035A 02227.85535415 .00000520 00000-0 10422-3 0 6366
+2 25791 24.9812 152.6068 0010343 324.1332 35.8482 14.40986913165657
+FUSE 1
+1 25791U 99035A 02226.95501315 +.00000506 +00000-0 +99908-4 0 06426
+2 25791 024.9813 158.1197 0010337 314.4756 045.4908 14.40986180165529
+FUSE 1
+1 25791U 99035A 02226.47021386 .00000502 00000-0 98661-4 0 6351
+2 25791 24.9813 161.0865 0010330 309.4557 50.5037 14.40985822165454
+FUSE 1
+1 25791U 99035A 02225.98541513 +.00000476 +00000-0 +90569-4 0 06422
+2 25791 024.9815 164.0553 0010405 304.3474 055.6046 14.40985257165388
+FUSE 1
+1 25791U 99035A 02225.22358750 .00000482 00000-0 92578-4 0 6348
+2 25791 24.9816 168.7186 0010417 296.1218 63.8218 14.40984875165274
+FUSE 1
+1 25791U 99035A 02223.97696163 +.00000481 +00000-0 +92220-4 0 06412
+2 25791 024.9814 176.3517 0010455 283.1411 076.7930 14.40984067165095
+FUSE 1
+1 25791U 99035A 02223.49216218 .00000489 00000-0 94620-4 0 6333
+2 25791 24.9814 179.3194 0010476 277.8554 82.0754 14.40983850165026
+FUSE 1
+1 25791U 99035A 02222.93810641 +.00000509 +00000-0 +10073-3 0 06456
+2 25791 024.9812 182.7128 0010537 272.0359 087.8941 14.40983654164940
+FUSE 1
+1 25791U 99035A 02222.24553673 .00000508 00000-0 10033-3 0 6320
+2 25791 24.9814 186.9527 0010565 264.8001 95.1296 14.40983198164842
+FUSE 1
+1 25791U 99035A 02220.72188492 .00000514 00000-0 10213-3 0 6310
+2 25791 24.9811 196.2838 0010649 248.9270 111.0101 14.40982128164623
+FUSE 1
+1 25791U 99035A 02219.96005888 +.00000589 +00000-0 +12528-3 0 06358
+2 25791 024.9808 200.9504 0010520 240.1664 119.7798 14.40982235164515
+FUSE 1
+1 25791U 99035A 02219.54451761 .00000591 00000-0 12583-3 0 6306
+2 25791 24.9809 203.4950 0010565 235.7070 124.2439 14.40981930164456
+FUSE 1
+1 25791U 99035A 02218.50566444 .00000591 00000-0 12589-3 0 6290
+2 25791 24.9810 209.8564 0010671 225.0521 134.9121 14.40981088164304
+FUSE 1
+1 25791U 99035A 02217.67458222 +.00000586 +00000-0 +12427-3 0 06319
+2 25791 024.9810 214.9451 0010742 216.2683 143.7098 14.40980335164187
+FUSE 1
+1 25791U 99035A 02217.46681143 .00000587 00000-0 12450-3 0 6289
+2 25791 24.9811 216.2175 0010798 214.1027 145.8787 14.40980196164156
+FUSE 1
+1 25791U 99035A 02216.77424262 +.00000608 +00000-0 +13094-3 0 06446
+2 25791 024.9810 220.4589 0010860 206.6184 153.3766 14.40979799164058
+FUSE 1
+1 25791U 99035A 02216.22018763 .00000623 00000-0 13547-3 0 6272
+2 25791 24.9812 223.8548 0011013 200.8472 159.1590 14.40979503163971
+FUSE 1
+1 25791U 99035A 02215.18133380 .00000638 00000-0 14024-3 0 6265
+2 25791 24.9811 230.2141 0011063 190.3957 169.6323 14.40978710163820
+FUSE 1
+1 25791U 99035A 02213.72693828 .00000645 00000-0 14244-3 0 6252
+2 25791 24.9811 239.1154 0011038 174.9987 185.0630 14.40977412163613
+FUSE 1
+1 25791U 99035A 02212.54957017 .00000624 00000-0 13599-3 0 6242
+2 25791 24.9812 246.3230 0011021 162.5693 197.5196 14.40976134163444
+FUSE 1
+1 25791U 99035A 02211.71848578 +.00000610 +00000-0 +13168-3 0 06428
+2 25791 024.9811 251.4099 0011007 153.9347 206.1718 14.40975246163324
+FUSE 1
+1 25791U 99035A 02211.23368603 .00000608 00000-0 13095-3 0 6236
+2 25791 24.9811 254.3777 0010998 148.9909 211.1249 14.40974805163252
+FUSE 1
+1 25791U 99035A 02210.74888612 +.00000597 +00000-0 +12772-3 0 06506
+2 25791 024.9812 257.3445 0011002 143.8708 216.2543 14.40974298163187
+FUSE 1
+1 25791U 99035A 02209.98705743 +.00000587 +00000-0 +12459-3 0 06234
+2 25791 024.9812 262.0081 0011027 135.8366 224.3023 14.40973550163075
+FUSE 1
+1 25791U 99035A 02209.84854304 .00000587 00000-0 12459-3 0 6226
+2 25791 24.9812 262.8557 0011027 134.3832 225.7585 14.40973436163052
+FUSE 1
+1 25791U 99035A 02208.87894183 +.00000550 +00000-0 +11335-3 0 06274
+2 25791 024.9814 268.7902 0011057 124.1443 236.0120 14.40972331162918
+FUSE 1
+1 25791U 99035A 02208.53265521 .00000545 00000-0 11191-3 0 6213
+2 25791 24.9816 270.9107 0011057 120.4890 239.6710 14.40972045162867
+FUSE 1
+1 25791U 99035A 02207.21676421 .00000548 00000-0 11278-3 0 6200
+2 25791 24.9817 278.9666 0011052 107.3653 252.8065 14.40971121162675
+FUSE 1
+1 25791U 99035A 02206.87047673 +.00000547 +00000-0 +11238-3 0 06588
+2 25791 024.9817 281.0857 0011055 103.7292 256.4448 14.40970853162625
+FUSE 1
+1 25791U 99035A 02205.97012911 +.00000514 +00000-0 +10239-3 0 06208
+2 25791 024.9822 286.5981 0010989 094.6865 265.4898 14.40969946162493
+FUSE 1
+1 25791U 99035A 02205.83161386 .00000516 00000-0 10301-3 0 6194
+2 25791 24.9822 287.4462 0010983 93.2503 266.9261 14.40969873162472
+FUSE 1
+1 25791U 99035A 02204.86200730 +.00000468 +00000-0 +88363-4 0 06306
+2 25791 024.9826 293.3810 0010949 083.1743 277.0007 14.40968846162330
+FUSE 1
+1 25791U 99035A 02204.58497626 .00000484 00000-0 93112-4 0 6189
+2 25791 24.9826 295.0773 0010951 80.5497 279.6249 14.40968840162292
+FUSE 1
+1 25791U 99035A 02203.89239905 +.00000449 +00000-0 +82482-4 0 06488
+2 25791 024.9828 299.3172 0010890 073.2055 286.9638 14.40968123162191
+FUSE 1
+1 25791U 99035A 02203.13056333 .00000422 00000-0 74306-4 0 6170
+2 25791 24.9830 303.9805 0010839 65.4604 294.7027 14.40967491162089
+FUSE 1
+1 25791U 99035A 02201.88392126 .00000430 00000-0 76591-4 0 6169
+2 25791 24.9831 311.6129 0010788 52.8603 307.2893 14.40966950161907
+FUSE 1
+1 25791U 99035A 02200.84505139 .00000426 00000-0 75310-4 0 6156
+2 25791 24.9831 317.9723 0010726 42.0624 318.0702 14.40966400161754
+FUSE 1
+1 25791U 99035A 02199.94469674 +.00000428 +00000-0 +76045-4 0 06177
+2 25791 024.9831 323.4842 0010660 032.3527 327.7634 14.40965983161621
+FUSE 1
+1 25791U 99035A 02199.80618047 .00000429 00000-0 76448-4 0 6147
+2 25791 24.9831 324.3321 0010640 30.8653 329.2479 14.40965931161609
+FUSE 1
+1 25791U 99035A 02198.90582495 +.00000439 +00000-0 +79526-4 0 06303
+2 25791 024.9831 329.8436 0010600 021.3948 338.6994 14.40965565161478
+FUSE 1
+1 25791U 99035A 02198.55953443 .00000442 00000-0 80466-4 0 6139
+2 25791 24.9831 331.9633 0010574 17.8270 342.2607 14.40965414161429
+FUSE 1
+1 25791U 99035A 02197.93621100 +.00000444 +00000-0 +80937-4 0 06362
+2 25791 024.9831 335.7781 0010561 011.3039 348.7699 14.40965095161330
+FUSE 1
+1 25791U 99035A 02197.24362949 .00000444 00000-0 80988-4 0 6129
+2 25791 24.9831 340.0166 0010550 3.9600 356.0998 14.40964729161231
+FUSE 1
+1 25791U 99035A 02196.20475640 .00000449 00000-0 82478-4 0 6117
+2 25791 24.9832 346.3749 0010499 353.1602 6.8760 14.40964234161083
+FUSE 1
+1 25791U 99035A 02195.92772353 +.00000455 +00000-0 +84353-4 0 06533
+2 25791 024.9833 348.0711 0010484 350.1147 009.9154 14.40964150161041
+FUSE 1
+1 25791U 99035A 02194.95810905 +.00000446 +00000-0 +81482-4 0 06126
+2 25791 024.9834 354.0072 0010473 339.7777 020.2317 14.40963538160909
+FUSE 1
+1 25791U 99035A 02194.88885078 .00000448 00000-0 82042-4 0 6104
+2 25791 24.9834 354.4313 0010464 339.0255 20.9823 14.40963525160898
+FUSE 1
+1 25791U 99035A 02193.84997767 .00000458 00000-0 85132-4 0 6090
+2 25791 24.9833 0.7908 0010468 328.1332 31.8541 14.40963009160746
+FUSE 1
+1 25791U 99035A 02192.94962101 +.00000463 +00000-0 +86594-4 0 06116
+2 25791 024.9833 006.3022 0010480 318.4949 041.4767 14.40962539160615
+FUSE 1
+1 25791U 99035A 02192.81110453 .00000461 00000-0 86250-4 0 6080
+2 25791 24.9833 7.1500 0010464 316.9667 43.0024 14.40962462160593
+FUSE 1
+1 25791U 99035A 02191.91074766 +.00000486 +00000-0 +93771-4 0 06270
+2 25791 024.9834 012.6624 0010451 307.1503 052.8049 14.40962172160468
+FUSE 1
+1 25791U 99035A 02191.56445709 .00000480 00000-0 91884-4 0 6075
+2 25791 24.9832 14.7827 0010464 303.4798 56.4711 14.40961871160419
+FUSE 1
+1 25791U 99035A 02190.94113347 +.00000477 +00000-0 +90930-4 0 06343
+2 25791 024.9834 018.5979 0010445 296.7402 063.2037 14.40961502160324
+FUSE 1
+1 25791U 99035A 02190.17929374 .00000481 00000-0 92165-4 0 6069
+2 25791 24.9832 23.2616 0010481 288.6533 71.2835 14.40961043160211
+FUSE 1
+1 25791U 99035A 02189.14042204 .00000483 00000-0 92846-4 0 6059
+2 25791 24.9831 29.6230 0010511 277.8585 82.0723 14.40960393160069
+FUSE 1
+1 25791U 99035A 02187.89377604 .00000505 00000-0 99522-4 0 6046
+2 25791 24.9830 37.2551 0010534 264.3308 95.5998 14.40959812159883
+FUSE 1
+1 25791U 99035A 02186.43935654 .00000501 00000-0 98297-4 0 6033
+2 25791 24.9829 46.1591 0010579 249.0358 110.8998 14.40958795159675
+FUSE 1
+1 25791U 99035A 02185.19271205 .00000504 00000-0 99265-4 0 6028
+2 25791 24.9830 53.7902 0010629 236.0216 123.9281 14.40958001159492
+FUSE 1
+1 25791U 99035A 02184.15384184 .00000513 00000-0 10203-3 0 6017
+2 25791 24.9831 60.1514 0010674 224.8693 135.0951 14.40957412159345
+FUSE 1
+1 25791U 99035A 02182.97645554 +.00000516 +00000-0 +10283-3 0 06062
+2 25791 024.9830 067.3585 0010725 212.3891 147.5958 14.40956658159177
+FUSE 1
+1 25791U 99035A 02182.90719767 .00000519 00000-0 10371-3 0 6008
+2 25791 24.9829 67.7832 0010724 211.7115 148.2747 14.40956613159169
+FUSE 1
+1 25791U 99035A 02181.93758516 +.00000548 +00000-0 +11261-3 0 06062
+2 25791 024.9828 073.7191 0010818 201.1978 158.8084 14.40956221159028
+FUSE 1
+1 25791U 99035A 02181.86832717 .00000553 00000-0 11428-3 0 5992
+2 25791 24.9828 74.1435 0010825 200.5146 159.4931 14.40956212159019
+FUSE 1
+1 25791U 99035A 02180.96797324 +.00000532 +00000-0 +10787-3 0 06159
+2 25791 024.9829 079.6553 0010847 191.2420 168.7845 14.40955372158883
+FUSE 1
+1 25791U 99035A 02180.55242493 .00000529 00000-0 10681-3 0 5985
+2 25791 24.9829 82.1984 0010852 186.9486 173.0868 14.40955042158821
+FUSE 1
+1 25791U 99035A 02179.92910226 +.00000542 +00000-0 +11095-3 0 06155
+2 25791 024.9830 086.0152 0010926 180.7342 179.3149 14.40954738158730
+FUSE 1
+1 25791U 99035A 02179.23652162 .00000551 00000-0 11359-3 0 5973
+2 25791 24.9830 90.2545 0010946 173.5199 186.5457 14.40954304158635
+FUSE 1
+1 25791U 99035A 02177.98987603 +.00000542 +00000-0 +11095-3 0 06006
+2 25791 024.9832 097.8882 0011031 160.8337 199.2588 14.40953321158457
+FUSE 1
+1 25791U 99035A 02177.85135981 .00000538 00000-0 10963-3 0 5968
+2 25791 24.9832 98.7360 0011031 159.3474 200.7478 14.40953176158435
+FUSE 1
+1 25791U 99035A 02176.95100402 +.00000504 +00000-0 +99300-4 0 06022
+2 25791 024.9833 104.2472 0011004 150.1851 209.9284 14.40952226158308
+FUSE 1
+1 25791U 99035A 02176.46619641 .00000500 00000-0 98147-4 0 5953
+2 25791 24.9832 107.2138 0011008 145.0625 215.0606 14.40951875158232
+FUSE 1
+1 25791U 99035A 02175.21954740 .00000495 00000-0 96657-4 0 5943
+2 25791 24.9834 114.8444 0011052 132.0019 228.1431 14.40951047158052
+FUSE 1
+1 25791U 99035A 02173.90363925 .00000444 00000-0 81013-4 0 5939
+2 25791 24.9837 122.9038 0011028 119.1777 240.9836 14.40949793157868
+FUSE 1
+1 25791U 99035A 02172.51846935 .00000425 00000-0 75104-4 0 5924
+2 25791 24.9839 131.3835 0010980 104.9187 255.2530 14.40948920157661
+FUSE 1
+1 25791U 99035A 02171.41033186 .00000417 00000-0 72553-4 0 5913
+2 25791 24.9844 138.1686 0010902 93.6662 266.5092 14.40948370157502
+FUSE 1
+1 25791U 99035A 02170.50996877 +.00000436 +00000-0 +78639-4 0 05975
+2 25791 024.9843 143.6798 0010904 084.4115 275.7637 14.40948095157375
+FUSE 1
+1 25791U 99035A 02170.23293415 .00000423 00000-0 74576-4 0 5908
+2 25791 24.9845 145.3761 0010901 81.5059 278.6684 14.40947844157339
+FUSE 1
+1 25791U 99035A 02169.19405227 .00000425 00000-0 75062-4 0 5898
+2 25791 24.9846 151.7361 0010811 70.7002 289.4672 14.40947374157183
+FUSE 1
+1 25791U 99035A 02167.60109739 .00000492 00000-0 95589-4 0 5880
+2 25791 24.9842 161.4859 0010787 54.1241 306.0266 14.40947018156956
+FUSE 1
+1 25791U 99035A 02166.56221265 .00000534 00000-0 10864-3 0 5871
+2 25791 24.9839 167.8442 0010791 43.1206 317.0146 14.40946662156801
+FUSE 1
+1 25791U 99035A 02165.24629112 .00000568 00000-0 11909-3 0 5865
+2 25791 24.9843 175.9013 0010722 29.2251 330.8852 14.40946031156615
+FUSE 1
+1 25791U 99035A 02163.86110918 .00000595 00000-0 12719-3 0 5859
+2 25791 24.9845 184.3792 0010702 14.8284 345.2538 14.40945180156412
+FUSE 1
+1 25791U 99035A 02162.54518530 .00000658 00000-0 14664-3 0 5845
+2 25791 24.9846 192.4369 0010588 1.1350 358.9185 14.40944578156226
+FUSE 1
+1 25791U 99035A 02161.85259359 +.00000674 +00000-0 +15131-3 0 06107
+2 25791 024.9846 196.6771 0010590 353.7741 006.2633 14.40944011156124
+FUSE 1
+1 25791U 99035A 02161.22926069 .00000700 00000-0 15929-3 0 5831
+2 25791 24.9847 200.4935 0010585 347.0023 13.0212 14.40943608156034
+FUSE 1
+1 25791U 99035A 02159.84407613 .00000743 00000-0 17262-3 0 5823
+2 25791 24.9846 208.9724 0010588 332.2220 27.7726 14.40942460155834
+FUSE 1
+1 25791U 99035A 02158.80518770 .00000793 00000-0 18784-3 0 5819
+2 25791 24.9846 215.3341 0010581 321.3048 38.6704 14.40941632155681
+FUSE 1
+1 25791U 99035A 02157.97407665 +.00000825 +00000-0 +19757-3 0 05879
+2 25791 024.9847 220.4222 0010562 312.3796 047.5815 14.40940838155562
+FUSE 1
+1 25791U 99035A 02157.55852103 .00000870 00000-0 21141-3 0 5807
+2 25791 24.9847 222.9680 0010439 307.4635 52.4923 14.40940695155507
+FUSE 1
+1 25791U 99035A 02156.86592860 +.00000855 +00000-0 +20693-3 0 06042
+2 25791 024.9846 227.2073 0010554 299.6921 060.2540 14.40939609155402
+FUSE 1
+1 25791U 99035A 02156.24259499 .00000899 00000-0 22019-3 0 5795
+2 25791 24.9846 231.0244 0010551 292.5198 67.4193 14.40939088155314
+FUSE 1
+1 25791U 99035A 02155.06518757 .00000887 00000-0 21661-3 0 5787
+2 25791 24.9851 238.2318 0010502 278.6019 81.3297 14.40937436155140
+FUSE 1
+1 25791U 99035A 02154.92666911 +.00000889 +00000-0 +21739-3 0 06067
+2 25791 024.9851 239.0795 0010509 277.1250 082.8066 14.40937258155126
+FUSE 1
+1 25791U 99035A 02153.88777948 .00000883 00000-0 21546-3 0 5771
+2 25791 24.9856 245.4403 0010777 265.3681 94.5596 14.40935853154971
+FUSE 1
+1 25791U 99035A 02152.57185272 .00000902 00000-0 22117-3 0 5765
+2 25791 24.9868 253.4989 0011060 249.3519 110.5805 14.40934379154783
+FUSE 1
+1 25791U 99035A 02151.53296309 .00000970 00000-0 24192-3 0 5753
+2 25791 24.9869 259.8581 0011180 238.2453 121.6966 14.40933320154639
+FUSE 1
+1 25791U 99035A 02150.70185103 +.00001051 +00000-0 +26686-3 0 05975
+2 25791 024.9867 264.9433 0011243 229.4877 130.4651 14.40932501154518
+FUSE 1
+1 25791U 99035A 02149.93999876 .00001091 00000-0 27908-3 0 5745
+2 25791 24.9867 269.6053 0011249 221.4930 138.4719 14.40931407154401
+FUSE 1
+1 25791U 99035A 02148.90111038 +.00001229 +00000-0 +32134-3 0 05769
+2 25791 024.9863 275.9625 0011269 210.6845 149.3088 14.40930136154250
+FUSE 1
+1 25791U 99035A 02148.83185155 .00000938 00000-0 23221-3 0 5732
+2 25791 24.9851 276.3822 0010775 212.4019 147.5850 14.40927933154242
+FUSE 1
+1 25791U 99035A 02147.93147934 +.00000813 +00000-0 +19395-3 0 05958
+2 25791 024.9857 281.8960 0010898 202.6278 157.3749 14.40926137154113
+FUSE 1
+1 25791U 99035A 02147.58518187 .00001001 00000-0 25172-3 0 5726
+2 25791 24.9861 284.0183 0011012 197.6860 162.3263 14.40926704154060
+FUSE 1
+1 25791U 99035A 02146.54628978 .00000913 00000-0 22451-3 0 5718
+2 25791 24.9845 290.3753 0010754 189.6041 170.4268 14.40924183153916
+FUSE 1
+1 25791U 99035A 02145.16109886 .00000752 00000-0 17520-3 0 5708
+2 25791 24.9854 298.8585 0011057 175.5591 184.5015 14.40921808153718
+FUSE 1
+1 25791U 99035A 02144.12220258 .00000806 00000-0 19188-3 0 5690
+2 25791 24.9858 305.2220 0011313 166.0837 193.9972 14.40920971153563
+FUSE 1
+1 25791U 99035A 02143.91442346 +.00000815 +00000-0 +19451-3 0 06009
+2 25791 024.9859 306.4952 0011363 164.3048 195.7813 14.40920803153534
+FUSE 1
+1 25791U 99035A 02142.94478746 +.00000943 +00000-0 +23384-3 0 05690
+2 25791 024.9854 312.4312 0011411 153.9631 206.1530 14.40920479153398
+FUSE 1
+1 25791U 99035A 02142.87552765 .00000884 00000-0 21574-3 0 5688
+2 25791 24.9848 312.8512 0010954 151.9799 208.1299 14.40919629153389
+FUSE 1
+1 25791U 99035A 02141.90588955 +.00000926 +00000-0 +22857-3 0 05874
+2 25791 024.9841 318.7826 0010700 140.9341 219.1940 14.40918429153242
+FUSE 1
+1 25791U 99035A 02141.55958991 .00000963 00000-0 23993-3 0 5677
+2 25791 24.9839 320.9048 0010714 137.4073 222.7267 14.40918220153193
+FUSE 1
+1 25791U 99035A 02140.17438775 .00001057 00000-0 26889-3 0 5668
+2 25791 24.9835 329.3818 0010822 124.7440 235.4086 14.40916869152998
+FUSE 1
+1 25791U 99035A 02139.96660755 +.00001083 +00000-0 +27692-3 0 05884
+2 25791 024.9836 330.6540 0010888 122.4431 237.7130 14.40916754152968
+FUSE 1
+1 25791U 99035A 02139.06622508 .00001163 00000-0 30126-3 0 5659
+2 25791 24.9830 336.1650 0010863 113.3928 246.7719 14.40915711152839
+FUSE 1
+1 25791U 99035A 02137.88879990 .00001296 00000-0 34198-3 0 5645
+2 25791 24.9826 343.3712 0010907 101.0863 259.0871 14.40914401152666
+FUSE 1
+1 25791U 99035A 02136.91915471 +.00001350 +00000-0 +35875-3 0 05816
+2 25791 024.9827 349.3060 0010932 090.9446 269.2314 14.40912681152528
+FUSE 1
+1 25791U 99035A 02136.22654987 .00001376 00000-0 36654-3 0 5636
+2 25791 24.9826 353.5443 0010936 83.6416 276.5336 14.40911244152427
+FUSE 1
+1 25791U 99035A 02135.94950762 +.00001397 +00000-0 +37325-3 0 05723
+2 25791 024.9825 355.2400 0010966 080.7402 279.4344 14.40910769152381
+FUSE 1
+1 25791U 99035A 02135.18764091 .00001413 00000-0 37797-3 0 5628
+2 25791 24.9824 359.9024 0010965 72.6730 287.4977 14.40909002152273
+FUSE 1
+1 25791U 99035A 02134.91059834 +.00001415 +00000-0 +37857-3 0 05922
+2 25791 024.9825 001.5980 0010968 069.7349 290.4345 14.40908337152230
+FUSE 1
+1 25791U 99035A 02133.94094738 +.00001415 +00000-0 +37859-3 0 05636
+2 25791 024.9824 007.5352 0010877 059.9778 300.1809 14.40905944152093
+FUSE 1
+1 25791U 99035A 02133.87168652 .00001412 00000-0 37775-3 0 5617
+2 25791 24.9825 7.9592 0010873 59.2261 300.9315 14.40905750152084
+FUSE 1
+1 25791U 99035A 02132.48646600 .00001369 00000-0 36456-3 0 5602
+2 25791 24.9823 16.4325 0010684 45.9733 314.1653 14.40902098151888
+FUSE 1
+1 25791U 99035A 02131.30902586 .00001353 00000-0 35975-3 0 5596
+2 25791 24.9822 23.6391 0010610 33.6244 326.4935 14.40899142151716
+FUSE 1
+1 25791U 99035A 02130.20084454 .00001308 00000-0 34583-3 0 5582
+2 25791 24.9820 30.4208 0010580 22.0031 338.0932 14.40896173151558
+FUSE 1
+1 25791U 99035A 02129.16192230 .00001226 00000-0 32085-3 0 5570
+2 25791 24.9821 36.7788 0010481 11.1643 348.9097 14.40893274151404
+FUSE 1
+1 25791U 99035A 02128.95413775 +.00001211 +00000-0 +31627-3 0 05931
+2 25791 024.9821 038.0520 0010468 008.7737 351.2951 14.40892692151379
+FUSE 1
+1 25791U 99035A 02127.98447523 +.00001111 +00000-0 +28565-3 0 05601
+2 25791 024.9824 043.9896 0010296 357.7755 002.2712 14.40889924151236
+FUSE 1
+1 25791U 99035A 02127.91521357 .00001094 00000-0 28026-3 0 5569
+2 25791 24.9824 44.4136 0010284 357.0692 2.9753 14.40889652151228
+FUSE 1
+1 25791U 99035A 02126.94554859 +.00001060 +00000-0 +27008-3 0 05601
+2 25791 024.9824 050.3495 0010262 346.7330 013.2907 14.40887620151085
+FUSE 1
+1 25791U 99035A 02126.87628689 .00001055 00000-0 26832-3 0 5558
+2 25791 24.9824 50.7736 0010263 346.0680 13.9545 14.40887452151076
+FUSE 1
+1 25791U 99035A 02125.97588259 +.00001014 +00000-0 +25588-3 0 05671
+2 25791 024.9823 056.2855 0010259 336.2920 023.7116 14.40885529150942
+FUSE 1
+1 25791U 99035A 02125.42178682 .00001006 00000-0 25328-3 0 5545
+2 25791 24.9822 59.6761 0010255 330.4733 29.5196 14.40884531150863
+FUSE 1
+1 25791U 99035A 02124.38285672 .00001011 00000-0 25509-3 0 5533
+2 25791 24.9820 66.0352 0010273 319.4923 40.4821 14.40882801150716
+FUSE 1
+1 25791U 99035A 02123.20540156 .00000953 00000-0 23705-3 0 5523
+2 25791 24.9824 73.2432 0010279 305.7597 54.1955 14.40880460150540
+FUSE 1
+1 25791U 99035A 02121.95868326 +.00001002 +00000-0 +25225-3 0 05542
+2 25791 024.9819 080.8762 0010331 292.1373 067.8041 14.40878747150366
+FUSE 1
+1 25791U 99035A 02121.54311021 .00001003 00000-0 25248-3 0 5515
+2 25791 24.9819 83.4189 0010337 287.6956 72.2421 14.40878063150307
+FUSE 1
+1 25791U 99035A 02120.98901322 +.00001023 +00000-0 +25857-3 0 05632
+2 25791 024.9818 086.8098 0010306 282.1201 077.8157 14.40877264150221
+FUSE 1
+1 25791U 99035A 02120.22712923 .00001015 00000-0 25630-3 0 5502
+2 25791 24.9819 91.4718 0010318 274.0246 85.9082 14.40875930150118
+FUSE 1
+1 25791U 99035A 02119.95008070 +.00001028 +00000-0 +26024-3 0 05648
+2 25791 024.9817 093.1681 0010309 271.2034 088.7294 14.40875508150070
+FUSE 1
+1 25791U 99035A 02119.18819734 .00000984 00000-0 24661-3 0 5498
+2 25791 24.9821 97.8348 0010364 262.8749 97.0580 14.40873938149968
+FUSE 1
+1 25791U 99035A 02117.59516608 .00000965 00000-0 24087-3 0 5485
+2 25791 24.9822 107.5863 0010462 245.7519 114.1894 14.40871219149738
+FUSE 1
+1 25791U 99035A 02116.55623223 .00001014 00000-0 25598-3 0 5475
+2 25791 24.9819 113.9469 0010496 234.8360 125.1166 14.40869721149589
+FUSE 1
+1 25791U 99035A 02115.24024880 .00000904 00000-0 22221-3 0 5460
+2 25791 24.9822 122.0047 0010673 220.6675 139.3037 14.40867070149393
+FUSE 1
+1 25791U 99035A 02113.64721393 .00000997 00000-0 25068-3 0 5458
+2 25791 24.9820 131.7593 0010921 204.4419 155.5575 14.40864885149169
+FUSE 1
+1 25791U 99035A 02112.60827693 .00001229 00000-0 32167-3 0 5449
+2 25791 24.9818 138.1223 0011109 194.3356 165.6844 14.40863758149016
+FUSE 1
+1 25791U 99035A 02111.70786489 +.00001579 +00000-0 +42935-3 0 05459
+2 25791 024.9818 143.6347 0011005 184.3083 175.7332 14.40862715148885
+FUSE 1
+1 25791U 99035A 02111.56934007 .00001615 00000-0 44009-3 0 5437
+2 25791 24.9819 144.4840 0011022 182.6205 177.4245 14.40862480148868
+FUSE 1
+1 25791U 99035A 02110.53040188 .00001831 00000-0 50650-3 0 5429
+2 25791 24.9817 150.8474 0011038 171.9009 188.1678 14.40859918148715
+FUSE 1
+1 25791U 99035A 02109.21441033 .00001839 00000-0 50903-3 0 5414
+2 25791 24.9818 158.9076 0011058 159.5103 200.5858 14.40855347148522
+FUSE 1
+1 25791U 99035A 02107.75988762 .00001806 00000-0 49905-3 0 5409
+2 25791 24.9818 167.8101 0011016 144.5815 215.5425 14.40850340148319
+FUSE 1
+1 25791U 99035A 02106.72093909 .00001824 00000-0 50445-3 0 5394
+2 25791 24.9819 174.1696 0011038 134.1147 226.0286 14.40847102148164
+FUSE 1
+1 25791U 99035A 02105.61272498 .00001733 00000-0 47679-3 0 5386
+2 25791 24.9822 180.9533 0010987 122.6889 237.4679 14.40842753148002
+FUSE 1
+1 25791U 99035A 02104.85082480 +.00001713 +00000-0 +47068-3 0 05437
+2 25791 024.9823 185.6152 0010986 114.8415 245.3238 14.40840218147898
+FUSE 1
+1 25791U 99035A 02104.57377071 .00001648 00000-0 45060-3 0 5379
+2 25791 24.9828 187.3119 0010910 112.4216 247.7465 14.40838832147858
+FUSE 1
+1 25791U 99035A 02102.91143625 .00001546 00000-0 41945-3 0 5365
+2 25791 24.9833 197.4876 0010832 95.2901 264.8851 14.40833179147610
+FUSE 1
+1 25791U 99035A 02101.94173617 +.00001486 +00000-0 +40101-3 0 05367
+2 25791 024.9836 203.4219 0010768 085.1671 275.0035 14.40830065147475
+FUSE 1
+1 25791U 99035A 02101.87247187 .00001527 00000-0 41368-3 0 5354
+2 25791 24.9836 203.8460 0010860 84.9976 275.1776 14.40830297147464
+FUSE 1
+1 25791U 99035A 02100.90276910 +.00001525 +00000-0 +41312-3 0 05406
+2 25791 024.9836 209.7805 0010820 074.8575 285.3127 14.40827651147329
+FUSE 1
+1 25791U 99035A 02100.55644706 .00001466 00000-0 39504-3 0 5346
+2 25791 24.9839 211.9005 0010785 71.2224 288.9455 14.40826227147276
+FUSE 1
+1 25791U 99035A 02099.72527026 +.00001468 +00000-0 +39557-3 0 05369
+2 25791 024.9839 216.9860 0010792 062.4507 297.7098 14.40824076147152
+FUSE 1
+1 25791U 99035A 02099.51747561 .00001466 00000-0 39497-3 0 5332
+2 25791 24.9839 218.2573 0010790 60.2600 299.8974 14.40823521147123
+FUSE 1
+1 25791U 99035A 02098.96335660 +.00001461 +00000-0 +39351-3 0 05517
+2 25791 024.9839 221.6473 0010791 054.4596 305.6917 14.40822053147043
+FUSE 1
+1 25791U 99035A 02097.99364657 .00001460 00000-0 39305-3 0 5324
+2 25791 24.9840 227.5821 0010785 44.3275 315.8094 14.40819548146900
+FUSE 1
+1 25791U 99035A 02096.88540384 .00001474 00000-0 39764-3 0 5317
+2 25791 24.9839 234.3643 0010788 32.8173 327.3012 14.40816799146743
+FUSE 1
+1 25791U 99035A 02095.63862735 .00001487 00000-0 40141-3 0 5300
+2 25791 24.9840 241.9943 0010816 19.8188 340.2741 14.40813643146563
+FUSE 1
+1 25791U 99035A 02094.59964440 .00001479 00000-0 39900-3 0 5290
+2 25791 24.9841 248.3515 0010781 8.9830 351.0866 14.40810859146412
+FUSE 1
+1 25791U 99035A 02093.56066001 .00001449 00000-0 39004-3 0 5283
+2 25791 24.9842 254.7110 0010724 357.7982 2.2481 14.40807913146263
+FUSE 1
+1 25791U 99035A 02092.17534371 .00001416 00000-0 37974-3 0 5276
+2 25791 24.9846 263.1915 0010706 342.3947 17.6181 14.40804146146065
+FUSE 1
+1 25791U 99035A 02091.06708795 .00001473 00000-0 39722-3 0 5261
+2 25791 24.9844 269.9758 0010605 329.8586 30.1311 14.40801748145901
+FUSE 1
+1 25791U 99035A 02090.92855601 +.00001487 +00000-0 +40157-3 0 05410
+2 25791 024.9846 270.8250 0010580 328.4929 031.4942 14.40801529145887
+FUSE 1
+1 25791U 99035A 02089.95883174 +.00001422 +00000-0 +38169-3 0 05269
+2 25791 024.9848 276.7588 0010511 318.2311 041.7395 14.40798658145743
+FUSE 1
+1 25791U 99035A 02089.88956560 .00001421 00000-0 38139-3 0 5256
+2 25791 24.9849 277.1827 0010506 317.5131 42.4562 14.40798492145730
+FUSE 1
+1 25791U 99035A 02088.15791078 .00001515 00000-0 41010-3 0 5241
+2 25791 24.9847 287.7803 0010520 298.7755 61.1699 14.40794544145482
+FUSE 1
+1 25791U 99035A 02087.95011214 +.00001499 +00000-0 +40534-3 0 05370
+2 25791 024.9848 289.0527 0010533 296.5864 063.3562 14.40793924145453
+FUSE 1
+1 25791U 99035A 02086.91111703 .00001749 00000-0 48209-3 0 5239
+2 25791 24.9841 295.4106 0010495 285.4100 74.5251 14.40792142145301
+FUSE 1
+1 25791U 99035A 02085.94138844 +.00001800 +00000-0 +49790-3 0 05230
+2 25791 024.9840 301.3448 0010492 275.1890 084.7423 14.40789187145168
+FUSE 1
+1 25791U 99035A 02085.87212209 .00001800 00000-0 49784-3 0 5222
+2 25791 24.9839 301.7687 0010498 274.4524 85.4786 14.40788939145150
+FUSE 1
+1 25791U 99035A 02084.20972717 .00001789 00000-0 49461-3 0 5212
+2 25791 24.9837 311.9410 0010520 257.1269 102.8063 14.40783400144918
+FUSE 1
+1 25791U 99035A 02083.17072852 .00001737 00000-0 47850-3 0 5200
+2 25791 24.9841 318.3008 0010603 246.6391 113.2992 14.40779739144768
+FUSE 1
+1 25791U 99035A 02081.92392783 .00001713 00000-0 47112-3 0 5192
+2 25791 24.9843 325.9324 0010711 233.7134 126.2384 14.40775609144588
+FUSE 1
+1 25791U 99035A 02080.88492453 .00001724 00000-0 47457-3 0 5184
+2 25791 24.9839 332.2902 0010758 223.1027 136.8641 14.40772451144430
+FUSE 1
+1 25791U 99035A 02079.98445671 +.00001660 +00000-0 +45511-3 0 05248
+2 25791 024.9866 337.8089 0010640 212.3177 147.6681 14.40769396144307
+FUSE 1
+1 25791U 99035A 02079.36105289 .00001660 00000-0 45502-3 0 5170
+2 25791 24.9864 341.6231 0010625 205.7116 154.2858 14.40767508144212
+FUSE 1
+1 25791U 99035A 02078.94545013 +.00001663 +00000-0 +45593-3 0 05203
+2 25791 024.9866 344.1681 0010662 201.5314 158.4745 14.40766326144157
+FUSE 1
+1 25791U 99035A 02078.18351059 .00001670 00000-0 45823-3 0 5163
+2 25791 24.9867 348.8302 0010676 193.5096 166.5127 14.40764131144045
+FUSE 1
+1 25791U 99035A 02076.93669799 +.00001712 +00000-0 +47120-3 0 05188
+2 25791 024.9862 356.4616 0010674 180.4765 179.5730 14.40760708143868
+FUSE 1
+1 25791U 99035A 02076.86743038 .00001720 00000-0 47342-3 0 5151
+2 25791 24.9861 356.8853 0010677 179.8078 180.2432 14.40760558143856
+FUSE 1
+1 25791U 99035A 02075.34354341 .00001769 00000-0 48858-3 0 5143
+2 25791 24.9857 6.2089 0010689 164.1831 195.9013 14.40756227143637
+FUSE 1
+1 25791U 99035A 02074.23525935 .00001789 00000-0 49489-3 0 5131
+2 25791 24.9864 12.9917 0010652 152.3559 207.7514 14.40752965143470
+FUSE 1
+1 25791U 99035A 02073.95818794 +.00001809 +00000-0 +50096-3 0 05215
+2 25791 024.9863 014.6889 0010627 149.3903 210.7224 14.40752237143437
+FUSE 1
+1 25791U 99035A 02073.19624002 .00001826 00000-0 50609-3 0 5127
+2 25791 24.9865 19.3522 0010642 141.9145 218.2115 14.40749948143323
+FUSE 1
+1 25791U 99035A 02072.91916797 +.00001841 +00000-0 +51076-3 0 05363
+2 25791 024.9864 021.0498 0010609 139.0566 221.0741 14.40749171143282
+FUSE 1
+1 25791U 99035A 02071.53380359 .00001868 00000-0 51930-3 0 5110
+2 25791 24.9870 29.5310 0010560 125.3666 234.7831 14.40744898143080
+FUSE 1
+1 25791U 99035A 02070.97965627 +.00001883 +00000-0 +52391-3 0 05124
+2 25791 024.9873 032.9250 0010530 120.0536 240.1014 14.40743233143007
+FUSE 1
+1 25791U 99035A 02070.49477683 .00001888 00000-0 52553-3 0 5104
+2 25791 24.9873 35.8909 0010528 115.0412 245.1193 14.40741625142931
+FUSE 1
+1 25791U 99035A 02069.24793971 .00001911 00000-0 53253-3 0 5099
+2 25791 24.9880 43.5225 0010388 102.6935 257.4711 14.40737632142757
+FUSE 1
+1 25791U 99035A 02068.20890526 .00001963 00000-0 54852-3 0 5080
+2 25791 24.9877 49.8807 0010265 92.5971 267.5712 14.40734504142601
+FUSE 1
+1 25791U 99035A 02066.40790516 .00002019 00000-0 56597-3 0 5078
+2 25791 24.9882 60.8982 0010140 74.0227 286.1405 14.40728545142340
+FUSE 1
+1 25791U 99035A 02065.23032416 .00001976 00000-0 55274-3 0 5067
+2 25791 24.9890 68.1059 0009928 61.2977 298.8527 14.40723876142175
+FUSE 1
+1 25791U 99035A 02063.63711823 +.00001966 +00000-0 +54965-3 0 05060
+2 25791 024.9889 077.8519 0009855 044.5446 315.5856 14.40718057141946
+FUSE 1
+1 25791U 99035A 02063.56784827 .00001964 00000-0 54915-3 0 5058
+2 25791 24.9890 78.2758 0009853 43.7948 316.3342 14.40717794141939
+FUSE 1
+1 25791U 99035A 02062.25171546 .00001967 00000-0 55002-3 0 5041
+2 25791 24.9898 86.3315 0009720 29.5760 330.5288 14.40713207141744
+FUSE 1
+1 25791U 99035A 02060.72776629 .00001974 00000-0 55231-3 0 5035
+2 25791 24.9904 95.6541 0009691 13.5587 346.5178 14.40707846141526
+FUSE 1
+1 25791U 99035A 02059.68870443 .00002061 00000-0 57921-3 0 5022
+2 25791 24.9908 102.0122 0009670 2.3178 357.7366 14.40705063141372
+FUSE 1
+1 25791U 99035A 02058.58037276 +.00001937 +00000-0 +54089-3 0 05190
+2 25791 024.9855 108.7808 0010347 348.8163 011.2115 14.40699031141216
+FUSE 1
+1 25791U 99035A 02058.23401784 .00001930 00000-0 53890-3 0 5014
+2 25791 24.9854 110.8994 0010344 345.1099 14.9105 14.40697723141169
+FUSE 1
+1 25791U 99035A 02057.95693361 +.00001927 +00000-0 +53794-3 0 05295
+2 25791 024.9853 112.5943 0010342 342.2401 017.7744 14.40696709141123
+FUSE 1
+1 25791U 99035A 02056.98714049 +.00001855 +00000-0 +51590-3 0 05016
+2 25791 024.9848 118.5439 0010389 330.7846 029.2084 14.40692621140986
+FUSE 1
+1 25791U 99035A 02056.84859804 .00001856 00000-0 51612-3 0 5005
+2 25791 24.9848 119.3917 0010396 329.3558 30.6348 14.40692155140967
+FUSE 1
+1 25791U 99035A 02055.87879896 +.00001862 +00000-0 +51795-3 0 05009
+2 25791 024.9847 125.3251 0010386 318.7436 041.2281 14.40688909140821
+FUSE 1
+1 25791U 99035A 02055.80952754 .00001868 00000-0 51976-3 0 4991
+2 25791 24.9847 125.7494 0010379 317.8153 42.1555 14.40688735140812
+FUSE 1
+1 25791U 99035A 02054.56264168 .00001830 00000-0 50822-3 0 4985
+2 25791 24.9853 133.3826 0010404 303.6462 56.3056 14.40684284140636
+FUSE 1
+1 25791U 99035A 02051.93031607 +.00001939 +00000-0 +54187-3 0 04981
+2 25791 024.9846 149.4920 0010329 274.4706 085.4618 14.40676334140255
+FUSE 1
+1 25791U 99035A 02051.86104389 .00001949 00000-0 54496-3 0 4963
+2 25791 24.9847 149.9167 0010322 273.5085 86.4222 14.40676201140241
+FUSE 1
+1 25791U 99035A 02050.89124093 +.00001793 +00000-0 +49705-3 0 04963
+2 25791 024.9879 155.8456 0009888 267.6928 092.2444 14.40671793140105
+FUSE 1
+1 25791U 99035A 02050.82196891 .00001795 00000-0 49764-3 0 4957
+2 25791 24.9879 156.2699 0009920 266.9073 93.0299 14.40671596140095
+FUSE 1
+1 25791U 99035A 02049.85216173 +.00001762 +00000-0 +48738-3 0 05049
+2 25791 024.9881 162.2061 0009833 257.1871 102.7547 14.40668129139954
+FUSE 1
+1 25791U 99035A 02049.57507351 .00001745 00000-0 48221-3 0 4945
+2 25791 24.9884 163.9032 0009829 254.4578 105.4840 14.40667101139913
+FUSE 1
+1 25791U 99035A 02048.18962711 .00001789 00000-0 49573-3 0 4934
+2 25791 24.9865 172.3765 0010089 240.4382 119.5119 14.40662912139715
+FUSE 1
+1 25791U 99035A 02047.15054256 .00001796 00000-0 49804-3 0 4920
+2 25791 24.9866 178.7417 0010129 229.8799 130.0812 14.40659621139562
+FUSE 1
+1 25791U 99035A 02045.83436523 .00001840 00000-0 51150-3 0 4910
+2 25791 24.9866 186.7961 0010148 215.4593 144.5240 14.40655733139373
+FUSE 1
+1 25791U 99035A 02044.79527556 +.00001873 +00000-0 +52184-3 0 04971
+2 25791 024.9863 193.1524 0010137 204.2065 155.7965 14.40652516139223
+FUSE 1
+1 25791U 99035A 02044.51818359 .00001925 00000-0 53776-3 0 4904
+2 25791 24.9860 194.8476 0010191 201.0271 158.9809 14.40652078139188
+FUSE 1
+1 25791U 99035A 02043.82545578 +.00001946 +00000-0 +54433-3 0 04990
+2 25791 024.9858 199.0847 0010200 193.6793 166.3433 14.40649817139082
+FUSE 1
+1 25791U 99035A 02042.92490752 .00001992 00000-0 55840-3 0 4896
+2 25791 24.9856 204.5925 0010259 184.1947 175.8472 14.40647025138951
+FUSE 1
+1 25791U 99035A 02041.95508458 +.00002053 +00000-0 +57741-3 0 04892
+2 25791 024.9856 210.5265 0010300 173.9651 186.0980 14.40644069138818
+FUSE 1
+1 25791U 99035A 02041.88581150 .00002073 00000-0 58348-3 0 4889
+2 25791 24.9861 210.9521 0010311 172.9624 187.1028 14.40644058138806
+FUSE 1
+1 25791U 99035A 02040.56961753 .00002206 00000-0 62450-3 0 4870
+2 25791 24.9858 219.0013 0010484 159.5673 200.5249 14.40640287138618
+FUSE 1
+1 25791U 99035A 02039.53051625 .00002255 00000-0 63954-3 0 4866
+2 25791 24.9858 225.3571 0010553 148.4366 211.6776 14.40636535138462
+FUSE 1
+1 25791U 99035A 02038.14504167 .00002351 00000-0 66921-3 0 4859
+2 25791 24.9858 233.8326 0010636 134.1993 225.9382 14.40631676138264
+FUSE 1
+1 25791U 99035A 02037.93721974 +.00002397 +00000-0 +68340-3 0 04938
+2 25791 024.9861 235.1054 0010736 131.7488 228.3923 14.40631273138232
+FUSE 1
+1 25791U 99035A 02036.89810875 .00002492 00000-0 71274-3 0 4847
+2 25791 24.9862 241.4623 0010829 122.1317 238.0237 14.40627644138089
+FUSE 1
+1 25791U 99035A 02035.92826968 +.00002548 +00000-0 +73019-3 0 04841
+2 25791 024.9863 247.3934 0010862 112.4256 247.7399 14.40623688137945
+FUSE 1
+1 25791U 99035A 02035.85899543 .00002552 00000-0 73123-3 0 4832
+2 25791 24.9863 247.8171 0010864 111.6988 248.4676 14.40623397137930
+FUSE 1
+1 25791U 99035A 02034.95842869 +.00002563 +00000-0 +73476-3 0 04924
+2 25791 024.9867 253.3259 0010904 102.2272 257.9457 14.40619245137805
+FUSE 1
+1 25791U 99035A 02034.26568177 .00002587 00000-0 74211-3 0 4828
+2 25791 24.9865 257.5631 0010840 95.4477 264.7266 14.40616180137700
+FUSE 1
+1 25791U 99035A 02033.22656041 .00002588 00000-0 74253-3 0 4817
+2 25791 24.9868 263.9212 0010966 84.6163 275.5595 14.40611176137558
+FUSE 1
+1 25791U 99035A 02032.18743380 .00002587 00000-0 74231-3 0 4808
+2 25791 24.9869 270.2766 0010977 73.7493 286.4230 14.40606150137408
+FUSE 1
+1 25791U 99035A 02030.94047759 +.00002528 +00000-0 +72437-3 0 04808
+2 25791 024.9874 277.9037 0011018 060.9223 299.2389 14.40599492137222
+FUSE 1
+1 25791U 99035A 02030.87120198 .00002526 00000-0 72362-3 0 4792
+2 25791 24.9874 278.3273 0011014 60.1902 299.9702 14.40599135137210
+FUSE 1
+1 25791U 99035A 02029.34713303 .00002495 00000-0 71439-3 0 4786
+2 25791 24.9875 287.6482 0010997 44.3035 315.8351 14.40591646136997
+FUSE 1
+1 25791U 99035A 02028.93147652 +.00002479 +00000-0 +70929-3 0 04862
+2 25791 024.9876 290.1899 0010994 039.9697 320.1619 14.40589498136932
+FUSE 1
+1 25791U 99035A 02028.16943701 .00002474 00000-0 70791-3 0 4778
+2 25791 24.9876 294.8500 0011006 32.1353 327.9821 14.40585928136823
+FUSE 1
+1 25791U 99035A 02027.96161389 +.00002407 +00000-0 +68742-3 0 05050
+2 25791 024.9874 296.1287 0010582 028.3810 331.7529 14.40584028136795
+FUSE 1
+1 25791U 99035A 02026.92246706 .00002341 00000-0 66697-3 0 4763
+2 25791 24.9799 302.5272 0010059 16.0811 344.0013 14.40577732136644
+FUSE 1
+1 25791U 99035A 02025.39837504 .00002257 00000-0 64121-3 0 4750
+2 25791 24.9803 311.8488 0010138 359.9596 0.0915 14.40570421136423
+FUSE 1
+1 25791U 99035A 02024.22066220 .00002170 00000-0 61445-3 0 4749
+2 25791 24.9808 319.0539 0010178 346.9833 13.0414 14.40564803136255
+FUSE 1
+1 25791U 99035A 02023.94355340 +.00002127 +00000-0 +60118-3 0 04963
+2 25791 024.9808 320.7502 0010231 343.9239 016.0947 14.40563257136213
+FUSE 1
+1 25791U 99035A 02022.97366856 +.00002070 +00000-0 +58368-3 0 04746
+2 25791 024.9809 326.6854 0010289 333.5703 026.4279 14.40558911136071
+FUSE 1
+1 25791U 99035A 02022.90439095 .00002070 00000-0 58368-3 0 4734
+2 25791 24.9809 327.1090 0010289 332.8439 27.1535 14.40558648136066
+FUSE 1
+1 25791U 99035A 02021.93450374 +.00001972 +00000-0 +55342-3 0 04738
+2 25791 024.9815 333.0432 0010420 322.2211 037.7568 14.40554066135924
+FUSE 1
+1 25791U 99035A 02021.51883604 .00001971 00000-0 55294-3 0 4722
+2 25791 24.9815 335.5850 0010420 317.8920 42.0786 14.40552554135866
+FUSE 1
+1 25791U 99035A 02020.34111020 .00001902 00000-0 53176-3 0 4718
+2 25791 24.9819 342.7879 0010496 305.4885 54.4643 14.40547753135692
+FUSE 1
+1 25791U 99035A 02019.23265919 .00001870 00000-0 52196-3 0 4705
+2 25791 24.9819 349.5667 0010511 294.0221 65.9186 14.40543639135538
+FUSE 1
+1 25791U 99035A 02018.19348466 .00001814 00000-0 50458-3 0 4693
+2 25791 24.9822 355.9219 0010534 283.3551 76.5783 14.40539652135382
+FUSE 1
+1 25791U 99035A 02016.60007962 .00001743 00000-0 48297-3 0 4688
+2 25791 24.9823 5.6676 0010591 266.8378 93.0919 14.40533828135154
+FUSE 1
+1 25791U 99035A 02015.76873696 +.00001678 +00000-0 +46283-3 0 04713
+2 25791 024.9823 010.7535 0010644 258.3411 101.5912 14.40530615135034
+FUSE 1
+1 25791U 99035A 02015.56090099 .00001670 00000-0 46017-3 0 4671
+2 25791 24.9825 12.0258 0010623 256.2726 103.6602 14.40529913135001
+FUSE 1
+1 25791U 99035A 02014.59099802 +.00001637 +00000-0 +45017-3 0 04801
+2 25791 024.9827 017.9579 0010652 246.2520 113.6872 14.40526735134868
+FUSE 1
+1 25791U 99035A 02014.24460394 .00001618 00000-0 44436-3 0 4668
+2 25791 24.9826 20.0778 0010710 242.8070 117.1346 14.40525522134813
+FUSE 1
+1 25791U 99035A 02012.65118694 .00001644 00000-0 45243-3 0 4659
+2 25791 24.9821 29.8239 0010731 226.1513 133.8108 14.40521061134586
+FUSE 1
+1 25791U 99035A 02011.54272015 .00001715 00000-0 47438-3 0 4640
+2 25791 24.9815 36.6044 0010793 214.5223 145.4584 14.40518322134422
+FUSE 1
+1 25791U 99035A 02010.43425174 .00001799 00000-0 50019-3 0 4633
+2 25791 24.9809 43.3849 0010812 202.7174 157.2854 14.40515528134267
+FUSE 1
+1 25791U 99035A 02009.25649964 .00002024 00000-0 56982-3 0 4622
+2 25791 24.9789 50.5894 0010900 190.2577 169.7698 14.40513435134090
+FUSE 1
+1 25791U 99035A 02007.73234977 .00002144 00000-0 60706-3 0 4618
+2 25791 24.9780 59.9106 0010959 174.4447 185.6181 14.40508676133874
+FUSE 1
+1 25791U 99035A 02006.55459467 .00002207 00000-0 62629-3 0 4605
+2 25791 24.9776 67.1133 0010962 161.9239 198.1657 14.40504470133701
+FUSE 1
+1 25791U 99035A 02005.93107615 +.00002223 +00000-0 +63140-3 0 04899
+2 25791 024.9772 070.9268 0010959 155.3799 204.7234 14.40502008133612
+FUSE 1
+1 25791U 99035A 02005.23827537 .00002302 00000-0 65586-3 0 4595
+2 25791 24.9762 75.1663 0011117 148.7865 211.3305 14.40499774133511
+FUSE 1
+1 25791U 99035A 02003.92195234 .00002277 00000-0 64830-3 0 4582
+2 25791 24.9761 83.2157 0011128 134.9320 225.2086 14.40493934133324
+FUSE 1
+1 25791U 99035A 02002.88274676 .00002253 00000-0 64083-3 0 4577
+2 25791 24.9763 89.5747 0011378 124.3397 235.8189 14.40489372133179
+FUSE 1
+1 25791U 99035A 02001.91281822 +.00002146 +00000-0 +60789-3 0 04694
+2 25791 024.9768 095.5070 0011442 114.6843 245.4859 14.40484505133039
+FUSE 1
+1 25791U 99035A 02001.56641338 .00002152 00000-0 60976-3 0 4568
+2 25791 24.9764 97.6258 0011412 111.4641 248.7084 14.40483142132989
+FUSE 1
+1 25791U 99035A 01365.87360347 +.00002106 +00000-0 +59549-3 0 04723
+2 25791 024.9765 101.8629 0011436 104.3050 255.8720 14.40480024132882
+FUSE 1
+1 25791U 99035A 01365.52719815 .00002060 00000-0 58137-3 0 4555
+2 25791 24.9767 103.9819 0011371 101.3489 258.8298 14.40478294132833
+FUSE 1
+1 25791U 99035A 01364.14157199 .00001894 00000-0 53009-3 0 4549
+2 25791 24.9776 112.4568 0011372 87.4678 272.7139 14.40471893132639
+FUSE 1
+1 25791U 99035A 01362.89450064 .00001855 00000-0 51805-3 0 4534
+2 25791 24.9779 120.0847 0011421 75.1248 285.0524 14.40467329132453
+FUSE 1
+1 25791U 99035A 01361.92455302 +.00001831 +00000-0 +51089-3 0 04748
+2 25791 024.9778 126.0189 0011472 065.3088 294.8603 14.40463838132318
+FUSE 1
+1 25791U 99035A 01361.57814148 .00001900 00000-0 53207-3 0 4523
+2 25791 24.9772 128.1378 0011523 62.3118 297.8556 14.40463267132263
+FUSE 1
+1 25791U 99035A 01360.95460072 +.00001920 +00000-0 +53816-3 0 04716
+2 25791 024.9770 131.9515 0011492 055.8592 304.2995 14.40461264132179
+FUSE 1
+1 25791U 99035A 01360.53891054 .00002081 00000-0 58819-3 0 4513
+2 25791 24.9761 134.4940 0011549 52.3362 307.8493 14.40461175132116
+FUSE 1
+1 25791U 99035A 01360.19249807 .00001557 00000-0 42615-3 0 4501
+2 25791 24.9814 136.6178 0011030 44.8843 315.2554 14.40455881132069
+FUSE 1
+1 25791U 99035A 01358.87612700 .00001498 00000-0 40783-3 0 4495
+2 25791 24.9820 144.6693 0010973 30.9588 329.1578 14.40451843131876
+FUSE 1
+1 25791U 99035A 01357.55975188 .00001377 00000-0 37042-3 0 4480
+2 25791 24.9830 152.7226 0010843 16.8175 343.2692 14.40447508131686
+FUSE 1
+1 25791U 99035A 01356.24337185 .00001363 00000-0 36634-3 0 4474
+2 25791 24.9832 160.7748 0010783 3.1653 356.8921 14.40444244131497
+FUSE 1
+1 25791U 99035A 01355.13483804 .00001399 00000-0 37745-3 0 4463
+2 25791 24.9832 167.5556 0010791 351.3648 8.6665 14.40441877131339
+FUSE 1
+1 25791U 99035A 01353.88773524 .00001488 00000-0 40499-3 0 4452
+2 25791 24.9831 175.1848 0010716 338.1167 21.8882 14.40439533131157
+FUSE 1
+1 25791U 99035A 01352.91776521 +.00001536 +00000-0 +41984-3 0 04527
+2 25791 024.9828 181.1169 0010739 327.7733 032.2118 14.40437323131012
+FUSE 1
+1 25791U 99035A 01352.57134719 .00001547 00000-0 42314-3 0 4447
+2 25791 24.9827 183.2356 0010758 324.0828 35.8958 14.40436465130968
+FUSE 1
+1 25791U 99035A 01351.39352449 .00001601 00000-0 43981-3 0 4439
+2 25791 24.9825 190.4393 0010750 311.5670 48.3911 14.40433644130790
+FUSE 1
+1 25791U 99035A 01350.90853821 +.00001630 +00000-0 +44889-3 0 04570
+2 25791 024.9828 193.4057 0010738 306.2371 053.7148 14.40432555130723
+FUSE 1
+1 25791U 99035A 01350.21570001 .00001672 00000-0 46189-3 0 4425
+2 25791 24.9825 197.6430 0010796 298.8753 61.0671 14.40430851130624
+FUSE 1
+1 25791U 99035A 01349.17644244 .00001720 00000-0 47692-3 0 4412
+2 25791 24.9826 203.9992 0010810 288.0247 71.9089 14.40428119130475
+FUSE 1
+1 25791U 99035A 01348.13718358 .00001739 00000-0 48271-3 0 4408
+2 25791 24.9830 210.3552 0010817 277.4348 82.4917 14.40425082130322
+FUSE 1
+1 25791U 99035A 01346.95935558 +.00001792 +00000-0 +49923-3 0 04414
+2 25791 024.9832 217.5601 0010828 264.7976 095.1293 14.40421820130151
+FUSE 1
+1 25791U 99035A 01346.89007156 .00001798 00000-0 50103-3 0 4396
+2 25791 24.9831 217.9838 0010822 264.0722 95.8552 14.40421637130142
+FUSE 1
+1 25791U 99035A 01345.92009452 +.00001804 +00000-0 +50297-3 0 04561
+2 25791 024.9834 223.9163 0010848 253.7226 106.2093 14.40418551130008
+FUSE 1
+1 25791U 99035A 01345.50438976 .00001829 00000-0 51074-3 0 4383
+2 25791 24.9833 226.4598 0010750 249.3404 110.5947 14.40417367129949
+FUSE 1
+1 25791U 99035A 01344.95011669 +.00001830 +00000-0 +51089-3 0 04543
+2 25791 024.9832 229.8499 0010756 243.5301 116.4117 14.40415519129865
+FUSE 1
+1 25791U 99035A 01344.18799003 .00001792 00000-0 49923-3 0 4375
+2 25791 24.9834 234.5123 0010818 235.5423 124.4062 14.40412721129757
+FUSE 1
+1 25791U 99035A 01343.14872416 .00001816 00000-0 50671-3 0 4368
+2 25791 24.9837 240.8680 0010867 223.8806 136.0838 14.40409582129602
+FUSE 1
+1 25791U 99035A 01341.90160523 .00001680 00000-0 46452-3 0 4359
+2 25791 24.9841 248.4975 0010871 211.3142 148.6721 14.40404442129428
+FUSE 1
+1 25791U 99035A 01340.93162024 +.00001621 +00000-0 +44627-3 0 04479
+2 25791 024.9843 254.4284 0010863 200.7838 159.2234 14.40401129129285
+FUSE 1
+1 25791U 99035A 01340.37734226 .00001562 00000-0 42806-3 0 4343
+2 25791 24.9846 257.8173 0010861 194.8366 165.1825 14.40399138129209
+FUSE 1
+1 25791U 99035A 01339.19949999 .00001406 00000-0 37978-3 0 4336
+2 25791 24.9853 265.0213 0010893 182.8071 177.2377 14.40394882129036
+FUSE 1
+1 25791U 99035A 01337.95236873 .00001264 00000-0 33601-3 0 4328
+2 25791 24.9859 272.6472 0011030 169.6495 190.4242 14.40391020128858
+FUSE 1
+1 25791U 99035A 01336.98237488 +.00001205 +00000-0 +31765-3 0 04350
+2 25791 024.9862 278.5777 0011067 159.5220 200.5735 14.40388553128711
+FUSE 1
+1 25791U 99035A 01336.91308955 .00001199 00000-0 31585-3 0 4319
+2 25791 24.9862 279.0014 0011071 158.8008 201.2962 14.40388365128702
+FUSE 1
+1 25791U 99035A 01335.52738000 .00001234 00000-0 32682-3 0 4301
+2 25791 24.9862 287.4731 0011104 144.1718 215.9555 14.40385754128501
+FUSE 1
+1 25791U 99035A 01334.21095244 .00001172 00000-0 30740-3 0 4294
+2 25791 24.9865 295.5226 0011153 130.8481 229.2994 14.40382693128319
+FUSE 1
+1 25791U 99035A 01333.17166461 .00001237 00000-0 32780-3 0 4285
+2 25791 24.9866 301.8786 0011197 121.1081 239.0526 14.40380912128164
+FUSE 1
+1 25791U 99035A 01331.78594478 .00001365 00000-0 36732-3 0 4275
+2 25791 24.9865 310.3519 0011209 106.8472 253.3273 14.40378324127969
+FUSE 1
+1 25791U 99035A 01330.67736645 +.00001415 +00000-0 +38296-3 0 04303
+2 25791 024.9868 317.1335 0011064 094.8355 265.3420 14.40375646127802
+FUSE 1
+1 25791U 99035A 01330.53879352 .00001567 00000-0 43006-3 0 4269
+2 25791 24.9872 317.9818 0011229 93.6128 266.5666 14.40376029127787
+FUSE 1
+1 25791U 99035A 01329.70735725 +.00001621 +00000-0 +44667-3 0 04457
+2 25791 024.9872 323.0652 0011232 084.6461 275.5327 14.40373883127661
+FUSE 1
+1 25791U 99035A 01329.22235264 .00001585 00000-0 43552-3 0 4256
+2 25791 24.9876 326.0324 0011267 80.2956 279.8829 14.40372335127590
+FUSE 1
+1 25791U 99035A 01327.83661937 .00001684 00000-0 46626-3 0 4245
+2 25791 24.9875 334.5052 0011431 65.9356 294.2344 14.40369004127398
+FUSE 1
+1 25791U 99035A 01326.52016884 .00001740 00000-0 48380-3 0 4236
+2 25791 24.9874 342.5535 0011585 52.2073 307.9485 14.40365366127202
+FUSE 1
+1 25791U 99035A 01325.41157411 .00001880 00000-0 52699-3 0 4227
+2 25791 24.9858 349.3412 0010869 41.2944 318.8383 14.40362474127049
+FUSE 1
+1 25791U 99035A 01324.92656363 +.00001916 +00000-0 +53838-3 0 04486
+2 25791 024.9856 352.3075 0010879 036.2259 323.8984 14.40361028126978
+FUSE 1
+1 25791U 99035A 01324.23369056 .00001967 00000-0 55417-3 0 4212
+2 25791 24.9855 356.5485 0010758 28.8088 331.3014 14.40358919126873
+FUSE 1
+1 25791U 99035A 01323.67939132 +.00001961 +00000-0 +55223-3 0 04407
+2 25791 024.9854 359.9372 0010776 023.0532 337.0460 14.40356881126790
+FUSE 1
+1 25791U 99035A 01322.70936542 .00001987 00000-0 56035-3 0 4198
+2 25791 24.9853 5.8688 0010772 12.9432 347.1352 14.40353526126658
+FUSE 1
+1 25791U 99035A 01321.67005005 .00001934 00000-0 54405-3 0 4184
+2 25791 24.9852 12.2257 0010726 1.9216 358.1340 14.40349375126508
+FUSE 1
+1 25791U 99035A 01320.56144300 .00001920 00000-0 53980-3 0 4174
+2 25791 24.9852 19.0058 0010683 350.0478 9.9818 14.40345343126346
+FUSE 1
+1 25791U 99035A 01319.52212142 .00001855 00000-0 51954-3 0 4163
+2 25791 24.9851 25.3612 0010623 338.9778 21.0292 14.40341342126192
+FUSE 1
+1 25791U 99035A 01318.82923904 +.00001856 +00000-0 +52003-3 0 04314
+2 25791 024.9847 029.5994 0010595 331.5863 028.4066 14.40338911126095
+FUSE 1
+1 25791U 99035A 01318.41350910 .00001890 00000-0 53052-3 0 4155
+2 25791 24.9848 32.1452 0010575 326.5664 33.4173 14.40337609126038
+FUSE 1
+1 25791U 99035A 01316.88916357 .00001729 00000-0 48061-3 0 4141
+2 25791 24.9843 41.4680 0010423 310.4505 49.5094 14.40331762125816
+FUSE 1
+1 25791U 99035A 01315.78054605 .00002207 00000-0 62878-3 0 4131
+2 25791 24.9835 48.2543 0010468 297.9246 62.0232 14.40329121125652
+FUSE 1
+1 25791U 99035A 01314.67192519 .00002266 00000-0 64699-3 0 4122
+2 25791 24.9832 55.0359 0010699 286.0302 73.9029 14.40324776125496
+FUSE 1
+1 25791U 99035A 01313.56330279 .00002157 00000-0 61343-3 0 4117
+2 25791 24.9831 61.8147 0010834 274.3350 85.5922 14.40319729125335
+FUSE 1
+1 25791U 99035A 01312.52396703 .00002119 00000-0 60174-3 0 4104
+2 25791 24.9829 68.1695 0010860 263.6572 96.2701 14.40315363125183
+FUSE 1
+1 25791U 99035A 01311.76178660 +.00001972 +00000-0 +55623-3 0 04344
+2 25791 024.9830 072.8283 0010752 255.8544 104.0769 14.40311922125079
+FUSE 1
+1 25791U 99035A 01310.99960448 .00001931 00000-0 54345-3 0 4098
+2 25791 24.9829 77.4894 0010755 247.9477 111.9889 14.40308978124960
+FUSE 1
+1 25791U 99035A 01309.96026276 +.00001965 +00000-0 +55405-3 0 04090
+2 25791 024.9829 083.8473 0010851 237.1463 122.8002 14.40305487124811
+FUSE 1
+1 25791U 99035A 01309.89097339 .00001972 00000-0 55619-3 0 4084
+2 25791 24.9829 84.2713 0010836 236.3815 123.5665 14.40305298124800
+FUSE 1
+1 25791U 99035A 01308.57447006 .00002179 00000-0 62044-3 0 4077
+2 25791 24.9822 92.3254 0010825 222.6458 137.3208 14.40301956124614
+FUSE 1
+1 25791U 99035A 01307.53512328 .00002351 00000-0 67374-3 0 4064
+2 25791 24.9814 98.6808 0010806 211.6998 148.2862 14.40299019124461
+FUSE 1
+1 25791U 99035A 01305.94145638 +.00002419 +00000-0 +69493-3 0 04062
+2 25791 024.9809 108.4263 0010833 195.2773 164.7418 14.40292404124234
+FUSE 1
+1 25791U 99035A 01305.87216636 .00002410 00000-0 69213-3 0 4051
+2 25791 24.9811 108.8509 0010847 194.5526 165.4669 14.40292047124225
+FUSE 1
+1 25791U 99035A 01304.90210496 +.00002483 +00000-0 +71481-3 0 04210
+2 25791 024.9807 114.7853 0010812 184.6053 175.4356 14.40288074124088
+FUSE 1
+1 25791U 99035A 01304.55565381 .00002564 00000-0 73991-3 0 4046
+2 25791 24.9803 116.9068 0010808 180.8733 179.1763 14.40287007124037
+FUSE 1
+1 25791U 99035A 01303.93204085 +.00002548 +00000-0 +73522-3 0 04141
+2 25791 024.9803 120.7190 0010799 174.3529 185.7099 14.40283909123947
+FUSE 1
+1 25791U 99035A 01303.03126575 .00002520 00000-0 72659-3 0 4037
+2 25791 24.9800 126.2295 0010755 164.6304 195.4536 14.40279287123810
+FUSE 1
+1 25791U 99035A 01301.78402958 .00002608 00000-0 75393-3 0 4023
+2 25791 24.9799 133.8566 0011062 153.3348 206.7722 14.40274032123633
+FUSE 1
+1 25791U 99035A 01299.91316810 .00002915 00000-0 84930-3 0 4012
+2 25791 24.9792 145.2965 0011048 134.0555 226.0864 14.40265988123368
+FUSE 1
+1 25791U 99035A 01298.18087804 .00003212 00000-0 94181-3 0 4007
+2 25791 24.9785 155.8916 0011040 115.9737 244.1911 14.40256974123117
+FUSE 1
+1 25791U 99035A 01297.97300262 +.00003234 +00000-0 +94848-3 0 04115
+2 25791 024.9787 157.1643 0011055 113.7776 246.3895 14.40255785123086
+FUSE 1
+1 25791U 99035A 01297.07220791 .00002684 00000-0 77791-3 0 3995
+2 25791 24.9787 162.6747 0010929 104.4008 255.7717 14.40248557122957
+FUSE 1
+1 25791U 99035A 01295.96352986 +.00002126 +00000-0 +60489-3 0 04025
+2 25791 024.9793 169.4508 0010628 092.8140 267.3584 14.40240931122798
+FUSE 1
+1 25791U 99035A 01295.89423827 .00002043 00000-0 57915-3 0 3982
+2 25791 24.9794 169.8749 0010644 91.9762 268.1968 14.40240146122780
+FUSE 1
+1 25791U 99035A 01294.92413976 +.00001853 +00000-0 +51998-3 0 04152
+2 25791 024.9798 175.8066 0010633 081.1941 278.9772 14.40235323122649
+FUSE 1
+1 25791U 99035A 01294.30050214 .00001823 00000-0 51089-3 0 3973
+2 25791 24.9799 179.6196 0010702 74.5779 285.5911 14.40232995122559
+FUSE 1
+1 25791U 99035A 01293.26110316 .00001744 00000-0 48616-3 0 3960
+2 25791 24.9799 185.9754 0010658 63.5604 296.6004 14.40228963122404
+FUSE 1
+1 25791U 99035A 01292.22169993 .00001707 00000-0 47471-3 0 3956
+2 25791 24.9799 192.3301 0010648 52.4658 307.6827 14.40225399122258
+FUSE 1
+1 25791U 99035A 01290.97441176 +.00001672 +00000-0 +46391-3 0 03975
+2 25791 024.9797 199.9582 0010599 039.1258 321.0014 14.40221249122071
+FUSE 1
+1 25791U 99035A 01290.90511781 .00001674 00000-0 46472-3 0 3947
+2 25791 24.9797 200.3818 0010601 38.3799 321.7462 14.40221053122061
+FUSE 1
+1 25791U 99035A 01289.44994252 .00001682 00000-0 46703-3 0 3937
+2 25791 24.9794 209.2810 0010620 22.7711 337.3265 14.40216632121857
+FUSE 1
+1 25791U 99035A 01288.96488349 +.00001640 +00000-0 +45420-3 0 04039
+2 25791 024.9794 212.2491 0010567 017.4224 342.6645 14.40214807121781
+FUSE 1
+1 25791U 99035A 01288.41052915 .00001638 00000-0 45357-3 0 3928
+2 25791 24.9794 215.6384 0010635 11.8186 348.2573 14.40213128121709
+FUSE 1
+1 25791U 99035A 01287.23252352 .00001574 00000-0 43355-3 0 3918
+2 25791 24.9794 222.8447 0010562 358.4459 1.6013 14.40209149121539
+FUSE 1
+1 25791U 99035A 01285.91592729 .00001390 00000-0 37646-3 0 3907
+2 25791 24.9795 230.9044 0010544 342.9330 17.0829 14.40203938121344
+FUSE 1
+1 25791U 99035A 01284.39144118 .00001300 00000-0 34838-3 0 3892
+2 25791 24.9795 240.2335 0010739 326.2228 33.7597 14.40199484121121
+FUSE 1
+1 25791U 99035A 01283.97567245 +.00001223 +00000-0 +32457-3 0 03894
+2 25791 024.9792 242.7798 0010828 320.9649 039.0093 14.40197815121064
+FUSE 1
+1 25791U 99035A 01283.35201646 .00001212 00000-0 32118-3 0 3887
+2 25791 24.9792 246.5916 0010829 314.6054 45.3576 14.40196427120972
+FUSE 1
+1 25791U 99035A 01282.31258856 +.00001218 +00000-0 +32310-3 0 03876
+2 25791 024.9792 252.9458 0010895 303.3438 056.6026 14.40194305120820
+FUSE 1
+1 25791U 99035A 01281.96611121 +.00001476 +00000-0 +40318-3 0 03877
+2 25791 024.9786 255.0631 0010800 300.4688 059.4739 14.40195140120775
+FUSE 1
+1 25791U 99035A 01281.27315947 .00001503 00000-0 41154-3 0 3867
+2 25791 24.9785 259.2981 0010800 293.1387 66.7977 14.40193471120671
+FUSE 1
+1 25791U 99035A 01280.23373114 .00001657 00000-0 45958-3 0 3857
+2 25791 24.9781 265.6543 0010925 282.3330 77.5954 14.40191161120521
+FUSE 1
+1 25791U 99035A 01279.19430003 .00002067 00000-0 58705-3 0 3840
+2 25791 24.9775 272.0130 0011160 270.5332 89.3900 14.40189300120378
+FUSE 1
+1 25791U 99035A 01277.60050645 .00002136 00000-0 60847-3 0 3830
+2 25791 24.9771 281.7563 0011259 253.7403 106.1876 14.40183292120141
+FUSE 1
+1 25791U 99035A 01276.69966572 +.00002038 +00000-0 +57797-3 0 03834
+2 25791 024.9770 287.2658 0011436 244.9457 114.9868 14.40179081120019
+FUSE 1
+1 25791U 99035A 01276.56107445 .00002038 00000-0 57794-3 0 3822
+2 25791 24.9770 288.1132 0011429 243.5500 116.3834 14.40178557119993
+FUSE 1
+1 25791U 99035A 01275.59093557 +.00002005 +00000-0 +56772-3 0 03900
+2 25791 024.9769 294.0432 0011469 233.5602 126.3872 14.40174627119858
+FUSE 1
+1 25791U 99035A 01275.24445817 .00001894 00000-0 53340-3 0 3815
+2 25791 24.9772 296.1661 0011642 231.1207 128.8260 14.40172274119806
+FUSE 1
+1 25791U 99035A 01274.20502117 .00001837 00000-0 51559-3 0 3803
+2 25791 24.9774 302.5234 0011565 220.9357 139.0293 14.40168098119654
+FUSE 1
+1 25791U 99035A 01272.54191528 .00001742 00000-0 48618-3 0 3793
+2 25791 24.9776 312.6900 0011479 204.0234 155.9738 14.40161743119414
+FUSE 1
+1 25791U 99035A 01271.22528748 .00001537 00000-0 42239-3 0 3789
+2 25791 24.9783 320.7396 0011360 191.6142 168.4111 14.40155760119224
+FUSE 1
+1 25791U 99035A 01270.18584050 .00001414 00000-0 38420-3 0 3771
+2 25791 24.9786 327.0943 0011214 181.1674 178.8811 14.40151731119076
+FUSE 1
+1 25791U 99035A 01268.59201413 .00001316 00000-0 35376-3 0 3769
+2 25791 24.9790 336.8359 0011124 164.6593 195.4255 14.40146964118849
+FUSE 1
+1 25791U 99035A 01267.55255878 .00001264 00000-0 33768-3 0 3752
+2 25791 24.9791 343.1899 0011084 153.8979 206.2088 14.40144164118691
+FUSE 1
+1 25791U 99035A 01266.85958720 +.00001236 +00000-0 +32881-3 0 04003
+2 25791 024.9791 347.4254 0011062 146.6571 213.4636 14.40142395118599
+FUSE 1
+1 25791U 99035A 01266.23591181 .00001222 00000-0 32443-3 0 3748
+2 25791 24.9790 351.2395 0010997 140.3022 219.8292 14.40140919118504
+FUSE 1
+1 25791U 99035A 01264.84996263 .00001228 00000-0 32643-3 0 3730
+2 25791 24.9790 359.7127 0010966 126.1194 234.0331 14.40138072118306
+FUSE 1
+1 25791U 99035A 01263.81049784 .00001251 00000-0 33374-3 0 3720
+2 25791 24.9787 6.0658 0010961 115.2876 244.8774 14.40136053118154
+FUSE 1
+1 25791U 99035A 01262.90962669 +.00001258 +00000-0 +33575-3 0 03770
+2 25791 024.9786 011.5725 0010944 105.8616 254.3099 14.40134145118029
+FUSE 1
+1 25791U 99035A 01262.56313782 .00001225 00000-0 32562-3 0 3711
+2 25791 24.9789 13.6910 0010897 102.2762 257.8965 14.40133131117978
+FUSE 1
+1 25791U 99035A 01261.73156198 +.00001238 +00000-0 +32981-3 0 03916
+2 25791 024.9787 018.7732 0010906 093.5350 266.6406 14.40131469117857
+FUSE 1
+1 25791U 99035A 01260.76138915 .00001191 00000-0 31510-3 0 3707
+2 25791 24.9789 24.7033 0010879 83.2256 276.9490 14.40129023117715
+FUSE 1
+1 25791U 99035A 01259.92981039 +.00001175 +00000-0 +31013-3 0 03874
+2 25791 024.9786 029.7863 0010871 074.4468 285.7243 14.40127147117592
+FUSE 1
+1 25791U 99035A 01259.58331925 .00001147 00000-0 30130-3 0 3697
+2 25791 24.9787 31.9057 0010852 70.6480 289.5197 14.40126176117540
+FUSE 1
+1 25791U 99035A 01258.95963335 +.00001144 +00000-0 +30044-3 0 03874
+2 25791 024.9786 035.7176 0010865 064.0853 296.0773 14.40124921117457
+FUSE 1
+1 25791U 99035A 01258.54384331 .00001102 00000-0 28749-3 0 3684
+2 25791 24.9787 38.2594 0010849 59.6296 300.5294 14.40123716117396
+FUSE 1
+1 25791U 99035A 01256.88067564 .00001029 00000-0 26472-3 0 3673
+2 25791 24.9789 48.4246 0010881 42.1181 318.0162 14.40120076117159
+FUSE 1
+1 25791U 99035A 01255.84119312 +.00000982 +00000-0 +24994-3 0 03828
+2 25791 024.9791 054.7780 0010906 031.2706 328.8450 14.40117913117004
+FUSE 1
+1 25791U 99035A 01255.56399752 .00000973 00000-0 24725-3 0 3669
+2 25791 24.9790 56.4726 0010911 28.3803 331.7300 14.40117363116963
+FUSE 1
+1 25791U 99035A 01254.17801710 .00000928 00000-0 23335-3 0 3652
+2 25791 24.9790 64.9453 0010913 13.8647 346.2161 14.40114762116765
+FUSE 1
+1 25791U 99035A 01253.13853000 .00000871 00000-0 21540-3 0 3648
+2 25791 24.9793 71.2996 0010924 2.8497 357.2074 14.40112768116617
+FUSE 1
+1 25791U 99035A 01251.89114396 .00000824 00000-0 20070-3 0 3631
+2 25791 24.9796 78.9282 0010899 349.5744 10.4536 14.40110640116437
+FUSE 1
+1 25791U 99035A 01250.57445682 .00000789 00000-0 18992-3 0 3629
+2 25791 24.9798 86.9794 0010848 335.6563 24.3436 14.40108640116244
+FUSE 1
+1 25791U 99035A 01249.39636695 .00000757 00000-0 18011-3 0 3619
+2 25791 24.9802 94.1822 0010810 323.2224 36.7543 14.40106962116071
+FUSE 1
+1 25791U 99035A 01248.91127102 +.00000751 +00000-0 +17803-3 0 03830
+2 25791 024.9803 097.1479 0010787 318.2500 041.7192 14.40106349116005
+FUSE 1
+1 25791U 99035A 01248.21827703 .00000711 00000-0 16549-3 0 3604
+2 25791 24.9806 101.3869 0010851 311.0280 48.9290 14.40105201115909
+FUSE 1
+1 25791U 99035A 01247.94107926 +.00000692 +00000-0 +15961-3 0 03998
+2 25791 024.9808 103.0812 0010848 308.0548 051.8982 14.40104743115863
+FUSE 1
+1 25791U 99035A 01246.97088639 +.00000665 +00000-0 +15119-3 0 03624
+2 25791 024.9811 109.0135 0010822 297.4688 062.4719 14.40103568115724
+FUSE 1
+1 25791U 99035A 01246.90158683 .00000665 00000-0 15140-3 0 3594
+2 25791 24.9811 109.4371 0010823 296.7486 63.1913 14.40103507115715
+FUSE 1
+1 25791U 99035A 01245.86209396 .00000696 00000-0 16089-3 0 3582
+2 25791 24.9808 115.7946 0010841 285.1746 74.7568 14.40102728115561
+FUSE 1
+1 25791U 99035A 01244.47610489 .00000659 00000-0 14935-3 0 3573
+2 25791 24.9811 124.2700 0010831 270.7608 89.1659 14.40100949115366
+FUSE 1
+1 25791U 99035A 01243.36731275 .00000662 00000-0 15021-3 0 3567
+2 25791 24.9811 131.0482 0010866 258.9721 100.9574 14.40099892115206
+FUSE 1
+1 25791U 99035A 01242.25852056 .00000648 00000-0 14586-3 0 3553
+2 25791 24.9814 137.8264 0010894 247.3559 112.5794 14.40098711115047
+FUSE 1
+1 25791U 99035A 01241.98132292 +.00000630 +00000-0 +14046-3 0 03737
+2 25791 024.9816 139.5223 0010941 244.5808 115.3567 14.40098300115001
+FUSE 1
+1 25791U 99035A 01241.21902828 .00000629 00000-0 14009-3 0 3549
+2 25791 24.9817 144.1835 0011009 236.5844 123.3610 14.40097610114897
+FUSE 1
+1 25791U 99035A 01239.97163784 +.00000567 +00000-0 +12075-3 0 03541
+2 25791 024.9822 151.8119 0011137 224.0036 135.9578 14.40096009114714
+FUSE 1
+1 25791U 99035A 01239.90233840 .00000573 00000-0 12271-3 0 3539
+2 25791 24.9822 152.2355 0011140 223.3426 136.6211 14.40096007114709
+FUSE 1
+1 25791U 99035A 01238.93214506 +.00000578 +00000-0 +12417-3 0 03569
+2 25791 024.9822 158.1667 0011192 213.0996 146.8828 14.40095287114565
+FUSE 1
+1 25791U 99035A 01238.44704821 .00000558 00000-0 11791-3 0 3527
+2 25791 24.9823 161.1314 0011195 208.1454 151.8451 14.40094733114491
+FUSE 1
+1 25791U 99035A 01237.19965619 .00000543 00000-0 11309-3 0 3510
+2 25791 24.9826 168.7556 0011260 195.0033 165.0141 14.40093691114311
+FUSE 1
+1 25791U 99035A 01235.46716564 .00000559 00000-0 11830-3 0 3506
+2 25791 24.9826 179.3436 0011265 177.0928 182.9645 14.40092549114064
+FUSE 1
+1 25791U 99035A 01234.91276874 +.00000555 +00000-0 +11697-3 0 03518
+2 25791 024.9826 182.7322 0011267 171.3778 188.6930 14.40092091113980
+FUSE 1
+1 25791U 99035A 01234.21977186 .00000553 00000-0 11627-3 0 3493
+2 25791 24.9827 186.9667 0011270 164.0792 196.0070 14.40091557113881
+FUSE 1
+1 25791U 99035A 01233.18027640 .00000553 00000-0 11642-3 0 3485
+2 25791 24.9827 193.3193 0011293 153.2255 206.8853 14.40090779113734
+FUSE 1
+1 25791U 99035A 01231.72498050 .00000562 00000-0 11920-3 0 3478
+2 25791 24.9824 202.2156 0011301 138.1751 221.9616 14.40089739113529
+FUSE 1
+1 25791U 99035A 01230.54688298 .00000525 00000-0 10770-3 0 3462
+2 25791 24.9834 209.4179 0011313 126.3801 233.7753 14.40088665113353
+FUSE 1
+1 25791U 99035A 01229.23018362 .00000520 00000-0 10610-3 0 3452
+2 25791 24.9836 217.4680 0011315 112.6116 247.5590 14.40087703113163
+FUSE 1
+1 25791U 99035A 01228.81438323 +.00000515 +00000-0 +10467-3 0 03665
+2 25791 024.9835 220.0093 0011311 108.2127 251.9609 14.40087362113104
+FUSE 1
+1 25791U 99035A 01227.84418190 .00000497 00000-0 98977-4 0 3445
+2 25791 24.9840 225.9413 0011274 98.5742 261.6044 14.40086582112969
+FUSE 1
+1 25791U 99035A 01226.66607788 +.00000493 +00000-0 +97886-4 0 03463
+2 25791 024.9839 233.1408 0011275 086.3501 273.8298 14.40085796112794
+FUSE 1
+1 25791U 99035A 01226.52747722 .00000492 00000-0 97361-4 0 3435
+2 25791 24.9840 233.9884 0011272 84.8774 275.3014 14.40085704112774
+FUSE 1
+1 25791U 99035A 01225.21077022 .00000514 00000-0 10445-3 0 3420
+2 25791 24.9840 242.0362 0011245 71.4518 288.7213 14.40085082112581
+FUSE 1
+1 25791U 99035A 01223.89406193 .00000470 00000-0 90604-4 0 3413
+2 25791 24.9848 250.0849 0011117 57.6806 302.4776 14.40083898112392
+FUSE 1
+1 25791U 99035A 01222.78525341 .00000440 00000-0 81399-4 0 3404
+2 25791 24.9853 256.8629 0011047 46.0947 314.0477 14.40083059112237
+FUSE 1
+1 25791U 99035A 01221.95364609 +.00000421 +00000-0 +75317-4 0 03435
+2 25791 024.9857 261.9471 0011006 037.3315 322.7958 14.40082476112119
+FUSE 1
+1 25791U 99035A 01221.53784190 .00000421 00000-0 75510-4 0 3390
+2 25791 24.9858 264.4889 0010990 32.9399 327.1792 14.40082299112056
+FUSE 1
+1 25791U 99035A 01220.98343688 +.00000390 +00000-0 +65848-4 0 03579
+2 25791 024.9859 267.8782 0010962 026.9957 333.1120 14.40081738111977
+FUSE 1
+1 25791U 99035A 01220.22112886 .00000387 00000-0 64765-4 0 3382
+2 25791 24.9860 272.5393 0010909 18.8496 341.2417 14.40081380111869
+FUSE 1
+1 25791U 99035A 01218.97371408 .00000391 00000-0 65912-4 0 3377
+2 25791 24.9861 280.1628 0010876 5.5029 354.5594 14.40080902111686
+FUSE 1
+1 25791U 99035A 01217.86490136 .00000373 00000-0 60393-4 0 3361
+2 25791 24.9866 286.9411 0010853 353.7666 6.2707 14.40080339111529
+FUSE 1
+1 25791U 99035A 01216.82538872 .00000371 00000-0 59777-4 0 3357
+2 25791 24.9868 293.2962 0010793 342.5968 17.4161 14.40079940111374
+FUSE 1
+1 25791U 99035A 01215.57797329 .00000400 00000-0 68747-4 0 3341
+2 25791 24.9867 300.9214 0010734 329.1452 30.8424 14.40079711111190
+FUSE 1
+1 25791U 99035A 01214.88496511 +.00000411 +00000-0 +72102-4 0 03738
+2 25791 024.9865 305.1569 0010752 321.8056 038.1700 14.40079469111094
+FUSE 1
+1 25791U 99035A 01213.91475370 +.00000418 +00000-0 +74537-4 0 03349
+2 25791 024.9864 311.0878 0010770 311.6786 048.2800 14.40079073110957
+FUSE 1
+1 25791U 99035A 01213.84545284 .00000418 00000-0 74517-4 0 3330
+2 25791 24.9864 311.5114 0010770 310.9520 49.0052 14.40079040110944
+FUSE 1
+1 25791U 99035A 01212.94454257 +.00000434 +00000-0 +79248-4 0 03344
+2 25791 024.9864 317.0188 0010768 301.3288 058.6164 14.40078734110813
+FUSE 1
+1 25791U 99035A 01212.80594067 .00000444 00000-0 82373-4 0 3325
+2 25791 24.9863 317.8657 0010766 299.6889 60.2542 14.40078761110791
+FUSE 1
+1 25791U 99035A 01211.90503055 +.00000468 +00000-0 +90090-4 0 03446
+2 25791 024.9863 323.3726 0010776 290.0365 069.8977 14.40078499110666
+FUSE 1
+1 25791U 99035A 01211.55852704 .00000460 00000-0 87431-4 0 3318
+2 25791 24.9864 325.4904 0010823 286.2525 73.6791 14.40078234110615
+FUSE 1
+1 25791U 99035A 01210.93482022 +.00000472 +00000-0 +91278-4 0 03633
+2 25791 024.9864 329.3017 0010848 279.6419 080.2862 14.40077996110525
+FUSE 1
+1 25791U 99035A 01210.17251264 .00000478 00000-0 93199-4 0 3305
+2 25791 24.9863 333.9619 0010873 271.6318 88.2943 14.40077601110410
+FUSE 1
+1 25791U 99035A 01208.85579991 .00000490 00000-0 96802-4 0 3293
+2 25791 24.9866 342.0099 0010922 257.5431 102.3853 14.40076934110225
+FUSE 1
+1 25791U 99035A 01207.81629030 .00000501 00000-0 10023-3 0 3280
+2 25791 24.9867 348.3635 0010966 246.5884 113.3470 14.40076398110073
+FUSE 1
+1 25791U 99035A 01206.91538249 +.00000508 +00000-0 +10250-3 0 03415
+2 25791 024.9866 353.8713 0010987 237.1497 122.7945 14.40075887109946
+FUSE 1
+1 25791U 99035A 01206.56887963 .00000511 00000-0 10326-3 0 3278
+2 25791 24.9867 355.9893 0011012 233.5318 126.4174 14.40075691109893
+FUSE 1
+1 25791U 99035A 01205.87587337 +.00000527 +00000-0 +10839-3 0 03505
+2 25791 024.9868 000.2251 0011076 226.2868 133.6720 14.40075413109799
+FUSE 1
+1 25791U 99035A 01205.25216864 .00000510 00000-0 10313-3 0 3263
+2 25791 24.9867 4.0363 0011090 219.8115 140.1582 14.40074798109708
+FUSE 1
+1 25791U 99035A 01203.93545728 +.00000516 +00000-0 +10479-3 0 03269
+2 25791 024.9866 012.0811 0011114 206.0591 153.9357 14.40073969109517
+FUSE 1
+1 25791U 99035A 01203.86615663 .00000516 00000-0 10479-3 0 3256
+2 25791 24.9866 12.5045 0011114 205.3331 154.6628 14.40073923109503
+FUSE 1
+1 25791U 99035A 01202.96524958 +.00000508 +00000-0 +10233-3 0 03486
+2 25791 024.9865 018.0111 0011154 196.1382 163.8780 14.40073233109374
+FUSE 1
+1 25791U 99035A 01202.54944641 .00000493 00000-0 97826-4 0 3246
+2 25791 24.9863 20.5527 0011169 191.8050 168.2200 14.40072784109311
+FUSE 1
+1 25791U 99035A 01201.16343360 .00000507 00000-0 10206-3 0 3235
+2 25791 24.9866 29.0225 0011223 177.3906 182.6661 14.40072075109115
+FUSE 1
+1 25791U 99035A 01200.12393049 .00000384 00000-0 63784-4 0 3221
+2 25791 24.9826 35.4045 0011352 165.2759 194.8082 14.40070335108968
+FUSE 1
+1 25791U 99035A 01198.94581712 +.00000454 +00000-0 +85448-4 0 03255
+2 25791 024.9819 042.6054 0011509 153.7866 206.3225 14.40070361108793
+FUSE 1
+1 25791U 99035A 01198.87651654 .00000454 00000-0 85668-4 0 3210
+2 25791 24.9819 43.0290 0011506 153.0511 207.0603 14.40070330108780
+FUSE 1
+1 25791U 99035A 01197.90630513 +.00000543 +00000-0 +11321-3 0 03251
+2 25791 024.9814 048.9614 0011667 143.2067 216.9249 14.40070553108641
+FUSE 1
+1 25791U 99035A 01197.83700416 .00000546 00000-0 11423-3 0 3204
+2 25791 24.9813 49.3856 0011672 142.5933 217.5379 14.40070523108630
+FUSE 1
+1 25791U 99035A 01196.93609183 +.00000693 +00000-0 +16016-3 0 03423
+2 25791 024.9796 054.8902 0011793 132.6084 227.5393 14.40070954108505
+FUSE 1
+1 25791U 99035A 01196.45099063 .00000473 00000-0 91615-4 0 3199
+2 25791 24.9825 57.8656 0011228 128.4789 231.6720 14.40068671108430
+FUSE 1
+1 25791U 99035A 01195.20357322 .00000505 00000-0 10164-3 0 3180
+2 25791 24.9825 65.4916 0011215 116.0156 244.1500 14.40068220108256
+FUSE 1
+1 25791U 99035A 01194.02545613 .00000499 00000-0 99733-4 0 3172
+2 25791 24.9826 72.6920 0011188 103.4129 256.7628 14.40067381108089
+FUSE 1
+1 25791U 99035A 01193.95615541 +.00000494 +00000-0 +98068-4 0 03356
+2 25791 024.9827 073.1157 0011179 102.6649 257.5123 14.40067286108078
+FUSE 1
+1 25791U 99035A 01192.50083132 .00000493 00000-0 97812-4 0 3165
+2 25791 24.9831 82.0131 0011146 87.3221 272.8568 14.40066408107867
+FUSE 1
+1 25791U 99035A 01191.94642156 +.00000499 +00000-0 +99730-4 0 03267
+2 25791 024.9831 085.4021 0011170 081.6595 278.5190 14.40066125107781
+FUSE 1
+1 25791U 99035A 01191.18410683 .00000513 00000-0 10412-3 0 3155
+2 25791 24.9835 90.0635 0011114 74.2217 285.9515 14.40065843107672
+FUSE 1
+1 25791U 99035A 01190.14458616 .00000519 00000-0 10586-3 0 3145
+2 25791 24.9834 96.4153 0011128 63.2236 296.9407 14.40065179107528
+FUSE 1
+1 25791U 99035A 01188.89716000 .00000517 00000-0 10535-3 0 3139
+2 25791 24.9835 104.0390 0011105 50.1547 309.9937 14.40064329107342
+FUSE 1
+1 25791U 99035A 01187.85763598 .00000560 00000-0 11885-3 0 3124
+2 25791 24.9834 110.3927 0011027 39.7903 320.3413 14.40064059107198
+FUSE 1
+1 25791U 99035A 01186.26369845 .00000576 00000-0 12383-3 0 3115
+2 25791 24.9833 120.1320 0011040 23.1413 336.9590 14.40062964106967
+FUSE 1
+1 25791U 99035A 01185.22417234 .00000611 00000-0 13466-3 0 3108
+2 25791 24.9832 126.4851 0010938 12.2821 347.7952 14.40062479106818
+FUSE 1
+1 25791U 99035A 01183.90743981 .00000616 00000-0 13632-3 0 3090
+2 25791 24.9835 134.5338 0011000 358.4299 1.6173 14.40061396106623
+FUSE 1
+1 25791U 99035A 01182.72930922 .00000647 00000-0 14599-3 0 3088
+2 25791 24.9835 141.7349 0010932 346.1083 13.9122 14.40060663106450
+FUSE 1
+1 25791U 99035A 01181.55117807 .00000655 00000-0 14826-3 0 3078
+2 25791 24.9833 148.9349 0010989 333.0109 26.9827 14.40059608106287
+FUSE 1
+1 25791U 99035A 01180.23444311 .00000674 00000-0 15430-3 0 3067
+2 25791 24.9834 156.9835 0010915 318.5214 41.4471 14.40058589106094
+FUSE 1
+1 25791U 99035A 01179.95723625 +.00000660 +00000-0 +14998-3 0 03537
+2 25791 024.9835 158.6778 0010936 315.4784 044.4860 14.40058184106053
+FUSE 1
+1 25791U 99035A 01178.98701077 +.00000700 +00000-0 +16223-3 0 03095
+2 25791 024.9839 164.6103 0010804 304.5310 055.4225 14.40057715105914
+FUSE 1
+1 25791U 99035A 01178.91770917 .00000670 00000-0 15306-3 0 3050
+2 25791 24.9837 165.0340 0010775 303.9328 56.0166 14.40057316105906
+FUSE 1
+1 25791U 99035A 01177.94748394 +.00000667 +00000-0 +15215-3 0 03051
+2 25791 024.9839 170.9631 0010758 293.8032 066.1362 14.40056346105762
+FUSE 1
+1 25791U 99035A 01177.80888028 .00000659 00000-0 14952-3 0 3042
+2 25791 24.9838 171.8101 0010748 292.4036 67.5332 14.40056120105741
+FUSE 1
+1 25791U 99035A 01176.83865444 +.00000669 +00000-0 +15256-3 0 03062
+2 25791 024.9836 177.7390 0010771 281.9230 078.0068 14.40055269105600
+FUSE 1
+1 25791U 99035A 01176.56144703 .00000675 00000-0 15449-3 0 3038
+2 25791 24.9837 179.4333 0010795 278.8637 81.0649 14.40055073105566
+FUSE 1
+1 25791U 99035A 01175.86842919 +.00000678 +00000-0 +15546-3 0 03316
+2 25791 024.9837 183.6698 0010800 271.5427 088.3843 14.40054412105462
+FUSE 1
+1 25791U 99035A 01175.24471298 .00000688 00000-0 15855-3 0 3028
+2 25791 24.9839 187.4824 0010794 264.9104 95.0170 14.40053918105375
+FUSE 1
+1 25791U 99035A 01173.85867780 .00000677 00000-0 15522-3 0 3016
+2 25791 24.9839 195.9535 0010801 250.3967 109.5372 14.40052381105179
+FUSE 1
+1 25791U 99035A 01172.95775496 +.00000670 +00000-0 +15307-3 0 03067
+2 25791 024.9841 201.4598 0010826 240.8926 119.0499 14.40051405105048
+FUSE 1
+1 25791U 99035A 01172.54194415 .00000672 00000-0 15364-3 0 3007
+2 25791 24.9843 204.0010 0010840 236.4724 123.4748 14.40051033104986
+FUSE 1
+1 25791U 99035A 01171.98753138 +.00000679 +00000-0 +15575-3 0 03288
+2 25791 024.9843 207.3895 0010842 230.3514 129.6117 14.40050582104903
+FUSE 1
+1 25791U 99035A 01171.22521133 .00000677 00000-0 15522-3 0 2990
+2 25791 24.9854 212.0560 0010996 222.3356 137.6304 14.40049810104798
+FUSE 1
+1 25791U 99035A 01169.97777976 +.00000651 +00000-0 +14719-3 0 02996
+2 25791 024.9854 219.6805 0010993 209.2640 150.7249 14.40048323104613
+FUSE 1
+1 25791U 99035A 01169.83917607 .00000653 00000-0 14780-3 0 2987
+2 25791 24.9854 220.5274 0010997 207.8311 152.1606 14.40048213104595
+FUSE 1
+1 25791U 99035A 01168.93825267 +.00000639 +00000-0 +14331-3 0 02983
+2 25791 024.9853 226.0330 0011011 198.4101 161.6008 14.40047199104467
+FUSE 1
+1 25791U 99035A 01168.79964884 .00000639 00000-0 14331-3 0 2975
+2 25791 24.9853 226.8798 0011011 196.9581 163.0554 14.40047071104447
+FUSE 1
+1 25791U 99035A 01167.55221537 .00000637 00000-0 14282-3 0 2961
+2 25791 24.9855 234.5040 0011049 184.0993 175.9424 14.40045914104263
+FUSE 1
+1 25791U 99035A 01166.51268687 .00000629 00000-0 14035-3 0 2959
+2 25791 24.9856 240.8573 0011071 173.3506 186.7149 14.40044884104114
+FUSE 1
+1 25791U 99035A 01165.95827450 +.00000603 +00000-0 +13200-3 0 03120
+2 25791 024.9848 244.2600 0010963 166.9546 193.1247 14.40044112104031
+FUSE 1
+1 25791U 99035A 01165.40385861 .00000599 00000-0 13098-3 0 2943
+2 25791 24.9849 247.6487 0010973 161.1937 198.8977 14.40043624103953
+FUSE 1
+1 25791U 99035A 01164.22572358 .00000615 00000-0 13598-3 0 2934
+2 25791 24.9850 254.8490 0011010 149.2494 210.8676 14.40042799103781
+FUSE 1
+1 25791U 99035A 01163.87921276 +.00000615 +00000-0 +13599-3 0 03270
+2 25791 024.9849 256.9662 0011011 145.6235 214.4988 14.40042491103737
+FUSE 1
+1 25791U 99035A 01163.18619226 .00000575 00000-0 12336-3 0 2927
+2 25791 24.9852 261.2039 0011012 139.1112 221.0231 14.40041529103636
+FUSE 1
+1 25791U 99035A 01162.90898327 +.00000573 +00000-0 +12283-3 0 03321
+2 25791 024.9853 262.8977 0011009 136.1629 223.9749 14.40041298103594
+FUSE 1
+1 25791U 99035A 01161.86945008 .00000570 00000-0 12199-3 0 2911
+2 25791 24.9855 269.2523 0011028 125.4435 234.7103 14.40040463103442
+FUSE 1
+1 25791U 99035A 01160.55270529 .00000600 00000-0 13110-3 0 2902
+2 25791 24.9853 277.3011 0011033 112.2693 247.8985 14.40039697103257
+FUSE 1
+1 25791U 99035A 01159.51316909 .00000608 00000-0 13389-3 0 2893
+2 25791 24.9855 283.6566 0011020 101.4944 258.6799 14.40038905103107
+FUSE 1
+1 25791U 99035A 01158.95874900 +.00000619 +00000-0 +13726-3 0 03157
+2 25791 024.9854 287.0455 0011021 095.8528 264.3235 14.40038518103026
+FUSE 1
+1 25791U 99035A 01158.40432836 .00000637 00000-0 14284-3 0 2884
+2 25791 24.9854 290.4346 0011007 89.9818 270.1950 14.40038207102947
+FUSE 1
+1 25791U 99035A 01157.22618367 .00000647 00000-0 14588-3 0 2875
+2 25791 24.9857 297.6350 0011049 77.7985 282.3753 14.40037223102774
+FUSE 1
+1 25791U 99035A 01156.18664290 .00000642 00000-0 14440-3 0 2866
+2 25791 24.9861 303.9893 0011005 67.0287 293.1376 14.40036236102629
+FUSE 1
+1 25791U 99035A 01154.86988814 .00000664 00000-0 15129-3 0 2858
+2 25791 24.9862 312.0359 0010968 53.2775 306.8736 14.40035235102433
+FUSE 1
+1 25791U 99035A 01153.55313207 .00000654 00000-0 14823-3 0 2849
+2 25791 24.9862 320.0822 0010917 39.4182 320.7119 14.40033855102244
+FUSE 1
+1 25791U 99035A 01152.51358604 .00000656 00000-0 14876-3 0 2833
+2 25791 24.9862 326.4348 0010879 28.5266 331.5835 14.40032889102090
+FUSE 1
+1 25791U 99035A 01151.95916093 +.00000658 +00000-0 +14954-3 0 03067
+2 25791 024.9864 329.8227 0010858 022.6676 337.4309 14.40032401102015
+FUSE 1
+1 25791U 99035A 01151.33543277 .00000649 00000-0 14671-3 0 2828
+2 25791 24.9863 333.6343 0010866 15.9419 344.1429 14.40031685101925
+FUSE 1
+1 25791U 99035A 01150.15727791 .00000654 00000-0 14810-3 0 2812
+2 25791 24.9864 340.8337 0010840 3.4915 356.5667 14.40030638101753
+FUSE 1
+1 25791U 99035A 01149.88006493 +.00000653 +00000-0 +14785-3 0 03135
+2 25791 024.9866 342.5280 0010826 000.5019 359.5497 14.40030376101717
+FUSE 1
+1 25791U 99035A 01148.90982283 .00000634 00000-0 14209-3 0 2800
+2 25791 24.9866 348.4566 0010800 350.2840 9.7632 14.40029222101575
+FUSE 1
+1 25791U 99035A 01147.38515028 .00000579 00000-0 12480-3 0 2795
+2 25791 24.9837 357.7948 0010793 333.6467 26.3492 14.40027134101356
+FUSE 1
+1 25791U 99035A 01146.20699331 .00000565 00000-0 12045-3 0 2786
+2 25791 24.9838 4.9959 0010786 321.0840 38.8893 14.40026061101180
+FUSE 1
+1 25791U 99035A 01144.89022932 .00000533 00000-0 11042-3 0 2776
+2 25791 24.9841 13.0436 0010817 306.9215 53.0301 14.40024823100993
+FUSE 1
+1 25791U 99035A 01143.91998144 +.00000546 +00000-0 +11428-3 0 02924
+2 25791 024.9842 018.9724 0010816 296.5378 063.4019 14.40024274100857
+FUSE 1
+1 25791U 99035A 01143.36555441 .00000551 00000-0 11588-3 0 2767
+2 25791 24.9842 22.3601 0010810 290.7426 69.1925 14.40023904100773
+FUSE 1
+1 25791U 99035A 01142.94973432 +.00000553 +00000-0 +11652-3 0 02881
+2 25791 024.9843 024.9015 0010807 286.3744 073.5580 14.40023633100710
+FUSE 1
+1 25791U 99035A 01142.32600379 .00000567 00000-0 12088-3 0 2755
+2 25791 24.9842 28.7136 0010785 279.8487 80.0792 14.40023279100625
+FUSE 1
+1 25791U 99035A 01141.91018440 +.00000540 +00000-0 +11242-3 0 02900
+2 25791 024.9840 031.2547 0010893 276.2467 083.6799 14.40022637100563
+FUSE 1
+1 25791U 99035A 01141.21715079 .00000549 00000-0 11542-3 0 2749
+2 25791 24.9840 35.4898 0010896 268.8475 91.0785 14.40022229100461
+FUSE 1
+1 25791U 99035A 01139.90038775 .00000571 00000-0 12219-3 0 2739
+2 25791 24.9839 43.5397 0010931 255.0386 104.8911 14.40021439100277
+FUSE 1
+1 25791U 99035A 01138.58362425 .00000609 00000-0 13389-3 0 2724
+2 25791 24.9837 51.5882 0011072 241.1629 118.7758 14.40020744100086
+FUSE 1
+1 25791U 99035A 01137.33616481 .00000661 00000-0 15031-3 0 2713
+2 25791 24.9839 59.2112 0011101 227.8811 132.0752 14.40020162 99901
+FUSE 1
+1 25791U 99035A 01136.22731284 .00000674 00000-0 15435-3 0 2700
+2 25791 24.9841 65.9875 0011119 216.3279 143.6473 14.40019220 99747
+FUSE 1
+1 25791U 99035A 01134.97985363 +.00000712 +00000-0 +16613-3 0 02734
+2 25791 024.9840 073.6131 0011195 203.7721 156.2269 14.40018339099566
+FUSE 1
+1 25791U 99035A 01134.91055026 .00000715 00000-0 16725-3 0 2694
+2 25791 24.9839 74.0366 0011202 203.0881 156.9123 14.40018302 99553
+FUSE 1
+1 25791U 99035A 01133.94030404 +.00000743 +00000-0 +17573-3 0 02737
+2 25791 024.9839 079.9663 0011198 193.0427 166.9790 14.40017554099419
+FUSE 1
+1 25791U 99035A 01133.45518076 .00000746 00000-0 17689-3 0 2684
+2 25791 24.9839 82.9302 0011209 188.0450 171.9871 14.40017047 99341
+FUSE 1
+1 25791U 99035A 01132.20772024 .00000785 00000-0 18898-3 0 2676
+2 25791 24.9839 90.5544 0011269 175.2870 184.7740 14.40016047 99160
+FUSE 1
+1 25791U 99035A 01130.96025905 +.00000820 +00000-0 +19980-3 0 02691
+2 25791 024.9841 098.1782 0011296 162.1732 197.9172 14.40014946098983
+FUSE 1
+1 25791U 99035A 01130.89095562 .00000820 00000-0 20001-3 0 2662
+2 25791 24.9841 98.6016 0011296 161.4536 198.6384 14.40014866 98975
+FUSE 1
+1 25791U 99035A 01129.92071030 +.00000847 +00000-0 +20834-3 0 02661
+2 25791 024.9833 104.5520 0011085 151.6354 208.4757 14.40014053098835
+FUSE 1
+1 25791U 99035A 01129.85140680 .00000850 00000-0 20936-3 0 2657
+2 25791 24.9832 104.9757 0011084 150.9394 209.1729 14.40013984 98823
+FUSE 1
+1 25791U 99035A 01128.95046107 +.00000863 +00000-0 +21348-3 0 02704
+2 25791 024.9831 110.4816 0011082 141.5157 218.6142 14.40012890098695
+FUSE 1
+1 25791U 99035A 01128.53463956 .00000867 00000-0 21456-3 0 2640
+2 25791 24.9830 113.0225 0011082 137.1961 222.9409 14.40012343 98632
+FUSE 1
+1 25791U 99035A 01127.98021059 +.00000880 +00000-0 +21866-3 0 02822
+2 25791 024.9832 116.4114 0011088 131.3728 228.7736 14.40011719098555
+FUSE 1
+1 25791U 99035A 01127.21786998 .00000884 00000-0 22005-3 0 2637
+2 25791 24.9831 121.0699 0011080 123.3961 236.7608 14.40010685 98442
+FUSE 1
+1 25791U 99035A 01125.90109773 .00000892 00000-0 22255-3 0 2626
+2 25791 24.9833 129.1184 0011028 109.9749 250.1950 14.40008904 98258
+FUSE 1
+1 25791U 99035A 01124.86153846 .00000895 00000-0 22336-3 0 2612
+2 25791 24.9835 135.4720 0010976 99.2838 260.8908 14.40007464 98102
+FUSE 1
+1 25791U 99035A 01123.82197729 .00000903 00000-0 22598-3 0 2604
+2 25791 24.9836 141.8244 0010956 88.5472 271.6290 14.40006059 97953
+FUSE 1
+1 25791U 99035A 01122.78241421 .00000914 00000-0 22957-3 0 2596
+2 25791 24.9838 148.1778 0010906 77.7606 282.4122 14.40004664 97809
+FUSE 1
+1 25791U 99035A 01121.74284958 .00000909 00000-0 22797-3 0 2588
+2 25791 24.9840 154.5310 0010872 66.8417 293.3235 14.40003100 97659
+FUSE 1
+1 25791U 99035A 01120.98050140 +.00000892 +00000-0 +22245-3 0 02632
+2 25791 024.9840 159.1901 0010848 058.8234 301.3337 14.40001802097545
+FUSE 1
+1 25791U 99035A 01120.56467427 .00000893 00000-0 22276-3 0 2574
+2 25791 24.9840 161.7307 0010845 54.4415 305.7103 14.40001218 97487
+FUSE 1
+1 25791U 99035A 01119.24788803 .00000840 00000-0 20637-3 0 2561
+2 25791 24.9839 169.7779 0010778 40.3623 319.7683 14.39998784 97294
+FUSE 1
+1 25791U 99035A 01117.23804969 .00000814 00000-0 19817-3 0 2547
+2 25791 24.9840 182.0587 0010772 19.4486 340.6431 14.39995823 97003
+FUSE 1
+1 25791U 99035A 01116.96083039 +.00000802 +00000-0 +19449-3 0 02877
+2 25791 024.9843 183.7523 0010778 016.6787 343.4072 14.39995329096960
+FUSE 1
+1 25791U 99035A 01116.19847490 .00001304 00000-0 35116-3 0 2531
+2 25791 24.9827 188.4092 0011139 8.8375 351.2331 14.39996795 96854
+FUSE 1
+1 25791U 99035A 01114.88168133 +.00000626 +00000-0 +13955-3 0 02538
+2 25791 024.9832 196.4565 0011007 354.8618 005.1760 14.39992143096665
+FUSE 1
+1 25791U 99035A 01114.81237588 .00000730 00000-0 17192-3 0 2524
+2 25791 24.9832 196.8805 0010974 353.8797 6.1556 14.39992378 96658
+FUSE 1
+1 25791U 99035A 01113.91141013 +.00001105 +00000-0 +28900-3 0 02583
+2 25791 024.9832 202.3874 0010818 344.5129 015.5072 14.39992088096521
+FUSE 1
+1 25791U 99035A 01113.56488467 .00000804 00000-0 19509-3 0 2514
+2 25791 24.9836 204.5049 0010848 340.9754 19.0347 14.39990691 96476
+FUSE 1
+1 25791U 99035A 01112.87183381 +.00000588 +00000-0 +12770-3 0 02853
+2 25791 024.9838 208.7401 0010866 334.2845 025.7120 14.39989069096372
+FUSE 1
+1 25791U 99035A 01112.24808739 .00000697 00000-0 16161-3 0 2506
+2 25791 24.9837 212.5519 0010856 327.7806 32.2065 14.39988758 96282
+FUSE 1
+1 25791U 99035A 01110.86198210 .00000839 00000-0 20609-3 0 2496
+2 25791 24.9833 221.0217 0010828 312.9646 46.9953 14.39987824 96084
+FUSE 1
+1 25791U 99035A 01109.96101490 +.00000640 +00000-0 +14376-3 0 02662
+2 25791 024.9835 226.5270 0010746 303.7230 056.2253 14.39986069095953
+FUSE 1
+1 25791U 99035A 01109.54518505 .00000698 00000-0 16199-3 0 2483
+2 25791 24.9825 229.0749 0010853 299.3689 60.5757 14.39985563 95896
+FUSE 1
+1 25791U 99035A 01108.92143892 +.00000424 +00000-0 +76456-4 0 02689
+2 25791 024.9835 232.8933 0010773 292.5014 067.4341 14.39984084095805
+FUSE 1
+1 25791U 99035A 01108.43630231 .00000475 00000-0 92307-4 0 2479
+2 25791 24.9841 235.8622 0010842 287.1593 72.7725 14.39984197 95731
+FUSE 1
+1 25791U 99035A 01107.25811420 .00000342 00000-0 50688-4 0 2467
+2 25791 24.9840 243.0654 0010850 274.6194 85.3080 14.39982982 95568
+FUSE 1
+1 25791U 99035A 01106.91158787 +.00000319 +00000-0 +43545-4 0 02816
+2 25791 024.9842 245.1833 0010843 270.9361 088.9901 14.39982821095517
+FUSE 1
+1 25791U 99035A 01105.94131510 +.00000457 +00000-0 +86612-4 0 02469
+2 25791 024.9838 251.1154 0010905 261.3015 098.6260 14.39982811095373
+FUSE 1
+1 25791U 99035A 01105.87200985 .00000459 00000-0 87250-4 0 2454
+2 25791 24.9840 251.5393 0010901 260.6320 99.2952 14.39982811 95366
+FUSE 1
+1 25791U 99035A 01104.55520998 .00001008 00000-0 25888-3 0 2445
+2 25791 24.9829 259.5887 0011021 247.1818 112.7523 14.39983372 95172
+FUSE 1
+1 25791U 99035A 01103.51562954 .00001492 00000-0 40988-3 0 2432
+2 25791 24.9842 265.9425 0010869 234.0542 125.8931 14.39984015 95021
+FUSE 1
+1 25791U 99035A 01102.89188107 +.00001731 +00000-0 +48461-3 0 02649
+2 25791 024.9844 269.7554 0011059 227.9140 132.0419 14.39983703094938
+FUSE 1
+1 25791U 99035A 01102.54535407 .00001893 00000-0 53504-3 0 2429
+2 25791 24.9846 271.8734 0010921 223.7407 136.2232 14.39983757 94883
+FUSE 1
+1 25791U 99035A 01101.92160517 +.00002030 +00000-0 +57800-3 0 02647
+2 25791 024.9848 275.6854 0011217 217.6844 142.2874 14.39982801094794
+FUSE 1
+1 25791U 99035A 01101.57507715 .00002190 00000-0 62781-3 0 2419
+2 25791 24.9854 277.8031 0010956 213.3871 146.5941 14.39983161 94741
+FUSE 1
+1 25791U 99035A 01100.88202474 +.00002253 +00000-0 +64777-3 0 02660
+2 25791 024.9853 282.0379 0011053 206.6572 153.3357 14.39981020094643
+FUSE 1
+1 25791U 99035A 01100.18897006 .00002361 00000-0 68129-3 0 2401
+2 25791 24.9852 286.2722 0011029 198.9302 161.0725 14.39979226 94546
+FUSE 1
+1 25791U 99035A 01099.91174907 +.00002395 +00000-0 +69207-3 0 02750
+2 25791 024.9855 287.9660 0011230 196.5404 163.4735 14.39978461094502
+FUSE 1
+1 25791U 99035A 01098.94147224 +.00002530 +00000-0 +73411-3 0 02421
+2 25791 024.9854 293.8958 0011234 186.4584 173.5772 14.39975567094369
+FUSE 1
+1 25791U 99035A 01098.87216662 .00002543 00000-0 73810-3 0 2399
+2 25791 24.9855 294.3194 0011295 185.6074 174.4304 14.39975420 94358
+FUSE 1
+1 25791U 99035A 01097.55535820 .00002756 00000-0 80493-3 0 2383
+2 25791 24.9857 302.3671 0011209 171.5084 188.5605 14.39971661 94162
+FUSE 1
+1 25791U 99035A 01096.51577572 .00001819 00000-0 51232-3 0 2375
+2 25791 24.9851 308.7196 0011060 159.9502 200.1452 14.39962260 94018
+FUSE 1
+1 25791U 99035A 01095.19896006 .00002137 00000-0 61186-3 0 2366
+2 25791 24.9847 316.7677 0011044 146.2105 213.9107 14.39958939 93821
+FUSE 1
+1 25791U 99035A 01094.92173520 +.00002224 +00000-0 +63882-3 0 02749
+2 25791 024.9845 318.4612 0011055 143.4912 216.6355 14.39958128093784
+FUSE 1
+1 25791U 99035A 01093.95144716 +.00002409 +00000-0 +69674-3 0 02410
+2 25791 024.9843 324.3915 0011216 133.1891 226.9554 14.39954609093645
+FUSE 1
+1 25791U 99035A 01093.88214064 .00002499 00000-0 72482-3 0 2359
+2 25791 24.9842 324.8152 0011197 132.3778 227.7676 14.39954543 93635
+FUSE 1
+1 25791U 99035A 01092.91184954 +.00003251 +00000-0 +95975-3 0 02557
+2 25791 024.9837 330.7471 0011246 122.5955 237.5655 14.39950967093498
+FUSE 1
+1 25791U 99035A 01091.17917824 .00003186 00000-0 93968-3 0 2337
+2 25791 24.9835 341.3417 0011318 105.3746 254.8012 14.39939177 93243
+FUSE 1
+1 25791U 99035A 01090.13956723 .00002972 00000-0 87297-3 0 2322
+2 25791 24.9838 347.6958 0011329 94.7440 265.4361 14.39932401 93090
+FUSE 1
+1 25791U 99035A 01088.96133501 +.00002837 +00000-0 +83108-3 0 02339
+2 25791 024.9838 354.9011 0011327 083.2313 276.9488 14.39925595092925
+FUSE 1
+1 25791U 99035A 01088.89202703 .00002815 00000-0 82399-3 0 2317
+2 25791 24.9839 355.3247 0011337 82.5196 277.6602 14.39925159 92915
+FUSE 1
+1 25791U 99035A 01087.92171315 +.00001946 +00000-0 +55260-3 0 02360
+2 25791 024.9847 001.2552 0011205 072.8181 287.3553 14.39918251092772
+FUSE 1
+1 25791U 99035A 01087.85240649 .00001697 00000-0 47485-3 0 2306
+2 25791 24.9849 1.6791 0011193 72.3247 287.8536 14.39917141 92769
+FUSE 1
+1 25791U 99035A 01082.51561712 .00000996 00000-0 25569-3 0 2266
+2 25791 24.9850 34.2906 0010848 15.4515 344.6316 14.39903030 91997
+FUSE 1
+1 25791U 99035A 01081.96114279 +.00000895 +00000-0 +22411-3 0 02357
+2 25791 024.9850 037.6798 0010802 008.8785 351.1917 14.39901631091915
+FUSE 1
+1 25791U 99035A 01081.33735740 .00000887 00000-0 22159-3 0 2259
+2 25791 24.9850 41.4919 0010779 2.2856 357.7699 14.39900735 91826
+FUSE 1
+1 25791U 99035A 01080.92150068 +.00000863 +00000-0 +21388-3 0 02333
+2 25791 024.9849 044.0329 0010784 357.8343 002.2118 14.39899989091763
+FUSE 1
+1 25791U 99035A 01080.22840542 .00000844 00000-0 20810-3 0 2247
+2 25791 24.9848 48.2669 0010801 350.7139 9.3171 14.39898909 91667
+FUSE 1
+1 25791U 99035A 01079.95116702 +.00000849 +00000-0 +20965-3 0 02537
+2 25791 024.9848 049.9618 0010808 347.8135 012.2110 14.39898588091624
+FUSE 1
+1 25791U 99035A 01078.98083194 +.00000863 +00000-0 +21409-3 0 02245
+2 25791 024.9850 055.8907 0010787 337.5934 022.4103 14.39897482091484
+FUSE 1
+1 25791U 99035A 01078.91152241 .00000863 00000-0 21400-3 0 2238
+2 25791 24.9849 56.3142 0010787 336.8603 23.1424 14.39897379 91472
+FUSE 1
+1 25791U 99035A 01077.94118795 +.00000865 +00000-0 +21466-3 0 02296
+2 25791 024.9846 062.2492 0010753 326.7694 033.2147 14.39896112091337
+FUSE 1
+1 25791U 99035A 01077.52532984 .00000862 00000-0 21353-3 0 2225
+2 25791 24.9844 64.7900 0010747 322.4604 37.5154 14.39895491 91270
+FUSE 1
+1 25791U 99035A 01076.48568446 .00000836 00000-0 20539-3 0 2216
+2 25791 24.9842 71.1417 0010785 311.0390 48.9185 14.39893786 91120
+FUSE 1
+1 25791U 99035A 01075.23810913 .00000832 00000-0 20428-3 0 2209
+2 25791 24.9846 78.7649 0010811 297.7413 62.1997 14.39892127 90946
+FUSE 1
+1 25791U 99035A 01073.99053383 +.00000816 +00000-0 +19913-3 0 02209
+2 25791 024.9845 086.3872 0010797 284.5974 075.3336 14.39890279090766
+FUSE 1
+1 25791U 99035A 01073.92122749 .00000816 00000-0 19910-3 0 2190
+2 25791 24.9845 86.8106 0010797 283.8732 76.0753 14.39890190 90757
+FUSE 1
+1 25791U 99035A 01072.88158105 +.00000784 +00000-0 +18923-3 0 02220
+2 25791 024.9830 093.1816 0010740 272.7044 087.2233 14.39888516090601
+FUSE 1
+1 25791U 99035A 01072.53503188 .00000787 00000-0 19030-3 0 2185
+2 25791 24.9830 95.2987 0010757 268.9911 90.9362 14.39888127 90557
+FUSE 1
+1 25791U 99035A 01071.98055429 +.00000763 +00000-0 +18258-3 0 02201
+2 25791 024.9833 098.6880 0010753 263.1759 096.7529 14.39887246090473
+FUSE 1
+1 25791U 99035A 01071.49538471 .00000791 00000-0 19130-3 0 2177
+2 25791 24.9831 101.6522 0010849 257.9268 102.0023 14.39886914 90405
+FUSE 1
+1 25791U 99035A 01070.94090658 +.00000785 +00000-0 +18959-3 0 02469
+2 25791 024.9831 105.0409 0010844 252.1036 107.8288 14.39886182090326
+FUSE 1
+1 25791U 99035A 01070.24780824 .00000809 00000-0 19709-3 0 2161
+2 25791 24.9831 109.2771 0010871 244.6528 115.2853 14.39885565 90220
+FUSE 1
+1 25791U 99035A 01069.20816158 .00000791 00000-0 19153-3 0 2157
+2 25791 24.9832 115.6328 0011054 233.9117 126.0367 14.39884078 90070
+FUSE 1
+1 25791U 99035A 01067.82196489 .00000809 00000-0 19705-3 0 2143
+2 25791 24.9830 124.1033 0011113 218.9869 140.9835 14.39882486 89871
+FUSE 1
+1 25791U 99035A 01066.64369761 +.00000799 +00000-0 +19374-3 0 02169
+2 25791 024.9830 131.3033 0011151 207.0123 152.9803 14.39880895089707
+FUSE 1
+1 25791U 99035A 01066.50507788 .00000796 00000-0 19291-3 0 2139
+2 25791 24.9830 132.1500 0011152 205.5911 154.4046 14.39880702 89684
+FUSE 1
+1 25791U 99035A 01065.88128936 +.00000790 +00000-0 +19103-3 0 02397
+2 25791 024.9831 135.9622 0011122 198.9598 161.0503 14.39879873089593
+FUSE 1
+1 25791U 99035A 01065.18819067 .00000783 00000-0 18885-3 0 2121
+2 25791 24.9834 140.1989 0011152 191.7198 168.3068 14.39878991 89495
+FUSE 1
+1 25791U 99035A 01064.91095089 +.00000771 +00000-0 +18518-3 0 02446
+2 25791 024.9835 141.8928 0011125 188.7032 171.3283 14.39878539089457
+FUSE 1
+1 25791U 99035A 01063.87130138 .00000765 00000-0 18340-3 0 2115
+2 25791 24.9836 148.2465 0011125 177.9406 182.1148 14.39877264 89308
+FUSE 1
+1 25791U 99035A 01063.87130137 +.00000767 +00000-0 +18406-3 0 02120
+2 25791 024.9835 148.2460 0011132 177.9393 182.1166 14.39877276089308
+FUSE 1
+1 25791U 99035A 01062.90096058 +.00000769 +00000-0 +18444-3 0 02210
+2 25791 024.9839 154.1757 0011132 167.8039 192.2735 14.39876200089166
+FUSE 1
+1 25791U 99035A 01062.55441017 .00000773 00000-0 18590-3 0 2105
+2 25791 24.9841 156.2936 0011137 164.3299 195.7558 14.39875851 89113
+FUSE 1
+1 25791U 99035A 01061.30682837 .00000772 00000-0 18556-3 0 2093
+2 25791 24.9841 163.9191 0011157 150.7881 209.3252 14.39874318 88938
+FUSE 1
+1 25791U 99035A 01060.82165726 +.00000760 +00000-0 +18192-3 0 02488
+2 25791 024.9843 166.8839 0011144 145.5272 214.5963 14.39873647088866
+FUSE 1
+1 25791U 99035A 01059.92062424 +.00000739 +00000-0 +17528-3 0 02194
+2 25791 024.9846 172.3899 0011179 135.9727 224.1680 14.39872415088734
+FUSE 1
+1 25791U 99035A 01059.57407284 .00000713 00000-0 16698-3 0 2089
+2 25791 24.9853 174.5090 0011130 132.3934 227.7515 14.39871839 88686
+FUSE 1
+1 25791U 99035A 01058.25717454 .00000711 00000-0 16656-3 0 2077
+2 25791 24.9850 182.5567 0011163 119.2623 240.9005 14.39870406 88495
+FUSE 1
+1 25791U 99035A 01057.91062171 +.00000714 +00000-0 +16747-3 0 02319
+2 25791 024.9852 184.6743 0011160 115.8000 244.3659 14.39870084088444
+FUSE 1
+1 25791U 99035A 01056.87096351 .00000689 00000-0 15951-3 0 2069
+2 25791 24.9851 191.0276 0011173 104.7434 255.4312 14.39868715 88298
+FUSE 1
+1 25791U 99035A 01055.90061376 +.00000679 +00000-0 +15637-3 0 02285
+2 25791 024.9850 196.9579 0011170 094.7617 265.4158 14.39867625088158
+FUSE 1
+1 25791U 99035A 01055.55406001 .00000689 00000-0 15968-3 0 2057
+2 25791 24.9853 199.0771 0011176 91.3496 268.8293 14.39867412 88109
+FUSE 1
+1 25791U 99035A 01054.23715345 .00000689 00000-0 15972-3 0 2049
+2 25791 24.9854 207.1235 0011152 77.7001 282.4754 14.39866067 87917
+FUSE 1
+1 25791U 99035A 01053.89059839 +.00000696 +00000-0 +16187-3 0 02158
+2 25791 024.9856 209.2409 0011136 074.1479 286.0253 14.39865797087864
+FUSE 1
+1 25791U 99035A 01052.92024384 +.00000702 +00000-0 +16372-3 0 02040
+2 25791 024.9854 215.1686 0011139 064.1094 296.0556 14.39864826087724
+FUSE 1
+1 25791U 99035A 01052.85093275 .00000705 00000-0 16455-3 0 2031
+2 25791 24.9853 215.5920 0011131 63.4459 296.7188 14.39864778 87710
+FUSE 1
+1 25791U 99035A 01051.88057587 +.00000742 +00000-0 +17626-3 0 02031
+2 25791 024.9846 221.5212 0010994 053.4019 306.7497 14.39864094087570
+FUSE 1
+1 25791U 99035A 01049.17743500 .00000805 00000-0 19598-3 0 2004
+2 25791 24.9852 238.0376 0010943 24.9759 335.1274 14.39861598 87181
+FUSE 1
+1 25791U 99035A 01048.13776370 .00000818 00000-0 20021-3 0 1994
+2 25791 24.9855 244.3897 0010946 14.2126 345.8687 14.39860443 87033
+FUSE 1
+1 25791U 99035A 01046.95946808 +.00000826 +00000-0 +20265-3 0 02009
+2 25791 024.9856 251.5883 0010925 001.7292 358.3251 14.39859035086862
+FUSE 1
+1 25791U 99035A 01046.89015657 .00000828 00000-0 20328-3 0 1989
+2 25791 24.9856 252.0117 0010921 1.0228 359.0304 14.39858972 86851
+FUSE 1
+1 25791U 99035A 01045.91979473 +.00000825 +00000-0 +20234-3 0 02104
+2 25791 024.9857 257.9395 0010895 350.7865 009.2444 14.39857693086718
+FUSE 1
+1 25791U 99035A 01045.57323730 .00000822 00000-0 20128-3 0 1978
+2 25791 24.9855 260.0575 0010891 347.1542 12.8705 14.39857185 86669
+FUSE 1
+1 25791U 99035A 01044.32563210 .00000852 00000-0 21070-3 0 1968
+2 25791 24.9845 267.6885 0010940 335.0275 24.9843 14.39855877 86482
+FUSE 1
+1 25791U 99035A 01043.90976161 +.00000818 +00000-0 +19993-3 0 02047
+2 25791 024.9856 270.2365 0010879 331.1039 028.8868 14.39855093086427
+FUSE 1
+1 25791U 99035A 01043.21664491 .00000820 00000-0 20056-3 0 1955
+2 25791 24.9857 274.4720 0010879 323.9471 36.0302 14.39854225 86327
+FUSE 1
+1 25791U 99035A 01042.93939835 +.00000809 +00000-0 +19728-3 0 02345
+2 25791 024.9860 276.1661 0010879 321.0294 038.9430 14.39853798086288
+FUSE 1
+1 25791U 99035A 01041.89972384 .00000762 00000-0 18265-3 0 1943
+2 25791 24.9864 282.5199 0010886 310.1836 49.7717 14.39852068 86139
+FUSE 1
+1 25791U 99035A 01040.86004627 .00000786 00000-0 18998-3 0 1933
+2 25791 24.9864 288.8712 0010909 298.1189 61.8216 14.39851115 85984
+FUSE 1
+1 25791U 99035A 01039.88968203 +.00000776 +00000-0 +18695-3 0 01946
+2 25791 024.9866 294.8003 0010918 287.8124 072.1191 14.39849851085846
+FUSE 1
+1 25791U 99035A 01039.54312320 .00000778 00000-0 18759-3 0 1923
+2 25791 24.9865 296.9171 0010912 284.1925 75.7371 14.39849453 85798
+FUSE 1
+1 25791U 99035A 01038.91931566 +.00000841 +00000-0 +20715-3 0 01973
+2 25791 024.9853 300.7300 0011058 276.2116 083.7128 14.39849226085707
+FUSE 1
+1 25791U 99035A 01038.36482175 .00000851 00000-0 21041-3 0 1917
+2 25791 24.9852 304.1176 0011034 270.4549 89.4688 14.39848568 85628
+FUSE 1
+1 25791U 99035A 01037.94895133 +.00000854 +00000-0 +21128-3 0 02024
+2 25791 024.9850 306.6578 0011082 266.4454 093.4786 14.39848015085566
+FUSE 1
+1 25791U 99035A 01037.18652191 .00000871 00000-0 21669-3 0 1900
+2 25791 24.9854 311.3163 0011114 258.2637 101.6623 14.39847183 85456
+FUSE 1
+1 25791U 99035A 01035.93891068 +.00000893 +00000-0 +22356-3 0 01974
+2 25791 024.9856 318.9409 0011155 245.1344 114.8003 14.39845662085277
+FUSE 1
+1 25791U 99035A 01035.86959892 .00000895 00000-0 22415-3 0 1895
+2 25791 24.9856 319.3643 0011153 244.4229 115.5125 14.39845576 85260
+FUSE 1
+1 25791U 99035A 01034.96854630 +.00000904 +00000-0 +22698-3 0 02030
+2 25791 024.9856 324.8713 0011214 234.8399 125.1056 14.39844383085139
+FUSE 1
+1 25791U 99035A 01034.48336452 .00000891 00000-0 22284-3 0 1882
+2 25791 24.9853 327.8353 0011183 229.6286 130.3245 14.39843518 85060
+FUSE 1
+1 25791U 99035A 01033.23575272 .00000882 00000-0 22011-3 0 1876
+2 25791 24.9856 335.4581 0011214 216.6240 143.3500 14.39841675 84881
+FUSE 1
+1 25791U 99035A 01031.91882870 .00000844 00000-0 20813-3 0 1869
+2 25791 24.9858 343.5045 0011276 203.2127 156.7872 14.39839469 84699
+FUSE 1
+1 25791U 99035A 01031.91882869 +.00000845 +00000-0 +20836-3 0 01874
+2 25791 024.9858 343.5045 0011276 203.2090 156.7909 14.39839478084699
+FUSE 1
+1 25791U 99035A 01030.94846209 +.00000841 +00000-0 +20712-3 0 01918
+2 25791 024.9858 349.4319 0011289 193.2674 166.7539 14.39838132084559
+FUSE 1
+1 25791U 99035A 01030.46327849 .00000841 00000-0 20740-3 0 1853
+2 25791 24.9859 352.3959 0011304 188.2132 171.8192 14.39837508 84484
+FUSE 1
+1 25791U 99035A 01029.97809487 +.00000835 +00000-0 +20546-3 0 01981
+2 25791 024.9857 355.3599 0011303 183.2284 176.8152 14.39836776084417
+FUSE 1
+1 25791U 99035A 01029.21566280 .00000836 00000-0 20576-3 0 1848
+2 25791 24.9858 0.0180 0011350 175.3074 184.7541 14.39835807 84301
+FUSE 1
+1 25791U 99035A 01028.93841499 +.00000830 +00000-0 +20392-3 0 02294
+2 25791 024.9857 001.7120 0011345 172.4854 187.5833 14.39835361084265
+FUSE 1
+1 25791U 99035A 01027.96804596 +.00000821 +00000-0 +20111-3 0 01864
+2 25791 024.9857 007.6404 0011373 162.4249 197.6654 14.39833987084123
+FUSE 1
+1 25791U 99035A 01026.85905350 .00000774 00000-0 18631-3 0 1828
+2 25791 24.9845 14.4272 0011225 151.2576 208.8553 14.39832070 83960
+FUSE 1
+1 25791U 99035A 01025.95799395 +.00000773 +00000-0 +18616-3 0 01909
+2 25791 024.9845 019.9320 0011218 141.9876 218.1434 14.39830995083837
+FUSE 1
+1 25791U 99035A 01025.47280699 .00000781 00000-0 18854-3 0 1811
+2 25791 24.9846 22.8964 0011235 137.2317 222.9063 14.39830514 83762
+FUSE 1
+1 25791U 99035A 01024.91830785 +.00000785 +00000-0 +18987-3 0 01952
+2 25791 024.9848 026.2846 0011214 131.5244 228.6226 14.39829899083683
+FUSE 1
+1 25791U 99035A 01024.22518426 .00000758 00000-0 18147-3 0 1803
+2 25791 24.9850 30.5196 0011218 123.7953 236.3624 14.39828802 83586
+FUSE 1
+1 25791U 99035A 01022.97755790 +.00000765 +00000-0 +18342-3 0 01805
+2 25791 024.9847 038.1420 0011197 110.9464 249.2242 14.39827391083409
+FUSE 1
+1 25791U 99035A 01022.90824523 .00000765 00000-0 18346-3 0 1791
+2 25791 24.9847 38.5654 0011197 110.2109 249.9602 14.39827310 83397
+FUSE 1
+1 25791U 99035A 01021.93786714 +.00000792 +00000-0 +19214-3 0 01821
+2 25791 024.9847 044.4944 0011176 100.2360 259.9412 14.39826436083253
+FUSE 1
+1 25791U 99035A 01021.52199043 .00000791 00000-0 19188-3 0 1783
+2 25791 24.9847 47.0345 0011184 95.8875 264.2905 14.39825918 83199
+FUSE 1
+1 25791U 99035A 01020.48229781 .00000782 00000-0 18904-3 0 1774
+2 25791 24.9841 53.3876 0011058 84.9507 275.2262 14.39824524 83047
+FUSE 1
+1 25791U 99035A 01019.23466394 .00000810 00000-0 19778-3 0 1769
+2 25791 24.9842 61.0115 0011055 71.9716 288.1993 14.39823278 82863
+FUSE 1
+1 25791U 99035A 01018.81878536 +.00000815 +00000-0 +19923-3 0 02046
+2 25791 024.9840 063.5519 0011051 067.5973 292.5699 14.39822788082809
+FUSE 1
+1 25791U 99035A 01017.84840102 .00000828 00000-0 20329-3 0 1759
+2 25791 24.9838 69.4799 0011044 57.4205 302.7356 14.39821674 82660
+FUSE 1
+1 25791U 99035A 01016.80870221 +.00000844 +00000-0 +20844-3 0 01759
+2 25791 024.9839 075.8311 0011035 046.6049 313.5376 14.39820510082512
+FUSE 1
+1 25791U 99035A 01012.85783892 .00000765 00000-0 18364-3 0 1719
+2 25791 24.9824 99.9904 0011095 5.3964 354.6663 14.39814661 81946
+FUSE 1
+1 25791U 99035A 01011.81813392 .00000754 00000-0 18014-3 0 1702
+2 25791 24.9823 106.3421 0011120 354.5641 5.4745 14.39813318 81795
+FUSE 1
+1 25791U 99035A 01010.84774202 +.00000728 +00000-0 +17200-3 0 01820
+2 25791 024.9826 112.2708 0011146 344.3870 015.6294 14.39811988081659
+FUSE 1
+1 25791U 99035A 01010.57048690 .00000725 00000-0 17100-3 0 1696
+2 25791 24.9825 113.9647 0011158 341.3954 18.6145 14.39811641 81611
+FUSE 1
+1 25791U 99035A 01009.87734870 +.00000732 +00000-0 +17321-3 0 02008
+2 25791 024.9824 118.1992 0011164 334.0178 025.9768 14.39810940081516
+FUSE 1
+1 25791U 99035A 01006.55028272 .00000853 00000-0 21119-3 0 1667
+2 25791 24.9829 138.5275 0011161 298.7980 61.1405 14.39808266 81030
+FUSE 1
+1 25791U 99035A 01005.23331831 .00000949 00000-0 24121-3 0 1650
+2 25791 24.9829 146.5736 0011130 284.7867 75.1402 14.39807380 80842
+FUSE 1
+1 25791U 99035A 01004.95606288 +.00000961 +00000-0 +24508-3 0 01933
+2 25791 024.9830 148.2673 0011129 281.7309 078.1948 14.39807093080804
+FUSE 1
+1 25791U 99035A 01004.12429643 .00001014 00000-0 26161-3 0 1645
+2 25791 24.9831 153.3490 0011081 272.9218 87.0015 14.39806304 80681
+FUSE 1
+1 25791U 99035A 01003.91635493 +.00001024 +00000-0 +26479-3 0 02041
+2 25791 024.9833 154.6194 0011082 270.5710 089.3526 14.39806079080658
+FUSE 1
+1 25791U 99035A 01002.94596086 +.00001080 +00000-0 +28217-3 0 01657
+2 25791 024.9835 160.5480 0011065 260.2028 099.7226 14.39805000080513
+FUSE 1
+1 25791U 99035A 01002.87664699 .00001085 00000-0 28401-3 0 1633
+2 25791 24.9835 160.9715 0011055 259.4691 100.4567 14.39804944 80506
+FUSE 1
+1 25791U 99035A 01001.90625279 +.00001148 +00000-0 +30354-3 0 01851
+2 25791 024.9836 166.9004 0011074 249.1527 110.7793 14.39803819080368
+FUSE 1
+1 25791U 99035A 01001.55968328 .00001172 00000-0 31103-3 0 1622
+2 25791 24.9835 169.0177 0011071 245.6535 114.2814 14.39803412 80316
+FUSE 1
+1 25791U 99035A 00366.24272051 .00001201 00000-0 32013-3 0 1615
+2 25791 24.9835 177.0632 0011054 231.9139 128.0369 14.39801117 80127
+FUSE 1
+1 25791U 99035A 00365.13370179 .00001276 00000-0 34372-3 0 1603
+2 25791 24.9782 183.8601 0011264 220.6704 139.2961 14.39798988 79968
+FUSE 1
+1 25791U 99035A 00363.88605187 .00001279 00000-0 34462-3 0 1594
+2 25791 24.9781 191.4825 0011236 207.4675 152.5240 14.39796242 79788
+FUSE 1
+1 25791U 99035A 00362.91565615 +.00001282 +00000-0 +34567-3 0 01880
+2 25791 024.9781 197.4116 0011250 197.2959 162.7167 14.39794117079649
+FUSE 1
+1 25791U 99035A 00361.52937650 .00001173 00000-0 31161-3 0 1570
+2 25791 24.9788 205.8833 0011253 183.0025 177.0420 14.39790123 79448
+FUSE 1
+1 25791U 99035A 00360.21240650 .00001095 00000-0 28697-3 0 1564
+2 25791 24.9795 213.9300 0011256 169.4207 190.6539 14.39786866 79258
+FUSE 1
+1 25791U 99035A 00358.89543401 .00000997 00000-0 25633-3 0 1551
+2 25791 24.9802 221.9784 0011166 156.0199 204.0842 14.39783673 79063
+FUSE 1
+1 25791U 99035A 00357.57846016 .00000809 00000-0 19747-3 0 1543
+2 25791 24.9811 230.0287 0011220 142.5559 217.5744 14.39779898 78875
+FUSE 1
+1 25791U 99035A 00356.33079409 .00000742 00000-0 17656-3 0 1532
+2 25791 24.9815 237.6510 0011207 129.3758 230.7742 14.39777765 78696
+FUSE 1
+1 25791U 99035A 00355.91490500 +.00000715 +00000-0 +16811-3 0 01738
+2 25791 024.9818 240.1930 0011125 125.1559 234.9994 14.39777043078634
+FUSE 1
+1 25791U 99035A 00355.22175552 .00000689 00000-0 15980-3 0 1522
+2 25791 24.9818 244.4279 0011116 117.9072 242.2571 14.39776049 78533
+FUSE 1
+1 25791U 99035A 00354.94449551 +.00000671 +00000-0 +15421-3 0 01715
+2 25791 024.9820 246.1228 0011092 115.1399 245.0262 14.39775609078498
+FUSE 1
+1 25791U 99035A 00354.18203097 .00000667 00000-0 15302-3 0 1515
+2 25791 24.9821 250.7805 0011090 107.2769 252.9059 14.39774846 78383
+FUSE 1
+1 25791U 99035A 00353.14230184 .00000588 00000-0 12827-3 0 1507
+2 25791 24.9841 257.1312 0011153 94.7945 265.3836 14.39773357 78236
+FUSE 1
+1 25791U 99035A 00351.89462457 .00000618 00000-0 13768-3 0 1494
+2 25791 24.9843 264.7546 0011143 81.4463 278.7305 14.39772637 78057
+FUSE 1
+1 25791U 99035A 00350.57762798 .00000713 00000-0 16757-3 0 1485
+2 25791 24.9838 272.8003 0011117 67.5108 292.6555 14.39772305 77863
+FUSE 1
+1 25791U 99035A 00349.95378601 +.00000801 +00000-0 +19521-3 0 01751
+2 25791 024.9839 276.6107 0011037 061.1524 299.0082 14.39772533077773
+FUSE 1
+1 25791U 99035A 00348.91404926 +.00000938 +00000-0 +23822-3 0 01543
+2 25791 024.9841 282.9613 0011060 050.5076 309.6402 14.39772572077629
+FUSE 1
+1 25791U 99035A 00348.22089271 .00000955 00000-0 24346-3 0 1472
+2 25791 24.9841 287.1948 0011058 43.2638 316.8736 14.39771669 77522
+FUSE 1
+1 25791U 99035A 00347.94362883 +.00001009 +00000-0 +26044-3 0 01831
+2 25791 024.9842 288.8885 0011102 040.6503 319.4819 14.39771783077486
+FUSE 1
+1 25791U 99035A 00344.20056550 .00001466 00000-0 40388-3 0 1450
+2 25791 24.9857 311.7525 0010921 1.7998 358.2548 14.39768887 76944
+FUSE 1
+1 25791U 99035A 00342.95287422 +.00001623 +00000-0 +45287-3 0 02453
+2 25791 024.9861 319.3741 0010868 348.9036 011.1207 14.39767344076766
+FUSE 1
+1 25791U 99035A 00341.91313263 +.00001697 +00000-0 +47635-3 0 02169
+2 25791 024.9862 325.7251 0010827 338.0727 021.9314 14.39765205076612
+FUSE 1
+1 25791U 99035A 00340.80407309 +.00001773 +00000-0 +50001-3 0 01795
+2 25791 024.9865 332.4995 0010780 326.3093 033.6722 14.39762765076452
+FUSE 1
+1 25791U 99035A 00339.97228129 +.00001440 +00000-0 +39551-3 0 01453
+2 25791 024.9788 337.5913 0010715 317.2047 042.7636 14.39758312076333
+FUSE 1
+1 25791U 99035A 00339.90296490 .00001431 00000-0 39277-3 0 1446
+2 25791 24.9788 338.0153 0010711 316.5102 43.4556 14.39758072 76326
+FUSE 1
+1 25791U 99035A 00338.93253567 +.00001650 +00000-0 +46156-3 0 01892
+2 25791 024.9780 343.9450 0010727 305.4403 054.5107 14.39756594076187
+FUSE 1
+1 25791U 99035A 00337.89278976 +.00002012 +00000-0 +57514-3 0 01474
+2 25791 024.9771 350.3001 0010560 294.2116 065.7285 14.39754923076031
+FUSE 1
+1 25791U 99035A 00337.54620726 .00002120 00000-0 60886-3 0 1432
+2 25791 24.9769 352.4170 0010591 290.1130 69.8236 14.39754084 75985
+FUSE 1
+1 25791U 99035A 00336.78372846 +.00002078 +00000-0 +59583-3 0 02103
+2 25791 024.9767 357.0797 0010598 283.2388 076.6938 14.39750755075878
+FUSE 1
+1 25791U 99035A 00335.81329748 +.00001963 +00000-0 +55983-3 0 01784
+2 25791 024.9768 003.0088 0010682 272.4500 087.4788 14.39746543075738
+FUSE 1
+1 25791U 99035A 00332.55541084 .00001441 00000-0 39598-3 0 1416
+2 25791 24.9789 22.9137 0010823 238.8335 121.1112 14.39732709 75269
+FUSE 1
+1 25791U 99035A 00329.50545449 .00001099 00000-0 28863-3 0 1407
+2 25791 24.9807 41.5484 0010919 206.6216 153.3741 14.39723397 74828
+FUSE 1
+1 25791U 99035A 00326.80207218 .00000755 00000-0 18065-3 0 1395
+2 25791 24.9826 58.0674 0010967 178.4838 181.5705 14.39716699 74439
+FUSE 1
+1 25791U 99035A 00325.90094187 +.00000678 +00000-0 +15666-3 0 02663
+2 25791 024.9830 063.5734 0010889 169.1263 190.9481 14.39715100074301
+FUSE 1
+1 25791U 99035A 00324.86117451 +.00000608 +00000-0 +13450-3 0 02311
+2 25791 024.9833 069.9269 0010882 158.3926 201.7040 14.39713575074155
+FUSE 1
+1 25791U 99035A 00323.96004177 +.00000488 +00000-0 +96967-4 0 01894
+2 25791 024.9842 075.4361 0010837 150.2956 209.8168 14.39712104074027
+FUSE 1
+1 25791U 99035A 00322.92027010 +.00000542 +00000-0 +11394-3 0 01510
+2 25791 024.9842 081.7899 0010800 140.3373 219.7924 14.39711850073875
+FUSE 1
+1 25791U 99035A 00322.57367987 .00000544 00000-0 11471-3 0 1384
+2 25791 24.9842 83.9087 0010770 137.0085 223.1269 14.39711602 73828
+FUSE 1
+1 25791U 99035A 00321.88049734 +.00000639 +00000-0 +14444-3 0 02068
+2 25791 024.9838 088.1431 0010747 130.4414 229.7025 14.39711664073729
+FUSE 1
+1 25791U 99035A 00319.45435949 .00001051 00000-0 27399-3 0 1370
+2 25791 24.9822 102.9641 0011109 102.6166 257.5577 14.39710812 73374
+FUSE 1
+1 25791U 99035A 00318.83049407 +.00001135 +00000-0 +30023-3 0 02126
+2 25791 024.9820 106.7751 0011100 096.2751 263.9015 14.39710072073281
+FUSE 1
+1 25791U 99035A 00317.92935383 +.00001328 +00000-0 +36094-3 0 01927
+2 25791 024.9815 112.2808 0011081 086.9676 273.2095 14.39708951073151
+FUSE 1
+1 25791U 99035A 00316.95889405 +.00001476 +00000-0 +40722-3 0 01547
+2 25791 024.9811 118.2117 0011162 076.8388 283.3367 14.39707302073012
+FUSE 1
+1 25791U 99035A 00316.54298192 .00001536 00000-0 42622-3 0 1367
+2 25791 24.9808 120.7548 0011167 72.5609 287.6119 14.39706598 72958
+FUSE 1
+1 25791U 99035A 00312.17588299 .00001526 00000-0 42309-3 0 1352
+2 25791 24.9810 147.4346 0011047 26.6311 333.4765 14.39694429 72327
+FUSE 1
+1 25791U 99035A 00311.89860506 +.00001531 +00000-0 +42464-3 0 02432
+2 25791 024.9811 149.1285 0011021 023.7582 336.3433 14.39693742072285
+FUSE 1
+1 25791U 99035A 00310.92813172 +.00001533 +00000-0 +42529-3 0 02234
+2 25791 024.9811 155.0570 0011011 013.6669 346.4135 14.39691108072141
+FUSE 1
+1 25791U 99035A 00309.95765612 +.00001545 +00000-0 +42918-3 0 01953
+2 25791 024.9811 160.9853 0010987 003.5007 356.5574 14.39688573072001
+FUSE 1
+1 25791U 99035A 00308.91785913 +.00001558 +00000-0 +43320-3 0 01631
+2 25791 024.9811 167.3377 0010936 352.6420 007.3927 14.39685825071856
+FUSE 1
+1 25791U 99035A 00307.94738084 .00001523 00000-0 42238-3 0 1347
+2 25791 24.9813 173.2666 0010902 342.2944 17.7187 14.39682876 71715
+FUSE 1
+1 25791U 99035A 00306.90758062 +.00001494 +00000-0 +41322-3 0 02161
+2 25791 024.9816 179.6189 0010843 331.2370 028.7545 14.39679852071566
+FUSE 1
+1 25791U 99035A 00305.93709941 +.00001422 +00000-0 +39070-3 0 01847
+2 25791 024.9820 185.5476 0010836 320.8016 039.1721 14.39676778071420
+FUSE 1
+1 25791U 99035A 00304.96661633 +.00001342 +00000-0 +36540-3 0 01518
+2 25791 024.9825 191.4771 0010878 310.3487 049.6069 14.39673761071285
+FUSE 1
+1 25791U 99035A 00304.48137472 .00001294 00000-0 35039-3 0 1332
+2 25791 24.9827 194.4415 0010840 305.2721 54.6774 14.39672228 71217
+FUSE 1
+1 25791U 99035A 00300.94603167 +.00001128 +00000-0 +29826-3 0 01487
+2 25791 024.9836 216.0428 0010846 267.5163 092.4104 14.39663463070709
+FUSE 1
+1 25791U 99035A 00300.32214586 .00001125 00000-0 29742-3 0 1329
+2 25791 24.9837 219.8536 0010864 260.8686 99.0595 14.39662271 70610
+FUSE 1
+1 25791U 99035A 00299.97554307 +.00001099 +00000-0 +28908-3 0 02622
+2 25791 024.9840 221.9723 0010883 257.3195 102.6096 14.39661414070562
+FUSE 1
+1 25791U 99035A 00298.93573357 +.00001095 +00000-0 +28804-3 0 02219
+2 25791 024.9842 228.3263 0010808 246.2256 113.7131 14.39659498070412
+FUSE 1
+1 25791U 99035A 00297.96524296 +.00001101 +00000-0 +28980-3 0 01840
+2 25791 024.9843 234.2549 0010819 235.8887 124.0592 14.39657800070277
+FUSE 1
+1 25791U 99035A 00296.92543051 +.00001198 +00000-0 +32020-3 0 01469
+2 25791 024.9839 240.6071 0010755 225.0055 134.9574 14.39656593070122
+FUSE 1
+1 25791U 99035A 00296.23222249 .00001231 00000-0 33056-3 0 1318
+2 25791 24.9837 244.8414 0010747 217.7619 142.2134 14.39655396 70025
+FUSE 1
+1 25791U 99035A 00295.95493830 +.00001341 +00000-0 +36537-3 0 02570
+2 25791 024.9831 246.5364 0010694 214.7072 145.2732 14.39655631069985
+FUSE 1
+1 25791U 99035A 00294.98444509 +.00001216 +00000-0 +32610-3 0 02121
+2 25791 024.9831 252.4518 0011171 205.6776 154.3176 14.39652293069842
+FUSE 1
+1 25791U 99035A 00292.97413670 .00001233 00000-0 33120-3 0 1465
+2 25791 24.9832 264.7305 0011154 184.3003 175.7409 14.39648196 69551
+FUSE 1
+1 25791U 99035A 00292.21160463 .00001227 00000-0 32957-3 0 1304
+2 25791 24.9833 269.3878 0011141 176.2888 183.7705 14.39646543 69445
+FUSE 1
+1 25791U 99035A 00290.96382404 .00001125 00000-0 29744-3 0 2033
+2 25791 24.9839 277.0093 0011248 162.9629 197.1281 14.39643362 69263
+FUSE 1
+1 25791U 99035A 00289.92400452 .00001005 00000-0 25962-3 0 1697
+2 25791 24.9842 283.3623 0011271 152.1446 207.9673 14.39640561 69117
+FUSE 1
+1 25791U 99035A 00288.88418235 .00000939 00000-0 23889-3 0 1296
+2 25791 24.9839 289.7161 0011345 141.9406 218.1903 14.39638291 68963
+FUSE 1
+1 25791U 99035A 00286.94317390 .00000937 00000-0 23849-3 0 2050
+2 25791 24.9842 301.5720 0011377 121.8967 238.2636 14.39635355 68688
+FUSE 1
+1 25791U 99035A 00284.93283722 .00000946 00000-0 24124-3 0 1290
+2 25791 24.9844 313.8517 0011349 101.4953 258.6830 14.39632282 68394
+FUSE 1
+1 25791U 99035A 00283.82368229 .00001113 00000-0 29370-3 0 2356
+2 25791 24.9845 320.6276 0011360 90.5778 269.6031 14.39631230 68239
+FUSE 1
+1 25791U 99035A 00281.18943126 .00001671 00000-0 46933-3 0 1271
+2 25791 24.9838 336.7203 0011242 63.6820 296.4846 14.39626315 67854
+FUSE 1
+1 25791U 99035A 00279.87230155 .00001498 00000-0 41495-3 0 1843
+2 25791 24.9836 344.7657 0011284 49.9927 310.1569 14.39621506 67667
+FUSE 1
+1 25791U 99035A 00278.13922732 .00001349 00000-0 36829-3 0 1266
+2 25791 24.9841 355.3497 0011217 31.6026 328.5162 14.39615977 67417
+FUSE 1
+1 25791U 99035A 00275.92088045 +.00001249 +00000-0 +33679-3 0 02260
+2 25791 024.9846 008.8984 0011149 008.1796 351.8898 14.39610187067097
+FUSE 1
+1 25791U 99035A 00274.88102724 +.00001183 +00000-0 +31605-3 0 01932
+2 25791 024.9847 015.2496 0011092 357.4607 002.5840 14.39607485066943
+FUSE 1
+1 25791U 99035A 00273.91049603 +.00001143 +00000-0 +30335-3 0 01587
+2 25791 024.9849 021.1778 0011061 347.4078 012.6154 14.39605252066806
+FUSE 1
+1 25791U 99035A 00272.87063947 .00001058 00000-0 27682-3 0 1258
+2 25791 24.9850 27.5285 0010951 336.1587 23.8412 14.39602697 66652
+FUSE 1
+1 25791U 99035A 00271.90010587 +.00000952 +00000-0 +24332-3 0 02019
+2 25791 024.9849 033.4553 0010904 326.2752 033.7061 14.39600291066519
+FUSE 1
+1 25791U 99035A 00270.86024700 +.00000806 +00000-0 +19727-3 0 01755
+2 25791 024.9848 039.8050 0010873 315.4400 044.5233 14.39597817066368
+FUSE 1
+1 25791U 99035A 00269.95903493 +.00000698 +00000-0 +16343-3 0 01422
+2 25791 024.9847 045.3098 0010847 305.7600 054.1897 14.39596109066238
+FUSE 1
+1 25791U 99035A 00269.19647060 .00000662 00000-0 15206-3 0 1241
+2 25791 24.9847 49.9681 0010790 297.8206 62.1208 14.39595085 66121
+FUSE 1
+1 25791U 99035A 00265.93823791 +.00000839 +00000-0 +20769-3 0 01602
+2 25791 024.9853 069.8642 0010925 262.8653 097.0612 14.39592139065654
+FUSE 1
+1 25791U 99035A 00264.89837713 .00000866 00000-0 21632-3 0 1234
+2 25791 24.9853 76.2157 0010914 251.7893 108.1424 14.39590766 65501
+FUSE 1
+1 25791U 99035A 00263.85851584 +.00000759 +00000-0 +18267-3 0 02468
+2 25791 024.9844 082.5656 0011036 240.7792 119.1611 14.39588783065356
+FUSE 1
+1 25791U 99035A 00262.95730211 +.00000987 +00000-0 +25418-3 0 02190
+2 25791 024.9843 088.0698 0011108 231.2492 128.7025 14.39588229065220
+FUSE 1
+1 25791U 99035A 00261.91744362 +.00000854 +00000-0 +21237-3 0 01903
+2 25791 024.9840 094.4417 0011199 219.5461 140.4230 14.39586929065079
+FUSE 1
+1 25791U 99035A 00260.94690555 +.00000874 +00000-0 +21887-3 0 01496
+2 25791 024.9839 100.3694 0011196 209.3232 150.6648 14.39585857064930
+FUSE 1
+1 25791U 99035A 00260.60028428 .00000895 00000-0 22526-3 0 1228
+2 25791 24.9838 102.4866 0011182 205.8154 154.1794 14.39585645 64882
+FUSE 1
+1 25791U 99035A 00257.89664249 +.00000980 +00000-0 +25207-3 0 01574
+2 25791 024.9797 119.0147 0011228 178.5341 181.5202 14.39582285064499
+FUSE 1
+1 25791U 99035A 00256.92610205 +.00001007 +00000-0 +26048-3 0 01317
+2 25791 024.9796 124.9428 0011260 168.6067 191.4699 14.39580956064354
+FUSE 1
+1 25791U 99035A 00256.57948045 .00001009 00000-0 26113-3 0 1218
+2 25791 24.9796 127.0600 0011258 164.9452 195.1394 14.39580392 64306
+FUSE 1
+1 25791U 99035A 00255.95556083 +.00001022 +00000-0 +26540-3 0 02272
+2 25791 024.9796 130.8705 0011304 158.5484 201.5503 14.39579482064212
+FUSE 1
+1 25791U 99035A 00254.91569423 +.00001012 +00000-0 +26236-3 0 01998
+2 25791 024.9795 137.2214 0011318 147.7697 212.3506 14.39577628064064
+FUSE 1
+1 25791U 99035A 00253.94515052 +.00000993 +00000-0 +25614-3 0 01704
+2 25791 024.9796 143.1491 0011353 137.8454 222.2931 14.39575858063927
+FUSE 1
+1 25791U 99035A 00252.90528132 +.00000931 +00000-0 +23692-3 0 01337
+2 25791 024.9802 149.5025 0011353 127.3223 232.8322 14.39573664063773
+FUSE 1
+1 25791U 99035A 00252.21203297 .00000929 00000-0 23624-3 0 1201
+2 25791 24.9802 153.7367 0011354 120.2792 239.8836 14.39572606 63674
+FUSE 1
+1 25791U 99035A 00250.96418540 +.00000820 +00000-0 +20171-3 0 02317
+2 25791 024.9813 161.3571 0011231 106.6703 253.5039 14.39569924063499
+FUSE 1
+1 25791U 99035A 00249.92430983 +.00000751 +00000-0 +18005-3 0 01973
+2 25791 024.9819 167.7098 0011202 095.9335 264.2451 14.39568010063344
+FUSE 1
+1 25791U 99035A 00248.95375648 +.00000728 +00000-0 +17305-3 0 01641
+2 25791 024.9822 173.6380 0011200 085.7277 274.4508 14.39566715063209
+FUSE 1
+1 25791U 99035A 00247.98320188 +.00000685 +00000-0 +15936-3 0 01204
+2 25791 024.9827 179.5664 0011177 075.4057 284.7689 14.39565289063062
+FUSE 1
+1 25791U 99035A 00247.91387641 .00000685 00000-0 15938-3 0 1194
+2 25791 24.9827 179.9897 0011176 74.6798 285.4945 14.39565219 63051
+FUSE 1
+1 25791U 99035A 00243.89298918 +.00000627 +00000-0 +14121-3 0 01217
+2 25791 024.9838 204.5495 0011279 032.6718 327.4493 14.39560964062474
+FUSE 1
+1 25791U 99035A 00243.54635985 .00000620 00000-0 13900-3 0 1181
+2 25791 24.9838 206.6661 0011299 29.0913 331.0222 14.39560578 62428
+FUSE 1
+1 25791U 99035A 00242.92242652 +.00000636 +00000-0 +14397-3 0 02524
+2 25791 024.9839 210.4766 0011308 022.5635 337.5375 14.39560193062331
+FUSE 1
+1 25791U 99035A 00241.95186248 +.00000663 +00000-0 +15237-3 0 02180
+2 25791 024.9839 216.4045 0011240 012.3907 347.6875 14.39559570062199
+FUSE 1
+1 25791U 99035A 00241.11995000 +.00000705 +00000-0 +16585-3 0 01905
+2 25791 024.9843 221.4849 0011230 004.1902 355.8697 14.39559225062072
+FUSE 1
+1 25791U 99035A 00240.14938556 +.00000715 +00000-0 +16878-3 0 01535
+2 25791 024.9843 227.4129 0011265 353.6646 006.3718 14.39558267061935
+FUSE 1
+1 25791U 99035A 00239.24814579 .00000768 00000-0 18562-3 0 1172
+2 25791 24.9851 232.9197 0011057 343.6898 16.3253 14.39557918 61800
+FUSE 1
+1 25791U 99035A 00237.16836108 +.00000937 +00000-0 +23867-3 0 01265
+2 25791 024.9852 245.6242 0010930 321.1150 038.8565 14.39556840061509
+FUSE 1
+1 25791U 99035A 00236.47509969 .00000981 00000-0 25253-3 0 1169
+2 25791 24.9852 249.8576 0010910 313.5211 46.4389 14.39556202 61406
+FUSE 1
+1 25791U 99035A 00236.12846894 +.00001006 +00000-0 +26041-3 0 02540
+2 25791 024.9853 251.9740 0010908 310.0331 049.9215 14.39555895061353
+FUSE 1
+1 25791U 99035A 00234.18733724 +.00001106 +00000-0 +29194-3 0 01914
+2 25791 024.9856 263.8291 0010929 289.3257 070.6065 14.39553537061071
+FUSE 1
+1 25791U 99035A 00233.97935917 +.00001108 +00000-0 +29254-3 0 01827
+2 25791 024.9855 265.0992 0010925 287.2111 072.7202 14.39553153061041
+FUSE 1
+1 25791U 99035A 00232.93946679 +.00001150 +00000-0 +30606-3 0 01414
+2 25791 024.9859 271.4505 0010949 275.8605 084.0653 14.39551685060899
+FUSE 1
+1 25791U 99035A 00232.24620540 .00001162 00000-0 30984-3 0 1157
+2 25791 24.9861 275.6842 0010947 268.2547 91.6703 14.39550498 60791
+FUSE 1
+1 25791U 99035A 00230.85968265 +.00001168 +00000-0 +31152-3 0 01841
+2 25791 024.9861 284.1498 0010908 253.3956 106.5351 14.39547810060596
+FUSE 1
+1 25791U 99035A 00229.88911656 +.00001173 +00000-0 +31324-3 0 01650
+2 25791 024.9862 290.0753 0010918 243.1432 116.7994 14.39545953060451
+FUSE 1
+1 25791U 99035A 00228.84922713 +.00001681 +00000-0 +47341-3 0 01392
+2 25791 024.9833 296.4467 0010541 233.3366 126.6176 14.39544754060304
+FUSE 1
+1 25791U 99035A 00228.22529183 .00001437 00000-0 39642-3 0 1145
+2 25791 24.9839 300.2597 0010660 226.7882 133.1742 14.39542247 60216
+FUSE 1
+1 25791U 99035A 00227.87866114 +.00001204 +00000-0 +32286-3 0 01748
+2 25791 024.9843 302.3743 0010672 222.4107 137.5583 14.39540549060161
+FUSE 1
+1 25791U 99035A 00226.90809209 +.00001066 +00000-0 +27935-3 0 01531
+2 25791 024.9844 308.3015 0010818 212.0864 147.8990 14.39538035060025
+FUSE 1
+1 25791U 99035A 00225.86819636 +.00000875 +00000-0 +21927-3 0 01240
+2 25791 024.9839 314.6498 0010966 200.7238 159.2827 14.39535222059879
+FUSE 1
+1 25791U 99035A 00225.59089041 .00000839 00000-0 20809-3 0 1135
+2 25791 24.9841 316.3434 0010990 198.0059 162.0059 14.39534638 59833
+FUSE 1
+1 25791U 99035A 00222.88715209 +.00000729 +00000-0 +17338-3 0 01575
+2 25791 024.9839 332.8560 0011113 170.5138 189.5580 14.39530485059440
+FUSE 1
+1 25791U 99035A 00221.91657699 +.00000732 +00000-0 +17430-3 0 01315
+2 25791 024.9840 338.7844 0011141 160.6691 199.4239 14.39529454059307
+FUSE 1
+1 25791U 99035A 00221.15398144 .00000741 00000-0 17714-3 0 1122
+2 25791 24.9839 343.4418 0011158 152.7937 207.3154 14.39528689 59199
+FUSE 1
+1 25791U 99035A 00219.90609556 +.00000787 +00000-0 +19148-3 0 01712
+2 25791 024.9839 351.0626 0011186 140.1583 219.9740 14.39527697059013
+FUSE 1
+1 25791U 99035A 00218.93551634 +.00000842 +00000-0 +20903-3 0 01383
+2 25791 024.9842 356.9905 0011221 130.2195 229.9294 14.39527076058879
+FUSE 1
+1 25791U 99035A 00218.24224392 .00000911 00000-0 23076-3 0 1117
+2 25791 24.9837 1.2239 0011126 122.7808 237.3779 14.39526803 58771
+FUSE 1
+1 25791U 99035A 00216.92502528 +.00000994 +00000-0 +25698-3 0 01359
+2 25791 024.9840 009.2668 0011090 109.2022 250.9670 14.39525666058583
+FUSE 1
+1 25791U 99035A 00215.95444232 +.00001073 +00000-0 +28173-3 0 01224
+2 25791 024.9846 015.1947 0011165 099.5630 260.6137 14.39524901058446
+FUSE 1
+1 25791U 99035A 00215.19184019 .00001121 00000-0 29713-3 0 1106
+2 25791 24.9845 19.8506 0011155 91.5631 268.6149 14.39524011 58330
+FUSE 1
+1 25791U 99035A 00213.87461582 +.00001234 +00000-0 +33255-3 0 01563
+2 25791 024.9851 027.8945 0011173 078.5475 281.6282 14.39522670058145
+FUSE 1
+1 25791U 99035A 00212.90402845 +.00001276 +00000-0 +34584-3 0 01363
+2 25791 024.9853 033.8211 0011136 068.8066 291.3628 14.39521095058004
+FUSE 1
+1 25791U 99035A 00212.14142266 .00001313 00000-0 35764-3 0 1090
+2 25791 24.9850 38.4778 0011130 60.7162 299.4447 14.39519790 57895
+FUSE 1
+1 25791U 99035A 00209.92292793 +.00001396 +00000-0 +38383-3 0 01533
+2 25791 024.9849 052.0258 0011073 037.5021 322.6251 14.39515598057579
+FUSE 1
+1 25791U 99035A 00208.95233548 +.00001473 +00000-0 +40802-3 0 01252
+2 25791 024.9837 057.9580 0011424 026.9665 333.1435 14.39514058057430
+FUSE 1
+1 25791U 99035A 00208.18972549 .00001576 00000-0 44071-3 0 1085
+2 25791 24.9833 62.6176 0011472 18.7210 341.3716 14.39512347 57328
+FUSE 1
+1 25791U 99035A 00206.94181514 +.00001511 +00000-0 +42008-3 0 01921
+2 25791 024.9854 070.2405 0011038 006.6126 353.4533 14.39509278057141
+FUSE 1
+1 25791U 99035A 00205.97121710 +.00001487 +00000-0 +41266-3 0 01685
+2 25791 024.9852 076.1701 0011017 356.2364 003.8067 14.39506509057005
+FUSE 1
+1 25791U 99035A 00204.93128816 +.00001476 +00000-0 +40903-3 0 01386
+2 25791 024.9852 082.5219 0010972 345.2641 014.7546 14.39503741056855
+FUSE 1
+1 25791U 99035A 00203.96068597 +.00001638 +00000-0 +46010-3 0 01113
+2 25791 024.9851 088.4485 0010910 335.3315 024.6669 14.39501677056711
+FUSE 1
+1 25791U 99035A 00203.89135786 .00001602 00000-0 44873-3 0 1071
+2 25791 24.9852 88.8720 0010897 334.6954 25.3042 14.39501366 56700
+FUSE 1
+1 25791U 99035A 00201.95014789 +.00001572 +00000-0 +43936-3 0 01799
+2 25791 024.9852 100.7256 0010918 312.2678 047.6911 14.39496898056421
+FUSE 1
+1 25791U 99035A 00200.97954187 +.00001738 +00000-0 +49182-3 0 01451
+2 25791 024.9852 106.6535 0010962 301.6227 058.3210 14.39494751056288
+FUSE 1
+1 25791U 99035A 00199.93960649 +.00001805 +00000-0 +51300-3 0 01117
+2 25791 024.9853 113.0050 0010969 290.2578 069.6750 14.39491667056133
+FUSE 1
+1 25791U 99035A 00199.87027750 .00001803 00000-0 51229-3 0 1069
+2 25791 24.9852 113.4283 0010971 289.5399 70.3926 14.39491421 56120
+FUSE 1
+1 25791U 99035A 00198.96900068 +.00001318 +00000-0 +35923-3 0 01266
+2 25791 024.9850 118.9330 0011332 279.9281 079.9947 14.39486512055993
+FUSE 1
+1 25791U 99035A 00198.20638092 .00001053 00000-0 27558-3 0 1056
+2 25791 24.9852 123.5922 0011255 271.8947 88.0275 14.39483842 55884
+FUSE 1
+1 25791U 99035A 00195.91851583 .00000689 00000-0 16100-3 0 1047
+2 25791 24.9847 137.5630 0011254 247.8427 112.0894 14.39478555 55558
+FUSE 1
+1 25791U 99035A 00194.94790513 +.00000622 +00000-0 +13965-3 0 02217
+2 25791 024.9845 143.4897 0011244 237.8927 122.0496 14.39476756055415
+FUSE 1
+1 25791U 99035A 00193.97729403 +.00000584 +00000-0 +12775-3 0 01820
+2 25791 024.9847 149.4236 0011293 228.1708 131.7837 14.39475391055278
+FUSE 1
+1 25791U 99035A 00192.93735201 +.00000550 +00000-0 +11684-3 0 01414
+2 25791 024.9846 155.7737 0011308 217.3578 142.6152 14.39474212055121
+FUSE 1
+1 25791U 99035A 00191.96673850 +.00000542 +00000-0 +11437-3 0 01065
+2 25791 024.9844 161.7002 0011295 207.2529 152.7388 14.39473399054981
+FUSE 1
+1 25791U 99035A 00191.89740911 .00000540 00000-0 11391-3 0 1034
+2 25791 24.9843 162.1235 0011294 206.5071 153.4866 14.39473330 54979
+FUSE 1
+1 25791U 99035A 00188.91623713 +.00000545 +00000-0 +11536-3 0 01387
+2 25791 024.9846 180.3280 0011401 175.5058 184.5555 14.39471262054549
+FUSE 1
+1 25791U 99035A 00187.94562172 +.00000562 +00000-0 +12095-3 0 01032
+2 25791 024.9848 186.2545 0011434 165.3569 194.7270 14.39470796054403
+FUSE 1
+1 25791U 99035A 00187.87629207 .00000562 00000-0 12095-3 0 1026
+2 25791 24.9848 186.6777 0011434 164.6313 195.4544 14.39470742 54394
+FUSE 1
+1 25791U 99035A 00183.57784536 .00000667 00000-0 15416-3 0 1011
+2 25791 24.9855 212.9320 0011413 120.5817 239.5821 14.39468389 53779
+FUSE 1
+1 25791U 99035A 00181.91392783 +.00000671 +00000-0 +15546-3 0 01789
+2 25791 024.9854 223.1058 0011337 102.1276 258.0499 14.39467140053535
+FUSE 1
+1 25791U 99035A 00180.87397553 +.00000700 +00000-0 +16442-3 0 01445
+2 25791 024.9852 229.4559 0011322 091.4012 268.7791 14.39466353053381
+FUSE 1
+1 25791U 99035A 00179.97268238 +.00000726 +00000-0 +17280-3 0 01057
+2 25791 024.9855 234.9604 0011315 082.3086 277.8702 14.39465677053255
+FUSE 1
+1 25791U 99035A 00179.55670036 .00000742 00000-0 17762-3 0 1002
+2 25791 24.9855 237.5004 0011277 78.2476 281.9296 14.39465389 53199
+FUSE 1
+1 25791U 99035A 00178.86339700 +.00000752 +00000-0 +18089-3 0 02381
+2 25791 024.9856 241.7337 0011290 070.9195 289.2531 14.39464704053090
+FUSE 1
+1 25791U 99035A 00177.89277115 +.00000766 +00000-0 +18548-3 0 02031
+2 25791 024.9859 247.6607 0011289 060.8540 299.3095 14.39463739052956
+FUSE 1
+1 25791U 99035A 00176.92214342 +.00000800 +00000-0 +19601-3 0 01665
+2 25791 024.9859 253.5881 0011190 051.0927 309.0575 14.39462915052810
+FUSE 1
+1 25791U 99035A 00175.88218431 +.00000816 +00000-0 +20117-3 0 01315
+2 25791 024.9862 259.9387 0011137 040.3293 319.8037 14.39461801052661
+FUSE 1
+1 25791U 99035A 00175.25820859 .00000821 00000-0 20275-3 0 993
+2 25791 24.9863 263.7490 0011148 33.8548 326.2678 14.39461054 52575
+FUSE 1
+1 25791U 99035A 00173.87159264 +.00000872 +00000-0 +21895-3 0 01978
+2 25791 024.9863 272.2156 0011038 020.3739 339.7205 14.39459774052379
+FUSE 1
+1 25791U 99035A 00172.90096122 +.00000862 +00000-0 +21562-3 0 01592
+2 25791 024.9869 278.1422 0011016 010.0480 350.0243 14.39458368052232
+FUSE 1
+1 25791U 99035A 00171.93032817 +.00000868 +00000-0 +21744-3 0 01290
+2 25791 024.9870 284.0679 0010950 359.6225 000.4272 14.39457116052091
+FUSE 1
+1 25791U 99035A 00170.95969467 +.00000873 +00000-0 +21901-3 0 01001
+2 25791 024.9872 289.9957 0010930 349.1807 010.8463 14.39455848051955
+FUSE 1
+1 25791U 99035A 00170.89036360 .00000875 00000-0 21983-3 0 989
+2 25791 24.9872 290.4190 0010916 348.4366 11.5890 14.39455786 51949
+FUSE 1
+1 25791U 99035A 00167.83979740 +.00000834 +00000-0 +20689-3 0 01244
+2 25791 024.9865 309.0441 0011049 315.9144 044.0481 14.39451106051509
+FUSE 1
+1 25791U 99035A 00166.93849291 +.00000817 +00000-0 +20146-3 0 00991
+2 25791 024.9866 314.5466 0011043 306.5008 053.4481 14.39449711051375
+FUSE 1
+1 25791U 99035A 00166.86916175 .00000816 00000-0 20127-3 0 975
+2 25791 24.9867 314.9701 0011045 305.7696 54.1782 14.39449617 51364
+FUSE 1
+1 25791U 99035A 00165.89852612 +.00001393 +00000-0 +38331-3 0 01420
+2 25791 024.9880 320.9003 0010529 293.0245 066.9309 14.39451820051226
+FUSE 1
+1 25791U 99035A 00164.92788963 +.00001058 +00000-0 +27751-3 0 01130
+2 25791 024.9900 326.8234 0010700 286.6900 073.2425 14.39448463051080
+FUSE 1
+1 25791U 99035A 00164.58123317 .00001414 00000-0 39006-3 0 960
+2 25791 24.9895 328.9405 0010608 283.0060 76.9260 14.39449353 51032
+FUSE 1
+1 25791U 99035A 00163.88792360 +.00001009 +00000-0 +26201-3 0 01988
+2 25791 024.9902 333.1737 0010422 276.0922 083.8398 14.39446429050938
+FUSE 1
+1 25791U 99035A 00162.91728936 +.00000838 +00000-0 +20810-3 0 01731
+2 25791 024.9924 339.1014 0009907 267.6684 092.2688 14.39444419050790
+FUSE
+1 25791U 99035A 00160.90668101 .00000585 00000-0 12820-3 0 1084
+2 25791 24.9857 351.3806 0010965 243.0464 116.8920 14.39441160 50501
+FUSE
+1 25791U 99035A 00159.93604429 .00000520 00000-0 10769-3 0 2088
+2 25791 24.9857 357.3078 0010932 232.6720 127.2791 14.39439999 50364
+FUSE
+1 25791U 99035A 00158.89607500 .00000535 00000-0 11232-3 0 1828
+2 25791 24.9859 3.6563 0011010 221.7464 138.2204 14.39439406 50216
+FUSE
+1 25791U 99035A 00157.92543755 .00000593 00000-0 13055-3 0 1551
+2 25791 24.9862 9.5835 0010973 212.1855 147.7986 14.39438945 50075
+FUSE
+1 25791U 99035A 00156.95479994 .00000684 00000-0 15953-3 0 1220
+2 25791 24.9855 15.5108 0010936 202.2301 157.7734 14.39438339 49934
+FUSE
+1 25791U 99035A 00153.90422121 .00000864 00000-0 21631-3 0 1165
+2 25791 24.9865 34.1388 0011133 170.3555 189.7168 14.39436079 49494
+FUSE
+1 25791U 99035A 00152.93358165 .00000892 00000-0 22526-3 0 1001
+2 25791 24.9870 40.0657 0011211 160.4686 199.6263 14.39435106 49358
+FUSE
+1 25791U 99035A 00151.96294208 .00000727 00000-0 17304-3 0 1612
+2 25791 24.9867 45.9944 0011211 149.4582 210.6578 14.39433226 49218
+FUSE 1
+1 25791U 99035A 00150.92296786 +.00000783 +00000-0 +19073-3 0 01460
+2 25791 024.9865 052.3453 0011336 140.3401 219.7938 14.39432403049060
+FUSE 1
+1 25791U 99035A 00149.95232539 +.00000829 +00000-0 +20521-3 0 01198
+2 25791 024.9864 058.2759 0011314 130.9449 229.2035 14.39431340048923
+FUSE 1
+1 25791U 99035A 00148.91235042 .00001108 00000-0 29356-3 0 921
+2 25791 24.9862 64.6309 0011392 119.2869 240.8777 14.39431427 48776
+FUSE 1
+1 25791U 99035A 00146.97105909 +.00001049 +00000-0 +27490-3 0 01217
+2 25791 024.9860 076.4928 0011034 100.1008 260.0730 14.39427312048499
+FUSE 1
+1 25791U 99035A 00145.93107729 +.00001195 +00000-0 +32101-3 0 01053
+2 25791 024.9858 082.8448 0010906 089.5878 270.5877 14.39425983048340
+FUSE 1
+1 25791U 99035A 00144.96042610 +.00001210 +00000-0 +32585-3 0 00943
+2 25791 024.9858 088.7713 0010797 079.6238 280.5487 14.39424047048201
+FUSE 1
+1 25791U 99035A 00144.89109336 .00001242 00000-0 33587-3 0 919
+2 25791 24.9856 89.1955 0010755 78.9603 281.2108 14.39424127 48199
+FUSE 1
+1 25791U 99035A 00143.92043990 +.00001286 +00000-0 +34981-3 0 01362
+2 25791 024.9853 095.1215 0010661 068.9516 291.2131 14.39422329048054
+FUSE 1
+1 25791U 99035A 00142.94978508 +.00001390 +00000-0 +38255-3 0 01224
+2 25791 024.9849 101.0495 0010673 058.3816 301.7746 14.39420789047916
+FUSE 1
+1 25791U 99035A 00141.97912863 +.00001410 +00000-0 +38914-3 0 01076
+2 25791 024.9848 106.9769 0010693 048.0107 312.1315 14.39418518047773
+FUSE 1
+1 25791U 99035A 00140.31514173 .00001395 00000-0 38437-3 0 908
+2 25791 24.9846 117.1387 0010720 30.1996 329.9129 14.39414225 47534
+FUSE 1
+1 25791U 99035A 00139.96847802 +.00001336 +00000-0 +36555-3 0 01225
+2 25791 024.9846 119.2585 0010753 026.5593 333.5472 14.39413031047485
+FUSE 1
+1 25791U 99035A 00138.30448417 +.00000986 +00000-0 +25496-3 0 01032
+2 25791 024.9849 129.4190 0010807 008.4590 351.6103 14.39408079047241
+FUSE 1
+1 25791U 99035A 00138.16581799 +.00000917 +00000-0 +23330-3 0 00989
+2 25791 024.9852 130.2683 0010800 006.3941 353.6704 14.39407532047222
+FUSE 1
+1 25791U 99035A 00137.33381884 .00000891 00000-0 22495-3 0 892
+2 25791 24.9849 135.3478 0010942 358.1038 1.9431 14.39406114 47100
+FUSE 1
+1 25791U 99035A 00137.12581947 +.00000782 +00000-0 +19067-3 0 01443
+2 25791 024.9853 136.6194 0010936 354.9891 005.0518 14.39405165047070
+FUSE 1
+1 25791U 99035A 00136.15515183 +.00000717 +00000-0 +17007-3 0 01309
+2 25791 024.9856 142.5472 0011025 344.6838 015.3341 14.39403617046937
+FUSE 1
+1 25791U 99035A 00135.11514942 +.00000688 +00000-0 +16101-3 0 01150
+2 25791 024.9856 148.8977 0011074 333.6712 026.3233 14.39402271046789
+FUSE 1
+1 25791U 99035A 00134.14447983 +.00000686 +00000-0 +16024-3 0 01019
+2 25791 024.9858 154.8255 0011141 323.3354 036.6390 14.39401238046645
+FUSE 1
+1 25791U 99035A 00133.24314397 .00000697 00000-0 16371-3 0 882
+2 25791 24.9859 160.3315 0011225 313.9280 46.0306 14.39400350 46513
+FUSE 1
+1 25791U 99035A 00132.13380598 +.00000799 +00000-0 +19602-3 0 01249
+2 25791 024.9855 167.1074 0011235 302.2916 057.6506 14.39399858046356
+FUSE 1
+1 25791U 99035A 00130.46979970 +.00000876 +00000-0 +22019-3 0 01108
+2 25791 024.9854 177.2667 0011205 284.7991 075.1274 14.39398379046117
+FUSE 1
+1 25791U 99035A 00129.42979604 +.00000935 +00000-0 +23904-3 0 00958
+2 25791 024.9855 183.6177 0011214 273.6439 086.2789 14.39397418045968
+FUSE 1
+1 25791U 99035A 00129.22179542 .00000943 00000-0 24155-3 0 878
+2 25791 24.9857 184.8897 0011260 271.3687 88.5531 14.39397203 45932
+FUSE 1
+1 25791U 99035A 00124.57644568 .00001168 00000-0 31255-3 0 864
+2 25791 24.9853 213.2548 0011424 222.2133 137.7495 14.39390992 45261
+FUSE 1
+1 25791U 99035A 00123.60577526 +.00001181 +00000-0 +31680-3 0 01291
+2 25791 024.9854 219.1824 0011455 212.1770 147.8041 14.39389176045129
+FUSE 1
+1 25791U 99035A 00122.63510361 +.00001231 +00000-0 +33248-3 0 01161
+2 25791 024.9854 225.1097 0011461 201.9716 158.0303 14.39387621044982
+FUSE 1
+1 25791U 99035A 00121.66443151 +.00001251 +00000-0 +33895-3 0 01031
+2 25791 024.9854 231.0388 0011524 192.1664 167.8570 14.39385753044847
+FUSE 1
+1 25791U 99035A 00120.69375881 +.00001261 +00000-0 +34204-3 0 00919
+2 25791 024.9855 236.9674 0011466 182.0966 177.9496 14.39383716044709
+FUSE 1
+1 25791U 99035A 00120.55509156 .00001252 00000-0 33924-3 0 859
+2 25791 24.9857 237.8165 0011446 180.8748 179.1742 14.39383343 44689
+FUSE 1
+1 25791U 99035A 00118.68307534 +.00001268 +00000-0 +34428-3 0 01247
+2 25791 024.9853 249.2479 0011337 161.2641 198.8291 14.39379290044418
+FUSE 1
+1 25791U 99035A 00117.71239774 +.00001285 +00000-0 +34957-3 0 01099
+2 25791 024.9854 255.1775 0011271 151.1573 208.9557 14.39377287044279
+FUSE 1
+1 25791U 99035A 00116.74171833 +.00001334 +00000-0 +36531-3 0 00984
+2 25791 024.9851 261.1035 0011286 140.4017 219.7326 14.39375466044138
+FUSE 1
+1 25791U 99035A 00115.77103748 .00001336 00000-0 36589-3 0 846
+2 25791 24.9850 267.0332 0011164 130.0444 230.1046 14.39373163 43997
+FUSE 1
+1 25791U 99035A 00114.80035556 +.00001323 +00000-0 +36184-3 0 01051
+2 25791 024.9850 272.9636 0011139 118.8594 241.3037 14.39370701043855
+FUSE 1
+1 25791U 99035A 00113.48299633 +.00001343 +00000-0 +36805-3 0 00918
+2 25791 024.9847 281.0129 0011026 104.5281 255.6449 14.39367716043665
+FUSE 1
+1 25791U 99035A 00112.58164220 +.00001325 +00000-0 +36244-3 0 00895
+2 25791 024.9847 286.5147 0010991 094.9470 265.2284 14.39365442043531
+FUSE 1
+1 25791U 99035A 00111.61095147 .00001385 00000-0 38153-3 0 830
+2 25791 24.9843 292.4418 0011151 84.3852 275.7943 14.39363622 43390
+FUSE 1
+1 25791U 99035A 00110.57092100 +.00001565 +00000-0 +43855-3 0 00880
+2 25791 024.9834 298.7936 0011325 073.8814 286.2937 14.39362514043241
+FUSE 1
+1 25791U 99035A 00108.62952641 +.00001728 +00000-0 +49007-3 0 00851
+2 25791 024.9828 310.6444 0011254 054.3518 305.8020 14.39358127042962
+FUSE 1
+1 25791U 99035A 00107.93616998 +.00001752 +00000-0 +49756-3 0 00843
+2 25791 024.9826 314.8766 0011241 047.0226 313.1227 14.39356131042867
+FUSE 1
+1 25791U 99035A 00107.86683435 .00001753 00000-0 49803-3 0 827
+2 25791 24.9827 315.3009 0011242 46.2771 313.8667 14.39355927 42857
+FUSE 1
+1 25791U 99035A 00105.85608578 .00002056 00000-0 59388-3 0 814
+2 25791 24.9817 327.5892 0010873 23.0273 337.0569 14.39351807 42560
+FUSE 1
+1 25791U 99035A 00104.67736936 +.00002243 +00000-0 +65292-3 0 00823
+2 25791 024.9813 334.7843 0010911 011.3549 348.7002 14.39348712042394
+FUSE 1
+1 25791U 99035A 00103.91467118 +.00002381 +00000-0 +69669-3 0 00816
+2 25791 024.9810 339.4400 0010675 002.0282 358.0252 14.39346695042287
+FUSE 1
+1 25791U 99035A 00103.01329876 +.00002405 +00000-0 +70441-3 0 01194
+2 25791 024.9809 344.9404 0010670 352.8750 007.1606 14.39342875042158
+FUSE 1
+1 25791U 99035A 00101.97324977 +.00002555 +00000-0 +75197-3 0 01137
+2 25791 024.9805 351.2909 0010643 342.0641 017.9481 14.39339226042005
+FUSE 1
+1 25791U 99035A 00101.07187295 +.00002583 +00000-0 +76093-3 0 01124
+2 25791 024.9805 356.7922 0010619 332.7422 027.2531 14.39335099041874
+FUSE 1
+1 25791U 99035A 00100.10115731 +.00002671 +00000-0 +78880-3 0 00968
+2 25791 024.9799 002.7214 0010593 322.7422 037.2356 14.39330819041734
+FUSE 1
+1 25791U 99035A 00099.13043908 .00002590 00000-0 76309-3 0 799
+2 25791 24.9798 8.6538 0010792 311.2745 48.6840 14.39325505 41593
+FUSE 1
+1 25791U 99035A 00098.09037990 +.00002445 +00000-0 +71735-3 0 00851
+2 25791 024.9802 015.0028 0010995 299.5824 060.3584 14.39319881041446
+FUSE 1
+1 25791U 99035A 00097.11965747 +.00002329 +00000-0 +68059-3 0 00815
+2 25791 024.9804 020.9278 0010970 289.9717 069.9613 14.39314724041301
+FUSE 1
+1 25791U 99035A 00096.14893064 +.00002270 +00000-0 +66193-3 0 00877
+2 25791 024.9807 026.8527 0011076 279.9873 079.9390 14.39310047041167
+FUSE 1
+1 25791U 99035A 00095.17820409 +.00002063 +00000-0 +59661-3 0 00795
+2 25791 024.9813 032.7786 0011255 270.8469 089.0777 14.39304208041025
+FUSE 1
+1 25791U 99035A 00094.20747091 .00001992 00000-0 57410-3 0 771
+2 25791 24.9816 38.7034 0011419 261.0932 98.8284 14.39299966 40887
+FUSE 1
+1 25791U 99035A 00092.19666424 .00001729 00000-0 49103-3 0 764
+2 25791 24.9822 50.9810 0011573 241.7849 118.1493 14.39290662 40595
+FUSE 1
+1 25791U 99035A 00090.18584768 +.00001549 +00000-0 +43389-3 0 00794
+2 25791 024.9830 063.2550 0011512 221.2878 138.6763 14.39283008040302
+FUSE 1
+1 25791U 99035A 00089.28444503 .00001459 00000-0 40539-3 0 755
+2 25791 24.9832 68.7566 0011380 211.8222 148.1602 14.39279719 40179
+FUSE 1
+1 25791U 99035A 00088.31370039 +.00001360 +00000-0 +37404-3 0 00961
+2 25791 024.9836 074.6816 0011423 202.4456 157.5555 14.39276438040031
+FUSE 1
+1 25791U 99035A 00088.03634565 +.00001304 +00000-0 +35643-3 0 00913
+2 25791 024.9839 076.3760 0011454 200.2734 159.7366 14.39275277039997
+FUSE 1
+1 25791U 99035A 00087.20427617 +.00001254 +00000-0 +34072-3 0 00840
+2 25791 024.9841 081.4558 0011382 191.8207 168.2033 14.39272923039870
+FUSE 1
+1 25791U 99035A 00086.23352802 .00001203 00000-0 32440-3 0 745
+2 25791 24.9842 87.3815 0011279 181.4280 178.6196 14.39270365 39731
+FUSE 1
+1 25791U 99035A 00084.22268757 +.00001077 +00000-0 +28473-3 0 00961
+2 25791 024.9845 099.6586 0011009 160.1136 199.9804 14.39265143039448
+FUSE 1
+1 25791U 99035A 00083.18259301 +.00001067 +00000-0 +28137-3 0 00832
+2 25791 024.9846 106.0081 0010977 149.2929 210.8223 14.39263170039292
+FUSE 1
+1 25791U 99035A 00082.21183569 .00001096 00000-0 29069-3 0 733
+2 25791 24.9846 111.9346 0010974 139.3047 220.8279 14.39261692 39153
+FUSE 1
+1 25791U 99035A 00081.17173683 +.00001160 +00000-0 +31097-3 0 01011
+2 25791 024.9843 118.2860 0010946 128.6797 231.4693 14.39260290039008
+FUSE 1
+1 25791U 99035A 00080.20097578 +.00001213 +00000-0 +32794-3 0 00880
+2 25791 024.9841 124.2128 0010923 118.8383 241.3214 14.39258856038864
+FUSE 1
+1 25791U 99035A 00079.23021298 .00001324 00000-0 36292-3 0 720
+2 25791 24.9837 130.1398 0010979 108.5196 251.6496 14.39257774 38722
+FUSE 1
+1 25791U 99035A 00077.21934109 +.00001513 +00000-0 +42309-3 0 00861
+2 25791 024.9829 142.4172 0010838 088.8266 271.3475 14.39254631038434
+FUSE 1
+1 25791U 99035A 00075.55516719 .00001577 00000-0 44314-3 0 711
+2 25791 24.9825 152.5756 0010789 71.5815 288.5864 14.39250628 38191
+FUSE 1
+1 25791U 99035A 00073.61362244 +.00001623 +00000-0 +45792-3 0 01149
+2 25791 024.9823 164.4274 0010664 051.3108 308.8354 14.39245491037910
+FUSE 1
+1 25791U 99035A 00072.64284711 +.00001597 +00000-0 +44979-3 0 01015
+2 25791 024.9825 170.3543 0010564 040.8844 319.2456 14.39242488037772
+FUSE 1
+1 25791U 99035A 00071.67206979 +.00001573 +00000-0 +44222-3 0 00864
+2 25791 024.9826 176.2815 0010546 030.4691 329.6435 14.39239518037632
+FUSE 1
+1 25791U 99035A 00070.56260671 .00001532 00000-0 42912-3 0 702
+2 25791 24.9828 183.0544 0010529 18.3343 341.7543 14.39236091 37479
+FUSE 1
+1 25791U 99035A 00068.69038219 +.00001413 +00000-0 +39162-3 0 00952
+2 25791 024.9834 194.4830 0010533 358.2154 001.8316 14.39230155037209
+FUSE 1
+1 25791U 99035A 00067.71959612 +.00001335 +00000-0 +36691-3 0 00815
+2 25791 024.9838 200.4095 0010552 347.4671 012.5574 14.39227138037065
+FUSE 1
+1 25791U 99035A 00066.74880810 .00001316 00000-0 36063-3 0 698
+2 25791 24.9838 206.3364 0010621 337.4200 22.5842 14.39224685 36920
+FUSE 1
+1 25791U 99035A 00065.77801832 +.00001263 +00000-0 +34378-3 0 00998
+2 25791 024.9841 212.2629 0010676 326.5841 033.3993 14.39222062036782
+FUSE 1
+1 25791U 99035A 00064.80722849 +.00001189 +00000-0 +32036-3 0 00830
+2 25791 024.9845 218.1911 0010778 316.3193 043.6474 14.39219324036645
+FUSE 1
+1 25791U 99035A 00063.76709448 +.00001101 +00000-0 +29240-3 0 00718
+2 25791 024.9849 224.5412 0010871 305.4534 054.4961 14.39216487036499
+FUSE 1
+1 25791U 99035A 00063.55906739 .00001088 00000-0 28832-3 0 683
+2 25791 24.9850 225.8120 0010913 303.1719 56.7740 14.39215991 36464
+FUSE 1
+1 25791U 99035A 00061.82550819 +.00000982 +00000-0 +25477-3 0 00960
+2 25791 024.9855 236.3933 0010864 286.6270 073.3045 14.39211998036219
+FUSE 1
+1 25791U 99035A 00060.85471378 +.00000901 +00000-0 +22923-3 0 00845
+2 25791 024.9863 242.3201 0010848 276.7178 083.2098 14.39209859036077
+FUSE 1
+1 25791U 99035A 00059.88391871 .00000826 00000-0 20540-3 0 675
+2 25791 24.9869 248.2490 0010930 267.1229 92.8030 14.39207865 35932
+FUSE 1
+1 25791U 99035A 00058.91312284 +.00000781 +00000-0 +19097-3 0 00977
+2 25791 024.9873 254.1768 0010925 257.3125 102.6165 14.39206249035799
+FUSE 1
+1 25791U 99035A 00057.94232639 +.00000728 +00000-0 +17411-3 0 00816
+2 25791 024.9875 260.1056 0011055 247.8021 112.1316 14.39204614035655
+FUSE 1
+1 25791U 99035A 00056.62481384 +.00000758 +00000-0 +18375-3 0 00670
+2 25791 024.9875 268.1502 0011129 234.2119 125.7313 14.39203424035463
+FUSE 1
+1 25791U 99035A 00055.86204329 .00000793 00000-0 19497-3 0 661
+2 25791 24.9873 272.8046 0011161 226.1863 133.7679 14.39202825 35354
+FUSE 1
+1 25791U 99035A 00054.68321769 +.00000848 +00000-0 +21235-3 0 01001
+2 25791 024.9871 279.9967 0011112 213.5611 146.4207 14.39201763035188
+FUSE 1
+1 25791U 99035A 00053.98979045 +.00000850 +00000-0 +21296-3 0 00974
+2 25791 024.9870 284.2284 0011076 206.2727 153.7221 14.39200822035085
+FUSE 1
+1 25791U 99035A 00053.01899083 +.00000935 +00000-0 +24004-3 0 00830
+2 25791 024.9867 290.1552 0011204 196.3192 163.6959 14.39200205034940
+FUSE 1
+1 25791U 99035A 00052.04819115 +.00000994 +00000-0 +25875-3 0 00719
+2 25791 024.9868 296.0811 0011283 186.4833 173.5531 14.39199236034805
+FUSE 1
+1 25791U 99035A 00051.90950592 .00000987 00000-0 25647-3 0 650
+2 25791 24.9870 296.9294 0011270 185.1807 174.8586 14.39198964 34783
+FUSE 1
+1 25791U 99035A 00048.85841520 .00001297 00000-0 35475-3 0 644
+2 25791 24.9866 315.5528 0011618 154.5181 205.5896 14.39195818 34340
+FUSE 1
+1 25791U 99035A 00048.09564157 +.00001343 +00000-0 +36946-3 0 01229
+2 25791 024.9864 320.2075 0011655 146.8674 213.2566 14.39194413034238
+FUSE 1
+1 25791U 99035A 00047.12483713 +.00001391 +00000-0 +38482-3 0 01095
+2 25791 024.9864 326.1324 0011683 137.2771 222.8642 14.39192494034095
+FUSE 1
+1 25791U 99035A 00046.15403192 +.00001360 +00000-0 +37483-3 0 00949
+2 25791 024.9866 332.0573 0011665 127.2938 232.8638 14.39189972033950
+FUSE 1
+1 25791U 99035A 00045.18322419 +.00001296 +00000-0 +35475-3 0 00793
+2 25791 024.9869 337.9835 0011586 117.6016 242.5669 14.39187410033812
+FUSE 1
+1 25791U 99035A 00044.21241546 .00001146 00000-0 30690-3 0 638
+2 25791 24.9869 343.9091 0011473 107.1762 253.0006 14.39184536 33672
+FUSE 1
+1 25791U 99035A 00042.20144618 +.00000911 +00000-0 +23237-3 0 00758
+2 25791 024.9867 356.1818 0011249 085.1954 274.9841 14.39179242033387
+FUSE 1
+1 25791U 99035A 00041.92407140 .00000833 00000-0 20764-3 0 629
+2 25791 24.9866 357.8759 0011123 81.8578 278.3201 14.39178018 33348
+FUSE 1
+1 25791U 99035A 00041.16128579 +.00000812 +00000-0 +20105-3 0 01066
+2 25791 024.9865 002.5305 0011143 073.4503 286.7237 14.39176773033231
+FUSE 1
+1 25791U 99035A 00040.19046659 +.00000730 +00000-0 +17515-3 0 00919
+2 25791 024.9864 008.4561 0011054 062.5359 297.6273 14.39174760033097
+FUSE 1
+1 25791U 99035A 00038.31816651 .00000622 00000-0 14075-3 0 612
+2 25791 24.9860 19.8837 0010946 41.9661 318.1684 14.39171741 32822
+FUSE 1
+1 25791U 99035A 00035.19765343 +.00000599 +00000-0 +13337-3 0 00754
+2 25791 024.9862 038.9297 0010966 008.7816 351.2878 14.39168833032372
+FUSE 1
+1 25791U 99035A 00034.22682512 .00000609 00000-0 13670-3 0 609
+2 25791 24.9863 44.8546 0010985 358.5324 1.5150 14.39168123 32232
+FUSE 1
+1 25791U 99035A 00033.18665576 +.00000568 +00000-0 +12356-3 0 01126
+2 25791 024.9855 051.2265 0011261 347.2812 012.7409 14.39167162032084
+FUSE 1
+1 25791U 99035A 00032.21582678 +.00000591 +00000-0 +13078-3 0 00970
+2 25791 024.9855 057.1532 0011294 337.1761 022.8245 14.39166555031942
+FUSE 1
+1 25791U 99035A 00031.17565214 +.00000642 +00000-0 +14694-3 0 00805
+2 25791 024.9852 063.5033 0011303 326.2800 033.6988 14.39166094031795
+FUSE 1
+1 25791U 99035A 00030.20482266 +.00000686 +00000-0 +16093-3 0 00659
+2 25791 024.9850 069.4311 0011343 315.6598 044.3015 14.39165560031659
+FUSE 1
+1 25791U 99035A 00029.44202816 .00000689 00000-0 16196-3 0 594
+2 25791 24.9849 74.0872 0011363 307.3743 52.5733 14.39164796 31549
+FUSE 1
+1 25791U 99035A 00027.43102888 .00000569 00000-0 18032-3 0 586
+2 25791 24.9851 86.3260 0010521 286.4177 73.5622 14.39162573 31251
+FUSE 1
+1 25791U 99035A 00025.55871179 .00000869 00000-0 21924-3 0 579
+2 25791 24.9844 97.7947 0011481 266.0116 93.9082 14.39161817 30989
+FUSE 1
+1 25791U 99035A 00023.61705451 +.00000924 +00000-0 +23647-3 0 00872
+2 25791 024.9842 109.6465 0011662 245.5194 114.4098 14.39159561030703
+FUSE 1
+1 25791U 99035A 00022.57688135 +.00000962 +00000-0 +24873-3 0 00723
+2 25791 024.9839 115.9974 0011736 234.7227 125.2184 14.39158302030554
+FUSE 1
+1 25791U 99035A 00022.29950177 +.00001003 +00000-0 +26163-3 0 00619
+2 25791 024.9838 117.6930 0011736 231.8231 128.1224 14.39158246030517
+FUSE 1
+1 25791U 99035A 00021.53670825 .00000998 00000-0 26013-3 0 564
+2 25791 24.9840 122.3487 0011792 223.8474 136.1104 14.39156968 30405
+FUSE 1
+1 25791U 99035A 00020.42719000 +.00000962 +00000-0 +24860-3 0 00907
+2 25791 024.9842 129.1211 0011913 212.6223 147.3555 14.39154882030249
+FUSE 1
+1 25791U 99035A 00019.66439581 +.00000966 +00000-0 +24995-3 0 00839
+2 25791 024.9840 133.7768 0011844 204.5957 155.3985 14.39153669030138
+FUSE 1
+1 25791U 99035A 00018.62422196 +.00000928 +00000-0 +23794-3 0 00696
+2 25791 024.9842 140.1276 0011782 194.0350 165.9832 14.39151690029988
+FUSE 1
+1 25791U 99035A 00017.44535596 .00000854 00000-0 21447-3 0 550
+2 25791 24.9848 147.3221 0011810 182.6957 177.3499 14.39149382 29814
+FUSE 1
+1 25791U 99035A 00014.53285856 .00000615 00000-0 13854-3 0 545
+2 25791 24.9856 165.1015 0011407 153.4049 206.7053 14.39143679 29391
+FUSE 1
+1 25791U 99035A 00013.56202232 +.00000571 +00000-0 +12445-3 0 00786
+2 25791 024.9857 171.0254 0011318 143.0152 217.1149 14.39142418029251
+FUSE 1
+1 25791U 99035A 00012.72987589 +.00000562 +00000-0 +12183-3 0 00732
+2 25791 024.9854 176.1050 0011284 133.7108 226.4334 14.39141611029137
+FUSE 1
+1 25791U 99035A 00011.62034564 +.00000527 +00000-0 +11055-3 0 00633
+2 25791 024.9855 182.8750 0011249 121.8036 238.3572 14.39140431028974
+FUSE 1
+1 25791U 99035A 00010.71885112 +.00000512 +00000-0 +10577-3 0 00569
+2 25791 024.9854 188.3761 0011274 111.8566 248.3147 14.39139621028845
+FUSE 1
+1 25791U 99035A 00009.88670072 .00000501 00000-0 10250-3 0 535
+2 25791 24.9854 193.4536 0011262 103.0112 257.1659 14.39138969 28726
+FUSE 1
+1 25791U 99035A 00006.83547797 .00000337 00000-0 10675-3 0 521
+2 25791 24.9869 212.0479 0011133 74.0467 286.1742 14.39136665 28280
+FUSE 1
+1 25791U 99035A 00005.93397487 +.00000522 +00000-0 +10899-3 0 00546
+2 25791 024.9856 217.5808 0011349 060.5895 299.5747 14.39136473028152
+FUSE 1
+1 25791U 99035A 00005.86462875 .00000520 00000-0 10857-3 0 511
+2 25791 24.9857 218.0047 0011344 59.7788 300.3845 14.39136413 28143
+FUSE 1
+1 25791U 99035A 00004.96312675 +.00000518 +00000-0 +10767-3 0 01139
+2 25791 024.9860 223.5077 0011297 050.2547 309.8954 14.39135812028010
+FUSE 1
+1 25791U 99035A 00003.99227761 +.00000520 +00000-0 +10842-3 0 00981
+2 25791 024.9861 229.4342 0011263 039.8658 320.2678 14.39135178027878
+FUSE 1
+1 25791U 99035A 00003.02142715 +.00000562 +00000-0 +12179-3 0 00835
+2 25791 024.9860 235.3606 0011286 029.7368 330.3779 14.39134850027732
+FUSE 1
+1 25791U 99035A 00001.98122961 +.00000601 +00000-0 +13433-3 0 00657
+2 25791 024.9860 241.7105 0011303 018.8712 341.2214 14.39134376027580
+FUSE 1
+1 25791U 99035A 00001.01037721 .00000666 00000-0 15478-3 0 506
+2 25791 24.9859 247.6366 0011281 8.7106 351.3596 14.39134101 27448
+FUSE 1
+1 25791U 99035A 99363.09781835 .00000899 00000-0 22901-3 0 490
+2 25791 24.9851 265.4129 0011197 338.4602 21.5436 14.39132626 27028
+FUSE 1
+1 25791U 99035A 99362.12696497 +.00000961 +00000-0 +24848-3 0 00922
+2 25791 024.9849 271.3386 0011184 327.9746 032.0084 14.39131724026881
+FUSE 1
+1 25791U 99035A 99361.15611130 +.00001034 +00000-0 +27194-3 0 00799
+2 25791 024.9846 277.2653 0011182 317.4471 042.5171 14.39130801026740
+FUSE 1
+1 25791U 99035A 99360.11591130 +.00001087 +00000-0 +28861-3 0 00623
+2 25791 024.9844 283.6152 0011205 306.4053 053.5421 14.39129438026590
+FUSE 1
+1 25791U 99035A 99359.14505772 .00001123 00000-0 30012-3 0 487
+2 25791 24.9844 289.5405 0011210 296.0081 63.9276 14.39127971 26455
+FUSE 1
+1 25791U 99035A 99357.20334989 +.00001185 +00000-0 +31974-3 0 00927
+2 25791 024.9845 301.3934 0011276 275.1736 084.7487 14.39124778026179
+FUSE 1
+1 25791U 99035A 99355.19229507 +.00001143 +00000-0 +30633-3 0 00589
+2 25791 024.9845 313.6688 0011427 254.6519 105.2727 14.39120370025887
+FUSE 1
+1 25791U 99035A 99354.91490853 .00001110 00000-0 29599-3 0 473
+2 25791 24.9845 315.3629 0011470 251.8385 108.0875 14.39119513 25847
+FUSE 1
+1 25791U 99035A 99354.15209340 +.00001101 +00000-0 +29307-3 0 01038
+2 25791 024.9845 320.0181 0011509 244.1536 115.7785 14.39117975025732
+FUSE 1
+1 25791U 99035A 99353.18123792 +.00001083 +00000-0 +28726-3 0 00881
+2 25791 024.9845 325.9428 0011452 234.1361 125.8092 14.39115978025590
+FUSE 1
+1 25791U 99035A 99352.21038154 +.00001042 +00000-0 +27447-3 0 00762
+2 25791 024.9843 331.8688 0011469 224.5539 135.4048 14.39113821025458
+FUSE 1
+1 25791U 99035A 99351.17017792 +.00000973 +00000-0 +25237-3 0 00577
+2 25791 024.9847 338.2189 0011485 214.2213 145.7558 14.39111421025300
+FUSE 1
+1 25791U 99035A 99350.33801333 .00000951 00000-0 24529-3 0 463
+2 25791 24.9846 343.2967 0011487 205.5729 154.4211 14.39109889 25180
+FUSE 1
+1 25791U 99035A 99350.19931958 +.00000933 +00000-0 +23956-3 0 00962
+2 25791 024.9848 344.1445 0011512 204.4239 155.5731 14.39109519025163
+FUSE 1
+1 25791U 99035A 99348.39629426 +.00000823 +00000-0 +20475-3 0 00865
+2 25791 024.9849 355.1452 0011441 185.7566 174.2811 14.39105974024908
+FUSE 1
+1 25791U 99035A 99348.18825288 +.00000798 +00000-0 +19683-3 0 00787
+2 25791 024.9851 356.4159 0011443 183.9954 176.0469 14.39105492024872
+FUSE 1
+1 25791U 99035A 99347.21739099 +.00000760 +00000-0 +18478-3 0 00593
+2 25791 024.9852 002.3410 0011413 174.2811 185.7832 14.39103915024736
+FUSE 1
+1 25791U 99035A 99346.24652782 .00000754 00000-0 18291-3 0 459
+2 25791 24.9852 8.2668 0011377 164.2548 195.8318 14.39102692 24597
+FUSE 1
+1 25791U 99035A 99344.23544964 +.00000756 +00000-0 +18345-3 0 00821
+2 25791 024.9851 020.5393 0011315 143.9081 216.2195 14.39100353024308
+FUSE 1
+1 25791U 99035A 99343.19523523 +.00000758 +00000-0 +18405-3 0 00642
+2 25791 024.9849 026.8884 0011251 133.1541 226.9914 14.39099103024150
+FUSE 1
+1 25791U 99035A 99342.15501899 +.00000788 +00000-0 +19383-3 0 00479
+2 25791 024.9847 033.2384 0011205 122.0799 238.0799 14.39098132024006
+FUSE 1
+1 25791U 99035A 99341.53088842 .00000788 00000-0 19382-3 0 444
+2 25791 24.9847 37.0461 0011204 115.5981 244.5688 14.39097368 23911
+FUSE 1
+1 25791U 99035A 99341.18414898 +.00000797 +00000-0 +19666-3 0 00927
+2 25791 024.9845 039.1646 0011110 111.9666 248.2014 14.39096976023865
+FUSE 1
+1 25791U 99035A 99340.21327751 +.00000821 +00000-0 +20422-3 0 00796
+2 25791 024.9844 045.0894 0011092 101.8687 258.3063 14.39095956023723
+FUSE 1
+1 25791U 99035A 99339.24240445 +.00000860 +00000-0 +21656-3 0 00626
+2 25791 024.9842 051.0146 0011088 091.5490 268.6286 14.39094994023586
+FUSE 1
+1 25791U 99035A 99337.57804728 +.00000910 +00000-0 +23264-3 0 00454
+2 25791 024.9838 061.1710 0011103 073.9223 286.2502 14.39093024023340
+FUSE 1
+1 25791U 99035A 99337.50869901 .00000916 00000-0 23465-3 0 438
+2 25791 24.9838 61.5940 0011123 73.3216 286.8513 14.39092988 23332
+FUSE 1
+1 25791U 99035A 99336.53782164 +.00000978 +00000-0 +25413-3 0 00775
+2 25791 024.9835 067.5184 0011185 063.0696 297.0953 14.39091962023198
+FUSE 1
+1 25791U 99035A 99335.91368480 +.00001057 +00000-0 +27938-3 0 00668
+2 25791 024.9832 071.3272 0011211 056.4491 303.7082 14.39091557023104
+FUSE 1
+1 25791U 99035A 99334.66541084 +.00001103 +00000-0 +29413-3 0 00563
+2 25791 024.9829 078.9441 0011175 043.3897 316.7490 14.39089668022921
+FUSE 1
+1 25791U 99035A 99333.55583168 .00001182 00000-0 31912-3 0 428
+2 25791 24.9828 85.7150 0011228 31.8546 328.2638 14.39088163 22768
+FUSE 1
+1 25791U 99035A 99332.72364624 +.00001252 +00000-0 +34147-3 0 00926
+2 25791 024.9822 090.7928 0011318 023.1121 336.9895 14.39086934022646
+FUSE 1
+1 25791U 99035A 99330.71252915 +.00001370 +00000-0 +37884-3 0 00621
+2 25791 024.9815 103.0720 0011456 002.2762 357.7803 14.39083149022351
+FUSE 1
+1 25791U 99035A 99330.01903979 +.00001341 +00000-0 +36977-3 0 00515
+2 25791 024.9813 107.3056 0011522 355.0936 004.9469 14.39081189022254
+FUSE 1
+1 25791U 99035A 99329.53359692 .00001309 00000-0 35954-3 0 414
+2 25791 24.9818 110.2720 0011533 349.7266 10.3016 14.39079811 22188
+FUSE 1
+1 25791U 99035A 99328.00791539 +.00001217 +00000-0 +33021-3 0 00742
+2 25791 024.9820 119.5846 0011565 334.1745 025.8190 14.39075614021963
+FUSE 1
+1 25791U 99035A 99326.82897714 +.00001154 +00000-0 +31024-3 0 00585
+2 25791 024.9826 126.7842 0011751 321.2678 038.6990 14.39072676021790
+FUSE 1
+1 25791U 99035A 99325.51133788 .00001054 00000-0 27855-3 0 401
+2 25791 24.9847 134.8467 0011912 304.6034 55.3277 14.39069633 21609
+FUSE 1
+1 25791U 99035A 99322.80670431 +.00001256 +00000-0 +34276-3 0 00411
+2 25791 024.9836 151.3552 0012041 275.3401 084.5737 14.39066077021213
+FUSE 1
+1 25791U 99035A 99321.62776187 +.00001252 +00000-0 +34139-3 0 00408
+2 25791 024.9837 158.5475 0012055 262.9443 096.9715 14.39063501021043
+FUSE 1
+1 25791U 99035A 99320.79556237 .00001252 00000-0 34144-3 0 391
+2 25791 24.9836 163.6246 0012002 254.4359 105.4616 14.39061664 20929
+FUSE 1
+1 25791U 99035A 99318.99247388 +.00001603 +00000-0 +45300-3 0 00424
+2 25791 024.9830 174.6225 0011785 234.5772 125.3639 14.39059706020668
+FUSE 1
+1 25791U 99035A 99318.85377493 .00001636 00000-0 46351-3 0 388
+2 25791 24.9833 175.4706 0011739 232.8226 127.1216 14.39059600 20640
+FUSE 1
+1 25791U 99035A 99316.98133499 .00000949 00000-0 24506-3 0 379
+2 25791 24.9842 186.9003 0011834 213.5350 146.4412 14.39050830 20375
+FUSE 1
+1 25791U 99035A 99316.77328072 .00000093 00000-0 -27298-4 0 361
+2 25791 24.9851 188.1733 0012103 214.4787 145.4516 14.39045117 20346
+FUSE 1
+1 25791U 99035A 99316.01043130 .00001289 00000-0 35317-3 0 353
+2 25791 24.9823 192.8263 0011574 206.8856 153.1047 14.39050776 20238
+FUSE 1
+1 25791U 99035A 99314.06863125 +.00000807 +00000-0 +19978-3 0 00675
+2 25791 024.9828 204.6728 0011620 187.0114 173.0230 14.39045484019952
+FUSE 1
+1 25791U 99035A 99313.09772812 +.00000806 +00000-0 +19960-3 0 00668
+2 25791 024.9828 210.5953 0011621 176.8561 183.2018 14.39044261019815
+FUSE 1
+1 25791U 99035A 99312.12682443 +.00000807 +00000-0 +20004-3 0 00607
+2 25791 024.9830 216.5187 0011630 166.7136 193.3684 14.39043064019674
+FUSE 1
+1 25791U 99035A 99311.08656905 +.00000824 +00000-0 +20537-3 0 00492
+2 25791 024.9827 222.8664 0011566 156.1383 203.9662 14.39041822019523
+FUSE 1
+1 25791U 99035A 99310.11566272 .00000873 00000-0 22108-3 0 346
+2 25791 24.9823 228.7931 0011439 146.3502 213.7733 14.39040863 19380
+FUSE 1
+1 25791U 99035A 99309.14475480 +.00000912 +00000-0 +23325-3 0 00624
+2 25791 024.9823 234.7169 0011382 136.4568 223.6834 14.39039788019240
+FUSE 1
+1 25791U 99035A 99308.17384628 +.00000917 +00000-0 +23509-3 0 00594
+2 25791 024.9823 240.6396 0011384 126.3110 233.8450 14.39038400019103
+FUSE 1
+1 25791U 99035A 99307.20293604 +.00000929 +00000-0 +23900-3 0 00509
+2 25791 024.9824 246.5634 0011348 116.2606 243.9068 14.39037064018967
+FUSE 1
+1 25791U 99035A 99306.16267374 +.00000901 +00000-0 +22981-3 0 00427
+2 25791 024.9827 252.9105 0011294 105.3472 254.8283 14.39035306018815
+FUSE 1
+1 25791U 99035A 99305.26111145 .00000880 00000-0 22322-3 0 336
+2 25791 24.9828 258.4108 0011278 95.9573 264.2230 14.39033878 18682
+FUSE 1
+1 25791U 99035A 99302.14030694 +.00000777 +00000-0 +19052-3 0 00420
+2 25791 024.9830 277.4546 0011155 063.6998 296.4659 14.39029030018237
+FUSE 1
+1 25791U 99035A 99301.23873747 .00000793 00000-0 19553-3 0 326
+2 25791 24.9829 282.9548 0011144 54.1449 306.0093 14.39027991 18102
+FUSE 1
+1 25791U 99035A 99300.19846426 +.00000688 +00000-0 +16220-3 0 00785
+2 25791 024.9829 289.3031 0011097 042.8698 317.2674 14.39026119017959
+FUSE 1
+1 25791U 99035A 99299.15818884 +.00000714 +00000-0 +17059-3 0 00607
+2 25791 024.9835 295.6560 0010854 031.9536 328.1631 14.39025229017802
+FUSE 1
+1 25791U 99035A 99298.11791199 +.00000847 +00000-0 +21277-3 0 00447
+2 25791 024.9832 302.0031 0010894 020.7345 339.3596 14.39024199017655
+FUSE 1
+1 25791U 99035A 99297.21633808 .00000871 00000-0 22050-3 0 312
+2 25791 24.9833 307.5043 0010887 10.9937 349.0810 14.39022966 17522
+FUSE 1
+1 25791U 99035A 99295.27448293 +.00000936 +00000-0 +24130-3 0 00647
+2 25791 024.9834 319.3563 0010756 350.0772 009.9521 14.39020654017243
+FUSE 1
+1 25791U 99035A 99294.16484983 +.00001000 +00000-0 +26157-3 0 00453
+2 25791 024.9829 326.1256 0010800 338.5647 021.4408 14.39019299017082
+FUSE 1
+1 25791U 99035A 99293.19392082 .00001020 00000-0 26791-3 0 303
+2 25791 24.9828 332.0506 0010781 328.4327 31.5533 14.39017852 16944
+FUSE 1
+1 25791U 99035A 99292.77780736 +.00001020 +00000-0 +26806-3 0 00883
+2 25791 024.9827 334.5890 0010781 324.0963 035.8778 14.39017148016883
+FUSE 1
+1 25791U 99035A 99292.15363794 +.00001076 +00000-0 +28568-3 0 00761
+2 25791 024.9826 338.3998 0010857 316.4441 043.5205 14.39016547016796
+FUSE 1
+1 25791U 99035A 99291.18270908 +.00001062 +00000-0 +28130-3 0 00587
+2 25791 024.9822 344.3280 0011053 306.1106 053.8378 14.39014543016650
+FUSE 1
+1 25791U 99035A 99289.51825652 +.00001008 +00000-0 +26405-3 0 00430
+2 25791 024.9823 354.4815 0011076 288.6058 071.3246 14.39011177016415
+FUSE 1
+1 25791U 99035A 99288.47797288 .00000951 00000-0 24613-3 0 296
+2 25791 24.9826 0.8275 0011076 277.4591 82.4657 14.39009052 16269
+FUSE 1
+1 25791U 99035A 99286.88287063 +.00000861 +00000-0 +21717-3 0 00634
+2 25791 024.9828 010.5602 0011200 260.5300 099.3940 14.39005892016038
+FUSE 1
+1 25791U 99035A 99285.49582403 +.00000795 +00000-0 +19630-3 0 00486
+2 25791 024.9830 019.0217 0011238 246.2842 113.6491 14.39003480015839
+FUSE 1
+1 25791U 99035A 99284.66359563 +.00000761 +00000-0 +18552-3 0 00398
+2 25791 024.9832 024.0989 0011221 237.5271 122.4154 14.39002187015718
+FUSE 1
+1 25791U 99035A 99283.97007305 .00000754 00000-0 18327-3 0 285
+2 25791 24.9830 28.3293 0011217 230.2490 129.7115 14.39001280 15618
+FUSE 1
+1 25791U 99035A 99280.71050717 +.00000608 +00000-0 +13659-3 0 00426
+2 25791 024.9832 048.2231 0011233 196.9935 163.0195 14.38996802015142
+FUSE 1
+1 25791U 99035A 99280.01698155 +.00000604 +00000-0 +13553-3 0 00286
+2 25791 024.9831 052.4539 0011244 189.6758 170.3528 14.38996155015044
+FUSE 1
+1 25791U 99035A 99279.73957122 .00000606 00000-0 13609-3 0 278
+2 25791 24.9833 54.1486 0011318 187.2744 172.7600 14.38995976 15000
+FUSE 1
+1 25791U 99035A 99278.76863587 +.00000623 +00000-0 +14143-3 0 00780
+2 25791 024.9828 060.0769 0011243 177.0793 182.9783 14.38995168014863
+FUSE 1
+1 25791U 99035A 99278.07510995 +.00000624 +00000-0 +14185-3 0 00637
+2 25791 024.9826 064.3088 0011169 169.6029 190.4711 14.38994496014765
+FUSE 1
+1 25791U 99035A 99276.75740903 +.00000633 +00000-0 +14460-3 0 00461
+2 25791 024.9823 072.3487 0011129 155.6892 204.4141 14.38993316014575
+FUSE 1
+1 25791U 99035A 99276.47999801 +.00000694 +00000-0 +16404-3 0 00358
+2 25791 024.9818 074.0450 0011207 153.0078 207.1024 14.38993598014531
+FUSE 1
+1 25791U 99035A 99275.57841241 .00000671 00000-0 15672-3 0 263
+2 25791 24.9819 79.5451 0011185 143.2379 216.8904 14.38992466 14406
+FUSE 1
+1 25791U 99035A 99272.59623714 +.00000619 +00000-0 +14032-3 0 00288
+2 25791 024.9821 097.7456 0010986 112.1476 248.0207 14.38989140013976
+FUSE 1
+1 25791U 99035A 99271.83335507 +.00000694 +00000-0 +16423-3 0 00261
+2 25791 024.9829 102.4180 0011115 105.0840 255.0961 14.38989289013860
+FUSE 1
+1 25791U 99035A 99270.93176357 .00000625 00000-0 14212-3 0 254
+2 25791 24.9833 107.9206 0010968 96.2277 263.9501 14.38987831 13739
+FUSE 1
+1 25791U 99035A 99269.82210754 +.00000624 +00000-0 +14194-3 0 00270
+2 25791 024.9836 114.6962 0010511 085.3632 274.8041 14.38987014013579
+FUSE 1
+1 25791U 99035A 99268.64310209 +.00000665 +00000-0 +15491-3 0 00260
+2 25791 024.9835 121.8881 0010538 073.0440 287.1349 14.38986259013408
+FUSE 1
+1 25791U 99035A 99267.88021393 +.00000624 +00000-0 +14182-3 0 00258
+2 25791 024.9836 126.5415 0010795 065.0791 295.0869 14.38985118013294
+FUSE 1
+1 25791U 99035A 99266.90926343 .00000583 00000-0 12888-3 0 243
+2 25791 24.9837 132.4642 0010750 54.8710 305.2813 14.38983972 13155
+FUSE 1
+1 25791U 99035A 99266.00766538 +.00000570 +00000-0 +12480-3 0 00561
+2 25791 024.9838 137.9635 0010739 045.4550 314.6838 14.38983153013021
+FUSE 1
+1 25791U 99035A 99265.03671293 +.00000579 +00000-0 +12751-3 0 00498
+2 25791 024.9838 143.8883 0010767 035.0894 325.0328 14.38982440012880
+FUSE 1
+1 25791U 99035A 99264.06575950 +.00000540 +00000-0 +11503-3 0 00439
+2 25791 024.9841 149.8130 0010718 024.5892 335.5124 14.38981393012743
+FUSE 1
+1 25791U 99035A 99263.09480512 +.00000542 +00000-0 +11581-3 0 00315
+2 25791 024.9841 155.7371 0010726 014.3641 345.7173 14.38980695012600
+FUSE 1
+1 25791U 99035A 99262.88674378 .00000509 00000-0 10546-3 0 230
+2 25791 24.9842 157.0081 0010731 11.7394 348.3365 14.38980270 12573
+FUSE 1
+1 25791U 99035A 99260.11258537 +.00000453 +00000-0 +87384-4 0 00502
+2 25791 024.9841 173.9362 0010893 342.6831 017.3307 14.38977970012170
+FUSE 1
+1 25791U 99035A 99259.07227521 +.00000447 +00000-0 +85573-4 0 00347
+2 25791 024.9841 180.2856 0010956 331.9610 028.0309 14.38977330012020
+FUSE 1
+1 25791U 99035A 99258.17067241 .00000427 00000-0 79225-4 0 220
+2 25791 24.9841 185.7874 0011007 322.1366 37.8369 14.38976734 11893
+FUSE 1
+1 25791U 99035A 99256.15940484 +.00000459 +00000-0 +89377-4 0 00465
+2 25791 024.9843 198.0620 0011104 300.6420 059.2997 14.38975981011608
+FUSE 1
+1 25791U 99035A 99255.18844792 +.00000499 +00000-0 +10205-3 0 00357
+2 25791 024.9841 203.9868 0011170 290.1305 069.8003 14.38975748011464
+FUSE 1
+1 25791U 99035A 99254.21749084 .00000578 00000-0 12715-3 0 219
+2 25791 24.9838 209.9117 0011276 279.5024 80.4212 14.38975778 11328
+FUSE 1
+1 25791U 99035A 99252.13687317 +.00000703 +00000-0 +16695-3 0 00422
+2 25791 024.9838 222.6085 0011253 257.6029 102.3226 14.38974995011027
+FUSE 1
+1 25791U 99035A 99251.16591877 +.00000740 +00000-0 +17891-3 0 00306
+2 25791 024.9838 228.5342 0011361 247.5654 112.3649 14.38974264010882
+FUSE 1
+1 25791U 99035A 99250.33367230 .00000790 00000-0 19473-3 0 200
+2 25791 24.9836 233.6120 0011410 238.7623 121.1773 14.38973707 10768
+FUSE 1
+1 25791U 99035A 99250.12561055 +.00000806 +00000-0 +20003-3 0 00780
+2 25791 024.9837 234.8822 0011380 236.5967 123.3441 14.38973616010736
+FUSE 1
+1 25791U 99035A 99249.22401093 +.00000850 +00000-0 +21378-3 0 00688
+2 25791 024.9836 240.3848 0011437 227.1228 132.8321 14.38972820010608
+FUSE 1
+1 25791U 99035A 99248.18370392 +.00000868 +00000-0 +21968-3 0 00504
+2 25791 024.9836 246.7339 0011442 216.3322 143.6406 14.38971553010453
+FUSE 1
+1 25791U 99035A 99247.14339628 +.00000893 +00000-0 +22765-3 0 00331
+2 25791 024.9835 253.0817 0011458 205.6866 154.3072 14.38970276010308
+FUSE 1
+1 25791U 99035A 99246.24179636 .00000875 00000-0 22203-3 0 193
+2 25791 24.9836 258.5836 0011512 196.4275 163.5862 14.38968832 10171
+FUSE 1
+1 25791U 99035A 99244.16117925 +.00000770 +00000-0 +18839-3 0 00526
+2 25791 024.9840 271.2810 0011478 175.5983 184.4632 14.38965078009876
+FUSE 1
+1 25791U 99035A 99243.25957613 +.00000746 +00000-0 +18082-3 0 00412
+2 25791 024.9841 276.7823 0011475 166.5838 193.4978 14.38963795009740
+FUSE 1
+1 25791U 99035A 99242.14991061 +.00000697 +00000-0 +16531-3 0 00214
+2 25791 024.9841 283.5545 0011425 155.0075 205.0993 14.38962068009589
+FUSE 1
+1 25791U 99035A 99241.45636787 .00000690 00000-0 16312-3 0 184
+2 25791 24.9841 287.7844 0011423 147.6480 212.4734 14.38961291 9483
+FUSE 1
+1 25791U 99035A 99238.54348289 +.00000555 +00000-0 +12005-3 0 00339
+2 25791 024.9851 305.5600 0011277 118.2109 241.9541 14.38957529009068
+FUSE 1
+1 25791U 99035A 99237.43380917 .00000519 00000-0 10841-3 0 178
+2 25791 24.9853 312.3322 0011217 106.6278 253.5464 14.38956402 8903
+FUSE 1
+1 25791U 99035A 99236.46284262 +.00000461 +00000-0 +90008-4 0 00705
+2 25791 024.9853 318.2560 0011086 096.8361 263.3410 14.38955295008762
+FUSE 1
+1 25791U 99035A 99236.25477872 +.00000452 +00000-0 +87040-4 0 00615
+2 25791 024.9853 319.5272 0011052 094.6665 265.5117 14.38955073008731
+FUSE 1
+1 25791U 99035A 99235.28381051 +.00000458 +00000-0 +89138-4 0 00470
+2 25791 024.9852 325.4528 0011033 084.2171 275.9597 14.38954552008598
+FUSE 1
+1 25791U 99035A 99233.61929130 +.00000451 +00000-0 +86895-4 0 00303
+2 25791 024.9853 335.6110 0010986 066.4129 293.7536 14.38953524008353
+FUSE 1
+1 25791U 99035A 99232.50961001 .00000368 00000-0 60512-4 0 162
+2 25791 24.9859 342.3821 0010848 54.6767 305.4755 14.38952340 8198
+FUSE 1
+1 25791U 99035A 99230.70637369 +.00000429 +00000-0 +79925-4 0 00424
+2 25791 024.9854 353.3830 0010964 035.3348 324.7888 14.38952031007934
+FUSE 1
+1 25791U 99035A 99229.59668927 +.00000395 +00000-0 +68969-4 0 00285
+2 25791 024.9857 000.1562 0010882 023.2043 336.8948 14.38951224007779
+FUSE 1
+1 25791U 99035A 99228.48700287 +.00000471 +00000-0 +93172-4 0 00221
+2 25791 024.9853 006.9252 0010851 011.6095 348.4667 14.38951260007619
+FUSE 1
+1 25791U 99035A 99227.72409421 .00000487 00000-0 98308-4 0 158
+2 25791 24.9851 11.5809 0010930 3.6815 356.3773 14.38950858 7502
+FUSE 1
+1 25791U 99035A 99223.56276789 .00000619 00000-0 14028-3 0 147
+2 25791 24.9842 36.9742 0011040 318.0438 41.9206 14.38948712 6903
+FUSE 1
+1 25791U 99035A 99218.63853449 .00000720 00000-0 17250-3 0 135
+2 25791 24.9828 67.0232 0011431 267.3032 92.6167 14.38944759 6193
+FUSE 1
+1 25791U 99035A 99216.97400544 +.00000683 +00000-0 +16063-3 0 00166
+2 25791 024.9829 077.1763 0011588 249.8240 110.1026 14.38942807005959
+FUSE 1
+1 25791U 99035A 99215.72561041 .00001104 00000-0 29513-3 0 127
+2 25791 24.9823 84.7905 0011295 237.0915 122.8597 14.38943232 5774
+FUSE 1
+1 25791U 99035A 99213.99172686 +.00000755 +00000-0 +18386-3 0 00281
+2 25791 024.9829 095.3690 0011291 219.0401 140.9295 14.38939332005520
+FUSE 1
+1 25791U 99035A 99213.02075147 +.00000641 +00000-0 +14744-3 0 00175
+2 25791 024.9830 101.2939 0011410 209.3286 150.6585 14.38937829005384
+FUSE 1
+1 25791U 99035A 99212.88204088 .00000581 00000-0 12826-3 0 112
+2 25791 24.9832 102.1415 0011463 208.2710 151.7177 14.38937383 5365
+FUSE 1
+1 25791U 99035A 99211.07879897 +.00000483 +00000-0 +96970-4 0 00493
+2 25791 024.9832 113.1440 0011683 189.9414 170.0864 14.38935491005102
+FUSE 1
+1 25791U 99035A 99210.10782220 +.00000457 +00000-0 +88695-4 0 00361
+2 25791 024.9830 119.0680 0011645 180.0206 180.0306 14.38934715004963
+FUSE 1
+1 25791U 99035A 99209.13684459 +.00000476 +00000-0 +94628-4 0 00215
+2 25791 024.9829 124.9914 0011669 170.0019 190.0732 14.38934254004820
+FUSE 1
+1 25791U 99035A 99208.85942248 .00000483 00000-0 96822-4 0 100
+2 25791 24.9830 126.6849 0011617 167.3014 192.7802 14.38934135 4785
+FUSE 1
+1 25791U 99035A 99208.16586648 +.00000509 +00000-0 +10534-3 0 00689
+2 25791 024.9829 130.9163 0011612 160.0034 200.0933 14.38933809004681
+FUSE 1
+1 25791U 99035A 99207.12553224 +.00000477 +00000-0 +95090-4 0 00537
+2 25791 024.9830 137.2648 0011506 149.5759 210.5420 14.38933010004534
+FUSE 1
+1 25791U 99035A 99206.15455295 +.00000436 +00000-0 +81952-4 0 00388
+2 25791 024.9831 143.1889 0011456 139.5200 220.6160 14.38932240004393
+FUSE 1
+1 25791U 99035A 99205.11421632 +.00000433 +00000-0 +81097-4 0 00221
+2 25791 024.9835 149.5359 0011411 129.0298 231.1227 14.38931694004248
+FUSE 1
+1 25791U 99035A 99204.21259024 .00000427 00000-0 79119-4 0 95
+2 25791 24.9835 155.0370 0011324 120.0292 240.1341 14.38931194 4119
+FUSE 1
+1 25791U 99035A 99203.17225182 +.00000414 +00000-0 +74992-4 0 00525
+2 25791 024.9835 161.3843 0011233 109.2556 250.9169 14.38930540003968
+FUSE 1
+1 25791U 99035A 99202.13191170 +.00000423 +00000-0 +77980-4 0 00383
+2 25791 024.9837 167.7323 0011168 098.4908 261.6865 14.38930164003818
+FUSE 1
+1 25791U 99035A 99201.16092631 +.00000440 +00000-0 +83410-4 0 00235
+2 25791 024.9837 173.6562 0011126 088.3941 271.7841 14.38929874003674
+FUSE 1
+1 25791U 99035A 99200.18994021 .00000454 00000-0 87696-4 0 88
+2 25791 24.9838 179.5806 0011119 78.2644 281.9107 14.38929532 3535
+FUSE 1
+1 25791U 99035A 99200.12059101 +.00000432 +00000-0 +80931-4 0 00725
+2 25791 024.9842 180.0407 0011095 075.8036 284.3701 14.38929430003528
+FUSE 1
+1 25791U 99035A 99199.21895964 +.00000465 +00000-0 +91252-4 0 00631
+2 25791 024.9840 185.5408 0011075 066.4980 293.6690 14.38929231003393
+FUSE 1
+1 25791U 99035A 99198.17861506 +.00000472 +00000-0 +93642-4 0 00475
+2 25791 024.9844 191.8880 0011017 055.5344 304.6202 14.38928745003245
+FUSE 1
+1 25791U 99035A 99197.20762573 +.00000483 +00000-0 +97242-4 0 00328
+2 25791 024.9845 197.8116 0010965 045.0350 315.1043 14.38928247003108
+FUSE 1
+1 25791U 99035A 99196.16727896 +.00000496 +00000-0 +10136-3 0 00130
+2 25791 024.9848 204.1584 0010927 033.8431 326.2770 14.38927757002952
+FUSE 1
+1 25791U 99035A 99195.40435724 .00000525 00000-0 11052-3 0 76
+2 25791 24.9845 208.8116 0010908 25.8212 334.2838 14.38927498 2842
+FUSE 1
+1 25791U 99035A 99195.26564445 +.00000515 +00000-0 +10744-3 0 00732
+2 25791 024.9847 209.6583 0010905 024.2058 335.8962 14.38927325002821
+FUSE 1
+1 25791U 99035A 99194.22529636 +.00000515 +00000-0 +10742-3 0 00547
+2 25791 024.9849 216.0045 0010895 012.9914 347.0873 14.38926634002672
+FUSE 1
+1 25791U 99035A 99193.18494715 +.00000545 +00000-0 +11704-3 0 00384
+2 25791 024.9850 222.3506 0010896 001.9128 358.1416 14.38926205002526
+FUSE 1
+1 25791U 99035A 99192.14459780 +.00000580 +00000-0 +12797-3 0 00193
+2 25791 024.9850 228.6966 0010908 350.8363 009.1951 14.38925741002370
+FUSE 1
+1 25791U 99035A 99191.24296126 .00000600 00000-0 13459-3 0 61
+2 25791 24.9852 234.1962 0010933 341.3306 18.6794 14.38925220 2248
+FUSE 1
+1 25791U 99035A 99189.57840234 +.00000688 +00000-0 +16244-3 0 00431
+2 25791 024.9847 244.3496 0011003 324.3520 035.6271 14.38924327002005
+FUSE 1
+1 25791U 99035A 99188.53805210 +.00000745 +00000-0 +18074-3 0 00304
+2 25791 024.9847 250.6956 0011082 313.4689 046.4896 14.38923665001857
+FUSE 1
+1 25791U 99035A 99187.56705911 +.00000776 +00000-0 +19053-3 0 00181
+2 25791 024.9847 256.6180 0011114 303.2228 056.7215 14.38922773001717
+FUSE 1
+1 25791U 99035A 99187.22027565 .00000809 00000-0 20103-3 0 57
+2 25791 24.9849 258.7334 0011145 299.6070 60.3328 14.38922625 1666
+FUSE 1
+1 25791U 99035A 99186.59606618 +.00000806 +00000-0 +20001-3 0 00658
+2 25791 024.9848 262.5402 0011144 293.0885 066.8449 14.38921812001577
+FUSE 1
+1 25791U 99035A 99185.55571694 +.00000781 +00000-0 +19209-3 0 00489
+2 25791 024.9850 268.8854 0011179 282.1384 077.7873 14.38920354001427
+FUSE 1
+1 25791U 99035A 99184.58472411 +.00000771 +00000-0 +18889-3 0 00356
+2 25791 024.9851 274.8074 0011210 272.0258 087.8967 14.38919111001282
+FUSE 1
+1 25791U 99035A 99183.61373101 +.00000806 +00000-0 +20014-3 0 00199
+2 25791 024.9851 280.7294 0011202 261.9284 097.9951 14.38918148001148
+FUSE
+1 25791U 99035A 99182.64273781 .00000831 00000-0 20827-3 0 48
+2 25791 24.9852 286.6514 0011228 251.8187 108.1089 14.38917064 1005
+FUSE
+1 25791U 99035A 99181.53303177 +.00000885 +00000-0 +22535-3 0 00326
+2 25791 024.9851 293.4193 0011207 240.2024 119.7372 14.38915842000848
+FUSE
+1 25791U 99035A 99180.42332586 +.00000769 +00000-0 +18844-3 0 00250
+2 25791 024.9851 300.1870 0011210 228.6224 131.3324 14.38913850000688
+FUSE
+1 25791U 99035A 99179.72975929 +.00000701 +00000-0 +16654-3 0 00225
+2 25791 024.9851 304.4168 0011211 221.3620 138.6046 14.38912818000589
+FUSE
+1 25791U 99035A 99178.68940879 +.00000540 +00000-0 +11515-3 0 00070
+2 25791 024.9851 310.7614 0011204 210.4757 149.5099 14.38911405000431
+FUSE
+1 25791U 99035A 99178.55069535 .00000518 00000-0 10814-3 0 39
+2 25791 24.9851 311.6073 0011204 209.0295 150.9590 14.38911233 410
+FUSE
+1 25791U 99035A 99177.92648488 +.00000082 +00000-0 -31136-4 0 00408
+2 25791 024.9853 315.4140 0011227 202.4549 157.5464 14.38909900000324
+FUSE
+1 25791U 99035A 99176.95549150 -.00001333 +00000-0 -48314-3 0 00075
+2 25791 024.9860 321.3361 0010962 190.9807 169.0438 14.38907601000185
diff --git a/src/cal/get_tle/tmp/add_tle.pl b/src/cal/get_tle/tmp/add_tle.pl
new file mode 100755
index 0000000..4bdda9e
--- /dev/null
+++ b/src/cal/get_tle/tmp/add_tle.pl
@@ -0,0 +1,182 @@
+#!/usr/local/bin/perl
+use FileHandle;
+
+# ***************************************************
+# add_tle.pl
+#
+# This Perl module will read in the latest five orbital elements
+# from the file five.tle (which was created by get_tle.pl) and
+# add any new orbital elements to the file FUSE.TLE. The file
+# FUSE.TLE is in descending order (i.e. the most recent elements
+# are first). In order to prepend the new TLE onto the old list
+# I found it was easiest to store everything in a temporary file
+# TEMP.TLE and rewrite FUSE.TLE.
+#
+# Author: Ed Murphy
+#
+# History: Written July 27, 1999
+#
+# ***************************************************
+
+# Define the file names. old_maintle_filename is not actually opened,
+# but is used in a system call at the end of the program.
+
+$input_filename = "five.tle";
+$maintle_filename = "FUSE.TLE";
+$old_maintle_filename = "FUSE.OLD";
+$temp_filename = "TEMP.TLE";
+
+# Open the files.
+open (TLE_INFILE, "<$input_filename") || die "Cannot open $input_filename";
+open (TLE_TEMPFILE, ">$temp_filename") || die "Cannot open $temp_filename";
+open (TLE_MAINFILE, "<$maintle_filename") || die "Cannot open $maintle_filename";
+
+# Read the first two lines from the maintle file to get the date of the
+# most recent set of TLEs. Save these lines for later output.
+ $lineout1 = <TLE_MAINFILE>;
+ $lineout2 = <TLE_MAINFILE>;
+ $last_date = substr($lineout2,18,14);
+
+# get rid of the blank line at the beginning of five.tle file
+ $line = <TLE_INFILE>;
+
+# Cycle through the five.tle file and look for files more recent than
+# last_date.
+ while ($line1 = <TLE_INFILE>) {
+ $sat_name = substr($line1,0,4);
+ $line2 = <TLE_INFILE>;
+ $line3 = <TLE_INFILE>;
+ $tle_date = substr($line2,18,14);
+ $id2 = substr($line2, 2, 5);
+ $id3 = substr($line3, 2, 5);
+ # if the TLE is more recent, print it out to the TEMP file.
+ if (($tle_date > $last_date+0.05) && ($sat_name eq "FUSE") && ($id2 == 25791) && ($id3 == 25791)) {
+ &check_tle;
+ print TLE_TEMPFILE $line1;
+ print TLE_TEMPFILE $line2;
+ print TLE_TEMPFILE $line3;
+ # Send this output to screen to make sure TLEs look OK
+ if ($tle_flag != 0) {
+ print STDOUT "ERROR: Possible error in TLE:\n";
+ }
+ print STDOUT "The new TLEs are:\n";
+ print STDOUT $line1;
+ print STDOUT $line2;
+ print STDOUT $line3;
+ }
+
+ }
+
+# Now add the MAINTLE file to the end of the TEMPFILE
+ print TLE_TEMPFILE $lineout1;
+ print TLE_TEMPFILE $lineout2;
+ while ($line1 = <TLE_MAINFILE>) {
+ print TLE_TEMPFILE $line1;
+ }
+
+ close (TLE_INFILE);
+ close (TLE_MAINFILE);
+ close (TLE_TEMPFILE);
+
+# Move the MAINFILE into the old_maintle filename
+# Move the TEMPFILE to be the MAINFILE
+# Remove the five.tle file.
+ system("mv $maintle_filename $old_maintle_filename");
+ system("mv $temp_filename $maintle_filename");
+ system("chmod ug+rw $maintle_filename");
+ system("chgrp sdp $maintle_filename");
+ system("rm -f $input_filename");
+
+### end of Perl script
+
+sub check_tle {
+
+ $tle_flag = 0;
+
+ &parse_lines;
+
+ &calculate_a0;
+
+ &calculate_orbs;
+
+ if (($mean_mot > 14.391) || ($mean_mot < 14.389)) {
+ $tle_flag = 1;
+ print STDOUT "Possible error in mean motion $mean_mot \n";
+ }
+ if (($incl > 24.990) || ($incl < 24.975)) {
+ $tle_flag = 1;
+ print STDOUT "Possible error in inclination $incl \n";
+ }
+ if (($eccen > 0.00120) || ($eccen < 0.00108)) {
+ $tle_flag = 1;
+ print STDOUT "Possible error in eccentricity $eccen \n";
+ }
+ if (($semiax > 7145.0) || ($semiax < 7143.0)) {
+ $tle_flag = 1;
+ print STDOUT "Possible error in semi-major axis $semia \n";
+ }
+ if (($apogee > 777.0) || ($apogee < 773.0)) {
+ $tle_flag = 1;
+ print STDOUT "Possible error in apogee $apogee \n";
+ }
+ if (($perigee > 760.0) || ($perigee < 756.0)) {
+ $tle_flag = 1;
+ print STDOUT "Possible error in perigee $perigee \n";
+ }
+
+}
+
+sub parse_lines {
+$year = substr($line2, 18, 2);
+$doy = substr($line2, 20, 3);
+$dayfrac = substr($line2, 23, 9);
+$epoch = $year.$doy.$dayfrac;
+$incl = substr($line3, 9, 8);
+$raan = substr($line3, 17,8);
+$eccen = substr($line3, 26, 7);
+$eccen = "0." . $eccen;
+$mean_mot = substr($line3, 52, 11);
+$mean_anom = substr($line3, 43, 8);
+$arg_perig = substr($line3, 34, 8);
+
+
+if ($year > 50) {
+ $year += 1900;
+} else {
+ $year += 2000;
+}
+
+$dayfrac = "0".$dayfrac;
+
+}
+
+sub calculate_a0 {
+
+$mu = 3.986005E5;
+$pi = 3.14159265358979;
+$radian = 0.0174532925200;
+
+$mm=2.0*$pi*$mean_mot/(24.0*60.0);
+$ke=0.74366916E-1;
+$k2=5.413080E-4;
+$a1=($ke/$mm)**(2.0/3.0);
+$inrad = $incl * $radian;
+
+$d1=3.0/2.0*$k2/($a1*$a1)*(3.0*cos($inrad)*cos($inrad)-1.0)/((1.0-$eccen*$eccen)
+**(3.0/2.0));
+$a0=$a1*(1.0-$d1/3.0-$d1*$d1-134.0/81.0*$d1*$d1*$d1);
+$d0=3.0/2.0*$k2/($a0*$a0)*(3.0*cos($inrad)*cos($inrad)-1.0)/((1.0-$eccen*$eccen)
+**(3.0/2.0));
+$semiax=$a0/(1-$d0)*6378.135;
+
+}
+
+sub calculate_orbs {
+
+$period = 60.0*24.0/($mean_mot/(1+$d0));
+$cax=$eccen*$semiax;
+$perigee=$semiax-$cax-6378.1;
+$apogee=$semiax+$cax-6378.1;
+
+}
+
diff --git a/src/cal/get_tle/tmp/check_tle.pl b/src/cal/get_tle/tmp/check_tle.pl
new file mode 100755
index 0000000..483692e
--- /dev/null
+++ b/src/cal/get_tle/tmp/check_tle.pl
@@ -0,0 +1,100 @@
+#!/usr/local/bin/perl
+use FileHandle;
+
+# ***************************************************
+# add_tle.pl
+#
+# This Perl module will read in the latest five orbital elements
+# from the file five.tle (which was created by get_tle.pl) and
+# add any new orbital elements to the file FUSE.TLE.
+#
+# Author: Ed Murphy
+#
+# History: Written July 27, 1999
+#
+# ***************************************************
+
+# Define the file names. old_maintle_filename is not actually opened,
+# but is used in a system call at the end of the program.
+
+$maintle_filename = "/data1/fuse/calfuse/calfiles/FUSE.TLE";
+$outtle_filename = "check_tle.dat";
+
+# Open the files.
+open (TLE_MAINFILE, "<$maintle_filename") || die "Cannot open $maintle_filename";
+open (TLE_OUT, ">$outtle_filename") || die "Cannot open $outtle_filename";
+
+# Read the first two lines from the maintle file to get the date of the
+# most recent set of TLEs. Save these lines for later output.
+while ($line1 = <TLE_MAINFILE>) {
+ $line2 = <TLE_MAINFILE>;
+ $line3 = <TLE_MAINFILE>;
+
+ &parse_lines;
+
+ &calculate_a0;
+ &calculate_orbs;
+
+ printf TLE_OUT "%7.3f %6.2f %6.2f %7.2f %6.2f %7.4f %6.2f %6.2f %8.6f\n",$day, $apogee, $perigee, $semiax, $raan, $incl, $mean_anom, $arg_perig, $eccen;
+
+}
+
+ close (TLE_MAINFILE);
+ close (TLE_OUT);
+
+### end of Perl script
+
+
+sub parse_lines {
+$year = substr($line2, 18, 2);
+$doy = substr($line2, 20, 3);
+$dayfrac = substr($line2, 23, 9);
+$day=$doy.$dayfrac;
+$epoch = $year.$doy.$dayfrac;
+$incl = substr($line3, 9, 8);
+$raan = substr($line3, 17,8);
+$eccen = substr($line3, 26, 7);
+$eccen = "0." . $eccen;
+$mean_mot = substr($line3, 52, 11);
+$mean_anom = substr($line3, 43, 8);
+$arg_perig = substr($line3, 34, 8);
+
+
+if ($year > 50) {
+ $year += 1900;
+} else {
+ $year += 2000;
+}
+
+$dayfrac = "0".$dayfrac;
+
+}
+
+sub calculate_a0 {
+
+$mu = 3.986005E5;
+$pi = 3.14159265358979;
+$radian = 0.0174532925200;
+
+$mm=2.0*$pi*$mean_mot/(24.0*60.0);
+$ke=0.74366916E-1;
+$k2=5.413080E-4;
+$a1=($ke/$mm)**(2.0/3.0);
+$inrad = $incl * $radian;
+
+$d1=3.0/2.0*$k2/($a1*$a1)*(3.0*cos($inrad)*cos($inrad)-1.0)/((1.0-$eccen*$eccen)**(3.0/2.0));
+$a0=$a1*(1.0-$d1/3.0-$d1*$d1-134.0/81.0*$d1*$d1*$d1);
+$d0=3.0/2.0*$k2/($a0*$a0)*(3.0*cos($inrad)*cos($inrad)-1.0)/((1.0-$eccen*$eccen)**(3.0/2.0));
+$semiax=$a0/(1-$d0)*6378.135;
+
+}
+
+sub calculate_orbs {
+
+$period = 60.0*24.0/($mean_mot/(1+$d0));
+$cax=$eccen*$semiax;
+$perigee=$semiax-$cax-6378.1;
+$apogee=$semiax+$cax-6378.1;
+
+}
+
diff --git a/src/cal/get_tle/tmp/five.tle.orig b/src/cal/get_tle/tmp/five.tle.orig
new file mode 100644
index 0000000..6949976
--- /dev/null
+++ b/src/cal/get_tle/tmp/five.tle.orig
@@ -0,0 +1,17 @@
+
+FUSE 1
+1 25791U 99035A 03334.81529517 .00000629 00000-0 13611-3 0 73
+2 25791 24.9828 141.7372 0010396 237.2837 122.6662 14.41449325233814
+FUSE 1
+1 25791U 99035A 03332.32285756 .00000721 00000-0 16400-3 0 51
+2 25791 24.9827 157.0092 0010498 210.6638 149.3252 14.41447882233456
+FUSE 1
+1 25791U 99035A 03331.90745146 +.00000729 +00000-0 +16628-3 0 00081
+2 25791 024.9828 159.5554 0010553 206.5242 153.4727 14.41447542233393
+FUSE 1
+1 25791U 99035A 03331.14587356 .00000725 00000-0 16505-3 0 40
+2 25791 24.9828 164.2238 0010646 198.4715 161.5398 14.41446726233287
+FUSE 1
+1 25791U 99035A 03330.86893587 +.00000724 +00000-0 +16482-3 0 00069
+2 25791 024.9826 165.9208 0010698 195.8086 164.2086 14.41446474233249
+
diff --git a/src/cal/get_tle/tmp/get_tle.logfile b/src/cal/get_tle/tmp/get_tle.logfile
new file mode 100644
index 0000000..570d7e1
--- /dev/null
+++ b/src/cal/get_tle/tmp/get_tle.logfile
@@ -0,0 +1,122 @@
+Trying 128.183.234.87...
+Connected to oig1.gsfc.nasa.gov.
+Escape character is '^]'.
+HTTP/1.0 200 OK
+Server: Microsoft-IIS/3.0
+Date: Mon, 01 Dec 2003 16:18:01 GMT
+Content-type: text/html
+
+<HTML>
+<HEAD>
+<TITLE>OIG Registered user login ok</TITLE>
+</HEAD>
+<H3><LEFT>Registered User Login OK</LEFT></H3>
+<H4><LEFT>2003/12/01 16:18:01 Session time remaining: 02:00:00</LEFT></H4>
+<HR>
+<BODY>
+<PRE>
+
+<B>This account will expire if not accessed at least once every 90 days.</B>
+
+You have sucessfully logged in as registered user:
+ <B>Mary L. Romelfanger</B>
+
+Please select => <A HREF="/scripts/foxweb.exe/favorhome@app01?tdac=1JT4H2A7I2EJKMM9BXVO">[Continue]</A>
+</PRE>
+<HR>
+<FONT SIZE="-1"><B>&copy 2003 National Aeronautics and Space Administration (NASA). All rights reserved.</B></FONT>
+</BODY>
+</HTML>***
+ Starting User's Home Page output page
+***
+
+Trying 128.183.234.87...
+Connected to oig1.gsfc.nasa.gov.
+Escape character is '^]'.
+HTTP/1.0 200 OK
+Server: Microsoft-IIS/3.0
+Date: Mon, 01 Dec 2003 16:18:02 GMT
+Content-type: text/html
+
+<HTML>
+<HEAD>
+<TITLE>OIG User home page</TITLE>
+</HEAD>
+<H3><CENTER>User Home Page</CENTER></H3>
+<H4><CENTER>2003/12/01 16:18:01 Session time remaining: 02:00:00</CENTER></H4>
+<HR><BODY><PRE>
+<B><center>Due to the existing National Security Restrictions all users must be
+an approved registered user to access data on this site. 10/01/2001
+</center></B>
+
+
+</PRE><HR>
+<PRE>
+<P><LI><A HREF="/scripts/foxweb.exe/ftleadhoc@app01?tdac=OLOW8A0XDA7LVBBJ49TI">TLE Query</A>
+ One time query for TLE's</LI>
+<P><LI><A HREF="/scripts/foxweb.exe/tlarq@app01?tdac=3AROP6H1C6SA5VV2TZUG">TLE Historical Request Form</A></LI>
+<P><LI><A HREF="/scripts/foxweb.exe/syspage@app01?tdac=UJT4H2A7I2EJKMM9BXVO">TLE Format (Standard and Obsolete)</A>
+ Break-out of a Two Line Element.</LI>
+<P><LI><A HREF="/scripts/foxweb.exe/favtle@app01?tdac=JF6A5YKG8YRF4ZZQ2CWH">Favorite TLE Query</A>
+ (the query limit is for any continuous 24 hour period)</LI>
+<P><LI><A HREF="/scripts/foxweb.exe/favtlec@app01?tdac=W0GI3H8ZQH10UTTAO2RC">Favorite TLE Query Configuration</A></LI>
+<P><LI><A HREF="/scripts/foxweb.exe/favhomec@app01?tdac=MZ5VI4W3R4PZ0YY1KSNU">User Home Page Configuration</A>
+ Select to modify what links will appear on this page.</LI>
+<P><LI><A HREF="/scripts/foxweb.exe/supappl@app01?tdac=DT3E9URY1ULTDHHV8KPS">Super-User Application</A>
+ Application to access all daily TLE(s)</LI></PRE>
+<HR><PRE>
+This is your home page configured links area!
+
+No user home page configured links.
+
+<B>You must select "User Home Page Configuration" to
+access other links on this site.</B></PRE><HR><PRE>
+<P><LI><A HREF="/scripts/foxweb.exe/syspage@app01?tdac=H7YF4S1HVS67JCCEQ8LK">General Information</A>
+ Formerly Main Home Page.</LI>
+<P><LI><A HREF="/scripts/foxweb.exe/msglist@app01?tdac=6XKMW1Z8T1HXLQQ7FEYV">Messages</A>
+ Messages to and from System Administrator</LI>
+<P><LI><A HREF="/scripts/foxweb.exe/changepw@app01?tdac=U5QP1E7AME25GIIND0CF">Change Password</A></LI></PRE><HR><FONT SIZE="-1"><B>&copy 2003 National Aeronautics and Space Administration (NASA). All rights reserved.</B></FONT>
+</BODY></HTML>Trying 128.183.234.87...
+Connected to oig1.gsfc.nasa.gov.
+Escape character is '^]'.
+HTTP/1.0 200 OK
+Server: Microsoft-IIS/3.0
+Date: Mon, 01 Dec 2003 16:18:02 GMT
+Content-type: text/html
+
+<HTML>
+<HEAD>
+<TITLE>OIG TLE Query</TITLE>
+</HEAD>
+<H3><CENTER>TLE Query</CENTER></H3>
+<H4><CENTER>2003/12/01 16:18:02 Session time remaining: 01:59:59</CENTER></H4>
+<HR><BODY><PRE>
+In this section you should select up to a maximum of 100 satellite catalog
+numbers, for which you can download the latest set of Two-Line elements. Enter
+the satellite catalog numbers that you would like to query on, and click on
+submit.
+
+
+Enter the object numbers in the area below separated by spaces.
+Select the desired options.
+Select "Submit".
+(the query limit is for any continuous 24 hour period)</PRE><HR><FORM ACTION="/scripts/foxweb.exe/ftleadhocr@app01?" METHOD="POST">
+<INPUT TYPE="HIDDEN" NAME="tdac" VALUE="N1NKOB4PUBD1ALLSY305">
+<PRE>Enter satellite object numbers:
+<TEXTAREA name=ffv01 ROWS=10 COLS=75>
+</TEXTAREA>
+Format:
+ <INPUT TYPE=RADIO NAME="ffv02" VALUE="standard"CHECKED>Standard
+ <INPUT TYPE=RADIO NAME="ffv02" VALUE="older">Obsolete<BR>
+Sort on:
+ <INPUT TYPE=RADIO NAME="ffv03" VALUE="catno"CHECKED>Catalog number
+ <INPUT TYPE=RADIO NAME="ffv03" VALUE="intldes">Internationl designator<BR>
+Number of TLE(s):
+ <INPUT TYPE=RADIO NAME="ffv04" VALUE="last"CHECKED>Latest One (1)
+ <INPUT TYPE=RADIO NAME="ffv04" VALUE="five">Latest Five (5)<BR>
+<P><INPUT TYPE="SUBMIT" VALUE="Submit"> <INPUT TYPE="RESET"><BR></P>
+</FORM>
+<A HREF="/scripts/foxweb.exe/favorhome@app01?tdac=1JT4H2A7I2EJKMM9BXVO">[ User home page ]</A>
+
+</PRE><HR><FONT SIZE="-1"><B>&copy 2003 National Aeronautics and Space Administration (NASA). All rights reserved.</B></FONT>
+</BODY></HTML> \ No newline at end of file
diff --git a/src/cal/get_tle/tmp/get_tle.pl b/src/cal/get_tle/tmp/get_tle.pl
new file mode 100755
index 0000000..0693156
--- /dev/null
+++ b/src/cal/get_tle/tmp/get_tle.pl
@@ -0,0 +1,148 @@
+#!/usr/local/bin/perl
+use FileHandle;
+use IPC::Open2;
+
+###
+# OIG TLE retrieval program
+# DJG - 6/14/98
+#
+# Uses a file called "one" which has sat numbers to get
+#
+# Places all output in a single file called "five.tle".
+#
+###
+
+### Configure:
+##$login = "emurphy";
+##$passwd = "bdr529";
+
+$login = "mromelfanger";
+$passwd = "fusejhu";
+$output_filename = "five.tle";
+$log_filename = "get_tle.logfile";
+
+### (end of configure section)
+
+# system("fixlist one tempone");
+# chop($satstoget = `cat tempone`);
+# system("rm -f tempone");
+
+$satstoget = "25791";
+
+# The "output" file collects debugging copies of everything that comes back.
+open(OUT,">$log_filename") || die "Could not open output file";
+
+# The following logs in to OIG and gets the first "continue" code
+
+$host = "oig1.gsfc.nasa.gov";
+#$url = "scripts/foxweb.dll/loginok\@app01?tdac=&ffv01=$login&ffv02=$passwd";
+$url = "scripts/foxweb.exe/loginok\@app01?tdac=&ffv01=$login&ffv02=$passwd";
+
+open2 (\*Reader, \*Writer, "telnet $host 80") || die "Error opening connection";
+Writer->autoflush();
+
+print Reader "telnet $host 80\n";
+print Writer "GET \/$url\n";
+while (<Reader>) {
+ print OUT "$_"; # copy each login screen line to the output file
+ if (/tdac=(\w+)\"/) {
+ $continuecode = $1; # This code is the "continue" code
+ }
+}
+close(Reader);
+close(Writer);
+
+# $continuecode contains the very first "continue" code after login.
+
+print OUT "*** \n Starting User's Home Page output page \n***\n\n";
+
+# This url accesses the next screen (user home page)
+#$url = "scripts/foxweb.dll/favorhome\@app01?tdac=" . $continuecode;
+$url = "scripts/foxweb.exe/favorhome\@app01?tdac=" . $continuecode;
+# print $url; # debug print
+
+open2 (\*Reader, \*Writer, "telnet $host 80") || die "Error opening connection";
+Writer->autoflush();
+
+print Reader "telnet $host 80\n";
+print Writer "GET \/$url\n";
+
+while (<Reader>) {
+ print OUT "$_"; # copy each line to the output file
+
+ if(/tdac=(\w+)\"/) {
+
+# Look for the "tle ad hoc query" code and save it
+ chop($word = "$_");
+ if ($word =~ /ftleadhoc.+tdac=(\w+)\"/) {
+ $tlequerycode = "$1";
+ }
+ }
+}
+# close(HOMEPAGE);
+# This access is to the "TLE ad hoc query" web page.
+#$url = "scripts/foxweb.dll/ftleadhoc\@app01?tdac=" . $tlequerycode;
+$url = "scripts/foxweb.exe/ftleadhoc\@app01?tdac=" . $tlequerycode;
+
+open2 (\*Reader, \*Writer, "telnet $host 80") || die "Error opening connection";
+Writer->autoflush();
+
+print Reader "telnet $host 80\n";
+print Writer "GET \/$url\n";
+
+while (<Reader>) {
+ print OUT "$_"; # copy each login screen line to the output file
+
+ # Look for the TLE "submit" code
+ chop($word = "$_");
+ if ($word =~ /tdac\" VALUE=\"(\w+)\"/) {
+ $gotcode2 = "$1";
+ }
+}
+close(Reader);
+close(Writer);
+
+# Compose the TLE query and submit it
+#$url = "scripts/foxweb.dll/ftleadhoc\@app01?tdac=" . $gotcode2;
+$url = "scripts/foxweb.exe/ftleadhoc\@app01?tdac=" . $gotcode2;
+$url .= "&ffv01=" . $satstoget . "&ffv02=standard&ffv03=catno&ffv04=five";
+
+# print "$url\n"; # debug print
+
+# Read the reply and copy the relevant lines to output_filename
+
+$copy = "no";
+open(TLEOUT,">$output_filename") || die "Error opening $output_filename";
+
+open2 (\*Reader, \*Writer, "telnet $host 80") || die "Error opening connection";
+Writer->autoflush();
+
+print Reader "telnet $host 80\n";
+print Writer "GET \/$url\n";
+
+while (<Reader>) {
+ if ($_ =~ /<P>/) { # End copy operation
+ print "$_"; # write remaining limit to output file
+ $copy = "no";
+ }
+ if ($copy eq "yes") {
+ print TLEOUT "$_"; # copy every line to five.tle
+ # print "$_"; # and to the terminal
+ }
+ if (substr($_,0,5) eq "<PRE>") { # Begin copy operation
+ $copy = "yes";
+ }
+}
+close(Reader);
+close(Writer);
+close(TLEOUT);
+
+# The following will remove all session files. You can comment it
+# out for debugging.
+# system("rm -f output");
+
+# The following script "fixes up" the output
+# system("fix/do.fix.one");
+
+### end of Perl script
+
diff --git a/src/cal/get_tle/tmp/make_cvzramtool.pl b/src/cal/get_tle/tmp/make_cvzramtool.pl
new file mode 100755
index 0000000..4cb2e01
--- /dev/null
+++ b/src/cal/get_tle/tmp/make_cvzramtool.pl
@@ -0,0 +1,215 @@
+#!/usr/local/bin/perl
+use FileHandle;
+
+# This program will read in the latest FUSE TLE and recreate the
+# cvz_ram_tool.html web page.
+
+$output_filename = "/data2/violet/htdocs/support/tools/cvz_ram_tool.html";
+open (OUTF, ">$output_filename") || die "Cannot open cvz_ram_tool.html file";
+
+system("chmod ug+rw $output_filename");
+system("chgrp www $output_filename");
+
+$input_filename = "/data1/fuse/calfuse/calfiles/FUSE.TLE";
+open (INP_TLE, "<$input_filename") || die "Cannot open FUSE.TLE file";
+
+$line1 = <INP_TLE>;
+$line2 = <INP_TLE>;
+$line3 = <INP_TLE>;
+
+$id2 = substr($line2, 2, 5);
+$id3 = substr($line3, 2, 5);
+
+if (($id2 != 25791) || ($id3 != 25791)) {
+ print STDOUT "Error in TLE:\n";
+ print STDOUT $line1;
+ print STDOUT $line2;
+ print STDOUT $line3;
+ die "Error in TLE";
+}
+
+close (INP_TLE);
+
+$year = substr($line2, 18, 2);
+$doy = substr($line2, 20, 3);
+$dayfrac = substr($line2, 23, 9);
+$incl = substr($line3, 9, 8);
+$raan = substr($line3, 17,8);
+$eccen = substr($line3, 26, 7);
+$eccen = "0." . $eccen;
+$mean_mot = substr($line3, 52, 11);
+
+if ($year > 50) {
+ $year += 1900;
+} else {
+ $year += 2000;
+}
+
+$dayfrac = "0".$dayfrac;
+
+&convert_doy;
+&convert_dayfrac;
+&calculate_a0;
+
+$now=`date`;
+$datest = substr($now,4,3)." ".substr($now,8,2).", ".substr($now,24,4);
+
+print OUTF "<TITLE>FUSE CVZ/Ram Calculator</TITLE>\n";
+print OUTF "<h1>FUSE Continuous Viewing Zone and Orbit Ram Calculator V1.3</h1>\n";
+print OUTF "<h2>June 12, 1999 </h2>\n";
+
+print OUTF "The FUSE Continuous Viewing Zone and Orbit Ram \n";
+print OUTF "Calculator can determine when a given target \n";
+print OUTF "direction is in the continuous viewing zone. \n";
+print OUTF "It also calculates when a given target lies \n";
+print OUTF "within 20 degrees of the orbital plane and \n";
+print OUTF "cannot be observed due to ram avoidance\n";
+print OUTF "constraints. The default orbital elements \n";
+print OUTF "were last updated on $month $day, $year. \n";
+
+print OUTF "<HR>\n";
+print OUTF "<P>\n";
+print OUTF "<FORM METHOD=POST ACTION=\"http://fuse.pha.jhu.edu/cgi-bin/cvz_ram_tool\">\n";
+
+print OUTF "<INPUT TYPE=\"submit\" VALUE=\"Calculate CVZ visibilities\">\n";
+print OUTF "<INPUT TYPE=\"reset\" VALUE=\"Erase the input fields\">\n";
+print OUTF "<BR>\n";
+
+print OUTF "<BR>\n";
+print OUTF "<B>Target Parameters:</B>\n";
+print OUTF "<BLOCKQUOTE>\n";
+print OUTF "<BR>\n";
+print OUTF "<B>Right Ascension (format HH:MM:SS.SS):</B>\n";
+print OUTF "<INPUT NAME=\"right_ascension\" SIZE=15> <B>(J2000.0)</B>\n";
+print OUTF "<BR>\n";
+print OUTF "<B>Declination (format -DD:MM:SS.S):</B>\n";
+print OUTF "<INPUT NAME=\"declination\" SIZE=15> <B>(J2000.0)</B>\n";
+print OUTF "<BR>\n";
+print OUTF "</BLOCKQUOTE>\n";
+print OUTF "<BR>\n";
+print OUTF "<B>Output table parameters:</B>\n";
+print OUTF "<BLOCKQUOTE>\n";
+print OUTF "<B> Minimum Earth limb angle: </B><INPUT NAME=\"limb_ang\" SIZE=4 VALUE=\"15.0\"> \n";
+print OUTF "<B>(deg)</B>\n";
+print OUTF "<BR>\n";
+print OUTF "<B>Start Date:</B>\n";
+print OUTF "<SELECT NAME=\"month\">\n";
+print OUTF "<OPTION> <B>$month</B>\n";
+print OUTF "<OPTION> January\n";
+print OUTF "<OPTION> February\n";
+print OUTF "<OPTION> March\n";
+print OUTF "<OPTION> April\n";
+print OUTF "<OPTION> May\n";
+print OUTF "<OPTION> June\n";
+print OUTF "<OPTION> July\n";
+print OUTF "<OPTION> August\n";
+print OUTF "<OPTION> September\n";
+print OUTF "<OPTION> October\n";
+print OUTF "<OPTION> November\n";
+print OUTF "<OPTION> December\n";
+print OUTF "</SELECT>\n";
+print OUTF "<INPUT NAME=\"day\" SIZE=4 VALUE=\"1\">\n";
+print OUTF "<INPUT NAME=\"year\" SIZE=8 VALUE=\"$year\">\n";
+print OUTF "<BR>\n";
+print OUTF "<B>Time step:<INPUT NAME=\"time_step\" SIZE=6 VALUE=\"1.0\">days</B><BR>\n";
+print OUTF "<B>Number of steps:<INPUT NAME=\"number_steps\" SIZE=6 VALUE=\"10\"></B><BR>\n";
+print OUTF "</BLOCKQUOTE>\n";
+print OUTF "<BR>\n";
+print OUTF "<B>FUSE classical Keplarian orbital elements:</B>\n";
+print OUTF "<BLOCKQUOTE>\n";
+print OUTF "<B>Epoch date of elements:</B>\n";
+print OUTF "<SELECT NAME=\"orb_month\">\n";
+print OUTF "<OPTION> $month\n";
+print OUTF "<OPTION> January\n";
+print OUTF "<OPTION> February\n";
+print OUTF "<OPTION> March\n";
+print OUTF "<OPTION> April\n";
+print OUTF "<OPTION> May\n";
+print OUTF "<OPTION> June\n";
+print OUTF "<OPTION> July\n";
+print OUTF "<OPTION> August\n";
+print OUTF "<OPTION> September\n";
+print OUTF "<OPTION> October\n";
+print OUTF "<OPTION> November\n";
+print OUTF "<OPTION> December\n";
+print OUTF "</SELECT>\n";
+print OUTF "<INPUT NAME=\"orb_day\" SIZE=4 VALUE=\"$day\">\n";
+print OUTF "<INPUT NAME=\"orb_year\" SIZE=8 VALUE=\"$year\">\n";
+print OUTF "<BR>\n";
+print OUTF "<B>Epoch UT time of elements (format HH:MM:SS.SS):</B>\n";
+printf OUTF "<INPUT NAME=\"orb_time\" SIZE=12 VALUE=\"%02d:%02d:%05.2f\">\n",$hour,$minute,$second;
+print OUTF "<BR>\n";
+print OUTF "<B>Semi-major axis (km):</B>\n";
+printf OUTF "<INPUT NAME=\"orb_a\" SIZE=15 value=\"%7.3f\"> \n",$semiax;
+print OUTF "<BR>\n";
+print OUTF "<B>Right ascension of the ascending node (degrees):</B>\n";
+print OUTF "<INPUT NAME=\"orb_raan\" SIZE=15 value=\"$raan\">\n";
+print OUTF "<BR>\n";
+print OUTF "<B>Orbit inclination (degrees):</B>\n";
+print OUTF "<INPUT NAME=\"orb_i\" SIZE=15 value=\"$incl\">\n";
+print OUTF "<BR>\n";
+print OUTF "<B>Eccentricity:</B>\n";
+print OUTF "<INPUT NAME=\"orb_e\" SIZE=15 value=\"$eccen\"> \n";
+print OUTF "</BLOCKQUOTE>\n";
+print OUTF "<BR>\n";
+print OUTF "<INPUT TYPE=\"submit\" VALUE=\"Calculate CVZ visibilities\">\n";
+print OUTF "<INPUT TYPE=\"reset\" VALUE=\"Erase the input fields\">\n";
+print OUTF "</FORM>\n";
+
+print OUTF "<HR>\n";
+print OUTF "This page uses the <a href=\"http://star-www.rl.ac.uk/\"> STARLINK </a>\n";
+print OUTF "set of astronomical subroutines.\n";
+print OUTF "<BR>\n";
+print OUTF "This page was automatically generated on $now";
+print OUTF "<BR>\n";
+print OUTF "<a href=\"mailto:emurphy\@pha.jhu.edu\"><address>emurphy\@pha.jhu.edu</address></a>\n";
+
+close (OUTF);
+
+### end of Perl script
+
+
+sub convert_doy {
+ @daytab1 = (0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
+ @daytab2 = (0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
+ @monthstr = ("", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
+
+ if ((($year%4 == 0) && ($year%100 != 0)) || ($year%400 == 0)) {
+ # $year is a leap year use daytab1
+ for ($i = 1; $doy > $daytab1[$i]; $i++) {
+ $doy -= $daytab1[$i];
+ }
+ } else {
+ # $year is not a leap year, use daytab2
+ for ($i = 1; $doy > $daytab2[$i]; $i++) {
+ $doy -= $daytab2[$i];
+ }
+ }
+ $month = $monthstr[$i];
+ $day = $doy;
+}
+
+sub convert_dayfrac {
+ $dayfrac *= 24.0;
+ $hour = int($dayfrac);
+ $minute = int(($dayfrac-$hour)*60.0);
+ $second = ((($dayfrac-$hour)*60.0)-$minute)*60.0;
+}
+
+sub calculate_a0 {
+
+$mu = 3.986005E5;
+$pi = 3.14159265358979;
+$radian = 0.0174532925200;
+
+$mm=2.0*$pi*$mean_mot/(24.0*60.0);
+$ke=0.74366916E-1;
+$k2=5.413080E-4;
+$a1=($ke/$mm)**(2.0/3.0);
+$inrad = $incl * $radian;
+
+$d1=3.0/2.0*$k2/($a1*$a1)*(3.0*cos($inrad)*cos($inrad)-1.0)/((1.0-$eccen*$eccen)**(3.0/2.0));
+$a0=$a1*(1.0-$d1/3.0-$d1*$d1-134.0/81.0*$d1*$d1*$d1);
+$d0=3.0/2.0*$k2/($a0*$a0)*(3.0*cos($inrad)*cos($inrad)-1.0)/((1.0-$eccen*$eccen)**(3.0/2.0));
+$semiax=$a0/(1-$d0)*6378.135;
+}
diff --git a/src/cal/get_tle/tmp/make_orbit.pl b/src/cal/get_tle/tmp/make_orbit.pl
new file mode 100755
index 0000000..a8f00ff
--- /dev/null
+++ b/src/cal/get_tle/tmp/make_orbit.pl
@@ -0,0 +1,233 @@
+#!/usr/local/bin/perl
+use FileHandle;
+
+# Ed Murphy's program to rewrite the orbit page
+# Updated 03/27/00 Changed GSOC to Heavens Above
+
+$output_filename = "/data2/violet/htdocs/users/orbit.html";
+open (OUTF, ">$output_filename") || die "Cannot open $output_filename file";
+
+system("chmod ug+rw $output_filename");
+system("chgrp www $output_filename");
+
+$input_filename = "/data1/fuse/calfuse/calfiles/FUSE.TLE";
+open (INP_TLE, "<$input_filename") || die "Cannot open $input_filename file";
+
+$satid = 25791;
+
+&input_lines;
+
+close (INP_TLE);
+
+&parse_lines;
+
+&convert_doy;
+&convert_dayfrac;
+&calculate_a0;
+&calculate_orbs;
+
+$now=`date`;
+$datest = substr($now,4,3)." ".substr($now,8,2).", ".substr($now,24,4);
+
+print OUTF "<HTML>\n";
+print OUTF "<HEAD>\n";
+print OUTF "<title>FUSE Orbital Elements page</title>\n";
+print OUTF "</HEAD>\n";
+print OUTF "<BODY bgcolor=#ffffff ALINK=\"#000000\" VLINK=\"darkblue\">\n";
+print OUTF "<center>\n";
+print OUTF "<table width=640>\n";
+print OUTF "<tr><td>\n";
+print OUTF "<img src=\"/figures/purple_line2.gif\" width=640>\n";
+print OUTF "<table cellpadding=5 cellspacing=5 width=550>\n";
+print OUTF "<tr>\n";
+print OUTF "<td valign=top align=left>\n";
+print OUTF "<img src=\"/figures/andromeda_moo_small.gif\">\n";
+print OUTF "</td>\n";
+print OUTF "<td valign=top align=left>\n";
+print OUTF "<font size=+3><font color=\"#6666CC\">\n";
+print OUTF "<b>FUSE<P>\n";
+print OUTF "<i>Orbital Elements</font></font></i></b>\n";
+print OUTF "</td>\n";
+print OUTF "</tr>\n";
+print OUTF "</table>\n";
+print OUTF "<img src=\"/figures/purple_line2.gif\" width=640>\n";
+print OUTF "<p>\n";
+print OUTF "<center>\n";
+print OUTF "<font color=\"#CC0099\" size=4><b>\n";
+print OUTF "Where is FUSE now?<br></b></font>\n";
+print OUTF "<font size=4>Check out the\n";
+print OUTF "<a href=\"http://www.heavens-above.com/orbitdisplay.asp?lat=39.3&lng=-76.6&loc=BALTIMORE&TZ=EST&satid=25791\" >\n";
+print OUTF "Heavens-Above Satellite Predictions page </a></font>.\n";
+print OUTF "</center>\n";
+print OUTF "<P>\n";
+print OUTF "<hr>\n";
+print OUTF "<p><pre>\n";
+print OUTF " \n";
+print OUTF "FUSE orbital elements:\n";
+print OUTF " NORAD number 25791\n";
+print OUTF " International ID 99035A\n";
+print OUTF " \n";
+
+&print_orb;
+
+print OUTF "</pre>\n";
+
+&print_tail;
+
+close (OUTF);
+
+### end of Perl script
+
+
+sub convert_doy {
+ @daytab1 = (0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
+ @daytab2 = (0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
+ @monthstr = ("", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
+
+ if ((($year%4 == 0) && ($year%100 != 0)) || ($year%400 == 0)) {
+ # $year is a leap year use daytab1
+ for ($i = 1; $doy > $daytab1[$i]; $i++) {
+ $doy -= $daytab1[$i];
+ }
+ } else {
+ # $year is not a leap year, use daytab2
+ for ($i = 1; $doy > $daytab2[$i]; $i++) {
+ $doy -= $daytab2[$i];
+ }
+ }
+ $month = $monthstr[$i];
+ $day = $doy;
+}
+
+sub convert_dayfrac {
+ $dayfrac *= 24.0;
+ $hour = int($dayfrac);
+ $minute = int(($dayfrac-$hour)*60.0);
+ $second = ((($dayfrac-$hour)*60.0)-$minute)*60.0;
+}
+
+sub input_lines {
+$line1 = <INP_TLE>;
+$line2 = <INP_TLE>;
+$line3 = <INP_TLE>;
+
+$id2 = substr($line2, 2, 5);
+$id3 = substr($line3, 2, 5);
+
+if (($id2 != $satid) || ($id3 != $satid)) {
+ print STDOUT "Error in TLE:\n";
+ print STDOUT $line1;
+ print STDOUT $line2;
+ print STDOUT $line3;
+# die "Error in TLE";
+}
+
+}
+
+sub parse_lines {
+$year = substr($line2, 18, 2);
+$doy = substr($line2, 20, 3);
+$dayfrac = substr($line2, 23, 9);
+$epoch = $year.$doy.$dayfrac;
+$incl = substr($line3, 9, 8);
+$raan = substr($line3, 17,8);
+$eccen = substr($line3, 26, 7);
+$eccen = "0." . $eccen;
+$mean_mot = substr($line3, 52, 11);
+$mean_anom = substr($line3, 43, 8);
+$arg_perig = substr($line3, 34, 8);
+
+
+if ($year > 50) {
+ $year += 1900;
+} else {
+ $year += 2000;
+}
+
+$dayfrac = "0".$dayfrac;
+
+}
+
+sub calculate_a0 {
+
+$mu = 3.986005E5;
+$pi = 3.14159265358979;
+$radian = 0.0174532925200;
+
+$mm=2.0*$pi*$mean_mot/(24.0*60.0);
+$ke=0.74366916E-1;
+$k2=5.413080E-4;
+$a1=($ke/$mm)**(2.0/3.0);
+$inrad = $incl * $radian;
+
+$d1=3.0/2.0*$k2/($a1*$a1)*(3.0*cos($inrad)*cos($inrad)-1.0)/((1.0-$eccen*$eccen)**(3.0/2.0));
+$a0=$a1*(1.0-$d1/3.0-$d1*$d1-134.0/81.0*$d1*$d1*$d1);
+$d0=3.0/2.0*$k2/($a0*$a0)*(3.0*cos($inrad)*cos($inrad)-1.0)/((1.0-$eccen*$eccen)**(3.0/2.0));
+$semiax=$a0/(1-$d0)*6378.135;
+
+}
+
+sub calculate_orbs {
+
+$period = 60.0*24.0/($mean_mot/(1+$d0));
+$cax=$eccen*$semiax;
+$perigee=$semiax-$cax-6378.1;
+$apogee=$semiax+$cax-6378.1;
+
+}
+
+sub print_orb {
+print OUTF " Epoch $epoch\n";
+printf OUTF " Semimajor axis %7.2f km\n",$semiax;
+printf OUTF " Apogee %5.2f km\n",$apogee;
+printf OUTF " Perigee %5.2f km\n",$perigee;
+print OUTF " Eccentricity $eccen\n";
+printf OUTF " Inclination %6.2f degrees\n",$incl;
+printf OUTF " Period %6.2f minutes\n",$period;
+printf OUTF " RA of asc. node %6.2f degrees\n",$raan;
+printf OUTF " Arg. of perigee %6.2f degrees\n",$arg_perig;
+printf OUTF " Mean anomaly %6.2f degrees\n",$mean_anom;
+print OUTF " \n";
+
+}
+
+sub print_tail {
+print OUTF "<p>";
+
+print OUTF "The FUSE Delta II second stage (NORAD #25792) reentered on \n";
+print OUTF "the morning of August 4, 1999 during orbit number 708. \n";
+print OUTF "According to predictions by Alan Pickup, reentry \n";
+print OUTF "occured within 90 minutes of 5:31 UT, probably over the \n";
+print OUTF "Arabian Sea or India. The final orbit was 119 x 103 km (74 x 64 mi).\n";
+print OUTF "<p>";
+print OUTF "<center>";
+print OUTF "<font size=+2><font color=\"#6666CC\">\n";
+print OUTF "<a href=\"reentry.html\"> Could anything have survived reentry?</a></font></font><p>\n";
+print OUTF "</center>";
+print OUTF "<img align=center src=\"delta2decay.gif\">\n";
+print OUTF "<P>These numbers assume a Keplerian orbit; the actual apogee and perigee \n";
+print OUTF "will differ by a few km on an orbit-to-orbit basis.\n";
+print OUTF "<p>";
+print OUTF "<p>The NORAD Two-Line Elements (TLEs) for FUSE can be found in the file \n";
+print OUTF "<a href=\"./FUSE.TLE\" > FUSE.TLE </A>.\n";
+print OUTF "<p> \n";
+print OUTF "This page is automatically updated daily. I wish to thank \n";
+print OUTF "<a href=\"mailto:deej\@deej.com\">Doyle Groves</a> \n";
+print OUTF "for providing a Perl script to access the NASA\n";
+print OUTF "Orbital Information Group web page.\n";
+print OUTF "<p> Ed Murphy, <a href=\"mailto:emurphy\@pha.jhu.edu\">\n";
+print OUTF "<address>emurphy\@pha.jhu.edu</address></a>\n";
+print OUTF "<P>\n";
+print OUTF "<img src=\"/figures/purple_line2.gif\" width=640>\n";
+print OUTF "<P>\n";
+print OUTF "Last changed: $datest.\n";
+print OUTF "<P>\n";
+print OUTF "<i><a href=\"/index.shtml\">Return to the FUSE home page.</a></i><br clear=left>\n";
+print OUTF "<p>\n";
+print OUTF "</td></tr>\n";
+print OUTF "</table>\n";
+print OUTF "</center>\n";
+print OUTF "</BODY>\n";
+print OUTF "</HTML>\n";
+
+}
diff --git a/src/cal/get_tle/tmp/test_get_tle.pl b/src/cal/get_tle/tmp/test_get_tle.pl
new file mode 100755
index 0000000..33b72e5
--- /dev/null
+++ b/src/cal/get_tle/tmp/test_get_tle.pl
@@ -0,0 +1,148 @@
+#!/usr/local/bin/perl
+use FileHandle;
+use IPC::Open2;
+
+###
+# OIG TLE retrieval program
+# DJG - 6/14/98
+#
+# Uses a file called "one" which has sat numbers to get
+#
+# Places all output in a single file called "five.tle".
+#
+###
+
+### Configure:
+##$login = "emurphy";
+##$passwd = "bdr529";
+
+$login = "mromelfanger";
+$passwd = "fusejhu";
+$output_filename = "/data1/fuse/calfuse/caltemp/five.tle";
+$log_filename = "/data1/fuse/calfuse/caltemp/get_tle.logfile";
+
+### (end of configure section)
+
+# system("fixlist one tempone");
+# chop($satstoget = `cat tempone`);
+# system("rm -f tempone");
+
+$satstoget = "25791";
+
+# The "output" file collects debugging copies of everything that comes back.
+open(OUT,">$log_filename") || die "Could not open output file";
+
+# The following logs in to OIG and gets the first "continue" code
+
+$host = "oig1.gsfc.nasa.gov";
+#$url = "scripts/foxweb.dll/loginok\@app01?tdac=&ffv01=$login&ffv02=$passwd";
+$url = "scripts/foxweb.exe/loginok\@app01?tdac=&ffv01=$login&ffv02=$passwd";
+
+open2 (\*Reader, \*Writer, "telnet $host 80") || die "Error opening connection";
+Writer->autoflush();
+
+print Reader "telnet $host 80\n";
+print Writer "GET \/$url\n";
+while (<Reader>) {
+ print OUT "$_"; # copy each login screen line to the output file
+ if (/tdac=(\w+)\"/) {
+ $continuecode = $1; # This code is the "continue" code
+ }
+}
+close(Reader);
+close(Writer);
+
+# $continuecode contains the very first "continue" code after login.
+
+print OUT "*** \n Starting User's Home Page output page \n***\n\n";
+
+# This url accesses the next screen (user home page)
+#$url = "scripts/foxweb.dll/favorhome\@app01?tdac=" . $continuecode;
+$url = "scripts/foxweb.exe/favorhome\@app01?tdac=" . $continuecode;
+# print $url; # debug print
+
+open2 (\*Reader, \*Writer, "telnet $host 80") || die "Error opening connection";
+Writer->autoflush();
+
+print Reader "telnet $host 80\n";
+print Writer "GET \/$url\n";
+
+while (<Reader>) {
+ print OUT "$_"; # copy each line to the output file
+
+ if(/tdac=(\w+)\"/) {
+
+# Look for the "tle ad hoc query" code and save it
+ chop($word = "$_");
+ if ($word =~ /ftleadhoc.+tdac=(\w+)\"/) {
+ $tlequerycode = "$1";
+ }
+ }
+}
+# close(HOMEPAGE);
+# This access is to the "TLE ad hoc query" web page.
+#$url = "scripts/foxweb.dll/ftleadhoc\@app01?tdac=" . $tlequerycode;
+$url = "scripts/foxweb.exe/ftleadhoc\@app01?tdac=" . $tlequerycode;
+
+open2 (\*Reader, \*Writer, "telnet $host 80") || die "Error opening connection";
+Writer->autoflush();
+
+print Reader "telnet $host 80\n";
+print Writer "GET \/$url\n";
+
+while (<Reader>) {
+ print OUT "$_"; # copy each login screen line to the output file
+
+ # Look for the TLE "submit" code
+ chop($word = "$_");
+ if ($word =~ /tdac\" VALUE=\"(\w+)\"/) {
+ $gotcode2 = "$1";
+ }
+}
+close(Reader);
+close(Writer);
+
+# Compose the TLE query and submit it
+#$url = "scripts/foxweb.dll/ftleadhoc\@app01?tdac=" . $gotcode2;
+$url = "scripts/foxweb.exe/ftleadhoc\@app01?tdac=" . $gotcode2;
+$url .= "&ffv01=" . $satstoget . "&ffv02=standard&ffv03=catno&ffv04=five";
+
+# print "$url\n"; # debug print
+
+# Read the reply and copy the relevant lines to output_filename
+
+$copy = "no";
+open(TLEOUT,">$output_filename") || die "Error opening $output_filename";
+
+open2 (\*Reader, \*Writer, "telnet $host 80") || die "Error opening connection";
+Writer->autoflush();
+
+print Reader "telnet $host 80\n";
+print Writer "GET \/$url\n";
+
+while (<Reader>) {
+ if ($_ =~ /<P>/) { # End copy operation
+ print "$_"; # write remaining limit to output file
+ $copy = "no";
+ }
+ if ($copy eq "yes") {
+ print TLEOUT "$_"; # copy every line to five.tle
+ # print "$_"; # and to the terminal
+ }
+ if (substr($_,0,5) eq "<PRE>") { # Begin copy operation
+ $copy = "yes";
+ }
+}
+close(Reader);
+close(Writer);
+close(TLEOUT);
+
+# The following will remove all session files. You can comment it
+# out for debugging.
+# system("rm -f output");
+
+# The following script "fixes up" the output
+# system("fix/do.fix.one");
+
+### end of Perl script
+
diff --git a/src/cal/get_tle/tmp/test_tle.csh b/src/cal/get_tle/tmp/test_tle.csh
new file mode 100755
index 0000000..5431552
--- /dev/null
+++ b/src/cal/get_tle/tmp/test_tle.csh
@@ -0,0 +1,50 @@
+#!/bin/csh -f
+#******************************************************************************
+#* Johns Hopkins University
+#* Center For Astrophysical Sciences
+#* FUSE
+#*****************************************************************************
+#*
+#* Synopsis: update_tle
+#*
+#* Description: Shell script for automatically downloading the latest
+#* orbital elements from the GSFC OIG, and placing these
+#* elements in the FUSE.TLE file. It will also update
+#* the cvz_ram_tool.html calculator.
+#*
+#* All messages are to stdout or stderr.
+#*
+#* Arguments: None
+#*
+#* Returns: Exit codes:
+#* 0 successful execution
+#*
+#* History: 07/27/99 emm Begin work.
+#******************************************************************************/
+
+set tlestat=0
+
+# Step 1
+/usr/local/fusesw/calfuse/current/src/cal/get_tle/get_tle.pl
+set cfstat=$status
+
+# Step 2
+if !({$cfstat}) then
+ /usr/local/fusesw/calfuse/current/src/cal/get_tle/add_tle.pl
+ set cfstat=$status
+endif
+
+# Step 3
+if !({$cfstat}) then
+ /usr/local/fusesw/calfuse/current/src/cal/get_tle/make_cvzramtool.pl
+ set cfstat=$status
+endif
+
+# Step 4
+if !({$cfstat}) then
+ /usr/local/fusesw/calfuse/current/src/cal/get_tle/make_orbit.pl
+ set cfstat=$status
+endif
+
+exit($cfstat)
+
diff --git a/src/cal/get_tle/tmp/update_tle.csh b/src/cal/get_tle/tmp/update_tle.csh
new file mode 100755
index 0000000..5c076bd
--- /dev/null
+++ b/src/cal/get_tle/tmp/update_tle.csh
@@ -0,0 +1,55 @@
+#!/bin/csh -f
+#******************************************************************************
+#* Johns Hopkins University
+#* Center For Astrophysical Sciences
+#* FUSE
+#*****************************************************************************
+#*
+#* Synopsis: update_tle
+#*
+#* Description: Shell script for automatically downloading the latest
+#* orbital elements from the GSFC OIG, and placing these
+#* elements in the FUSE.TLE file. It will also update
+#* the cvz_ram_tool.html calculator.
+#*
+#* All messages are to stdout or stderr.
+#*
+#* Arguments: None
+#*
+#* Returns: Exit codes:
+#* 0 successful execution
+#*
+#* History: 07/27/99 emm Begin work.
+#* 10/23/00 mlr changed path from v1.4 to current
+#******************************************************************************/
+
+set tlestat=0
+
+# Step 1
+#/usr/local/fusesw/calfuse/v1.4/src/cal/get_tle/get_tle.pl
+/usr/local/fusesw/calfuse/current/src/cal/get_tle/get_tle.pl
+set cfstat=$status
+
+# Step 2
+if !({$cfstat}) then
+# /usr/local/fusesw/calfuse/v1.4/src/cal/get_tle/add_tle.pl
+ /usr/local/fusesw/calfuse/current/src/cal/get_tle/add_tle.pl
+ set cfstat=$status
+endif
+
+# Step 3
+if !({$cfstat}) then
+# /usr/local/fusesw/calfuse/v1.4/src/cal/get_tle/make_cvzramtool.pl
+ /usr/local/fusesw/calfuse/current/src/cal/get_tle/make_cvzramtool.pl
+ set cfstat=$status
+endif
+
+# Step 4
+if !({$cfstat}) then
+# /usr/local/fusesw/calfuse/v1.4/src/cal/get_tle/make_orbit.pl
+ /usr/local/fusesw/calfuse/current/src/cal/get_tle/make_orbit.pl
+ set cfstat=$status
+endif
+
+exit($cfstat)
+
diff --git a/src/cal/get_tle/update_tle.csh b/src/cal/get_tle/update_tle.csh
new file mode 100755
index 0000000..bc9ae34
--- /dev/null
+++ b/src/cal/get_tle/update_tle.csh
@@ -0,0 +1,57 @@
+#!/bin/csh -f
+#******************************************************************************
+#* Johns Hopkins University
+#* Center For Astrophysical Sciences
+#* FUSE
+#*****************************************************************************
+#*
+#* Synopsis: update_tle
+#*
+#* Description: Shell script for automatically downloading the latest
+#* orbital elements from the GSFC OIG, and placing these
+#* elements in the FUSE.TLE file. It will also update
+#* the cvz_ram_tool.html calculator.
+#*
+#* All messages are to stdout or stderr.
+#*
+#* Arguments: None
+#*
+#* Returns: Exit codes:
+#* 0 successful execution
+#*
+#* History: 07/27/99 emm Begin work.
+#* 10/23/00 mlr changed path from v1.4 to current
+#******************************************************************************/
+
+set tlestat=0
+
+# Step 1
+#/usr/local/fusesw/calfuse/v1.4/src/cal/get_tle/get_tle.pl
+#/usr/local/fusesw/calfuse/current/src/cal/get_tle/get_tle.pl
+#/usr/local/j2sdk1.4.2_06/bin/java -classpath /usr/local/fusesw/calfuse/current/src/cal/get_tle GetTLE
+/usr/local/java/bin/java -classpath /usr/local/fusesw/calfuse/current/src/cal/get_tle GetTLE
+set cfstat=$status
+
+# Step 2
+if !({$cfstat}) then
+# /usr/local/fusesw/calfuse/v1.4/src/cal/get_tle/add_tle.pl
+ /usr/local/fusesw/calfuse/current/src/cal/get_tle/add_tle.pl
+ set cfstat=$status
+endif
+
+# Step 3
+if !({$cfstat}) then
+# /usr/local/fusesw/calfuse/v1.4/src/cal/get_tle/make_cvzramtool.pl
+ /usr/local/fusesw/calfuse/current/src/cal/get_tle/make_cvzramtool.pl
+ set cfstat=$status
+endif
+
+# Step 4
+if !({$cfstat}) then
+# /usr/local/fusesw/calfuse/v1.4/src/cal/get_tle/make_orbit.pl
+ /usr/local/fusesw/calfuse/current/src/cal/get_tle/make_orbit.pl
+ set cfstat=$status
+endif
+
+exit($cfstat)
+
diff --git a/src/cal/jitter/Makefile.Linux.orig b/src/cal/jitter/Makefile.Linux.orig
new file mode 100644
index 0000000..aafa61d
--- /dev/null
+++ b/src/cal/jitter/Makefile.Linux.orig
@@ -0,0 +1,43 @@
+
+FITSVER= 2.470
+CALFUSEDIR= ${PWD}/../../..
+
+# Symbols for include directories
+FUSEINCLDIR= -I${CALFUSEDIR}/include
+
+# Symbols used for compiling
+CC= cc
+OPT= -g -Wall -DCFORTRAN -Dg77Fortran -Df2cFortran
+CFLAGS= ${OPT} ${FUSEINCLDIR}
+
+# Symbols used for creating shared binaries
+FUSEBINDIR= ${CALFUSEDIR}/bin
+FUSELIBDIR= -L${CALFUSEDIR}/lib
+FUSELIBS= -lsla -lcfitsio-${FITSVER} -lcf
+LIBS= -lc -lm -lnsl -ldl -lgfortran
+LDFLAGS= -Wl,-R${CALFUSEDIR}/lib
+
+# binaries to be made
+
+BINS= cf_jitter_diag cf_jitter
+
+all: ${BINS}
+ chmod g+rw ${BINS}
+
+install: all
+ /bin/cp ${BINS} ${FUSEBINDIR}
+
+clean:
+ /bin/rm -f *.o ${BINS}
+
+distclean:
+ /bin/rm -f *.o ${BINS}
+ cd ../../../bin; /bin/rm -f ${BINS}
+
+cf_jitter_diag: cf_jitter_diag.c
+ ${CC} ${CFLAGS} -o cf_jitter_diag cf_jitter_diag.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_jitter: cf_jitter.c
+ ${CC} ${CFLAGS} -o cf_jitter cf_jitter.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
diff --git a/src/cal/jitter/Makefile.Linux64.orig b/src/cal/jitter/Makefile.Linux64.orig
new file mode 100644
index 0000000..f6cf992
--- /dev/null
+++ b/src/cal/jitter/Makefile.Linux64.orig
@@ -0,0 +1,42 @@
+
+CALFUSEDIR= ${PWD}/../../..
+
+# Symbols for include directories
+FUSEINCLDIR= -I${CALFUSEDIR}/include
+
+# Symbols used for compiling
+CC= cc
+OPT= -g -Wall -DCFORTRAN -Dg77Fortran -Df2cFortran
+CFLAGS= ${OPT} ${FUSEINCLDIR}
+
+# Symbols used for creating shared binaries
+FUSEBINDIR= ${CALFUSEDIR}/bin
+FUSELIBDIR= -L${CALFUSEDIR}/lib
+FUSELIBS= -lsla -lcf
+LIBS= -lc -lm -lnsl -ldl -lgfortran -lcfitsio
+LDFLAGS= -Wl,-R${CALFUSEDIR}/lib
+
+# binaries to be made
+
+BINS= cf_jitter_diag cf_jitter
+
+all: ${BINS}
+ chmod g+rw ${BINS}
+
+install: all
+ /bin/cp ${BINS} ${FUSEBINDIR}
+
+clean:
+ /bin/rm -f *.o ${BINS}
+
+distclean:
+ /bin/rm -f *.o ${BINS}
+ cd ../../../bin; /bin/rm -f ${BINS}
+
+cf_jitter_diag: cf_jitter_diag.c
+ ${CC} ${CFLAGS} -o cf_jitter_diag cf_jitter_diag.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_jitter: cf_jitter.c
+ ${CC} ${CFLAGS} -o cf_jitter cf_jitter.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
diff --git a/src/cal/jitter/Makefile.MacOSX.orig b/src/cal/jitter/Makefile.MacOSX.orig
new file mode 100644
index 0000000..fc408c9
--- /dev/null
+++ b/src/cal/jitter/Makefile.MacOSX.orig
@@ -0,0 +1,46 @@
+
+FITSVER= 2.470
+CALFUSEDIR= ${PWD}/../../..
+MACOSX_DEPLOYMENT_TARGET= 10.2
+
+# Symbols for include directories
+FUSEINCLDIR= -I${CALFUSEDIR}/include
+
+# Symbols used for compiling
+CC= cc
+OPT= -O3 -Wall -DCFORTRAN -Dg77Fortran -Df2cFortran
+CFLAGS= ${OPT} ${FUSEINCLDIR}
+
+# Symbols used for creating shared binaries
+FUSEBINDIR= ${CALFUSEDIR}/bin
+FUSELIBDIR= -L${CALFUSEDIR}/lib
+FUSELIBS= -lsla -lcfitsio -lcf
+LIBS= -lc -lm -ldl -L/sw/lib/ -lgfortran
+
+# Binaries to be made
+
+BINS= cf_jitter_diag cf_jitter
+
+all: ${BINS}
+ chmod g+rw ${BINS}
+
+install:
+ MACOSX_DEPLOYMENT_TARGET="${MACOSX_DEPLOYMENT_TARGET}"; \
+ export MACOSX_DEPLOYMENT_TARGET; \
+ make all
+ /bin/cp ${BINS} ${FUSEBINDIR}
+
+clean:
+ /bin/rm -f *.o ${BINS}
+
+distclean:
+ /bin/rm -f *.o ${BINS}
+ cd ../../../bin; /bin/rm -f ${BINS}
+
+cf_jitter_diag: cf_jitter_diag.c
+ ${CC} ${CFLAGS} -o cf_jitter_diag cf_jitter_diag.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_jitter: cf_jitter.c
+ ${CC} ${CFLAGS} -o cf_jitter cf_jitter.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
diff --git a/src/cal/jitter/Makefile.Solaris.orig b/src/cal/jitter/Makefile.Solaris.orig
new file mode 100644
index 0000000..f182b16
--- /dev/null
+++ b/src/cal/jitter/Makefile.Solaris.orig
@@ -0,0 +1,50 @@
+
+FITSVER= 2.470
+CALFUSEDIR= ${PWD}/../../..
+
+# Symbols for include directories
+FUSEINCLDIR= -I${CALFUSEDIR}/include
+
+# Symbols used for compiling
+CC= cc
+# Romelfanger's optimizations
+# OPT= -fast -xO5 -xtarget=ultra2 -xarch=v8plusa
+#
+# SunWorld's optimizations
+# OPT= -p -v -xO2 -xdepend -xchip=ultra -xarch=generic
+OPT= -O -DCFORTRAN -KPIC -DSOLARIS
+CFLAGS= ${OPT} ${FUSEINCLDIR}
+
+# Symbols used for creating shared binaries
+FUSEBINDIR= ${CALFUSEDIR}/bin
+FUSELIBDIR= -L${CALFUSEDIR}/lib
+LIBDIR= -L/opt/SUNWspro/lib
+FUSELIBS= -lsla -lcfitsio-${FITSVER} -lcf
+LIBS= -lc -lm -lnsl -ldl -lsocket -lsunmath -lM77 -lF77
+LDFLAGS= -Wl,-R${CALFUSEDIR}/lib
+
+# binaries to be made
+
+BINS= cf_jitter_diag cf_jitter
+
+all: ${BINS}
+ chmod g+rw ${BINS}
+
+install: all
+ /bin/cp ${BINS} ${FUSEBINDIR}
+
+clean:
+ /bin/rm -f *.o ${BINS}
+
+distclean:
+ /bin/rm -f *.o ${BINS}
+ cd ../../../bin; /bin/rm -f ${BINS}
+
+cf_jitter_diag: cf_jitter_diag.c
+ ${CC} ${CFLAGS} -o cf_jitter_diag cf_jitter_diag.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_jitter: cf_jitter.c
+ ${CC} ${CFLAGS} -o cf_jitter cf_jitter.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
diff --git a/src/cal/jitter/Makefile.orig.orig b/src/cal/jitter/Makefile.orig.orig
new file mode 100644
index 0000000..f182b16
--- /dev/null
+++ b/src/cal/jitter/Makefile.orig.orig
@@ -0,0 +1,50 @@
+
+FITSVER= 2.470
+CALFUSEDIR= ${PWD}/../../..
+
+# Symbols for include directories
+FUSEINCLDIR= -I${CALFUSEDIR}/include
+
+# Symbols used for compiling
+CC= cc
+# Romelfanger's optimizations
+# OPT= -fast -xO5 -xtarget=ultra2 -xarch=v8plusa
+#
+# SunWorld's optimizations
+# OPT= -p -v -xO2 -xdepend -xchip=ultra -xarch=generic
+OPT= -O -DCFORTRAN -KPIC -DSOLARIS
+CFLAGS= ${OPT} ${FUSEINCLDIR}
+
+# Symbols used for creating shared binaries
+FUSEBINDIR= ${CALFUSEDIR}/bin
+FUSELIBDIR= -L${CALFUSEDIR}/lib
+LIBDIR= -L/opt/SUNWspro/lib
+FUSELIBS= -lsla -lcfitsio-${FITSVER} -lcf
+LIBS= -lc -lm -lnsl -ldl -lsocket -lsunmath -lM77 -lF77
+LDFLAGS= -Wl,-R${CALFUSEDIR}/lib
+
+# binaries to be made
+
+BINS= cf_jitter_diag cf_jitter
+
+all: ${BINS}
+ chmod g+rw ${BINS}
+
+install: all
+ /bin/cp ${BINS} ${FUSEBINDIR}
+
+clean:
+ /bin/rm -f *.o ${BINS}
+
+distclean:
+ /bin/rm -f *.o ${BINS}
+ cd ../../../bin; /bin/rm -f ${BINS}
+
+cf_jitter_diag: cf_jitter_diag.c
+ ${CC} ${CFLAGS} -o cf_jitter_diag cf_jitter_diag.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_jitter: cf_jitter.c
+ ${CC} ${CFLAGS} -o cf_jitter cf_jitter.c \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
diff --git a/src/cal/jitter/cf_jitter.c b/src/cal/jitter/cf_jitter.c
new file mode 100644
index 0000000..c1035a6
--- /dev/null
+++ b/src/cal/jitter/cf_jitter.c
@@ -0,0 +1,1239 @@
+/**************************************************************************
+ * Johns Hopkins University
+ * Center for Astrophysical Sciences
+ * FUSE
+ *************************************************************************
+ *
+ * synopsis: cf_jitter input_file output_file
+ *
+ * Description: Reads a FITS file containing housekeeping data and
+ * generates a FITS file containing the jitter information
+ * for the exposure.
+ *
+ * Arguments: input_file Input raw FITS housekeeping file for an exposure
+ * The header of this file is used as a template
+ * for the output file
+ * output_file FITS table containing the jitter information
+ *
+ *
+ * Contents of output file:
+ * 1. Time of sample (in seconds from start)
+ * 2. Shifts dx and dy (in arcsec) of the pointing from a reference position
+ * 3. Tracking quality flag
+ * 5 = dx, dy from known FPDs and q_cmd from telemetry
+ * 4 = good dx, dy from ACS q_est and q_cmd from telemetry
+ * 3 = maybe good dx, dy from ACS q_est
+ * 2 = dx, dy from known FPDs, but q_cmd from FITS header coordinates
+ * 1 = dx, dy from ACS q_est, but q_cmd from FITS header coordinates
+ * 0 = no pointing information (missing telemetry)
+ * -1 = Pointing is assumed to be bad (never achieved known track)
+ *
+ * Codes to JIT_STAT keyword:
+ * 0 All OK
+ * 1 Problems with jitter data
+ * 2 AT_CMD_ATT flag never set
+ * 3 Commanded ACS quaternions not available
+ * 4 No star field information
+ * 5 Problems with tabulated start time
+ *
+ *
+ * HISTORY:
+ * 01/22/02 v1.0 Robinson Begin work
+ * 08/14/02 v1.1 Robinson Populate JIT_STATUS keyword
+ * 09/20/02 v1.11 Robinson - update FILENAME, FILETYPE keywords
+ * - change EXP_DUR keyword to reflect
+ * total time duration of jitter data
+ * 11/04/02 v1.2 Robinson Change method in which gaps are filled.
+ * We no longer assume that the data is
+ * tabulated at regular intervals. Also
+ * check that tabulated times start BEFORE
+ * the exposure start time
+ * 12/17/02 v1.3 Robinson Slight change in definitions of TRAKFLG
+ * values.
+ * 01/17/03 v1.4 Robinson Slight change in calculating summary of
+ * jitter properties
+ * 05/22/03 v1.5 rdr Change initialization of arrays
+ * 06/10/03 v1.6 rdr Correct problem in determining ref
+ * quaternion
+ * 06/23/03 v1.7 rdr Adjust calculation on some of the
+ * keywords
+ * 06/25/03 v1.8 rdr Correct fault in setting the SLEWFLG
+ * keyword
+ * 06/27/03 v1.9 rdr Corrected error in selecting the
+ * reference quaternion
+ * 04/05/05 v2.0 wvd Modify logic for setting TRAKFLG.
+ * Use only FPD quaternions for dx & dy.
+ * 06/24/05 v2.1 wvd De-bug code for use in Linux boxes.
+ * 07/06/05 v2.2 wvd Add JIT_VERS keyword to jitter file.
+ * 11/30/05 v2.3 wvd Don't add 0.5 to tval and time[i]
+ * before converting to type long.
+ * 06/28/06 v2.4 wvd Add "JITTER KEYWORDS" to file header.
+ * 08/21/06 v2.5 wvd Always calculate dx and dy.
+ * For data taken in one-wheel mode,
+ * jitter is bad if sfknown < 1.
+ * 08/25/06 v2.6 wvd Three-wheel mode was BEFORE DEC2001,
+ * not after. Use qvalid flag to check
+ * validity of FPD quaternions.
+ * 08/25/06 v2.7 wvd New tracking flag values:
+ * 5 = FPD, 4 = ACS, 0 = no info
+ * 11/30/06 v3.0 wvd New code from Tom Ake:
+ * If telemetry unavailable, use
+ * target coordinates to generate
+ * commanded quaternion.
+ * Modify logic of tracking flags.
+ * 12/19/06 v3.1 wvd Add flag to force use of target
+ * coordinates.
+ * 03/29/07 v3.2 wvd Modify to handle time period when
+ * ACS telemetry rate was cut in half.
+ * Make code generally more robust.
+ * 03/30/07 v3.2.1 wvd Correct typos in last change.
+ * 04/07/07 v3.3 wvd Add #include <unistd.h>
+ * 04/13/07 v3.4 wvd If program fails, set NEXTEND = 0
+ * in jitter file header.
+ * 05/04/07 v3.5 wvd Force fourth component of q_meas
+ * to be positive.
+ * 08/24/07 v3.6 bot changed TINT to TLONG for time l.1191.
+ * 05/30/08 v3.7 wvd If computing coordinates from file
+ * header and aperture = RFPT, do not
+ * add an aperture offset.
+ *
+ **************************************************************************/
+
+#include <unistd.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include "calfuse.h"
+
+#define HSKPVERS_MIN 3.1
+
+static char CF_PRGM_ID[] = "cf_jitter";
+static char CF_VER_NUM[] = "3.7";
+
+
+/* Subroutine to normalize a quaternion */
+
+void qnorm(double *quat) {
+
+ double quat3_sq;
+
+ quat3_sq = 1. - quat[0]*quat[0] - quat[1]*quat[1] - quat[2]*quat[2];
+ if (quat3_sq > 0) quat[3] = sqrt(quat3_sq);
+ else quat[3] = 0.;
+
+}
+
+
+/* Subroutine to perform matrix multiplication of two quaternions */
+
+void quatprod(double *tquat, double *quat_ref, double *dquat) {
+
+ int i, j ;
+ double multmat[4][4] ;
+
+ /* fill in the array with values from the tquat vector */
+ multmat[0][0] = tquat[3] ;
+ multmat[0][1] = -tquat[2] ;
+ multmat[0][2] = tquat[1] ;
+ multmat[0][3] = -tquat[0] ;
+ multmat[1][0] = tquat[2] ;
+ multmat[1][1] = tquat[3] ;
+ multmat[1][2] = -tquat[0] ;
+ multmat[1][3] = -tquat[1] ;
+ multmat[2][0] = -tquat[1] ;
+ multmat[2][1] = tquat[0] ;
+ multmat[2][2] = tquat[3] ;
+ multmat[2][3] = -tquat[2] ;
+ multmat[3][0] = tquat[0] ;
+ multmat[3][1] = tquat[1] ;
+ multmat[3][2] = tquat[2] ;
+ multmat[3][3] = tquat[3] ;
+
+ /* do the matrix multiplication */
+ for (i=0 ; i<4 ; i++) {
+ dquat[i] = 0. ;
+ for (j=0; j<4 ; j++) dquat[i] = dquat[i] + multmat[j][i] * quat_ref[j] ;
+ }
+
+ if (dquat[3] < 0) for (i=0; i<4 ; i++) dquat[i] = -dquat[i];
+
+}
+
+
+int main(int argc, char *argv[])
+{
+ fitsfile *infits, *outfits ;
+ int hdutype, tfields, dstatus ;
+ int nvalid, nvalid5, rtime ;
+ int pflg=0 ;
+ int tflg, qvalidt ;
+ int tcolnum, fpdquat1_colnum, fpdquat2_colnum, fpdquat3_colnum ;
+ int aquat1_colnum, aquat2_colnum, aquat3_colnum, slew_colnum ;
+ int status, tcol, nextend=0;
+ int dxcol, dycol, trkcol, anynull, intnull=0 ;
+ int qvalid_colnum, cents1_colnum, cents2_colnum, cents3_colnum;
+ int cents4_colnum, cents5_colnum, cents6_colnum, acaflg_colnum ;
+ int acscmd1_colnum, acscmd2_colnum, acscmd3_colnum, sfknown_colnum ;
+ int frow, felem, slewflg, ngs_used, jitlgx, jitlgy ;
+ int *cents1, *cents2, *cents3, *cents4, *cents5, *cents6 , *qvalid ;
+ int *sfknown, *slew;
+ int cents1t=0, cents2t=0, cents3t=0, cents4t=0, cents5t=0, cents6t=0 ;
+ int sfknownt=0 , slewt=0, slewtime=0 ;
+ long i, numq5, numq4, numq3, numq2, numq1, numq0, numqa ;
+ long npts, tval, n_invert=0;
+ long *time, qtime=0 ;
+ float tfine, tcoarse, tnull, knowntrk, acstrk, fjitlgx, fjitlgy ;
+ float targtrk ;
+ float ngs1, ngs2, ngs3, ngs4, ngs5, ngs6, gs_used, expdur, exptime ;
+ float dxrms, dyrms, dxave, dyave, dxrms5, dyrms5 ;
+ float *acaflg ;
+ float *dx , *dy ;
+ double *fq1, *fq2,*fq3, *mjd ;
+ double *acscmd1, *acscmd2, *acscmd3, fq1t, fq2t, fq3t ;
+ double tstrt ;
+ double tquat[4], dquat[4], quat_ref[4] ;
+ double *aq1, *aq2, *aq3, aq1t, aq2t, aq3t ;
+ short *trakflg ;
+ char buffer[FLEN_CARD];
+ char *ttype[] = { "TIME", "DX", "DY", "TRKFLG" } ;
+ char *tform[] = { "1J", "1E", "1E", "1I" } ;
+ char *tunit[] = { "seconds", "arcsec", "arcsec", " "} ;
+ char textname[7]="jitter" ;
+ char blank[]=" ";
+ char jitter_keywords[]=" JITTER KEYWORDS ";
+
+ /* New variables (11/30/06) */
+ int maxi, qcmd_prob, trakflg_init, *aqsok, aq_fill ;
+ float targ_ra, targ_dec, targ_roll, x_off, y_off, fpalif1x, fpalif2x ;
+ double cra, sra, cdc, sdc, crl, srl, rad2deg ;
+ double dq_sid[4], aq_old[4], rot[9] ;
+ char aper_id[FLEN_VALUE], fescent[FLEN_VALUE], hskpvers[FLEN_VALUE];
+
+ /* New variables (12/19/06) */
+ int optc;
+ int force_target_coords = FALSE;
+
+ char opts[] = "hfv:";
+ char usage[] =
+ "Usage:\n"
+ " cf_jitter [-hf] [-v level] housekeeping_file jitter_file\n";
+ char option[] =
+ "Options:\n"
+ " -h: this help message\n"
+ " -f: force use of target coordinates \n"
+ " -v: verbosity level (=1; 0 is silent)\n";
+
+ verbose_level = 1;
+
+ /* Check number of options and arguments */
+ while ((optc = getopt(argc, argv, opts)) != -1) {
+ switch(optc) {
+ case 'h':
+ printf("%s\n%s", usage, option);
+ return 0;
+ case 'f':
+ force_target_coords=TRUE;
+ break;
+ case 'v':
+ verbose_level = atoi(optarg);
+ break;
+ }
+ }
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+ if (argc < optind+2) {
+ printf("%s", usage);
+ return 1;
+ }
+
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Started execution.");
+
+
+ /* initialize necessary variables */
+ hdutype=0 ;
+ status=0 ;
+ frow=1 ;
+ felem=1 ;
+ anynull=0 ;
+
+ /* Open the input FITS file */
+ cf_verbose(3, "opening the file %s for input",argv[optind]);
+ FITS_open_file(&infits, argv[optind], READONLY, &status);
+
+ /* Read the starting time and duration from the FITS header */
+ FITS_read_key(infits, TDOUBLE, "EXPSTART", &tstrt, buffer, &status) ;
+ cf_verbose(2, "start time (MJD) = %15.9f",tstrt) ;
+ FITS_read_key(infits, TFLOAT, "EXPTIME", &exptime, buffer, &status) ;
+ cf_verbose(2, "expected exposure duration (sec) = %.0f",exptime) ;
+
+ /* Create the output file */
+ FITS_create_file(&outfits, argv[optind+1], &status);
+
+ /* Copy the header and empty primary image of the input file to
+ the output */
+ FITS_copy_hdu(infits, outfits, 0, &status) ;
+
+ /* Add "JITTER KEYWORDS" string to header. */
+ FITS_write_record(outfits, blank, &status);
+ FITS_write_record(outfits, jitter_keywords, &status);
+ FITS_write_record(outfits, blank, &status);
+
+ /* Populate the STATUS keyword with 1.
+ Reset keyword if everything goes well. */
+ dstatus = 1 ;
+ FITS_update_key(outfits, TINT, "JIT_STAT", &dstatus,
+ "Problems with jitter data", &status) ;
+
+ /* Update FILENAME and FILETYPE keywords */
+ FITS_update_key(outfits, TSTRING, "FILENAME",argv[2], NULL, &status) ;
+ FITS_update_key(outfits, TSTRING, "FILETYPE","JITTER", NULL, &status) ;
+
+ /* Insert JIT_VERS keyword */
+ FITS_update_key(outfits, TSTRING, "JIT_VERS", CF_VER_NUM,
+ "cf_jitter version number", &status) ;
+
+ /* Read coordinate information in case we can't determine quat_ref from telemetry */
+ /* Don't bother reading these keywords if the HSKPVERS is too low. */
+ fits_read_key(infits, TSTRING, "HSKPVERS", hskpvers, NULL, &status);
+ if (status != 0 || atof(hskpvers) < HSKPVERS_MIN) {
+ status = 0;
+ cf_verbose(1, "Housekeeping file format is out of date.");
+ }
+ else {
+ FITS_read_key(infits, TFLOAT, "RA_TARG", &targ_ra, buffer, &status) ;
+ FITS_read_key(infits, TFLOAT, "DEC_TARG", &targ_dec, buffer, &status) ;
+ FITS_read_key(infits, TFLOAT, "APER_PA", &targ_roll, buffer, &status) ;
+ FITS_read_key(infits, TSTRING, "APERTURE", &aper_id, buffer, &status) ;
+ FITS_read_key(infits, TFLOAT, "FPALIF1X", &fpalif1x, buffer, &status) ;
+ FITS_read_key(infits, TFLOAT, "FPALIF2X", &fpalif2x, buffer, &status) ;
+ FITS_read_key(infits, TSTRING, "FESCENT", &fescent, buffer, &status) ;
+ }
+
+ /* move to the first extension, which contains the table */
+ FITS_movabs_hdu(infits, 2, &hdutype, &status) ;
+
+ /* determine the number of times which have been tabulated */
+ FITS_read_key(infits, TLONG, "NAXIS2", &npts, NULL, &status) ;
+ cf_verbose(2, "number of samples in the table = %ld", npts) ;
+
+ /* set up arrays to contain the data to be read from the table */
+ mjd = (double *) cf_calloc(npts, sizeof(double)) ;
+ qvalid = (int *) cf_calloc(npts, sizeof(int)) ;
+ fq1 = (double *) cf_calloc(npts, sizeof(double) ) ;
+ fq2 = (double *) cf_calloc(npts, sizeof(double) ) ;
+ fq3 = (double *) cf_calloc(npts, sizeof(double) ) ;
+ aq1 = (double *) cf_calloc(npts, sizeof(double) ) ;
+ aq2 = (double *) cf_calloc(npts, sizeof(double) ) ;
+ aq3 = (double *) cf_calloc(npts, sizeof(double)) ;
+ acaflg = (float *) cf_calloc(npts, sizeof(float)) ;
+ acscmd1 = (double *) cf_calloc(npts, sizeof(double)) ;
+ acscmd2 = (double *) cf_calloc(npts, sizeof(double) ) ;
+ acscmd3 = (double *) cf_calloc(npts, sizeof(double) ) ;
+ cents1 = (int *) cf_calloc(npts, sizeof(int)) ;
+ cents2 = (int *) cf_calloc(npts, sizeof(int) ) ;
+ cents3 = (int *) cf_calloc(npts, sizeof(int) ) ;
+ cents4 = (int *) cf_calloc(npts, sizeof(int) ) ;
+ cents5 = (int *) cf_calloc(npts, sizeof(int) ) ;
+ cents6 = (int *) cf_calloc(npts, sizeof(int) ) ;
+ sfknown = (int *) cf_calloc(npts, sizeof(int) ) ;
+ slew = (int *) cf_calloc(npts, sizeof(int) ) ;
+
+ /* read the data */
+ FITS_get_colnum(infits, CASEINSEN, "MJD", &tcolnum, &status) ;
+ FITS_read_col(infits, TDOUBLE, tcolnum, frow, felem, npts, &intnull,
+ mjd, &anynull, &status) ;
+
+ FITS_get_colnum(infits, CASEINSEN, "I_FPD_MEAS_Q_VALID",
+ &qvalid_colnum, &status) ;
+ FITS_read_col(infits, TINT, qvalid_colnum, frow, felem, npts,
+ &intnull, qvalid, &anynull, &status) ;
+ FITS_get_colnum(infits, CASEINSEN, "I_FPD_Q_ECI2BDY_1",
+ &fpdquat1_colnum, &status) ;
+ FITS_read_col(infits, TDOUBLE, fpdquat1_colnum , frow, felem, npts,
+ &intnull, fq1, &anynull, &status) ;
+ FITS_get_colnum(infits, CASEINSEN, "I_FPD_Q_ECI2BDY_2",
+ &fpdquat2_colnum, &status) ;
+ FITS_read_col(infits, TDOUBLE, fpdquat2_colnum , frow, felem, npts,
+ &intnull, fq2, &anynull, &status) ;
+ FITS_get_colnum(infits, CASEINSEN, "I_FPD_Q_ECI2BDY_3",
+ &fpdquat3_colnum, &status) ;
+ FITS_read_col(infits, TDOUBLE, fpdquat3_colnum , frow, felem, npts,
+ &intnull, fq3, &anynull, &status) ;
+ FITS_get_colnum(infits, CASEINSEN, "AATTQECI2BDY_1",
+ &aquat1_colnum, &status) ;
+ FITS_read_col(infits, TDOUBLE, aquat1_colnum , frow, felem, npts,
+ &intnull, aq1, &anynull, &status) ;
+ FITS_get_colnum(infits, CASEINSEN, "AATTQECI2BDY_2",
+ &aquat2_colnum, &status) ;
+ FITS_read_col(infits, TDOUBLE, aquat2_colnum, frow, felem, npts,
+ &intnull, aq2, &anynull, &status) ;
+ FITS_get_colnum(infits, CASEINSEN, "AATTQECI2BDY_3",
+ &aquat3_colnum, &status) ;
+ FITS_read_col(infits, TDOUBLE, aquat3_colnum, frow, felem, npts,
+ &intnull, aq3, &anynull, &status) ;
+ FITS_get_colnum(infits, CASEINSEN, "I_AT_CMD_ATT", &acaflg_colnum,
+ &status) ;
+ FITS_read_col(infits, TFLOAT, acaflg_colnum, frow, felem, npts,
+ &intnull, acaflg, &anynull, &status) ;
+ FITS_get_colnum(infits, CASEINSEN, "AQECI2BDYCMD_1",
+ &acscmd1_colnum, &status) ;
+ FITS_read_col(infits, TDOUBLE, acscmd1_colnum, frow, felem, npts,
+ &intnull, acscmd1, &anynull, &status) ;
+ FITS_get_colnum(infits, CASEINSEN, "AQECI2BDYCMD_2",
+ &acscmd2_colnum, &status) ;
+ FITS_read_col(infits, TDOUBLE, acscmd2_colnum, frow, felem, npts,
+ &intnull, acscmd2, &anynull, &status) ;
+ FITS_get_colnum(infits, CASEINSEN, "AQECI2BDYCMD_3",
+ &acscmd3_colnum, &status) ;
+ FITS_read_col(infits, TDOUBLE, acscmd3_colnum, frow, felem, npts,
+ &intnull, acscmd3, &anynull, &status) ;
+ FITS_get_colnum(infits, CASEINSEN, "CENTROID1_STATUS",
+ &cents1_colnum, &status) ;
+ FITS_read_col(infits, TINT, cents1_colnum, frow, felem, npts,
+ &intnull, cents1, &anynull, &status) ;
+ FITS_get_colnum(infits, CASEINSEN, "CENTROID2_STATUS",
+ &cents2_colnum, &status) ;
+ FITS_read_col(infits, TINT, cents2_colnum, frow, felem, npts,
+ &intnull, cents2, &anynull, &status) ;
+ FITS_get_colnum(infits, CASEINSEN, "CENTROID3_STATUS",
+ &cents3_colnum, &status) ;
+ FITS_read_col(infits, TINT, cents3_colnum, frow, felem, npts,
+ &intnull, cents3, &anynull, &status) ;
+ FITS_get_colnum(infits, CASEINSEN, "CENTROID4_STATUS",
+ &cents4_colnum, &status) ;
+ FITS_read_col(infits, TINT, cents4_colnum, frow, felem, npts,
+ &intnull, cents4, &anynull, &status) ;
+ FITS_get_colnum(infits, CASEINSEN, "CENTROID5_STATUS",
+ &cents5_colnum, &status) ;
+ FITS_read_col(infits, TINT, cents5_colnum, frow, felem, npts,
+ &intnull, cents5, &anynull, &status) ;
+ FITS_get_colnum(infits, CASEINSEN, "CENTROID6_STATUS",
+ &cents6_colnum, &status) ;
+ FITS_read_col(infits, TINT, cents6_colnum, frow, felem, npts,
+ &intnull, cents6, &anynull, &status) ;
+ FITS_get_colnum(infits, CASEINSEN, "I_FPD_STARFLD_KNWN",
+ &sfknown_colnum, &status) ;
+ FITS_read_col(infits, TINT, sfknown_colnum, frow, felem, npts,
+ &intnull, sfknown, &anynull, &status) ;
+ FITS_get_colnum(infits, CASEINSEN, "I_FPD_NEW_CMD_Q", &slew_colnum,
+ &status) ;
+ FITS_read_col(infits, TINT, slew_colnum, frow, felem, npts,
+ &intnull, slew, &anynull, &status) ;
+
+ /* close the input file */
+ FITS_close_file(infits, &status) ;
+
+ /* Check that the tabulated times start BEFORE the start of the
+ exposure. Otherwise there may be missing data or an error
+ in the tabulated start time. */
+ tval=cf_nlong(floor((mjd[0]-tstrt) * 86400.));
+ if (tval > 0) {
+ cf_if_warning("Possible missing data or error in the start time. "
+ "The first tabulated time is %ld seconds from obs start.", tval) ;
+ /* update JIT_STAT keyword */
+ dstatus = 5 ;
+ FITS_update_key(outfits, TINT, "JIT_STAT", &dstatus,
+ "Problems with tab start time", &status) ;
+ }
+
+ /* fill in the gaps in the data set
+
+ - ACS quaternions are generally tabulated every other second
+ - FPD quaternions can be every second or every other second
+ - ACS flags (acaflg) - tabulated every 16 seconds
+
+ NOTE: there can be irregularities in the spacing. Thus, save the last
+ tabulated value and use this to fill in missing data for a given time. */
+
+ /* Array to track whether we can trust ACS q_meas for dx,dy computation */
+ aqsok = (int *) cf_calloc(npts, sizeof(int) ) ;
+
+ /* ACS quaternions. Fill up to aq_fill missing values with the last good one.
+ Set aqsok[i] to -1 if we leave a missing value missing.*/
+
+ /* aq_fill = 2 ; replace up to 2 consecutive missing values */
+
+ /* Fix for 2007:072:18:02 - 085:13:38, when ACS telemetry rate
+ was cut in half (MOCR 1902). */
+ aq_fill = 4;
+ aq1t = 0. ;
+ aq2t = 0. ;
+ aq3t = 0. ;
+ tflg = -1 ;
+
+ /* If the first ACS aq_fill values are missing,
+ use the one aq_fill steps later. */
+ for (i = aq_fill; i > 0; i--) if (aq1[i] > -1 && aq2[i] > -1) {
+ aq1t = aq1[i];
+ aq2t = aq2[i];
+ aq3t = aq3[i];
+ tflg = aq_fill;
+ }
+
+ for (i=0 ; i<npts ; i++) {
+ aqsok[i] = -1 ; /* assume q_meas is missing */
+ if ( aq1[i] > -1 && aq2[i] > -1 ) {
+ aqsok[i] = 0 ;
+ aq1t = aq1[i] ;
+ aq2t = aq2[i] ;
+ aq3t = aq3[i] ;
+ tflg = aq_fill ; /* fill factor */
+ }
+ else if (tflg > 0) {
+ aqsok[i] = 0 ;
+ aq1[i] = aq1t ;
+ aq2[i] = aq2t ;
+ aq3[i] = aq3t ;
+ tflg-- ;
+ }
+ }
+
+ /* FPD quaternions and qvalid flags
+ Only update the one following a good quaternion. If there is
+ another one with no quaternion after that, do not update it. */
+
+ fq1t = 0. ;
+ fq2t = 0. ;
+ fq3t = 0. ;
+ qvalidt = 0 ;
+ tflg = -1 ;
+ for (i=0 ; i<npts ; i++) {
+ if ( (fabs(fq1[i]) > 0.) && (fabs(fq2[i]) > 0.) ){
+
+ /* The ACS has a strict convention that the 4th component of the
+ quaternion be positive. But if it is close to zero, the IDS FPD
+ component may be negative. The housekeeping file only has components
+ 1-3. As a best estimate, we will choose the sign of the FPD 4th
+ component so that the quaternion is closest in pointing to the ACS
+ quaternion. Only known tracking FPDs need to be corrected. */
+
+
+if (aq1[i] > -1 && aq2[i] > -1 && sfknown[i] == 1) {
+ quat_ref[0] = -aq1[i] ;
+ quat_ref[1] = -aq2[i] ;
+ quat_ref[2] = -aq3[i] ;
+ qnorm(quat_ref) ;
+ if (quat_ref[3] < 0.03) {
+ tquat[0] = fq1[i] ;
+ tquat[1] = fq2[i] ;
+ tquat[2] = fq3[i] ;
+ qnorm(tquat) ;
+ quatprod(tquat,quat_ref,dquat) ;
+ fq1t = dquat[0]*dquat[0] + dquat[1]*dquat[1] ;
+ tquat[3] = -tquat[3] ;
+ quatprod(tquat,quat_ref,dquat) ;
+ if (dquat[0]*dquat[0]+dquat[1]*dquat[1] < fq1t) {
+ fq1[i] = -fq1[i] ;
+ fq2[i] = -fq2[i] ;
+ fq3[i] = -fq3[i] ;
+ n_invert++;
+ }
+ }
+}
+
+ fq1t=fq1[i] ;
+ fq2t=fq2[i] ;
+ fq3t=fq3[i] ;
+ qvalidt = qvalid[i] ;
+ cents1t = cents1[i] ;
+ cents2t = cents2[i] ;
+ cents3t = cents3[i] ;
+ cents4t = cents4[i] ;
+ cents5t = cents5[i] ;
+ cents6t = cents6[i] ;
+ sfknownt = sfknown[i] ;
+ slewt = slew[i] ;
+ tflg = 1 ; }
+ else if (tflg > 0) {
+ fq1[i] = fq1t ;
+ fq2[i] = fq2t ;
+ fq3[i] = fq3t ;
+ qvalid[i] = qvalidt ;
+ cents1[i] = cents1t ;
+ cents2[i] = cents2t ;
+ cents3[i] = cents3t ;
+ cents4[i] = cents4t ;
+ cents5[i] = cents5t ;
+ cents6[i] = cents6t ;
+ sfknown[i] = sfknownt ;
+ slew[i] = slewt ;
+ tflg = -1 ; }
+ }
+if (n_invert > 0) cf_verbose(1, "Number of known FPD quaternions inverted: %ld", n_invert);
+
+
+ /* ACAFLG flag */
+
+ tflg = -10 ;
+
+ /* Assume that the first real ACA value is the one to start with. */
+ for (i = 0; i < npts-1; i++) if (acaflg[i] > -1) {
+ tflg = acaflg[i];
+ break;
+ }
+
+ for (i=0 ; i<npts-1 ; i++) {
+ if (acaflg[i] > -1) tflg = acaflg[i] ;
+ else acaflg[i] = tflg ;
+ }
+
+
+ /********** derive the final quats arrays and the tracking flags *******/
+
+ /* set up arrays to contain the data */
+ time = (long *) cf_calloc(npts, sizeof(long) ) ;
+ trakflg = (short *) cf_calloc(npts, sizeof(short) ) ;
+ dx = (float *) cf_calloc(npts, sizeof(float) ) ;
+ dy = (float *) cf_calloc(npts, sizeof(float) ) ;
+
+ /* fill in the time array with times (in seconds) from the start
+ of the exposure */
+ for (i=0 ; i<npts ; i++)
+ time[i] = cf_nlong(floor((mjd[i]-tstrt) * 86400.));
+
+
+ /* Determine the reference quat by looking at the commanded ACS
+ quaternion (in arrays acscmd1, acscmd2 and acscmd3) when they have
+ converged to the fpd commanded quaternion - i.e. when the AT_CMD_ATT
+ flag is 1 (held in the array acaflg). Make sure that the time of
+ convergence is AFTER the start of the exposure and that the star field
+ is known (i.e. sfknown = 1). Also, because of the 16s sample time of
+ the ascflg array, require that the condition exists for at least 30
+ consecutive seconds before accepting the quaternions. qtime = time at
+ which the quaternions were found. This is the earliest time in the
+ exposure for which reliable positions are available. */
+
+ rtime=0 ;
+ qtime = 0;
+ for (i=0; i<npts; i++) {
+ if (acaflg[i] == 1 && time[i] > 0 && sfknown[i] == 1) {
+ rtime++ ;
+ if (rtime == 1) qtime=time[i] ;
+ if (rtime > 30 && acscmd1[i] > -1 &&
+ acscmd2[i] > -1 && acscmd3[i] > -1 ) {
+ quat_ref[0]=acscmd1[i] ;
+ quat_ref[1]=acscmd2[i] ;
+ quat_ref[2]=acscmd3[i] ;
+ qnorm(quat_ref);
+ qcmd_prob = 0;
+ break;
+ }
+ }
+ else rtime=0 ;
+ }
+
+ /* If rtime <= 30, then the flag was never set
+ and the reference quaternion not determined */
+ if (rtime <= 30 || force_target_coords) {
+
+ /* If user has requested target coordinates... */
+ if (force_target_coords) {
+ cf_verbose(1, "Computing reference quaternion from target coordinates.");
+ dstatus = 2 ;
+ FITS_update_key(outfits, TINT, "JIT_STAT", &dstatus,
+ "User requests use of target coordinates", &status) ;
+ }
+ /* If something is wrong... */
+ else {
+ cf_verbose(1, "Problem determining the reference quaternions") ;
+ pflg = 0 ;
+ for (i=0 ; i<npts; i++) if (acaflg[i] == 1) pflg=1 ;
+ if (pflg == 0) {
+ cf_verbose(1, " AT_CMD_ATT flag was never set.") ;
+ /* update JIT_STAT keyword */
+ dstatus = 2 ;
+ FITS_update_key(outfits, TINT, "JIT_STAT", &dstatus,
+ "AT_CMD_ATT flag never set", &status) ;
+ }
+
+ pflg = 0 ;
+ for (i=0 ; i<npts; i++) if (acscmd1[i] > -1 &&
+ acscmd2[i] > -1 && acscmd3[i] > -1) pflg++ ;
+ if (pflg <= 30) {
+ cf_verbose(1, " Commanded ACS quaternions not available.") ;
+ /* update JIT_STAT keyword */
+ dstatus = 3 ;
+ FITS_update_key(outfits, TINT, "JIT_STAT", &dstatus,
+ "Commanded ACS quaternions not available", &status) ;
+ }
+
+ pflg = 0 ;
+ for (i=0 ; i<npts; i++) if (sfknown[i] == 1) pflg++;
+ if (pflg <= 30) {
+ cf_verbose(1, " NO STAR FIELD INFORMATION") ;
+ /* update JIT_STAT keyword */
+ dstatus = 4 ;
+ FITS_update_key(outfits, TINT, "JIT_STAT", &dstatus,
+ "No star field information", &status) ;
+ }
+ }
+
+ /* If we lack a reference quaternion and can't calculate one from
+ information in the housekeeping file header, set the JIT_STAT
+ keyword to 1, close the jitter file, and return. */
+ if (atof(hskpvers) < HSKPVERS_MIN) {
+ dstatus = 1 ;
+ FITS_update_key(outfits, TINT, "NEXTEND", &nextend, NULL, &status);
+ FITS_update_key(outfits, TINT, "JIT_STAT", &dstatus, NULL, &status);
+ FITS_close_file(outfits, &status);
+ cf_verbose(1, "Unable to calculate reference quaternion from target coordinates.");
+ return 1;
+ }
+
+ /* Compute quat_ref from the target coordinates instead */
+ qcmd_prob = -3 ;
+ rad2deg = 57.2957951 ;
+ cra = cos(targ_ra/rad2deg) ;
+ sra = sin(targ_ra/rad2deg) ;
+ cdc = cos(targ_dec/rad2deg) ;
+ sdc = sin(targ_dec/rad2deg) ;
+ targ_roll=270.-targ_roll ;
+ crl = cos(targ_roll/rad2deg) ;
+ srl = sin(targ_roll/rad2deg) ;
+
+ /* The FUSE rotation matrix */
+ rot[0] = -srl*sra + crl*sdc*cra ;
+ rot[1] = -crl*sra - srl*sdc*cra ;
+ rot[2] = cdc*cra ;
+ rot[3] = srl*cra + crl*sdc*sra ;
+ rot[4] = crl*cra - srl*sdc*sra ;
+ rot[5] = cdc*sra ;
+ rot[6] = -crl*cdc ;
+ rot[7] = srl*cdc ;
+ rot[8] = sdc ;
+
+ /* quat_ref for the target, before updating for aperture and FPA position */
+
+ quat_ref[0] = 0.5 * sqrt(1. + rot[0] + rot[4] + rot[8]) ;
+ quat_ref[1] = 0.5 * sqrt(1. + rot[0] - rot[4] - rot[8]) ;
+ quat_ref[2] = 0.5 * sqrt(1. + rot[4] - rot[0] - rot[8]) ;
+ quat_ref[3] = 0.5 * sqrt(1. + rot[8] - rot[0] - rot[4]) ;
+
+ maxi=0 ; /* going to choose the largest divisor */
+ for (i=1 ; i<4 ; i++) if (quat_ref[i] > quat_ref[maxi]) maxi=i;
+ switch (maxi) {
+ case 0: quat_ref[3] = quat_ref[0] ;
+ quat_ref[0] = (rot[7] - rot[5])/quat_ref[3]/4. ;
+ quat_ref[1] = (rot[2] - rot[6])/quat_ref[3]/4. ;
+ quat_ref[2] = (rot[3] - rot[1])/quat_ref[3]/4. ;
+ break ;
+ case 1: quat_ref[0] = quat_ref[1] ;
+ quat_ref[3] = (rot[7] - rot[5])/quat_ref[0]/4. ;
+ if (quat_ref[3] < 0) {
+ quat_ref[0] = -quat_ref[0] ;
+ quat_ref[3] = -quat_ref[3] ;
+ }
+ quat_ref[1] = (rot[1] + rot[3])/quat_ref[0]/4. ;
+ quat_ref[2] = (rot[2] + rot[6])/quat_ref[0]/4. ;
+ break ;
+ case 2: quat_ref[1] = quat_ref[2] ;
+ quat_ref[3] = (rot[2] - rot[6])/quat_ref[1]/4. ;
+ if (quat_ref[3] < 0) {
+ quat_ref[1] = -quat_ref[1] ;
+ quat_ref[3] = -quat_ref[3] ;
+ }
+ quat_ref[0] = (rot[1] + rot[3])/quat_ref[1]/4. ;
+ quat_ref[2] = (rot[5] + rot[7])/quat_ref[1]/4. ;
+ break ;
+ default: quat_ref[2] = quat_ref[3] ;
+ quat_ref[3]=(rot[3] - rot[1])/quat_ref[2]/4. ;
+ if (quat_ref[3] < 0) {
+ quat_ref[2] = -quat_ref[2] ;
+ quat_ref[3] = -quat_ref[3] ;
+ }
+ quat_ref[0] = (rot[6] + rot[2])/quat_ref[2]/4. ;
+ quat_ref[1] = (rot[5] + rot[7])/quat_ref[2]/4. ;
+ }
+
+ /* Compute x_offset due to FPA shift, first in microns, then in arcsec */
+ if (!strncmp(fescent, "FES A", 5)) x_off = 117. - fpalif1x;
+ else x_off = 175. - fpalif2x ;
+ x_off = x_off/10.88*cos(30.5/rad2deg) ;
+ y_off = 0. ;
+
+ /* Now add in the aperture offset (in arcsec) */
+ if (strncmp(aper_id, "RFPT", 4)) { /* If not RFPT, assume LWRS. */
+ x_off = x_off + 55.18 ;
+ y_off = 118.07 ;
+ if (!strncmp(aper_id, "MDRS", 4)) y_off = -90.18;
+ else if (!strncmp(aper_id, "HIRS", 4)) y_off = 10.27;
+ if (tstrt < 51708.9167) {
+ y_off = 112.07 ;
+ if (!strncmp(aper_id, "MDRS", 4)) y_off = -97.18;
+ else if (!strncmp(aper_id, "HIRS", 4)) y_off = 2.27;
+ } else if (tstrt < 51796.3000) {
+ y_off = 116.07 ;
+ if (!strncmp(aper_id, "MDRS", 4)) y_off = -93.18;
+ else if (!strncmp(aper_id, "HIRS", 4)) y_off = 6.27;
+ }
+ }
+
+ /* Set up a slew for the offsets and update quat_ref to be the expected q_cmd */
+ dquat[0] = -y_off/2./206264.81;
+ dquat[1] = x_off/2./206264.81;
+ dquat[2] = 0.;
+ qnorm(dquat) ;
+ quatprod(dquat,quat_ref,tquat);
+ for (i=0 ; i<4 ; i++) quat_ref[i] = tquat[i];
+
+ }
+
+ if (qcmd_prob < 0) {
+ FITS_update_key(outfits,TSTRING,"QREF_SRC","COORDINATES","Source of reference quaternion", &status) ;
+ cf_verbose(1, "Reference quat values derived from FITS header coordinates.");
+ cf_verbose(1, "Used x_off = %7.2f, y_off = %7.2f arcseconds.", x_off, y_off);
+ }
+ else {
+ FITS_update_key(outfits,TSTRING,"QREF_SRC","TELEMETRY","Source of reference quaternion", &status) ;
+ cf_verbose(1, "Reference quat values represent ACS commanded position.");
+ }
+
+ for (i=0; i<4 ; i++) cf_verbose(2, "for i=%ld, quat=%18.15f",i,quat_ref[i]) ;
+ FITS_update_key(outfits,TDOUBLE,"QREF_0",quat_ref,"Reference quaternion", &status) ;
+ FITS_update_key(outfits,TDOUBLE,"QREF_1",quat_ref+1, NULL, &status) ;
+ FITS_update_key(outfits,TDOUBLE,"QREF_2",quat_ref+2, NULL, &status) ;
+ FITS_update_key(outfits,TDOUBLE,"QREF_3",quat_ref+3, NULL, &status) ;
+
+ /* Determine the shift in the quaternions and derive the changes
+ in x and y that they represent:
+ DX (from q2 values : q2=dx/2) and DY (from q1 values : q1=-dy/2)
+ in arcseconds - the conversion factor used is the number of arcsec
+ per radian * 2 */
+
+/* Determine initial trakflg. If we had IDS telemetry but never reached known
+track, we want to start with trakflg_init=-1. If telemetry missing, temporarily
+set trakflg_init to -2. */
+
+trakflg_init=0 ; tflg=0 ;
+for (i=0 ; i<npts ; i++){
+ if (sfknown[i] == 1) {
+ tflg=1 ;
+ break ;
+ }
+}
+if (tflg == 0) { /* known track flag never set */
+ trakflg_init = -1 ;
+ for (i=0 ; i<npts ; i++) {
+ if (acaflg[i] > -1) { /* use ACA flag to say if IDS tlm missing */
+ tflg = 1 ;
+ break ;
+ }
+ }
+ if (tflg == 0) trakflg_init = -2; /* ktrk flag never=1 because IDS tlm missing */
+}
+
+/* set up aqsok array to flag whether ACS q_meas is a good estimate of pointing
+ -1 = ACS q_meas missing (from filling in the gaps earlier)
+ 0 = don't trust it (e.g., in unknown track)
+ 1 = trust it (had been in known track, so good for a while)
+ 2 = maybe ok (started expo with IDS idled (or missing FPDs) and ACA=1)
+ 3 = we corrected ACS q_meas during unknown track period from the 1st known q
+*/
+
+/* First, if we got to known track at some point, correct ACS q's during unknown
+track that eventually got to known track (aqsok=3) by going backward in time.
+Look for transition from known to unknown and use the delta in ACS q's as an
+estimate of the dq from starID (dq_sid). Apply this to ACS q's while in unknown
+track. Because we filled missing ACS q's with previous ones, we have to skip by
+aq_fill values to make sure we have new q's when calculating dq_sid. */
+
+if (trakflg_init > -1) {
+ tflg = 0 ; /* used to indicate we have a dq_sid to apply */
+ for (i=npts-1 ; i>aq_fill ; i--) {
+ if (sfknown[i] == 1 && sfknown[i-aq_fill-1] == 1) {
+ tflg = 0 ; /* don't use previous dq_sid anymore */
+ }
+ else if (sfknown[i] == 1 && /* Now in known track */
+ (sfknown[i-aq_fill-1] == 0 && qvalid[i-aq_fill-1] == 1) && /* Were in unknown track */
+ tflg == 0 && /* We need to compute a quaternion. */
+ aqsok[i] > -1 && aqsok[i-aq_fill-1] > -1) { /* calculate dq_sid */
+ tquat[0] = fq1[i] ;
+ tquat[1] = fq2[i] ;
+ tquat[2] = fq3[i] ;
+ qnorm(tquat) ;
+ aq_old[0] = -aq1[i-aq_fill-1] ;
+ aq_old[1] = -aq2[i-aq_fill-1] ;
+ aq_old[2] = -aq3[i-aq_fill-1] ;
+ qnorm(aq_old) ;
+ quatprod(tquat,aq_old,dq_sid) ;
+ tflg=1 ;
+ }
+ else if (sfknown[i] == 0 && tflg == 1 && aqsok[i] > -1) { /* correct ACS q_meas */
+ aq_old[0]=aq1[i] ;
+ aq_old[1]=aq2[i] ;
+ aq_old[2]=aq3[i] ;
+ qnorm(aq_old) ;
+ quatprod(dq_sid,aq_old,tquat) ;
+ aq1[i]=tquat[0] ;
+ aq2[i]=tquat[1] ;
+ aq3[i]=tquat[2] ;
+ aqsok[i]=3 ; /* ACS q_meas now believable */
+ }
+ else if (sfknown[i] == -1) {
+ tflg = 0 ; /* IDS idled or missing tlm */
+ }
+ }
+} /* end trakflg > -1 */
+
+/* If IDS telemetry missing, start with trakflg=0, else don't trust ACS q's yet (trkflg = -1). */
+if (trakflg_init == -2) trakflg_init = 0;
+else trakflg_init = -1;
+
+/* If we start in corrected unknown track, initialize trakflg to 4 or 1, else trakflg_init = -1. */
+if (aqsok[0] == 3) trakflg_init = 4 + qcmd_prob;
+
+/* If we're already in known track at the start, trakflg_init = 5 or 2. */
+if (sfknown[0] == 1) trakflg_init = 5 + qcmd_prob;
+
+/* Now assign aqsok 1-2 cases, trakflg, and compute dqs. First we need to
+make quat_ref its inverse */
+quat_ref[3] = -quat_ref[3] ;
+
+/* if start with no FPDs and ACA=1, there may have been a previous exposure
+that lost track at the end. Set first aqsok to maybe ok. */
+if (sfknown[0] == -1 && acaflg[0] == 1 && aqsok[0] > -1) {
+ aqsok[0] = 2;
+ trakflg_init = 3;
+}
+
+trakflg[0] = trakflg_init ;
+for (i=1 ; i<npts; i++) {
+ trakflg[i] = trakflg_init ;
+ if (sfknown[i] == 1) {
+ aqsok[i] = 1 ; /* show we can start trusting the ACS q's if we lose stars later */
+ trakflg[i] = 5 + qcmd_prob ; /* will be 5 or 2 */
+ tquat[0]=fq1[i] ;
+ tquat[1]=fq2[i] ;
+ tquat[2]=fq3[i] ;
+ qnorm(tquat) ;
+ trakflg_init = 0 ;
+ }
+ else if (aqsok[i-1] > 0 || aqsok[i] > 0) { /* 1,2,3 = already had been trusting the ACS q's */
+ /* continue to trust them under the following conditions:
+ - we haven't done a slew and we started with q's maybe ok or corrected
+ - IDS is idled or we have missing FPDs
+ */
+ if ( (aqsok[i-1] == 2 && acaflg[i] == 1) || (qvalid[i] < 1) || (aqsok[i] == 3) ) {
+ /* continue to trust them */
+ if (aqsok[i] != 3) aqsok[i] = aqsok[i-1];
+ if (aq1[i] == -1 && aq2[i] == -1) trakflg[i] = 0;
+ else if (aqsok[i] == 2) trakflg[i] = 3 ;
+ else trakflg[i] = 4 + qcmd_prob ; /* aqsok=1,3 */
+
+ tquat[0]=aq1[i] ;
+ tquat[1]=aq2[i] ;
+ tquat[2]=aq3[i] ;
+ qnorm(tquat) ;
+ trakflg_init = 0 ;
+ }
+ else if (qvalid[i] == 1) {
+ trakflg[i] = -1 ;
+ trakflg_init = -1;
+ }
+ }
+
+ if (trakflg[i] > 0 && tquat[0] > -1 && tquat[1] > -1) {
+ quatprod(tquat,quat_ref,dquat) ;
+ dx[i] = (float) dquat[1]*206264.81*2. ;
+ dy[i] = (float) -dquat[0]*206264.81*2. ;
+ }
+ else {
+ dx[i] = 0. ; dy[i] = 0. ;
+ }
+}
+
+
+/*Provide keywords in the top-level header which describe the exposure */
+
+ /* determine the time span in the jitter file (in seconds) and set EXP_DUR to
+ this value */
+ expdur = (float) (time[npts-1] - time[0]) + 1. ;
+ FITS_update_key(outfits, TFLOAT, "EXP_DUR", &expdur,
+ "[s] duration of jitter data", &status) ;
+
+ /* check for a short exposure and reset exptime if necessary */
+ if (time[npts-1] < exptime) {
+ exptime = time[npts-1] ;
+ cf_verbose(1, "Short exposure. Reset exptime to %.0f",exptime) ;
+ }
+
+ /* determine the statistics of the guiding */
+ numq5=0 ;
+ numq4=0 ;
+ numq3=0 ;
+ numq2=0 ;
+ numq1=0 ;
+ numq0=0 ;
+ numqa=0 ;
+
+ for (i=0; i<npts ; i++) {
+ cf_verbose(4, "at i=%5d, trakflg=%2d, qvalid=%2d, time=%4ld",
+ i,trakflg[i], qvalid[i], time[i] );
+ if(trakflg[i] == 5 && qvalid[i] > 0 && time[i] > 0 &&
+ time[i] <= exptime)
+ numq5++ ;
+ if(trakflg[i] == 4 && time[i] > 0 && time[i] <= exptime) numq4++ ;
+ if(trakflg[i] == 3 && time[i] > 0 && time[i] <= exptime) numq3++ ;
+ if(trakflg[i] == 2 && time[i] > 0 && time[i] <= exptime) numq2++ ;
+ if(trakflg[i] == 1 && time[i] > 0 && time[i] <= exptime) numq1++ ;
+ if(trakflg[i] == 0 && time[i] > 0 && time[i] <= exptime) numq0++ ;
+ if(trakflg[i] ==-1 && time[i] > 0 && time[i] <= exptime) numqa++ ; }
+
+ cf_verbose(2, "duration of jitter data = %.0f, exposure time = %.0f",
+ expdur, exptime) ;
+ cf_verbose(2, "number of samples with trkflg = 5: %ld", numq5);
+ cf_verbose(2, "number of samples with trkflg = 4: %ld", numq4);
+ cf_verbose(2, "number of samples with trkflg = 3: %ld", numq3);
+ cf_verbose(2, "number of samples with trkflg = 2: %ld", numq2);
+ cf_verbose(2, "number of samples with trkflg = 1: %ld", numq1);
+ cf_verbose(2, "number of samples with trkflg = 0: %ld", numq0);
+ cf_verbose(2, "number of samples with trkflg = -1: %ld", numqa);
+
+
+ /* tfine, tcoarse and tnull are the fraction of the total exposure
+ when the exposure is in fine track, coarse track and no track */
+ tfine = (float) (numq2+numq5) / exptime ;
+ tcoarse = (float) (numq1+numq3+numq4) / exptime ;
+ tnull = (float) (numqa+numq0) / exptime ;
+ FITS_update_key(outfits, TFLOAT, "KNOWNTRK", &tfine,
+ "fraction of exp in known track", &status) ;
+ FITS_update_key(outfits, TFLOAT, "ACSTRK", &tcoarse,
+ "fraction of exp in ACS track", &status) ;
+ FITS_update_key(outfits, TFLOAT, "NOGDEINF", &tnull,
+ "fraction of exp with no guiding info", &status) ;
+
+ /* determine the properties of the guide stars */
+ ngs1=0. ;
+ ngs2=0. ;
+ ngs3=0. ;
+ ngs4=0. ;
+ ngs5=0. ;
+ ngs6=0. ;
+ for (i=0; i<npts ; i++) {
+ if (cents1[i] == 2 && sfknown[i] == 1 && time[i] > 0 && time[i] <= exptime) ngs1+=1. ;
+ if (cents2[i] == 2 && sfknown[i] == 1 && time[i] > 0 && time[i] <= exptime) ngs2+=1. ;
+ if (cents3[i] == 2 && sfknown[i] == 1 && time[i] > 0 && time[i] <= exptime) ngs3+=1. ;
+ if (cents4[i] == 2 && sfknown[i] == 1 && time[i] > 0 && time[i] <= exptime) ngs4+=1. ;
+ if (cents5[i] == 2 && sfknown[i] == 1 && time[i] > 0 && time[i] <= exptime) ngs5+=1. ;
+ if (cents6[i] == 2 && sfknown[i] == 1 && time[i] > 0 && time[i] <= exptime) ngs6+=1. ; }
+
+ /* convert to fraction of observing time */
+ ngs1 = ngs1 / exptime ;
+ ngs2 = ngs2 / exptime ;
+ ngs3 = ngs3 / exptime ;
+ ngs4 = ngs4 / exptime ;
+ ngs5 = ngs5 / exptime ;
+ ngs6 = ngs6 / exptime ;
+
+ /* determine the number of guide stars used during the exposure */
+ ngs_used = 0 ;
+ if (ngs1 > 0) ngs_used += 1 ;
+ if (ngs2 > 0) ngs_used += 1 ;
+ if (ngs3 > 0) ngs_used += 1 ;
+ if (ngs4 > 0) ngs_used += 1 ;
+ if (ngs5 > 0) ngs_used += 1 ;
+ if (ngs6 > 0) ngs_used += 1 ;
+ cf_verbose(2, "maximum number of guide stars used: %d",ngs_used) ;
+
+ /* Populate header keywords */
+ FITS_update_key(outfits, TINT, "NGS_USED", &ngs_used,
+ "number of guide stars used", &status) ;
+ FITS_update_key(outfits, TFLOAT, "GS1_USED", &ngs1,
+ "fraction of exp using known guide star 1", &status) ;
+ FITS_update_key(outfits, TFLOAT, "GS2_USED", &ngs2,
+ "fraction of exp using known guide star 2", &status) ;
+ FITS_update_key(outfits, TFLOAT, "GS3_USED", &ngs3,
+ "fraction of exp using known guide star 3", &status) ;
+ FITS_update_key(outfits, TFLOAT, "GS4_USED", &ngs4,
+ "fraction of exp using known guide star 4", &status) ;
+ FITS_update_key(outfits, TFLOAT, "GS5_USED", &ngs5,
+ "fraction of exp using known guide star 5", &status) ;
+ FITS_update_key(outfits, TFLOAT, "GS6_USED", &ngs6,
+ "fraction of exp using known guide star 6", &status) ;
+
+ /* Determine times of known and unknown tracking and
+ tracking on the target */
+ knowntrk = 0. ;
+ acstrk = 0. ;
+ targtrk = 0. ;
+ gs_used = 0. ;
+ for (i=0 ; i< npts ; i++) {
+ if (qvalid[i] == 1 && time[i] > 0 && time[i] <= exptime) gs_used+=1.;
+ if ((trakflg[i] == 5 || trakflg[i] == 2) &&
+ fabs(dx[i]) < 15 && fabs(dy[i]) < 15 && time[i] > 0 && time[i] <= exptime)
+ knowntrk += 1. ;
+ if ((trakflg[i] == 4 || trakflg[i] == 3 || trakflg[i] == 1) &&
+ fabs(dx[i]) < 15 && fabs(dy[i]) < 15 && time[i] > 0 && time[i] <= exptime)
+ acstrk += 1. ;
+ if (trakflg[i] > 0 &&
+ fabs(dx[i]) < 15 && fabs(dy[i]) < 15 && time[i] > 0 && time[i] <= exptime)
+ targtrk += 1. ;
+ }
+ cf_verbose(2, "seconds when guide stars are used: %.0f",gs_used ) ;
+ cf_verbose(2, "seconds tracking on known stars with error < 15 arcsec: %.0f",knowntrk) ;
+ cf_verbose(2, "seconds tracking on ACS with error < 15 arcsec: %.0f", acstrk) ;
+ cf_verbose(2, "seconds tracking on target with error < 15 arcsec: %.0f",targtrk ) ;
+ knowntrk = knowntrk / exptime ;
+ acstrk = acstrk / exptime ;
+ targtrk = targtrk / exptime ;
+ gs_used = gs_used / exptime ;
+ FITS_update_key(outfits, TFLOAT, "KTRKFINE", &knowntrk,
+ "exp fraction, err < 15 arcsec, known stars", &status) ;
+ FITS_update_key(outfits, TFLOAT, "ATRKFINE", &acstrk,
+ "exp fraction, err < 15 arcsec, ACS", &status) ;
+ FITS_update_key(outfits, TFLOAT, "TOTLFINE", &targtrk,
+ "exp fraction, err < 15 arcsec, total", &status) ;
+ FITS_update_key(outfits, TFLOAT, "GS_INUSE", &gs_used,
+ "fraction of exp tracking on guide stars", &status) ;
+
+
+ /* determine whether a new attitude is commanded during the exposure */
+ slewflg = -1 ;
+ for (i=0; i<npts ; i++)
+ if(slew[i] > 0 && time[i] > 0 && time[i] <= exptime) {
+ slewflg = 1 ;
+ break;
+ }
+ FITS_update_key(outfits, TINT, "SLEWFLG", &slewflg,
+ "Slew commanded during obs (if > 0)", &status) ;
+ if (slewflg > 0) cf_verbose(1, "SLEW COMMANDED DURING EXPOSURE!!!") ;
+
+ /* determine the slewing time - note that there is a 16s time
+ resolution on the sampling of acaflg. Thus, slews of less than 16s
+ are not real */
+ slewtime=0 ;
+ FITS_update_key(outfits, TINT, "SLEWTIME", &slewtime,
+ "time spent slewing (sec)", &status) ;
+
+ for (i=0; i<npts; i++)
+ if (acaflg[i] < 1 && time[i] > 0 && time[i] <= exptime ) slewtime++ ;
+ if (slewtime > 16) {
+ FITS_update_key(outfits, TINT, "SLEWTIME", &slewtime,
+ "time spent slewing (sec)", &status) ;
+ slewflg=1 ;
+ FITS_update_key(outfits, TINT, "SLEWFLG", &slewflg,
+ "slew commanded during obs (if > 0)", &status) ;
+ cf_verbose(1, "SLEW OCCURRED DURING EXPOSURE!!!") ;
+ cf_verbose(2, "Time (sec) spent slewing = %d",slewtime) ;
+ }
+
+ /* determine basic properties of the jitter */
+ dxrms = 0. ;
+ dxrms5 = 0. ;
+ dyrms = 0. ;
+ dyrms5 = 0. ;
+ dxave = 0. ;
+ dyave = 0. ;
+ nvalid = 0 ;
+ nvalid5 = 0 ;
+ for (i=0 ; i< npts ; i++)
+ if(sfknown[i] == 1 && acaflg[i] == 1 && time[i] > qtime && time[i] <= exptime) {
+ cf_verbose(4, "i = %ld, dx = %f, dy = %f", i, dx[i], dy[i]);
+ nvalid += 1 ;
+ dxrms += dx[i]*dx[i] ;
+ dxave += dx[i] ;
+ dyrms += dy[i] * dy[i] ;
+ dyave += dy[i] ;
+ if (fabs(dx[i]) < 15 && fabs(dy[i]) < 15) {
+ dxrms5 += dx[i] * dx[i] ;
+ dyrms5 += dy[i] * dy[i] ;
+ nvalid5 += 1 ; }
+ }
+ cf_verbose(2, "number of points used to determine rms jitter = %d", nvalid) ;
+
+ if (nvalid > 0) dxrms = sqrt( dxrms / (float) nvalid) ;
+ if (nvalid > 0) dyrms = sqrt( dyrms / (float) nvalid) ;
+ if (nvalid5 > 0) dxrms5 = sqrt( dxrms5 / (float) nvalid5) ;
+ if (nvalid5 > 0) dyrms5 = sqrt( dyrms5 / (float) nvalid5) ;
+ if (nvalid > 0) dxave = dxave / (float) nvalid ;
+ if (nvalid > 0) dyave = dyave / (float) nvalid ;
+ cf_verbose(2, "jitter properties:") ;
+ cf_verbose(2, "dxave = %f, dxrms=%f, dxrms5 = %f", dxave, dxrms, dxrms5) ;
+ cf_verbose(2, "dyave = %f, dyrms=%f, dyrms5 = %f", dyave, dyrms, dyrms5) ;
+ FITS_update_key(outfits, TFLOAT, "POSAVG_X", &dxave,
+ "[arcsec] mean DX during known track", &status) ;
+ FITS_update_key(outfits, TFLOAT, "POSAVG_Y", &dyave,
+ "[arcsec] mean DY during known track", &status) ;
+
+ FITS_update_key(outfits, TFLOAT, "X_JITTER", &dxrms,
+ "[arcsec] sigma of DX during known track", &status) ;
+ FITS_update_key(outfits, TFLOAT, "Y_JITTER", &dyrms,
+ "[arcsec] sigma of DY during known track", &status) ;
+
+ FITS_update_key(outfits, TFLOAT, "XJIT_15", &dxrms5,
+ "[arcsec] sigma of DX for err < 15 arcsec", &status) ;
+ FITS_update_key(outfits, TFLOAT, "YJIT_15", &dyrms5,
+ "[arcsec] sigma of DY for err < 15 arcsec", &status) ;
+
+ /* determine fraction of exposure where the dy and dx values exceed 2
+ sigma from the mean */
+ jitlgx=0 ;
+ jitlgy=0 ;
+ for (i=0 ; i<npts ; i++) {
+ if ( fabs(dx[i]) > 2.*dxrms) jitlgx++ ;
+ if ( fabs(dy[i]) > 2.*dyrms) jitlgy++ ;
+ }
+
+ fjitlgx= (float) jitlgx / (float) npts ;
+ fjitlgy = (float) jitlgy / (float) npts ;
+
+ FITS_update_key(outfits, TFLOAT, "X_JITLRG", &fjitlgx,
+ "frac of DX more than 2-sigma from POSAVE_X", &status) ;
+ FITS_update_key(outfits, TFLOAT, "Y_JITLRG", &fjitlgy,
+ "frac of DY more than 2-sigma from POSAVE_Y", &status) ;
+
+
+
+ /******* Generate the table and put in guiding info *****/
+
+ tfields = 4 ;
+ FITS_create_tbl(outfits, BINARY_TBL, 0, tfields, ttype,
+ tform, tunit, textname, &status) ;
+
+ fits_get_colnum(outfits, TRUE, "TIME", &tcol, &status) ;
+ FITS_write_col(outfits, TLONG, tcol, 1, 1, npts, time, &status) ;
+ fits_get_colnum(outfits, TRUE, "DX", &dxcol, &status) ;
+ FITS_write_col(outfits, TFLOAT, dxcol, 1, 1, npts, dx, &status) ;
+ fits_get_colnum(outfits, TRUE, "DY", &dycol, &status) ;
+ FITS_write_col(outfits, TFLOAT, dycol, 1, 1, npts, dy, &status) ;
+ fits_get_colnum(outfits, TRUE, "TRKFLG", &trkcol, &status) ;
+ FITS_write_col(outfits, TSHORT, trkcol, 1, 1, npts, trakflg, &status) ;
+
+ /**********************************************************************/
+
+ /* Set the status flag to 0 -- unless it has already been changed. */
+ if (dstatus == 1) {
+ FITS_movabs_hdu(outfits, 1, &hdutype, &status) ;
+ dstatus = 0 ;
+ FITS_update_key(outfits, TINT, "JIT_STAT", &dstatus,
+ "Status of jitter data is good", &status) ;
+ }
+
+ /* close the output file */
+ FITS_close_file(outfits, &status) ;
+
+ /* free up storage space */
+ free(mjd) ;
+ free(qvalid) ;
+ free(fq1) ;
+ free(fq2) ;
+ free(fq3) ;
+ free(aq1) ;
+ free(aq2) ;
+ free(aq3) ;
+ free(aqsok) ;
+ free(acscmd1) ;
+ free(acscmd2) ;
+ free(acscmd3) ;
+ free(time) ;
+ free(trakflg) ;
+ free(dx) ;
+ free(dy) ;
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished execution.");
+
+ return 0 ;
+}
diff --git a/src/cal/jitter/cf_jitter_diag.c b/src/cal/jitter/cf_jitter_diag.c
new file mode 100644
index 0000000..1908458
--- /dev/null
+++ b/src/cal/jitter/cf_jitter_diag.c
@@ -0,0 +1,916 @@
+/**************************************************************************
+ * Johns Hopkins University
+ * Center for Astrophysical Sciences
+ * FUSE
+ *************************************************************************
+ *
+ * synopsis: cf_jitter_diag input_file raw_file output_file
+ *
+ * Description: Reads a FITS file containing housekeeping data and
+ * generates a FITS file containing the jitter information
+ * for the observation. This program is used to generate
+ * diagnostics of the jitter performance during an observation
+ *
+ * Arguments: input_file Input raw FITS housekeeping file for an observation
+ * The header of this is used as a template
+ * for the output file
+ * raw_file Raw data file - used to get the start time and the
+ * exposure time
+ * output_file FITS table containing the jitter information
+ *
+ *
+ *Contents of output file:
+ * 1. Time of sample (in seconds from start)
+ * 2. shifts dx and dy (in arcsec) of the pointing from a reference position
+ * 3. tracking quality flag (best=5, worst=0)
+ *
+ *
+ * HISTORY: 01/22/02 v1.0 Robinson Begin work
+ * 08/14/02 v1.1 Robinson populate JIT_STATUS keyword
+ * 09/20/02 v1.11 Robinson - update FILENAME, FILETYPE keywords
+ * - change EXP_DUR keyword to reflect
+ * total time duration of jitter data
+ * 11/04/02 v1.2 Robinson change method in which gaps are filled
+ * we no longer assume that the data is
+ * tabulated at regular intervals. Also
+ * checks that tabulated times start BEFORE
+ * the observation start time
+ * 12/17/02 v1.3 Robinson Slight change in definitions of TRAKFLG
+ * values.
+ * 01/17/03 v1.4 Robinson slight change in calculating summary of
+ * jitter properties
+ * 05/22/03 v1.5 rdr changed initialization of arrays
+ * 06/10/03 v1.6 rdr Correct problem in determining ref
+ * quaternian
+ * 06/23/03 v1.7 rdr Adjust calculation on some of the
+ * keywords
+ * 06/25/03 v1.8 rdr Added call to raw data file to determine
+ * actual start and exposure times
+ * 06/27/03 v1.9 rdr Corrected procedure for determining
+ * reference quaternian
+ * 03/03/04 v1.10 bjg include unistd.h
+ * 06/24/05 v1.11 wvd Delete unused variables.
+ * 08/24/07 v1.12 bot changed TINT to TLONG for time l.826.
+ *
+ **************************************************************************/
+#include <unistd.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include "calfuse.h"
+
+static char CF_PRGM_ID[] = "cf_jitter_diag";
+static char CF_VER_NUM[] = "1.12";
+
+int quatprod(double *, double *, double *) ;
+
+int main(int argc, char *argv[])
+{
+ FILE *output, *ftest ;
+ fitsfile *infits, *outfits ;
+ int hdutype, tfields, dstatus ;
+ int nvalid, nvalid5, optc, rtime ;
+ int aattmode_colnum, pflg=0 ;
+ int *aattflg, tflg, qvalidt ;
+ int tcolnum, fpdquat1_colnum, fpdquat2_colnum, fpdquat3_colnum ;
+ int aquat1_colnum, aquat2_colnum, aquat3_colnum, slew_colnum ;
+ int status, tcol;
+ int dxcol, dycol, trkcol, anynull, intnull=0 ;
+ int fpdexp_colnum, qvalid_colnum, cents1_colnum, cents2_colnum, cents3_colnum ;
+ int cents4_colnum, cents5_colnum, cents6_colnum, acsflg_colnum ;
+ int acscmd1_colnum, acscmd2_colnum, acscmd3_colnum, sfknwn_colnum ;
+ int frow, felem, slewflg, ngs_used, jitlgx, jitlgy ;
+ int *cents1, *cents2, *cents3, *cents4, *cents5, *cents6 , *qvalid ;
+ int *sfknwn, *slew ;
+ int cents1t=0, cents2t=0, cents3t=0, cents4t=0, cents5t=0, cents6t=0 ;
+ int sfknwnt=0 , slewt=0, slewtime=0 ;
+ long i, j, numq4, numq5, numq3, numq2, numqa, numq0 ;
+ long npts, tval ;
+ long *time, qtime=0;
+ float tfine, tcoarse, tnull, knowntrk, unknowntrk, fjitlgx, fjitlgy ;
+ float targtrk ;
+ float ngs1, ngs2, ngs3, ngs4, ngs5, ngs6, gs_used, expdur, exptime ;
+ float dxrms, dyrms, dxave, dyave, dxrms5, dyrms5 ;
+ float *fpdexp, *acsflg ;
+ float *dx , *dy ;
+ double *fq1, *fq2,*fq3, *dq1, *dq2, *dq3, *mjd ;
+ double *acscmd1, *acscmd2, *acscmd3, fq1t, fq2t, fq3t ;
+ double tstrt ;
+ double tquat[4], dquat[4], quat_ref[4] ;
+ double *aq1, *aq2, *aq3, aq1t, aq2t, aq3t ;
+ short *trakflg ;
+ char buffer[FLEN_CARD];
+ char *ttype[] = { "TIME", "DX", "DY", "TRKFLG" } ;
+ char *tform[] = { "1J", "1E", "1E", "1I" } ;
+ char *tunit[] = { "seconds", "arcsec", "arcsec", " "} ;
+ char textname[7]="jitter" ;
+
+char opts[] = "hv:";
+ char usage[] =
+ "Usage:\n"
+ " cf_jitr_diag [-h] [-v level] hskpfile rawfile outfile\n";
+ char option[] =
+ "Options:\n"
+ " -h: this help message\n"
+ " -v: verbosity level (=1; 0 is silent)\n";
+
+ verbose_level = 1;
+
+ while ((optc = getopt(argc, argv, opts)) != -1) {
+ switch(optc) {
+
+ case 'h':
+ printf("%s\n%s", usage, option);
+ return 0;
+ case 'v':
+ verbose_level = atoi(optarg);
+ break;
+ }
+ }
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+ if (argc != optind+3) {
+ printf("%s", usage);
+ cf_if_error("Incorrect number of arguments");
+ }
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin execution");
+
+ /* initialize necessary variables */
+ hdutype=0 ;
+ status=0 ;
+ frow=1 ;
+ felem=1 ;
+ anynull=0 ;
+
+
+ /* check that the housekeeping and raw data files are available */
+ cf_verbose(3,"checking for housekeeping file : %s ",argv[optind]) ;
+ ftest=fopen(argv[optind],"r") ;
+ if (ftest == NULL) {
+ cf_verbose(1,"No input housekeeping file available - returning ") ;
+ return 0; }
+ fclose( ftest ) ;
+ ftest=fopen(argv[optind+1],"r") ;
+ if (ftest == NULL) {
+ cf_verbose(1,"No input raw data file available - returning ") ;
+ return 0; }
+ fclose( ftest ) ;
+
+ /* Open the input raw data FITS file and read the start and exposure times */
+ cf_verbose(3,"opening the file %s for input ",argv[optind+1]);
+ FITS_open_file(&infits, argv[optind+1], READONLY, &status);
+
+ /* read the starting time and duration from the FITS header */
+ FITS_read_key(infits, TDOUBLE, "EXPSTART", &tstrt, buffer, &status) ;
+ cf_verbose(3,"start time (MJD) = %15.9f ",tstrt) ;
+ FITS_read_key(infits, TFLOAT, "EXPTIME", &exptime, buffer, &status) ;
+ exptime=(int) exptime ;
+ cf_verbose(3,"exposure duration (sec) = %f ",exptime) ;
+
+ /* close the raw data file and open the housekeeping file */
+ FITS_close_file(infits, &status) ;
+ FITS_open_file(&infits, argv[optind], READONLY, &status);
+
+ /* check for the existance of the output file */
+ output = fopen(argv[optind+2], "r") ;
+ if (output != NULL) {
+ cf_verbose(1,"output file already exists - returning ") ;
+ return 1 ; }
+ else fclose(output) ;
+
+ /* Create the output file */
+ FITS_create_file(&outfits, argv[optind+2], &status);
+
+ /* Copy the header and empty primary image of the input file to
+ the output */
+ FITS_copy_hdu(infits, outfits, 0, &status) ;
+
+ /* populate the STATUS keyword with 1 -
+ will reset keyword if everyhing goes well */
+ dstatus = 1 ;
+ FITS_update_key(outfits, TINT, "JIT_STAT", &dstatus,
+ "problems with jitter data", &status) ;
+
+ /* update FILENAME, FILETYPE, EXPTIME and EXPSTART keywords */
+ FITS_update_key(outfits, TSTRING, "FILENAME",argv[optind+2], NULL, &status) ;
+ FITS_update_key(outfits, TSTRING, "FILETYPE","JITTER", NULL, &status) ;
+ FITS_update_key(outfits, TFLOAT, "EXPTIME",&exptime, NULL, &status) ;
+ FITS_update_key(outfits, TDOUBLE, "EXPSTART",&tstrt, NULL, &status) ;
+
+ /* move to the first extension, which contains the table */
+ FITS_movabs_hdu(infits, 2, &hdutype, &status) ;
+
+ /* determine the number of times which have been tabulated */
+ FITS_read_key(infits, TLONG, "NAXIS2", &npts, NULL, &status) ;
+ cf_verbose(3,"number of samples in the table = %d ",npts) ;
+
+ /* set up arrays to contain the data to be read from the table */
+ mjd = (double *) cf_calloc(npts, sizeof(double)) ;
+ fpdexp = (float *) cf_calloc(npts, sizeof(float) ) ;
+ qvalid = (int *) cf_calloc(npts, sizeof(int)) ;
+ fq1 = (double *) cf_calloc(npts, sizeof(double) ) ;
+ fq2 = (double *) cf_calloc(npts, sizeof(double) ) ;
+ fq3 = (double *) cf_calloc(npts, sizeof(double) ) ;
+ aq1 = (double *) cf_calloc(npts, sizeof(double) ) ;
+ aq2 = (double *) cf_calloc(npts, sizeof(double) ) ;
+ aq3 = (double *) cf_calloc(npts, sizeof(double)) ;
+ aattflg = (int *) cf_calloc(npts, sizeof(int)) ;
+ acsflg = (float *) cf_calloc(npts, sizeof(float)) ;
+ acscmd1 = (double *) cf_calloc(npts, sizeof(double)) ;
+ acscmd2 = (double *) cf_calloc(npts, sizeof(double) ) ;
+ acscmd3 = (double *) cf_calloc(npts, sizeof(double) ) ;
+ cents1 = (int *) cf_calloc(npts, sizeof(int)) ;
+ cents2 = (int *) cf_calloc(npts, sizeof(int) ) ;
+ cents3 = (int *) cf_calloc(npts, sizeof(int) ) ;
+ cents4 = (int *) cf_calloc(npts, sizeof(int) ) ;
+ cents5 = (int *) cf_calloc(npts, sizeof(int) ) ;
+ cents6 = (int *) cf_calloc(npts, sizeof(int) ) ;
+ sfknwn = (int *) cf_calloc(npts, sizeof(int) ) ;
+ slew = (int *) cf_calloc(npts, sizeof(int) ) ;
+
+ /* read the data */
+ FITS_get_colnum(infits, CASEINSEN, "MJD", &tcolnum, &status) ;
+ cf_verbose(5,"column number for time = %d ",tcolnum) ;
+ FITS_read_col(infits, TDOUBLE, tcolnum, frow, felem, npts, &intnull,
+ mjd, &anynull, &status) ;
+ FITS_get_colnum(infits, CASEINSEN, "I_FPD_EXP_DURATION", &fpdexp_colnum,
+ &status) ;
+ /*printf("column number for fdpexp = %d \n",fpdexp_colnum) ;*/
+ FITS_read_col(infits, TFLOAT, fpdexp_colnum, frow, felem, npts, &intnull,
+ fpdexp, &anynull, &status) ;
+ FITS_get_colnum(infits, CASEINSEN, "I_FPD_MEAS_Q_VALID", &qvalid_colnum,
+ &status) ;
+ /*printf("column number for qvalid = %d \n",qvalid_colnum) ;*/
+ FITS_read_col(infits, TINT, qvalid_colnum, frow, felem, npts, &intnull,
+ qvalid, &anynull, &status) ;
+ FITS_get_colnum(infits, CASEINSEN, "I_FPD_Q_ECI2BDY_1", &fpdquat1_colnum,
+ &status) ;
+ /*printf("column number for fq1 = %d \n",fpdquat1_colnum) ;*/
+ FITS_read_col(infits, TDOUBLE, fpdquat1_colnum , frow, felem, npts, &intnull,
+ fq1, &anynull, &status) ;
+ FITS_get_colnum(infits, CASEINSEN, "I_FPD_Q_ECI2BDY_2", &fpdquat2_colnum,
+ &status) ;
+ /*printf("column number for fq2 = %d \n",fpdquat2_colnum) ;*/
+ FITS_read_col(infits, TDOUBLE, fpdquat2_colnum , frow, felem, npts, &intnull,
+ fq2, &anynull, &status) ;
+ FITS_get_colnum(infits, CASEINSEN, "I_FPD_Q_ECI2BDY_3", &fpdquat3_colnum,
+ &status) ;
+ /*printf("column number for fq3 = %d \n",fpdquat3_colnum) ;*/
+ FITS_read_col(infits, TDOUBLE, fpdquat3_colnum , frow, felem, npts, &intnull,
+ fq3, &anynull, &status) ;
+ FITS_get_colnum(infits, CASEINSEN, "AATTQECI2BDY_1", &aquat1_colnum, &status) ;
+ /*printf("column number for aq1 = %d \n",aquat1_colnum) ;*/
+ FITS_read_col(infits, TDOUBLE, aquat1_colnum , frow, felem, npts, &intnull,
+ aq1, &anynull, &status) ;
+ FITS_get_colnum(infits, CASEINSEN, "AATTQECI2BDY_2", &aquat2_colnum, &status) ;
+ /*printf("column number for aq2 = %d \n",aquat2_colnum) ;*/
+ FITS_read_col(infits, TDOUBLE, aquat2_colnum, frow, felem, npts, &intnull,
+ aq2, &anynull, &status) ;
+ FITS_get_colnum(infits, CASEINSEN, "AATTQECI2BDY_3", &aquat3_colnum, &status) ;
+ /*printf("column number for aq3 = %d \n",aquat3_colnum) ;*/
+ FITS_read_col(infits, TDOUBLE, aquat3_colnum, frow, felem, npts, &intnull,
+ aq3, &anynull, &status) ;
+ FITS_get_colnum(infits, CASEINSEN, "AATTMODE", &aattmode_colnum, &status) ;
+ /*printf("column number for aattmode = %d \n",aattmode_colnum) ;*/
+ FITS_read_col(infits, TINT, aattmode_colnum, frow, felem, npts, &intnull,
+ aattflg, &anynull, &status) ;
+
+ FITS_get_colnum(infits, CASEINSEN, "I_AT_CMD_ATT", &acsflg_colnum, &status) ;
+ /*printf("column number for acsflg = %d \n",acsflg_colnum) ;*/
+ FITS_read_col(infits, TFLOAT, acsflg_colnum, frow, felem, npts, &intnull,
+ acsflg, &anynull, &status) ;
+ FITS_get_colnum(infits, CASEINSEN, "AQECI2BDYCMD_1", &acscmd1_colnum, &status) ;
+ /*printf("column number for acscmd1 = %d \n",acscmd1_colnum) ;*/
+ FITS_read_col(infits, TDOUBLE, acscmd1_colnum, frow, felem, npts, &intnull,
+ acscmd1, &anynull, &status) ;
+ FITS_get_colnum(infits, CASEINSEN, "AQECI2BDYCMD_2", &acscmd2_colnum, &status) ;
+ /*printf("column number for acscmd2 = %d \n",acscmd2_colnum) ;*/
+ FITS_read_col(infits, TDOUBLE, acscmd2_colnum, frow, felem, npts, &intnull,
+ acscmd2, &anynull, &status) ;
+ FITS_get_colnum(infits, CASEINSEN, "AQECI2BDYCMD_3", &acscmd3_colnum, &status) ;
+ /* printf("column number for acscmd3 = %d \n",acscmd3_colnum) ;*/
+ FITS_read_col(infits, TDOUBLE, acscmd3_colnum, frow, felem, npts, &intnull,
+ acscmd3, &anynull, &status) ;
+
+ FITS_get_colnum(infits, CASEINSEN, "CENTROID1_STATUS", &cents1_colnum,
+ &status) ;
+ /* printf("column number for guide star 1 status = %d \n",cents1_colnum) ; */
+ FITS_read_col(infits, TINT, cents1_colnum, frow, felem, npts, &intnull,
+ cents1, &anynull, &status) ;
+ FITS_get_colnum(infits, CASEINSEN, "CENTROID2_STATUS", &cents2_colnum,
+ &status) ;
+ /* printf("column number for guide star 2 status = %d \n",cents2_colnum) ; */
+ FITS_read_col(infits, TINT, cents2_colnum, frow, felem, npts, &intnull,
+ cents2, &anynull, &status) ;
+ FITS_get_colnum(infits, CASEINSEN, "CENTROID3_STATUS", &cents3_colnum,
+ &status) ;
+ /* printf("column number for guide star 3 status = %d \n",cents3_colnum) ; */
+ FITS_read_col(infits, TINT, cents3_colnum, frow, felem, npts, &intnull,
+ cents3, &anynull, &status) ;
+ FITS_get_colnum(infits, CASEINSEN, "CENTROID4_STATUS", &cents4_colnum,
+ &status) ;
+ /* printf("column number for guide star 4 status = %d \n",cents4_colnum) ; */
+ FITS_read_col(infits, TINT, cents4_colnum, frow, felem, npts, &intnull,
+ cents4, &anynull, &status) ;
+ FITS_get_colnum(infits, CASEINSEN, "CENTROID5_STATUS", &cents5_colnum,
+ &status) ;
+ /* printf("column number for guide star 5 status = %d \n",cents5_colnum) ; */
+ FITS_read_col(infits, TINT, cents5_colnum, frow, felem, npts, &intnull,
+ cents5, &anynull, &status) ;
+ FITS_get_colnum(infits, CASEINSEN, "CENTROID6_STATUS", &cents6_colnum,
+ &status) ;
+ /* printf("column number for guide star 6 status = %d \n",cents6_colnum) ; */
+ FITS_read_col(infits, TINT, cents6_colnum, frow, felem, npts, &intnull,
+ cents6, &anynull, &status) ;
+
+ FITS_get_colnum(infits, CASEINSEN, "I_FPD_STARFLD_KNWN", &sfknwn_colnum,
+ &status) ;
+ /* printf("column number for starfield known status = %d \n",sfknwn_colnum) ; */
+ FITS_read_col(infits, TINT, sfknwn_colnum, frow, felem, npts, &intnull,
+ sfknwn, &anynull, &status) ;
+
+ FITS_get_colnum(infits, CASEINSEN, "I_FPD_NEW_CMD_Q", &slew_colnum,
+ &status) ;
+ /* printf("column number for slew status = %d \n",slew_colnum) ; */
+ FITS_read_col(infits, TINT, slew_colnum, frow, felem, npts, &intnull,
+ slew, &anynull, &status) ;
+
+
+ /* close the input file */
+ FITS_close_file(infits, &status) ;
+
+ /* check for problems with the tabulated start time */
+ if (fabs(mjd[0]-tstrt) > 1) {
+ cf_verbose(1,"Problems with tabulated start time ") ;
+ cf_verbose(1," Value of tabulated start time = %15.7f ",tstrt) ;
+ cf_verbose(1," First tabulated MJD = %15.7f ",mjd[0]) ;
+ /* update JIT_STAT keyword */
+ dstatus = 1 ;
+ FITS_update_key(outfits, TINT, "JIT_STAT", &dstatus,
+ "problems with tab start time", &status) ;
+ FITS_close_file(outfits, &status) ;
+ return 1; }
+
+ /* make sure that the tabulates times start BEFORE the start of the observation,
+ Otherwise there may be missing data or an error in the tabulated start time */
+ tval=(long) (0.5 + (mjd[0]-tstrt) * 86400.) ;
+ if (tval > 0) {
+ cf_verbose(1,"WARNING: There may be missing data or an error in the start time \n") ;
+ cf_verbose(1," The first tabulated time is %d seconds from obs start ", tval) ;
+ /* update JIT_STAT keyword */
+ dstatus = 1 ;
+ FITS_update_key(outfits, TINT, "JIT_STAT", &dstatus,
+ "problems with tab start time", &status) ;
+ FITS_close_file(outfits, &status) ;
+ return 1 ;
+ }
+
+
+ /* fill in the gaps in the data set
+
+ - ACS quaternians are generally tabulated every other second
+ - FPD quaternians can be every second or every other second
+ - AATTMODE flags tabulates every 5 seconds
+ - ACS flags (acsflg) - tabulated every 16 seconds
+
+NOTE: there can be irregularities in the spacing. Thus, save the last
+tabulated value and use this in filling in missing data for a given time */
+
+ /* ACS quaternians */
+ aq1t = 0. ;
+ aq2t = 0. ;
+ aq3t = 0. ;
+ for (i=0 ; i<npts ; i++) {
+ if ( aq1[i] > -1 && aq2[i] > -1){
+ aq1t=aq1[i] ;
+ aq2t=aq2[i] ;
+ aq3t=aq3[i] ; }
+ else {
+ aq1[i] = aq1t ;
+ aq2[i] = aq2t ;
+ aq3[i] = aq3t ; }
+ }
+
+ /* FPD quaternians and qvalid flags
+ only update the one following a good quaternian. if there is another one
+ with no quaternian after that, do not update it */
+
+ fq1t = 0. ;
+ fq2t = 0. ;
+ fq3t = 0. ;
+ qvalidt = 0 ;
+ tflg = -1 ;
+ for (i=0 ; i<npts ; i++) {
+ if ( (fabs(fq1[i]) > 0.) && (fabs(fq2[i]) > 0.) ){
+ fq1t=fq1[i] ;
+ fq2t=fq2[i] ;
+ fq3t=fq3[i] ;
+ qvalidt = qvalid[i] ;
+ cents1t = cents1[i] ;
+ cents2t = cents2[i] ;
+ cents3t = cents3[i] ;
+ cents4t = cents4[i] ;
+ cents5t = cents5[i] ;
+ cents6t = cents6[i] ;
+ sfknwnt = sfknwn[i] ;
+ slewt = slew[i] ;
+ tflg = 1 ; }
+ else if (tflg > 0) {
+ fq1[i] = fq1t ;
+ fq2[i] = fq2t ;
+ fq3[i] = fq3t ;
+ qvalid[i] = qvalidt ;
+ cents1[i] = cents1t ;
+ cents2[i] = cents2t ;
+ cents3[i] = cents3t ;
+ cents4[i] = cents4t ;
+ cents5[i] = cents5t ;
+ cents6[i] = cents6t ;
+ sfknwn[i] = sfknwnt ;
+ slew[i] = slewt ;
+ tflg = -1 ; }
+ }
+
+
+ /* AATTMODE flag - update as long as quaternians are
+ present */
+
+ tflg = -1 ;
+ for (i=0 ; i<npts-1 ; i++) {
+ if (aattflg[i] > -1) tflg = aattflg[i] ;
+ else {
+ aattflg[i] = -10 ;
+ if (aq1[i] > -1) aattflg[i]=3 ;
+ if ((fabs(fq1[i]) > 0.) && ( fabs(fq2[i]) > 0. ) ) aattflg[i]=tflg ; }
+ }
+
+
+ /* ACSFLG flag */
+
+ tflg = -10 ;
+ for (i=0 ; i<npts-1 ; i++) {
+ if (acsflg[i] > -1) tflg = acsflg[i] ;
+ else acsflg[i] = tflg ;
+ }
+
+
+ /********** derive the final quats arrays and the tracking flags *******/
+
+ /* set up arrays to contain the data */
+ time = (long *) cf_calloc(npts, sizeof(long) ) ;
+ trakflg = (short *) cf_calloc(npts, sizeof(short) ) ;
+ dq1 = (double *) cf_calloc(npts, sizeof(double) ) ;
+ dq2 = (double *) cf_calloc(npts, sizeof(double)) ;
+ dq3 = (double *) cf_calloc(npts, sizeof(double) ) ;
+ dx = (float *) cf_calloc(npts, sizeof(float) ) ;
+ dy = (float *) cf_calloc(npts, sizeof(float) ) ;
+
+ /* fill in the time array with times (in seconds) from the start of the observation */
+ for (i=0 ; i<npts ; i++) {
+ tval=(long) (0.5 + (mjd[i]-tstrt) * 86400.) ;
+ time[i] = tval ; }
+
+
+ /* determine the reference quat by looking at the commanded ACS quaternian (in arrays
+ acscmd1, acscmd2 and acscmd3) when they have converged to the fpd commanded
+ quaternian - i.e. when the AT_CMD_ATT flag is 1 (held in the array acsflg) -
+ Make sure that the time for convergence is AFTER the start of the observation and that
+ the starfield is known (i.e. sfknwn = 1). Also, because of the 16s sample time of
+ the ascflg array, require that the condition exists for at least 30 consequtive seconds
+ before accepting the quaternians.
+ qtime = time at which the quaternians were found. This is the earliest time in the exposure
+ for which reliable positions are available*/
+
+ rtime=0 ;
+ for (i=0 ; i<npts; i++) {
+ if (acsflg[i] == 1 && time[i] > 0 && sfknwn[i] == 1) {
+ rtime += 1 ;
+ cf_verbose(4,"quat ref cond exists at time=%d, rtime=%d ",time[i],rtime) ;
+ if(rtime == 1) qtime=time[i] ;
+ if (rtime > 30 && acscmd1[i] > -1 && acscmd2[i] > -1 && acscmd3[i] > -1 ) {
+ quat_ref[0]=acscmd1[i] ;
+ quat_ref[1]=acscmd2[i] ;
+ quat_ref[2]=acscmd3[i] ;
+ quat_ref[3]=sqrt( 1. - quat_ref[0]*quat_ref[0] - quat_ref[1]*quat_ref[1] - quat_ref[2]*quat_ref[2] ) ;
+ goto skip ; }
+ }
+ else rtime=0 ;
+ }
+
+ /* if we are here, then the flag was never set and the reference quat not determined */
+ cf_verbose(1," Problem determining the reference quaternians ") ;
+ /* determine cause of failure */
+ pflg = 0 ;
+ for (i=0 ; i<npts; i++) if (acsflg[i] == 1) pflg=1 ;
+ if (pflg == 0) {
+ cf_verbose(1," AT_CMD_ATT flag was never set ") ;
+ /* update JIT_STAT keyword */
+ dstatus = 2 ;
+ FITS_update_key(outfits, TINT, "JIT_STAT", &dstatus,
+ "AT_CMD_ATT flg never set", &status) ;
+ }
+ pflg = 0 ;
+ for (i=0 ; i<npts; i++) if (sfknwn[i] == 1) pflg=1 ;
+ if (pflg == 0) {
+ printf(" UNKNOWN STAR FIELD \n") ;
+ /* update JIT_STAT keyword */
+ dstatus = 3 ;
+ FITS_update_key(outfits, TINT, "JIT_STAT", &dstatus,
+ "unknown star field", &status) ;
+ }
+ FITS_close_file(outfits, &status) ;
+ return 1 ;
+ skip: ;
+ cf_verbose(3," ") ;
+ cf_verbose(3,"reference quat values - from ACS commanded pos ") ;
+ cf_verbose(3,"found at time %d \n",qtime) ;
+ for (i=0; i<4 ; i++) cf_verbose(3,"for i=%d, quat=%18.15f ",i,quat_ref[i]) ;
+
+ /* determine the value of the tracking flags and identify which quaternians to use */
+
+ for (i=0; i<npts ; i++) {
+ if (fq1[i] > -1 && fq2[i] > -1 && qvalid[i] > 0) {
+ dq1[i] = fq1[i] ;
+ dq2[i] = fq2[i] ;
+ dq3[i] = fq3[i] ;
+ if (sfknwn[i] == 1 && aattflg[i] == 5) trakflg[i] = (short) 5 ;
+ if (sfknwn[i] == 0 && aattflg[i] == 5) trakflg[i] = (short) 4 ;
+ if (aattflg[i] == 4) trakflg[i] = (short) 3 ; }
+ else if (aq1[i] > -1 && aq2[i] > -1 ) {
+ dq1[i] = aq1[i] ;
+ dq2[i] = aq2[i] ;
+ dq3[i] = aq3[i] ;
+ if(aattflg[i] == 4) trakflg[i] = (short) 2 ;
+ if(aattflg[i] == 3) trakflg[i] = (short) 1 ;}
+ else {
+ dq1[i] = -10. ;
+ dq2[i] = -10. ;
+ dq3[i] = -10. ;
+ trakflg[i]= (short) 0 ; }
+ }
+
+
+ /* determine the shift in the quaturnians and derive the changes
+ in x and y which they represent :
+ DX (from q2 values : dq2=dx/2) and DY (from q1 values : dq1=-dy/2)
+ in arcseconds - the conversion factor used is the number of arcsec
+ per radian * 2 */
+ for (i=0l ; i<npts ; i++) {
+ if (trakflg[i] > 0) {
+ tquat[0] = dq1[i] ;
+ tquat[1] = dq2[i] ;
+ tquat[2] = dq3[i] ;
+ tquat[3] = sqrt(1. - dq1[i]*dq1[i] - dq2[i]*dq2[i] - dq3[i]*dq3[i] ) ;
+
+ /* initialize dquat */
+ for (j=0; j<4 ; j++) dquat[j]=0. ;
+
+ /* now determine the change in quat */
+ quatprod(tquat, quat_ref, dquat) ;
+
+ /* convert of arcsec in x and y */
+ dy[i] = (float) -dquat[0] * 412541. ;
+ dx[i] = (float) dquat[1] * 412541. ; }
+ else {
+ dx[i] = -999. ;
+ dy[i] = -999. ; }
+ }
+
+/****** provide keywords in the top level header which describe the observations ****/
+
+ /* determine the time span in the jitter file (in seconds) and set EXP_DUR to
+ this value */
+ expdur = (float) (time[npts-1] - time[0]) + 1. ;
+ FITS_update_key(outfits, TFLOAT, "EXP_DUR", &expdur,
+ "duration of jitter data (sec)", &status) ;
+
+ /* check for a short exposure and reset exptime if necessary */
+ if (time[npts-1] < exptime) {
+ exptime = time[npts-1] ;
+ cf_verbose(2,"short exposure- reset exptime to %f ",exptime) ;
+ }
+
+ /* determine the statistics of the guiding */
+ numq4=0 ;
+ numq5=0 ;
+ numq3=0 ;
+ numq2=0 ;
+ numqa=0 ;
+ numq0=0 ;
+ cf_verbose(3,"exposure duration = %f ",expdur) ;
+
+ for (i=0; i<npts ; i++) {
+ cf_verbose(6,"at i=%d, trakflg=%d, qvalid=%d, time=%f ",
+ i,trakflg[i], qvalid[i], time[i] ) ;
+ if(trakflg[i] == 5 && qvalid[i] > 0 && time[i] > 0 && time[i] <= exptime)
+ numq5+=1 ;
+ if(trakflg[i] == 4 && time[i] > 0 && time[i] <= exptime) numq4+=1 ;
+ if(trakflg[i] == 3 && time[i] > 0 && time[i] <= exptime) numq3+=1 ;
+ if(trakflg[i] == 2 && time[i] > 0 && time[i] <= exptime) numq2+=1 ;
+ if(trakflg[i] == 1 && time[i] > 0 && time[i] <= exptime) numqa+=1 ;
+ if(trakflg[i] == 0 && time[i] > 0 && time[i] <= exptime) numq0+=1 ; }
+
+ cf_verbose(3," ") ;
+ cf_verbose(3,"duration of jitter data =%f, exposure time = %f ",expdur,exptime) ;
+ cf_verbose(3,"number of samples in fine track with known GS = %d ",numq5) ;
+ cf_verbose(3,"number of samples in fine track with unknown GS = %d ",numq4) ;
+ cf_verbose(3,"number of samples in coarse track = %d ",numq3) ;
+ cf_verbose(3,"number of samples using ACS quaternians = %d ",numq2) ;
+ cf_verbose(3,"number of samples with no quaternians = %d ",numq0) ;
+
+
+ /* tfine, tcoarse and tnull are the fraction of the total exposure
+ when the observation is in fine track, coarse track and no track */
+ tfine = (float) (numq5+numq4) / exptime ;
+ tcoarse = (float) (numq3+numq2+numqa) / exptime ;
+ tnull = (float) numq0 / exptime ;
+ FITS_update_key(outfits, TFLOAT, "FINE_GDE", &tfine,
+ "fraction of exp in fine guide", &status) ;
+ FITS_update_key(outfits, TFLOAT, "COARSGDE", &tcoarse,
+ "fraction of exp in coarse guide", &status) ;
+ FITS_update_key(outfits, TFLOAT, "NOGDEINF", &tnull,
+ "fraction of exp with no guiding info", &status) ;
+
+ /* determine the properties of the guide stars */
+ ngs1=0. ;
+ ngs2=0. ;
+ ngs3=0. ;
+ ngs4=0. ;
+ ngs5=0. ;
+ ngs6=0. ;
+ for (i=0; i<npts ; i++) {
+ if (cents1[i] == 2 && time[i] > 0 && time[i] <= exptime) ngs1+=1. ;
+ if (cents2[i] == 2 && time[i] > 0 && time[i] <= exptime) ngs2+=1. ;
+ if (cents3[i] == 2 && time[i] > 0 && time[i] <= exptime) ngs3+=1. ;
+ if (cents4[i] == 2 && time[i] > 0 && time[i] <= exptime) ngs4+=1. ;
+ if (cents5[i] == 2 && time[i] > 0 && time[i] <= exptime) ngs5+=1. ;
+ if (cents6[i] == 2 && time[i] > 0 && time[i] <= exptime) ngs6+=1. ; }
+ /* convet to fraction of observing time and put into keywords */
+ ngs1 = ngs1 / exptime ;
+ FITS_update_key(outfits, TFLOAT, "GS1_USED", &ngs1,
+ "fraction of exp using guide star 1", &status) ;
+ ngs2 = ngs2 / exptime ;
+ FITS_update_key(outfits, TFLOAT, "GS2_USED", &ngs2,
+ "fraction of exp using guide star 2", &status) ;
+ ngs3 = ngs3 / exptime ;
+ FITS_update_key(outfits, TFLOAT, "GS3_USED", &ngs3,
+ "fraction of exp using guide star 3", &status) ;
+ ngs4 = ngs4 / exptime ;
+ FITS_update_key(outfits, TFLOAT, "GS4_USED", &ngs4,
+ "fraction of exp using guide star 4", &status) ;
+ ngs5 = ngs5 / exptime ;
+ FITS_update_key(outfits, TFLOAT, "GS5_USED", &ngs5,
+ "fraction of exp using guide star 5", &status) ;
+ ngs6 = ngs6 / exptime ;
+ FITS_update_key(outfits, TFLOAT, "GS6_USED", &ngs6,
+ "fraction of exp using guide star 6", &status) ;
+
+ /* determine the number of guide stars used during the observation */
+ ngs_used = 0 ;
+ if (ngs1 > 0) ngs_used += 1 ;
+ if (ngs2 > 0) ngs_used += 1 ;
+ if (ngs3 > 0) ngs_used += 1 ;
+ if (ngs4 > 0) ngs_used += 1 ;
+ if (ngs5 > 0) ngs_used += 1 ;
+ if (ngs6 > 0) ngs_used += 1 ;
+ FITS_update_key(outfits, TINT, "NGS_USED", &ngs_used,
+ "number of guide stars used", &status) ;
+ cf_verbose(3," ") ;
+ cf_verbose(3,"number of guide stars used = %d \n",ngs_used) ;
+
+
+ /* determine times of known and unknown tracking and tracking on the target*/
+ knowntrk = 0. ;
+ unknowntrk = 0. ;
+ targtrk = 0. ;
+ gs_used = 0. ;
+ for (i=0 ; i< npts ; i++) {
+ if (qvalid[i] == 1 && time[i] > 0 && time[i] <= exptime) gs_used+=1. ;
+ if (sfknwn[i] == 1 && qvalid[i] ==1 && time[i] > 0 && time[i] <= exptime)
+ knowntrk+=1. ;
+ if (sfknwn[i] == 0 && qvalid[i] ==1 && time[i] > 0 && time[i] <= exptime)
+ unknowntrk+=1. ;
+ if (sfknwn[i] == 1 && acsflg[i] == 1 && time[i] > 0 && time[i] <= exptime)
+ targtrk += 1. ;
+ }
+
+ /* check for digitization errors in targtrk (caused by the 16s cadence of acsflg) */
+ if (targtrk+16 > exptime) targtrk = exptime ;
+
+ cf_verbose(3,"seconds when guide stars are used = %f",gs_used ) ;
+ cf_verbose(3,"seconds tracking on known stars = %f ",knowntrk) ;
+ cf_verbose(3,"seconds tracking on unknown stars = %f ",unknowntrk) ;
+ cf_verbose(3,"seconds tracking on the target = %f ",targtrk ) ;
+ knowntrk = knowntrk / exptime ;
+ unknowntrk = unknowntrk / exptime ;
+ targtrk = targtrk / exptime ;
+ gs_used = gs_used / exptime ;
+ FITS_update_key(outfits, TFLOAT, "KNOWNTRK", &knowntrk,
+ "fraction of exp tracking on known stars", &status) ;
+ FITS_update_key(outfits, TFLOAT, "UNKWNTRK", &unknowntrk,
+ "fraction of exp tracking on unknown stars", &status) ;
+ FITS_update_key(outfits, TFLOAT, "TARGTRK", &targtrk,
+ "fraction of exp tracking on target", &status) ;
+ FITS_update_key(outfits, TFLOAT, "GS_INUSE", &gs_used,
+ "fraction of exp tracking on guide stars", &status) ;
+
+
+ /* determine whether a new attitude is commanded during the exposure */
+ slewflg = -1 ;
+ for (i=0; i<npts ; i++)
+ if(time[i] > 0 && slew[i] > 0 && time[i] <= exptime) slewflg = 1 ;
+ FITS_update_key(outfits, TINT, "SLEWFLG", &slewflg,
+ "slew commanded during obs (if > 0)", &status) ;
+ if (slewflg > 0) {
+ cf_verbose(1," ") ;
+ cf_verbose(1,"SLEW COMMANDED DURING OBSERVATION!!! ") ; }
+
+ /* determine the slewing time - note that there is a 16s time
+ resolution on the sampling of acsflg. Thus, slews of less than 16s
+ are not real */
+ slewtime=0 ;
+ FITS_update_key(outfits, TINT, "SLEWTIME", &slewtime,
+ "time spent slewing (sec)", &status) ;
+
+ for (i=0; i<npts; i++)
+ if (acsflg[i] < 1 && time[i] > 0 && time[i] <= exptime ) slewtime+=1 ;
+ if (slewtime > 16) {
+ FITS_update_key(outfits, TINT, "SLEWTIME", &slewtime,
+ "time spent slewing (sec)", &status) ;
+ slewflg=1 ;
+ FITS_update_key(outfits, TINT, "SLEWFLG", &slewflg,
+ "slew commanded during obs (if > 0)", &status) ;
+ cf_verbose(3,"SLEW OCCURRED DURING OBSERVATION!!! ") ;
+ cf_verbose(3,"Time (sec) spent slewing = %d \n",slewtime) ;
+ }
+
+ /* determine basic properties of the jitter
+ - these properties are only determined during the time of the exposure where the
+ spacecraft is guiding on the target */
+ dxrms = 0. ;
+ dxrms5 = 0. ;
+ dyrms = 0. ;
+ dyrms5 = 0. ;
+ dxave = 0. ;
+ dyave = 0. ;
+ nvalid = 0 ;
+ nvalid5 = 0 ;
+ for (i=0 ; i< npts ; i++)
+ if(sfknwn[i] == 1 && acsflg[i] == 1 && time[i] > qtime && time[i] <= exptime) {
+ nvalid += 1 ;
+ dxrms = dxrms + dx[i]*dx[i] ;
+ dxave = dxave + dx[i] ;
+ dyrms = dyrms + dy[i] * dy[i] ;
+ dyave = dyave + dy[i] ;
+ if (time[i] > exptime - 300) {
+ dxrms5 = dxrms5 + dx[i] * dx[i] ;
+ dyrms5 =dyrms5 + dy[i] * dy[i] ;
+ nvalid5 += 1 ; }
+ }
+ cf_verbose(3,"number of points used to determine rms jitter = %d ",nvalid) ;
+
+ if (nvalid > 0) dxrms = sqrt( dxrms / (float) nvalid) ;
+ if (nvalid > 0) dyrms = sqrt( dyrms / (float) nvalid) ;
+ if (nvalid5 > 0) dxrms5 = sqrt( dxrms5 / (float) nvalid5) ;
+ if (nvalid5 > 0) dyrms5 = sqrt( dyrms5 / (float) nvalid5) ;
+ if (nvalid > 0) dxave = dxave / (float) nvalid ;
+ if (nvalid > 0) dyave = dyave / (float) nvalid ;
+ cf_verbose(3," ") ;
+ cf_verbose(3,"jitter properties ") ;
+ cf_verbose(3,"dxave = %f, dxrms=%f, dxrms5 = %f ", dxave, dxrms, dxrms5) ;
+ cf_verbose(3,"dyave = %f, dyrms=%f, dyrms5 = %f ", dyave, dyrms, dyrms5) ;
+ FITS_update_key(outfits, TFLOAT, "POSAVG_X", &dxave,
+ "[arcsec] mean DX during exposure", &status) ;
+ FITS_update_key(outfits, TFLOAT, "POSAVG_Y", &dyave,
+ "[arcsec] mean DY during exposure", &status) ;
+
+ FITS_update_key(outfits, TFLOAT, "X_JITTER", &dxrms,
+ "[arcsec] sigma of DX during exposure", &status) ;
+ FITS_update_key(outfits, TFLOAT, "Y_JITTER", &dyrms,
+ "[arcsec] sigma of DY during exposure", &status) ;
+
+ FITS_update_key(outfits, TFLOAT, "X_JIT_5M", &dxrms5,
+ "[arcsec] sigma of DX during last 5 min of exp", &status) ;
+ FITS_update_key(outfits, TFLOAT, "Y_JIT_5M", &dyrms5,
+ "[arcsec] sigma of DY during last 5 min of exp", &status) ;
+
+ /* determine fraction of exposure where the dy and dx values exceed 2
+ sigma from the mean */
+ jitlgx=0 ;
+ jitlgy=0 ;
+ for (i=0 ; i<npts ; i++) {
+ if ( fabs(dx[i]) > 2.*dxrms) jitlgx++ ;
+ if ( fabs(dy[i]) > 2.*dyrms) jitlgy++ ;
+ }
+
+ fjitlgx= (float) jitlgx / (float) npts ;
+ fjitlgy = (float) jitlgy / (float) npts ;
+
+ FITS_update_key(outfits, TFLOAT, "X_JITLRG", &fjitlgx,
+ "frac of DX more than 2-sigma from POSAVE_X", &status) ;
+ FITS_update_key(outfits, TFLOAT, "Y_JITLRG", &fjitlgy,
+ "frac of DY more than 2-sigma from POSAVE_Y", &status) ;
+
+
+
+ /******* Generate the table and put in guiding info *****/
+
+ tfields = 4 ;
+ FITS_create_tbl(outfits, BINARY_TBL, 0, tfields, ttype,
+ tform, tunit, textname, &status) ;
+
+ fits_get_colnum(outfits, TRUE, "TIME", &tcol, &status) ;
+ FITS_write_col(outfits, TLONG, tcol, 1, 1, npts, time, &status) ;
+ fits_get_colnum(outfits, TRUE, "DX", &dxcol, &status) ;
+ FITS_write_col(outfits, TFLOAT, dxcol, 1, 1, npts, dx, &status) ;
+ fits_get_colnum(outfits, TRUE, "DY", &dycol, &status) ;
+ FITS_write_col(outfits, TFLOAT, dycol, 1, 1, npts, dy, &status) ;
+ fits_get_colnum(outfits, TRUE, "TRKFLG", &trkcol, &status) ;
+ FITS_write_col(outfits, TSHORT, trkcol, 1, 1, npts, trakflg, &status) ;
+
+
+ /**********************************************************************/
+
+ /* set the status flag as good */
+ FITS_movabs_hdu(outfits, 1, &hdutype, &status) ;
+ dstatus = 0 ;
+ FITS_update_key(outfits, TINT, "JIT_STAT", &dstatus,
+ "status of jitter data is good", &status) ;
+
+ /* close the output file */
+ FITS_close_file(outfits, &status) ;
+
+ /* free up storage space */
+ free(mjd) ;
+ free(fpdexp) ;
+ free(qvalid) ;
+ free(fq1) ;
+ free(fq2) ;
+ free(fq3) ;
+ free(aq1) ;
+ free(aq2) ;
+ free(aq3) ;
+ free(aattflg) ;
+ free(acscmd1) ;
+ free(acscmd2) ;
+ free(acscmd3) ;
+ free(time) ;
+ free(trakflg) ;
+ free(dq1) ;
+ free(dq2) ;
+ free(dq3) ;
+ free(dx) ;
+ free(dy) ;
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished execution.");
+
+ return 0 ;
+
+}
+
+
+/* procedure to do a matrix multiplication of two quaturnians to determine
+ the displacement of a measured value from a reference */
+
+int quatprod(double *tquat, double *quat_ref, double *dquat) {
+
+ int i, j ;
+ double multmat[4][4], qinv[4] ;
+
+ /* fill in the array with values from the tquat vector */
+ multmat[0][0] = tquat[3] ;
+ multmat[0][1] = -tquat[2] ;
+ multmat[0][2] = tquat[1] ;
+ multmat[0][3] = -tquat[0] ;
+ multmat[1][0] = tquat[2] ;
+ multmat[1][1] = tquat[3] ;
+ multmat[1][2] = -tquat[0] ;
+ multmat[1][3] = -tquat[1] ;
+ multmat[2][0] = -tquat[1] ;
+ multmat[2][1] = tquat[0] ;
+ multmat[2][2] = tquat[3] ;
+ multmat[2][3] = -tquat[2] ;
+ multmat[3][0] = tquat[0] ;
+ multmat[3][1] = tquat[1] ;
+ multmat[3][2] = tquat[2] ;
+ multmat[3][3] = tquat[3] ;
+
+
+ /* specify the inverse of quat_ref */
+ qinv[0] = -quat_ref[0] ;
+ qinv[1] = -quat_ref[1] ;
+ qinv[2] = -quat_ref[2] ;
+ qinv[3] = quat_ref[3] ;
+
+ /* do the matrix multiplication */
+ for (i=0 ; i<4 ; i++) {
+ dquat[i] = 0. ;
+ for (j=0; j<4 ; j++) dquat[i] = dquat[i] + multmat[j][i]*qinv[j] ;
+}
+
+ return 0 ;
+
+}
diff --git a/src/cal/parm/Makefile.orig.orig b/src/cal/parm/Makefile.orig.orig
new file mode 100644
index 0000000..c0d69c1
--- /dev/null
+++ b/src/cal/parm/Makefile.orig.orig
@@ -0,0 +1,52 @@
+VERSION= v1.8
+
+CALFUSEDIR= $(PWD)/../../..
+
+# Symbols for include directories
+FUSEINCLDIR= $(CALFUSEDIR)/include
+
+# Symbols used for creating shared libraries
+O= .a
+LDSTATIC= ld
+
+# Symbols used for creating shared libraries
+SO= .so
+LDSHARED= ld
+CCSHARED= -G
+
+# Symbols used for compiling
+CC= cc
+# Romelfanger's optimizations
+# OPT= -fast -xO5 -xtarget=ultra2 -xarch=v8plusa
+#
+# SunWorld's optimizations
+# OPT= -p -v -xO2 -xdepend -xchip=ultra -xarch=generic
+OPT= -O -KPIC -DSOLARIS -DCFORTRAN
+CFLAGS= $(OPT) -I$(FUSEINCLDIR)
+
+# Symbols used for creating shared binaries
+FUSELIBDIR= $(CALFUSEDIR)/lib
+FUSEBINDIR= $(CALFUSEDIR)/bin
+LIBDIR= /opt/SUNWspro/lib
+#FUSELIBS= -lcf -lsla -lcalfits -lcfitsio
+FUSELIBS= -lsla -lcfitsio -lcf
+LIBS= -lsocket -lnsl -ldl -lsunmath -lm -lc -lM77 -lF77
+LDFLAGS=
+
+# binaries to be made
+
+BINS= make_parm_file
+
+all: $(BINS)
+ chmod g+rw $(BINS)
+
+install: all
+ /bin/cp $(BINS) $(FUSEBINDIR)
+
+clean:
+ /bin/rm -f $(BINS)
+
+make_parm_file:
+ $(CC) $(CFLAGS) -o make_parm_file make_parm_file.c \
+ -L$(FUSELIBDIR) -L$(LIBDIR) $(FUSELIBS) $(LIBS) $(LDFLAGS)
+
diff --git a/src/cal/parm/make_parm_file.c b/src/cal/parm/make_parm_file.c
new file mode 100644
index 0000000..9b224da
--- /dev/null
+++ b/src/cal/parm/make_parm_file.c
@@ -0,0 +1,109 @@
+/*******************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *******************************************************************************
+ *
+ * Synopsis: make_screen_file
+ *
+ * Description: Make the screening parameters file.
+ *
+ * History: 07/14/98 emm Begin work.
+ * 07/08/99 peb Added PHAMIN and PHAMAX keywords.
+ * 07/29/99 emm Added SAA_SCR and LIMB_SCR keywords
+ ******************************************************************************/
+
+#include <stdio.h>
+#include "calfuse.h"
+#define VERSION 3
+#define EFFMJD 50000.0
+
+int main()
+{
+char *channel[]={"LiF","SiC"};
+char *segment[]={"1A","1B","2A","2B"};
+char *segments[]={"1a","1b","2a","2b"};
+char *aperture[]={"HIRS","MDRS","LWRS","PINH"};
+char dummy[30];
+char extname[]="PARAMETER FILE";
+char filename[80];
+
+
+ int i, status=0, vers;
+ long numbl, dumar[2]={0, 0};
+ float numb, effmjd;
+ fitsfile *parmfits;
+
+for (i=0; i<4; i++) { /* 1A,1B,2A,2B */
+
+ sprintf(filename,"parm%2.2s%03d.fit", segments[i],VERSION);
+ printf("%20.20s\n",filename);
+
+ FITS_create_file(&parmfits,filename,&status);
+ FITS_create_img(parmfits, SHORT_IMG, 0, dumar, &status);
+
+ FITS_write_key(parmfits, TSTRING, "CALFTYPE", "PARM",
+ "Calibration file type", &status);
+
+ vers=VERSION;
+ FITS_write_key(parmfits,TINT,"CALFVERS",&vers,
+ "Calibration file version", &status);
+
+ FITS_write_key(parmfits,TSTRING,"DETECTOR",segment[i],
+ "detector (1A, 1B, 2A, 2B", &status);
+
+ effmjd=EFFMJD;
+ FITS_write_key(parmfits,TFLOAT,"EFFMJD",&effmjd,
+ "Date on which file should be applied (MJD)", &status);
+
+ FITS_write_date(parmfits, &status);
+
+ FITS_write_key(parmfits,TSTRING,"AUTHOR","EDWARD MURPHY",
+ "Author of file", &status);
+
+ FITS_write_comment(parmfits, " ", &status);
+ FITS_write_comment(parmfits, "The SPEX_SIC and SPEX_LIF keywords allow "
+ "the user to center the extraction windows along a given row rather "
+ "than having the pipeline try to centroid the spectrum. A number "
+ "less than 0 or greater than 1023 will default to pipeline "
+ "centroiding. A value between 0 and 1023 will define the center "
+ "of the extraction window. Since the pipeline expands histogram "
+ "images out to 1023 pixels in Y, the number must be given for a "
+ "full 1023 image height. That is, if the center is determined "
+ "from binned images, the center must be multiplied by the binning "
+ "factor before entering it in this file.", &status);
+ FITS_write_comment(parmfits, " ", &status);
+
+ numbl = -1;
+ FITS_write_key(parmfits, TLONG, "SPEX_SIC",&numbl,
+ "SiC extraction window Y center (0-1023)", &status);
+
+ numbl = -1;
+ FITS_write_key(parmfits, TLONG, "SPEX_LIF",&numbl,
+ "LiF extraction window Y center (0-1023)", &status);
+
+ FITS_write_comment(parmfits, " ", &status);
+ FITS_write_comment(parmfits, "The EMAX_SIC and EMAX_LIF keywords allow "
+ "the user to limit the amount that the pipeline can shift the "
+ "extraction windows based on the centroid of the spectrum. In "
+ "cases where the source is very faint, the centroid routine "
+ "may find bright detector artifacts or other apertures instead "
+ "of the desired aperture. If the calculated centroid differs from "
+ "the predicted centroid by more than EMAX_SIC or EMAX_LIF, the "
+ "pipeline uses the default extraction window location.", &status);
+ FITS_write_comment(parmfits, " ", &status);
+
+ numbl = 20;
+ FITS_write_key(parmfits, TLONG, "EMAX_SIC",&numbl,
+ "SiC extraction window maximum Y movement", &status);
+
+ numbl = 20;
+ FITS_write_key(parmfits, TLONG, "EMAX_LIF",&numbl,
+ "LiF extraction window maximum Y movement", &status);
+
+ FITS_close_file(parmfits, &status);
+
+}
+
+ return 0;
+}
diff --git a/src/cal/saa/Makefile.orig.orig b/src/cal/saa/Makefile.orig.orig
new file mode 100644
index 0000000..09b0736
--- /dev/null
+++ b/src/cal/saa/Makefile.orig.orig
@@ -0,0 +1,19 @@
+CFDIR = /usr/local/fusesw/calfuse/v1.2
+BIN = ${CFDIR}/bin
+CC = cc
+CFLAGS = -v -xO2 -I${CFDIR}/include -I/usr/local/include
+LIBS = -L${CFDIR}/lib -lcf -L/usr/local/lib -lcfitsio -lm -lsocket -lnsl
+
+# - <<-- ignore error code
+
+all: make_saa_file
+
+make_saa_file: make_saa_file.o
+ ${CC} $(CFLAGS) -o make_saa_file make_saa_file.o \
+ $(LIBS)
+
+clean:
+ - /bin/rm -f *.o make_saa_file
+
+install: all
+ - /bin/cp make_saa_file ${BIN}/make_saa_file
diff --git a/src/cal/saa/make_saa_file.c b/src/cal/saa/make_saa_file.c
new file mode 100644
index 0000000..2f0df04
--- /dev/null
+++ b/src/cal/saa/make_saa_file.c
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *******************************************************************************
+ *
+ * Synopsis: saa output_file
+ *
+ * Description: Writes a FITS ASCII table with the SAA contours.
+ *
+ *
+ * History: 07/21/98 E. Murphy Begin work.
+ *
+ * References: SAA contours from Scott Friedman 07/16/98, same contours as
+ * used in SPIKE. Note that the contours do not extend below
+ * a latitude of 30 degrees.
+ *
+ ******************************************************************************/
+
+#include <stdio.h>
+#include <math.h>
+#include "calfuse.h"
+
+#define VERSION 2
+#define EFFMJD 50000.0
+
+int main(int argc, char *argv[])
+
+{
+
+/* Define variables. */
+int i, retcode, status=0, anynull, hdutype;
+int numlimits=10;
+double maxlat, maxlon, minlon, delta;
+int nrows=10;
+int tfields=3;
+float saa_lat[10]= {-30.0,-25.0, -20.0, -15.0,-10.0, 0.0, 5.0, 10.0, 12.0, 13.0};
+float saa_minlon[10]={-91.0,-98.0,-102.0,-100.0,-93.0,-68.3,-56.0, -42.0,-32.0,-27.0};
+float saa_maxlon[10]={ 24.1, 47.0, 41.0, 33.0, 25.0, 8.0, -3.0, -14.0,-20.0,-27.0};
+float floatnull;
+fitsfile *outfits, *infits;
+long dumar[2]={0,0};
+char extname[]="SAA_CONTOURS";
+char *ttype[]={"LATITUDE","MIN_LONGITUDE","MAX_LONGITUDE"};
+char *tform[]={"F8.3","F8.3","F8.3"};
+char *tunit[]={"deg","deg","deg"};
+int vers;
+float effmjd;
+
+FITS_create_file(&outfits, "saac002.fit", &status);
+
+FITS_create_img(outfits, SHORT_IMG, 0, dumar, &status);
+
+ FITS_write_key(outfits, TSTRING, "CALFTYPE", "SAAC",
+ "Calibration file type", &status);
+
+ vers=VERSION;
+ FITS_write_key(outfits,TINT,"CALFVERS",&vers,
+ "Calibration file version", &status);
+
+ effmjd=EFFMJD;
+ FITS_write_key(outfits,TFLOAT,"EFFMJD",&effmjd,
+ "Date on which file should be applied (MJD)", &status);
+
+ FITS_write_date(outfits, &status);
+
+ FITS_write_key(outfits,TSTRING,"AUTHOR","EDWARD MURPHY",
+ "Author of file", &status);
+
+FITS_create_tbl(outfits, ASCII_TBL, nrows, tfields, ttype, tform, tunit,
+extname, &status);
+
+FITS_write_col(outfits, TFLOAT, 1, 1, 1, nrows, saa_lat, &status);
+FITS_write_col(outfits, TFLOAT, 2, 1, 1, nrows, saa_minlon, &status);
+FITS_write_col(outfits, TFLOAT, 3, 1, 1, nrows, saa_maxlon, &status);
+
+FITS_close_file(outfits, &status);
+
+return 0;
+
+}
diff --git a/src/cal/screen/Makefile.orig.orig b/src/cal/screen/Makefile.orig.orig
new file mode 100644
index 0000000..7579595
--- /dev/null
+++ b/src/cal/screen/Makefile.orig.orig
@@ -0,0 +1,28 @@
+VERSION= v1.7
+
+CFDIR= /usr/local/fusesw/calfuse/$(VERSION)
+BIN= ${CFDIR}/bin
+FITSINCLDIR= /usr/local/include
+FUSEINCLDIR= $(CFDIR)/include
+CC= cc
+OPT= -O -KPIC
+CFLAGS= $(OPT) -I${FUSEINCLDIR} -I$(FITSINCLDIR)
+
+LDSHARED= ld
+FUSELIBDIR= $(CFDIR)/lib
+FUSELIBS= -lcf -lsla -lcalfits -lcfitsio
+LIBS= -lm -lsocket -lnsl -ldl
+
+# - <<-- ignore error code
+
+all: make_screen_file
+
+make_screen_file:
+ ${CC} $(CFLAGS) -o make_screen_file make_screen_file.c \
+ -L$(FUSELIBDIR) $(FUSELIBS) $(LIBS) $(LDFLAGS)
+
+clean:
+ - /bin/rm -f *.o make_screen_file
+
+install: all
+ - /bin/cp make_screen_file ${BIN}/make_screen_file
diff --git a/src/cal/screen/make_screen_file b/src/cal/screen/make_screen_file
new file mode 100755
index 0000000..ae0f83b
--- /dev/null
+++ b/src/cal/screen/make_screen_file
Binary files differ
diff --git a/src/cal/screen/make_screen_file.c b/src/cal/screen/make_screen_file.c
new file mode 100644
index 0000000..01b41da
--- /dev/null
+++ b/src/cal/screen/make_screen_file.c
@@ -0,0 +1,122 @@
+/*******************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *******************************************************************************
+ *
+ * Synopsis: make_screen_file
+ *
+ * Description: Make the screening parameters file.
+ *
+ * History: 07/14/98 emm Begin work.
+ * 07/08/99 peb Added PHAMIN and PHAMAX keywords.
+ * 07/29/99 emm Added SAA_SCR and LIMB_SCR keywords
+ ******************************************************************************/
+
+#include <stdio.h>
+#include "calfuse.h"
+#define VERSION 3
+#define EFFMJD 50000.0
+
+int main()
+{
+char *channel[]={"LiF","SiC"};
+char *segment[]={"1A","1B","2A","2B"};
+char *segments[]={"1a","1b","2a","2b"};
+char *aperture[]={"HIRS","MDRS","LWRS","PINH"};
+char dummy[30];
+char extname[]="SCREENING PARAMETERS";
+char filename[80];
+
+
+ int i, status=0, vers;
+ long numbl, dumar[2]={0, 0};
+ float numb, effmjd;
+ fitsfile *parmfits;
+
+for (i=0; i<4; i++) { /* 1A,1B,2A,2B */
+
+ sprintf(filename,"scrn%2.2s%03d.fit", segments[i],VERSION);
+ printf("%20.20s\n",filename);
+
+ FITS_create_file(&parmfits,filename,&status);
+ FITS_create_img(parmfits, SHORT_IMG, 0, dumar, &status);
+
+ FITS_write_key(parmfits, TSTRING, "CALFTYPE", "SCRN",
+ "Calibration file type", &status);
+
+ vers=VERSION;
+ FITS_write_key(parmfits,TINT,"CALFVERS",&vers,
+ "Calibration file version", &status);
+
+ FITS_write_key(parmfits,TSTRING,"DETECTOR",segment[i],
+ "detector (1A, 1B, 2A, 2B", &status);
+
+ effmjd=EFFMJD;
+ FITS_write_key(parmfits,TFLOAT,"EFFMJD",&effmjd,
+ "Date on which file should be applied (MJD)", &status);
+
+ FITS_write_date(parmfits, &status);
+
+ FITS_write_key(parmfits,TSTRING,"AUTHOR","EDWARD MURPHY",
+ "Author of file", &status);
+
+ numb=10.0;
+ FITS_write_key(parmfits,TFLOAT,"TIMESTEP",&numb,
+ "[sec] Screening time step", &status);
+
+ FITS_write_key(parmfits,TSTRING,"SAA_SCR","ON",
+ "SAA screening ON/OFF", &status);
+
+ FITS_write_key(parmfits,TSTRING,"LIMB_SCR","ON",
+ "Limb angle screening ON/OFF", &status);
+
+ FITS_write_key(parmfits,TSTRING,"DAYNIGHT","BOTH",
+ "Use only DAY, NIGHT or BOTH", &status);
+
+ numbl = 0;
+ FITS_write_key(parmfits, TLONG, "PHALOW",&numbl,
+ "Minimum acceptable PHA value", &status);
+
+ numbl = 31;
+ FITS_write_key(parmfits, TLONG, "PHAHIGH",&numbl,
+ "Maximum acceptable PHA value", &status);
+
+ numb = 1.0;
+ FITS_write_key(parmfits, TFLOAT, "PHA_BKGD",&numb,
+ "Background scaling factor for PHA screening", &status);
+
+ numb=15.0;
+ FITS_write_key(parmfits,TFLOAT,"BRITLIMB",&numb,
+ "[deg] Bright limb avoidance angle", &status);
+
+ numb=10.0;
+ FITS_write_key(parmfits,TFLOAT,"DARKLIMB",&numb,
+ "[deg] Dark limb avoidance angle", &status);
+
+ numbl=0;
+ FITS_write_key(parmfits,TLONG,"NUSERGTI",&numbl,
+ "Number of user defined good time intervals",&status);
+
+ numb=0.0;
+ FITS_write_key(parmfits,TFLOAT,"GTIBEG01",&numb,
+ "[sec] Beginning good time interval", &status);
+
+ numb=0.0;
+ FITS_write_key(parmfits,TFLOAT,"GTIEND01",&numb,
+ "[sec] Ending good time interval", &status);
+
+ numb=0.0;
+ FITS_write_key(parmfits,TFLOAT,"GTIBEG02",&numb,
+ "[sec] Beginning good time interval", &status);
+
+ numb=0.0;
+ FITS_write_key(parmfits,TFLOAT,"GTIEND02",&numb,
+ "[sec] Ending good time interval", &status);
+
+ FITS_close_file(parmfits, &status);
+
+}
+
+ return 0;
+}
diff --git a/src/configure.linux.orig b/src/configure.linux.orig
new file mode 100755
index 0000000..c8cf8ef
--- /dev/null
+++ b/src/configure.linux.orig
@@ -0,0 +1,68 @@
+#!/bin/sh
+
+echo "***********************************"
+echo "***** Preparing Makefiles *********"
+echo "******** for Linux ****************"
+echo "***********************************"
+
+cp Makefile.Linux Makefile
+cp fuv/Makefile.Linux fuv/Makefile
+cp fes/Makefile.Linux fes/Makefile
+cp analysis/Makefile.Linux analysis/Makefile
+cp libcf/Makefile.Linux libcf/Makefile
+cp cal/jitter/Makefile.Linux cal/jitter/Makefile
+cp slalib/mk.sv slalib/mk
+
+echo "***********************************"
+echo "***** Configuring cfitsio *********"
+echo "***********************************"
+
+
+cd cfitsio
+./configure
+cd ..
+
+echo "***********************************"
+echo "***** Done configuring cfitsio ****"
+echo "***********************************"
+
+FC=""
+for ac_prog in gfortran g77
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+ set dummy $ac_prog; ac_word=$2
+ echo "checking for $ac_word..."
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ FC="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ if test -n "$FC"; then
+ echo " yes"
+ else
+ echo " no"
+ fi
+ test -n "$FC" && break
+done
+test -n "$FC" || FC="nope"
+
+if test $FC = 'nope' ; then
+ echo "Warning: No acceptable fortran compiler was found. Please install one from the GNU compilers."
+ echo "Read INSTALLING_CalFUSEv3.2.1 for details."
+else
+ if test $FC = 'g77' ; then
+ for mk in Makefile fuv/Makefile analysis/Makefile libcf/Makefile cal/jitter/Makefile
+ do
+ mv $mk ${mk}.sv
+ sed -e "s/-lgfortran/-lg2c/g" ${mk}.sv > $mk
+ done
+ sed -e "s/gfortran/g77/g" slalib/mk.sv > slalib/mk
+ fi
+ echo
+ echo "Type 'make clean' then 'make -e install'"
+fi
diff --git a/src/configure.linux64.orig b/src/configure.linux64.orig
new file mode 100755
index 0000000..e0c989b
--- /dev/null
+++ b/src/configure.linux64.orig
@@ -0,0 +1,74 @@
+#!/bin/sh
+
+echo "***********************************"
+echo "***** Preparing Makefiles *********"
+echo "******** for Linux 64 *************"
+echo "***********************************"
+
+cp Makefile.Linux64 Makefile
+cp fuv/Makefile.Linux64 fuv/Makefile
+cp fes/Makefile.Linux64 fes/Makefile
+cp analysis/Makefile.Linux64 analysis/Makefile
+cp libcf/Makefile.Linux64 libcf/Makefile
+cp cal/jitter/Makefile.Linux64 cal/jitter/Makefile
+cp slalib/mk.sv slalib/mk
+
+FC=""
+for ac_prog in gfortran g77
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+ set dummy $ac_prog; ac_word=$2
+ echo "checking for $ac_word..."
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ FC="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ if test -n "$FC"; then
+ echo " yes"
+ else
+ echo " no"
+ fi
+ test -n "$FC" && break
+done
+test -n "$FC" || FC="nope"
+
+if test $FC = 'nope' ; then
+ echo "Warning: No acceptable fortran compiler was found. Please install one from the GNU compilers."
+ echo " Read INSTALLING_CalFUSEv3.2.1 for details."
+else
+ echo "checking for cfitsio..."
+ if ! test -d /usr/include/cfitsio ; then
+ echo " no"
+ echo ""
+ echo "Warning: CFITSIO was not found in /usr/include"
+ echo " Please install CFITSIO for Linux 64 as explained in the installation notes"
+ echo " If you already did so and still get this message, please copy the cfitsio"
+ echo " repertory in '/usr/include'"
+ echo " If you don't have permission to do so, follow the instructions in the"
+ echo " Installation notes."
+ echo ""
+ else
+ echo " yes"
+ cp /usr/include/cfitsio/* ../include/
+ cp /usr/include/cfitsio/* ../include/cfitsio/
+
+ if test $FC = 'g77' ; then
+ for mk in Makefile fuv/Makefile analysis/Makefile libcf/Makefile cal/jitter/Makefile
+ do
+ mv $mk ${mk}.sv
+ sed -e "s/-lgfortran/-lg2c/g" ${mk}.sv > $mk
+#cfit mv $mk ${mk}.sv2
+#cfit sed -e "s#-lcfitsio#-lcfitsio -L/usr/include/cfitsio/lib#g" ${mk}.sv2 > $mk
+ done
+ sed -e "s/gfortran/g77/g" slalib/mk.sv > slalib/mk
+ fi
+ echo
+ echo "Type 'make clean' then 'make -e install'"
+ fi
+fi
diff --git a/src/configure.macosx.orig b/src/configure.macosx.orig
new file mode 100755
index 0000000..e391b24
--- /dev/null
+++ b/src/configure.macosx.orig
@@ -0,0 +1,78 @@
+#!/bin/sh
+
+echo "***********************************"
+echo "***** Preparing Makefiles *********"
+echo "******** for Mac OS X *************"
+echo "***********************************"
+
+cp Makefile.MacOSX Makefile
+cp fuv/Makefile.MacOSX fuv/Makefile
+# cp fes/Makefile.MacOSX fes/Makefile
+cp analysis/Makefile.MacOSX analysis/Makefile
+cp libcf/Makefile.MacOSX libcf/Makefile
+cp cal/jitter/Makefile.MacOSX cal/jitter/Makefile
+cp slalib/mk.sv slalib/mk
+
+echo "***********************************"
+echo "***** Configuring cfitsio *********"
+echo "***********************************"
+
+
+cd cfitsio
+./configure
+cd ..
+
+echo "***********************************"
+echo "***** Done configuring cfitsio ****"
+echo "***********************************"
+echo
+
+FC=""
+for ac_prog in gfortran g77
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+ set dummy $ac_prog; ac_word=$2
+ echo "checking for $ac_word..."
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ FC="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ if test -n "$FC"; then
+ echo " yes"
+ else
+ echo " no"
+ fi
+ test -n "$FC" && break
+done
+test -n "$FC" || FC="nope"
+
+if test $FC = 'nope' ; then
+ echo "Warning: No acceptable fortran compiler was found. Please install one from the GNU compilers."
+ echo "Read INSTALLING_CalFUSEv3.2.1 for details."
+else
+ if test $FC = 'g77' ; then
+ for mk in Makefile fuv/Makefile analysis/Makefile libcf/Makefile cal/jitter/Makefile
+ do
+ mv $mk ${mk}.sv
+ sed -e "s/-lgfortran/-lg2c/g" ${mk}.sv > $mk
+ done
+ sed -e "s/gfortran/g77/g" slalib/mk.sv > slalib/mk
+ fi
+ if ! test -d /sw/lib ; then
+ libfort=""
+ test -d /usr/local/lib && libfort="-L\/usr\/local\/lib\/ "
+ for mk in Makefile fuv/Makefile analysis/Makefile libcf/Makefile cal/jitter/Makefile
+ do
+ mv $mk ${mk}.sv2
+ sed -e "s/-L\/sw\/lib\/ /${libfort}/g" ${mk}.sv2 > ${mk}
+ done
+ fi
+ echo
+ echo "Type 'make clean' then 'make -e install'"
+fi
diff --git a/src/configure.solaris.orig b/src/configure.solaris.orig
new file mode 100755
index 0000000..5818ee9
--- /dev/null
+++ b/src/configure.solaris.orig
@@ -0,0 +1,98 @@
+#!/bin/sh
+
+echo "***********************************"
+echo "***** Preparing Makefiles *********"
+echo "******** for Solaris **************"
+echo "***********************************"
+
+cp Makefile.Solaris Makefile
+cp fuv/Makefile.Solaris fuv/Makefile
+cp fes/Makefile.Solaris fes/Makefile
+cp analysis/Makefile.Solaris analysis/Makefile
+cp libcf/Makefile.Solaris libcf/Makefile
+cp cal/jitter/Makefile.Solaris cal/jitter/Makefile
+cp slalib/mk.sv slalib/mk
+
+echo "***********************************"
+echo "***** Configuring cfitsio *********"
+echo "***********************************"
+
+cd cfitsio
+./configure
+cd ..
+
+echo "***********************************"
+echo "***** Done configuring cfitsio ****"
+echo "***********************************"
+
+FC=""
+for ac_prog in f77 g77 gfortran f90
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+ set dummy $ac_prog; ac_word=$2
+ echo "checking for $ac_word..."
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ FC="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ if test -n "$FC"; then
+ echo " yes"
+ else
+ echo " no"
+ fi
+ test -n "$FC" && break
+done
+test -n "$FC" || FC="nope"
+
+if test $FC = 'nope' ; then
+ echo "Warning: No acceptable fortran 77 compiler was found."
+ echo "Please install one either from the GNU compilers GCC, either from Sun Studio."
+ echo "Read INSTALLING_CalFUSEv3.2.1 for details."
+else
+ FFLAGS="-fno-second-underscore -O -fPIC"
+ if test $FC = 'f90' ; then
+ for mk in Makefile analysis/Makefile cal/jitter/Makefile fes/Makefile
+ do
+ mv $mk ${mk}.sv
+ sed -e "s/-lM77 -lF77/-lfui -lfsu/g" ${mk}.sv > $mk
+ done
+ FFLAGS="-f77 -ftrap=%none -O -PIC"
+ fi
+ if test $FC = 'gfortran' ; then
+ for mk in Makefile analysis/Makefile cal/jitter/Makefile fes/Makefile
+ do
+ mv $mk ${mk}.sv
+ sed -e "s/-lM77 -lF77/-lgfortran/g" ${mk}.sv > $mk
+ done
+ fi
+ if test $FC = 'g77' ; then
+ for mk in Makefile analysis/Makefile cal/jitter/Makefile fes/Makefile
+ do
+ mv $mk ${mk}.sv
+ sed -e "s/-lM77 -lF77/-lg2c/g" ${mk}.sv > $mk
+ done
+ fi
+ if test $FC = 'f77' ; then
+ if f77 2> /dev/null | grep -c f90 ; then
+ for mk in Makefile analysis/Makefile cal/jitter/Makefile fes/Makefile
+ do
+ mv $mk ${mk}.sv
+ sed -e "s/-lM77 -lF77/-lfui -lfsu/g" ${mk}.sv > $mk
+ done
+ fi
+ else
+ sed -e "s/f77/${FC}/g" slalib/mk.sv > slalib/mk.sv2
+ sed -e "s/FFLAGS='-O -PIC'/FFLAGS='${FFLAGS}'/g" slalib/mk.sv2 > slalib/mk
+ rm -f slalib/mk.sv2
+ fi
+ echo
+ echo "Type 'make clean' then 'make -e install'"
+fi
+
+
diff --git a/src/fes/Makefile.Linux.orig b/src/fes/Makefile.Linux.orig
new file mode 100644
index 0000000..af548ac
--- /dev/null
+++ b/src/fes/Makefile.Linux.orig
@@ -0,0 +1,44 @@
+
+SHARED= -shared
+FITSVER= 2.470
+CALFUSEDIR= ${PWD}/../..
+
+# Symbols for include directories
+FUSEINCLDIR= -I${CALFUSEDIR}/include
+
+# Symbols used for compiling
+CC= cc
+OPT= -g -Wall -DCFORTRAN -Dg77Fortran -Df2cFortran
+CFLAGS = ${OPT} ${FUSEINCLDIR}
+
+# Symbols used for creating shared binaries
+FUSEBINDIR= ${CALFUSEDIR}/bin
+FUSELIBDIR= -L${CALFUSEDIR}/lib
+LIBDIR=
+FUSELIBS= -lsla -lcfitsio-${FITSVER} -lcf
+LIBS= -lc -lm -lnsl -ldl -lgfortran
+LDFLAGS= -Wl,-R${CALFUSEDIR}/lib
+
+OBJECTS= cf_calfes.o cf_fes_init.o cf_fes_read.o cf_fes_write.o \
+ cf_fes_cal.o cf_fes_get_cal_image.o cf_limbang.o \
+ cf_fes_apply_bias.o cf_fes_apply_flat.o cf_fes_apply_mask.o
+
+all: cf_calfes
+
+cf_calfes: ${OBJECTS}
+ ${CC} ${CFLAGS} -o cf_calfes ${OBJECTS} \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+ chmod g+rw cf_calfes
+
+install: cf_calfes
+ /bin/cp cf_calfes ${FUSEBINDIR}
+
+clean:
+ /bin/rm -f ${OBJECTS} cf_calfes
+
+distclean:
+ /bin/rm -f ${OBJECTS} cf_calfes
+ cd ../../bin; /bin/rm -f cf_calfes
+
+lint: ${SOURCES}
+ lint ${SOURCES}
diff --git a/src/fes/Makefile.Linux64.orig b/src/fes/Makefile.Linux64.orig
new file mode 100644
index 0000000..87e47c2
--- /dev/null
+++ b/src/fes/Makefile.Linux64.orig
@@ -0,0 +1,43 @@
+
+SHARED= -shared
+CALFUSEDIR= ${PWD}/../..
+
+# Symbols for include directories
+FUSEINCLDIR= -I${CALFUSEDIR}/include
+
+# Symbols used for compiling
+CC= cc
+OPT= -g -Wall -DCFORTRAN -Dg77Fortran -Df2cFortran
+CFLAGS = ${OPT} ${FUSEINCLDIR}
+
+# Symbols used for creating shared binaries
+FUSEBINDIR= ${CALFUSEDIR}/bin
+FUSELIBDIR= -L${CALFUSEDIR}/lib
+LIBDIR=
+FUSELIBS= -lsla -lcf
+LIBS= -lc -lm -lnsl -ldl -lgfortran -lcfitsio
+LDFLAGS= -Wl,-R${CALFUSEDIR}/lib
+
+OBJECTS= cf_calfes.o cf_fes_init.o cf_fes_read.o cf_fes_write.o \
+ cf_fes_cal.o cf_fes_get_cal_image.o cf_limbang.o \
+ cf_fes_apply_bias.o cf_fes_apply_flat.o cf_fes_apply_mask.o
+
+all: cf_calfes
+
+cf_calfes: ${OBJECTS}
+ ${CC} ${CFLAGS} -o cf_calfes ${OBJECTS} \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+ chmod g+rw cf_calfes
+
+install: cf_calfes
+ /bin/cp cf_calfes ${FUSEBINDIR}
+
+clean:
+ /bin/rm -f ${OBJECTS} cf_calfes
+
+distclean:
+ /bin/rm -f ${OBJECTS} cf_calfes
+ cd ../../bin; /bin/rm -f cf_calfes
+
+lint: ${SOURCES}
+ lint ${SOURCES}
diff --git a/src/fes/Makefile.Solaris.orig b/src/fes/Makefile.Solaris.orig
new file mode 100644
index 0000000..23f189b
--- /dev/null
+++ b/src/fes/Makefile.Solaris.orig
@@ -0,0 +1,44 @@
+
+SHARED= -shared
+FITSVER= 2.470
+CALFUSEDIR= ${PWD}/../..
+
+# Symbols for include directories
+FUSEINCLDIR= -I${CALFUSEDIR}/include
+
+# Symbols used for compiling
+CC= cc
+OPT= -O -DCFORTRAN -KPIC -DSOLARIS
+CFLAGS = ${OPT} ${FUSEINCLDIR}
+
+# Symbols used for creating shared binaries
+FUSEBINDIR= ${CALFUSEDIR}/bin
+FUSELIBDIR= -L${CALFUSEDIR}/lib
+LIBDIR= -L/opt/SUNWspro/lib
+FUSELIBS= -lsla -lcfitsio-${FITSVER} -lcf
+LIBS= -lc -lm -lnsl -ldl -lsocket -lsunmath -lM77 -lF77
+LDFLAGS= -Wl,-R${CALFUSEDIR}/lib
+
+OBJECTS= cf_calfes.o cf_fes_init.o cf_fes_read.o cf_fes_write.o \
+ cf_fes_cal.o cf_fes_get_cal_image.o cf_limbang.o \
+ cf_fes_apply_bias.o cf_fes_apply_flat.o cf_fes_apply_mask.o
+
+all: cf_calfes
+
+cf_calfes: ${OBJECTS}
+ ${CC} ${CFLAGS} -o cf_calfes ${OBJECTS} \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+ chmod g+rw cf_calfes
+
+install: cf_calfes
+ /bin/cp cf_calfes ${FUSEBINDIR}
+
+clean:
+ /bin/rm -f ${OBJECTS} cf_calfes
+
+distclean:
+ /bin/rm -f ${OBJECTS} cf_calfes
+ cd ../../bin; /bin/rm -f cf_calfes
+
+lint: ${SOURCES}
+ lint ${SOURCES}
diff --git a/src/fes/Makefile.orig.orig b/src/fes/Makefile.orig.orig
new file mode 100644
index 0000000..23f189b
--- /dev/null
+++ b/src/fes/Makefile.orig.orig
@@ -0,0 +1,44 @@
+
+SHARED= -shared
+FITSVER= 2.470
+CALFUSEDIR= ${PWD}/../..
+
+# Symbols for include directories
+FUSEINCLDIR= -I${CALFUSEDIR}/include
+
+# Symbols used for compiling
+CC= cc
+OPT= -O -DCFORTRAN -KPIC -DSOLARIS
+CFLAGS = ${OPT} ${FUSEINCLDIR}
+
+# Symbols used for creating shared binaries
+FUSEBINDIR= ${CALFUSEDIR}/bin
+FUSELIBDIR= -L${CALFUSEDIR}/lib
+LIBDIR= -L/opt/SUNWspro/lib
+FUSELIBS= -lsla -lcfitsio-${FITSVER} -lcf
+LIBS= -lc -lm -lnsl -ldl -lsocket -lsunmath -lM77 -lF77
+LDFLAGS= -Wl,-R${CALFUSEDIR}/lib
+
+OBJECTS= cf_calfes.o cf_fes_init.o cf_fes_read.o cf_fes_write.o \
+ cf_fes_cal.o cf_fes_get_cal_image.o cf_limbang.o \
+ cf_fes_apply_bias.o cf_fes_apply_flat.o cf_fes_apply_mask.o
+
+all: cf_calfes
+
+cf_calfes: ${OBJECTS}
+ ${CC} ${CFLAGS} -o cf_calfes ${OBJECTS} \
+ ${FUSELIBDIR} ${LIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+ chmod g+rw cf_calfes
+
+install: cf_calfes
+ /bin/cp cf_calfes ${FUSEBINDIR}
+
+clean:
+ /bin/rm -f ${OBJECTS} cf_calfes
+
+distclean:
+ /bin/rm -f ${OBJECTS} cf_calfes
+ cd ../../bin; /bin/rm -f cf_calfes
+
+lint: ${SOURCES}
+ lint ${SOURCES}
diff --git a/src/fes/cf_calfes.c b/src/fes/cf_calfes.c
new file mode 100644
index 0000000..43e913c
--- /dev/null
+++ b/src/fes/cf_calfes.c
@@ -0,0 +1,151 @@
+/*******************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *******************************************************************************
+ *
+ * Synopsis: cf_calfes rootname
+ * where rootname is the exposure root name
+ *
+ * Description:
+ * This main program calls all the routines below to apply
+ * FES processing steps. It
+ * 1) Opens the input and output FES FITS files;
+ * 2) Loops through all images present:
+ * a) Calls the procedures listed below to process all the images;
+ * b) Writes the current processed image out to the
+ * current output HDU.
+ * 3) Closes the input and output files.
+ *
+ * Arguments: rootname exposure_root_name
+ *
+ * Returns: 0 upon successful completion
+ *
+ * History: 07/08/98 gak calfes_design.070898 design documented
+ * 07/15/98 mlr begin work
+ * 04/12/99 mlr modified to only write each image only
+ * once - now passing the image in addition
+ * to the fits hdu to each subroutine.
+ * 04/19/99 mlr finished modifications to utilize
+ * libcf and FITSIO.h(error handling).
+ * 08/23/04 wvd Change cf_velang_calc to cf_velang.
+ *
+ ******************************************************************************/
+
+#include <string.h>
+#include "calfuse.h"
+#include "cf_calfes.h"
+
+#define CF_PRGM_ID "cf_calfes"
+#define CF_VER_NUM "1.4"
+#define RAW_FES "RAW FES "
+#define CAL_FES "CALIBRATED FES "
+
+int main(int argc, char *argv[])
+{
+ fitsfile *infits, *outfits;
+ int i, status;
+ int hdu, hdutype, num_of_hdus;
+ int naxes1, naxes2;
+ long bitpix;
+ float bscale, bzero;
+ double mjd_start, mjd_end;
+
+ char infilename[30], outfilename[30];
+ char file_type[20];
+ float *image;
+
+ /* Enter a timestamp into the log. */
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+ cf_error_init(CF_PRGM_ID,CF_VER_NUM, stdout);
+
+ if (argc != 2)
+ cf_if_error("Usage: cf_calfes filerootname ");
+
+ /* determine file names of the input file and the output file */
+ strcpy(infilename, argv[1]);
+ strcat(infilename, "raw.fit");
+
+ strcpy(outfilename, argv[1]);
+ strcat(outfilename, "cal.fit");
+
+ status=0;
+
+ /* open the input FES FITS file and verify that it is a RAW FES file*/
+ FITS_open_file(&infits, infilename, READONLY, &status);
+
+ FITS_read_key(infits, TSTRING, "FILETYPE", &file_type, NULL, &status);
+
+ if (strncmp(file_type, RAW_FES, 7) != 0)
+ cf_if_error("The input file is not a RAW FES file.");
+
+ /* open the output file for calibrated FES data, copy the primary
+ header from the input FES file to the output FES file, then
+ modify keywords as needed.
+ */
+ FITS_create_file(&outfits, outfilename, &status);
+ FITS_copy_header(infits, outfits, &status);
+
+ bitpix = FLOAT_IMG;
+ FITS_update_key(outfits, TLONG, "BITPIX", &bitpix, NULL, &status);
+ FITS_update_key(outfits, TSTRING, "FILETYPE", CAL_FES, NULL, &status);
+
+ read_tle(outfits);
+
+ /* Determine how many extensions there are in this file.
+ There is 1 FES image in each extension. So this tells us how
+ many images there are in this file and controls the loop that
+ processes each one.
+ */
+
+ FITS_read_key(infits, TINT, "NEXTEND ", &num_of_hdus, NULL, &status);
+
+ printf("This file %s has %d FES image(s).\n", infilename, num_of_hdus);
+ hdutype = -1;
+
+ for (i=1 ; i <= num_of_hdus; i++)
+ {
+ hdu = i + 1;
+
+ FITS_create_hdu(outfits, &status);
+ FITS_movabs_hdu(infits, hdu, &hdutype, &status);
+ FITS_copy_header(infits, outfits, &status);
+
+ bitpix = FLOAT_IMG;
+ bzero = 0.0;
+ bscale = 1.0;
+ FITS_update_key(outfits, TLONG, "BITPIX", &bitpix, NULL, &status);
+ FITS_update_key(outfits, TFLOAT, "BZERO", &bzero, NULL, &status);
+ FITS_update_key(outfits, TFLOAT, "BSCALE", &bscale, NULL, &status);
+
+ FITS_read_key(outfits,TDOUBLE,"EXPSTART",&mjd_start,NULL, &status);
+ FITS_read_key(outfits,TDOUBLE,"EXPEND", &mjd_end, NULL, &status);
+ cf_velang(outfits, (mjd_start+mjd_end)/2.0 );
+ cf_min_limbang(outfits, mjd_start, mjd_end);
+
+ status =+ cf_fes_read(infits, &image, &naxes1, &naxes2);
+ status =+ cf_fes_init(outfits);
+ status =+ cf_fes_write(outfits, hdu, image);
+
+ status =+ cf_fes_cal(FES_MASK, outfits, &image, naxes1, naxes2);
+ status =+ cf_fes_cal(FES_BIAS, outfits, &image, naxes1, naxes2);
+ status =+ cf_fes_cal(FES_FLAT, outfits, &image, naxes1, naxes2);
+ status =+ cf_fes_write(outfits, hdu, image);
+
+
+ free(image);
+
+ if (status != 0)
+ cf_if_error("cf_calfes failed.");
+ }
+
+ /* close the FES FITS files */
+ FITS_close_file(infits, &status);
+ FITS_close_file(outfits, &status);
+
+
+ /* Enter a timestamp into the log. */
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done Processing");
+
+ return(status);
+}
diff --git a/src/fes/cf_calfes.h b/src/fes/cf_calfes.h
new file mode 100644
index 0000000..d4944fa
--- /dev/null
+++ b/src/fes/cf_calfes.h
@@ -0,0 +1,10 @@
+#define FES_GOOD_PIX 0.0
+#define FES_BAD_PIX -20.0
+#define FES_FLAT 1
+#define FES_MASK 2
+#define FES_BIAS 3
+
+int cf_fes_apply_flat(fitsfile *, float **, float *, int, int);
+int cf_fes_apply_mask(fitsfile *, float **, float *, int, int);
+int cf_fes_apply_bias(fitsfile *, float **, float *, int, int);
+
diff --git a/src/fes/cf_cp_hdr.c b/src/fes/cf_cp_hdr.c
new file mode 100644
index 0000000..7642f05
--- /dev/null
+++ b/src/fes/cf_cp_hdr.c
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *******************************************************************************
+ *
+ * Synopsis: cf_cp_hdr(fitsfile *infits, int inhdu, fitsfile *outfits,
+ * int outhdu)
+ *
+ * Description: Copies the header, with no changes, from HDU inhdu of the
+ * input FITS file infits to HDU outhdu of the output FITS file
+ * outfits.
+ *
+ * Arguments: fitsfile *infits Input FITS file pointer
+ * int inhdu HDU to be copied from
+ * fitsfile *outfits Output FITS file pointer
+ * int outhdu HDU to be copied to
+ *
+ * Returns: none
+ *
+ * History: 04/02/98 gak Begin work
+ * 08/27/98 gak Initialized status, hdutype;
+ * return status
+ *
+ ******************************************************************************/
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "calfuse.h"
+
+#define CF_PRGM_ID "cf_cp_hdr"
+#define CF_VER_NUM "1.1"
+
+int cf_cp_hdr(fitsfile *infits, int inhdu, fitsfile *outfits, int outhdu)
+{
+ char buffer[FLEN_CARD];
+ int status, hdutype;
+ int nkeys, keynum;
+ int i;
+
+ status = 0;
+ hdutype = 0;
+
+ if ( fits_movabs_hdu(infits, inhdu, &hdutype, &status) ) {
+ cf_if_error(status);
+ exit(status);
+ }
+ if ( fits_movabs_hdu(outfits, outhdu, &hdutype, &status) ) {
+ cf_if_error(status);
+ exit(status);
+ }
+
+ /* Get number of keywords in the input header, loop & copy. */
+ if ( fits_get_hdrpos(infits, &nkeys, &keynum, &status) ) {
+ cf_if_error(status);
+ exit(status);
+ }
+ for ( i = 1; i <= nkeys; i++) {
+ if ( fits_read_record(infits, i, buffer, &status) ) {
+ cf_if_error(status);
+ exit(status);
+ }
+ if ( fits_write_record(outfits, buffer, &status) ) {
+ cf_if_error(status);
+ exit(status);
+ }
+ }
+
+ return status;
+}
diff --git a/src/fes/cf_fes_apply_bias.c b/src/fes/cf_fes_apply_bias.c
new file mode 100644
index 0000000..7591757
--- /dev/null
+++ b/src/fes/cf_fes_apply_bias.c
@@ -0,0 +1,98 @@
+/*******************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *******************************************************************************
+ *
+ * Synopsis: cf_apply_fes_bias(fitsfile *fesfits, float **image,
+ * float *bias, int axis1, int axis2)
+ *
+ * Description: Apply FES bias in *bias to the raw FES image in **image
+ * To apply the bias, I simply loop through the
+ * bias image pixel by pixel and subtract that
+ * value from the given FES image.
+ *
+ * Arguments: fitsfile *fesfits fits file for image so that we can add
+ * history/comment lines to the HDU
+ * float **image FES image
+ * float *bias FES bias image
+ * int axis1, axis2 size of each axis of the images.
+ * This presumes that both images are
+ * the same size when they get here.
+ *
+ * Returns: 0 upon successful completion
+ *
+ * History: 07/08/98 gak calfes_design.070898 design documented
+ * 07/22/98 mlr started work
+ * 04/06/99 mlr Broke this actual subroutine out
+ * from cf_fes_bias.c
+ * 08/10/99 mlr added fesfits to the argument list
+ * 04/25/02 wvd initialize status to zero
+ *
+ ******************************************************************************/
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "calfuse.h"
+#include "cf_calfes.h"
+
+#define CF_PRGM_ID "cf_fes_apply_bias"
+#define CF_VER_NUM "1.4"
+
+int cf_fes_apply_bias(fitsfile *fesfits, float **image,
+ float *bias, int naxis1, int naxis2)
+{
+ int i, j; /*loop counters */
+ int status=0;
+ float os_bias, os_data;
+ float factor;
+ char buffer[80];
+
+ cf_timestamp(CF_PRGM_ID,CF_VER_NUM, "Applying FES bias");
+
+ os_bias=0.;
+ os_data=0.;
+
+ if (naxis1 == 520) /* 1x1 binning */
+ {
+ for (j=0; j<520; j++)
+ for (i=512; i<520; i++)
+ {
+ os_bias += bias[j*naxis1+i];
+ os_data += (*image)[j*naxis1+1];
+ }
+ }
+ else if (naxis1 == 260) /* 2x2 binning */
+ {
+ for (j=0; j<260; j++)
+ for (i=256; i<260; i++)
+ {
+ os_bias += bias[j*naxis1+i];
+ os_data += (*image)[j*naxis1+1];
+ }
+ }
+ else /*bail out -- unsupported image size or binning */
+ exit(-1);
+
+ factor = os_data / os_bias;
+ sprintf(buffer, "FES BIAS FACTOR = %lf",factor);
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, buffer);
+
+/* FITS_write_history(fesfits, buffer, &status); */
+
+ for (j=0; j<naxis2; j++)
+ for (i=0; i<naxis1; i++)
+ {
+/* printf("pixel[%d, %d] = %lf\n",i,j, (*image)[j*naxis1+i]); */
+ if ( (*image)[j*naxis1+i] != FES_BAD_PIX )
+ (*image)[j*naxis1+i] -= bias[j*naxis1+i] * factor;
+ else
+ printf("bad pixel[%d, %d]\n",i,j);
+ }
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished FES bias");
+
+ return(status);
+
+}
diff --git a/src/fes/cf_fes_apply_flat.c b/src/fes/cf_fes_apply_flat.c
new file mode 100644
index 0000000..21d8ddc
--- /dev/null
+++ b/src/fes/cf_fes_apply_flat.c
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *******************************************************************************
+ *
+ * Synopsis: cf_apply_fes_flat(fitsfile *fesfits, float **image,
+ * float *flat, int axis1, int axis2)
+ *
+ * Description: Apply FES flatfield in *flat to the raw FES image in **image
+ * To apply the flatfield, I simply loop through the
+ * flatfield image pixel by pixel and
+ * If the flatfield pixel value != 0.0
+ * then fes image[] pixel value = image[]pixel value/mask[]pixel value.
+ * else (If the flatfield pixel value == 0.0)
+ * then fes image[] pixel value = FES_BAD_PIX.
+ *
+ * Arguments: fitsfile *fesfits fits file for image.. so that we can add
+ * history/comment lines to the HDU
+ * float **image FES image
+ * float *mask FES mask
+ * int axis1, axis2 size of each axis of the images.
+ * This presumes that both images are
+ * the same size before they get here.
+ *
+ * Returns: 0 upon successful completion
+ *
+ * History: 07/08/98 gak calfes_design.070898 design documented
+ * 07/22/98 mlr started work
+ * 04/06/99 mlr Broke this actual subroutine out
+ * from cf_fes_mask.c
+ * 04/20/99 mlr instead of calculating the image row
+ * size each time -- pass it in
+ * 08/10/99 mlr added fesfits to argument list
+ *
+ ******************************************************************************/
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "calfuse.h"
+#include "cf_calfes.h"
+
+#define CF_PRGM_ID "cf_fes_apply_flat"
+#define CF_VER_NUM "1.4"
+
+int cf_fes_apply_flat(fitsfile *fesfits, float **image,
+ float *flat, int naxis1, int naxis2)
+{
+ int i, j; /*loop counters */
+ int pixel;
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Applying FES flatfield");
+ for (j=0; j < naxis2; j++)
+ for (i=0; i < naxis1; i++)
+ {
+ pixel = j* naxis1+ i;
+ if ((*image)[pixel] != FES_BAD_PIX)
+ if (flat[pixel] != 0.0 )
+ (*image)[pixel] /= flat[pixel];
+ else
+ (*image)[pixel] = FES_BAD_PIX;
+ }
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done applying FES flat");
+
+ return(0);
+}
diff --git a/src/fes/cf_fes_apply_mask.c b/src/fes/cf_fes_apply_mask.c
new file mode 100644
index 0000000..c083121
--- /dev/null
+++ b/src/fes/cf_fes_apply_mask.c
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *******************************************************************************
+ *
+ * Synopsis: cf_apply_fes_mask(fitsfile *fesfits, float **image,
+ * float *mask, int axis1, int axis2)
+ *
+ * Description: Apply FES mask in *mask to the raw FES image in **image
+ * To apply the mask I simply loop through the
+ * mask image pixel by pixel and
+ * If the mask pixel value != 0.0
+ * then fes image pixel value = mask pixel value.
+ *
+ * Arguments: fitsfile *fesfits fits file for image, so that we can add
+ * history/comment lines to the HDU
+ * float **image FES image
+ * float *mask FES mask
+ * int axis1, axis2 size of each axis of the images.
+ * This presumes that both images are
+ * the same size when they get here.
+ *
+ * Returns: 0 upon successful completion
+ *
+ * History: 07/08/98 gak calfes_design.070898 design documented
+ * 07/22/98 mlr started work
+ * 04/06/99 mlr Broke subroutine out from cf_fes_mask.c
+ * 08/10/99 mlr added fesfits to the argument list
+ *
+ *
+ ******************************************************************************/
+
+#include "calfuse.h"
+#include "cf_calfes.h"
+
+#define CF_PRGM_ID "cf_fes_apply_mask"
+#define CF_VER_NUM "1.4"
+
+int cf_fes_apply_mask(fitsfile *fesfits, float **image,
+ float *mask, int naxis1, int naxis2)
+{
+ int i, j; /*loop counters */
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Applying FES pixel mask");
+
+ for (j=0; j < naxis2; j++)
+ for (i=0; i < naxis1; i++)
+ if (mask[j*naxis1+i] != FES_GOOD_PIX )
+ (*image)[j*naxis1+i] = mask[j*naxis1+i];
+
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done applying FES mask");
+
+ return(0);
+}
diff --git a/src/fes/cf_fes_cal.c b/src/fes/cf_fes_cal.c
new file mode 100644
index 0000000..0f08bbd
--- /dev/null
+++ b/src/fes/cf_fes_cal.c
@@ -0,0 +1,115 @@
+/*******************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *******************************************************************************
+ *
+ * Synopsis: int cf_fes_cal(int cal_type, fitsfile *fesfits, float **image,
+ * int inaxis1, int inaxis2)
+ *
+ * Description: Get bias calibration filename for the raw FES image in
+ * the current hdu pointed at by *infits.
+ * Call cf_fes_get_cal_image() to open the cal file and get
+ * the calibration image.
+ * Call cf_fes_apply_flat();
+ * return the modified image to the calling routine.
+ * 4/10/99 MLR removed int inhdu as an argument and removed
+ * the call to fits_movabs_hdu. This requires any
+ * user of this subroutine to do these steps before
+ * calling cf_fes_flat.
+ * 4/10/99 MLR removed (fitsfile *outfits, int outhdu) from
+ * the argument list. We will leave writing the image
+ * out to the calling routine.
+ *
+ *
+ * Arguments: fitsfile *infits Input FITS file pointer
+ * float **image already read in FES image
+ * int inaxis1 image size of the input image
+ * int inaxis2
+ *
+ * Returns: none
+ *
+ * History: 07/08/98 gak calfes_design.070898 design documented
+ * 07/22/98 mlr started work
+ * 04/10/99 mlt pulled the actual work out of this
+ * routine and into cf_fes_apply_flat
+ * 04/12/99 mlr modified the input arguments(see above)
+ * use the now generic cf_fes_read to
+ * get the calibration image.
+ * 04/14/99 mlr pulled the reading out and put it
+ * into cf_fes_get_cal_image.c
+ * 04/16/99 mlr finished modifications to utilize
+ * libcf and FITSIO.h(error handling).
+ *
+ * ToDo: 4/12/99 I have added the naxis1 and naxis2 parameters to the
+ * argument list. I need to use them to compare binning
+ * factors in the two images.
+ * I should combine cf_fes_mask, cf_fes_bias, cf_fes_flat
+ * into one generic cf_fes_do_cal("cf_fes_mask", *fesfits,...etc)
+ *
+ ******************************************************************************/
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "calfuse.h"
+#include "cf_calfes.h"
+
+#define CF_VER_NUM "1.4"
+
+int cf_fes_cal(int cal_type, fitsfile *fesfits, float **image,
+ int inaxis1, int inaxis2)
+{
+ char buffer[FLEN_CARD];
+ char calfilename[30];
+ fitsfile *calfile;
+ int status;
+ float *calimage;
+ char *prog_id, *msg, *keyword, *msg2;
+
+ int (*func)(fitsfile *, float **, float *, int, int);
+
+ status = 0;
+
+ switch (cal_type) {
+ case FES_FLAT:
+ prog_id = "cf_fes_flat";
+ msg = "Begin FES flatfield";
+ msg2 = "Done FES flatfield";
+ keyword = "FFLT1FCL";
+ func = cf_fes_apply_flat;
+ break;
+ case FES_MASK:
+ prog_id = "cf_fes_mask";
+ msg = "Begin FES mask";
+ msg2 = "Done FES mask";
+ keyword = "MASK_FCL";
+ func = cf_fes_apply_mask;
+ break;
+ case FES_BIAS:
+ prog_id = "cf_fes_bias";
+ msg = "Begin FES bias";
+ msg2 = "Done FES bias";
+ keyword = "BIAS1FCL";
+ func = cf_fes_apply_bias;
+ break;
+ }
+
+
+ cf_timestamp(prog_id, CF_VER_NUM, msg);
+
+ FITS_read_key(fesfits, TSTRING, keyword, calfilename, buffer, &status);
+
+ if (cf_fes_get_cal_image(calfilename, &calimage, inaxis1, inaxis2) == -1)
+ return (-1);
+
+ (*func)(fesfits, image, calimage, inaxis1, inaxis2);
+
+ cf_fes_proc_update(fesfits, prog_id, "COMPLETE");
+
+ free(calimage);
+
+ cf_timestamp(prog_id, CF_VER_NUM, msg2);
+
+ return(status);
+}
diff --git a/src/fes/cf_fes_get_cal_image.c b/src/fes/cf_fes_get_cal_image.c
new file mode 100644
index 0000000..2e5e8f0
--- /dev/null
+++ b/src/fes/cf_fes_get_cal_image.c
@@ -0,0 +1,71 @@
+ /*******************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *******************************************************************************
+ *
+ * Synopsis:int cf_fes_get_cal_image(char cal_file_name[], float **cal_image,
+ * int naxis1, int naxis2)
+ *
+ * Description: open the specified calibration file for an FES image
+ * loop through each extension in the calibration file
+ * until you find the one that has the same size naxis1 and
+ * naxis2 as the input image.
+ * read the image in that extention into *cal_image
+ * close the calibration file
+ *
+ * Arguments: char cal_file_name[],
+ * float **cal_image,
+ * int naxis1, int naxis2
+ *
+ * Returns: none
+ *
+ * History: 04/14/99 mlr started work
+ * 04/16/99 mlr modified to use libcf and FITSIO.h
+ *
+ ******************************************************************************/
+
+#include "calfuse.h"
+
+#define CF_PRGM_ID "cf_fes_get_cal_image"
+#define CF_VER_NUM "1.4"
+
+int cf_fes_get_cal_image(char cal_file_name[], float **cal_image,
+ int naxis1, int naxis2)
+{
+ fitsfile *fes_cal_file;
+ int status;
+ int i, hdu, hdutype, num_exts;
+ int cal_axis1, cal_axis2;
+ char buffer[FLEN_CARD];
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin getting Cal image");
+
+ status = 0;
+
+ /* open the input FES CALIBRATION file */
+
+ FITS_open_file(&fes_cal_file,cf_cal_file(cal_file_name),READONLY,&status);
+
+ FITS_read_key(fes_cal_file, TINT, "NEXTEND", &num_exts, buffer, &status);
+
+ for (i = 1; i<= num_exts; i++)
+ {
+ hdu = i + 1;
+ FITS_movabs_hdu(fes_cal_file, hdu, &hdutype, &status);
+ cf_fes_read(fes_cal_file, cal_image, &cal_axis1, &cal_axis2);
+ if ((cal_axis1 == naxis1) && (cal_axis2 == naxis2))
+ break;
+ }
+ FITS_close_file(fes_cal_file, &status);
+
+ if (i>num_exts)
+ {
+ *cal_image=NULL;
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "No Cal image of requested size");
+ return(-1);
+ }
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done getting Cal image");
+ return(status);
+}
diff --git a/src/fes/cf_fes_init.c b/src/fes/cf_fes_init.c
new file mode 100644
index 0000000..fcbb34c
--- /dev/null
+++ b/src/fes/cf_fes_init.c
@@ -0,0 +1,294 @@
+
+/*******************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *******************************************************************************
+ *
+ * Synopsis: cf_fes_init(fitsfile *fptr)
+ *
+ * Description: cf_fes_init performs two functions. First, populates the
+ * data processing step keywords based upon the type of
+ * data (FESA or FESB). Second, it populates the calibration
+ * file keywords based on the time and date of observation,
+ * the detector segment, and the interpolation status of the
+ * calibration file.
+ *
+ * Arguments: fitsfile *fptr Pointer to input file
+ *
+ * History: 05/21/98 emm Begin work.
+ * 06/17/98 emm Modified keywords to reflect updated
+ * calfuse design
+ * 07/15/98 mlr copied from emm
+ * 08/23/04 wvd Change from fits_modify_key_str to
+ * FITS_update_key throughout.
+ ******************************************************************************/
+
+#include <stdio.h>
+#include <string.h>
+#include "calfuse.h"
+
+#define MAXCHARS 120
+#define MASTER_CAL_FILE "master_fes_calib_file.dat"
+#define CF_PRGM_ID "cf_fes_init"
+#define CF_VER_NUM "1.4"
+
+int cf_fes_init(fitsfile *fptr)
+{
+int i,j,k,l,flg;
+char comment[FLEN_CARD], instmode[FLEN_CARD], detector[FLEN_CARD];
+char fes[2];
+char keyword_in[9], segment_in[3];
+char filename_in[19]=" \0";
+char keyword_out1[9], keyword_out2[9];
+char complete[19], error[19], blank[19];
+char linin[120];
+int status, interp_in;
+float expstart, aftermjd_in;
+
+struct fes_keyword_tab keytab[NUM_FES_PROC_STEPS]=FES_CALIBRATION_STEP_KEYS;
+struct cal_file_tab calkey[NUM_FES_CAL_KEYS]=FES_CALIBRATION_FILE_KEYS;
+FILE *fpin;
+
+cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin initializing header");
+cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+status=0;
+
+ strncpy(complete,"COMPLETE \0",19);
+ strncpy(error, "ERROR \0",19);
+ strncpy(blank, " \0",19);
+
+/* Populate data processing keywords. */
+
+ for (i=0; i<NUM_FES_PROC_STEPS; i++)
+ FITS_update_key(fptr,TSTRING,keytab[i].name,
+ keytab[i].value,NULL,&status);
+
+
+/* Populate calibration file keywords based on the date of the
+ * observation and the segment/channel number. */
+
+ FITS_read_key(fptr, TFLOAT, "EXPSTART", &expstart, comment, &status);
+ FITS_read_key(fptr, TSTRING, "FES_ID", instmode, comment, &status);
+ sscanf(instmode,"%*3c %1c",fes);
+
+/* Open the Master calibration database file. */
+
+ fpin=NULL;
+ fpin=fopen(cf_cal_file(MASTER_CAL_FILE),"r");
+ if (fpin == NULL)
+ cf_if_warning("Master calibration database file not found");
+
+ /* Cycle through the master cal file until we run out of lines. */
+
+ /* Here's how this section works. We need to keep track of 3 calibration
+ * files for each keyword: the cal file which immediately preceedes the
+ * date of observation, the cal file which immediately preceedes the cal
+ * file which immediately preceedes the observation, and the cal file
+ * immediately after the observation. These are stored in strut calkey
+ * in:
+ * calkey[i].filenames[0] => second cal file preceeding observation
+ * calkey[i].filenames[1] => cal file immediately preceeding observation
+ * calkey[i].filenames[2] => cal file immediately after observation
+ *
+ * Here is the plan. Cycle through the master cal file, reading each
+ * line. Determine the keyword for each line, and use that to determine
+ * the appropriate index [i] for calkey. Then, if the detector segment
+ * is correct, determine where the new file fits into the structure above.
+ * If it is more recent than one or both of the preceeding cal files,
+ * but is older than the observation (expstart) replace either
+ * filenames[0] or filenames[1]. If filenames[1] is replaced, shift
+ * the old value down into filenames[0]. If the file is more recent
+ * than the observation, and closer to the observation than the file
+ * in filenames[2], replace filenames[2]. The values
+ * calkey[i].aftermjd[] and calkey[i].interp[] store the date and
+ * interpolation status of the best files. This organization allows
+ * the master calibration database file to be written in any order.
+ */
+
+ while (fgets(linin, MAXCHARS, fpin) != NULL) {
+
+ /* Check for comment lines */
+
+ if ((linin[0] != '#') && (linin[0] != '\n')) {
+ sscanf(linin, "%4c %1c %12c %9f %1d",keyword_in,
+ segment_in,filename_in,&aftermjd_in,&interp_in);
+
+ /* Determine which keyword we just read in. */
+ i=0;
+ while ((strncmp(calkey[i].name,keyword_in,4) != 0) &&
+ (i < NUM_FES_CAL_KEYS)) i++;
+
+ if (i >= NUM_FES_CAL_KEYS) {
+ cf_if_warning("Unrecognized keyword in master calibration file");
+ } else {
+ if ((strncmp(segment_in," ",1) == 0) ||
+ (strncmp(segment_in,fes,1) == 0)) {
+ j=0;
+ if ((aftermjd_in < expstart) &&
+ (aftermjd_in > calkey[i].aftermjd[0]) &&
+ (aftermjd_in > calkey[i].aftermjd[1])) {
+ strncpy(calkey[i].filenames[0],
+ calkey[i].filenames[1],18);
+ calkey[i].aftermjd[0]=calkey[i].aftermjd[1];
+ calkey[i].interp[0]=calkey[i].interp[1];
+ strncpy(calkey[i].filenames[1],
+ filename_in,18);
+ calkey[i].aftermjd[1]=aftermjd_in;
+ calkey[i].interp[1]=interp_in;
+ } else if ((aftermjd_in < expstart) &&
+ (aftermjd_in > calkey[i].aftermjd[0])) {
+ strncpy(calkey[i].filenames[0],
+ filename_in,18);
+ calkey[i].aftermjd[0]=aftermjd_in;
+ calkey[i].interp[0]=interp_in;
+ }
+
+ if ((aftermjd_in > expstart) &&
+ (aftermjd_in < calkey[i].aftermjd[2])) {
+ strncpy(calkey[i].filenames[2],
+ filename_in,18);
+ calkey[i].aftermjd[2]=aftermjd_in;
+ calkey[i].interp[2]=interp_in;
+ }
+ } /* Endif segment match */
+ } /* end else unrecognized keyword */
+ } /* end while linin not comment */
+ } /* end while(linin != NULL) */
+
+ fclose(fpin);
+
+ /* OK, now that we have identified the closest two files before
+ * the observation, and the file after the observation, we can
+ * decide what to do with them. First, the easy part: if
+ * calkey[i].numfiles=1, no interpolation is possible, so we
+ * write out calkey[i].filenames[1], which is the file immediately
+ * preceeding the observation. If calkey[i].numfiles=2, interpolation
+ * is possible, and we will have to write two keywords into the header.
+ * The decision as to which two keywords to write follows these rules:
+ * Rule 1: If an observation occurs between two files which can be
+ * interpolated, then an interpolation must be done.
+ * Rule 2: If the calibration file immediately preceeding an
+ * observation is to be used in a stepwise manner, then said
+ * file shall be used in stepwise manner.
+ * Rule 3: If the two calibration files immediately preceeding an
+ * observation can be interpolated, but the following file
+ * cannot, then the two previous files will be extrapolated
+ * forward in time.
+ * Rule 4: If the closest preceeding calibration file has an interpolation
+ * flag, but the file preceeding it has a stepwise flag, the the
+ * closest preceeding file will be used in a sterpwise manner.
+ * Rule 5: Never interpolate backward in time.
+ *
+ * In fact, there are only 8 possible cases:
+ *
+ * Remember, the files were sorted such that the observation
+ * always occurs between [1] and [2]. Also remember that
+ * interp[i]=0 => stepwise):
+ *
+ * Case Action
+ *
+ * interp[0] = 0
+ * interp[1] = 0 filenames[1] will be used in a stepwise manner
+ * interp[2] = 0
+ *
+ * interp[0] = 0
+ * interp[1] = 0 filenames[1] will be used in a stepwise manner
+ * interp[2] = 1
+ *
+ * interp[0] = 0
+ * interp[1] = 1 filenames[1] will be used in a stepwise manner
+ * interp[2] = 0
+ *
+ * interp[0] = 1
+ * interp[1] = 0 filenames[1] will be used in a stepwise manner
+ * interp[2] = 0
+ *
+ * interp[0] = 1
+ * interp[1] = 0 filenames[1] will be used in a stepwise manner
+ * interp[2] = 1
+ *
+ * interp[0] = 0
+ * interp[1] = 1 filenames[1] and filenames[2] will be interpolated
+ * interp[2] = 1
+ *
+ * interp[0] = 1
+ * interp[1] = 1 filenames[0] and filenames[1] will be extrapolated
+ * interp[2] = 0
+ *
+ * interp[0] = 1
+ * interp[1] = 1 filenames[1] and filenames[2] will be interpolated
+ * interp[2] = 1
+ *
+ */
+
+ /* Write the calibration files into the header keywords. */
+ /* Cycle through the keywords. */
+ for (i=0; i<NUM_FES_CAL_KEYS; i++) {
+
+ if (calkey[i].numfiles == 1) {
+
+ /* This is the easy case, no interpolation is possible. */
+
+ sprintf(keyword_out1,"%4.4s%1.1s%3.3s",calkey[i].name,"_",
+ calkey[i].extension);
+ FITS_update_key(fptr,TSTRING,keyword_out1,calkey[i].filenames[1],
+ NULL,&status);
+ } else {
+
+ /* OK, interpolation is possible, now decide which two files
+ * to write out. */
+
+ /* Create the two output keywords */
+ sprintf(keyword_out1,"%4.4s%1.1s%3.3s",calkey[i].name,"1",
+ calkey[i].extension);
+ sprintf(keyword_out2,"%4.4s%1.1s%3.3s",calkey[i].name,"2",
+ calkey[i].extension);
+
+ if (calkey[i].interp[1] == 0) {
+
+ /* Easy, preceeding file is a 0, so write filenames[1] to
+ * both keywords. Takes care of cases 000, 001, 100, 101.
+ */
+ FITS_update_key(fptr,TSTRING,keyword_out1,calkey[i].filenames[1],
+ NULL,&status);
+ FITS_update_key(fptr,TSTRING,keyword_out2,calkey[i].filenames[1],
+ NULL,&status);
+ } else if ((calkey[i].interp[1] == 1) && (calkey[i].interp[2] == 1)) {
+ /* Case 011 and 111 */
+ FITS_update_key(fptr,TSTRING,keyword_out1,calkey[i].filenames[1],
+ NULL,&status);
+ FITS_update_key(fptr,TSTRING,keyword_out2,calkey[i].filenames[2],
+ NULL,&status);
+ } else if ((calkey[i].interp[0] == 1) && (calkey[i].interp[1] == 1)
+ && (calkey[i].interp[2] == 0)){
+ /* Case 110 */
+ FITS_update_key(fptr,TSTRING,keyword_out1,calkey[i].filenames[0],
+ NULL,&status);
+ FITS_update_key(fptr,TSTRING,keyword_out2,calkey[i].filenames[1],
+ NULL,&status);
+
+ } else if ((calkey[i].interp[0] == 0) && (calkey[i].interp[1] == 1)
+ && (calkey[i].interp[2] == 0)){
+ /* Case 010 */
+ FITS_update_key(fptr,TSTRING,keyword_out1,calkey[i].filenames[1],
+ NULL,&status);
+ FITS_update_key(fptr,TSTRING,keyword_out2,calkey[i].filenames[1],
+ NULL,&status);
+
+ } else cf_if_warning("The interpolation/stepwise logic has failed. I am confused.");
+
+ } /* end else calkey.numfiles == 1 */
+
+ } /* end for i=0; i<NUMCALKEYS */
+
+
+FITS_update_key(fptr,TSTRING,"INIT_FES",complete,NULL,&status);
+
+cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done initializing header");
+
+return status;
+}
+
+
diff --git a/src/fes/cf_fes_read.c b/src/fes/cf_fes_read.c
new file mode 100644
index 0000000..47fbf20
--- /dev/null
+++ b/src/fes/cf_fes_read.c
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *******************************************************************************
+ *
+ * Synopsis: cf_fes_read(fitsfile *infits, float **image,
+ * int *naxis1, int *naxis2);
+ *
+ * Description: reads an FES image from the current hdu in the FITS file
+ * pointed to by *infits and stores it in the array pointed
+ * to by *image.
+ * *infits may contain an FES image where each pixel is
+ * stored as unsigned shorts or as floats. cf_fes_read
+ * determines this from BITPIX in the current hdu and proceeds
+ * accordingly.
+ * cf_fes_read also takes care of any binning by determining
+ * the image size from NAXIS1 and NAXIS2 in the current hdu.
+ * 4/12/99 MLR These two values are now returned to the
+ * calling routine for reference.
+ * 4/10/99 MLR removed int inhdu as an argument and removed
+ * the call to fits_movabs_hdu. This requires any
+ * user of this subroutine to do these steps before
+ * calling cf_fes_read.
+ *
+ * Arguments: fitsfile *infits Input FITS file pointer
+ * float **image Pointer to array holding FES image
+ * int *naxis1 Image size parameters
+ * int *naxis2
+ *
+ * Returns: 0 upon successfule completion
+ *
+ * History: 07/08/98 gak calfes_design.070898 design documented
+ * 07/16/98 mlr started work
+ * 04/12/99 mlr modified the input arguments(see above)
+ * 04/16/99 mlr finished modifications to utilize
+ * libcf and FITSIO.h(error handling).
+ ******************************************************************************/
+
+#include "calfuse.h"
+
+#define CF_PRGM_ID "cf_fes_read"
+#define CF_VER_NUM "1.4"
+
+int cf_fes_read(fitsfile *infits, float**image, int *naxis1, int *naxis2)
+{
+ char buffer[FLEN_CARD];
+ int status;
+ int bitpix, nullval, anynull, npixels;
+ int i, j, hdutype;
+ short *short_image;
+
+ status = 0;
+ hdutype=-1;
+
+ FITS_read_key(infits, TINT, "NAXIS1", naxis1, buffer, &status);
+
+ FITS_read_key(infits, TINT, "NAXIS2", naxis2, buffer, &status);
+
+ npixels = (*naxis1) * (*naxis2);
+
+ cf_if_memory_error(*image = (float *) malloc(sizeof(float) * npixels));
+
+ FITS_read_key(infits, TINT, "BITPIX", &bitpix, buffer, &status);
+
+ nullval = 0;
+ if (bitpix == 16 || bitpix == -32)
+
+ FITS_read_img(infits, TFLOAT, 1, npixels,
+ &nullval, *image, &anynull, &status);
+
+ else
+ cf_if_error("INVALID data type for FES image. ");
+
+ return(status);
+}
diff --git a/src/fes/cf_fes_write.c b/src/fes/cf_fes_write.c
new file mode 100644
index 0000000..baa678b
--- /dev/null
+++ b/src/fes/cf_fes_write.c
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *******************************************************************************
+ *
+ * Synopsis: cf_fes_write(fitsfile *outfits, int hdu, float *image);
+ *
+ * Description: writes an FES image into HDU number hdu in the FITS file
+ * pointed to by *fptr. Currently cf_fes_write extracts
+ * BITPIX, NAXIS1, and NAXIS2 from the specified HDU and
+ * uses those values to write the image.
+ *
+ * Arguments: fitsfile *outfits output FITS file pointer
+ * int hdu HDU to be written to
+ * float *image Pointer to array holding FES image
+ *
+ * Returns: none
+ *
+ * History: 07/08/98 gak calfes_design.070898 design documented
+ * 07/20/98 mlr started work
+ * 04/19/99 mlr finished modifications to utilize
+ * libcf and FITSIO.h(error handling).
+ * ToDO: I may at somepoint modify this subroutine to pass in the image
+ * type and size in as parameters... I already have the information
+ * I shouldn't read it in... or perhaps I should just verify that
+ * they match???
+ * ToDo: I should check bitpix and write out the requested size. At the
+ * moment I only write float.
+ *
+ ******************************************************************************/
+
+#include "calfuse.h"
+
+#define CF_PRGM_ID "cf_fes_write"
+
+int cf_fes_write(fitsfile *outfits, int hdu, float *image)
+{
+ char buffer[FLEN_CARD];
+ int status, hdutype;
+ int naxis, naxis1, naxis2;
+ int fpixel, npixels, bitpix;
+ short *short_image;
+
+ hdutype = -1;
+ status = 0;
+
+ FITS_movabs_hdu(outfits, hdu, &hdutype, &status);
+
+ FITS_read_key(outfits, TINT, "NAXIS1", &naxis1, buffer, &status);
+ FITS_read_key(outfits, TINT, "NAXIS2", &naxis2, buffer, &status);
+ FITS_read_key(outfits, TINT, "BITPIX", &bitpix, buffer, &status);
+
+ fpixel = 1;
+ npixels = naxis1 * naxis2;
+
+ FITS_write_img(outfits, TFLOAT, fpixel, npixels, image, &status);
+
+ return(status);
+}
diff --git a/src/fes/cf_limbang.c b/src/fes/cf_limbang.c
new file mode 100644
index 0000000..8bd230f
--- /dev/null
+++ b/src/fes/cf_limbang.c
@@ -0,0 +1,100 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_limbang_calc(fitsfile *outfits, double mjd)
+ * cf_min_limbang(fitsfile *outfits,
+ * double mjd_start, double mjd_end)
+ * Description: cf_limbang_calc - Calculates the limb angle at a given mjd
+ * cf_min_limbang - determines the minimum limb angle between
+ * the start and end times. The limb angle is
+ * calculated every 8.6 seconds( .0001 MJD)
+ *
+ * Arguments: fitsfile *outfits Pointer to FITS file containing the
+ * input data and orbital elements
+ * double mjd The limb angle calculation is done for
+ * this time. The time is given as
+ * a Modified Julian Date.
+ * double mjd_start The range of times for which the minimum
+ * double mjd_end limb angle should be determined.
+ * Both are given as Modified Julian Dates.
+ *
+ * History: 08/09/99 mlr copied cf_velang.c to start
+ * 08/09/99 mlr removed excess calls then made the
+ * limb_ang calls - same as cf_check_point
+ *
+ ****************************************************************************/
+
+#include <stdio.h>
+#include "calfuse.h"
+#include "sgp4.h"
+static char CF_PRGM_ID[] = "cf_limbang";
+
+SGP4 set_orbit_parms(fitsfile *);
+
+double cf_limbang_calc(fitsfile *outfits, double mjd)
+{
+ int status=0, isday_dummy;
+ char comment[FLEN_CARD];
+ double ra, dec, pos[3], vel[3];
+ double lim_ang, zdist_dummy;
+ SGP4 sgp4;
+
+ sgp4 = set_orbit_parms(outfits);
+
+ /* get the state vector at time mjd */
+ SGP4_getStateVector(sgp4, mjd, pos, vel);
+ SGP4_precess(pos, mjd, MJD2000); SGP4_precess(vel, mjd, MJD2000);
+
+ FITS_read_key(outfits, TDOUBLE, "RA_TARG", &ra, comment, &status);
+ FITS_read_key(outfits, TDOUBLE, "DEC_TARG", &dec, comment, &status);
+
+ lim_ang = state_limb(pos, mjd, ra, dec, &zdist_dummy, &isday_dummy);
+
+ return(lim_ang);
+}
+
+void cf_min_limbang(fitsfile *outfits, double mjd_start, double mjd_end)
+{
+
+ int status = 0;
+ double lim_ang, min_lim;
+ double mjd;
+
+ mjd = mjd_start;
+ min_lim = cf_limbang_calc(outfits, mjd);
+
+#ifdef DEBUG
+ printf("mjd: %lf mjd_end = %lf minlim = %lf\n", mjd, mjd_end, min_lim);
+#endif
+ /* .0001 = 8.6 seconds */
+ while ( (mjd_end - mjd) > .0001 )
+ {
+ mjd = mjd + .0001;
+ lim_ang = cf_limbang_calc(outfits, mjd);
+#ifdef DEBUG
+ printf("mjd: %lf mjd_end = %lf minlim = %lf, limang = %lf\n",
+ mjd, mjd_end, min_lim, lim_ang);
+#endif
+ if (lim_ang < min_lim) min_lim = lim_ang;
+ }
+
+ mjd = mjd_end;
+ lim_ang = cf_limbang_calc(outfits, mjd);
+
+#ifdef DEBUG
+ printf("mjd: %lf mjd_end = %lf minlim = %lf, limang = %lf\n",
+ mjd, mjd_end, min_lim, lim_ang);
+#endif
+
+ if (lim_ang < min_lim) min_lim = lim_ang;
+
+#ifdef DEBUG
+ printf("mjd: %lf mjd_end = %lf minlim = %lf\n", mjd, mjd_end, min_lim);
+#endif
+
+ FITS_update_key(outfits, TDOUBLE, "MIN_LIMB", &min_lim, NULL, &status);
+
+}
diff --git a/src/fuv/Makefile.Linux.orig b/src/fuv/Makefile.Linux.orig
new file mode 100644
index 0000000..da60b24
--- /dev/null
+++ b/src/fuv/Makefile.Linux.orig
@@ -0,0 +1,75 @@
+
+CALFUSEDIR= ${PWD}/../..
+SHARED= -shared
+FITSVER= 2.470
+
+# Symbols for include directories
+FUSEINCLDIR= -I${CALFUSEDIR}/include
+
+# Symbols used for compiling
+CC= cc
+OPT= -g -Wall -DCFORTRAN -Dg77Fortran -Df2cFortran
+CFLAGS= ${OPT} ${FUSEINCLDIR}
+
+FUSEBINDIR= ${CALFUSEDIR}/bin
+FUSELIBDIR= -L${CALFUSEDIR}/lib
+FUSELIBS= -lcfitsio-${FITSVER} -lsla -lcf
+LIBS= -lc -lm -lnsl -ldl -lgfortran
+LDFLAGS= -Wl,-R${CALFUSEDIR}/lib,-R${CALFUSEDIR}/src/libcf
+
+# Symbols used for creating shared libraries
+
+BINS= cf_hist_init cf_ttag_init cf_convert_to_farf cf_remove_motions \
+ cf_assign_wavelength cf_screen_photons cf_flux_calibrate \
+ cf_extract_spectra cf_countmap cf_gainmap cf_bad_pixels
+
+all: ${BINS}
+ chmod g+w ${BINS}
+
+install: all
+ /bin/cp -p ${BINS} ${FUSEBINDIR}
+
+clean:
+ - /bin/rm -f ${BINS}
+
+distclean:
+ - /bin/rm -f ${BINS}
+ cd ../../bin; /bin/rm -f ${BINS} calfuse
+
+cf_hist_init:
+ ${CC} ${CFLAGS} -o cf_hist_init cf_hist_init.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+cf_ttag_init:
+ ${CC} ${CFLAGS} -o cf_ttag_init cf_ttag_init.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+cf_convert_to_farf:
+ ${CC} ${CFLAGS} -o cf_convert_to_farf cf_convert_to_farf.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+cf_remove_motions:
+ ${CC} ${CFLAGS} -o cf_remove_motions cf_remove_motions.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+cf_assign_wavelength:
+ ${CC} ${CFLAGS} -o cf_assign_wavelength \
+ cf_assign_wavelength.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+cf_screen_photons:
+ ${CC} ${CFLAGS} -o cf_screen_photons cf_screen_photons.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+cf_flux_calibrate:
+ ${CC} ${CFLAGS} -o cf_flux_calibrate cf_flux_calibrate.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+cf_extract_spectra:
+ ${CC} ${CFLAGS} -o cf_extract_spectra cf_extract_spectra.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+cf_countmap:
+ ${CC} ${CFLAGS} -o cf_countmap cf_countmap.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_gainmap:
+ ${CC} ${CFLAGS} -o cf_gainmap cf_gainmap.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_bad_pixels:
+ ${CC} ${CFLAGS} -o cf_bad_pixels cf_bad_pixels.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
diff --git a/src/fuv/Makefile.Linux64.orig b/src/fuv/Makefile.Linux64.orig
new file mode 100644
index 0000000..6fbead0
--- /dev/null
+++ b/src/fuv/Makefile.Linux64.orig
@@ -0,0 +1,74 @@
+
+CALFUSEDIR= ${PWD}/../..
+SHARED= -shared
+
+# Symbols for include directories
+FUSEINCLDIR= -I${CALFUSEDIR}/include
+
+# Symbols used for compiling
+CC= cc
+OPT= -g -Wall -DCFORTRAN -Dg77Fortran -Df2cFortran
+CFLAGS= ${OPT} ${FUSEINCLDIR}
+
+FUSEBINDIR= ${CALFUSEDIR}/bin
+FUSELIBDIR= -L${CALFUSEDIR}/lib
+FUSELIBS= -lsla -lcf
+LIBS= -lc -lm -lnsl -ldl -lgfortran -lcfitsio
+LDFLAGS= -Wl,-R${CALFUSEDIR}/lib,-R${CALFUSEDIR}/src/libcf
+
+# Symbols used for creating shared libraries
+
+BINS= cf_hist_init cf_ttag_init cf_convert_to_farf cf_remove_motions \
+ cf_assign_wavelength cf_screen_photons cf_flux_calibrate \
+ cf_extract_spectra cf_countmap cf_gainmap cf_bad_pixels
+
+all: ${BINS}
+ chmod g+w ${BINS}
+
+install: all
+ /bin/cp -p ${BINS} ${FUSEBINDIR}
+
+clean:
+ - /bin/rm -f ${BINS}
+
+distclean:
+ - /bin/rm -f ${BINS}
+ cd ../../bin; /bin/rm -f ${BINS} calfuse
+
+cf_hist_init:
+ ${CC} ${CFLAGS} -o cf_hist_init cf_hist_init.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+cf_ttag_init:
+ ${CC} ${CFLAGS} -o cf_ttag_init cf_ttag_init.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+cf_convert_to_farf:
+ ${CC} ${CFLAGS} -o cf_convert_to_farf cf_convert_to_farf.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+cf_remove_motions:
+ ${CC} ${CFLAGS} -o cf_remove_motions cf_remove_motions.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+cf_assign_wavelength:
+ ${CC} ${CFLAGS} -o cf_assign_wavelength \
+ cf_assign_wavelength.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+cf_screen_photons:
+ ${CC} ${CFLAGS} -o cf_screen_photons cf_screen_photons.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+cf_flux_calibrate:
+ ${CC} ${CFLAGS} -o cf_flux_calibrate cf_flux_calibrate.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+cf_extract_spectra:
+ ${CC} ${CFLAGS} -o cf_extract_spectra cf_extract_spectra.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+cf_countmap:
+ ${CC} ${CFLAGS} -o cf_countmap cf_countmap.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_gainmap:
+ ${CC} ${CFLAGS} -o cf_gainmap cf_gainmap.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_bad_pixels:
+ ${CC} ${CFLAGS} -o cf_bad_pixels cf_bad_pixels.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
diff --git a/src/fuv/Makefile.MacOSX.orig b/src/fuv/Makefile.MacOSX.orig
new file mode 100644
index 0000000..acbfaf7
--- /dev/null
+++ b/src/fuv/Makefile.MacOSX.orig
@@ -0,0 +1,76 @@
+
+CALFUSEDIR= ${PWD}/../..
+FITSVER= 2.470
+MACOSX_DEPLOYMENT_TARGET= 10.2
+
+# Symbols for include directories
+FUSEINCLDIR= -I${CALFUSEDIR}/include
+
+# Symbols used for compiling
+CC= cc
+OPT= -O3 -Wall -DCFORTRAN -Dg77Fortran -Df2cFortran
+CFLAGS= ${OPT} ${FUSEINCLDIR}
+
+FUSEBINDIR= ${CALFUSEDIR}/bin
+FUSELIBDIR= -L${CALFUSEDIR}/lib
+# FUSELIBS= -lcfitsio-${FITSVER} -lsla -lcf
+FUSELIBS= -lcfitsio -lsla -lcf
+LIBS= -lc -lm -ldl -L/sw/lib/ -lgfortran
+
+BINS= cf_hist_init cf_ttag_init cf_convert_to_farf cf_remove_motions \
+ cf_assign_wavelength cf_screen_photons cf_flux_calibrate \
+ cf_extract_spectra cf_countmap cf_gainmap cf_bad_pixels
+
+all: ${BINS}
+ chmod g+w ${BINS}
+
+install:
+ MACOSX_DEPLOYMENT_TARGET="${MACOSX_DEPLOYMENT_TARGET}"; \
+ export MACOSX_DEPLOYMENT_TARGET; \
+ make all
+ /bin/cp -p ${BINS} ${FUSEBINDIR}
+
+clean:
+ - /bin/rm -f ${BINS}
+
+distclean:
+ - /bin/rm -f ${BINS}
+ cd ../../bin; /bin/rm -f ${BINS} calfuse
+
+cf_hist_init:
+ ${CC} ${CFLAGS} -o cf_hist_init cf_hist_init.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS}
+cf_ttag_init:
+ ${CC} ${CFLAGS} -o cf_ttag_init cf_ttag_init.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS}
+cf_convert_to_farf:
+ ${CC} ${CFLAGS} -o cf_convert_to_farf cf_convert_to_farf.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS}
+cf_remove_motions:
+ ${CC} ${CFLAGS} -o cf_remove_motions cf_remove_motions.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS}
+cf_assign_wavelength:
+ ${CC} ${CFLAGS} -o cf_assign_wavelength \
+ cf_assign_wavelength.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS}
+cf_screen_photons:
+ ${CC} ${CFLAGS} -o cf_screen_photons cf_screen_photons.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS}
+cf_flux_calibrate:
+ ${CC} ${CFLAGS} -o cf_flux_calibrate cf_flux_calibrate.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS}
+cf_extract_spectra:
+ ${CC} ${CFLAGS} -o cf_extract_spectra cf_extract_spectra.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS}
+cf_countmap:
+ ${CC} ${CFLAGS} -o cf_countmap cf_countmap.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS}
+
+cf_gainmap:
+ ${CC} ${CFLAGS} -o cf_gainmap cf_gainmap.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS}
+
+cf_bad_pixels:
+ ${CC} ${CFLAGS} -o cf_bad_pixels cf_bad_pixels.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS}
+
diff --git a/src/fuv/Makefile.Solaris.orig b/src/fuv/Makefile.Solaris.orig
new file mode 100644
index 0000000..528e6bc
--- /dev/null
+++ b/src/fuv/Makefile.Solaris.orig
@@ -0,0 +1,75 @@
+
+CALFUSEDIR= ${PWD}/../..
+SHARED= -G
+FITSVER= 2.470
+
+# Symbols for include directories
+FUSEINCLDIR= -I${CALFUSEDIR}/include
+
+# Symbols used for compiling
+CC= cc
+OPT= -O -DCFORTRAN -KPIC
+CFLAGS= ${OPT} ${FUSEINCLDIR}
+
+FUSEBINDIR= ${CALFUSEDIR}/bin
+FUSELIBDIR= -L${CALFUSEDIR}/lib
+FUSELIBS= -lcfitsio-${FITSVER} -lsla -lcf
+LIBS= -lc -lm -lnsl -ldl -lsocket -lsunmath
+LDFLAGS= -Wl,-R${CALFUSEDIR}/lib,-R${CALFUSEDIR}/src/libcf
+
+# Symbols used for creating shared libraries
+
+BINS= cf_hist_init cf_ttag_init cf_convert_to_farf cf_remove_motions \
+ cf_assign_wavelength cf_screen_photons cf_flux_calibrate \
+ cf_extract_spectra cf_countmap cf_gainmap cf_bad_pixels
+
+all: ${BINS}
+ chmod g+w ${BINS}
+
+install: all
+ /bin/cp -p ${BINS} ${FUSEBINDIR}
+
+clean:
+ - /bin/rm -f ${BINS}
+
+distclean:
+ - /bin/rm -f ${BINS}
+ cd ../../bin; /bin/rm -f ${BINS} calfuse
+
+cf_hist_init:
+ ${CC} ${CFLAGS} -o cf_hist_init cf_hist_init.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+cf_ttag_init:
+ ${CC} ${CFLAGS} -o cf_ttag_init cf_ttag_init.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+cf_convert_to_farf:
+ ${CC} ${CFLAGS} -o cf_convert_to_farf cf_convert_to_farf.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+cf_remove_motions:
+ ${CC} ${CFLAGS} -o cf_remove_motions cf_remove_motions.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+cf_assign_wavelength:
+ ${CC} ${CFLAGS} -o cf_assign_wavelength \
+ cf_assign_wavelength.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+cf_screen_photons:
+ ${CC} ${CFLAGS} -o cf_screen_photons cf_screen_photons.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+cf_flux_calibrate:
+ ${CC} ${CFLAGS} -o cf_flux_calibrate cf_flux_calibrate.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+cf_extract_spectra:
+ ${CC} ${CFLAGS} -o cf_extract_spectra cf_extract_spectra.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+cf_countmap:
+ ${CC} ${CFLAGS} -o cf_countmap cf_countmap.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_gainmap:
+ ${CC} ${CFLAGS} -o cf_gainmap cf_gainmap.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_bad_pixels:
+ ${CC} ${CFLAGS} -o cf_bad_pixels cf_bad_pixels.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
diff --git a/src/fuv/Makefile.orig.orig b/src/fuv/Makefile.orig.orig
new file mode 100644
index 0000000..528e6bc
--- /dev/null
+++ b/src/fuv/Makefile.orig.orig
@@ -0,0 +1,75 @@
+
+CALFUSEDIR= ${PWD}/../..
+SHARED= -G
+FITSVER= 2.470
+
+# Symbols for include directories
+FUSEINCLDIR= -I${CALFUSEDIR}/include
+
+# Symbols used for compiling
+CC= cc
+OPT= -O -DCFORTRAN -KPIC
+CFLAGS= ${OPT} ${FUSEINCLDIR}
+
+FUSEBINDIR= ${CALFUSEDIR}/bin
+FUSELIBDIR= -L${CALFUSEDIR}/lib
+FUSELIBS= -lcfitsio-${FITSVER} -lsla -lcf
+LIBS= -lc -lm -lnsl -ldl -lsocket -lsunmath
+LDFLAGS= -Wl,-R${CALFUSEDIR}/lib,-R${CALFUSEDIR}/src/libcf
+
+# Symbols used for creating shared libraries
+
+BINS= cf_hist_init cf_ttag_init cf_convert_to_farf cf_remove_motions \
+ cf_assign_wavelength cf_screen_photons cf_flux_calibrate \
+ cf_extract_spectra cf_countmap cf_gainmap cf_bad_pixels
+
+all: ${BINS}
+ chmod g+w ${BINS}
+
+install: all
+ /bin/cp -p ${BINS} ${FUSEBINDIR}
+
+clean:
+ - /bin/rm -f ${BINS}
+
+distclean:
+ - /bin/rm -f ${BINS}
+ cd ../../bin; /bin/rm -f ${BINS} calfuse
+
+cf_hist_init:
+ ${CC} ${CFLAGS} -o cf_hist_init cf_hist_init.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+cf_ttag_init:
+ ${CC} ${CFLAGS} -o cf_ttag_init cf_ttag_init.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+cf_convert_to_farf:
+ ${CC} ${CFLAGS} -o cf_convert_to_farf cf_convert_to_farf.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+cf_remove_motions:
+ ${CC} ${CFLAGS} -o cf_remove_motions cf_remove_motions.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+cf_assign_wavelength:
+ ${CC} ${CFLAGS} -o cf_assign_wavelength \
+ cf_assign_wavelength.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+cf_screen_photons:
+ ${CC} ${CFLAGS} -o cf_screen_photons cf_screen_photons.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+cf_flux_calibrate:
+ ${CC} ${CFLAGS} -o cf_flux_calibrate cf_flux_calibrate.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+cf_extract_spectra:
+ ${CC} ${CFLAGS} -o cf_extract_spectra cf_extract_spectra.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+cf_countmap:
+ ${CC} ${CFLAGS} -o cf_countmap cf_countmap.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_gainmap:
+ ${CC} ${CFLAGS} -o cf_gainmap cf_gainmap.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+cf_bad_pixels:
+ ${CC} ${CFLAGS} -o cf_bad_pixels cf_bad_pixels.c \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
diff --git a/src/fuv/cf_assign_wavelength.c b/src/fuv/cf_assign_wavelength.c
new file mode 100644
index 0000000..d84c7a0
--- /dev/null
+++ b/src/fuv/cf_assign_wavelength.c
@@ -0,0 +1,178 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_assign_wavelength options intermediate_data_file
+ *
+ * Description: Assign a wavelength to each photon, correcting for
+ * spacecraft motion and instrumental astigmatism.
+ * The final wavelength scale is heliocentric.
+ *
+ * By default all corrections are performed. Command-line
+ * options allow one or more corrections to be omitted.
+ *
+ * Arguments: input_file FARF-corrected intermediate data file
+ *
+ * Calibration files: ASTG_CAL, WAVE_CAL
+ *
+ * Returns: 0 on successful completion
+ *
+ * Calls: cf_astigmatism, cf_dispersion, cf_doppler_and_heliocentric
+ *
+ * History: 11/05/02 1.1 peb Begin work
+ * 12/16/02 1.2 wvd Install subroutines.
+ * 02/12/03 1.3 wvd Change ORBITAL_VELOCITY to ORBITAL_VEL
+ * 03/10/03 1.4 peb Added verbose_level, changed channel to
+ * char *, and added unistd.h for getopt
+ * portability
+ * 03/12/03 1.5 wvd If lambda[k] is undefined,
+ * set channel[k] = 0 in IDF
+ * 03/23/03 1.6 wvd If -w option is set, write astigmatism-
+ * corrected X values to IDF.
+ * 06/11/03 1.7 wvd Pass datatype to cf_read_col and
+ * cf_write_col.
+ * 08/25/03 1.8 wvd Change coltype from string to int in
+ * cf_read_col and cf_write_col.
+ * 09/16/03 1.9 wvd Write comment lines to IDF header if
+ * -w option is requested.
+ * 10/31/03 1.10 wvd Change channel to unsigned char.
+ * 12/03/03 1.11 wvd Initialize astig_return to 1.
+ * 04/06/04 1.12 bjg Function returns EXIT_SUCCESS
+ * Fix option[]
+ * 06/21/04 1.13 wvd If -w flag is set, run the program
+ * even if it's been run before.
+ * 05/20/05 1.14 wvd Clean up i/o.
+ * 05/15/06 1.15 wvd Divide cf_astigmatism_and_dispersion
+ * into two routines. Note that wave-
+ * length calibration is performed even
+ * if astigmatism correction is not.
+ *
+ ****************************************************************************/
+
+#include <unistd.h>
+#include <stdlib.h>
+#include "calfuse.h"
+
+int
+main(int argc, char *argv[])
+{
+ char CF_PRGM_ID[] = "cf_assign_wavelength";
+ char CF_VER_NUM[] = "1.15";
+
+ char comment[FLEN_CARD], datestr[FLEN_CARD];
+ unsigned char *channel=NULL;
+ int astig_corr=1, doppler_corr=1, status=0, optc, timeref;
+ int astig_return=1, wavecal = FALSE;
+ long nevents, nseconds;
+ float *time=NULL, *x=NULL, *y=NULL, *lambda=NULL, *timeline=NULL;
+ float *velocity=NULL;
+ fitsfile *header;
+
+ char opts[] = "hadwv:";
+ char usage[] =
+ "Usage:\n"
+ " cf_assign_wavelength [-hadw] [-v level] idf_file\n";
+ char option[] =
+ "Options:\n"
+ " -h: this help message\n"
+ " -v: verbose mode (default is 1; 0 is silent)\n"
+ " -a: no astigmatism correction\n"
+ " -d: no doppler correction\n"
+ " -w: write astigmatism-corrected X values to IDF\n";
+
+ verbose_level = 1;
+
+ while ((optc = getopt(argc, argv, opts)) != -1) {
+ switch(optc) {
+
+ case 'h':
+ printf("%s\n%s", usage, option);
+ return 0;
+ case 'v':
+ verbose_level = atoi(optarg);
+ break;
+ case 'a':
+ astig_corr = 0;
+ break;
+ case 'd':
+ doppler_corr = 0;
+ break;
+ case 'w':
+ wavecal = TRUE;
+ break;
+ }
+ }
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ if (argc <= optind) {
+ printf("%s", usage);
+ cf_if_error("Incorrect number of program arguments");
+ }
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ FITS_open_file(&header, argv[optind], READWRITE, &status);
+
+ FITS_movabs_hdu(header, 2, NULL, &status);
+ nevents = cf_read_col(header, TFLOAT, "TIME", (void **) &time);
+ nevents = cf_read_col(header, TFLOAT, "X", (void **) &x);
+ nevents = cf_read_col(header, TFLOAT, "Y", (void **) &y);
+ nevents = cf_read_col(header, TBYTE, "CHANNEL",(void **) &channel);
+ nevents = cf_read_col(header, TFLOAT, "LAMBDA", (void **) &lambda);
+
+ FITS_movabs_hdu(header, 4, NULL, &status);
+ nseconds = cf_read_col(header, TFLOAT, "TIME", (void **) &timeline);
+ nseconds = cf_read_col(header, TFLOAT, "ORBITAL_VEL", (void **) &velocity);
+ FITS_movabs_hdu(header, 1, NULL, &status);
+
+ if (wavecal) {
+ FITS_update_key(header, TSTRING, "WAVE_COR", "PERFORM", NULL, &status);
+ FITS_update_key(header, TSTRING, "DOPP_COR", "PERFORM", NULL, &status);
+ }
+
+ /* Correct X coordinate for 2-D astigmatism. */
+ if (astig_corr)
+ astig_return = cf_astigmatism(header, nevents, x, y, channel);
+
+ /* Assign wavelength to each photon event according to channel and X */
+ cf_dispersion(header, nevents, x, channel, lambda);
+
+ /* Correct for spacecraft motion and shift to heliocentric wavelength scale. */
+ if (doppler_corr)
+ cf_doppler_and_heliocentric(header, nevents, time, channel,
+ lambda, nseconds, timeline, velocity);
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+ FITS_movabs_hdu(header, 2, NULL, &status);
+ cf_write_col(header, TBYTE, "CHANNEL", (void *) channel, nevents);
+ cf_write_col(header, TFLOAT, "LAMBDA", (void *) lambda, nevents);
+
+ /* If -w option is requested and astigmatism correction was applied,
+ write astigmatism-corrected X array to IDF. */
+ if (wavecal && !astig_return) {
+ cf_write_col(header, TFLOAT, "X", (void *) x, nevents);
+ FITS_movabs_hdu(header, 1, NULL, &status);
+ sprintf(comment, "Writing astigmatism-corrected X array to IDF.");
+ cf_if_warning(comment);
+ FITS_write_comment(header, " ", &status);
+ FITS_write_comment(header, comment, &status);
+ fits_get_system_time(datestr, &timeref, &status);
+ sprintf(comment, "CalFUSE v%s %.10s", CALFUSE_VERSION, datestr);
+ FITS_write_comment(header, comment, &status);
+ FITS_write_comment(header, " ", &status);
+ }
+
+ FITS_close_file(header, &status);
+
+ free(velocity);
+ free(timeline);
+ free(lambda);
+ free(channel);
+ free(y);
+ free(x);
+ free(time);
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+ return EXIT_SUCCESS;
+}
diff --git a/src/fuv/cf_bad_pixels.c b/src/fuv/cf_bad_pixels.c
new file mode 100644
index 0000000..a10ed20
--- /dev/null
+++ b/src/fuv/cf_bad_pixels.c
@@ -0,0 +1,1001 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_bad_pixels options input_file
+ *
+ * Description: Determines a map of the bad pixels on the detector, after
+ * correction for image motions during the observation. The
+ * procedure works by generating a series of pseudo photons
+ * corresponding to bad pixels within the area of the detector
+ * seen by the target aperture. This list of pseudo photons is
+ * repeated for each second of the observation where the data
+ * is expected to be acceptable (i.e., it excludes times of
+ * bursts, SAA passages, etc). The list is then run through
+ * various routines in the pipeline which correct for photon
+ * motions. A map is then generated from the final photon
+ * list.
+ *
+ * Arguments: input_file FARF-corrected intermediate data
+ * file
+ * Calibration files: QUAL_CAL
+ *
+ * Returns: file containing the bad pixel map
+ *
+ *
+ * History: 04/08/03 1.0 rdr Begin work
+ * 04/30/03 1.1 wvd Install
+ * 05/22/03 1.2 wvd Modify call to cf_set_photon_flags
+ * 05/28/03 1.3 rdr Made adjustments for HIST data and
+ * correct some bugs
+ * 05/04/03 1.4 wvd Reset JITR_COR and FLAG_COR to PERFORM.
+ * Pass weights to cf_set_photon_flags.
+ * 09/06/03 1.5 rdr Incorporate tscreen flag.
+ * 06/11/03 1.6 wvd Pass datatype to cf_read_col and
+ * cf_write_col.
+ * 08/22/03 1.7 wvd Change channel array to unsigned char.
+ * Delete GTI from call to
+ * cf_satellite_jitter.
+ * 08/25/03 1.8 wvd Change coltype from string to int in
+ * cf_read_col.
+ * 10/17/03 1.9 wvd If EXPTIME = 0, exit without
+ * generating a bad-pixel file.
+ * 11/05/03 1.10 wvd Change chan_pix to unsigned char
+ * 11/05/03 1.11 wvd Use fits_create_tbl alone to make
+ * binary table extension.
+ * 12/01/03 1.12 bjg Update FILENAME, FILETYPE and IDF_FILE
+ * keywords.
+ * 12/01/03 1.13 bjg Minor changes.
+ * 12/21/03 1.14 wvd Remove underscore from idf and bpm
+ * filenames.
+ * 02/24/04 1.15 rdr change maximum size of the output
+ * arrays in cf_combine_pothole_data
+ * 03/03/04 1.16 rdr make sure that lif_cnt and sic_cnt arrays
+ * are non-zero
+ * 04/06/04 1.19 bjg Include ctype.h and strings.h
+ * Change formats to match arg types in
+ * printf
+ * Change ( a<b & a>c ) to ((a<b)&&(a>c))
+ * in cf_combine_pothole_data
+ * Create potholes from HIST FILL_DATA
+ * 06/07/04 1.20 wvd Add exp_jitr to cf_satellite_jitter(),
+ * delete timeline from cf_apply_filters.
+ * 07/21/04 1.21 wvd Delete unused variable nmax in
+ * cf_generate_pseudo_photons
+ * 10/29/04 1.22 bjg Added check for selected potholes that
+ * fall out the extraction window
+ * 12/02/04 1.23 wvd If a processing step was skipped for
+ * the data file, skip it also for the
+ * bpm file.
+ * 01/27/05 1.24 wvd Ignore LIMB, SAA, and BRST when
+ * determining good times for HIST data.
+ * 02/01/05 1.25 wvd In cf_generate_pseudo_photons, pad
+ * extraction windows by ten pixels
+ * when making pothole list.
+ * In cf_combine_pothole_data, toss any
+ * potholes that drift out of extraction
+ * window. Call cf_get_extraction_limits
+ * only when the aperture changes.
+ * 02/17/05 1.26 wvd Increase estimated size of output
+ * pixel arrays (nmax) by 20%.
+ * Add additional diagnostic output.
+ * 03/15/05 1.27 wvd Replace cf_get_extraction_limits with
+ * cf_extraction_limits
+ * 03/16/05 1.28 wvd Pass srctype to cf_extraction_limits.
+ * 03/22/05 1.29 wvd Change TIME_SUNRISE and TIME_SUNSET
+ * from floats to shorts.
+ * 03/22/05 1.30 wvd In cf_combine_pothole_data, use fabs()
+ * when looking for changes in the time
+ * array.
+ * 04/12/05 1.31 wvd Add -n flag, which forces creation
+ * of night-only BPM file. Its argument
+ * is the name of the output BPM file.
+ * This file name is NOT written to the
+ * IDF file header.
+ * 06/03/05 1.32 wvd Include math.h
+ * 11/25/05 1.33 wvd Use cf_x2lambda and cf_get_potholes
+ * rather than writing new routines here.
+ * Don't add random numbers to output
+ * pixel coordinates.
+ * 05/15/06 1.34 wvd Divide cf_astigmatism_and_dispersion
+ * into two routines. Note that wave-
+ * length calibration is performed even
+ * if astigmatism correction is not.
+ * Add ASTG_COR to list of updated
+ * keywords.
+ * 06/13/06 1.35 wvd In cf_combine_pothole_data,
+ * initialize nfill to 0 before each
+ * iteration and ignore bad pixels that
+ * lie outside of the extraction window.
+ * 03/20/07 1.36 wvd In cf_combine_pothole_data, if the
+ * entire dead spot falls outside of the
+ * aperture, stop and move on to the
+ * next one.
+ * 03/21/07 1.37 wvd Replace "break" with "continue" in
+ * cf_combine_pothole_data.
+ * 04/03/07 1.38 wvd Scale nmax by 1.5. Call cf_error_init
+ * after each call to cf_extraction_limits.
+ * Make CF_PRGM_ID and CF_VER_NUM static
+ * variables.
+ * 04/03/07 1.39 bot In cf_generate_pseduo_photons, l.198
+ * and l.219 added a test on LOCATION_SHLD
+ * for FILL DATA.
+ * 07/18/08 1.40 wvd If EXP_STAT = 2, target is bright
+ * earth/airglow. Mask out limb-angle flag.
+ *
+ ****************************************************************************/
+
+#include <strings.h>
+#include <string.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <math.h>
+#include "calfuse.h"
+
+static char CF_PRGM_ID[] = "cf_bad_pixels";
+static char CF_VER_NUM[] = "1.40";
+
+
+/****************************************************************************
+ *
+ * CF_GENERATE_PSEUDO_PHOTONS
+ *
+ * Procedure to generate an array of pseudo photons to represent the
+ * locations of the detector potholes
+ *
+ ****************************************************************************/
+
+int cf_generate_pseudo_photons(fitsfile *header, long ngood, long *good_index,
+ float *timeline, unsigned char *statflag, float *lif_cnt,
+ float *sic_cnt, long *nevents, float **time, float **weight,
+ float **x, float **y, unsigned char **channel, float **rx,
+ float **ry, unsigned char **timeflag, unsigned char **loc_flag) {
+
+ char instmode[FLEN_CARD] ;
+ long nevts, npot, nfill=0, npot_sel;
+ int *bpndx, npot2, status=0, hdutype ;
+ int srctype, ap[2], bymax, bymin, pad=10 ;
+ short *ylow, *yhigh;
+ long npts, i, j, k, xndx, num, num_tot, ndx, tndx ;
+ float *xpot, *ypot, *rxpot, *rypot ;
+ float *xpot2, *ypot2, *rxpot2, *rypot2 ;
+ float *xval, *yval, *rxval, *ryval, *xout, *yout, *rxout, *ryout ;
+ float *time_out, *weight_out, tval, ctot_lif, ctot_sic ;
+ float wval_lif, wval_sic ;
+ short binx, biny, xmin, xmax;
+ unsigned char *chan, *chan_out;
+ unsigned char *tflag_out, tflag_val ;
+ char * hdu2_loc_flgs;
+ float * hdu2_xfarf, * hdu2_yfarf;
+
+
+ cf_verbose(3, "Generating pseudo-photons") ;
+
+ /* read the instrument mode for the data */
+ FITS_movabs_hdu(header, 1, &hdutype, &status);
+ FITS_read_key(header, TSTRING, "INSTMODE", instmode, NULL, &status) ;
+ FITS_read_key(header, TSHORT, "SPECBINX", &binx, NULL, &status) ;
+ FITS_read_key(header, TSHORT, "SPECBINY", &biny, NULL, &status) ;
+
+ /* read the header and determine the target apertures for the exposure */
+ srctype = cf_source_aper(header, ap) ;
+ cf_verbose(3,"Target apertures = %d and %d ",ap[0],ap[1]) ;
+
+ /* read in the pothole positions */
+ npot2 = cf_get_potholes(header, &xpot2, &ypot2, &rxpot2, &rypot2) ;
+ cf_verbose(3, "number of potholes found = %d ",npot2) ;
+
+ if (!(strncasecmp(instmode,"HIST",4))) {
+ FITS_movabs_hdu(header, 2, &hdutype, &status);
+ nevts=cf_read_col(header,TBYTE,"LOC_FLGS",(void **) &hdu2_loc_flgs);
+ nevts=cf_read_col(header,TFLOAT,"XFARF",(void **) &hdu2_xfarf);
+ nevts=cf_read_col(header,TFLOAT,"YFARF",(void **) &hdu2_yfarf);
+ for (j=0;j<nevts;++j) {
+ if (!((hdu2_loc_flgs[j] & LOCATION_FILL) == 0) &&
+ ((hdu2_loc_flgs[j] & LOCATION_SHLD) == 0)) ++nfill;
+ }
+ cf_verbose(3, "number of FILL DATA potholes found = %d ",nfill) ;
+ npot=npot2+nfill;
+
+ xpot=(float *) cf_calloc(npot, sizeof(float)) ;
+ ypot=(float *) cf_calloc(npot, sizeof(float)) ;
+ rxpot=(float *) cf_calloc(npot, sizeof(float)) ;
+ rypot=(float *) cf_calloc(npot, sizeof(float)) ;
+
+ for (j=0;j<npot2;++j){
+ xpot[j]=xpot2[j];
+ ypot[j]=ypot2[j];
+ rxpot[j]=rxpot2[j];
+ rypot[j]=rypot2[j];
+ }
+
+ k=npot2;
+
+ for (j=0;j<nevts;++j){
+ if (!((hdu2_loc_flgs[j] & LOCATION_FILL) == 0) &&
+ ((hdu2_loc_flgs[j] & LOCATION_SHLD) == 0)) {
+
+ xpot[k]=hdu2_xfarf[j];
+ ypot[k]=hdu2_yfarf[j];
+ rxpot[k]=binx;
+ rypot[k]=biny;
+ k++;
+
+ }
+ }
+ free(hdu2_loc_flgs) ;
+ free(hdu2_xfarf) ;
+ free(hdu2_yfarf) ;
+ }
+ else {
+ npot=npot2;
+ xpot=xpot2;
+ ypot=ypot2;
+ rxpot=rxpot2;
+ rypot=rypot2;
+ }
+
+ /* allocate space to hold the pothole list (for 1 second of data) */
+ xval = (float *) cf_calloc(npot, sizeof(float)) ;
+ yval = (float *) cf_calloc(npot, sizeof(float)) ;
+ rxval = (float *) cf_calloc(npot, sizeof(float)) ;
+ ryval = (float *) cf_calloc(npot, sizeof(float)) ;
+ chan = (unsigned char *) cf_calloc(npot, sizeof(char)) ;
+ num=-1 ;
+
+
+ cf_verbose(3, "For initial pothole selection, "
+ "we pad extraction windows by %d pixels in Y.", pad);
+
+ /* do each aperture separately */
+
+ for (j=0 ; j<2; j++) {
+
+ /* get the extraction limits for the relevant apertures */
+ npts = cf_extraction_limits(header, ap[j], srctype,
+ &ylow, &yhigh, &xmin, &xmax) ;
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+ /* select potholes located within the extraction window */
+ bpndx = (int *) cf_calloc(npot, sizeof(int)) ;
+ npot_sel = -1 ;
+ for (i=0; i<npot; i++) {
+ xndx = (int) (xpot[i] + 0.5) ;
+ bymax = (int) (ypot[i]+rypot[i]+0.5) ;
+ bymin = (int) (ypot[i]-rypot[i]) ;
+ if ( bymax >= ylow[xndx] - pad && bymin <= yhigh[xndx] + pad ) {
+ npot_sel += 1 ;
+ bpndx[npot_sel] = i ;
+ cf_verbose(3, "pothole %d selected: x=%d, y=%d, rx=%d, ry=%d ", i,
+ cf_nint(xpot[i]),cf_nint(ypot[i]),cf_nint(rxpot[i]),cf_nint(rypot[i]));
+ }
+ }
+
+ /* convert npot_sel from an array index to a number of potholes selected */
+ npot_sel++ ;
+ cf_verbose(3, "number of potholes selected for ap %d = %d ",
+ ap[j], npot_sel) ;
+
+ /* put the locations into the output arrays */
+ for (i=0; i<npot_sel; i++) {
+ num+=1 ;
+ ndx = bpndx[i] ;
+ xval[num] = xpot[ndx] ;
+ yval[num] = ypot[ndx] ;
+ chan[num] = ap[j] ;
+ rxval[num] = rxpot[ndx] ;
+ ryval[num] = rypot[ndx] ;
+ }
+ }
+
+ /* convert num from an index to the number of potholes found */
+ num+=1 ;
+ cf_verbose(3, "total number of potholes found = %d ",num) ;
+
+ /* generate a timeline with only the good times included */
+ num_tot = num * ngood ;
+
+ /* copy the non-zero values into the output arrays */
+ time_out = (float *) cf_calloc(num_tot, sizeof(float)) ;
+ weight_out = (float *) cf_calloc(num_tot, sizeof(float)) ;
+ xout = (float *) cf_calloc(num_tot, sizeof(float)) ;
+ yout = (float *) cf_calloc(num_tot, sizeof(float)) ;
+ rxout = (float *) cf_calloc(num_tot, sizeof(float)) ;
+ ryout = (float *) cf_calloc(num_tot, sizeof(float)) ;
+ chan_out = (unsigned char *) cf_calloc(num_tot, sizeof(char)) ;
+ tflag_out = (unsigned char *) cf_calloc(num_tot, sizeof(char)) ;
+ *loc_flag = (unsigned char *) cf_calloc(num_tot, sizeof(char)) ;
+
+ tndx=-1 ;
+ ctot_lif = 0. ;
+ ctot_sic = 0. ;
+ for (j=0; j<ngood; j++) {
+ ndx=good_index[j] ;
+ tval = timeline[ndx] ;
+ ctot_lif += lif_cnt[ndx] ;
+ ctot_sic += sic_cnt[ndx] ;
+ wval_lif = lif_cnt[ndx] ;
+ wval_sic = sic_cnt[ndx] ;
+ tflag_val = statflag[ndx] ;
+ for (i=0; i<num; i++) {
+ tndx += 1;
+ if (tndx > num_tot -1) {
+ cf_verbose(2, "overflow tndx while filling pothole array ") ;
+ tndx= num_tot-1 ; }
+ time_out[tndx] = tval ;
+ if (chan[i] < 4) weight_out[tndx] = wval_lif ;
+ else weight_out[tndx] = wval_sic ;
+ xout[tndx] = xval[i] ;
+ yout[tndx] = yval[i] ;
+ rxout[tndx] = rxval[i] ;
+ ryout[tndx] = ryval[i] ;
+ chan_out[tndx] = chan[i] ;
+ tflag_out[tndx] = tflag_val ;
+ }
+ }
+
+ /* normalize the weights for TTAG data and set to 1 for HIST data*/
+ if (!strncmp(instmode,"T",1))
+ for (i=0; i<num_tot; i++) {
+ if (chan_out[i] < 4) weight_out[i] /= ctot_lif ;
+ else weight_out[i] /= ctot_sic ;
+ }
+ else for (i=0; i<num_tot; i++) weight_out[i] = 1. ;
+
+ /* assign pointers to output variables */
+ *x = xout ;
+ *y = yout ;
+ *rx = rxout ;
+ *ry = ryout ;
+ *channel = chan_out ;
+ *timeflag = tflag_out ;
+ *nevents = num_tot ;
+ *weight = weight_out ;
+ *time = time_out ;
+
+ free(xval) ;
+ free(yval) ;
+ free(rxval) ;
+ free(ryval) ;
+ free(chan) ;
+ free(bpndx) ;
+
+ return 0;
+
+}
+
+
+/*******************************************************************************
+ *
+ * CF_CORRECT_DOPPLER_MOTIONS
+ *
+ * procedure to correct the pothole centroid positions for doppler effects
+ *
+ ******************************************************************************/
+
+ int cf_correct_doppler_motions(fitsfile *header, long nevents, float *time,
+ float *x, unsigned char *channel, long nseconds, float *timeline,
+ float *velocity)
+{
+ char wave_file[FLEN_FILENAME];
+ float *wavelength, v_helio, vel, lam, dlam, dx;
+ fitsfile *wavefits;
+ int status=0, anynull;
+ int fcol, targ_ap[2], ap, ii;
+ long i, k, ndx ;
+
+ /* get the information needed in the analysis */
+
+ /* first determine the target apertures */
+ cf_source_aper(header, targ_ap) ;
+ cf_verbose(3, "target apertures = %d and %d ",targ_ap[0], targ_ap[1]) ;
+
+ /* read in the wavelength calibration */
+ FITS_read_key(header, TSTRING, "WAVE_CAL", wave_file, NULL, &status);
+ FITS_open_file(&wavefits, cf_cal_file(wave_file), READONLY, &status);
+ wavelength = (float *) cf_calloc(NXMAX, sizeof(float));
+
+ /* read the heliocentric velocity from the header */
+ FITS_read_key(header, TFLOAT, "V_HELIO", &v_helio, NULL, &status);
+ cf_verbose(3, "heliocentric velocity = %f ",v_helio) ;
+
+ /* Go through each target aperture */
+ for (i = 0; i < 2; i++) {
+ ap = targ_ap[i] ;
+
+ FITS_movabs_hdu(wavefits, ap+1, NULL, &status);
+ FITS_get_colnum(wavefits, TRUE, "WAVELENGTH", &fcol, &status);
+ fits_read_col(wavefits, TFLOAT, fcol, 1, 1, NXMAX, NULL, wavelength,
+ &anynull, &status);
+
+ ndx = 0 ;
+ for (k = 0; k < nevents; k++)
+ if (channel[k] == ap) {
+ while (time[k] >= timeline[ndx] ) ndx++ ;
+ if (ndx > nseconds-1 ) ndx=nseconds-1 ;
+ ii = (int) (x[k] + 0.5);
+ if (ii >= 1 && ii < NXMAX) {
+ lam = wavelength[ii];
+ vel = velocity[ndx] + v_helio ;
+ dlam = vel * lam / C ;
+ dx = dlam / ( wavelength[ii] - wavelength[ii-1]) ;
+ x[k] += dx ;
+ if (vel > 100 || vel < -100 )
+ cf_if_warning ("at k=%ld, time=%f, lam=%f, vel=%f, "
+ "dlam=%f, dx=%f \n",
+ k, time[k], lam, vel, dlam, dx) ;
+ }
+ }
+
+ }
+ free(wavelength);
+ FITS_close_file(wavefits, &status);
+
+ return status;
+}
+
+
+/*******************************************************************************
+ *
+ * CF_COMBINE_POTHOLE_DATA
+ *
+ * procedure to combine the centroid data as a function of time with the
+ * pothole size information to generate a list of affected pixels on the
+ * detector
+ *
+ ******************************************************************************/
+
+ long cf_combine_pothole_data(fitsfile *header, long nevents, float *time,
+ float *weight, float *x, float *rx, float *y, float *ry,
+ unsigned char *channel, unsigned char *timeflag, float **xpix,
+ float **ypix, unsigned char **chan_pix, float **wt_pix) {
+
+ int srctype, expstat, aperture[2];
+ int npot, xndx, yndx, ap, nfill ;
+ short sxmin, sxmax, *ylow, *yhigh ;
+ int xdim1, ydim1, xmin1, xmax1, ymin1, ymax1 ;
+ int xminp, xmaxp, yminp, ymaxp ;
+ long i, j, k, l, m, num, numt ;
+ long nout, nmax, npts1, npts2, xdim, ydim, ndx, ndxp ;
+ float *xpixt, *ypixt, *wt_pixt, xmin, xmax, ymin, ymax ;
+ float *array1, *array2, wtot, wval, wmax ;
+ float xv2, yv2, rx2, ry2, pos, xval, yval ;
+ float rxp, ryp, xv, yv, time0 ;
+ unsigned char *chan_pixt;
+
+ int status=0;
+ char instmode[FLEN_VALUE];
+ unsigned char TEMPORAL_MASK;
+
+ cf_verbose(3, "Combining pothole data") ;
+
+ /*
+ * Read INSTMODE keyword. If in HIST mode, mask out
+ * LIMB, SAA, and BRST flags. TEMPORAL_DAY is the default.
+ */
+ TEMPORAL_MASK = TEMPORAL_DAY;
+ FITS_read_key(header, TSTRING, "INSTMODE", instmode, NULL, &status);
+ if (!strncmp(instmode, "HIST", 4)) {
+ TEMPORAL_MASK |= TEMPORAL_LIMB;
+ TEMPORAL_MASK |= TEMPORAL_SAA;
+ TEMPORAL_MASK |= TEMPORAL_BRST;
+ }
+ /*
+ * If EXP_STAT = 2, target is bright earth/airglow. Mast out limb-angle flag.
+ */
+ FITS_read_key(header, TINT, "EXP_STAT", &expstat, NULL, &status);
+ if (expstat == 2) TEMPORAL_MASK |= TEMPORAL_LIMB;
+
+ /* Read source type from header. */
+ srctype = cf_source_aper(header, aperture) ;
+
+ /* determine the number of potholes by looking at the number
+ of entries for time=time[0] */
+
+ time0 = time[0] ;
+ i = 1 ;
+ while (fabs((time[i] - time0)) < 0.5) i++ ;
+ cf_verbose(3, "Number of potholes found = %d ", npot = i) ;
+
+ nmax = 0;
+ /* estimate size of the array needed to store the data and open
+ arrays to contain it */
+ for (i=0; i<npot; i++) nmax += (60.+2.*rx[i]) * (30.+2*ry[i]) ;
+ nmax *= 1.5;
+ cf_verbose(3, "Estimated storage space needed for output array = %d ",
+ nmax) ;
+ xpixt = (float *) cf_calloc(nmax, sizeof(float)) ;
+ ypixt = (float *) cf_calloc(nmax, sizeof(float)) ;
+ wt_pixt = (float *) cf_calloc(nmax, sizeof(float)) ;
+ chan_pixt = (unsigned char *) cf_calloc(nmax, sizeof(char)) ;
+
+ /* initialize nout = total number of pixels affected by potholes */
+ nout = -1 ;
+
+ /* process each pothole individually */
+
+ ap = -1;
+ for (i=0; i<npot; i++) {
+
+ nfill = 0;
+
+ /* If channel has changed, get the new extraction limits */
+ if (ap != (int) channel[i]) {
+ ap = (int) channel[i] ;
+ (void) cf_extraction_limits(header, ap, srctype,
+ &ylow, &yhigh, &sxmin, &sxmax);
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ }
+
+ /* determine the range in X and Y for the pothole centroid positions */
+ xmin = 17000. ;
+ xmax = 0. ;
+ ymin = 1024. ;
+ ymax = 0. ;
+ numt = 0 ;
+ for (j=i; j<nevents ; j+= npot) {
+ numt ++ ;
+ if ((x[j] > xmax) && (x[j] < 16383)) xmax = x[j] ;
+ if ((x[j] < xmin) && (x[j] > 0)) xmin = x[j] ;
+ if ((y[j] > ymax) && (y[j] < 1023)) ymax = y[j] ;
+ if ((y[j] < ymin) && (y[j] > 0)) ymin = y[j] ;
+ }
+ cf_verbose(3,"For pothole %.1d, xmin=%.1d, "
+ "xmax=%.1d, ymin=%.1d, ymax=%.1d",
+ i, cf_nint(xmin), cf_nint(xmax), cf_nint(ymin), cf_nint(ymax)) ;
+
+ /* set up a 2D array which contains all of the movement in the pothole */
+ xdim = (long) (xmax - xmin + 1.5) ;
+ ydim = (long) (ymax - ymin + 1.5) ;
+ npts1 = xdim * ydim ;
+ cf_verbose(3, "Setting up array1: xdim=%d, ydim=%d, npts=%d ",
+ xdim, ydim, npts1) ;
+ array1 = (float *) cf_calloc(npts1, sizeof(float)) ;
+
+ /* Determine the 2D distribution of positions for the pothole */
+ num = 0 ;
+ for (j=i ; j<nevents ; j+= npot)
+ if (!(timeflag[j] & ~TEMPORAL_MASK)) {
+ num++ ;
+ xndx = cf_nint(x[j] - xmin) ;
+ if (xndx < 0 ) xndx = 0 ;
+ if (xndx > xdim-1) xndx = xdim-1 ;
+ yndx = cf_nint(y[j] - ymin) ;
+ if (yndx < 0 ) yndx = 0 ;
+ if (yndx > ydim-1) yndx = ydim-1 ;
+ ndx = xndx + yndx*xdim ;
+ if (ndx > npts1-1) ndx=npts1-1 ;
+ array1[ndx] += weight[j] ;
+ }
+
+ if (i == 0 ) cf_verbose(3, "%d good seconds out of a total of %d ",
+ num, numt) ;
+
+ wtot=0. ;
+ for(j=0; j<ydim; j++)
+ for (k=0; k<xdim; k++) wtot += array1[j*xdim + k] ;
+ cf_verbose(3, "wtot for array 1= %d", cf_nint(wtot)) ;
+
+ /* specify the size of the pothole */
+ rxp = rx[i] ;
+ rx2 = rxp * rxp ;
+ ryp = ry[i] ;
+ ry2 = ryp * ryp ;
+ cf_verbose(3,"pothole size: rx=%d, ry=%d ",cf_nint(rxp),cf_nint(ryp));
+
+ /* set up a target array to contain the image of the full pothole, after
+ reconstruction */
+ xmax1 = xmax + rxp ;
+ xmin1 = xmin - rxp ;
+ xdim1 = (int) (xmax1 - xmin1 + 1.5) ;
+ xndx = (long) x[i] ;
+ ymax1 = ymax + ryp ;
+ ymin1 = ymin - ryp ;
+ cf_verbose(3,"area of the detector covered by pothole :") ;
+ cf_verbose(3, " xmin=%d, xmax=%d, ymin=%d, ymax=%d ",
+ xmin1,xmax1,ymin1,ymax1) ;
+ cf_verbose(3,"extraction window extends from %d to %d ",ylow[xndx], yhigh[xndx]) ;
+
+ /* Include only pixels that lie within extraction window. */
+ if (ymin1 < ylow[xndx]) ymin1 = ylow[xndx];
+ if (ymax1 > yhigh[xndx]) ymax1 = yhigh[xndx];
+ ydim1 = (int) (ymax1 - ymin1 + 1.5) ;
+
+ /* If no pixels overlap the extraction window, skip to the next one. */
+ if (ydim1 <= 0) {
+ cf_verbose(3, "This pothole does not overlap the extraction window. We'll skip it.");
+ continue;
+ }
+
+ npts2 = xdim1 * ydim1 ;
+ cf_verbose(3, "setting up array2: xdim = %d, ydim = %d, npts2 = %d ",
+ xdim1, ydim1, npts2) ;
+ array2 = (float *) cf_calloc(npts2, sizeof(float)) ;
+
+ /* fill in array2
+ - scan all of the positions specified in array1 */
+ for (j=0 ; j<ydim ; j++)
+ for (k=0 ; k<xdim ; k++){
+ /* specify the properties of the pothole at this location */
+ xval = k + xmin ;
+ yval = j + ymin ;
+ ndx = j*xdim + k ;
+ if (ndx > npts1-1) ndx=npts1-1 ;
+ wval = array1[ndx] ;
+
+ if (wval > 0) {
+ /* set limits to the region of array2 affected by the pothole */
+ xminp = (int) (xval - rxp - xmin1 + 0.5) ;
+ xmaxp = (int) (xval + rxp - xmin1 + 0.5) ;
+ yminp = (int) (yval - ryp - ymin1 + 0.5) ;
+ ymaxp = (int) (yval + ryp - ymin1 + 0.5) ;
+ if (yminp < 0) yminp = 0 ;
+ if (ymaxp > ydim1-1) ymaxp = ydim1-1 ;
+ if (xminp < 0) xminp = 0 ;
+ if (xmaxp > xdim1-1) xmaxp = xdim1-1 ;
+
+ /* fill in the array for this pothole location */
+ for (l=yminp; l<=ymaxp; l++)
+ for (m=xminp; m <= xmaxp ; m++) {
+ ndxp = l * xdim1 + m ;
+ if (ndxp > npts2-1) ndxp = npts2 -1 ;
+ xv = m + xmin1 - xval ;
+ yv = l + ymin1 - yval ;
+ xv2= xv * xv ;
+ yv2 = yv * yv ;
+ pos = (xv2/rx2) + (yv2/ry2) ;
+ if ( pos <= 1) array2[ndxp] += wval ;
+ nfill++;
+ }
+ }
+ }
+
+ cf_verbose(3,"number of pixels affected by this pothole = %d ",nfill);
+
+ /* determine the maximum weights across the pothole map */
+ wmax=0. ;
+ for(j=0; j<ydim1; j++)
+ for (k=0; k<xdim1; k++) {
+ ndx = j * xdim1 + k ;
+ if (array2[ndx] > wmax) wmax = array2[ndx] ;
+ }
+ cf_verbose(3, "wmax for array2 = %d ", cf_nint(wmax)) ;
+
+ /* normalize the values of the affected pixels to the maximum and put
+ their locations into the output array */
+ for(j=0; j<ydim1; j++)
+ for (k=0; k<xdim1; k++) {
+ ndx = j * xdim1 + k ;
+ if (array2[ndx] > 0) {
+ if (nout < nmax-1) {
+ nout ++ ;
+ xpixt[nout] = k + xmin1;
+ ypixt[nout] = j + ymin1;
+ wt_pixt[nout] = array2[ndx]/wmax ;
+ chan_pixt[nout] = channel[i] ;
+ }
+ else {
+ cf_if_warning("Array overflow. Truncating pseudo-photon list.");
+ break;
+ }
+ }
+ }
+
+
+ cf_verbose(3, "%d points tabulated after processing pothole %d\n",nout,i);
+
+ free(array1) ;
+ free(array2) ;
+ }
+
+ /* assign output pointers */
+ *xpix = xpixt ;
+ *ypix = ypixt ;
+ *wt_pix = wt_pixt ;
+ *chan_pix = chan_pixt ;
+
+ cf_verbose(3, "Total number of pixels tabulated = %d ", nout) ;
+
+ return nout ;
+}
+
+
+/****************************************************************************/
+
+int
+main(int argc, char *argv[])
+{
+ unsigned char *timeflag=NULL, *statflag=NULL, *locflag=NULL;
+ unsigned char *loc_flag=NULL, *channel=NULL ;
+ int grating_motion=1, mirror_motion=1, fpa_pos=1;
+ int jitter=1, doppler_motion=1, astig=1, tscreen=1, night_only=FALSE;
+ int status=0, hdutype, optc;
+ long nevents, nseconds, i, nrows=1, npixels ;
+ long ngood, *good_index, dtime, ntime ;
+ float exptime, *time=NULL, *x=NULL, *y=NULL, *velocity=NULL;
+ float *rx=NULL, *ry=NULL, *xpix, *ypix, *wt_pix ;
+ float *lif_cnt=NULL, *sic_cnt=NULL, *lambda=NULL ;
+ float *timeline=NULL, *weight=NULL;
+ short *tsunrise=NULL, *tsunset=NULL ;
+ fitsfile *header, *bpmfits, *memp;
+ char rootname[FLEN_VALUE]={'\0'}, bpm_file[FLEN_FILENAME]={'\0'};
+ char idf_file[FLEN_FILENAME]={'\0'}, det[FLEN_VALUE]={'\0'};
+ char *keywords[] = {"GRAT_COR","FPA__COR","MIRR_COR","ASTG_COR","WAVE_COR"};
+ char keyval[FLEN_VALUE];
+ unsigned char *chan_pix ;
+
+ char extname[]="POTHOLE_DATA", fmt_float[FLEN_VALUE], fmt_byte[FLEN_VALUE] ;
+ char instmode[FLEN_VALUE] ;
+ int tfields=5 ;
+ char *ttype[]={ "X", "Y", "CHANNEL", "WEIGHT", "LAMBDA"} ;
+ char *tform[5] ; /* we will define the tform once the number of
+ array elements is known */
+ char *tunit[]={ "pixels", "pixels", "unitless", "unitless", "Angstroms"} ;
+
+ char opts[] = "hgmfjdasn:v:";
+ char usage[] =
+ "Usage:\n"
+ " cf_bad_pixels [-hvgmfjdas] [-n bpm_filename] [-v level] idffile\n";
+ char option[] =
+ "Options:\n"
+ " -h: this help message\n"
+ " -v: verbosity level (=1; 0 is silent)\n"
+ " -g: no grating motion correction \n"
+ " -m: no mirror motion correction \n"
+ " -n: Create BPM file for nighttime fraction of exposure.\n"
+ " Argument is the name of the output BPM file.\n"
+ " -f: no fpa motion correction \n"
+ " -j: no jitter correction \n"
+ " -d: no doppler correction \n"
+ " -a: no astigmatism correction \n"
+ " -s: no screening on time flags (if 0)" ;
+
+ verbose_level = 1;
+
+ while ((optc = getopt(argc, argv, opts)) != -1) {
+ switch(optc) {
+
+ case 'h':
+ printf("%s\n%s", usage, option);
+ return 0;
+ case 'v':
+ verbose_level = atoi(optarg);
+ break;
+ case 'g':
+ grating_motion = 0 ;
+ break;
+ case 'm':
+ mirror_motion = 0 ;
+ break ;
+ case 'n':
+ sprintf(bpm_file,"%s", optarg) ;
+ night_only = TRUE;
+ break;
+ case 'f':
+ fpa_pos = 0 ;
+ break ;
+ case 'j':
+ jitter = 0 ;
+ break ;
+ case 'a':
+ astig = 0 ;
+ break;
+ case 'd':
+ doppler_motion = 0 ;
+ break ;
+ case 's':
+ tscreen = 0 ;
+ break ;
+
+ }
+ }
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ if (argc <= optind) {
+ printf("%s", usage);
+ return -1;
+ }
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ /* Open the input IDF file. */
+ FITS_open_file(&header, argv[optind], READWRITE, &status);
+ FITS_read_key(header, TSTRING, "INSTMODE", instmode, NULL, &status) ;
+
+ /* If EXPTIME < 1, exit without generating a bad-pixel file. */
+ FITS_read_key(header, TFLOAT, "EXPTIME", &exptime, NULL, &status);
+ if (night_only)
+ FITS_read_key(header, TFLOAT, "EXPNIGHT", &exptime, NULL, &status);
+ if (exptime < 1.) {
+ cf_verbose(1, "EXPTIME = %g. "
+ "Will not attempt to generate bad-pixel map.", exptime);
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+ return 0;
+ }
+
+ /* Read timeline data from the input file */
+ FITS_movabs_hdu(header, 4, &hdutype, &status);
+ nseconds = cf_read_col(header, TFLOAT, "TIME", (void **) &timeline);
+ nseconds = cf_read_col(header, TBYTE, "STATUS_FLAGS", (void **) &statflag);
+ nseconds = cf_read_col(header, TSHORT, "TIME_SUNRISE", (void **) &tsunrise);
+ nseconds = cf_read_col(header, TSHORT, "TIME_SUNSET", (void **) &tsunset) ;
+ nseconds = cf_read_col(header, TFLOAT, "ORBITAL_VEL", (void **) &velocity);
+ nseconds = cf_read_col(header, TFLOAT, "LIF_CNT_RATE", (void **) &lif_cnt) ;
+ nseconds = cf_read_col(header, TFLOAT, "SIC_CNT_RATE", (void **) &sic_cnt) ;
+ FITS_movabs_hdu(header, 1, NULL, &status);
+
+ /*
+ * If night-only spectrum is requested from the command line, copy
+ * IDF header into memory, close the IDF, modify copy, and pass it
+ * to subsequent routines.
+ */
+ if (night_only) {
+ cf_verbose(3, "Night-only spectrum requested from command line.");
+ FITS_create_file(&memp, "mem://", &status);
+ FITS_copy_hdu(header, memp, 0, &status);
+ if (!strncmp(instmode, "H",1)) {
+ FITS_movabs_hdu(header, 2, NULL, &status);
+ FITS_copy_hdu(header, memp, 0, &status);
+ }
+ FITS_close_file(header, &status);
+ header = memp;
+
+ FITS_movabs_hdu(header, 1, NULL, &status);
+ FITS_update_key(header, TFLOAT, "EXPTIME", &exptime, NULL, &status);
+ FITS_update_key(header, TSTRING, "DAYNIGHT", "NIGHT", NULL, &status);
+ }
+ else { /* Generate name of output file */
+ FITS_read_key(header, TSTRING, "ROOTNAME", rootname, NULL, &status) ;
+ FITS_read_key(header, TSTRING, "DETECTOR", det, NULL, &status) ;
+ det[1]=tolower(det[1]) ;
+ if (!strncmp(instmode, "T",1))
+ sprintf(bpm_file,"%11s%2sttagfbpm.fit",rootname,det) ;
+ else
+ sprintf(bpm_file,"%11s%2shistfbpm.fit",rootname,det) ;
+ }
+
+ /* Write name of BPM file to header of IDF. */
+ cf_verbose(3,"Output bad pixel map to file %s", bpm_file) ;
+ FITS_update_key(header, TSTRING, "BPM_CAL", bpm_file, NULL, &status);
+
+ /* Create the output file and copy header from the input */
+ FITS_create_file(&bpmfits, bpm_file, &status) ;
+ FITS_copy_hdu(header, bpmfits, 0, &status) ;
+
+ FITS_update_key(bpmfits, TSTRING, "FILENAME", bpm_file,
+ NULL, &status) ;
+ FITS_update_key(bpmfits, TSTRING, "FILETYPE", "BAD PIXEL MAP",
+ NULL, &status) ;
+
+ FITS_read_key(header, TSTRING, "FILENAME", idf_file, NULL, &status) ;
+ FITS_update_key(bpmfits, TSTRING, "IDF_FILE", idf_file,
+ NULL, &status) ;
+
+ /* Reset analysis keywords in the top level of the output file */
+ FITS_movabs_hdu(bpmfits, 1, &hdutype, &status);
+ for (i = 0; i < 5; i++) {
+ FITS_read_key(bpmfits, TSTRING, keywords[i], keyval, NULL, &status);
+ if (!strncmp(keyval, "COMPLETE", 8))
+ FITS_update_key(bpmfits, TSTRING, keywords[i], "PERFORM", NULL,
+ &status) ;
+ else
+ FITS_update_key(bpmfits, TSTRING, keywords[i], "OMIT", NULL,
+ &status) ;
+ }
+
+ /* Make sure that the count rates are non-zero */
+ for (i=0; i<nseconds; i++) {
+ if (lif_cnt[i] < 0.01) lif_cnt[i] = 0.01 ;
+ if (sic_cnt[i] < 0.01) sic_cnt[i] = 0.01 ;
+ }
+
+ /* generate a null array for locflag */
+ locflag = (unsigned char *) cf_calloc(nseconds, sizeof(unsigned char)) ;
+
+ /* select only the good times */
+ FITS_movabs_hdu(header, 1, &hdutype, &status);
+ cf_apply_filters(header, tscreen, nseconds, statflag, locflag, nseconds,
+ statflag, &dtime, &ntime, &ngood, &good_index) ;
+
+ free(locflag) ;
+
+ cf_verbose(3, "nseconds=%d, dtime=%d, ntime=%d, ngood=%d ",
+ nseconds, dtime, ntime, ngood) ;
+
+ /* Generate the pseudo photons */
+ cf_generate_pseudo_photons(header, ngood, good_index, timeline, statflag,
+ lif_cnt, sic_cnt, &nevents, &time, &weight, &x,
+ &y, &channel, &rx, &ry, &timeflag, &loc_flag) ;
+
+ if (night_only)
+ FITS_delete_file(header, &status);
+ else
+ FITS_close_file(header, &status);
+
+ cf_verbose(3, "number of pseudo photon events = %d ",nevents) ;
+
+ /* Call routines to remove motions */
+ if (grating_motion) {
+ cf_verbose(4,"Correcting for grating motions") ;
+ cf_grating_motion(bpmfits, nevents, time, x, y, channel,
+ nseconds, timeline, tsunrise) ; }
+ if (fpa_pos) {
+ cf_verbose(4,"Correcting for fpa motions ") ;
+ cf_fpa_position(bpmfits, nevents, x, channel) ;}
+ if (mirror_motion) {
+ cf_verbose(4,"Correcting for mirror motions") ;
+ cf_mirror_motion(bpmfits, nevents, time, x, y, channel,
+ nseconds, timeline, tsunset) ; }
+ if (jitter) {
+ cf_verbose(4,"Correcting for satellite jitter ") ;
+ cf_satellite_jitter(bpmfits, nevents, time, x, y, channel, nseconds,
+ timeline, statflag) ;
+ }
+
+ /* correct for the Doppler motions */
+ if (doppler_motion)
+ cf_correct_doppler_motions(bpmfits, nevents, time, x, channel,
+ nseconds, timeline, velocity) ;
+
+ /* combine the pothole centroid information and generate a pothole map by
+ including the pothole sizes and shapes */
+ npixels = cf_combine_pothole_data(bpmfits, nevents, time, weight,
+ x, rx, y, ry, channel, timeflag, &xpix, &ypix, &chan_pix, &wt_pix) ;
+
+ /* generate a blank wavelength array */
+ lambda = (float *) cf_calloc( npixels, sizeof(float) ) ;
+
+ /* correct for astigmatism and assign wavelengths */
+ if (astig) cf_astigmatism(bpmfits, npixels, xpix, ypix, chan_pix) ;
+ cf_dispersion(bpmfits, npixels, xpix, chan_pix, lambda);
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+ /* create a table and output the results to the file */
+ /* first set tform values */
+ cf_verbose(3, "Writing pseudo-pixel information to output file.");
+ sprintf(fmt_float, "%1ldE", npixels) ;
+ sprintf(fmt_byte, "%1ldB", npixels) ;
+ tform[0]=fmt_float ;
+ tform[1]=fmt_float ;
+ tform[2]=fmt_byte ;
+ tform[3]=fmt_float ;
+ tform[4]=fmt_float ;
+
+ /* put the data into the table */
+ FITS_create_tbl(bpmfits, BINARY_TBL, nrows, tfields, ttype, tform,
+ tunit, extname, &status) ;
+ cf_verbose(3, " Photon list created.");
+ FITS_write_col(bpmfits, TFLOAT, 1, 1L, 1L, npixels, xpix, &status) ;
+ cf_verbose(3, " X array has been written.");
+ FITS_write_col(bpmfits, TFLOAT, 2, 1L, 1L, npixels, ypix, &status) ;
+ cf_verbose(3, " Y array has been written.");
+ FITS_write_col(bpmfits, TBYTE, 3, 1L, 1L, npixels, chan_pix, &status) ;
+ cf_verbose(3, " Channel array has been written.");
+ FITS_write_col(bpmfits, TFLOAT, 4, 1L, 1L, npixels, wt_pix, &status) ;
+ cf_verbose(3, " Weights array has been written.");
+ FITS_write_col(bpmfits, TFLOAT, 5, 1L, 1L, npixels, lambda, &status) ;
+ cf_verbose(3, " Lambda array has been written.");
+
+ FITS_close_file(bpmfits, &status);
+
+ free(statflag);
+ free(timeline);
+ free(timeflag);
+ free(rx) ;
+ free(ry) ;
+ free(y);
+ free(x);
+ free(time);
+ free(xpix) ;
+ free(ypix) ;
+ free(chan_pix) ;
+ free(wt_pix) ;
+ free(lambda) ;
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+ return 0;
+}
diff --git a/src/fuv/cf_convert_to_farf.c b/src/fuv/cf_convert_to_farf.c
new file mode 100644
index 0000000..a50dd2e
--- /dev/null
+++ b/src/fuv/cf_convert_to_farf.c
@@ -0,0 +1,268 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_convert_to_farf options intermediate_file
+ *
+ * Description: Corrects the RAW data for IDS and electronic deadtime
+ * and for thermal, count rate, geometric, and PHA distortions.
+ * The resulting data are in the Flight Aligned Reference
+ * Frame (FARF), the location of an event on an ideal
+ * detector. The input file is modified in place.
+ *
+ * By default all corrections are performed. Command line
+ * options allow one or more corrections to be omitted.
+ *
+ * Arguments: input_file Intermediate data file
+ *
+ * Calibration files:
+ *
+ * Returns: 0 on successful completion
+ *
+ * Calls: cf_ids_dead_time, cf_electronics_dead_time,
+ * cf_thermal_distort, cf_count_rate_y_distort,
+ * cf_geometric_distort, cf_pha_x_distort
+ *
+ * History: 08/08/02 peb 1.1 Begin work
+ * 10/27/02 peb 1.3 Added IDS and electronics dead time
+ * corrections and time-dependent
+ * correction for count_rate_y_distort.
+ * Changed the help option to -h.
+ * Corrected function description.
+ * 11/12/02 peb 1.4 Added argument to cf_thermal_distort,
+ * cf_count_rate_y_distort, and
+ * cf_geometric_distort calls, so
+ * stim-pulse flag can be set.
+ * Added function to flag events in
+ * inactive regions.
+ * 12/09/02 wvd 1.5 Set keyword TOT_DEAD to mean value
+ * for exposure.
+ * 01/28/03 wvd 1.6 Added cf_check_digitizer
+ * 03/10/03 peb 1.7 Added verbose_level option and unistd.h
+ * so getopt.h will be portable.
+ * 03/10/03 peb 1.8 Changed locflgs to unsigned char *
+ * 03/10/03 peb 1.9 Changed pha to unsigned char *
+ * 06/11/03 wvd 1.10 Pass datatype to cf_read_col and
+ * cf_write_col.
+ * 06/16/03 rdr 1.11 Correct datatype in reading LOC_FLGS
+ * 08/01/03 wvd 1.12 Add cf_apply_dead_time to properly
+ * correct both TTAG and HIST data.
+ * 08/04/03 wvd 1.13 Convert count-rate arrays to shorts.
+ * 08/25/03 wvd 1.14 Change coltype from string to int in
+ * cf_read_col and cf_write_col.
+ * 11/26/03 wvd 1.15 Read aic_rate and fec_rate as floats.
+ * 02/09/04 wvd 1.16 Don't pass aic_rate to
+ * cf_apply_dead_time().
+ * 02/27/04 rdr 1.17 Added weight to cf_thermal_distortion
+ * 03/02/05 wvd 1.18 Must assign channel numbers and pulse-
+ * height values to HIST data before walk
+ * correction.
+ * Read XFARF and YFARF from XRAW and YRAW.
+ * 05/20/05 wvd 1.19 Clean up i/o.
+ * 11/02/06 wvd 1.20 Add call to cf_time_xy_distort.
+ * 12/29/06 wvd 1.21 Move cf_screen_fifo_overflow from
+ * cf_screen_photons. Rename it
+ * cf_fifo_dead_time. Set all dead-time
+ * keywords to 1.0 by default.
+ * 02/08/08 wvd 1.22 For HIST data, write modified PHA
+ * values to the IDF.
+ *
+ ****************************************************************************/
+
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include "calfuse.h"
+
+int
+main(int argc, char *argv[])
+{
+ char CF_PRGM_ID[] = "cf_convert_to_farf";
+ char CF_VER_NUM[] = "1.22";
+
+ unsigned char *pha=NULL, *locflags=NULL;
+ char instmode[FLEN_VALUE], aperture[FLEN_VALUE];
+ int check_digitizer=1, ids_deadtime=1, elec_deadtime=1, fifo_deadtime=1;
+ int thermal_corr=1;
+ int countrate_corr=1, geometric_corr=1, pha_corr=1, active_flag=1;
+ int temporal_corr=1, status=0, hdutype, last_call, optc, pad;
+ long i, nevents, nseconds;
+ float *elec_dtc=NULL, *ids_dtc=NULL, unity = 1.0;
+ float *time=NULL, *xfarf=NULL, *yfarf=NULL, *weight=NULL;
+ float *timeline=NULL;
+ float *aic_rate=NULL, *fec_rate=NULL;
+ fitsfile *header;
+
+ char opts[] = "hceiftrsgpav:";
+ char usage[] =
+ "Usage:\n"
+ " cf_convert_to_farf [-hceiftrsgpa] [-v level] idf_file\n";
+ char option[] =
+ "Options:\n"
+ " -h: this help message\n"
+ " -v: verbosity level (default is 1; 0 is silent)\n"
+ " -c: no check of digitizer values\n"
+ " -e: no electronics deadtime correction\n"
+ " -i: no IDS deadtime correction\n"
+ " -f: no FIFO deadtime correction\n"
+ " -t: no thermal distortion correction\n"
+ " -r: no count-rate distortion correction\n"
+ " -s: no time-dependent distortion correction\n"
+ " -g: no geometric distortion correction\n"
+ " -p: no PHA distortion correction\n"
+ " -a: do not flag events beyond active region\n";
+
+ verbose_level=1;
+
+ while ((optc = getopt(argc, argv, opts)) != -1) {
+ switch(optc) {
+
+ case 'h':
+ printf("%s\n%s", usage, option);
+ return 0;
+ case 'v':
+ verbose_level = atoi(optarg);
+ break;
+ case 'c':
+ check_digitizer = 0;
+ break;
+ case 'i':
+ ids_deadtime = 0;
+ break;
+ case 'e':
+ elec_deadtime = 0;
+ break;
+ case 'f':
+ fifo_deadtime = 0;
+ break;
+ case 't':
+ thermal_corr = 0;
+ break;
+ case 'r':
+ countrate_corr = 0;
+ break;
+ case 's':
+ temporal_corr = 0;
+ break;
+ case 'g':
+ geometric_corr = 0;
+ break;
+ case 'p':
+ pha_corr = 0;
+ break;
+ case 'a':
+ active_flag = 0;
+ break;
+ }
+ }
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ if (argc <= optind) {
+ printf("%s", usage);
+ cf_if_error("Incorrect number of program arguments");
+ }
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ FITS_open_file(&header, argv[optind], READWRITE, &status);
+
+ /* Read a couple of keywords from the file header. */
+ FITS_read_key(header, TSTRING, "INSTMODE", instmode, NULL, &status);
+ FITS_read_key(header, TSTRING, "APERTURE", aperture, NULL, &status);
+
+ FITS_movabs_hdu(header, 2, &hdutype, &status);
+ nevents = cf_read_col(header, TFLOAT, "TIME", (void **) &time);
+ nevents = cf_read_col(header, TBYTE, "PHA", (void **) &pha);
+ nevents = cf_read_col(header, TFLOAT, "XRAW", (void **) &xfarf);
+ nevents = cf_read_col(header, TFLOAT, "YRAW", (void **) &yfarf);
+ nevents = cf_read_col(header, TFLOAT, "WEIGHT", (void **) &weight);
+ nevents = cf_read_col(header, TBYTE, "LOC_FLGS", (void **) &locflags);
+
+ FITS_movabs_hdu(header, 4, &hdutype, &status);
+ nseconds = cf_read_col(header, TFLOAT, "TIME", (void **) &timeline);
+ nseconds = cf_read_col(header, TFLOAT, "FEC_CNT_RATE", (void **) &fec_rate);
+ nseconds = cf_read_col(header, TFLOAT, "AIC_CNT_RATE", (void **) &aic_rate);
+ FITS_movabs_hdu(header, 1, &hdutype, &status);
+
+ /* Initialize dead-time correction arrays and header keywords. */
+ FITS_update_key (header, TFLOAT, "DET_DEAD", &unity, NULL, &status);
+ FITS_update_key (header, TFLOAT, "IDS_DEAD", &unity, NULL, &status);
+ FITS_update_key (header, TFLOAT, "TOT_DEAD", &unity, NULL, &status);
+ elec_dtc = (float *) cf_malloc(sizeof(float) * nseconds);
+ ids_dtc = (float *) cf_malloc(sizeof(float) * nseconds);
+ for (i = 0; i < nseconds; i++) elec_dtc[i] = ids_dtc[i] = 1.0;
+
+ if (check_digitizer)
+ cf_check_digitizer(header);
+
+ if (elec_deadtime)
+ cf_electronics_dead_time(header, nseconds, fec_rate, elec_dtc);
+
+ if (ids_deadtime)
+ cf_ids_dead_time(header, nseconds, aic_rate, ids_dtc);
+
+ if (fifo_deadtime)
+ cf_fifo_dead_time(header, nevents, time,
+ nseconds, timeline, aic_rate, ids_dtc);
+
+ if (ids_deadtime || elec_deadtime || fifo_deadtime)
+ cf_apply_dead_time(header, nevents, time, weight,
+ nseconds, timeline, ids_dtc, elec_dtc);
+
+ if (thermal_corr)
+ cf_thermal_distort(header, nevents, xfarf, yfarf, weight, locflags);
+
+ if (countrate_corr)
+ cf_count_rate_y_distort(header, nevents, time, yfarf, locflags,
+ nseconds, timeline, fec_rate);
+ if (temporal_corr)
+ cf_time_xy_distort(header, nevents, xfarf, yfarf, locflags);
+
+ if (geometric_corr)
+ cf_geometric_distort(header, nevents, xfarf, yfarf, locflags);
+
+ /* Must assign PHA values to HIST data before applying walk correction. */
+ if (pha_corr && !strncmp(instmode, "HIST", 4)) {
+ unsigned char *channel;
+ channel = cf_calloc(nevents, sizeof(unsigned char));
+ if (!strncmp(aperture, "RFPT", 4)) pad = 10;
+ else pad = 100;
+ cf_identify_channel(header, nevents, xfarf, yfarf, channel, locflags,
+ pad, last_call=FALSE);
+ cf_modify_hist_pha(header, nevents, pha, channel);
+ free(channel);
+ }
+
+ if (pha_corr)
+ cf_pha_x_distort(header, nevents, pha, xfarf, locflags);
+
+ if (active_flag)
+ cf_active_region(header, nevents, xfarf, yfarf, locflags);
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+ FITS_movabs_hdu(header, 2, &hdutype, &status);
+ if (pha_corr && !strncmp(instmode, "HIST", 4))
+ cf_write_col(header, TBYTE, "PHA", (void *) pha, nevents);
+ cf_write_col(header, TFLOAT, "WEIGHT", (void *) weight, nevents);
+ cf_write_col(header, TFLOAT, "XFARF", (void *) xfarf, nevents);
+ cf_write_col(header, TFLOAT, "YFARF", (void *) yfarf, nevents);
+ cf_write_col(header, TBYTE, "LOC_FLGS", (void *) locflags, nevents);
+
+ FITS_close_file(header, &status);
+
+ free(fec_rate);
+ free(aic_rate);
+ free(timeline);
+ free(locflags);
+ free(weight);
+ free(yfarf);
+ free(xfarf);
+ free(pha);
+ free(time);
+ free(elec_dtc);
+ free(ids_dtc);
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+ return 0;
+}
diff --git a/src/fuv/cf_countmap.c b/src/fuv/cf_countmap.c
new file mode 100644
index 0000000..2d62b14
--- /dev/null
+++ b/src/fuv/cf_countmap.c
@@ -0,0 +1,541 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_countmap input_files
+ *
+ * Description: Adds the counts from a list of input idf files into
+ * the count map. The accumulated count map cube is
+ * determined by reading the COUNT_CAL keyword in the
+ * input file's header. To prevent multiple copies
+ * of reprocessed input files from being added to
+ * the total exposure map, if the input file has been
+ * previously added, it is skipped over and a message is
+ * printed out.
+ *
+ *
+ * Arguments: input_files Input initialized ttag FITS file names
+ *
+ * Calibration files required: None
+ *
+ * Returns: int 0 = successful completion
+ *
+ * Note: This routine requires significantly more memory than your
+ * average routine. Its design has not been optimized to
+ * reduce memory usage.
+ *
+ * History: 03/25/03 1.1 peb Begin and finish work. Based on
+ * cf_ttag_to_image
+ * 03/31/03 1.2 peb Removed filtering of photons and fixed
+ * exposure time bug when subtracting data
+ * 06/11/03 1.3 wvd Pass datatype to cf_read_col
+ * 08/25/03 1.4 wvd Change coltype from string to int in
+ * cf_read_col.
+ * 08/25/03 1.5 wvd Change CHIDCOR1 to CHID_COR
+ * 02/17/04 1.6 bjg Added scaling option
+ * Routine name changed from
+ * cf_ttag_countmap to cf_countmap.
+ * 02/26/04 1.7 bjg Added option to select coordinates
+ * to use: RAW, FARF (default), final
+ * 04/08/04 1.8 bjg Remove unused function get_xy_columns
+ * 04/27/04 1.9 bjg Change author name of countfile
+ * 08/25/04 1.10 bjg Added lower and upper limits option
+ * for PHA. In force mode, issue a warning
+ * if file already included.
+ * 03/02/05 1.11 wvd Don't write AUTHOR keyword to header.
+ * 08/24/07 1.12 bot Changed nx and ny to long and called
+ * as TLONG ; changed binx and biny to int
+ * and called as TINT.
+ *
+ ****************************************************************************/
+
+#include <unistd.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "calfuse.h"
+
+#define ROOT_LENGTH 13
+#define MAXCHARS 120
+#define MASTER_CAL_FILE "master_calib_file.dat"
+#define IMAGE_EXT 1
+#define INDEX_EXT 2
+
+static char CF_PRGM_ID[] = "cf_countmap";
+static char CF_VER_NUM[] = "1.12";
+
+
+static int
+new_imagfile(char *newfile, char *detector, float effmjd, int binx, int biny)
+{
+ char date[FLEN_CARD]={'\0'};
+ char *ttype[] = {"ROOTNAME", "OBSDATE", "COUNTS", "EXPTIME", "ADDDATE", "SCALE", "PHAMIN", "PHAMAX"};
+ char *tform[] = {"13A" , "19A" , "1J" , "1E" , "19A" , "1E" , "1I" , "1I" };
+ char *tunit[] = {" " , " " , "counts", "seconds", " " , " " , " " , " " };
+ int status=0, version=1, tref = 0, tfields = 8;
+ long axis[2];
+ float exptime=0.;
+ double nevents=0.;
+ fitsfile *imagfits;
+
+ FITS_create_file(&imagfits, newfile, &status);
+
+ axis[0] = NXMAX/binx;
+ axis[1] = NYMAX/biny;
+
+ FITS_create_img(imagfits, FLOAT_IMG, 2, axis, &status);
+ FITS_write_key(imagfits, TINT, "SPECBINX", &binx,
+ "Binsize in detector X coordinate", &status);
+ FITS_write_key(imagfits, TINT, "SPECBINY", &biny,
+ "Binsize in detector Y coordinate", &status);
+ FITS_write_key(imagfits, TSTRING, "CALFTYPE", "COUNT",
+ "Calibration file type", &status);
+ FITS_write_key(imagfits, TINT, "CALFVERS", &version,
+ "Calibration file version", &status);
+ FITS_write_key(imagfits, TSTRING, "DETECTOR", detector,
+ "detector (1A, 1B, 2A, 2B)", &status);
+ FITS_write_key(imagfits, TFLOAT, "EFFMJD", &effmjd,
+ "Date on which file should be applied (MJD)", &status);
+ fits_get_system_time(date, &tref, &status);
+ FITS_write_key(imagfits, TSTRING, "DATE", date,
+ "file creation date (YYYY-MM-DDThh:mm:ss UTC)", &status);
+ FITS_write_key(imagfits, TDOUBLE, "NEVENTS", &nevents,
+ "Accumulated events", &status);
+ FITS_write_key(imagfits, TFLOAT, "EXPTIME", &exptime,
+ "Accumulated exposure time", &status);
+
+ FITS_create_tbl(imagfits, BINARY_TBL, 0, tfields, ttype, tform, tunit,
+ "PROCESSED FILES", &status);
+
+ FITS_close_file(imagfits, &status);
+ return status;
+}
+
+static int
+_check_index(fitsfile *imagfits, char *rootname, float *scale, int *phamin, int *phamax)
+{
+ int status=0, anynull=0, hdutype;
+ float *scal;
+ int *phami, *phama;
+ long j, nrows, frow=1, felem=1;
+ char **filename, strnull[] = " ";
+
+ FITS_movabs_hdu(imagfits, INDEX_EXT, &hdutype, &status);
+ FITS_read_key(imagfits, TLONG, "NAXIS2", &nrows, NULL, &status);
+
+ filename = (char **) cf_malloc(nrows * sizeof(char *));
+ filename[0] = (char *) cf_malloc(nrows*(ROOT_LENGTH+1)*sizeof(char));
+ scal = (float *) cf_malloc(nrows * sizeof(float));
+ phami = (int *) cf_malloc(nrows * sizeof(int));
+ phama = (int *) cf_malloc(nrows * sizeof(int));
+ for (j=1; j<nrows; j++)
+ filename[j] = filename[j-1]+(ROOT_LENGTH+1);
+
+ FITS_read_col(imagfits, TSTRING, 1, frow, felem, nrows, strnull,
+ filename, &anynull, &status);
+ FITS_read_col(imagfits, TFLOAT, 6, frow, felem, nrows, strnull,
+ scal, &anynull, &status);
+ FITS_read_col(imagfits, TINT, 7, frow, felem, nrows, strnull,
+ phami, &anynull, &status);
+ FITS_read_col(imagfits, TINT, 8, frow, felem, nrows, strnull,
+ phama, &anynull, &status);
+
+ for (j=0; j<nrows; j++) {
+ if (strncmp(filename[j], rootname, strlen(rootname)) == 0) {
+ *scale = scal[j];
+ *phamin = phami[j];
+ *phamax = phama[j];
+ free(filename[0]);
+ free(filename);
+ free(scal);
+ return j+1;
+ }
+ }
+ free(filename[0]);
+ free(filename);
+ free(scal);
+ free(phami);
+ free(phama);
+ return 0;
+}
+
+static int
+_update_index(fitsfile *imagfits, char *rootname, char *obsdate,
+ double nevents, float exptime, float scale, int phamin, int phamax)
+{
+ char *strptr[1], adddate[FLEN_CARD]={'\0'};
+ int status=0, hdutype, tref=0;
+ long nrows;
+
+ FITS_movabs_hdu(imagfits, INDEX_EXT, &hdutype, &status);
+ FITS_read_key(imagfits, TLONG, "NAXIS2", &nrows, NULL, &status);
+
+ strptr[0] = rootname;
+ FITS_write_col(imagfits, TSTRING, 1, nrows+1, 1, 1, strptr, &status);
+ strptr[0] = obsdate;
+ FITS_write_col(imagfits, TSTRING, 2, nrows+1, 1, 1, strptr, &status);
+ FITS_write_col(imagfits, TDOUBLE, 3, nrows+1, 1, 1, &nevents, &status);
+ FITS_write_col(imagfits, TFLOAT, 4, nrows+1, 1, 1, &exptime, &status);
+ fits_get_system_time(adddate, &tref, &status);
+ strptr[0] = adddate;
+ fits_write_col(imagfits, TSTRING, 5, nrows+1, 1, 1, strptr, &status);
+ FITS_write_col(imagfits, TFLOAT, 6, nrows+1, 1, 1, &scale, &status);
+ FITS_write_col(imagfits, TINT, 7, nrows+1, 1, 1, &phamin, &status);
+ FITS_write_col(imagfits, TINT, 8, nrows+1, 1, 1, &phamax, &status);
+ return 0;
+}
+
+
+
+static double
+add_events(fitsfile *infits, char *xcolumn, char *ycolumn, float scale,
+ int phamin, int phamax, fitsfile *imagfits)
+{
+ int binx, biny, status=0, hdutype, anynull=0;
+ long nx, ny, nevents, j;
+ float *xpos, *ypos, *weight, *image;
+ char *pha;
+ double ncounts=0.;
+
+ FITS_movabs_hdu(infits, 2, &hdutype, &status);
+ nevents = cf_read_col(infits, TFLOAT, xcolumn, (void **) &xpos);
+ nevents = cf_read_col(infits, TFLOAT, ycolumn, (void **) &ypos);
+ nevents = cf_read_col(infits, TFLOAT, "WEIGHT", (void **) &weight);
+ nevents = cf_read_col(infits, TBYTE, "PHA", (void **) &pha);
+
+ FITS_movabs_hdu(imagfits, IMAGE_EXT, &hdutype, &status);
+ FITS_read_key(imagfits, TLONG, "NAXIS1", &nx, NULL, &status);
+ FITS_read_key(imagfits, TLONG, "NAXIS2", &ny, NULL, &status);
+ FITS_read_key(imagfits, TINT, "SPECBINX", &binx, NULL, &status);
+ FITS_read_key(imagfits, TINT, "SPECBINY", &biny, NULL, &status);
+
+ image = (float *) cf_malloc(sizeof(float)*nx*ny);
+ FITS_read_img(imagfits, TFLOAT, 1, nx*ny, NULL, image, &anynull, &status);
+
+ for (j=0; j<nevents; j++) {
+ if ((pha[j]>=phamin) && (pha[j]<=phamax)){
+ int x, y;
+ x = xpos[j];
+ y = ypos[j];
+ if ((x >= 0) && (x < nx*binx) && (y >= 0) && (y < ny*biny)) {
+ image[(y/biny)*nx + (x/binx)] += weight[j]*scale;
+ ncounts += weight[j]*scale;
+ }
+ }
+ }
+ FITS_write_img(imagfits, TFLOAT, 1, nx*ny, image, &status);
+
+ free(image);
+ free(weight);
+ free(ypos);
+ free(xpos);
+ return ncounts;
+}
+
+static double
+subtract_events(fitsfile *infits, char *xcolumn, char *ycolumn,
+ float scale, int phamin, int phamax, fitsfile *imagfits)
+{
+ int binx, biny, status=0, hdutype, anynull=0;
+ long nx, ny, nevents, j;
+ float *xpos, *ypos, *weight, *image;
+ double ncounts=0.;
+ char *pha;
+
+ FITS_movabs_hdu(infits, 2, &hdutype, &status);
+ nevents = cf_read_col(infits, TFLOAT, xcolumn, (void **) &xpos);
+ nevents = cf_read_col(infits, TFLOAT, ycolumn, (void **) &ypos);
+ nevents = cf_read_col(infits, TFLOAT, "WEIGHT", (void **) &weight);
+ nevents = cf_read_col(infits, TBYTE, "PHA", (void **) &pha);
+
+ FITS_movabs_hdu(imagfits, IMAGE_EXT, &hdutype, &status);
+ FITS_read_key(imagfits, TLONG, "NAXIS1", &nx, NULL, &status);
+ FITS_read_key(imagfits, TLONG, "NAXIS2", &ny, NULL, &status);
+ FITS_read_key(imagfits, TINT, "SPECBINX", &binx, NULL, &status);
+ FITS_read_key(imagfits, TINT, "SPECBINY", &biny, NULL, &status);
+
+ image = (float *) cf_malloc(sizeof(float)*nx*ny);
+ FITS_read_img(imagfits, TFLOAT, 1, nx*ny, NULL, image, &anynull, &status);
+
+ for (j=0; j<nevents; j++) {
+ if ((pha[j]>=phamin) && (pha[j]<=phamax)){
+ int x, y;
+ x = xpos[j];
+ y = ypos[j];
+ if ((x >= 0) && (x < nx*binx) && (y >= 0) && (y < ny*biny)) {
+ image[(y/biny)*nx + (x/binx)] -= weight[j]*scale;
+ ncounts += weight[j]*scale;
+ }
+ }
+ }
+ FITS_write_img(imagfits, TFLOAT, 1, nx*ny, image, &status);
+
+ free(image);
+ free(weight);
+ free(ypos);
+ free(xpos);
+ return ncounts;
+}
+
+
+int main(int argc, char *argv[])
+{
+ char *newfile = NULL, *detector = NULL, buffer[FLEN_CARD]={'\0'};
+ int subtract=0, force=0, newbinx=1, newbiny=1, status=0, optc;
+ float effmjd = 0.,scale=1.,old_scale;
+ int phamin=0, phamax=31;
+ int old_phamin, old_phamax;
+
+ char xcolumn[FLEN_CARD]={'\0'}, ycolumn[FLEN_CARD]={'\0'};
+
+ char opts[] = "hv:fsrcn:d:j:w:x:y:l:u:";
+ char usage[] =
+ "Usage:\n"
+ " cf_countmap [-hfsrc] [-v level] [-n filename] [-d segment]\n"
+ " [-w scale] [-j effmjd] [-x xbin] [-y ybin] \n"
+ " [-l phamin] [-u phamax] idffiles\n";
+ char option[] =
+ "Options:\n"
+ " -h: this help message\n"
+ " -v: verbosity level (=1; 0 is silent)\n"
+ " -f: force processing\n"
+ " -s: subtract files\n"
+ " -n: image map file\n"
+ " -d: image map segment (no default for new file)\n"
+ " -j: effective MJD (=0.0)\n"
+ " -w: weighting factor for image (=1.0)\n"
+ " -x: X-bin size (=1)\n"
+ " -y: Y-bin size (=1)\n"
+ " -r: use raw XY coordinates instead of farf\n"
+ " -c: use final XY coordinates instead of farf\n"
+ " -l: lower limit for pha (=0) \n"
+ " -u: upper limit for pha (=31) \n";
+
+ verbose_level = 1;
+
+ strcpy(xcolumn, "XFARF");
+ strcpy(ycolumn, "YFARF");
+
+ /* Check number of options and arguments */
+ while ((optc = getopt(argc, argv, opts)) != -1) {
+ switch(optc) {
+
+ case 'h':
+ printf("%s\n%s", usage, option);
+ return 0;
+ case 'v':
+ verbose_level = atoi(optarg);
+ break;
+ case 'f':
+ force = 1;
+ break;
+ case 's':
+ subtract = 1;
+ break;
+ case 'n':
+ newfile = optarg;
+ break;
+ case 'd':
+ detector = optarg;
+ break;
+ case 'j':
+ effmjd = atof(optarg);
+ break;
+ case 'w':
+ scale = atof(optarg);
+ break;
+ case 'x':
+ newbinx = atoi(optarg);
+ break;
+ case 'y':
+ newbiny = atoi(optarg);
+ break;
+ case 'r':
+ strcpy(xcolumn, "XRAW");
+ strcpy(ycolumn, "YRAW");
+ break;
+ case 'c':
+ strcpy(xcolumn, "X");
+ strcpy(ycolumn, "Y");
+ break;
+ case 'l':
+ phamin = atoi(optarg);
+ break;
+ case 'u':
+ phamax = atoi(optarg);
+ break;
+ }
+ }
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ if (argc <= optind) {
+ cf_if_error("%s\nIncorrect number of program arguments", usage);
+ }
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin processing");
+
+ while (optind < argc) {
+
+ char imagfile[FLEN_CARD], rootname[FLEN_CARD]={'\0'};
+ char segment[FLEN_CARD] = {'\0'};
+ int hdutype;
+ FILE *fptr;
+ fitsfile *infits, *imagfits;
+
+ FITS_open_file(&infits, argv[optind], READONLY, &status);
+ FITS_movabs_hdu(infits, 1, &hdutype, &status);
+
+ if (newfile) {
+ strcpy(imagfile, newfile);
+
+ if ((fptr = fopen(imagfile, "r")))
+ fclose(fptr);
+ else {
+ if (!detector)
+ cf_if_error("No detector segment specified: "
+ "1A, 1B, 2A, 2B");
+ status = new_imagfile(imagfile, detector, effmjd,
+ newbinx, newbiny);
+ }
+ FITS_open_file(&imagfits, imagfile, READWRITE, &status);
+ FITS_movabs_hdu(imagfits, IMAGE_EXT, &hdutype, &status);
+ detector = buffer;
+ FITS_read_key(imagfits, TSTRING, "DETECTOR", detector, NULL,
+ &status);
+ }
+ else {
+ FITS_read_key(infits, TSTRING, "TCNT_MAP", imagfile, NULL,
+ &status);
+ detector = buffer;
+ FITS_read_key(infits, TSTRING, "DETECTOR", detector, NULL,
+ &status);
+
+ if ((fptr = fopen(cf_hist_file(imagfile), "r"))) {
+ fclose(fptr);
+ } else {
+ char keyword[FLEN_CARD]={'\0'}, segment[FLEN_CARD]={'\n'};
+ char linin[MAXCHARS]={'\0'}, filename[FLEN_CARD]={'\0'};
+ int interp;
+ float aftermjd;
+ FILE *master;
+ /*
+ * Get the effective MJD from the master calibration file
+ */
+ master = fopen(cf_parm_file(MASTER_CAL_FILE), "r");
+ if (master == NULL)
+ cf_if_error("Master calibration database file not found");
+ while (fgets(linin, MAXCHARS, master) != NULL) {
+ /*
+ * Check for comment lines
+ */
+ if ((linin[0] != '#') && (linin[0] != '\n')) {
+ sscanf(linin, "%4c%*2c%2c%*2c%13c%*2c%9f%*2c%1d",
+ keyword, segment, filename, &aftermjd, &interp);
+ if (strcmp(filename, imagfile) == 0) {
+ effmjd = aftermjd;
+ break;
+ }
+ }
+ }
+ fclose(master);
+
+ status = new_imagfile(cf_hist_file(imagfile), detector,
+ effmjd, newbinx, newbiny);
+ }
+ FITS_open_file(&imagfits, cf_hist_file(imagfile), READWRITE,
+ &status);
+ }
+
+ strncpy(rootname, argv[optind], ROOT_LENGTH);
+ FITS_read_key(infits, TSTRING, "DETECTOR", segment, NULL,
+ &status);
+ if (strcmp(detector, segment) != 0) {
+ cf_if_warning("%s segment is not the same as %s.",
+ argv[optind], imagfile);
+ }
+ else if (subtract) {
+ int index;
+ if ((index = _check_index(imagfits, rootname, &scale, &phamin, &phamax))) {
+
+ int hdutype;
+ float exptime=0., acctime=0.;
+ double nevents, accevnt=0.;
+
+ FITS_read_key(infits, TFLOAT, "EXPTIME", &exptime, NULL,
+ &status);
+
+
+ nevents = subtract_events(infits, xcolumn, ycolumn, scale, phamin, phamax, imagfits);
+
+ FITS_movabs_hdu(imagfits, IMAGE_EXT, &hdutype, &status);
+ FITS_read_key(imagfits, TDOUBLE, "NEVENTS", &accevnt,
+ NULL, &status);
+ FITS_read_key(imagfits, TFLOAT, "EXPTIME", &acctime,
+ NULL, &status);
+ accevnt -= nevents;
+ acctime -= exptime;
+ FITS_update_key(imagfits, TDOUBLE, "NEVENTS", &accevnt,
+ NULL, &status);
+ FITS_update_key(imagfits, TFLOAT, "EXPTIME", &acctime,
+ NULL, &status);
+
+ FITS_movabs_hdu(imagfits, INDEX_EXT, &hdutype, &status);
+ FITS_delete_rows(imagfits, index, 1, &status);
+ cf_verbose(1, "%s is subtracted from %s",
+ argv[optind], imagfile);
+ } else {
+ cf_if_warning("%s is not in %s.", argv[optind], imagfile);
+ }
+ } else {
+ if (!force && _check_index(imagfits, rootname, &old_scale, &old_phamin, &old_phamax)) {
+ cf_if_warning("%s is already in %s with scale = %f, phamin = %d, phamax=%d.",
+ argv[optind], imagfile, old_scale, old_phamin, old_phamax);
+ } else {
+ char obsdate[FLEN_CARD]={'\0'}, dateobs[FLEN_CARD]={'\0'};
+ char timeobs[FLEN_CARD]={'\0'};
+
+ float exptime=0., acctime=0.;
+ double nevents, accevnt=0;
+
+ FITS_movabs_hdu(imagfits, IMAGE_EXT, &hdutype, &status);
+ FITS_read_key(infits, TSTRING, "DATEOBS", dateobs, NULL,
+ &status);
+ FITS_read_key(infits, TSTRING, "TIMEOBS", timeobs, NULL,
+ &status);
+ obsdate[0] = '\0';
+ sprintf(obsdate, "%s%s%s", dateobs, "T", timeobs);
+ FITS_read_key(infits, TFLOAT, "EXPTIME", &exptime, NULL,
+ &status);
+
+ if ((force) && _check_index(imagfits, rootname, &old_scale, &old_phamin, &old_phamax))
+ cf_if_warning("FORCE MODE - %s is already in %s with scale = %f, phamin = %d, phamax=%d.",
+ argv[optind], imagfile, old_scale, old_phamin, old_phamax);
+
+ nevents = add_events(infits, xcolumn, ycolumn, scale, phamin, phamax, imagfits);
+
+ FITS_movabs_hdu(imagfits, IMAGE_EXT, &hdutype, &status);
+ FITS_read_key(imagfits, TDOUBLE, "NEVENTS", &accevnt,
+ NULL, &status);
+ FITS_read_key(imagfits, TFLOAT, "EXPTIME", &acctime,
+ NULL, &status);
+ accevnt += nevents;
+ acctime += exptime;
+ FITS_update_key(imagfits, TDOUBLE, "NEVENTS", &accevnt,
+ NULL, &status);
+ FITS_update_key(imagfits, TFLOAT, "EXPTIME", &acctime,
+ NULL, &status);
+
+ status = _update_index(imagfits, rootname, obsdate, nevents,
+ exptime, scale, phamin, phamax);
+ cf_verbose(1, "%s is added to %s", argv[optind], imagfile);
+ }
+ }
+ FITS_close_file(imagfits, &status);
+ FITS_close_file(infits, &status);
+ optind ++;
+ }
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished processing");
+ return 0;
+}
diff --git a/src/fuv/cf_extract_spectra.c b/src/fuv/cf_extract_spectra.c
new file mode 100644
index 0000000..6e06119
--- /dev/null
+++ b/src/fuv/cf_extract_spectra.c
@@ -0,0 +1,336 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_extract_spectra options intermediate_file
+ *
+ * Description: This module computes a background model, reads the various
+ * calibration files, and performs either a standard or optimal
+ * extraction for the target spectrum in each of the LiF and
+ * SiC channels.
+ *
+ * Note: some of the routines called by this module modify values
+ * in the IDF file header. We want those changes to appear in
+ * the final, extracted spectral files, but not in the archived
+ * IDF, so we make a copy in memory of the IDF header and pass it
+ * to the various routines. We delete it at the end.
+ *
+ * Arguments: input_file Intermediate data file
+ *
+ * Calibration files:
+ *
+ * Returns: 0 on successful completion
+ *
+ * Calls: cf_apply_filters, cf_scale_bkgd, cf_make_wave_array,
+ * cf_rebin_and_flux_calibrate, cf_rebin_probability_array,
+ * cf_standard_or_optimal_extraction, cf_optimal_extraction
+ * cf_write_extracted_spectrum
+ *
+ * History: 02/13/03 peb 1.1 Begin work
+ * 03/02/03 wvd 1.3 Add cf_standard_or_optimal_extraction()
+ * 03/10/03 peb 1.4 Added verbose_level, unistd.h for
+ * getopt portability, and remove debug
+ * print statements
+ * 04/08/03 wvd 1.6 Copy header of IDF into memory
+ * so that subsequent routines can
+ * modify it without changing IDF.
+ * Delete this virtual header when done.
+ * Read arrays from timeline table and
+ * pass to cf_apply_filters.
+ * 05/06/03 rdr 1.7 Read from column ERGCM2 rather than
+ * ERGCM2S
+ * 05/07/03 wvd 1.8 Change ergcm2 to ergcm2 throughout
+ * 05/28/03 rdr 1.9 Read pothole mask
+ * 06/09/03 rdr 1.10 Incorporate the tscreen flag
+ * 06/11/03 wvd 1.11 Pass datatype to cf_read_col
+ * 08/25/03 wvd 1.12 Change coltype from string to int in
+ * cf_read_col.
+ * 09/29/03 wvd 1.13 Move standard_or_optimal so that it
+ * runs just once. Don't check return
+ * values from subroutines.
+ * 10/08/03 wvd 1.14 Change counts_out array to type long.
+ * 10/16/03 wvd 1.15 If EXPTIME = 0, generate a pair of
+ * null-valued spectra and exit.
+ * 10/31/03 wvd 1.16 Change channel to unsigned char.
+ * 12/12/03 wvd 1.18 Clean up i/o.
+ * 03/16/04 wvd 1.19 Don't pass wave_out to optimal
+ * extraction subroutine.
+ * Change pycent from int to float.
+ * 03/24/04 wvd 1.20 Eliminate got_no_data(); fold into
+ * main routine. If either EXPTIME = 0
+ * or NEVENTS = 0, write null spectrum.
+ * 04/26/04 wvd 1.21 Replace cf_rebin_and_flux_calibrate
+ * background with cf_rebin_background.
+ * cf_optimal_extraction now returns
+ * flux_out and sigma_out in units of
+ * counts; must flux-calibrate each.
+ * 06/10/04 wvd 1.22 Don't pass time array from timeline
+ * table to cf_apply_filters.
+ * 06/11/04 peb 1.23 Add the -r option to override the
+ * default rootname.
+ * 01/28/05 wvd 1.24 If EXP_STAT < 0, generate a pair of
+ * null-valued spectra and exit.
+ * 03/09/05 wvd 1.25 Change cf_ttag_bkgd to cf_scale_bkgd,
+ * pass weights array to it.
+ * 04/12/05 wvd 1.27 Add -n flag, which forces extraction
+ * of night-only spectrum. Its argument
+ * is the name of a night-only BPM file.
+ * 06/15/05 wvd 1.28 BUG FIX: program always read the
+ * point-source probability arrays from
+ * the WGTS_CAL file. Now uses value
+ * of extended to determine which HDU
+ * to read.
+ * 11/23/05 wvd 1.29 Add flag to disable optimal
+ * extraction from the command line.
+ * 01/27/06 wvd 1.30 Add flag to force use of optimal
+ * extraction from the command line.
+ * 05/19/06 wvd 1.31 Don't discard spectra with non-zero
+ * values of EXP_STAT.
+ * 06/12/06 wvd 1.32 Change cf_if_warning to cf_verbose.
+ *
+ ****************************************************************************/
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include "calfuse.h"
+
+static char CF_PRGM_ID[] = "cf_extract_spectra";
+static char CF_VER_NUM[] = "1.32";
+
+int
+main(int argc, char *argv[])
+{
+ char *bpm_file=NULL, *outrootname = NULL;
+ unsigned char *channel=NULL, *timeflags=NULL, *loc_flags=NULL;
+ unsigned char *time_status=NULL;
+ int extended, status=0, optc, j, tscreen=1;
+ int binx, biny, bnx[2], bny[2], bymin[2], aper[2];
+ int night_only=FALSE, optimal=FALSE;
+ int force_optimal=FALSE, override_optimal=FALSE;
+ long nevents=0, ntimes=0, ngood=0, dtime=0, ntime=0, *good_index=NULL;
+ float *weight=NULL, *x=NULL, *y=NULL, *lambda=NULL;
+ float exptime, *bpmask=NULL ;
+ float *bimage[2]={NULL, NULL};
+
+ fitsfile *memp, *header;
+
+ char opts[] = "hn:ofr:sv:";
+ char usage[] =
+ "Usage:\n"
+ " cf_extract_spectra [-hsof] [-n bpm_filename] [-r rootname] [-v level]"
+ " idf_file\n";
+ char option[] =
+ "Options:\n"
+ " -h: this help message\n"
+ " -n: extract night-only spectrum using given bad-pixel map\n"
+ " -o: disable optimal extraction\n"
+ " -f: force optimal extraction\n"
+ " -r: override the default rootname\n"
+ " -s: do not perform screening on time flags\n"
+ " -v: verbosity level (=1; 0 is silent)\n" ;
+
+ verbose_level = 1;
+
+ while ((optc = getopt(argc, argv, opts)) != -1) {
+ switch(optc) {
+
+ case 'h':
+ printf("%s\n%s", usage, option);
+ return 0;
+ case 'n':
+ bpm_file = optarg;
+ night_only = TRUE;
+ break;
+ case 'o':
+ override_optimal = TRUE;
+ break;
+ case 'f':
+ force_optimal = TRUE;
+ break;
+ case 'r':
+ outrootname = optarg;
+ break;
+ case 'v':
+ verbose_level = atoi(optarg);
+ break;
+ case 's':
+ tscreen = 0 ;
+ break;
+ }
+ }
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ if (argc <= optind) {
+ printf("%s", usage);
+ return -1;
+ }
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ /* Open input data file. */
+ FITS_open_file(&header, argv[optind], READONLY, &status);
+ FITS_read_key(header, TFLOAT, "EXPTIME", &exptime, NULL, &status);
+
+ FITS_movabs_hdu(header, 2, NULL, &status);
+ nevents = cf_read_col(header, TFLOAT, "WEIGHT", (void **) &weight);
+ nevents = cf_read_col(header, TFLOAT, "X", (void **) &x);
+ nevents = cf_read_col(header, TFLOAT, "Y", (void **) &y);
+ nevents = cf_read_col(header, TBYTE, "CHANNEL", (void **) &channel);
+ nevents = cf_read_col(header, TBYTE, "TIMEFLGS", (void **) &timeflags);
+ nevents = cf_read_col(header, TBYTE, "LOC_FLGS", (void **) &loc_flags);
+ nevents = cf_read_col(header, TFLOAT, "LAMBDA", (void **) &lambda);
+
+ FITS_movabs_hdu(header, 4, NULL, &status);
+ ntimes = cf_read_col(header, TBYTE, "STATUS_FLAGS", (void **) &time_status);
+
+ /*
+ * Copy header of IDF into memory, close IDF,
+ * and pass copy of header to subsequent routines.
+ */
+ FITS_movabs_hdu(header, 1, NULL, &status);
+ FITS_create_file(&memp, "mem://", &status);
+ FITS_copy_hdu(header, memp, 0, &status);
+ FITS_close_file(header, &status);
+ header = memp;
+
+ /* If night-only spectrum is requested, modify header accordingly. */
+ if (night_only) {
+ cf_verbose(3, "Night-only spectrum requested from command line.");
+ FITS_read_key(header, TFLOAT, "EXPNIGHT", &exptime, NULL, &status);
+ FITS_update_key(header, TFLOAT, "EXPTIME", &exptime, NULL, &status);
+ FITS_update_key(header, TSTRING, "DAYNIGHT", "NIGHT", NULL, &status);
+ FITS_update_key(header, TSTRING, "BPM_CAL", bpm_file, NULL, &status);
+ }
+
+ extended = cf_source_aper(header, aper);
+
+ /* Determine whether to attempt optimal extraction. */
+ if (override_optimal) {
+ cf_verbose (1, "User set -o flag. No optimal extraction.");
+ optimal=FALSE;
+ }
+ else if (force_optimal) {
+ cf_verbose (1, "User set -f flag. Forcing use of optimal extraction.");
+ optimal=TRUE;
+ }
+ else cf_standard_or_optimal_extraction(header, &optimal);
+
+ /* Make list of all photons that satisfy requested screenings. */
+ cf_apply_filters(header, tscreen, nevents, timeflags, loc_flags,
+ ntimes, time_status, &dtime, &ntime, &ngood, &good_index);
+
+ /* Generate model backgrounds for LiF and SiC channels. */
+ cf_scale_bkgd(header, nevents, x, y, weight, channel, timeflags,
+ loc_flags, ngood, good_index, dtime, ntime, &binx, &biny,
+ &bnx[0], &bny[0], &bymin[0], &bimage[0],
+ &bnx[1], &bny[1], &bymin[1], &bimage[1]);
+
+ /* Run once for each of LiF and SiC target channels. */
+ for (j=0; j<2; j++) {
+ int pny, valid_spectrum=TRUE;
+ float pycent, wpc;
+ long *counts_out=NULL, i, nout=0, nphotons=0;
+ float *wave_out=NULL, *bkgd_out=NULL, *flux_out=NULL, *sigma_out=NULL;
+ float *weights_out=NULL, *barray=NULL, *parray=NULL;
+ short *bpix_out=NULL;
+ unsigned char *channel_temp=NULL;
+
+ /* Generate output wavelength array. */
+ cf_make_wave_array(header, aper[j], &nout, &wave_out);
+
+ /* If no data, generate null-valued output arrays. */
+ for (i = 0; i < ngood; i++) {
+ if (channel[good_index[i]] == aper[j]) {
+ nphotons++;
+ break;
+ }
+ }
+ if (exptime < 1. || nphotons < 1) {
+ bkgd_out = (float *) cf_calloc(nout, sizeof(float));
+ bpix_out = (short *) cf_calloc(nout, sizeof(short));
+ counts_out = (long *) cf_calloc(nout, sizeof(long));
+ flux_out = (float *) cf_calloc(nout, sizeof(float));
+ sigma_out = (float *) cf_calloc(nout, sizeof(float));
+ weights_out = (float *) cf_calloc(nout, sizeof(float));
+ valid_spectrum=FALSE;
+ cf_verbose(1, "No data for aperture %d. Generating "
+ "null-valued output spectrum.", aper[j]);
+ }
+ else { /* Extract target spectrum. */
+
+ /* Bin background model to match output wavelength array. */
+ cf_rebin_background(header, aper[j], nout, wave_out,
+ binx, biny, bnx[j], bny[j], bimage[j], &barray);
+
+ /* Use QUAL_CAL files to create a bad-pixel mask for this exposure. */
+ cf_make_mask(header, aper[j], nout, wave_out, bny[j], bymin[j],
+ &bpmask);
+
+ /* Bin the weights/probability array to match output wave array. */
+ cf_rebin_probability_array(header, extended, aper[j], nout,
+ wave_out, &pny, &pycent, &parray);
+
+ /* Use optimal extraction if possible, standard extraction otherwise. */
+ cf_optimal_extraction(header, optimal, aper[j],
+ weight, y, channel, lambda, ngood, good_index,
+ barray, bpmask, pny, pycent, parray, nout, wave_out, &flux_out,
+ &sigma_out, &counts_out, &weights_out, &bkgd_out, &bpix_out);
+
+ /* Optimal-extraction routine returns flux_out and sigma_out in units
+ of counts. Must flux-calibrate both arrays. */
+ channel_temp =
+ (unsigned char *) cf_malloc(sizeof(unsigned char) * nout);
+ memset (channel_temp, aper[j], sizeof(unsigned char) * nout);
+ FITS_read_key(header, TFLOAT, "WPC", &wpc, NULL, &status);
+ FITS_update_key(header, TSTRING, "FLUX_COR", "PERFORM", NULL,
+ &status) ;
+ cf_convert_to_ergs(header, nout, flux_out, flux_out, channel_temp,
+ wave_out);
+ FITS_update_key(header, TSTRING, "FLUX_COR", "PERFORM", NULL,
+ &status) ;
+ cf_convert_to_ergs(header, nout, sigma_out, sigma_out, channel_temp,
+ wave_out);
+ free(channel_temp);
+
+ /* Divide flux and errors by EXPTIME * WPC to get units of erg/cm2/s/A. */
+ for (i = 0; i < nout; i++) {
+ flux_out[i] /= exptime * wpc;
+ sigma_out[i] /= exptime * wpc;
+ }
+ }
+
+ /* Write extracted spectrum to output file. */
+ cf_write_extracted_spectrum(header, aper[j], valid_spectrum,
+ nout, wave_out, flux_out, sigma_out, counts_out,
+ weights_out, bkgd_out, bpix_out, outrootname);
+
+ free(counts_out);
+ free(bkgd_out);
+ free(weights_out);
+ free(sigma_out);
+ free(flux_out);
+ free(wave_out);
+ free(bpix_out) ;
+ free(parray);
+ free(barray);
+ }
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+ FITS_delete_file(header, &status);
+
+ free(bimage[1]);
+ free(bimage[0]);
+ free(lambda);
+ free(loc_flags);
+ free(timeflags);
+ free(channel);
+ free(y);
+ free(x);
+ free(weight);
+ free(time_status);
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+ return 0;
+}
diff --git a/src/fuv/cf_flux_calibrate.c b/src/fuv/cf_flux_calibrate.c
new file mode 100644
index 0000000..2ad92e6
--- /dev/null
+++ b/src/fuv/cf_flux_calibrate.c
@@ -0,0 +1,173 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_flux_calibrate options intermediate_file
+ *
+ * Description: Flux calibrate each photon assigned to a channel.
+ *
+ * ** NEXT STEPS COMMENTED OUT FOR NOW **
+ * For each photon in the target aperture,
+ * apply astigmatism correction to XFARF array and use the
+ * resulting coordinate system to apply flat-field and
+ * worm corrections to photon weights.
+ *
+ * By default all corrections are performed. Command line
+ * options allow one or more corrections to be omitted.
+ *
+ * Arguments: input_file Intermediate data file
+ *
+ * Calibration files: AEFF_CAL
+ *
+ * Returns: 0 on successful completion
+ *
+ * Calls: cf_effective_area, cf_astig_farf, cf_flat_field,
+ * cf_worm_correction
+ *
+ * History: 12/06/02 wvd 1.1 Begin work
+ * 02/12/03 wvd 1.2 Read ERGCM2S from IDF
+ * Move cf_convert_to_ergs to end of
+ * module
+ * 03/11/03 wvd 1.3 Change channel to type char
+ * 03/12/03 wvd 1.4 If ERGCM2S[i] is undefined,
+ * set channel[i] = 0
+ * 03/19/03 peb 1.5 Added verbose_level option.
+ * 05/06/03 rdr 1.6 Read from column ERGCM2 rather
+ * than ERGCM2S
+ * 05/07/03 wvd 1.7 Change ergcm2s to ergcm2
+ * 06/11/03 wvd 1.8 Pass datatype to cf_read_col and
+ * cf_write_col.
+ * Comment out call to cf_astig_farf().
+ * 08/25/03 wvd 1.9 Change coltype from string to int in
+ * cf_read_col and cf_write_col.
+ * 09/17/03 wvd 1.10 Add some documentation.
+ * 09/17/03 wvd 1.11 Change channel to unsigned char.
+ * 05/20/05 wvd 1.12 Clean up i/o.
+ *
+ ****************************************************************************/
+
+#include <unistd.h>
+#include <stdlib.h>
+#include "calfuse.h"
+
+static char CF_PRGM_ID[] = "cf_flux_calibrate";
+static char CF_VER_NUM[] = "1.12";
+
+int
+main(int argc, char *argv[])
+{
+ unsigned char *channel=NULL;
+ int effective_area=1, astig_farf=1, flat_field=1, worm_correction=1;
+ int status=0, hdutype, optc;
+ long nevents, nseconds;
+ float *time=NULL, *ttime=NULL, *xfarf=NULL, *yfarf=NULL, *weight=NULL;
+ float *lambda=NULL, *ycentl=NULL, *ycents=NULL, *ergcm2=NULL;
+ fitsfile *header;
+
+ char opts[] = "heafwv:";
+ char usage[] =
+ "Usage:\n"
+ " cf_flux_calibrate [-heafw] [-v level] idf_file\n";
+ char option[] =
+ "Options:\n"
+ " -h: this help message\n"
+ " -v: verbosity level (default is 1; 0 is silent)\n"
+ " -e: no effective-area calibration\n"
+ " -a: no astigmatism correction of XFARF array\n"
+ " -f: no flat-field correction\n"
+ " -w: no worm correction\n";
+
+ verbose_level = 1;
+
+ while ((optc = getopt(argc, argv, opts)) != -1) {
+ switch(optc) {
+
+ case 'h':
+ printf("%s\n%s", usage, option);
+ return 0;
+ case 'v':
+ verbose_level = atoi(optarg);
+ break;
+ case 'e':
+ effective_area = 0;
+ break;
+ case 'a':
+ astig_farf = 0;
+ break;
+ case 'f':
+ flat_field = 0;
+ break;
+ case 'w':
+ worm_correction = 0;
+ break;
+ }
+ }
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ if (argc != optind+1) {
+ printf("%s", usage);
+ cf_if_error("Incorrect number of command-line arguments");
+ }
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ FITS_open_file(&header, argv[optind], READWRITE, &status);
+
+ FITS_movabs_hdu(header, 2, &hdutype, &status);
+ nevents = cf_read_col(header, TFLOAT, "TIME", (void **) &time);
+ nevents = cf_read_col(header, TFLOAT, "WEIGHT", (void **) &weight);
+ nevents = cf_read_col(header, TFLOAT, "XFARF", (void **) &xfarf);
+ nevents = cf_read_col(header, TFLOAT, "YFARF", (void **) &yfarf);
+ nevents = cf_read_col(header, TBYTE, "CHANNEL", (void **) &channel);
+ nevents = cf_read_col(header, TFLOAT, "LAMBDA", (void **) &lambda);
+ nevents = cf_read_col(header, TFLOAT, "ERGCM2", (void **) &ergcm2);
+
+ FITS_movabs_hdu(header, 4, &hdutype, &status) ;
+ nseconds = cf_read_col(header, TFLOAT, "TIME", (void **) &ttime) ;
+ nseconds = cf_read_col(header, TFLOAT, "YCENT_LIF", (void **) &ycentl) ;
+ nseconds = cf_read_col(header, TFLOAT, "YCENT_SIC", (void **) &ycents) ;
+
+ FITS_movabs_hdu(header, 1, &hdutype, &status);
+
+ /***************************************************************************
+ * Since we currently have no flat-field or worm correction,
+ * these subroutines are commented out.
+ *
+ if (astig_farf)
+ cf_astig_farf(header, nevents, xfarf, yfarf, channel, time,
+ nseconds, ttime, ycentl, ycents);
+ if (flat_field)
+ cf_flat_field(header, nevents, time, weight, xfarf, yfarf, channel,
+ nseconds, ttime, ycentl, ycents);
+
+ if (worm_correction)
+ cf_worm_correction(header, nevents, time, weight, xfarf, yfarf, channel,
+ nseconds, ttime, ycentl, ycents);
+ ***************************************************************************/
+
+ if (effective_area)
+ cf_convert_to_ergs(header, nevents, weight, ergcm2, channel, lambda);
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+ FITS_movabs_hdu(header, 2, &hdutype, &status);
+ cf_write_col(header, TFLOAT, "WEIGHT", (void *) weight, nevents);
+ cf_write_col(header, TBYTE, "CHANNEL", (void *) channel, nevents);
+ cf_write_col(header, TFLOAT, "ERGCM2", (void *) ergcm2, nevents);
+
+ FITS_close_file(header, &status);
+
+ free(time);
+ free(weight);
+ free(xfarf);
+ free(yfarf);
+ free(channel);
+ free(lambda);
+ free(ergcm2);
+ free(ttime);
+ free(ycentl);
+ free(ycents);
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+ return 0;
+}
diff --git a/src/fuv/cf_gainmap.c b/src/fuv/cf_gainmap.c
new file mode 100644
index 0000000..63ed3f7
--- /dev/null
+++ b/src/fuv/cf_gainmap.c
@@ -0,0 +1,610 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_gainmap input_files
+ *
+ * Description: Adds the counts from a list of input ttag idf files into
+ * the gain map. The accumulated gain map cube is
+ * determined by reading the GAIN_CAL keyword in the
+ * input file's header. To prevent multiple copies
+ * of reprocessed input files from being added to
+ * the total exposure map, the gain map contains an
+ * index list of the files which have been added.
+ * The new file is skipped if it is in the list.
+ *
+ *
+ * Arguments: input_files Input ttag IDF FITS file name
+ *
+ * Calibration files required: None
+ *
+ * Returns: int 0 = successful completion
+ *
+ * Note: This routine requires significantly more memory than your
+ * average routine. Its design has not been optimized to
+ * reduce memory usage.
+ *
+ * History: 03/31/03 1.1 peb Finished work.
+ * Based on cf_ttag_countmap.
+ * 06/11/03 1.2 wvd Pass datatype to cf_read_col
+ * 08/25/03 1.3 wvd Change coltype from string to int in
+ * cf_read_col.
+ * 01/09/04 1.4 bjg Change CHIDCOR1 to CHID_COR
+ * 02/17/04 1.5 bjg Added scaling option
+ * histogram files given in the argument
+ * list are ignored
+ * 02/26/04 1.6 bjg Bug Fix. Routine name changed from
+ * cf_ttag_gainmap to cf_gainmap.
+ * Added option to select coordinates
+ * to use: RAW, FARF (default), final
+ * Print ignored HIST files
+ * 04/08/04 1.7 bjg Remove unused function get_xy_columns
+ * Use cf_verbose instead of printf
+ * 04/27/04 1.8 bjg Added lower and upper limits option
+ * for PHA
+ * Change author name of gainfile
+ * 08/26/04 1.9 bjg In force mode, issue a warning
+ * if file already included.
+ * 03/02/05 1.10 wvd Use FLOAT_IMG to insure that output
+ * images are written as floats.
+ * 03/02/05 1.11 wvd Don't write AUTHOR keyword to header.
+ * 04/11/05 1.12 wvd Force detector string to be upper case.
+ * Add -t option, which prevents creation
+ * of detector image for PHA=31. It's
+ * required if you don't bin the data.
+ * 06/03/05 1.13 wvd Include ctype.h
+ * 09/09/05 1.14 wvd Update list of allowed options.
+ * 08/24/07 1.15 bot Changed nx and ny to long and called
+ * as TLONG ; changed binx and biny to int
+ * and called as TINT.
+ *
+ ****************************************************************************/
+
+#include <ctype.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include "calfuse.h"
+
+#define ROOT_LENGTH 13
+#define MAXCHARS 120
+#define MASTER_CAL_FILE "master_calib_file.dat"
+#define IMAGE_EXT 1
+#define INDEX_EXT 34
+
+static char CF_PRGM_ID[] = "cf_gainmap";
+static char CF_VER_NUM[] = "1.15";
+
+
+static int
+new_gainfile(char *newfile, char *detector, float effmjd, int binx, int biny, int truncate)
+{
+ char date[FLEN_CARD]={'\0'};
+ char *ttype[] = {"ROOTNAME", "OBSDATE", "COUNTS", "EXPTIME", "ADDDATE", "SCALE", "PHAMIN", "PHAMAX"};
+ char *tform[] = {"13A", "19A", "1D", "1E", "19A", "1E", "1I", "1I"};
+ char *tunit[] = {" ", " ", "counts", "seconds", " ", " ", " ", " "};
+ int naxis=2, status=0, version=1, tref=0, tfields=8, phaext;
+ long axis[2], naxis2=0;
+ float exptime=0.;
+ double ncounts=0.;
+ fitsfile *gainfits;
+
+ cf_verbose(3, "Entering subroutine new_gainfile");
+ cf_verbose(3, "Creating file %s", newfile);
+
+ FITS_create_file(&gainfits, newfile, &status);
+
+ FITS_create_img(gainfits, 8, 0, NULL, &status);
+ FITS_write_key(gainfits, TSTRING, "CALFTYPE", "GAIN",
+ "Calibration file type", &status);
+ FITS_write_key(gainfits, TINT, "CALFVERS", &version,
+ "Calibration file version", &status);
+ FITS_write_key(gainfits, TSTRING, "DETECTOR", detector,
+ "detector (1A, 1B, 2A, 2B)", &status);
+ FITS_write_key(gainfits, TFLOAT, "EFFMJD", &effmjd,
+ "Date on which file should be applied (MJD)", &status);
+ fits_get_system_time(date, &tref, &status);
+ FITS_write_key(gainfits, TSTRING, "DATE", date,
+ "file creation date (YYYY-MM-DDThh:mm:ss UTC)", &status);
+ FITS_write_key(gainfits, TDOUBLE, "NEVENTS", &ncounts,
+ "Accumulated weighted events", &status);
+ FITS_write_key(gainfits, TFLOAT, "EXPTIME", &exptime,
+ "Accumulated exposure time", &status);
+
+ axis[0] = NXMAX/binx;
+ axis[1] = NYMAX/biny;
+ for (phaext=0; phaext<32-truncate; phaext++) {
+
+ cf_verbose(3, "Creating extension %d", phaext);
+ FITS_create_img(gainfits, FLOAT_IMG, naxis, axis, &status);
+ FITS_write_key(gainfits, TINT, "PHA", &phaext,
+ "PHA value of image", &status);
+ FITS_write_key(gainfits, TINT, "SPECBINX", &binx,
+ "Binsize in detector X coordinate", &status);
+ FITS_write_key(gainfits, TINT, "SPECBINY", &biny,
+ "Binsize in detector Y coordinate", &status);
+
+ }
+
+ cf_verbose(3, "Creating binary table extension");
+ FITS_create_tbl(gainfits, BINARY_TBL, naxis2, tfields, ttype, tform, tunit,
+ "PROCESSED FILES", &status);
+
+ cf_verbose(3, "Closing file %s", newfile);
+ FITS_close_file(gainfits, &status);
+ cf_verbose(3, "Exiting new_gainfile");
+ return status;
+}
+
+static int
+_check_index(fitsfile *gainfits, char *rootname, float *scale, int *phamin,
+ int *phamax, int truncate)
+{
+ int status=0, anynull=0, hdutype;
+ float *scal;
+ int *phami, *phama;
+ long j, nrows, frow=1, felem=1;
+ char **filename, strnull[] = " ";
+
+ FITS_movabs_hdu(gainfits, INDEX_EXT-truncate, &hdutype, &status);
+ FITS_read_key(gainfits, TLONG, "NAXIS2", &nrows, NULL, &status);
+
+ filename = (char **) cf_malloc(nrows * sizeof(char *));
+ filename[0] = (char *) cf_malloc(nrows*(ROOT_LENGTH+1)*sizeof(char));
+ scal = (float *) cf_malloc(nrows * sizeof(float));
+ phami = (int *) cf_malloc(nrows * sizeof(int));
+ phama = (int *) cf_malloc(nrows * sizeof(int));
+ for (j=1; j<nrows; j++)
+ filename[j] = filename[j-1]+(ROOT_LENGTH+1);
+
+ FITS_read_col(gainfits, TSTRING, 1, frow, felem, nrows, strnull,
+ filename, &anynull, &status);
+ FITS_read_col(gainfits, TFLOAT, 6, frow, felem, nrows, strnull,
+ scal, &anynull, &status);
+ FITS_read_col(gainfits, TINT, 7, frow, felem, nrows, strnull,
+ phami, &anynull, &status);
+ FITS_read_col(gainfits, TINT, 8, frow, felem, nrows, strnull,
+ phama, &anynull, &status);
+
+ for (j=0; j<nrows; j++) {
+ if (strncmp(filename[j], rootname, strlen(rootname)) == 0) {
+ *scale = scal[j];
+ *phamin = phami[j];
+ *phamax = phama[j];
+ free(filename[0]);
+ free(filename);
+ free(scal);
+ free(phami);
+ free(phama);
+ return j+1;
+ }
+ }
+ free(filename[0]);
+ free(filename);
+ free(scal);
+ free(phami);
+ free(phama);
+ return 0;
+}
+
+static int
+_update_index(fitsfile *gainfits, char *rootname, char *obsdate,
+ double ncounts, float exptime, float scale, int phamin, int phamax,
+ int truncate)
+{
+ char *strptr[1], adddate[FLEN_CARD]={'\0'};
+ int status=0, hdutype, tref=0;
+ long nrows;
+
+ FITS_movabs_hdu(gainfits, INDEX_EXT-truncate, &hdutype, &status);
+ FITS_read_key(gainfits, TLONG, "NAXIS2", &nrows, NULL, &status);
+
+ strptr[0] = rootname;
+ FITS_write_col(gainfits, TSTRING, 1, nrows+1, 1, 1, strptr, &status);
+ strptr[0] = obsdate;
+ FITS_write_col(gainfits, TSTRING, 2, nrows+1, 1, 1, strptr, &status);
+ FITS_write_col(gainfits, TDOUBLE, 3, nrows+1, 1, 1, &ncounts, &status);
+ FITS_write_col(gainfits, TFLOAT, 4, nrows+1, 1, 1, &exptime, &status);
+ fits_get_system_time(adddate, &tref, &status);
+ strptr[0] = adddate;
+ fits_write_col(gainfits, TSTRING, 5, nrows+1, 1, 1, strptr, &status);
+ FITS_write_col(gainfits, TFLOAT, 6, nrows+1, 1, 1, &scale, &status);
+ fits_write_col(gainfits, TINT, 7, nrows+1, 1, 1, &phamin, &status);
+ FITS_write_col(gainfits, TINT, 8, nrows+1, 1, 1, &phamax, &status);
+ return 0;
+}
+
+
+static double
+add_events(fitsfile *infits, char *xcolumn, char *ycolumn, float scale,
+ int phamin, int phamax, fitsfile *gainfits)
+{
+ char *pha;
+ int binx, biny, phaext, status=0, hdutype, anynull=0;
+ long nevents, j;
+ long nx, ny;
+ float *xpos, *ypos, *weight, *image;
+ double ncounts=0.;
+
+ cf_verbose(3,"Entering add_events");
+
+ FITS_movabs_hdu(infits, 2, &hdutype, &status);
+ nevents = cf_read_col(infits, TFLOAT, xcolumn, (void **) &xpos);
+ nevents = cf_read_col(infits, TFLOAT, ycolumn, (void **) &ypos);
+ nevents = cf_read_col(infits, TBYTE, "PHA", (void **) &pha);
+ nevents = cf_read_col(infits, TFLOAT, "WEIGHT", (void **) &weight);
+
+ for (phaext=phamin; phaext<=phamax; phaext++) {
+ FITS_movabs_hdu(gainfits, phaext+2, &hdutype, &status);
+ if (hdutype == BINARY_TBL) {
+ cf_if_warning("Can't find image extension for PHA = %d", phaext);
+ break;
+ }
+ FITS_read_key(gainfits, TLONG, "NAXIS1", &nx, NULL, &status);
+ FITS_read_key(gainfits, TLONG, "NAXIS2", &ny, NULL, &status);
+ FITS_read_key(gainfits, TINT, "SPECBINX", &binx, NULL, &status);
+ FITS_read_key(gainfits, TINT, "SPECBINY", &biny, NULL, &status);
+
+ image = (float *) cf_malloc(sizeof(float)*nx*ny);
+ FITS_read_img(gainfits, TFLOAT, 1, nx*ny, NULL, image,
+ &anynull, &status);
+
+ for (j=0; j<nevents; j++) {
+ if (pha[j] == phaext) {
+ int x, y;
+ x = xpos[j];
+ y = ypos[j];
+ if ((x >= 0) && (x < nx*binx) && (y >= 0) && (y < ny*biny)) {
+ image[(y/biny)*nx + (x/binx)] += weight[j]*scale;
+ ncounts += weight[j]*scale;
+ }
+ }
+ }
+ FITS_write_img(gainfits, TFLOAT, 1, nx*ny, image, &status);
+ free(image);
+ }
+
+ free(weight);
+ free(pha);
+ free(ypos);
+ free(xpos);
+ return ncounts;
+}
+
+static double
+subtract_events(fitsfile *infits, char *xcolumn, char *ycolumn,
+ float scale, int phamin, int phamax, fitsfile *gainfits)
+{
+ char *pha;
+ long nx, ny;
+ int phaext, status=0, hdutype, anynull=0, binx, biny;
+ long nevents, j;
+ float *xpos, *ypos, *weight, *image;
+ double ncounts=0.;
+
+ FITS_movabs_hdu(infits, 2, &hdutype, &status);
+ nevents = cf_read_col(infits, TFLOAT, xcolumn, (void **) &xpos);
+ nevents = cf_read_col(infits, TFLOAT, ycolumn, (void **) &ypos);
+ nevents = cf_read_col(infits, TBYTE, "PHA", (void **) &pha);
+ nevents = cf_read_col(infits, TFLOAT, "WEIGHT", (void **) &weight);
+
+ for (phaext=phamin; phaext<=phamax; phaext++) {
+ FITS_movabs_hdu(gainfits, phaext+2, &hdutype, &status);
+ FITS_read_key(gainfits, TLONG, "NAXIS1", &nx, NULL, &status);
+ FITS_read_key(gainfits, TLONG, "NAXIS2", &ny, NULL, &status);
+ FITS_read_key(gainfits, TINT, "SPECBINX", &binx, NULL, &status);
+ FITS_read_key(gainfits, TINT, "SPECBINY", &biny, NULL, &status);
+
+ image = (float *) cf_malloc(sizeof(float) * nx*ny);
+ FITS_read_img(gainfits, TFLOAT, 1, nx*ny, NULL, image,
+ &anynull, &status);
+
+ for (j=0; j<nevents; j++) {
+ if (pha[j] == phaext) {
+ int x, y;
+ x = xpos[j];
+ y = ypos[j];
+ if ((x >=0) && (x < nx*binx) && (y >= 0) && (y < ny*biny)) {
+ image[(y/biny)*nx + (x/binx)] -= weight[j]*scale;
+ ncounts += weight[j]*scale;
+ }
+ }
+ }
+ FITS_write_img(gainfits, TFLOAT, 1, nx*ny, image, &status);
+ free(image);
+ }
+
+ free(weight);
+ free(pha);
+ free(ypos);
+ free(xpos);
+ return ncounts;
+}
+
+
+int main(int argc, char *argv[])
+{
+ char *newfile = NULL, *detector = NULL, buffer[FLEN_CARD]={'\0'}, instmode[FLEN_CARD]={'\0'};
+ int subtract=0, force=0, newbinx=8, newbiny=4, status=0, optc;
+ int truncate=0;
+ float effmjd = 0.,scale=1., old_scale;
+ int phamin=0, phamax=31;
+ int old_phamin, old_phamax;
+
+ char xcolumn[FLEN_CARD]={'\0'}, ycolumn[FLEN_CARD]={'\0'};
+
+ char opts[] = "hv:fsrtcn:d:j:w:x:y:l:u:";
+ char usage[] =
+ "Usage:\n"
+ " cf_gainmap [-hfsrtc] [-v level] [-n filename] [-d segment]\n"
+ " [-w scale] [-j effmjd] [-x xbin] [-y ybin] \n"
+ " [-l phamin] [-u phamax] idffiles\n";
+ char option[] =
+ "Options:\n"
+ " -h: this help message\n"
+ " -v: verbosity level (=1; 0 is silent)\n"
+ " -f: force the files\n"
+ " -s: subtract files\n"
+ " -n: gain map file\n"
+ " -d: gain map segment (no default for new file)\n"
+ " -j: effective MJD (=0.0)\n"
+ " -w: weighting factor for image (=1.0)\n"
+ " -x: X-bin size (=8)\n"
+ " -y: Y-bin size (=4)\n"
+ " -r: use raw XY coordinates instead of farf\n"
+ " -t: truncate map at PHA = 30\n"
+ " -c: use final XY coordinates instead of farf\n"
+ " -l: lower limit for pha (=0) \n"
+ " -u: upper limit for pha (=31) \n";
+
+ verbose_level = 1;
+
+ strcpy(xcolumn, "XFARF");
+ strcpy(ycolumn, "YFARF");
+
+
+
+ /* Check number of options and arguments */
+ while ((optc = getopt(argc, argv, opts)) != -1) {
+ switch(optc) {
+
+ case 'h':
+ printf("%s\n%s", usage, option);
+ return 0;
+ case 'v':
+ verbose_level = atoi(optarg);
+ break;
+ case 'f':
+ force = 1;
+ break;
+ case 's':
+ subtract = 1;
+ break;
+ case 'n':
+ newfile = optarg;
+ break;
+ case 'd':
+ detector = optarg;
+ break;
+ case 'j':
+ effmjd = atof(optarg);
+ break;
+ case 'w':
+ scale = atof(optarg);
+ break;
+ case 'x':
+ newbinx = atoi(optarg);
+ break;
+ case 'y':
+ newbiny = atoi(optarg);
+ break;
+ case 'r':
+ strcpy(xcolumn, "XRAW");
+ strcpy(ycolumn, "YRAW");
+ break;
+ case 't':
+ truncate = 1;
+ break;
+ case 'c':
+ strcpy(xcolumn, "X");
+ strcpy(ycolumn, "Y");
+ break;
+ case 'l':
+ phamin = atoi(optarg);
+ break;
+ case 'u':
+ phamax = atoi(optarg);
+ break;
+ }
+ }
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ if (argc <= optind)
+ cf_if_error("%s\nIncorrect number of program arguments", usage);
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin processing");
+
+ while (optind < argc) {
+
+ char gainfile[FLEN_CARD], rootname[FLEN_CARD]={'\0'};
+ char segment[FLEN_CARD] = {'\0'};
+ int hdutype;
+ FILE *fptr;
+ fitsfile *infits, *gainfits;
+
+ FITS_open_file(&infits, argv[optind], READONLY, &status);
+ FITS_movabs_hdu(infits, 1, &hdutype, &status);
+
+ FITS_read_key(infits, TSTRING, "INSTMODE", instmode, NULL,
+ &status);
+
+ if (strncmp(instmode,"TTAG",4)){
+ FITS_close_file(infits, &status);
+ cf_verbose(1,"Skipped HIST file: %s\n",argv[optind]);
+ optind ++;
+ continue;
+ }
+
+ if (newfile) {
+ cf_verbose(3, "newfile is TRUE");
+ strcpy(gainfile, newfile);
+
+ if ((fptr = fopen(gainfile, "r")))
+ fclose(fptr);
+ else {
+ if (!detector)
+ cf_if_error("No detector segment specified: "
+ "1A, 1B, 2A, 2B");
+ detector[1] = toupper(detector[1]);
+ status = new_gainfile(gainfile, detector, effmjd,
+ newbinx, newbiny, truncate);
+ }
+ FITS_open_file(&gainfits, gainfile, READWRITE, &status);
+ FITS_movabs_hdu(gainfits, 1, &hdutype, &status);
+ detector = buffer;
+ FITS_read_key(gainfits, TSTRING, "DETECTOR", detector, NULL,
+ &status);
+ } else {
+ cf_verbose(3, "newfile is FALSE");
+ FITS_read_key(infits, TSTRING, "GAIN_MAP", gainfile, NULL,
+ &status);
+ detector = buffer;
+ FITS_read_key(infits, TSTRING, "DETECTOR", detector, NULL,
+ &status);
+
+ if ((fptr = fopen(cf_hist_file(gainfile), "r"))) {
+ fclose(fptr);
+ } else {
+ char keyword[FLEN_CARD]={'\0'}, segment[FLEN_CARD]={'\n'};
+ char linin[MAXCHARS]={'\0'}, filename[FLEN_CARD]={'\0'};
+ int interp;
+ float aftermjd;
+ FILE *master;
+ /*
+ * Get the effective MJD from the master calibration file
+ */
+ master = fopen(cf_parm_file(MASTER_CAL_FILE), "r");
+ if (master == NULL)
+ cf_if_error("Master calibration database file not found");
+ while (fgets(linin, MAXCHARS, master) != NULL) {
+ /*
+ * Check for comment lines
+ */
+ if ((linin[0] != '#') && (linin[0] != '\n')) {
+ sscanf(linin, "%4c%*2c%2c%*2c%13c%*2c%9f%*2c%1d",
+ keyword, segment, filename, &aftermjd, &interp);
+ if (strcmp(filename, gainfile) == 0) {
+ effmjd = aftermjd;
+ break;
+ }
+ }
+ }
+ fclose(master);
+
+ status = new_gainfile(cf_hist_file(gainfile), detector,
+ effmjd, newbinx, newbiny, truncate);
+ }
+ FITS_open_file(&gainfits, cf_hist_file(gainfile), READWRITE,
+ &status);
+ }
+
+ strncpy(rootname, argv[optind], ROOT_LENGTH);
+ FITS_read_key(infits, TSTRING, "DETECTOR", segment, NULL, &status);
+ if (strcmp(detector, segment) != 0) {
+ cf_if_warning("%s segment is not the same as %s",
+ argv[optind], gainfile);
+ }
+ else if (subtract) {
+ int index;
+ if ((index = _check_index(gainfits, rootname, &scale, &phamin,
+ &phamax, truncate))) {
+
+ int hdutype;
+ float exptime=0., acctime=0.;
+ double ncounts=0, accevnt=0;
+
+ FITS_read_key(infits, TFLOAT, "EXPTIME", &exptime, NULL,
+ &status);
+
+
+ ncounts = subtract_events(infits, xcolumn, ycolumn, scale, phamin,
+ phamax-truncate, gainfits);
+
+ FITS_movabs_hdu(gainfits, IMAGE_EXT, &hdutype, &status);
+ FITS_read_key(gainfits, TDOUBLE, "NEVENTS", &accevnt,
+ NULL, &status);
+ FITS_read_key(gainfits, TFLOAT, "EXPTIME", &acctime,
+ NULL, &status);
+ accevnt -= ncounts;
+ acctime -= exptime;
+ FITS_update_key(gainfits, TDOUBLE, "NEVENTS", &accevnt,
+ NULL, &status);
+ FITS_update_key(gainfits, TFLOAT, "EXPTIME", &acctime,
+ NULL, &status);
+
+ FITS_movabs_hdu(gainfits, INDEX_EXT-truncate, &hdutype, &status);
+ FITS_delete_rows(gainfits, index, 1, &status);
+ cf_verbose(1, "%s is subtracted from %s",
+ argv[optind], gainfile);
+ } else {
+ cf_if_warning("%s is not in %s.", argv[optind], gainfile);
+ }
+ } else {
+ cf_verbose(3, "Adding new data file.");
+ if (!force && _check_index(gainfits, rootname, &old_scale,
+ &old_phamin, &old_phamax, truncate)) {
+ cf_if_warning("%s is already in %s with scale = %f, "
+ "phamin = %d, phamax=%d.",
+ argv[optind], gainfile, old_scale, old_phamin, old_phamax);
+ } else {
+ char obsdate[FLEN_CARD]={'\0'}, dateobs[FLEN_CARD]={'\0'};
+ char timeobs[FLEN_CARD]={'\0'};
+
+ float exptime=0., acctime=0.;
+ double ncounts=0, accevnt=0;
+
+ FITS_read_key(infits, TSTRING, "DATEOBS", dateobs, NULL,
+ &status);
+ FITS_read_key(infits, TSTRING, "TIMEOBS", timeobs, NULL,
+ &status);
+ obsdate[0] = '\0';
+ sprintf(obsdate, "%s%s%s", dateobs, "T", timeobs);
+ FITS_read_key(infits, TFLOAT, "EXPTIME", &exptime, NULL,
+ &status);
+
+ if ((force) && _check_index(gainfits, rootname, &old_scale,
+ &old_phamin, &old_phamax, truncate))
+ cf_if_warning("FORCE MODE - %s is already in %s with scale = %f, "
+ "phamin = %d, phamax=%d.",
+ argv[optind], gainfile, old_scale, old_phamin, old_phamax);
+
+ ncounts = add_events(infits, xcolumn, ycolumn, scale, phamin,
+ phamax-truncate, gainfits);
+
+ FITS_movabs_hdu(gainfits, IMAGE_EXT, &hdutype, &status);
+ FITS_read_key(gainfits, TDOUBLE, "NEVENTS", &accevnt,
+ NULL, &status);
+ FITS_read_key(gainfits, TFLOAT, "EXPTIME", &acctime,
+ NULL, &status);
+ accevnt += ncounts;
+ acctime += exptime;
+ FITS_update_key(gainfits, TDOUBLE, "NEVENTS", &accevnt,
+ NULL, &status);
+ FITS_update_key(gainfits, TFLOAT, "EXPTIME", &acctime,
+ NULL, &status);
+
+ status = _update_index(gainfits, rootname, obsdate, ncounts,
+ exptime, scale, phamin, phamax, truncate);
+ cf_verbose(1, "%s is added to %s", argv[optind], gainfile);
+ }
+ }
+ FITS_close_file(gainfits, &status);
+ FITS_close_file(infits, &status);
+ optind ++;
+ }
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished processing");
+ return 0;
+}
diff --git a/src/fuv/cf_hist_init.c b/src/fuv/cf_hist_init.c
new file mode 100644
index 0000000..5829707
--- /dev/null
+++ b/src/fuv/cf_hist_init.c
@@ -0,0 +1,653 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_hist_init input_file output_file
+ *
+ * Description: Reads a raw hist file and generates a list of the pixels
+ * that contain counts. This list has the same format
+ * as a TTAG list, so analysis can be carried out using
+ * many of the modules in the TTAG pipeline.
+ *
+ * The output file will have the same format as a TTAG
+ * file, with the following definitions:
+ *
+ * TIME FLOAT all equal to the midpoint of the exp.
+ * XRAW INT raw x position
+ * YRAW INT raw y position (midpoint of 8 pixel bin)
+ * PHA BYTE all 20 - indicating a good point
+ * WEIGHT FLOAT number of photons falling in that bin
+ * XFARF FLOAT x position in geometrically
+ * corrected frame
+ * YFARF FLOAT y position in geometrically
+ * corrected frame
+ * X FLOAT final x position (after correcting
+ * for motions)
+ * Y FLOAT final y position (after correcting
+ * for motions)
+ * CHANNEL CHAR aperture ID for the photon
+ * TIMEFLGS CHAR temporal flags - various bits set
+ * LOC_FLGS CHAR location flags - various bits set
+ * LAMBDA FLOAT wavelength for each photon
+ * ERGCM2 FLOAT flux calibration for each photon
+ *
+ * This routine calls cf_fuv_init to populate the calibration
+ * entries in the header.
+ *
+ * In addition, the routine creates a timeline table containing
+ * the orbital information, count rates, and high-voltage
+ * information to be used by later pipeline modules.
+ *
+ *
+ * Returns: Zero upon successful completion.
+ *
+ * History: 05/09/03 v1.1 rdr Adapted from cf_ttag_init
+ * 06/04/03 v1.4 wvd Add call to cf_proc_check
+ * 06/10/03 v1.5 rdr Scan for hot pixels and remove
+ * 06/11/03 v1.6 wvd Compress data with TSCALE and TZERO
+ * 06/11/03 v1.7 wvd Changed calfusettag.h to calfuse.h
+ * 07/17/03 v1.8 wvd Move various subroutines to libcf.
+ * 07/22/03 v1.9 wvd Read all extensions of raw hist file.
+ * Test for hot pixels only in active
+ * region and only if img[j]>15.
+ * 07/28/03 v1.10 wvd Close ELEC_CAL.
+ * 10/26/03 v1.11 wvd Increase morekeys to 38.
+ * 11/05/03 v1.12 wvd Added stdlib.h and unistd.h.
+ * 12/05/03 bjg Modified cf_make_pixel_list
+ * to unbin data in y.
+ * 12/10/03 v1.13 bjg Unbin is now optional
+ * Update keyword SPECBINY
+ * 03/03/04 v1.14 rdr Exit if no photons found
+ * 03/05/04 v1.15 rdr Warning if data is missing
+ * 03/09/04 v1.16 rdr Fix error in correcting hot pixels
+ * 03/26/04 v1.17 rdr Continue when there is no data
+ * 03/30/04 v1.20 wvd Clean up i/o.
+ * 03/31/04 v1.21 bjg functions return EXIT_SUCCESS instead
+ * of zero.
+ * >>>Include math.h for fmod<<<
+ * Type conversion for
+ * double fmod(double, double)
+ * 04/06/04 v1.22 bjg Remove unused variables
+ * Change format to match arg type
+ * in printf
+ * Remove static keyword in struct key
+ * definition
+ * Add braces in TSCAL and TZERO
+ * definitions
+ * Test for fill data
+ * 10/15/04 v1.23 bjg Fill Data Photon gets flag
+ * LOCATION_FILL only if it is
+ * in Active Aperture
+ * 12/24/2004 v1.24 bjg npix_max now takes binx and biny into
+ * account
+ * 01/24/2005 v1.25 wvd Modify cf_make_pixel_list to ignore
+ * duplicate data, which can sneak in
+ * with the stim pulses.
+ * 02/11/2005 v1.26 wvd Hot pixels and fill data cause the
+ * header keyword NEVENTS to be too
+ * large, so we correct/exclude these
+ * points and update NEVENTS.
+ * 03/10/2005 v1.27 wvd Move flagging of airglow photons to
+ * cf_screen_airglow.
+ * Initialize XFARF and YFARF with zero.
+ * 05/20/2005 v1.28 wvd Clean up i/o.
+ * 05/31/2006 v1.29 wvd OPUS has been updated, so we can set
+ * morekeys to 0.
+ * 06/12/2006 v1.30 wvd Call cf_verbose rather than
+ * cf_if_warning when an extension
+ * contains no photons.
+ * 02/23/2007 v1.31 wvd If a raw hist file contains no
+ * extensions, set EXP_STAT to -1.
+ * Make active-area limits inclusive.
+ * 11/07/2008 v1.32 wvd Clean up i/o.
+ *
+ ****************************************************************************/
+
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <math.h>
+
+#include "calfuse.h"
+
+struct key {
+ char keyword[FLEN_KEYWORD];
+ float value;
+ };
+
+
+/*****************************************************************************/
+
+static int
+cf_make_pixel_list(fitsfile *infits, fitsfile *outfits, char unbin) {
+
+/*****************************************************************************
+ *
+ * Description: procedure to take input data from the raw HIST data file and
+ * generate a table with 14 columns. This table lists
+ * all pixels that contain counts. The
+ * table is designed to mimic a TTAG list, so that it can be used
+ * with various modules in the TTAG pipeline
+ *
+ ****************************************************************************/
+
+ fitsfile *elecfits;
+ char fmt_byte[FLEN_CARD], fmt_float[FLEN_CARD], fmt_short[FLEN_CARD];
+ char *inpha, *dumarrb;
+ char elecfile[FLEN_CARD];
+ char keyword[FLEN_CARD], card[FLEN_CARD];
+ unsigned char *dumarrbu ;
+ int status=0, anynull=0, hdutype;
+ int colval;
+ int tfields = 14; /* output table will have 14 columns */
+ int active_l, active_r ;
+ long i, j, k, nevents, nfdp;
+ long frow=1, felem=1, nrows=1; /* output table will have 1 row */
+ float sum_weights;
+ float *intime, *dumarrf;
+
+ int sia_index[512], sia_temp[512]; /* Indices of SIA rectangles */
+ int sia_width = 2048, sia_height = 16; /* Dimensions of SIA recs */
+ int xx, yy; /* Pixel coordinates (unbinned) */
+
+ int x0, y0, xstart, ystart ;
+ int nx, ny, yndx, binx, biny ;
+ int nhot, nhot_total=0;
+ short *xpix, *ypix, *img, *fill_data_pix, nmask, nullval;
+ long npix, npix_max, npts ;
+ float *wtpix, exptime, mtime, nave;
+
+
+ char extname[]="TTAG DATA"; /* name of the extension containing
+ the binary table holding the data */
+
+ char *ttype[]={"TIME", "XRAW", "YRAW", "PHA", "WEIGHT", "XFARF",
+ "YFARF", "X", "Y", "CHANNEL", "TIMEFLGS",
+ "LOC_FLGS", "LAMBDA", "ERGCM2" };
+
+ char *tform[14]; /* will asign values when we find out
+ the number of elements in the data set */
+
+
+ char *tunit[]={"SECONDS", "PIXELS", "PIXELS", " ", " ", "PIXELS",
+ "PIXELS", "PIXELS", "PIXELS", "UNITLESS",
+ "UNITLESS", "UNITLESS", "ANGSTROMS","ERG CM^-2"};
+
+ struct key tscal[] = {{"TSCAL6", 0.25}, {"TSCAL7", 0.1},
+ {"TSCAL8", 0.25}, {"TSCAL9", 0.1}};
+ struct key tzero[] = {{"TZERO6", 8192.}, {"TZERO7", 0.},
+ {"TZERO8", 8192.}, {"TZERO9", 0.}};
+
+ /* Initialize the sia_index array. */
+ (void) memset((void *)sia_index, 0, sizeof(int)*512);
+
+ /*********************************************************************
+ Read information to be used in the screening analysis.
+ **********************************************************************/
+
+ /* Read the limits to the active area of the detector */
+ FITS_read_key(outfits, TSTRING, "ELEC_CAL", elecfile, NULL, &status);
+ FITS_open_file(&elecfits, cf_cal_file(elecfile), READONLY, &status);
+ FITS_read_key(elecfits, TINT, "ACTIVE_L", &active_l, NULL,
+ &status);
+ FITS_read_key(elecfits, TINT, "ACTIVE_R", &active_r, NULL,
+ &status);
+ FITS_close_file(elecfits, &status);
+ cf_verbose(3, "Limits to the active area: left=%d, right=%d",
+ active_l, active_r);
+
+ /* Determine the exposure time */
+ FITS_movabs_hdu(infits, 1, &hdutype, &status);
+ FITS_read_key(infits, TFLOAT, "EXPTIME", &exptime, NULL, &status);
+ cf_verbose(3, "exptime = %d ", cf_nint(exptime)) ;
+
+ /* Determine the binning factors in x and y */
+ FITS_read_key(infits, TINT, "SPECBINX", &binx, NULL, &status);
+ FITS_read_key(infits, TINT, "SPECBINY", &biny, NULL, &status);
+ cf_verbose(3, "binx=%d, biny=%d \n", binx, biny) ;
+
+
+ /***********************************************************************
+ Get information from the raw data file.
+ ************************************************************************/
+
+ /* Set up arrays to contain the positions of each pixel with counts
+ (xpix and ypix) and the number of counts in that pixel (wtpix) */
+ if (unbin) npix_max = (NXMAX * NYMAX) / binx ;
+ else npix_max = (NXMAX * NYMAX) / (binx * biny) ;
+ npix = -1 ;
+ xpix = (short *) cf_calloc(npix_max, sizeof(short)) ;
+ ypix = (short *) cf_calloc(npix_max, sizeof(short)) ;
+ wtpix = (float *) cf_calloc(npix_max, sizeof(float)) ;
+ fill_data_pix = (short *) cf_calloc(npix_max, sizeof(short)) ;
+
+ /*
+ * Loop over all extensions in the input file, and place contents
+ * of each extension into outbuff. Keep trying to read a new HDU
+ * in the input file until we hit the EOF.
+ *
+ * Note that the next line cannot use FITS_movrel_hdu because
+ * that routine automatically exits upon error.
+ */
+ for (i = 1; !(fits_movrel_hdu(infits, 1, &hdutype, &status)); i++) {
+ FITS_read_key(infits, TINT, "NAXIS1", &nx, NULL, &status);
+ FITS_read_key(infits, TINT, "NAXIS2", &ny, NULL, &status);
+ FITS_read_key(infits, TINT, "XORIGIN", &x0, NULL, &status);
+ FITS_read_key(infits, TINT, "YORIGIN", &y0, NULL, &status);
+
+ npts = nx * ny ;
+ cf_verbose(3, "Reading extension %d ", i) ;
+ cf_verbose(3, "nx=%d, ny=%d, npts=%d ", nx, ny, npts) ;
+
+ /* Initialize the sia_temp array */
+ (void) memset((void *)sia_temp, 0, sizeof(int)*512);
+
+ /*
+ * Allocate space for and read the input image
+ */
+ img = cf_malloc(sizeof(short) * npts);
+ FITS_read_img(infits, TSHORT, 1L, npts, &nullval,
+ img, &anynull, &status);
+
+ /* Specify the starting positions in x and y.
+ Place the point in the middle of the bin */
+ xstart = x0 * binx + binx / 2;
+ ystart = y0 * biny + biny / 2;
+ cf_verbose(3, "x0=%d, y0=%d, xstart=%d, ystart=%d",
+ x0, y0, xstart, ystart) ;
+
+ /* Go through the image and tabulate the pixels with counts. */
+ nhot=0 ;
+ for (j=0; j<npts; j++)
+ if (img[j] > 0) {
+
+ /* If this pixel falls in an SIA rectangle that has already
+ been written to the output data list, skip it and move to
+ the next SIA rectangle. */
+
+ xx = (x0 + (j % nx)) * binx;
+ yy = (y0 + (j / nx)) * biny;
+ k = xx / sia_width + yy / sia_height * 8;
+ if (k < 0 || k >= 512) continue;
+ if (sia_index[k] == 1) {
+ j += sia_width / binx - 1;
+ continue;
+ }
+ sia_temp[k] = 1;
+
+ /* Check for a hot pixel by comparing the value in the pixel with
+ those on either side. Ignore pixels outside of detector active
+ area or with fewer than 16 counts. */
+
+ if ((img[j] > 15) && (img[j] != FILL_DATA) &&
+ (xx >= active_l) && (xx <= active_r)) {
+ nave = (img[j-2] + img[j-1] + img[j+1] + img[j+2]) / 4. ;
+ if (nave > 32000.) nave=32000. ;
+ if (nave < 1.) nave=1. ;
+ if (img[j] > 8*nave) {
+ nhot++ ;
+ cf_verbose(3,"hot pixel at point %d: val=%d, ave=%f",
+ j, img[j], nave) ;
+ /* Repair hot pixel */
+ nmask=1 ;
+ while(nmask < 8*nave && nmask < 16000) nmask*=2 ;
+ nmask-=1 ;
+ img[j] = (img[j] & nmask) ;
+ cf_verbose(3,"corrected value = %d ",img[j]) ;
+ }
+ }
+
+ yndx = (int) ( j / nx ) ;
+
+ if (unbin){
+ for (k=0;k<biny;k++){
+ npix++ ;
+ xpix[npix] = (short) (xstart + (j - (yndx * nx)) * binx) ;
+ ypix[npix] = (short) (ystart + yndx*biny + k) ;
+ wtpix[npix] = (float) ( ((float) img[j]) / ((float) biny) ) ;
+
+ fill_data_pix[npix]=0;
+ if (img[j] == FILL_DATA) {
+ wtpix[npix]=0.0;
+ fill_data_pix[npix]=1;
+ }
+
+
+ }
+ }
+ else {
+ npix++ ;
+ xpix[npix] = (short) (xstart + (j - (yndx * nx)) * binx) ;
+ ypix[npix] = (short) (ystart + yndx*biny) ;
+ wtpix[npix] = (float) img[j];
+
+ fill_data_pix[npix]=0;
+ if (img[j] == FILL_DATA) {
+ wtpix[npix]=0.0;
+ fill_data_pix[npix]=1;
+ }
+ }
+
+
+ }
+
+ nhot_total += nhot;
+ cf_verbose(2, "%d hot pixels found in extn %d ",nhot, i) ;
+ cf_verbose(3, "total number of pixels with counts = %d \n", npix) ;
+ if (nhot > 10) cf_if_warning("More than 10 hot pixels found.") ;
+
+ free(img) ;
+
+ /* Copy new SIA indices to sia_index array. */
+ for (k = 0; k < 512; k++)
+ if (sia_temp[k]) sia_index[k] = 1;
+
+ } /* Finished loop over all extensions in infits */
+ /*
+ * Status upon completion of loop through extensions should be
+ * "end of file."
+ * If it is, reset value of status. If not, there was an
+ * unexpected error. Print and exit.
+ */
+ if( status == END_OF_FILE ) { /* !!! This might cause a problem */
+ status = 0;
+ } else {
+ cf_if_fits_error(status);
+ }
+
+ cf_verbose(3, "Finished reading data ") ;
+
+ if (npix < 0) {
+ npix = 1 ;
+ xpix[0]=0 ;
+ ypix[0]=0 ;
+ wtpix[0]=1. ;
+ fill_data_pix[0]=0;
+ }
+
+ /*************************************************************************
+ Output the analysis to a table
+ ***************************************************************************/
+
+ /* Generate the tform array */
+ sprintf(fmt_byte, "%ldB", npix);
+ sprintf(fmt_float, "%ldE", npix);
+ sprintf(fmt_short, "%ldI", npix);
+
+ tform[0] = fmt_float;
+ tform[1] = fmt_short;
+ tform[2] = fmt_short;
+ tform[3] = fmt_byte;
+ tform[4] = fmt_float;
+ for (i=5; i<9; i++)
+ tform[i] = fmt_short;
+ for ( ; i<12; i++)
+ tform[i] = fmt_byte;
+ tform[12] = fmt_float;
+ tform[13] = fmt_float;
+
+ /* Append a new empty binary table to the output file */
+
+ cf_verbose(3, "Creating table") ;
+ FITS_movabs_hdu(outfits, 1, &hdutype, &status);
+ FITS_create_tbl(outfits, BINARY_TBL, nrows, tfields, ttype, tform,
+ tunit, extname, &status);
+
+ /* Write TSCALE and TZERO entries to header */
+ for (i=0; i<4; i++) {
+ sprintf(keyword, "TUNIT%ld", i+6);
+ if (fits_read_keyword(outfits, keyword, card, NULL, &status))
+ cf_if_fits_error(status);
+ FITS_insert_key_flt(outfits, tscal[i].keyword, tscal[i].value, -2,
+ NULL, &status);
+ FITS_insert_key_flt(outfits, tzero[i].keyword, tzero[i].value, -4,
+ NULL, &status);
+ }
+
+ /* Allocate space for the new output columns */
+
+ cf_verbose(3, "Allocating space for arrays ") ;
+ dumarrf = (float *) cf_malloc(sizeof(float) * npix);
+ dumarrb = (char *) cf_malloc(sizeof(char) * npix);
+ dumarrbu = (unsigned char *) cf_malloc(sizeof(unsigned char) * npix);
+
+ cf_verbose(3, "Filling columns") ;
+ /* Specify a time array - assign the same time to all pixels */
+ intime = (float *) cf_calloc(npix, sizeof(float) ) ;
+ mtime = exptime/2. ;
+ for (i=0; i<npix; i++) intime[i]=mtime ;
+ FITS_write_col(outfits, TFLOAT, 1, frow, felem, npix, intime, &status);
+
+ /* Output X and Y positions */
+ FITS_write_col(outfits, TSHORT, 2, frow, felem, npix, xpix, &status);
+ FITS_write_col(outfits, TSHORT, 3, frow, felem, npix, ypix, &status);
+
+ /* Now do the PHA column - assume 20 */
+ inpha = (char *) cf_calloc(npix, sizeof(char) ) ;
+ for (i=0; i<npix; i++) inpha[i] = 20 ;
+ FITS_write_col(outfits, TBYTE, 4, frow, felem, npix, inpha, &status);
+
+ /* Fill weights column with counts per pixel */
+ FITS_write_col(outfits, TFLOAT, 5, frow, felem, npix, wtpix, &status);
+
+ /* Fill XFARF, YFARF, X and Y arrays with 0 */
+ for (i=0; i<npix; i++) dumarrf[i] = 0.;
+ for (colval=6; colval<10; colval++) {
+ FITS_write_col(outfits, TFLOAT, colval, frow, felem, npix,
+ dumarrf, &status);
+ }
+
+ /* Initialize the channel and temporal flag arrays with 0 - byte */
+ for (i=0;i<npix; i++)
+ dumarrb[i] = 0;
+ FITS_write_col(outfits, TBYTE, 10, frow, felem, npix, dumarrb, &status);
+ for (i=0;i<npix; i++)
+ dumarrbu[i] = 0;
+ FITS_write_col(outfits, TBYTE, 11, frow, felem, npix, dumarrbu, &status);
+
+ /* Flag events that lie outside of the active area or
+ in fill-data regions. */
+ for (i=0 ; i<npix ; i++) {
+ dumarrbu[i] = 0 ;
+
+ /* Flag photons that lie outside the active area. */
+ if (xpix[i] < active_l || xpix[i] > active_r)
+ dumarrbu[i] = dumarrbu[i] | LOCATION_SHLD ;
+
+ /* If inside, is it fill data? */
+ else if (fill_data_pix[i])
+ dumarrbu[i] = dumarrbu[i] | LOCATION_FILL ;
+ }
+
+ FITS_movabs_hdu(outfits, 2, &hdutype, &status);
+ FITS_write_col(outfits, TBYTE, 12, frow, felem, npix,
+ dumarrbu, &status);
+
+ /* Fill lambda and energy arrays with 0 */
+ FITS_write_col(outfits, TFLOAT, 13, frow, felem, npix, dumarrf, &status);
+ FITS_write_col(outfits, TFLOAT, 14, frow, felem, npix, dumarrf, &status);
+
+ /* If file contains hot pixels or fill data, recalculate NEVENTS. */
+ nfdp = 0;
+ sum_weights = 0.;
+ for (i=0; i<npix; i++) {
+ nfdp += fill_data_pix[i];
+ sum_weights += wtpix[i];
+ }
+ if (nfdp > 0 || nhot_total > 0) {
+ nevents = cf_nlong(sum_weights);
+ FITS_movabs_hdu(outfits, 1, &hdutype, &status);
+ FITS_update_key(outfits, TLONG, "NEVENTS", &nevents, NULL, &status);
+ cf_verbose(1, "Image contains bad pixels. Updating NEVENTS = %ld",
+ nevents);
+ }
+
+ free(intime);
+ free(xpix);
+ free(ypix);
+ free(wtpix) ;
+ free(inpha);
+ free(dumarrf);
+ free(dumarrb);
+
+ cf_verbose(3, "Leaving cf_make_pixel_list") ;
+
+ return EXIT_SUCCESS ;
+}
+
+
+/******************************************************************************
+ *
+ * CF_MAKE_GTI_TABLE
+ *
+ * Procedure to generate a table of GTI values and put it into the second
+ * extension of the output file. There is assumed to be only one GTI,
+ * starting at 0 and ending at the exposure time.
+ *
+ ******************************************************************************/
+
+int cf_make_gti_table (fitsfile *outfits) {
+
+ int status=0, nrows=1, hdutype, frow=1, felem=1 ;
+ float exptime ;
+ double start[1]={0.}, stop[1] ;
+
+ char extname[]="GTI";
+ int tfields=2; /* output table will have 2 columns */
+ char *ttype[]={"START", "STOP"};
+
+ char *tform[]={"1D","1D"};
+ char *tunit[]={"seconds", "seconds"};
+
+ cf_verbose(3, "Entering cf_make_gti_table ") ;
+
+ /* read the exposure time from the output file */
+ FITS_movabs_hdu(outfits, 1, &hdutype, &status);
+ FITS_read_key(outfits, TFLOAT, "EXPTIME", &exptime, NULL, &status);
+ stop[0] = (double) exptime ;
+
+
+ /* Append a new empty binary table to the output file */
+ FITS_movabs_hdu(outfits, 2, &hdutype, &status);
+ FITS_create_tbl(outfits, BINARY_TBL, nrows, tfields, ttype, tform,
+ tunit, extname, &status);
+
+ /* Write the data to the table */
+ FITS_write_col(outfits, TDOUBLE, 1, frow, felem, nrows, start, &status);
+ FITS_write_col(outfits, TDOUBLE, 2, frow, felem, nrows, stop, &status);
+
+ return EXIT_SUCCESS ;
+}
+
+/*****************************************************************************/
+
+
+int main(int argc, char *argv[])
+{
+ char CF_PRGM_ID[] = "cf_hist_init";
+ char CF_VER_NUM[] = "1.32";
+
+ fitsfile *infits, *outfits;
+
+ int morekeys=0; /* Change to zero when OPUS is updated. */
+ int status=0, optc;
+
+ int one=1, nextn=0;
+ long nphot ;
+ char unbin=0;
+
+ char opts[] = "hsv:";
+ char usage[] =
+ "Usage:\n"
+ " cf_hist_init [-h] [-s] [-v level] rawhistfile idf_file\n";
+ char option[] =
+ "Options:\n"
+ " -h: this help message\n"
+ " -s: to unbin the data in Y\n"
+ " -v: verbosity level (default is 1; 0 is silent)\n";
+
+
+ verbose_level = 1;
+
+ while ((optc = getopt(argc, argv, opts)) != -1) {
+ switch(optc) {
+
+ case 'h':
+ printf("%s\n%s", usage, option);
+ return 0;
+ case 's':
+ unbin=1;
+ break;
+ case 'v':
+ verbose_level = atoi(optarg);
+ break;
+ }
+ }
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ if (argc != optind+2) {
+ printf("%s", usage);
+ cf_if_error("Incorrect number of arguments");
+ }
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin execution");
+
+ FITS_open_file(&infits, argv[optind++], READONLY, &status);
+
+ /* Exit if data are not in HIST mode. */
+ if ( cf_proc_check(infits, CF_PRGM_ID) ) {
+ FITS_close_file(infits, &status);
+ return (-1);
+ }
+
+ /* Issue warning message if data are missing. */
+ FITS_read_key(infits, TLONG, "NEVENTS", &nphot, NULL, &status);
+ FITS_read_key(infits, TINT, "NEXTEND", &nextn, NULL, &status);
+ cf_verbose(3,"Number of extensions to the file = %d ", nextn) ;
+ if (nphot < 1) cf_verbose(1, "%s contains no photons.", argv[optind-1]);
+ if (nextn < 1) cf_if_warning("%s contains no extensions.", argv[optind-1]);
+ else if (nextn < 4) cf_verbose(1, "%s contains only %d extensions.",
+ argv[optind-1], nextn) ;
+
+ /* Create output file. */
+ FITS_create_file(&outfits, argv[optind], &status);
+ /* Copy primary image header from the input file. */
+ FITS_copy_hdu(infits, outfits, morekeys, &status);
+
+ /* Update header keywords. */
+ FITS_update_key(outfits, TSTRING, "FILENAME", argv[optind], NULL, &status);
+ FITS_update_key(outfits, TSTRING, "FILETYPE",
+ "INTERMEDIATE DATA FILE", NULL, &status);
+
+ if (unbin) FITS_update_key(outfits, TINT, "SPECBINY", &one, NULL, &status);
+
+ /* If input file contains no extensions, set EXP_STAT to -1. */
+ if (nextn < 1) {
+ char comment[] = "Raw file contains no data.";
+ int eflag = -1;
+ FITS_update_key(outfits, TINT, "EXP_STAT", &eflag, comment, &status);
+ }
+
+ /* Populate the calibration keywords in the primary header. */
+ cf_fuv_init(outfits);
+
+ /* Fill in the first extension with the photon information */
+ cf_make_pixel_list(infits, outfits, unbin) ;
+
+ /* Generate a good-times table and put it in the second extension. */
+ cf_make_gti_table(outfits);
+
+ /* Append a table containing the orbital timeline */
+ cf_timeline(outfits);
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+ /* Update processing flags. */
+ cf_proc_update(outfits, CF_PRGM_ID, "COMPLETE");
+
+ FITS_close_file(infits, &status);
+ FITS_close_file(outfits, &status);
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished execution.");
+
+ return EXIT_SUCCESS ;
+}
diff --git a/src/fuv/cf_remove_motions.c b/src/fuv/cf_remove_motions.c
new file mode 100644
index 0000000..ec2b332
--- /dev/null
+++ b/src/fuv/cf_remove_motions.c
@@ -0,0 +1,316 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_remove_motions options intermediate_file
+ *
+ * Description: Associates a photon with an aperture and corrects for grating,
+ * mirror, spacecraft (jitter) and focal plane assembly (FPA)
+ * motion. The position of the Y centroid is also determined
+ * both as a function of time (before correction for s/c motion)
+ * and for the entire exposure (after motion correction).
+ * The resulting coordinates represent the data obtained by a
+ * motionless instrument.
+ *
+ * By default, all corrections are performed. Command line
+ * options allow one or more corrections to be omitted.
+ *
+ * Arguments: input_file Intermediate data file
+ *
+ * Calibration files:
+ *
+ * Returns: 0 on successful completion
+ *
+ * Calls: cf_find_spectra, cf_calculate_ycent_motion,
+ * cf_grating_motion, cf_fpa_position, cf_mirror_motion,
+ * cf_satellite_jitter, cf_calculate_y_centroid
+ *
+ * History: 09/30/02 peb 1.1 Begin work
+ * 12/04/02 wvd 1.5 Install Y centroid routines.
+ * Modify call to cf_satellite_jitter
+ * 12/12/02 wvd 1.6 Change infits -> header throughout
+ * 03/04/03 peb 1.10 Minor code changes to remove gcc -Wall
+ * messages: unused j in main.
+ * Added unistd.h, so getopt is portable
+ * 03/05/03 wvd 1.11 Added cf_target_count_rate
+ * 03/10/03 peb 1.12 Added verbose_level, unistd.h for
+ * getopt portability, and changed
+ * locflags to unsigned char *.
+ * 03/13/03 rdr 1.13 corrected small error in tabulating
+ * count rate_sic
+ * 04/17/03 wvd 1.17 Add cf_find_spectra for initial
+ * assignment of photons to
+ * target apertures. Add last_call to
+ * cf_identify_channel, last_call and
+ * weight to cf_calculate_y_centroid
+ * 04/21/03 wvd 1.18 Pass tsunrise to cf_grating_motion,
+ * tsunset to cf_mirror_motion,
+ * channel to cf_satellite_jitter.
+ * 06/02/03 wvd 1.20 Don't modify count-rate arrays
+ * for HIST data.
+ * 06/11/03 wvd 1.21 Pass datatype to cf_read_col and
+ * cf_write_col.
+ * 08/01/03 wvd 1.23 Add cf_error_init after calls to
+ * subroutines.
+ * 08/06/03 wvd 1.24 Change channel to unsigned char.
+ * Remove GTI's from cf_satellite_jitter.
+ * 08/25/03 wvd 1.25 Change coltype from string to int in
+ * cf_read_col and cf_write_col.
+ * 09/18/03 wvd 1.26 Pass locflags to cf_identify_channel
+ * 10/21/03 wvd 1.27 For HIST data, don't write blank
+ * LiF and SiC count-rate arrays to IDF.
+ * 10/27/03 wvd 1.28 Pass pha array to cf_find_spectra.
+ * Delete last_call from argument list
+ * of cf_calculate_y_centroid.
+ * 10/31/03 wvd 1.29 Treat channel as unsigned char
+ * throughout.
+ * 04/06/04 bjg 1.30 Remove unused variables
+ * 05/03/04 wvd 1.31 Improve documentation.
+ * Move first call of cf_identify_channel
+ * from cf_find_spectra to this routine.
+ * 06/02/04 wvd 1.32 Copy/move cf_set_photon_flags(),
+ * cf_set_good_time_intervals(), and
+ * cf_modify_hist_times() from
+ * cf_screen_photons. Run them only if
+ * cf_satellite_jitter rejects some time
+ * AND if they were already run before.
+ * Pass timeflags to cf_find_spectra()
+ * and cf_calculate_y_centroid().
+ * Get exp_jitr from cf_satellite_jitter.
+ * 07/21/04 wvd 1.33 Add include file <string.h>
+ * 03/10/05 wvd 1.34 Change use of variable pad. Now add
+ * 10 to user_pad on first call to
+ * cf_identify_channel, 0 on second call.
+ * 03/22/05 wvd 1.35 Change TIME_SUNRISE and TIME_SUNSET
+ * from floats to shorts.
+ * 05/20/05 wvd 1.36 Clean up i/o.
+ * 09/09/05 wvd 1.37 Add -j to list of allowed options.
+ * 11/29/05 wvd 1.38 Separate cf_satellite_jitter into two
+ * routines. Screening is performed
+ * earlier, so we need not copy flags.
+ * 08/30/06 wvd 1.39 Add -a to list of allowed options.
+ * 12/29/06 wvd 1.40 Pass weights array and initial LiF
+ * and SiC counts arrays to
+ * cf_target_count_rate. Make arrays
+ * rate_lif and rate_sic floats. If
+ * they are too large to store as shorts,
+ * store as unsigned shorts.
+ * 02/02/07 wvd 1.41 If LiF or SiC count rate is too large
+ * for an unsigned int, set to zero.
+ *
+ ****************************************************************************/
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include "calfuse.h"
+
+static char CF_PRGM_ID[] = "cf_remove_motions";
+static char CF_VER_NUM[] = "1.41";
+
+int
+main(int argc, char *argv[])
+{
+ unsigned char *channel=NULL, *timeflags=NULL, *locflags=NULL,
+ *statflag=NULL;
+ int grating_motion=1, fpa_position=1, mirror_motion=1, sat_jitter=1;
+ int last_call, set_times=FALSE, set_gtis=FALSE, airglow_centroid=FALSE;
+ int user_pad=0, status=0, set_rate=FALSE, optc;
+ long i, nevents, ntimes;
+ float *time=NULL, *ttime=NULL, *xfarf=NULL, *yfarf=NULL, *x, *y;
+ float *weight=NULL, *ycent_lif, *ycent_sic;
+ float max_rate_lif=0, max_rate_sic=0, *rate_lif=NULL, *rate_sic=NULL;
+ float tscale=1, tzero=32768;
+ short *tsunrise=NULL, *tsunset=NULL;
+ GTI gti;
+ fitsfile *header;
+
+ char opts[] = "hagfmjp:v:";
+ char usage[] =
+ "Usage:\n"
+ " cf_remove_motions [-hagfmj] [-p pad] [-v level] idf_file\n";
+ char option[] =
+ "Options:\n"
+ " -h: this help message\n"
+ " -v: verbose level (default is 1; 0 is silent)\n"
+ " -a: use airglow lines to determine spectral centroid\n"
+ " -p: aperture padding in pixels (default is 10)\n"
+ " -g: no grating motion correction\n"
+ " -f: no fpa position correction\n"
+ " -m: no mirror motion correction\n"
+ " -j: no satellite jitter correction\n";
+
+ verbose_level = 1;
+
+ while ((optc = getopt(argc, argv, opts)) != -1) {
+ switch(optc) {
+
+ case 'h':
+ printf("%s\n%s", usage, option);
+ return 0;
+ case 'v':
+ verbose_level = atoi(optarg);
+ break;
+ case 'p':
+ user_pad = atoi(optarg);
+ break;
+ case 'g':
+ grating_motion = 0;
+ break;
+ case 'f':
+ fpa_position = 0;
+ break;
+ case 'a':
+ airglow_centroid = TRUE;
+ break;
+ case 'm':
+ mirror_motion = 0;
+ break;
+ case 'j':
+ sat_jitter = 0;
+ break;
+ }
+ }
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+ if (argc <= optind) {
+ printf("%s", usage);
+ cf_if_error("Incorrect number of command-line arguments");
+ }
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ FITS_open_file(&header, argv[optind], READWRITE, &status);
+
+ FITS_movabs_hdu(header, 2, NULL, &status);
+ nevents = cf_read_col(header, TFLOAT, "TIME", (void **) &time);
+ nevents = cf_read_col(header, TFLOAT, "WEIGHT", (void **) &weight);
+ nevents = cf_read_col(header, TFLOAT, "XFARF", (void **) &xfarf);
+ nevents = cf_read_col(header, TFLOAT, "YFARF", (void **) &yfarf);
+ nevents = cf_read_col(header, TBYTE, "TIMEFLGS", (void **) &timeflags);
+ nevents = cf_read_col(header, TBYTE, "LOC_FLGS", (void **) &locflags);
+ channel = cf_calloc(nevents, sizeof(unsigned char));
+
+ FITS_movabs_hdu(header, 4, NULL, &status) ;
+ ntimes = cf_read_col(header, TFLOAT, "TIME", (void **) &ttime) ;
+ ntimes = cf_read_col(header, TBYTE, "STATUS_FLAGS", (void **) &statflag);
+ ntimes = cf_read_col(header, TSHORT, "TIME_SUNRISE", (void **) &tsunrise) ;
+ ntimes = cf_read_col(header, TSHORT, "TIME_SUNSET", (void **) &tsunset) ;
+ ntimes = cf_read_col(header, TFLOAT, "LIF_CNT_RATE", (void **) &rate_lif) ;
+ ntimes = cf_read_col(header, TFLOAT, "SIC_CNT_RATE", (void **) &rate_sic) ;
+ ycent_lif=(float *) cf_calloc(ntimes, sizeof(float)) ;
+ ycent_sic=(float *) cf_calloc(ntimes, sizeof(float)) ;
+
+ FITS_movabs_hdu(header, 1, NULL, &status);
+ x = xfarf;
+ y = yfarf;
+
+ /* Find all six spectra and compute centroids. */
+ cf_find_spectra(header, nevents, weight, x, y, channel, timeflags,
+ locflags, airglow_centroid);
+
+ /* Initial assignment of channel numbers to photons */
+ cf_identify_channel(header, nevents, xfarf, yfarf, channel, locflags,
+ user_pad+10, last_call=FALSE);
+
+ /* Track Y centroids of moving spectra. */
+ cf_calculate_ycent_motion(header, nevents, time, y, channel, locflags,
+ ntimes, ttime, ycent_lif, ycent_sic);
+
+ /* Correct for detector motion during exposure. */
+ if (grating_motion)
+ cf_grating_motion(header, nevents, time, x, y, channel,
+ ntimes, ttime, tsunrise);
+
+ /* Shift spectra in X to account for position of the FPA. */
+ if (fpa_position)
+ cf_fpa_position(header, nevents, x, channel);
+
+ /* Correct for mirror motion during exposure. */
+ if (mirror_motion)
+ cf_mirror_motion(header, nevents, time, x, y, channel,
+ ntimes, ttime, tsunset);
+
+ /* Correct for spacecraft motion during exposure. */
+ if (sat_jitter)
+ cf_satellite_jitter(header, nevents, time, x, y, channel,
+ ntimes, ttime, statflag);
+
+ /* Compute centroids of motion-corrected spectra. */
+ cf_calculate_y_centroid(header, nevents, weight, x, y, channel,
+ timeflags, locflags);
+
+ /* Final assignment of channel numbers to photons */
+ cf_identify_channel(header, nevents, x, y, channel, locflags,
+ user_pad, last_call=TRUE);
+
+ /* Compute count rates for TTAG target spectra. */
+ set_rate = !(cf_target_count_rate(header, nevents, time, weight,
+ channel, locflags, ntimes, ttime, rate_lif, rate_sic));
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+ cf_verbose(3, "Writing X, Y, CHANNEL to IDF");
+ FITS_movabs_hdu(header, 2, NULL, &status);
+ if (set_times)
+ cf_write_col(header, TFLOAT, "TIME", (void *) time, nevents);
+ cf_write_col(header, TFLOAT, "X", (void *) x, nevents);
+ cf_write_col(header, TFLOAT, "Y", (void *) y, nevents);
+ cf_write_col(header, TBYTE, "CHANNEL", (void *) channel, nevents);
+
+ if (set_gtis) {
+ cf_verbose(3, "Writing good-time intervals to IDF");
+ FITS_movabs_hdu(header, 3, NULL, &status);
+ cf_write_col(header, TDOUBLE, "START", (void *) gti.start, gti.ntimes);
+ cf_write_col(header, TDOUBLE, "STOP", (void *) gti.stop, gti.ntimes);
+ free(gti.stop);
+ free(gti.start);
+ }
+
+ FITS_movabs_hdu(header, 4, NULL, &status);
+ cf_verbose(3, "Writing timeline information to IDF");
+ if (set_rate) {
+ for (i = 0; i < ntimes; i++) {
+ if (rate_lif[i] > 65535) rate_lif[i] = 0;
+ if (rate_sic[i] > 65535) rate_sic[i] = 0;
+ if (max_rate_lif < rate_lif[i]) max_rate_lif = rate_lif[i];
+ if (max_rate_sic < rate_sic[i]) max_rate_sic = rate_sic[i];
+ }
+ cf_verbose(2, "max_rate_lif = %.0f", max_rate_lif);
+ cf_verbose(2, "max_rate_sic = %.0f", max_rate_sic);
+ if (max_rate_lif > 32767) {
+ FITS_update_key(header, TFLOAT, "TSCAL10", &tscale, NULL, &status);
+ FITS_update_key(header, TFLOAT, "TZERO10", &tzero, NULL, &status);
+ fits_set_tscale(header, 10, (double)tscale, (double)tzero, &status);
+ }
+ if (max_rate_sic > 32767) {
+ FITS_update_key(header, TFLOAT, "TSCAL11", &tscale, NULL, &status);
+ FITS_update_key(header, TFLOAT, "TZERO11", &tzero, NULL, &status);
+ fits_set_tscale(header, 11, (double)tscale, (double)tzero, &status);
+ }
+ FITS_write_col(header, TFLOAT, 10, 1, 1, ntimes, rate_lif, &status);
+ FITS_write_col(header, TFLOAT, 11, 1, 1, ntimes, rate_sic, &status);
+ }
+ cf_write_col(header, TFLOAT, "YCENT_LIF", (void *) ycent_lif, ntimes);
+ cf_write_col(header, TFLOAT, "YCENT_SIC", (void *) ycent_sic, ntimes);
+ cf_verbose(3, "IDF updates complete");
+
+ FITS_close_file(header, &status);
+
+ free(time);
+ free(weight);
+ free(xfarf);
+ free(yfarf);
+ free(locflags);
+ free(timeflags);
+ free(channel);
+ free(ttime);
+ free(rate_lif);
+ free(rate_sic);
+ free(ycent_lif);
+ free(ycent_sic);
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+ return status;
+}
diff --git a/src/fuv/cf_screen_photons.c b/src/fuv/cf_screen_photons.c
new file mode 100644
index 0000000..bd82bba
--- /dev/null
+++ b/src/fuv/cf_screen_photons.c
@@ -0,0 +1,298 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_screen_photons options intermediate_file
+ *
+ * Description: Filters events in the intermediate data file (IDF) for limb
+ * angle, SAA crossing, high voltage changes, bursts, and PHA.
+ * Sets the event flags and GTIs. Data are modified in place.
+ *
+ * By default all corrections are performed. Command line
+ * options allow one or more corrections to be omitted.
+ *
+ * Arguments: input_file FARF-corrected intermediate data file
+ *
+ * Calibration files:
+ *
+ * Returns: 0 on successful completion
+ *
+ * Calls: cf_screen_limb_angle, cf_screen_saa, cf_screen_high_voltage,
+ * cf_screen_burst, cf_screen_jitter,
+ * cf_set_user_gtis, cf_set_photon_flags, cf_modify_hist_times,
+ * cf_screen_pulse_height, cf_screen_airglow, cf_screen_bad_pixels
+ *
+ * History: 11/05/02 1.1 peb Begin work
+ * 11/13/02 1.2 peb Added screening functions to program
+ * 11/14/02 1.3 peb Added burst-screening function
+ * 11/18/02 1.4 peb Corrected logic dealing with reading,
+ * writing, and freeing of GTI struct.
+ * Corrected some grammatical errors.
+ * 12/10/02 1.5 rdr changed call to cf_screen_bursts
+ * 12/18/02 1.6 rdr updated names of some columns in
+ * the calls to the timeline extension
+ * 12/20/02 1.7 wvd Change flags to unsigned char
+ * 03/10/03 1.9 peb Added verbose_level and added unistd.h
+ * for getopt portability
+ * 05/10/03 1.10 wvd Pass locflag to cf_set_photon_flags
+ * 05/30/03 1.11 wvd Pass weight to cf_set_photon_flags
+ * 06/11/03 1.12 wvd Treat HV as array of shorts.
+ * Pass datatype to cf_read_col and
+ * cf_write_col.
+ * 08/25/03 1.13 wvd Change coltype from string to int in
+ * cf_read_col and cf_write_col.
+ * 09/10/03 1.14 wvd Change background array to type short.
+ * Add cf_set_user_gtis().
+ * 10/02/03 1.15 wvd Pass locflag array to
+ * cf_screen_pulse_height; write to IDF
+ * 02/10/04 1.16 wvd Add cf_screen_fifo_overflow()
+ * 06/02/04 1.17 wvd Add cf_modify_hist_times()
+ * 06/03/04 1.18 wvd Read XFARF and YFARF, not X and Y.
+ * If INSTMODE = TTAG, don't bother to
+ * call cf_modify_hist_times().
+ * 02/02/05 1.19 wvd Pass rate_aic to cf_screen_burst
+ * 03/10/05 1.20 wvd Add cf_screen_airglow()
+ * 03/30/05 1.21 wvd Don't change TIME_COR to SKIPPED
+ * for TTAG data. Leave as OMIT.
+ * 05/20/05 1.22 wvd Clean up i/o.
+ * 06/03/05 1.23 wvd Fix typo in CF_VER_NUM.
+ * 09/09/05 1.24 wvd Update list of allowed options.
+ * 11/09/05 1.25 wvd Change argument list for
+ * cf_screen_fifo_overflow.
+ * 11/22/05 1.26 wvd Add cf_screen_jitter and
+ * cf_screen_bad_pixels.
+ * 01/24/06 1.27 wvd Move cf_screen_airglow before
+ * cf_screen_burst
+ * 12/29/06 1.28 wvd Move cf_screen_fifo_overflow to
+ * cf_convert_to_farf.
+ * 07/18/08 1.29 wvd Write STATUS_FLAGS to IDF before
+ * calling cf_set_photon_flags, which
+ * may change the array.
+ *
+ ****************************************************************************/
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include "calfuse.h"
+
+int
+main(int argc, char *argv[])
+{
+ char CF_PRGM_ID[] = "cf_screen_photons";
+ char CF_VER_NUM[] = "1.29";
+
+ char instmode[FLEN_VALUE];
+ unsigned char *pha=NULL, *timeflag=NULL, *statflag=NULL, *locflag=NULL;
+ int limb_screening=1, saa_screening=1, voltage_screening=1;
+ int burst_screening=1, set_flags=1, airglow_screening=1, pha_screening=1;
+ int modify_times=1, set_gtis=1, set_user_gtis=1;
+ int bad_pixel_screening=1, set_times=FALSE, jitter_screening=1;
+ int status=0, optc;
+ long nevents, nseconds;
+ short *background=NULL, *rate_lif=NULL, *rate_sic=NULL, *voltage=NULL;
+ float *time=NULL, *x=NULL, *y=NULL, *weight=NULL;
+ float *timeline=NULL, *limb=NULL, *longitude=NULL, *latitude=NULL;
+ float *rate_aic=NULL;
+ GTI gti;
+ fitsfile *header;
+
+ char opts[] = "halstbjufimdpv:";
+ char usage[] =
+ "Usage:\n"
+ " cf_screen_photons [-halstbjufimdp] [-v level] idf_file\n";
+ char option[] =
+ "Options:\n"
+ " -h: this help message\n"
+ " -v: verbosity level (default is 1; 0 is silent)\n"
+ " -a: no airglow screening\n"
+ " -l: no limb screening\n"
+ " -s: no SAA screening\n"
+ " -t: no high voltage screening\n"
+ " -b: no burst screening\n"
+ " -j: no jitter screening\n"
+ " -u: no user-defined good-time intervals\n"
+ " -f: do not set photon event flags\n"
+ " -i: do not update GTI arrays\n"
+ " -m: do not modify HIST photon times\n"
+ " -d: no bad-pixel screening\n"
+ " -p: no PHA screening\n";
+
+ verbose_level = 1;
+
+ while ((optc = getopt(argc, argv, opts)) != -1) {
+ switch(optc) {
+
+ case 'h':
+ printf("%s\n%s", usage, option);
+ return 0;
+ case 'v':
+ verbose_level = atoi(optarg);
+ break;
+ case 'l':
+ limb_screening = 0;
+ break;
+ case 't':
+ voltage_screening = 0;
+ break;
+ case 's':
+ saa_screening = 0;
+ break;
+ case 'b':
+ burst_screening = 0;
+ break;
+ case 'j':
+ jitter_screening = 0;
+ break;
+ case 'u':
+ set_user_gtis = 0;
+ break;
+ case 'f':
+ set_flags = 0;
+ break;
+ case 'i':
+ set_gtis = 0;
+ break;
+ case 'm':
+ modify_times = 0;
+ break;
+ case 'a':
+ airglow_screening = 0;
+ break;
+ case 'd':
+ bad_pixel_screening = 0;
+ break;
+ case 'p':
+ pha_screening = 0;
+ break;
+ }
+ }
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ if (argc <= optind) {
+ printf("%s", usage);
+ cf_if_error("Incorrect number of program arguments");
+ }
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ FITS_open_file(&header, argv[optind], READWRITE, &status);
+
+ FITS_movabs_hdu(header, 2, NULL, &status);
+ nevents = cf_read_col(header, TFLOAT, "TIME", (void **) &time);
+ nevents = cf_read_col(header, TBYTE, "PHA", (void **) &pha);
+ nevents = cf_read_col(header, TFLOAT, "WEIGHT", (void **) &weight);
+ nevents = cf_read_col(header, TFLOAT, "XFARF", (void **) &x);
+ nevents = cf_read_col(header, TFLOAT, "YFARF", (void **) &y);
+ nevents = cf_read_col(header, TBYTE, "TIMEFLGS", (void **) &timeflag);
+ nevents = cf_read_col(header, TBYTE, "LOC_FLGS", (void **) &locflag);
+
+ if (burst_screening) {
+ FITS_movabs_hdu(header, 3, NULL, &status);
+ gti.ntimes = cf_read_col(header, TDOUBLE, "START",(void **) &gti.start);
+ gti.ntimes = cf_read_col(header, TDOUBLE, "STOP", (void **) &gti.stop);
+ }
+ FITS_movabs_hdu(header, 4, NULL, &status);
+ nseconds = cf_read_col(header, TFLOAT, "TIME", (void **) &timeline);
+ nseconds = cf_read_col(header, TBYTE, "STATUS_FLAGS", (void **) &statflag);
+ nseconds = cf_read_col(header, TFLOAT, "LIMB_ANGLE", (void **) &limb);
+ nseconds = cf_read_col(header, TFLOAT, "LONGITUDE", (void **) &longitude);
+ nseconds = cf_read_col(header, TFLOAT, "LATITUDE", (void **) &latitude);
+ nseconds = cf_read_col(header, TSHORT, "HIGH_VOLTAGE", (void **) &voltage);
+ nseconds = cf_read_col(header, TSHORT, "LIF_CNT_RATE", (void **) &rate_lif);
+ nseconds = cf_read_col(header, TSHORT, "SIC_CNT_RATE", (void **) &rate_sic);
+ nseconds = cf_read_col(header, TFLOAT, "AIC_CNT_RATE", (void **) &rate_aic);
+ background = (short *) cf_calloc(nseconds, sizeof(short)) ;
+
+ /* If INSTMODE = TTAG, don't bother to call cf_modify_hist_times. */
+ FITS_movabs_hdu(header, 1, NULL, &status);
+ FITS_read_key(header, TSTRING, "INSTMODE", instmode, NULL, &status);
+ if (!strncmp(instmode, "TTAG", 4)) modify_times = FALSE;
+
+ if (airglow_screening)
+ cf_screen_airglow(header, nevents, x, y, locflag);
+
+ if (limb_screening)
+ cf_screen_limb_angle(header, nseconds, statflag, limb);
+
+ if (saa_screening)
+ cf_screen_saa(header, nseconds, statflag, longitude, latitude);
+
+ if (voltage_screening)
+ cf_screen_high_voltage(header, nseconds, statflag, voltage);
+
+ if (burst_screening) {
+ cf_screen_burst(header, nevents, time, x, y, locflag, &gti,
+ nseconds, timeline, statflag, rate_aic, background);
+ free(gti.stop);
+ free(gti.start);
+ }
+
+ if (jitter_screening)
+ cf_screen_jitter(header, nseconds, timeline, statflag);
+
+ if (set_user_gtis)
+ cf_set_user_gtis(header, nseconds, timeline, statflag);
+
+ /* Write STATUS_FLAGS array to IDF before calling cf_set_photon_flags. */
+ FITS_movabs_hdu(header, 4, NULL, &status);
+ cf_write_col(header, TBYTE, "STATUS_FLAGS", (void *) statflag, nseconds);
+ FITS_movabs_hdu(header, 1, NULL, &status);
+
+ if (set_flags)
+ cf_set_photon_flags(header, nevents, time, weight, timeflag,
+ locflag, nseconds, timeline, statflag);
+
+ if (set_gtis)
+ cf_set_good_time_intervals(header, nseconds, timeline,
+ statflag, &gti);
+
+ if (modify_times)
+ set_times = !(cf_modify_hist_times(header, nevents, time, &gti));
+
+ if (bad_pixel_screening)
+ cf_screen_bad_pixels(header, nevents, x, y, locflag);
+
+ if (pha_screening)
+ cf_screen_pulse_height(header, nevents, pha, locflag);
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+ FITS_movabs_hdu(header, 2, NULL, &status);
+ if (set_times)
+ cf_write_col(header, TFLOAT, "TIME", (void *) time, nevents);
+ cf_write_col(header, TBYTE, "TIMEFLGS", (void *) timeflag, nevents);
+ cf_write_col(header, TBYTE, "LOC_FLGS", (void *) locflag, nevents);
+
+ if (set_gtis) {
+ FITS_movabs_hdu(header, 3, NULL, &status);
+ cf_write_col(header, TDOUBLE, "START", (void *) gti.start, gti.ntimes);
+ cf_write_col(header, TDOUBLE, "STOP", (void *) gti.stop, gti.ntimes);
+ free(gti.stop);
+ free(gti.start);
+ }
+
+ if (burst_screening) {
+ FITS_movabs_hdu(header, 4, NULL, &status);
+ cf_write_col(header, TSHORT, "BKGD_CNT_RATE", (void *) background,
+ nseconds);
+ }
+
+ FITS_close_file(header, &status);
+
+ free(background);
+ free(voltage);
+ free(latitude);
+ free(longitude);
+ free(limb);
+ free(statflag);
+ free(timeline);
+ free(timeflag);
+ free(pha);
+ free(y);
+ free(x);
+ free(time);
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+ return 0;
+}
diff --git a/src/fuv/cf_ttag_init.c b/src/fuv/cf_ttag_init.c
new file mode 100644
index 0000000..ec11f19
--- /dev/null
+++ b/src/fuv/cf_ttag_init.c
@@ -0,0 +1,594 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_ttag_init input_file output_file
+ *
+ * Description: Reads a raw ttag file, which is a FITS binary table
+ * consisting of four columns:
+ *
+ * TIME FLOAT
+ * X INT
+ * Y INT
+ * PHA BYTE
+ *
+ * This routine will convert the raw ttag file to another binary
+ * table with 13 columns the values for most of these columns
+ * will be added by various modules of the pipeline:
+ *
+ * TIME FLOAT time of arrival for photon
+ * XRAW INT raw x position
+ * YRAW INT raw y position
+ * PHA BYTE pha value
+ * WEIGHT FLOAT effective area and flux calibration
+ * XFARF FLOAT x position in geometrically
+ * corrected frame
+ * YFARF FLOAT y position in geometrically
+ * corrected frame
+ * X FLOAT final x position (after correcting
+ * for motions)
+ * Y FLOAT final y position (after correcting
+ * for motions)
+ * CHANNEL CHAR aperture ID for the photon
+ * TIMEFLGS CHAR temporal flags - various bits set
+ * LOC_FLGS CHAR location flags - various bits set
+ * LAMBDA FLOAT wavelength for each photon
+ * ERGCM2 FLOAT flux calibration for each photon
+ *
+ * This routine calls cf_fuv_init to set up the calibration
+ * entries in the header.
+ *
+ * In addition, the routine creates a timeline containing
+ * orbital information, count rates, and high-voltage
+ * information which is used in later pipeline modules.
+ *
+ * Turns out that OPUS good-time intervals may exclude SAA
+ * passes that remain in the photon-event list. This means
+ * that there may be photons in the photon-event list whose
+ * times are not listed in the timeline table. To catch
+ * them, we set all photon status flags to TEMPORAL_HV.
+ *
+ *
+ * Returns: Zero upon successful completion
+ *
+ * History: 03/30/98 gak Begin work
+ * 03/18/99 emm Modified header.
+ * 04/06/99 emm Added check on nrows to be no
+ * larger than nevents.
+ * 04/15/99 barrett Deleted FF and DY columns,
+ * added FITS wrapper functions,
+ * tidied code.
+ * 04/22/99 emm Program now returns int.
+ * 04/23/99 emm Fixed two bugs causing segmentation
+ * faults (pha was being written as
+ * long, at definition of outdx was
+ * given as 1B instead of 1E.) Added
+ * check on number of arguments.
+ * 04/29/99 emm Added check on nrows to make sure
+ * it is smaller than nevents.
+ * 04/30/99 peb Added cf_malloc functions.
+ * 06/07/99 peb Added reporting of version number.
+ * 18/07/99 1.12 jm Populate APER_ACT keyword
+ * 10/28/99 1.14 emm Added DY column.
+ * 12/02/99 1.15 emm Added corrections to some keywords
+ * removed APER_ACT keyword update
+ * 12/21/00 1.16 peb Fixed type mismatches in cfitsio
+ * calls
+ * 05/16/01 1.17 rdr added night/day flag column (dnflg)
+ * 08/20/01 1.18 wvd Check keywords SPECBINX and SPECBINY;
+ * if 0, set to 1
+ * 10/19/01 1.19 wvd Move correction of SPECBINX, etc.
+ * from cf_ttag_image.
+ * 04/03/02 1.20 wvd Clean up keywords in photon-event list.
+ * 08/02/02 1.21 rdr - changed the format of the binary
+ * tables to improve speed
+ * - added new columns to the table
+ * 09/15/02 1.22 rdr added extension containing timeline
+ * 11/07/02 1.23 peb Modified columns for event and
+ * timeline flags. Removed temporary
+ * keywords. Changed include files to
+ * use calfusettag.h
+ * 11/13/02 1.24 rdr Added ycentl and ycents columns to
+ * timeline.
+ * Added section to flag geocoronal photons
+ * and photons in the inactive part of the
+ * detector. Moved processing of the
+ * photon list into a separate subroutine.
+ * Fixed problem of program crashing when
+ * needed columns are not in the hskp file
+ * 12/06/02 1.25 rdr removed variables which were not being
+ * used
+ * 12/12/02 1.5 wvd Installed program.
+ * 12/18/02 1.6 rdr use AIRG calibration file for airglow
+ * locations
+ * 12/20/02 1.7 rdr - check for negative count rates and
+ * correct
+ * - convert status flags to unsigned char
+ * - flag photons near start and end of
+ * GTI
+ * 01/24/03 1.8 rdr - correct situation where hskp file
+ * has blank columns
+ * 02/11/03 1.9 rdr Added ERGCM2S column to photon table
+ * 03/04/03 1.10 rdr removed YFARFC column and deleted some
+ * unused variables
+ * 03/19/03 1.12 peb Added command-line options and
+ * verbose_level parameter
+ * Changed all printf calls to cf_verbose
+ * calls with verbose level == 1
+ * 03/25/03 1.13 peb Changed a cf_verbose to cf_timestamp.
+ * 04/01/03 1.15 wvd Call cf_error_init after cf_timeline.
+ * 04/04/03 1.16 wvd Update FILETYPE keyword. Set verbose
+ * level of each call to cf_verbose.
+ * 04/07/03 1.17 wvd Update FILENAME keyword.
+ * 04/07/03 1.18 wvd Add FPADXLIF and FPADXSIC to header.
+ * 04/09/03 1.19 rdr Correct error in determining the name
+ * of the housekeeping file
+ * 04/29/03 1.21 wvd Allow possiblity that housekeeping
+ * filename is in lower-case letters.
+ * 05/06/03 1.22 rdr Add daynight keyword, bkg_max and
+ * bkg_min keywords, and changed the
+ * column ergcm2s to ergcm2
+ * 05/10/03 1.23 wvd Modify internal copy of GTI's.
+ * Make number of timeline entries more
+ * nearly equal to EXPTIME. Discard
+ * photons with bad time markers.
+ * 06/03/03 1.24 wvd Add call to cf_proc_check.
+ * Keep trying to get GTI's right.
+ * 06/09/03 1.25 wvd Compress data with TSCALE and TZERO.
+ * 06/11/03 1.26 wvd Change calfusettag.h to calfuse.h
+ * 07/07/03 1.27 rdr Correct initialization of dn_flag_last
+ * when searching for time_sunrise and
+ * time_sunset
+ * 07/17/03 1.28 wvd Move various subroutines to library.
+ * 07/23/03 1.29 wvd Close ELEC_CAL file.
+ * Delete goto statement.
+ * 09/15/03 1.31 wvd Set temporal flags to TEMPORAL_HV.
+ * 10/02/03 1.32 wvd Delete reference to LOCATION_GTI flag
+ * 10/26/03 1.33 wvd Increase to morekeys to 38.
+ * 11/05/03 1.34 wvd Added stdlib.h and unistd.h
+ * 03/03/04 1.35 rdr Exit if no photons found.
+ * 04/06/04 1.37 bjg Change formats to match arg types
+ * in printf
+ * Functions return EXIT_SUCCESS
+ * Remove static keyword in struct key
+ * definition
+ * Add braces in TSCAL and TZERO
+ * definitions
+ * When no events are present in
+ * the raw file, create a photon list
+ * with a dummy event.
+ * 03/10/05 1.38 wvd Move airglow screening to
+ * cf_screen_airglow.
+ * Initialize XFARF and YFARF to zero.
+ * 05/20/05 1.39 wvd Clean up i/o.
+ * 05/31/06 1.40 wvd OPUS has been updated, so we can set
+ * morekeys to 0.
+ * 06/12/06 1.41 wvd Change cf_if_warning to cf_verbose.
+ * 08/21/07 1.42 wvd Add -e flag to set HKEXISTS to YES.
+ *
+ ****************************************************************************/
+
+#include <stdlib.h>
+#include <unistd.h>
+#include "calfuse.h"
+
+struct key {
+ char keyword[FLEN_KEYWORD];
+ float value;
+ };
+
+static int
+cf_init_null_photon_list(fitsfile *outfits) {
+
+ int status=0;
+
+ long i;
+
+ char keyword[FLEN_CARD], card[FLEN_CARD];
+
+ char extname[]="TTAG DATA"; /* Name of this extension */
+
+ char *ttype[]={"TIME", "XRAW", "YRAW", "PHA", "WEIGHT", "XFARF",
+ "YFARF", "X", "Y", "CHANNEL", "TIMEFLGS",
+ "LOC_FLGS", "LAMBDA", "ERGCM2" };
+
+ char *tform[14]={"1E","1I","1I","1B","1E","1I","1I",
+ "1I","1I","1B","1B","1B","1E","1E"};
+
+ char *tunit[]={"SECONDS", "PIXELS", "PIXELS", "UNITLESS", "UNITLESS",
+ "PIXELS", "PIXELS", "PIXELS", "PIXELS", "UNITLESS",
+ "UNITLESS", "UNITLESS", "ANGSTROMS", "ERG CM^-2"};
+
+ struct key tscal[] = {{"TSCAL6", 0.25}, {"TSCAL7", 0.1},
+ {"TSCAL8", 0.25}, {"TSCAL9", 0.1}};
+ struct key tzero[] = {{"TZERO6", 8192.}, {"TZERO7", 0.},
+ {"TZERO8", 8192.}, {"TZERO9", 0.}};
+
+ float hdu2_time[1] = {0.0};
+ short hdu2_xraw[1] = {0};
+ short hdu2_yraw[1] = {0};
+ char hdu2_pha[1] = {0};
+ float hdu2_weight[1] = {0.0};
+ float hdu2_xfarf[1] = {0.0};
+ float hdu2_yfarf[1] = {0.0};
+ float hdu2_x[1] = {0.0};
+ float hdu2_y[1] = {0.0};
+ char hdu2_channel[1] = {0};
+ char hdu2_timeflgs[1] = {TEMPORAL_HV};
+ char hdu2_loc_flgs[1] = {LOCATION_SHLD};
+ float hdu2_lambda[1] = {0.0};
+ float hdu2_ergcm2s[1] = {0.0};
+
+ cf_verbose(3, "Entering cf_init_null_photon_list.");
+
+ /* Append a new empty binary table to the output file */
+ FITS_create_tbl(outfits, BINARY_TBL, 1, 14, ttype, tform,
+ tunit, extname, &status);
+
+ /* Write TSCALE and TZERO entries to header */
+ for (i=0; i<4; i++) {
+ sprintf(keyword, "TUNIT%ld", i+6);
+ if (fits_read_keyword(outfits, keyword, card, NULL, &status))
+ cf_if_fits_error(status);
+ FITS_insert_key_flt(outfits, tscal[i].keyword, tscal[i].value,
+ -2, NULL, &status);
+ FITS_insert_key_flt(outfits, tzero[i].keyword, tzero[i].value,
+ -4, NULL, &status);
+ }
+
+
+
+
+ FITS_write_col(outfits, TFLOAT, 1, 1, 1, 1, hdu2_time , &status);
+ FITS_write_col(outfits, TSHORT, 2, 1, 1, 1, hdu2_xraw , &status);
+ FITS_write_col(outfits, TSHORT, 3, 1, 1, 1, hdu2_yraw , &status);
+ FITS_write_col(outfits, TBYTE , 4, 1, 1, 1, hdu2_pha , &status);
+ FITS_write_col(outfits, TFLOAT, 5, 1, 1, 1, hdu2_weight , &status);
+ FITS_write_col(outfits, TFLOAT, 6, 1, 1, 1, hdu2_xfarf , &status);
+ FITS_write_col(outfits, TFLOAT, 7, 1, 1, 1, hdu2_yfarf , &status);
+ FITS_write_col(outfits, TFLOAT, 8, 1, 1, 1, hdu2_x , &status);
+ FITS_write_col(outfits, TFLOAT, 9, 1, 1, 1, hdu2_y , &status);
+ FITS_write_col(outfits, TBYTE , 10, 1, 1, 1, hdu2_channel , &status);
+ FITS_write_col(outfits, TBYTE , 11, 1, 1, 1, hdu2_timeflgs , &status);
+ FITS_write_col(outfits, TBYTE , 12, 1, 1, 1, hdu2_loc_flgs , &status);
+ FITS_write_col(outfits, TFLOAT, 13, 1, 1, 1, hdu2_lambda , &status);
+ FITS_write_col(outfits, TFLOAT, 14, 1, 1, 1, hdu2_ergcm2s , &status);
+
+ cf_verbose(3, "Exiting cf_init_null_photon_list.");
+ return EXIT_SUCCESS;
+}
+
+/*****************************************************************************/
+
+static int
+cf_init_photon_list(fitsfile *infits, fitsfile *outfits) {
+
+/*****************************************************************************
+ *
+ * Description: procedure to take input data from the raw data file and
+ * generate a table with 14 columns. These columns
+ * will be modified by later pipeline modules.
+ *
+ * ARGUMENTS:
+ * infits fitsfile name of the input raw data file
+ * outfits fitsfile name of the output intermediate data
+ * file
+ * INPUT DATA:
+ * TIME FLOAT time of arrival for each photon
+ * XRAW INT x position of photon
+ * YRAW INT y position of photon
+ * PHA BYTE pha value of the photon
+ *
+ * OUTPUT DATA:
+ * TIME FLOAT time of arrival for photon
+ * XRAW INT raw x position
+ * YRAW INT raw y position
+ * PHA BYTE pha value
+ * WEIGHT FLOAT effective area and flux calibration
+ * XFARF FLOAT x position in geometrically
+ * corrected frame
+ * YFARF FLOAT y position in geometrically
+ * corrected frame
+ * X FLOAT final x position (after correcting
+ * for motions)
+ * Y FLOAT final y position (after correcting
+ * for motions)
+ * CHANNEL CHAR aperture ID for the photon
+ * TIMEFLGS CHAR temporal flags - various bits set
+ * LOC_FLGS CHAR location flags - various bits set
+ * LAMBDA FLOAT wavelength for each photon
+ * ERGCM2 FLOAT flux cal for each photon
+ *
+ ****************************************************************************/
+
+ fitsfile *elecfits;
+ char fmt_byte[FLEN_CARD], fmt_float[FLEN_CARD], fmt_short[FLEN_CARD];
+ char *inpha;
+ char elecfile[FLEN_FILENAME];
+ char keyword[FLEN_CARD], card[FLEN_CARD];
+ unsigned char *channel, *location, *temporal;
+ short *inx, *iny ;
+ int status=0, intnull=0, anynull, hdutype;
+ int tcol, xcol, ycol, phacol, colval;
+ int tfields = 14; /* output table will have 14 columns */
+ int active_l, active_r;
+ long i;
+ long frow=1, felem=1, nevents, nrows=1; /* output table will have 1 row */
+ float *intime, *dumarrf;
+
+ char extname[]="TTAG DATA"; /* Name of this extension */
+
+ char *ttype[]={"TIME", "XRAW", "YRAW", "PHA", "WEIGHT", "XFARF",
+ "YFARF", "X", "Y", "CHANNEL", "TIMEFLGS",
+ "LOC_FLGS", "LAMBDA", "ERGCM2" };
+
+ char *tform[14]; /* We'll assign values when we know
+ the number of elements in the data set. */
+
+
+ char *tunit[]={"SECONDS", "PIXELS", "PIXELS", "UNITLESS", "UNITLESS",
+ "PIXELS", "PIXELS", "PIXELS", "PIXELS", "UNITLESS",
+ "UNITLESS", "UNITLESS", "ANGSTROMS", "ERG CM^-2"};
+
+ struct key tscal[] = {{"TSCAL6", 0.25}, {"TSCAL7", 0.1},
+ {"TSCAL8", 0.25}, {"TSCAL9", 0.1}};
+ struct key tzero[] = {{"TZERO6", 8192.}, {"TZERO7", 0.},
+ {"TZERO8", 8192.}, {"TZERO9", 0.}};
+
+ cf_verbose(3, "Entering cf_init_photon_list.");
+
+ /* Move to the extension of the input file containing the data. */
+ FITS_movabs_hdu(infits, 2, &hdutype, &status);
+
+ /* Read the limits to the active area of the detector. */
+ FITS_read_key(outfits, TSTRING, "ELEC_CAL", elecfile, NULL, &status);
+ FITS_open_file(&elecfits, cf_cal_file(elecfile), READONLY, &status);
+ FITS_read_key(elecfits, TINT, "ACTIVE_L", &active_l, NULL, &status);
+ FITS_read_key(elecfits, TINT, "ACTIVE_R", &active_r, NULL, &status);
+ FITS_close_file(elecfits, &status);
+ cf_verbose(3, "Limits to the active area: left=%d, right=%d",
+ active_l, active_r);
+
+ /*
+ * Get the number of events in the input file.
+ */
+ FITS_read_key(infits, TLONG, "NAXIS2", &nevents, NULL, &status);
+ cf_verbose(3, "Raw data file contains %ld entries", nevents);
+
+ /* Generate the tform array */
+ sprintf(fmt_byte, "%ldB", nevents);
+ sprintf(fmt_float, "%ldE", nevents);
+ sprintf(fmt_short, "%ldI", nevents);
+
+ tform[0] = fmt_float;
+ tform[1] = fmt_short;
+ tform[2] = fmt_short;
+ tform[3] = fmt_byte;
+ tform[4] = fmt_float;
+ for (i=5; i<9; i++)
+ tform[i] = fmt_short;
+ for ( ; i<12; i++)
+ tform[i] = fmt_byte;
+ tform[12] = fmt_float;
+ tform[13] = fmt_float;
+
+ /* Append a new empty binary table to the output file */
+ FITS_create_tbl(outfits, BINARY_TBL, nrows, tfields, ttype, tform,
+ tunit, extname, &status);
+
+ /* Write TSCALE and TZERO entries to header */
+ for (i=0; i<4; i++) {
+ sprintf(keyword, "TUNIT%ld", i+6);
+ if (fits_read_keyword(outfits, keyword, card, NULL, &status))
+ cf_if_fits_error(status);
+ FITS_insert_key_flt(outfits, tscal[i].keyword, tscal[i].value,
+ -2, NULL, &status);
+ FITS_insert_key_flt(outfits, tzero[i].keyword, tzero[i].value,
+ -4, NULL, &status);
+ }
+
+ /*
+ * Allocate space for the input times, coords, and pha.
+ */
+ intime = (float *) cf_malloc(sizeof(float) * nevents);
+ inx = (short *) cf_malloc(sizeof(short) * nevents);
+ iny = (short *) cf_malloc(sizeof(short) * nevents);
+ inpha = (char *) cf_malloc(sizeof(char) * nevents);
+ /*
+ * Allocate space for the new output columns.
+ */
+ dumarrf = (float *) cf_malloc(sizeof(float) * nevents);
+ channel = (unsigned char *) cf_calloc(nevents, sizeof(unsigned char));
+ location = (unsigned char *) cf_calloc(nevents, sizeof(unsigned char));
+ temporal = (unsigned char *) cf_calloc(nevents, sizeof(unsigned char));
+
+ /*
+ * Read the data from the input file and write to the output
+ * file in a new format
+ *
+ * read the times
+ */
+ FITS_get_colnum(infits, TRUE, "TIME", &tcol, &status);
+ FITS_read_col(infits, TFLOAT, tcol, frow, felem, nevents, &intnull,
+ intime, &anynull, &status);
+ FITS_write_col(outfits, TFLOAT, 1, frow, felem, nevents, intime, &status);
+
+ /* process X and Y positions */
+ FITS_get_colnum(infits, TRUE, "X", &xcol, &status);
+ FITS_read_col(infits, TSHORT, xcol, frow, felem, nevents, &intnull,
+ inx, &anynull, &status);
+ FITS_write_col(outfits, TSHORT, 2, frow, felem, nevents, inx, &status);
+
+ FITS_get_colnum(infits, TRUE, "Y", &ycol, &status);
+ FITS_read_col(infits, TSHORT, ycol, frow, felem, nevents, &intnull,
+ iny, &anynull, &status);
+ FITS_write_col(outfits, TSHORT, 3, frow, felem, nevents, iny, &status);
+
+ /* now do the PHA column */
+ FITS_get_colnum(infits, TRUE, "PHA", &phacol, &status);
+ FITS_read_col(infits, TBYTE, phacol, frow, felem, nevents, &intnull,
+ inpha, &anynull, &status);
+ FITS_write_col(outfits, TBYTE, 4, frow, felem, nevents, inpha, &status);
+
+ /* fill weights with a dummy float - all equal to 1. */
+ for (i=0; i<nevents; i++)
+ dumarrf[i] = 1.;
+ FITS_write_col(outfits, TFLOAT, 5, frow, felem, nevents, dumarrf, &status);
+
+ /* fill XFARF, YFARF, X and Y arrays with 0. */
+ for (i=0; i<nevents; i++)
+ dumarrf[i] = 0.;
+ for (colval=6; colval<10; colval++) {
+ FITS_write_col(outfits, TFLOAT, colval, frow, felem, nevents,
+ dumarrf, &status);
+ }
+
+ /* Default value of temporal array is TEMPORAL_HV */
+ for (i=0; i<nevents; i++)
+ temporal[i] = TEMPORAL_HV;
+ FITS_write_col(outfits, TBYTE, 10, frow, felem, nevents, channel, &status);
+ FITS_write_col(outfits, TBYTE, 11, frow, felem, nevents, temporal, &status);
+
+ /* Set flags in the screening array for photons outside of the active
+ region of the detector. */
+ for (i=0; i<nevents; i++)
+ if (inx[i] < active_l || inx[i] > active_r)
+ location[i] = location[i] | LOCATION_SHLD;
+
+ /* Write location flags to output file. */
+ FITS_movabs_hdu(outfits, 2, &hdutype, &status);
+ FITS_write_col(outfits, TBYTE, 12, frow, felem, nevents,
+ location, &status);
+
+ /* Fill lambda and energy arrays with 0. */
+ FITS_write_col(outfits, TFLOAT, 13, frow, felem, nevents, dumarrf,
+ &status);
+ FITS_write_col(outfits, TFLOAT, 14, frow, felem, nevents, dumarrf,
+ &status);
+
+ free(intime);
+ free(inx);
+ free(iny);
+ free(inpha);
+ free(dumarrf);
+ free(channel);
+ free(location);
+ free(temporal);
+
+ cf_verbose(3, "Exiting cf_init_photon_list.");
+ return EXIT_SUCCESS;
+}
+
+
+/*****************************************************************************/
+
+int main(int argc, char *argv[])
+
+/*****************************************************************************/
+{
+ char CF_PRGM_ID[] = "cf_ttag_init";
+ char CF_VER_NUM[] = "1.42";
+
+ fitsfile *infits, *outfits;
+ int morekeys=0;
+ int modify_hkexists=FALSE;
+ int status=0, hdutype, optc;
+ long nphot ;
+
+ char opts[] = "ehv:";
+ char usage[] =
+ "Usage:\n"
+ " cf_ttag_init [-he] [-v level] rawttagfile idf_file\n";
+ char option[] =
+ "Options:\n"
+ " -h: this help message\n"
+ " -e: set header keyword HKEXISTS to YES in IDF file\n"
+ " -v: verbosity level (default is 1; 0 is silent)\n";
+
+ verbose_level = 1;
+
+ while ((optc = getopt(argc, argv, opts)) != -1) {
+ switch(optc) {
+
+ case 'h':
+ printf("%s\n%s", usage, option);
+ return 0;
+ case 'e':
+ modify_hkexists = TRUE;
+ break;
+ case 'v':
+ verbose_level = atoi(optarg);
+ break;
+ }
+ }
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ if (argc != optind+2) {
+ printf("%s", usage);
+ cf_if_error("Incorrect number of arguments");
+ }
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin execution");
+
+ FITS_open_file(&infits, argv[optind++], READONLY, &status);
+
+ /* Exit if data are not in TTAG mode. */
+ if ( cf_proc_check(infits, CF_PRGM_ID) ) {
+ FITS_close_file(infits, &status);
+ return (-1);
+ }
+
+ /* Issue warning if there are no events in the data set. */
+ FITS_read_key(infits, TLONG, "NEVENTS", &nphot, NULL, &status);
+ cf_verbose(3,"Number of events = %d ",nphot) ;
+ if (nphot < 1) {
+ cf_verbose(1, "No photons found in the data.") ;
+ }
+
+
+ /* Create output file. */
+ FITS_create_file(&outfits, argv[optind], &status);
+ /* Copy primary image header from the input file. */
+ FITS_copy_hdu(infits, outfits, morekeys, &status);
+
+ /* Update header keywords. */
+ FITS_update_key(outfits, TSTRING, "FILENAME", argv[optind], NULL, &status);
+ FITS_update_key(outfits, TSTRING, "FILETYPE",
+ "INTERMEDIATE DATA FILE", NULL, &status);
+ if (modify_hkexists)
+ FITS_update_key(outfits, TSTRING, "HKEXISTS", "YES", NULL, &status);
+
+ /* Populate the calibration keywords in the primary header. */
+ cf_fuv_init(outfits);
+
+ /* Write background limits to file header */
+ cf_set_background_limits(outfits);
+
+ /* Fill in the first extension with the photon information */
+ if (nphot<1) {
+ cf_init_null_photon_list(outfits);
+ }
+ else {
+ cf_init_photon_list(infits, outfits);
+ }
+
+ /* Copy good-time intervals from input to output. */
+ cf_verbose(3, "Copying good-time intervals from input to output.");
+ FITS_movabs_hdu(infits, 3, &hdutype, &status);
+ FITS_create_hdu(outfits, &status);
+ FITS_copy_hdu(infits, outfits, 0, &status);
+
+ /* Append a table containing the orbital timeline */
+ cf_timeline(outfits);
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+ /* Update processing flags. */
+ cf_proc_update(outfits, CF_PRGM_ID, "COMPLETE");
+
+ FITS_close_file(infits, &status);
+ FITS_close_file(outfits, &status);
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished execution.");
+ return EXIT_SUCCESS;
+}
diff --git a/src/libcf/Makefile.Linux.orig b/src/libcf/Makefile.Linux.orig
new file mode 100644
index 0000000..43b2e31
--- /dev/null
+++ b/src/libcf/Makefile.Linux.orig
@@ -0,0 +1,152 @@
+LIBRARY= libcf
+
+CALFUSEDIR= ${PWD}/../..
+SHARED= -shared
+FITSVER= 2.470
+
+# Symbols for include directories
+FUSEINCLDIR= -I${CALFUSEDIR}/include
+
+# Symbols used for compiling
+CC= cc
+OPT= -g -Wall -DCFORTRAN -Dg77Fortran -Df2cFortran
+CFLAGS= ${OPT} ${FUSEINCLDIR}
+
+FUSELIBDIR= -L${CALFUSEDIR}/lib
+FUSELIBS= -lcfitsio-${FITSVER} -lsla
+LIBS= -lc -lm -lnsl -ldl -lgfortran
+LDFLAGS=
+
+# Symbols used for creating shared libraries
+
+SO= .so
+
+OBJS= calfits.o sgp4.o eclipse.o saa.o \
+ state_limb.o state_geod.o space_vel.o helio_vel.o \
+ geod_mag.o pole_ang.o solar_ang.o lsrd_vel.o lsrk_vel.o \
+ month_day.o read_tle.o cf_velang.o \
+ set_orbit_parms.o cf_error_msg.o \
+ cf_cal_file.o cf_proc_check.o cf_proc_update.o \
+ cf_timestamp.o cf_fuv_init.o cf_header_io.o \
+ cf_check_digitizer.o cf_nint.o \
+ cf_idf_io.o cf_ids_dead_time.o cf_electronics_dead_time.o \
+ cf_fifo_dead_time.o cf_apply_dead_time.o \
+ cf_thermal_distort.o cf_count_rate_y_distort.o cf_time_xy_distort.o \
+ cf_geometric_distort.o cf_pha_x_distort.o \
+ cf_active_region.o cf_find_spectra.o cf_identify_channel.o \
+ cf_calculate_ycent_motion.o cf_source_aper.o\
+ cf_grating_motion.o cf_fpa_position.o cf_read_fpa_pos.o \
+ cf_make_mask.o cf_mirror_motion.o \
+ cf_satellite_jitter.o cf_calculate_y_centroid.o \
+ cf_target_count_rate.o \
+ cf_screen_jitter.o cf_screen_limb_angle.o cf_screen_saa.o \
+ cf_screen_high_voltage.o cf_screen_burst.o cf_screen_airglow.o \
+ cf_screen_bad_pixels.o cf_set_user_gtis.o \
+ cf_set_photon_flags.o cf_set_good_time_intervals.o \
+ cf_modify_hist_times.o cf_screen_pulse_height.o \
+ cf_convert_to_ergs.o cf_extraction_limits.o \
+ cf_astigmatism.o cf_dispersion.o cf_doppler_and_heliocentric.o \
+ cf_apply_filters.o cf_scale_bkgd.o \
+ cf_make_wave_array.o cf_rebin_background.o \
+ cf_rebin_probability_array.o cf_optimal_extraction.o \
+ cf_write_extracted_spectrum.o cf_standard_or_optimal_extraction.o \
+ cf_init_support.o cf_modify_hist_pha.o \
+ cf_fes_proc_check.o cf_fes_proc_update.o
+
+all: ${OBJS}
+ ${CC} ${SHARED} -o ${LIBRARY}${SO} ${OBJS} \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+install: all
+ chmod g+w ${OBJS} ${LIBRARY}${SO}
+ /bin/cp -p ${LIBRARY}${SO} ${CALFUSEDIR}/lib/${LIBRARY}${SO}
+
+clean:
+ - /bin/rm -f *.o ${LIBRARY}${SO} ${LIBRARY}${O}
+
+distclean:
+ - /bin/rm -f *.o ${LIBRARY}${SO} ${LIBRARY}${O}
+ cd ../../lib; /bin/rm -f ${LIBRARY}${SO}
+
+calfits.o: calfits.c
+sgp4.o: sgp4.c
+eclipse.o: eclipse.c
+set_orbit_parms.o: set_orbit_parms.c
+saa.o: saa.c
+state_limb.o: state_limb.c
+state_geod.o: state_geod.c
+space_vel.o: space_vel.c
+helio_vel.o: helio_vel.c
+geod_mag.o: geod_mag.c
+pole_ang.o: pole_ang.c
+solar_ang.o: solar_ang.c
+lsrd_vel.o: lsrd_vel.c
+lsrk_vel.o: lsrk_vel.c
+month_day.o: month_day.c
+read_tle.o: read_tle.c
+
+cf_error_msg.o: cf_error_msg.c
+cf_cal_file.o: cf_cal_file.c
+cf_fes_proc_check.o: cf_fes_proc_check.c
+cf_fes_proc_update.o: cf_fes_proc_update.c
+cf_proc_check.o: cf_proc_check.c
+cf_proc_update.o: cf_proc_update.c
+cf_fuv_init.o: cf_fuv_init.c
+cf_velang.o: cf_velang.c
+cf_timestamp.o: cf_timestamp.c
+
+cf_header_io.o: cf_header_io.c
+cf_check_digitizer.o: cf_check_digitizer.c
+cf_nint.o: cf_nint.c
+cf_idf_io.o: cf_idf_io.c
+cf_ids_dead_time.o: cf_ids_dead_time.c
+cf_electronics_dead_time.o: cf_electronics_dead_time.c
+cf_fifo_dead_time.o: cf_fifo_dead_time.c
+cf_apply_dead_time.o: cf_apply_dead_time.c
+cf_thermal_distort.o: cf_thermal_distort.c
+cf_count_rate_y_distort.o: cf_count_rate_y_distort.c
+cf_time_xy_distort.o : cf_time_xy_distort.c
+cf_geometric_distort: cf_geometric_distort.c
+cf_pha_x_distort.o: cf_pha_x_distort.c
+cf_active_region.o: cf_active_region.c
+cf_find_spectra.o: cf_find_spectra.c
+cf_identify_channel.o: cf_identify_channel.c
+cf_init_support.o: cf_init_support.c
+cf_target_count_rate.o: cf_target_count_rate.c
+cf_calculate_ycent_motion.o: cf_calculate_ycent_motion.c
+cf_source_aper.o: cf_source_aper.c
+cf_grating_motion.o: cf_grating_motion.c
+cf_fpa_position.o: cf_fpa_position.c
+cf_read_fpa_pos.o: cf_read_fpa_pos.c
+cf_make_mask.o: cf_make_mask.c
+cf_mirror_motion.o: cf_mirror_motion.c
+cf_satellite_jitter.o: cf_satellite_jitter.c
+cf_calculate_y_centroid.o: cf_calculate_y_centroid.c
+cf_screen_airglow.o: cf_screen_airglow.c
+cf_screen_bad_pixels.o: cf_screen_bad_pixels.c
+cf_screen_jitter.o: cf_screen_jitter.c
+cf_screen_limb_angle.o: cf_screen_limb_angle.c
+cf_screen_saa.o: cf_screen_saa.c
+cf_screen_high_voltage.o: cf_screen_high_voltage.c
+cf_screen_burst.o: cf_screen_burst.c
+cf_set_user_gtis.o: cf_set_user_gtis.c
+cf_set_photon_flags.o: cf_set_photon_flags.c
+cf_set_good_time_intervals.o: cf_set_good_time_intervals.c
+cf_modify_hist_pha.o: cf_modify_hist_pha.c
+cf_modify_hist_times.o: cf_modify_hist_times.c
+cf_screen_pulse_height.o: cf_screen_pulse_height.c
+cf_convert_to_ergs.o: cf_convert_to_ergs.c
+cf_extraction_limits.o: cf_extraction_limits.c
+cf_astigmatism.o: cf_astigmatism.c
+cf_dispersion.o: cf_dispersion.c
+cf_doppler_and_heliocentric.o: cf_doppler_and_heliocentric.c
+cf_apply_filters.o: cf_apply_filters.c
+cf_scale_bkgd.o: cf_scale_bkgd.c
+cf_make_mask.o: cf_make_mask.c
+cf_make_wave_array.o: cf_make_wave_array.c
+cf_rebin_background.o: cf_rebin_background.c
+cf_rebin_probability_array.o: cf_rebin_probability_array.c
+cf_standard_or_optimal_extraction.o: cf_standard_or_optimal_extraction.c
+cf_optimal_extraction.o: cf_optimal_extraction.c
+cf_write_extracted_spectrum.o: cf_write_extracted_spectrum.c
+
diff --git a/src/libcf/Makefile.Linux64.orig b/src/libcf/Makefile.Linux64.orig
new file mode 100644
index 0000000..3b00b44
--- /dev/null
+++ b/src/libcf/Makefile.Linux64.orig
@@ -0,0 +1,151 @@
+LIBRARY= libcf
+
+CALFUSEDIR= ${PWD}/../..
+SHARED= -shared -fPIC
+
+# Symbols for include directories
+FUSEINCLDIR= -I${CALFUSEDIR}/include
+
+# Symbols used for compiling
+CC= cc
+OPT= -g -Wall -DCFORTRAN -Dg77Fortran -Df2cFortran
+CFLAGS= ${OPT} ${FUSEINCLDIR}
+
+FUSELIBDIR= -L${CALFUSEDIR}/lib
+FUSELIBS= -lsla
+LIBS= -lc -lm -lnsl -ldl -lgfortran -lcfitsio
+LDFLAGS=
+
+# Symbols used for creating shared libraries
+
+SO= .so
+
+OBJS= calfits.o sgp4.o eclipse.o saa.o \
+ state_limb.o state_geod.o space_vel.o helio_vel.o \
+ geod_mag.o pole_ang.o solar_ang.o lsrd_vel.o lsrk_vel.o \
+ month_day.o read_tle.o cf_velang.o \
+ set_orbit_parms.o cf_error_msg.o \
+ cf_cal_file.o cf_proc_check.o cf_proc_update.o \
+ cf_timestamp.o cf_fuv_init.o cf_header_io.o \
+ cf_check_digitizer.o cf_nint.o \
+ cf_idf_io.o cf_ids_dead_time.o cf_electronics_dead_time.o \
+ cf_fifo_dead_time.o cf_apply_dead_time.o \
+ cf_thermal_distort.o cf_count_rate_y_distort.o cf_time_xy_distort.o \
+ cf_geometric_distort.o cf_pha_x_distort.o \
+ cf_active_region.o cf_find_spectra.o cf_identify_channel.o \
+ cf_calculate_ycent_motion.o cf_source_aper.o\
+ cf_grating_motion.o cf_fpa_position.o cf_read_fpa_pos.o \
+ cf_make_mask.o cf_mirror_motion.o \
+ cf_satellite_jitter.o cf_calculate_y_centroid.o \
+ cf_target_count_rate.o \
+ cf_screen_jitter.o cf_screen_limb_angle.o cf_screen_saa.o \
+ cf_screen_high_voltage.o cf_screen_burst.o cf_screen_airglow.o \
+ cf_screen_bad_pixels.o cf_set_user_gtis.o \
+ cf_set_photon_flags.o cf_set_good_time_intervals.o \
+ cf_modify_hist_times.o cf_screen_pulse_height.o \
+ cf_convert_to_ergs.o cf_extraction_limits.o \
+ cf_astigmatism.o cf_dispersion.o cf_doppler_and_heliocentric.o \
+ cf_apply_filters.o cf_scale_bkgd.o \
+ cf_make_wave_array.o cf_rebin_background.o \
+ cf_rebin_probability_array.o cf_optimal_extraction.o \
+ cf_write_extracted_spectrum.o cf_standard_or_optimal_extraction.o \
+ cf_init_support.o cf_modify_hist_pha.o \
+ cf_fes_proc_check.o cf_fes_proc_update.o
+
+all: ${OBJS}
+ ${CC} ${SHARED} -o ${LIBRARY}${SO} ${OBJS} \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+install: all
+ chmod g+w ${OBJS} ${LIBRARY}${SO}
+ /bin/cp -p ${LIBRARY}${SO} ${CALFUSEDIR}/lib/${LIBRARY}${SO}
+
+clean:
+ - /bin/rm -f *.o ${LIBRARY}${SO} ${LIBRARY}${O}
+
+distclean:
+ - /bin/rm -f *.o ${LIBRARY}${SO} ${LIBRARY}${O}
+ cd ../../lib; /bin/rm -f ${LIBRARY}${SO}
+
+calfits.o: calfits.c
+sgp4.o: sgp4.c
+eclipse.o: eclipse.c
+set_orbit_parms.o: set_orbit_parms.c
+saa.o: saa.c
+state_limb.o: state_limb.c
+state_geod.o: state_geod.c
+space_vel.o: space_vel.c
+helio_vel.o: helio_vel.c
+geod_mag.o: geod_mag.c
+pole_ang.o: pole_ang.c
+solar_ang.o: solar_ang.c
+lsrd_vel.o: lsrd_vel.c
+lsrk_vel.o: lsrk_vel.c
+month_day.o: month_day.c
+read_tle.o: read_tle.c
+
+cf_error_msg.o: cf_error_msg.c
+cf_cal_file.o: cf_cal_file.c
+cf_fes_proc_check.o: cf_fes_proc_check.c
+cf_fes_proc_update.o: cf_fes_proc_update.c
+cf_proc_check.o: cf_proc_check.c
+cf_proc_update.o: cf_proc_update.c
+cf_fuv_init.o: cf_fuv_init.c
+cf_velang.o: cf_velang.c
+cf_timestamp.o: cf_timestamp.c
+
+cf_header_io.o: cf_header_io.c
+cf_check_digitizer.o: cf_check_digitizer.c
+cf_nint.o: cf_nint.c
+cf_idf_io.o: cf_idf_io.c
+cf_ids_dead_time.o: cf_ids_dead_time.c
+cf_electronics_dead_time.o: cf_electronics_dead_time.c
+cf_fifo_dead_time.o: cf_fifo_dead_time.c
+cf_apply_dead_time.o: cf_apply_dead_time.c
+cf_thermal_distort.o: cf_thermal_distort.c
+cf_count_rate_y_distort.o: cf_count_rate_y_distort.c
+cf_time_xy_distort.o : cf_time_xy_distort.c
+cf_geometric_distort: cf_geometric_distort.c
+cf_pha_x_distort.o: cf_pha_x_distort.c
+cf_active_region.o: cf_active_region.c
+cf_find_spectra.o: cf_find_spectra.c
+cf_identify_channel.o: cf_identify_channel.c
+cf_init_support.o: cf_init_support.c
+cf_target_count_rate.o: cf_target_count_rate.c
+cf_calculate_ycent_motion.o: cf_calculate_ycent_motion.c
+cf_source_aper.o: cf_source_aper.c
+cf_grating_motion.o: cf_grating_motion.c
+cf_fpa_position.o: cf_fpa_position.c
+cf_read_fpa_pos.o: cf_read_fpa_pos.c
+cf_make_mask.o: cf_make_mask.c
+cf_mirror_motion.o: cf_mirror_motion.c
+cf_satellite_jitter.o: cf_satellite_jitter.c
+cf_calculate_y_centroid.o: cf_calculate_y_centroid.c
+cf_screen_airglow.o: cf_screen_airglow.c
+cf_screen_bad_pixels.o: cf_screen_bad_pixels.c
+cf_screen_jitter.o: cf_screen_jitter.c
+cf_screen_limb_angle.o: cf_screen_limb_angle.c
+cf_screen_saa.o: cf_screen_saa.c
+cf_screen_high_voltage.o: cf_screen_high_voltage.c
+cf_screen_burst.o: cf_screen_burst.c
+cf_set_user_gtis.o: cf_set_user_gtis.c
+cf_set_photon_flags.o: cf_set_photon_flags.c
+cf_set_good_time_intervals.o: cf_set_good_time_intervals.c
+cf_modify_hist_pha.o: cf_modify_hist_pha.c
+cf_modify_hist_times.o: cf_modify_hist_times.c
+cf_screen_pulse_height.o: cf_screen_pulse_height.c
+cf_convert_to_ergs.o: cf_convert_to_ergs.c
+cf_extraction_limits.o: cf_extraction_limits.c
+cf_astigmatism.o: cf_astigmatism.c
+cf_dispersion.o: cf_dispersion.c
+cf_doppler_and_heliocentric.o: cf_doppler_and_heliocentric.c
+cf_apply_filters.o: cf_apply_filters.c
+cf_scale_bkgd.o: cf_scale_bkgd.c
+cf_make_mask.o: cf_make_mask.c
+cf_make_wave_array.o: cf_make_wave_array.c
+cf_rebin_background.o: cf_rebin_background.c
+cf_rebin_probability_array.o: cf_rebin_probability_array.c
+cf_standard_or_optimal_extraction.o: cf_standard_or_optimal_extraction.c
+cf_optimal_extraction.o: cf_optimal_extraction.c
+cf_write_extracted_spectrum.o: cf_write_extracted_spectrum.c
+
diff --git a/src/libcf/Makefile.MacOSX.orig b/src/libcf/Makefile.MacOSX.orig
new file mode 100644
index 0000000..eade1ea
--- /dev/null
+++ b/src/libcf/Makefile.MacOSX.orig
@@ -0,0 +1,152 @@
+LIBRARY= libcf
+
+CALFUSEDIR= ${PWD}/../..
+SHARED= -dynamiclib
+FITSVER= 2.470
+
+# Symbols for include directories
+FUSEINCLDIR= -I${CALFUSEDIR}/include
+
+# Symbols used for compiling
+CC= cc
+OPT= -O3 -Wall -DCFORTRAN -Dg77Fortran -Df2cFortran
+CFLAGS= ${OPT} ${FUSEINCLDIR}
+
+FUSELIBDIR= -L${CALFUSEDIR}/lib
+# FUSELIBS= -lcfitsio-${FITSVER} -lsla
+FUSELIBS= -lcfitsio -lsla
+LIBS= -lc -lm -ldl -L/sw/lib/ -lgfortran
+
+# Symbols used for creating shared libraries
+
+SO= .dylib
+
+OBJS= calfits.o sgp4.o eclipse.o saa.o \
+ state_limb.o state_geod.o space_vel.o helio_vel.o \
+ geod_mag.o pole_ang.o solar_ang.o lsrd_vel.o lsrk_vel.o \
+ month_day.o read_tle.o cf_velang.o \
+ set_orbit_parms.o cf_error_msg.o \
+ cf_cal_file.o cf_proc_check.o cf_proc_update.o \
+ cf_timestamp.o cf_fuv_init.o cf_header_io.o \
+ cf_check_digitizer.o cf_nint.o \
+ cf_idf_io.o cf_ids_dead_time.o cf_electronics_dead_time.o \
+ cf_fifo_dead_time.o cf_apply_dead_time.o \
+ cf_thermal_distort.o cf_count_rate_y_distort.o cf_time_xy_distort.o \
+ cf_geometric_distort.o cf_pha_x_distort.o \
+ cf_active_region.o cf_find_spectra.o cf_identify_channel.o \
+ cf_calculate_ycent_motion.o cf_source_aper.o\
+ cf_grating_motion.o cf_fpa_position.o cf_read_fpa_pos.o \
+ cf_make_mask.o cf_mirror_motion.o \
+ cf_satellite_jitter.o cf_calculate_y_centroid.o \
+ cf_target_count_rate.o \
+ cf_screen_jitter.o cf_screen_limb_angle.o cf_screen_saa.o \
+ cf_screen_high_voltage.o cf_screen_burst.o cf_screen_airglow.o \
+ cf_screen_bad_pixels.o cf_set_user_gtis.o \
+ cf_set_photon_flags.o cf_set_good_time_intervals.o \
+ cf_modify_hist_times.o cf_screen_pulse_height.o \
+ cf_convert_to_ergs.o cf_extraction_limits.o \
+ cf_astigmatism.o cf_dispersion.o cf_doppler_and_heliocentric.o \
+ cf_apply_filters.o cf_scale_bkgd.o \
+ cf_make_wave_array.o cf_rebin_background.o \
+ cf_rebin_probability_array.o cf_optimal_extraction.o \
+ cf_write_extracted_spectrum.o cf_standard_or_optimal_extraction.o \
+ cf_init_support.o cf_modify_hist_pha.o \
+ cf_fes_proc_check.o cf_fes_proc_update.o
+
+all: ${OBJS}
+ ${CC} ${SHARED} -o ${LIBRARY}${SO} ${OBJS} \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS}
+
+install: all
+ chmod g+w ${OBJS} ${LIBRARY}${SO}
+ /bin/cp -p ${LIBRARY}${SO} ${CALFUSEDIR}/lib/${LIBRARY}${SO}
+
+clean:
+ - /bin/rm -f *.o ${LIBRARY}${SO} ${LIBRARY}${O}
+
+distclean:
+ - /bin/rm -f *.o ${LIBRARY}${SO} ${LIBRARY}${O}
+ cd ../../lib; /bin/rm -f ${LIBRARY}${SO}
+
+calfits.o: calfits.c
+sgp4.o: sgp4.c
+eclipse.o: eclipse.c
+set_orbit_parms.o: set_orbit_parms.c
+saa.o: saa.c
+state_limb.o: state_limb.c
+state_geod.o: state_geod.c
+space_vel.o: space_vel.c
+helio_vel.o: helio_vel.c
+geod_mag.o: geod_mag.c
+pole_ang.o: pole_ang.c
+solar_ang.o: solar_ang.c
+lsrd_vel.o: lsrd_vel.c
+lsrk_vel.o: lsrk_vel.c
+month_day.o: month_day.c
+read_tle.o: read_tle.c
+
+cf_error_msg.o: cf_error_msg.c
+cf_cal_file.o: cf_cal_file.c
+cf_fes_proc_check.o: cf_fes_proc_check.c
+cf_fes_proc_update.o: cf_fes_proc_update.c
+cf_proc_check.o: cf_proc_check.c
+cf_proc_update.o: cf_proc_update.c
+cf_fuv_init.o: cf_fuv_init.c
+cf_velang.o: cf_velang.c
+cf_timestamp.o: cf_timestamp.c
+
+cf_header_io.o: cf_header_io.c
+cf_check_digitizer.o: cf_check_digitizer.c
+cf_nint.o: cf_nint.c
+cf_idf_io.o: cf_idf_io.c
+cf_ids_dead_time.o: cf_ids_dead_time.c
+cf_electronics_dead_time.o: cf_electronics_dead_time.c
+cf_apply_dead_time.o: cf_apply_dead_time.c
+cf_fifo_dead_time.o: cf_fifo_dead_time.c
+cf_thermal_distort.o: cf_thermal_distort.c
+cf_count_rate_y_distort.o: cf_count_rate_y_distort.c
+cf_time_xy_distort.o : cf_time_xy_distort.c
+cf_geometric_distort: cf_geometric_distort.c
+cf_pha_x_distort.o: cf_pha_x_distort.c
+cf_active_region.o: cf_active_region.c
+cf_find_spectra.o: cf_find_spectra.c
+cf_identify_channel.o: cf_identify_channel.c
+cf_init_support.o: cf_init_support.c
+cf_target_count_rate.o: cf_target_count_rate.c
+cf_calculate_ycent_motion.o: cf_calculate_ycent_motion.c
+cf_source_aper.o: cf_source_aper.c
+cf_grating_motion.o: cf_grating_motion.c
+cf_fpa_position.o: cf_fpa_position.c
+cf_read_fpa_pos.o: cf_read_fpa_pos.c
+cf_make_mask.o: cf_make_mask.c
+cf_mirror_motion.o: cf_mirror_motion.c
+cf_satellite_jitter.o: cf_satellite_jitter.c
+cf_calculate_y_centroid.o: cf_calculate_y_centroid.c
+cf_screen_airglow.o: cf_screen_airglow.c
+cf_screen_bad_pixels.o: cf_screen_bad_pixels.c
+cf_screen_jitter.o: cf_screen_jitter.c
+cf_screen_limb_angle.o: cf_screen_limb_angle.c
+cf_screen_saa.o: cf_screen_saa.c
+cf_screen_high_voltage.o: cf_screen_high_voltage.c
+cf_screen_burst.o: cf_screen_burst.c
+cf_set_user_gtis.o: cf_set_user_gtis.c
+cf_set_photon_flags.o: cf_set_photon_flags.c
+cf_set_good_time_intervals.o: cf_set_good_time_intervals.c
+cf_modify_hist_pha.o: cf_modify_hist_pha.c
+cf_modify_hist_times.o: cf_modify_hist_times.c
+cf_screen_pulse_height.o: cf_screen_pulse_height.c
+cf_convert_to_ergs.o: cf_convert_to_ergs.c
+cf_extraction_limits.o: cf_extraction_limits.c
+cf_astigmatism.o: cf_astigmatism.c
+cf_dispersion.o: cf_dispersion.c
+cf_doppler_and_heliocentric.o: cf_doppler_and_heliocentric.c
+cf_apply_filters.o: cf_apply_filters.c
+cf_scale_bkgd.o: cf_scale_bkgd.c
+cf_make_mask.o: cf_make_mask.c
+cf_make_wave_array.o: cf_make_wave_array.c
+cf_rebin_background.o: cf_rebin_background.c
+cf_rebin_probability_array.o: cf_rebin_probability_array.c
+cf_standard_or_optimal_extraction.o: cf_standard_or_optimal_extraction.c
+cf_optimal_extraction.o: cf_optimal_extraction.c
+cf_write_extracted_spectrum.o: cf_write_extracted_spectrum.c
+
diff --git a/src/libcf/Makefile.Solaris.orig b/src/libcf/Makefile.Solaris.orig
new file mode 100644
index 0000000..f817dfe
--- /dev/null
+++ b/src/libcf/Makefile.Solaris.orig
@@ -0,0 +1,152 @@
+LIBRARY= libcf
+
+CALFUSEDIR= ${PWD}/../..
+SHARED= -G
+FITSVER= 2.470
+
+# Symbols for include directories
+FUSEINCLDIR= -I${CALFUSEDIR}/include
+
+# Symbols used for compiling
+CC= cc
+# OPT= -p -v -xO2 -xdepend -xchip=ultra -xarch=generic
+OPT= -O -DCFORTRAN -KPIC
+CFLAGS= ${OPT} ${FUSEINCLDIR}
+
+FUSELIBDIR= -L${CALFUSEDIR}/lib
+FUSELIBS= -lcfitsio-${FITSVER} -lsla
+LIBS= -lc -lm -lnsl -ldl -lsocket
+LDFLAGS=
+
+# Symbols used for creating shared libraries
+
+SO= .so
+
+OBJS= calfits.o sgp4.o eclipse.o saa.o \
+ state_limb.o state_geod.o space_vel.o helio_vel.o \
+ geod_mag.o pole_ang.o solar_ang.o lsrd_vel.o lsrk_vel.o \
+ month_day.o read_tle.o cf_velang.o \
+ set_orbit_parms.o cf_error_msg.o \
+ cf_cal_file.o cf_proc_check.o cf_proc_update.o \
+ cf_timestamp.o cf_fuv_init.o cf_header_io.o \
+ cf_check_digitizer.o cf_nint.o \
+ cf_idf_io.o cf_ids_dead_time.o cf_electronics_dead_time.o \
+ cf_fifo_dead_time.o cf_apply_dead_time.o \
+ cf_thermal_distort.o cf_count_rate_y_distort.o cf_time_xy_distort.o \
+ cf_geometric_distort.o cf_pha_x_distort.o \
+ cf_active_region.o cf_find_spectra.o cf_identify_channel.o \
+ cf_calculate_ycent_motion.o cf_source_aper.o\
+ cf_grating_motion.o cf_fpa_position.o cf_read_fpa_pos.o \
+ cf_make_mask.o cf_mirror_motion.o \
+ cf_satellite_jitter.o cf_calculate_y_centroid.o \
+ cf_target_count_rate.o \
+ cf_screen_jitter.o cf_screen_limb_angle.o cf_screen_saa.o \
+ cf_screen_high_voltage.o cf_screen_burst.o cf_screen_airglow.o \
+ cf_screen_bad_pixels.o cf_set_user_gtis.o \
+ cf_set_photon_flags.o cf_set_good_time_intervals.o \
+ cf_modify_hist_times.o cf_screen_pulse_height.o \
+ cf_convert_to_ergs.o cf_extraction_limits.o \
+ cf_astigmatism.o cf_dispersion.o cf_doppler_and_heliocentric.o \
+ cf_apply_filters.o cf_scale_bkgd.o \
+ cf_make_wave_array.o cf_rebin_background.o \
+ cf_rebin_probability_array.o cf_optimal_extraction.o \
+ cf_write_extracted_spectrum.o cf_standard_or_optimal_extraction.o \
+ cf_init_support.o cf_modify_hist_pha.o \
+ cf_fes_proc_check.o cf_fes_proc_update.o
+
+all: ${OBJS}
+ ${CC} ${SHARED} -o ${LIBRARY}${SO} ${OBJS} \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+install: all
+ chmod g+w ${OBJS} ${LIBRARY}${SO}
+ /bin/cp -p ${LIBRARY}${SO} ${CALFUSEDIR}/lib/${LIBRARY}${SO}
+
+clean:
+ - /bin/rm -f *.o ${LIBRARY}${SO} ${LIBRARY}${O}
+
+distclean:
+ - /bin/rm -f *.o ${LIBRARY}${SO} ${LIBRARY}${O}
+ cd ../../lib; /bin/rm -f ${LIBRARY}${SO}
+
+calfits.o: calfits.c
+sgp4.o: sgp4.c
+eclipse.o: eclipse.c
+set_orbit_parms.o: set_orbit_parms.c
+saa.o: saa.c
+state_limb.o: state_limb.c
+state_geod.o: state_geod.c
+space_vel.o: space_vel.c
+helio_vel.o: helio_vel.c
+geod_mag.o: geod_mag.c
+pole_ang.o: pole_ang.c
+solar_ang.o: solar_ang.c
+lsrd_vel.o: lsrd_vel.c
+lsrk_vel.o: lsrk_vel.c
+month_day.o: month_day.c
+read_tle.o: read_tle.c
+
+cf_error_msg.o: cf_error_msg.c
+cf_cal_file.o: cf_cal_file.c
+cf_fes_proc_check.o: cf_fes_proc_check.c
+cf_fes_proc_update.o: cf_fes_proc_update.c
+cf_proc_check.o: cf_proc_check.c
+cf_proc_update.o: cf_proc_update.c
+cf_fuv_init.o: cf_fuv_init.c
+cf_velang.o: cf_velang.c
+cf_timestamp.o: cf_timestamp.c
+
+cf_header_io.o: cf_header_io.c
+cf_check_digitizer.o: cf_check_digitizer.c
+cf_nint.o: cf_nint.c
+cf_idf_io.o: cf_idf_io.c
+cf_ids_dead_time.o: cf_ids_dead_time.c
+cf_electronics_dead_time.o: cf_electronics_dead_time.c
+cf_apply_dead_time.o: cf_apply_dead_time.c
+cf_fifo_dead_time.o: cf_fifo_dead_time.c
+cf_thermal_distort.o: cf_thermal_distort.c
+cf_count_rate_y_distort.o: cf_count_rate_y_distort.c
+cf_time_xy_distort.o : cf_time_xy_distort.c
+cf_geometric_distort: cf_geometric_distort.c
+cf_pha_x_distort.o: cf_pha_x_distort.c
+cf_active_region.o: cf_active_region.c
+cf_find_spectra.o: cf_find_spectra.c
+cf_identify_channel.o: cf_identify_channel.c
+cf_init_support.o: cf_init_support.c
+cf_target_count_rate.o: cf_target_count_rate.c
+cf_calculate_ycent_motion.o: cf_calculate_ycent_motion.c
+cf_source_aper.o: cf_source_aper.c
+cf_grating_motion.o: cf_grating_motion.c
+cf_fpa_position.o: cf_fpa_position.c
+cf_read_fpa_pos.o: cf_read_fpa_pos.c
+cf_make_mask.o: cf_make_mask.c
+cf_mirror_motion.o: cf_mirror_motion.c
+cf_satellite_jitter.o: cf_satellite_jitter.c
+cf_calculate_y_centroid.o: cf_calculate_y_centroid.c
+cf_screen_airglow.o: cf_screen_airglow.c
+cf_screen_bad_pixels.o: cf_screen_bad_pixels.c
+cf_screen_jitter.o: cf_screen_jitter.c
+cf_screen_limb_angle.o: cf_screen_limb_angle.c
+cf_screen_saa.o: cf_screen_saa.c
+cf_screen_high_voltage.o: cf_screen_high_voltage.c
+cf_screen_burst.o: cf_screen_burst.c
+cf_set_user_gtis.o: cf_set_user_gtis.c
+cf_set_photon_flags.o: cf_set_photon_flags.c
+cf_set_good_time_intervals.o: cf_set_good_time_intervals.c
+cf_modify_hist_pha.o: cf_modify_hist_pha.c
+cf_modify_hist_times.o: cf_modify_hist_times.c
+cf_screen_pulse_height.o: cf_screen_pulse_height.c
+cf_convert_to_ergs.o: cf_convert_to_ergs.c
+cf_extraction_limits.o: cf_extraction_limits.c
+cf_astigmatism.o: cf_astigmatism.c
+cf_dispersion.o: cf_dispersion.c
+cf_doppler_and_heliocentric.o: cf_doppler_and_heliocentric.c
+cf_apply_filters.o: cf_apply_filters.c
+cf_scale_bkgd.o: cf_scale_bkgd.c
+cf_make_mask.o: cf_make_mask.c
+cf_make_wave_array.o: cf_make_wave_array.c
+cf_rebin_background.o: cf_rebin_background.c
+cf_rebin_probability_array.o: cf_rebin_probability_array.c
+cf_standard_or_optimal_extraction.o: cf_standard_or_optimal_extraction.c
+cf_optimal_extraction.o: cf_optimal_extraction.c
+cf_write_extracted_spectrum.o: cf_write_extracted_spectrum.c
diff --git a/src/libcf/Makefile.orig.orig b/src/libcf/Makefile.orig.orig
new file mode 100644
index 0000000..f817dfe
--- /dev/null
+++ b/src/libcf/Makefile.orig.orig
@@ -0,0 +1,152 @@
+LIBRARY= libcf
+
+CALFUSEDIR= ${PWD}/../..
+SHARED= -G
+FITSVER= 2.470
+
+# Symbols for include directories
+FUSEINCLDIR= -I${CALFUSEDIR}/include
+
+# Symbols used for compiling
+CC= cc
+# OPT= -p -v -xO2 -xdepend -xchip=ultra -xarch=generic
+OPT= -O -DCFORTRAN -KPIC
+CFLAGS= ${OPT} ${FUSEINCLDIR}
+
+FUSELIBDIR= -L${CALFUSEDIR}/lib
+FUSELIBS= -lcfitsio-${FITSVER} -lsla
+LIBS= -lc -lm -lnsl -ldl -lsocket
+LDFLAGS=
+
+# Symbols used for creating shared libraries
+
+SO= .so
+
+OBJS= calfits.o sgp4.o eclipse.o saa.o \
+ state_limb.o state_geod.o space_vel.o helio_vel.o \
+ geod_mag.o pole_ang.o solar_ang.o lsrd_vel.o lsrk_vel.o \
+ month_day.o read_tle.o cf_velang.o \
+ set_orbit_parms.o cf_error_msg.o \
+ cf_cal_file.o cf_proc_check.o cf_proc_update.o \
+ cf_timestamp.o cf_fuv_init.o cf_header_io.o \
+ cf_check_digitizer.o cf_nint.o \
+ cf_idf_io.o cf_ids_dead_time.o cf_electronics_dead_time.o \
+ cf_fifo_dead_time.o cf_apply_dead_time.o \
+ cf_thermal_distort.o cf_count_rate_y_distort.o cf_time_xy_distort.o \
+ cf_geometric_distort.o cf_pha_x_distort.o \
+ cf_active_region.o cf_find_spectra.o cf_identify_channel.o \
+ cf_calculate_ycent_motion.o cf_source_aper.o\
+ cf_grating_motion.o cf_fpa_position.o cf_read_fpa_pos.o \
+ cf_make_mask.o cf_mirror_motion.o \
+ cf_satellite_jitter.o cf_calculate_y_centroid.o \
+ cf_target_count_rate.o \
+ cf_screen_jitter.o cf_screen_limb_angle.o cf_screen_saa.o \
+ cf_screen_high_voltage.o cf_screen_burst.o cf_screen_airglow.o \
+ cf_screen_bad_pixels.o cf_set_user_gtis.o \
+ cf_set_photon_flags.o cf_set_good_time_intervals.o \
+ cf_modify_hist_times.o cf_screen_pulse_height.o \
+ cf_convert_to_ergs.o cf_extraction_limits.o \
+ cf_astigmatism.o cf_dispersion.o cf_doppler_and_heliocentric.o \
+ cf_apply_filters.o cf_scale_bkgd.o \
+ cf_make_wave_array.o cf_rebin_background.o \
+ cf_rebin_probability_array.o cf_optimal_extraction.o \
+ cf_write_extracted_spectrum.o cf_standard_or_optimal_extraction.o \
+ cf_init_support.o cf_modify_hist_pha.o \
+ cf_fes_proc_check.o cf_fes_proc_update.o
+
+all: ${OBJS}
+ ${CC} ${SHARED} -o ${LIBRARY}${SO} ${OBJS} \
+ ${FUSELIBDIR} ${FUSELIBS} ${LIBS} ${LDFLAGS}
+
+install: all
+ chmod g+w ${OBJS} ${LIBRARY}${SO}
+ /bin/cp -p ${LIBRARY}${SO} ${CALFUSEDIR}/lib/${LIBRARY}${SO}
+
+clean:
+ - /bin/rm -f *.o ${LIBRARY}${SO} ${LIBRARY}${O}
+
+distclean:
+ - /bin/rm -f *.o ${LIBRARY}${SO} ${LIBRARY}${O}
+ cd ../../lib; /bin/rm -f ${LIBRARY}${SO}
+
+calfits.o: calfits.c
+sgp4.o: sgp4.c
+eclipse.o: eclipse.c
+set_orbit_parms.o: set_orbit_parms.c
+saa.o: saa.c
+state_limb.o: state_limb.c
+state_geod.o: state_geod.c
+space_vel.o: space_vel.c
+helio_vel.o: helio_vel.c
+geod_mag.o: geod_mag.c
+pole_ang.o: pole_ang.c
+solar_ang.o: solar_ang.c
+lsrd_vel.o: lsrd_vel.c
+lsrk_vel.o: lsrk_vel.c
+month_day.o: month_day.c
+read_tle.o: read_tle.c
+
+cf_error_msg.o: cf_error_msg.c
+cf_cal_file.o: cf_cal_file.c
+cf_fes_proc_check.o: cf_fes_proc_check.c
+cf_fes_proc_update.o: cf_fes_proc_update.c
+cf_proc_check.o: cf_proc_check.c
+cf_proc_update.o: cf_proc_update.c
+cf_fuv_init.o: cf_fuv_init.c
+cf_velang.o: cf_velang.c
+cf_timestamp.o: cf_timestamp.c
+
+cf_header_io.o: cf_header_io.c
+cf_check_digitizer.o: cf_check_digitizer.c
+cf_nint.o: cf_nint.c
+cf_idf_io.o: cf_idf_io.c
+cf_ids_dead_time.o: cf_ids_dead_time.c
+cf_electronics_dead_time.o: cf_electronics_dead_time.c
+cf_apply_dead_time.o: cf_apply_dead_time.c
+cf_fifo_dead_time.o: cf_fifo_dead_time.c
+cf_thermal_distort.o: cf_thermal_distort.c
+cf_count_rate_y_distort.o: cf_count_rate_y_distort.c
+cf_time_xy_distort.o : cf_time_xy_distort.c
+cf_geometric_distort: cf_geometric_distort.c
+cf_pha_x_distort.o: cf_pha_x_distort.c
+cf_active_region.o: cf_active_region.c
+cf_find_spectra.o: cf_find_spectra.c
+cf_identify_channel.o: cf_identify_channel.c
+cf_init_support.o: cf_init_support.c
+cf_target_count_rate.o: cf_target_count_rate.c
+cf_calculate_ycent_motion.o: cf_calculate_ycent_motion.c
+cf_source_aper.o: cf_source_aper.c
+cf_grating_motion.o: cf_grating_motion.c
+cf_fpa_position.o: cf_fpa_position.c
+cf_read_fpa_pos.o: cf_read_fpa_pos.c
+cf_make_mask.o: cf_make_mask.c
+cf_mirror_motion.o: cf_mirror_motion.c
+cf_satellite_jitter.o: cf_satellite_jitter.c
+cf_calculate_y_centroid.o: cf_calculate_y_centroid.c
+cf_screen_airglow.o: cf_screen_airglow.c
+cf_screen_bad_pixels.o: cf_screen_bad_pixels.c
+cf_screen_jitter.o: cf_screen_jitter.c
+cf_screen_limb_angle.o: cf_screen_limb_angle.c
+cf_screen_saa.o: cf_screen_saa.c
+cf_screen_high_voltage.o: cf_screen_high_voltage.c
+cf_screen_burst.o: cf_screen_burst.c
+cf_set_user_gtis.o: cf_set_user_gtis.c
+cf_set_photon_flags.o: cf_set_photon_flags.c
+cf_set_good_time_intervals.o: cf_set_good_time_intervals.c
+cf_modify_hist_pha.o: cf_modify_hist_pha.c
+cf_modify_hist_times.o: cf_modify_hist_times.c
+cf_screen_pulse_height.o: cf_screen_pulse_height.c
+cf_convert_to_ergs.o: cf_convert_to_ergs.c
+cf_extraction_limits.o: cf_extraction_limits.c
+cf_astigmatism.o: cf_astigmatism.c
+cf_dispersion.o: cf_dispersion.c
+cf_doppler_and_heliocentric.o: cf_doppler_and_heliocentric.c
+cf_apply_filters.o: cf_apply_filters.c
+cf_scale_bkgd.o: cf_scale_bkgd.c
+cf_make_mask.o: cf_make_mask.c
+cf_make_wave_array.o: cf_make_wave_array.c
+cf_rebin_background.o: cf_rebin_background.c
+cf_rebin_probability_array.o: cf_rebin_probability_array.c
+cf_standard_or_optimal_extraction.o: cf_standard_or_optimal_extraction.c
+cf_optimal_extraction.o: cf_optimal_extraction.c
+cf_write_extracted_spectrum.o: cf_write_extracted_spectrum.c
diff --git a/src/libcf/calfits.c b/src/libcf/calfits.c
new file mode 100644
index 0000000..29b3a08
--- /dev/null
+++ b/src/libcf/calfits.c
@@ -0,0 +1,658 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Description: Wrappers for cfitsio routines which includes error checking.
+ *
+ * History: 04/14/99 peb Finished work on subset of routines
+ * from cfitsio v2.031.
+ * 04/15/99 emm Replaced #include FITSIO.h with
+ * #include calfuse.h
+ * 04/15/99 barrett Added FITS_get_rowsize.
+ * 04/16/99 barrett Added FITS_get_hdu_num.
+ * 04/20/99 barrett Added FITS_insert_key_[str, log, lng,
+ * fixflt, flt, fixdbl, dbl, fixcmp,
+ * cmp, fixdblcmp, dblcmp]
+ * 04/23/99 emurphy Deleted error checking from
+ * cf_get_hdu_num
+ * 04/04/01 kruk Force casesen to FALSE in FITS_get_colnum
+ * 12/18/03 bjg Change calfusettag.h to calfuse.h
+ *
+ ****************************************************************************/
+
+#include "fitsio.h"
+#include "calfuse.h"
+
+int FITS_open_file(fitsfile **fptr, const char *filename, int iomode,
+ int *status)
+{
+ ffopen(fptr, filename, iomode, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_reopen_file(fitsfile *openfptr, fitsfile **newfptr, int *status)
+{
+ ffreopen(openfptr, newfptr, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_create_file(fitsfile **fptr, const char *filename, int *status)
+{
+ ffinit(fptr, filename, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_flush_file(fitsfile *fptr, int *status)
+{
+ ffflus(fptr, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_close_file(fitsfile *fptr, int *status)
+{
+ ffclos(fptr, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_delete_file(fitsfile *fptr, int *status)
+{
+ ffdelt(fptr, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_file_name(fitsfile *fptr, char *filename, int *status)
+{
+ ffflnm(fptr, filename, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_file_mode(fitsfile *fptr, int *filemode, int *status)
+{
+ ffflmd(fptr, filemode, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_write_record(fitsfile *fptr, const char *card, int *status)
+{
+ ffprec(fptr, card, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_write_key(fitsfile *fptr, int datatype, char *keyname, void *value,
+ char *comm, int *status)
+{
+ ffpky(fptr, datatype, keyname, value,
+ comm, status);
+ if (*status) fprintf(stderr, "Error writing keyword %16.16s\n",keyname);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_write_comment(fitsfile *fptr, const char *comm, int *status)
+{
+ ffpcom(fptr, comm, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_write_history(fitsfile *fptr, const char *history, int *status)
+{
+ ffphis(fptr, history, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_write_date(fitsfile *fptr, int *status)
+{
+ ffpdat(fptr, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_copy_key(fitsfile *infptr,fitsfile *outfptr,int incol,int outcol,
+ char *rootname, int *status)
+{
+ ffcpky(infptr,outfptr,incol,outcol,
+ rootname, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_write_imghdr(fitsfile *fptr, int bitpix, int naxis, long naxes[],
+ int *status)
+{
+ ffphps( fptr, bitpix, naxis, naxes, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_write_grphdr(fitsfile *fptr, int simple, int bitpix, int naxis,
+ long naxes[], long pcount, long gcount, int extend,
+ int *status)
+{
+ ffphpr( fptr, simple, bitpix, naxis, naxes,
+ pcount, gcount, extend, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_write_btblhdr(fitsfile *fptr, long naxis2, int tfields, char **ttype,
+ char **tform, char **tunit, char *extname, long pcount,
+ int *status)
+{
+ ffphbn(fptr, naxis2, tfields, ttype,
+ tform, tunit, extname, pcount, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_get_hdrpos(fitsfile *fptr, int *nexist, int *position, int *status)
+{
+ ffghps(fptr, nexist, position, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_read_record(fitsfile *fptr, int nrec, char *card, int *status)
+{
+ ffgrec(fptr, nrec, card, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_read_card(fitsfile *fptr, char *keyname, char *card, int *status)
+{
+ ffgcrd(fptr, keyname, card, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_read_key(fitsfile *fptr, int datatype, char *keyname, void *value,
+ char *comm, int *status)
+{
+ ffgky( fptr, datatype, keyname, value,
+ comm, status);
+ if (*status) fprintf(stderr, "Error reading keyword %16.16s\n",keyname);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_read_imghdr(fitsfile *fptr, int maxdim, int *simple, int *bitpix,
+ int *naxis, long naxes[], long *pcount, long *gcount,
+ int *extend, int *status)
+{
+ ffghpr(fptr, maxdim, simple, bitpix, naxis,
+ naxes, pcount, gcount, extend, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_read_btblhdr(fitsfile *fptr, int maxfield, long *naxis2, int *tfields,
+ char **ttype, char **tform, char **tunit, char *extname,
+ long *pcount, int *status)
+{
+ ffghbn(fptr, maxfield, naxis2, tfields,
+ ttype, tform, tunit, extname,
+ pcount, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_update_card(fitsfile *fptr, char *keyname, char *card, int *status)
+{
+ ffucrd(fptr, keyname, card, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_update_key(fitsfile *fptr, int datatype, char *keyname, void *value,
+ char *comm, int *status)
+{
+ ffuky(fptr, datatype, keyname, value,
+ comm, status);
+ if (*status) fprintf(stderr, "Error updating keyword %16.16s\n",keyname);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_modify_record(fitsfile *fptr, int nkey, char *card, int *status)
+{
+ ffmrec(fptr, nkey, card, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_modify_card(fitsfile *fptr, char *keyname, char *card, int *status)
+{
+ ffmcrd(fptr, keyname, card, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_modify_comment(fitsfile *fptr, char *keyname, char *comm, int *status)
+{
+ ffmcom(fptr, keyname, comm, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_insert_record(fitsfile *fptr, int nkey, char *card, int *status)
+{
+ ffirec(fptr, nkey, card, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_insert_key_str(fitsfile *fptr, char *keyname, char *value,
+ char *comment, int *status)
+{
+ ffikys(fptr, keyname, value, comment, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_insert_key_log(fitsfile *fptr, char *keyname, int value,
+ char *comment, int *status)
+{
+ ffikyl(fptr, keyname, value, comment, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_insert_key_lng(fitsfile *fptr, char *keyname, long value,
+ char *comment, int *status)
+{
+ ffikyj(fptr, keyname, value, comment, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_insert_key_flt(fitsfile *fptr, char *keyname, float value,
+ int decimals, char *comment, int *status)
+{
+ ffikye(fptr, keyname, value, decimals, comment, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_insert_key_fixflt(fitsfile *fptr, char *keyname, float value,
+ int decimals, char *comment, int *status)
+{
+ ffikyf(fptr, keyname, value, decimals, comment, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_insert_key_dbl(fitsfile *fptr, char *keyname, double value,
+ int decimals, char *comment, int *status)
+{
+ ffikyd(fptr, keyname, value, decimals, comment, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_insert_key_fixdbl(fitsfile *fptr, char *keyname, double value,
+ int decimals, char *comment, int *status)
+{
+ ffikyg(fptr, keyname, value, decimals, comment, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_insert_key_cmp(fitsfile *fptr, char *keyname, float *value,
+ int decimals, char *comment, int *status)
+{
+ ffikyc(fptr, keyname, value, decimals, comment, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_insert_key_dblcmp(fitsfile *fptr, char *keyname, double *value,
+ int decimals, char *comment, int *status)
+{
+ ffikym(fptr, keyname, value, decimals, comment, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_insert_key_fixcmp(fitsfile *fptr, char *keyname, float *value,
+ int decimals, char *comment, int *status)
+{
+ ffikfc(fptr, keyname, value, decimals, comment, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_insert_key_fixdblcmp(fitsfile *fptr, char *keyname, double *value,
+ int decimals, char *comment, int *status)
+{
+ ffikfm(fptr, keyname, value, decimals, comment, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_insert_key_null(fitsfile *fptr, char *keyname, char *comment,
+ int *status)
+{
+ ffikyu(fptr, keyname, comment, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_delete_key(fitsfile *fptr, char *keyname, int *status)
+{
+ ffdkey(fptr, keyname, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_delete_record(fitsfile *fptr, int keypos, int *status)
+{
+ ffdrec(fptr, keypos, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_get_hdu_num(fitsfile *fptr, int *hdunum)
+{
+ /* This routine returns the HDU number instead of status. Therefore,
+ * it should not use any error checking. */
+ int status;
+ status = ffghdn(fptr, hdunum);
+ return status;
+}
+
+int FITS_get_hdu_type(fitsfile *fptr, int *exttype, int *status)
+{
+ ffghdt(fptr, exttype, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_movabs_hdu(fitsfile *fptr, int hdunum, int *exttype, int *status)
+{
+ ffmahd(fptr, hdunum, exttype, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_movrel_hdu(fitsfile *fptr, int hdumov, int *exttype, int *status)
+{
+ ffmrhd(fptr, hdumov, exttype, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_movnam_hdu(fitsfile *fptr, int exttype, char *hduname, int hduvers,
+ int *status)
+{
+ ffmnhd(fptr, exttype, hduname, hduvers,
+ status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_get_num_hdus(fitsfile *fptr, int *nhdu, int *status)
+{
+ ffthdu(fptr, nhdu, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_create_img(fitsfile *fptr, int bitpix, int naxis, long *naxes,
+ int *status)
+{
+ ffcrim(fptr, bitpix, naxis, naxes, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_create_tbl(fitsfile *fptr, int tbltype, long naxis2, int tfields,
+ char **ttype, char **tform, char **tunit, char *extname,
+ int *status)
+{
+ ffcrtb(fptr, tbltype, naxis2, tfields, ttype,
+ tform, tunit, extname, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_create_hdu(fitsfile *fptr, int *status)
+{
+ ffcrhd(fptr, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_insert_img(fitsfile *fptr, int bitpix, int naxis, long *naxes,
+ int *status)
+{
+ ffiimg(fptr, bitpix, naxis, naxes, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_insert_atbl(fitsfile *fptr, long naxis1, long naxis2, int tfields,
+ char **ttype, long *tbcol, char **tform, char **tunit,
+ char *extname, int *status)
+{
+ ffitab(fptr, naxis1, naxis2, tfields, ttype,
+ tbcol, tform, tunit, extname, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_insert_btbl(fitsfile *fptr,long naxis2, int tfields, char **ttype,
+ char **tform, char **tunit, char *extname, long pcount,
+ int *status)
+{
+ ffibin(fptr,naxis2, tfields, ttype, tform,
+ tunit, extname, pcount, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_delete_hdu(fitsfile *fptr, int *hdutype, int *status)
+{
+ ffdhdu(fptr, hdutype, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_copy_hdu(fitsfile *infptr, fitsfile *outfptr, int morekeys,
+ int *status)
+{
+ ffcopy(infptr, outfptr, morekeys, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_copy_header(fitsfile *infptr, fitsfile *outfptr, int *status)
+{
+ ffcphd(infptr, outfptr, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_copy_data(fitsfile *infptr, fitsfile *outfptr, int *status)
+{
+ ffcpdt(infptr, outfptr, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_get_colnum(fitsfile *fptr, int casesen, char *templt, int *colnum,
+ int *status)
+{
+ /* force casesen to FALSE, in accordance with the FITS standard */
+ casesen = FALSE;
+ ffgcno(fptr, casesen, templt, colnum,
+ status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_get_colname(fitsfile *fptr, int casesen, char *templt, char *colname,
+ int *colnum, int *status)
+{
+ ffgcnn(fptr, casesen, templt, colname,
+ colnum, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_get_coltype(fitsfile *fptr, int colnum, int *typecode, long *repeat,
+ long *width, int *status)
+{
+ ffgtcl(fptr, colnum, typecode, repeat,
+ width, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_get_num_rows(fitsfile *fptr, long *nrows, int *status)
+{
+ ffgnrw(fptr, nrows, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_get_rowsize(fitsfile *fptr, long *nrows, int *status)
+{
+ ffgrsz(fptr, nrows, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_get_num_cols(fitsfile *fptr, int *ncols, int *status)
+{
+ ffgncl(fptr, ncols, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_get_acolparms(fitsfile *fptr, int colnum, char *ttype, long *tbcol,
+ char *tunit, char *tform, double *tscal, double *tzero,
+ char *tnull, char *tdisp, int *status)
+{
+ ffgacl(fptr, colnum, ttype, tbcol,
+ tunit, tform, tscal, tzero,
+ tnull, tdisp, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_get_bcolparms(fitsfile *fptr, int colnum, char *ttype, char *tunit,
+ char *dtype, long *repeat, double *tscal, double *tzero,
+ long *tnull, char *tdisp, int *status)
+{
+ ffgbcl(fptr, colnum, ttype, tunit,
+ dtype, repeat, tscal, tzero,
+ tnull, tdisp, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_read_img(fitsfile *fptr, int datatype, long firstelem, long nelem,
+ void *nulval, void *array, int *anynul, int *status)
+{
+ ffgpv(fptr, datatype, firstelem, nelem,
+ nulval, array, anynul, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_read_col( fitsfile *fptr, int datatype, int colnum, long firstrow,
+ long firstelem, long nelem, void *nulval, void *array,
+ int *anynul, int *status)
+{
+ ffgcv( fptr, datatype, colnum, firstrow,
+ firstelem, nelem, nulval, array, anynul,
+ status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_write_img(fitsfile *fptr, int datatype, long firstelem, long nelem,
+ void *array, int *status)
+{
+ ffppr(fptr, datatype, firstelem, nelem,
+ array, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_write_col(fitsfile *fptr, int datatype, int colnum, long firstrow,
+ long firstelem, long nelem, void *array, int *status)
+{
+ ffpcl(fptr, datatype, colnum, firstrow,
+ firstelem, nelem, array, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_insert_rows(fitsfile *fptr, long firstrow, long nrows, int *status)
+{
+ ffirow(fptr, firstrow, nrows, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_delete_rows(fitsfile *fptr, long firstrow, long nrows, int *status)
+{
+ ffdrow(fptr, firstrow, nrows, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_delete_rowlist(fitsfile *fptr, long *rownum, long nrows, int *status)
+{
+ ffdrws(fptr, rownum, nrows, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_insert_col(fitsfile *fptr, int numcol, char *ttype, char *tform,
+ int *status)
+{
+ fficol(fptr, numcol, ttype, tform, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_insert_cols(fitsfile *fptr, int firstcol, int ncols, char **ttype,
+ char **tform, int *status)
+{
+ fficls(fptr, firstcol, ncols, ttype,
+ tform, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_delete_col(fitsfile *fptr, int numcol, int *status)
+{
+ ffdcol(fptr, numcol, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
+int FITS_copy_col(fitsfile *infptr, fitsfile *outfptr, int incol, int outcol,
+ int create_col, int *status)
+{
+ ffcpcl(infptr, outfptr, incol, outcol,
+ create_col, status);
+ cf_if_fits_error(*status);
+ return *status;
+}
+
diff --git a/src/libcf/cf_active_region.c b/src/libcf/cf_active_region.c
new file mode 100644
index 0000000..8a3fd6e
--- /dev/null
+++ b/src/libcf/cf_active_region.c
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_active_region(fitsfile *header, long nevents, float *xfarf,
+ * float *yfarf, unsigned char *locflags)
+ *
+ * Description: Flags events outside of detector active area.
+ *
+ * Note: Both cf_ttag_init and cf_hist_init set LOCATION_SHLD
+ * when initializing IDF, but they look only at XRAW and use
+ * limits that are less restrictive than those used here.
+ *
+ * Arguments: fitsfile *header Pointer to FITS file containing the
+ * header of the intermediate data file
+ * long nevents The number of events
+ * float *xfarf An array of event X positions
+ * float *yfarf An array of event Y positions
+ * unsigned char *locflags Location flags of each event
+ *
+ * Calls:
+ *
+ * Return: 0 on success
+ *
+ * History: 11/12/02 1.1 peb Begin and finish work
+ * 03/11/03 1.2 wvd Changed locflags to unsigned char
+ * 05/20/03 1.3 rdr Added call to cf_proc_check
+ * 07/29/03 1.4 wvd If cf_proc_check fails, return errflg.
+ * 04/07/07 1.5 wvd Clean up compiler warnings.
+ *
+ ****************************************************************************/
+
+#include <string.h>
+#include <stdlib.h>
+#include "calfuse.h"
+
+int
+cf_active_region(fitsfile *header, long nevents, float *xfarf, float *yfarf,
+ unsigned char *locflags)
+{
+ char CF_PRGM_ID[] = "cf_active_region";
+ char CF_VER_NUM[] = "1.5";
+
+ char elecfile[FLEN_VALUE]={'\0'};
+ char keyword[FLEN_KEYWORD]={'\0'}, detector[FLEN_VALUE]={'\0'};
+ int errflg=0, status=0, active_l, active_r, active_b, active_t;
+ long j;
+ fitsfile *elecfits=NULL;
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ if ((errflg = cf_proc_check(header, CF_PRGM_ID))) return errflg;
+
+ FITS_read_key(header, TSTRING, "DETECTOR", detector, NULL, &status);
+ /*
+ * Read keywords from ELEC_CAL file
+ */
+ FITS_read_key(header, TSTRING, "ELEC_CAL", elecfile, NULL, &status);
+ FITS_open_file(&elecfits, cf_cal_file(elecfile), READONLY, &status);
+ sprintf(keyword, "ACTVL_%s", detector);
+ FITS_read_key(elecfits, TINT, keyword, &active_l, NULL, &status);
+ sprintf(keyword, "ACTVR_%s", detector);
+ FITS_read_key(elecfits, TINT, keyword, &active_r, NULL, &status);
+ sprintf(keyword, "ACTVB_%s", detector);
+ FITS_read_key(elecfits, TINT, keyword, &active_b, NULL, &status);
+ sprintf(keyword, "ACTVT_%s", detector);
+ FITS_read_key(elecfits, TINT, keyword, &active_t, NULL, &status);
+ FITS_close_file(elecfits, &status);
+ cf_verbose(3, "Active area limits: X from %d to %d, Y from %d to %d",
+ active_l, active_r, active_b, active_t);
+ /*
+ * Apply active region flags to each event.
+ */
+ for(j=0; j<nevents; j++) {
+ /*
+ * Flag events that fall outside of detector active region.
+ */
+ if (xfarf[j] < active_l || xfarf[j] > active_r ||
+ yfarf[j] < active_b || yfarf[j] > active_t) {
+ locflags[j] |= LOCATION_SHLD;
+ }
+ }
+
+ cf_proc_update(header, CF_PRGM_ID, "COMPLETE");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+ return 0;
+}
diff --git a/src/libcf/cf_apply_dead_time.c b/src/libcf/cf_apply_dead_time.c
new file mode 100644
index 0000000..a714a28
--- /dev/null
+++ b/src/libcf/cf_apply_dead_time.c
@@ -0,0 +1,142 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_apply_dead_time(fitsfile *header, long nevents, float *time,
+ * float *weight, long nseconds, float *timeline,
+ * float *ids_dtc, float *elec_dtc)
+ *
+ * Description: Applies dead-time correction to all photons. For HIST data,
+ * uses mean of dead-time arrays. Writes mean dead-time
+ * values to file header. Issue warning if DET_DEAD > 1.5.
+ *
+ * Arguments: fitsfile *header Pointer to FITS file containing the
+ * header of the intermediate data file
+ * long nevents The number of events
+ * float *time An array of event times
+ * float *weight An array of event weights
+ * long nseconds The number of timeline values
+ * float *timeline An array of timeline times
+ * float *aic_rate Active Image Counter rate
+ * float *ids_dtc Output of cf_ids_dead_time
+ * float *elec_dtc Output of cf_elec_dead_time
+ *
+ * Calls:
+ *
+ * Return: 0 on success
+ *
+ * History: 08/01/03 1.1 wvd Begin work
+ * 08/04/03 1.2 wvd Convert aic_rate to type short.
+ * 11/25/03 1.3 wvd For HIST data, require that
+ * mean_tot_dtc be >= 1.
+ * 11/26/03 1.4 wvd Change aic_rate to type float.
+ * 02/09/04 1.5 wvd Re-write with new logic.
+ * 04/09/04 1.6 bjg Include stdlib.h
+ * 11/07/05 1.7 wvd Add a test to catch bad DTC values.
+ * 03/10/06 1.8 wvd Clean up i/o.
+ * 12/29/06 1.9 wvd Check DET_DEAD rather than TOT_DEAD.
+ * 04/07/07 1.10 wvd Clean up compiler errors.
+ *
+ ****************************************************************************/
+#include <stdlib.h>
+#include <string.h>
+#include "calfuse.h"
+
+int
+cf_apply_dead_time(fitsfile *header, long nevents, float *time, float *weight,
+ long nseconds, float *timeline, float *ids_dtc, float *elec_dtc)
+{
+ char CF_PRGM_ID[] = "cf_apply_dead_time";
+ char CF_VER_NUM[] = "1.10";
+
+ char comment[FLEN_CARD], datestr[FLEN_CARD], instmode[FLEN_VALUE];
+ char hkexists[FLEN_VALUE];
+ double ctimeb, ctimee, eng_time;
+ int errflg=0, status=0, timeref;
+ int det_flag=FALSE, ids_flag=FALSE;
+ long j, k;
+ float *tot_dtc, det_dead, ids_dead, mean_tot_dtc=0.;
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+ if ((errflg = cf_proc_check(header, CF_PRGM_ID))) return errflg;
+
+ /* Read header keywords. Set flag if DET_DEAD > 1.5 */
+ FITS_read_key(header, TSTRING, "INSTMODE", instmode, NULL, &status);
+ FITS_read_key(header, TSTRING, "HKEXISTS", hkexists, NULL, &status);
+ FITS_read_key(header, TFLOAT, "DET_DEAD", &det_dead, NULL, &status);
+ if (det_dead > 1.5) det_flag = TRUE;
+
+ /*
+ * If there is no housekeeping file, AND the engineering snapshot times
+ * are bad, AND the mean value of any DTC array is > 1.5, set the
+ * combined DTC array to unity and issue a warning.
+ */
+ if(!strncasecmp(hkexists, "N", 1)) {
+ FITS_read_key(header, TDOUBLE, "CTIME_B", &ctimeb, NULL, &status);
+ FITS_read_key(header, TDOUBLE, "CTIME_E", &ctimee, NULL, &status);
+ if ((eng_time = (ctimee-ctimeb) * 86400.) < 1.) {
+ FITS_read_key(header, TFLOAT, "IDS_DEAD", &ids_dead, NULL, &status);
+ if (ids_dead > 1.5) ids_flag = TRUE;
+ }
+ }
+
+ /*
+ * Compute total dead-time correction and its mean.
+ */
+ tot_dtc = (float *) cf_malloc(sizeof(float) * nseconds);
+ if (det_flag || ids_flag) {
+ for (k = 0; k < nseconds; k++) tot_dtc[k] = 1.0;
+ mean_tot_dtc = 1.0;
+ }
+ else {
+ for (k = 0; k < nseconds; k++) {
+ tot_dtc[k] = elec_dtc[k] * ids_dtc[k];
+ mean_tot_dtc += tot_dtc[k];
+ }
+ mean_tot_dtc /= nseconds;
+ }
+
+ /* In TTAG mode, scale weights by tot_dtc as a function of time. */
+ if (!strncmp(instmode, "TTAG", 4)) for (j=k=0; j<nevents; j++) {
+ while(timeline[k+1]-FRAME_TOLERANCE < time[j] && k+1 < nseconds)
+ k++;
+ weight[j] *= tot_dtc[k];
+ }
+
+ /* In HIST mode, scale all weights by mean dead-time correction. */
+ else if (mean_tot_dtc > 1.)
+ for (j = 0; j < nevents; j++)
+ weight[j] *= mean_tot_dtc;
+ else mean_tot_dtc = 1.;
+
+ cf_verbose(2, "Mean total dead-time correction: %f", mean_tot_dtc);
+ FITS_update_key(header, TFLOAT, "TOT_DEAD", &mean_tot_dtc, NULL, &status);
+
+ if (det_flag || ids_flag) {
+ FITS_write_comment(header, " ", &status);
+ if (ids_flag) {
+ sprintf(comment,
+ "IDS_DEAD > 1.5. Setting dead-time correction to unity.");
+ cf_if_warning(comment);
+ FITS_write_comment(header, comment, &status);
+ }
+ if (det_flag) {
+ sprintf(comment,
+ "DET_DEAD > 1.5. Setting dead-time correction to unity.");
+ cf_if_warning(comment);
+ FITS_write_comment(header, comment, &status);
+ }
+ fits_get_system_time(datestr, &timeref, &status);
+ sprintf(comment, "CalFUSE v%s %.10s", CALFUSE_VERSION, datestr);
+ FITS_write_comment(header, comment, &status);
+ FITS_write_comment(header, " ", &status);
+ }
+
+ free (tot_dtc);
+ cf_proc_update(header, CF_PRGM_ID, "COMPLETE");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+ return 0;
+}
diff --git a/src/libcf/cf_apply_filters.c b/src/libcf/cf_apply_filters.c
new file mode 100644
index 0000000..ff47f21
--- /dev/null
+++ b/src/libcf/cf_apply_filters.c
@@ -0,0 +1,177 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_apply_filters(fitsfile *header, int tscreen, long nevents,
+ * unsigned char *timeflags, unsigned char *loc_flags,
+ * long ntimes, unsigned char *gtiflags,
+ * float *dtime, float *ntime, long *ngood, long **index)
+ *
+ * Description: Select photons that satisfy filter criteria
+ *
+ * Arguments: fitsfile *header Pointer to FITS file containing the
+ * header of the intermediate data file
+ * int tscreen Flag indicating whether to screen on
+ * time flags (yes if > 0)
+ * long nevents The number of events
+ * unsigned char *timeflags Photon event time flags
+ * unsigned char *loc_flags Photon event location flags
+ * long ntimes Number of entries in timeline table
+ * unsigned char *gtiflags Status flags from timeline table
+ * float *dtime Day time exposure length
+ * float *ntime Night time exposure length
+ * long *ngood Number of good photons
+ * long **index List of good photon indexes
+ *
+ * Return: status
+ *
+ * History: 02/19/03 1.1 peb Begin work
+ * 03/20/03 1.2 peb Fixed daytime and nighttime
+ * calculation and fill header with
+ * correct EXPTIME and EXPNIGHT value.
+ * 04/08/03 1.3 wvd Get timeline-table arrays from
+ * calling routine.
+ * 05/10/03 1.4 wvd Read DAYNIGHT from file header;
+ * test only first character.
+ * 05/20/03 1.5 rdr Move to top level HDU before reading
+ * header keywords
+ * 06/09/03 1.6 rdr Ignore timing flags in the screening
+ * if tscreen is 0.
+ * 10/06/03 1.8 wvd Properly deal with new format of
+ * timeline table.
+ * 12/08/03 1.9 wvd If tscreen is 0, ignore temporal
+ * flags when calculating dtime & ntime.
+ * 02/11/04 1.10 wvd Correct error in calculation of
+ * dtime and ntime.
+ * 06/02/04 1.11 wvd Mask BRST, SAA, and LIMB flags
+ * when calculating exposure time
+ * for HIST data.
+ * 06/10/04 1.12 wvd Delete timeline times array from
+ * argument list.
+ * 01/27/05 1.13 wvd Use TEMPORAL_MASK rather than
+ * TEMPORAL_DAY to screen photon status
+ * flags. They differ only in HIST mode.
+ * 07/18/08 1.14 wvd If EXP_STAT = 2, target is bright
+ * earth or airglow. Mask limb-angle flag.
+ * 08/22/08 1.15 wvd Compare EXP_STAT with TEMPORAL_LIMB,
+ * rather than a particular value.
+ *
+ ****************************************************************************/
+
+#include <string.h>
+#include <stdlib.h>
+#include <math.h>
+#include "calfuse.h"
+
+int
+cf_apply_filters(fitsfile *header, int tscreen, long nevents,
+ unsigned char *timeflags, unsigned char *loc_flags,
+ long ntimes, unsigned char *gtiflags,
+ long *dtime, long *ntime, long *ngood, long **index)
+{
+ char CF_PRGM_ID[] = "cf_apply_filters";
+ char CF_VER_NUM[] = "1.15";
+
+ char daynight[FLEN_VALUE], instmode[FLEN_VALUE];
+ int day=0, expstat, night=0, status=0;
+ long j;
+ float exptime;
+ unsigned char TEMPORAL_MASK;
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ /*
+ * Read INSTMODE keyword. If in HIST mode, mask out
+ * LIMB, SAA, and BRST flags. TEMPORAL_DAY is the default.
+ */
+ TEMPORAL_MASK = TEMPORAL_DAY;
+ FITS_read_key(header, TSTRING, "INSTMODE", instmode, NULL, &status);
+ if (!strncmp(instmode, "HIST", 4)) {
+ TEMPORAL_MASK |= TEMPORAL_LIMB;
+ TEMPORAL_MASK |= TEMPORAL_SAA;
+ TEMPORAL_MASK |= TEMPORAL_BRST;
+ }
+ /*
+ * If EXP_STAT = TEMPORAL_LIMB, target is bright earth or airglow.
+ * Mask limb-angle flag.
+ */
+ FITS_read_key(header, TINT, "EXP_STAT", &expstat, NULL, &status);
+ if (expstat == (int) TEMPORAL_LIMB) TEMPORAL_MASK |= TEMPORAL_LIMB;
+
+ /*
+ * Calculate day/night exposure time.
+ * If tscreen is 0, ignore the temporal flags (other than day/night).
+ */
+ *dtime = *ntime = 0.;
+ for (j=0; j<ntimes-1; j++) {
+ if ( !(gtiflags[j] & ~TEMPORAL_MASK) || !tscreen ) {
+ if (gtiflags[j] & TEMPORAL_DAY)
+ *dtime += 1;
+ else
+ *ntime += 1;
+ }
+ }
+ cf_verbose(2, "Exposure time: day = %ld, night = %ld", *dtime, *ntime);
+ /*
+ * Read EXPTIME and DAYNIGHT keywords from file header.
+ */
+ FITS_movabs_hdu(header, 1, NULL, &status) ;
+ FITS_read_key(header, TFLOAT, "EXPTIME", &exptime, NULL, &status);
+ FITS_read_key(header, TSTRING, "DAYNIGHT", daynight, NULL, &status);
+
+ /* Decode DAYNIGHT keyword */
+ if (!strncmp(daynight, "D", 1) || !strncmp(daynight, "d", 1)) {
+ day = 1;
+ *ntime = 0.;
+ }
+ else if (!strncmp(daynight, "N", 1) || !strncmp(daynight, "n", 1)) {
+ night = 1;
+ *dtime = 0.;
+ }
+ else if (!strncmp(daynight, "B", 1) || !strncmp(daynight, "b", 1)) {
+ day = night = 1;
+ }
+ else
+ cf_if_error("Unknown DAYNIGHT keyword value");
+ cf_verbose(3, "DAYNIGHT flag set to %s", daynight);
+
+ /* Quick test of internal consistency */
+ if (fabs(*dtime + *ntime - exptime) > exptime/10.)
+ cf_if_warning("Sum of day and night time differs from EXPTIME by > 10%%");
+
+ /*
+ * Apply screening to each photon event.
+ * First mask out airglow and day flags and test for zero
+ * (good) values. Next, see if the user wants daytime,
+ * night time, or both and confirm that appropriate flag is set.
+ */
+
+ *index = (long *) cf_calloc(nevents, sizeof(long));
+
+ if (tscreen) {
+ for(*ngood=j=0; j<nevents; j++) {
+ if (!(loc_flags[j] & ~LOCATION_AIR) &&
+ !(timeflags[j] & ~TEMPORAL_MASK) &&
+ ((day && (timeflags[j] & TEMPORAL_DAY)) ||
+ (night && (timeflags[j] ^ TEMPORAL_DAY)))) {
+ (*index)[(*ngood)++] = j;
+ }
+ }
+ }
+
+ /* If tscreen is 0, then screen only on the location flags. */
+ else {
+ cf_verbose(1, "Ignoring time flags in the screening") ;
+ for(*ngood=j=0; j<nevents; j++)
+ if (!(loc_flags[j] & ~LOCATION_AIR))
+ (*index)[(*ngood)++] = j;
+ }
+
+ cf_verbose(2, "%ld good events", *ngood);
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+ return status;
+}
diff --git a/src/libcf/cf_astig_farf.c b/src/libcf/cf_astig_farf.c
new file mode 100644
index 0000000..aabcdae
--- /dev/null
+++ b/src/libcf/cf_astig_farf.c
@@ -0,0 +1,144 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Description: Correct XFARF array for instrumental astigmatism.
+ *
+ * Returns: 0 upon successful completion.
+ *
+ * History: 12/12/02 1.1 jch Begin work
+ * 02/24/03 1.2 peb Using calfusettag.h include file
+ * 03/04/03 1.3 peb Removed math.h - unnecessary
+ * 03/11/03 1.4 wvd Changed channel to type *char
+ * 04/04/03 1.5 wvd Test for overflow of astig array.
+ * 05/20/03 1.6 rdr Add call to cf_proc_check
+ * 09/16/03 1.7 wvd Remove calls to astig_target_aperture
+ * and astig_read_file. Change sign of
+ * astigmatism correction to match
+ * the new astg**009.fit files.
+ * Make yoff a float.
+ * 11/05/03 1.8 wvd Change channel to unsigned char.
+ * 04/07/07 1.9 wvd Clean up compiler warnings.
+ *
+ ****************************************************************************/
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "calfuse.h"
+
+static char CF_PRGM_ID[] = "cf_astig_farf";
+static char CF_VER_NUM[] = "1.9";
+
+
+/*
+ * Add astigmatism correction to XFARF for each photon within target
+ * aperture. Note that spectrum centroid moves with time.
+ */
+static int
+farf_astig_shifts(fitsfile *header, long nevents, float *xfarf,
+ float *yfarf, unsigned char *channel, float *photon_time,
+ long nseconds, float *timeline_time, float *ycentl, float *ycents)
+{
+ char astig_file[FLEN_VALUE];
+ int status=0;
+ int active_ap[2], ap, ast_cen, extno, overflow=0;
+ long i, j, k;
+ long npix, nx, ny, ii, jj, kk;
+ float yoff;
+ float *astig=NULL, *centroid=NULL;
+ fitsfile *astigfits;
+
+ /* Read target apertures from the file header */
+ (void) cf_source_aper (header, active_ap);
+
+ /* Open the astigmatism file */
+ FITS_read_key(header, TSTRING, "ASTG_CAL", astig_file, NULL, &status);
+ FITS_open_file(&astigfits, cf_cal_file(astig_file), READONLY, &status);
+
+ /* Since we presently have no astig correction for extended
+ * sources, we apply correction only to target aperture.
+ */
+ for (i = 0; i < 2; i++) {
+
+ ap = active_ap[i];
+ if (i == 0)
+ centroid = ycentl;
+ else
+ centroid = ycents;
+
+ /* Read astigmatism correction for this aperture */
+ extno = ap+1;
+ cf_verbose(3, "Reading extension %d of %s", extno, astig_file);
+ FITS_movabs_hdu(astigfits, extno, NULL, &status);
+ FITS_read_key(astigfits, TINT, "SLIT_CEN", &ast_cen, NULL, &status);
+ FITS_read_key(astigfits, TLONG, "NAXIS1", &nx, NULL, &status);
+ FITS_read_key(astigfits, TLONG, "NAXIS2", &ny, NULL, &status);
+
+ npix = nx * ny;
+ astig = (float *) cf_malloc(sizeof(float) * npix);
+ FITS_read_img(astigfits, TFLOAT, 1L, npix, 0, astig, NULL, &status);
+
+ /* Go through the photon list, find the astigmatism (delta(X))
+ * corresponding to the (xfarf, yfarf) position and channel,
+ * and add it to xfarf[k].
+ */
+ k = 0;
+ for (j = 0; j < nevents; j++) {
+ if (channel[j] == ap) {
+ while ((photon_time[j] > timeline_time[k+1] - FRAME_TOLERANCE)
+ && (k < nseconds-1)) {
+ k++;
+ }
+
+ /* Determine offset between spectrum and astig correction file. */
+ yoff = centroid[k] - ast_cen;
+
+ /* Find the astigmatism correction appropriate
+ to the photon's (xfarf, yfarf) position. */
+ if ((ii = (xfarf[j] + 0.5)) >= nx) {overflow = 1; continue;};
+ if ((jj = (yfarf[j] - yoff + 0.5)) >= ny) {overflow = 1; continue;}
+ if ((kk = jj * nx + ii) >= npix) {overflow = 1; continue;}
+ xfarf[j] += astig[kk];
+ }
+ }
+
+ /* If overflow flag is set, there is a problem with the ASTG_CAL file. */
+ if (overflow)
+ cf_if_warning("Overflow of ASTG_CAL file in aperture %d", ap);
+
+ /* Space for astig array is allocated in each loop. */
+ free(astig);
+ }
+
+ FITS_close_file(astigfits, &status);
+ return status;
+}
+
+int cf_astig_farf(fitsfile *header, long nevents, float *xfarf, float *yfarf,
+ unsigned char *channel, float *photon_time, long nseconds,
+ float *timeline_time, float *ycentl, float *ycents)
+{
+ int errflg=0, status=0;
+
+ /* Enter a timestamp into the log. */
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+ if ((errflg = cf_proc_check(header, CF_PRGM_ID))) return errflg;
+
+ /* Check that astigmatism correction is appropriate for input image */
+ if (astig_check_input_image(header) == 1) {
+
+ /* Read astigmatism corrections for each aperture, add to XFARF */
+ farf_astig_shifts(header, nevents, xfarf, yfarf, channel,
+ photon_time, nseconds, timeline_time, ycentl, ycents);
+ }
+
+ /* Update processing flags. */
+ cf_proc_update(header, CF_PRGM_ID, "COMPLETE");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done Processing");
+ return (status);
+}
diff --git a/src/libcf/cf_astigmatism.c b/src/libcf/cf_astigmatism.c
new file mode 100644
index 0000000..e02f361
--- /dev/null
+++ b/src/libcf/cf_astigmatism.c
@@ -0,0 +1,198 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Description: Modifies X array to correct for instrumental astigmatism.
+ *
+ * Since we have no astigmatism correction for extended
+ * sources, this program does not attempt to apply one.
+ *
+ * In keeping with the CalFUSE standard, the astigmatism
+ * correction is added to the measured X position of each photon.
+ * Versions of the ASTG_CAL file prior to v009 have the opposite
+ * sign and are incompatible with this version of the program.
+ *
+ * Returns: 0 upon successful completion.
+ *
+ * History: 12/02/02 1.1 jch Adapt from cf_astig.c
+ * 12/20/02 1.2 wvd Install
+ * 02/11/03 1.3 wvd Apply astig correction only if
+ * YCENT# > O for target aperture.
+ * Add ASTG_KEY keyword. Comment field:
+ * Performed? 1=LiF, 2=SiC, 3=Both
+ * 02/13/03 1.4 wvd Change all indices to type long.
+ * 02/24/03 1.5 peb Changed include file to calfusettag.h
+ * 03/04/03 1.6 peb Removed unused variables and math.h.
+ * Corrected sprintf:185 argument error.
+ * 03/11/03 1.7 wvd Change channel to type char
+ * 03/12/03 1.8 wvd If wavelength undefined, set
+ * channel[k] = 0
+ * 04/04/03 1.9 wvd Test for overflow of astig array.
+ * 04/07/03 1.10 wvd Delete test for quality of YCENT.
+ * Delete ASTG_KEY keyword.
+ * Don't round yoff to nearest integer.
+ * 04/09/03 1.11 wvd Write name of ASTG_CAL file to trailer.
+ * 05/20/03 1.12 rdr Added call to cf_proc_check
+ * 09/16/03 1.13 wvd Change sign of ASTG_CAL file so that
+ * correction is additive.
+ * 09/22/03 1.14 wvd Initialize overflow counter.
+ * Print out number of overflows.
+ * 10/17/03 1.15 wvd Discard photons that fall outside of
+ * the astigmatism-correction window.
+ * 10/31/03 1.16 wvd Change channel to unsigned char.
+ * 11/11/03 1.17 wvd Interpolate between tabulated
+ * wavelength values. Use cf_read_col
+ * to read wavecal files.
+ * 02/17/04 1.18 wvd Replace cf_nint() with cf_nlong()
+ * 03/02/04 1.19 wvd Change name of assign_wavelengths
+ * to cf_x2lambda and make it
+ * generally accessible.
+ * 07/16/04 1.20 wvd Must change ASTG_COR to COMPLETE or
+ * SKIPPED by hand.
+ * 02/18/05 1.21 wvd Add some diagnostic output.
+ * 11/30/05 1.22 wvd Don't complain when photon events
+ * fall outside of astig images.
+ * 05/15/06 1.23 wvd Divide cf_astigmatism_and_dispersion
+ * into two separate routines.
+ *
+ ****************************************************************************/
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include "calfuse.h"
+
+static char CF_PRGM_ID[] = "cf_astigmatism";
+static char CF_VER_NUM[] = "1.23";
+
+
+/*
+ * Loop over the apertures, read appropriate astigmatism correction,
+ * and add to the input X shifts of pixels within extraction window.
+ */
+static int
+add_astig_shifts(fitsfile *infits, long nevents, float *x, float *y,
+ unsigned char *channel)
+{
+ char astig_file[FLEN_VALUE], keyword[FLEN_VALUE];
+ int status=0;
+ int ap, active_ap[2], ast_cen, extno, i, overflow;
+ long k, ii, jj, kk, npix, nx, ny;
+ float centroid, yoff;
+ float *astig=NULL;
+ fitsfile *astigfits;
+
+ /* Read target apertures from the file header */
+ (void) cf_source_aper (infits, active_ap);
+
+ /* Open the astigmatism file */
+ FITS_read_key(infits, TSTRING, "ASTG_CAL", astig_file, NULL, &status);
+ FITS_open_file(&astigfits, cf_cal_file(astig_file), READONLY, &status);
+
+ /* Since we presently have no astig correction for extended
+ * sources, we apply correction only to target aperture.
+ */
+ for (i = 0; i < 2; i++) {
+ ap = active_ap[i];
+
+ /* Read the centroid of the aperture from the input file. */
+ sprintf(keyword, "YCENT%1d", ap);
+ FITS_read_key(infits, TFLOAT, keyword, &centroid, NULL, &status);
+ cf_verbose(3, "Target aperture: %d\t Y centroid: %f", ap, centroid);
+
+ /* Read astigmatism correction for this aperture */
+ extno = ap+1;
+ cf_verbose(3, "Reading extension %d of %s", extno, astig_file);
+ FITS_movabs_hdu(astigfits, extno, NULL, &status);
+ FITS_read_key(astigfits, TINT, "SLIT_CEN", &ast_cen, NULL, &status);
+ FITS_read_key(astigfits, TLONG, "NAXIS1", &nx, NULL, &status);
+ FITS_read_key(astigfits, TLONG, "NAXIS2", &ny, NULL, &status);
+
+ npix = nx * ny;
+ astig = (float *) cf_malloc(sizeof(float) * npix);
+ FITS_read_img(astigfits, TFLOAT, 1L, npix, 0, astig, NULL, &status);
+
+ /* Determine offset between spectrum and astig correction file */
+ yoff = centroid - ast_cen;
+ cf_verbose(3, "Offset between spectrum and astig correction: %f", yoff);
+
+ /* Go through the event list and find the astigmatism correction
+ * appropriate for the photon's (x, y) position.
+ */
+ overflow = 0;
+ for (k = 0; k < nevents; k++) {
+ if (channel[k] == ap) {
+ if (((ii = cf_nlong(x[k])) < 0 || ii >= nx) ||
+ ((jj = cf_nlong(y[k] - yoff)) < 0 || jj >= ny) ||
+ ((kk = jj * nx + ii) >= npix)) {
+ channel[k] = 0;
+ overflow++;
+ cf_verbose(3, "Cannot correct pixel %05ld (%f, %f)",
+ k, x[k], y[k]);
+ }
+ else x[k] += astig[kk];
+ }
+ }
+ /* If overflow flag is set, there is a problem either with
+ the ASTG_CAL file or the input photon list.
+ if (overflow)
+ cf_if_warning("%d events fell outside of aperture %d ASTG_CAL window",
+ overflow, ap);
+ Comment this out, as it is always triggered by cf_bad_pixels. - wvd (11/30/05) */
+
+ /* Space for astig array is allocated in each loop. */
+ free(astig);
+ cf_verbose(3, "End of loop for aperture %d", ap);
+ }
+
+ FITS_close_file(astigfits, &status);
+ return status;
+}
+
+
+/*
+ * If APERTURE = RFPT or target is not a point source, exit without
+ * applying an astigmatism correction.
+ */
+int cf_astigmatism(fitsfile *infits, long nevents, float *x,
+ float *y, unsigned char *channel)
+{
+ char aperture[FLEN_VALUE];
+ char source_type[FLEN_VALUE];
+ int errflg=0, fileok=TRUE, status=0;
+
+ /* Enter a timestamp into the log. */
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ if ((errflg = cf_proc_check(infits, CF_PRGM_ID))) return errflg;
+
+ FITS_read_key(infits, TSTRING, "APERTURE", aperture, NULL, &status);
+ if (!strncmp(aperture, "RFPT", 4)) {
+ cf_verbose(1, "Aperture is RFPT. No astig correction applied.");
+ fileok = FALSE;
+ }
+
+ /* Check source type */
+ FITS_read_key(infits, TSTRING, "SRC_TYPE", source_type, NULL, &status);
+ if (strncmp(source_type, "P", 1)) {
+ cf_verbose(1, "Source type is %s. No astig correction applied.",
+ source_type);
+ fileok = FALSE;
+ }
+
+ if (fileok) {
+ add_astig_shifts(infits, nevents, x, y, channel);
+ cf_proc_update(infits, CF_PRGM_ID, "COMPLETE");
+ }
+ else
+ cf_proc_update(infits, CF_PRGM_ID, "SKIPPED");
+
+ /* Update processing flags. */
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done Processing");
+
+ return fileok;
+}
diff --git a/src/libcf/cf_cal_file.c b/src/libcf/cf_cal_file.c
new file mode 100644
index 0000000..59c873d
--- /dev/null
+++ b/src/libcf/cf_cal_file.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_cal_file(char *calfile)
+ *
+ * Description: Returns a pointer to a string with the full calibration
+ * path (from the CF_CALDIR environment variable) prepended
+ * to the given file name.
+ *
+ * Arguments: char *calfile Name of the calibration file.
+ *
+ * Returns: A pointer to a string which contains the full path filename.
+ *
+ * History: 02/26/99 emurphy Begin and finish work.
+ * 03/01/99 emurphy Added some error checking
+ * 03/02/99 emurphy Added use of cf_if_warning
+ * 04/04/99 emurphy removed cf_error_init
+ * 04/08/99 barrett replaced fitsio.h with calfuse.h
+ * 05/18/99 emurphy Added checks on strlen and ending "/"
+ * 06/04/99 peb Removed 160 character string limit
+ * Added cf_malloc function.
+ * 08/05/99 emurphy Created cf_populate_file, to support
+ * cf_cal_file and cf_hist_file.c
+ * 08/25/99 emurphy Added cf_parm_file for parameter files.
+ * 12/18/03 bjg Change calfusettag.h to calfuse.h
+ *
+ ****************************************************************************/
+
+#include <stdlib.h>
+#include <string.h>
+#include "calfuse.h"
+
+static char
+*cf_populate_file(char *calfile, char *enviro_name)
+{
+ char *enviro, *filen;
+ int strl, strt;
+
+ enviro = getenv(enviro_name);
+
+ if (enviro) {
+ strl = strlen(enviro);
+ strt = strl + strlen(calfile) + 16;
+
+ filen = cf_malloc(strt);
+ strcpy(filen, enviro);
+
+ /* Check to see if last character is a "/" */
+ if (strncmp(filen+strl-1, "/", 1)!=0)
+ strcat(filen, "/");
+
+ strcat(filen, calfile);
+ return filen;
+ }
+ else {
+ printf("Environment variable %-20.20s undefined.",enviro_name);
+ cf_if_warning("Environment variable undefined");
+ return calfile;
+ }
+}
+
+char *cf_cal_file(char *calfile)
+{
+
+ return cf_populate_file(calfile, "CF_CALDIR");
+
+}
+
+char *cf_hist_file(char *calfile)
+{
+
+ return cf_populate_file(calfile, "CF_HISTDIR");
+
+}
+
+char *cf_parm_file(char *calfile)
+{
+
+ return cf_populate_file(calfile, "CF_PARMDIR");
+
+}
diff --git a/src/libcf/cf_calculate_y_centroid.c b/src/libcf/cf_calculate_y_centroid.c
new file mode 100644
index 0000000..ebcd264
--- /dev/null
+++ b/src/libcf/cf_calculate_y_centroid.c
@@ -0,0 +1,289 @@
+/**************************************************************************
+ * Johns Hopkins University
+ * Center for Astrophysical Sciences
+ * FUSE
+ **************************************************************************
+ *
+ * Synopsis: cf_calculate_y_centroid(infits, nevents, weight, x, y,
+ * channel, timeflags, locflags)
+ *
+ * Description: Determines the y centroid of the target and airglow spectra
+ * in each aperture. The value written to the header depends
+ * on the quality flag for each channel in the IDF header.
+ * If QUALITY = HIGH, the target centroid is used; if MEDIUM,
+ * the airglow centroid is used; if LOW, the default centroid
+ * (from the CHID_CAL file) is used.
+ *
+ * Arguments: fitsfile infits Pointer to the input Intermediate Data File
+ * long nevents Number of photon events in the file
+ * float weight Scale factor for each photon
+ * float *x, *y X and Y positions of the photon
+ * unsigned char *channel Aperture associated with each photon
+ * unsigned char *timeflags Time flags - used to identify photons
+ * arriving during bursts, etc.
+ * unsigned char *locflags Location flags - used to identify photons
+ * in geocoronal line regions
+ *
+ * Calibration files required:
+ *
+ * Returns: 0 on success
+ *
+ * HISTORY: 10/16/02 v1.1 RDR started work
+ * 12/02/02 v1.2 RDR cleaned up variables
+ * 12/12/02 v1.3 wvd added include files
+ * 12/26/02 v1.4 RDR corrected error in calculating centroid
+ * 02/24/03 v1.5 peb changed include file to calfitsio.h
+ * 03/11/03 v1.6 wvd Changed screen to unsigned char
+ * 03/25/03 v1.7 rdr ignore pinhole aperture
+ * 04/03/03 v1.9 wvd Simplify calculation of centroid.
+ * Include airglow in centroid
+ * calculation of non-target apertures.
+ * Replace printf() with cf_verbose().
+ * 04/17/03 v1.10 wvd Fix bug in calculation of non-target
+ * centroids.
+ * 04/18/03 v1.11 wvd Call cf_proc_update only if final_call
+ * is TRUE. Scale YCENT by photon weight
+ * for use with HIST data. Changed
+ * screen to locflags.
+ * 05/20/03 v1.12 rdr Added call to cf_proc_check
+ * 05/22/03 v1.14 wvd cf_error_init to stderr
+ * 08/21/03 v1.16 wvd Change channel to unsigned char
+ * 09/02/03 v1.17 bjg Now read user-specified centroid
+ * information from PARM_CAL and
+ * expected centroids from CHID_CAL.
+ * 09/02/03 v1.18 wvd Tidy up code.
+ * 09/17/03 v1.19 wvd Return -1 if a target centroid
+ * is too far from expected value.
+ * 10/28/03 v1.20 wvd Rewrite program with new logic.
+ * Delete use of final_call.
+ * 11/12/03 v1.21 wvd If no photons in channel, don't
+ * crash, just use default centroid.
+ * If quality = LOW, ygeo = ycent.
+ * 04/09/04 v1.22 bjg Include string.h and stdio.h
+ * 06/04/04 v1.23 wvd Use photon time flags to exclude
+ * bursts, etc. from calculation.
+ * 08/18/04 v1.24 wvd Test all spectra to see whether
+ * centroid is out of bounds.
+ * 03/11/05 v1.25 wvd Tabulate centroids as doubles,
+ * then convert to floats.
+ * Write target centroid values
+ * to trailer file if verbose >= 2.
+ * 04/15/05 v1.26 wvd Clean up i/o.
+ * 04/26/05 v1.27 wvd Don't populate YGEO keywords, as
+ * they are wrong for point sources.
+ * Consider only events with good
+ * LOCATION flags.
+ * Use the largest aperture with a valid
+ * YGEO to determine offset from tabulated
+ * position. Use this shift to calculate
+ * ygeo for the smaller apertures.
+ * 05/18/05 v1.28 wvd Test both SPEX_LIF and SPEX_SIC.
+ * Don't override user-specified centroid,
+ * even if it's far from expected value.
+ * Fix bug in tabulation of expected
+ * Y centroids.
+ * 02/01/06 v1.29 wvd If ycent is too far from default value,
+ * use default value, not airglow centroid.
+ * Allow computation of yshift from
+ * airglow photons in target aperture.
+ * 11/25/08 1.30 wvd In HIST mode, there are no spectra in
+ * other apertures to cause confusion,
+ * so we need not require that the target
+ * centroid lie within X pixels of either
+ * the airglow or tabulated centroid.
+ *
+ **************************************************************************/
+
+#include <math.h>
+#include <string.h>
+#include <stdio.h>
+#include "calfuse.h"
+
+int cf_calculate_y_centroid(fitsfile *infits, long nevents, float *weight,
+ float *x, float *y, unsigned char *channel, unsigned char *timeflags,
+ unsigned char *locflags)
+{
+
+ char CF_PRGM_ID[] = "cf_calculate_y_centroid";
+ char CF_VER_NUM[] = "1.30";
+
+ char aperture[FLEN_VALUE], instmode[FLEN_VALUE];
+ char ycentname[FLEN_KEYWORD], file_name[FLEN_VALUE];
+ char key[FLEN_KEYWORD], quality[8][FLEN_VALUE];
+ double dncent, dngeo, dycent, dygeo;
+ float ycent, ygeo, yshift, ycent_tab[8];
+ int chan_num, errflg=0, status=0, active_ap[2];
+ int got_shift, i, hdu, target_ap, user;
+ int spex_sic, spex_lif, emax_sic, emax_lif, emax, extended;
+ long n;
+ fitsfile *parm_cal, *chid_cal;
+
+ /* Initialize error checking */
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+ /* Enter a time stamp into the log */
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ /* Check whether routine is appropriate for this data file. */
+ if ( (errflg = cf_proc_check(infits, CF_PRGM_ID)) ) return errflg;
+
+ /* Read the source aperture from the file header. */
+ FITS_read_key(infits, TSTRING, "APERTURE", aperture, NULL, &status);
+ extended=cf_source_aper(infits, active_ap) ;
+
+ /* Were data taken in HIST or TTAG mode? */
+ FITS_read_key(infits, TSTRING, "INSTMODE", instmode, NULL, &status);
+
+ /* Read centroid quality keywords from file header. */
+ for (i = 1; i < 8; i++) {
+ if (i == 4) continue;
+ sprintf(key, "YQUAL%1d", i);
+ FITS_read_key(infits, TSTRING, key, &quality[i][0], NULL, &status);
+ }
+
+ /* Read extraction parameters from PARM_CAL file. */
+ FITS_read_key(infits, TSTRING, "PARM_CAL", file_name, NULL, &status);
+ FITS_open_file(&parm_cal, cf_parm_file(file_name), READONLY, &status);
+ FITS_read_key(parm_cal,TINT,"SPEX_SIC",&spex_sic,NULL,&status);
+ FITS_read_key(parm_cal,TINT,"SPEX_LIF",&spex_lif,NULL,&status);
+ FITS_read_key(parm_cal,TINT,"EMAX_SIC",&emax_sic,NULL,&status);
+ FITS_read_key(parm_cal,TINT,"EMAX_LIF",&emax_lif,NULL,&status);
+ FITS_close_file(parm_cal,&status);
+
+ /* Read expected centroids from CHID_CAL file. Use extended-aperture
+ values except for apertures containing point-source targets. */
+ FITS_read_key(infits, TSTRING, "CHID_CAL", file_name, NULL, &status);
+ FITS_open_file(&chid_cal, cf_cal_file(file_name), READONLY, &status);
+ for (i = 1; i < 8; i++) {
+ if (i==4) continue;
+ if ((i == active_ap[0] || i == active_ap[1]) && !extended) hdu=i+1;
+ else hdu=i+9;
+ FITS_movabs_hdu(chid_cal, hdu, NULL, &status);
+ FITS_read_key(chid_cal,TFLOAT,"CENTROID",ycent_tab+i,NULL,&status);
+ }
+ FITS_close_file(chid_cal,&status);
+
+ /* Determine the centroids for each channel */
+ yshift = 0;
+ got_shift = FALSE;
+ for (chan_num = 7; chan_num > 0; chan_num--) {
+ if (chan_num == 4) {
+ yshift = 0;
+ got_shift = FALSE;
+ continue;
+ }
+ dngeo = dncent = 0.;
+ dygeo = dycent = 0.;
+ sprintf (ycentname, "YCENT%d", chan_num);
+
+ /* Is this a target aperture? */
+ if (chan_num == active_ap[0] || chan_num == active_ap[1])
+ target_ap = TRUE;
+ else
+ target_ap = FALSE;
+
+ /* If not, and we're in histogram mode, skip to the next channel. */
+ if (!target_ap && !strncmp(instmode, "HIST", 4)) continue;
+
+ /* Calculate separate target and geocoronal centroids. */
+ for (n = 0; n < nevents; n++) {
+ if (channel[n] == chan_num && !(timeflags[n] & ~TEMPORAL_DAY) &&
+ !(locflags[n] & ~LOCATION_AIR)) {
+
+ if(locflags[n] & LOCATION_AIR) { /* Airglow photon */
+ dygeo += y[n] * weight[n];
+ dngeo += weight[n];
+ }
+ else { /* Target photon */
+ dycent += y[n] * weight[n];
+ dncent += weight[n];
+ }
+ }
+ }
+
+ /* If we can't find any photons but expect to, set quality to LOW. */
+ if ((quality[chan_num][0] == 'H' && dncent < 1) ||
+ (quality[chan_num][0] == 'M' && dngeo < 1)) {
+ quality[chan_num][0] = 'L';
+ sprintf(key, "YQUAL%1d", chan_num);
+ FITS_update_key(infits, TSTRING, key, "LOW", NULL, &status) ;
+ cf_verbose(1, "No photon events in channel %d", chan_num);
+ }
+
+ /* Compute centroids of target and airglow spectra */
+ ycent = ygeo = 0;
+ if (dncent > 0) ycent = dycent / dncent;
+ if (dngeo > 0) ygeo = dygeo / dngeo;
+
+ /* If yshift is already known, use it to calculate ygeo.
+ * If not, and ygeo is valid for this aperture, compute yshift.
+ */
+ if (got_shift)
+ ygeo = yshift + ycent_tab[chan_num];
+ else if (dngeo > 0) {
+ yshift = ygeo - ycent_tab[chan_num];
+ got_shift = TRUE;
+ }
+
+ /* Now decide which values to write to the header. */
+
+ /* If we are in the target aperture and the user has specified
+ * YCENT for this channel, use it.
+ */
+ if (target_ap && ((chan_num<5 && spex_lif>=0 && spex_lif<1024) ||
+ (chan_num>4 && spex_sic>=0 && spex_sic<1024))) {
+ if (chan_num<5) ycent=spex_lif;
+ else ycent=spex_sic;
+ cf_verbose(1, "Channel %d: User-specified Y centroid = %g",
+ chan_num, ycent);
+ user = TRUE;
+ }
+ else
+ user = FALSE;
+
+ /* If the centroid quality is HIGH, use the calculated target
+ * value, regardless of whether we are in a target aperture.
+ * (This happens by default, so we don't have to do anything.)
+ */
+
+ /* If the centroid quality is MED, use the airglow centroid. */
+ if (quality[chan_num][0] == 'M')
+ ycent = ygeo;
+
+ /* If the quality is LOW, use the default value. */
+ else if (quality[chan_num][0] == 'L')
+ ycent = ycent_tab[chan_num];
+
+ /*
+ * Test whether YCENT is too far from the expected value.
+ * If so, use the tabulated value and set the quality to LOW.
+ * Don't test HIST data. (wvd, 11/25/2008)
+ */
+ if (chan_num<5) emax=emax_lif; else emax=emax_sic;
+ if (fabs(ycent-ycent_tab[chan_num]) > emax && !user && !strncmp(instmode, "TTAG", 4)) {
+ if(target_ap) {
+ cf_verbose(1, "Channel %d: computed centroid (%.1f) is too far "
+ "from expected value.", chan_num, ycent);
+ cf_verbose(1, "Channel %d: using default centroid of %.1f",
+ chan_num, ycent_tab[chan_num]);
+ }
+ else {
+ cf_verbose(2, "Channel %d: using default centroid of %.1f",
+ chan_num, ycent_tab[chan_num]);
+ }
+ ycent = ycent_tab[chan_num];
+ sprintf(key, "YQUAL%1d", chan_num);
+ FITS_update_key(infits, TSTRING, key, "LOW", NULL, &status) ;
+ }
+
+ /* Write centroid of target spectrum to the header */
+ FITS_update_key(infits, TFLOAT, ycentname, &ycent, NULL, &status) ;
+ cf_verbose(2, "For channel %d, Y centroid = %.1f", chan_num, ycent) ;
+
+ } /* End of loop over channels. */
+
+ cf_proc_update(infits, CF_PRGM_ID, "COMPLETE");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished processing");
+
+ return status;
+}
diff --git a/src/libcf/cf_calculate_ycent_motion.c b/src/libcf/cf_calculate_ycent_motion.c
new file mode 100644
index 0000000..8879213
--- /dev/null
+++ b/src/libcf/cf_calculate_ycent_motion.c
@@ -0,0 +1,152 @@
+/**************************************************************************
+ * Johns Hopkins University
+ * Center for Astrophysical Sciences
+ * FUSE
+ *************************************************************************
+ *
+ * synopsis: cf_calculate_ycent_motion(header, nevents, ptime, y, channel,
+ * locflags, nsec, ttime, ycentl, ycents)
+ *
+ * Description: Determines the Y centroid of the emission as a function
+ * of time within the target apertures
+ *
+ * Arguments: fitsfile *header : pointer to Intermediate Data File
+ * long nevents : number of photon events in the file
+ * float *ptime : detection time for each photon
+ * float *y : y position of each photon
+ * unsigned char *channel: aperture associated with each photon
+ * unsigned char *locflags: location flag array
+ * long nsec : number of seconds tabulated in timeline
+ * float *ttime : tabulated times in the timeline
+ * geocoronal photons
+ * float *ycentl, *ycents :
+ * y centroids of the Lif and SiC apertures,
+ * tabulated once per second throughout
+ * the observation
+ *
+ *
+ * Calibration files required: None
+ *
+ * Returns: 0 on success
+ *
+ *
+ * HISTORY: 11/05/02 v1.1 RDR started work
+ * 11/27/07 v1.2 RDR corrected a bug in determining ycent
+ * cleaned up variables
+ * 12/04/02 v1.3 RDR locflags out geocoronal emission
+ * before determining centroids
+ * 12/12/02 v1.4 wvd change order of subroutine arguments
+ * 01/17/03 v1.5 wvd call cf_update_proc()
+ * 01/20/03 v1.6 rdr correct error in calculating ycent
+ * during the last time interval
+ * 02/24/03 v1.7 peb Changed include file to calfitsio.h
+ * 03/11/03 v1.8 wvd Changed locflags to unsigned char
+ * 05/20/03 v1.9 rdr Added call to cf_proc_check
+ * 05/22/03 v1.10 wvd cf_error_init to stderr
+ * 06/04/03 v1.11 wvd Implement cf_verbose throughout.
+ * 08/21/03 v1.12 wvd Change channel to unsigned char.
+ * 10/06/03 v1.13 wvd Change screen to locflags throughout.
+ * 10/21/04 v1.14 bjg Corrected several bugs
+ * 04/07/07 v1.15 wvd Clean up compiler warnings.
+ * 04/07/07 v1.16 wvd Clean up compiler warnings.
+ *
+ **************************************************************************/
+
+#include "calfuse.h"
+
+
+int
+cf_calculate_ycent_motion(fitsfile *header, long nevents, float *ptime,
+ float *y, unsigned char *channel, unsigned char *locflags,
+ long nsec, float *ttime, float *ycentl, float *ycents)
+{
+ char CF_PRGM_ID[] = "cf_calculate_ycent_motion";
+ char CF_VER_NUM[] = "1.16";
+
+ char ycentname[FLEN_CARD];
+ int chan_num, status=0, j, src_type, active_ap[2], nave=500;
+ int errflg=0;
+ long i, ndx, ndxs, nsam;
+ float ycent, ptst, dt, dt1;
+ float ycentdef[2];
+ float *ycentptr[2];
+
+ ycentptr[0]=ycentl;
+ ycentptr[1]=ycents;
+
+ /* Initialize error checking */
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+ /* Enter a time stamp into the log */
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ /* Check whether routine is appropriate for this data file. */
+ if ((errflg = cf_proc_check(header, CF_PRGM_ID))) return errflg;
+
+ /* nave = number of photons to average in determining the centroid.
+ Should eventually be read from a parameter file. */
+ nave = 500;
+
+ /* Determine the source aperture and type from the header data.
+ src_type = 0 for a point source and 1 for an extended source. */
+
+ src_type = cf_source_aper(header, active_ap);
+ cf_verbose(3, "active_ap = %d and %d, src_type = %d",
+ active_ap[0], active_ap[1], src_type);
+
+
+ /* Determine the centroids. Do LiF and SiC apertures separately. */
+
+ for (j=0; j<2; j++) {
+
+
+ /* Select the channel number of the appropriate active aperture */
+ chan_num = active_ap[j];
+ sprintf(ycentname, "YCENT%1d", chan_num);
+ FITS_read_key(header, TFLOAT, ycentname, &ycentdef[j], NULL, &status);
+
+ nsam = 0;
+ ycent = 0.;
+ ptst = ptime[0];
+ ndxs = 0;
+
+ /* Go through all of the photons, determine the y centroids,
+ and fill in the arrays. Avoid airglow lines. */
+ for (i=1; i<nevents; i++) {
+ dt = ptime[i] - ptst;
+ dt1 = ptime[i] - ptime[i-1];
+ if (channel[i] == chan_num && !(locflags[i] & LOCATION_AIR)) {
+ ycent += y[i];
+ nsam += 1;
+ }
+ if ((nsam > nave && dt > 1.) || i == nevents-1 || dt1 > 10) {
+
+ if (nsam==0) ycent = ycentdef[j];
+ else ycent = ycent / nsam;
+
+ ndx = ndxs;
+
+ while ( ndx < nsec && (ndx==0 || ttime[ndx-1] < ptime[i])) {
+
+ if (nsam > nave) ycentptr[j][ndx] = ycent;
+ else {
+ if (ndx==0) ycentptr[j][ndx] = ycentdef[j];
+ else ycentptr[j][ndx] = ycentptr[j][ndx-1];
+ }
+
+
+ ndx += 1;
+ }
+
+ ndxs=ndx;
+ if (ndxs > nsec-1) ndxs = nsec-1;
+ nsam = 0;
+ ycent=0.;
+ ptst=ptime[i];
+ }
+ }
+ }
+ cf_proc_update(header, CF_PRGM_ID, "COMPLETE");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished processing");
+ return (status);
+}
diff --git a/src/libcf/cf_check_digitizer.c b/src/libcf/cf_check_digitizer.c
new file mode 100644
index 0000000..81e9702
--- /dev/null
+++ b/src/libcf/cf_check_digitizer.c
@@ -0,0 +1,101 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_check_digitizer(fitsfile *infits);
+ *
+ * Description: Check the digitizer values against a reference file.
+ *
+ * Arguments: fitsfile *infits Input FITS file pointer
+ *
+ * Calls:
+ *
+ * Returns: 0 on success
+ *
+ * History: 01/16/03 1.1 jch Initial coding
+ * 01/28/03 1.2 wvd Check only values for this detector.
+ * 02/29/03 1.3 rch Correct error in making comparisons.
+ * 01/29/03 1.4 rdr Include math.h
+ * 03/04/03 1.5 peb Remove unused variables and header
+ * 05/20/03 1.6 rdr Add call to cf_proc_check
+ * 07/29/03 1.8 wvd If cf_proc_check fails, return errflg.
+ * 01/28/05 1.9 wvd On error, set EXP_STAT flag to -999 and
+ * issue a warning rather than an error.
+ * 03/11/05 1.10 wvd On error, write a warning to the file
+ * header using our standard format.
+ * 03/30/07 1.11 wvd On error, set EXP_STAT flag to -2,
+ * rather than -999.
+ *
+ ****************************************************************************/
+
+#include <stdio.h>
+#include <math.h>
+#include "calfuse.h"
+
+#define N 32
+
+int
+cf_check_digitizer(fitsfile *infits)
+{
+ char CF_PRGM_ID[] = "cf_check_digitizer";
+ char CF_VER_NUM[] = "1.11";
+
+ char comment[FLEN_COMMENT], datestr[FLEN_CARD],
+ file_name[FLEN_VALUE], detector[FLEN_VALUE];
+ fitsfile *digifits;
+ int errflg=0, status=0, i, first, last, exp_stat = -2;
+ int timeref;
+ float val, ref_val;
+
+ char key[N][9] = {"DET1ASCL", "DET1BSCL", "DET1AXOF", "DET1BXOF", "DET1AUCT", "DET1BUCT", "DET1ABWK", "DET1BBWK", "DET1AEWK", "DET1BEWK", "DET1ABSL", "DET1BBSL", "DET1ALCT", "DET1BLCT", "DET1ALTT", "DET1BLTT", "DET2ASCL", "DET2BSCL", "DET2AXOF", "DET2BXOF", "DET2AUCT", "DET2BUCT", "DET2ABWK", "DET2BBWK", "DET2AEWK", "DET2BEWK", "DET2ABSL", "DET2BBSL", "DET2ALCT", "DET2BLCT", "DET2ALTT", "DET2BLTT"};
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ if ((errflg = cf_proc_check(infits, CF_PRGM_ID))) return errflg;
+
+ /*
+ * Determine which detector produced our data file.
+ */
+ FITS_read_key(infits, TSTRING, "DETECTOR", detector, 0, &status);
+ if (detector[0] == '1')
+ first = 0, last = N/2;
+ else
+ first = N/2, last = N;
+
+ /*
+ * Read the digitizer reference file name and open it.
+ */
+ FITS_read_key(infits, TSTRING, "DIGI_CAL", file_name, 0, &status);
+ FITS_open_file(&digifits, cf_cal_file(file_name), READONLY, &status);
+
+ /*
+ * Read keywords. Compare with reference values.
+ */
+ for (i = first; i < last; i++) {
+ FITS_read_key(infits, TFLOAT, key[i], &val, NULL, &status);
+ FITS_read_key(digifits, TFLOAT, key[i], &ref_val, NULL, &status);
+
+ if (fabs(val - ref_val) > 2.0) {
+ cf_if_warning("Digitizer keyword %s is out of bounds.", key[i]);
+ sprintf(comment, "Data suspect: keyword %s out of bounds", key[i]);
+ FITS_update_key(infits, TINT, "EXP_STAT", &exp_stat, comment,
+ &status);
+ FITS_write_comment(infits, " ", &status);
+ sprintf(comment, "Data are suspect. Keyword %s is out of bounds.",
+ key[i]);
+ FITS_write_comment(infits, comment, &status);
+ fits_get_system_time(datestr, &timeref, &status);
+ sprintf(comment, "CalFUSE v%s %.10s", CALFUSE_VERSION, datestr);
+ FITS_write_comment(infits, comment, &status);
+ FITS_write_comment(infits, " ", &status);
+ }
+ }
+
+ FITS_close_file(digifits, &status);
+ cf_proc_update(infits, CF_PRGM_ID, "COMPLETE");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+ return 0;
+}
diff --git a/src/libcf/cf_convert_to_ergs.c b/src/libcf/cf_convert_to_ergs.c
new file mode 100644
index 0000000..2eaaeef
--- /dev/null
+++ b/src/libcf/cf_convert_to_ergs.c
@@ -0,0 +1,182 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_convert_to_ergs(fitsfile *header, long nevents,
+ * float *weight, float *ergcm2, unsigned char *channel,
+ * float *lambda);
+ *
+ * Description: Convert counts to ergs.
+ *
+ * Arguments: *header Input FITS file pointer
+ * nevents number of points in the photon list
+ * *weight weight of each event
+ * *ergcm2 flux (returned)
+ * *channel channel number in the photon list
+ * *lambda wavelength in the photon list
+ *
+ * Returns: 0 (int) upon successful completion.
+ *
+ * History: 01/02/03 1.0 jch Initial coding
+ * 02/10/03 1.1 wvd Install
+ * 02/10/03 1.2 wvd Replace FLUX_CAL with AEFF_CAL
+ * Define HC in calfusettag.h
+ * Don't sort photons by wavelength
+ * 03/04/03 1.3 peb Fixed sprintf argument formating,
+ * deleted unused variable, localized
+ * scope of some variables, made sure
+ * that memory is allocated for aeff,
+ * and fixed memory leak with aeff,
+ * aeff1, and aeff2.
+ * 03/11/03 1.4 wvd Changed channel to type char
+ * 03/12/03 1.5 wvd Fixed bug in calculation of dl.
+ * If unable to calculate flux,
+ * set channel[k] = 0.
+ * Made aeff, aeff1, aeff2 doubles
+ * to match aeff*fit files.
+ * 05/07/03 1.6 wvd Change ERGCM2S to ERGCM2 throughout.
+ * Don't divide by EXPTIME.
+ * Use cf_verbose throughout.
+ * 05/16/03 1.7 wvd Update version number.
+ * 05/20/03 1.8 rdr Add call to cf_proc_check
+ * 06/11/03 1.9 wvd Pass datatype to cf_read_col.
+ * Change calfusettag.h to calfuse.h
+ * 08/25/03 1.10 wvd Change coltype from string to int
+ * in cf_read_col.
+ * 09/17/03 1.11 wvd Change aeff arrays to type float
+ * to match AEFF_CAL files.
+ * 11/05/03 1.12 wvd Change channel to unsigned char
+ * 04/27/04 1.13 wvd Print out relative weighting of
+ * the two effective-area files.
+ * 11/18/05 1.14 wvd Change aeff arrays to type double
+ * to match AEFF_CAL files.
+ * 04/07/07 1.15 wvd Clean up compiler warnings.
+ * 04/07/07 1.16 wvd Clean up compiler warnings.
+ *
+ ****************************************************************************/
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "calfuse.h"
+
+static char CF_PRGM_ID[] = "cf_convert_to_ergs";
+static char CF_VER_NUM[] = "1.16";
+
+
+int
+cf_convert_to_ergs(fitsfile *header, long nevents, float *weight,
+ float *ergcm2, unsigned char *channel, float *lambda)
+{
+ char aeff1file[FLEN_VALUE], aeff2file[FLEN_VALUE];
+ int ap, errflg=0, interp=0, status=0;
+ float sig1=0, sig2=0;
+ fitsfile *aeff1fits, *aeff2fits;
+
+ /* Enter a timestamp into the log. */
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+ if ((errflg = cf_proc_check(header, CF_PRGM_ID))) return errflg;
+
+ /* Read the AEFF1CAL and AEFF2CAL keywords. */
+ FITS_read_key(header, TSTRING, "AEFF1CAL", aeff1file, NULL, &status);
+ FITS_read_key(header, TSTRING, "AEFF2CAL", aeff2file, NULL, &status);
+
+ /* Open the calibration files. */
+ FITS_open_file(&aeff1fits, cf_cal_file(aeff1file), READONLY, &status);
+
+ /* Determine whether we need to interpolate getween AEFF_CAL files. */
+ if (strcmp(aeff1file, aeff2file)) {
+ float dt1, dt2, dt3, a1date, a2date, expstart, expend, expmjd;
+ interp = 1;
+ FITS_open_file(&aeff2fits, cf_cal_file(aeff2file), READONLY, &status);
+ FITS_read_key(aeff1fits, TFLOAT, "EFFMJD", &a1date, NULL, &status);
+ FITS_read_key(aeff2fits, TFLOAT, "EFFMJD", &a2date, NULL, &status);
+
+ /* Linearly interpolate the aeff according to exposure time */
+ FITS_read_key(header, TFLOAT, "EXPSTART", &expstart, NULL, &status);
+ FITS_read_key(header, TFLOAT, "EXPEND", &expend, NULL, &status);
+ expmjd = (expstart + expend) / 2.;
+ dt1=a2date-a1date;
+ dt2=a2date-expmjd;
+ dt3=expmjd-a1date;
+ if (dt1 < 0.01) {
+ cf_if_error("Calibration file dates are identical: "
+ "cal1=%10.5f obs=%10.5f cal2=%10.5f", a1date, expmjd, a2date);
+ }
+ sig1=dt2/dt1;
+ sig2=dt3/dt1;
+ cf_verbose(3, "Interpolation: %0.2f x %s, %0.2f x %s",
+ sig1, aeff1file, sig2, aeff2file);
+ }
+ else
+ cf_verbose(3, "No interpolation. Using Aeff file %s", aeff1file);
+
+ /* Step through the apertures, skipping aperture 4 (pinhole) */
+ for (ap = 1; ap < 8; ap++) {
+ long jmax=0, /* size of wave and aeff arrays */
+ j, /* index through wave and aeff */
+ k; /* index through photon array */
+
+ double *aeff;
+ float *wavelength, dl, w0;
+
+ if (ap == 4)
+ continue;
+
+ if (interp == 1) {
+ /* Interpolate the calibrated aeff. */
+ double *aeff1, *aeff2;
+
+ FITS_movabs_hdu(aeff1fits, ap+1, NULL, &status);
+ jmax = cf_read_col(aeff1fits, TDOUBLE, "AREA", (void **) &aeff1);
+
+ FITS_movabs_hdu(aeff2fits, ap+1, NULL, &status);
+ jmax = cf_read_col(aeff2fits, TDOUBLE, "AREA", (void **) &aeff2);
+
+ aeff = (double *) cf_calloc(jmax, sizeof(double));
+
+ for (j = 0; j < jmax; j++) {
+ aeff[j] = sig1 * aeff1[j] + sig2 * aeff2[j];
+ }
+ free(aeff1);
+ free(aeff2);
+ } else {
+ FITS_movabs_hdu(aeff1fits, ap+1, NULL, &status);
+ jmax = cf_read_col(aeff1fits, TDOUBLE, "AREA", (void **) &aeff);
+ }
+
+ /* Read wavelength array in AEFF_CAL file */
+ jmax = cf_read_col(aeff1fits, TFLOAT, "WAVE", (void **) &wavelength);
+
+ /* Compute translation from wavelength to pixel within AEFF_CAL file. */
+ w0 = wavelength[0];
+ dl = (wavelength[jmax-1] - wavelength[0]) / (jmax - 1);
+
+ /* Go through the photon list */
+ for (k = 0; k < nevents; k++) {
+ if (channel[k] == ap) {
+ long j = (lambda[k] - w0) / dl + 0.5;
+ if (j >= 0L && j < jmax)
+ ergcm2[k] = weight[k]*HC/lambda[k]/aeff[j];
+ else
+ channel[k] = 0;
+ }
+ }
+ free(wavelength);
+ free(aeff);
+ }
+
+ /* Clean up. */
+ FITS_close_file(aeff1fits, &status);
+ if (interp == 1)
+ FITS_close_file(aeff2fits, &status);
+
+ /* Update processing flags. */
+ cf_proc_update(header, CF_PRGM_ID, "COMPLETE");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done Processing");
+ return (status);
+}
diff --git a/src/libcf/cf_count_rate_y_distort.c b/src/libcf/cf_count_rate_y_distort.c
new file mode 100644
index 0000000..a42a4ac
--- /dev/null
+++ b/src/libcf/cf_count_rate_y_distort.c
@@ -0,0 +1,157 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_count_rate_y_distort(fitsfile *header, long nevents,
+ * float *time, float *yfarf,
+ * unsigned char *locflags, long nseconds,
+ * float *timeline, float *fec_rate)
+ *
+ * Description: Corrects the Y position of each event based on the
+ * instantaneous count rate.
+ *
+ * Arguments: fitsfile *header Pointer to FITS file containing the
+ * header of the intermediate data file
+ * long nevents The number of events
+ * float *time An array of event times
+ * float *yfarf An array of event Y positions
+ * unsigned char *locflags Location flags for each event
+ * long nseconds The number of seconds in the timeline
+ * float *timeline The timeline in seconds
+ * float *fec_rate Front End Counter rate
+ *
+ * Calls:
+ *
+ * Return: 0 on success
+ *
+ * History: 08/06/02 1.1 peb Begin work
+ * 10/27/02 1.2 peb Added a time-dependent correction
+ * which uses the Front End Counter
+ * (FEC) rates.
+ * 11/11/02 1.3 peb Removed non-time-dependent correction.
+ * (Code now expects timeline extension
+ * data.)
+ * 11/11/02 1.4 peb Fixed compile error - added buffer
+ * variable.
+ * 11/12/02 1.5 peb Added check to move only events in
+ * active region.
+ * 03/11/03 1.6 wvd Changed locflags to unsigned char
+ * 05/20/03 1.7 rdr Added call to cf_proc_check
+ * 07/29/03 1.8 wvd If cf_proc_check fails, return errflg.
+ * 08/04/03 1.9 wvd Convert fec_rate to type short.
+ * 11/26/03 1.10 wvd Convert fec_rate to type float.
+ * 08/18/04 1.11 wvd Interpolate stretch correction among
+ * tabulated Y values.
+ * 10/06/05 1.12 wvd For HIST data, set each element of
+ * fec_rate to weighted mean of array.
+ * 04/07/07 1.13 wvd Clean up compiler warnings.
+ *
+ ****************************************************************************/
+
+#include <math.h>
+#include <string.h>
+#include <stdlib.h>
+#include "calfuse.h"
+
+int
+cf_count_rate_y_distort(fitsfile *header, long nevents, float *time,
+ float *yfarf, unsigned char *locflags, long nseconds,
+ float *timeline, float *fec_rate)
+{
+ char CF_PRGM_ID[] = "cf_count_rate_y_distort";
+ char CF_VER_NUM[] = "1.13";
+
+ char instmode[FLEN_VALUE], ystrfile[FLEN_VALUE];
+ short xlen, ylen;
+ int errflg=0, hdutype, status=0, anynull=0;
+ int i, ii, i_max, rndx, yndx;
+ long j, k;
+ float *ystretch, ystr_1d[NYMAX], flt=0.;
+ fitsfile *ystrfits;
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ if ((errflg = cf_proc_check(header, CF_PRGM_ID))) return errflg;
+
+ /*
+ * For HIST data, replace fec_rate with weighted mean value.
+ */
+ FITS_read_key(header, TSTRING, "INSTMODE", instmode, NULL, &status);
+ if (!strncmp(instmode, "HIST", 4)) {
+ float *mean_rate, ratio, numerator=0, denominator=0;
+ mean_rate = (float *) cf_malloc(sizeof(float) * nseconds);
+ for (i = 0; i < nseconds; i++) {
+ numerator += fec_rate[i] * fec_rate[i];
+ denominator += fec_rate[i];
+ }
+ ratio = numerator / denominator;
+ for (i = 0; i < nseconds; i++) mean_rate[i] = ratio;
+ fec_rate = mean_rate;
+ cf_verbose(2, "Weighted mean count rate = %f", ratio);
+ }
+
+ /*
+ * Read the rate calibration file.
+ */
+ FITS_read_key(header, TSTRING, "RATE_CAL", ystrfile, NULL, &status);
+ FITS_open_file(&ystrfits, cf_cal_file(ystrfile), READONLY, &status);
+ FITS_movabs_hdu(ystrfits, 2, &hdutype, &status);
+ FITS_read_key(ystrfits, TSHORT, "NAXIS1", &xlen, 0, &status);
+ FITS_read_key(ystrfits, TSHORT, "NAXIS2", &ylen, 0, &status);
+ ystretch = (float *) cf_malloc(sizeof(float)*xlen*ylen);
+ FITS_read_img(ystrfits, TFLOAT, 1L, xlen*ylen, &flt, ystretch, &anynull,
+ &status);
+ FITS_close_file(ystrfits, &status);
+
+ i_max = (xlen-1) * 10;
+ for(j=k=0; j<nevents; j++) { /* Loop through all events. */
+ /*
+ * Move only events in active region.
+ */
+ if (!(locflags[j] & LOCATION_SHLD)) {
+
+ /* If time has changed, compute a new ystretch array. */
+ while(timeline[k]-FRAME_TOLERANCE < time[j] && k < nseconds) {
+ k++;
+
+ /* This index reflects the count rate. */
+ rndx = (int)((log10(fec_rate[k])-1.)*10.);
+ if (rndx < 0)
+ rndx = 0;
+ else if (rndx >= ylen)
+ rndx = ylen-1;
+
+ /*
+ * This index reflects Y position on the detector.
+ * Shift information is provided for every 10 Y pixels.
+ * We interpolate to the nearest Y pixel. Otherwise,
+ * counts pile up at the 10-pixel boundaries.
+ */
+ for (i = 0; i < i_max; i++) {
+ ii = (i/10) * 10;
+ ystr_1d[i] = ((ii+10-i) * (ystretch+rndx*xlen)[i/10] +
+ (i - ii) * (ystretch+rndx*xlen)[i/10+1]) / 10.;
+ }
+ for ( ; i < NYMAX; i++)
+ ystr_1d[i] = (ystretch+rndx*xlen)[xlen-1];
+ }
+
+ /* Now apply the shift. */
+ yndx = (int) yfarf[j];
+ if (yndx < 0)
+ yndx = 0;
+ else if (yndx >= NYMAX)
+ yndx = NYMAX-1;
+ yfarf[j] -= ystr_1d[yndx];
+ }
+ }
+ free(ystretch);
+ if (!strncmp(instmode, "HIST", 4)) free(fec_rate);
+
+ cf_proc_update(header, CF_PRGM_ID, "COMPLETE");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+ return 0;
+}
diff --git a/src/libcf/cf_dispersion.c b/src/libcf/cf_dispersion.c
new file mode 100644
index 0000000..19a47c1
--- /dev/null
+++ b/src/libcf/cf_dispersion.c
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Description: Assigns wavelength to each photon in data stream.
+ *
+ * Returns: 0 upon successful completion.
+ *
+ * History: 05/15/06 1.1 wvd Adapt from cf_astigmatism_and_dispersion.c
+ * Program incorporates cf_x2lambda.
+ *
+ ****************************************************************************/
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include "calfuse.h"
+
+static char CF_PRGM_ID[] = "cf_dispersion";
+static char CF_VER_NUM[] = "1.1";
+
+
+int
+cf_dispersion(fitsfile *infits, long nevents, float *x,
+ unsigned char *channel, float *lambda)
+{
+ char wave_file[FLEN_VALUE];
+ float *wavelength=NULL;
+ float x_lower, x_upper, weight_l, weight_u, wave_l, wave_u;
+ int ap, errflg=0, nwave, xl_int, xu_int, status=0;
+ long k;
+ fitsfile *wavefits;
+
+ /* Enter a timestamp into the log. */
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ if ((errflg = cf_proc_check(infits, CF_PRGM_ID))) return errflg;
+
+ FITS_read_key(infits, TSTRING, "WAVE_CAL", wave_file, NULL, &status);
+ FITS_open_file(&wavefits, cf_cal_file(wave_file), READONLY, &status);
+
+ /* Cycle through channels, skipping #4 (pinhole) */
+ for (ap = 1; ap < 8; ap++) {
+ if (ap == 4) continue;
+
+ FITS_movabs_hdu(wavefits, ap+1, NULL, &status);
+ nwave = cf_read_col(wavefits, TFLOAT, "WAVELENGTH", (void **) &wavelength);
+
+ /* Compute wavelength for each event by interpolation. */
+ for (k = 0; k < nevents; k++) {
+ if (channel[k] == ap) {
+ x_lower = floor(x[k]);
+ x_upper = ceil(x[k]);
+ xl_int = (int) (x_lower + 0.5);
+ xu_int = (int) (x_upper + 0.5);
+ if (xl_int >= 0 && xu_int < nwave) {
+ if (xl_int == xu_int)
+ lambda[k] = wavelength[xl_int];
+ else {
+ weight_l = x_upper - x[k];
+ weight_u = x[k] - x_lower;
+ wave_l = wavelength[xl_int];
+ wave_u = wavelength[xu_int];
+ lambda[k] = wave_l * weight_l + wave_u * weight_u;
+ }
+ }
+ else
+ channel[k] = 0;
+ }
+ }
+ /* Space for wavelength array is allocated in each loop. */
+ free(wavelength);
+ }
+ FITS_close_file(wavefits, &status);
+
+ /* Update processing flags. */
+ cf_proc_update(infits, CF_PRGM_ID, "COMPLETE");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done Processing");
+
+ return status;
+}
diff --git a/src/libcf/cf_doppler_and_heliocentric.c b/src/libcf/cf_doppler_and_heliocentric.c
new file mode 100644
index 0000000..f95672d
--- /dev/null
+++ b/src/libcf/cf_doppler_and_heliocentric.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_doppler_and_heliocentric(*infits, nevents, *photon_time,
+ * *channel, *lambda, nseconds, *timeline_time,
+ * *timeline_velocity);
+ *
+ * Description: Doppler-correct each photon for both heliocentric and orbital
+ * motions. Resulting wavelength scale is heliocentric.
+ *
+ * Arguments: *infits Input FITS file pointer
+ * nevents number of points in the photon list
+ * *photon_time time array of photon events
+ * *channel channel number in the photon list
+ * *lambda wavelength in the photon list
+ * nseconds number of points in the timeline table
+ * *timeline_time time array of timeline list
+ * *timeline_velocity orbital velocity in km/s
+ *
+ * Returns: O upon successful completion
+ *
+ * History: 12/09/2002 jch 1.1 Initial coding
+ * 12/11/2002 wvd 1.2 Move Doppler calculation to separate
+ * loop.
+ * 12/11/2002 wvd 1.3 Change nevents and nseconds to long.
+ * 12/20/2002 wvd 1.4 Change channel to unsigned char.
+ * 02/24/03 peb 1.5 Change include file to calfusettag.h
+ * and calfitsio.h
+ * 03/11/2003 wvd 1.6 Change channel to char.
+ * 05/20/2003 rdr 1.7 Added call to cf_proc_check
+ * 09/17/2003 wvd 1.8 Return errflg from cf_prock_check
+ * 10/21/2003 wvd 1.9 Change channel to unsigned char.
+ * 04/21/2004 bjg 1.10 Cosmetic change to prevent warning
+ * with gcc -Wall
+ * 11/17/2005 wvd 1.11 Change velocity and doppler to doubles.
+ *
+ ****************************************************************************/
+
+#include <stdlib.h>
+#include "calfuse.h"
+
+char CF_PRGM_ID[] = "cf_doppler_and_heliocentric";
+char CF_VER_NUM[] = "1.11";
+
+
+int cf_doppler_and_heliocentric(fitsfile *infits, long nevents,
+ float *photon_time, unsigned char *channel, float *lambda,
+ long nseconds, float *timeline_time, float *timeline_velocity)
+{
+ int errflg=0, status=0;
+ long i, k;
+ float v_helio; /* heliocentric velocity in km/sec */
+ double velocity, *doppler;
+
+ /* Enter a timestamp into the log. */
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+ if ((errflg = cf_proc_check(infits, CF_PRGM_ID) )) return errflg;
+
+ FITS_read_key(infits, TFLOAT, "V_HELIO", &v_helio, NULL, &status);
+
+ /* Compute array of Doppler corrections. */
+ doppler = (double *) cf_malloc(sizeof(double) * nseconds);
+ for (k = 0; k < nseconds; k++) {
+ velocity = timeline_velocity[k] + v_helio;
+ doppler[k] = 1. + velocity / C;
+ }
+
+ /* Apply Doppler correction to each photon assigned to an aperture. */
+ k = 0;
+ for (i = 0; i < nevents; i++)
+ if (channel[i] > 0) {
+ while (photon_time[i] > timeline_time[k+1] - FRAME_TOLERANCE
+ && k < nseconds-1) k++;
+ lambda[i] *= doppler[k];
+ }
+ free (doppler);
+
+ /* Update processing flags. */
+ cf_proc_update(infits, CF_PRGM_ID, "COMPLETE");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done Processing");
+ return (status);
+}
diff --git a/src/libcf/cf_electronics_dead_time.c b/src/libcf/cf_electronics_dead_time.c
new file mode 100644
index 0000000..38c2219
--- /dev/null
+++ b/src/libcf/cf_electronics_dead_time.c
@@ -0,0 +1,104 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_electronics_dead_time(fitsfile *header, long nseconds,
+ * float *fec_rate, float *elec_dtc)
+ *
+ * Description: Scales the weighting factor to correct for the electronics
+ * dead time.
+ *
+ * Arguments: fitsfile *header Pointer to FITS file containing the
+ * header of the intermediate data file
+ * long nseconds The number of timeline values
+ * float *fec_rate An array of Front End Counter (FEC)
+ * rates
+ * float *elec_dtc Dead-time correction array (returned)
+ * Calls:
+ *
+ * Return: 0 on success
+ *
+ * History: 10/27/02 1.1 peb Begin work
+ * 11/11/02 1.2 peb Corrected function description and
+ * added cf_timestamp after ELEC_COR
+ * check.
+ * 12/06/02 1.4 wvd Calculate DT correction for each time
+ * step, then apply to photons.
+ * Set keyword DET_DEAD.
+ * 05/20/03 1.5 rdr Added proc_check call
+ * 08/01/03 1.7 wvd Just calculate correction; don't
+ * apply it. Return elec_dtc array.
+ * 08/04/03 1.8 wvd Convert fec_rate to type short.
+ * 11/26/03 1.9 wvd Change fec_rate to type float.
+ * 02/12/04 1.10 wvd In verbose mode, write mean DTC.
+ * 04/07/07 1.11 wvd Clean up compiler warnings.
+ *
+ ****************************************************************************/
+
+#include <string.h>
+#include <math.h>
+#include "calfuse.h"
+
+int
+cf_electronics_dead_time(fitsfile *header, long nseconds,
+ float *fec_rate, float *elec_dtc)
+{
+ char CF_PRGM_ID[] = "cf_electronics_dead_time";
+ char CF_VER_NUM[] = "1.11";
+
+ char elecfile[FLEN_VALUE]={"\0"}, detector[FLEN_VALUE]={"\0"};
+ char keyword[FLEN_KEYWORD]={"\0"};
+ int errflg=0, status=0;
+ long k;
+ float abort, clock, state;
+ float mean_elec_dtc = 0.;
+ fitsfile *elecfits;
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ if ((errflg = cf_proc_check(header, CF_PRGM_ID))) return errflg;
+
+ FITS_read_key(header, TSTRING, "DETECTOR", detector, NULL, &status);
+ /*
+ * Get the electronics dead-time constants.
+ */
+ FITS_read_key(header, TSTRING, "ELEC_CAL", elecfile, NULL, &status);
+ FITS_open_file(&elecfits, cf_cal_file(elecfile), READONLY, &status);
+ sprintf(keyword, "ABORT_%s", detector);
+ FITS_read_key(elecfits, TFLOAT, keyword, &abort, NULL, &status);
+ sprintf(keyword, "CLOCK_%s", detector);
+ FITS_read_key(elecfits, TFLOAT, keyword, &clock, NULL, &status);
+ sprintf(keyword, "STATE_%s", detector);
+ FITS_read_key(elecfits, TFLOAT, keyword, &state, NULL, &status);
+ FITS_close_file(elecfits, &status);
+ /*
+ * Calculate dead-time correction.
+ */
+ for (k=0; k<nseconds; k++) {
+ float xa, x, x2, x4, x6, x10;
+
+ xa = exp(-fec_rate[k]*abort);
+ x = exp(-fec_rate[k]*clock);
+ x2 = x*x;
+ x4 = x2*x2;
+ x6 = x4*x2;
+ x10 = x6*x4;
+
+ elec_dtc[k] = (1. + fec_rate[k]*state + 4.*(x2-x) + x6 - x10)/xa;
+ if (elec_dtc[k] < 1.0) elec_dtc[k] = 1.0;
+ mean_elec_dtc += elec_dtc[k];
+ }
+ /*
+ * Calculate mean dead-time correction. Write to file header.
+ */
+ mean_elec_dtc /= nseconds;
+ cf_verbose(2, "Mean detector electronics dead-time correction: %f", mean_elec_dtc);
+ FITS_update_key(header, TFLOAT, "DET_DEAD", &mean_elec_dtc, NULL, &status);
+
+ cf_proc_update(header, CF_PRGM_ID, "COMPLETE");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+ return 0;
+}
diff --git a/src/libcf/cf_error_msg.c b/src/libcf/cf_error_msg.c
new file mode 100644
index 0000000..12fb7e5
--- /dev/null
+++ b/src/libcf/cf_error_msg.c
@@ -0,0 +1,263 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_error_init(char *prgmid, char *vernum, FILE *errfile)
+ *
+ * Description: Writes a timestamp, the calling program name, and an
+ * error message to stdout for a cfitsio routine.
+ *
+ * Arguments: char *progid Name of the calling program
+ * char *vernum Version of the calling program
+ * (should be version control number)
+ * FILE *errfile Output file name (default is stderr)
+ *
+ * Returns: none
+ *
+ * History: 02/22/99 peb Some simple functions to make error
+ * reporting easier. Deficiencies in
+ * cfitsio make printing comprehensive
+ * messages difficult.
+ * 03/15/99 emm Added cf_if_memory_error.
+ * 04/30/99 peb Added cf_malloc and cf_calloc.
+ * 06/07/99 peb Added reporting of version number
+ * 09/01/99 emm Added fflush to see if it helps print
+ * out error messages on failure.
+ * 11/08/99 emm Added !!!!!!!! to error reporting to
+ * better delimit the error message and
+ * to make them more obvious.
+ * 04/23/01 1.10 wvd Make cf_malloc & cf_calloc print error
+ * message returned by malloc & calloc
+ * 03/07/03 1.2 peb Added cf_verbose and external variable
+ * verbose_level
+ * 03/13/03 1.3 peb Enabled cf_verbose, cf_if_warning, and
+ * cf_if_error to accept a variable
+ * number of parameters. Changed the
+ * output format to print month, day, time
+ * hostname, function name and message.
+ * 03/25/03 1.4 peb Changed output to print time, program,
+ * and version number for warning and
+ * error messages.
+ * Changed output to use verbose_level
+ * to modify output format:
+ * level==1 prints program, version, and
+ * message.
+ * level>=2 prints only message.
+ * 10/30/03 1.5 peb Replaced cftime function with strftime
+ * for UNIX compatibility.
+ * Removed unnecessary header files,
+ * malloc.h and unistd.h
+ * 04/07/04 1.6 bjg fflush stdout and error_file
+ *
+ ****************************************************************************/
+
+#include <errno.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include "fitsio.h"
+
+#define N_STYM 40
+
+int verbose_level=0;
+
+static char *program_name=NULL;
+static char *version_no=NULL;
+static FILE *error_file=NULL;
+
+void cf_error_init(const char *progid, const char *vernum, FILE *errfile)
+{
+ static char unknown[] = "unknown file";
+ static char version[] = "1.6";
+ if (progid) {
+ program_name = malloc(strlen(progid)+1);
+ strcpy(program_name, progid);
+ }
+ else {
+ program_name = malloc(strlen(unknown)+1);
+ strcpy(program_name, unknown);
+ }
+ if (vernum) {
+ version_no = malloc(strlen(vernum)+1);
+ strcpy(version_no, vernum);
+ }
+ else {
+ version_no = malloc(strlen(version)+1);
+ strcpy(version_no, version);
+ }
+ if (errfile)
+ error_file = errfile;
+ else
+ error_file = stderr;
+}
+
+void cf_verbose(int level, const char *format, ...)
+{
+ va_list args;
+ va_start(args, format);
+
+ if (verbose_level >= level) {
+ if (level == 1)
+ printf(" %s-%s: ", program_name, version_no);
+ else if (level >= 2)
+ printf("\t");
+ vprintf(format, args);
+ printf("\n");
+ fflush(stdout);
+ }
+
+ va_end(args);
+}
+
+void cf_if_warning(char *format, ...)
+{
+ char stym[N_STYM]={'\0'};
+ time_t tym;
+ va_list args;
+
+ va_start(args, format);
+ time(&tym);
+ strftime(stym, N_STYM, "%Y %b %e %T", localtime(&tym));
+
+ fprintf(error_file, "%s %s-%s: WARNING - ",
+ stym, program_name, version_no);
+ vfprintf(error_file, format, args);
+ fprintf(error_file, "\n");
+ fflush(error_file);
+ va_end(args);
+}
+
+void cf_if_error(char *format, ...)
+{
+ char stym[N_STYM]={'\0'};
+ time_t tym;
+ va_list args;
+
+ va_start(args, format);
+ time(&tym);
+ strftime(stym, N_STYM, "%Y %b %e %T", localtime(&tym));
+
+ fprintf(error_file, "%s %s-%s: ERROR - ",
+ stym, program_name, version_no);
+ vfprintf(error_file, format, args);
+ fprintf(error_file, "\n");
+
+ fflush(error_file);
+ va_end(args);
+ exit(1);
+}
+
+void cf_if_fits_warning(int status)
+{
+ if (status) {
+ char stym[N_STYM]={'\0'};
+ time_t tym;
+
+ time(&tym);
+ strftime(stym, N_STYM, "%Y %b %e %T", localtime(&tym));
+
+ fprintf(error_file, "%s %s-%s: FITS WARNING - ",
+ stym, program_name, version_no);
+ fits_report_error(error_file, status);
+ fflush(error_file);
+ }
+}
+
+void cf_if_fits_error(int status)
+{
+ if (status) {
+ char stym[N_STYM]={'\0'};
+ time_t tym;
+
+ time(&tym);
+ strftime(stym, N_STYM, "%Y %b %e %T", localtime(&tym));
+
+ fprintf(error_file, "%s %s-%s: FITS ERROR - ",
+ stym, program_name, version_no);
+ fits_report_error(error_file, status);
+ fflush(error_file);
+ exit(1);
+ }
+}
+
+void *cf_malloc(size_t size)
+{
+ void *ptr;
+
+ if (!(ptr = malloc(size))) {
+ char stym[N_STYM]={'\0'};
+ time_t tym;
+
+ time(&tym);
+ strftime(stym, N_STYM, "%Y %b %e %T", localtime(&tym));
+
+ fprintf(error_file, "%s %s-%s: ERROR - %s\n",
+ stym, "cf_malloc", "1.0", strerror(errno));
+
+ fflush(error_file);
+ exit(1);
+ /*
+ fprintf(error_file,
+ " \n malloc: Attemping to allocate %d bytes", size);
+ */
+ }
+ return ptr;
+}
+
+void *cf_calloc(size_t nelem, size_t elsize)
+{
+ void *ptr;
+
+ if (!(ptr = calloc(nelem, elsize))) {
+ char stym[N_STYM]={'\0'};
+ time_t tym;
+
+ time(&tym);
+ strftime(stym, N_STYM, "%Y %b %e %T", localtime(&tym));
+
+ fprintf(error_file, "%s %s-%s: ERROR - %s\n",
+ stym, "cf_calloc", "1.0", strerror(errno));
+
+ fflush(error_file);
+ exit(1);
+ /*
+ fprintf(error_file,
+ " \n calloc: Attemping to allocate %d bytes",
+ nelem * elsize);
+ */
+ }
+ return ptr;
+}
+
+void cf_if_memory_error(int status)
+{
+ time_t tym;
+
+ if (!status) {
+ time(&tym);
+ fprintf(error_file, "Memory allocation error in %s-%s: %s",
+ program_name, version_no, ctime(&tym));
+
+ /* Print out cfitsio error messages and continue */
+
+ fits_report_error(error_file, status);
+ fflush(error_file);
+ }
+}
+
+/*
+int main()
+{
+ int i;
+ cf_error_init("test program", "1.0", stdout);
+ cf_if_warning("Non-fatal error occurred");
+
+ for (i=0; i < 10; i++)
+ cf_if_fits_warning(i);
+ exit(0);
+}
+*/
diff --git a/src/libcf/cf_extraction_limits.c b/src/libcf/cf_extraction_limits.c
new file mode 100644
index 0000000..5567d14
--- /dev/null
+++ b/src/libcf/cf_extraction_limits.c
@@ -0,0 +1,137 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_extraction_limits(fitsfile *infits, int aperture,
+ * int srctype, short **ylow, short **yhigh, short *xmin,
+ * short *xmax)
+ *
+ * Description: Read the extraction limits for a given aperture and source
+ * type (point or extended) from the CHID_CAL file. Shift these
+ * limits to match the centroid of the observed spectrum, if
+ * that measurement has been performed. For point sources
+ * observed in HIST mode, pad YLOW and YHIGH by SPECBINY pixels.
+ *
+ * Arguments: fitsfile *infits Pointer to the location of the FITS
+ * header of the Intermediate Data File
+ * int aperture aperture designation (1 through 8)
+ * int srctype 0 = point source, 1 = extended
+ * short **ylow lower Y bound for the extraction window
+ * short **yhigh upper Y bound for the extraction window
+ * short *xmin lower X bound for the extraction window
+ * short *xmax upper X bound for the extraction window
+ *
+ * Calls: None
+ *
+ * Return: npts = length of arrays ylow and yhigh
+ *
+ * History: 08/22/03 1.1 BJG Based on subroutine from v1.6 of
+ * cf_bad_pixels.c by RDR.
+ * Change coltype from char to int in
+ * cf_read_col.
+ * 03/15/05 1.2 wvd Read HIST_PAD from appropriate HDU
+ * of CHID_CAL file and pad apertures
+ * if data are in HIST mode.
+ * 03/16/05 1.3 wvd For extended sources, return large
+ * apertures.
+ * 10/06/05 1.4 wvd Always pad apertures by 8 pixels
+ * in HIST mode.
+ * 05/03/06 1.5 wvd Always pad apertures by SPECBINY
+ * pixels in HIST mode.
+ *
+ ****************************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "calfuse.h"
+
+long cf_extraction_limits(fitsfile *infits, int aperture, int srctype,
+ short **ylow, short **yhigh, short *xmin, short *xmax) {
+
+ char CF_PRGM_ID[] = "cf_extraction_limits";
+ char CF_VER_NUM[] = "1.5";
+
+ fitsfile *chidfits ;
+ int status=0, hdutype;
+ int dcent, hdu ;
+ short histpad=0, specbiny;
+ short xmint, xmaxt, *ylowt=NULL, *yhight=NULL;
+ float ycent_data, ycent_tab ;
+ long j, npts ;
+ char ycentname[FLEN_VALUE]={'\0'}, chidfile[FLEN_VALUE] ;
+ char instmode[FLEN_VALUE];
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ /* Read the measured centroid from the input file header. */
+ FITS_movabs_hdu(infits, 1, &hdutype, &status) ;
+ sprintf(ycentname,"YCENT%1d",aperture) ;
+ FITS_read_key(infits, TFLOAT, ycentname, &ycent_data, NULL, &status);
+ cf_verbose(3, "Reading extraction limits for aperture %d ", aperture) ;
+ cf_verbose(3, "ycent keyword = %s, value=%5.1f ", ycentname, ycent_data) ;
+
+ /* Read instrument mode and binning factor from file header. */
+ FITS_read_key(infits, TSTRING, "INSTMODE", instmode, NULL, &status);
+ FITS_read_key(infits, TSHORT, "SPECBINY", &specbiny, NULL, &status);
+
+ /* Which HDU to read depends on both channel and source type. */
+ hdu = aperture + 1;
+ if (srctype) hdu += 8;
+
+ /* Open the CHID_CAL file. */
+ FITS_read_key(infits, TSTRING, "CHID_CAL", chidfile, NULL, &status);
+ cf_verbose(3, "spectral extraction file = %s, HDU = %d", chidfile, hdu);
+ FITS_open_file(&chidfits, cf_cal_file(chidfile), READONLY, &status);
+ FITS_movabs_hdu(chidfits, hdu, &hdutype, &status);
+
+ /* Read X limits of extraction window. */
+ FITS_read_key(chidfits, TSHORT, "XMIN", &xmint, NULL, &status);
+ FITS_read_key(chidfits, TSHORT, "XMAX", &xmaxt, NULL, &status);
+
+ /* Read centroid of tabulated extraction window. */
+ FITS_read_key(chidfits,TFLOAT,"CENTROID",&ycent_tab,NULL,&status);
+
+ /* For point-source data taken in HIST mode, pad window. */
+ if ((!strncmp(instmode, "HIST", 4)) && !srctype) histpad = specbiny;
+ /* FITS_read_key(chidfits,TSHORT,"HIST_PAD",&histpad,NULL,&status); */
+
+ /* Read the upper and lower boundaries of the extraction slit. */
+ npts=cf_read_col(chidfits, TSHORT, "YLOW", (void **) &ylowt);
+ npts=cf_read_col(chidfits, TSHORT, "YHIGH", (void **) &yhight);
+ FITS_close_file(chidfits, &status) ;
+
+ /* If the spectral centroid has been measured, shift the aperture
+ limits so that the tabulated centroid equals the measured value. */
+ if (ycent_data > 1 && ycent_data < NYMAX) {
+ dcent = (short) cf_nint(ycent_data - ycent_tab) ;
+ cf_verbose(3, "shifting extraction window: ycent_tab=%5.1f, delta=%d",
+ ycent_tab, dcent) ;
+ for (j = xmint; j <= xmaxt; j++) {
+ ylowt[j] += dcent ;
+ yhight[j] += dcent ;
+ }
+ }
+
+ /* If HIST_PAD > 0, pad the extraction window, top and bottom. */
+ if (histpad > 0) {
+ cf_verbose(3, "HIST point source. "
+ "Padding extraction window by +/- %d pixels", histpad);
+ for (j = xmint; j <= xmaxt; j++) {
+ ylowt[j] -= histpad ;
+ yhight[j] += histpad ;
+ }
+ }
+
+ /* Return the extraction limits. */
+ *xmin = xmint;
+ *xmax = xmaxt;
+ *ylow = ylowt ;
+ *yhigh = yhight ;
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+ return npts ;
+}
diff --git a/src/libcf/cf_fes_proc_check.c b/src/libcf/cf_fes_proc_check.c
new file mode 100644
index 0000000..74a41b4
--- /dev/null
+++ b/src/libcf/cf_fes_proc_check.c
@@ -0,0 +1,94 @@
+/******************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ ******************************************************************************
+ *
+ * Synopsis: cf_fes_proc_check(fitsfile *fptr, char *prog_id)
+ *
+ * Description: cf_fes_proc_check will determine if a given calibration
+ * step is to be performed on the data. It will also
+ * determine whether all previous steps have been
+ * completed successfully.
+ *
+ * Arguments: fitsfile *fptr Pointer to input file
+ * char *prog_id Procedure name
+ *
+ * History: 06/21/98 emm Begin work.
+ * 08/19/2004 1.1 wvd Move to v3.0, add CF_VER_NUM,
+ * change cf_errmsg to cf_if_error.
+ * 09/07/2007 1.2 bot Removed unused CF_VER_NUM and CF_PRGM_ID
+ *
+ *****************************************************************************/
+
+#include <stdio.h>
+#include <string.h>
+#include "calfuse.h"
+#define MAXCHARS 120
+
+int cf_fes_proc_check(fitsfile *fptr, char *prog_id)
+{
+ int i,j, status=0;
+ char comment[FLEN_CARD], key_value[FLEN_CARD];
+ char complete[19], skipped[19], perform[19];
+
+ /*
+ * The calfuse.h file contains the definitions of fes_keyword_tab
+ * NUM_PROC_STEPS, and CALIBRATION_STEP_KEYS.
+ */
+ struct fes_keyword_tab keytab[NUM_FES_PROC_STEPS]=FES_CALIBRATION_STEP_KEYS;
+ status=0;
+
+ strncpy(complete,"COMPLETE ",19);
+ strncpy(skipped, "SKIPPED ",19);
+ strncpy(perform, "PERFORM ",19);
+
+ j=0;
+ /*
+ * First, determine if this procedure is even supposed to be
+ * run on this data.
+ */
+ while ((strncmp(keytab[j].proc,prog_id, strlen(keytab[j].proc)) != 0) &&
+ (j < NUM_FES_PROC_STEPS)) j++;
+ if ((j >= NUM_FES_PROC_STEPS) ||
+ (strncmp(keytab[j].value,perform,7))) {
+ cf_if_error("Processing step does not "
+ "need to be run on this type of data.");
+ fprintf(stderr," Step %18.18s does not need "
+ "to be run.\n",prog_id);
+ return 1;
+ }
+
+ status=0;
+ fits_read_key_str(fptr, keytab[j].name, key_value, comment,
+ &status);
+
+ /* Now check to see if the step has already been completed. */
+ if (strncmp(key_value,complete,7)==0) {
+ cf_if_error("Processing step has already been completed.\n");
+ fprintf(stderr," Step %18.18s does not need to be run.\n",
+ prog_id);
+ return 1;
+ }
+
+ /* Now determine if the previous programs are all complete. */
+ for (i=0; i<j; i++) {
+ fits_read_key_str(fptr, keytab[i].name, key_value, comment,
+ &status);
+ if (strncmp(keytab[i].value,perform,7)==0) {
+ if (strncmp(key_value,complete,8) &&
+ strncmp(key_value,skipped,7)) {
+ cf_if_error("Processing step not completed.");
+ fprintf(stderr," Step %8.8s has value "
+ "%8.8s.\n",keytab[i].name,key_value);
+ fprintf(stderr," It should be either "
+ "COMPLETE or SKIPPED before running "
+ "%18.18s\n",prog_id);
+ return 1;
+ } /* End if check on key_value */
+ } /* End check on keytab[i].value */
+ } /* End for */
+
+ /* If we got to here, it must be OK */
+ return 0;
+}
diff --git a/src/libcf/cf_fes_proc_update.c b/src/libcf/cf_fes_proc_update.c
new file mode 100644
index 0000000..14f1f78
--- /dev/null
+++ b/src/libcf/cf_fes_proc_update.c
@@ -0,0 +1,68 @@
+/******************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ ******************************************************************************
+ *
+ * Synopsis: cf_fes_proc_update(fitsfile *fptr, char *prgm_id,
+ * char *key_value)
+ *
+ * Description: cf_fes_proc_update will update the FITS header keyword
+ * which corresponds to the given prgm_id in the file
+ * fptr to the value given in key_value.
+ *
+ * Arguments: fitsfile *fptr Pointer to input file
+ * char *prgm_id Procedure name
+ * char *key_value Updated procedure status
+ *
+ * History: 07/21/98 emm Begin work.
+ * 08/19/2004 1.1 wvd Move to v3.0, add CF_VER_NUM,
+ * change cf_errmsg to cf_if_error.
+ * Delete fits_print_err.
+ * 09/07/2007 1.2 bot Removed unused CF_VER_NUM and CF_PRGM_ID
+ *
+ *****************************************************************************/
+
+#include <stdio.h>
+#include <string.h>
+#include "calfuse.h"
+
+int cf_fes_proc_update(fitsfile *fptr, char *prgm_id, char *key_value)
+{
+ int i=0, status=0;
+ /*
+ * The calfuse.h file contains the definitions of fes_keyword_tab
+ * NUM_FES_PROC_STEPS, and FES_CALIBRATION_STEP_KEYS.
+ */
+ struct fes_keyword_tab keytab[NUM_FES_PROC_STEPS]=FES_CALIBRATION_STEP_KEYS;
+ /*
+ * Find the keyword associated with prgm_id by looping
+ * through keytab[i].proc
+ */
+ while ((strncmp(keytab[i].proc,prgm_id, strlen(keytab[i].proc)) != 0) &&
+ (i < NUM_FES_PROC_STEPS)) i++;
+ if (i < NUM_FES_PROC_STEPS) {
+ /*
+ * We found a match to prgm_id, so change the associated
+ * keyword in the header.
+ */
+ fits_modify_key_str(fptr,keytab[i].name,key_value,
+ "&",&status);
+ if (status) {
+ cf_if_error("Error updating keyword");
+ return status;
+ }
+ }
+ else {
+ /*
+ * The given prgm_id did not match any of the known
+ * keytab[i].hist_proc, so return 1.
+ */
+ cf_if_error("Program ID does not apply to this"
+ "type of file, could not update");
+ fprintf(stderr,"Failed to update program id:%20.20s\n",
+ prgm_id);
+ return 1;
+ }
+ return status;
+}
diff --git a/src/libcf/cf_fifo_dead_time.c b/src/libcf/cf_fifo_dead_time.c
new file mode 100644
index 0000000..67ac065
--- /dev/null
+++ b/src/libcf/cf_fifo_dead_time.c
@@ -0,0 +1,164 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_fifo_dead_time(fitsfile *header, long nevents,
+ * float *ptime, long nseconds, float *ttime, float *aic_rate,
+ * float *ids_dtc)
+ *
+ * Description: Searches high-count-rate observations for data drop-outs
+ * due to FIFO overflows. If found, calculates time-dependent
+ * scale factor to correct for lost photon events.
+ *
+ * Arguments: fitsfile *header Pointer to FITS file containing the
+ * header of the intermediate data file
+ * long nevents Number of photon events in the file
+ * float *ptime Detection time for each photon
+ * long nseconds The number of timeline values
+ * float *ttime Tabulated times in the timeline
+ * float *aic_rate Active Image Counter array
+ * float *ids_dtc IDS dead-time correction array
+ * (modified)
+ *
+ * Calls:
+ *
+ * Return: 0 on success
+ *
+ * History of cf_screen_fifo_overflow:
+ *
+ * 02/10/04 1.1 wvd Begin work
+ * 02/17/05 1.2 wvd Place parentheses around assignment
+ * used as truth value.
+ * 11/09/05 1.3 wvd In the current scheme, the rate_lif
+ * and rate_sic arrays contain values
+ * from the housekeeping file and do
+ * not reflect data loss due to FIFO
+ * overflows. Now we calculate the
+ * count-rate array directly from the
+ * photon time array.
+ * 02/23/06 1.4 wvd Change length of data_rate array
+ * from nevents to nseconds.
+ *
+ * History: 12/29/06 1.1 wvd Derived from cf_screen_fifo_overflow.
+ * 01/15/07 1.2 wvd When count rate is zero, correct one
+ * second before to two seconds after.
+ * 02/08/07 1.3 wvd If TTPERIOD = 0, set it to 1.
+ * 04/07/07 1.4 wvd Clean up compiler warnings.
+ *
+ ****************************************************************************/
+
+#include <stdlib.h>
+#include "calfuse.h"
+
+int
+compute_count_rate(long nevents, float *ptime, long nseconds,
+ float *ttime, long **data_rate)
+{
+ float delta_max = 1.0 + FRAME_TOLERANCE;
+ long j,k;
+
+ *data_rate = (long *) cf_calloc(nseconds, sizeof(long));
+ for (j=k=0; j<nevents; j++) {
+ while(ttime[k+1]-FRAME_TOLERANCE < ptime[j] && k+1 < nseconds) k++;
+ if ((ptime[j] - ttime[k]) < delta_max) (*data_rate)[k]++;
+ }
+ return 0;
+}
+
+int
+cf_fifo_dead_time(fitsfile *header, long nevents, float *ptime,
+ long nseconds, float *ttime, float *aic_rate, float *ids_dtc)
+{
+ char CF_PRGM_ID[] = "cf_fifo_dead_time";
+ char CF_VER_NUM[] = "1.4";
+
+ char elecfile[FLEN_VALUE];
+ int errflg=0, status=0;
+ int fifo_drain_rate;
+ int *flag_array, found_drop_out = FALSE;
+ long *data_rate, k;
+ float mean_ids_rate, ttperiod;
+ float mean_ids_dtc;
+ fitsfile *elecfits;
+
+ /* Exit if data were obtained in HIST mode. */
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+ if ((errflg = cf_proc_check(header, CF_PRGM_ID))) return errflg;
+
+ /* Read IDS drain rate from calibration file. */
+ FITS_read_key(header, TSTRING, "ELEC_CAL", elecfile, NULL, &status);
+ FITS_open_file(&elecfits, cf_cal_file(elecfile), READONLY, &status);
+ FITS_read_key(elecfits, TINT, "FIFO_DRN", &fifo_drain_rate, NULL, &status);
+ FITS_close_file(elecfits, &status);
+ cf_verbose(4, "fifo_drain_rate = %d", fifo_drain_rate);
+
+ /* Read interval between time stamps. */
+ FITS_read_key(header, TFLOAT, "TTPERIOD", &ttperiod, NULL, &status);
+ if (ttperiod < 1E-6) ttperiod = 1.0;
+
+ /* Compute mean IDS count rate. */
+ mean_ids_rate = 0.;
+ for (k=0; k<nseconds; k++)
+ mean_ids_rate += aic_rate[k];
+ mean_ids_rate /= nseconds;
+ mean_ids_rate += 1./ttperiod;
+ cf_verbose(4, "mean_ids_rate = %f", mean_ids_rate);
+
+ /* If mean IDS count rate > 3200, look for data drop-outs. */
+ if (mean_ids_rate > 3200 && nseconds > 4) {
+ compute_count_rate(nevents, ptime, nseconds, ttime, &data_rate);
+ flag_array = (int *) cf_calloc(nseconds, sizeof(int));
+
+ /* If count rate goes to zero, set flag_array. Where possible,
+ set flags from one second before to two seconds after. */
+ for (k=0; k<1; k++) if (data_rate[k] == 0)
+ flag_array[k] = flag_array[k+1] = flag_array[k+2] = TRUE;
+
+ for ( ; k<nseconds-2; k++) if (data_rate[k] == 0)
+ flag_array[k-1] = flag_array[k] = flag_array[k+1] =
+ flag_array[k+2] = TRUE;
+
+ for ( ; k<nseconds-1; k++) if (data_rate[k] == 0)
+ flag_array[k-1] = flag_array[k] = flag_array[k+1] = TRUE;
+
+ for ( ; k<nseconds; k++) if (data_rate[k] == 0)
+ flag_array[k-1] = flag_array[k] = TRUE;
+
+ for (k=0; k<nseconds; k++) if (data_rate[k] == 0) {
+ found_drop_out = TRUE;
+ break;
+ }
+
+ /* If there are any drop-outs, modify IDS dead-time correction. */
+ if (found_drop_out)
+ for ( ; k < nseconds; k++) if (flag_array[k])
+ ids_dtc[k] = (aic_rate[k] - 1./ttperiod) / fifo_drain_rate;
+
+ free(data_rate);
+ free(flag_array);
+ }
+
+ /*
+ * Calculate mean dead-time correction. Write to file header.
+ */
+ if (found_drop_out) {
+ mean_ids_dtc = 0;
+ for (k = 0; k < nseconds; k++) mean_ids_dtc += ids_dtc[k];
+ mean_ids_dtc /= nseconds;
+ cf_verbose(1, "IDS FIFO overflow detected.");
+ cf_verbose(2, "Modified mean IDS dead-time correction: %f",
+ mean_ids_dtc);
+ FITS_update_key(header, TFLOAT, "IDS_DEAD", &mean_ids_dtc, NULL,
+ &status);
+ }
+
+ /*
+ * Clean up and go home.
+ */
+ cf_proc_update(header, CF_PRGM_ID, "COMPLETE");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+ return 0;
+}
diff --git a/src/libcf/cf_find_spectra.c b/src/libcf/cf_find_spectra.c
new file mode 100644
index 0000000..412a1e4
--- /dev/null
+++ b/src/libcf/cf_find_spectra.c
@@ -0,0 +1,396 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_find_spectra(fitsfile *header, long nevents,
+ * float *weight, float, *xfarf, float *yfarf, char *chan,
+ * unsigned char *timeflags, unsigned char *locflags,
+ * int airglow_centroid)
+ *
+ * Description: Determines the spectral centroid for each aperture.
+ * First, we compute the airglow centroid for the LWRS
+ * aperture and determine its offset relative to the
+ * tabulated value. For the MDRS and HIRS apertures, we
+ * apply this offset to the tabulated centroid to get the
+ * airglow centroid. For each aperture, we search for a
+ * target spectrum in a narrow range around the airglow
+ * centroid. If we find it, we use it; otherwise, we use
+ * the airglow centroid. If airglow_centroid = TRUE, use
+ * airglow centroid for the target spectrum.
+ *
+ *
+ * Arguments: fitsfile *header Pointer to the location of the FITS
+ * header of the Intermediate Data File
+ * long nevents Number of photons in the file
+ * float *weight scale factor for each photon event
+ * float *xfarf X position of each photon event
+ * float *yfarf Y position of each photon event
+ * unsigned char *chan Pointer to the array containing
+ * channel information for each event
+ * unsigned char *timeflags Pointer to the array containing
+ * time flags for each event
+ * unsigned char *locflags Pointer to the array containing
+ * location flags for each event
+ * int airglow_centroid If TRUE, use airglow lines to compute
+ * centroid of target spectrum.
+ *
+ * Calls:
+ *
+ * Return: 0 on success
+ *
+ * History: 04/18/03 1.1 wvd Initial work
+ * 05/20/03 1.2 rdr Added call to cf_proc_check
+ * 07/29/03 1.3 rdr Deal with case where no source is
+ * present (i.e. Aperture = RFPT)
+ * 08/21/03 1.6 wvd Change channel to unsigned char.
+ * 09/08/03 1.7 wvd Fix typo in verbose statement.
+ * 09/18/03 1.8 wvd Stop iteration if
+ * cf_calculate_y_centroid returns -1.
+ * 10/22/03 1.9 wvd Rewrite program.
+ * 11/12/03 1.10 wvd In HIST mode, use default centroid
+ * for non-target channels.
+ * 04/09/04 1.11 bjg Include stdlib.h and stdio.h
+ * Change formats in printf to
+ * match arg types.
+ * 04/19/04 1.12 wvd Sum background only over detector
+ * active area. Scale intrinsic count
+ * rate by EXPTIME and detector width.
+ * 05/03/04 1.13 wvd Move call to cf_identify_channel
+ * from this routine to cf_remove_motions.
+ * 06/02/04 1.14 wvd Don't need PHA array; can use locflags
+ * instead. Use time flags to exclude
+ * bursts, etc.
+ * 04/21/05 1.15 wvd Rewrite program using airglow lines
+ * (if available) to constrain search
+ * for target centroid. Don't bother
+ * reading model background files.
+ * 06/03/05 1.16 wvd Fix bug in tabulation of exected Y
+ * centroids. Remove unused variables.
+ * 02/01/06 1.17 wvd Tighten region over which centroids
+ * are computed.
+ * If target centroid is too far from
+ * airglow centroid, reject it.
+ * If ycent is too far from default value,
+ * use default, not airglow value.
+ * Change ysum and norm to doubles.
+ * 08/30/06 1.18 wvd Added airglow_centroid argument.
+ * 03/14/08 1.19 wvd In HIST mode, there are no spectra in
+ * other apertures to cause confusion,
+ * so we need not require that the
+ * target centroid be within 30 pixels
+ * of the airglow value.
+ * 11/25/08 1.20 wvd Don't compare HIST centroids to
+ * either airglow or tabulated centroid.
+ *
+ ****************************************************************************/
+#include <stdlib.h>
+#include <stdio.h>
+#include <math.h>
+#include <string.h>
+#include "calfuse.h"
+
+#define YLENGTH NYMAX/16
+
+int
+cf_find_spectra(fitsfile *header, long nevents,
+ float *weight, float *xfarf, float *yfarf, unsigned char *channel,
+ unsigned char *timeflags, unsigned char *locflags, int airglow_centroid)
+{
+ char aper[FLEN_VALUE], instmode[FLEN_VALUE], quality[FLEN_VALUE];
+ char key[FLEN_KEYWORD], filename[FLEN_VALUE], detector[FLEN_VALUE];
+ double norm, ysum;
+ float bkgd, peak, ycent, yshift=0;
+ float yairg[NYMAX], ydist[NYMAX], ysigma[NYMAX];
+ float ybin[YLENGTH], sbin[YLENGTH], ycent_tab[8];
+ float dy, sigma, xmin, xmax, ycent_air;
+ int active_ap[2], airglow=FALSE, target_ap, status=0;
+ int bkgd_num, bkgd_min[8], bkgd_max[8];
+ int chan_num, errflg = 0, lwrs;
+ int chan_order[] = { 3, 2, 1, 7, 6, 5 };
+ int center, high, low, npeak, hdu;
+ int spex_sic, spex_lif, emax, emax_sic, emax_lif, extended;
+ long i, j, k;
+ fitsfile *chidfits, *parmfits;
+
+ char CF_PRGM_ID[] = "cf_find_spectra";
+ char CF_VER_NUM[] = "1.20";
+
+ /* Initialize error checking */
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+ /* Enter a time stamp into the log */
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ /* Check whether routine is appropriate for this data file. */
+ if ( (errflg = cf_proc_check(header, CF_PRGM_ID)) ) return errflg;
+
+ /* Initialize Y-distribution arrays. */
+ for (i = 0; i < NYMAX; i++)
+ yairg[i] = ydist[i] = ysigma[i] = 0.;
+ for (i = 0; i < YLENGTH; i++)
+ ybin[i] = sbin[i] = 0.;
+
+ /* Read header keywords from IDF. */
+ FITS_read_key(header, TSTRING, "INSTMODE", instmode, NULL, &status);
+ FITS_read_key(header, TSTRING, "DETECTOR", detector, NULL, &status);
+ FITS_read_key(header, TSTRING, "APERTURE", aper, NULL, &status);
+ extended = cf_source_aper(header, active_ap);
+
+ FITS_read_key(header, TINT, "BKGD_NUM", &bkgd_num, NULL, &status);
+ for (i = 0; i < bkgd_num; i++) {
+ sprintf(key, "BKG_MIN%ld", i);
+ FITS_read_key(header, TINT, key, bkgd_min+i, NULL, &status);
+ sprintf(key, "BKG_MAX%ld", i);
+ FITS_read_key(header, TINT, key, bkgd_max+i, NULL, &status);
+ }
+
+ /* Read expected channel centroids from CHID_CAL file. */
+ FITS_read_key(header, TSTRING, "CHID_CAL", filename, NULL, &status);
+ FITS_open_file(&chidfits, cf_cal_file(filename), READONLY, &status);
+ for (i = 1; i < 8; i++) {
+ if (i==4) continue;
+ if ((i == active_ap[0] || i == active_ap[1]) && !extended) hdu=i+1;
+ else hdu=i+9;
+ FITS_movabs_hdu(chidfits, hdu, NULL, &status);
+ FITS_read_key(chidfits, TFLOAT, "CENTROID", ycent_tab+i, NULL, &status);
+ }
+ FITS_read_key(chidfits, TFLOAT, "XMIN", &xmin, NULL, &status);
+ FITS_read_key(chidfits, TFLOAT, "XMAX", &xmax, NULL, &status);
+ FITS_close_file(chidfits, &status);
+
+ /*
+ * Generate photon and airglow arrays as a function of YFARF.
+ * Ignore events near the detector edge.
+ */
+ xmin += 250;
+ xmax -= 250;
+ for (i = 0; i < nevents; i++) {
+ if (!(timeflags[i] & ~TEMPORAL_DAY) &&
+ (xfarf[i] > xmin) && (xfarf[i] < xmax)) {
+ if (!locflags[i])
+ ydist[cf_nint(yfarf[i])] += weight[i];
+ else if (locflags[i] == LOCATION_AIR)
+ yairg[cf_nint(yfarf[i])] += weight[i];
+ }
+ }
+ /* Set error array equal to photon counts (= variance). */
+ for (i = 0; i < NYMAX; i++)
+ ysigma[i] = ydist[i];
+
+ /* If exposure was taken in TTAG mode, estimate BKGD level */
+ bkgd = 0.;
+ if (!strcmp(instmode, "TTAG")) {
+ k = 0;
+ for (i = 0; i < bkgd_num; i++) {
+ for (j = bkgd_min[i]; j <= bkgd_max[i]; j++) {
+ bkgd += ydist[j];
+ k++;
+ }
+ }
+ bkgd /= k;
+ cf_verbose(3, "Mean background level: %.1f", bkgd);
+ }
+
+ /* Subtract mean background and bin data by 16 pixels. */
+ for (i = 0; i < NYMAX; i++) {
+ j = i / 16;
+ ybin[j] += ydist[i] - bkgd;
+ sbin[j] += ysigma[i];
+ }
+ for (i = 0; i < YLENGTH; i++) sbin[i] = sqrt(sbin[i]);
+
+ /* Read extraction parameters from PARM_CAL file. */
+ FITS_read_key(header, TSTRING, "PARM_CAL", filename, NULL, &status);
+ FITS_open_file(&parmfits, cf_parm_file(filename), READONLY, &status);
+ FITS_read_key(parmfits,TINT,"SPEX_SIC",&spex_sic,NULL,&status);
+ FITS_read_key(parmfits,TINT,"SPEX_LIF",&spex_lif,NULL,&status);
+ FITS_read_key(parmfits,TINT,"EMAX_SIC",&emax_sic,NULL,&status);
+ FITS_read_key(parmfits,TINT,"EMAX_LIF",&emax_lif,NULL,&status);
+ FITS_close_file(parmfits,&status);
+
+ /* Determine centroid for each channel. */
+ for (k = 0; k < 6; k++) {
+ chan_num = chan_order[k];
+
+ /* Is this the LWRS aperture? */
+ if (chan_num == 3 || chan_num == 7)
+ lwrs = TRUE;
+ else
+ lwrs = FALSE;
+
+ /* Is it the target aperture? */
+ if (chan_num == active_ap[0] || chan_num == active_ap[1])
+ target_ap = TRUE;
+ else
+ target_ap = FALSE;
+
+ /* If we're in histogram mode, and this is not the target aperture,
+ move to next aperture. */
+ if (!strncmp(instmode, "HIST", 4) && !target_ap) {
+ if (lwrs) yshift = 0;
+ continue;
+ }
+
+ /* First, we compute a centroid from the airglow lines.
+ For the LWRS aperture, search within 70 pixels of
+ the expected centroid. Compute the offset between the
+ measured and tabulated centroids. For the MDRS and HIRS
+ apertures, apply the offset computed from the LWRS aperture
+ to the tabulated centroid.
+ Disregard regions near the bottom and top of the detector. */
+
+ if (lwrs) {
+ center = cf_nint(ycent_tab[chan_num]);
+ dy = 70;
+ if ((low = center-dy) < 16) low = 16;
+ if ((high = center+dy) > NYMAX-50) high = NYMAX-50;
+ norm = ysum = 0.;
+ for (i = low; i <= high; i++) {
+ ysum += i * yairg[i];
+ norm += yairg[i];
+ }
+
+ /* If the airglow lines contain at least 33 events, use their
+ centroid. If not, use the tabulated centroid. */
+ if (norm > 33.) {
+ ycent = ysum / norm;
+ yshift = ycent - ycent_tab[chan_num];
+ airglow = TRUE;
+ }
+ else {
+ ycent = ycent_tab[chan_num];
+ yshift = 0;
+ airglow = FALSE;
+ }
+ }
+ /* For MDRS and HIRS apertures */
+ else
+ ycent = yshift + ycent_tab[chan_num];
+
+ /* Remember airglow centroid */
+ ycent_air = ycent;
+
+ /* Now we find the centroid for the target spectrum. If we are
+ in a target aperture and user has specified YCENT, use it. */
+
+ if (target_ap && ((chan_num<5 && spex_lif>=0 && spex_lif<1024) ||
+ (chan_num>4 && spex_sic>=0 && spex_sic<1024))) {
+ if (chan_num<5) ycent=spex_lif;
+ else ycent=spex_sic;
+ sprintf(key, "YCENT%1d", chan_num);
+ FITS_update_key(header, TFLOAT, key, &ycent, NULL, &status);
+ sprintf(quality, "HIGH");
+ sprintf(key, "YQUAL%1d", chan_num);
+ FITS_update_key(header, TSTRING, key, quality, NULL, &status);
+ cf_verbose(1, "Channel %d: User-specified Y centroid = %.2f",
+ chan_num, ycent);
+ continue;
+ }
+
+ /* If we must find the target spectrum ourselves, use the binned
+ data array to improve the S/N. Search within 2 binned pixels
+ of ycent, however it was computed. */
+
+ center = cf_nint(ycent / 16.);
+ dy = 2;
+ if ((low = center - dy) < 3) low = 3;
+ if ((high = center + dy) > YLENGTH-4) high = YLENGTH-4;
+
+ npeak = 0;
+ peak = -1.0E5;
+ for (i = low; i <= high; i++) {
+ if (ybin[i] > peak) {
+ peak = ybin[i];
+ npeak = i;
+ }
+ }
+
+ /* If peak is significant, compute Y centroid for events falling
+ within 40 pixels of peak. If this number is within 30 pixels
+ of airglow centroid, use it. If not, use airglow centroid.
+ Note that we require a higher significance for the SiC LWRS
+ channel on side 1, because it sits on an elevated background. */
+
+ if (!strncmp(detector, "1", 1) && chan_num == 7) sigma = 9.;
+ else sigma = 5.;
+
+ sprintf(quality, "UNKNOWN");
+
+ if (peak > sigma * sbin[npeak] && !airglow_centroid) {
+ center = npeak * 16 + 8;
+ dy = 40;
+ if ((low = center - dy) < 32) low = 32;
+ if ((high = center + dy) > NYMAX-50) high = NYMAX-50;
+ norm = ysum = 0.;
+ for (i = low; i <= high; i++) {
+ ysum += i * ydist[i];
+ norm += ydist[i];
+ }
+ ycent = ysum / norm;
+
+ /* Don't test offset for HIST data. (wvd, 03/14/2008) */
+ if (fabs(ycent - ycent_air) < 30 || !strncmp(instmode, "HIST", 4)) {
+ sprintf(quality, "HIGH");
+ cf_verbose(3, "Channel %d: default centroid: %.2f",
+ chan_num, ycent_tab[chan_num]);
+ if (airglow) cf_verbose(3, "Channel %d: airglow centroid: %.2f",
+ chan_num, ycent_air);
+ cf_verbose(3,"Channel %d: counts in peak = %.0f, limit = %.0f",
+ chan_num, peak, sigma * sbin[npeak]);
+ cf_verbose(2, "Channel %d: using target centroid = %.2lf",
+ chan_num, ycent);
+ }
+ }
+ /* If peak is not significant or ycent differs too much from
+ the airglow centroid, use the airglow centroid. */
+ if (!strncmp(quality, "UNKNOWN", 1)) {
+ if (airglow) {
+ sprintf(quality, "MEDIUM");
+ cf_verbose(3, "Channel %d: default centroid: %.2f",
+ chan_num, ycent_tab[chan_num]);
+ cf_verbose(3,"Channel %d: peak = %.0f, limit = %.0f",
+ chan_num, peak, sigma * sbin[npeak]);
+ cf_verbose(2, "Channel %d: using airglow centroid = %.2lf",
+ chan_num, ycent);
+ }
+ else {
+ sprintf(quality, "LOW");
+ cf_verbose(3,"Channel %d: peak = %f, limit = %f",
+ chan_num, peak, sigma * sbin[npeak]);
+ cf_verbose(2, "Channel %d: using default centroid = %.2lf",
+ chan_num, ycent);
+ }
+ }
+
+ /* If centroid lies too far from the default value, use default. */
+ if (chan_num<5) emax=emax_lif; else emax=emax_sic;
+ /* Don't test offset for HIST data. (wvd, 11/25/2008) */
+ if (fabs(ycent - ycent_tab[chan_num]) > emax && !strncmp(instmode, "TTAG", 4)) {
+ if (target_ap) {
+ cf_verbose(1, "Computed centroid (%.1lf) is too far from "
+ "expected value.", ycent);
+ cf_verbose(1, "Channel %d: using default centroid of %.1f",
+ chan_num, ycent_tab[chan_num]);
+ }
+ else {
+ cf_verbose(2, "Channel %d: using default centroid of %.1f",
+ chan_num, ycent_tab[chan_num]);
+ }
+ ycent = ycent_tab[chan_num];
+ sprintf(quality, "LOW");
+ }
+
+ /* Write results to file header */
+ sprintf(key, "YCENT%1d", chan_num);
+ FITS_update_key(header, TFLOAT, key, &ycent, NULL, &status);
+ sprintf(key, "YQUAL%1d", chan_num);
+ FITS_update_key(header, TSTRING, key, quality, NULL, &status);
+ }
+
+ cf_proc_update(header, CF_PRGM_ID, "COMPLETE");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done Processing");
+
+ return status;
+}
diff --git a/src/libcf/cf_fpa_position.c b/src/libcf/cf_fpa_position.c
new file mode 100644
index 0000000..fd7229c
--- /dev/null
+++ b/src/libcf/cf_fpa_position.c
@@ -0,0 +1,231 @@
+/****************************************************************************
+ *
+ * Synopsis: cf_fpa_position(fitsfile *header, long nevents, float *x,
+ * unsigned char *channel)
+ *
+ * Description: Modify X position of photon events to account for an offset
+ * of the focal plane assembly (FPA)
+ *
+ * Arguments: fitsfile *header Pointer to the FITS header
+ * of the Intermediate Data File
+ * long npts Number of photons in the file
+ * float *x X positions for each photon event
+ * unsigned char *channel Assigned channel of each photon
+ *
+ * Calls: None
+ *
+ * Return: 0 on success
+ *
+ * History: 09/04/02 v1.1 wvd Based on cf_dpix by HSU
+ * 01/14/03 v1.3 wvd Rename cf_fpa_pos to cf_read_fpa_pos
+ * Move spectrograph optical parameters
+ * to separate calibration file.
+ * Abandon linear wavelength scale.
+ * 02/13/03 v1.4 wvd Write FPA shifts to file header.
+ * 04/07/03 v1.5 wvd Change keywords to FPADXLIF and
+ * FPADXSIC. Implement cf_verbose.
+ * Comment out cf_proc_check.
+ * Test channel[i] as int, not char.
+ * 05/20/03 v1.6 rdr Added call to cf_proc_check.
+ * 08/21/03 v1.7 wvd Change channel to unsigned char.
+ * 08/23/05 v1.8 wvd If either FPA position is out of
+ * bounds, issue a warning and set
+ * that FPA correction to zero.
+ * 08/01/05 v1.9 wvd Broaden FPA limits by +/- 1.
+ * 09/06/05 v1.10 wvd Correct for both X and Z motions
+ * of FPA.
+ * Delete call to cf_read_fpa_pos.c
+ * 12/02/05 v1.11 wvd Delete unused variables.
+ * 04/07/07 v1.12 wvd Clean up compiler warnings.
+ *
+ ****************************************************************************/
+
+#include <string.h>
+#include <stdio.h>
+#include <math.h>
+#include "calfuse.h"
+
+#define PIX1 2500 /* PIX1,2 are just inside the non-linear */
+#define PIX2 13500 /* regions of the detector */
+
+int cf_fpa_position(fitsfile *header, long nevents, float *x,
+ unsigned char *channel)
+{
+ char CF_PRGM_ID[] = "cf_fpa_position";
+ char CF_VER_NUM[] = "1.12";
+
+ int errflg=0, status=0, hdutype, hdunum;
+ int nwave; /* number of pixels in calibration file */
+ char aperture[FLEN_VALUE]; /* aperture keyword from FITS header */
+ char detector[FLEN_VALUE]; /* detector keyword from FITS header */
+ char wave_file[FLEN_FILENAME]; /* name of wavelength calibration file */
+ char spec_file[FLEN_FILENAME]; /* name of spectrograph calibration file */
+ long i;
+ /* Spectrograph optical parameters */
+ float alpha, alpha_lif, alpha_sic, sigma_lif, sigma_sic, diam;
+ float *wavelength; /* wavelengths read from calibration file */
+ float fpaxlifdata; /* LiF FPA X position in microns for spectrum */
+ float fpaxsicdata; /* SiC FPA X position in microns for spectrum */
+ float fpaxcal; /* FPA X position in microns for calibration file */
+ float dxfpa; /* fpax_data - fpaxcal */
+ float fpazlifdata; /* LiF FPA Z position in microns for spectrum */
+ float fpazsicdata; /* SiC FPA Z position in microns for spectrum */
+ float fpazcal; /* FPA Z position in microns for calibration file */
+ float dzfpa; /* fpaz_data - fpazcal */
+ float dpix, dpix_LiF, dpix_SiC; /* Spectral shift (in pixels)*/
+
+ double w1, w2; /* wavelengths at which to sample calibration */
+ double beta1,beta2; /* grating exit angle for w1, w2 */
+ double sinalpha; /* sin (spectrograph entrance angle) */
+ double cosalpha; /* cos (spectrograph entrance angle) */
+ double sigma; /* grating groove spacing in Angstroms */
+ double cosbeta; /* cos (mean grating exit angle) */
+ double pixscale; /* mean effective microns/pixel for det segment */
+ fitsfile *specfits, *wavefits;
+
+ /* Initialize error checking */
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+ /* Enter a timestamp into the log. */
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ /* Check whether routine is appropriate for this data file. */
+ if ((errflg = cf_proc_check(header, CF_PRGM_ID))) return errflg;
+
+ /* Read keywords from data file header. */
+ FITS_read_key(header, TSTRING, "DETECTOR", detector, NULL, &status);
+ FITS_read_key(header, TSTRING, "APERTURE", aperture, NULL, &status);
+ FITS_read_key(header, TFLOAT, "FPASXPOS", &fpaxsicdata, NULL, &status);
+ FITS_read_key(header, TFLOAT, "FPALXPOS", &fpaxlifdata, NULL, &status);
+ FITS_read_key(header, TFLOAT, "FPASZPOS", &fpazsicdata, NULL, &status);
+ FITS_read_key(header, TFLOAT, "FPALZPOS", &fpazlifdata, NULL, &status);
+ FITS_read_key(header, TSTRING, "SPEC_CAL", spec_file, NULL, &status);
+ FITS_read_key(header, TSTRING, "WAVE_CAL", wave_file, NULL, &status);
+
+ /* Read spectrograph optical parameters from SPEC_CAL file. */
+ FITS_open_file(&specfits, cf_cal_file(spec_file), READONLY, &status);
+ FITS_read_key(specfits, TFLOAT, "ALPHALIF", &alpha_lif, NULL, &status);
+ FITS_read_key(specfits, TFLOAT, "ALPHASIC", &alpha_sic, NULL, &status);
+ FITS_read_key(specfits, TFLOAT, "SIGMALIF", &sigma_lif, NULL, &status);
+ FITS_read_key(specfits, TFLOAT, "SIGMASIC", &sigma_sic, NULL, &status);
+ FITS_read_key(specfits, TFLOAT, "DIAM", &diam, NULL, &status);
+ FITS_close_file(specfits, &status);
+
+ /* Determine the extension number (LiF) from aperture */
+ hdunum = 4; /* Default is LWRS */
+ if (!strcmp(aperture, "HIRS")) hdunum = 2;
+ if (!strcmp(aperture, "MDRS")) hdunum = 3;
+
+ /* Open wavelength calibration file */
+ FITS_open_file(&wavefits, cf_cal_file(wave_file), READONLY, &status);
+
+ /* Loop over the two apertures; first (i==0) LiF, then SiC. */
+ /* Determine shifts for LiF and SiC channels. */
+ for(i=0; i<2; i++) {
+
+ /* Move to appropriate HDU in WAVECAL file. */
+ hdunum += i*4;
+ FITS_movabs_hdu(wavefits, hdunum, &hdutype, &status);
+
+ /* Get FPA position for which WAVECAL was derived */
+ FITS_read_key(wavefits, TFLOAT, "FPACXPOS", &fpaxcal, NULL, &status);
+ FITS_read_key(wavefits, TFLOAT, "FPACZPOS", &fpazcal, NULL, &status);
+
+ /* Read the wavelength array from the WAVECAL file. */
+ nwave=cf_read_col(wavefits, TFLOAT,"WAVELENGTH", (void **) &wavelength);
+
+ /* Set LiF/SIC-dependent quantities */
+ if (i == 1) { /* SiC data */
+ dxfpa = fpaxsicdata - fpaxcal;
+ dzfpa = fpazsicdata - fpazcal;
+ sigma = sigma_sic;
+ alpha = alpha_sic;
+ } else { /* LiF data */
+ dxfpa = fpaxlifdata - fpaxcal;
+ dzfpa = fpazlifdata - fpazcal;
+ sigma = sigma_lif;
+ alpha = alpha_lif;
+ }
+ /*
+ * Compute mean pixel scale from points just inside the
+ * highly-nonlinear regions at edges of detectors */
+ w1 = wavelength[PIX1];
+ w2 = wavelength[PIX2];
+ sinalpha = sin (alpha * RADIAN);
+ cosalpha = cos (alpha * RADIAN);
+ beta1 = asin (w1/sigma - sinalpha);
+ beta2 = asin (w2/sigma - sinalpha);
+ cosbeta = cos ((beta1 + beta2)/2.); /* mean cosbeta for segment */
+ pixscale = diam * fabs(beta1 - beta2) * 1000. / (double)(PIX2-PIX1);
+
+ /* Compute shift of spectrum in pixels due to the FPA offset. */
+ if (i == 1) /* SiC data */
+ dpix = (dxfpa * cosalpha + dzfpa * sinalpha) / cosbeta / pixscale;
+
+ else /* LiF data */
+ dpix = (dxfpa * cosalpha - dzfpa * sinalpha) / cosbeta / pixscale;
+
+ /* For side 2, multiply the above expressions by -1. */
+ if (!strncmp(detector, "2", 1))
+ dpix *= -1;
+
+ /* Write info to log file */
+ if (i == 1) {
+ dpix_SiC = dpix;
+ cf_verbose(3, "FPAX data: %8.3f FPAX calib: %8.3f",
+ fpaxsicdata, fpaxcal);
+ cf_verbose(3, "FPAZ data: %8.3f FPAZ calib: %8.3f",
+ fpazsicdata, fpazcal);
+ cf_verbose(2, "SiC spectra to be shifted by %8.3f pixels", dpix_SiC);
+ }
+ else {
+ dpix_LiF = dpix;
+ cf_verbose(3, "FPAX data: %8.3f FPAX calib: %8.3f",
+ fpaxlifdata, fpaxcal);
+ cf_verbose(3, "FPAZ data: %8.3f FPAZ calib: %8.3f",
+ fpazlifdata, fpazcal);
+ cf_verbose(2, "LiF spectra to be shifted by %8.3f pixels", dpix_LiF);
+ }
+
+ } /* End of i loop */
+
+ /* Close the WAVECAL file */
+ FITS_close_file(wavefits, &status);
+
+ /* If tabulated FPA position is out of range, set the corresponding
+ dpix value to zero and issue a warning. */
+ if (fpaxlifdata < -1 || fpaxlifdata > 401) {
+ dpix_LiF = 0;
+ cf_if_warning("Keyword FPALXPOS is out of bounds. Setting FPADXLIF = 0.");
+ }
+ if (fpaxsicdata < -1 || fpaxsicdata > 401) {
+ dpix_SiC = 0;
+ cf_if_warning("Keyword FPASXPOS is out of bounds. Setting FPADXSIC = 0.");
+ }
+
+ /* Shift only photons with assigned apertures. */
+ for(i = 0; i < nevents; i++) {
+ switch(channel[i]) {
+ case 1: case 2: case 3: case 4:
+ x[i] += dpix_LiF;
+ break;
+ case 5: case 6: case 7: case 8:
+ x[i] += dpix_SiC;
+ break;
+ default:
+ break;
+ }
+ }
+
+ /* Write shifts to IDF file header */
+ FITS_update_key(header, TFLOAT, "FPADXLIF", &dpix_LiF, NULL, &status);
+ FITS_update_key(header, TFLOAT, "FPADXSIC", &dpix_SiC, NULL, &status);
+
+ /* Update processing flags. */
+ cf_proc_update(header, CF_PRGM_ID, "COMPLETE");
+
+ /* Enter a timestamp into the log. */
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+
+ return status;
+}
diff --git a/src/libcf/cf_fuv_init.c b/src/libcf/cf_fuv_init.c
new file mode 100644
index 0000000..a2bb181
--- /dev/null
+++ b/src/libcf/cf_fuv_init.c
@@ -0,0 +1,592 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_fuv_init(fitsfile *fptr)
+ *
+ * Description: cf_fuv_init performs the following functions:
+ * 1. Populates the data processing step keywords based upon
+ * the type of data (TTAG or HIST). The processing steps
+ * and the associated keywords are defined in the
+ * structure CALIBRATION_STEP_KEYS in calfuse.h.
+ * 2. Populates the orbital parameters in the header by
+ * calling read_tle. The orbital elements come from
+ * the file FUSE.TLE, which is in standard NORAD two-line
+ * element format.
+ * 3. Populates the calibration file keywords based on the
+ * time and date of observation, the detector segment,
+ * and the interpolation status of the calibration file.
+ * The relation between processing steps and associated
+ * calibration file keywords is defined in the structure
+ * CALIBRATION_FILE_KEYS in calfuse.h. The names and
+ * effective dates of the calibration files are found in
+ * the ASCII-format file master_calib_file.dat in the
+ * CF_PARMDIR directory.
+ *
+ * Input: fitsfile *fptr Pointer to input file
+ *
+ * History: 05/11/98 emm Begin work.
+ * 05/15/98 emm finished
+ * 06/04/98 emm Modified keywords to reflect updated
+ * calfuse design
+ * 11/12/98 emm Added ability to read orbital elements
+ * from file FUSE.TLE.
+ * 03/18/99 emm Added call to cf_cal_file. master_
+ * calib_file.dat must now be in the
+ * CF_CALDIR directory. (on 08/25/99
+ * this became CF_PARMDIR).
+ * 03/18/99 emm Edited header only.
+ * 04/14/99 peb Increased strings sizes to prevent
+ * character overflow.
+ * Implemented FITS wrapper functions.
+ * 05/19/99 peb Implemented cf_error_msg functions.
+ * 06/07/99 peb Added reporting of version number.
+ * 07/29/99 emm Added CF_VERS keyword update.
+ * 08/25/99 emm master_calib_file.dat now in CF_PARMDIR
+ * 12/06/99 v1.8 emm Removed cf_if_error call when master
+ * calib file keyword not found.
+ * 10/13/00 v1.9 jwk change CF_VER_NUM from "1.5"
+ * 08/23/01 v1.10 wvd Read PARM file; if requested, set
+ * BRST_COR, ASTG_COR, PHAX_COR,
+ * MKBK_COR, or BKGD_COR to "OMIT"
+ * 10/23/01 v1.11 hsu Check OPUS version
+ * 10/26/01 v1.12 wvd Install subroutine.
+ * 02/11/02 v1.13 wvd Check detector bias levels.
+ * 02/13/02 v1.14 wvd Modified bias logic; write warning
+ * to data header as COMMENT lines.
+ * 02/13/02 v1.15 wvd Don't crash if bias keywords missing.
+ * 02/19/02 v1.16 wvd Check whether voltage too high
+ * 02/20/02 v1.17 wvd If keyword RAWTIME does not exist,
+ * create with value of EXPTIME
+ * 10/30/02 1.18 peb Converted header to calfusettag.h
+ * 03/26/03 1.4 wvd Removed "Warning" from warnings.
+ * 04/16/03 v1.5 wvd Test for corrupted bias values.
+ * Update comment field for HV_FLAG.
+ * 04/28/03 v1.6 wvd Change logic of assigning cal files
+ * never to extrapolate forward in time.
+ * 07/23/03 v1.7 wvd Write HSKP_CAL to file header.
+ * 07/23/03 v1.8 wvd Change calfusettag.h to calfuse.h
+ * 09/09/03 v1.9 wvd Read SAA_SCR and LIMB_SCR from
+ * SCRN_CAL and set RUN_SAA and RUN_LIMB.
+ * 04/27/04 v1.10 wvd Keywords MKBK_COR and BKGD_COR are
+ * gone, so we don't populate them.
+ * 06/04/04 v1.11 wvd Allow for the possibility that the
+ * time associated with a calibration
+ * file exactly equals EXPSTART.
+ * 06/14/04 v1.12 wvd Check value of BRIT_OBJ keyword and
+ * modify header accordingly.
+ * Write CF_VERS to trailer file.
+ * 07/16/04 v1.13 wvd Must set ASTG_COR to PERFORM, as
+ * pipeline doesn't do it automatically.
+ * 11/26/04 v1.14 wvd Check whether SAA_SCR and LIMB_SCR
+ * are ON or OFF, not YES or NO.
+ * 12/02/04 v1.15 wvd Read value of RUN_JITR from PARM file.
+ * 03/24/05 v1.16 wvd Use HVGOODLM to determine whether
+ * detector voltage is low.
+ * 06/12/06 v1.17 wvd Call cf_verbose rather than
+ * cf_if_warning for non-optimal voltage.
+ * 07/18/08 v1.18 wvd For bright-earth and airglow exposures,
+ * change EXP_STAT to 2,
+ * change SRC_TYPE to EE, and
+ * write warning to file header.
+ *
+ ****************************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "calfuse.h"
+
+#define MAXCHARS 120
+#define MASTER_CAL_FILE "master_calib_file.dat"
+
+int cf_fuv_init(fitsfile *fptr)
+{
+ char CF_PRGM_ID[] = "cf_fuv_init";
+ char CF_VER_NUM[] = "1.18";
+
+ int i, status=0, expstat, interp_in, timeref;
+ int n, hv_flag, lowv, highv, saav, fullv;
+ char comment[FLEN_CARD], instmode[FLEN_CARD], detector[FLEN_CARD];
+ char opus_str[FLEN_CARD], keyword_in[FLEN_CARD], segment_in[FLEN_CARD];
+ char datestr[FLEN_CARD];
+ char filename_in[]=" ", rootname[FLEN_CARD];
+ char hkexists[FLEN_CARD];
+ char keyword_out1[FLEN_CARD], keyword_out2[FLEN_CARD];
+ char linin[MAXCHARS];
+ char run_limb[FLEN_VALUE], run_saa[FLEN_VALUE], src_type[FLEN_VALUE];
+ char run_brst[FLEN_VALUE], run_walk[FLEN_VALUE], run_astg[FLEN_VALUE];
+ /* char run_mkbk[FLEN_VALUE], run_bkgd[FLEN_VALUE], brit_obj[FLEN_VALUE]; */
+ char run_jitr[FLEN_VALUE], brit_obj[FLEN_VALUE];
+ char hv_str[FLEN_CARD], lv_str[FLEN_CARD], mjd_str[FLEN_CARD];
+ char saa_str[FLEN_CARD], full_str[FLEN_CARD];
+ float hvgood, mjdv, expstart, aftermjd_in;
+ fitsfile *parmfits, *scrnfits;
+
+ struct keyword_tab keytab[NUM_PROC_STEPS]=CALIBRATION_STEP_KEYS;
+ struct cal_file_tab calkey[NUMCALKEYS]=CALIBRATION_FILE_KEYS;
+ FILE *fpin;
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin initializing headers");
+
+ /* Check the OPUS version number */
+ fits_read_key(fptr, TSTRING, "OPUSVERS", opus_str, NULL, &status);
+ if (status) {
+ status = 0;
+ cf_add_header_keywords(fptr);
+ cf_verbose(2, "Data file generated by old version of OPUS.");
+ }
+ else if (atof(opus_str) < OPUS_VERSION) {
+ cf_add_header_keywords(fptr);
+ cf_verbose(2, "Data file generated by old version (%s) of OPUS.", opus_str);
+ }
+ FITS_update_key(fptr, TSTRING, "CF_VERS", CALFUSE_VERSION, NULL, &status);
+ cf_verbose (1, "This is CalFUSE v%s", CALFUSE_VERSION);
+
+ /*
+ * Populate data processing keywords based on observing mode found
+ * in the INSTMODE keyword. NOTE: We check only the first
+ * letter of the INSTMODE keyword.
+ */
+ FITS_read_key(fptr, TSTRING, "INSTMODE", instmode, NULL, &status);
+
+ switch (instmode[0]) {
+ case 'H':
+ /* Histogram mode */
+ for (i=0; i<NUM_PROC_STEPS; i++)
+ FITS_update_key(fptr, TSTRING, keytab[i].name,
+ keytab[i].hist_value, 0, &status);
+ break;
+ case 'T':
+ /* Time tag mode */
+ for (i=0; i<NUM_PROC_STEPS; i++)
+ FITS_update_key(fptr, TSTRING, keytab[i].name,
+ keytab[i].ttag_value, 0, &status);
+ break;
+ default:
+ /* Invalid mode */
+ cf_if_error("Invalid INSTMODE value");
+ FITS_update_key(fptr, TSTRING, "INIT_COR", "ERROR", 0, &status);
+ break;
+ } /* End switch (instmode[0]) */
+
+ /* Populate the orbital parameters from a file of two-line elements. */
+ read_tle(fptr);
+
+ /* Populate calibration file keywords based on the date of the
+ * observation and the segment/channel number. */
+
+ FITS_read_key(fptr, TFLOAT, "EXPSTART", &expstart, NULL, &status);
+ FITS_read_key(fptr, TSTRING, "DETECTOR", detector, NULL, &status);
+
+ /* Open the Master calibration database file. */
+
+ fpin = fopen(cf_parm_file(MASTER_CAL_FILE), "r");
+ if (fpin == NULL)
+ cf_if_error("Master calibration database file not found");
+
+ /* Cycle through the master cal file until we run out of lines. */
+
+ /* Here's how this section works. We need to keep track of 3 calibration
+ * files for each keyword: the cal file which immediately preceedes the
+ * date of observation, the cal file which immediately preceedes the cal
+ * file which immediately preceedes the observation, and the cal file
+ * immediately after the observation. These are stored in strut calkey
+ * in:
+ * calkey[i].filenames[0] => second cal file preceeding observation
+ * calkey[i].filenames[1] => cal file immediately preceeding observa-
+ * tion
+ * calkey[i].filenames[2] => cal file immediately after observation
+ *
+ * Here is the plan. Cycle through the master cal file, reading each
+ * line. Determine the keyword for each line, and use that to determine
+ * the appropriate index [i] for calkey. Then, if the detector segment
+ * is correct, determine where the new file fits into the structure above.
+ * If it is more recent than one or both of the preceeding cal files,
+ * but is older than the observation (expstart) replace either
+ * filenames[0] or filenames[1]. If filenames[1] is replaced, shift
+ * the old value down into filenames[0]. If the file is more recent
+ * than the observation, and closer to the observation than the file
+ * in filenames[2], replace filenames[2]. The values
+ * calkey[i].aftermjd[] and calkey[i].interp[] store the date and
+ * interpolation status of the best files. This organization allows
+ * the master calibration database file to be written in any order.
+ */
+
+ while (fgets(linin, MAXCHARS, fpin) != NULL) {
+ /* Check for comment lines */
+
+ if ((linin[0] != '#') && (linin[0] != '\n')) {
+ sscanf(linin, "%4c%*2c%2c%*2c%13c%*2c%9f%*2c%1d",keyword_in,
+ segment_in,filename_in,&aftermjd_in,&interp_in);
+ /*
+ * Determine which keyword we just read in.
+ */
+ i=0;
+ while ((strncmp(calkey[i].name,keyword_in,4) != 0) &&
+ (i < NUMCALKEYS)) i++;
+ if (i >= NUMCALKEYS) {
+ cf_if_warning("Keyword %s in %s is unknown", keyword_in, MASTER_CAL_FILE);
+ } else {
+ if ((strncmp(segment_in," ",2) == 0) ||
+ (strncmp(segment_in,detector,2) == 0)) {
+ if ((aftermjd_in <= expstart) &&
+ (aftermjd_in > calkey[i].aftermjd[0]) &&
+ (aftermjd_in > calkey[i].aftermjd[1])) {
+ strncpy(calkey[i].filenames[0],
+ calkey[i].filenames[1],18);
+ calkey[i].aftermjd[0]=calkey[i].aftermjd[1];
+ calkey[i].interp[0]=calkey[i].interp[1];
+ strncpy(calkey[i].filenames[1],
+ filename_in,18);
+ calkey[i].aftermjd[1]=aftermjd_in;
+ calkey[i].interp[1]=interp_in;
+ } else if ((aftermjd_in < expstart) &&
+ (aftermjd_in > calkey[i].aftermjd[0])) {
+ strncpy(calkey[i].filenames[0],
+ filename_in,18);
+ calkey[i].aftermjd[0]=aftermjd_in;
+ calkey[i].interp[0]=interp_in;
+ }
+ if ((aftermjd_in > expstart) &&
+ (aftermjd_in < calkey[i].aftermjd[2])) {
+ strncpy(calkey[i].filenames[2],
+ filename_in,18);
+ calkey[i].aftermjd[2]=aftermjd_in;
+ calkey[i].interp[2]=interp_in;
+ }
+ } /* Endif segment match */
+ } /* end else unrecognized keyword */
+ } /* end while linin not comment */
+ } /* end while(linin != NULL) */
+
+ fclose(fpin);
+
+/*************************************************************************
+ I have changed Rule 3 so that we NEVER extrapolate calibration
+ files forward in time. Instead, we just use the most recent file.
+ This reduces from 8 to 4 the number of possible cases, since we
+ no longer care about the value of interp[0].
+ This section and the previous one ought to be re-written,
+ but I will simply change 0 to 1 for Case 110 below.
+ WVD - 04/28/03
+*************************************************************************/
+
+ /* OK, now that we have identified the closest two files before
+ * the observation, and the file after the observation, we can
+ * decide what to do with them. First, the easy part: if
+ * calkey[i].numfiles=1, no interpolation is possible, so we
+ * write out calkey[i].filenames[1], which is the file immediately
+ * preceeding the observation. If calkey[i].numfiles=2, interpolation
+ * is possible, and we will have to write two keywords into the header.
+ * The decision as to which two keywords to write follows these rules:
+ * Rule 1: If an observation occurs between two files which can be
+ * interpolated, then an interpolation must be done.
+ * Rule 2: If the calibration file immediately preceeding an
+ * observation is to be used in a stepwise manner, then said
+ * file shall be used in stepwise manner.
+ * Rule 3: If the two calibration files immediately preceeding an
+ * observation can be interpolated, but the following file
+ * cannot, then the two previous files will be extrapolated
+ * forward in time.
+ * Rule 4: If the closest preceeding calibration file has an interpolation
+ * flag, but the file preceeding it has a stepwise flag, the the
+ * closest preceeding file will be used in a sterpwise manner.
+ * Rule 5: Never interpolate backward in time.
+ *
+ * In fact, there are only 8 possible cases:
+ *
+ * Remember, the files were sorted such that the observation
+ * always occurs between [1] and [2]. Also remember that
+ * interp[i]=0 => stepwise):
+ *
+ * Case Action
+ *
+ * interp[0] = 0
+ * interp[1] = 0 filenames[1] will be used in a stepwise manner
+ * interp[2] = 0
+ *
+ * interp[0] = 0
+ * interp[1] = 0 filenames[1] will be used in a stepwise manner
+ * interp[2] = 1
+ *
+ * interp[0] = 0
+ * interp[1] = 1 filenames[1] will be used in a stepwise manner
+ * interp[2] = 0
+ *
+ * interp[0] = 1
+ * interp[1] = 0 filenames[1] will be used in a stepwise manner
+ * interp[2] = 0
+ *
+ * interp[0] = 1
+ * interp[1] = 0 filenames[1] will be used in a stepwise manner
+ * interp[2] = 1
+ *
+ * interp[0] = 0
+ * interp[1] = 1 filenames[1] and filenames[2] will be interpolated
+ * interp[2] = 1
+ *
+ * interp[0] = 1
+ * interp[1] = 1 filenames[0] and filenames[1] will be extrapolated
+ * interp[2] = 0
+ *
+ * interp[0] = 1
+ * interp[1] = 1 filenames[1] and filenames[2] will be interpolated
+ * interp[2] = 1
+ *
+ */
+
+ /* Write the calibration files into the header keywords. */
+ /* Cycle through the keywords. */
+ for (i=0; i<NUMCALKEYS; i++) {
+ if (calkey[i].numfiles == 1) {
+ /* This is the easy case, no interpolation is possible. */
+
+ sprintf(keyword_out1,"%4.4s%1.1s%3.3s",calkey[i].name,"_",
+ calkey[i].extension);
+
+ FITS_update_key(fptr, TSTRING, keyword_out1,
+ calkey[i].filenames[1], 0, &status);
+ }
+ else {
+ /* OK, interpolation is possible, now decide which two files
+ * to write out. */
+
+ /* Create the two output keywords */
+ sprintf(keyword_out1,"%4.4s%1.1s%3.3s",calkey[i].name,"1",
+ calkey[i].extension);
+ sprintf(keyword_out2,"%4.4s%1.1s%3.3s",calkey[i].name,"2",
+ calkey[i].extension);
+
+ if (calkey[i].interp[1] == 0) {
+ /* Easy, preceeding file is a 0, so write filenames[1] to
+ * both keywords. Takes care of cases 000, 001, 100, 101.
+ */
+ FITS_update_key(fptr, TSTRING, keyword_out1,
+ calkey[i].filenames[1], 0, &status);
+ FITS_update_key(fptr, TSTRING, keyword_out2,
+ calkey[i].filenames[1], 0, &status);
+ }
+ else if ((calkey[i].interp[1] == 1) &&
+ (calkey[i].interp[2] == 1)) {
+ /* Case 011 and 111 */
+ FITS_update_key(fptr, TSTRING, keyword_out1,
+ calkey[i].filenames[1], 0, &status);
+ FITS_update_key(fptr, TSTRING, keyword_out2,
+ calkey[i].filenames[2], 0, &status);
+ } else if ((calkey[i].interp[0] == 1) &&
+ (calkey[i].interp[1] == 1) &&
+ (calkey[i].interp[2] == 0)){
+ /* Case 110 */
+ /* CHANGED 0 to 1 in the following line - wvd 04/28/03 */
+ FITS_update_key(fptr, TSTRING, keyword_out1,
+ calkey[i].filenames[1], 0, &status);
+ FITS_update_key(fptr, TSTRING, keyword_out2,
+ calkey[i].filenames[1], 0, &status);
+ }
+ else if ((calkey[i].interp[0] == 0) && (calkey[i].interp[1] == 1)
+ && (calkey[i].interp[2] == 0)){
+ /* Case 010 */
+ FITS_update_key(fptr, TSTRING, keyword_out1,
+ calkey[i].filenames[1], 0, &status);
+ FITS_update_key(fptr, TSTRING, keyword_out2,
+ calkey[i].filenames[1], 0, &status);
+ }
+ else
+ cf_if_error("The interpolation/stepwise logic has"
+ "failed. I am confused.");
+ } /* end else calkey.numfiles == 1 */
+ } /* end for i=0; i<NUMCALKEYS */
+
+ /*
+ * If housekeeping file exists,
+ * add HSKP_CAL and JITR_CAL filenames to the header.
+ */
+ FITS_read_key(fptr, TSTRING, "HKEXISTS", hkexists, NULL, &status);
+ if(!strncasecmp(hkexists, "Y", 1)) {
+ FITS_read_key(fptr, TSTRING, "ROOTNAME", rootname, NULL, &status);
+ sprintf(keyword_out1, "%s%s", rootname, "hskpf.fit");
+ FITS_update_key(fptr, TSTRING, "HSKP_CAL", keyword_out1, 0, &status);
+ sprintf(keyword_out2, "%s%s", rootname, "jitrf.fit");
+ FITS_update_key(fptr, TSTRING, "JITR_CAL", keyword_out2, 0, &status);
+ }
+ /*
+ * Check min and max voltage levels and set HV_FLAG accordingly.
+ */
+ sprintf(hv_str, "DET%cHV%cH", detector[0], detector[1]);
+ sprintf(lv_str, "DET%cHV%cL", detector[0], detector[1]);
+
+ fits_read_key(fptr, TINT, hv_str, &highv, NULL, &status);
+ if (status) {
+ status = 0;
+ hv_flag = -1;
+ sprintf(comment, "Detector bias keywords not found");
+ FITS_update_key(fptr, TINT, "HV_FLAG", &hv_flag, comment, &status);
+ cf_verbose(2, comment);
+ }
+ else {
+ FITS_read_key(fptr, TINT, lv_str, &lowv, NULL, &status);
+ FITS_read_key(fptr, TSTRING, "VOLT_CAL", filename_in, NULL, &status);
+ FITS_open_file(&parmfits, cf_cal_file(filename_in), READONLY, &status);
+ FITS_read_key(parmfits, TFLOAT, "HVGOODLM", &hvgood, NULL, &status);
+
+ n = 0;
+ do {
+ n++;
+ sprintf(mjd_str, "MJD%d", n);
+ FITS_read_key(parmfits, TFLOAT, mjd_str, &mjdv, NULL, &status);
+ } while (expstart > mjdv);
+ n--;
+
+ sprintf(saa_str, "SAA%d", n);
+ sprintf(full_str, "FULL%d", n);
+ FITS_read_key(parmfits, TINT, saa_str, &saav, NULL, &status);
+ FITS_read_key(parmfits, TINT, full_str, &fullv, NULL, &status);
+ FITS_close_file(parmfits, &status);
+
+ if (lowv > fullv + 3) {
+ hv_flag = 5;
+ sprintf(comment, "Detector voltage high throughout exposure");
+ }
+ else if ((float) lowv / fullv > hvgood) {
+ hv_flag = 4;
+ sprintf(comment, "Detector voltage full throughout exposure");
+ }
+ else if (lowv > saav + 3) {
+ hv_flag = 3;
+ sprintf(comment, "Detector voltage low throughout exposure");
+ }
+ else if (lowv > saav - 3) {
+ hv_flag = 2;
+ sprintf(comment, "Detector at SAA voltage throughout exposure");
+ }
+ else {
+ hv_flag = 1;
+ sprintf(comment, "Detector below SAA voltage throughout exposure");
+ }
+
+ if (highv - lowv > 3) {
+ hv_flag = 0;
+ sprintf (comment, "Detector voltage changed during exposure");
+ }
+ else if (lowv > highv) {
+ hv_flag = -1;
+ sprintf(comment, "Detector bias keywords are corrupted");
+ }
+
+ FITS_update_key(fptr, TINT, "HV_FLAG", &hv_flag, comment, &status);
+
+ if (hv_flag != 4) {
+ if (hv_flag == -1) cf_if_warning(comment);
+ else cf_verbose(1, comment);
+ FITS_write_comment(fptr, " ", &status);
+ FITS_write_comment(fptr, comment, &status);
+ fits_get_system_time(datestr, &timeref, &status);
+ sprintf(comment, "CalFUSE v%s %.10s", CALFUSE_VERSION, datestr);
+ FITS_write_comment(fptr, comment, &status);
+ FITS_write_comment(fptr, " ", &status);
+ }
+ }
+
+ /* Read BRIT_OBS keyword and modify header accordingly. */
+
+ FITS_read_key(fptr, TSTRING, "SRC_TYPE", src_type, NULL, &status);
+ FITS_read_key(fptr, TSTRING, "BRIT_OBJ", brit_obj, NULL, &status);
+ if (!strcmp(brit_obj, "DEFOCUS") && !strncmp(src_type, "P", 1)) {
+ *src_type = 'E';
+ FITS_update_key(fptr, TSTRING, "SRC_TYPE", src_type,
+ "DEFOCUS OBS ==> Treat as extended source", &status);
+ }
+
+ /* Flag bright-earth and airglow (M106, S100, and 900+) exposures. */
+
+ FITS_read_key(fptr, TSTRING, "ROOTNAME", rootname, NULL, &status);
+ if (!strncmp(rootname, "M106", 4) || !strncmp(rootname, "S100", 4)) {
+
+ cf_verbose(1, "Bright-earth exposure.");
+
+ /* Set EXP_STAT to TEMPORAL_LIMB. */
+ expstat = (int) TEMPORAL_LIMB;
+ FITS_update_key(fptr, TINT, "EXP_STAT", &expstat,
+ "Bright-earth exposure", &status);
+ }
+
+ if (!strncmp(rootname+8, "9", 1)) {
+
+ cf_verbose(1, "Airglow exposure. Will treat as extended source.");
+
+ /* Set EXP_STAT to TEMPORAL_LIMB. */
+ expstat = (int) TEMPORAL_LIMB;
+ FITS_update_key(fptr, TINT, "EXP_STAT", &expstat,
+ "Airglow exposure", &status);
+
+ /* Change SRC_TYPE to EE. */
+ (void) strcpy(src_type, "EE");
+ FITS_update_key(fptr, TSTRING, "SRC_TYPE", src_type,
+ "Airglow exposure ==> Treat as extended source", &status);
+
+ /* Write warning to trailer file and IDF header. */
+ FITS_write_comment(fptr, " ", &status);
+ sprintf(comment, "Airglow exposure. Not an astrophysical target.");
+ FITS_write_comment(fptr, comment, &status);
+ fits_get_system_time(datestr, &timeref, &status);
+ sprintf(comment, "CalFUSE v%s %.10s", CALFUSE_VERSION, datestr);
+ FITS_write_comment(fptr, comment, &status);
+ FITS_write_comment(fptr, " ", &status);
+ }
+
+ /* Read the SCRN file and see if user wants to skip any steps. */
+
+ FITS_read_key(fptr, TSTRING, "SCRN_CAL", filename_in, NULL, &status);
+ FITS_open_file(&scrnfits, cf_parm_file(filename_in), READONLY, &status);
+ FITS_read_key(scrnfits, TSTRING, "SAA_SCR", run_saa, NULL, &status);
+ FITS_read_key(scrnfits, TSTRING, "LIMB_SCR", run_limb, NULL, &status);
+ FITS_close_file(scrnfits, &status);
+
+ /* Now read the PARM file and see if user wants to skip any steps. */
+
+ FITS_read_key(fptr, TSTRING, "PARM_CAL", filename_in, NULL, &status);
+ FITS_open_file(&parmfits, cf_parm_file(filename_in), READONLY, &status);
+ FITS_read_key(parmfits, TSTRING, "RUN_BRST", run_brst, NULL, &status);
+ FITS_read_key(parmfits, TSTRING, "RUN_PHAX", run_walk, NULL, &status);
+ /* FITS_read_key(parmfits, TSTRING, "RUN_MKBK", run_mkbk, NULL, &status); */
+ /* FITS_read_key(parmfits, TSTRING, "RUN_BKGD", run_bkgd, NULL, &status); */
+ FITS_read_key(parmfits, TSTRING, "RUN_ASTG", run_astg, NULL, &status);
+ FITS_read_key(parmfits, TSTRING, "RUN_JITR", run_jitr, NULL, &status);
+ FITS_close_file(parmfits, &status);
+
+ if (!strncmp(run_limb, "OFF", 3) || !strncmp(run_limb, "off", 3))
+ FITS_update_key(fptr, TSTRING, "LIMB_COR", "OMIT", NULL, &status);
+
+ if (!strncmp(run_saa, "OFF", 3) || !strncmp(run_saa, "off", 3))
+ FITS_update_key(fptr, TSTRING, "SAA__COR", "OMIT", NULL, &status);
+
+ if (!strncmp(run_brst, "N", 1) || !strncmp(run_brst, "n", 1))
+ FITS_update_key(fptr, TSTRING, "BRST_COR", "OMIT", NULL, &status);
+
+ if (!strncmp(run_walk, "N", 1) || !strncmp(run_walk, "n", 1))
+ FITS_update_key(fptr, TSTRING, "PHAX_COR", "OMIT", NULL, &status);
+
+ /*
+ if (!strncmp(run_mkbk, "N", 1) || !strncmp(run_mkbk, "n", 1))
+ FITS_update_key(fptr, TSTRING, "MKBK_COR", "OMIT", NULL, &status);
+
+ if (!strncmp(run_bkgd, "N", 1) || !strncmp(run_bkgd, "n", 1))
+ FITS_update_key(fptr, TSTRING, "BKGD_COR", "OMIT", NULL, &status);
+ */
+
+ if (!strncmp(run_astg, "N", 1) || !strncmp(run_astg, "n", 1))
+ FITS_update_key(fptr, TSTRING, "ASTG_COR", "OMIT", NULL, &status);
+ else
+ FITS_update_key(fptr, TSTRING, "ASTG_COR", "PERFORM", NULL, &status);
+
+ if (!strncmp(run_jitr, "N", 1) || !strncmp(run_jitr, "n", 1))
+ FITS_update_key(fptr, TSTRING, "JITR_COR", "OMIT", NULL, &status);
+ else
+ FITS_update_key(fptr, TSTRING, "JITR_COR", "PERFORM", NULL, &status);
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done initializing headers");
+ return status;
+}
diff --git a/src/libcf/cf_geometric_distort.c b/src/libcf/cf_geometric_distort.c
new file mode 100644
index 0000000..1164b5c
--- /dev/null
+++ b/src/libcf/cf_geometric_distort.c
@@ -0,0 +1,145 @@
+/****************************************************************************
+ *
+ * Synopsis: cf_geometric_distort(fitsfile *header, long nevents,
+ * float *xfarf, float *yfarf,
+ * unsigned char *locflags)
+ *
+ * Description: Corrects the X and Y positions of the event for geometric
+ * distortion.
+ *
+ * Arguments: fitsfile *header Pointer to the location of the FITS
+ * header of the Intermediate Data File
+ * long nevents number of photons in the file
+ * float *xfarf X positions for each photon event
+ * float *yfarf Y positions for each photon event
+ * unsigned char *locflags Location flags for each event
+ *
+ * Calls : None
+ *
+ * Return: 0 on success
+ *
+ * History: 08/09/02 1.1 rdr Begin work
+ * 11/12/02 1.2 peb Added check to move only events in
+ * active region. Added locflags to
+ * function cal.
+ * 03/11/03 1.3 wvd Changed locflags to unsigned char.
+ * 05/20/03 1.4 rdr Added call to cf_proc_check
+ * 07/29/03 1.5 wvd If cf_proc_check fails, return errflg.
+ * 03/26/04 1.6 rdr Modify specbiny
+ * 04/05/04 1.7 wvd Modify specbiny only if specbiny > 1.
+ * 04/07/07 1.8 wvd Clean up compiler warnings.
+ *
+ ****************************************************************************/
+
+#include <string.h>
+#include <stdlib.h>
+#include "calfuse.h"
+
+int
+cf_geometric_distort(fitsfile *header, long nevents, float *xfarf,
+ float *yfarf, unsigned char *locflags)
+{
+ char CF_PRGM_ID[] = "cf_geometric_distort";
+ char CF_VER_NUM[] = "1.8";
+
+ char geomfile[FLEN_VALUE]={'\0'};
+ short *geomx_img, *geomy_img;
+ int errflg=0, status=0, hdutype, anynull, nullval;
+ int specbiny ;
+ long fpixel=1, j;
+ long xdim_gx, ydim_gx, xdim_gy, ydim_gy, npix_gx, npix_gy;
+ float scale_gx=1., zero_gx=0., scale_gy=1., zero_gy=0.;
+ float yexp ;
+ fitsfile *geomfits=NULL;
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ if ((errflg = cf_proc_check(header, CF_PRGM_ID))) return errflg;
+
+ /*
+ * Get the name of the calibration file and open it
+ */
+ FITS_read_key(header, TINT, "SPECBINY", &specbiny, NULL, &status);
+ cf_verbose(5,"Initial value of specbiny=%d",specbiny) ;
+ FITS_read_key(header, TSTRING, "GEOM_CAL", geomfile, NULL, &status);
+ cf_verbose(4, "Geometric correction file = %s", geomfile);
+ FITS_open_file(&geomfits, cf_cal_file(geomfile), READONLY, &status);
+
+ /* Read the y expansion factor from the calibration header */
+ FITS_movabs_hdu(geomfits, 1, &hdutype, &status);
+ FITS_read_key(geomfits, TFLOAT, "YEXPAND", &yexp, NULL, &status);
+ cf_verbose(3,"Y scale expansion factor = %f",yexp) ;
+
+ /* If SPECBINY > 1, scale by Y expansion factor */
+ if (specbiny > 1) {
+ specbiny = (int) (0.5 + (float) specbiny * yexp) ;
+ FITS_update_key(header, TINT, "SPECBINY", &specbiny, NULL, &status) ;
+ cf_verbose(5,"Corrected value of specbiny = %d",specbiny) ;
+ }
+
+ /*
+ * Read in the X distortion calibration image
+ */
+ FITS_movabs_hdu(geomfits, 2, &hdutype, &status);
+ FITS_read_key(geomfits, TLONG, "NAXIS1", &xdim_gx, NULL, &status);
+ FITS_read_key(geomfits, TLONG, "NAXIS2", &ydim_gx, NULL, &status);
+ npix_gx = xdim_gx * ydim_gx;
+
+ FITS_read_key(geomfits, TFLOAT, "BSCALE", &scale_gx, NULL, &status);
+ FITS_read_key(geomfits, TFLOAT, "BZERO", &zero_gx, NULL, &status);
+ geomx_img = (short *) cf_malloc(sizeof(short) * npix_gx);
+ fits_set_bscale(geomfits, 1., 0., &status);
+ FITS_read_img(geomfits, TSHORT, fpixel, npix_gx, &nullval, geomx_img,
+ &anynull, &status);
+ /*
+ * Read the Y distortion calibration image
+ */
+ FITS_movabs_hdu(geomfits, 3, &hdutype, &status);
+ FITS_read_key(geomfits, TLONG, "NAXIS1", &xdim_gy, NULL, &status);
+ FITS_read_key(geomfits, TLONG, "NAXIS2", &ydim_gy, NULL, &status);
+ npix_gy = xdim_gy * ydim_gy;
+
+ FITS_read_key(geomfits, TFLOAT, "BSCALE", &scale_gy, NULL, &status);
+ FITS_read_key(geomfits, TFLOAT, "BZERO", &zero_gy, NULL, &status);
+ geomy_img = (short *) cf_malloc(sizeof(short) * npix_gy);
+ fits_set_bscale(geomfits, 1., 0., &status);
+ FITS_read_img(geomfits, TSHORT, fpixel, npix_gy, &nullval, geomy_img,
+ &anynull, &status);
+ FITS_close_file(geomfits, &status);
+ /*
+ * Make sure that the X and Y distortion images are the same size
+ */
+ if (xdim_gx != xdim_gy || ydim_gx != ydim_gy)
+ cf_if_warning("X and Y distortion images not the same size.");
+ /*
+ * Use the data in the geometric distortion calibration images to
+ * correct XFARF and YFARF
+ */
+ for (j=0; j<nevents; j++) {
+ /*
+ * Move only events in active region.
+ */
+ if (!(locflags[j] & LOCATION_SHLD)) {
+ int xndx = (int) xfarf[j], yndx = (int) yfarf[j], ndx;
+ /*
+ * Check that the y indices are within bounds
+ */
+ if (yndx < 0)
+ yndx = 0;
+ else if (yndx > ydim_gy-1)
+ yndx = ydim_gy-1;
+
+ ndx = yndx*xdim_gx + xndx;
+ xfarf[j] += geomx_img[ndx]*scale_gx + zero_gx;
+ yfarf[j] += geomy_img[ndx]*scale_gy + zero_gy;
+ }
+ }
+ free(geomx_img);
+ free(geomy_img);
+
+ cf_proc_update(header, CF_PRGM_ID, "COMPLETE");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done Processing");
+
+ return 0;
+}
diff --git a/src/libcf/cf_grating_motion.c b/src/libcf/cf_grating_motion.c
new file mode 100644
index 0000000..fe50d63
--- /dev/null
+++ b/src/libcf/cf_grating_motion.c
@@ -0,0 +1,432 @@
+/****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_grating_motion(header, nevents, time, x, y, channel,
+ * ntimes, ttime, tsunrise)
+ *
+ * Description: Reads spectral shift caused by thermal grating motions
+ * and corrects the X and Y locations of each photon event.
+ *
+ * fitsfile *header Pointer to the FITS header of the
+ * Intermediate Data File
+ * long nevents Number of photons in the file
+ * int *time Time (in seconds) since exposure start
+ * float *x Position of the photon (in pixels)
+ * float *y Position of the photon (in pixels)
+ * unsigned char channel Channel ID of each photon
+ * long ntimes Number of entries in timeline table
+ * float ttime Time array of timeline table
+ * short tsunrise Time since last sunrise
+ *
+ * Returns: 0 on success
+ *
+ * History: 09/05/02 1.0 RDR Begin work; adapted from cf_make_shift
+ * 04/21/03 1.3 wvd Use tsunrise array from timeline table.
+ * Do not assume that ttime is continuous.
+ * 05/20/03 1.4 rdr Added call to cf_proc_check
+ * 08/21/03 1.5 wvd Change channel to unsigned char.
+ * 06/25/04 1.6 wvd Estimate time between sunrises using
+ * orbit period in file header.
+ * 03/22/05 1.7 wvd Change tsunrise from float to short.
+ * Read orbital period from file header.
+ * 04/15/05 1.8 wvd Close GRAT_CAL file before exiting.
+ * If ORBPERID keyword is not found,
+ * assume that orbit period is 6000 s.
+ * 12/30/05 1.9 wvd Current algorithm corrects for orbital
+ * drift of spectrum, but wavelength zero
+ * point still varies with beta angle and
+ * observation date. New subroutine
+ * corrects LiF 1 data for these effects.
+ * 07/06/06 2.0 wvd Rewrite to use Dave Sahnow's new
+ * grating-correction file (version 003).
+ * 07/12/06 2.1 wvd Modify to read an arbitrary number of
+ * extensions, each with phase information
+ * in file header keywords.
+ * 10/20/06 2.2 wvd Grating motion also depends on APER_PA.
+ * Now we read it from the file header
+ * and select appropriate coefficients.
+ * If no correction is defined for a
+ * particular set of parameters, set
+ * 11/28/06 2.3 wvd Grating motion includes a long-term,
+ * non-periodic drift. Read it from the
+ * first four extensions of GRAT_CAL file.
+ * 04/07/07 2.4 wvd Clean up compiler warnings.
+ *
+ ****************************************************************************/
+
+#include <math.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "calfuse.h"
+
+static int
+read_nonperiodic_shifts(fitsfile *header, fitsfile *shiftfits,
+ long ntimes, float *dxlif, float *dylif, float *dxsic, float *dysic)
+{
+ char channel[FLEN_VALUE], comment[FLEN_CARD], detector[FLEN_VALUE];
+ int nrows, tndx;
+ int status=0, hdutype=0, hdunum=0;
+ long i;
+ float *mjd, *xshift, *yshift;
+ double expstart;
+
+ /* Read header keywords from data file. */
+ fits_read_key(header, TDOUBLE, "EXPSTART", &expstart, NULL, &status);
+ FITS_read_key(header, TSTRING, "DETECTOR", detector, NULL, &status);
+
+ /* First do the LiF channels */
+ if (!strncmp(detector,"1",1)) {
+ hdunum=2;
+ } else if (!strncmp(detector,"2",1)) {
+ hdunum=4;
+ } else {
+ cf_if_error("Cannot parse DETECTOR keyword in data file.");
+ }
+ cf_verbose(3, "Reading HDU %d of GRAT_CAL file.", hdunum);
+
+ FITS_movabs_hdu(shiftfits, hdunum, &hdutype, &status);
+ FITS_read_key(shiftfits, TSTRING, "CHANNEL", channel, NULL, &status);
+ sprintf(comment, "LiF%c", detector[0]);
+ if (strncmp(channel, comment, 4))
+ cf_if_error("Cannot find %s correction info in extension %d",
+ comment, hdunum);
+
+ /* Read X and Y corrections as a function of time. */
+ nrows = cf_read_col(shiftfits, TFLOAT, "MJD", (void *) &mjd);
+ nrows = cf_read_col(shiftfits, TFLOAT, "XSHIFT", (void *) &xshift);
+ nrows = cf_read_col(shiftfits, TFLOAT, "YSHIFT", (void *) &yshift);
+
+ /* Select appropriate MJD for this exposure. */
+ i = 0;
+ while (expstart > mjd[i] && i < nrows) i++;
+ tndx = i-1;
+ if (tndx < 0) tndx = 0;
+ cf_verbose(3,"EXPSTART = %g", expstart);
+ cf_verbose(3,"Using LiF corrections for MJD >= %g", mjd[tndx]);
+ if (tndx < nrows-1)
+ cf_verbose(3," and MJD < %g", mjd[tndx+1]);
+ cf_verbose(3,"xshift = %f, yshift = %f", xshift[tndx], yshift[tndx]);
+
+ /* Copy X and Y corrections to output arrays. */
+ for (i = 0; i < ntimes; i++) {
+ dxlif[i] = xshift[tndx];
+ dylif[i] = yshift[tndx];
+ }
+
+ /* Now do the SiC channels */
+ hdunum += 1;
+ cf_verbose(3, "Reading HDU %d of GRAT_CAL file.", hdunum);
+ FITS_movabs_hdu(shiftfits, hdunum, &hdutype, &status);
+ FITS_read_key(shiftfits, TSTRING, "CHANNEL", channel, NULL, &status);
+ sprintf(comment, "SiC%c", detector[0]);
+ if (strncmp(channel, comment, 4))
+ cf_if_error("Cannot find %s correction info in extension %d",
+ comment, hdunum);
+
+ /* Read X and Y corrections as a function of time. */
+ nrows = cf_read_col(shiftfits, TFLOAT, "MJD", (void *) &mjd);
+ nrows = cf_read_col(shiftfits, TFLOAT, "XSHIFT", (void *) &xshift);
+ nrows = cf_read_col(shiftfits, TFLOAT, "YSHIFT", (void *) &yshift);
+
+ /* Select appropriate MJD for this exposure. */
+ i = 0;
+ while (expstart > mjd[i] && i < nrows) i++;
+ tndx = i-1;
+ if (tndx < 0) tndx = 0;
+ cf_verbose(3,"Using SiC corrections for MJD >= %g", mjd[tndx]);
+ if (tndx < nrows-1)
+ cf_verbose(3," and MJD < %g", mjd[tndx+1]);
+ cf_verbose(3,"xshift = %f, yshift = %f", xshift[tndx], yshift[tndx]);
+
+ /* Copy X and Y corrections to output arrays. */
+ for (i = 0; i < ntimes; i++) {
+ dxsic[i] = xshift[tndx];
+ dysic[i] = yshift[tndx];
+ }
+
+ return 0;
+}
+
+
+static int
+read_periodic_shifts(fitsfile *header, fitsfile *shiftfits, int ncorrection,
+ double *lif_mjd0, double *lif_period, double *sic_mjd0, double *sic_period,
+ double *lif_x_coef, double *lif_y_coef, double *sic_x_coef, double *sic_y_coef)
+{
+ char detector[FLEN_CARD], channel[FLEN_CARD], comment[FLEN_CARD];
+ int status=0, hdutype=0, hdunum=0, anynul=0;
+ int i, nregions, region, typecode;
+ long max_coeff, ncoeff, width;
+ float aper_pa, *aperpalo, *aperpahi;
+ float *betalo, *betahi, *polelo, *polehi;
+ double beta, pole, sunang;
+
+ /* Initialize variables. */
+ *lif_mjd0 = *lif_period = *sic_mjd0 = *sic_period = 0.;
+ for (i = 0; i < 11; i++) {
+ lif_x_coef[i] = 0.;
+ lif_y_coef[i] = 0.;
+ sic_x_coef[i] = 0.;
+ sic_y_coef[i] = 0.;
+ }
+
+ FITS_read_key(header, TFLOAT, "APER_PA", &aper_pa, NULL, &status);
+ FITS_read_key(header, TDOUBLE, "SUNANGLE", &sunang, NULL, &status);
+ FITS_read_key(header, TDOUBLE, "POLEANGL", &pole, NULL, &status);
+ FITS_read_key(header, TSTRING, "DETECTOR", detector, NULL, &status);
+ while (999.9 > aper_pa && aper_pa > 360.) aper_pa -= 360.;
+ while (aper_pa < 0.) aper_pa += 360.;
+ beta = 180.0 - sunang;
+
+ cf_verbose(3, "S/C orientation: beta = %5.1f, pole = %5.1f, aper_pa = %5.1f",
+ beta, pole, aper_pa);
+
+ /* First do the LiF channels */
+ if (!strncmp(detector,"1",1)) {
+ hdunum=2;
+ } else if (!strncmp(detector,"2",1)) {
+ hdunum=4;
+ } else {
+ cf_if_error("Cannot parse DETECTOR keyword in read_shift_file");
+ }
+ hdunum += ncorrection * 4;
+ cf_verbose(3, "Reading HDU %d of GRAT_CAL file.", hdunum);
+
+ FITS_movabs_hdu(shiftfits, hdunum, &hdutype, &status);
+ FITS_read_key(shiftfits, TSTRING, "CHANNEL", channel, NULL, &status);
+ sprintf(comment, "LiF%c", detector[0]);
+ if (strncmp(channel, comment, 4))
+ cf_if_error("Cannot find %s correction info in extension %d",
+ comment, hdunum);
+
+ if (ncorrection > 1) {
+ FITS_read_key(shiftfits, TDOUBLE, "PERIOD", lif_period, NULL, &status);
+ FITS_read_key(shiftfits, TDOUBLE, "MJD_ZERO", lif_mjd0, NULL, &status);
+ cf_verbose(3, "%s: period = %g, mjd_zero = %g",
+ channel, *lif_period, *lif_mjd0);
+ }
+
+ nregions = cf_read_col(shiftfits, TFLOAT, "BETALO", (void *) &betalo);
+ nregions = cf_read_col(shiftfits, TFLOAT, "BETAHI", (void *) &betahi);
+ nregions = cf_read_col(shiftfits, TFLOAT, "POLELO", (void *) &polelo);
+ nregions = cf_read_col(shiftfits, TFLOAT, "POLEHI", (void *) &polehi);
+ nregions = cf_read_col(shiftfits, TFLOAT, "APERPALO", (void *) &aperpalo);
+ nregions = cf_read_col(shiftfits, TFLOAT, "APERPAHI", (void *) &aperpahi);
+ FITS_get_coltype(shiftfits, 7, &typecode, &ncoeff, &width, &status);
+ max_coeff = ncoeff;
+
+ for (i = 0; i < nregions; i++)
+ if (betalo[i] <= beta && beta < betahi[i] &&
+ polelo[i] <= pole && pole < polehi[i] &&
+ aperpalo[i] <= aper_pa && aper_pa < aperpahi[i]) break;
+
+ if (i == nregions)
+ cf_verbose(3, "LiF correction not defined for beta = %g, pole = %g, "
+ "aper_pa = %g", beta, pole, aper_pa);
+ else {
+ cf_verbose(3, "LIF REGION %2d: beta = %g - %g, pole = %g - %g,",
+ i, betalo[i], betahi[i], polelo[i], polehi[i]);
+ cf_verbose(3, " aper_pa = %g - %g, %d coefficients",
+ aperpalo[i], aperpahi[i], ncoeff);
+
+ region = i+1; /* CFITSIO counts from 1, not 0. */
+ FITS_read_col(shiftfits, TDOUBLE, 7, region, 1, ncoeff, NULL, lif_x_coef,
+ &anynul, &status);
+ FITS_read_col(shiftfits, TDOUBLE, 8, region, 1, ncoeff, NULL, lif_y_coef,
+ &anynul, &status);
+ }
+
+ /* Now the SiC channels */
+ hdunum += 1;
+ cf_verbose(3, "Reading HDU %d of GRAT_CAL file.", hdunum);
+ FITS_movabs_hdu(shiftfits, hdunum, &hdutype, &status);
+ FITS_read_key(shiftfits, TSTRING, "CHANNEL", channel, NULL, &status);
+ sprintf(comment, "SiC%c", detector[0]);
+ if (strncmp(channel, comment, 4))
+ cf_if_error("Cannot find %s correction info in extension %d",
+ comment, hdunum);
+
+ if (ncorrection > 1) {
+ FITS_read_key(shiftfits, TDOUBLE, "PERIOD", sic_period, NULL, &status);
+ FITS_read_key(shiftfits, TDOUBLE, "MJD_ZERO", sic_mjd0, NULL, &status);
+ cf_verbose(3, "%s: period = %g, mjd_zero = %g",
+ channel, *sic_period, *sic_mjd0);
+ }
+
+ nregions = cf_read_col(shiftfits, TFLOAT, "BETALO", (void *) &betalo);
+ nregions = cf_read_col(shiftfits, TFLOAT, "BETAHI", (void *) &betahi);
+ nregions = cf_read_col(shiftfits, TFLOAT, "POLELO", (void *) &polelo);
+ nregions = cf_read_col(shiftfits, TFLOAT, "POLEHI", (void *) &polehi);
+ nregions = cf_read_col(shiftfits, TFLOAT, "APERPALO", (void *) &aperpalo);
+ nregions = cf_read_col(shiftfits, TFLOAT, "APERPAHI", (void *) &aperpahi);
+ FITS_get_coltype(shiftfits, 7, &typecode, &ncoeff, &width, &status);
+ if (max_coeff < ncoeff) max_coeff = ncoeff;
+
+ for (i = 0; i < nregions; i++)
+ if (betalo[i] <= beta && beta < betahi[i] &&
+ polelo[i] <= pole && pole < polehi[i] &&
+ aperpalo[i] <= aper_pa && aper_pa < aperpahi[i]) break;
+
+ if (i == nregions)
+ cf_verbose(3, "SiC correction not defined for beta = %g, pole = %g, "
+ "aper_pa = %g", beta, pole, aper_pa);
+ else {
+ cf_verbose(3, "SIC REGION %2d: beta = %g - %g, pole = %g - %g,",
+ i, betalo[i], betahi[i], polelo[i], polehi[i]);
+ cf_verbose(3, " aper_pa = %g - %g, %d coefficients",
+ aperpalo[i], aperpahi[i], ncoeff);
+
+ region = i+1; /* CFITSIO counts from 1, not 0. */
+ FITS_read_col(shiftfits, TDOUBLE, 7, region, 1, ncoeff, NULL, sic_x_coef,
+ &anynul, &status);
+ FITS_read_col(shiftfits, TDOUBLE, 8, region, 1, ncoeff, NULL, sic_y_coef,
+ &anynul, &status);
+ }
+
+ cf_verbose(2, "Fourier coefficients of grating-motion correction:");
+ cf_verbose(2," LiF X LiF Y SiC X SiC Y");
+ for (i=0; i<max_coeff; i++) {
+ cf_verbose(2, "%10.5f %10.5f %10.5f %10.5f",lif_x_coef[i],
+ lif_y_coef[i], sic_x_coef[i], sic_y_coef[i]);
+ }
+
+ return 0;
+}
+
+
+static double
+thermal_shift(double theta, double *a)
+{
+ theta *= 2.0 * PI;
+ return (a[0]+
+ a[1]*sin(1.0*theta)+a[2]*cos(1.0*theta)+
+ a[3]*sin(2.0*theta)+a[4]*cos(2.0*theta)+
+ a[5]*sin(3.0*theta)+a[6]*cos(3.0*theta)+
+ a[7]*sin(4.0*theta)+a[8]*cos(4.0*theta)+
+ a[9]*sin(5.0*theta)+a[10]*cos(5.0*theta));
+}
+
+
+int
+cf_grating_motion(fitsfile *header, long nevents, float *time, float *x,
+ float *y, unsigned char *channel, long ntimes, float *ttime,
+ short *tsunrise)
+{
+ char CF_PRGM_ID[] = "cf_grating_motion";
+ char CF_VER_NUM[] = "2.4";
+
+ char shift_file[FLEN_CARD];
+ int errflg=0, status=0;
+ int calfvers, num_hdus, ncorrections;
+ long i, j, k;
+ float *dxlif, *dylif, *dxsic, *dysic, period;
+ double lif_mjd0, lif_period, sic_mjd0, sic_period;
+ double expstart, phase, lif_phase, sic_phase;
+ double lif_x_coef[11], lif_y_coef[11], sic_x_coef[11], sic_y_coef[11];
+ fitsfile *shiftfits;
+
+ /* Initialize error checking. */
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+ /* Enter a time stamp into the log */
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ /* Check whether routine is appropriate for this data file. */
+ if ((errflg = cf_proc_check(header, CF_PRGM_ID))) return errflg;
+
+ /* Read exposure start time from IDF header. */
+ fits_read_key(header, TDOUBLE, "EXPSTART", &expstart, NULL, &status);
+
+ /* Read orbital period from IDF header. If not found, estimate. */
+ fits_read_key(header, TFLOAT, "ORBPERID", &period, NULL, &status);
+ if (status) {
+ status = 0;
+ period = 6000;
+ cf_verbose(1, "Keyword ORBPERID not found; assuming 6000 seconds.");
+ }
+ else
+ cf_verbose(2, "Estimated orbital period is %d seconds", cf_nint(period));
+
+ /* Allocate space for shift arrays. */
+ dxlif = (float *) cf_calloc(ntimes, sizeof(float));
+ dylif = (float *) cf_calloc(ntimes, sizeof(float));
+ dxsic = (float *) cf_calloc(ntimes, sizeof(float));
+ dysic = (float *) cf_calloc(ntimes, sizeof(float));
+
+ /* Open the GRAT_CAL file, check version number, and count extensions. */
+ FITS_read_key(header, TSTRING, "GRAT_CAL", shift_file, NULL, &status);
+ FITS_open_file(&shiftfits, cf_cal_file(shift_file), READONLY, &status);
+ FITS_get_num_hdus(shiftfits, &num_hdus, &status);
+ cf_verbose(3, "GRAT_CAL file %s contains %d HDUs.", shift_file, num_hdus);
+ ncorrections = num_hdus / 4;
+
+ /* Exit if the CALFVERS keyword is less than 4. */
+ FITS_read_key(shiftfits, TINT, "CALFVERS", &calfvers, NULL, &status);
+ if (calfvers < 4)
+ cf_if_error("Grating-calibration file format is out of date.");
+
+ /* First correct for the long-term, non-periodic grating motions. */
+ read_nonperiodic_shifts(header, shiftfits, ntimes, dxlif, dylif, dxsic, dysic);
+
+ /* Next correct for periodic motions. */
+ for (i = 1; i < ncorrections; i++) {
+
+ /* Read the calibration file. If there's no correction for this spacecraft
+ orientation, the coefficients will be set to zero. */
+ read_periodic_shifts(header, shiftfits, i, &lif_mjd0, &lif_period, &sic_mjd0,
+ &sic_period, lif_x_coef, lif_y_coef, sic_x_coef, sic_y_coef);
+
+ /* For orbital motions, the period is just the orbit period. */
+ if (i == 1) {
+ for (k=0; k<ntimes; k++) {
+ phase = tsunrise[k]/period;
+ dxlif[k] += thermal_shift(phase, lif_x_coef);
+ dylif[k] += thermal_shift(phase, lif_y_coef);
+ dxsic[k] += thermal_shift(phase, sic_x_coef);
+ dysic[k] += thermal_shift(phase, sic_y_coef);
+ }
+ }
+ /* For longer-term motions, read the period and zero point from the file header. */
+ else {
+ for (k=0; k<ntimes; k++) {
+ lif_phase = ((expstart - lif_mjd0) + ttime[k]/(24.*3600.))/lif_period;
+ sic_phase = ((expstart - sic_mjd0) + ttime[k]/(24.*3600.))/sic_period;
+ dxlif[k] += thermal_shift(lif_phase, lif_x_coef);
+ dylif[k] += thermal_shift(lif_phase, lif_y_coef);
+ dxsic[k] += thermal_shift(sic_phase, sic_x_coef);
+ dysic[k] += thermal_shift(sic_phase, sic_y_coef);
+ }
+ }
+ }
+
+ /* Close the GRAT_CAL file. */
+ FITS_close_file(shiftfits, &status);
+
+ /* Apply grating-motion correction. */
+ for (j=k=0; j<nevents; j++) {
+ while(ttime[k+1] - FRAME_TOLERANCE < time[j] && k+1 < ntimes) k++;
+ if (channel[j] > 0 && channel[j] < 4) {
+ x[j] += dxlif[k];
+ y[j] += dylif[k];
+ }
+ else if (channel[j] > 4) {
+ x[j] += dxsic[k];
+ y[j] += dysic[k];
+ }
+ }
+
+ /* Release memory. */
+ free(dxlif);
+ free(dylif);
+ free(dxsic);
+ free(dysic);
+
+ cf_proc_update(header, CF_PRGM_ID, "COMPLETE");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished execution.");
+
+ return status;
+}
diff --git a/src/libcf/cf_header_io.c b/src/libcf/cf_header_io.c
new file mode 100644
index 0000000..d534ac2
--- /dev/null
+++ b/src/libcf/cf_header_io.c
@@ -0,0 +1,110 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_copy_to_memory(*infile, **memp);
+ *
+ * Description: Returns an in-memory FITS file pointer
+ *
+ *
+ * Arguments: char *infile Input data file name
+ * fitsfile **memp In memory FITS file pointer
+ *
+ * Returns: None
+ *
+ * History: 08/15/2002 1.0 jch Initial coding
+ * 12/18/03 bjg Change calfusettag.h to calfuse.h
+ *
+ ****************************************************************************/
+
+
+#include <string.h>
+#include <stdio.h>
+#include "calfitsio.h"
+#include "calfuse.h"
+
+void
+cf_read_header(char *infile, fitsfile **memp)
+{
+ fitsfile *ip; /* input file pointer */
+ int status=0; /* status used in CFITSIO */
+
+ /* open the input file */
+ FITS_open_file(&ip, infile, READONLY, &status);
+
+ /* create the temp file in memory */
+ FITS_create_file(memp, "mem://", &status);
+
+ /* copy the input primary HDU to the temp file */
+ FITS_copy_hdu(ip, *memp, 0, &status);
+
+ /* close the input file */
+ FITS_close_file(ip, &status);
+}
+
+
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_copy_to_file(*memp, *outfile);
+ *
+ * Description: Copy the header in the in-memory FITS file to an output FITS
+ * file's primary HDU.
+ *
+ *
+ * Arguments: fitsfile *memp In memory FITS file pointer
+ * char *outfile Output data file name
+ *
+ * Returns: None
+ *
+ * History: 08/15/2002 jch 1.0 Initial coding
+ *
+ ****************************************************************************/
+
+void
+cf_write_header(fitsfile *memp, char *outfile)
+{
+ fitsfile *op; /* output file pointer */
+ int status=0; /* status used in CFITSIO */
+
+ int ncards_memp, ncards_op, morekeys=0;
+ char card[FLEN_CARD];
+
+ /* Open the output FITS file. */
+ FITS_open_file(&op, outfile, READWRITE, &status);
+
+ fits_get_hdrspace(memp, &ncards_memp, &morekeys, &status);
+ fits_get_hdrspace(op, &ncards_op, &morekeys, &status);
+
+ /* overwrite output file's primary HDU card by card */
+ if (ncards_op >= ncards_memp) {
+ int i;
+ for (i=1; i<=ncards_memp; i++) {
+ FITS_read_record(memp, i, card, &status);
+ FITS_modify_record(op, i, card, &status);
+ }
+ /* delete from the bottom */
+ for (i=ncards_op; i>=ncards_memp+1; i--) {
+ FITS_delete_record(op, i, &status);
+ }
+ }
+ else {
+ int i;
+ for (i=1; i<=ncards_op; i++) {
+ FITS_read_record(memp, i, card, &status);
+ FITS_modify_record(op, i, card, &status);
+ }
+ for (i=ncards_op+1; i<=ncards_memp; i++) {
+ FITS_read_record(memp, i, card, &status);
+ FITS_write_record(op, card, &status);
+ }
+ }
+
+ /* close output file. */
+ FITS_close_file(op, &status);
+}
diff --git a/src/libcf/cf_identify_channel.c b/src/libcf/cf_identify_channel.c
new file mode 100644
index 0000000..7d6a8e3
--- /dev/null
+++ b/src/libcf/cf_identify_channel.c
@@ -0,0 +1,201 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_identify_channel(fitsfile *header, long nevents,
+ * float *xfarf, float *yfarf, unsigned char *chan,
+ * unsigned char *locflags, int pad, int final_call)
+ *
+ * Description: Assigns an aperture to each photon in the IDF.
+ *
+ * Change of logic in v1.11: This routine may be called
+ * multiple times. All photons are examined and assigned to
+ * a channel unless final_call = TRUE. On the final call, only
+ * photons with channel > 0 are considered. Because only photons
+ * assigned to a channel are motion corrected, the spectrum can
+ * move on top of previously-rejected photons. We don't want
+ * to include them in the final spectrum, so leave their channel
+ * values unchanged.
+ *
+ * Change of logic in v1.16: We've decided to use extended-
+ * source apertures for the non-target channels. These
+ * apertures can overlap, so we assign disputed photons to
+ * their most likely source. In decreasing order, these are
+ * the target aperture, the larger non-target aperture, and
+ * the smaller non-target aperture.
+ *
+ * Arguments: fitsfile *header Pointer to the location of the FITS
+ * header of the Intermediate Data File
+ * long nevents Number of photons in the file
+ * float *xfarf X positions for each photon event
+ * float *yfarf Y positions for each photon event
+ * unsigned char *chan Pointer to pointer to the array
+ * containing the channel information
+ * unsigned char *locflags Location flags for each photon
+ * int pad Switch saying whether to expand the
+ * width of the tabulated extraction
+ * window (yes if > 0). The number refers
+ * to the amount of padding (e.g. pad=5
+ * will add 5 pixels to each side of the
+ * extraction window.
+ * int final_call This subroutine may be called
+ * many times. The last time, set
+ * final_call = TRUE.
+ *
+ * Return: 0 on success
+ *
+ * History: 08/09/02 1.0 RDR Begin work
+ * 09/04/02 1.1 rdr Change program so that it just fills
+ * the channel array rather than creating
+ * and filling it. Decreased the size of
+ * the mask. Use the value of pad to
+ * specify degree of window padding.
+ * Check for extended source.
+ * 12/11/02 1.2 RDR Adjust aperture limits by measured
+ * y centroid (if available)
+ * 02/11/03 1.3 rdr changed test for ycent values
+ * 02/12/03 1.6 wvd Don't crash if YCENT# is undefined
+ * 03/25/03 1.7 rdr Ignore pinhole aperture
+ * 03/31/03 1.10 wvd Ignore regions where YMAX = YMIN + 1.
+ * They are not valid channel regions.
+ * 04/07/03 1.11 wvd Shift channel boundaries to match FPA
+ * positions. Implement use of cf_verbose.
+ * Update CHID_COR if final_call = TRUE.
+ * 05/20/03 1.12 rdr Added call to cf_proc_check
+ * 07/23/03 1.14 rdr Correct procedure which reads CHID
+ * calibration file
+ * 08/21/03 1.15 wvd Change channel to unsigned char.
+ * 08/25/03 1.16 wvd Use extended windows for non-target
+ * apertures. Replace aperture mask
+ * with a grid of aperture limits.
+ * Use cf_nint() to round floats.
+ * 08/25/03 1.17 wvd Change coltype from string to int
+ * in cf_read_col.
+ * 09/08/03 1.18 wvd Default value is channel[i] = 0.
+ * Identify low and high values of x
+ * by setting y limits to -NYMAX.
+ * 09/18/03 1.19 wvd Consider only photons falling on the
+ * active area of the detector.
+ * 11/12/03 1.20 wvd Don't bother with non-target channels
+ * in HIST mode.
+ * 06/14/04 1.21 wvd Don't bother shifting extraction
+ * windows to correct for FPA position.
+ * If known, shift is not needed.
+ * 06/17/04 1.22 wvd Because the extraction windows don't
+ * quite match the WGTS arrays, we pad
+ * windows by XPAD pixels in X.
+ * 07/21/04 1.23 wvd Change i from long to int.
+ * 03/15/05 1.24 wvd Call cf_extraction_limits to get limits
+ * of extraction windows, rather than
+ * reading CHID_CAL file directly.
+ * Do not pad windows in X.
+ * 03/16/05 1.25 wvd Pass srctype to cf_extraction_limits.
+ *
+ ****************************************************************************/
+
+#include <string.h>
+#include "calfuse.h"
+
+int
+cf_identify_channel(fitsfile* header, long npts, float* x, float* y,
+ unsigned char* channel, unsigned char* locflags, int pad,
+ int final_call)
+{
+ char CF_PRGM_ID[] = "cf_identify_channel";
+ char CF_VER_NUM[] = "1.25";
+
+ char instmode[FLEN_VALUE], zero=0;
+ int errflg=0, extended, n_chan=6, status=0;
+ int active_ap[2], chan, srctype[8];
+ int i; /* Always steps through targ_ap */
+ int *targ_ap,
+ lwrs[]={3,7,2,6,1,5}, /* LWRS, MDRS, HIRS (LiF & SiC) */
+ mdrs[]={2,6,3,7,1,5}, /* MDRS, LWRS, HIRS (LiF & SiC) */
+ hirs[]={1,5,3,7,2,6}; /* HIRS, LWRS, MDRS (LiF & SiC) */
+ long j, /* Always steps through extraction window arrays */
+ k; /* Always steps through photon list */
+ short xint, yint, xmin, xmax, *ymin[6], *ymax[6];
+
+ /* Initialize error checking */
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+ /* Enter a time stamp into the log */
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ /* Check whether routine is appropriate for this data file. */
+ if ((errflg = cf_proc_check(header, CF_PRGM_ID))) return errflg;
+
+ /* If data were taken in HIST mode, ignore non-target channels. */
+ FITS_read_key(header, TSTRING, "INSTMODE", instmode, NULL, &status);
+ if (!strncmp(instmode, "HIST", 4)) n_chan = 2;
+
+ /* Determine source type and active apertures */
+ extended = cf_source_aper(header, active_ap);
+
+ /* Set the order in which we will assign photons to channels. */
+ switch (active_ap[0]) {
+ case 1: targ_ap = hirs;
+ break;
+ case 2: targ_ap = mdrs;
+ break;
+ default: targ_ap = lwrs;
+ break;
+ }
+
+ /* For target apertures, srctype reflects target.
+ Use extended apertures for the rest. */
+ for (i = 0; i < 2; i++) srctype[i] = extended;
+ for ( ; i < n_chan; i++) srctype[i] = 1;
+
+ /* While we're at it, here's one more bit of i/o. */
+ if (pad > 0)
+ cf_verbose(3, "Padding extraction windows by %d Y pixels", pad);
+
+ /*
+ * Loop through all channels, read extraction limits,
+ * and apply any requested padding.
+ */
+ for (i = 0; i < n_chan; i++) {
+ chan = targ_ap[i];
+
+ /* Read the extraction limits for this aperture. */
+ (void) cf_extraction_limits(header, chan, srctype[i],
+ (ymin+i), (ymax+i), &xmin, &xmax);
+
+ /* Add any padding requested by the user. */
+ if (pad > 0) {
+ for (j = xmin; j <= xmax; j++) {
+ ymin[i][j] -= pad;
+ ymax[i][j] += pad;
+ }
+ }
+ }
+
+ /* Loop through photon list. Assign a channel ID to each. */
+ cf_verbose(3, "Entering loop to assign channel ID's.");
+ for (k = 0; k < npts; k++) {
+ if (final_call && channel[k] == zero) continue;
+ channel[k] = zero;
+ if (!(locflags[k] & LOCATION_SHLD)) {
+ xint = (short) cf_nint(x[k]);
+ yint = (short) cf_nint(y[k]);
+ if (xint < xmin || xint > xmax) continue;
+ for (i = 0; i < n_chan; i++) {
+ if (yint >= ymin[i][xint] && yint <= ymax[i][xint]) {
+ channel[k] = (char) targ_ap[i];
+ break;
+ }
+ }
+ }
+ }
+
+ /* If final_call = TRUE, update IDF header keyword for this subroutine. */
+ if (final_call)
+ cf_proc_update(header, CF_PRGM_ID, "COMPLETE");
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done Processing");
+
+ return status;
+}
diff --git a/src/libcf/cf_idf_io.c b/src/libcf/cf_idf_io.c
new file mode 100644
index 0000000..8d8d43a
--- /dev/null
+++ b/src/libcf/cf_idf_io.c
@@ -0,0 +1,161 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: npts = cf_read_col(fitsfile, coltype, colname, colval)
+ *
+ * Description: Procedure to read the values from a column in a FUSE
+ * Intermediate Data File (IDF).
+ * Because floating-point data may be stored as shorts,
+ * must convert data to type expected by calling routine.
+ *
+ * Variables: fitsfile *fileptr Pointer to the input file
+ * int coltype Data type of the column
+ * (TBYTE, TDOUBLE, TSHORT, or TFLOAT)
+ * char *colname Name of the column to re read
+ * (e.g. TIME or XFARF)
+ * void **colval Address of the array containing
+ * the data (must be cast to void)
+ *
+ * Return: long npts Number of points in the array
+ *
+ * Example:
+ * fitsfile *infits ;
+ * long npts ;
+ * float *xfarf ;
+ *
+ * FITS_open_file(&infits, argv[1], READWRITE, &status);
+ * npts = cf_read_col(infits, TFLOAT, "XFARF", (void **) &xfarf);
+ *
+ * History: 08/08/02 rdr Begin work
+ * 06/11/03 wvd v1.4 Pass coltype from calling routine.
+ * 08/25/03 wvd v1.5 Change coltype from string to int.
+ * 08/28/03 wvd v1.6 Use CASEINSEN in calls to
+ * fits_get_colnum
+ * 12/18/03 bjg v1.7 Change calfusettag.h to calfuse.h
+ * 04/28/05 wvd v1.8 Allow arrays to be read as doubles.
+ * 08/24/07 wvd v1.9 Read nrows as type TLONG.
+ *
+ *************************************************************************/
+
+#include <string.h>
+#include "calfuse.h"
+
+long
+cf_read_col(fitsfile *infits, int coltype, char *colname, void **colval)
+{
+ int colnum, tcode, intnull=0, anynull, status=0;
+ long nrows, width, repeat, nentries;
+
+ /* Get the column number of the column to be extracted. */
+ FITS_get_colnum(infits, CASEINSEN, colname, &colnum, &status);
+
+ /* Determine the properties of the column. */
+ fits_get_coltype(infits, colnum, &tcode, &repeat, &width, &status);
+
+ /* Read the number of rows in the table. */
+ FITS_read_key(infits, TLONG, "NAXIS2", &nrows, NULL, &status);
+
+ /* Calculate the number of entries in the table. */
+ nentries = nrows * repeat;
+
+ /* Set tcode and width to values expected by calling routine. */
+ if (coltype == TFLOAT) {
+ tcode = TFLOAT;
+ width = (long) sizeof (float);
+ }
+ if (coltype == TDOUBLE) {
+ tcode = TDOUBLE;
+ width = (long) sizeof (double);
+ }
+
+ /* Allocate space for the file. */
+ *colval = (void *) cf_malloc(nentries * width);
+
+ /* Read the data from the file. */
+ FITS_read_col(infits, tcode, colnum, 1, 1, nentries, &intnull, *colval,
+ &anynull, &status);
+
+ return nentries;
+}
+
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_write_col(fitsfile, colname, colval, npts)
+ *
+ * Description: Procedure to write an array into a specified column of a
+ * FUSE Intermediate Data File (IDF).
+ * Because floating-point data may be stored as shorts,
+ * data type of array may not match that of output file header.
+ *
+ * Variables: fitsfile *fileptr Pointer to the input file
+ * int coltype Data type of the column
+ * (TBYTE, TDOUBLE, TSHORT, or TFLOAT)
+ * char *colname Name of the column to re read
+ * (e.g. TIME or XFARF)
+ * void **colval Address of the array containing
+ * the data (must be cast to void)
+ * long npts Number of points in the array
+ *
+ * Reture: status
+ *
+ * Example:
+ * fitsfile *infits ;
+ * long npts=100 ;
+ * float *xfarf ;
+ *
+ * FITS_open_file(&infits, argv[1], READWRITE, &status);
+ * npts = cf_read_col(infits, TFLOAT, "XFARF", (void **) &xfarf);
+ *
+ * History: 08/08/02 rdr Begin work
+ * 06/11/03 wvd v1.4 Pass coltype from calling routine.
+ * Check for overflow in X arrays.
+ * 08/25/03 wvd v1.5 Change coltype from string to int.
+ * 08/28/03 wvd v1.6 Use CASEINSEN in calls to
+ * fits_get_colnum
+ *
+ *************************************************************************/
+
+int
+cf_write_col(fitsfile *infits, int coltype, char *colname, void *colval,
+ long npts)
+{
+ int colnum, tcode, status=0;
+ long i, width, nevents;
+
+ /* Get the column number of the column to be written. */
+ FITS_get_colnum(infits, CASEINSEN, colname, &colnum, &status);
+
+ /* Determine the properties of the column. */
+ fits_get_coltype(infits, colnum, &tcode, &nevents, &width, &status);
+
+ /*
+ * If the calling routine and the IDF differ on the data type of this
+ * array, use the data type from the calling routine.
+ */
+ if (coltype == TFLOAT) {
+ tcode = TFLOAT;
+ width = (long) sizeof (float);
+ }
+
+ /* Check for overflow in X arrays. */
+ if (!strncmp(colname, "X", 1)) {
+ float *x;
+ x = (float *) colval;
+ for (i = 0; i < nevents; i++) {
+ if (x[i] < 0) x[i] = 0.;
+ if (x[i] > NXMAX - 1) x[i] = NXMAX - 1;
+ }
+ }
+
+ /* Write the data to the relevant column. */
+ FITS_write_col(infits, tcode, colnum, 1, 1, npts, colval, &status);
+
+ return status;
+}
diff --git a/src/libcf/cf_ids_dead_time.c b/src/libcf/cf_ids_dead_time.c
new file mode 100644
index 0000000..656222e
--- /dev/null
+++ b/src/libcf/cf_ids_dead_time.c
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_ids_dead_time(fitsfile *header, long nseconds,
+ * float *aic_rate, float *ids_dtc)
+ *
+ * Description: Computes the weighting factor needed to correct
+ * for the IDS dead time.
+ *
+ * Arguments: fitsfile *header Pointer to FITS file containing the
+ * header of the intermediate data file
+ * long nseconds The number of timeline values
+ * float *aic_rate An array of Active Image Counter
+ * values
+ * float *ids_dtc Dead-time correction array (returned)
+ *
+ * Calls:
+ *
+ * Return: 0 on success
+ *
+ * History: 10/27/02 1.1 peb Begin work
+ * 11/11/02 1.2 peb Correct function description and add
+ * cf_timestamp after IDS__COR check.
+ * 12/09/02 1.4 wvd Calculate DT correction for each time
+ * step, then apply to photons.
+ * Set keyword IDS_DEAD.
+ * 05/20/03 1.5 rdr Add proc_check call.
+ * 08/01/03 1.8 wvd Just calculate correction; don't
+ * apply it. Return ids_dtc array.
+ * 08/04/03 1.9 wvd Convert aic_rate to type short.
+ * 11/26/03 1.10 wvd Convert aic_rate to type float.
+ * 02/09/04 1.11 wvd max_ids_rate depends on instrument
+ * mode. For TTAG data, include time
+ * stamps in aic_rate.
+ * 04/07/07 1.12 wvd Clean up compiler warnings.
+ *
+ ****************************************************************************/
+
+#include <string.h>
+#include "calfuse.h"
+
+int
+cf_ids_dead_time(fitsfile *header, long nseconds, float *aic_rate,
+ float *ids_dtc)
+{
+ char CF_PRGM_ID[] = "cf_ids_dead_time";
+ char CF_VER_NUM[] = "1.12";
+
+ char elecfile[FLEN_VALUE], instmode[FLEN_VALUE];
+ int errflg=0, status=0;
+ long k;
+ float ids_rate, tstamps, ttperiod;
+ float mean_ids_dtc = 0.;
+ float max_ids_rate = 1.;
+ fitsfile *elecfits;
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+ if ((errflg = cf_proc_check(header, CF_PRGM_ID))) return errflg;
+ /*
+ * Read observing mode and interval between time stamps.
+ */
+ FITS_read_key(header, TSTRING, "INSTMODE", instmode, NULL, &status);
+ FITS_read_key(header, TFLOAT, "TTPERIOD", &ttperiod, NULL, &status);
+ /*
+ * Compute number of time stamps per second (0 for HIST data).
+ */
+ if (!strncmp(instmode, "TTAG", 4)) /* TTAG MODE */
+ if (ttperiod > 1e-8) tstamps = 1./ttperiod;
+ else tstamps = 1.;
+ else /* HIST MODE */
+ tstamps = 0.;
+ /*
+ * Maximum IDS rate depends on instrument mode.
+ */
+ FITS_read_key(header, TSTRING, "ELEC_CAL", elecfile, NULL, &status);
+ FITS_open_file(&elecfits, cf_cal_file(elecfile), READONLY, &status);
+ if (!strncmp(instmode, "TTAG", 4))
+ FITS_read_key(elecfits, TFLOAT, "TTAG_BUS", &max_ids_rate, NULL, &status);
+ else
+ FITS_read_key(elecfits, TFLOAT, "HIST_BUS", &max_ids_rate, NULL, &status);
+ FITS_close_file(elecfits, &status);
+ cf_verbose(4, "max_ids_rate = %f", max_ids_rate);
+ /*
+ * Calculate the IDS dead-time correction.
+ */
+ for (k=0; k<nseconds; k++) {
+ ids_rate = aic_rate[k] + tstamps;
+
+ if (ids_rate > max_ids_rate)
+ ids_dtc[k] = ids_rate/max_ids_rate;
+ else
+ ids_dtc[k] = 1.0;
+ mean_ids_dtc += ids_dtc[k];
+ }
+ /*
+ * Write mean IDS dead-time correction to file header.
+ */
+ mean_ids_dtc /= nseconds;
+ cf_verbose(2, "Mean IDS dead-time correction: %f", mean_ids_dtc);
+ FITS_update_key(header, TFLOAT, "IDS_DEAD", &mean_ids_dtc, NULL, &status);
+
+ cf_proc_update(header, CF_PRGM_ID, "COMPLETE");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+ return 0;
+}
diff --git a/src/libcf/cf_init_support.c b/src/libcf/cf_init_support.c
new file mode 100644
index 0000000..68db0f6
--- /dev/null
+++ b/src/libcf/cf_init_support.c
@@ -0,0 +1,1344 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Description: Routines used by cf_ttag_init and cf_hist_init.
+ *
+ * History: 07/15/03 v1.1 wvd Move routines from cf_ttag_init
+ * 07/24/03 1.2 wvd If tsunrise and tsunset get huge,
+ * store them as floats, not integers.
+ * 07/30/03 1.5 wvd Omit TZERO and TSCALE for these
+ * timeline table entries:
+ * HIGH_VOLTAGE
+ * LIF_CNT_RATE
+ * SIC_CNT_RATE
+ * FEC_CNT_RATE
+ * AIC_CNT_RATE
+ * BKGD_CNT_RATE
+ * This will effectively convert them
+ * to arrays of shorts.
+ * Add 0.5 to all count rates in
+ * anticipation of truncation.
+ * 08/22/03 1.7 wvd Populate MIN_LIMB keyword.
+ * 09/03/03 1.8 wvd Implement cf_verbose throughout.
+ * Add EXP_JITR and EXPNIGHT to IDF header.
+ * 09/22/03 1.9 wvd Correct comment field for YCENT1
+ * 10/02/03 1.10 wvd Modify timeline table:
+ * - no time gaps
+ * - set TEMPORAL_OPUS for times outside
+ * of OPUS good-time intervals.
+ * Delete cf_get_times.
+ * Use cf_read_col in cf_get_gti
+ * and cf_get_geocorona.
+ * Don't modify gtis[0] for HIST data.
+ * 10/13/03 1.11 wvd Add 1s to end of timeline table for
+ * TTAG data.
+ * 10/15/03 1.12 wvd Swap voltages for detectors 2A and 2B
+ * if housekeeping file was written
+ * before April of 2003.
+ * 10/22/03 1.13 wvd Compute EXPNIGHT for raw data file
+ * and write to output file header.
+ * Add YQUALLIF & YQUALSIC keywords.
+ * 11/25/03 1.14 wvd Raise upper limits on LIF_CNT_RATE and
+ * SIC_CNT_RATE to 32000. Raise limits
+ * on FEC_CNT_RATE and AIC_CNT_RATE
+ * to 64000. Use TZERO = 32768 for
+ * FEC_CNT_RATE and AIC_CNT_RATE.
+ * They must be read as floats.
+ * 01/15/04 1.15 bjg Now performs cnt0 -= 16777216 when
+ * cnt0 < cnt before computing
+ * cnt_rate for the first cnt and
+ * cnt0 in function
+ * fill_cntrate_array
+ * cf_timeline 1.6 -> 1.7
+ * free the arrays only at the end
+ * version 1.6 tries to read tflag
+ * array after it has been freed
+ * 02/06/04 1.16 wvd Modify fill_cntrate_array() so
+ * that the output array no longer runs
+ * 16 seconds behind the HSKP data.
+ * 02/18/04 1.17 wvd Voltages for detectors 2A and 2B
+ * are still swapped. Set HKERR_ENDS
+ * to 20100000.
+ * 03/04/04 1.18 bjg Read begin and end counters as float
+ * Set countrate to zero when cntb is more
+ * than 16777216.
+ * 03/19/04 bjg FITS data types (TFLOAT, TSTRING, TBYTE)
+ * now match type of C containers (float,
+ * char *, char) when reading and writing
+ * in FITS header.
+ * 04/06/04 1.19 bjg Include ctype.h
+ * Functions now return EXIT_SUCCESS
+ * Remove unused variables
+ * Remove static keyword in struct key
+ * definition
+ * If cnt_rate>32000 set cnt_rate=0
+ * 05/07/04 1.20 wvd Delete HKERR_ENDS. If HSKPVERS keyword
+ * is not present in HSKP file, test to
+ * determine whether high-voltage arrays
+ * for 2A and 2B are swapped.
+ * 05/27/04 1.21 bjg Test counter keywords. If bad, use
+ * cnt_rate=NEVENTS/exptime or 0
+ * 06/14/04 1.22 wvd Add BRIT_OBJ keyword to header.
+ * Rewrite fill_hv_array() to make it more
+ * robust.
+ * If HV values in header are good, use
+ * them to determine whether HV
+ * arrays for 2A and 2B are swapped.
+ * 10/17/04 bjg Replaced lots of
+ * "while (val<array[i] && i<nmax)"
+ * with
+ * "while (i<nmax && val<array[i])"
+ * 11/09/04 1.23 bjg Fixed Timeline AIC countrate.
+ * Sum of AIC countrates
+ * for all 4 detectors
+ * 02/09/05 1.24 wvd Use count rates, rather than counts,
+ * when testing header keywords.
+ * 02/15/05 1.25 wvd If the count-rate arrays get too big,
+ * truncate and issue a warning.
+ * 02/28/05 1.26 wvd Fix bug in AIC count-rate test.
+ * Lower AIC and FEC thresholds to
+ * 0.8 * NEVENTS/EXPTIME.
+ * If GTI values span more than 25 ks,
+ * make timeline table entries only for
+ * times in the GTI's.
+ * Set OPUS flag for timeline-table
+ * entries whose values exceed 25 ks.
+ * Rewrite fill_hv_array() to make it more
+ * robust.
+ * Set overflow count-rate values to zero.
+ * Treat HV as array of shorts throughout.
+ * 03/03/05 1.27 wvd Raise exposure-length limit to 55 ksec.
+ * 03/14/05 1.28 wvd Modify gtis[0] only if TTPERIOD = 1.0
+ * 03/17/05 1.29 wvd Issue a warning if bigtime = TRUE.
+ * 03/21/05 1.30 wvd If there's a break in the timeline
+ * array, recalculate times of sunrise
+ * and sunset. Delete bigtime and the
+ * mechanism for storing tsunrise and
+ * tsunset as floats. Define lastsunrise
+ * and lastsunset relative to ptime[0],
+ * rather than mjd_start. Write time
+ * between sunsets to header in ORBPERID.
+ * 08/30/05 1.31 wvd Allow for the possibility that some of
+ * the photons have absurd arrival times
+ * AND others are not included in the
+ * OPUS good-time intervals.
+ * 08/31/05 1.32 wvd In cf_set_background_limits, use LWRS
+ * limits for RFPT observations.
+ * 11/03/05 1.33 wvd When housekeeping file is missing and
+ * engineering snapshot times are
+ * corrupted, use EXPSTART and EXPEND
+ * to estimate eng_time. If EXPEND
+ * is corrupted, use EXPTIME.
+ * 04/09/06 1.34 wvd Flag as bad times after final OPUS GTI.
+ * 08/21/06 1.35 wvd Treat housekeeping time array as double.
+ * Don't add 0.5 to arrays in subroutine
+ * fill_cntrate_array.
+ * 12/29/06 1.36 wvd Correct bug in construction of AIC
+ * count-rate array.
+ * 02/13/07 1.37 wvd If TTPERIOD = 0, set to 1.
+ * 03/07/07 1.38 wvd Remove pos from call to space_vel.
+ * 03/23/07 1.39 wvd Give more detailed error message if
+ * housekeeping file is not usable.
+ * 04/07/07 1.40 wvd Clean up compiler warnings.
+ * 05/18/07 1.41 wvd If HV array in HSKP file consists of a
+ * single 0 followed by all -1's, use
+ * header info to populate timeline table.
+ * Rename fill_hv_array to hv_from_hskp
+ * and add hv_from_header.
+ *
+ ****************************************************************************/
+
+#include <unistd.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include <ctype.h>
+#include "calfuse.h"
+#include "sgp4.h"
+
+
+struct key {
+ char keyword[FLEN_KEYWORD];
+ float value;
+ };
+
+
+/***********************************************************************
+ *
+ * procedure to get the GTI values from the input file
+ *
+ **********************************************************************/
+
+int cf_get_gti(fitsfile *infits, double **gtis, double **gtie) {
+
+ char instmode[FLEN_VALUE];
+ int ngti, status=0;
+ float ttperiod;
+
+ cf_verbose(3, "Entering cf_get_gti.");
+
+ /* Read header keywords. */
+ FITS_movabs_hdu(infits, 1, NULL, &status);
+ FITS_read_key(infits, TSTRING, "INSTMODE", instmode, NULL, &status);
+ FITS_read_key(infits, TFLOAT, "TTPERIOD", &ttperiod, NULL, &status);
+ if (ttperiod < 1E-6) ttperiod = 1.0;
+
+ /* Move to the second extension and read the GTI's */
+ FITS_movabs_hdu(infits, 3, NULL, &status);
+ ngti = cf_read_col(infits, TDOUBLE, "START", (void **) gtis);
+ ngti = cf_read_col(infits, TDOUBLE, "STOP", (void **) gtie);
+
+ /*
+ * If gtis[0] = 0.000, then it is probably wrong.
+ * Set it equal to the fractional part of gtie[0].
+ * In HIST mode, gtis[0] is always 0., so don't change it.
+ * This trick only works if TTPERIOD = 1.0.
+ */
+ if (**gtis < FRAME_TOLERANCE && !strncmp(instmode, "TTAG", 4)
+ && fabs(ttperiod - 1.0) < FRAME_TOLERANCE)
+ **gtis = fmod(*gtie[0], 1.);
+
+ cf_verbose(3, "Exiting cf_get_gti.");
+ return ngti;
+}
+
+/***********************************************************************
+ *
+ * procedure to get a list of geocoronal line locations from the AIRG
+ * calibration file
+ *
+ ***********************************************************************/
+
+int
+cf_get_geocorona(fitsfile *outfits, short **gxmin, short **gxmax,
+ short **gymin, short **gymax)
+{
+ char airgfile[FLEN_VALUE];
+ int nrow, status=0;
+ fitsfile *airgfits;
+
+ cf_verbose(3, "Entering cf_get_geocorona.");
+
+ /* Read the name of the AIRG calibration file to use and open it */
+ FITS_movabs_hdu(outfits, 1, NULL, &status);
+ FITS_read_key(outfits, TSTRING, "AIRG_CAL", airgfile, NULL, &status);
+ FITS_open_file(&airgfits, cf_cal_file(airgfile), READONLY, &status);
+ cf_verbose(3, "AIRG_CAL = %s", airgfile);
+
+ /*
+ * Move to the first extension and read the positions of the
+ * geocoronal lines.
+ */
+ FITS_movabs_hdu(airgfits, 2, NULL, &status);
+ nrow = cf_read_col(airgfits, TSHORT, "XMIN", (void **) gxmin);
+ nrow = cf_read_col(airgfits, TSHORT, "XMAX", (void **) gxmax);
+ nrow = cf_read_col(airgfits, TSHORT, "YMIN", (void **) gymin);
+ nrow = cf_read_col(airgfits, TSHORT, "YMAX", (void **) gymax);
+
+ FITS_close_file(airgfits, &status);
+ cf_verbose(3, "Exiting cf_get_geocorona.");
+ return nrow;
+}
+
+
+/***********************************************************************
+ *
+ * Procedures to compute times of most recent sunrise and sunset
+ *
+ ***********************************************************************/
+
+SGP4 set_orbit_parms(fitsfile *);
+
+static double
+sunrise(double mjd_start, SGP4 sgp4)
+{
+ double ang_sep, mjd, ptime, pos[3], vel[3];
+ int i, dn_flag, dn_flag_last;
+
+ dn_flag_last = 1; /* Assume that we begin in night. */
+
+ for (i=1; i>-8000; i--) {
+ ptime = (double) i;
+ mjd = mjd_start + ptime/86400.0;
+
+ /* Get the state vector at time mjd */
+ SGP4_getStateVector(sgp4, mjd, pos, vel);
+ SGP4_precess(pos, mjd, MJD2000);
+
+ dn_flag = eclipse(pos, mjd, &ang_sep); /* 0=day, 1=night */
+
+ /* We're going backward in time, so sunrise is day into night. */
+ if ((dn_flag == 1) && (dn_flag_last == 0)) break;
+
+ dn_flag_last=dn_flag;
+ }
+ /* Historically, we've defined sunrise as the time increment after
+ the change, so add 1 to the number we've just calculated. */
+ return (ptime + 1.);
+}
+
+
+static double
+sunset(double mjd_start, SGP4 sgp4)
+{
+ double ang_sep, mjd, ptime, pos[3], vel[3];
+ int i, dn_flag, dn_flag_last;
+
+ dn_flag_last = 0; /* Assume that we begin in day. */
+
+ for (i=1; i>-8000; i--) {
+ ptime = (double) i;
+ mjd = mjd_start + ptime/86400.0;
+
+ /* Get the state vector at time mjd */
+ SGP4_getStateVector(sgp4, mjd, pos, vel);
+ SGP4_precess(pos, mjd, MJD2000);
+
+ dn_flag = eclipse(pos, mjd, &ang_sep); /* 0=day, 1=night */
+
+ /* We're going backward in time, so sunset is night into day. */
+ if ((dn_flag == 0) && (dn_flag_last == 1)) break;
+
+ dn_flag_last = dn_flag;
+ }
+ /* Historically, we've defined sunset as the time increment after
+ the change, so add 1 to the number we've just calculated. */
+ return (ptime + 1.);
+}
+
+/****************************************************************************/
+
+static void
+fill_cntrate_array(long nsam_hk, long *hk_colval, double *time_hk,
+ long ntime, double *ttime, float *tarray)
+{
+ /*
+ * Procedure to fill an array with count rate housekeeping (HK)
+ * information, which is tabulated on an approx 16s time interval.
+ *
+ * nsam_hk = number of time samples in the housekeeping file
+ * hk_colval = array containing the housekeeping data
+ * time_hk = time from the exposure start for each second in the
+ * houskeeping file
+ * ntime = number of tabulated rows in the timeline array
+ * ttime = tabulated times in the timeline array
+ * tarray = timeline array to be filled, one sample per second
+ * starting at the start of the exposure
+ */
+
+ double hk_time, hk_time0;
+ long hk_cnt, hk_cnt0;
+ long i; /* index through timeline table */
+ long k; /* index through housekeeping array */
+ float cnt_rate = 0.;
+
+ i = k = 0; /* Initialize indices */
+
+ /*
+ * Find the first non-negative value in the HK array
+ */
+ while(k < nsam_hk && hk_colval[k] < 0) k++;
+ hk_cnt0 = hk_colval[k];
+ hk_time0 = time_hk[k];
+
+ /*
+ * Begin big loop through the timeline table
+ */
+ while (i < ntime) {
+
+ /* Find the next non-negative value in the HK array. */
+ k++;
+ while(k < nsam_hk && hk_colval[k] < 0) k++;
+
+ /* If we've run out of HK entries,
+ fill in the rest of the timeline and quit. */
+ if (k == nsam_hk) {
+ for ( ; i < ntime; i++)
+ tarray[i] = cnt_rate;
+ break;
+ }
+
+ /* Otherwise, calculate the count rate between
+ times hk_time0 and hk_time. */
+ hk_cnt = hk_colval[k];
+ hk_time = time_hk[k];
+ if (hk_cnt < hk_cnt0)
+ hk_cnt0 -= 16777216;
+ cnt_rate = (hk_cnt - hk_cnt0) / (hk_time - hk_time0);
+
+ /* Populate the timeline table for times less than hk_time */
+ while (i < ntime && cf_nlong(ttime[i]) < hk_time)
+ tarray[i++] = cnt_rate;
+
+ /* Save latest HK time and count values. */
+ hk_cnt0 = hk_cnt;
+ hk_time0 = hk_time;
+ }
+}
+
+
+/****************************************************************************/
+
+static void
+hv_from_header(fitsfile *outfits, char *det, char *side, long ntime, short *hv)
+{
+
+ char hv_key[FLEN_CARD];
+ int det_hv, hv_flag, status=0;
+ long i;
+
+ fits_read_key(outfits, TINT, "HV_FLAG", &hv_flag, NULL, &status);
+ if (hv_flag == -1) {
+ det_hv = -999;
+ cf_verbose(1, "Bad HV keywords: setting HV to -999 in timeline table.");
+ }
+ else {
+ sprintf(hv_key, "DET%.1sHV%.1sH", det, side);
+ FITS_read_key(outfits, TINT, hv_key, &det_hv, NULL, &status);
+ }
+ if (hv_flag == 0)
+ cf_verbose(1, "Applying max voltage value to whole exposure.");
+
+ cf_verbose(2, "High voltage = %d", det_hv);
+ for (i=0; i<ntime; i++)
+ hv[i] = det_hv;
+}
+
+
+/****************************************************************************/
+
+int
+hv_from_hskp(long nsam_hk, long *hk_colval, double *time_hk,
+ long ntime, double *ttime, short *tarray)
+{
+ /*
+ * Procedure to fill an array with high voltage housekeeping (HK)
+ * information, which is tabulated on an approx 16s time interval.
+ *
+ * nsam_hk = number of time samples in the housekeeping file
+ * hk_colval = array containing the housekeeping data
+ * time_hk = time from the exposure start for each second in the
+ * housekeeping file
+ * ntime = number of tabulated rows in the timeline array
+ * ttime = tabulated times in the timeline array
+ * tarray = timeline array to be filled, one sample per second
+ * starting at the start of the exposure
+ */
+
+ long i; /* index through timeline table */
+ long k; /* index through housekeeping array */
+ short hv = 0;
+
+ i = k = 0; /* Initialize indices */
+
+ /*
+ * Scan the input HK array. If it consists of a zero followed by
+ * all -1's, exit with an error.
+ */
+
+ if (hk_colval[0] == 0) {
+ for (i = 1; i < nsam_hk; i++) if (hk_colval[i] != -1) break;
+ if (i == nsam_hk) return (-1);
+ }
+
+ /*
+ * Find the first non-negative value in the HK array
+ */
+
+ while(k < nsam_hk && hk_colval[k] < 0) k++;
+ hv = hk_colval[k];
+
+ /*
+ * Begin big loop through the timeline table
+ */
+
+ while (i < ntime) {
+
+ /* Find the next non-negative value in the HK array */
+ k++;
+ while(k < nsam_hk && hk_colval[k] < 0) k++;
+
+ /* If we've run out of HK entries, fill in the rest of the
+ timeline and quit. */
+ if (k == nsam_hk) {
+ for ( ; i < ntime; i++)
+ tarray[i] = hv;
+ break;
+ }
+
+ /* Otherwise, populate the timeline table for times less than hk_time */
+ while (i < ntime && ttime[i] < time_hk[k])
+ tarray[i++] = hv;
+
+ /* Save latest HV value from HK array */
+ hv = hk_colval[k];
+ }
+
+ return (0);
+}
+
+
+/****************************************************************************/
+
+int cf_timeline(fitsfile *outfits)
+{
+ /*************************************************************
+ *
+ * Procedure to fill in the third extension of the IDF,
+ * which contains information about orbital parameters,
+ * count rates, high voltage info, and Y centroids as
+ * a function of time during the observation. The data
+ * are tabulated once each second.
+ *
+ **************************************************************/
+
+ char hkexists[FLEN_VALUE], det[FLEN_VALUE], side[2];
+ char fmt_byte[FLEN_CARD], fmt_float[FLEN_CARD], fmt_short[FLEN_CARD];
+ char instmode[FLEN_VALUE], keyword[FLEN_KEYWORD], card[FLEN_CARD];
+ char volt_cal[FLEN_VALUE];
+ unsigned char *tflag;
+ int hv_flag, ngti, n_bad_times, TIMES_TOO_BIG = FALSE;
+ int status=0, anynull, intnull=0, dn_flag_last=0;
+ int biglif = FALSE, bigsic = FALSE, bigfec = FALSE, bigaic = FALSE;
+ long i, j, k, expnight, nevents, ntime, vmax;
+ short *hv;
+ float *lifcr, *siccr, *feccr, *aiccr, *bkgdcr;
+ float first_time, last_time, bad_times[1024], *time=NULL;
+ float *ycentl, *ycents;
+ float max_lif, max_sic, max_fec, max_aic;
+ double *gtis, *gtie, min_limb=999., period;
+ double mjd_start, mjd_end, mjd, *ptime, *lon, *lat, *limbang;
+ double *vorb, *tsunrise, lastsunrise=0, *tsunset, lastsunset=0;
+ orbital orb;
+ SGP4 sgp4;
+ struct key tscal[16], tzero[16];
+ long nevts;
+
+ char * dets[]={"1A","1B","2A","2B"};
+
+ char extname[]="TIMELINE";
+ int tfields=16; /* output table will have 16 columns */
+ char *ttype[]={"TIME", "STATUS_FLAGS", "TIME_SUNRISE", "TIME_SUNSET",
+ "LIMB_ANGLE", "LONGITUDE", "LATITUDE", "ORBITAL_VEL",
+ "HIGH_VOLTAGE", "LIF_CNT_RATE", "SIC_CNT_RATE",
+ "FEC_CNT_RATE", "AIC_CNT_RATE", "BKGD_CNT_RATE",
+ "YCENT_LIF","YCENT_SIC"};
+
+ char *tform[16]; /* we will define tform later, when the number
+ of photons is known */
+
+ char *tunit[]={"seconds", "unitless", "seconds", "seconds", "degrees",
+ "degrees", "degrees", "km/s", "unitless", "counts/sec",
+ "counts/sec", "counts/sec", "counts/sec", "counts/sec",
+ "pixels","pixels" };
+
+ char CF_PRGM_ID[] = "cf_timeline";
+ char CF_VER_NUM[] = "1.41";
+
+ /* Initialize error checking. */
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Started execution.");
+
+ /* Set the orbital parameters keywords. */
+ FITS_movabs_hdu(outfits, 1, NULL, &status);
+ FITS_read_key(outfits, TDOUBLE, "EXPSTART", &mjd_start, NULL, &status);
+ FITS_read_key(outfits, TDOUBLE, "EXPEND", &mjd_end, NULL, &status);
+ FITS_read_key(outfits, TDOUBLE, "RA_TARG", &orb.ra_ap, NULL, &status);
+ FITS_read_key(outfits, TDOUBLE, "DEC_TARG", &orb.dec_ap, NULL, &status);
+ FITS_read_key(outfits, TSTRING, "INSTMODE", instmode, NULL, &status);
+ FITS_read_key(outfits, TSTRING, "VOLT_CAL", volt_cal, NULL, &status);
+
+ cf_velang(outfits, (mjd_end+mjd_start)/2.0);
+
+ sgp4 = set_orbit_parms(outfits);
+
+ /* Read the good time intervals */
+ ngti = cf_get_gti(outfits, &gtis, &gtie);
+ for (i=0; i<ngti; i++)
+ cf_verbose(3, "GTI start = %0.1f, end= %0.1f", gtis[i], gtie[i]);
+
+ /*
+ * An exposure should never span more than 55 ks. If it appears to
+ * do so, include only the good-time intervals in the timeline table.
+ * Otherwise, include all times between EXPSTART and EXPEND, whether
+ * or not there are any associated photons.
+ */
+ if (gtie[ngti-1] - gtis[0] > MAX_EXPTIME) {
+ TIMES_TOO_BIG = TRUE;
+ cf_if_warning("Exposure appears to span %0.0f ks. Truncating "
+ "timeline table.", (gtie[ngti-1] - gtis[0])/1000.);
+ }
+
+ /* For HIST data, use the good-time intervals
+ to set the times in the timeline table. */
+ if (!strncmp(instmode, "HIST", 4)) {
+ if (TIMES_TOO_BIG) {
+ ntime = 0;
+ for (i = 0; i < ngti; i++)
+ ntime += (long) (gtie[i] - gtis[i] + 1.5);
+ ptime = (double *) cf_malloc(sizeof(double) * ntime);
+ k = 0;
+ for (i = 0; i < ngti; i++) {
+ ntime = (long) (gtie[i] - gtis[i] + 1.5);
+ for (j = 0; j < ntime; j++)
+ ptime[k++] = gtis[i] + j;
+ }
+ ntime = k;
+ }
+ else {
+ ntime = (long) (gtie[ngti-1] - gtis[0] + 1.5);
+ ptime = (double *) cf_malloc(sizeof(double) * ntime);
+ for (i = 0; i < ntime; i++)
+ ptime[i] = gtis[0] + i;
+ }
+ }
+
+ /* For TTAG data, use the photon times themselves. */
+ else {
+ FITS_movabs_hdu(outfits, 2, NULL, &status);
+ nevents = cf_read_col(outfits, TFLOAT, "TIME", (void **) &time);
+ FITS_movabs_hdu(outfits, 1, NULL, &status);
+ n_bad_times = 0;
+ if (TIMES_TOO_BIG) {
+ last_time = 0;
+ i = nevents - 1;
+ while (time[i] > MAX_EXPTIME && i > 0) {
+ if (fabs(time[i] - last_time) > FRAME_TOLERANCE && n_bad_times < 1024) {
+ bad_times[n_bad_times++] = time[i];
+ last_time = time[i];
+ }
+ i--;
+ }
+ last_time = time[i] + 1.;
+ }
+ else
+ last_time = time[nevents-1] + 1.;
+ first_time = time[0];
+ if (first_time < fmod(last_time, 1.))
+ first_time = fmod(last_time, 1.) - 1.;
+ ntime = (long) (last_time - first_time + 1.5) + n_bad_times;
+ ptime = (double *) cf_malloc(sizeof(double) * ntime);
+ for (i = 0; i < ntime - n_bad_times; i++)
+ ptime[i] = first_time + i;
+ for (j = n_bad_times-1; i < ntime; i++, j--)
+ ptime[i] = bad_times[j];
+ free(time);
+ }
+ cf_verbose(2, "Timeline table will contain %ld entries", ntime);
+
+ /* Now generate all of the other arrays in the timeline table. */
+
+ lon = (double *) cf_calloc(ntime, sizeof(double));
+ lat = (double *) cf_calloc(ntime, sizeof(double));
+ limbang = (double *) cf_calloc(ntime, sizeof(double));
+ vorb = (double *) cf_calloc(ntime, sizeof(double));
+ tsunrise = (double *) cf_calloc(ntime, sizeof(double));
+ tsunset = (double *) cf_calloc(ntime, sizeof(double));
+ hv = (short *) cf_calloc(ntime, sizeof(short));
+ lifcr = (float *) cf_calloc(ntime, sizeof(float));
+ siccr = (float *) cf_calloc(ntime, sizeof(float));
+ feccr = (float *) cf_calloc(ntime, sizeof(float));
+ aiccr = (float *) cf_calloc(ntime, sizeof(float));
+ bkgdcr = (float *) cf_calloc(ntime, sizeof(float));
+ tflag = (unsigned char *) cf_calloc(ntime, sizeof(unsigned char));
+ ycentl = (float *)cf_calloc(ntime, sizeof(float));
+ ycents = (float *)cf_calloc(ntime, sizeof(float));
+
+ for (i=0; i<ntime; i++) {
+ int dn_flag, day_limb;
+ float dx;
+ double geo_lon, geo_lat, gmst, pos[3], vel[3], zdist, ang_sep;
+
+ mjd = mjd_start + ptime[i]/86400.0;
+
+ /* get the state vector at time mjd */
+ SGP4_getStateVector(sgp4, mjd, pos, vel);
+ SGP4_precess(pos, mjd, MJD2000);
+ SGP4_precess(vel, mjd, MJD2000);
+
+ dx = space_vel(vel, orb.ra_ap, orb.dec_ap);
+
+ state_geod(pos, mjd, &geo_lon, &geo_lat, &gmst);
+ limbang[i] = (double) state_limb(pos, mjd, orb.ra_ap, orb.dec_ap,
+ &zdist, &day_limb);
+ if (min_limb > limbang[i]) min_limb = limbang[i];
+
+ dn_flag = eclipse(pos, mjd, &ang_sep); /* 0=day, 1=night */
+
+ /* The first time through, and after any breaks in the timeline,
+ * compute times of most recent sunrise and sunset. */
+ if ((i == 0) || (ptime[i] - ptime[i-1] - 1. > FRAME_TOLERANCE)) {
+ lastsunrise = ptime[i] + sunrise(mjd, sgp4);
+ lastsunset = ptime[i] + sunset(mjd, sgp4);
+ if (lastsunset > lastsunrise) dn_flag_last = 1 ;
+ else dn_flag_last = 0 ;
+ /* The first time through, compute the orbital period and
+ * write it to file header. */
+ if (i == 0) {
+ mjd += (lastsunset - ptime[i] + 7000.)/86400.0;
+ period = 7000. + sunset(mjd, sgp4);
+ FITS_movabs_hdu(outfits, 1, NULL, &status);
+ FITS_update_key(outfits, TDOUBLE, "ORBPERID", &period,
+ "[s] Estimate of orbital period", &status);
+ }
+ }
+ /* If we've moved from day into night (or night into day), update
+ last sunrise/sunset times. */
+ else if ((dn_flag == 0) && (dn_flag_last == 1))
+ lastsunrise = ptime[i];
+ else if ((dn_flag == 1) && (dn_flag_last == 0))
+ lastsunset = ptime[i];
+
+ /* If this is daytime, set the day bit in TFLAG array. */
+ if (dn_flag == 0)
+ tflag[i] |= TEMPORAL_DAY;
+
+ lon[i] = geo_lon;
+ lat[i] = geo_lat;
+ vorb[i] = dx;
+ tsunrise[i] = ptime[i] - lastsunrise;
+ tsunset[i] = ptime[i] - lastsunset;
+ dn_flag_last = dn_flag;
+ }
+
+
+ /*
+ * Set the OPUS flag for times outside of the OPUS good-time
+ * intervals. Since there are no photons associated with the
+ * last second of a GTI, we make sure that it is flagged as
+ * bad. The first second of a good-time interval is good.
+ */
+ j = 0;
+ for (i = 0; i < ntime; i++) {
+ while (j < ngti-1 && ptime[i] > gtie[j] - 0.5)
+ j++;
+ if (ptime[i] < gtis[j] - FRAME_TOLERANCE ||
+ ptime[i] > gtie[j] + FRAME_TOLERANCE)
+ tflag[i] |= TEMPORAL_OPUS;
+ }
+ tflag[ntime-1] |= TEMPORAL_OPUS;
+
+ /*
+ * No exposure should be longer than 55 ks. For HIST data, we'll just
+ * put up with it, but for TTAG data, we'll flag as bad any timeline
+ * table entries with absurd arrival times. We use the OPUS flag for
+ * this. What we're really saying is that we don't believe that the
+ * times associated with these photons are correct.
+ */
+ for (i = 0; i < ntime; i++)
+ if (ptime[i] > MAX_EXPTIME)
+ tflag[i] |= TEMPORAL_OPUS;
+
+ /* Fill housekeeping columns (count rates and high voltage). */
+ FITS_movabs_hdu(outfits, 1, NULL, &status);
+ FITS_read_key(outfits, TSTRING, "HKEXISTS", hkexists, NULL, &status);
+ FITS_read_key(outfits, TSTRING, "DETECTOR", det, NULL, &status);
+ strncpy(side, det+1, 1);
+
+ /* Populate MIN_LIMB keyword. */
+ FITS_update_key(outfits, TDOUBLE, "MIN_LIMB", &min_limb, NULL, &status);
+
+ /* If no housekeeping file exists, use header info to fill timeline. */
+ loop:
+ if(!strncasecmp(hkexists, "N", 1)) {
+ char cntb_key[FLEN_CARD], cnte_key[FLEN_CARD];
+ float cntb, cnte;
+ float cnt_rate, cnt_rate2, eng_time, exp_time;
+ double ctimeb, ctimee;
+
+ cf_verbose(1, "No housekeeping file: filling timeline with header info.");
+
+ /* move to the top level header to read the relevant keywords */
+ FITS_movabs_hdu(outfits, 1, NULL, &status);
+ FITS_read_key(outfits, TFLOAT, "EXPTIME", &exp_time, NULL, &status);
+ FITS_read_key(outfits, TLONG, "NEVENTS", &nevts, NULL, &status);
+
+ /* calculate engineering count rates */
+ FITS_read_key(outfits, TDOUBLE, "CTIME_B", &ctimeb, NULL, &status);
+ FITS_read_key(outfits, TDOUBLE, "CTIME_E", &ctimee, NULL, &status);
+ eng_time = (ctimee-ctimeb) * 86400.;
+
+ /* If eng_time is unreasonable, use the EXPTIME keyword */
+ if (eng_time < 1) {
+ cf_if_warning("Engineering snapshot time less than or equal to zero.");
+ if ((eng_time = (mjd_end-mjd_start) * 86400.) < MAX_EXPTIME)
+ cf_if_warning("Estimating LiF, SiC, FEC and AIC count rates from EXPSTART and EXPEND.");
+ else {
+ eng_time = exp_time;
+ cf_if_warning("Estimating LiF, SiC, FEC and AIC count rates from EXPTIME.");
+ }
+ }
+
+ /* SiC count rate timeline */
+ sprintf(cntb_key, "C%.2sSIC_B", det);
+ FITS_read_key(outfits, TFLOAT, cntb_key, &cntb, NULL, &status);
+ sprintf(cnte_key, "C%.2sSIC_E", det);
+ FITS_read_key(outfits, TFLOAT, cnte_key, &cnte, NULL, &status);
+
+ if ((cnte<0) || (cntb<0) || (cntb>cnte) || eng_time < 1. ||
+ (cnte==0xEB90EB90) || (cnte==0xDEADDEAD) ||
+ (cntb==0xEB90EB90) || (cntb==0xDEADDEAD) ||
+ ((cnt_rate = (cnte - cntb) / eng_time) > 32000)) {
+ cf_if_warning("Bad SiC counter. SiC count rate will be set to zero.");
+ cnt_rate=0;
+ }
+
+ cf_verbose(2, "SiC count rate = %d", (int) cnt_rate);
+ for (i=0; i<ntime; i++)
+ siccr[i] = cnt_rate;
+
+ /* LiF count rate timeline */
+ sprintf(cntb_key, "C%.2sLIF_B", det);
+ FITS_read_key(outfits, TFLOAT, cntb_key, &cntb, NULL, &status);
+ sprintf(cnte_key, "C%.2sLIF_E", det);
+ FITS_read_key(outfits, TFLOAT, cnte_key, &cnte, NULL, &status);
+
+ if ((cnte<0) || (cntb<0) || (cntb>cnte) || eng_time < 1. ||
+ (cnte==0xEB90EB90) || (cnte==0xDEADDEAD) ||
+ (cntb==0xEB90EB90) || (cntb==0xDEADDEAD) ||
+ ((cnt_rate = (cnte - cntb) / eng_time) > 32000)) {
+ cf_if_warning("Bad LiF counter. LiF count rate will be set to zero.");
+ cnt_rate=0;
+ }
+
+ cf_verbose(2, "LiF count rate = %d", (int) cnt_rate);
+ for (i=0; i<ntime; i++)
+ lifcr[i] = cnt_rate;
+
+ /* FEC count rate timeline */
+ sprintf(cntb_key, "C%.2sFE_B", det);
+ FITS_read_key(outfits, TFLOAT, cntb_key, &cntb, NULL, &status);
+ sprintf(cnte_key, "C%.2sFE_E", det);
+ FITS_read_key(outfits, TFLOAT, cnte_key, &cnte, NULL, &status);
+
+ if ((cnte<0) || (cntb<0) || (cntb>cnte) || eng_time<1 ||
+ (cnte==0xEB90EB90) || (cnte==0xDEADDEAD) ||
+ (cntb==0xEB90EB90) || (cntb==0xDEADDEAD) ||
+ ((cnt_rate = (cnte - cntb) / eng_time) > 64000) ||
+ (cnt_rate < 0.8*nevts/exp_time)) {
+ cf_if_warning("Bad FEC counter");
+ cf_if_warning("-- FEC count rate will be computed from NEVENTS and EXPTIME.");
+ cf_if_warning("-- Electronic deadtime correction will be underestimated.");
+ cf_if_warning("-- Y stretch will be underestimated.");
+ cnt_rate=nevts/exp_time;
+ }
+
+ cf_verbose(2, "FEC count rate = %d", (int) cnt_rate);
+ for (i=0; i<ntime; i++)
+ feccr[i] = cnt_rate;
+
+ /* AIC count rate timeline */
+ cnt_rate=0;
+ for (i=0;i<4;i++){
+ sprintf(cntb_key, "C%.2sAI_B", dets[i]);
+ FITS_read_key(outfits, TFLOAT, cntb_key, &cntb, NULL, &status);
+ sprintf(cnte_key, "C%.2sAI_E", dets[i]);
+ FITS_read_key(outfits, TFLOAT, cnte_key, &cnte, NULL, &status);
+
+ if (((cnte<0) || (cntb<0) || (cntb>cnte) || (eng_time<1) ||
+ (cnte==0xEB90EB90) || (cnte==0xDEADDEAD) ||
+ (cntb==0xEB90EB90) || (cntb==0xDEADDEAD) ||
+ ((cnt_rate2 = (cnte - cntb)/ eng_time) > 64000)) ||
+ ((!(strncasecmp(dets[i],det,2))) && (cnt_rate2<0.8*nevts/exp_time))) {
+ cf_if_warning("Bad AIC counter %s",dets[i]);
+ cf_if_warning("-- AIC count rate will be computed from NEVENTS and EXPTIME.");
+ cf_if_warning("-- IDS deadtime correction will be underestimated.");
+ cnt_rate=nevts/exp_time;
+ break;
+ }
+ cnt_rate+=cnt_rate2;
+ }
+
+ cf_verbose(2, "AIC count rate = %d", (int) cnt_rate);
+ for (i=0; i<ntime; i++)
+ aiccr[i] = cnt_rate;
+
+ /* High voltage timeline */
+ hv_from_header(outfits, det, side, ntime, hv);
+ }
+ else {
+ /*
+ * Housekeeping file exists. Use it to calculate timeline values.
+ */
+ char cntb_key[FLEN_VALUE], hk_file_name[FLEN_VALUE];
+ int hk_colnum, hskpvers, MUST_TEST_HV=FALSE, swap_HV=FALSE;
+ long nsam_hk, *hk_colval;
+ double *hk_mjd, *time_hk;
+ fitsfile *hskpfits;
+ float * aiccr2;
+
+ FITS_read_key(outfits, TSTRING, "HSKP_CAL", hk_file_name, NULL, &status);
+ /* If you can't open the housekeeping file, try a lower-case filename.*/
+ if (fits_open_file(&hskpfits, hk_file_name, READONLY, &status)) {
+ status = 0;
+ cf_verbose(3, "Can't find housekeeping file %s", hk_file_name);
+ hk_file_name[0] = (char) tolower(hk_file_name[0]);
+ cf_verbose(3, "Will look for file named %s", hk_file_name);
+
+ /* If you still can't open the housekeeping file, use header keywords. */
+ if (fits_open_file(&hskpfits, hk_file_name, READONLY, &status)) {
+ status = 0;
+ cf_verbose(3, "Can't find housekeeping file %s", hk_file_name);
+ strncpy(hkexists, "N", 1);
+ goto loop;
+ }
+ /* If lower-case filename works, write it to the file header. */
+ FITS_update_key(outfits, TSTRING, "HSKP_CAL", hk_file_name, NULL, &status);
+ }
+ cf_verbose(1, "Housekeeping file exists: using it to fill timeline.");
+
+ /* If we're on side 2 and the HSKPVERS keyword does not exist, then we'll
+ need to check whether the HV arrays are swapped. */
+ if (*det == '2' &&
+ fits_read_key(hskpfits, TINT, "HSKPVERS", &hskpvers, NULL, &status)) {
+ status = 0;
+ MUST_TEST_HV = TRUE;
+ }
+
+ FITS_movabs_hdu(hskpfits, 2, NULL, &status);
+ FITS_read_key(hskpfits, TLONG, "NAXIS2", &nsam_hk, NULL, &status);
+ cf_verbose(3, "Number of samples in the HK file = %ld", nsam_hk);
+
+ /* Allocate space to hold the column contents */
+ hk_colval = (long *) cf_calloc(nsam_hk, sizeof(long));
+ hk_mjd = (double *) cf_calloc(nsam_hk, sizeof(double));
+ time_hk = (double *) cf_calloc(nsam_hk, sizeof(double));
+
+ /* Read in the various columns */
+
+ /* First the MJD values - convert to time from start in seconds */
+ FITS_get_colnum(hskpfits, TRUE, "MJD", &hk_colnum, &status);
+ FITS_read_col(hskpfits, TDOUBLE, hk_colnum, 1L, 1L, nsam_hk, &intnull,
+ hk_mjd, &anynull, &status);
+ for (i=0; i<nsam_hk; i++)
+ time_hk[i] = (hk_mjd[i]-mjd_start) * 86400.;
+
+ /* SiC count rate timeline */
+ sprintf(cntb_key, "I_DET%.1sCSIC%.1s", det, side);
+
+ /* Check to see whether the column exists. If not, then
+ reset the housekeeping flag and do the analysis using
+ keyword values in the input file header. If so, then check
+ whether it contains real values. If not, then use the
+ keywords */
+ if(!fits_get_colnum(hskpfits, TRUE, cntb_key, &hk_colnum, &status)) {
+ FITS_read_col(hskpfits, TLONG, hk_colnum, 1L, 1L, nsam_hk, &intnull,
+ hk_colval, &anynull, &status);
+ vmax = 0;
+ for (j=0; j< nsam_hk; j++)
+ if (hk_colval[j] > vmax)
+ vmax = hk_colval[j];
+ if (vmax <= 0) {
+ cf_if_warning("Data missing from housekeeping column. "
+ "Will treat file as missing.");
+ strncpy(hkexists, "N", 1);
+ status=0;
+ goto loop; }
+ else fill_cntrate_array(nsam_hk, hk_colval, time_hk, ntime,
+ ptime, siccr);}
+ else {
+ cf_if_warning("Data column missing from housekeeping file. "
+ "Will treat file as missing.");
+ strncpy(hkexists, "N", 1);
+ status=0;
+ goto loop;
+ }
+ cf_verbose(3,"SiC count-rate info read from housekeeping file.");
+
+ /* LiF count rate timeline */
+ sprintf(cntb_key, "I_DET%.1sCLIF%.1s", det, side);
+ FITS_get_colnum(hskpfits, TRUE, cntb_key, &hk_colnum, &status);
+ FITS_read_col(hskpfits, TLONG, hk_colnum, 1L, 1L, nsam_hk, &intnull,
+ hk_colval, &anynull, &status);
+ fill_cntrate_array(nsam_hk, hk_colval, time_hk, ntime, ptime, lifcr);
+ cf_verbose(3,"LiF count-rate info read from housekeeping file.");
+
+ /* FEC count rate timeline */
+ sprintf(cntb_key, "I_DET%.1sCFE%.1s", det, side);
+ FITS_get_colnum(hskpfits, TRUE, cntb_key, &hk_colnum, &status);
+ FITS_read_col(hskpfits, TLONG, hk_colnum, 1L, 1L, nsam_hk, &intnull,
+ hk_colval, &anynull, &status);
+ fill_cntrate_array(nsam_hk, hk_colval, time_hk, ntime, ptime, feccr);
+ cf_verbose(3,"FEC count-rate info read from housekeeping file.");
+
+ /* AIC count rate timeline */
+ aiccr2 = (float *) cf_calloc(ntime, sizeof(float));
+ for (j=0;j<ntime;j++) aiccr[j]=0;
+ for (i=0;i<4;i++){
+ sprintf(cntb_key, "I_DET%.1sCAI%.1s", dets[i], dets[i]+1);
+ FITS_get_colnum(hskpfits, TRUE, cntb_key, &hk_colnum, &status);
+ FITS_read_col(hskpfits, TLONG, hk_colnum, 1L, 1L, nsam_hk, &intnull,
+ hk_colval, &anynull, &status);
+ fill_cntrate_array(nsam_hk, hk_colval, time_hk, ntime, ptime, aiccr2);
+ for (j=0;j<ntime;j++) aiccr[j]+=aiccr2[j];
+ }
+ cf_verbose(3,"AIC count-rate info read from housekeeping file.");
+
+ /* If MUST_TEST_HV = TRUE, determine whether HV for 2A and 2B are swapped. */
+ if (MUST_TEST_HV) {
+ char mjd_str[FLEN_VALUE], full_str[FLEN_VALUE], saa_str[FLEN_VALUE];
+ double mjd_volt;
+ int full, hdr_max2a, max2a = 0, saa;
+ long n, nhk, *hv2a;
+ fitsfile *voltfits;
+
+ cf_verbose(3, "Testing whether HV arrays are swapped.");
+
+ /* Read HV array for 2A from HSKP file; find max value. */
+ nhk = cf_read_col(hskpfits, TLONG, "I_DET2HVBIASAST", (void **) &hv2a);
+ for (n = 0L; n < nhk; n++) if (max2a < hv2a[n]) max2a = hv2a[n];
+ free (hv2a);
+
+ /*
+ * If HV values in file header are good, read 2A max.
+ * Compare with value from HSKP file.
+ */
+ fits_read_key(outfits, TINT, "HV_FLAG", &hv_flag, NULL, &status);
+ if (hv_flag > -1) {
+ FITS_read_key(outfits, TINT, "DET2HVAH", &hdr_max2a, NULL, &status);
+ cf_verbose(3, " Max for 2A: header says %d, housekeeping file says %d.",
+ hdr_max2a, max2a);
+ if (abs(max2a - hdr_max2a) < 5)
+ cf_verbose(3, " HV arrays are OK. No need to swap.");
+ else
+ swap_HV = TRUE;
+ }
+
+ /*
+ * If HV values in file header are bad, compare with expected
+ * values from VOLT_CAL file.
+ */
+ else {
+ FITS_open_file(&voltfits, cf_cal_file(volt_cal), READONLY, &status);
+ n = 0L;
+ do {
+ n++;
+ sprintf(mjd_str, "MJD%ld", n);
+ FITS_read_key(voltfits, TDOUBLE, mjd_str, &mjd_volt, NULL, &status);
+ } while (mjd_start > mjd_volt);
+ n--;
+
+ sprintf(full_str, "FULL%ld", n);
+ sprintf(saa_str, "SAA%ld", n);
+ FITS_read_key(voltfits, TINT, full_str, &full, NULL, &status);
+ FITS_read_key(voltfits, TINT, saa_str, &saa, NULL, &status);
+ FITS_close_file(voltfits, &status);
+
+ /* If max for 2A matches expected full or SAA voltage -- and
+ we're on side 2A -- then we're OK. Otherwise, must swap. */
+ cf_verbose(3, " 2A max = %d; Expected values for %s: full = %d, SAA = %d",
+ max2a, det, full, saa);
+ if ((abs(max2a - full) < 10 || abs(max2a - saa) < 5) &&
+ (*side == 'A'))
+ cf_verbose(3, " HV arrays are OK. No need to swap.");
+ else swap_HV = TRUE;
+ }
+ }
+
+ /* High voltage timeline */
+ if (swap_HV) {
+ if (*side == 'A') sprintf(cntb_key, "I_DET2HVBIASBST");
+ else sprintf(cntb_key, "I_DET2HVBIASAST");
+ cf_verbose(3, " Swapping HV values for detectors 2A and 2B");
+ }
+ else sprintf(cntb_key, "I_DET%.1sHVBIAS%.1sST", det, side);
+ FITS_get_colnum(hskpfits, TRUE, cntb_key, &hk_colnum, &status);
+ FITS_read_col(hskpfits, TLONG, hk_colnum, 1L, 1L, nsam_hk, &intnull,
+ hk_colval, &anynull, &status);
+ if (!hv_from_hskp(nsam_hk, hk_colval, time_hk, ntime, ptime, hv))
+ cf_verbose(3,"HV info read from housekeeping file.");
+ else {
+ cf_verbose(1,"Housekeeping file corrupted: reading HV info from file header.");
+ hv_from_header(outfits, det, side, ntime, hv);
+ }
+
+ free(time_hk);
+ free(hk_mjd);
+ free(hk_colval);
+ FITS_close_file(hskpfits, &status);
+ }
+
+ /*
+ * Set TFORM, TSCALE, and TZERO values for output table.
+ */
+ sprintf(fmt_byte, "%ldB", ntime);
+ sprintf(fmt_float, "%ldE", ntime);
+ sprintf(fmt_short, "%ldI", ntime);
+
+ /* First set default values. */
+ tform[0] = fmt_float;
+ tform[1] = fmt_byte;
+ for (i=2; i<tfields; i++)
+ tform[i] = fmt_short;
+
+ /* For most arrays, we keep one decimal place. */
+ for (i=2; i<tfields; i++) {
+ sprintf(tscal[i].keyword, "TSCAL%ld", i+1);
+ tscal[i].value = 0.1;
+ sprintf(tzero[i].keyword, "TZERO%ld", i+1);
+ tzero[i].value = 0.;
+ }
+
+ /* Now we start tinkering. */
+
+ /* The orbital velocity is small, so we can keep two decimal places. */
+ tscal[7].value = 0.01;
+
+ /* FEC_CNT_RATE and AIC_CNT_RATE can get big, so we
+ use TZERO AND TSCALE to compress them. */
+ tscal[11].value = 1;
+ tscal[12].value = 2;
+ tzero[11].value = 32768;
+ tzero[12].value = 65536;
+
+ /* If a count rate is high, set to zero. */
+ max_lif = max_sic = 32767.;
+ max_fec = 65535.;
+ max_aic = 131070.;
+
+ for (i = 0; i < ntime; i++) {
+ if (lifcr[i] > max_lif) {
+ lifcr[i] = 0.;
+ biglif = TRUE;
+ }
+ if (siccr[i] > max_sic) {
+ siccr[i] = 0.;
+ bigsic = TRUE;
+ }
+ if (feccr[i] > max_fec) {
+ feccr[i] = 0.;
+ bigfec = TRUE;
+ }
+ if (aiccr[i] > max_aic) {
+ aiccr[i] = 0.;
+ bigaic = TRUE;
+ }
+ }
+
+ if (biglif) cf_if_warning("LIF_CNT_RATE out of bounds. Setting bad values to zero.");
+ if (bigsic) cf_if_warning("SIC_CNT_RATE out of bounds. Setting bad values to zero.");
+ if (bigfec) cf_if_warning("FEC_CNT_RATE out of bounds. Setting bad values to zero.");
+ if (bigaic) cf_if_warning("AIC_CNT_RATE out of bounds. Setting bad values to zero.");
+
+ /*
+ * Write the timeline table to the output file.
+ */
+ FITS_movabs_hdu(outfits, 3, NULL, &status);
+ FITS_create_hdu(outfits, &status);
+
+ FITS_create_tbl(outfits, BINARY_TBL, 1L, tfields, ttype,
+ tform, tunit, extname, &status);
+
+ /* Write TSCALE and TZERO entries to header */
+ for (i=2; i<tfields; i++) {
+
+ /* Omit TSCALE and TZERO for these six arrays. */
+ if (i == 2) continue; /* TIME_SUNRISE */
+ if (i == 3) continue; /* TIME_SUNSET */
+ if (i == 8) continue; /* HIGH_VOLTAGE */
+ if (i == 9) continue; /* LIF_CNT_RATE */
+ if (i == 10) continue; /* SIC_CNT_RATE */
+ if (i == 13) continue; /* BKGD_CNT_RATE */
+
+ sprintf(keyword, "TUNIT%ld", i+1);
+ if (fits_read_keyword(outfits, keyword, card, NULL, &status))
+ cf_if_fits_error(status);
+ FITS_insert_key_flt(outfits, tscal[i].keyword, tscal[i].value,
+ -1, NULL, &status);
+ FITS_insert_key_flt(outfits, tzero[i].keyword, tzero[i].value,
+ -5, NULL, &status);
+ }
+
+ FITS_write_col(outfits, TDOUBLE, 1, 1L, 1L, ntime, ptime, &status);
+ cf_verbose(3, "ptime array written to timeline table");
+ FITS_write_col(outfits, TBYTE, 2, 1L, 1L, ntime, tflag, &status);
+ cf_verbose(3, "tflag array written to timeline table");
+ FITS_write_col(outfits, TDOUBLE, 3, 1L, 1L, ntime, tsunrise, &status);
+ cf_verbose(3, "tsunrise array written to timeline table");
+ FITS_write_col(outfits, TDOUBLE, 4, 1L, 1L, ntime, tsunset, &status);
+ cf_verbose(3, "tsunset array written to timeline table");
+ FITS_write_col(outfits, TDOUBLE, 5, 1L, 1L, ntime, limbang, &status);
+ cf_verbose(3, "limbang array written to timeline table");
+ FITS_write_col(outfits, TDOUBLE, 6, 1L, 1L, ntime, lon, &status);
+ cf_verbose(3, "lon array written to timeline table");
+ FITS_write_col(outfits, TDOUBLE, 7, 1L, 1L, ntime, lat, &status);
+ cf_verbose(3, "lat array written to timeline table");
+ FITS_write_col(outfits, TDOUBLE, 8, 1L, 1L, ntime, vorb, &status);
+ cf_verbose(3, "vorb array written to timeline table");
+ FITS_write_col(outfits, TSHORT, 9, 1L, 1L, ntime, hv, &status);
+ cf_verbose(3, "hv array written to timeline table");
+ FITS_write_col(outfits, TFLOAT, 10, 1L, 1L, ntime, lifcr, &status);
+ cf_verbose(3, "lifcr array written to timeline table");
+ FITS_write_col(outfits, TFLOAT, 11, 1L, 1L, ntime, siccr, &status);
+ cf_verbose(3, "siccr array written to timeline table");
+ FITS_write_col(outfits, TFLOAT, 12, 1L, 1L, ntime, feccr, &status);
+ cf_verbose(3, "feccr array written to timeline table");
+ FITS_write_col(outfits, TFLOAT, 13, 1L, 1L, ntime, aiccr, &status);
+ cf_verbose(3, "aiccr array written to timeline table");
+ FITS_write_col(outfits, TFLOAT, 14, 1L, 1L, ntime, bkgdcr, &status);
+ cf_verbose(3, "bkgdcr array written to timeline table");
+ FITS_write_col(outfits, TFLOAT, 15, 1L, 1L, ntime, ycentl, &status);
+ cf_verbose(3, "ycentl array written to timeline table");
+ FITS_write_col(outfits, TFLOAT, 16, 1L, 1L, ntime, ycents, &status);
+ cf_verbose(3, "ycents array written to timeline table");
+
+ /* Compute EXPNIGHT for raw data file and write to output header. */
+ expnight = 0;
+ for (i=0; i<ntime; i++)
+ if (!tflag[i]) expnight++;
+ FITS_movabs_hdu(outfits, 1, NULL, &status);
+ FITS_update_key(outfits, TLONG, "EXPNIGHT", &expnight, NULL, &status);
+ cf_verbose(3, "For raw data, EXPNIGHT = %d", expnight);
+
+ free(ptime);
+ free(lon);
+ free(lat);
+ free(limbang);
+ free(vorb);
+ free(tsunrise);
+ free(tsunset);
+ free(hv);
+ free(lifcr);
+ free(siccr);
+ free(feccr);
+ free(aiccr);
+ free(bkgdcr);
+ free(tflag);
+ free(ycentl);
+ free(ycents);
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished execution.");
+ return EXIT_SUCCESS;
+}
+
+
+/* Add new header keywords - needed only for old versions of OPUS */
+
+int cf_add_header_keywords(fitsfile *outfits)
+{
+ char hkexists[FLEN_CARD];
+ int status=0;
+ float dum=0., rawtime;
+ short sdum=0;
+ long ldum=0;
+ short bkgd_num=0;
+
+ cf_verbose(3, "Entering cf_add_header_keywords");
+
+ /* If keyword RAWTIME does not exist, create with value of EXPTIME */
+ fits_read_key(outfits, TFLOAT, "RAWTIME", &rawtime, NULL, &status);
+ if (status) {
+ status = 0;
+ FITS_read_key(outfits, TFLOAT, "EXPTIME", &rawtime, NULL, &status);
+ FITS_update_key(outfits, TFLOAT, "RAWTIME", &rawtime,
+ "[s] Exposure duration of raw data file", &status);
+ }
+
+ /* If keyword HKEXISTS is missing, create with value of "NO" */
+ fits_read_key(outfits, TSTRING, "HKEXISTS", hkexists, NULL, &status);
+ if (status != 0) {
+ status=0;
+ cf_verbose(1, "HKEXISTS keyword missing: assume no housekeeping file.");
+ FITS_update_key(outfits, TSTRING, "HKEXISTS", "NO",
+ "Housekeeping data file exists", &status);
+ }
+
+ FITS_update_key(outfits, TSTRING, "BRIT_OBJ", "NO", "Not an over-bright observation", &status);
+ FITS_update_key(outfits, TSTRING, "HSKP_CAL", " ", "Housekeeping data file", &status);
+ FITS_update_key(outfits, TSTRING, "DAYNIGHT", "BOTH", "Use only DAY, NIGHT or BOTH", &status);
+ FITS_update_key(outfits, TLONG, "EXP_HV", &ldum, "[s] Integration time lost to low voltage", &status);
+ FITS_update_key(outfits, TLONG, "EXP_JITR", &ldum, "[s] Integration time lost to jitter", &status);
+ FITS_update_key(outfits, TLONG, "EXPNIGHT", &ldum, "[s] Integration time during night after screening", &status);
+ FITS_update_key(outfits, TFLOAT, "FPADXLIF", &dum, "[pixels] Correction for FPA position",&status);
+ FITS_update_key(outfits, TFLOAT, "FPADXSIC", &dum, "[pixels] Correction for FPA position",&status);
+ FITS_update_key(outfits, TFLOAT, "YCENT1", &dum, "[pixels] Y centroid of LIF HIRS aperture",&status);
+ FITS_update_key(outfits, TFLOAT, "YCENT2", &dum, "[pixels] Y centroid of LIF MDRS aperture",&status);
+ FITS_update_key(outfits, TFLOAT, "YCENT3", &dum, "[pixels] Y centroid of LIF LWRS aperture",&status);
+ FITS_update_key(outfits, TFLOAT, "YCENT5", &dum, "[pixels] Y centroid of SIC HIRS aperture",&status);
+ FITS_update_key(outfits, TFLOAT, "YCENT6", &dum, "[pixels] Y centroid of SIC MDRS aperture",&status);
+ FITS_update_key(outfits, TFLOAT, "YCENT7", &dum, "[pixels] Y centroid of SIC LWRS aperture",&status);
+ FITS_update_key(outfits, TSTRING, "YQUAL1", " ", "Quality of Y centroid value (LIF HIRS)",&status);
+ FITS_update_key(outfits, TSTRING, "YQUAL2", " ", "Quality of Y centroid value (LIF MDRS)",&status);
+ FITS_update_key(outfits, TSTRING, "YQUAL3", " ", "Quality of Y centroid value (LIF LWRS)",&status);
+ FITS_update_key(outfits, TSTRING, "YQUAL5", " ", "Quality of Y centroid value (SIC HIRS)",&status);
+ FITS_update_key(outfits, TSTRING, "YQUAL6", " ", "Quality of Y centroid value (SIC MDRS)",&status);
+ FITS_update_key(outfits, TSTRING, "YQUAL7", " ", "Quality of Y centroid value (SIC LWRS)",&status);
+ FITS_update_key(outfits, TFLOAT, "YGEO_LIF", &dum, "Y centroid of geocoronal lines in target spectrum", &status);
+ FITS_update_key(outfits, TFLOAT, "YGEO_SIC", &dum, "Y centroid of geocoronal lines in target spectrum", &status);
+ FITS_update_key(outfits, TSHORT, "BKGD_NUM", &bkgd_num, "Number of background regions defined", &status);
+ FITS_update_key(outfits, TSHORT, "BKG_MIN0", &sdum, "[pixels] bkgd sample region 0 - lower limit",&status);
+ FITS_update_key(outfits, TSHORT, "BKG_MIN1", &sdum, "[pixels] bkgd sample region 1 - lower limit",&status);
+ FITS_update_key(outfits, TSHORT, "BKG_MIN2", &sdum, "[pixels] bkgd sample region 2 - lower limit",&status);
+ FITS_update_key(outfits, TSHORT, "BKG_MIN3", &sdum, "[pixels] bkgd sample region 3 - lower limit",&status);
+ FITS_update_key(outfits, TSHORT, "BKG_MIN4", &sdum, "[pixels] bkgd sample region 4 - lower limit",&status);
+ FITS_update_key(outfits, TSHORT, "BKG_MIN5", &sdum, "[pixels] bkgd sample region 5 - lower limit",&status);
+ FITS_update_key(outfits, TSHORT, "BKG_MIN6", &sdum, "[pixels] bkgd sample region 6 - lower limit",&status);
+ FITS_update_key(outfits, TSHORT, "BKG_MIN7", &sdum, "[pixels] bkgd sample region 7 - lower limit",&status);
+ FITS_update_key(outfits, TSHORT, "BKG_MAX0", &sdum, "[pixels] bkgd sample region 0 - upper limit",&status);
+ FITS_update_key(outfits, TSHORT, "BKG_MAX1", &sdum, "[pixels] bkgd sample region 1 - upper limit",&status);
+ FITS_update_key(outfits, TSHORT, "BKG_MAX2", &sdum, "[pixels] bkgd sample region 2 - upper limit",&status);
+ FITS_update_key(outfits, TSHORT, "BKG_MAX3", &sdum, "[pixels] bkgd sample region 3 - upper limit",&status);
+ FITS_update_key(outfits, TSHORT, "BKG_MAX4", &sdum, "[pixels] bkgd sample region 4 - upper limit",&status);
+ FITS_update_key(outfits, TSHORT, "BKG_MAX5", &sdum, "[pixels] bkgd sample region 5 - upper limit",&status);
+ FITS_update_key(outfits, TSHORT, "BKG_MAX6", &sdum, "[pixels] bkgd sample region 6 - upper limit",&status);
+ FITS_update_key(outfits, TSHORT, "BKG_MAX7", &sdum, "[pixels] bkgd sample region 7 - upper limit",&status);
+
+ cf_verbose(3, "Exiting cf_add_header_keywords");
+ return EXIT_SUCCESS;
+}
+
+/* Set limits to the background sample regions */
+
+int cf_set_background_limits(fitsfile *outfits) {
+
+ char aper[FLEN_VALUE];
+ char bchrfile[FLEN_FILENAME];
+ int status=0;
+ long npts;
+ short bkgd_num=3, *ylim;
+ fitsfile *bchrfits;
+
+ cf_verbose(3, "Entering cf_set_background_limits");
+
+/* Read the target aperture from the input file header. */
+ FITS_read_key(outfits,TSTRING,"APERTURE",aper, NULL, &status);
+ cf_verbose(3, "aperture = %s", aper);
+
+/* If APERTURE = RFPT, use same background region as for LWRS. */
+ if (!strncmp (aper, "RFPT", 4)) {
+ strncpy(aper, "LWRS", 4);
+ cf_verbose(1, "APERTURE = RFPT. Will treat as LWRS observation.");
+ }
+
+/* Read the name of the BCHR parameter file and open it. */
+ FITS_read_key(outfits, TSTRING, "BCHR_CAL",bchrfile, NULL, &status);
+ cf_verbose(3,"BCHR parameter file = %s ",bchrfile);
+ FITS_open_file(&bchrfits,cf_parm_file(bchrfile), READONLY, &status);
+
+/* From the first extension of the BCHR_CAL file, read the limits
+ to the background regions. Close the file */
+ FITS_movabs_hdu(bchrfits, 2, NULL, &status);
+ npts = cf_read_col(bchrfits, TSHORT, aper, (void **) &ylim);
+ FITS_close_file(bchrfits, &status);
+
+ cf_verbose(3, "Number of background regions: %d", bkgd_num);
+ cf_verbose(3, "Limits of background regions: %d, %d, %d, %d, %d, %d",
+ ylim[0],ylim[1],ylim[2],ylim[3],ylim[4],ylim[5]);
+
+/* Update the header keywords */
+ FITS_update_key(outfits, TSHORT, "BKGD_NUM", &bkgd_num, NULL, &status);
+ FITS_update_key(outfits, TSHORT, "BKG_MIN0", &ylim[0], NULL, &status);
+ FITS_update_key(outfits, TSHORT, "BKG_MIN1", &ylim[2], NULL, &status);
+ FITS_update_key(outfits, TSHORT, "BKG_MIN2", &ylim[4], NULL, &status);
+ FITS_update_key(outfits, TSHORT, "BKG_MAX0", &ylim[1], NULL, &status);
+ FITS_update_key(outfits, TSHORT, "BKG_MAX1", &ylim[3], NULL, &status);
+ FITS_update_key(outfits, TSHORT, "BKG_MAX2", &ylim[5], NULL, &status);
+
+ free (ylim);
+ cf_verbose(3, "Exiting cf_set_background_limits");
+ return EXIT_SUCCESS ;
+}
diff --git a/src/libcf/cf_make_mask.c b/src/libcf/cf_make_mask.c
new file mode 100644
index 0000000..090222c
--- /dev/null
+++ b/src/libcf/cf_make_mask.c
@@ -0,0 +1,175 @@
+/***********************************************************************
+ *
+ * CF_MAKE_MASK
+ *
+ * Procedure to create a mask of the bad pixels from the pixel list
+ * generated by cf_bad_pixels
+ *
+ * CALL: cf_make_mask(header, ap, nout, wave_out, bny, bymin, bpmask)
+ *
+ * Arguments: fitsfile header name of the input IDF
+ * int ap Aperture designation
+ * long nout number of points in wavelength array
+ * float wave_out wavelength array
+ * int bny Y dimension of the output image -
+ * should be same as background
+ * int bymin Y coordinate of first element in
+ * output array. Should match background
+ * float bpmask Output bad pixel mask - dimensions
+ * are nout * bny
+ *
+ * History: 04/29/03 rdr v1.0 Begin work
+ * 04/30/03 wvd v1.1 Install
+ * 09/30/03 wvd v1.2 Use cf_read_col to read BPM_CAL
+ * file.
+ * 11/11/03 wvd v1.3 Fix bug in normalization of
+ * pothole map.
+ * 07/21/04 wvd v1.4 Fix bug in construction of
+ * pothole mask: change & to &&
+ * 11/25/05 wvd v1.5 Fill gaps in the mask that
+ * open when the bad-pixel map
+ * is converted from pixels to
+ * wavelengths.
+ *
+ ***********************************************************************/
+
+#include "calfuse.h"
+
+int cf_make_mask(fitsfile *header, int ap, long nout, float *wave_out,
+int bny, int bymin, float **bpmask){
+
+ char CF_PRGM_ID[] = "cf_make_mask";
+ char CF_VER_NUM[] = "1.5";
+
+ char bpm_file[FLEN_VALUE], *chan;
+ int *bphist, nhist, status=0;
+ long bpsum, i, j, k, ndx, nsam, npix, npts;
+ float *bpmaskt, w0, wpc, pnorm=1;
+ float *x, *y, *wt, *lam ;
+ float bpmax ;
+ fitsfile *bpmfits ;
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ cf_verbose(3, "Entering routine cf_make_mask") ;
+
+ /* Generate an array (nout * bny) to contain the map. */
+ npix = nout * bny;
+ bpmaskt = cf_calloc(npix, sizeof(float)) ;
+
+ /* Read wavelength information from input file header. */
+ FITS_movabs_hdu(header, 1, NULL, &status);
+ FITS_read_key(header, TFLOAT, "WPC", &wpc, NULL, &status);
+ w0 = wave_out[0];
+ cf_verbose(3, "Wavelengths: w0=%g, dw=%g", w0, wpc);
+
+ /* Open the bad-pixel file. */
+ if (fits_read_key(header, TSTRING, "BPM_CAL", bpm_file, NULL, &status)) {
+ cf_verbose(0,
+ "No bad pixel (BPM_CAL) file specified. Assuming no potholes.") ;
+ for (i=0; i<npix; i++) bpmaskt[i] = 1.;
+ *bpmask = bpmaskt;
+ return 0;
+ }
+ cf_verbose(3, "Bad Pixel file = %s ", bpm_file) ;
+ if (fits_open_file(&bpmfits, bpm_file, READONLY, &status) ) {
+ cf_verbose(0,
+ "No bad pixel (BPM_CAL) file found. Assuming no potholes.");
+ for (i=0; i<npix; i++) bpmaskt[i] = 1.;
+ *bpmask = bpmaskt;
+ return 0;
+ };
+
+ /* Read the BPM file. */
+ FITS_movabs_hdu(bpmfits, 2, NULL, &status);
+ npts = cf_read_col(bpmfits, TFLOAT, "X", (void **) &x);
+ npts = cf_read_col(bpmfits, TFLOAT, "Y", (void **) &y);
+ npts = cf_read_col(bpmfits, TFLOAT, "WEIGHT", (void **) &wt);
+ npts = cf_read_col(bpmfits, TFLOAT, "LAMBDA", (void **) &lam);
+ npts = cf_read_col(bpmfits, TBYTE, "CHANNEL", (void **) &chan);
+
+ /* Fill the map with pothole information. */
+ nsam = 0;
+ for (i=0; i<npts; i++) {
+ if (chan[i] == ap) {
+ j = (long) ( (lam[i] - w0)/wpc + 0.5 ) ;
+ k = (long) ( (y[i] - bymin) + 0.5 ) ;
+ if (j < nout && k < bny) {
+ nsam++ ;
+ ndx = k*nout + j ;
+ if (ndx > 0 && ndx < npix) bpmaskt[ndx] += wt[i] ;
+ }
+ }
+ }
+ cf_verbose(3, "Channel %d contains %d bad pixels.", ap, nsam) ;
+
+ /* If any potholes are present, generate the pothole map. */
+ if(nsam > 0) {
+
+ /* Determine a normalization for the potholes. This is done by
+ creating a histogram of the weights between 0 and the maximum
+ and then selecting the 95% level as the normalization factor.
+ We use 95%, rather than the maximum, to avoid the possibility
+ of having a few spurious points define the normalization. */
+
+ /* Determine the maximum value. */
+ bpmax = 0.;
+ for (i=0; i<npix; i++)
+ if (bpmaskt[i] > bpmax) bpmax = bpmaskt[i] ;
+
+ /* Generate the histogram. */
+ nhist = (int) (bpmax * 10.) + 1 ;
+ bphist = (int *) cf_calloc(nhist, sizeof(int)) ;
+ bpsum = 0;
+ for (i=0; i < npix; i++) {
+ ndx = (int) (bpmaskt[i] * 10.) ;
+ if (ndx > 0 && ndx < nhist) {
+ bphist[ndx]++;
+ bpsum++;
+ }
+ }
+
+ /* Now select the 95% level. */
+ nsam = 0;
+ i = nhist-1 ;
+ while (nsam < bpsum/20 && i >= 0) {
+ nsam += bphist[i] ;
+ pnorm = bpmax - (nhist-1-i) / 10. ;
+ i--;
+ }
+
+ cf_verbose(3, "bpmax = %.1f, normalizing factor = %.2f", bpmax, pnorm) ;
+
+ /* Normalize and invert the mask so that the center of the
+ pothole is zero and the region outside is 1. */
+
+ for (i=0; i<npix; i++) {
+ bpmaskt[i] = 1. - (bpmaskt[i] / pnorm) ;
+ if (bpmaskt[i] < 0.) bpmaskt[i] = 0. ;
+ }
+
+ /* If a pixel in the mask is higher than both of its neighbors,
+ it probably represents a gap that opened when converting from
+ pixels to wavelengths. Fill it. */
+
+ for (j = 1; j < nout-1; j++) {
+ for (k = 0; k < bny; k++) {
+ ndx = k*nout + j ;
+ if (bpmaskt[ndx-1] < bpmaskt[ndx] && bpmaskt[ndx] > bpmaskt[ndx+1])
+ bpmaskt[ndx] = (bpmaskt[ndx-1] + bpmaskt[ndx+1]) / 2.;
+ }
+ }
+ }
+
+ /* If there are no potholes, generate an array with all ones. */
+ else
+ for (i=0; i<npix; i++) bpmaskt[i] = 1. ;
+
+ /* Redirect the pointer. */
+ *bpmask = bpmaskt;
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+
+ return status ;
+}
diff --git a/src/libcf/cf_make_wave_array.c b/src/libcf/cf_make_wave_array.c
new file mode 100644
index 0000000..bbbefcd
--- /dev/null
+++ b/src/libcf/cf_make_wave_array.c
@@ -0,0 +1,147 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_make_wave_array(fitsfile *header, int aperture, long *nout,
+ * float **wave_out)
+ *
+ * Description: Reads W0, WMAX, and WPC from the scrn*.fit file and returns
+ * output wavelength array and its size. If not supplied by
+ * user, values are taken from the WAVE_CAL file.
+ *
+ * The FITS wavelength-calibration file has 8 extensions in the
+ * following order:
+ * Ext# HDU# Channel Aperture
+ * 1 2 LiF HIRS
+ * 2 3 LiF MDRS
+ * 3 4 LiF LWRS
+ * 4 5 LiF PINH
+ * 5 6 SiC HIRS
+ * 6 7 SiC MDRS
+ * 7 8 SiC LWRS
+ * 8 9 SiC PINH
+ *
+ * Arguments: fitsfile *header Pointer to IDF FITS file header
+ * int aperture Target aperture (values 1-8)
+ * long *nout Length of output arrays
+ * float **wave_out Pointer to output wavelength array
+ *
+ * Returns: 0 on success
+ *
+ * History: 02/24/03 1.1 wvd Initial coding.
+ * 03/02/03 1.2 wvd Write W0 and WPC to IDF header.
+ * 09/29/03 1.3 wvd Change calfusettag.h to calfuse.h
+ * 10/15/03 1.4 wvd Read either LIF or SIC wavelength
+ * parameters from PARM_CAL file,
+ * depending upon aperture.
+ * 03/16/04 1.5 wvd Cast wave_out array as type float.
+ *
+ ****************************************************************************/
+
+#include <stdio.h>
+#include "calfuse.h"
+
+static char CF_PRGM_ID[] = "cf_make_wave_array";
+static char CF_VER_NUM[] = "1.5";
+
+int
+cf_make_wave_array(fitsfile *header, int aperture, long *nout,
+ float **wave_out)
+{
+ char parm_file[FLEN_VALUE]; /* Name of parameter file */
+ char wave_file[FLEN_VALUE]; /* Name of WAVE_CAL file */
+ char w0_key[FLEN_KEYWORD]; /* Depends on aperture */
+ char wmax_key[FLEN_KEYWORD]; /* Depends on aperture */
+ char wpc_key[FLEN_KEYWORD]; /* Depends on aperture */
+
+ int status=0, hdunum;
+ long i;
+
+ float default_w0, default_wmax, default_wpc; /* Default values */
+ float w0, wmax, wpc; /* Requested values */
+
+ fitsfile *parmfits, *wavefits;
+
+ /* Initialize error checking */
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin processing");
+
+ /*
+ * Set keywords to read either LIF or SIC parameters, depending on
+ * the aperture number.
+ */
+ if (aperture < 5) {
+ sprintf(w0_key, "LIF_W0");
+ sprintf(wmax_key, "LIF_WMAX");
+ sprintf(wpc_key, "LIF_WPC");
+ } else {
+ sprintf(w0_key, "SIC_W0");
+ sprintf(wmax_key, "SIC_WMAX");
+ sprintf(wpc_key, "SIC_WPC");
+ }
+
+ /* Read recommended values of W0, WMAX, and WPC from WAVE_CAL header */
+ hdunum = aperture + 1;
+ FITS_read_key(header, TSTRING, "WAVE_CAL", wave_file, NULL, &status);
+ FITS_open_file(&wavefits, cf_cal_file(wave_file), READONLY, &status);
+ FITS_movabs_hdu(wavefits, hdunum, NULL, &status);
+ FITS_read_key(wavefits, TFLOAT, "W0", &default_w0, NULL, &status);
+ FITS_read_key(wavefits, TFLOAT, "WMAX", &default_wmax, NULL, &status);
+ FITS_read_key(wavefits, TFLOAT, "WPC", &default_wpc, NULL, &status);
+ FITS_close_file(wavefits, &status);
+ cf_verbose(3, "Recommended wavelength parameters:");
+ cf_verbose(3, "\tW0 = %g, WMAX = %g, WPC = %g",
+ default_w0, default_wmax, default_wpc);
+
+ /*
+ * Read requested values of W0, WMAX, and WPC from PARM_CAL.
+ * If no value requested, use default values.
+ * Compare requested values with default; complain if weird.
+ */
+ FITS_read_key(header, TSTRING, "PARM_CAL", parm_file, NULL, &status);
+ FITS_open_file(&parmfits, cf_parm_file(parm_file), READONLY, &status);
+ if (fits_read_key(parmfits, TFLOAT, w0_key, &w0, NULL, &status)) {
+ w0 = default_w0;
+ status = 0;
+ }
+ else if (w0 < default_w0)
+ cf_if_warning("Requested value of W0 is less than recommended value.");
+
+ if (fits_read_key(parmfits, TFLOAT, wmax_key, &wmax, NULL, &status)) {
+ wmax = default_wmax;
+ status = 0;
+ }
+ else if (wmax > default_wmax)
+ cf_if_warning("Requested value of WMAX is greater than "
+ "recommended value.");
+
+ if (fits_read_key(parmfits, TFLOAT, wpc_key, &wpc, NULL, &status)) {
+ wpc = default_wpc;
+ status = 0;
+ }
+ else if (wpc < default_wpc)
+ cf_if_warning("Requested value of WPC is less than "
+ "recommended value.");
+ FITS_close_file(parmfits, &status);
+ cf_verbose(3, "Using these wavelength parameters:");
+ cf_verbose(3, "\tW0 = %g, WMAX = %g, WPC = %g", w0, wmax, wpc);
+
+ /* Compute length of output wavelength array, allocate memory,
+ * and fill array.
+ */
+ *nout = (long) ((wmax - w0)/wpc + 0.5) + 1L;
+ *wave_out = (float *) cf_calloc(*nout, sizeof(float));
+ for (i = 0; i < *nout; i++)
+ (*wave_out)[i] = w0 + wpc * (float) i;
+
+ /*
+ * Write WO and WPC to output file header.
+ */
+ FITS_update_key(header, TFLOAT, "WPC", &wpc, NULL, &status);
+ FITS_update_key(header, TFLOAT, "W0", &w0, NULL, &status);
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+ return status;
+}
diff --git a/src/libcf/cf_mirror_motion.c b/src/libcf/cf_mirror_motion.c
new file mode 100644
index 0000000..d5dd3b3
--- /dev/null
+++ b/src/libcf/cf_mirror_motion.c
@@ -0,0 +1,189 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_mirror_motion(header, nevents, time, x, y, channel,
+ * ntimes, ttime, tsunset)
+ *
+ * Description: Calculates the shift of the spectrum in both X and Y caused
+ * by thermal changes in the mirror position and corrects
+ * the X and Y coordinates of each photon event.
+ *
+ * fitsfile *header Pointer to the location of the FITS
+ * header of the Intermediate data File
+ * long nevents Number of photons in the file
+ * int *time Time stamp (in seconds) since the
+ * start of the exposure
+ * float *x Position of the photon (in pixels)
+ * float *y Position of the photon (in pixels)
+ * unsigned char channel Channel id of each photon
+ * long ntimes Number of entries in timeline table
+ * float ttime Time array of timeline table
+ * short tsunset Time since last sunset
+ *
+ * Returns: 0 on success
+ *
+ * History: 09/06/02 1.1 RDR Begin work, adapted from cf_make_shift
+ * 03/01/03 1.3 wvd Correct use of pointer in FITS_read_key()
+ * 04/21/03 1.4 wvd Use tsunset array from timeline table.
+ * Do not assume that ttime is continuous.
+ * Interpolate between tabulated shifts.
+ * 05/20/03 1.5 rdr Added call to cf_proc_check
+ * 08/21/03 1.6 wvd Change channel to unsigned char.
+ * 06/22/04 1.7 wvd Estimate time between sunsets using
+ * orbit period in file header.
+ * 07/14/04 1.8 rdr Correct line which selects calibration
+ * 03/22/05 1.9 wvd Change tsunset from float to short.
+ * Read orbital period from file header.
+ * 04/15/05 1.10 wvd If ORBPERID keyword is not present,
+ * assume that it is 6000 s.
+ * 12/20/05 1.11 wvd Omit correction for an extended
+ * source.
+ * 04/07/07 1.12 wvd Clean up compiler warnings.
+ *
+ ****************************************************************************/
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "calfuse.h"
+
+int
+cf_mirror_motion(fitsfile *header, long nevents, float *time, float *x,
+ float *y, unsigned char *channel, long ntimes, float *ttime,
+ short *tsunset) {
+
+ char CF_PRGM_ID[] = "cf_mirror_motion";
+ char CF_VER_NUM[] = "1.12";
+
+ fitsfile *mmfits;
+ int errflg=0, status=0, anynull=0, hdutype, nullval=0;
+ int active_ap[2], extended;
+ long j, k, ndx;
+ char det[FLEN_VALUE], mmcal[FLEN_VALUE];
+ float *tdxlif, *tdxsic, *dxlif, *dylif, *dxsic, *dysic;
+ float frac, period, w0, w1, w99;
+
+ /* Initialize error checking. */
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+ /* Enter a time stamp into the log */
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ /* Check whether routine is appropriate for this data file. */
+ if ((errflg = cf_proc_check(header, CF_PRGM_ID))) return errflg;
+
+ /* Read detector keyword from header. */
+ FITS_read_key(header, TSTRING, "DETECTOR", det, NULL, &status);
+
+ /* Determine the channel numbers of the active apertures */
+ extended = cf_source_aper(header, active_ap);
+
+ /* If source is extended, exit now. */
+ if (extended) {
+ cf_verbose(1, "Extended source. Omitting photon shift.");
+ cf_proc_update(header, CF_PRGM_ID, "SKIPPED");
+ return (status);
+ }
+
+ /*
+ * Read orbital period from file header.
+ */
+ fits_read_key(header, TFLOAT, "ORBPERID", &period, NULL, &status);
+ if (status) {
+ status = 0;
+ period = 6000;
+ cf_verbose(1, "Keyword ORBPERID not found; assuming 6000 seconds");
+ }
+ else
+ cf_verbose(2, "Estimated orbital period is %.2f seconds", period);
+
+ /* Allocate space for shift arrays. */
+ dxlif = (float *) cf_calloc(ntimes, sizeof(float));
+ dylif = (float *) cf_calloc(ntimes, sizeof(float));
+ dxsic = (float *) cf_calloc(ntimes, sizeof(float));
+ dysic = (float *) cf_calloc(ntimes, sizeof(float));
+
+ /* Read the name of the mirror-motion calibration file */
+ FITS_read_key(header, TSTRING, "MIRR_CAL", mmcal, NULL, &status);
+ cf_verbose(3, "Mirror motion calibration file = %s", mmcal);
+
+ /* Open the calibration file and read in the information relating
+ * x shifts as a function of time (in minutes) from sunset for one orbit
+ * (100 minutes)
+ */
+ FITS_open_file(&mmfits, cf_cal_file(mmcal), READONLY, &status);
+ tdxsic = (float *) cf_calloc(100, sizeof(float));
+ tdxlif = (float *) cf_calloc(100, sizeof(float));
+ cf_verbose(3,"detector= %s",det) ;
+ if (!strncmp(det, "1", 1) ) {
+ cf_verbose(3,"Correcting detector 1") ;
+ /*
+ * NOTE: LiF 1 is used as reference and so, by definition, has no
+ * mirror motions. Thus, on side 1 only the SiC spectrum will move.
+ */
+ FITS_movabs_hdu(mmfits,2, &hdutype, &status);
+ FITS_read_img(mmfits, TFLOAT, 1,100, &nullval, tdxsic, &anynull,
+ &status);
+ }
+ else {
+ cf_verbose(3,"Correcting detector 2") ;
+ FITS_movabs_hdu(mmfits,3, &hdutype, &status);
+ FITS_read_img(mmfits, TFLOAT, 1,100, &nullval, tdxlif, &anynull,
+ &status);
+ FITS_movabs_hdu(mmfits,4, &hdutype, &status);
+ FITS_read_img(mmfits, TFLOAT, 1,100, &nullval, tdxsic, &anynull,
+ &status);
+ }
+ FITS_close_file(mmfits, &status);
+ /* Determine the shifts for each second of the observation. */
+ for (k=0; k<ntimes; k++) {
+ frac = tsunset[k] / period * 100.;
+ ndx = (long) frac;
+ if (ndx >= 99) {
+ w99 = 100. - frac;
+ w0 = frac - 99.;
+ dxlif[k] = w0 * tdxlif[0] + w99 * tdxlif[99];
+ dxsic[k] = w0 * tdxsic[0] + w99 * tdxsic[99];
+ }
+ else {
+ w0 = (float) (ndx + 1) - frac;
+ w1 = frac - (float) (ndx);
+ dxlif[k] = w0 * tdxlif[ndx] + w1 * tdxlif[ndx + 1];
+ dxsic[k] = w0 * tdxsic[ndx] + w1 * tdxsic[ndx + 1];
+ }
+ }
+
+ /* Apply the calculated shifts to the data. */
+ for (j=k=0; j<nevents; j++) {
+ while(ttime[k+1] - FRAME_TOLERANCE < time[j] && k+1 < ntimes) k++;
+ /*
+ * Shift only photons in the active aperture.
+ * active_ap[0] = lif, active_ap[1] = sic
+ */
+ if (channel[j] == active_ap[0]) {
+ x[j] += dxlif[k];
+ y[j] += dylif[k];
+
+ }
+ if (channel[j] == active_ap[1]) {
+ x[j] += dxsic[k];
+ y[j] += dysic[k];
+ }
+ }
+
+ /* Release array storage */
+ free(tdxlif);
+ free(tdxsic);
+ free(dxlif);
+ free(dylif);
+ free(dxsic);
+ free(dysic);
+
+ cf_proc_update(header, CF_PRGM_ID, "COMPLETE");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished execution.");
+
+ return status;
+}
diff --git a/src/libcf/cf_modify_hist_pha.c b/src/libcf/cf_modify_hist_pha.c
new file mode 100644
index 0000000..a842b5d
--- /dev/null
+++ b/src/libcf/cf_modify_hist_pha.c
@@ -0,0 +1,91 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_modify_hist_pha (fitsfile *header, long nevents,
+ * unsigned char *pha, unsigned char *channel)
+ *
+ * Description: For histogram data, set pulse heights of all photons to the
+ * most likely value, a function of aperture and obs date.
+ *
+ * Arguments: fitsfile *header Input FITS file pointer
+ * long nevents Number of photon events
+ * unsigned char *pha Pulse-height array (output)
+ * unsigned char *channel Channel assignment (input)
+ *
+ * Calls:
+ *
+ * Returns: 0 on success
+ *
+ * History: 03/01/05 1.1 wvd Initial coding
+ * 03/16/05 1.2 wvd Read PHA array as type TBYTE, not TINT.
+ * 04/28/05 1.3 wvd Fix bug in loop through MJD array.
+ *
+ ****************************************************************************/
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "calfuse.h"
+
+int
+cf_modify_hist_pha (fitsfile *header, long nevents, unsigned char *pha,
+ unsigned char *channel)
+{
+ char CF_PRGM_ID[] = "cf_modify_hist_pha";
+ char CF_VER_NUM[] = "1.3";
+
+ char phahfile[FLEN_FILENAME];
+ unsigned char pha_chan[8], *pha_mjd=NULL;
+ int errflg=0, status=0;
+ long i, j, jmax;
+ double expstart, *mjd=NULL;
+ fitsfile *phahfits;
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ /* If data were not taken in HIST mode, exit now. */
+ if ((errflg = cf_proc_check(header, CF_PRGM_ID))) return errflg;
+
+ /* Read header keywords. */
+ FITS_read_key(header, TDOUBLE, "EXPSTART", &expstart, NULL, &status);
+
+ /* Open the pulse-height calibration file. */
+ FITS_read_key(header, TSTRING, "PHAH_CAL", phahfile, NULL, &status);
+ cf_verbose(3, "Pulse-height calibration file = %s", phahfile);
+ FITS_open_file(&phahfits, cf_cal_file(phahfile), READONLY, &status);
+
+ /*
+ * Loop through all channels, reading expected pulse heights from PHAH_CAL.
+ * Use the values appropriate for the date of this exposure.
+ */
+ pha_chan[0] = 20; /* Default for events not in a channel */
+ for (i = 1; i < 8; i++) {
+ if (i == 4) continue;
+ FITS_movabs_hdu(phahfits, i+1, NULL, &status);
+ jmax = cf_read_col(phahfits, TDOUBLE, "MJD", (void *) &mjd);
+ jmax = cf_read_col(phahfits, TBYTE, "PHA", (void *) &pha_mjd);
+ j = 0;
+ while (j < jmax-1 && mjd[j+1] < expstart) j++;
+ pha_chan[i] = pha_mjd[j];
+ cf_verbose(3, "channel = %d, j = %d, pha = %d", i, j, pha_chan[i]);
+ }
+
+ /* Close the pulse-height calibration file. */
+ FITS_close_file(phahfits, &status);
+
+ /* Set pulse height for each photon according to its channel number. */
+ for (j = 0; j < nevents; j++)
+ pha[j] = pha_chan[(int) channel[j]];
+
+ free(mjd);
+ free(pha_mjd);
+
+ cf_proc_update(header, CF_PRGM_ID, "COMPLETE");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+
+ return status;
+}
diff --git a/src/libcf/cf_modify_hist_times.c b/src/libcf/cf_modify_hist_times.c
new file mode 100644
index 0000000..ba1b5d0
--- /dev/null
+++ b/src/libcf/cf_modify_hist_times.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_modify_hist_times (fitsfile *infits, long nevents,
+ * float *time, GTI *gti);
+ *
+ * Description: For histogram data, set photon-arrival times to the midpoint
+ * of the longest good-time interval.
+ *
+ * Arguments: fitsfile *infits Input FITS file pointer
+ * long nevents Number of photon events
+ * float *time Time array for photon list
+ * GIT *gti Good time interval(s)
+ *
+ * Calls:
+ *
+ * Returns: TRUE if time array is changed.
+ * FALSE if time array is not changed.
+ *
+ * History: 06/02/04 1.1 wvd Initial coding
+ * 06/07/04 1.2 wvd Use standard return values.
+ * 02/17/05 1.3 wvd Initalize jmax to 0.
+ *
+ ****************************************************************************/
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "calfuse.h"
+
+int
+cf_modify_hist_times (fitsfile *infits, long nevents, float *time, GTI *gti)
+{
+ char CF_PRGM_ID[] = "cf_modify_hist_times";
+ char CF_VER_NUM[] = "1.3";
+
+ int errflg=0, status=0;
+ long j, jmax=0;
+ float exptime, gti_time, max_time, photon_time, rawtime;
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ /* If data were not taken in HIST mode, exit now. */
+ if ((errflg = cf_proc_check(infits, CF_PRGM_ID))) return errflg;
+
+ /* Read header keywords. */
+ FITS_read_key(infits, TFLOAT, "EXPTIME", &exptime, NULL, &status);
+ FITS_read_key(infits, TFLOAT, "RAWTIME", &rawtime, NULL, &status);
+
+ /*
+ * If the entire exposure was rejected by the screening routines,
+ * we don't bother changing photon-arrival times. If no time was
+ * lost to screening, the default arrival times are OK. Exit now.
+ */
+ if (exptime < 1. || exptime > rawtime - 1.) {
+ cf_proc_update(infits, CF_PRGM_ID, "COMPLETE");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+ return -1;
+ }
+
+ /* Determine which is the longest good-time interval. */
+ max_time = 0.;
+ for (j = 0; j < gti->ntimes; j++) {
+ if ((gti_time = gti->stop[j] - gti->start[j]) > max_time) {
+ max_time = gti_time;
+ jmax = j;
+ }
+ }
+
+ /* Set all photon-arrival times to midpoint of longest GTI. */
+ photon_time = (gti->start[jmax] + gti->stop[jmax]) / 2.;
+ for (j = 0; j < nevents; j++)
+ time[j] = photon_time;
+ cf_verbose(1, "Setting photon-arrival times to %.1f", photon_time);
+
+ cf_proc_update(infits, CF_PRGM_ID, "COMPLETE");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+ return status;
+}
diff --git a/src/libcf/cf_nint.c b/src/libcf/cf_nint.c
new file mode 100644
index 0000000..8488911
--- /dev/null
+++ b/src/libcf/cf_nint.c
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: n = cf_nint(x)
+ *
+ * Description: Converts double to nearest integer.
+ *
+ * Variables: double x A double
+ *
+ * Return: int n Nearest integer
+ *
+ * History: 08/25/03 wvd v1.1 Begin work
+ * 02/09/04 wvd v1.2 Add cf_nlong()
+ * 02/17/04 wvd v1.3 Test for overflow of int, long
+ * 02/18/04 wvd v1.4 Change format of error message.
+ * Change from values.h to limits.h
+ *
+ *************************************************************************/
+
+#include <limits.h>
+#include "calfuse.h"
+
+int
+cf_nint(double x)
+
+{
+ if (x > INT_MAX || x < INT_MIN)
+ cf_if_error("Cannot convert %10.4e to an integer", x);
+
+ if (x < 0.) return (int) (x - 0.5);
+ else return (int) (x + 0.5);
+}
+
+
+long
+cf_nlong(double x)
+
+{
+ if (x > LONG_MAX || x < LONG_MIN)
+ cf_if_error("Cannot convert %10.4e to a long", x);
+
+ if (x < 0.) return (long) (x - 0.5);
+ else return (long) (x + 0.5);
+}
diff --git a/src/libcf/cf_optimal_extraction.c b/src/libcf/cf_optimal_extraction.c
new file mode 100644
index 0000000..4bbca9f
--- /dev/null
+++ b/src/libcf/cf_optimal_extraction.c
@@ -0,0 +1,551 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_optimal_extraction(fitsfile *header, int optimal,
+ * int aperture, float *weight, float *y, unsigned char *channel,
+ * float *lambda, long ngood, long *good_index,
+ * float *barray, float *bpmask, int pny, float pycent,
+ * float *parray, long nout, float *wave_out, float **flux_out,
+ * float **sigma_out, long **counts_out, float **weights_out,
+ * float **bkgd_out, short **bpix_out)
+ *
+ * Description: Perform standard or optimal extraction of target spectrum.
+ *
+ * Note: We use a modified version of the optimal-extraction
+ * algorithm described by Keith Horne (PASP, 98, 609, 1986).
+ *
+ * Arguments: fitsfile *header Pointer to IDF FITS file header
+ * int optimal TRUE if optimal extraction requested.
+ * int aperture Target aperture (values 1-8)
+ * float *weight Scale factor for each photon
+ * float *y Final y position of each photon
+ * unsigned char *channel Channel ID of each photon
+ * float *lambda Wavelength for each photon
+ * long ngood Length of array good_index
+ * long *good_index Indices of screened photon events
+ * float *barray 2-D background array
+ * (flux-calibrated and binned)
+ * float *bpmask 2-D array containing bad pixel locations
+ * Same size and location as the background array
+ * int pny Size in Y of weights array
+ * float pycent Y centroid of weights array
+ * float parray 2-D weights array (binned)
+ * long nout Length of output arrays
+ * float *wave_out Output wavelength array
+ * float **flux_out Output flux array
+ * float **sigma_out Output error array
+ * long **counts_out Output counts array
+ * float **weights_out Output weights array
+ * float **bkgd_out Output background array
+ * short **bpix_out Output bad pixel spectrum
+ *
+ * Returns: 0 on success
+ *
+ * History: 01/28/03 1.1 wvd Initial coding
+ * 02/28/03 1.2 peb Changed flux_out, var_out, counts_out
+ * and weight_out argument variables to
+ * pointer-to-pointers, so the arrays can
+ * be returned to the calling routine.
+ * Also tidied the code using lint.
+ * 03/11/03 1.3 wvd Update documentation regarding use of
+ * unsigned char
+ * 03/12/03 1.4 wvd Change weights_out to sum of weights
+ * 03/19/03 1.5 wvd Divide flux_out and var_out by WPC
+ * 04/04/03 1.6 rdr - correct bugs in optimum extraction
+ * - adjust criterion for redetermining
+ * y centroid
+ * 05/07/03 1.7 wvd Change ergcm2s to ergcm2 throughout.
+ * Divide by EXPTIME. Use cf_verbose.
+ * 05/22/03 1.8 wvd If EXPTIME = 0, set flux and error to 0.
+ * 05/28/03 1.9 rdr - For HIST data, spread counts
+ * along the y dimension of
+ * the data and variance arrays
+ * - Incorporate the bad pixel mask into
+ * optimal extraction algorithm
+ * - Return bad-pixel spectrum
+ * 09/30/03 1.10 wvd Negative values of YCENT are
+ * meaningless. Use S/N of data to
+ * determine significance of YCENT.
+ * Exclude airglow lines from S/N.
+ * 10/08/03 1.11 wvd Change counts_out array to type long.
+ * Add 0.5 to it before rounding.
+ * Limit Y coordinates of probability
+ * array before comparing with bkgd.
+ * 10/31/03 1.12 wvd Read centroid quality flags from IDF
+ * header. Do not attempt to calculate
+ * spectral centroid.
+ * 11/03/03 1.13 wvd Modify calculation of variance estimate.
+ * Modify scheme for smoothing HIST data.
+ * Iterate only to 20% accuracy.
+ * 12/05/03 1.14 wvd Check value of SPECBINY before
+ * smoothing HIST data in the Y dimension.
+ * 03/16/04 1.15 wvd In HIST mode, assume counts are
+ * distributed across one X pixel.
+ * Delete wave_out -- not used.
+ * After 50 iterations, abandon optimal
+ * extraction and use boxcar extraction
+ * instead.
+ * Don't test size of barray,
+ * as it is now the same as parray.
+ * Change pycent from int to float.
+ * 04/06/04 1.16 bjg Include string.h
+ * Remove unused variables
+ * 04/21/04 1.17 wvd Set dispapix = fabs(dispapix).
+ * Iterate to 5% accuracy.
+ * In boxcar extraction, use parray to
+ * set extraction limits.
+ * For TTAG data, compute counts_out
+ * directly from photon list.
+ * 04/26/04 1.18 wvd Perform all calculations with
+ * weights array, rather than ergcm2.
+ * Return counts spectrum.
+ * Convert from variance to sigma here,
+ * rather than in cf_write_spectra.
+ * Iterate to 10% accuracy.
+ * 05/17/04 1.19 wvd If weights_out[j] = 0, set variance
+ * = bkgd. Iterate optimal extraction
+ * to accuracy of 0.01 counts. In boxcar
+ * extraction, reduce parray limit to
+ * 1E-4 to better match fluxes from
+ * optimal extraction for bright stars.
+ * 08/13/04 1.20 wvd Use QUALITY array to set X limits
+ * of extraction region. Insure that
+ * sigma_out array is non-zero.
+ * 11/22/05 1.21 wvd Scale variance estimate by bad-pixel
+ * mask to better approximate observed
+ * counts.
+ * 06/12/06 1.22 wvd Call cf_verbose rather than
+ * cf_if_warning.
+ *
+ ****************************************************************************/
+
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include <string.h>
+
+#include "calfuse.h"
+
+static char CF_PRGM_ID[] = "cf_optimal_extraction";
+static char CF_VER_NUM[] = "1.22";
+
+int
+cf_optimal_extraction(fitsfile *header, int optimal, int aperture,
+ float *weight, float *y, unsigned char *channel,
+ float *lambda, long ngood, long *good_index,
+ float *barray, float *bpmask,
+ int pny, float pycent, float *parray, long nout, float *wave_out,
+ float **flux_out, float **sigma_out, long **counts_out,
+ float **weights_out, float **bkgd_out, short **bpix_out)
+
+{
+ char instmode[FLEN_VALUE], yquality_str[FLEN_KEYWORD],
+ ycent_str[FLEN_KEYWORD], yquality[FLEN_VALUE];
+ int status=0;
+ int nloop; /* Iterations of optimal
+ extraction loop */
+ int ycent_uncertain = FALSE;/* TRUE if centroid quality
+ less than HIGH */
+
+ long i, /* index through photon list */
+ ii, /* ii = good_index[i] */
+ j, /* X index through 2-D arrays */
+ jmin, jmax, /* limits of output spectrum */
+ k; /* Y index through 2-D arrays */
+
+
+ float exptime, /* exposure time */
+ tdead, /* mean dead-time correction */
+ w0, /* minimum value of output wave array */
+ wpc, /* wavelength increment per output bin */
+ *flux_old, /* flux values from previous iteration */
+ *flux_box, /* flux values from boxcar extraction */
+ *var_out, /* 1-D variance array */
+ *var_box, /* variance values from boxcar extraction */
+
+ ycent; /* Y centroid of target spectrum */
+
+ double numerator, denominator, /* Used in optimal-extraction calculations */
+ var_num, weights_num,
+ bkgd_num,
+ *data, /* 2-D data array */
+ *variance, /* 2-D variance array */
+ *w; /* weights array for variance calculation */
+
+ int l, lmin, lmax, /* These variables are */
+ specbiny, specbiny2; /* are used to smooth */
+ float psum, pval; /* HIST data in the */
+ double vval; /* Y dimension. */
+
+ long jj, jjj, m, m_min, n; /* These variables are used to smooth */
+ double edge[2], frac[2], x; /* HIST data in the X dimension. */
+ double dispapix; /* Mean dispersion per pixel */
+ char wave_file[FLEN_VALUE]; /* Name of WAVE_CAL file */
+ int hdunum; /* HDU number of WAVE_CAL file */
+ fitsfile *wavefits; /* Pointer to WAVE_CAL file */
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ cf_verbose(3, "Entering cf_optimal_extraction");
+
+ /*
+ * Check type of observation (HIST or TTAG) and binning factor.
+ */
+ FITS_movabs_hdu(header, 1, NULL, &status) ;
+ FITS_read_key(header, TSTRING, "INSTMODE", instmode, NULL, &status);
+ FITS_read_key(header, TINT, "SPECBINY", &specbiny, NULL, &status);
+ specbiny2 = specbiny/2 ;
+ if (specbiny2 < 1) specbiny2 = 1 ;
+ cf_verbose(3, "Aperture = %d, instrument mode = %s, binning in Y = %d",
+ aperture, instmode, specbiny) ;
+
+ /*
+ * Read EXPTIME and TOT_DEAD from file header.
+ */
+ FITS_read_key(header, TFLOAT, "EXPTIME", &exptime, NULL, &status);
+ FITS_read_key(header, TFLOAT, "TOT_DEAD", &tdead, NULL, &status);
+ if (tdead < 1.0) tdead = 1.0;
+ cf_verbose (3, "EXPTIME = %.0f, TOT_DEAD=%g", exptime, tdead);
+
+ /*
+ * Read wavelength parameters W0 and WPC from file header.
+ */
+ FITS_read_key(header, TFLOAT, "WPC", &wpc, NULL, &status);
+ FITS_read_key(header, TFLOAT, "W0", &w0, NULL, &status);
+ cf_verbose (3, "Wavelength info: w0=%g, dw=%g", w0, wpc) ;
+
+ /*
+ * Read spectral centroid YCENT and YQUAL from file header.
+ */
+ sprintf(ycent_str, "YCENT%1d", aperture);
+ FITS_read_key(header, TFLOAT, ycent_str, &ycent, NULL, &status);
+ sprintf(yquality_str, "YQUAL%1d", aperture);
+ FITS_read_key(header, TSTRING, yquality_str, yquality, NULL, &status);
+ if (*yquality != 'H') ycent_uncertain = TRUE;
+ cf_verbose (3, "%s = %g, quality = %s", ycent_str, ycent, yquality);
+
+ /*
+ * If HIST data, read DISPAPIX from header of WAVE_CAL file.
+ */
+ if (!strncmp(instmode,"H",1)) {
+ hdunum = aperture + 1;
+ FITS_read_key(header, TSTRING, "WAVE_CAL", wave_file, NULL, &status);
+ FITS_open_file(&wavefits, cf_cal_file(wave_file), READONLY, &status);
+ FITS_movabs_hdu(wavefits, hdunum, NULL, &status);
+ FITS_read_key(wavefits, TDOUBLE, "DISPAPIX", &dispapix, NULL, &status);
+ dispapix = fabs(dispapix);
+ FITS_close_file(wavefits, &status);
+ }
+
+ /*
+ * Allocate space for all arrays.
+ */
+ data = (double *) cf_calloc(pny*nout, sizeof(double));
+ variance = (double *) cf_calloc(pny*nout, sizeof(double));
+ w = (double *) cf_calloc(nout, sizeof(double));
+
+ flux_old = (float *) cf_calloc(nout, sizeof(float));
+ flux_box = (float *) cf_calloc(nout, sizeof(float));
+ var_box = (float *) cf_calloc(nout, sizeof(float));
+
+ *flux_out = (float *) cf_calloc(nout, sizeof(float));
+ var_out = (float *) cf_calloc(nout, sizeof(float));
+ *counts_out = (long *) cf_calloc(nout, sizeof(long));
+ *weights_out = (float *) cf_calloc(nout, sizeof(float));
+ *bkgd_out = (float *) cf_calloc(nout, sizeof(float));
+ *bpix_out = (short *) cf_calloc(nout, sizeof(short)) ;
+
+ /*
+ * The quality array (bpix_out) is the product of the probability
+ * array and the bad-pixel mask. We use it to set the limits of
+ * the extraction region.
+ */
+ cf_verbose(3, "Generating bad-pixel spectrum.") ;
+ for (j=0; j<nout; j++) {
+ float bpix=0. ;
+ for (k=0; k<pny; k++)
+ bpix += (parray[k*nout + j] * bpmask[k*nout + j]);
+ (*bpix_out)[j] = (short) (100. * bpix + 0.5) ;
+ }
+ jmin = 0L; jmax = nout;
+ for (j=0; j<nout; j++) {
+ if ((*bpix_out)[j] > 0) {
+ jmin = j;
+ break;
+ }
+ }
+ for (j = nout-1; j >= 0; j--) {
+ if ((*bpix_out)[j] > 0) {
+ jmax = j+1;
+ break;
+ }
+ }
+
+ /*
+ * Construct data and variance arrays from photon lists.
+ * Arrays are pny pixels in Y (to match probability array)
+ * and nout pixels in X (to match output wavelength array).
+ * We must thus shift individual photons by PYCENT - YCENT
+ * pixels in Y.
+ */
+
+ cf_verbose(3, "Filling the data array") ;
+ for (i = 0; i < ngood; i++) {
+ ii = good_index[i];
+
+ if (channel[ii] != aperture) continue;
+
+ j = (long) ((lambda[ii] - w0)/wpc + 0.5);
+ if (j < jmin || j >= jmax) continue;
+
+ k = (long) (y[ii] - ycent + pycent + 0.5);
+ if (k < 0 || k >= pny) continue;
+
+ if (!strncmp(instmode,"T",1)) {
+ /* TTAG data */
+ (*counts_out)[j]++;
+ data[k*nout + j] += weight[ii];
+ variance[k*nout + j] += weight[ii] * weight[ii];
+ }
+ else {
+ /* If HIST data are already smoothed in Y, it's easy: */
+ if (specbiny == 1) {
+ data[k*nout + j] += weight[ii];
+ variance[k*nout + j] += weight[ii] * tdead;
+ }
+ /* If HIST data are binned, smooth in both X and Y dimensions. */
+ else {
+ m_min = 0;
+ edge[0] = ((double) j - 0.5) * wpc + w0;
+ edge[1] = ((double) j + 0.5) * wpc + w0;
+ if ((x = (lambda[ii] - edge[0]) / dispapix) < 0.5) {
+ frac[0] = 0.5 - x;
+ frac[1] = 0.5 + x;
+ jj = j - 1;
+ n = 2;
+ if (jj == -1) m_min = 1;
+ }
+ else if ((x = (edge[1] - lambda[ii]) / dispapix) < 0.5) {
+ frac[0] = 0.5 + x;
+ frac[1] = 0.5 - x;
+ jj = j;
+ n = 2;
+ if (jj + 1 == nout) n = 1;
+ }
+ else {
+ frac[0] = 1.0;
+ jj = j;
+ n = 1;
+ }
+
+ psum = 0.;
+ vval = weight[ii] * tdead;
+ lmin = k - specbiny2;
+ lmax = lmin + specbiny;
+ if (lmin < 0) lmin = 0;
+ if (lmax > pny) lmax = pny;
+ pval = 1. / (lmax - lmin);
+ for (l = lmin; l < lmax; l++)
+ psum += parray[l*nout + j];
+ for (l = lmin; l < lmax; l++) {
+ if (psum > 0) pval = parray[l*nout + j] / psum;
+ for (m = m_min; m < n; m++) {
+ jjj = jj + m;
+ data[l*nout + jjj] += pval * frac[m] * weight[ii];
+ variance[l*nout + jjj] += pval * frac[m] * vval;
+ }
+ }
+ }
+ }
+ }
+
+ /*
+ * Boxcar extraction. Use parray to set extraction limits in Y.
+ */
+ cf_verbose(3, "Doing the boxcar extraction.") ;
+ nloop = 0;
+ for (j = jmin; j < jmax; j++) {
+ for (k = 0; k < pny; k++) {
+ if (parray[k*nout + j] > 1E-4) {
+ (*bkgd_out)[j] += barray[k*nout + j];
+ var_out[j] += variance[k*nout + j];
+ (*weights_out)[j] += data[k*nout + j];
+ }
+ }
+ (*flux_out)[j] = (*weights_out)[j] - (*bkgd_out)[j];
+ }
+
+ /*
+ * Has the user requested optimal extraction?
+ */
+ cf_verbose(3,"Optimal keyword = %d ", optimal) ;
+ if (optimal) {
+
+ /*
+ * If Y centroid is uncertain, abandon optimal extraction.
+ */
+ if (ycent_uncertain)
+ cf_verbose(1, "%s uncertain. Cannot perform optimal extraction.",
+ ycent_str);
+
+ else { /* Proceed with optimal extraction */
+
+ cf_verbose(3, "Attempting optimal extraction");
+
+ /*
+ * Save boxcar versions of flux and variance arrays.
+ */
+ for (j = jmin; j < jmax; j++) {
+ flux_box[j] = (*flux_out)[j];
+ var_box[j] = var_out[j];
+ }
+
+ /*
+ * Need array w[j] to scale the variance estimate.
+ * w[j] is mean scale factor from counts to weights at each wavelength.
+ * Must calculate for TTAG data; can use TOT_DEAD for HIST data.
+ */
+ if (!strncmp(instmode,"T",1)) for (j = jmin; j < jmax; j++) {
+ if ((*counts_out)[j] > 0) {
+ for (k = 0; k < pny; k++) w[j] += data[k*nout + j];
+ w[j] /= (*counts_out)[j];
+ }
+ else w[j] = tdead;
+ }
+ else for (j = jmin; j < jmax; j++) w[j] = tdead;
+
+ /*
+ * Begin big loop.
+ */
+ do {
+ /*
+ * Revise variance estimate
+ * We can omit w[j] here, as it appears in both the numerator
+ * and denominator of the flux estimate (below).
+ * 05/17/02 wvd: If weights_out[j] = 0, set variance = bkgd.
+ * 11/22/05 wvd: Scale variance estimate by bpmask.
+ */
+ for (j = jmin; j < jmax; j++) {
+ if ((*weights_out)[j] > 0)
+ for (k = 0; k < pny; k++)
+ variance[k*nout + j] = bpmask[k*nout + j] *
+ fabs(parray[k*nout + j] * (*flux_out)[j] + barray[k*nout + j]);
+ else
+ for (k = 0; k < pny; k++)
+ variance[k*nout + j] = bpmask[k*nout + j] * barray[k*nout + j];
+ }
+
+ /*
+ * Optimal extraction
+ */
+ nloop++;
+ for (j = jmin; j < jmax; j++) {
+ numerator = denominator = 0.;
+ for (k = 0; k < pny; k++) if (variance[k*nout+j] > 0) {
+ numerator += bpmask[k*nout+j] * parray[k*nout + j] *
+ (data[k*nout + j] - barray[k*nout + j]) / variance[k*nout + j];
+ denominator += bpmask[k*nout+j] * parray[k*nout + j] *
+ parray[k*nout + j] / variance[k*nout + j];
+ }
+ flux_old[j] = (*flux_out)[j];
+ if (denominator > 0) (*flux_out)[j] = numerator / denominator;
+ else (*flux_out)[j] = flux_old[j] = 0. ;
+ }
+
+ /*
+ * Repeat loop if any element of flux_out has changed by > 0.01 counts.
+ */
+ for (j = jmin; j < jmax; j++) {
+ if (fabs((*flux_out)[j]-flux_old[j]) > 0.01) {
+ cf_verbose(3, "%d\t%d\t%g", nloop, j, (*flux_out)[j]);
+ break;
+ }
+ }
+
+ } while (j < jmax && nloop < 50); /* End of do loop */
+
+ /*
+ * If nloop < 50, calculate var_out, weights_out, and bkgd_out.
+ * Note that we must scale var_out by w[j] here.
+ */
+ if (nloop < 50) {
+
+ memset (*bkgd_out, 0, nout*sizeof(float));
+ memset (*weights_out, 0, nout*sizeof(float));
+ memset (var_out, 0, nout*sizeof(float));
+
+ for (j = jmin; j < jmax; j++) {
+ bkgd_num = weights_num = var_num = denominator = 0.;
+ for (k = 0; k < pny; k++) if (variance[k*nout+j] > 0) {
+ bkgd_num += bpmask[k*nout+j] * parray[k*nout + j] *
+ barray[k*nout + j] / variance[k*nout + j];
+ weights_num += bpmask[k*nout+j] * parray[k*nout + j] *
+ data[k*nout + j] / variance[k*nout + j];
+ var_num += bpmask[k*nout+j] * parray[k*nout + j];
+ denominator += bpmask[k*nout+j] * parray[k*nout + j] *
+ parray[k*nout + j] / variance[k*nout + j];
+ }
+ if (denominator > 0) {
+ (*bkgd_out)[j] = bkgd_num / denominator;
+ (*weights_out)[j] = weights_num / denominator;
+ var_out[j] = var_num / denominator * w[j];
+ }
+ else {
+ (*bkgd_out)[j] = (*weights_out)[j] = var_out[j] = 0.;
+ }
+ }
+ }
+ /*
+ * If nloop = 50, use boxcar extraction instead.
+ */
+ else {
+ cf_verbose(1, "Optimal extraction failed to converge for aperture %d."
+ " Using boxcar extraction.", aperture);
+ nloop = 0;
+ for (j = jmin; j < jmax; j++) {
+ (*flux_out)[j] = flux_box[j];
+ var_out[j] = var_box[j];
+ }
+ }
+
+ } /* End of if/else test of YCENT */
+ } /* End of optimal extraction block */
+
+ /*
+ * Write number of iterations to file header.
+ */
+ FITS_update_key(header, TINT, "OPT_EXTR", &nloop, NULL, &status);
+ cf_verbose(2, "Number of iterations in optimal extraction = %d", nloop) ;
+
+ /* Convert error array from variance to sigma. */
+ for (j = jmin; j < jmax; j ++) {
+ if (var_out[j] > 0.) var_out[j] = sqrt(var_out[j]);
+ else if ((*bkgd_out)[j] > 0.) var_out[j] = sqrt((*bkgd_out)[j]);
+ else var_out[j] = 0.;
+ }
+ *sigma_out = var_out;
+
+ /*
+ * For HIST data, counts array = weights "uncorrected" for dead time.
+ */
+ if (!strncmp(instmode,"H",1)) for (j = jmin; j < jmax; j++)
+ (*counts_out)[j] = (long) ((*weights_out)[j] / tdead + 0.5);
+
+ /*
+ * Clean up
+ */
+ free(data);
+ free(flux_old);
+ free(flux_box);
+ free(var_box);
+ free(variance);
+ free(w);
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+ return status;
+}
diff --git a/src/libcf/cf_pha_x_distort.c b/src/libcf/cf_pha_x_distort.c
new file mode 100644
index 0000000..5f58824
--- /dev/null
+++ b/src/libcf/cf_pha_x_distort.c
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_pha_x_distort(fitsfile *header, long nevents,
+ * unsigned char *pha, float *xfarf,
+ * unsigned char *locflags)
+ *
+ * Description: Corrects the X position of low-pulse-height events.
+ *
+ * Note: To conform with the CalFUSE standard, the PHAX
+ * correction is now ADDED to the input photon X coordinate.
+ * This change from previous versions of the code requires
+ * a new set of calibration files. The program now checks the
+ * version number of the PHAX_CAL file and returns an error if
+ * it is less than 4.
+ *
+ * Arguments: fitsfile *header Pointer to FITS file containing the
+ * header of the intermediate data file
+ * long nevents The number of events
+ * unsigned char *pha An array of PHA values
+ * float *xfarf An array of event X positions
+ * unsigned char *locflags Location flags of each event
+ *
+ * Calls:
+ *
+ * Return: 0 on success
+ *
+ * History: 11/11/02 1.1 peb Begin work
+ * 11/12/02 1.3 peb Added check to move only events in
+ * active region.
+ * 03/11/03 1.4 wvd Changed pha and locflags to unsigned
+ * char
+ * 05/20/03 1.5 rdr Added call to cf_proc_check
+ * 07/29/03 1.6 wvd If cf_proc_check fails, return errflg.
+ * 10/14/03 1.7 wvd Add, rather than subtract, PHAX
+ * correction. Check cal file version.
+ * 10/17/03 1.8 wvd Don't crash if CALFVERS keyword
+ * is missing.
+ * 04/07/07 1.9 wvd Clean up compiler warnings.
+ *
+ ****************************************************************************/
+
+#include <string.h>
+#include <stdlib.h>
+#include "calfuse.h"
+
+int
+cf_pha_x_distort(fitsfile *header, long nevents, unsigned char *pha,
+ float *xfarf, unsigned char *locflags)
+{
+ char CF_PRGM_ID[] = "cf_pha_x_distort";
+ char CF_VER_NUM[] = "1.9";
+
+ char phaxfile[FLEN_VALUE]={'\0'};
+ int anynull=0, calfvers, errflg=0, status=0, xlen, ylen;
+ long j;
+ float *phax, flt=0.;
+ fitsfile *phaxfits=NULL;
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ if ((errflg = cf_proc_check(header, CF_PRGM_ID))) return errflg;
+
+ /*
+ * Read PHA correction (Walk) file
+ */
+ FITS_read_key(header, TSTRING, "PHAX_CAL", phaxfile, NULL, &status);
+ FITS_open_file(&phaxfits, cf_cal_file(phaxfile), READONLY, &status);
+ FITS_read_key(phaxfits, TINT, "NAXIS1", &xlen, NULL, &status);
+ FITS_read_key(phaxfits, TINT, "NAXIS2", &ylen, NULL, &status);
+
+ /* If CALFVERS keyword missing or less than 4, abort pipeline. */
+ fits_read_key(phaxfits, TINT, "CALFVERS", &calfvers, NULL, &status);
+ if (status || calfvers < 4) {
+ status = 0;
+ FITS_close_file(phaxfits, &status);
+ cf_if_error("Old versions of PHAX_CAL have wrong sign. Aborting.");
+ }
+
+ /* Otherwise, read walk correction as an image. */
+ phax = (float *) cf_malloc(sizeof(float)*xlen*ylen);
+ FITS_read_img(phaxfits, TFLOAT, 1L, xlen*ylen, &flt, phax, &anynull, &status);
+ FITS_close_file(phaxfits, &status);
+
+ if (xlen != NXMAX)
+ cf_if_warning("NAXIS1 of %s != 16384", phaxfile);
+ /*
+ * Apply PHA X correction to each event.
+ */
+ for(j=0; j<nevents; j++) {
+ /*
+ * Move only events in active region.
+ */
+ if (!(locflags[j] & LOCATION_SHLD)) {
+ xfarf[j] += phax[(int)(pha[j]*xlen + xfarf[j])];
+ }
+ }
+ free(phax);
+
+ cf_proc_update(header, CF_PRGM_ID, "COMPLETE");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+ return 0;
+}
diff --git a/src/libcf/cf_proc_check.c b/src/libcf/cf_proc_check.c
new file mode 100644
index 0000000..0dd2c72
--- /dev/null
+++ b/src/libcf/cf_proc_check.c
@@ -0,0 +1,124 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_proc_check(fitsfile *fptr, char *prog_id)
+ *
+ * Description: cf_proc_check will determine whether a given calibration
+ * step is to be performed on the data.
+ *
+ * Arguments: fitsfile *fptr Pointer to input file
+ * char *prog_id Procedure name
+ *
+ * History: 05/21/98 emm Begin work.
+ * 05/21/98 emm finished
+ * 06/17/98 emm Modified so that the keyword_tab
+ * structure is read from ed_calfuse.h
+ * file, which simplifies revisions in
+ * the order of processing.
+ * 03/04/99 emm I added use of errflg instead of
+ * return so that it checks all parms.
+ * 04/01/03 wvd Change fits_read_key_str to
+ * FITS_read_key, delete fits_print_err
+ * 05/20/03 rdr remove part which checks previous steps
+ * 05/22/03 v1.6 wvd Modify i/o; implement cf_verbose
+ * 07/23/03 v1.7 wvd Modify i/o
+ * 09/10/03 v1.8 wvd Bug fix: was printing HIST values
+ * whenever called with verbose option.
+ * Now returns TTAG when appropriate.
+ * 03/17/04 v1.9 wvd Call cf_verbose rather than
+ * cf_if_warning when program not
+ * appropriate for HIST data.
+ * 06/02/04 v1.10 wvd Call cf_verbose rather than
+ * cf_if_warning when program not
+ * appropriate for TTAG data.
+ * 11/26/04 v1.11 wvd If header keyword is set to OMIT, skip
+ * this step and set keyword to SKIPPED.
+ * 03/30/05 v1.12 wvd If header keyword is set to SKIPPED,
+ * skip this step.
+ *
+ ****************************************************************************/
+
+#include <stdio.h>
+#include <string.h>
+#include "calfuse.h"
+
+
+int cf_proc_check(fitsfile *fptr, char *prog_id)
+{
+ char comment[FLEN_CARD], instmode[FLEN_CARD];
+ char key_value[FLEN_CARD];
+ int j=0, errflg=0, status=0;
+
+ /* The calfuse.h file contains the definitions of keyword_tab,
+ * NUM_PROC_STEPS, and CALIBRATION_STEP_KEYS.
+ */
+ struct keyword_tab keytab[NUM_PROC_STEPS]=CALIBRATION_STEP_KEYS;
+
+ FITS_read_key(fptr, TSTRING, "INSTMODE", instmode, comment, &status);
+
+ switch (instmode[0]) {
+ case 'H':
+ /* Histogram mode */
+ /* First, determine if this procedure is even supposed to be
+ * run on this data. */
+
+ while ((strncmp(keytab[j].hist_proc,prog_id,
+ strlen(keytab[j].hist_proc)) != 0) &&
+ (j < NUM_PROC_STEPS)) j++;
+ if (j < NUM_PROC_STEPS)
+ cf_verbose(3, "cf_proc_check: prog_id=%s, key=%s, j=%d, value=%s",
+ prog_id, keytab[j].hist_proc, j, keytab[j].hist_value) ;
+ if ((j >= NUM_PROC_STEPS) ||
+ (strncmp(keytab[j].hist_value, "PERFORM", 7))) {
+ cf_verbose(1, "Not appropriate for HIST data. Exiting.");
+ errflg=1;
+ }
+
+ break;
+
+ case 'T':
+ /* Time-tag mode */
+ /* First, determine if this procedure is even supposed to be
+ * run on this data. */
+ while ((strncmp(keytab[j].ttag_proc,prog_id,
+ strlen(keytab[j].ttag_proc)) != 0) &&
+ (j < NUM_PROC_STEPS)) j++;
+ if (j < NUM_PROC_STEPS)
+ cf_verbose(3, "cf_proc_check: prog_id=%s, key=%s, j=%d, value=%s",
+ prog_id, keytab[j].ttag_proc, j, keytab[j].ttag_value) ;
+ if ((j >= NUM_PROC_STEPS) ||
+ (strncmp(keytab[j].ttag_value, "PERFORM", 7))) {
+ cf_verbose(1, "Not appropriate for TTAG data. Exiting.");
+ errflg=1;
+ }
+
+ break;
+
+ default:
+ errflg = 1;
+ }
+
+ if (!errflg) {
+ /* Check to see whether user wants to skip this step. */
+ FITS_read_key(fptr, TSTRING, keytab[j].name, key_value, comment,
+ &status);
+ if (!strncmp(key_value, "OMIT", 4) || !strncmp(key_value, "SKIPPED", 7)) {
+ cf_verbose(1, "Header keyword %s = %s. Exiting.",
+ keytab[j].name, key_value);
+ FITS_update_key(fptr, TSTRING, keytab[j].name, "SKIPPED", NULL,
+ &status);
+ errflg=1;
+ }
+
+ /* Now check to see if the step has already been completed. */
+ if (!strncmp(key_value, "COMPLETE", 7)) {
+ cf_if_warning("Exiting.\n\t%s has already been run on this file.",
+ prog_id);
+ errflg=1;
+ }
+ }
+ return errflg;
+}
diff --git a/src/libcf/cf_proc_update.c b/src/libcf/cf_proc_update.c
new file mode 100644
index 0000000..2e15d29
--- /dev/null
+++ b/src/libcf/cf_proc_update.c
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_proc_update(fitsfile *fptr, char *prgm_id, char *key_value)
+ *
+ * Description: cf_proc_update will update the FITS header keyword
+ * which corresponds to the given prgm_id in the file
+ * fptr to the value given in key_value.
+ *
+ * Arguments: fitsfile *fptr Pointer to input file
+ * char *prgm_id Procedure name
+ * char *key_value Updated procedure status
+ *
+ * History: 05/21/98 emm Begin work.
+ * 05/21/98 emm finished
+ * 06/17/98 emm Modified so that the keyword_tab
+ * structure is read from ed_calfuse.h
+ * file, which simplifies revisions in
+ * the order of processing.
+ * 09/08/99 peb Added lines to update NEXTEND keyword
+ * 01/31/00 emm Added update to DATE keyword.
+ * 04/01/03 wvd Changed cf_errmsg to cf_if_warning,
+ * fits_modify_key_str to FITS_update_key,
+ * fits_read_key_str to FITS_read_key
+ * 12/18/03 bjg Change calfusettag.h to calfuse.h
+ * 04/07/07 1.5 wvd Delete CF_PRGM_ID, as it is not used.
+ *
+ ****************************************************************************/
+
+#include <stdio.h>
+#include <string.h>
+#include "calfuse.h"
+
+int cf_proc_update(fitsfile *fptr, char *prgm_id, char *key_value)
+{
+
+ char comment[FLEN_CARD], instmode[FLEN_CARD];
+ int i, status=0, hdutype=0, nextend;
+ /*
+ * The calfuse.h file contains the definitions of keyword_tab
+ * NUM_PROC_STEPS, and CALIBRATION_STEP_KEYS.
+ */
+ struct keyword_tab keytab[NUM_PROC_STEPS]=CALIBRATION_STEP_KEYS;
+
+ FITS_movabs_hdu(fptr, 1, &hdutype, &status);
+ FITS_get_num_hdus(fptr, &nextend, &status);
+ nextend -= 1;
+ FITS_update_key(fptr, TINT, "NEXTEND", &nextend, NULL, &status);
+
+ FITS_read_key(fptr, TSTRING, "INSTMODE", instmode, comment, &status);
+
+ FITS_write_date(fptr, &status);
+
+ switch (instmode[0]) {
+ case 'H':
+ /* Find the keyword associated with prgm_id by looping
+ * through keytab[i].hist_proc */
+ i=0;
+ while ((strncmp(keytab[i].hist_proc,prgm_id,
+ strlen(keytab[i].hist_proc)) != 0) &&
+ (i < NUM_PROC_STEPS)) i++;
+ if (i < NUM_PROC_STEPS) {
+ /* We found a match to prgm_id, so change the associated
+ * keyword in the header. */
+ FITS_update_key(fptr, TSTRING,keytab[i].name,key_value, NULL, &status);
+ } else {
+ /* The given prgm_id did not match any of the known
+ * keytab[i].hist_proc, so return 1. */
+ cf_if_warning("No PROCESSING STEP keyword is defined for %s", prgm_id);
+ return 1;
+ }
+ break;
+ case 'T':
+ /* Timetag mode */
+ /* Find the keyword associated with prgm_id by looping
+ * through keytab[i].ttag_proc */
+ i=0;
+ while ((strncmp(keytab[i].ttag_proc,prgm_id,
+ strlen(keytab[i].ttag_proc)) != 0) &&
+ (i < NUM_PROC_STEPS)) i++;
+ if (i < NUM_PROC_STEPS) {
+ /* We found a match to prgm_id, so change the associated
+ * keyword in the header. */
+ FITS_update_key(fptr, TSTRING,keytab[i].name,key_value, NULL, &status);
+ } else {
+ /* The given prgm_id did not match any of the known
+ * keytab[i].ttag_proc, so return 1. */
+ cf_if_warning("No PROCESSING STEP keyword is defined for %s", prgm_id);
+ return 1;
+ }
+ break;
+ }
+ return status;
+}
diff --git a/src/libcf/cf_read_fpa_pos.c b/src/libcf/cf_read_fpa_pos.c
new file mode 100644
index 0000000..87e8099
--- /dev/null
+++ b/src/libcf/cf_read_fpa_pos.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_read_fpa_pos (fitsfile *infits, float *fpaxsic, float *fpaxlif)
+ *
+ * Description: Returns SiC and LiF FPA positions in microns. Can read both
+ * old and new FPA position keywords.
+ *
+ * Arguments: fitsfile *infile Input data file name
+ * float *fpaxsic FPA SiC position (returned)
+ * float *fpaxlif FPA LiF position (returned)
+ *
+ * Returns: int status CFITSIO status value
+ *
+ * History: 08/21/01 v1.1 wvd Subroutine taken from cf_wfits.c
+ * 01/14/03 v1.3 wvd Change name to cf_read_fpa_pos.
+ * 12/18/03 v1.4 bjg Change calfusettag.h to calfuse.h
+ *
+ ****************************************************************************/
+
+#include <string.h>
+#include "calfuse.h"
+
+/* for all FPA's an increase in "data number" moves the FPA towards +Xipcs */
+#define FPALIF1DN2X0 -69.949 /* DN to microns conversion, zero-point */
+#define FPALIF1DN2X1 .14144 /* DN to microns conversion, linear term */
+#define FPALIF2DN2X0 -73.189 /* DN to microns conversion, zero-point */
+#define FPALIF2DN2X1 .14487 /* DN to microns conversion, linear term */
+#define FPASIC1DN2X0 -132.507 /* DN to microns conversion, zero-point */
+#define FPASIC1DN2X1 .14156 /* DN to microns conversion, linear term */
+#define FPASIC2DN2X0 -89.116 /* DN to microns conversion, zero-point */
+#define FPASIC2DN2X1 .14206 /* DN to microns conversion, linear term */
+
+int cf_read_fpa_pos (fitsfile *infits, float *fpaxsic, float *fpaxlif)
+{
+ char detector[FLEN_VALUE]; /* detector keyword from FITS header */
+ int status=0;
+ float tmpxsic, tmpxlif;
+
+ FITS_read_key(infits, TSTRING, "DETECTOR", detector, NULL, &status);
+
+ /* Get FPA positions */
+ /* Use ffgky instead of FITS_read_key so we can read either the old
+ * or new FPA position keywords */
+ ffgky (infits, TFLOAT, "FPASXPOS", fpaxsic, NULL, &status);
+ if (status != 0) {
+ /* New keywords are not present; must be the old ones.
+ * Determine which detector provided current spectrum
+ * and convert raw FPA position to microns.
+ */
+ status = 0;
+ if (strncmp(detector,"1", 1)==0) {
+ FITS_read_key (infits, TFLOAT, "FP1SXPOS", &tmpxsic, NULL,
+ &status);
+ FITS_read_key (infits, TFLOAT, "FP1LXPOS", &tmpxlif, NULL,
+ &status);
+ *fpaxsic = FPASIC1DN2X0 + FPASIC1DN2X1 * tmpxsic;
+ *fpaxlif = FPALIF1DN2X0 + FPALIF1DN2X1 * tmpxlif;
+ }
+ else if (strncmp(detector,"2", 1)==0) {
+ FITS_read_key (infits, TFLOAT, "FP2SXPOS", &tmpxsic, NULL,
+ &status);
+ FITS_read_key (infits, TFLOAT, "FP2LXPOS", &tmpxlif, NULL,
+ &status);
+ *fpaxsic = FPASIC2DN2X0 + FPASIC2DN2X1 * tmpxsic;
+ *fpaxlif = FPALIF2DN2X0 + FPALIF2DN2X1 * tmpxlif;
+ }
+ else {
+ cf_if_error("Could not parse DETECTOR keyword, cannot "
+ "convert raw FPA positions.");
+ }
+ }
+ else {
+ /* New SiC FPA keyword present. Assume new LiF FPA keyword
+ * is also present */
+ FITS_read_key(infits, TFLOAT, "FPALXPOS", fpaxlif, NULL, &status);
+ }
+ return status;
+}
diff --git a/src/libcf/cf_rebin_background.c b/src/libcf/cf_rebin_background.c
new file mode 100644
index 0000000..23e15f3
--- /dev/null
+++ b/src/libcf/cf_rebin_background.c
@@ -0,0 +1,211 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_rebin_background(infits, aperture, nout, wave_out,
+ * binx, biny, bnx, bny, bimage, barray)
+ *
+ * Arguments: *fitsfile infits : Input IDF file
+ * int aperture : Aperture ID for the analysis
+ * long nout : Length of wave_out array
+ * float wave_out : Wavelength vector
+ * int binx, biny : Binning factors of the background array
+ * int bnx, bny : X and Y dimension of the background array
+ * float bimage : 2-D background image (original)
+ * float barray : (OUTPUT) Binned background image.
+ *
+ * Description:
+ *
+ * The input background image is binned in X.
+ * We need an image binned in wavelength.
+ * To get it, we use the WAVE_CAL file (shifted to account
+ * for the FPA position) to derive a wavelength array for the
+ * background image. For each row in the background image (bimage),
+ * we build a second image (barray) scaled to the size of the output
+ * wavelength bins.
+ *
+ * History 02/21/03 v1.1 rdr Started work
+ * 04/01/03 v1.2 rdr Made aeff arrays double precision in
+ * the cf_read_fluxcal routine to be
+ * compatible with data in calfiles
+ * 05/07/03 v1.4 wvd Don't divide by EXPTIME.
+ * Read WPC from file header.
+ * Use cf_verbose.
+ * 06/02/03 v1.5 rdr Correct bug in filling output arrays
+ * 06/11/03 v1.7 wvd Pass datatype to cf_read_col.
+ * Change calfusettag.h to calfuse.h
+ * 08/22/03 v1.8 bjg Move get_extraction_limits to external
+ * subroutine. Free orphan arrays.
+ * Change coltype from char to int in
+ * cf_read_col.
+ * 08/28/03 v1.9 wvd Debug
+ * 09/29/03 v1.10 wvd Shift background model to match
+ * position of FPA.
+ * 03/16/04 v1.11 wvd Correct error in calculation of dw_ave
+ * and dweff.
+ * 04/05/04 v1.12 wvd Modify i/o.
+ * 04/26/04 v1.13 wvd Do not flux-calibrate 2-D background
+ * model. Do not extract 1-D background
+ * spectrum.
+ * 05/13/04 v1.14 wvd Correct value of CF_PRGM_ID.
+ * 07/21/04 v1.16 wvd Delete unused variables.
+ *
+ *****************************************************************************/
+
+#include <math.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "calfuse.h"
+
+
+int cf_rebin_background(fitsfile *infits, int aperture, long nout,
+ float *wave_out, int binx, int biny, int bnx, int bny,
+ float *bimage, float **barray) {
+
+ char CF_PRGM_ID[] = "cf_rebin_background";
+ char CF_VER_NUM[] = "1.16";
+
+ fitsfile *wavefits ;
+ int status=0;
+ int dndx, dpix, nyout;
+ long npix, npix_out, nwave, ndx, ndx1, ndx2;
+ long i, j, k;
+ float dwb, dw_out, mf, ctot, dw_ave;
+ float dpix_fpa;
+ float *wave, *wavet, *outarr;
+ char wavefile[FLEN_VALUE], det[FLEN_VALUE] ;
+
+ /* Initialize error checking */
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Started execution.");
+
+ /* Read wavelength spacing of the output array */
+ FITS_read_key(infits, TFLOAT, "WPC", &dw_out, NULL, &status) ;
+ cf_verbose(3, "Bin size of the output wavelength array = %5.3f A",
+ dw_out) ;
+ FITS_read_key(infits, TSTRING, "DETECTOR", det, NULL, &status) ;
+ cf_verbose(3,"Detector = %s, aperture = %d", det, aperture) ;
+
+ /* Read wavelength-calibration file */
+ FITS_read_key(infits, TSTRING, "WAVE_CAL", wavefile, NULL, &status) ;
+ cf_verbose(3, "Wavelength calibration file = %s",wavefile) ;
+ FITS_open_file(&wavefits, cf_cal_file(wavefile), READONLY, &status) ;
+ cf_verbose(3, "HDU to read = %d",aperture+1) ;
+ FITS_movabs_hdu(wavefits, aperture +1, NULL, &status) ;
+ nwave=cf_read_col(wavefits,TFLOAT,"WAVELENGTH",(void **) &wave);
+ cf_verbose(3, "Points read = %d, min & max: %4.2f, %4.2f",
+ nwave, wave[0], wave[nwave-1]);
+
+ /* Read pixel shifts due to FPA positions */
+ if (aperture < 5)
+ FITS_read_key(infits, TFLOAT, "FPADXLIF", &dpix_fpa, NULL, &status);
+ else
+ FITS_read_key(infits, TFLOAT, "FPADXSIC", &dpix_fpa, NULL, &status);
+ dpix = cf_nint(dpix_fpa);
+
+ /* To correct for the position of the FPA, each photon has been shifted
+ in X by dpix pixels. Rather than shifting the background to match,
+ we modify the wavelength array that maps the background onto the
+ output spectrum. */
+ cf_verbose(2, "Shifting aperture %d background by %d X pixels "
+ "to match the FPA shift.", aperture, cf_nint(dpix_fpa));
+
+ /* Generate a new wavelength array binned to match the background array */
+ cf_verbose(3, "X and Y binning factors for background array = %d, %d",
+ binx, biny) ;
+
+ wavet = (float *) cf_calloc(bnx, sizeof(float));
+ for (i = 0; i < bnx; i++) {
+ ndx=i * binx + (binx/2) + dpix;
+ if (ndx > nwave-1) ndx = nwave-1 ;
+ if (ndx < 0) ndx = 0;
+ wavet[i] = wave[ndx];
+ }
+
+ /* Error check: average wavelength spacing */
+ dw_ave = fabs(wavet[bnx-1]-wavet[0])/(bnx-1);
+ cf_verbose(3,"Average wavelength spacing of background array = %f", dw_ave) ;
+
+ if ((aperture < 4 && strncmp(det,"1",1) == 0) ||
+ (aperture > 4 && strncmp(det,"2",1) == 0)) {
+ cf_verbose(3, "Maximum tabulated wavelength = %.2f", wavet[bnx-1]);
+ cf_verbose(3, "Maximum of wave_out = %.2f", wave_out[nout-1] );
+ }
+ else {
+ cf_verbose(3, "Maximum tabulated wavelength = %.2f", wave_out[nout-1] );
+ cf_verbose(3, "Maximum of wave_out = %.2f", wave_out[nout-1] );
+ }
+
+ /* Define some sizes and allocate space for the output arrays */
+ nyout = bny * biny ; /* Y dimension of output 2-D bkgd array */
+ npix_out = nout * nyout ; /* Size of output 2-D bkgd array */
+ npix = bnx * bny ; /* Size of input 2-D bkgd array */
+ outarr = (float *) cf_calloc(npix_out, sizeof(float) ); /* 2-D output array */
+
+ /* Error check: total counts in the background image */
+ ctot=0.;
+ for (i=0; i<npix; i++) ctot+=bimage[i] ;
+ cf_verbose(3, "Number of counts in the input bkgd image = %f",ctot) ;
+
+ /* For each wavelength in the output array, find the nearest point
+ in the input background array. Scale its value by the relative
+ sizes of the background and output wavelength bins.
+
+ Remember: wavelengths for the Lif channels and the SiC channels run
+ in opposite directions. For side one, wavelengths increase
+ with index for Lif but decrease for SiC. The opposite is true
+ for side two. */
+ ndx=0 ;
+ dndx = 1 ;
+ if ((aperture < 4 && strncmp(det,"2",1) == 0) ||
+ (aperture > 4 && strncmp(det,"1",1) == 0 ) ) {
+ ndx = bnx - 1 ;
+ dndx = -1 ;
+ }
+
+ cf_verbose(3,"Filling output: starting ndx=%d, increment =%d ", ndx, dndx) ;
+
+ dwb = dw_ave;
+ for (i=0; i<nout; i++) {
+ /* Locate the element of the bkgd array corresponding to this wavelength */
+ while (wavet[ndx] < wave_out[i] && ndx < bnx && ndx >= 0) ndx += dndx ;
+
+ /* compute the relative
+ wavelength coverage of the background and output arrays */
+ if (ndx < bnx-2) dwb = fabs((double) (wavet[ndx+1]-wavet[ndx])) ;
+ mf = dw_out/dwb ;
+ /* correct the scale factor for binning in y */
+ mf /= biny ;
+ /* populate the column of the array */
+ for (j=0; j< nyout ; j++) {
+ k = j/biny ;
+ ndx1 = j*nout + i ;
+ if (ndx1 > npix_out-1) ndx1 = npix_out-1 ;
+ ndx2 = k*bnx + ndx ;
+ if (ndx2 > npix-1) ndx2=npix-1 ;
+ outarr[ndx1] = mf * bimage[ndx2] ;
+ }
+ }
+
+
+ /* Error checking: total counts in the background image */
+ ctot=0.;
+ for (i=0; i<npix_out; i++) ctot+=outarr[i] ;
+ cf_verbose(3, "Number of counts in the output bkgd image = %f", ctot) ;
+
+
+ /* Return output arrays */
+ *barray = outarr ;
+
+ /* Close wavelength calibration file */
+ FITS_close_file(wavefits, &status) ;
+
+ free(wave);
+ free(wavet);
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished execution.");
+ return status;
+}
diff --git a/src/libcf/cf_rebin_probability_array.c b/src/libcf/cf_rebin_probability_array.c
new file mode 100644
index 0000000..285441e
--- /dev/null
+++ b/src/libcf/cf_rebin_probability_array.c
@@ -0,0 +1,180 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_rebin_probability_array(infits, extended, aperture, nout,
+ * wave_out, pny, pycent, parray)
+ *
+ * Arguments: *fitsfile infits : Input IDF file
+ * int extended : TRUE if target is extended
+ * int aperture : Aperture ID for the analysis
+ * long nout : number of output wavelength bins
+ * float wave_out : output wavelength vector
+ * int pny : y dimension of probability array
+ * float pycent : y position of the peak of the
+ * probability array
+ * float parray : probability array
+ *
+ * History: 02/20/03 v1.1 rdr Started work
+ * 04/03/03 v1.2 rdr Normalize so that integral along y
+ * at each sample point is 1
+ * 06/02/03 v1.3 rdr Correct error in filling output array
+ * 09/30/03 v1.5 wvd Use cf_read_col to read WAVE_CAL.
+ * 03/22/04 v1.6 wvd Change pycent from int to float.
+ * 03/23/04 v1.7 wvd Shift weights array to account for
+ * FPA shifts.
+ * 06/14/04 v1.8 wvd Because the weights array is defined
+ * wrt the FARF, we need not correct
+ * for FPA shifts here.
+ * 05/17/05 v1.9 wvd Don't normalize regions where the
+ * total probability is less than 0.1.
+ * Set them to zero.
+ * 06/15/05 v1.10 wvd BUG FIX: Program always read the
+ * probability arrays for point-source
+ * targets from the WGTS_CAL file. Now
+ * it distinguishes between point-source
+ * and extended targets.
+ *
+ *****************************************************************************/
+
+#include <math.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "calfuse.h"
+
+int cf_rebin_probability_array(fitsfile *infits, int extended, int aperture,
+ long nout, float *wave_out, int *pny, float *pycent, float **parray)
+{
+
+ char CF_PRGM_ID[] = "cf_rebin_probability_array";
+ char CF_VER_NUM[] = "1.10";
+
+ fitsfile *wgtsfits, *wavefits ;
+ int status=0, fpixel=1, nullval=0, anynull=0 ;
+ int hdu, nxwt, nywt, dndx, wtbin;
+ long npix, npix_out, nwave, ndx, ndx1, ndx2, i, j ;
+ float *wave, *wavet, *wgts_arr, *ynorm, *outarr ;
+ float total, wgt_cent ;
+ char wgtsfile[FLEN_VALUE]={'\0'}, wavefile[FLEN_VALUE]={'\0'} ;
+ char buffer[FLEN_CARD], det[FLEN_CARD] ;
+
+ /* Initialize error checking */
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Started execution.");
+
+ /* Read calibration file names from the IDF file header. */
+ FITS_movabs_hdu(infits, 1, NULL, &status) ;
+ FITS_read_key(infits, TSTRING, "WGTS_CAL", wgtsfile, NULL, &status) ;
+ cf_verbose(3,"weights cal file = %s ",wgtsfile) ;
+ FITS_read_key(infits, TSTRING, "WAVE_CAL", wavefile, NULL, &status) ;
+ cf_verbose(3, "wavelength cal file = %s ",wavefile) ;
+ FITS_read_key(infits, TSTRING, "DETECTOR", det, NULL, &status) ;
+ cf_verbose(3,"Detector = %s ",det) ;
+
+ /* Open the weights file and read the array */
+ FITS_open_file(&wgtsfits, cf_cal_file(wgtsfile), READONLY, &status) ;
+ hdu = extended * 8 + aperture + 1;
+ cf_verbose(3, "WGTS_CAL: extended = %d, aperture = %d, hdu = %d",
+ extended, aperture, hdu);
+ FITS_movabs_hdu(wgtsfits, hdu, NULL, &status) ;
+ FITS_read_key(wgtsfits, TINT, "NAXIS1", &nxwt, buffer, &status) ;
+ FITS_read_key(wgtsfits, TINT, "NAXIS2", &nywt, buffer, &status) ;
+ FITS_read_key(wgtsfits, TFLOAT, "WGT_CENT", &wgt_cent, buffer, &status) ;
+ npix=nxwt * nywt ;
+ cf_verbose(3, "prob array: nx=%d, ny=%d, wgt_cent=%f ",nxwt, nywt, wgt_cent);
+ wgts_arr = (float *) calloc(npix, sizeof(float)) ;
+ FITS_read_img(wgtsfits, TFLOAT, fpixel, npix, &nullval, wgts_arr,
+ &anynull, &status) ;
+ FITS_close_file(wgtsfits, &status) ;
+
+ /* Read the wavelength array */
+ FITS_open_file(&wavefits, cf_cal_file(wavefile), READONLY, &status) ;
+ FITS_movabs_hdu(wavefits, aperture +1, NULL, &status) ;
+ nwave=cf_read_col(wavefits,TFLOAT,"WAVELENGTH", (void **) &wave);
+ FITS_close_file(wavefits, &status) ;
+
+ /* Determine the binning factor for the weights and generate a new
+ wavelength array that corresponds to the binning factor used. */
+ wtbin = NXMAX / nxwt ;
+ cf_verbose(3, "Binning factor for weights array = %d ", wtbin) ;
+ wavet = (float *) cf_calloc(nxwt, sizeof(float) ) ;
+ for (i=0; i<nxwt; i++) {
+ ndx=i * wtbin + (wtbin/2);
+ if (ndx > nwave-1) ndx = nwave-1 ;
+ if (ndx < 0) ndx = 0 ;
+ wavet[i] = wave[ndx] ;
+ }
+
+ /* Allocate space for the output array */
+ npix_out = nout * nywt ;
+ if ((aperture < 4 && strncmp(det,"1",1) == 1) ||
+ (aperture > 4 && strncmp(det,"2",1) == 1))
+ cf_verbose(3, "maximum tabulated wavelength = %g, "
+ "maximum of wave_out=%g", wavet[nxwt-1],wave_out[nout-1] );
+ else
+ cf_verbose(3, "maximum tabulated wavelength = %g, "
+ "maximum of wave_out=%g", wavet[0],wave_out[nout-1] );
+ outarr = (float *) cf_calloc(npix_out, sizeof(float)) ;
+
+ /* Fill in the output array - use the weight profile which is closest
+ to the individual wavelengths in the output wavelength array.
+ Remember : the Lif channels and the SiC channels have wavelengths
+ that run in opposite directions, e.g. for side 1 wavelengths
+ increase with index for Lif but decrease for SiC. The opposite is
+ true for side 2. */
+
+ ndx=0 ;
+ dndx = 1 ;
+ if ((aperture < 4 && strncmp(det,"2",1) == 0) ||
+ (aperture > 4 && strncmp(det,"1",1) == 0 ) ) {
+ ndx = nxwt - 1 ;
+ dndx = -1 ;
+ }
+
+ cf_verbose(3, "filling output: starting index = %d, increment = %d ",
+ ndx, dndx) ;
+
+ for (i=0; i<nout; i++) {
+ /* locate the wavelength corresponding to this entry */
+ while (wavet[ndx] < wave_out[i] && ndx <= nxwt-1 && ndx >= 0 )
+ ndx += dndx ;
+ /* populate the column of the array */
+ for (j=0; j<nywt ; j++) {
+ ndx1 = j*nout + i ;
+ if (ndx1 > npix_out-1) ndx1 = npix_out-1 ;
+ ndx2 = j*nxwt + ndx ;
+ if (ndx2 > npix-1) ndx2=npix-1 ;
+ outarr[ndx1] = wgts_arr[ndx2] ;
+ }
+ }
+
+ /* Adjust the probabilities so that the integral along y at every
+ wavelength position is 1 */
+
+ /* First sum the points along y (ynorm) at each point */
+ ynorm= (float *) cf_calloc(nout, sizeof(float)) ;
+ for (i=0; i<nout; i++) {
+ total=0. ;
+ for (j=0; j<nywt; j++) total += outarr[j*nout+i] ;
+ ynorm[i]=total ;
+ }
+
+ /* Normalize all points by dividing by the total */
+ for (i=0; i<nout; i++) {
+ if (ynorm[i] > 0.1)
+ for (j=0; j<nywt; j++) outarr[j*nout+i] /= ynorm[i] ;
+ else
+ for (j=0; j<nywt; j++) outarr[j*nout+i] = 0. ;
+ }
+
+ /* Redirect the output pointers. */
+ *pny = nywt ;
+ *pycent = wgt_cent ;
+ *parray = outarr ;
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished execution.");
+ return status;
+}
diff --git a/src/libcf/cf_satellite_jitter.c b/src/libcf/cf_satellite_jitter.c
new file mode 100644
index 0000000..9f3a5d9
--- /dev/null
+++ b/src/libcf/cf_satellite_jitter.c
@@ -0,0 +1,245 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center for Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_satellite_jitter infile, nevents, time, x, y, channel,
+ * nsec, ttime, status_flag)
+ *
+ * Description: Correct photon coordinates for spacecraft motion.
+ *
+ * Operates only on point-source observations made in TTAG mode.
+ * Only photon events in the target aperture are corrected.
+ * Minimum trustworthy TRKFLG value is read from parameter file.
+ *
+ * Key to new TRKFLG values:
+ * 5 = dx, dy from known FPDs and q_cmd from telemetry
+ * 4 = good dx, dy from ACS q_est and q_cmd from telemetry
+ * 3 = maybe good dx, dy from ACS q_est
+ * 2 = dx, dy from known FPDs, but q_cmd from FITS header coords
+ * 1 = dx, dy from ACS q_est, but q_cmd from FITS header coordis
+ * 0 = no pointing information (missing telemetry)
+ * -1 = pointing is assumed to be bad (never achieved known track)
+ *
+ * Arguments: fitsfile infile Pointer to the IDF
+ * long nevents The number of events
+ * float *time An array of event times
+ * float *x An array of event X positions
+ * float *y An array of event Y positions
+ * unsigned char *channel Channel assignment for each photon
+ * long nsec Number of seconds in the timeline
+ * long *ttime time (sec) of each point in the timeline
+ * unsigned char *status_flag Timeline status flags
+ *
+ * Returns: 0 upon success
+ *
+ * History: 09/12/02 v1.1 RDR Adapted from cf_ttag_jitter
+ * 10/02/02 v1.2 RDR Modified to be compatable with
+ * new IDF file format
+ * 12/10/02 v1.3 RDR Adjusted method of populating the
+ * timeline jitter status flag.
+ * 12/13/02 v1.4 RDR Exit gracefully if there is no jitr file
+ * 03/01/03 v1.6 wvd Correct use of pointer in FITS_read_key
+ * 04/07/03 v1.7 wvd Confirm that TRKFLG <= 5.
+ * Replace printf with cf_verbose.
+ * 04/14/03 v1.8 rdr Changed flag from char to unsigned char
+ * 04/22/03 v1.9 wvd Move only photons in target aperture.
+ * Do not assume that ttime is continuous.
+ * 04/29/03 v1.10 wvd Allow possiblity that jitter
+ * filename is in lower-case letters.
+ * 05/20/03 v1.11 rdr Added call to cf_proc_check
+ * 05/22/03 v1.12 wvd Direct cf_error_init to stderr
+ * 07/11/03 v1.13 rdr Set all points as bad if JIT_STAT=1
+ * (no reference position found)
+ * 08/06/03 v1.14 wvd Improve documentation, delete
+ * comparison with GTI's, change channel
+ * array to unsigned char.
+ * 08/29/03 v1.15 wvd Set all points as bad if JIT_STAT != 0
+ * 09/18/03 v1.16 wvd Print name of jitter file only if
+ * the file exists.
+ * 10/03/03 v1.17 wvd Check HKEXISTS before looking for
+ * jitter file.
+ * 02/12/04 v1.18 wvd Make interpolation immune
+ * to errors in jitter time array.
+ * 02/24/04 v1.19 rdr Change limits of acceptable jitter
+ * values
+ * 03/01/04 v1.20 rdr Populate the PLATESC keyword in the
+ * input file header
+ * 06/01/04 v1.21 bjg Exit when keyword JIT_STAT not found.
+ * 06/07/04 v1.22 wvd Return EXP_JITR to calling routine.
+ * 01/26/05 v1.23 wvd Fix tiny bug in a verbose stmt.
+ * 04/05/05 v1.24 wvd If JIT_STAT != 0, APERTURE = RFPT,
+ * or target = airglow, exit without
+ * flagging any times as bad.
+ * Use new TRKFLG values (see above).
+ * Delete adjust_trkflg subroutine and
+ * the J_TRKFLG and JTIMEGAP keywords.
+ * Use cf_read_col to read jitter file.
+ * 07/06/05 v1.25 wvd If JIT_VERS < 2.0, issue a warning.
+ * 11/29/05 v1.26 wvd Move screening functions into
+ * cf_screen_jitter.
+ * 08/21/06 v1.27 wvd Use EXPSTART in jitter and data
+ * headers to correct jitter time array.
+ * 08/25/06 v1.28 wvd Change meaning of TRKFLG values.
+ * TRKFLG = 3 is only used internally.
+ * 11/06/06 v1.29 wvd Change meaning of TRKFLG values.
+ * Read APER_COR keyword in file header.
+ * Read min TRKFLG value from parmfile.
+ * Don't have to test observing mode.
+ * 03/23/07 v1.30 wvd Store offset between the jitter and
+ * data values of EXPSTART in variable
+ * time_diff.
+ * 04/07/07 v1.31 wvd Clean up compiler warnings.
+ *
+ ****************************************************************************/
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include "calfuse.h"
+
+int
+cf_satellite_jitter(fitsfile *infits, long nevents, float *time,
+ float *x, float *y, unsigned char *channel, long nsec,
+ float *ttime, unsigned char *status_flag)
+{
+ char CF_PRGM_ID[] = "cf_satellite_jitter";
+ char CF_VER_NUM[] = "1.31";
+
+ fitsfile *jitfits, *parmfits;
+ char det[FLEN_VALUE];
+ char jitr_cal[FLEN_VALUE], parmfile[FLEN_VALUE];
+ char comment[FLEN_COMMENT];
+ short c, *trkflg, trkflg_min;
+ int active_ap[2], extended, status=0, hdutype;
+ long j, k, njitr, nrej, *time_jit, time_diff;
+ double data_expstart, jitr_expstart;
+ float *dx_jit, *dy_jit, x_factor, y_factor;
+ float *dx_tt, *dy_tt;
+ float factor[2][4] = {{1.743,1.743,-1.743, -1.743},
+ {1.154,1.163,-0.6335,-0.581}};
+
+ /* Initialize error checking */
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+ /* Enter a time stamp into the log */
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ /* Read exposure start time from IDF header */
+ FITS_read_key(infits, TDOUBLE, "EXPSTART", &data_expstart, NULL, &status);
+
+ /* If APER_COR is not set to "COMPLETE", exit now. */
+ FITS_read_key(infits, TSTRING, "APER_COR", comment, NULL, &status);
+ if (strncmp(comment, "COMPLETE", 8)) {
+ cf_verbose(1, "APER_COR = %s. Omitting photon shift.", comment);
+ cf_proc_update(infits, CF_PRGM_ID, "SKIPPED");
+ return (status);
+ }
+
+ /* If target is an extended source, exit now. */
+ extended = cf_source_aper(infits, active_ap);
+ if (extended) {
+ cf_verbose(1, "Extended source. Omitting photon shift.");
+ cf_proc_update(infits, CF_PRGM_ID, "SKIPPED");
+ return (status);
+ }
+
+ /* Determine the scale factor to convert arcseconds to pixels. */
+ FITS_read_key(infits, TSTRING, "DETECTOR", det, NULL, &status);
+ c = det[0] =='2'? 2: 0;
+ if (det[1] == 'B')
+ c++;
+ x_factor=factor[0][c];
+ y_factor=factor[1][c];
+
+ /* Update the PLATESC (plate scale) keyword in the header */
+ FITS_update_key(infits, TFLOAT, "PLATESC", &y_factor, NULL, &status);
+
+ cf_verbose(3, "Arcsec to pixels: X = %5.3f\tY = %5.3f",
+ x_factor, y_factor);
+
+ /* Try to open the jitter file. */
+ FITS_read_key(infits, TSTRING, "JITR_CAL", jitr_cal, NULL, &status);
+ fits_open_file(&jitfits, jitr_cal, READONLY, &status);
+
+ /* If the jitter file is not found, try a lower-case filename. */
+ if (status != 0) {
+ status = 0;
+ jitr_cal[0] = (char) tolower(jitr_cal[0]);
+ fits_open_file(&jitfits, jitr_cal, READONLY, &status);
+ }
+
+ /* Read exposure start time from jitter file header */
+ FITS_read_key(jitfits, TDOUBLE, "EXPSTART", &jitr_expstart, NULL, &status);
+
+ /* Allocate space for correction arrays */
+ dx_tt = (float *) cf_calloc(nsec, sizeof(float));
+ dy_tt = (float *) cf_calloc(nsec, sizeof(float));
+
+ /* Read the jitter file. */
+ FITS_movabs_hdu(jitfits, 2, &hdutype, &status);
+ njitr=cf_read_col(jitfits, TLONG, "TIME", (void **) &time_jit);
+ njitr=cf_read_col(jitfits, TFLOAT, "DX", (void **) &dx_jit);
+ njitr=cf_read_col(jitfits, TFLOAT, "DY", (void **) &dy_jit);
+ njitr=cf_read_col(jitfits, TSHORT, "TRKFLG", (void **) &trkflg);
+ FITS_close_file(jitfits, &status);
+
+ /* Read minimum acceptable TRKFLG value from PARM_CAL file */
+ FITS_read_key(infits, TSTRING, "PARM_CAL", parmfile, NULL, &status);
+ FITS_open_file(&parmfits, cf_parm_file(parmfile), READONLY, &status);
+ FITS_read_key(parmfits, TSHORT, "TRKFLG", &trkflg_min, NULL, &status);
+ FITS_close_file(parmfits, &status);
+
+ /* Correct for difference in data and jitter EXPSTART times */
+ time_diff = cf_nlong((data_expstart - jitr_expstart) * 86400.);
+ for (j=0; j< njitr; j++) time_jit[j] -= time_diff;
+
+ /*
+ * Map times in the jitter file to times in the timeline table
+ * and calculate the jitter offsets.
+ */
+ for (j=k=0; k < nsec; k++) {
+ while ((float) time_jit[j+1] < ttime[k] && j+1 < njitr) j++;
+ if (trkflg[j] >= trkflg_min) {
+ dx_tt[k] = x_factor * dx_jit[j];
+ dy_tt[k] = y_factor * dy_jit[j];
+ }
+ }
+ /*
+ * Map times in the timeline table to the times associated
+ * with individual photons and apply the appropriate shifts.
+ * Move only photons in the active aperture and for which the
+ * timeline status jitter flag has not been set.
+ * Record number of rejected events.
+ * Note: active_ap[0] = lif, active_ap[1] = sic
+ */
+ nrej = 0;
+ for (j=k=0; j<nevents; j++) {
+ while (ttime[k+1] - FRAME_TOLERANCE < time[j] && k+1 < nsec) k++;
+ if (channel[j] == active_ap[0] || channel[j] == active_ap[1]) {
+ if (status_flag[k] & TEMPORAL_JITR) nrej++;
+ else {
+ x[j] += dx_tt[k];
+ y[j] += dy_tt[k];
+ }
+ }
+ }
+
+ /* Write to trailer file */
+ cf_verbose(2, "Rejected %ld photons from target aperture", nrej);
+
+ /* Deallocate storage space */
+ free(time_jit);
+ free(dx_jit);
+ free(dy_jit);
+ free(trkflg);
+ free(dx_tt);
+ free(dy_tt);
+
+ cf_proc_update(infits, CF_PRGM_ID, "COMPLETE");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished processing");
+
+ return (status);
+}
diff --git a/src/libcf/cf_scale_bkgd.c b/src/libcf/cf_scale_bkgd.c
new file mode 100644
index 0000000..556c0c7
--- /dev/null
+++ b/src/libcf/cf_scale_bkgd.c
@@ -0,0 +1,956 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_scale_bkgd(infits, nevents, x_in, y_in, w_in, channel,
+ * timeflags, locflags, ngood, good_index, dtime, ntime,
+ * &binx, &biny, &nx_lif, &ny_lif,
+ * &ymin_lif, img_lif, &nx_sic, &ny_sic, &ymin_sic, &img_sic)
+ *
+ * Arguments: *fitsfile infits Input IDF file
+ * long nevents Number of photon events recorded
+ * float x_in, y_in Coordinates of each photon
+ * float w_in Weighting factor for each photon
+ * unsigned char channel Aperture ID for each photon
+ * unsigned char timeflags Photon status flags regarding time
+ * unsigned char locflags Photon status flags regarding location
+ * long ngood Number of good photons
+ * long good_index List of indices for the good photons
+ * long dtime Length of the daytime exposure
+ * long ntime Length of the night time exposure
+ * int binx, biny Binning factors of the background
+ * array along the X and Y axes
+ * int nx_lif, nx_sic X Size of background array
+ * int ny_lif, ny_sic Y Size of background array
+ * int ymin_lif, ymin_sic Y value corresponding to the
+ * first row of the bkgd image
+ * float *img_lif, *img_sic 2D background image (binned)
+ *
+ * Description:
+ * (a) Determine the total counts in a background sample region for data
+ * taken during the night and during the day. Use the data in the
+ * IDF event list, after screening out the geocoronal lines.
+ * (b) Read estimated intrinsic count rates from the background characterization
+ * file and estimate the intrinsic counts in the background region from
+ * the exposure times and number of pixels in the region.
+ * (c) Subtract the estimated intrinsic counts from the measured total to
+ * get an estimate of the scattered light contribution for both day
+ * and night portions of the observation
+ * (d) Use the scattered light counts to scale daytime and night background
+ * images obtained from the background calibration files
+ * (e) Combine the two background images to obtain the final background model
+ *
+ * A previous assumption that the intrinsic background is constant was
+ * found to be incorrect. The program now iterates the assumed intrinsic
+ * background count rate (assumed constant in day and night) and checks the
+ * calculated model against the observations by comparing the intensity
+ * variations along the x direction. In this comparison, we mask out regions
+ * that are affected by geocoronal contamination.
+ *
+ * Caveats: The "intrinsic" component of the background is neither intrinsic
+ * nor constant in day and night. It is better called the "spatially uniform"
+ * component and should be computed independently for day and night portions
+ * of the exposure. wvd 01/24/2006
+ *
+ * History: 01/11/03 v1.1 rdr Started work - adapted program
+ * from cf_make_ttag_bkgd
+ * 03/01/03 v1.3 wvd Correct use of pointer in FITS_read_key
+ * 03/11/03 v1.4 wvd Update documentation regarding use of
+ * unsigned char.
+ * 03/28/03 v1.5 rdr corrected error in freeing storage
+ * 03/31/03 v1.6 rdr corrected error in assigning subarrays
+ * for lif and sic apertures
+ * 05/08/03 v1.7 rdr read limits to the background region
+ * from the header of the IDF. Also
+ * changed print statements to cf_verbose.
+ * 05/20/03 v1.8 rdr - Make a model using only exposure time
+ * if no background sample regions have
+ * been specified (generally for HIST data)
+ * - Look into parm file to determine
+* whether to generate a background model
+ * 05/22/03 v1.9 rdr Correct problems occuring when exptime=0
+ * 06/04/03 v1.10 rdr Change method for determining limits of
+ * output arrays
+ * 09/08/03 v1.12 wvd Use cf_read_col in get_limits()
+ * 09/29/03 v1.13 wvd Fix bug in population of 2-D bkgd
+ * array; clean up i/o.
+ * 10/07/03 v1.14 wvd Reject airglow photons using a
+ * bit-wise comparison of locflags.
+ * 10/31/03 v1.15 wvd Increase aperture pad from 10 to 15.
+ * Change channel to unsigned char.
+ * 10/31/03 v1.16 wvd Use cf_read_col in get_geocoronal_mask()
+ * 03/22/04 v1.17 wvd Change get_limits so that sizes of
+ * bkgd and probability arrays are equal.
+ * 04/08/04 v1.18 bjg Replace NXMAX by nx
+ * Remove unused variables
+ * Change format in printf to match
+ * arg type.
+ * 04/27/04 v1.19 wvd Replace RUN_MKBK with RUN_BKGD
+ * throughout.
+ * 07/01/04 v1.20 wvd Fix bug: nxb was undefined for
+ * RUN_BKGD = NO.
+ * 03/08/05 v1.21 wvd Convert to cf_scale_bkgd.
+ * Treat data and models the same way.
+ * Modify get_xvar_img. Add
+ * make_bad_pixel_mask and sum_good_pixels.
+ * 06/15/05 v1.22 wvd BUG FIX: get_limits always read the
+ * probability arrays for point-source
+ * targets from the WGTS_CAL file. Now
+ * it distinguishes between point-source
+ * and extended targets.
+ * 01/20/06 v1.23 wvd BUG FIX: Apply uniform X limits to
+ * data and background models.
+ * BUG FIX: Allow output bkgd images
+ * to fall off the detector if target
+ * centroid requires it.
+ * 01/24/06 v1.24 wvd BUG FIX: Test y coordinate of photon
+ * before adding it to the data image.
+ * 02/01/06 v1.25 wvd BUG FIX: Make npix a long in
+ * sum_good_pixels. Correct error in
+ * extraction of sub-arrays.
+ *
+ ****************************************************************************/
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include "calfuse.h"
+
+
+/*********************************************************************
+ *
+ * GET_XVAR_IMG
+ *
+ * Subroutine to compute the intensity variation along the X direction
+ * of a background image. Pixels flagged as bad are excluded.
+ * bkgimg = image from which to extract the data
+ * maskimg = mask for data image (1 = good pixel)
+ * nxb = size of bkgimg in x
+ * nxsam = number of elements in the xvars array
+ * xvars = array of x variations
+ *
+ ***********************************************************************/
+
+
+int
+get_xvar_img(float *bkgimg, float *maskimg, int nxb, int nxsam, float *xvars)
+{
+ int nbin;
+ long i, j;
+
+ nbin = nxb/nxsam ;
+ for (i = 0; i < NYMAX; i++)
+ for (j = 0; j < nxb; j++)
+ xvars[j/nbin] += bkgimg[i*nxb+j] * maskimg[i*nxb+j];
+
+ return 0 ;
+}
+
+/*********************************************************************
+ *
+ * MAKE_MODEL
+ *
+ * Subroutine to combine a day and night calibration image to generate the
+ * final background model:
+ * npix = number of pixels in the full background image
+ * nsam = number of pixels in the background regions of the detector
+ * nxb = size of the x dimension of the background images
+ * intcr = assumed intrinsic count rate
+ * expnight, expday = exposure times during the night and day
+ * data_sum_night, data_sum_day = sum of weights within the background
+ * sample regions for night and day exposures
+ * model_sum_night, model_sum_day = number of counts in the unscaled
+ * night and day background calibration images
+ * - background regions only
+ * bkgimgn = image containing the night calibration image.
+ * bkgimgd = image containing the daytime calibration image
+ * bkgimg = final background image
+ * maskimg = mask defining good background regions
+ *
+ *****************************************************************************/
+
+int
+make_model(long npix, long nsam, int nxb, float intcr, float expnight,
+ float expday, double data_sum_night, double data_sum_day,
+ double model_sum_night, double model_sum_day,
+ float *bkgimgn, float *bkgimgd, float *bkgimg, float *maskimg)
+{
+ int bin_size ;
+ long i;
+ float int_counts;
+ float sfd, sfn, intnight, intday, scatnight, scatday ;
+
+ /* bin_size = binning factor of the background image */
+ bin_size = NXMAX / nxb ;
+
+ cf_verbose(3, "\n\tConstructing the background model\n") ;
+ cf_verbose(3, "total counts in the data: night= %.1f, day = %.1f",
+ data_sum_night, data_sum_day);
+ cf_verbose(3, "intrinsic count rate = %.2f x 10^-7 ",intcr ) ;
+ cf_verbose(3, "exptime night = %.1f, exptime day = %.1f ",
+ expnight, expday );
+
+ /* Sum the intrinsic background counts */
+ intnight = nsam * bin_size * intcr * expnight * 1.e-7 ;
+ intday = nsam * bin_size * intcr * expday * 1.e-7 ;
+ cf_verbose(3, "total intrinsic counts: night= %.1f , day= %.1f ",
+ intnight, intday) ;
+
+ /* Sum of scattered light in data (measured - intrinsic) */
+ scatnight = data_sum_night - intnight ;
+ if (scatnight <= 0.) scatnight = 0. ;
+ scatday = data_sum_day - intday ;
+ if (scatday <= 0.) scatday = 0. ;
+ cf_verbose(3, "total scattered light count: night = %.1f, day = %.1f",
+ scatnight, scatday);
+ cf_verbose(3, "total counts in unscaled background model: "
+ "night = %.2f, day = %.2f", model_sum_night, model_sum_day);
+
+ /* Calculate the scale factor for the night scattered light image */
+ sfn = 0. ;
+ if (model_sum_night > 0) sfn = scatnight / model_sum_night ;
+
+ /* Calculate the scale factor for the day scattered light image */
+ sfd = 0. ;
+ if (model_sum_day > 0) sfd = scatday / model_sum_day ;
+ cf_verbose(3, "scale factors for background images: "
+ "night = %.1f, day = %.1f ", sfn, sfd) ;
+
+ /* Calculate the intrinsic counts per binned pixel */
+ int_counts = bin_size * intcr * (expnight + expday) * 1.e-7 ;
+ cf_verbose(3, "intrinsic counts per binned pixel = %.6f ", int_counts ) ;
+
+ /* Use the scattered light scaling factors and the tabulated intrinsic
+ count rate to model the final background image */
+
+ for (i = 0; i < npix; i++)
+ bkgimg[i] = (sfn * bkgimgn[i]) + (sfd * bkgimgd[i]) + int_counts;
+
+ return 0 ;
+}
+
+
+/*********************************************************************
+ *
+ * MAKE_MODEL_EXPTIME :
+ *
+ * Subroutine to combine a day and night calibration image based on
+ * exposure times only to generate the final background model:
+ * npix = total number of pixels in the image
+ * nxb = length of the x axis in the background images
+ * intcr = assumed intrinsic count rate
+ * expnight, expday = exposure times during the night and day
+ * bkging = image containing the night calibration image.
+ * bkgimgd = image containing the daytime calibration image
+ * bkgimg = final background model
+ *
+ *********************************************************************/
+
+
+int
+make_model_exptime(long npix, int nxb, float intcr, float expnight,
+ float expday, float *bkgimgn, float *bkgimgd, float *bkgimg)
+{
+
+ int i, bin_size ;
+ float intnight, intday ;
+
+ /* Compute the binning factor in x */
+ bin_size = NXMAX/nxb ;
+
+ /* Calculate the expected intrinsic counts in the background */
+ intnight = bin_size * intcr * expnight * 1.e-7 ;
+ intday = bin_size * intcr * expday * 1.e-7 ;
+
+ /* Combine the day and night images based on exposure times */
+ for (i=0 ; i<npix ; i++)
+ bkgimg[i] = intnight + intday + bkgimgn[i]*expnight + bkgimgd[i]*expday ;
+
+ return 0 ;
+}
+
+/*****************************************************************************
+ *
+ * MAKE_BAD_PIXEL_MASK :
+ *
+ * Produces a mask the same size as the background image.
+ * Good pixels are flagged with 1 and bad pixels with 0. Bad pixels are
+ * - all pixels that are NOT in the user-selected background regions;
+ * - all pixels containing airglow lines (from AIRG_CAL); and
+ * - all pixels lying outside of the active area of the detector.
+ * bkgd_num = number of background regions
+ * ylim - limits of background regions
+ * npix = number of pixels in the background array
+ * nxb = dimension of the x axis of the array
+ * maskimg = array to contain the mask (must be initialized to zero)
+ * nsam = number of good pixels in the mask
+ *
+ ****************************************************************************/
+
+int
+make_bad_pixel_mask (fitsfile *infits, int bkgd_num, short *ylim,
+ long npix, int nxb, float *maskimg, long *nsam)
+{
+
+ int nbin;
+ int xmin,xmax,ymin,ymax ;
+ long nrow, ndx, i, j, k, n_air, n_good;
+ short *gxmin, *gxmax, *gymin, *gymax ;
+
+ /* Compute the binning factor in x */
+ nbin = NXMAX/nxb;
+
+ /* Ignore regions near the detector edges. */
+ xmin = 2048 / nbin;
+ xmax = 14336 / nbin;
+
+ /* Flag all pixels in the user-defined background regions as good (1). */
+ for (i = 0; i < bkgd_num; i++)
+ for (j = ylim[2*i]; j <= ylim[2*i+1]; j++)
+ for (k = xmin; k < xmax; k++) {
+ ndx = (long) (j*nxb+k) ;
+ maskimg[ndx] = 1.;
+ }
+
+ /* Read the positions of the geocoronal lines. */
+ nrow = cf_get_geocorona(infits, &gxmin, &gxmax, &gymin, &gymax);
+ cf_verbose(3, "Number of geocoronal lines = %ld", nrow) ;
+
+ /* Flag pixels affected by geocoronal lines as bad (0). */
+ n_air = 0;
+ for (i=0; i<nrow; i++) {
+ xmin = gxmin[i] / nbin ;
+ xmax = gxmax[i] / nbin ;
+ ymin = gymin[i] ;
+ ymax = gymax[i] ;
+ for (j=ymin; j<ymax; j++)
+ for (k=xmin; k<xmax; k++) {
+ ndx = j * nxb + k ;
+ if (maskimg[ndx] > 0) {
+ maskimg[ndx] = 0. ;
+ n_air++ ;
+ }
+ }
+ }
+
+ free(gxmin);
+ free(gxmax);
+ free(gymin);
+ free(gymax);
+
+ cf_verbose(3, "Number of bkgd pixels affected by geocoronal lines = %ld",
+ n_air) ;
+
+ /* Count up and return the number of good pixels. */
+ n_good = 0;
+ for (i = 0; i < npix; i++) if(maskimg[i] > 0) n_good++;
+ cf_verbose(3, "Number of bkgd pixels flagged as good = %ld", n_good) ;
+
+ *nsam = n_good;
+ return 0 ;
+}
+
+
+/******************************************************************************
+ *
+ * GET_LIMITS
+ *
+ * Set limits of background subimage to match those of probability array.
+ *
+ *
+ ******************************************************************************/
+
+int get_limits(fitsfile *infits, int extended, int aperture,
+ int *ymin, int *ymax)
+{
+
+ char wgtsfile[FLEN_VALUE], ycentname[FLEN_KEYWORD];
+ int hdu, nywt, status=0;
+ float ycentv, wgt_cent;
+ fitsfile *wgtsfits;
+
+ cf_verbose(3, "Determining Y limits for aperture %d background array.",
+ aperture);
+
+ /* Read the measured centroid of the target spectrum. */
+ sprintf(ycentname,"YCENT%1d", aperture);
+ FITS_movabs_hdu(infits, 1, NULL, &status);
+ FITS_read_key(infits, TFLOAT, ycentname, &ycentv, NULL, &status);
+
+ /* Read the centroid and size of the probability array. */
+ FITS_read_key(infits, TSTRING, "WGTS_CAL", wgtsfile, NULL, &status);
+ FITS_open_file(&wgtsfits, cf_cal_file(wgtsfile), READONLY, &status);
+ hdu = extended * 8 + aperture + 1;
+ cf_verbose(3, "WGTS_CAL: extended = %d, aperture = %d, hdu = %d",
+ extended, aperture, hdu);
+ FITS_movabs_hdu(wgtsfits, hdu, NULL, &status);
+ FITS_read_key(wgtsfits, TINT, "NAXIS2", &nywt, NULL, &status);
+ FITS_read_key(wgtsfits, TFLOAT, "WGT_CENT", &wgt_cent, NULL, &status);
+ FITS_close_file(wgtsfits, &status);
+
+ cf_verbose(3, "Spectrum centroid=%6.2f, weights centroid=%5.2f, "
+ "weights ny=%4d", ycentv, wgt_cent, nywt) ;
+
+ /* Note that we allow these values to exceed the limits of the
+ * detector. This is required if the bkgd arrays are to cover
+ * the same area as the 2-D probability and data arrays. */
+
+ *ymin = cf_nint (ycentv - wgt_cent);
+ *ymax = *ymin + nywt - 1;
+
+ return status ;
+}
+
+
+/*********************************************************************
+ *
+ * SUM_GOOD_PIXELS
+ *
+ * Subroutine multiplies image and mask arrays, then sums the result.
+ * image = image from which to extract the data
+ * mask = mask for data image (1 = good pixels)
+ * npix = size of image and mask arrays
+ *
+ ***********************************************************************/
+
+
+int
+sum_good_pixels(float *image, float *mask, long npix, double *image_sum)
+{
+
+ long i;
+
+ *image_sum = 0;
+
+ for (i = 0; i < npix; i++)
+ *image_sum += image[i] * mask[i];
+
+ return 0 ;
+}
+
+
+/******************************************************************************
+ *
+ * MAIN PROGRAM BEGINS HERE
+ *
+ ******************************************************************************/
+
+
+int cf_scale_bkgd(fitsfile *infits, long nevents, float *x_in, float *y_in,
+ float *w_in, unsigned char *channel, unsigned char *timeflags,
+ unsigned char *locflags, long ngood, long *good_index, long dtime,
+ long ntime, int *binx, int *biny, int *nx_lif, int *ny_lif,
+ int *ymin_lif, float **img_lif, int *nx_sic, int *ny_sic, int *ymin_sic,
+ float **img_sic)
+{
+
+ char CF_PRGM_ID[] = "cf_scale_bkgd";
+ char CF_VER_NUM[] = "1.25";
+
+ fitsfile *bkgdfits, *scrnfits, *bchrfits, *parmfits ;
+ char buffer[FLEN_CARD], bkgdfile[FLEN_CARD], scrnfile[FLEN_CARD];
+ char bchrfile[FLEN_CARD], keyname[FLEN_CARD], parmfile[FLEN_CARD] ;
+ char run_bkgd[FLEN_VALUE];
+ char comment[FLEN_CARD], datestr[FLEN_CARD];
+ int nx, nxb, ny, status, hdutype, frow, felem, niter;
+ int src_ap[2], nullval, anynull, bkgd_num;
+ int ymin, ymax, phalow, nbinx, nxsam, bkgdtype ;
+ int bin_size, extended, keyval, timeref;
+ double data_sum_day, data_sum_night, data_sum;
+ double model_sum_night, model_sum_day, model_sum ;
+ float *xvarg, *bkgarr, *xvars0, *xvarm0 ;
+ float *bkgimg, *bkgimgd, *bkgimgn, *xvars, *xvarm;
+ float floatnull, exptime, expnight, expday, xvars_ave ;
+ float intcrarray[9], intcr, scattot, rms, rms0, dcr ;
+ float intcnt, scat_int_ratio, zero, mf, numtot, xvars_tot, xvarm_tot ;
+ float *dataimg, *maskimg;
+ short *ylim ;
+ long fpixel, npix, i, j, k, nsam;
+ long nbgood, npts, ndx, ndx1, ndx2, bkgd_ndx;
+
+ /* Initialize error checking */
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Started execution.");
+
+ /* Initialize CFITSIO variables */
+ anynull = 0 ;
+ hdutype = 0 ;
+ frow = 1 ;
+ felem = 1 ;
+ floatnull = 0. ;
+ fpixel = 1 ;
+ status = 0 ;
+
+ /* Initialize other variables */
+ data_sum_day=0.;
+ data_sum_night=0.;
+ zero = 0.;
+
+ /* Open parameter file and check whether user wants a background model. */
+ FITS_movabs_hdu(infits, 1, &hdutype, &status) ;
+ FITS_read_key(infits, TSTRING, "PARM_CAL", parmfile, NULL, &status) ;
+ cf_verbose(3, "parameter file is %s ", parmfile) ;
+ FITS_open_file(&parmfits,cf_parm_file(parmfile), READONLY, &status) ;
+ FITS_read_key(parmfits, TSTRING, "RUN_BKGD", run_bkgd, NULL, &status) ;
+ FITS_close_file(parmfits, &status) ;
+ cf_verbose(3, "RUN_BKGD = %s", run_bkgd) ;
+
+ /* If the RUN_BKGD = NO, then fill background array with zeros. */
+ if (!strncmp(run_bkgd, "N", 1) || !strncmp(run_bkgd, "n", 1)) {
+ cf_verbose(1, "RUN_BKGD = NO. No background subtraction.") ;
+ FITS_write_comment(infits, " ", &status);
+ FITS_write_comment(infits, "RUN_BKGD = NO. No background subtraction.",
+ &status);
+ fits_get_system_time(datestr, &timeref, &status);
+ sprintf(comment, "CalFUSE v%s %.10s", CALFUSE_VERSION, datestr);
+ FITS_write_comment(infits, comment, &status);
+ FITS_write_comment(infits, " ", &status);
+
+ bin_size = 1 ;
+ nx=nxb=NXMAX ;
+ ny=NYMAX ;
+ npix=nx * ny ;
+ bkgimg = (float *) cf_calloc(npix, sizeof(float)) ;
+ goto fin ;
+ }
+
+/***********************************************************************
+ *
+ * Set up the parameters for the analysis
+ *
+ ***********************************************************************/
+
+ /* Set day and night exposure times */
+ expday = (float) dtime ;
+ expnight = (float) ntime ;
+ exptime = expday + expnight ;
+
+ /* Get name of background characterization file */
+ FITS_read_key(infits, TSTRING, "BCHR_CAL",bchrfile, NULL, &status) ;
+ cf_verbose(3, "BCHR parameter file is %s ",bchrfile) ;
+
+ /* Get name of background calibration file */
+ FITS_read_key(infits, TSTRING, "BKGD_CAL", bkgdfile, buffer, &status);
+ cf_verbose(3,"Background calibration file = %s ",bkgdfile ) ;
+
+ /* Get name of screening file */
+ FITS_read_key(infits, TSTRING, "SCRN_CAL",scrnfile, NULL, &status) ;
+ cf_verbose(4, "screening file is %s ",scrnfile) ;
+
+ /* Read pha screening limit from the input file header */
+ FITS_read_key(infits,TINT,"PHALOW",&phalow, NULL, &status) ;
+ if (phalow > 8) phalow=8 ;
+ cf_verbose(2, "pha screening limit = %d", phalow) ;
+
+ /* Determine the type of background model to make by checking the
+ BKGDTYPE flag in the screening file. If BKGDTYPE > 0, do a full
+ model. If BKGDTYPE < 0, calculate a model based on exposure time. */
+ FITS_open_file(&scrnfits,cf_parm_file(scrnfile), READONLY, &status) ;
+ FITS_read_key(scrnfits, TINT, "BKGDTYPE",&bkgdtype, NULL, &status) ;
+ FITS_close_file(scrnfits, &status) ;
+
+ /* Read the intrinsic count rate from the BCHR file */
+ FITS_open_file(&bchrfits,cf_parm_file(bchrfile), READONLY, &status) ;
+ FITS_movabs_hdu(bchrfits, 3, &hdutype, &status) ;
+ FITS_read_img(bchrfits, TFLOAT, fpixel, 9, &nullval, intcrarray,
+ &anynull, &status) ;
+ FITS_close_file(bchrfits, &status) ;
+ intcr=intcrarray[phalow] ;
+ cf_verbose(2,"Initial guess for the intrinsic count rate = "
+ "%.1f x 10^-7 c/s/pixel ", intcr) ;
+
+ /* Read the limits of the background sample regions from the header
+ of the input file */
+ FITS_read_key(infits, TINT, "BKGD_NUM", &bkgd_num, NULL, &status) ;
+ cf_verbose(3, "Number of background sample regions = %d ", bkgd_num) ;
+
+ ylim = (short *) cf_calloc(bkgd_num*2, sizeof(short) ) ;
+ for (i=0; i<bkgd_num; i++) {
+ sprintf(keyname,"BKG_MIN%ld",i) ;
+ FITS_read_key(infits, TINT, keyname,&keyval, NULL, &status) ;
+ ylim[2*i] = keyval ;
+ sprintf(keyname,"BKG_MAX%ld",i) ;
+ FITS_read_key(infits, TINT, keyname,&keyval, NULL, &status) ;
+ ylim[2*i+1] = keyval ;
+ }
+ cf_verbose(3, "Limits of background regions") ;
+ for (i=0; i<bkgd_num; i++) cf_verbose(3,
+ "region %d = %d to %d ", i, ylim[2*i], ylim[2*i+1] ) ;
+
+ /* If no background sample regions have been specified (as is usual for
+ HIST data), then generate a model based only on exposure time */
+ if (bkgd_num == 0) {
+ bkgdtype = -1 ;
+ cf_verbose(1, "No background sample regions specified "
+ "- probably HIST") ;
+ }
+
+
+/*************************************************************************
+ *
+ * Read in the background calibration information
+ *
+ *************************************************************************/
+
+ /* Open background image file and go to the night image hdu */
+ FITS_open_file(&bkgdfits, cf_cal_file(bkgdfile), READONLY, &status);
+ FITS_movabs_hdu(bkgdfits, 2, &hdutype, &status);
+ FITS_read_key(bkgdfits, TINT, "NAXIS1", &nx, buffer, &status);
+ FITS_read_key(bkgdfits, TINT, "NAXIS2", &ny, buffer, &status);
+ cf_verbose(3, "Reading background calibration file:",
+ "naxis1=%d, naxis2 = %d ",nx,ny) ;
+
+ /* Background image files are binned in X, but not Y.
+ Determine the degree of compression. */
+ bin_size= NXMAX/nx ;
+ cf_verbose(3, "Background images are binned by %d pixels", bin_size) ;
+
+ /* Allocate space to hold the background, data, and mask images */
+ npix = nx * ny ;
+ nxb = nx ;
+ bkgimgn = (float *) cf_calloc(npix, sizeof(float)) ;
+ bkgimgd = (float *) cf_calloc(npix, sizeof(float)) ;
+ bkgimg = (float *) cf_calloc(npix, sizeof(float)) ;
+ dataimg = (float *) cf_calloc(npix, sizeof(float)) ;
+ maskimg = (float *) cf_calloc(npix, sizeof(float)) ;
+
+ /* Read the night and day scattered-light images */
+ FITS_read_img(bkgdfits, TFLOAT, fpixel, npix, &nullval, bkgimgn,
+ &anynull, &status) ;
+ FITS_movabs_hdu(bkgdfits, 3, &hdutype, &status);
+ FITS_read_img(bkgdfits, TFLOAT, fpixel, npix, &nullval, bkgimgd,
+ &anynull, &status) ;
+ FITS_close_file(bkgdfits, &status) ;
+
+ /* Rescale the background images if they have been compressed. */
+ if (bin_size > 1) for (i=0; i<npix; i++) {
+ bkgimgn[i] *= bin_size ;
+ bkgimgd[i] *= bin_size ;
+ }
+
+ /* Generate a mask of the same dimensions as the background image.
+ It is 1 in the user-defined background regions, but 0 around
+ airglow lines and near the edges of the detector. */
+ make_bad_pixel_mask (infits, bkgd_num, ylim, npix, nxb, maskimg, &nsam);
+
+
+/****************************************************************************
+ *
+ * Read the photon list.
+ * Store in an array the same size as the the background image.
+ * Populate only regions flagged as good in the background mask.
+ * Omit photons flagged as airglow.
+ * This scheme rejects non-airglow photons that drift into airglow
+ * regions due to mirror or spacecraft motion. We thus under-estimate
+ * the background, but assume that the resulting error is small.
+ *
+ ****************************************************************************/
+
+ /* If the background model is to be calculated only by exposure time,
+ then skip the IDF file analysis */
+ if (bkgdtype < 0) {
+ cf_verbose(3, "Skipping the analysis of the IDF file") ;
+ }
+ else { /* Analysis of the data begins here. */
+ cf_verbose(3, "Beginning the analysis of the IDF file") ;
+
+ nbgood=0;
+ for (i=0; i<ngood; i++) {
+ ndx=good_index[i] ;
+ if (locflags[ndx] & LOCATION_AIR) continue;
+ if ((j = cf_nint(y_in[ndx])) < 0 || j >= NYMAX) continue;
+ bkgd_ndx = j*nxb + cf_nint(x_in[ndx])/bin_size;
+ if (maskimg[bkgd_ndx] > 0) {
+ dataimg[bkgd_ndx] += w_in[ndx];
+ if (timeflags[ndx] & TEMPORAL_DAY) data_sum_day += w_in[ndx] ;
+ else data_sum_night += w_in[ndx];
+ nbgood++ ;
+ }
+ }
+
+ cf_verbose(3, "Number of photons events in the background region = %ld",
+ nbgood);
+ cf_verbose(3, "Sum of daytime weights = %.1lf ", data_sum_day) ;
+ cf_verbose(3, "Sum of nighttime weights = %.1lf ", data_sum_night) ;
+
+ /* If the background scattered light contribution is too large, the
+ background may be contaminated, perhaps by a source in one of the
+ other apertures. This is common in crowded fields or with nebulocity.
+ In this case, we calculate the background model based on the
+ exposure times, as done for the histogram data */
+
+ /* Check the level of the scattered-light background */
+ intcnt = intcr * nsam * bin_size * exptime * 1.e-7 ;
+ scattot = data_sum_day + data_sum_night - intcnt ;
+ scat_int_ratio = 0. ;
+ if (intcnt > 0) scat_int_ratio = scattot / intcnt ;
+ cf_verbose(3, "int cnt = %.1f, scat cnt = %.1f , scat/int = %f ",
+ intcnt, scattot, scat_int_ratio) ;
+
+ if (scat_int_ratio > 10) {
+ cf_verbose(1, "The scattered light background is too large.");
+ bkgdtype = -1;
+ }
+ else {
+ cf_verbose(2,
+ "Scattered light appears reasonable. Proceeding with analysis.") ;
+ }
+
+ } /* Analysis of the data ends here. */
+
+ /* If the background model is to be calculated using only the exposure
+ time, then do it now. */
+ if (bkgdtype < 0) {
+ cf_verbose(1, "Constructing background based only on exposure time.") ;
+ make_model_exptime( npix, nxb, intcr, expnight, expday,
+ bkgimgn, bkgimgd, bkgimg) ;
+ goto fin ;
+ }
+
+/****************************************************************************
+ *
+ * In this section, we attempt to determine the intrinsic count rate.
+ * The scattered light shows little structure in the Y dimension, so
+ * we project all of the arrays onto the X axis. Only good pixels
+ * in the user-specified background regions are included in the sum.
+ *
+ ****************************************************************************/
+
+ /* Make a scattered light reference image assuming an intrinsic count
+ rate of zero. */
+ make_model_exptime(npix, nxb, zero, expnight, expday,
+ bkgimgn, bkgimgd, bkgimg) ;
+
+ /* We bin the data by another factor of 8 in X */
+ /* nbinx = number of detector pixels in one bin */
+ /* nxsam = number of samples in the array */
+ nbinx=128 ;
+ nxsam = NXMAX/nbinx ;
+ cf_verbose(3, "X variation array information: "
+ "nbinx = %d, nxsam= %d ", nbinx, nxsam) ;
+
+ xvars = (float *) cf_calloc(nxsam,sizeof(float)) ;
+ xvarm = (float *) cf_calloc(nxsam,sizeof(float)) ;
+ xvars0 = (float *) cf_calloc(nxsam,sizeof(float)) ;
+ xvarm0 = (float *) cf_calloc(nxsam,sizeof(float)) ;
+ xvarg = (float *) cf_calloc(nxsam,sizeof(float)) ;
+
+ /* Project each image onto the X axis */
+ get_xvar_img(bkgimg, maskimg, nxb, nxsam, xvarm0) ;
+ get_xvar_img(dataimg, maskimg, nxb, nxsam, xvars0) ;
+ get_xvar_img(maskimg, maskimg, nxb, nxsam, xvarg) ;
+
+ /* Calculate the average counts per "good" bin in the data array. */
+ xvars_ave = 0;
+ for (i = j = 0; i < nxsam; i++)
+ if (xvarg[i] > 0) {
+ xvars_ave += xvars0[i];
+ j++;
+ }
+ xvars_ave /= j;
+ cf_verbose (3, "xvars_ave = %.1f (should be > 100)", xvars_ave);
+
+ /* If the average number of counts in the xvars0 array (which holds
+ the observed intensity variation along the x direction) is small,
+ then we can't determine an intrinsic count rate from the data and
+ we use the tabulated rate. If the count is large enough, then we
+ can do a more detailed fit of the model to the observations. */
+
+ if (xvars_ave > 100) { /* Begin fit to intrinsic background */
+
+ cf_verbose(1, "Calculating a full background model.") ;
+ cf_verbose(3, "\n\tInterpolating to derive intrinsic count rate\n") ;
+
+ /* Sum the counts in the data and model arrays. */
+ sum_good_pixels(dataimg, maskimg, npix, &data_sum);
+ sum_good_pixels(bkgimg, maskimg, npix, &model_sum);
+
+ cf_verbose(3, "Total counts in initial scattered-light model = %7.0lf",
+ model_sum);
+ cf_verbose(3, "Intrinsic counts summed over good regions = %7.0f",
+ (intcnt = intcr * nsam * bin_size * exptime * 1.e-7));
+ cf_verbose(3, "Sum of above = %7.0lf",
+ model_sum + intcnt);
+ cf_verbose(3, "Total counts in good regions of data array = %7.0lf",
+ data_sum);
+
+ /* Sum the counts in the data and model x variation arrays */
+ xvarm_tot = 0.;
+ xvars_tot = 0.;
+ for (i = j = 0; i < nxsam; i++) if (xvarg[i] > 0) {
+ xvarm_tot += xvarm0[i];
+ xvars_tot += xvars0[i];
+ }
+ cf_verbose(3, "Total counts in scattered-light xvar array = %7.0f",
+ xvarm_tot);
+ cf_verbose(3, "Total counts in data x variation array = %7.0f",
+ xvars_tot);
+
+ /* Convert the x variation arrays from total counts to units of
+ 1.e-7 c/s/pix, the units of the intrinsic count rate. */
+ mf = bin_size * exptime * 1.e-7 ;
+ for (i=0 ; i<nxsam ; i++) if (xvarg[i] > 0) {
+ xvars0[i] /= xvarg[i] * mf ;
+ xvarm0[i] /= xvarg[i] * mf ;
+ }
+
+ /* Sum the counts in the rescaled xvar arrays */
+ xvarm_tot = 0.;
+ xvars_tot = 0.;
+ for (i = j = 0; i < nxsam; i++) if (xvarg[i] > 0) {
+ xvars_tot += xvars0[i];
+ xvarm_tot += xvarm0[i];
+ j++;
+ }
+ cf_verbose(3, "Mean xvar count rates in units of 10^-7 c/s/pixel:");
+ cf_verbose(3, " Initial model = %.1f", xvarm_tot/j);
+ cf_verbose(3, " Intrinsic counts = %.1f", intcr);
+ cf_verbose(3, " Data array = %.1f", xvars_tot/j);
+
+ /* Determine the value of the intrinsic background by comparing the X
+ variations of the data (after removing a guess for the intrinsic
+ background) with the model scattered light variations, making sure
+ that the final average count rate is the same for both. Iterate
+ until the intrinsic background changes by less than 0.1 units. */
+
+ dcr = 1. ;
+ niter = 0 ;
+ rms0 = 1.e10 ;
+ while ( fabs(dcr) > 0.1) {
+
+ /* Subtract intrinsic counts from the data array and sum it. */
+ xvars_tot = 0. ;
+ for (i=0; i<nxsam; i++) if (xvarg[i] > 0) {
+ xvars[i] = xvars0[i] - intcr ;
+ xvars_tot += xvars[i] ;
+ }
+
+ /* Scale the model array to match the data. Sum it. */
+ numtot = 0. ;
+ for (i=0 ; i<nxsam ; i++) if (xvarg[i] > 0) {
+ xvarm[i] = xvarm0[i] * (xvars_tot / xvarm_tot) ;
+ numtot += xvarm[i] ;
+ }
+
+ /* Sum the absolute difference between the data and model arrays. */
+ rms = 0. ;
+ for (i=0 ; i<nxsam ; i++) if (xvarg[i] > 0)
+ rms += (fabs(xvars[i]-xvarm[i])) ;
+ cf_verbose(3, "intr cr= %5.2f, data-model = %6.2f, "
+ "dat cnts = %5.0f, mod cnts=%5.0f", intcr,rms,xvars_tot,numtot) ;
+
+ niter++ ;
+ if (niter > 20) break ;
+
+ /* if the current rsm value is greater than the preceeding one,
+ reverse direction and reduce the step size by 50% */
+ if ( rms > rms0 ) dcr = -0.5*dcr ;
+ intcr += dcr ;
+
+ /* initialize the next iteration */
+ rms0 = rms ;
+ }
+ } /* End of fit to intrinsic background */
+
+ else {
+ cf_verbose(1, "Background count too small for a detailed fit.");
+ cf_verbose(1, "Assuming an intrinsic count rate of %.1f cts/s", intcr ) ;
+ }
+
+ /* Sum the good pixels in the unscaled day and night background images. */
+ sum_good_pixels(bkgimgn, maskimg, npix, &model_sum_night);
+ sum_good_pixels(bkgimgd, maskimg, npix, &model_sum_day);
+
+ /* Make the final background model */
+ make_model(npix, nsam, nxb, intcr, expnight, expday,
+ data_sum_night, data_sum_day, model_sum_night, model_sum_day,
+ bkgimgn, bkgimgd, bkgimg, maskimg) ;
+
+ /* Sum the counts in the final background image. */
+ sum_good_pixels(bkgimg, maskimg, npix, &model_sum);
+
+ cf_verbose(3, "Total counts in final background model = %.0lf", model_sum);
+ cf_verbose(3, " measured counts = %.0lf",
+ data_sum_day+data_sum_night);
+
+ free(bkgimgn) ;
+ free(bkgimgd) ;
+ free(dataimg) ;
+ free(maskimg) ;
+ free(xvars) ;
+ free(xvars0) ;
+ free(xvarm) ;
+ free(xvarm0) ;
+ free(xvarg) ;
+
+ fin:
+
+ /**************************************************************************
+ *
+ * Extract the subarrays covering the active LiF and SiC apertures
+ *
+ ***************************************************************************/
+
+ extended = cf_source_aper(infits, src_ap) ;
+ cf_verbose(3, "\n\tSelecting subarrays\n") ;
+ cf_verbose(3, "source apertures: lif=%d, sic=%d ",src_ap[0], src_ap[1]) ;
+
+ /* Populate some output values */
+ *binx=bin_size ;
+ *biny=1 ;
+
+ for (k=0; k<2 ; k++) { /* Loop over LiF and SiC channels */
+
+ /* Read the y limits for the output array */
+ get_limits(infits, extended, src_ap[k], &ymin, &ymax) ;
+
+ /* Set up array to contain the image */
+ npts = nxb * (ymax-ymin+1) ;
+ bkgarr = (float *) cf_calloc(npts, sizeof(float)) ;
+
+ /* Fill the array */
+ ndx1 = -1 ;
+ model_sum = 0 ;
+ for (i=ymin; i<=ymax ; i++) {
+ if (i < 0 || i >= ny)
+ ndx1 += nxb ;
+ else {
+ for (j=0; j<nxb; j++) {
+ ndx2 = i*nxb + j ;
+ if (ndx2 >= npix) break ;
+ ndx1++;
+ if (ndx1 >= npts) break ;
+ bkgarr[ndx1]=bkgimg[ndx2] ;
+ model_sum += bkgarr[ndx1] ;
+ }
+ }
+ }
+
+ /* Populate the output arrays and values */
+ if (k == 0) {
+ *nx_lif = nxb ;
+ *ny_lif = (ymax - ymin + 1) ;
+ *ymin_lif = ymin ;
+ *img_lif = bkgarr ;
+ }
+ else {
+ *nx_sic = nxb ;
+ *ny_sic = (ymax - ymin + 1) ;
+ *ymin_sic = ymin ;
+ *img_sic = bkgarr ;
+ }
+
+ cf_verbose(2, "for aperture %d, nx=%d, ny=%d, ymin=%d, model_sum=%.0f",
+ src_ap[k], nxb, (ymax-ymin+1), ymin, model_sum) ;
+
+ } /* End loop over LiF and SiC channels */
+
+ /* release memory for the background image */
+ free(bkgimg) ;
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished execution.");
+ return 0;
+}
diff --git a/src/libcf/cf_screen_airglow.c b/src/libcf/cf_screen_airglow.c
new file mode 100644
index 0000000..5a7b2b3
--- /dev/null
+++ b/src/libcf/cf_screen_airglow.c
@@ -0,0 +1,70 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_screen_airglow (fitsfile *header, long nevents,
+ * float *x, float *y, unsigned char *location)
+ *
+ * Description: Flag photon events in airglow regions.
+ *
+ * Arguments: fitsfile *header Input FITS file pointer
+ * long nevents Number of photon events
+ * float *x X coordinate array
+ * float *y Y coordinate array
+ * unsigned char *location Photon location flag array
+ *
+ * Calls: cf_get_geocorona
+ *
+ * Returns: 0 on success
+ *
+ * History: 03/10/05 1.1 wvd Initial coding
+ *
+ ****************************************************************************/
+
+#include <stdlib.h>
+#include "calfuse.h"
+
+int
+cf_screen_airglow (fitsfile *header, long nevents, float *x, float *y,
+ unsigned char *location)
+{
+ char CF_PRGM_ID[] = "cf_screen_airglow";
+ char CF_VER_NUM[] = "1.1";
+
+ int errflg=0, ngeo;
+ long i, j;
+ short *gxmin, *gxmax, *gymin, *gymax;
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+ if ((errflg = cf_proc_check(header, CF_PRGM_ID))) return errflg;
+
+ /*
+ * Read limits of airglow regions from AIRG_CAL file.
+ */
+ ngeo = cf_get_geocorona(header, &gxmin, &gxmax, &gymin, &gymax);
+
+ /*
+ * Set the airglow bit of photons in the airglow regions.
+ */
+ for (i = 0; i < nevents; i++) {
+ for (j=0; j<ngeo; j++) {
+ if (x[i] > gxmin[j] && x[i] < gxmax[j] &&
+ y[i] > gymin[j] && y[i] < gymax[j] ) {
+ location[i] = location[i] | LOCATION_AIR;
+ break;
+ }
+ }
+ }
+
+ free(gxmin);
+ free(gxmax);
+ free(gymin);
+ free(gymax);
+
+ cf_proc_update(header, CF_PRGM_ID, "COMPLETE");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+ return 0;
+}
diff --git a/src/libcf/cf_screen_bad_pixels.c b/src/libcf/cf_screen_bad_pixels.c
new file mode 100644
index 0000000..99884a5
--- /dev/null
+++ b/src/libcf/cf_screen_bad_pixels.c
@@ -0,0 +1,122 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_screen_bad_pixels (fitsfile *header, long nevents,
+ * float *x, float *y, unsigned char *location)
+ *
+ * Description: Flag photon events in bad-pixel regions.
+ *
+ * Arguments: fitsfile *header Input FITS file pointer
+ * long nevents Number of photon events
+ * float *x X coordinate array
+ * float *y Y coordinate array
+ * unsigned char *location Photon location flag array
+ *
+ * Calls: cf_get_potholes
+ *
+ * Returns: 0 on success
+ *
+ * History: 11/22/05 1.1 wvd Initial coding
+ *
+ ****************************************************************************/
+
+#include <stdlib.h>
+#include "calfuse.h"
+
+/***********************************************************************
+ *
+ * Procedure to read pothole locations from the QUAL_CAL file
+ *
+ ***********************************************************************/
+
+int
+cf_get_potholes(fitsfile *header, float **xbad, float **ybad,
+ float **rxbad, float **rybad)
+{
+ char qualfile[FLEN_VALUE];
+ int nbad, status=0;
+ fitsfile *qualfits;
+
+ cf_verbose(3, "Entering cf_get_potholes.");
+
+ /*
+ * Read limits of bad-pixel regions from the first extension
+ * of the QUAL_CAL file.
+ */
+ FITS_movabs_hdu(header, 1, NULL, &status);
+ FITS_read_key(header, TSTRING, "QUAL_CAL", qualfile, NULL, &status);
+ cf_verbose(3, "QUAL_CAL = %s", qualfile);
+
+ FITS_open_file(&qualfits, cf_cal_file(qualfile), READONLY, &status);
+ FITS_movabs_hdu(qualfits, 2, NULL, &status);
+ nbad = cf_read_col(qualfits, TFLOAT, "X", (void **) xbad);
+ nbad = cf_read_col(qualfits, TFLOAT, "Y", (void **) ybad);
+ nbad = cf_read_col(qualfits, TFLOAT, "RX", (void **) rxbad);
+ nbad = cf_read_col(qualfits, TFLOAT, "RY", (void **) rybad);
+ FITS_close_file(qualfits, &status);
+
+ cf_verbose(3, "Exiting cf_get_potholes.");
+ return nbad;
+}
+
+
+int
+cf_screen_bad_pixels (fitsfile *header, long nevents, float *x, float *y,
+ unsigned char *location)
+{
+ char CF_PRGM_ID[] = "cf_screen_bad_pixels";
+ char CF_VER_NUM[] = "1.1";
+
+ int errflg=0, nbad;
+ long counter=0, i, j;
+ float *xbad, *ybad, *rxbad, *rybad, *rx2, *ry2;
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+ if ((errflg = cf_proc_check(header, CF_PRGM_ID))) return errflg;
+
+ /*
+ * Read limits of bad-pixel regions from QUAL_CAL file.
+ */
+ nbad = cf_get_potholes(header, &xbad, &ybad, &rxbad, &rybad);
+ cf_verbose(2, "For first pothole: x = %.0f, y = %.0f, rx = %.0f, ry = %.0f",
+ xbad[0], ybad[0], rxbad[0], rybad[0]);
+
+ /*
+ * Square the semi-major axes.
+ */
+ for (j = 0; j < nbad; j++) {
+ rxbad[j] *= rxbad[j];
+ rybad[j] *= rybad[j];
+ }
+ rx2 = rxbad;
+ ry2 = rybad;
+ cf_verbose(2, "For first pothole: rx2 = %.0f, ry2 = %.0f", rx2[0], ry2[0]);
+
+ /*
+ * Flag photons in the bad-pixel regions.
+ */
+ for (i = 0; i < nevents; i++) {
+ for (j = 0; j < nbad; j++) {
+ if ((x[i] - xbad[j]) * (x[i] - xbad[j]) / rx2[j] +
+ (y[i] - ybad[j]) * (y[i] - ybad[j]) / ry2[j] < 1.0) {
+ location[i] = location[i] | LOCATION_BADPX;
+ counter++;
+ break;
+ }
+ }
+ }
+ cf_verbose(2, "Flagged %d pixels as bad", counter);
+
+ free(xbad);
+ free(ybad);
+ free(rxbad);
+ free(rybad);
+
+ cf_proc_update(header, CF_PRGM_ID, "COMPLETE");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+ return 0;
+}
diff --git a/src/libcf/cf_screen_burst.c b/src/libcf/cf_screen_burst.c
new file mode 100644
index 0000000..f80374e
--- /dev/null
+++ b/src/libcf/cf_screen_burst.c
@@ -0,0 +1,758 @@
+/****************************************************************************
+ * Johns Hopkins University
+ * Center for Astrophysical Sciences
+ * FUSE
+ ****************************************************************************
+ *
+ * Synopsis: cf_screen_burst(infits, nevents, ptime, x, y, locflags,
+ * gti, nsec, ttime, sflag, aic_rate, bkgd)
+ *
+ * Description: Determines the times for bursts and sets the burst
+ * flag in the timeline status array so that the busts
+ * can be removed later.
+ *
+ * Arguments: fitsfile infile Pointer to Intermediate Data File
+ * long nevents Number of photons
+ * float ptime Time of event
+ * float *x, *y X and Y positions of the photon
+ * byte locflags flags on photon location
+ * (LOC_FLGS column in IDF)
+ * GTI gti Structure with Good Time Intervals
+ * long nsec Length of timeline array
+ * float ttime Timeline array
+ * byte sflag Status flags in timeline table
+ * float aic_rate AIC count rate
+ * short bkgd Count rate for the background
+ * sample region
+ *
+ * Algorithm used:
+ *
+ * 1. Generate an array (flgarr) with 1 second intervals that
+ * contains flags indicating whether that time interval is good
+ * or not. All elements of this array are originally set to negative
+ * numbers, indicating bad times.
+ * 2. Read in the good time intervals from the initial screening
+ * analysis and set all good time elements in flgarr to positive
+ * values
+ * 3. Determine the median count per binned element in the entire time
+ * sequence (ignoring times with no data) and set all elements with
+ * a count > 5 times this median value to negative values (indicating
+ * a burst at that time).
+ * 4. Do a median filter of the modified time sequence (ignoring the neg
+ * numbers) and identify all times where the count per bin is greater
+ * than a specified value or is more than a specified number of
+ * standard deviations from the median. These points are flagged with
+ * negative numbers to indicate bursts. The screening parameters used
+ * are specified in the screening parameter file.
+ * 5. Iterate time-sequence analysis until no more points are removed.
+ * 6. Transfer the burst times from the cnt array to flgarr
+ * 7. Go through all detected photons. If the time of arrival for that
+ * photon has been flagged as bad in FLGARR then ignore it,
+ * otherwise copy the information to the output file.
+ *
+ *
+ * Calibration files:
+ * BCHR_CAL: location of the background sample regions
+ * SCRN_CAL: burst screening params
+ *
+ * Parameter file keywords used to control the burst screening process
+ *
+ * MNCNT : minimum enhancement of the background (in counts) needed to
+ * flag a burst (currently = 5)
+ * STDRE : minimum number of standard deviations from the local mean
+ * for a burst to be detected (currently=5)
+ * NBIN : binning factor (in seconds) for the tiome sequence before
+ * analysis. (currently=15 seconds)
+ * NSMED : Interval (in seconds) used in determining the median filter
+ * (currently=600)
+ * SRCFRAC : Fraction of the source intensity required for a
+ * burst to be removed. SCRFRAC=0.01 requires that a burst
+ * exceed 1% of the integrated source intensity before being
+ * removed (default 0.001)
+ *
+ * Returns: 0 on success
+ *
+ * History: 10/29/02 v1.1 RDR Adapted from cf_ttag_burst
+ * 11/14/02 v1.2 peb Tidied code and made it compatible
+ * with cf_screen_burst
+ * 12/09/02 v1.3 RDR - Adjusted procedure for filling
+ * burst flags in the timeline
+ * - Corrected error in the procedure
+ * that tabulates bursts properties.
+ * - Used LOCATION flags to exclude
+ * geocoronal emission and photons
+ * off the active detector.
+ * 12/20/02 v1.4 rdr changed status flag arrays to
+ * unsigned char
+ * 01/24/03 v1.5 rdr corrected problem with high
+ * count rates
+ * 03/01/03 v1.6 wvd Correct use of pointer in FITS_read_key
+ * 05/20/03 v1.7 rdr Add cf_proc_check
+ * 05/22/03 v1.8 wvd Exit if EXPTIME !> 0.
+ * Change cf_error_init to stderr.
+ * Implement cf_verbose throughout.
+ * 04/06/03 v1.9 rdr Exclude times which have previously
+ * had a screening bit set
+ * 09/03/03 v1.10 wvd Delete extraneous print statements
+ * 09/10/03 v1.11 wvd Change background array to type short
+ * Set burst flag only when flgarr[i]
+ * < -1, not 0, to prevent bursts
+ * from echoing LIMB/SAA/HV flags.
+ * 09/15/03 v1.12 wvd Use ttime[i] to populate bkgd array.
+ * Old scheme didn't work.
+ * 10/06/03 v1.13 wvd Change locflgs to locflags throughout.
+ * Use bit-wise logic to test sflag array.
+ * 06/04/04 v1.14 wvd Clean up i/o.
+ * 02/02/05 v1.15 wvd Read AIC count rate from timeline table
+ * rather than file header keywords.
+ * 02/02/05 v1.16 wvd Generate bkgd array for the entire
+ * exposure, not just good times.
+ * 08/30/05 v1.17 wvd Ignore photons with arrival times
+ * greater than MAX_EXPTIME.
+ * 04/09/06 v1.18 wvd In subroutine median_filter, require
+ * that nwin >= 1.
+ * 06/12/06 v1.19 wvd Call cf_verbose rather than
+ * cf_if_warning.
+ *
+ ***************************************************************************/
+
+#include <math.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include "calfuse.h"
+
+/*
+ * Function to determine the median value of an array.
+ * Arguments are the array,
+ * the number of points in the array (npt) and the maximum count to
+ * use in the histogram analysis (nmax). The median value is returned.
+ *
+ * The analysis uses a histogram approach to determine the median
+ * value. Negative values of the array have been flagged as bursts
+ * and should be ignored in determining the median value. If all of
+ * the points in the array have been flagged, returns zero.
+ */
+
+static int
+median(int *array, int npts, int nmax)
+{
+ int i, ngood=0, *hist, medval;
+
+ /*
+ * Set up an array to contain the histogram of the data.
+ */
+ hist = (int *) cf_calloc((nmax+1), sizeof(int));
+ /*
+ * Fill the histogram with the data.
+ * Negative points are not counted.
+ */
+ for (i=0; i< npts; i++) {
+ int ndx = array[i];
+ if (ndx > nmax-1)
+ ndx = nmax-1;
+ if (ndx >= 0 ) {
+ ngood ++;
+ hist[ndx]++;
+ }
+ }
+
+ /*
+ * Determine the median value. Set the data to 0 if there
+ * are fewer than 2 points.
+ */
+ if (ngood > 2 ) {
+ int hnum= (int) ngood/2, atot=0;
+ i=-1;
+ while ((atot <= hnum) && (i < nmax) )
+ atot += hist[++i];
+ medval = (int) i;
+ }
+ else
+ medval = 0;
+
+ free(hist) ;
+
+ return medval;
+}
+
+/*
+ * Function to construct a median filter for an array:
+ * array = array for which the median filter is to be constructed
+ * npts = number of points in the array
+ * nflt = number of points over which to determine the median value
+ * medflt = array containing the median filter.
+ */
+
+static void
+median_filter(int *array, int npts, int nflt, int *medflt)
+{
+ int cntmax=0, i, hwidth, nwin, *win, medval, nsam ;
+ /*
+ * Determine the maximum value of the array.
+ */
+ for (i = 0; i < npts; i++)
+ if (array[i] > cntmax)
+ cntmax=array[i];
+
+ cf_verbose(3,"Constructing median filter - max cnt = %d",cntmax) ;
+
+ /*
+ * Determine the properties of the window over which to calculate
+ * the median values. Make sure that the window is not larger
+ * than the width of the data.
+ */
+ if (nflt > npts)
+ hwidth = (int) ( npts/2. ) - 1;
+ else
+ hwidth = (int) (0.5 + nflt/2. );
+ nwin = (int) 2*hwidth+1;
+ if (nwin < 1) nwin = 1;
+ win = (int *) cf_calloc(nwin, sizeof(int));
+ /*
+ * Construct the median filter.
+ */
+ for (i = 0; i < npts; i++) {
+ int j, nmin, nmax;
+ /*
+ * Determine the limits to the sample.
+ */
+ nmin = i - hwidth;
+ if (nmin < 0)
+ nmin=0;
+ nmax = nmin+nwin;
+ if (nmax > npts-1 )
+ nmin = npts-nwin-1;
+
+ /* Fill the sample array */
+ nsam=0 ;
+ for (j=0; j<=2*hwidth; j++) {
+ int ndx = nmin+j;
+ if (ndx > npts-1)
+ ndx = npts-1;
+ win[j] = array[ndx];
+ if (array[ndx] > 0) nsam++ ;
+ }
+
+ /* Get the median value for the sample array */
+ medval = median(win, nwin, cntmax);
+
+ /*
+ cf_verbose(6,"at point %d, nmin=%d, nmax=%d, nsam=%d, medval=%d",
+ i, nmin, nmax, nsam, medval) ;
+ */
+
+ /* Update the median filter */
+ medflt[i] = medval;
+ }
+
+ free(win) ;
+
+}
+
+/*
+ * Function to take an array marked with the times and intensities of
+ * the bursts and identify individual bursts events and output these
+ * to an ASCII file for later analysis.
+ */
+
+static void
+tab_burst(int *bursts, int npts, int nbin, int mjd, long tst, char *outfile)
+{
+ FILE *output;
+ int i, bflg=-1, bdur=0, bcnts=0, bst=0;
+ /*
+ * Go through the bursts array and determine the times and
+ * properties of the bursts.
+ */
+ output = fopen(outfile, "w");
+
+ cf_verbose(2, "BURST SUMMARY") ;
+ for (i=0; i<npts; i++) {
+ if (bursts[i] > 0 && bflg < 0) {
+ bflg=1;
+ bst= i*nbin;
+ }
+ if (bursts[i] > 0 && bflg > 0) {
+ bdur++;
+ bcnts = bcnts + bursts[i];
+ }
+ if (bursts[i] < 0 && bflg > 0) {
+ cf_verbose(2, "start=%d, duration=%ld seconds, counts=%d",
+ bst, bdur*nbin, bcnts) ;
+ fprintf(output, " %d %ld %d %d \n",
+ mjd, bst+tst, bdur*nbin, bcnts);
+ bflg=-1;
+ bdur=0;
+ bcnts=0;
+ }
+ }
+
+ /* Check to see whether a burst is in progress at the end of the obs */
+ if (bflg > 0) {
+ cf_verbose(2, "start=%d, duration=%ld seconds, counts=%d",
+ bst, bdur*nbin, bcnts) ;
+ fprintf(output, " %d %ld %d %d\n",
+ mjd, bst+tst, bdur*nbin, bcnts);
+ }
+
+}
+
+
+int
+cf_screen_burst(fitsfile *infits, long nevents, float *ptime, float *x,
+ float *y, unsigned char *locflags, GTI *gti, long nsec,
+ float *ttime, unsigned char *sflag, float *aic_rate,
+ short *bkgd)
+{
+ char CF_PRGM_ID[] = "cf_screen_burst";
+ char CF_VER_NUM[] = "1.19";
+
+ short ylim[8], k;
+ int anynull, errflg=0, intnull=0, cflg=-1, nrowbkg=0, ngood;
+ int npts, nmax, nflt, iflg, numflg, ndxs, ndxe, ndx, ndxb;
+ int *bcnts, *cnts, *gcnts, *medflt, *flgarr, *bursts, lim_col;
+ int nflg, niter, mjd , status=0, medval;
+ long frow=1, felem=1, tst , i, j;
+ long stdrej, mncnt, nsmed, mnburst, nbin, nflgarr;
+ float exptime, max_aic_rate, bkgsf, bkgsft, srcfrac, mxtime;
+ double expstrt;
+ char burst_tab[FLEN_CARD];
+ char expid[FLEN_CARD], progid[FLEN_CARD], targid[FLEN_CARD];
+ char scobsid[FLEN_CARD], scrnfile[FLEN_CARD], aperf[FLEN_CARD];
+ char det[FLEN_CARD], bchrfile[FLEN_CARD], aper[5];
+ fitsfile *scrnfits, *bchrfits;
+
+ /*
+ * Initialize error checking
+ */
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+ if ((errflg = cf_proc_check(infits, CF_PRGM_ID))) return errflg;
+
+ /*
+ * Read header keywords.
+ */
+ FITS_read_key(infits, TFLOAT, "EXPTIME", &exptime, NULL, &status);
+ FITS_read_key(infits, TDOUBLE, "EXPSTART", &expstrt, NULL, &status);
+ FITS_read_key(infits, TSTRING, "PRGRM_ID", progid, NULL, &status);
+ FITS_read_key(infits, TSTRING, "TARG_ID", targid, NULL, &status);
+ FITS_read_key(infits, TSTRING, "SCOBS_ID", scobsid, NULL, &status);
+ FITS_read_key(infits, TSTRING, "EXP_ID", expid, NULL, &status);
+ FITS_read_key(infits, TSTRING, "DETECTOR", det, NULL, &status);
+
+ /*
+ * Exit if EXPTIME is 0.
+ */
+ if (exptime < 1) {
+ cf_verbose(1, "EXPTIME = %f. Exiting.", exptime);
+ return status;
+ }
+
+ /*
+ * Determine the Julian date and start time from expstrt.
+ */
+ mjd = (int) expstrt;
+ tst = (int) ((expstrt - mjd)*86400.);
+ det[1] = tolower(det[1]);
+
+ /* Ignore events with arrival times greater than MAX_EXPTIME. */
+ i = nevents - 1;
+ while (ptime[i] > MAX_EXPTIME && i > 0) i--;
+ nevents = i + 1;
+ i = nsec - 1;
+ while (ttime[i] > MAX_EXPTIME && i > 0) i--;
+ nsec = i + 1;
+
+ /*
+ * Determine the maximum count rate for the exposure.
+ * If the count rate is too high, there is the possibility of
+ * losing counts and of dropouts - Check the count rate and set
+ * a flag if it is too high.
+ */
+ max_aic_rate = -999.;
+ for (i = 0; i < nsec; i++)
+ if (aic_rate[i] > max_aic_rate) max_aic_rate = aic_rate[i];
+ cf_verbose(2, "Max AIC count rate = %d", cf_nint(max_aic_rate));
+ if(max_aic_rate > 4000) cflg=1;
+
+ /*
+ * Read the screening parameter file.
+ */
+ FITS_read_key(infits, TSTRING, "SCRN_CAL", scrnfile, NULL, &status);
+ cf_verbose(3, "Screening parameters from %s\n", scrnfile);
+ FITS_open_file(&scrnfits, cf_parm_file(scrnfile), READONLY, &status);
+ FITS_read_key(scrnfits, TLONG, "MNCNT", &mncnt, NULL, &status);
+ FITS_read_key(scrnfits, TLONG, "STDREJ", &stdrej, NULL, &status);
+ FITS_read_key(scrnfits, TLONG, "NBIN", &nbin, NULL, &status);
+ /*
+ * Set the binning factor to 1 for high count rate data.
+ */
+ if (cflg > 0) {
+ nbin=1;
+ cf_verbose(1, "High count-rate observation: using 1 sec time bins") ;
+ }
+ FITS_read_key(scrnfits,TLONG,"NSMED",&nsmed, NULL, &status);
+ /*
+ * srcfrac=required fraction of the source intensity for a
+ * burst to be counted, i.e. the burst must exceed this fraction
+ * before it is deemed to be significant.
+ */
+ FITS_read_key(scrnfits, TFLOAT, "SRCFRAC", &srcfrac, NULL, &status);
+ FITS_read_key(infits, TSTRING, "APERTURE", aperf, NULL, &status);
+ FITS_close_file(scrnfits, &status);
+
+ cf_verbose(3, "Screening parameters used:");
+ cf_verbose(3, "Minimum count rate = %ld", mncnt);
+ cf_verbose(3, "Detection criterion (num sigma) = %ld", stdrej);
+ cf_verbose(3, "Number of seconds to bin the time sequence = %ld", nbin);
+ cf_verbose(3, "Interval (seconds) used in median filter = %ld", nsmed);
+ cf_verbose(3, "Fraction of source intensity for burst = %f\n", srcfrac);
+ /*
+ * Select the background extraction regions - RFPT implies
+ * that there is no source, so the entire detector can be used.
+ */
+ strncpy(aper, aperf, 5);
+ cf_verbose(3, "Aperture designation = %s", aper);
+ if (strcmp ( aper , "RFPT") == 0 ) {
+ cf_verbose(3, "APERTURE = RFPT. No source in aperture.");
+ ylim[0] = 0;
+ ylim[1] = 1;
+ ylim[2] = 2;
+ ylim[3] = 1020;
+ ylim[4] = 1021;
+ ylim[5] = 1022;
+ ylim[6] = 1022;
+ ylim[7] = 1022;
+ }
+ else {
+ /*
+ * open the bchr parameter file
+ */
+ FITS_read_key(infits, TSTRING, "BCHR_CAL", bchrfile, NULL, &status);
+ cf_verbose(3, "BCHR parameter file: %s", bchrfile);
+ FITS_open_file(&bchrfits, cf_parm_file(bchrfile), READONLY, &status);
+
+ /* Move to the first extension of the BCHR file, which contains
+ the limits to the background regions */
+ FITS_movabs_hdu(bchrfits, 2, NULL, &status);
+
+ /* Get the column number for the data to be extracted */
+ FITS_get_colnum(bchrfits, CASEINSEN, aper, &lim_col, &status);
+
+ /* Read the data from the table */
+ FITS_read_col(bchrfits, TSHORT, lim_col, frow, felem, 8, &intnull,
+ ylim, &anynull, &status);
+
+ /* Close the bchr file */
+ FITS_close_file(bchrfits, &status);
+ }
+ cf_verbose(3, "Y limits of background region: %d-%d, %d-%d, %d-%d\n",
+ ylim[0], ylim[1], ylim[2], ylim[3], ylim[4], ylim[5]);
+ /*
+ * Now get the time sequence and a good time interval flag array.
+ */
+ cf_verbose(3, "nevents = %ld", nevents);
+ mxtime=ptime[nevents-1];
+ nflgarr = cf_nint(mxtime);
+ npts= (int) mxtime/nbin;
+ cf_verbose(3, "Number of points in the (binned) time sequence = %d", npts);
+ cf_verbose(3, "Number of points in the good time flag array = %ld", nflgarr);
+ /*
+ * Generate arrays to contain the time sequence in the
+ * background sample regions (cnts) as well as the entire
+ * detector (gcnts). Also generate an array to contain only
+ * the bursts (bursts).
+ * Array bcnts will contain the background count rate.
+ */
+ bcnts = (int *) cf_calloc(npts, sizeof(int));
+ cnts = (int *) cf_calloc(npts, sizeof(int));
+ gcnts = (int *) cf_calloc(npts, sizeof(int));
+ bursts = (int *) cf_calloc(npts, sizeof(int));
+ /* Generate an array to contain the good time flags - this is an array
+ with 1s time intervals. Each interval is set to a negative number (-1)
+ if it contains a bad time interval or a positive number (1) if it
+ contains a good time interval. The contents of this array are used to
+ screen the photons and to determine the good time intervals */
+ flgarr = (int*) cf_calloc(nflgarr, sizeof(int) );
+ /* Generate an array with 1s time intervals to contain the day/night
+ information - this will be 1 for night and 0 for day */
+
+ /* Initially flag all of the points with a negative number.
+ The good time intervals will be determined later */
+ for (i=0; i<npts; i++) {
+ cnts[i] = -10 ;
+ gcnts[i] = 0 ;
+ bursts[i] = -10 ;
+ }
+ for (i=0; i<nflgarr; i++) flgarr[i] = -1 ;
+ /*
+ * Set the counts array to zero (i.e. unflag the point) for all
+ * good time points.
+ */
+ ngood = 0 ;
+ for (i=0; i < gti->ntimes; i++) {
+ ndxs= (int) gti->start[i]/nbin;
+ if (ndxs < 0 ) ndxs = 0 ;
+ ndxe = (int) (0.5 + gti->stop[i]/nbin);
+ if (ndxe > npts-1) ndxe = npts-1;
+ for (j=ndxs; j<= ndxe; j++) {
+ ngood++;
+ cnts[j]=0;
+ }
+ }
+ cf_verbose(2, "Number of good time points = %d\n", ngood);
+
+ /* Set the good time flags array to a positive value for all good
+ time points */
+
+ for (i=0; i < gti->ntimes; i++) {
+ ndxs= (int) gti->start[i];
+ if (ndxs < 0) ndxs = 0 ;
+ ndxe = (int) gti->stop[i];
+ if (ndxe > nflgarr-1) ndxe=nflgarr-1;
+ for (j=ndxs; j<= ndxe; j++)
+ flgarr[j]=1;
+ }
+
+ /* Check the timeline-table screening flag and mark all times that have
+ a screening bit set (except for day/night) */
+ for (i=0; i<nsec; i++) {
+ ndx = (int) (0.5+ttime[i]) ;
+ if( ndx > nflgarr-1) ndx = nflgarr-1;
+ if( ndx < 0) ndx = 0 ;
+ ndxb = (int) (0.5 + (float) ndx/ (float) nbin) ;
+ if(ndxb > npts-1) ndxb = npts-1 ;
+ if (ndxb < 0) ndxb=0 ;
+ if (sflag[i] & ~TEMPORAL_DAY) {
+ flgarr[ndx] = -1 ;
+ cnts[ndxb] = -10 ;
+ }
+ }
+
+ /* Generate the time sequence for the total counts from the detector.
+ Use only the active area and ignore geocoronal emission. */
+
+ for (i=0; i < nevents; i+=1)
+ if( (locflags[i] & LOCATION_SHLD) == 0 &&
+ (locflags[i] & LOCATION_AIR) == 0 ) {
+ int ndx = (int) ptime[i]/nbin;
+ if (ndx > npts-1)
+ ndx=npts-1;
+ if (ndx < 0)
+ ndx=0;
+ gcnts[ndx] += 1;
+ }
+
+ /* Determine the number of rows in the background sample region */
+ for (k=0; k < 3; k++)
+ nrowbkg += ylim[2*k+1] - ylim[2*k];
+ /*
+ * Determine the scaling factor needed to convert the measured
+ * counts in the background regions to an estimate of the
+ * background counts over the active aperture.
+ */
+ bkgsf= (float) ylim[6]/nrowbkg;
+ bkgsft = (float) ylim[7]/nrowbkg;
+
+ cf_verbose(2, "Rows in target aperture = %d", ylim[6]);
+ cf_verbose(2, "Rows on the detector = %d", ylim[7]);
+ cf_verbose(2, "Rows in background region = %d", nrowbkg);
+ cf_verbose(2, "Scale factor to aperture = %f ", bkgsf);
+ cf_verbose(2, "Scale factor to entire detector = %f", bkgsft);
+
+ /* Generate the time sequence using only the counts from the three
+ selected background regions - ignore geocoronal lines and times
+ that have been flagged as bad (with negative count values) */
+ for (k=0; k<3; k++) {
+ short ylow=ylim[2*k];
+ short yhigh=ylim[2*k+1];
+ for (i=0; i < nevents; i+=1) {
+ if( (locflags[i] & LOCATION_SHLD) == 0 &&
+ (locflags[i] & LOCATION_AIR) == 0 &&
+ (y[i] > ylow) && (y[i] < yhigh) ) {
+ int ndx = (int) ptime[i]/nbin;
+ if (ndx > npts-1)
+ ndx=npts-1;
+ if (ndx < 0)
+ ndx=0;
+ if (cnts[ndx] >= 0) cnts[ndx] += 1;
+ bcnts[ndx] ++;
+ }
+ }
+ }
+
+ /* Fill background count rate array with cnts array, and divide by nbin
+ to give count rate */
+/* THIS SCHEME WORKS ONLY IF THERE ARE NO TIME BREAKS IN THE TIMELINE
+ * TABLE. SINCE TIME BREAKS ARE COMMON, MUST USE TTIME ARRAY TO MAP
+ * CNTS ARRAY TO BKGD ARRAY. WVD 09/15/03
+ * for (i=0; i<npts; i++) {
+ * int ndxs= i*nbin;
+ * int ndxe= ndxs + nbin;
+ * if (ndxe > nsec-1)
+ * ndxe=nsec-1;
+ * for (j=ndxs;j<ndxe; j++)
+ * bkgd[j] = (short) ((float) cnts[i] / nbin + 0.5);
+ * }
+ */
+ for (i=0; i<nsec; i++) {
+ ndx = cf_nint(ttime[i]/nbin) ;
+ if( ndx > nflgarr-1)
+ ndx = nflgarr-1;
+/* if (cnts[ndx] > 0.)
+ bkgd[i] = (short) ((float) cnts[ndx] / nbin + 0.5);
+ else
+ bkgd[i] = 0;
+*/
+ bkgd[i] = bcnts[ndx] / nbin;
+ }
+ free (bcnts);
+
+ /* Remove the background counts (scaled to the entire detector) from the
+ measured gross count rate */
+ for (i=0; i < npts; i++) if (cnts[i] > 0) {
+ gcnts[i] = gcnts[i] - bkgsft*cnts[i];
+ if (gcnts[i] < 0)
+ gcnts[i] = 0;
+ }
+
+ /* Check for zeros in the count array for high count rate data - these
+ indicate dropouts. If one is found, flag it with a negative number so
+ that the program will ignore it in future analysis */
+ numflg=0;
+ if (cflg > 0) {
+ for (i=0; i < npts; i++) {
+ if (cnts[i] <= 0.1 ) {
+ numflg += 1;
+ cnts[i]=-10;
+ }
+ }
+ }
+ cf_verbose(2, "Number of dropouts found = %d", numflg);
+
+ /* Determine the median value of the array */
+ nmax=2000;
+ medval = median(cnts, npts, nmax);
+ cf_verbose(2, "Median value of the entire original array = %d ", medval);
+
+ /* Screen the time series for very large count rates (> 3 x median) */
+ cf_verbose(2, "Searching for large bursts ") ;
+ for ( i=0; i<npts; i++)
+ if (cnts[i] > 4*medval) {
+ cf_verbose(2,"point rej: time=%d, cnts=%d, 4*medval=%d ",
+ i*nbin, cnts[i], 4*medval) ;
+ bursts[i] = cnts[i]-medval;
+ cnts[i] = -100;
+ }
+
+ /* Do a median filter on the pre-filtered array */
+
+ /* Generate the array to contain the median filter */
+ medflt = (int *) cf_calloc(npts, sizeof(int) );
+
+ /*
+ * Now specify the parameters of the filter -
+ * nsmed = number of seconds over which to determine median values
+ * nflt = number of points in the cnts array over which to
+ * determine the median value
+ */
+ nflt = nsmed / nbin;
+ niter=0;
+
+ cf_verbose(3,"Searching for small bursts - nflt = %d", nflt) ;
+
+ do {
+ median_filter(cnts, npts, nflt, medflt);
+
+ /* Throw out all points which are more than (stdrej) standard
+ deviations above the median. Also require that the counts exceed
+ a certain minimum value. */
+ nflg=0;
+ mnburst=mncnt*nbin;
+ for (i=0; i<npts; i++) {
+ int dcnt=cnts[i]-medflt[i];
+ if ( (dcnt > mnburst) &&
+ (dcnt > stdrej*sqrt((double) cnts[i])) &&
+ (dcnt*bkgsf > srcfrac*gcnts[i]) ) {
+ nflg++;
+ cf_verbose(2, "point rej: time=%ld, cnts=%d, medflt=%d, "
+ "dif=%d, gcnts= %d",
+ i*nbin, cnts[i], medflt[i], dcnt, gcnts[i]);
+ cnts[i] = -100;
+ bursts[i] = dcnt;
+ }
+ }
+ niter++;
+ cf_verbose(3,"After iteration %d, we found %d times affected by bursts",
+ niter, nflg) ;
+ /* Iterate the median filter if any additional points have
+ * been modified*/
+ } while(nflg > 0 && niter < 10);
+
+ /* Print out the results of the screening
+ cf_verbose(5, " ");
+ for (i=0; i<npts; i++)
+ cf_verbose(5, "At time %4d, cnts= %4d, medflt= %4d, dif= %4d, gcnts= %4d",
+ i*nbin, cnts[i],medflt[i], cnts[i]-medflt[i], gcnts[i]);
+ cf_verbose(3, " ");
+ */
+
+ /* Use the regions of the cnts array equal to -100 to specify
+ the burst times in the flgarr array */
+ for (i=0; i<npts; i++ ) {
+ if (cnts[i] < -20) {
+ int ndxs = i*nbin, ndxe;
+ if (ndxs > nflgarr-nbin-2)
+ ndxs=nflgarr-nbin-2;
+ ndxe = ndxs + nbin - 1;
+ for (j=ndxs; j<=ndxe; j++)
+ flgarr[j] = -10;
+ }
+ }
+
+ /* tabulate the burst times */
+ sprintf(burst_tab, "%4s%2s%2s%3s%2s_bursts.dat", progid, targid, scobsid, expid, det);
+ tab_burst(bursts, npts, nbin, mjd, tst, burst_tab);
+ cf_verbose(3, "Burst properties written to file: %s", burst_tab);
+
+ /* Check the last 2*nbin elements of flgarr. If any of these are set as
+ bad, then set all the end points as bad. The binned count time sequence
+ will not sample the end of the ovarall time sequence if there is not an
+ integral number of bins present. We also do not need the last bin if the
+ second-to-last is bad. */
+
+ i=nflgarr-2*nbin;
+ iflg=10;
+ do{
+ if (flgarr[i] < -1) { /* 09/12/03 - wvd - Change from 0 */
+ for (j=i; j<nflgarr; j++)
+ flgarr[j]=-10;
+ iflg = -10;
+ };
+ i++;
+ } while (iflg > 0 && i < nflgarr);
+
+ /* set the timeline status flag (sflag - TEMPORAL_BRST) for all
+ times containing bursts */
+ for (i=0; i<nsec; i++) {
+ ndx = (int) (0.5+ttime[i]) ;
+ if( ndx > nflgarr-1)
+ ndx = nflgarr-1;
+ if (flgarr[ndx] < -1) /* 09/12/03 - wvd - Change from 0 */
+ sflag[i] = sflag[i] | TEMPORAL_BRST;
+ }
+ /* deallocate storage space */
+ free(cnts) ;
+ free(gcnts) ;
+ free(flgarr) ;
+ free(medflt) ;
+ free(bursts) ;
+
+ /* Enter a time stamp into the log */
+ cf_proc_update(infits, CF_PRGM_ID, "COMPLETE");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished processing");
+
+ return (status);
+}
diff --git a/src/libcf/cf_screen_high_voltage.c b/src/libcf/cf_screen_high_voltage.c
new file mode 100644
index 0000000..57a9716
--- /dev/null
+++ b/src/libcf/cf_screen_high_voltage.c
@@ -0,0 +1,146 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_screen_high_voltage(fitsfile *infits, long nseconds,
+ * unsigned char *timeline_status, short *timeline_hv);
+ *
+ * Description: Set the screening bit if detector voltage is low.
+ *
+ * Arguments: fitsfile *infits Input FITS file pointer
+ * long nseconds Number of points in the timeline table
+ * unsigned char *timeline_status The status flag array
+ * short *timeline_hv The high voltage array
+ *
+ * Calls:
+ *
+ * Returns: 0 on success
+ *
+ * History: 10/23/02 1.1 jch Initial coding
+ * 12/20/02 1.3 jch Make sure the flags are "unsigned" char
+ * 01/24/03 1.4 rdr Lower the voltage threshold required
+ * to flag a time to 95% of the full
+ * voltage
+ * 02/11/03 1.6 jch Skip HV which is negative
+ * 05/20/03 1.7 rdr Add call to cf_proc_check
+ * 05/22/03 1.8 wvd Implement cf_verbose
+ * 06/11/03 1.9 wvd Change HV array to type short.
+ * 06/13/03 1.10 wvd Change calfusettag.h to calfuse.h
+ * 09/10/03 1.11 wvd Return errflg from cf_proc_check.
+ * 07/21/04 1.12 wvd Delete unused variable volt_cor.
+ * 02/17/05 1.13 wvd Place parentheses around assignment
+ * used as truth value.
+ * 03/18/05 1.14 wvd HV can be 0, so test for HV > -1
+ * 03/24/05 1.15 wvd Read HVGOODLM and HVBADLIM from
+ * VOLT_CAL file. If HV/FULLV drops
+ * below HVGOODLM, issue warning.
+ * If it falls below HVBADLM, set
+ * TEMPORAL_HV flag.
+ * 06/22/06 1.16 wvd Don't set EXP_STAT keyword.
+ *
+ ****************************************************************************/
+
+#include <string.h>
+#include <stdio.h>
+#include "calfuse.h"
+
+int
+cf_screen_high_voltage(fitsfile *infits, long nseconds,
+ unsigned char *timeline_status, short *timeline_hv)
+{
+ char CF_PRGM_ID[] = "cf_screen_high_voltage";
+ char CF_VER_NUM[] = "1.16";
+
+ char file_name[FLEN_VALUE], mjd_str[FLEN_VALUE], full_str[FLEN_VALUE];
+ char datestr[FLEN_VALUE], comment[FLEN_COMMENT], instmode[FLEN_VALUE];
+ int errflg=0, status=0, timeref, hvflag=FALSE, n, fullv;
+ long i;
+ float expstart, hvfrac, hvgood, hvbad, mjdv;
+ fitsfile *scrnfits;
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+ if ((errflg = cf_proc_check(infits, CF_PRGM_ID))) return errflg;
+
+ /* Read exposure start time and instrument mode. */
+ FITS_read_key(infits, TFLOAT, "EXPSTART", &expstart, NULL, &status);
+ FITS_read_key(infits, TSTRING, "INSTMODE", instmode, NULL, &status);
+ /*
+ * Open the high-voltage calibration file.
+ */
+ FITS_read_key(infits, TSTRING, "VOLT_CAL", file_name, NULL, &status);
+ FITS_open_file(&scrnfits, cf_cal_file(file_name), READONLY, &status);
+ /*
+ * Read the limits of the good and questionable voltage regimes.
+ */
+ FITS_read_key(scrnfits, TFLOAT, "HVGOODLM", &hvgood, NULL, &status);
+ FITS_read_key(scrnfits, TFLOAT, "HVBADLIM", &hvbad, NULL, &status);
+ /*
+ * Read full-voltage level in use at time of observation.
+ */
+ n = 0;
+ do {
+ n++;
+ sprintf(mjd_str, "MJD%d", n);
+ FITS_read_key(scrnfits, TFLOAT, mjd_str, &mjdv, NULL, &status);
+ } while (expstart > mjdv);
+ n--;
+
+ sprintf(full_str, "FULL%d", n);
+ FITS_read_key(scrnfits, TINT, full_str, &fullv, NULL, &status);
+ FITS_close_file(scrnfits, &status);
+
+ /*
+ * Check for low values of the detector voltage.
+ * Set the high voltage bit if timeline_hv/fullv < hvbad.
+ */
+ cf_verbose(2, "Threshold voltage = %d", cf_nint(hvbad * fullv)) ;
+
+ for (i = 0; i < nseconds; i++) if (timeline_hv[i] > -1) {
+ hvfrac = timeline_hv[i] / (float) fullv;
+ if (hvfrac < hvgood) {
+ if (hvfrac < hvbad) timeline_status[i] |= TEMPORAL_HV;
+ else hvflag = TRUE;
+ }
+ }
+
+ /*
+ * If the detector voltage ever falls between the good and bad
+ * levels, issue a stern warning to the user.
+ */
+ if (hvflag) {
+ /* Write warning to trailer file. */
+ if (!strncmp(instmode, "HIST", 4))
+ cf_if_warning("Detector voltage is < 90%% of optimal value. "
+ "Check photometry and wavelength scale.");
+ else
+ cf_if_warning("Detector voltage is < 90%% of optimal value. "
+ "Check pulse-height distribution.");
+
+ /* Write warning to IDF file header. */
+ FITS_write_comment(infits, " ", &status);
+ FITS_write_comment(infits,
+ "Detector voltage is less than 90%% of optimal value.", &status);
+ if (!strncmp(instmode, "HIST", 4)) {
+ FITS_write_comment(infits,
+ "Carefully examine these data for photometric errors", &status);
+ FITS_write_comment(infits, "and walk effects.", &status);
+ }
+ else {
+ FITS_write_comment(infits,
+ "Carefully examine the pulse height distribution of photons", &status);
+ FITS_write_comment(infits,
+ "in the target aperture before accepting these data.", &status);
+ }
+ fits_get_system_time(datestr, &timeref, &status);
+ sprintf(comment, "CalFUSE v%s %.10s", CALFUSE_VERSION, datestr);
+ FITS_write_comment(infits, comment, &status);
+ FITS_write_comment(infits, " ", &status);
+ }
+
+ cf_proc_update(infits, CF_PRGM_ID, "COMPLETE");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+ return status;
+}
diff --git a/src/libcf/cf_screen_jitter.c b/src/libcf/cf_screen_jitter.c
new file mode 100644
index 0000000..68327a0
--- /dev/null
+++ b/src/libcf/cf_screen_jitter.c
@@ -0,0 +1,246 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center for Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_screen_jitter (infile, nsec, ttime, status_flag)
+ *
+ * Description: Flag times when target is out of the aperture or pointing
+ * is known to be bad. Read the minimum trustworthy TRKFLG
+ * value and aperture limits from the parameter file.
+ *
+ * Key to new TRKFLG values:
+ * 5 = dx, dy from known FPDs and q_cmd from telemetry
+ * 4 = good dx, dy from ACS q_est and q_cmd from telemetry
+ * 3 = maybe good dx, dy from ACS q_est
+ * 2 = dx, dy from known FPDs, q_cmd from FITS header coordinates
+ * 1 = dx, dy from ACS q_est, q_cmd from FITS header coordinates
+ * 0 = no pointing information (missing telemetry)
+ * -1 = Pointing is assumed to be bad (never achieved known track)
+ *
+ * Arguments: fitsfile infile Pointer to the IDF
+ * long nsec Number of seconds in the timeline
+ * long *ttime time (sec) of each point in the timeline
+ * unsigned char *status_flag Timeline status flags
+ *
+ * Returns: 0 upon success
+ *
+ * History: 11/29/05 v1.1 wvd Adapted from cf_satellite_jitter
+ * 03/28/06 1.2 wvd Test both dx and dy.
+ * 05/09/06 1.3 wvd Apply jitter screening to RFPT obs.
+ * 06/12/06 1.4 wvd Call cf_verbose when jitter file not
+ * found.
+ * 08/21/06 1.5 wvd Use EXPSTART in jitter and data
+ * headers to correct jitter time array.
+ * 08/25/06 1.6 wvd Change meaning of TRKFLG values.
+ * TRKFLG = 3 is only used internally.
+ * 11/06/06 1.7 wvd Change meaning of TRKFLG values.
+ * Read minimum TRKFLG value and
+ * aperture limits from parmfile.
+ * Require jitter file version >= 3.0.
+ * Don't screen moving targets.
+ * Bail out only if JIT_STAT = 1.
+ * 12/29/06 1.8 wvd Exit if JIT_VERS < 3.0.
+ * 03/23/07 1.9 wvd Store offset between the jitter and
+ * data values of EXPSTART in variable
+ * time_diff.
+ * 04/07/07 1.10 wvd Clean up compiler warnings.
+ * 08/16/07 1.11 wvd Don't apply jitter correction to
+ * observations taken after the
+ * spacecraft lost pointing control.
+ * 07/25/08 1.12 wvd Use EXP_STAT keyword, rather than
+ * file name, to check for bright-earth
+ * or airglow observations.
+ * 11/21/08 1.13 wvd Don't apply jitter correction to
+ * ERO observations of Jupiter.
+ *
+ ****************************************************************************/
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include "calfuse.h"
+
+#define JIT_VERS_MIN 3.0
+#define BAD_TRKFLG -1
+#define LAST_MJD 54300.
+
+int
+cf_screen_jitter(fitsfile *infits, long nsec, float *ttime,
+ unsigned char *status_flag)
+{
+ char CF_PRGM_ID[] = "cf_screen_jitter";
+ char CF_VER_NUM[] = "1.13";
+
+ char jitr_cal[FLEN_VALUE], parmfile[FLEN_VALUE];
+ char comment[FLEN_COMMENT], hkexists[FLEN_VALUE], jit_vers[FLEN_VALUE];
+ char mov_targ[FLEN_VALUE], program[FLEN_VALUE];
+ int errflg=0, status=0, expstat, jitter_status, hdutype;
+ long j, k, njitr, *time_jit, time_diff;
+ short *trkflg, trkflg_min;
+ double data_expstart, jitr_expstart;
+ float *dx_jit, *dy_jit, dx_max, dy_max;
+ fitsfile *jitfits, *parmfits;
+
+ /* Initialize error checking */
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+ /* Enter a time stamp into the log */
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ /* Read exposure start time from IDF header */
+ FITS_read_key(infits, TDOUBLE, "EXPSTART", &data_expstart, NULL, &status);
+
+ /* Check whether program is appropriate for this data set. */
+ if ((errflg = cf_proc_check(infits, CF_PRGM_ID))) return errflg;
+
+ /* Don't apply jitter screening to bright-earth or airglow observations. */
+ FITS_read_key(infits, TINT, "EXP_STAT", &expstat, NULL, &status);
+ if (expstat == (int) TEMPORAL_LIMB) {
+ cf_verbose(1, "Bright-earth or airglow observation. ",
+ "No jitter correction.");
+ cf_proc_update(infits, CF_PRGM_ID, "SKIPPED");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished processing");
+ return 0;
+ }
+
+ /* Don't apply jitter screening to moving targets. */
+ FITS_read_key(infits, TSTRING, "MOV_TARG", mov_targ, NULL, &status);
+ if (!strncmp(mov_targ, "M", 1)) {
+ cf_verbose(1, "Moving-target observation. No jitter correction.");
+ cf_proc_update(infits, CF_PRGM_ID, "SKIPPED");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished processing");
+ return 0;
+ }
+
+ /* Don't apply jitter screening to ERO observations of Jupiter. */
+ FITS_read_key(infits, TSTRING, "PRGRM_ID", program, NULL, &status);
+ if (!strncmp(program, "X006", 4)) {
+ cf_verbose(1, "Moving-target observation. No jitter correction.");
+ cf_proc_update(infits, CF_PRGM_ID, "SKIPPED");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished processing");
+ return 0;
+ }
+
+ /* Don't apply jitter screening after pointing control is lost. */
+ if (data_expstart > LAST_MJD) {
+ cf_verbose(1, "No pointing control. No jitter correction.");
+ cf_proc_update(infits, CF_PRGM_ID, "SKIPPED");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished processing");
+ return 0;
+ }
+
+ /* Check HKEXISTS before looking for jitter file. */
+ FITS_read_key(infits, TSTRING, "HKEXISTS", hkexists, NULL, &status);
+ if(!strncasecmp(hkexists, "N", 1) || !strncasecmp(hkexists, "n", 1)) {
+ cf_verbose(1, "HKEXISTS = %s. No jitter correction.", hkexists);
+ cf_proc_update(infits, CF_PRGM_ID, "SKIPPED");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished processing");
+ return 0;
+ }
+
+ /* Try to open the jitter file. */
+ FITS_read_key(infits, TSTRING, "JITR_CAL", jitr_cal, NULL, &status);
+ fits_open_file(&jitfits, jitr_cal, READONLY, &status);
+
+ /* If the jitter file is not found, try a lower-case filename. */
+ if (status != 0) {
+ status = 0;
+ jitr_cal[0] = (char) tolower(jitr_cal[0]);
+ fits_open_file(&jitfits, jitr_cal, READONLY, &status);
+ }
+
+ /* If the jitter file is still not found, exit the program */
+ if (status != 0) {
+ cf_verbose(1, "Jitter file not found. No jitter correction.");
+ cf_proc_update(infits, CF_PRGM_ID, "SKIPPED");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished processing");
+ return 0;
+ }
+ cf_verbose(3, "Jitter calibration file = %s", jitr_cal);
+
+ /* Check status keyword in jitter file. Exit if missing or non-zero. */
+ fits_read_key(jitfits, TINT, "JIT_STAT", &jitter_status, comment, &status);
+ if (status != 0) {
+ status = 0;
+ cf_verbose(1, "Keyword JIT_STAT not found. No jitter correction.");
+ cf_proc_update(infits, CF_PRGM_ID, "SKIPPED");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished processing");
+ return 0;
+ }
+ if (jitter_status == 1) {
+ cf_verbose(1, "Keyword JIT_STAT = %d. No jitter correction.",
+ jitter_status) ;
+ cf_proc_update(infits, CF_PRGM_ID, "SKIPPED");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished processing");
+ return 0;
+ }
+
+ /* Read exposure start time from jitter file header */
+ FITS_read_key(jitfits, TDOUBLE, "EXPSTART", &jitr_expstart, NULL, &status);
+
+ /* Check JIT_VERS keyword. Exit if missing or value too low. */
+ fits_read_key(jitfits, TSTRING, "JIT_VERS", jit_vers, NULL, &status);
+ if (status != 0 || atof(jit_vers) < JIT_VERS_MIN) {
+ status = 0;
+ cf_verbose(1, "Jitter file format is out of date. No jitter correction.");
+ cf_proc_update(infits, CF_PRGM_ID, "SKIPPED");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished processing");
+ return 0;
+ }
+
+ /* Read the jitter file. */
+ FITS_movabs_hdu(jitfits, 2, &hdutype, &status);
+ njitr=cf_read_col(jitfits, TLONG, "TIME", (void **) &time_jit);
+ njitr=cf_read_col(jitfits, TFLOAT, "DX", (void **) &dx_jit);
+ njitr=cf_read_col(jitfits, TFLOAT, "DY", (void **) &dy_jit);
+ njitr=cf_read_col(jitfits, TSHORT, "TRKFLG", (void **) &trkflg);
+ FITS_close_file(jitfits, &status);
+
+ /* Correct for difference in data and jitter EXPSTART times */
+ time_diff = cf_nlong((data_expstart - jitr_expstart) * 86400.);
+ cf_verbose(2, "Offset between IDF and jitter EXPSTART values: %d sec",
+ time_diff);
+ for (j=0; j< njitr; j++) time_jit[j] -= time_diff;
+
+ /* Read minimum TRKFLG value and aperture boundaries from PARM_CAL file */
+ FITS_read_key(infits, TSTRING, "PARM_CAL", parmfile, NULL, &status);
+ FITS_open_file(&parmfits, cf_parm_file(parmfile), READONLY, &status);
+ FITS_read_key(parmfits, TSHORT, "TRKFLG", &trkflg_min, NULL, &status);
+ FITS_read_key(parmfits, TFLOAT, "DX_MAX", &dx_max, NULL, &status);
+ FITS_read_key(parmfits, TFLOAT, "DY_MAX", &dy_max, NULL, &status);
+ FITS_close_file(parmfits, &status);
+
+ /* Reject times when tracking is good, but target is out of aperture. */
+ for (j=0; j< njitr; j++) {
+ if (trkflg[j] >= trkflg_min &&
+ (dx_jit[j] < -dx_max || dx_jit[j] > dx_max ||
+ dy_jit[j] < -dy_max || dy_jit[j] > dy_max)) {
+ trkflg[j] = BAD_TRKFLG;
+ }
+ }
+
+ /*
+ * Map times in the jitter file to times in the timeline table.
+ * If trkflg[j] = BAD_TRKFLG, set the jitter flag in the timeline
+ * status array.
+ */
+ for (j=k=0; k < nsec; k++) {
+ while ((float) time_jit[j+1] < ttime[k] && j+1 < njitr) j++;
+ if (trkflg[j] == BAD_TRKFLG) {
+ status_flag[k] |= TEMPORAL_JITR;
+ }
+ }
+
+ /* Deallocate storage space */
+ free(time_jit);
+ free(dy_jit);
+ free(trkflg);
+
+ cf_proc_update(infits, CF_PRGM_ID, "COMPLETE");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished processing");
+
+ return (status);
+}
diff --git a/src/libcf/cf_screen_limb_angle.c b/src/libcf/cf_screen_limb_angle.c
new file mode 100644
index 0000000..5e2f54b
--- /dev/null
+++ b/src/libcf/cf_screen_limb_angle.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_screen_limb_angle(fitsfile *infits, long nseconds,
+ * unsigned char *timeline_status,
+ * float *timeline_limb);
+ *
+ * Description: Set the screening bit due to limb angle constraint.
+ *
+ * Arguments: fitsfile *infits Input FITS file pointer
+ * long nseconds Number of points in the timeline table
+ * unsigned char *timeline_status The status flag array
+ * float *timeline_limb The limb angle distance array
+ *
+ * Calls:
+ *
+ * Returns: 0 on success
+ *
+ * History: 10/21/02 1.1 jch Initial coding
+ * 12/20/02 1.3 jch Make sure the flags are unsigned char
+ * 05/20/03 1.4 rdr Added call to cf_proc_check
+ * 09/10/03 1.5 wvd Move test of LIMB_SCR to cf_fuv_init.
+ * 07/21/04 1.7 wvd Delete unused variable limb_cor.
+ * 02/17/05 1.8 wvd Place parentheses around assignment
+ * used as truth value.
+ * 03/30/05 1.9 wvd Write BRITLIMB and DARKLIMB keywords
+ * to IDF file header.
+ *
+ ****************************************************************************/
+
+#include <string.h>
+#include <stdio.h>
+#include "calfuse.h"
+
+int
+cf_screen_limb_angle(fitsfile *infits, long nseconds,
+ unsigned char *timeline_status, float *timeline_limb)
+{
+ char CF_PRGM_ID[] = "cf_screen_limb_angle";
+ char CF_VER_NUM[] = "1.9";
+
+ int errflg=0, status=0;
+ long i;
+ char file_name[FLEN_VALUE];
+ double angle, britlimb, darklimb;
+ fitsfile *scrnfits;
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ if ((errflg = cf_proc_check(infits, CF_PRGM_ID))) return errflg;
+
+ /*
+ * Open the screening parameters file and read the parameters.
+ */
+ FITS_read_key(infits, TSTRING, "SCRN_CAL", file_name, NULL, &status);
+ FITS_open_file(&scrnfits, cf_parm_file(file_name), READONLY, &status);
+
+ FITS_read_key(scrnfits, TDOUBLE, "BRITLIMB", &britlimb, NULL, &status);
+ FITS_read_key(scrnfits, TDOUBLE, "DARKLIMB", &darklimb, NULL, &status);
+ /*
+ * Write BRITLIMB and DARKLIMB keywords to IDF file header.
+ */
+ FITS_update_key(infits, TDOUBLE, "BRITLIMB", &britlimb, NULL, &status);
+ FITS_update_key(infits, TDOUBLE, "DARKLIMB", &darklimb, NULL, &status);
+ /*
+ * If the limb angle is less than the limit, set the limb-angle bit.
+ * Use day or night limit as appropriate.
+ */
+ for (i = 0; i < nseconds; i++) {
+ angle = darklimb;
+ if ((timeline_status[i] & TEMPORAL_DAY) == TEMPORAL_DAY) {
+ angle = britlimb;
+ }
+ if (timeline_limb[i] < angle) {
+ timeline_status[i] |= TEMPORAL_LIMB;
+ }
+ }
+ FITS_close_file(scrnfits, &status);
+
+ cf_proc_update(infits, CF_PRGM_ID, "COMPLETE");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+ return status;
+}
diff --git a/src/libcf/cf_screen_pulse_height.c b/src/libcf/cf_screen_pulse_height.c
new file mode 100644
index 0000000..3b2c43e
--- /dev/null
+++ b/src/libcf/cf_screen_pulse_height.c
@@ -0,0 +1,79 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_screen_pulse_height(fitsfile *infits, long nevents,
+ * unsigned char *photon_ph,
+ * unsigned char *photon_locflag);
+ *
+ * Description: Set the screening bit according to PHA limits.
+ *
+ * Arguments: fitfile *infits Input FITS file pointer
+ * long nevents Number of points in the photon list
+ * unsigned char *photon_ph The photon pulse height array
+ * unsigned char *photon_locflag The photon location array
+ *
+ * Returns: 0 on success
+ *
+ * History: 11/01/02 1.1 jch Initial coding
+ * 12/20/02 1.3 jch Make sure the flags are "unsigned" char
+ * 02/14/03 1.4 rdr Update phalow and phahigh keywords
+ * in the IDF
+ * 05/20/03 1.5 rdr Add call to cf_proc_check
+ * 09/10/03 1.6 wvd Write NBADPHA as type LONG.
+ * 10/02/03 1.7 wvd Move PHA bit from TEMPORAL to
+ * LOCATION flags.
+ * 05/04/04 1.9 bjg Cosmetic change to prevent
+ * compiler warning with gcc -Wall
+ *
+ ****************************************************************************/
+
+#include <string.h>
+#include <stdio.h>
+#include "calfuse.h"
+
+int
+cf_screen_pulse_height(fitsfile *infits, long nevents, unsigned char *photon_ph,
+ unsigned char *photon_locflag)
+{
+ char CF_PRGM_ID[] = "cf_screen_pulse_height";
+ char CF_VER_NUM[] = "1.9";
+
+ char scrnfile[FLEN_VALUE];
+ unsigned char phalow, phahigh;
+ int errflg=0, status=0;
+ long i, nbadpha=0;
+ fitsfile *scrnfits;
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ if ((errflg = cf_proc_check(infits, CF_PRGM_ID))) return errflg;
+
+ /*
+ * Open the screening parameters file and read the parameters.
+ */
+ FITS_read_key(infits, TSTRING, "SCRN_CAL", scrnfile, NULL, &status);
+ FITS_open_file(&scrnfits, cf_parm_file(scrnfile), READONLY, &status);
+ FITS_read_key(scrnfits, TBYTE, "PHALOW", &phalow, NULL, &status);
+ FITS_read_key(scrnfits, TBYTE, "PHAHIGH", &phahigh, NULL, &status);
+ FITS_close_file(scrnfits, &status);
+ /*
+ * Set the pulse-height bit if pulse height is outside limits.
+ */
+ for (i = 0; i < nevents; i++) {
+ if (photon_ph[i] < phalow || photon_ph[i] > phahigh) {
+ photon_locflag[i] |= LOCATION_PHA;
+ nbadpha++;
+ }
+ }
+ FITS_update_key(infits, TLONG, "NBADPHA", &nbadpha, NULL, &status);
+ FITS_update_key(infits, TBYTE, "PHALOW", &phalow, NULL, &status);
+ FITS_update_key(infits, TBYTE, "PHAHIGH", &phahigh, NULL, &status);
+
+ cf_proc_update(infits, CF_PRGM_ID, "COMPLETE");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+ return status;
+}
diff --git a/src/libcf/cf_screen_saa.c b/src/libcf/cf_screen_saa.c
new file mode 100644
index 0000000..c79dc6e
--- /dev/null
+++ b/src/libcf/cf_screen_saa.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_screen_saa(fitsfile *infits, long nseconds,
+ * unsigned char *timeline_status,
+ * float *timeline_long, float *timeline_lat);
+ *
+ * Description: Set the screening bit due to SAA boundary.
+ *
+ * Arguments: fitsfile *infits Input FITS file pointer
+ * long nseconds Number of points in the timeline table
+ * unsigned char *timeline_status The status flag array
+ * float *timeline_long The longitude array
+ * float *timeline_lat The latitude array
+ *
+ * Calls: saa
+ *
+ * Returns: 0 on success
+ *
+ * History: 10/29/02 1.1 jch Initial coding
+ * 12/20/02 1.3 jch Include reading SAA table here
+ * 12/20/02 1.4 wvd Delete call to calfuse.h
+ * 05/20/03 1.5 rdr Add call to cf_proc_check
+ * 08/28/03 1.6 bjg New definition of structure saareg
+ * 09/02/03 1.7 wvd Change calfusettag.h to calfuse.h
+ * 09/10/03 1.8 wvd Tidy up code.
+ * 02/17/05 1.9 wvd Place parentheses around assignment
+ * used as truth value.
+ *
+ ****************************************************************************/
+
+#include <stdlib.h>
+
+#include "calfuse.h"
+
+int
+cf_screen_saa(fitsfile *infits, long nseconds, unsigned char *timeline_status,
+ float *timeline_long, float *timeline_lat)
+{
+ char CF_PRGM_ID[] = "cf_screen_saa";
+ char CF_VER_NUM[] = "1.9";
+
+ char saa_cal[FLEN_VALUE];
+ int errflg=0, status=0, hdutype;
+ long i;
+ saareg saa_bounds;
+ fitsfile *saafits;
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+ if ((errflg = cf_proc_check(infits, CF_PRGM_ID))) return errflg;
+
+ /*
+ * Read SAA boundaries from the specified calibration file.
+ */
+ FITS_read_key(infits, TSTRING, "SAAC_CAL", saa_cal, NULL, &status);
+ FITS_open_file(&saafits, cf_cal_file(saa_cal), READONLY, &status);
+ FITS_movabs_hdu(saafits, 2, &hdutype, &status);
+
+ saa_bounds.n_points =
+ cf_read_col(saafits, TFLOAT, "LATITUDE", (void **) &(saa_bounds.lat));
+ (void) cf_read_col(saafits, TFLOAT, "LONGITUDE", (void **) &(saa_bounds.lon));
+
+ fits_close_file(saafits, &status);
+
+ /*
+ * Set the SAA boundary bit if in SAA
+ */
+ for (i = 0; i < nseconds; i++) {
+ if (saa(&saa_bounds, (double)timeline_long[i], (double)timeline_lat[i])) {
+ timeline_status[i] |= TEMPORAL_SAA;
+ }
+ }
+ free(saa_bounds.lon);
+ free(saa_bounds.lat);
+
+ cf_proc_update(infits, CF_PRGM_ID, "COMPLETE");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+ return status;
+}
diff --git a/src/libcf/cf_set_good_time_intervals.c b/src/libcf/cf_set_good_time_intervals.c
new file mode 100644
index 0000000..2ed0d54
--- /dev/null
+++ b/src/libcf/cf_set_good_time_intervals.c
@@ -0,0 +1,157 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_set_good_time_intervals(fitsfile *infits, long nseconds,
+ * float *timeline_time,
+ * unsigned char *timeline_status, GTI *gti);
+ *
+ * Description: Compute the new good time intervals based on the timeline
+ * status flag.
+ *
+ * Arguments: fitsfile *infits Input FITS file pointer
+ * long nseconds Length of timeline table
+ * float *timeline_time Time array of timeline list
+ * unsigned char *timeline_status Status array of timeline list
+ * GIT *gti Good time interval(s)
+ *
+ * Calls:
+ *
+ * Returns: 0 on success
+ * -1 on error
+ *
+ * History: 11/01/02 1.1 jch Initial coding
+ * 12/20/02 1.3 jch Make sure that flags are unsigned char
+ * 05/09/03 1.4 wvd Include D/N screening in GTI's.
+ * Calculate EXPTIME as SUM (GTI's).
+ * Update header keyword EXPTIME.
+ * 05/20/03 1.5 rdr Add call to cf_proc_check
+ * 05/29/03 1.6 wvd Allow lower-case value of DAYNIGHT.
+ * Correct bug in calculation of gti.stop
+ * If in HIST mode, ignore LIMB, SAA,
+ * and BRST flags.
+ * 09/10/03 1.7 wvd Change calfusettag.h to calfuse.h
+ * 10/13/03 1.8 wvd Modify for new timeline table format.
+ * No time skips.
+ * 04/20/04 1.9 bjg Remove unused variables
+ * 12/01/04 1.10 bjg Set gti start and stop to zero
+ * for the single GTI when there are no
+ * Good Times.
+ * 08/23/07 1.11 wvd Change malloc to cf_malloc.
+ *
+ ****************************************************************************/
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "calfuse.h"
+
+int
+cf_set_good_time_intervals(fitsfile *infits, long nseconds,
+ float *timeline_time, unsigned char *timeline_status, GTI *gti)
+{
+ char CF_PRGM_ID[] = "cf_set_good_time_intervals";
+ char CF_VER_NUM[] = "1.11";
+
+ char daynight[FLEN_VALUE], instmode[FLEN_VALUE];
+ int in_bad; /* True between good-time intervals */
+ int day=FALSE, night=FALSE, errflg=0, status=0;
+ long j, jj;
+ float exptime=0.;
+ double last_good_time=-99;
+ unsigned char TEMPORAL_MASK;
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ if ((errflg = cf_proc_check(infits, CF_PRGM_ID) )) return errflg;
+
+ /* Read and interpret DAYNIGHT keyword. */
+
+ FITS_read_key(infits, TSTRING, "DAYNIGHT", daynight, NULL, &status);
+ if (!strncmp(daynight, "D", 1) || !strncmp(daynight, "d", 1)) {
+ day = TRUE;
+ }
+ else if (!strncmp(daynight, "N", 1) || !strncmp(daynight, "n", 1)) {
+ night = TRUE;
+ }
+ else if (!strncmp(daynight, "B", 1) || !strncmp(daynight, "b", 1)) {
+ day = night = TRUE;
+ }
+ else
+ cf_if_error("Unknown DAYNIGHT keyword value: %s", daynight);
+ cf_verbose(3, "DAYNIGHT flag set to %s", daynight);
+
+ /*
+ * Read INSTMODE keyword. If in HIST mode, mask out
+ * LIMB, SAA, and BRST flags. TEMPORAL_DAY is the default.
+ */
+ TEMPORAL_MASK = TEMPORAL_DAY;
+ FITS_read_key(infits, TSTRING, "INSTMODE", instmode, NULL, &status);
+ if (!strncmp(instmode, "HIST", 4)) {
+ TEMPORAL_MASK |= TEMPORAL_LIMB;
+ TEMPORAL_MASK |= TEMPORAL_SAA;
+ TEMPORAL_MASK |= TEMPORAL_BRST;
+ }
+
+ /*
+ * Determine limits of good-time intervals.
+ */
+ gti->start = (double *) cf_malloc(sizeof(double)*nseconds);
+ gti->stop = (double *) cf_malloc(sizeof(double)*nseconds);
+
+ in_bad = TRUE;
+ jj = -1;
+ for (j = 0; j < nseconds; j++) {
+ /*
+ * If we are in a good time interval and were in a bad one,
+ * increment jj and set gti->start.
+ */
+ if (!(timeline_status[j] & ~TEMPORAL_MASK) &&
+ ((day && (timeline_status[j] & TEMPORAL_DAY)) ||
+ (night && (timeline_status[j] ^ TEMPORAL_DAY)))) {
+ if (in_bad) {
+ jj++;
+ gti->start[jj] = timeline_time[j];
+ in_bad = FALSE;
+ }
+ /*
+ * If we are in a good time interval and were in a good one,
+ * update last_good_time.
+ */
+ last_good_time = timeline_time[j];
+ }
+ /*
+ * If we are in a bad time interval and were in a good one,
+ * set in_bad to TRUE and update gti->stop.
+ */
+ else if (in_bad == FALSE) {
+ gti->stop[jj] = timeline_time[j];
+ in_bad = TRUE;
+ }
+ }
+ gti->ntimes = jj + 1;
+
+ /* If the entire exposure is bad, return a zero-length GTI. */
+ if (gti->ntimes == 0) {
+ gti->ntimes = 1;
+ gti->start[0] = gti->stop[0] = 0;
+ }
+
+ /* Calculate total exposure time and write it to file header */
+ for (j = 0; j < gti->ntimes; j++)
+ exptime += gti->stop[j] - gti->start[j];
+ FITS_update_key(infits, TFLOAT, "EXPTIME", &exptime, NULL, &status);
+
+ /* Results to trailer file. */
+ cf_verbose(2, "GTI's:\t START\t STOP");
+ for (j = 0; j < gti->ntimes; j++)
+ cf_verbose(2, "%3d\t%6.0f\t%6.0f", j, gti->start[j], gti->stop[j]);
+ cf_verbose(2, "Total EXPTIME = %6.0f", exptime);
+
+ cf_proc_update(infits, CF_PRGM_ID, "COMPLETE");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+ return status;
+}
diff --git a/src/libcf/cf_set_photon_flags.c b/src/libcf/cf_set_photon_flags.c
new file mode 100644
index 0000000..de2b623
--- /dev/null
+++ b/src/libcf/cf_set_photon_flags.c
@@ -0,0 +1,425 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_set_photon_flags(fitsfile *infits, long nevents,
+ * float *photon_time,
+ * float *photon_weight,
+ * unsigned char *photon_status,
+ * unsigned char *photon_locflag,
+ * long nseconds, float *timeline_time,
+ * unsigned char *timeline_status);
+ *
+ * Description: Copy status flags from the timeline table to the photon list.
+ * Update header keywords.
+ *
+ * For histogram data, we set only the DAY flag.
+ * Other situations are treated as follows:
+ *
+ * DAY All photons flagged if exposure >10% day
+ *
+ * LIMB True for all if true for one.
+ * SAA Do not flag photons or modify EXPTIME.
+ * BRST Instead, set header keyword EXP_STAT.
+ * Ignore all violations during the
+ * first and last 20 seconds of an exposure.
+ *
+ * HV Modify EXPTIME, but do not flag photons.
+ * JITR Ditto.
+ *
+ * OPUS Ignore for now.
+ * USER Ignore for now.
+ *
+ * Arguments: fitsfile *infits Input FITS file pointer
+ * long nevents Number of points in the photon list
+ * float *photon_time Time array of photon events
+ * float *photon_weight Scale factor for each photon
+ * unsigned char *photon_status Status flags for photon events
+ * unsigned char *photon_locflag Location flags for photon events
+ * long nseconds Number of points in the timeline table
+ * float *timeline_time Time array of timeline list
+ * unsigned char *timeline_status Status flags for timeline list
+ *
+ * Calls:
+ *
+ * Returns: 0 on success
+ *
+ * History: 10/31/02 1.1 jch Initial coding
+ * 12/20/02 1.3 jch Make sure the flags are "unsigned" char
+ * 05/09/03 1.4 wvd Change EXP* keywords to type long.
+ * Consider DAYNIGHT keyword in evaluation
+ * of NBADEVNT and EXP_BAD.
+ * Use frame_tolerance in time comparison.
+ * Use photon_locflag in counting NBADEVNT
+ * 05/20/03 1.5 rdr Add call to cf_proc_check
+ * 05/29/03 1.6 wvd Modify to handle HIST data:
+ * Use single flag for all photon events.
+ * Ignore LIMB, SAA, and BRST flags when
+ * counting EXP_BAD. Scale NBADEVNT by
+ * photon_weight[i]/TOT_DEAD.
+ * 06/02/03 1.7 wvd Properly deal with GTI's.
+ * 07/14/03 1.8 wvd Read DAYNIGHT from SCRN_CAL and
+ * populate IDF header keyword.
+ * Use FRAME_TOLERANCE from calfuse.h.
+ * 09/15/03 1.9 wvd Copy flags only to photons whose times
+ * are within 1s of timeline table time.
+ * 10/02/03 1.10 wvd Change timeline table: no breaks in
+ * time; add TEMPORAL_OPUS flag.
+ * 10/13/03 1.11 wvd Use same scheme for calculating
+ * EXP_BAD and exp_screen.
+ * 04/20/04 1.12 bjg Cosmetic change to prevent
+ * compiler warning with gcc -Wall
+ * 05/20/04 1.13 wvd Don't flag HIST photons as bad
+ * when HV or JITR are bad.
+ * We'll reduce EXPTIME instead.
+ * 06/01/04 1.14 wvd For HIST data, set only DAY flag.
+ * Write other flags to EXP_STAT keyword.
+ * 06/28/04 1.15 wvd If > 90% of exposure is lost to a
+ * burst, jitter, etc., write cause to
+ * trailer file.
+ * 03/24/05 1.16 wvd If EXP_STAT != 0, don't change it.
+ * 01/01/07 1.17 wvd Remove mention of FIFO flag.
+ * 07/18/08 1.18 wvd If EXP_STAT = 2, target is bright
+ * earth or airglow. Set limb-angle
+ * flags to zero.
+ * 08/22/08 1.19 wvd Compare EXP_STAT to TEMPORAL_LIMB,
+ * rather than a particular value.
+ *
+ ****************************************************************************/
+
+#include <string.h>
+#include <stdio.h>
+#include "calfuse.h"
+
+#define HIST_PAD 20 /* Ignore first and last 20 s of each exposure. */
+
+/*
+ * Compute integration time lost to a particular screening step.
+ * Ignore times outside of OPUS-defined good-time intervals.
+ */
+static long
+time_loss(long nseconds, unsigned char *timeline_status,
+ unsigned char criterion)
+{
+ long exp_screen = 0, j;
+
+ for (j = 0; j < nseconds; j++) {
+ if (timeline_status[j] & TEMPORAL_OPUS) continue;
+ if (timeline_status[j] & criterion) exp_screen++;
+ }
+
+ return(exp_screen);
+}
+
+
+/*
+ * Compute integration time lost to a particular screening step,
+ * but ignore first and last HIST_PAD seconds of exposure.
+ */
+static long
+time_loss_pad(long nseconds, unsigned char *timeline_status,
+ unsigned char criterion)
+{
+ long exp_screen = 0, j;
+
+ for (j = HIST_PAD; j < nseconds - HIST_PAD; j++) {
+ if (timeline_status[j] & TEMPORAL_OPUS) continue;
+ if (timeline_status[j] & criterion) exp_screen++;
+ }
+ return (exp_screen);
+}
+
+
+/*
+ * In HIST mode, generate a status flag good for all photons.
+ * Except for D/N flag, we ignore first and last 20 seconds of exposure.
+ * D/N flag is written to TEMPORAL_MASK.
+ * LIMB/SAA/BRST flags are written to EXP_STAT.
+ */
+static void
+generate_temporal_mask(float rawtime, long nseconds, float *timeline_time,
+ unsigned char *timeline_status, unsigned char *TEMPORAL_MASK,
+ unsigned char *EXP_STAT, char *comment)
+{
+ long exp_day;
+
+ *EXP_STAT = *TEMPORAL_MASK = 0;
+
+ /*
+ * Day if exp_day > 10% of total exposure time.
+ */
+ exp_day=time_loss(nseconds, timeline_status, TEMPORAL_DAY);
+ if (exp_day * 10 > rawtime) {
+ *TEMPORAL_MASK = TEMPORAL_DAY;
+ sprintf(comment, "Exposure more than 10 percent day");
+ cf_verbose(1, comment);
+ }
+ /*
+ * If exposure is less than 40 seconds long, we're done.
+ */
+ if (rawtime < 2. * HIST_PAD) return;
+
+ /*
+ * Are there limb-angle violations?
+ */
+ if (time_loss_pad(nseconds, timeline_status, TEMPORAL_LIMB)) {
+ *EXP_STAT |= TEMPORAL_LIMB;
+ sprintf(comment, "Data suspect: Limb-angle violation");
+ cf_verbose(1, comment);
+ }
+ /*
+ * Do we ever enter the SAA?
+ */
+ if (time_loss_pad(nseconds, timeline_status, TEMPORAL_SAA)) {
+ *EXP_STAT |= TEMPORAL_SAA;
+ sprintf(comment, "Data suspect: SAA violation");
+ cf_verbose(1, comment);
+ }
+ /*
+ * Are there any bursts?
+ */
+ if (time_loss_pad(nseconds, timeline_status, TEMPORAL_BRST)) {
+ *EXP_STAT |= TEMPORAL_BRST;
+ sprintf(comment, "Data suspect: Burst detected");
+ cf_verbose(1, comment);
+ }
+
+ /*
+ * Is the detector voltage ever too low?
+ * If so, just issue a warning; we'll modify the exposure time later.
+ */
+ if (time_loss_pad(nseconds, timeline_status, TEMPORAL_HV))
+ cf_verbose(1, "EXPTIME modified: Detector voltage low.");
+ /*
+ * Was any time rejected by the jitter routine?
+ * If so, just issue a warning; we'll modify the exposure time later.
+ */
+ if (time_loss_pad(nseconds, timeline_status, TEMPORAL_JITR))
+ cf_verbose(1, "EXPTIME modified: Target out of aperture.");
+
+ return;
+}
+
+
+int
+cf_set_photon_flags(fitsfile *infits, long nevents, float *photon_time,
+ float *photon_weight, unsigned char *photon_status,
+ unsigned char *photon_locflag, long nseconds,
+ float *timeline_time, unsigned char *timeline_status)
+{
+ char CF_PRGM_ID[] = "cf_set_photon_flags";
+ char CF_VER_NUM[] = "1.19";
+
+ char comment[FLEN_COMMENT], daynight[FLEN_KEYWORD];
+ char instmode[FLEN_KEYWORD], scrnfile[FLEN_KEYWORD];
+ long i, j, k;
+
+ long nbadevnt=0; /* number of events deleted in screening */
+ long exp_bad=0; /* integration time lost to screening */
+ long exp_brst=0; /* integration time lost to event bursts */
+ long exp_hv=0; /* integration time lost to low detector voltage */
+ long exp_jitr=0; /* integration time lost to jitter */
+ long exp_limb=0; /* integration time with low limb angle */
+ long exp_saa=0; /* integration time while in SAA */
+ long exp_day=0; /* integration time during day after screening */
+ long expnight=0; /* integration time during night after screening */
+ int day = FALSE, night = FALSE;
+ int errflg = 0; /* value returned by cf_proc_check */
+ int status = 0; /* CFITSIO status */
+ int expstat; /* initial value of EXP_STAT keyword */
+ float deadtime, rawtime;
+ fitsfile *scrnfits;
+ unsigned char EXP_STAT, TEMPORAL_MASK;
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ if ((errflg = cf_proc_check(infits, CF_PRGM_ID) )) return errflg;
+
+ /* Read and interpret DAYNIGHT keyword. Copy to IDF header. */
+
+ FITS_read_key(infits, TSTRING, "SCRN_CAL", scrnfile, NULL, &status);
+ FITS_open_file(&scrnfits, cf_parm_file(scrnfile), READONLY, &status);
+ FITS_read_key(scrnfits, TSTRING, "DAYNIGHT", daynight, NULL, &status);
+ FITS_close_file(scrnfits, &status);
+
+ if (!strncmp(daynight, "D", 1) || !strncmp(daynight, "d", 1)) {
+ day = TRUE;
+ }
+ else if (!strncmp(daynight, "N", 1) || !strncmp(daynight, "n", 1)) {
+ night = TRUE;
+ }
+ else if (!strncmp(daynight, "B", 1) || !strncmp(daynight, "b", 1)) {
+ day = night = TRUE;
+ }
+ else
+ cf_if_error("Unknown DAYNIGHT keyword value: %s", daynight);
+
+ /*
+ * Read EXP_STAT, RAWTIME, INSTMODE and TOT_DEAD keywords.
+ */
+ FITS_read_key(infits, TINT, "EXP_STAT", &expstat, NULL, &status);
+ FITS_read_key(infits, TFLOAT, "RAWTIME", &rawtime, NULL, &status);
+ FITS_read_key(infits, TSTRING, "INSTMODE", instmode, NULL, &status);
+ FITS_read_key(infits, TFLOAT, "TOT_DEAD", &deadtime, NULL, &status);
+
+ /*
+ * If EXP_STAT = TEMPORAL_LIMB, target is bright earth or airglow.
+ * Compute EXP_LIMB, then set limb-angle flags to 0.
+ */
+ exp_limb=time_loss(nseconds, timeline_status, TEMPORAL_LIMB);
+ if (expstat == (int) TEMPORAL_LIMB)
+ for (i = 0; i < nseconds-1; i++)
+ timeline_status[i] &= ~TEMPORAL_LIMB;
+
+ /*
+ * If in HIST mode:
+ * Generate TEMPORAL_MASK
+ * Copy status flags from TEMPORAL_MASK to photon list.
+ * Count bad photons.
+ */
+ if (!strncmp(instmode, "HIST", 4)) {
+ generate_temporal_mask(rawtime, nseconds, timeline_time,
+ timeline_status, &TEMPORAL_MASK, &EXP_STAT, comment);
+ for (i = 0; i < nevents; i++) {
+ photon_status[i] = TEMPORAL_MASK;
+ /*
+ * A bad photon is one for which
+ * - something other than AIRGLOW is wrong; or
+ * - you don't want day, but this one is; or
+ * - you don't want night, but this one is.
+ */
+ if ((photon_locflag[i] & ~LOCATION_AIR) ||
+ (!day && (photon_status[i] & TEMPORAL_DAY)) ||
+ (!night && (photon_status[i] ^ TEMPORAL_DAY)))
+ nbadevnt += (long)(photon_weight[i]/deadtime + 0.5);
+ }
+ if (EXP_STAT && !expstat)
+ FITS_update_key(infits, TBYTE, "EXP_STAT", &EXP_STAT,
+ comment, &status);
+ }
+
+ /*
+ * If in TTAG mode:
+ * Copy status flags from timeline table to photon list.
+ * Confirm that photon time is included in timeline table.
+ * Count bad photons.
+ */
+ else {
+ for (i = k = 0; i < nevents; i++) {
+ while (photon_time[i] > timeline_time[k+1]-FRAME_TOLERANCE &&
+ k < nseconds-1) { k++; }
+
+ if (photon_time[i] - timeline_time[k] < 2.0)
+ photon_status[i] = timeline_status[k];
+ else
+ cf_if_warning("Time %g not included in timeline table",
+ photon_time[i]);
+
+ /*
+ * A bad photon is one for which
+ * - something other than DAYNIGHT is wrong; or
+ * - something other than AIRGLOW is wrong; or
+ * - you don't want day, but this one is; or
+ * - you don't want night, but this one is.
+ */
+ if ((photon_status[i] & ~TEMPORAL_DAY) ||
+ (photon_locflag[i] & ~LOCATION_AIR) ||
+ (!day && (photon_status[i] & TEMPORAL_DAY)) ||
+ (!night && (photon_status[i] ^ TEMPORAL_DAY)))
+ nbadevnt++;
+ }
+ }
+
+ /*
+ * Now count day, night, and bad seconds.
+ * If in HIST mode, mask out LIMB, SAA, and BRST flags.
+ * Exclude OPUS-defined bad times.
+ */
+ TEMPORAL_MASK = TEMPORAL_DAY;
+
+ if (!strncmp(instmode, "HIST", 4)) {
+ TEMPORAL_MASK |= TEMPORAL_LIMB;
+ TEMPORAL_MASK |= TEMPORAL_SAA;
+ TEMPORAL_MASK |= TEMPORAL_BRST;
+ }
+
+ for (j = 0; j < nseconds; j++) {
+ if (timeline_status[j] & TEMPORAL_OPUS)
+ continue;
+ if (timeline_status[j] & ~TEMPORAL_MASK)
+ exp_bad++;
+ else if (timeline_status[j] & TEMPORAL_DAY)
+ exp_day++;
+ else
+ expnight++;
+ }
+ /*
+ * If user rejects either day or night data, add to EXP_BAD.
+ * If user rejects night data, set EXPNIGHT = 0.
+ */
+ if (!day) {
+ exp_bad += exp_day;
+ }
+ if (!night) {
+ exp_bad += expnight;
+ expnight = 0;
+ }
+
+ /*
+ * Compute EXP_BRST
+ */
+ exp_brst=time_loss(nseconds, timeline_status, TEMPORAL_BRST);
+ /*
+ * Compute EXP_HV
+ */
+ exp_hv=time_loss(nseconds, timeline_status, TEMPORAL_HV);
+ /*
+ * Compute EXP_JITR
+ */
+ exp_jitr=time_loss(nseconds, timeline_status, TEMPORAL_JITR);
+ /*
+ * Compute EXP_LIMB (already done)
+ exp_limb=time_loss(nseconds, timeline_status, TEMPORAL_LIMB);
+ */
+ /*
+ * Compute EXP_SAA
+ */
+ exp_saa=time_loss(nseconds, timeline_status, TEMPORAL_SAA);
+
+ /*
+ * If data are in time-tag mode and more than 90% of time was
+ * was rejected by screening, say why.
+ */
+ if (!strncmp(instmode, "TTAG", 4)) {
+ if (exp_brst > 0.9 * rawtime)
+ cf_verbose(1, "%d sec lost to bursts.", exp_brst);
+ if (exp_hv > 0.9 * rawtime)
+ cf_verbose(1, "%d sec lost to low voltage.", exp_hv);
+ if (exp_jitr > 0.9 * rawtime)
+ cf_verbose(1, "%d sec lost to jitter.", exp_jitr);
+ if (exp_limb > 0.9 * rawtime)
+ cf_verbose(1, "%d sec lost to low limb angle.", exp_limb);
+ if (exp_saa > 0.9 * rawtime)
+ cf_verbose(1, "%d sec lost to SAA.", exp_saa);
+ }
+
+ /*
+ * Update the header keywords
+ */
+ FITS_update_key(infits, TLONG, "NBADEVNT", &nbadevnt, NULL, &status);
+ FITS_update_key(infits, TLONG, "EXP_BAD", &exp_bad, NULL, &status);
+ FITS_update_key(infits, TLONG, "EXP_BRST", &exp_brst, NULL, &status);
+ FITS_update_key(infits, TLONG, "EXP_HV", &exp_hv, NULL, &status);
+ FITS_update_key(infits, TLONG, "EXP_JITR", &exp_jitr, NULL, &status);
+ FITS_update_key(infits, TLONG, "EXP_LIM", &exp_limb, NULL, &status);
+ FITS_update_key(infits, TLONG, "EXP_SAA", &exp_saa, NULL, &status);
+ FITS_update_key(infits, TLONG, "EXPNIGHT", &expnight, NULL, &status);
+ FITS_update_key(infits, TSTRING, "DAYNIGHT", &daynight, NULL, &status);
+
+ cf_proc_update(infits, CF_PRGM_ID, "COMPLETE");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+ return status;
+}
diff --git a/src/libcf/cf_set_user_gtis.c b/src/libcf/cf_set_user_gtis.c
new file mode 100644
index 0000000..54a88d5
--- /dev/null
+++ b/src/libcf/cf_set_user_gtis.c
@@ -0,0 +1,100 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_set_user_gtis(fitsfile *infits, long nseconds,
+ * float *timeline_times,
+ * unsigned char *timeline_status);
+ *
+ * Description: Apply user-defined good time intervals to timeline table.
+ *
+ * Arguments: fitsfile *infits Input FITS file pointer
+ * long nseconds Number of points in the timeline table
+ * float *timeline_times Array of times
+ * unsigned char *timeline_status The status flag array
+ *
+ * Calls:
+ *
+ * Returns: 0 on success
+ *
+ * History: 09.10.03 1.1 bjg Initial coding
+ *
+ * 09.12.03 1.2 bjg Bug fix. When nusergti was zero or less
+ * this function set all the photons to
+ * bad. Now it doesn't change anything.
+ * 04.20.04 1.3 bjg Remove unused variables
+ * Change format to match arg type in
+ * sprintf.
+ *
+ *
+ ****************************************************************************/
+
+#include <string.h>
+#include <stdio.h>
+#include "calfuse.h"
+
+int
+cf_set_user_gtis(fitsfile *infits, long nseconds,
+ float *timeline_times, unsigned char *timeline_status)
+{
+ char CF_PRGM_ID[] = "cf_set_user_gtis";
+ char CF_VER_NUM[] = "1.3";
+
+ int errflg=0, status=0, nusergti;
+ long i,n;
+ char file_name[FLEN_VALUE];
+ float limit1,limit2;
+ char keywd1[FLEN_KEYWORD],keywd2[FLEN_KEYWORD];
+ fitsfile *scrnfits;
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ if ((errflg = cf_proc_check(infits, CF_PRGM_ID) )) return errflg;
+
+ /*
+ * Open the screening parameters file and read the good time intervals.
+ */
+ FITS_read_key(infits, TSTRING, "SCRN_CAL", file_name, NULL, &status);
+ FITS_open_file(&scrnfits, cf_parm_file(file_name), READONLY, &status);
+
+ FITS_read_key(scrnfits, TINT, "NUSERGTI", &nusergti, NULL, &status);
+
+ if (nusergti>0){
+
+ i=0;
+
+ for (n=1;n<=nusergti;n++){
+ sprintf(keywd1, "GTIBEG%02ld",n);
+ FITS_read_key(scrnfits, TFLOAT, keywd1, &limit1, NULL, &status);
+ sprintf(keywd2, "GTIEND%02ld",n);
+ FITS_read_key(scrnfits, TFLOAT, keywd2, &limit2, NULL, &status);
+
+
+ while ((i<nseconds)&&(timeline_times[i]<limit1)) {
+ timeline_status[i] |= TEMPORAL_USER;
+ i++;
+ }
+
+ while ((i<nseconds)&&(timeline_times[i]<limit2)) {
+ i++;
+ }
+
+ }
+
+
+ while (i<nseconds){
+ timeline_status[i] |= TEMPORAL_USER;
+ i++;
+ }
+
+ }
+
+ FITS_close_file(scrnfits, &status);
+
+ cf_proc_update(infits, CF_PRGM_ID, "COMPLETE");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+ return status;
+}
diff --git a/src/libcf/cf_source_aper.c b/src/libcf/cf_source_aper.c
new file mode 100644
index 0000000..3b1cb60
--- /dev/null
+++ b/src/libcf/cf_source_aper.c
@@ -0,0 +1,67 @@
+/**************************************************************************
+ * Johns Hopkins University
+ * Center for Astrophysical Sciences
+ * FUSE
+ *************************************************************************
+ *
+ * Synopsis: cf_source_aper(infits, ap)
+ *
+ * Description: Procedure to determine which aperture contains the source
+ *
+ * Arguments : fitsfile infits Pointer to Integmediate Data File
+ * int *ap Array containing the two active
+ * apertures
+ *
+ * Returns int srctype Type of source in aperture
+ *
+ * HISTORY 12/12/02 v1.1 rdr First delivery
+ * 12/13/02 v1.3 wvd Changed file name
+ * 02/24/03 v1.4 peb Changed include file to calfitsio.h
+ * 04/17/03 v1.5 wvd Change to cf_source_aper throughout.
+ * 07/11/03 v1.6 rdr Change so that src_type returns
+ * 1 rather than 3 for extended source
+ * 08/21/03 v1.7 wvd If APERTURE=RFPT, treat as LWRS.
+ * 04/09/04 v1.8 bjg Include string.h
+ * Remove unused variables
+ *
+ ************************************************************************/
+
+#include "calfuse.h"
+#include <string.h>
+
+int
+cf_source_aper(fitsfile *infits, int *active_ap )
+{
+ /* char CF_PRGM_ID[] = "cf_source_aper"; */
+ /* char CF_VER_NUM[] = "1.8"; */
+
+ char aper[FLEN_CARD], src[FLEN_CARD];
+ int status=0, hdutype, src_type;
+
+ /* Determine the active aperture */
+ FITS_movabs_hdu(infits, 1, &hdutype, &status);
+ FITS_read_key(infits, TSTRING, "APERTURE", aper, NULL, &status);
+
+ /* Specify the channels of the active aperture */
+ if (!strncmp(aper,"HIRS",4)) {
+ active_ap[0] = 1;
+ active_ap[1] = 5; }
+ else if (!strncmp(aper,"MDRS",4)) {
+ active_ap[0] = 2;
+ active_ap[1] = 6; }
+ else if (!strncmp(aper,"LWRS",4) || !strncmp(aper,"RFPT",4)) {
+ active_ap[0] = 3;
+ active_ap[1] = 7;
+ }
+ else
+ cf_if_error("APERTURE keyword corrupted.");
+ cf_verbose(3, "APERTURE = %s, channels are %d and %d",
+ aper, active_ap[0], active_ap[1]);
+
+ FITS_read_key(infits, TSTRING,"SRC_TYPE", src, NULL, &status);
+ src_type = 0;
+ if (!strncmp(src,"E",1) || !strncmp(src,"e",1) ) src_type = 1;
+
+ cf_verbose(3, "SRC_TYPE = %s, source type = %d", src, src_type);
+ return src_type;
+}
diff --git a/src/libcf/cf_standard_or_optimal_extraction.c b/src/libcf/cf_standard_or_optimal_extraction.c
new file mode 100644
index 0000000..2b2a6fa
--- /dev/null
+++ b/src/libcf/cf_standard_or_optimal_extraction.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_standard_or_optimal_extraction (fitsfile *header,
+ * int *optimal)
+ *
+ * Description: Sets optimal to TRUE if optimal extraction is desired.
+ * FALSE if RUN_OPTI = 'NO' in parm*.fit file.
+ * FALSE if SRC_TYPE[0] = 'E' in file header.
+ *
+ * Arguments: fitsfile *header Pointer to IDF FITS file header
+ * int *optimal TRUE if optimal extraction desired
+ *
+ * Calls:
+ *
+ * Returns: 0 on success
+ *
+ * History: 03/02/03 1.1 wvd Initial coding.
+ * 03/12/03 1.2 wvd Write value of optimal to trailer file.
+ * 03/19/03 1.3 wvd Read SRC_TYPE, not SP_TYPE.
+ * 03/19/03 1.4 wvd Add call to cf_timestamp at start.
+ * Change printf to cf_verbose
+ * 09/30/03 1.5 wvd Check for lower-case value of
+ * RUN_OPTI.
+ * 03/15/05 1.6 wvd No optimal extraction for HIST targets
+ * unless try_optimal = TRUE;
+ * 03/18/05 1.7 wvd v1.6 was a bad idea. Returning to v1.5
+ *
+ ****************************************************************************/
+
+#include <stdio.h>
+#include "calfuse.h"
+
+static char CF_PRGM_ID[] = "cf_standard_or_optimal_extraction";
+static char CF_VER_NUM[] = "1.7";
+
+int
+cf_standard_or_optimal_extraction(fitsfile *header, int *optimal)
+{
+ char parm_file[FLEN_VALUE], instmode[FLEN_VALUE];
+ char run_opti[FLEN_VALUE], src_type[FLEN_VALUE];
+ int status=0;
+ fitsfile *parmfits;
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin processing");
+
+ /* Read SRC_TYPE from IDF header. */
+ FITS_read_key(header, TSTRING, "SRC_TYPE", src_type, NULL, &status);
+ FITS_read_key(header, TSTRING, "INSTMODE", instmode, NULL, &status);
+
+ /* Read RUN_OPTI from PARM_CAL. */
+ FITS_read_key(header, TSTRING, "PARM_CAL", parm_file, NULL, &status);
+ FITS_open_file(&parmfits, cf_parm_file(parm_file), READONLY, &status);
+ FITS_read_key(parmfits, TSTRING, "RUN_OPTI", run_opti, NULL, &status);
+ FITS_close_file(parmfits, &status);
+
+ /* Determine value of optimal. */
+ *optimal = TRUE;
+ if (*run_opti != 'Y' && *run_opti != 'y') {
+ cf_verbose (1, "RUN_OPTI = %s. No optimal extraction.", run_opti);
+ *optimal = FALSE;
+ }
+ if (*src_type != 'P') {
+ cf_verbose (1, "SRC_TYPE = %s. No optimal extraction.", src_type);
+ *optimal = FALSE;
+ }
+ if (*optimal) cf_verbose (1, "Attempting optimal extraction.");
+
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+ return status;
+}
diff --git a/src/libcf/cf_target_count_rate.c b/src/libcf/cf_target_count_rate.c
new file mode 100644
index 0000000..eab5b26
--- /dev/null
+++ b/src/libcf/cf_target_count_rate.c
@@ -0,0 +1,112 @@
+/**************************************************************************
+ * Johns Hopkins University
+ * Center for Astrophysical Sciences
+ * FUSE
+ *************************************************************************
+ *
+ * Synopsis: cf_target_count_rate(header, nevents, ptime, weight,
+ * channel, locflags, ntimes, ttime, rate_lif, rate_sic)
+ *
+ * Description: Determines the count rate in the target aperture for both
+ * LiF and SiC channels. Excludes airglow lines.
+ *
+ * Arguments: fitsfile *header : pointer to IDF header
+ * long nevents : number of photon events in the file
+ * float *ptime : detection time for each photon
+ * float *weight : weight associated with each photon
+ * unsigned char *channel: aperture associated with each photon
+ * unsigned char *locflags: location flag array - flags the
+ * geocoronal photons
+ * long ntimes : number of seconds tabulated in timeline
+ * float *ttime : tabulated times in the timeline
+ * float *rate_lif, *rate_sic :
+ * count rates through the Lif and SiC
+ * apertures, excluding geocoronal emission
+ *
+ * Calibration files required: None
+ *
+ * Returns: 0 on success
+ *
+ *
+ * HISTORY: 03/03/03 v1.1 RDR started work
+ * 03/05/03 v1.2 wvd change name of subroutine & install
+ * 03/10/03 v1.21 rdr changed specification of locflags
+ * from char to unsigned char
+ * 05/20/03 v1.3 rdr Added call to cf_proc_check
+ * 05/22/03 v1.5 wvd Direct cf_error_init to stderr
+ * 06/02/03 v1.6 wvd Implement cf_verbose throughout.
+ * 06/04/03 v1.7 wvd Revise scheme for summing counts.
+ * 08/20/03 v1.8 wvd Use FRAME_TOLERANCE from calfuse.h,
+ * change channel to unsigned char.
+ * 09/15/03 v1.9 wvd Test that photon times match
+ * timeline times to within 1 sec.
+ * 10/06/03 v1.10 wvd Changed screen to locflags throughout.
+ * 12/29/06 v1.11 wvd Sum weights rather than counts.
+ * Convert output arrays to type float.
+ * Scale HIST count rate by DET_DEAD.
+ * 04/07/07 v1.12 wvd Clean up compiler warnings.
+ * 04/07/07 v1.13 wvd Clean up compiler warnings.
+ *
+ **************************************************************************/
+
+#include <string.h>
+#include "calfuse.h"
+
+int
+cf_target_count_rate(fitsfile *header, long nevents, float *ptime,
+ float *weight, unsigned char *channel, unsigned char *locflags,
+ long ntimes, float *ttime, float *rate_lif, float *rate_sic) {
+
+ char CF_PRGM_ID[] = "cf_target_count_rate" ;
+ char CF_VER_NUM[] = "1.13" ;
+
+ char instmode[FLEN_VALUE];
+ int errflg=0, status=0, active_ap[2] ;
+ float delta_max = 1.0 + FRAME_TOLERANCE;
+ float det_dead;
+ long j, k ;
+
+ /* Initialize error checking. */
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+ /* Enter a time stamp into the log. */
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ /* Confirm that this subroutine should be run. */
+ if ((errflg = cf_proc_check(header, CF_PRGM_ID))) return errflg;
+
+ /* Determine the source aperture from the header data. */
+ FITS_read_key(header, TSTRING, "INSTMODE", instmode, NULL, &status);
+ (void) cf_source_aper(header, active_ap) ;
+
+ /*
+ * For histogram data, scale the LiF and SiC count rates, which come
+ * from the housekeeping data file, by DET_DEAD.
+ */
+ if (!strncmp(instmode, "HIST", 4)) {
+ FITS_read_key(header, TFLOAT, "DET_DEAD", &det_dead, NULL, &status);
+ for (k = 0; k < ntimes; k++) rate_lif[k] *= det_dead;
+ for (k = 0; k < ntimes; k++) rate_sic[k] *= det_dead;
+ }
+
+ /*
+ * For time-tag data, count the photons arriving during each second
+ * of the exposure. Exclude events near airglow regions.
+ */
+ else {
+ for (k = 0; k < ntimes; k++) rate_lif[k] = rate_sic[k] = 0.;
+ for (j=k=0; j<nevents; j++) {
+ while(ttime[k+1]-FRAME_TOLERANCE < ptime[j] && k+1 < ntimes)
+ k++;
+ if (!(locflags[j] & LOCATION_AIR) &&
+ (ptime[j] - ttime[k] < delta_max)) {
+ if (channel[j] == active_ap[0]) rate_lif[k] += weight[j] ;
+ if (channel[j] == active_ap[1]) rate_sic[k] += weight[j] ;
+ }
+ }
+ }
+
+ cf_proc_update(header, CF_PRGM_ID, "COMPLETE");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished processing");
+ return (status);
+}
diff --git a/src/libcf/cf_thermal_distort.c b/src/libcf/cf_thermal_distort.c
new file mode 100644
index 0000000..fcfb2e6
--- /dev/null
+++ b/src/libcf/cf_thermal_distort.c
@@ -0,0 +1,258 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_thermal_distort(fitsfile *header, long nevents,
+ * float *xfarf, float *yfarf, float *weight,
+ * unsigned char *locflags)
+ *
+ * Description: Corrects the X position of the event for thermal distortion
+ * using the locations of the stim pulses. The correction is
+ * made only to stim pulses and events in the detector active
+ * region.
+ *
+ * Arguments: fitsfile *header Pointer to FITS file containing the
+ * header of the intermediate data file
+ * long nevents The number of events
+ * float *xfarf An array of event X positions
+ * float *yfarf An array of event Y positions
+ * float *weight Number of photons per pixel
+ * unsigned char *locflags Location flags for each event
+ *
+ * Calls: cf_estimate_drift_coefficients
+ * cf_get_stim_positions These are static functions.
+ *
+ * Return: 0 on success
+ *
+ * History: 08/06/02 1.1 peb Begin work
+ * 11/11/02 1.2 peb Corrected function description and
+ * added cf_timestamp after ELEC_COR
+ * check.
+ * 11/12/02 1.3 peb Sets left and right stim pulse flags.
+ * 11/12/02 1.4 peb Added check to move only events in
+ * stim-pulse and active region.
+ * 03/11/03 1.5 wvd Changed locflags to unsigned char
+ * 05/20/03 1.6 rdr Added cf_proc_check call
+ * 07/29/03 1.8 wvd If cf_proc_check fails, return errflg.
+ * 02/27/04 1.9 rdr Added weights to the calculation -
+ * needed for histogram mode
+ * 03/01/04 1.10 rdr Corrected bug in procedure for finding
+ * stim pulses
+ * 07/21/04 1.13 wvd Delete variable i; unused.
+ * 03/03/05 1.14 wvd Read thermal coefficients from STIM_CAL
+ * file if STIM pulses are unavailable.
+ * 04/06/05 1.15 wvd Require at least 500 counts in a stim
+ * pulse to compute a centroid.
+ * 10/05/07 1.16 bot Corrected jmax in estimate_drift
+ *
+ ****************************************************************************/
+
+#include <math.h>
+#include <stdlib.h>
+#include <string.h>
+#include "calfuse.h"
+
+#define STIMS (LOCATION_STIML|LOCATION_STIMR)
+
+static int
+cf_estimate_drift_coefficients (fitsfile *header, float *x0, float *x1,
+ float *y0, float *y1)
+{
+ char stimfile[FLEN_FILENAME];
+ int status=0;
+ long j, jmax;
+ float *x0_array=NULL, *x1_array=NULL, *y0_array=NULL, *y1_array=NULL;
+ double expstart, *mjd=NULL;
+ fitsfile *stimfits;
+
+ /* Read header keywords. */
+ FITS_read_key(header, TDOUBLE, "EXPSTART", &expstart, NULL, &status);
+ FITS_read_key(header, TSTRING, "STIM_CAL", stimfile, NULL, &status);
+ cf_verbose(3, "Drift-coefficient calibration file = %s", stimfile);
+
+ /* Read drift-coefficients from the calibration file. */
+ FITS_open_file(&stimfits, cf_cal_file(stimfile), READONLY, &status);
+ FITS_movabs_hdu(stimfits, 2, NULL, &status);
+ jmax = cf_read_col(stimfits, TDOUBLE, "MJD", (void *) &mjd);
+ jmax = cf_read_col(stimfits, TFLOAT, "X0", (void *) &x0_array);
+ jmax = cf_read_col(stimfits, TFLOAT, "X1", (void *) &x1_array);
+ jmax = cf_read_col(stimfits, TFLOAT, "Y0", (void *) &y0_array);
+ jmax = cf_read_col(stimfits, TFLOAT, "Y1", (void *) &y1_array);
+ FITS_close_file(stimfits, &status);
+
+ /* Find the coefficients appropriate for this exposure. */
+ j = 0;
+ while (j < jmax-1 && mjd[j+1] < expstart) j++;
+ *x0 = x0_array[j];
+ *x1 = x1_array[j];
+ *y0 = y0_array[j];
+ *y1 = y1_array[j];
+
+ free(mjd);
+ free(x0_array);
+ free(x1_array);
+ free(y0_array);
+ free(y1_array);
+
+ return status;
+}
+
+
+static int
+cf_get_stim_positions(long nevents, float *xfarf, float *yfarf, float *weight,
+ unsigned char *loc, float width, float *stimlx, float *stimly,
+ float *stimrx, float *stimry)
+{
+ int stim_status=0;
+ long j;
+ double lx=0., ly=0., rx=0., ry=0., nl=0., nr=0.;
+
+ cf_verbose(3,"initial: stimlx = %0.1f, stimly=%0.1f, width=%0.1f ",
+ *stimlx, *stimly, width) ;
+ cf_verbose(3,"initial: stimrx = %0.1f, stimry=%0.1f, width=%0.1f ",
+ *stimrx, *stimry, width) ;
+
+ for (j=0; j<nevents; j++) {
+ if (xfarf[j] >= *stimlx-width && xfarf[j] <= *stimlx+width &&
+ yfarf[j] >= *stimly-width && yfarf[j] <= *stimly+width) {
+ lx += xfarf[j] * weight[j];
+ ly += yfarf[j] * weight[j];
+ nl += weight[j];
+ loc[j] |= LOCATION_STIML;
+ }
+ else if (xfarf[j] >= *stimrx-width && xfarf[j] <= *stimrx+width &&
+ yfarf[j] >= *stimry-width && yfarf[j] <= *stimry+width) {
+ rx += xfarf[j] * weight[j];
+ ry += yfarf[j] * weight[j];
+ nr += weight[j];
+ loc[j] |= LOCATION_STIMR;
+ }
+ else {
+ loc[j] &= ~STIMS;
+ }
+ }
+
+ cf_verbose(3,"nl=%0.1f, nr=%0.1f ",nl,nr) ;
+
+ if (nl > 500) {
+ *stimlx = lx/nl;
+ *stimly = ly/nl;
+ } else {
+ cf_if_warning("Cannot determine left STIM position. Estimating.");
+ stim_status = 1;
+ }
+ if (nr > 500) {
+ *stimrx = rx/nr;
+ *stimry = ry/nr;
+ } else {
+ cf_if_warning("Cannot determine right STIM position. Estimating.");
+ stim_status = 1;
+ }
+
+ if (!stim_status) {
+ cf_verbose(3,"after iteration: stimlx = %0.1f, stimly=%0.1f ", *stimlx, *stimly);
+ cf_verbose(3,"after iteration: stimrx = %0.1f, stimry=%0.1f ", *stimrx, *stimry);
+ }
+
+ return stim_status;
+}
+
+int
+cf_thermal_distort(fitsfile *header, long nevents, float *xfarf,
+ float *yfarf, float *weight, unsigned char *locflags)
+{
+ char CF_PRGM_ID[] = "cf_thermal_distort";
+ char CF_VER_NUM[] = "1.16";
+
+ char elecfile[FLEN_VALUE], detector[FLEN_VALUE];
+ char keyword[FLEN_KEYWORD];
+ int errflg=0, status=0, stim_status=0;
+ long j;
+ float farflx, farfly, farfrx, farfry, x0, x1, y0, y1;
+ float stimlx, stimly, stimrx, stimry, oldlx, oldly, oldrx, oldry;
+ float width=128., tol=0.01;
+ fitsfile *elecfits;
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ if ((errflg = cf_proc_check(header, CF_PRGM_ID))) return errflg;
+
+ FITS_read_key(header, TSTRING, "DETECTOR", detector, NULL, &status);
+ /*
+ * Get the name of the calibration file and open it
+ */
+ FITS_read_key(header, TSTRING, "ELEC_CAL", elecfile, NULL, &status);
+ FITS_open_file(&elecfits, cf_cal_file(elecfile), READONLY, &status);
+ /*
+ * Read stim locations in FARF frame.
+ */
+ FITS_read_key(elecfits, TFLOAT, "STIMWDTH", &width, NULL, &status);
+ FITS_read_key(elecfits, TFLOAT, "STIMTOLR", &tol, NULL, &status);
+ sprintf(keyword, "STIMLX%s", detector);
+ FITS_read_key(elecfits, TFLOAT, keyword, &farflx, NULL, &status);
+ sprintf(keyword, "STIMLY%s", detector);
+ FITS_read_key(elecfits, TFLOAT, keyword, &farfly, NULL, &status);
+ sprintf(keyword, "STIMRX%s", detector);
+ FITS_read_key(elecfits, TFLOAT, keyword, &farfrx, NULL, &status);
+ sprintf(keyword, "STIMRY%s", detector);
+ FITS_read_key(elecfits, TFLOAT, keyword, &farfry, NULL, &status);
+ FITS_close_file(elecfits, &status);
+ /*
+ * Get stim positions (iteratively).
+ */
+ stimlx = farflx; stimly = farfly;
+ stimrx = farfrx; stimry = farfry;
+ do {
+ oldlx = stimlx; oldly = stimly;
+ oldrx = stimrx; oldry = stimry;
+ width /= 2.;
+ stim_status = cf_get_stim_positions(nevents, xfarf, yfarf, weight,
+ locflags, width, &stimlx, &stimly, &stimrx, &stimry);
+ if (!stim_status)
+ cf_verbose(3,"dstimlx=%.1f, dstimly=%.1f, dstimrx=%.1f,"
+ "dstimry=%.1f ", fabs(oldlx-stimlx), fabs(oldly-stimly),
+ fabs(oldrx-stimrx), fabs(oldry-stimry) ) ;
+ } while (fabs(oldlx-stimlx) > tol && fabs(oldly-stimly) > tol &&
+ fabs(oldrx-stimrx) > tol && fabs(oldry-stimry) > tol &&
+ !stim_status);
+ /*
+ * Write stim pulse positions to file header.
+ */
+ if (!stim_status) {
+ FITS_update_key(header, TFLOAT, "STIM_L_X", &stimlx, NULL, &status);
+ FITS_update_key(header, TFLOAT, "STIM_L_Y", &stimly, NULL, &status);
+ FITS_update_key(header, TFLOAT, "STIM_R_X", &stimrx, NULL, &status);
+ FITS_update_key(header, TFLOAT, "STIM_R_Y", &stimry, NULL, &status);
+ }
+ /*
+ * Calculate drift coefficients from stim pulse positions
+ */
+ if (!stim_status) {
+ x0 = (stimlx*farfrx - stimrx*farflx)/(stimlx - stimrx);
+ x1 = (farflx - farfrx)/(stimlx - stimrx);
+ y0 = 0.5*((farfly + farfry) - (stimly + stimry));
+ y1 = 1.0;
+ }
+ /*
+ * ...or estimate them from date of exposure.
+ */
+ else
+ cf_estimate_drift_coefficients (header, &x0, &x1, &y0, &y1);
+ cf_verbose(2, "Drift coefficients: %f %f, %f %f", x0, x1, y0, y1);
+ /*
+ * Apply thermal correction to events in active area and
+ * stim-pulse regions.
+ */
+ for (j=0; j<nevents; j++) {
+ if (!(locflags[j] & LOCATION_SHLD) || (locflags[j] & STIMS)) {
+ xfarf[j] = x1*xfarf[j] + x0;
+ yfarf[j] = y1*yfarf[j] + y0;
+ }
+ }
+ cf_proc_update(header, CF_PRGM_ID, "COMPLETE");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+ return 0;
+}
diff --git a/src/libcf/cf_time_xy_distort.c b/src/libcf/cf_time_xy_distort.c
new file mode 100644
index 0000000..bcb8af0
--- /dev/null
+++ b/src/libcf/cf_time_xy_distort.c
@@ -0,0 +1,171 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_time_xy_distort(fitsfile *header, long nevents,
+ * float *xfarf, float *yfarf, unsigned char *locflags)
+ *
+ * Description: Corrects each photon event in the active area for long-term
+ * drifts in the X and Y coordinate scales.
+ *
+ * Arguments: fitsfile *header Pointer to FITS file containing the
+ * header of the intermediate data file
+ * long nevents The number of events
+ * float *xfarf An array of event X positions
+ * float *yfarf An array of event Y positions
+ * unsigned char *locflags Location flags for each event
+ *
+ * Calls:
+ *
+ * Return: 0 on success
+ *
+ * History: 11/01/06 1.1 wvd Based on cf_count_rate_y_distort.c
+ * 11/22/06 1.2 wvd Read BIN_FACT from file header.
+ * Make X correction a function of X.
+ * 01/19/07 1.3 wvd Clean up i/o.
+ * 04/07/07 1.4 wvd Clean up compiler warnings.
+ *
+ ****************************************************************************/
+
+#include <math.h>
+#include <string.h>
+#include <stdlib.h>
+#include "calfuse.h"
+
+int
+cf_time_xy_distort(fitsfile *header, long nevents,
+ float *xfarf, float *yfarf, unsigned char *locflags)
+{
+ char CF_PRGM_ID[] = "cf_time_xy_distort";
+ char CF_VER_NUM[] = "1.4";
+
+ char tmxyfile[FLEN_VALUE];
+ int errflg=0, hdutype, status=0, anynull=0;
+ int binfact, i, ii, i_max, tndx, xndx, yndx;
+ long j, xlen, ylen;
+ double expstart;
+ float *xstretch2d, *ystretch2d, xstretch1d[NXMAX], ystretch1d[NYMAX];
+ fitsfile *tmxyfits;
+
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ if ((errflg = cf_proc_check(header, CF_PRGM_ID))) return errflg;
+
+ /*
+ * Read MJD of exposure start.
+ */
+ FITS_read_key(header, TDOUBLE, "EXPSTART", &expstart, NULL, &status);
+
+ /*
+ * Read the X correction array.
+ * Note: the first column of the calibration array contains MJD.
+ */
+ FITS_read_key(header, TSTRING, "TMXY_CAL", tmxyfile, NULL, &status);
+ cf_verbose(3, "Reading TMXY_CAL file %s", tmxyfile);
+ FITS_open_file(&tmxyfits, cf_cal_file(tmxyfile), READONLY, &status);
+ FITS_movabs_hdu(tmxyfits, 2, &hdutype, &status);
+ FITS_read_key(tmxyfits, TLONG, "NAXIS1", &xlen, NULL, &status);
+ FITS_read_key(tmxyfits, TLONG, "NAXIS2", &ylen, NULL, &status);
+ FITS_read_key(tmxyfits, TINT, "BIN_FACT", &binfact, NULL, &status);
+ xstretch2d = (float *) cf_malloc(sizeof(float)*xlen*ylen);
+ FITS_read_img(tmxyfits, TFLOAT, 1L, xlen*ylen, NULL, xstretch2d,
+ &anynull, &status);
+
+ /*
+ * Find the row in the calibration array that corresponds to the
+ * exposure start time.
+ */
+ i = 0;
+ while (expstart > *(xstretch2d+i*xlen) && i < ylen) i++;
+ tndx = i-1;
+ if (tndx < 0) tndx = 0;
+ cf_verbose(2,"EXPSTART = %g.", expstart);
+ cf_verbose(2,"Using X corrections for MJD >= %g", *(xstretch2d+tndx*xlen));
+ if (tndx < ylen-1)
+ cf_verbose(2," and MJD < %g",
+ *(xstretch2d+(tndx+1)*xlen));
+
+ /*
+ * Now compute a 1-D array containing corrections to X
+ * coordinate as a function of X position on the detector.
+ * Shift information binned by BIN_FACT pixels.
+ * We interpolate to the nearest X pixel. Otherwise,
+ * counts pile up at the boundaries.
+ */
+ i_max = (xlen-2) * binfact;
+ for (i = 0; i < i_max; i++) {
+ ii = (i/binfact) * binfact;
+ xstretch1d[i] = ((ii+binfact-i) * (xstretch2d+tndx*xlen)[1+i/binfact] +
+ (i-ii) * (xstretch2d+tndx*xlen)[2+i/binfact]) / binfact;
+ }
+ for ( ; i < NXMAX; i++)
+ xstretch1d[i] = (xstretch2d+tndx*xlen)[xlen-1];
+
+ /*
+ * Read the Y correction array.
+ */
+ FITS_movabs_hdu(tmxyfits, 3, &hdutype, &status);
+ FITS_read_key(tmxyfits, TLONG, "NAXIS1", &xlen, NULL, &status);
+ FITS_read_key(tmxyfits, TLONG, "NAXIS2", &ylen, NULL, &status);
+ FITS_read_key(tmxyfits, TINT, "BIN_FACT", &binfact, NULL, &status);
+ ystretch2d = (float *) cf_malloc(sizeof(float)*xlen*ylen);
+ FITS_read_img(tmxyfits, TFLOAT, 1L, xlen*ylen, NULL, ystretch2d,
+ &anynull, &status);
+ FITS_close_file(tmxyfits, &status);
+
+ /*
+ * Find the row in the calibration array that corresponds to the
+ * exposure start time.
+ */
+ i = 0;
+ while (expstart > *(ystretch2d+i*xlen) && i < ylen) i++;
+ tndx = i-1;
+ if (tndx < 0) tndx = 0;
+ cf_verbose(3,"Using Y corrections for MJD >= %g", *(ystretch2d+tndx*xlen));
+ if (tndx < ylen-1)
+ cf_verbose(3," and MJD < %g",
+ *(ystretch2d+(tndx+1)*xlen));
+
+ /*
+ * Now compute a 1-D array containing corrections to Y
+ * coordinate as a function of Y position on the detector.
+ */
+ i_max = (xlen-2) * binfact;
+ for (i = 0; i < i_max; i++) {
+ ii = (i/binfact) * binfact;
+ ystretch1d[i] = ((ii+binfact-i) * (ystretch2d+tndx*xlen)[1+i/binfact] +
+ (i-ii) * (ystretch2d+tndx*xlen)[2+i/binfact]) / binfact;
+ }
+ for ( ; i < NYMAX; i++)
+ ystretch1d[i] = (ystretch2d+tndx*xlen)[xlen-1];
+ cf_verbose(3, "For y = 430, ystretch = %f\n", ystretch1d[430]);
+ cf_verbose(3, "For y = 810, ystretch = %f\n", ystretch1d[810]);
+
+ /*
+ * Loop through all events. Move only events in active region.
+ */
+ for (j = 0; j < nevents; j++) {
+ if (!(locflags[j] & LOCATION_SHLD)) {
+ xndx = (int) xfarf[j];
+ if (xndx < 0) xndx = 0;
+ else if (xndx >= NXMAX) xndx = NXMAX-1;
+
+ yndx = (int) yfarf[j];
+ if (yndx < 0) yndx = 0;
+ else if (yndx >= NYMAX) yndx = NYMAX-1;
+
+ xfarf[j] += xstretch1d[xndx];
+ yfarf[j] += ystretch1d[yndx];
+ }
+ }
+
+ free(xstretch2d);
+ free(ystretch2d);
+
+ cf_proc_update(header, CF_PRGM_ID, "COMPLETE");
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done processing");
+ return 0;
+}
diff --git a/src/libcf/cf_timestamp.c b/src/libcf/cf_timestamp.c
new file mode 100644
index 0000000..52ef311
--- /dev/null
+++ b/src/libcf/cf_timestamp.c
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_timestamp(const char *prgmid, const char *vernum, char *msg)
+ *
+ * Description: Writes a timestamp and the calling program name to stdout.
+ *
+ * Arguments: char *prgmid Name of the calling program
+ * char *msg Optional additional message string
+ *
+ * Returns: none
+ *
+ * History: 01/04/91 mlr Original "warn_str.c" for libhut
+ * 03/03/98 gak Adapted for placing timestamps in
+ * FUSE pipeline programs.
+ * 06/07/99 peb Added reporting of version number.
+ * 10/27/99 emm Added fflush(stdout)
+ * 04/23/01 wvd Change declaration of tim from
+ * long to time_t
+ * 03/19/03 peb Made this function a wrapper for
+ * cf_verbose.
+ * 03/25/03 peb Changed output to print time, program,
+ * version number and to use verbose_level
+ * when printing output
+ * level>=1 prints "Finished processing"
+ * level>=2 prints "Begin processing"
+ * 09/15/03 v1.5 wvd To reduce size of the trailer file,
+ * if verbose level = 1, print "Finished"
+ * only for top-level routines.
+ * 10/17/03 v1.6 wvd Use strcmp, rather than strncmp, to
+ * set this_is_a_top_level_routine.
+ * 10/30/03 1.7 peb Replaced cftime function with strftime
+ * for UNIX compatibility.
+ *
+ ****************************************************************************/
+
+#include <string.h>
+#include <time.h>
+#include "calfuse.h"
+
+#define N_STYM 80
+
+void cf_timestamp(const char *prgmid, const char *vernum, char *msg)
+{
+ char stym[N_STYM]={'\0'};
+ char *top_level_routines[]=TOP_LEVEL_ROUTINES;
+ int i, this_is_a_top_level_routine = FALSE;
+ time_t tym;
+
+ time(&tym);
+ strftime(stym, N_STYM, "%Y %b %e %T", localtime(&tym));
+
+ /* Compare program ID with list of top-level routines. */
+ for (i = 0; i < NTOP_LEVEL_ROUTINES; i++) {
+ if (!strcmp(prgmid, top_level_routines[i])) {
+ this_is_a_top_level_routine = TRUE;
+ break;
+ }
+ }
+
+ /*
+ * The following test should get most "Finished" or "Done" type of
+ * timestamps. For those not caught if might be best to change them to
+ * one of these two.
+ */
+ if (((verbose_level == 1 && this_is_a_top_level_routine) ||
+ (verbose_level > 1)) &&
+ (strncmp(msg, "Finish", 6) == 0 || strncmp(msg, "Done", 4) == 0))
+ printf("%s %s-%s: %s\n", stym, prgmid, vernum, "Finished processing");
+ else if (verbose_level >= 2 &&
+ (strncmp(msg, "Start", 5) == 0 || strncmp(msg, "Begin", 5) == 0))
+ printf("%s %s-%s: %s\n", stym, prgmid, vernum, "Begin processing");
+
+ fflush(stdout);
+}
diff --git a/src/libcf/cf_velang.c b/src/libcf/cf_velang.c
new file mode 100644
index 0000000..8395738
--- /dev/null
+++ b/src/libcf/cf_velang.c
@@ -0,0 +1,147 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: cf_velang(fitsfile *outfits, double mjd)
+ *
+ * Description: Calculates the sun angle, moon angle, and conversions to
+ * heliocentric and LSR velocities at given mjd, which should be
+ * the middle of the exposure. For FUV images, the needed
+ * data is in the primary header, so we have to go back
+ * up to the top. For FES images, the data should be in
+ * each HDU, so you should call cf_velang_calc instead.
+ *
+ * Arguments: fitsfile *outfits Pointer to FITS file containing the
+ * input data and orbital elements
+ * double mjd The Modified Julian Date of the
+ * photon arrival time.
+ *
+ * Calls: slaDsep dsep.f
+ * slaRdplan rdplan.f
+ *
+ * History: 07/13/98 emm Begin work
+ * 06/10/99 emm Added keyword header update, added
+ * calculation of MOONANG.
+ * 06/11/99 emm Fixed some bugs that Jayant found.
+ * 06/21/99 jm Corrected name
+ * 07/16/99 emm Changed GEO_LON to GEO_LONG
+ * 07/21/99 peb RA and Dec now use RA_TARG and DEC_TARG
+ * 07/22/99 emm Added V_GEOCEN update.
+ * 07/23/99 emm Added cf_velang_calc for FES images.
+ * 05/31/00 peb Implemented cfortran.h calls for slalib
+ * functions.
+ * 04/01/03 v1.3 wvd Replaced printf with cf_verbose
+ * 04/04/03 v1.4 wvd Modifed calls to cf_verbose.
+ * 12/18/03 v1.5 bjg Change calfusettag.h to calfuse.h
+ * 07/06/06 v1.6 wvd Add call to pole_ang and populate
+ * header keyword POLEANGL.
+ * 03/07/07 v1.7 wvd Remove pos from call to space_vel.
+ *
+ ****************************************************************************/
+
+#include <stdio.h>
+
+#ifdef CFORTRAN
+#include "cfortran.h"
+PROTOCCALLSFFUN4(DOUBLE, SLA_DSEP, sla_dsep, DOUBLE, DOUBLE, DOUBLE, \
+ DOUBLE)
+#define slaDsep(A1, B1, A2, B2) \
+ CCALLSFFUN4(SLA_DSEP, sla_dsep, DOUBLE, DOUBLE, DOUBLE, DOUBLE, \
+ A1, B1, A2, B2)
+PROTOCCALLSFSUB7(SLA_RDPLAN, sla_rdplan, DOUBLE, INT, DOUBLE, DOUBLE, \
+ PDOUBLE, PDOUBLE, PDOUBLE)
+#define slaRdplan(DATE, NP, ELONG, PHI, RA, DEC, DIAM) \
+ CCALLSFSUB7(SLA_RDPLAN, sla_rdplan, DOUBLE, INT, DOUBLE, DOUBLE, \
+ PDOUBLE, PDOUBLE, PDOUBLE, \
+ DATE, NP, ELONG, PHI, RA, DEC, DIAM)
+#else
+#include "slalib.h"
+#include "slamac.h"
+#endif
+
+#include "calfuse.h"
+#include "sgp4.h"
+
+SGP4 set_orbit_parms(fitsfile *);
+
+static void
+cf_velang_calc(fitsfile *outfits, double mjd)
+{
+ int status=0;
+ char comment[FLEN_CARD];
+ double ra, dec, geo_lon, geo_lat, mag_lat, pos[3], vel[3], gmst, helvel;
+ double ra_moon, dec_moon, moon_ang, dia_moon, vlsr1, vlsr2, sun_ang;
+ double geo_vel, pole_angle;
+ SGP4 sgp4;
+
+ /* get the state vector at time mjd */
+ sgp4 = set_orbit_parms(outfits);
+ SGP4_getStateVector(sgp4, mjd, pos, vel);
+ SGP4_precess(pos, mjd, MJD2000); SGP4_precess(vel, mjd, MJD2000);
+
+ cf_verbose(2,"State vector at MJD=%14.6f days", mjd);
+ cf_verbose(2,"x=%14.6f y=%14.6f z=%14.6f km", pos[0], pos[1], pos[2]);
+ cf_verbose(2,"vx=%14.6f vy=%14.6f vz=%14.6f km/s",vel[0], vel[1], vel[2]);
+
+ state_geod(pos, mjd, &geo_lon, &geo_lat, &gmst);
+
+ mag_lat = geod_mag(geo_lon, geo_lat);
+ /*
+ * Note: this function has been changed to use RA_TARG and DEC_TARG
+ * keywords, because the RA_APER and DEC_APER keywords are currently
+ * not being set.
+ */
+ FITS_read_key(outfits, TDOUBLE, "RA_TARG", &ra, comment, &status);
+ FITS_read_key(outfits, TDOUBLE, "DEC_TARG", &dec, comment, &status);
+
+ geo_vel= space_vel(vel, ra, dec);
+ helvel = helio_vel(mjd, ra, dec);
+ vlsr1 = lsrk_vel(ra, dec);
+ vlsr2 = lsrd_vel(ra, dec);
+
+ /* Calculate sun angle */
+ sun_ang = solar_ang(mjd, ra, dec);
+
+ /* Calculate moon angle */
+#ifdef CFORTRAN
+ slaRdplan(mjd, 3, geo_lon, geo_lat, ra_moon, dec_moon, dia_moon);
+#else
+ slaRdplan(mjd, 3, geo_lon, geo_lat, &ra_moon, &dec_moon, &dia_moon);
+#endif
+ moon_ang = slaDsep(ra*RADIAN, dec*RADIAN, ra_moon, dec_moon)/RADIAN;
+
+ /* Calculate sun angle */
+ pole_angle = pole_ang(pos, vel, ra, dec);
+
+ FITS_update_key(outfits, TDOUBLE, "SUNANGLE", &sun_ang, NULL, &status);
+ FITS_update_key(outfits, TDOUBLE, "MOONANGL", &moon_ang, NULL, &status);
+ FITS_update_key(outfits, TDOUBLE, "POLEANGL", &pole_angle, NULL, &status);
+ FITS_update_key(outfits, TDOUBLE, "GEO_LONG", &geo_lon, NULL, &status);
+ FITS_update_key(outfits, TDOUBLE, "GEO_LAT", &geo_lat, NULL, &status);
+ FITS_update_key(outfits, TDOUBLE, "MAG_LAT", &mag_lat, NULL, &status);
+ FITS_update_key(outfits, TDOUBLE, "V_GEOCEN", &geo_vel, NULL, &status);
+ FITS_update_key(outfits, TDOUBLE, "V_HELIO", &helvel, NULL, &status);
+ FITS_update_key(outfits, TDOUBLE, "V_LSRDYN", &vlsr2, NULL, &status);
+ FITS_update_key(outfits, TDOUBLE, "V_LSRSTD", &vlsr1, NULL, &status);
+}
+
+
+void cf_velang(fitsfile *outfits, double mjd)
+{
+ int status=0, hdunum=0, hdutype;
+ /*
+ * The outfits file pointer may be down in one of the extensions
+ * whereas the orbital info is in the primary hdu. Therefore,
+ * record the current position, move to the primary header,
+ * read the orbital data, and return to the previous hdu.
+ */
+ FITS_get_hdu_num(outfits, &hdunum);
+ FITS_movabs_hdu(outfits, 1, &hdutype, &status);
+
+ cf_velang_calc(outfits, mjd);
+
+ FITS_movabs_hdu(outfits, hdunum, &hdutype, &status);
+
+}
diff --git a/src/libcf/cf_write_extracted_spectrum.c b/src/libcf/cf_write_extracted_spectrum.c
new file mode 100644
index 0000000..90831c2
--- /dev/null
+++ b/src/libcf/cf_write_extracted_spectrum.c
@@ -0,0 +1,226 @@
+/**************************************************************************
+ * Johns Hopkins University
+ * Center for Astrophysical Sciences
+ * FUSE
+ *************************************************************************
+ *
+ * synopsis: cf_write_extracted_spectrum(infile, aperture, nout, wave_out,
+ * flux_out, var_out, counts_out, weights_out, bkgd_out,
+ * bpix_out, outrootname)
+ *
+ * Description: Write the results of the data reduction to a file.
+ * Information from the header is used to generate the name
+ * of the output file. Aperture coding is as follows:
+ *
+ * 1-8 -> LiF[HIRS,MDRS,LWRS,PINH], SiC[HIRS,MDRS,LWRS,PINH]
+ *
+ * Arguments: fitsfile infile : pointer to Intermediate Data File
+ * int aperture : Target aperture (values are 1 to 8)
+ * int valid_spectrum: True if spectrum contains photons.
+ * long nout : number of tabulated points
+ * float wave_out : Output wavelength array
+ * float flux_out : Output flux array
+ * float var_out : Output variance array
+ * long counts_out : Output counts array (in counts)
+ * float weights_out : Output weights array (in counts)
+ * float bkgd_out : Output background array (in counts)
+ * short bpix_out : Output bad pixel spectrum
+ * char outrootname: Optional output file name
+ *
+ * Returns: 0 if successful
+ *
+ * HISTORY: 02/10/03 1.1 RDR started work
+ * 02/28/03 1.2 peb Added header files to file and tidied
+ * code using lint.
+ * 03/12/03 1.3 wvd Output ERROR = sqrt(var_out)
+ * 03/31/03 1.4 wvd Update keywords FILENAME, FILETYPE,
+ * and APER_ACT.
+ * 05/22/03 1.5 wvd Direct cf_error_init to stderr.
+ * 05/29/03 1.6 rdr Added bad pixel column
+ * 06/03/03 1.7 rdr Change naming convention to allow
+ * hist data
+ * 07/17/03 1.9 wvd Test var_out before taking sqrt.
+ * Change calfusettag.h to calfuse.h
+ * 10/01/03 1.10 wvd Modify verbose levels.
+ * 11/10/03 1.11 wvd Correct numbering scheme for HIRS
+ * and MDRS apertures.
+ * 02/13/04 1.12 wvd Correct error in COMMENT lines.
+ * 03/03/04 1.13 rdr Populate archive search keywords
+ * 03/05/04 1.14 wvd Change name of POTHOLE column
+ * to QUALITY.
+ * 03/24/04 1.15 wvd If valid_spectrum=FALSE, write
+ * warning message to file header.
+ * 04/06/04 1.16 bjg Include string.h and ctype.h
+ * 04/09/04 1.17 wvd If valid_spectrum=FALSE, set
+ * EXPTIME = 0 in file header.
+ * 04/27/04 1.18 wvd Move conversion from variance
+ * to sigma from this routine to
+ * cf_optimal_extraction.
+ * 06/11/04 1.19 peb Added the -r option to override the
+ * default rootname
+ * 02/01/05 1.20 wvd Revert to standard FITS binary
+ * table format for output file.
+ * 04/11/05 1.21 wvd In HIST mode, don't write SIA
+ * table to output spectral file.
+ * 06/03/05 1.22 wvd Return status from cf_copy_hist_header.
+ * 06/03/05 1.23 wvd Change cf_copy_hist_header to type void.
+ * 08/11/05 1.24 wvd Delete FITS_write_date from
+ * cf_copy_hist_header.
+ *
+ **************************************************************************/
+
+#include <string.h>
+#include <ctype.h>
+#include <stdio.h>
+#include "calfuse.h"
+
+static char *ap_code[] = {"", "lif3", "lif2", "lif4", "lif1",
+ "sic3", "sic2", "sic4", "sic1"};
+
+static void
+cf_copy_hist_header(fitsfile *infits, fitsfile *outfits, int *status)
+{
+ char card[FLEN_CARD];
+ int i, nkeys, naxis=0, nextend=1;
+ long naxes[2];
+
+ naxes[0] = naxes[1] = 0;
+
+ FITS_create_img(outfits, SHORT_IMG, naxis, naxes, status);
+ FITS_delete_key(outfits, "COMMENT", status);
+ FITS_delete_key(outfits, "COMMENT", status);
+ FITS_write_key(outfits, TINT, "NEXTEND", &nextend,
+ "Number of standard extensions", status);
+ fits_get_hdrspace(infits, &nkeys, NULL, status);
+ cf_if_fits_error(*status);
+ for (i = 9; i <= nkeys; i++) {
+ FITS_read_record(infits, i, card, status);
+ FITS_write_record(outfits, card, status);
+ }
+}
+
+int
+cf_write_extracted_spectrum(fitsfile *infits, int aperture,
+ int valid_spectrum, long nout, float *wave_out,
+ float *flux_out, float *var_out, long *counts_out,
+ float *weights_out, float *bkgd_out, short *bpix_out,
+ char *outrootname)
+{
+ char CF_PRGM_ID[] = "cf_write_extracted_spectrum";
+ char CF_VER_NUM[] = "1.24";
+
+ fitsfile *outfits;
+ int nextend=1, status=0, tfields=7, timeref;
+ long i, frow=1, felem=1;
+ float bw=0., center=0., wmin=1200., wmax=0. ;
+ char comment[FLEN_CARD], datestr[FLEN_CARD];
+ char rootname[FLEN_VALUE]={'\0'}, instmode[FLEN_VALUE] ;
+ char det[FLEN_VALUE]={'\0'}, outfile[FLEN_VALUE]={'\0'};
+ char extname[]="SPECTRUM";
+ char *aperact[] = {"HIRS_LIF", "MDRS_LIF", "LWRS_LIF", "PINH_LIF",
+ "HIRS_SIC", "MDRS_SIC", "LWRS_SIC", "PINH_SIC"};
+ char *ttype[]={"WAVE","FLUX","ERROR","COUNTS","WEIGHTS","BKGD","QUALITY"};
+ char *tform[]={"1E", "1E", "1E", "1J", "1E", "1E", "1I"};
+ char *tunit[]={"ANGSTROMS","ERG CM^-2 S^-1 ANG^-1","ERG CM^-2 S^-1 ANG^-1",
+ "COUNTS", "COUNTS", "COUNTS","UNITLESS"};
+
+ /* Initialize error checking */
+ cf_error_init(CF_PRGM_ID, CF_VER_NUM, stderr);
+
+ /* Enter a time stamp into the log */
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin Processing");
+
+ /*
+ * Read the observation ID from the input file and create an
+ * output file name.
+ */
+ FITS_movabs_hdu(infits, 1, NULL, &status);
+ FITS_read_key(infits, TSTRING, "ROOTNAME", rootname, NULL, &status);
+ FITS_read_key(infits, TSTRING, "DETECTOR", det, NULL, &status);
+ FITS_read_key(infits, TSTRING, "INSTMODE", instmode, NULL, &status);
+
+ /* Override the default rootname if the -r option is given. */
+ if (outrootname != NULL)
+ strcpy(rootname, outrootname);
+
+ /* Convert detector name to lower case */
+ det[1] = tolower(det[1]);
+
+ if (!strncmp(instmode,"T",1))
+ sprintf(outfile, "%11s%2s%4sttagfcal.fit",
+ rootname, det, ap_code[aperture]);
+ else if (!strncmp(instmode,"H",1))
+ sprintf(outfile, "%11s%2s%4shistfcal.fit",
+ rootname, det, ap_code[aperture]);
+ else {
+ cf_if_error("Cannot create name for the output files.") ;
+ return 1;
+ }
+ cf_verbose(3, "Output file name = %s", outfile);
+
+ /* Open the output file and copy the header info from the input file */
+ FITS_create_file(&outfits, outfile, &status);
+ if (!strncmp(instmode,"T",1))
+ FITS_copy_header(infits, outfits, &status);
+ else
+ cf_copy_hist_header(infits, outfits, &status);
+ FITS_update_key(outfits, TINT, "NEXTEND", &nextend, NULL, &status);
+ FITS_update_key(outfits, TSTRING, "FILENAME", outfile, NULL, &status);
+ FITS_update_key(outfits, TSTRING, "FILETYPE",
+ "CALIBRATED EXTRACTED SPECTRUM", NULL, &status);
+ FITS_update_key(outfits, TSTRING, "APER_ACT", aperact[aperture-1],
+ NULL, &status);
+
+ /* If valid_spectrum = FALSE, write warning to file header. */
+ if (valid_spectrum == FALSE) {
+ float exptime = 0.;
+ FITS_update_key(outfits, TFLOAT, "EXPTIME", &exptime, NULL, &status);
+ FITS_write_comment(outfits, " ", &status);
+ FITS_write_comment(outfits,
+ "No good data. Output arrays set to zero.", &status);
+ fits_get_system_time(datestr, &timeref, &status);
+ sprintf(comment, "CalFUSE v%s %.10s", CALFUSE_VERSION, datestr);
+ FITS_write_comment(outfits, comment, &status);
+ FITS_write_comment(outfits, " ", &status);
+ }
+
+ /* Populate archive search keywords */
+ for (i=0 ; i<nout ; i++) {
+ if (wave_out[i] < wmin) wmin=wave_out[i] ;
+ if (wave_out[i] > wmax) wmax=wave_out[i] ;
+ }
+ bw = wmax-wmin ;
+ center = (wmax + wmin) / 2. ;
+ FITS_update_key(outfits, TFLOAT, "BANDWID", &bw, NULL, &status);
+ FITS_update_key(outfits, TFLOAT, "CENTRWV", &center, NULL, &status);
+ FITS_update_key(outfits, TFLOAT, "WAVEMIN", &wmin, NULL, &status);
+ FITS_update_key(outfits, TFLOAT, "WAVEMAX", &wmax, NULL, &status);
+
+ /* Put the data into the table */
+ FITS_create_tbl(outfits, BINARY_TBL, nout, tfields, ttype, tform,
+ tunit, extname, &status);
+ FITS_write_col(outfits, TFLOAT, 1, frow, felem, nout, wave_out, &status);
+ FITS_write_col(outfits, TFLOAT, 2, frow, felem, nout, flux_out, &status);
+ FITS_write_col(outfits, TFLOAT, 3, frow, felem, nout, var_out, &status);
+ FITS_write_col(outfits, TLONG, 4, frow, felem, nout, counts_out, &status);
+ FITS_write_col(outfits, TFLOAT, 5, frow, felem, nout, weights_out, &status);
+ FITS_write_col(outfits, TFLOAT, 6, frow, felem, nout, bkgd_out, &status);
+ FITS_write_col(outfits, TSHORT, 7, frow, felem, nout, bpix_out, &status);
+
+ /* Write some comments into the header */
+ FITS_write_comment(outfits, " ", &status);
+ FITS_write_comment(outfits, "RAW COUNTS = COUNTS ",
+ &status);
+ FITS_write_comment(outfits, "TARGET COUNTS = WEIGHTS - BKGD ",
+ &status);
+ FITS_write_comment(outfits, "TARGET FLUX = TARGET COUNTS * HC / LAMBDA / "
+ "AEFF / EXPTIME / WPC", &status);
+ FITS_write_comment(outfits, " ", &status);
+
+ FITS_close_file(outfits, &status);
+
+ /* Enter a time stamp into the log */
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Finished processing");
+
+ return (status);
+}
diff --git a/src/libcf/eclipse.c b/src/libcf/eclipse.c
new file mode 100644
index 0000000..a1e0b44
--- /dev/null
+++ b/src/libcf/eclipse.c
@@ -0,0 +1,148 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: int eclipse(double pos[3], double mjdate)
+ *
+ * Description: Determines if FUSE is in the day or night portion of the orbit.
+ *
+ *
+ * Arguments: double pos Cartesian vector xyz coord of satellite.
+ * double mjdate Julian date of observation
+ *
+ * Returns: int 0 if day portion of orbit
+ * 1 if night portion of orbit
+ *
+ * Calls: slaDcc2s dcc2s.f
+ * slaDranrm dranrm.f
+ * slaDsep dsep.f
+ * slaEvp evp.f
+ * slaPreces preces.f
+ *
+ * History: 03/10/98 E. Murphy Begin work.
+ * 03/10/98 E. Murphy Initial version working
+ * 07/07/99 E. Murphy Replaced x,y,z in call with pos
+ * 07/20/99 jm Removed duplicate define statements
+ * 08/26/99 E. Murphy ang_sep now returned.
+ * 05/31/00 peb Implemented cfortran.h calls for slalib
+ * functions.
+ * 12/18/03 bjg Change calfusettag.h to calfuse.h
+ * 06/17/04 bjg 1.4 Corrected cfortran call to sla_preces
+ *
+ * References: This routine makes use of the Starlink set of astronomical
+ * subroutines (SLALIB). More information can be found at
+ * http://star-www.rl.ac.uk.
+ ****************************************************************************/
+
+#include <stdio.h>
+#include <math.h>
+
+#ifdef CFORTRAN
+#include "cfortran.h"
+PROTOCCALLSFSUB3(SLA_DCC2S, sla_dcc2s, DOUBLEV, PDOUBLE, PDOUBLE)
+#define slaDcc2s(V, A, B) \
+ CCALLSFSUB3(SLA_DCC2S, sla_dcc2s, DOUBLEV, PDOUBLE, PDOUBLE, V, A, B)
+PROTOCCALLSFFUN1(DOUBLE, SLA_DRANRM, sla_dranrm, DOUBLE)
+#define slaDranrm(ANGLE) \
+ CCALLSFFUN1(SLA_DRANRM, sla_dranrm, DOUBLE, ANGLE)
+PROTOCCALLSFFUN4(DOUBLE, SLA_DSEP, sla_dsep, DOUBLE, DOUBLE, DOUBLE, \
+ DOUBLE)
+#define slaDsep(A1, B1, A2, B2) \
+ CCALLSFFUN4(SLA_DSEP, sla_dsep, DOUBLE, DOUBLE, DOUBLE, DOUBLE, \
+ A1, B1, A2, B2)
+PROTOCCALLSFSUB6(SLA_EVP, sla_evp, DOUBLE, DOUBLE, DOUBLEV, DOUBLEV, \
+ DOUBLEV, DOUBLEV)
+#define slaEvp(DATE, DEQX, DVB, DPB, DVH, DPH) \
+ CCALLSFSUB6(SLA_EVP, sla_evp, DOUBLE, DOUBLE, DOUBLEV, DOUBLEV, \
+ DOUBLEV, DOUBLEV, DATE, DEQX, DVB, DPB, DVH, DPH)
+PROTOCCALLSFSUB5(SLA_PRECES, sla_preces, STRING, DOUBLE, DOUBLE, PDOUBLE, \
+ PDOUBLE)
+#define slaPreces(SYSTEM, EP0, EP1, RA, DC) \
+ CCALLSFSUB5(SLA_PRECES, sla_preces, STRING, DOUBLE, DOUBLE, PDOUBLE, \
+ PDOUBLE, SYSTEM, EP0, EP1, RA, DC)
+#else
+#include "slalib.h"
+#include "slamac.h"
+#endif
+
+#include "calfuse.h"
+
+int eclipse(double *pos, double mjdate, double *ang_sep)
+{
+ /* Define variables. */
+ int i, retcode;
+ double dvb[3], dpb[3], dvh[3], dph[3], epoch2;
+ double r, ra_earth, dec_earth, ra_sun, dec_sun, ang_earth, ang_sun;
+ char fk5_st[10]="FK5";
+
+ /* Calculate the J2000.0 apparent RA and DEC of the Earth */
+ r=sqrt(pos[0]*pos[0]+pos[1]*pos[1]+pos[2]*pos[2]);
+ ra_earth=atan2(-pos[1],-pos[0]);
+ dec_earth=asin(-pos[2]/r);
+
+ /* We must precess the J2000 RA and DEC to date of observation. This
+ * is a very small correction, and could probably be ignored.
+ */
+
+ epoch2=2000.0-((51544.0-mjdate)/365.25);
+
+#ifdef CFORTRAN
+ slaPreces(fk5_st, 2000.0, epoch2, ra_earth, dec_earth);
+#else
+ slaPreces(fk5_st, 2000.0, epoch2, &ra_earth, &dec_earth);
+#endif
+
+ /* Evp returns four 3-vectors containing the barycentric velocity and
+ * position (dvb,dpv) and the heliocentric velocity and position
+ * (dvh,dph) of the Earth on the date mjdate. It requires a modified
+ * Julian date as input. Output has units of AU for positions and
+ * AU/s for velocities.
+ */
+
+ slaEvp(mjdate, 2000.0, dvb, dpb, dvh, dph);
+
+ /* Convert the 3-vector position of the Sun into a J2000.0 RA and DEC */
+
+ for (i=0; i<3; i++) dph[i]*=-1.0;
+
+
+#ifdef CFORTRAN
+ slaDcc2s(dph, ra_sun, dec_sun);
+#else
+ slaDcc2s(dph, &ra_sun, &dec_sun);
+#endif
+
+ ra_sun=slaDranrm(ra_sun);
+
+ /* We must precess the J2000 RA and DEC to date of observation. This
+ * is a very small correction, and could probably be ignored.
+ */
+
+ epoch2=2000.0-((51544.0-mjdate)/365.25);
+
+#ifdef CFORTRAN
+ slaPreces(fk5_st, 2000.0, epoch2, ra_sun, dec_sun);
+#else
+ slaPreces(fk5_st, 2000.0, epoch2, &ra_sun, &dec_sun);
+#endif
+
+ /* Compute the angular sizes of the Earth and the Sun. */
+
+ ang_earth=asin(RE/r);
+
+ ang_sun=asin(RS/(sqrt(dph[0]*dph[0]+dph[1]*dph[1]+dph[2]*dph[2])*AU));
+
+ /* Compute the angular separation of the Earth and the Sun. */
+
+ *ang_sep=slaDsep(ra_earth, dec_earth, ra_sun, dec_sun);
+
+ retcode=0;
+ if (*ang_sep < ang_earth+ang_sun) retcode=1;
+
+ /* Convert ang_sep into degrees. */
+ *ang_sep /= RADIAN;
+
+ return retcode;
+}
diff --git a/src/libcf/geod_mag.c b/src/libcf/geod_mag.c
new file mode 100644
index 0000000..6750f9d
--- /dev/null
+++ b/src/libcf/geod_mag.c
@@ -0,0 +1,40 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: double geod_mag(double lon, double lat)
+ *
+ * Description: Computes the magnetic latitude of FUSE from the
+ * given geocentric longitude and latitude.
+ *
+ * Arguments: double lon,lat (deg) Geocentric longitude and latitude
+ *
+ * Returns: double Geomagnetic latitude.
+ *
+ * History: 03/11/98 E. Murphy Begin work.
+ * 03/11/98 E. Murphy Initial version working
+ * 04/13/99 E. Murphy Moved PI and RADIAN to calfuse.h
+ * 12/18/03 bjg Change calfusettag.h to calfuse.h
+ *
+ * Ake, T. 1998 in The Scientific Impact of the Goddard
+ * High Resolution Spectrograph, ed. J. C. Brandt et al.,
+ * ASP Conference Series, in preparation.
+ ****************************************************************************/
+
+#include <stdio.h>
+#include <math.h>
+#include "calfuse.h"
+
+double geod_mag(double lon, double lat)
+{
+ double lat_rad, c1;
+
+ lat_rad=lat*RADIAN;
+
+ c1=sin(lat_rad)*cos(11.4*RADIAN)-
+ cos(lat_rad)*cos((lon+69.8)*RADIAN)*sin(11.4*RADIAN);
+
+ return asin(c1)/RADIAN;
+}
diff --git a/src/libcf/helio_vel.c b/src/libcf/helio_vel.c
new file mode 100644
index 0000000..bc069b6
--- /dev/null
+++ b/src/libcf/helio_vel.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: double helio_vel(double mjdate, double ra, double dec)
+ *
+ * Description: Computes the Earth's orbital velocity in the direction
+ * of ra,dec to convert to heliocentric velocity.
+ *
+ * Arguments: double mjdate Mod. Julian date of observation
+ * double ra (deg) J2000.0 right ascension
+ * double dec (deg) J2000.0 declination
+ *
+ * Returns: double (km/s) velocity in direction of source
+ *
+ * Calls: slaEvp evp.f
+ * slaDcs2c dcs2c.f
+ * slaDvdv dvdv.f
+ *
+ * History: 03/05/98 E. Murphy Begin work.
+ * 03/05/98 E. Murphy Initial version working
+ * 05/31/00 peb Implemented cfortran.h calls for slalib
+ * functions.
+ * 06/15/01 V. Dixon Correct sign of return value to agree
+ * with astronomical convention.
+ * 12/18/03 bjg Change calfusettag.h to calfuse.h
+ *
+ * References: This routine makes use of the Starlink set of astronomical
+ * subroutines (SLALIB). More information can be found at
+ * http://star-www.rl.ac.uk.
+ ****************************************************************************/
+
+#include <stdio.h>
+
+#ifdef CFORTRAN
+#include "cfortran.h"
+
+PROTOCCALLSFSUB3(SLA_DCS2C, sla_dcs2c, DOUBLE, DOUBLE, DOUBLEV)
+#define slaDcs2c(A, B, V) \
+ CCALLSFSUB3(SLA_DCS2C, sla_dcs2c, DOUBLE, DOUBLE, DOUBLEV, A, B, V)
+
+PROTOCCALLSFFUN2(DOUBLE, SLA_DVDV, sla_dvdv, DOUBLEV, DOUBLEV)
+#define slaDvdv(VA, VB) \
+ CCALLSFFUN2(SLA_DVDV, sla_dvdv, DOUBLEV, DOUBLEV, VA, VB)
+
+PROTOCCALLSFSUB6(SLA_EVP, sla_evp, DOUBLE, DOUBLE, DOUBLEV, DOUBLEV, \
+ DOUBLEV, DOUBLEV)
+#define slaEvp(DATE, DEQX, DVB, DPB, DVH, DPH) \
+ CCALLSFSUB6(SLA_EVP, sla_evp, DOUBLE, DOUBLE, DOUBLEV, DOUBLEV, \
+ DOUBLEV, DOUBLEV, DATE, DEQX, DVB, DPB, DVH, DPH)
+#else
+#include "slalib.h"
+#include "slamac.h"
+#endif
+
+#include "calfuse.h"
+
+double helio_vel(double mjdate, double ra, double dec)
+{
+ /* Define variables. */
+ double dvb[3], dpb[3], dvh[3], dph[3], vect[3];
+ /*
+ * Evp returns four 3-vectors containing the barycentric velocity and
+ * position (dvb,dpb) and the heliocentric velocity and position
+ * (dvh,dph) of the Earth on the date mjdate. It requires a modified
+ * Julian date as input. Output has units of AU for positions and
+ * AU/s for velocities.
+ */
+ slaEvp(mjdate, 2000.0, dvb, dpb, dvh, dph);
+
+ /* Convert the J2000.0 RA and DEC into a 3-vector position */
+
+ slaDcs2c(RADIAN*ra, RADIAN*dec, vect);
+ /*
+ * Compute the dot product of the RA DEC position vector and the
+ * heliocentric velocity vector. Mutliply by km/AU to get velocity
+ * in km/s.
+ */
+ return slaDvdv(vect, dvh)*149.5978707E6;
+}
diff --git a/src/libcf/lsrd_vel.c b/src/libcf/lsrd_vel.c
new file mode 100644
index 0000000..a90c22b
--- /dev/null
+++ b/src/libcf/lsrd_vel.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: double lsrd_vel(double ra, double dec)
+ *
+ * Description: Computes the Sun's velocity in the direction
+ * of ra,dec to convert to a LSR. In this case we
+ * are using the dynamical solar motion of
+ * 16.6 km/s towards l=53, b=+25.
+ *
+ * Arguments: double ra (deg) J2000.0 right ascension
+ * double dec (deg) J2000.0 declination
+ *
+ * Returns: double (km/s) velocity in direction of source
+ *
+ * Calls: slaRvlsrd rvslrd.f
+ *
+ * History: 03/05/98 E. Murphy Begin work.
+ * 03/05/98 E. Murphy Initial version working
+ * 05/31/00 peb Implemented cfortran.h calls for slalib
+ * functions.
+ * 06/15/01 V. Dixon Multiply return value by -1.0 to agree
+ * with astronomical convention.
+ * 12/18/03 bjg Change calfusettag.h to calfuse.h
+ *
+ * References: This routine makes use of the Starlink set of astronomical
+ * subroutines (SLALIB). More information can be found at
+ * http://star-www.rl.ac.uk.
+ ****************************************************************************/
+
+#include <stdio.h>
+
+#ifdef CFORTRAN
+#include "cfortran.h"
+PROTOCCALLSFFUN2(FLOAT, SLA_RVLSRD, sla_rvlsrd, FLOAT, FLOAT)
+#define slaRvlsrd(R2000, D2000) \
+ CCALLSFFUN2(SLA_RVLSRD, sla_rvlsrd, FLOAT, FLOAT, R2000, D2000)
+#else
+#include "slalib.h"
+#include "slamac.h"
+#endif
+
+#include "calfuse.h"
+
+double lsrd_vel(double ra, double dec)
+{
+ return -1.0 * slaRvlsrd((float) ra*RADIAN, (float) dec*RADIAN);
+}
diff --git a/src/libcf/lsrk_vel.c b/src/libcf/lsrk_vel.c
new file mode 100644
index 0000000..15f5a6c
--- /dev/null
+++ b/src/libcf/lsrk_vel.c
@@ -0,0 +1,52 @@
+/****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ ****************************************************************************
+ *
+ * Synopsis: double lsrk_vel(double ra, double dec)
+ *
+ * Description: Computes the Sun's velocity in the direction
+ * of ra,dec to convert to a LSR. In this case we
+ * are using standard solar motion of
+ * 20 km/s towards RA 18h Dec +30d (1900).
+ *
+ * Arguments: double ra (deg) J2000.0 right ascension
+ * double dec (deg) J2000.0 declination
+ *
+ * Returns: double (km/s) velocity in direction of source
+ *
+ * Calls: slaRvlsrk rvlsrk.f
+ *
+ * History: 03/05/98 E. Murphy Begin work.
+ * 03/05/98 E. Murphy Initial version working
+ * 04/13/99 E. Murphy Clean up a bit
+ * 05/31/00 peb Implemented cfortran.h calls for slalib
+ * functions.
+ * 06/15/01 V. Dixon Multiply return value by -1.0 to agree
+ * with astronomical convention.
+ * 12/18/03 bjg Change calfusettag.h to calfuse.h
+ *
+ * References: This routine makes use of the Starlink set of astronomical
+ * subroutines (SLALIB). More information can be found at
+ * http://star-www.rl.ac.uk.
+ ****************************************************************************/
+
+#include <stdio.h>
+
+#ifdef CFORTRAN
+#include "cfortran.h"
+PROTOCCALLSFFUN2(FLOAT, SLA_RVLSRK, sla_rvlsrk, FLOAT, FLOAT)
+#define slaRvlsrk(R2000, D2000) \
+ CCALLSFFUN2(SLA_RVLSRK, sla_rvlsrK, FLOAT, FLOAT, R2000, D2000)
+#else
+#include "slalib.h"
+#include "slamac.h"
+#endif
+
+#include "calfuse.h"
+
+double lsrk_vel(double ra, double dec)
+{
+ return -1.0 * slaRvlsrk((float) ra*RADIAN, (float) dec*RADIAN);
+}
diff --git a/src/libcf/month_day.c b/src/libcf/month_day.c
new file mode 100644
index 0000000..1ecfae1
--- /dev/null
+++ b/src/libcf/month_day.c
@@ -0,0 +1,19 @@
+/* month_day: return month,day from day of year */
+/* 07/21/04 1.4 wvd Add () to defn of leap */
+
+#include "calfuse.h"
+
+void month_day(int year, int yearday, int *pmonth, int *pday)
+{
+ static char daytab[2][13]={
+ {0,31,28,31,30,31,30,31,31,30,31,30,31},
+ {0,31,29,31,30,31,30,31,31,30,31,30,31}
+ };
+ int i, leap;
+
+ leap = ((year%4 == 0 && year%100 != 0) || year%400 == 0);
+ for (i=1; yearday>daytab[leap][i]; i++)
+ yearday-=daytab[leap][i];
+ *pmonth=i;
+ *pday=yearday;
+}
diff --git a/src/libcf/pole_ang.c b/src/libcf/pole_ang.c
new file mode 100644
index 0000000..ae90cc2
--- /dev/null
+++ b/src/libcf/pole_ang.c
@@ -0,0 +1,64 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: double pole_ang(double *pos, double *vel, double ra, double dec)
+ *
+ * Description: Computes the position of the orbit pole from the given state
+ * 6-vector. Returns the angle between the pole and the given
+ * RA and DEC.
+ *
+ * Arguments: double *pos (km) 3-vector position of satellite
+ * double *vel (km/s) 3-vector velocity of satellite
+ * double ra,dec (deg) position of source
+ *
+ * Returns: double (deg) angle from orbit pole to source
+ *
+ * History: 07/06/06 wvd 1.1 Adapted from space_vel and sun_ang
+ * 04/08/07 wvd 1.2 Cast SGP4_getPole as a void.
+ *
+ * References: This routine makes use of the Starlink set of astronomical
+ * subroutines (SLALIB). More information can be found at
+ * http://star-www.rl.ac.uk.
+ *****************************************************************************/
+
+#include <stdio.h>
+
+#ifdef CFORTRAN
+#include "cfortran.h"
+PROTOCCALLSFSUB3(SLA_DCC2S, sla_dcc2s, DOUBLEV, PDOUBLE, PDOUBLE)
+#define slaDcc2s(V, A, B) \
+ CCALLSFSUB3(SLA_DCC2S, sla_dcc2s, DOUBLEV, PDOUBLE, PDOUBLE, V, A, B)
+PROTOCCALLSFFUN1(DOUBLE, SLA_DRANRM, sla_dranrm, DOUBLE)
+#define slaDranrm(ANGLE) \
+ CCALLSFFUN1(SLA_DRANRM, sla_dranrm, DOUBLE, ANGLE)
+PROTOCCALLSFFUN4(DOUBLE, SLA_DSEP, sla_dsep, DOUBLE, DOUBLE, DOUBLE, DOUBLE)
+#define slaDsep(A1, B1, A2, B2) \
+ CCALLSFFUN4(SLA_DSEP, sla_dsep, DOUBLE, DOUBLE, DOUBLE, DOUBLE, \
+ A1, B1, A2, B2)
+#else
+#include "slalib.h"
+#include "slamac.h"
+#endif
+
+#include "calfuse.h"
+
+double pole_ang(double pos[3], double vel[3], double ra, double dec)
+{
+ double pole[3], ra_pole, dec_pole;
+
+ /* Get 3-vector containing the orbit pole. */
+ (void) SGP4_getPole(pos, vel, pole);
+
+ /* Convert 3-vector into J2000.0 RA and DEC */
+#ifdef CFORTRAN
+ slaDcc2s(pole, ra_pole, dec_pole);
+#else
+ slaDcc2s(pole, &ra_pole, &dec_pole);
+#endif
+
+ /* Compute the angular separation of RA, DEC and RA_POLE, DEC_POLE */
+ return slaDsep(ra*RADIAN, dec*RADIAN, slaDranrm(ra_pole), dec_pole)/RADIAN;
+}
diff --git a/src/libcf/read_tle.c b/src/libcf/read_tle.c
new file mode 100644
index 0000000..38db069
--- /dev/null
+++ b/src/libcf/read_tle.c
@@ -0,0 +1,303 @@
+/******************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ ******************************************************************************
+ *
+ * Synopsis: read_tle(fitsfile *fptr)
+ *
+ * Description: read_tle will read the standard tle format file FUSE.TLE
+ * and place the orbital elements into the header of the
+ * fitsfile. The FUSE.TLE file will contain multiple orbital
+ * element sets, so the set closest in time to the observation
+ * will be used.
+ *
+ * Arguments: fitsfile *fptr Pointer to input file
+ *
+ * History: 11/11/98 emurphy Begin work.
+ * 03/18/98 emurphy Added To do list.
+ * 04/08/99 peb Tidied code and added necessary
+ * include files
+ * 06/07/99 peb Added reporting of version control.
+ * 06/22/99 peb Added FITS_ wrappers.
+ * 08/05/99 emm Added statements to print date
+ * of obs and TLE if dtime > 5.
+ * Also modified program to work with
+ * FES keywords TEXPSTRT and TEXPEND
+ * 05/31/00 peb Implemented cfortran.h calls for slalib
+ * functions.
+ * 02/13/03 v1.4 wvd Change 0 to NULL in FITS_update_key
+ * 03/01/03 v1.5 wvd Correct use of pointer in FITS_read_key
+ * 04/01/03 v1.6 wvd Replace cf_errmsg with cf_if_warning,
+ * printf with cf_verbose
+ * 12/18/03 v1.7 bjg Change calfusettag.h to calfuse.h
+ * 04/07/07 v1.8 wvd Initialize min_mjd to zero to silence
+ * compiler warnings.
+ *
+ *****************************************************************************/
+
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef CFORTRAN
+#include "cfortran.h"
+PROTOCCALLSFSUB5(SLA_CLDJ, sla_cldj, INT, INT, INT, PDOUBLE, PINT)
+#define slaCldj(IY, IM, ID, DJM, J) \
+ CCALLSFSUB5(SLA_CLDJ, sla_cldj, INT, INT, INT, PDOUBLE, PINT, \
+ IY, IM, ID, DJM, J)
+#else
+#include "slalib.h"
+#include "slamac.h"
+#endif
+
+#include "calfuse.h"
+
+#define MAXCHARS 120
+static char CF_PRGM_ID[] = "read_tle";
+static char CF_VER_NUM[] = "1.8";
+
+void read_tle(fitsfile *fptr)
+{
+ char line1[MAXCHARS], line2[MAXCHARS], line3[MAXCHARS];
+ char sat_num[10], security_class[10], international_num[10];
+ char inchar[15][15], sp[15][2], sgn[4][2];
+ char comment[FLEN_CARD], eccen_str[20];
+ char n6_mant_str[20], drag_mant_str[20], instrument[FLEN_CARD];
+ int status=0, hdutype=0, card_num, epoch_year, n6_exponent;
+ int drag_exponent, ephemeris, elset_num, checksum1, checksum2;
+ int rev_num, e_month, e_day;
+ double n6_mantissa, drag_mantissa, epoch_day, n2, inclin, raan;
+ double aop, mean_anom, mean_mot, n6, drag, semimaj, revspersec;
+ double expstart, expend, expmiddle, eccentr, dtime=1.0e9;
+ double i_day, f_day, mjd, mjd_f, mjd_d, min_mjd=0;
+ FILE *ftle;
+
+ /* Enter a timestamp into the log. */
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Begin reading TLE file");
+
+ /* Open the file with the standard two-line elements. */
+ ftle = NULL;
+ ftle = fopen(cf_cal_file("FUSE.TLE"),"r");
+ if (ftle == NULL)
+ cf_if_error("Cannot find file FUSE.TLE, which contains the"
+ " orbital elements.");
+
+ /* Rewind the fits file and get the start time of the exposure */
+ FITS_movabs_hdu(fptr, 1, &hdutype, &status);
+ FITS_read_key(fptr, TSTRING, "INSTRUME", instrument, comment, &status);
+
+ /* In the primary header, the FES files use keywords with a different
+ name. This is because the FES may have many exposures in a file.
+ The TEXPSTRT is the start of the first exposure and TEXPEND is the
+ end of the last exposure. */
+ if (!strncmp(instrument,"FES",3)) {
+ /* Read in FES keywords */
+ FITS_read_key(fptr, TDOUBLE, "TEXPSTRT", &expstart, comment, &status);
+ FITS_read_key(fptr, TDOUBLE, "TEXPEND", &expend, comment, &status);
+ } else {
+ /* Read in FUV keywords */
+ FITS_read_key(fptr, TDOUBLE, "EXPSTART", &expstart, comment, &status);
+ FITS_read_key(fptr, TDOUBLE, "EXPEND", &expend, comment, &status);
+ }
+
+ /* expmiddle is in mjd */
+ expmiddle = (expstart+expend)/2.0;
+
+ /* Read in FUSE.TLE file by getting one line at a time */
+ while (fgets(line1, MAXCHARS,ftle) != NULL) {
+ fgets(line2, MAXCHARS, ftle);
+ fgets(line3, MAXCHARS, ftle);
+
+#ifdef DEBUG
+ printf("\n\n%-80.80s\n",line1);
+ printf("%-80.80s\n",line2);
+ printf("%-80.80s\n",line3);
+#endif
+ /*
+ * This may look like a stupid way to do this, but it has to be
+ * done this way. You see, the fields can contain leading blanks
+ * which should be interpreted as zeros. However, c skips over
+ * leading blanks when reading %f and %d.
+ */
+ sscanf(line2,"%1c%1c%5c%1c%1c%8c%1c%2c%12c%1c%1c%9c%1c%1c%5c%2c%1c"
+ "%1c%5c%2c%1c%1c%1c%4c%1c",
+ inchar[1],sp[1],inchar[2],inchar[3],sp[2],inchar[4],sp[3],
+ inchar[5],inchar[6],sp[4],sgn[1],inchar[7],sp[5],sgn[2],
+ inchar[8],inchar[9],sp[6],sgn[3],inchar[10],inchar[11],
+ sp[7],inchar[12], sp[8],inchar[13],inchar[14]);
+
+ inchar[1][1]='\0';
+ card_num=atoi(inchar[1]);
+
+ inchar[2][5]='\0';
+ strncpy(sat_num,inchar[2],5);
+
+ inchar[3][1]='\0';
+ strncpy(security_class,inchar[3],1);
+
+ inchar[4][8]='\0';
+ strncpy(international_num,inchar[4],8);
+
+ inchar[5][2]='\0';
+ epoch_year=atoi(inchar[5]);
+ if (epoch_year < 50)
+ epoch_year+=2000;
+ else
+ epoch_year+=1900;
+
+ inchar[6][12]='\0';
+ epoch_day=atof(inchar[6]);
+
+ inchar[7][9]='\0';
+ n2=atof(inchar[7]);
+ if (sgn[1][0] == '-')
+ n2*=-1.0;
+
+ inchar[8][5]='\0';
+ strcpy(n6_mant_str,"0.");
+ strncat(n6_mant_str,inchar[8],7);
+#ifdef DEBUG
+ printf("n6=%-10.10s\n",n6_mant_str);
+#endif
+ n6_mantissa=atof(n6_mant_str);
+ if (sgn[2][0] == '-')
+ n6_mantissa*=-1.0;
+
+ inchar[9][2]='\0';
+ n6_exponent=atoi(inchar[9]);
+
+ inchar[10][5]='\0';
+ strcpy(drag_mant_str,"0.");
+ strncat(drag_mant_str,inchar[10],7);
+#ifdef DEBUG
+ printf("Drag=%-10.10s\n",drag_mant_str);
+#endif
+ drag_mantissa=atof(drag_mant_str);
+ if (sgn[3][0] == '-')
+ drag_mantissa*=-1.0;
+
+ inchar[11][2]='\0';
+ drag_exponent=atoi(inchar[11]);
+
+ inchar[12][1]='\0';
+ ephemeris=atoi(inchar[12]);
+
+ inchar[13][4]='\0';
+ elset_num=atoi(inchar[13]);
+
+ inchar[14][1]='\0';
+ checksum1=atoi(inchar[14]);
+
+ n6=n6_mantissa*pow(10.0,(double) n6_exponent);
+ drag=drag_mantissa*pow(10.0,(double) drag_exponent);
+
+#ifdef DEBUG
+ printf("n6=>%10.5f %5d %15.6E\n", n6_mantissa, n6_exponent, n6);
+ printf("drag=>%10.5f %5d %15.6E\n", drag_mantissa,
+ drag_exponent, drag);
+ for(i=1; i<=14; i++)
+ printf("%2d %-15.15s\n",i,inchar[i]);
+ for(i=1; i<=3; i++)
+ printf("%2d %-5.5s\n",i,sgn[i]);
+#endif
+ sscanf(line3,"%1c%1c%5c%1c%8c%1c%8c%1c%7c%1c%8c%1c%8c%1c%11c%5c%1c",
+ inchar[1],sp[1],inchar[2],sp[2],inchar[3],sp[3],inchar[4],
+ sp[4],inchar[5],sp[5],inchar[6],sp[6],inchar[7],sp[7],
+ inchar[8],inchar[9],inchar[10]);
+ inchar[1][1]='\0';
+ card_num=atoi(inchar[1]);
+
+ inchar[2][5]='\0';
+ strncpy(sat_num,inchar[2],5);
+
+ inchar[3][8]='\0';
+ inclin=atof(inchar[3]);
+
+ inchar[4][8]='\0';
+ raan=atof(inchar[4]);
+
+ inchar[5][7]='\0';
+ /*
+ * strcpy(eccen_str,"0.");
+ * strncat(eccen_str,inchar[5],8);
+ */
+ sprintf(eccen_str,"0.%-8s",inchar[5]);
+#ifdef DEBUG
+ printf("Ecstr=%-20.20s\n",eccen_str);
+#endif
+ eccentr=atof(eccen_str);
+
+ inchar[6][8]='\0';
+ aop=atof(inchar[6]);
+
+ inchar[7][8]='\0';
+ mean_anom=atof(inchar[7]);
+
+ inchar[8][11]='\0';
+ mean_mot=atof(inchar[8]);
+
+ inchar[9][5]='\0';
+ rev_num=atof(inchar[9]);
+
+ inchar[10][1]='\0';
+ checksum2=atoi(inchar[10]);
+
+#ifdef DEBUG
+ for(i=1; i<=10; i++)
+ printf("%2d %-15.15s\n",i,inchar[i]);
+ printf("%4d\n%12.8f\n%10.8f\n%10.5E\n%10.5E%5d%5d%5d\n",
+ epoch_year, epoch_day, n2, n6, drag, ephemeris,
+ elset_num, checksum1);
+ printf("\n%8.4f\n%8.4f\n%10.8f\n%8.4f\n%8.4f\n%11.8f\n%5d\n%1d\n",
+ inclin, raan, (float) eccentr, aop, mean_anom,
+ mean_mot, rev_num, checksum2);
+#endif
+ /* Convert the year and day of year into a year month day */
+
+ f_day = modf(epoch_day, &i_day);
+
+ month_day(epoch_year, (int) i_day, &e_month, &e_day);
+
+ /* Convert year month day into a Julian date. */
+#ifdef CFORTRAN
+ slaCldj(epoch_year, e_month, e_day, mjd, status);
+#else
+ slaCldj(epoch_year, e_month, e_day, &mjd, &status);
+#endif
+
+ mjd += f_day;
+
+ if (fabs(expmiddle-mjd) < dtime) {
+ dtime = fabs(expmiddle-mjd);
+ min_mjd=mjd;
+ revspersec = mean_mot/(24.0*60.0*60.0);
+ semimaj = pow(MU/(4.0*PI*PI*revspersec*revspersec),1.0/3.0);
+ mjd_f=modf(mjd, &mjd_d);
+ FITS_update_key(fptr, TDOUBLE, "EPCHTIMD", &mjd_d, NULL, &status);
+ FITS_update_key(fptr, TDOUBLE, "EPCHTIMF", &mjd_f, NULL, &status);
+ FITS_update_key(fptr, TDOUBLE, "INCLINAT", &inclin, NULL, &status);
+ FITS_update_key(fptr, TDOUBLE, "ECCENTRY", &eccentr, NULL, &status);
+ FITS_update_key(fptr, TDOUBLE, "MEANANOM", &mean_anom, NULL,&status);
+ FITS_update_key(fptr, TDOUBLE, "ARGPERIG", &aop, NULL, &status);
+ FITS_update_key(fptr, TDOUBLE, "RASCASCN", &raan, NULL, &status);
+ FITS_update_key(fptr, TDOUBLE, "SEMIMAJR", &semimaj, NULL, &status);
+ FITS_update_key(fptr, TDOUBLE, "MEANMOTN", &mean_mot, NULL, &status);
+ FITS_update_key(fptr, TDOUBLE, "FDM2COEF", &n2, NULL, &status);
+ FITS_update_key(fptr, TDOUBLE, "SDM6COEF", &n6, NULL, &status);
+ FITS_update_key(fptr, TDOUBLE, "DRAGCOEF", &drag, NULL, &status);
+ FITS_update_key(fptr, TSTRING, "PROPMODL", "SGP4", NULL, &status);
+ }
+ } /* endwhile */
+
+ if (dtime > 5.0) {
+ cf_verbose(2, "MJD OBS=%12.5f MJD TLE=%12.5f DT=%12.5f\n",
+ expmiddle, min_mjd, dtime);
+ cf_if_warning("Orbital elements are more than 5 days old.");
+ }
+
+ /* Enter a timestamp into the log. */
+ cf_timestamp(CF_PRGM_ID, CF_VER_NUM, "Done reading TLE file");
+}
+
diff --git a/src/libcf/saa.c b/src/libcf/saa.c
new file mode 100644
index 0000000..0d2d0e3
--- /dev/null
+++ b/src/libcf/saa.c
@@ -0,0 +1,74 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: int saa(saareg *saa, double lon, double lat)
+ *
+ * Description: Determines if FUSE is in the SAA for given models of the SAA
+ *
+ *
+ * Arguments: saareg *saa A structure containing data that roughly
+ * outlines the SAA region.
+ * (n_points: number of points
+ * lat: the latitude array
+ * lon: the longitude array)
+ * (currently we have only one model).
+ * double lon,lat Geocentric longitude and latitude of FUSE
+ *
+ * Returns: int 0 if not in SAA
+ * 1 if in SAA
+ *
+ * History: 07/17/98 E. Murphy Begin work.
+ * 06/22/99 peb Tidied code, added FITS_ wrappers,
+ * removed hardcoded variables.
+ * 07/02/99 peb Moved SAA data to a structure.
+ * 08/25/99 emm Fixed bug in setting maxlon
+ * 08/28/03 v1.3 bjg Adopt Bryce's algorithm for determining
+ * when FUSE is in the SAA.
+ * 08/28/03 v1.4 bjg v1.3 didn't compile but v1.4 does
+ * 08/29/03 v1.5 bjg slightly modified getDir
+ *
+ ****************************************************************************/
+
+#include "calfuse.h"
+
+int getDir(double lon0,double lat0,double lon1,double lat1,double lon2,double lat2)
+{
+
+double dx1, dx2, dy1, dy2, t1, t2;
+
+ dx1=lon1-lon0; dy1=lat1-lat0;
+ dx2=lon2-lon0; dy2=lat2-lat0;
+
+ t1=dx1*dy2; t2=dy1*dx2;
+
+ if (t1>t2)
+ return(-1);
+ if (t1<t2)
+ return(1);
+
+
+ return(1);
+
+}
+
+
+int
+saa(saareg *saa, double lon, double lat)
+{
+int i;
+int dir=0;
+int oldDir=0;
+
+for (i=0; i<saa->n_points-1; i++) {
+ dir=getDir(lon,lat,(double)(saa->lon[i]),(double)(saa->lat[i]),(double)(saa->lon[i+1]),(double)(saa->lat[i+1]));
+ if (dir*oldDir<0)
+ return(0);
+ else
+ oldDir=dir;
+ }
+
+ return(1);
+}
diff --git a/src/libcf/set_orbit_parms.c b/src/libcf/set_orbit_parms.c
new file mode 100644
index 0000000..65baca6
--- /dev/null
+++ b/src/libcf/set_orbit_parms.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: SGP4 set_orbit_parms(fitsfile *infits)
+ *
+ * Description: Initialized the sgp4 structure and reads the orbital
+ * paramaters from the infits header and places the data
+ * in the sgp4 structure. It also calculates a number of
+ * time invariant quantities in the sgp4 structure.
+ *
+ * Arguments: fitsfile *infits Input FITS file.
+ *
+ * Return: SGP4 sgp4 Structure with orb parms.
+ *
+ * History: 07/07/99 emurphy Begin and finished work
+ * 07/14/99 emurphy Fixed minor bugs
+ * 07/21/99 peb Changed function to return SGP4
+ * pointer. (This fixes a bug.)
+ * 08/05/99 emurphy Converted to use set_orbit_parms_calc
+ * so that FES pipeline can use these
+ * routines.
+ * 12/18/03 bjg Change calfusettag.h to calfuse.h
+ * 04/07/07 1.4 wvd Delete CF_PRGM_ID and CF_VER_NUM,
+ * as they are not used.
+ *
+ ****************************************************************************/
+
+#include <stdio.h>
+#include "calfuse.h"
+#include "sgp4.h"
+
+SGP4 set_orbit_parms_calc(fitsfile *infits)
+{
+ int status=0;
+ char comment[FLEN_CARD];
+ double epchtime, td, tf, inclinat, eccentry, meananom, argperig, rascascn;
+ double n0dt, n0dt2, bstar, mean_motion;
+ SGP4 sgp4;
+
+ /* Get the orbital data from the header of the infits file. */
+ FITS_read_key(infits, TDOUBLE, "EPCHTIMD", &td, comment, &status);
+ FITS_read_key(infits, TDOUBLE, "EPCHTIMF", &tf, comment, &status);
+ epchtime=td+tf;
+ FITS_read_key(infits, TDOUBLE, "INCLINAT", &inclinat, comment, &status);
+ FITS_read_key(infits, TDOUBLE, "ECCENTRY", &eccentry, comment, &status);
+ FITS_read_key(infits, TDOUBLE, "MEANANOM", &meananom, comment, &status);
+ FITS_read_key(infits, TDOUBLE, "ARGPERIG", &argperig, comment, &status);
+ FITS_read_key(infits, TDOUBLE, "RASCASCN", &rascascn, comment, &status);
+ FITS_read_key(infits, TDOUBLE, "FDM2COEF", &n0dt, comment, &status);
+ FITS_read_key(infits, TDOUBLE, "SDM6COEF", &n0dt2, comment, &status);
+ FITS_read_key(infits, TDOUBLE, "DRAGCOEF", &bstar, comment, &status);
+ FITS_read_key(infits, TDOUBLE, "MEANMOTN", &mean_motion, comment, &status);
+
+ sgp4 = SGP4_create();
+
+ SGP4_set(sgp4, epchtime, n0dt, n0dt2, bstar, inclinat,
+ rascascn, eccentry, argperig, meananom, mean_motion);
+
+ /* do time invariant initializations */
+ SGP4_init(sgp4);
+ return sgp4;
+}
+
+SGP4 set_orbit_parms(fitsfile *infits)
+{
+ int status=0, hdunum=0, hdutype;
+ SGP4 sgp4;
+ /*
+ * The infits file pointer may be down in one of the extensions
+ * whereas the orbital info is in the primary hdu. Therefore,
+ * record the current position, move to the primary header,
+ * set the orbital data, and return to the previous hdu.
+ */
+ FITS_get_hdu_num(infits, &hdunum);
+ FITS_movabs_hdu(infits, 1, &hdutype, &status);
+
+ sgp4=set_orbit_parms_calc(infits);
+
+ FITS_movabs_hdu(infits, hdunum, &hdutype, &status);
+
+ return sgp4;
+
+}
diff --git a/src/libcf/sgp4.c b/src/libcf/sgp4.c
new file mode 100644
index 0000000..b14dc45
--- /dev/null
+++ b/src/libcf/sgp4.c
@@ -0,0 +1,426 @@
+/* H+
+ * Title : sgp4.c
+ * Author : Bryce A. Roberts
+ * Date : 23 February 1999
+ * Synopsis : implementation of SGP4 propagation routines
+ * SCCS : @(#)sgp4.c 1.6 05/14/00
+ * Revisions :
+ * mm/dd/yy name description
+ * 01/14/00 ma get rid of unused function get_time (May 14 2000)
+ * 12/18/03 bjg Change calfusettag.h to calfuse.h
+* H-
+ */
+
+#include <string.h>
+#include <time.h>
+#include "calfuse.h"
+#include "sgp4.h"
+
+/* define some absolute constants used by SGP4 */
+#define MIN_PER_DAY (1440.0)
+#define KM_PER_EARTH (6378.135)
+#define TWOBYTHREE (2.0/3.0)
+#define Q0 (120.0)
+#define S0 (78.0)
+#define THREEPIBYTWO (PIBY2*3.0)
+#define KE (0.074366916)
+#define AE (1.0)
+#define S (AE*(1.0+S0/KM_PER_EARTH))
+#define Q0MS4 pow((Q0-S0)*AE/KM_PER_EARTH, 4)
+#define CK2 (0.5*J2*AE*AE)
+#define CK4 (-0.375*J4*AE*AE*AE*AE)
+#define A30 (-J3/AE*AE*AE)
+
+#ifndef J2
+#define J2 (1.082616E-3)
+#endif
+
+#ifndef J3
+#define J3 (-0.253881E-5)
+#endif
+
+#ifndef J4
+#define J4 (-1.65597E-6)
+#endif
+
+#ifndef PI
+#define PI (3.141592653589793)
+#endif
+
+#ifndef TWOPI
+#define TWOPI (2.0*PI)
+#endif
+
+#define RAD2DEG(x) (((x)*180.0)/PI)
+#define DEG2RAD(x) ((PI/180.0)*(x))
+
+#ifndef false
+#define false (0)
+#endif
+
+#ifndef true
+#define true (1)
+#endif
+
+
+/*
+ * Name: SGP4_isLeap
+ * Purpose: determine if a given year is a leap year
+ * Input: int year (e.g. 1999)
+ * Output: returns 1 if leap year, 0 if not
+ */
+static int SGP4_isLeap(int year) {
+ return(((year%4==0 && year%100!=0) || year%400==0));
+ }
+
+
+/*
+ * Name: SGP4_doy2cal
+ * Purpose: convert year/day-of-year to Gregorian calendar month and day
+ * Input: int year, doy
+ * Output: int *month, int *day, returns 0 for fail, 1 for success
+ */
+static int SGP4_doy2cal(int year, int doy, int *month, int *day) {
+ /* number of days in leap and non-leap year months */
+ static int daytab[2][13]={{0,31,28,31,30,31,30,31,31,30,31,30,31},
+ {0,31,29,31,30,31,30,31,31,30,31,30,31}};
+ int leap;
+
+ /* do range checking */
+ if (doy<1 || doy>366)
+ return(false);
+
+ leap=SGP4_isLeap(year) ? 1 : 0;
+ *day=doy;
+ for (*month=1; *day>daytab[leap][*month]; (*month)++)
+ *day-=daytab[leap][*month];
+
+ return(true);
+ }
+
+
+/*
+ * Name: SGP4_create
+ * Purpose: creates an instance of SGP4
+ * Input: none
+ * Output: SGP4
+ */
+SGP4 SGP4_create(void) {
+ return((SGP4)calloc(1, sizeof(struct sgp4_st)));
+ }
+
+
+/*
+ * Name: SGP4_destroy
+ * Purpose: destroys an instance of SGP4
+ * Input: SGP4 sgp4
+ * Output: none
+ */
+void SGP4_destroy(SGP4 sgp4) {
+ if (sgp4)
+ free(sgp4);
+ }
+
+
+/*
+ * Name: SGP4_init
+ * Purpose: initializes time-invariant SGP4 variables
+ * Input: SGP4 sgp4
+ * Output: none
+ */
+void SGP4_init(SGP4 sgp4) {
+ double a1, del1, a0, del0, perigee, sStar, eta_2, eta_3, eta_4, pinvsq,
+ temp1, temp2, temp3, x3thetam1, x1m5th, xhdot1, theta_4, zeta, zeta_2,
+ zeta_3, zeta_5, beta0, beta0_3, beta0_4, C2;
+
+ /* recover original mean motion and semimajor axis from the elements */
+ a1=pow(KE/sgp4->n0, TWOBYTHREE);
+ del1=1.5 * (CK2/(a1*a1))*((3*cos(sgp4->i0)*cos(sgp4->i0)-1.0)/
+ pow(1-sgp4->e0*sgp4->e0, 1.5));
+ a0=a1*(1-del1/3.0-del1*del1-(134.0/81.0)*del1*del1*del1);
+ del0=(del1*a1*a1)/(a0*a0);
+
+ /* find original mean motion, n0dp (n0'') */
+ sgp4->n0dp=sgp4->n0/(1+del0);
+
+ /* find semimajor axis, a0dp (a0'') */
+ sgp4->a0dp=a0/(1-del0);
+
+ /* find the perigee (in km) */
+ perigee=(sgp4->a0dp*(1.0-sgp4->e0)-AE)*KM_PER_EARTH;
+
+ /* make decisions on what value of s to use based on perigee */
+ if (perigee<=156.0 && perigee>=98.0) {
+ sStar=sgp4->a0dp*(1.0-sgp4->e0)-S-AE;
+ sgp4->q0ms4=pow(pow(Q0MS4, 0.25) + S - sStar, 4);
+ }
+ else if (perigee<98.0) {
+ sStar=20/KM_PER_EARTH + AE;
+ sgp4->q0ms4=pow(pow(Q0MS4, 0.25) + S - sStar, 4);
+ }
+ else {
+ sStar=S;
+ sgp4->q0ms4=Q0MS4;
+ }
+
+ sgp4->theta=cos(sgp4->i0); sgp4->theta_2=sgp4->theta*sgp4->theta;
+ theta_4=sgp4->theta_2*sgp4->theta_2;
+ zeta=1/(sgp4->a0dp-sStar);
+
+ zeta_2=zeta*zeta, zeta_3=zeta_2*zeta;
+ sgp4->zeta_4=zeta_3*zeta;
+ zeta_5=sgp4->zeta_4*zeta;
+
+ sgp4->beta0_2=1-sgp4->e0*sgp4->e0;
+ beta0=sqrt(sgp4->beta0_2); beta0_3=sgp4->beta0_2*beta0;
+ beta0_4=beta0_3*beta0;
+
+ sgp4->eta=sgp4->a0dp*sgp4->e0*zeta;
+ eta_2=sgp4->eta*sgp4->eta, eta_3=eta_2*sgp4->eta, eta_4=eta_3*sgp4->eta;
+
+ C2=sgp4->q0ms4*(sgp4->zeta_4)*sgp4->n0dp*pow(1-eta_2, -7.0/2.0)*
+ (sgp4->a0dp*(1+ ((3.0/2.0)*eta_2) + 4*sgp4->e0*sgp4->eta +
+ sgp4->e0*eta_3) + (3.0/2.0)*(CK2*zeta/(1-eta_2))*(-0.5 +
+ 1.5*sgp4->theta_2)*(8.0+24*eta_2 + 3*eta_4));
+ sgp4->C1=sgp4->bstar*C2; sgp4->C1_2=sgp4->C1*sgp4->C1;
+ sgp4->C1_3=sgp4->C1_2*sgp4->C1; sgp4->C1_4=sgp4->C1_3*sgp4->C1;
+ sgp4->C3=(sgp4->q0ms4*(zeta_5)*A30*sgp4->n0dp*AE*sin(sgp4->i0))/
+ (CK2*sgp4->e0);
+ sgp4->C4=2*sgp4->n0dp*sgp4->q0ms4*(sgp4->zeta_4)*sgp4->a0dp*(sgp4->beta0_2)*
+ pow(1-eta_2, -7.0/2.0)*( (2*sgp4->eta*(1+sgp4->e0*sgp4->eta)+
+ 0.5*sgp4->e0+0.5*eta_3)-2*CK2*zeta/(sgp4->a0dp*(1-eta_2))*
+ (3*(1-3*sgp4->theta_2)*(1 + 1.5*eta_2 -2*sgp4->e0*sgp4->eta -
+ 0.5*sgp4->e0*eta_3) + 0.75*(1-sgp4->theta_2)*(2*eta_2 -
+ sgp4->e0*sgp4->eta - sgp4->e0*eta_3)*cos(2*sgp4->w0)));
+ sgp4->C5=2*sgp4->q0ms4*(sgp4->zeta_4)*sgp4->a0dp*(sgp4->beta0_2)*
+ pow(1-eta_2, -7.0/2.0)*(1 + (11.0/4.0)*sgp4->eta*(sgp4->eta+sgp4->e0)+
+ sgp4->e0*eta_3);
+
+ sgp4->D2=4*sgp4->a0dp*zeta*sgp4->C1_2;
+ sgp4->D3=(4.0/3.0)*sgp4->a0dp*zeta_2*(17*sgp4->a0dp +
+ sStar)*sgp4->C1_3;
+ sgp4->D4=TWOBYTHREE*sgp4->a0dp*zeta_3*(221*sgp4->a0dp+
+ 31*sStar)*sgp4->C1_4;
+
+ /* constants for secular effects calculation */
+ pinvsq=1.0/(sgp4->a0dp*sgp4->a0dp*beta0_4);
+ temp1=3.0*CK2*pinvsq*sgp4->n0dp;
+ temp2=temp1*CK2*pinvsq;
+ temp3=1.25*CK4*pinvsq*pinvsq*sgp4->n0dp;
+ x3thetam1=3.0*sgp4->theta_2 - 1.0;
+ x1m5th=1.0 - 5.0*sgp4->theta_2;
+ xhdot1=-temp1*sgp4->theta;
+
+ sgp4->mdot=sgp4->n0dp+0.5*temp1*beta0*x3thetam1+
+ 0.0625*temp2*beta0*(13.0 - 78.0*sgp4->theta_2+137.0*theta_4);
+
+ sgp4->wdot=-0.5*temp1*x1m5th+0.0625*temp2*(7.0-114.0*sgp4->theta_2+
+ 395.0*theta_4)+temp3*(3.0-36.0*sgp4->theta_2+49.0*theta_4);
+
+ sgp4->raandot=xhdot1+(0.5*temp2*(4.0-19.0*sgp4->theta_2)+2.0*temp3*
+ (3.0-7.0*sgp4->theta_2))*sgp4->theta;
+ }
+
+
+/*
+ * Name: SGP4_getStateVector
+ * Purpose: finds position, velocity at a time
+ * Input: SGP4 sgp4, double t
+ * Output: double pos[3], double vel[3]
+ */
+void SGP4_getStateVector(SGP4 sgp4, double t, double pos[3], double vel[3]) {
+ double mdf, wdf, raandf, del_w, del_m, mp, w, RAAN, e, a, IL,
+ beta_2, n, axn, ILl, aynl, ILt, ayn, U, initial, eCosE,
+ eSinE, eL_2, pL, r, rDot, rfDot, cosu, sinu, u, rk, uk, RAANk, ik,
+ rDotk, rfDotk, mx, my, ux, uy, uz, vx, vy, vz, tsince;
+ int i;
+
+ /* find the time since the epoch, in minutes */
+ tsince=(t-sgp4->epochTime)*1440;
+
+ /* secular effects of atmospheric drag and gravitation */
+ mdf=sgp4->M0+(sgp4->mdot*tsince);
+ wdf=sgp4->w0+(sgp4->wdot*tsince);
+ raandf=sgp4->raan+(sgp4->raandot*tsince);
+
+ del_w=sgp4->bstar*sgp4->C3*(cos(sgp4->w0))*tsince;
+ del_m=-TWOBYTHREE*sgp4->q0ms4*sgp4->bstar*sgp4->zeta_4*
+ (AE/(sgp4->e0*sgp4->eta))*(pow(1+sgp4->eta*cos(mdf), 3)-
+ pow(1+sgp4->eta*cos(sgp4->M0), 3));
+
+ mp=mdf+del_w+del_m;
+ w=wdf-del_w-del_m;
+
+ RAAN=raandf-(21.0/2.0)*((sgp4->n0dp*CK2*sgp4->theta)/(sgp4->a0dp*
+ sgp4->a0dp*sgp4->beta0_2))* sgp4->C1*tsince*tsince;
+ e=sgp4->e0-sgp4->bstar*sgp4->C4*tsince-sgp4->bstar*sgp4->C5*
+ (sin(mp)-sin(sgp4->M0));
+
+ a=sgp4->a0dp*pow((1+tsince*(-sgp4->C1+tsince*(-sgp4->D2+tsince*
+ (-sgp4->D3-sgp4->D4*tsince)))), 2);
+
+ IL=mp+w+RAAN+sgp4->n0dp*tsince*tsince*(1.5*sgp4->C1+tsince*
+ ((sgp4->D2+2*sgp4->C1_2) + tsince*(0.25*(3*sgp4->D3 +
+ 12*sgp4->C1*sgp4->D2 + 10*sgp4->C1_3)+tsince*(0.2*(3*sgp4->D4+12*
+ sgp4->C1*sgp4->D3+6*sgp4->D2*sgp4->D2+30*sgp4->C1_2*sgp4->D2+
+ 15*sgp4->C1_4)))));
+
+ beta_2=1-e*e;
+ n=KE/pow(a, 3.0/2.0);
+
+ /* find the long-period periodic terms */
+ axn=e*cos(w);
+ ILl=(A30*sin(sgp4->i0))/(8*CK2*a*beta_2)*(e*cos(w))*((3+5*sgp4->theta)/
+ (1+sgp4->theta));
+ aynl=(A30*sin(sgp4->i0))/(4*CK2*a*beta_2);
+ ILt=IL+ILl;
+ ayn=e*sin(w)+aynl;
+
+ /* iteratively solve Kepler's equation */
+ U=fmod(ILt-RAAN, TWOPI);
+
+ initial=U;
+ for (i=0; i<10; i++) {
+ U=(initial-ayn*cos(U)+axn*sin(U)-U)/(1.0-ayn*sin(U)-axn*cos(U))+U;
+ }
+
+ /* preliminary quantities for short period periodics */
+ eCosE=axn*cos(U)+ayn*sin(U);
+ eSinE=axn*sin(U)-ayn*cos(U);
+ eL_2=axn*axn+ayn*ayn;
+ pL=a*(1-eL_2);
+ r=a*(1-eCosE);
+ rDot=KE*(sqrt(a)/r)*eSinE;
+ rfDot=KE*sqrt(pL)/r;
+ cosu=(a/r)*(cos(U)-axn+(ayn*eSinE)/(1+sqrt(1-eL_2)));
+ sinu=(a/r)*(sin(U)-ayn-(axn*eSinE)/(1+sqrt(1-eL_2)));
+ u=fmod(atan2(sinu, cosu)+TWOPI, TWOPI);
+
+ /* update for short-period periodics */
+ rk=r*(1-1.5*CK2*sqrt(1-eL_2)/(pL*pL)*(3*sgp4->theta_2-1))+
+ (CK2/(2*pL))*(1-sgp4->theta_2)*cos(2*u);
+ uk=u+-(CK2/(4*pL*pL))*(7*sgp4->theta_2-1.0)*sin(2*u);;
+ RAANk=RAAN+((3*CK2*sgp4->theta)/(2*pL*pL))*sin(2*u);
+ ik=sgp4->i0+((3*CK2*sgp4->theta)/(2*pL*pL))*sin(sgp4->i0)*cos(2*u);
+ rDotk=rDot-((CK2*n)/pL)*(1-sgp4->theta_2)*sin(2*u);
+ rfDotk=rfDot+((CK2*n)/pL)*((1-sgp4->theta_2)*cos(2*u)-
+ 1.5*(1-3*sgp4->theta_2));
+
+ /* find the position and velocity components */
+ mx=-sin(RAANk)*cos(ik);
+ my=cos(RAANk)*cos(ik);
+
+ ux=mx*sin(uk)+cos(RAANk)*cos(uk);
+ uy=my*sin(uk)+sin(RAANk)*cos(uk);
+ uz=sin(ik)*sin(uk);
+
+ vx=mx*cos(uk)-cos(RAANk)*sin(uk);
+ vy=my*cos(uk)-sin(RAANk)*sin(uk);
+ vz=sin(ik)*cos(uk);
+
+ pos[0]=KM_PER_EARTH*rk*ux;
+ pos[1]=KM_PER_EARTH*rk*uy;
+ pos[2]=KM_PER_EARTH*rk*uz;
+
+ vel[0]=MIN_PER_DAY*KM_PER_EARTH*(rDotk*ux+rfDotk*vx)/(AE*86400.0);
+ vel[1]=MIN_PER_DAY*KM_PER_EARTH*(rDotk*uy+rfDotk*vy)/(AE*86400.0);
+ vel[2]=MIN_PER_DAY*KM_PER_EARTH*(rDotk*uz+rfDotk*vz)/(AE*86400.0);
+ }
+
+
+/*
+ * Name: SGP4_set
+ * Purpose: sets the elements of an instance of SGP4
+ * Input: SGP4 sgp4, double epochTime, double n0dt, double n0dt2,
+ * double bstar, double i0, double raan, double e0,
+ * double w0, double M0, double n0
+ * Output: none
+ */
+void SGP4_set(SGP4 sgp4, double epochTime, double n0dt, double n0dt2,
+ double bstar, double i0, double raan, double e0,
+ double w0, double M0, double n0) {
+
+ /* set the epoch time */
+ sgp4->epochTime=epochTime;
+
+ /* set the first time derivative of mean motion */
+ sgp4->n0dt=n0dt*(TWOPI/(MIN_PER_DAY*MIN_PER_DAY));
+
+ /* set the second time derivative of mean motion */
+ sgp4->n0dt2=n0dt2*(TWOPI/(MIN_PER_DAY*MIN_PER_DAY));
+
+ /* bstar drag term */
+ sgp4->bstar=bstar;
+
+ /* inclination */
+ sgp4->i0=DEG2RAD(i0);
+
+ /* right ascension of the ascending node */
+ sgp4->raan=DEG2RAD(raan);
+
+ /* eccentricity */
+ sgp4->e0=e0;
+
+ /* argument of perigee */
+ sgp4->w0=DEG2RAD(w0);
+
+ /* mean anomaly */
+ sgp4->M0=DEG2RAD(M0);
+
+ /* mean motion */
+ sgp4->n0=n0*(TWOPI/MIN_PER_DAY);
+ }
+
+
+/*
+ * Name: SGP4_getPole
+ * Purpose: finds the pole (orbit plane normal)
+ * Input: double pos[3], double vel[3]
+ * Output: double pole[3]
+ */
+void SGP4_getPole(double pos[3], double vel[3], double pole[3]) {
+ register double pNorm;
+
+ /* find the cross product between position and velocity */
+ pole[0]=pos[1]*vel[2] - vel[1]*pos[2];
+ pole[1]=pos[2]*vel[0] - vel[2]*pos[0];
+ pole[2]=pos[0]*vel[1] - vel[0]*pos[1];
+
+ /* normalize the resulting pole vector */
+ pNorm=sqrt(pole[0]*pole[0]+pole[1]*pole[1]+pole[2]*pole[2]);
+ pole[0]/=pNorm; pole[1]/=pNorm; pole[2]/=pNorm;
+ }
+
+
+/*
+ * Name: SGP4_precess
+ * Purpose: precesses a direction vector from t1 to t2
+ * Input: double v[3], double t1, double t2
+ * Output: double v[3]
+ */
+void SGP4_precess(double v[3], double t1, double t2) {
+ double t, st, a, b, c, temp[3], sina, sinb, sinc, cosa, cosb, cosc;
+
+ /* convert times to years */
+ t=0.001*(t2-t1)/365.25;
+ st=0.001*(t1-MJD2000)/365.25;
+
+ /* find the Euler angles */
+ a=DEG2RAD(t*(23062.181+st*(139.656+0.0139*st)+
+ +t*(30.188-0.344*st+17.998*t)))/3600.0;
+ b=DEG2RAD(t*t*(79.280+0.410*st+0.205*t)/3600.0)+a;
+ c=DEG2RAD(t*(20043.109-st*(85.33+0.217*st)+
+ +t*(-42.665-0.217*st-41.833*t)))/3600.0;
+
+ /* do the precession rotation */
+ sina=sin(a); sinb=sin(b); sinc=sin(c);
+ cosa=cos(a); cosb=cos(b); cosc=cos(c);
+ temp[0]=(cosa*cosb*cosc-sina*sinb)*v[0]+(-cosa*sinb-sina*cosb*cosc)*v[1]+
+ -cosb*sinc*v[2];
+ temp[1]=(sina*cosb+cosa*sinb*cosc)*v[0]+(cosa*cosb-sina*sinb*cosc)*v[1]+
+ -sinb*sinc*v[2];
+ temp[2]=cosa*sinc*v[0]-sina*sinc*v[1]+cosc*v[2];
+
+ /* replace existing direction vector */
+ v[0]=temp[0]; v[1]=temp[1]; v[2]=temp[2];
+ }
diff --git a/src/libcf/solar_ang.c b/src/libcf/solar_ang.c
new file mode 100644
index 0000000..421d460
--- /dev/null
+++ b/src/libcf/solar_ang.c
@@ -0,0 +1,90 @@
+/******************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ ******************************************************************************
+ *
+ * Synopsis: double solar_ang(double mjdate, double ra, double dec)
+ *
+ * Description: Computes the angle between the Sun and J2000.0 RA and DEC
+ * for a given date.
+ *
+ * Arguments: double mjdate Modified Julian date of observation
+ * double ra (deg) J2000.0 right ascension
+ * double dec (deg) J2000.0 declination
+ *
+ * Returns: double (deg) angle between Sun and RA,DEC
+ *
+ * Calls: slaDcc2s dcc2s.f
+ * slaDsep dsep.f
+ * slaDranrm dranrm.f
+ * slaEvp evp.f
+ *
+ * History: 03/10/98 E. Murphy Begin work.
+ * 03/10/98 E. Murphy Initial version working
+ * 05/31/00 peb Implemented cfortran.h calls for slalib
+ * functions.
+ * 12/18/03 bjg Change calfusettag.h to calfuse.h
+ * 07/21/04 1.4 wvd Comment out variable vect; unused.
+ *
+ * References: This routine makes use of the Starlink set of astronomical
+ * subroutines (SLALIB). More information can be found at
+ * http://star-www.rl.ac.uk.
+ *****************************************************************************/
+
+#include <stdio.h>
+#include <math.h>
+
+#ifdef CFORTRAN
+#include "cfortran.h"
+PROTOCCALLSFSUB3(SLA_DCC2S, sla_dcc2s, DOUBLEV, PDOUBLE, PDOUBLE)
+#define slaDcc2s(V, A, B) \
+ CCALLSFSUB3(SLA_DCC2S, sla_dcc2s, DOUBLEV, PDOUBLE, PDOUBLE, V, A, B)
+PROTOCCALLSFFUN1(DOUBLE, SLA_DRANRM, sla_dranrm, DOUBLE)
+#define slaDranrm(ANGLE) \
+ CCALLSFFUN1(SLA_DRANRM, sla_dranrm, DOUBLE, ANGLE)
+PROTOCCALLSFFUN4(DOUBLE, SLA_DSEP, sla_dsep, DOUBLE, DOUBLE, DOUBLE, DOUBLE)
+#define slaDsep(A1, B1, A2, B2) \
+ CCALLSFFUN4(SLA_DSEP, sla_dsep, DOUBLE, DOUBLE, DOUBLE, DOUBLE, \
+ A1, B1, A2, B2)
+PROTOCCALLSFSUB6(SLA_EVP, sla_evp, DOUBLE, DOUBLE, DOUBLEV, DOUBLEV, DOUBLEV, \
+ DOUBLEV)
+#define slaEvp(DATE, DEQX, DVB, DPB, DVH, DPH) \
+ CCALLSFSUB6(SLA_EVP, sla_evp, DOUBLE, DOUBLE, DOUBLEV, DOUBLEV, DOUBLEV, \
+ DOUBLEV, DATE, DEQX, DVB, DPB, DVH, DPH)
+#else
+#include "slalib.h"
+#include "slamac.h"
+#endif
+
+#include "calfuse.h"
+
+double solar_ang(double mjdate, double ra, double dec)
+{
+ /* Define variables. */
+ int i;
+ /* double dvb[3], dpb[3], dvh[3], dph[3], vect[3], ra_sun, dec_sun; */
+ double dvb[3], dpb[3], dvh[3], dph[3], ra_sun, dec_sun;
+ /*
+ * Evp returns four 3-vectors containing the barycentric velocity and
+ * position (dvb,dpv) and the heliocentric velocity and position
+ * (dvh,dph) of the Earth on the date mjdate. It requires a modified
+ * Julian date as input. Output has units of AU for positions and
+ * AU/s for velocities.
+ */
+ slaEvp(mjdate, 2000.0, dvb, dpb, dvh, dph);
+
+ /* Convert the 3-vector position of the Sun into a J2000.0 RA and DEC */
+
+ for (i=0; i<3; i++) dph[i]*=-1.0;
+
+#ifdef CFORTRAN
+ slaDcc2s(dph, ra_sun, dec_sun);
+#else
+ slaDcc2s(dph, &ra_sun, &dec_sun);
+#endif
+
+ /* Compute the angular separation of RA,DEC and RA_SUN and DEC_SUN */
+
+ return slaDsep(ra*RADIAN, dec*RADIAN, slaDranrm(ra_sun), dec_sun)/RADIAN;
+}
diff --git a/src/libcf/space_vel.c b/src/libcf/space_vel.c
new file mode 100644
index 0000000..e472961
--- /dev/null
+++ b/src/libcf/space_vel.c
@@ -0,0 +1,46 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: double space_vel(double *vel, double ra, double dec)
+ *
+ * Description: Computes the projection of the spacecraft orbital velocity
+ * vector onto a unit vector in the direction ra, dec.
+ *
+ * Arguments: double *vel (km/s) 3-vector velocity of satellite
+ * double ra,dec (deg) position of target
+ *
+ * Returns: double (km/s) velocity in direction of target
+ *
+ * History: 03/04/98 E. Murphy Begin work.
+ * 03/04/98 E. Murphy Initial version working
+ * 07/07/99 E. Murphy Converted x,y,z and vx,vy,vz to pos,vel
+ * 06/15/01 V. Dixon Comment out calculation of r, not used.
+ * 12/18/03 bjg Change calfusettag.h to calfuse.h
+ * 07/21/04 1.4 wvd Delete defn of r, as it is not used.
+ * 03/04/07 1.5 wvd Rewrite program to compute dot product
+ * of target and velocity vectors.
+ *
+ ****************************************************************************/
+
+#include <math.h>
+#include "calfuse.h"
+
+double space_vel(double vel[3], double ra, double dec)
+{
+
+ double x, y, z, phi;
+
+ ra *= RADIAN;
+ dec *= RADIAN;
+
+ z = sin(dec);
+ phi = cos(dec);
+ y = phi * sin(ra);
+ x = phi * cos(ra);
+
+ return x*vel[0] + y*vel[1] + z*vel[2];
+
+}
diff --git a/src/libcf/state_geod.c b/src/libcf/state_geod.c
new file mode 100644
index 0000000..4e0c161
--- /dev/null
+++ b/src/libcf/state_geod.c
@@ -0,0 +1,107 @@
+/******************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ ******************************************************************************
+ *
+ * Synopsis: void state_geod(double pos,
+ * double mjdate, double lon, double lat)
+ *
+ * Description: Computes the geocentric longitude and latitude of FUSE
+ * from the given state 6-vector.
+ *
+ * Arguments: double pos (km) 3-vector xyz position of satellite
+ * double mjdate Modified Julian date of observation
+ *
+ * Returns: double lon, lat (deg) Geocentric longitude and latitude
+ *
+ * Calls: slaPreces preces.f
+ *
+ * History: 03/04/98 E. Murphy Begin work.
+ * 03/04/98 E. Murphy Initial version working
+ * 03/15/99 E. murphy Changed function definition to void
+ * (was double)
+ * 07/07/99 E. Murphy Changed call to use pos instead of x,y,z
+ * 05/31/00 peb Implemented cfortran.h calls for slalib
+ * functions.
+ * 12/18/03 bjg Change calfusettag.h to calfuse.h
+ * 06/17/04 bjg 1.4 Corrected cfortran call to sla_preces
+ *
+ * Ake, T. 1998 in The Scientific Impact of the Goddard
+ * High Resolution Spectrograph, ed. J. C. Brandt et al.,
+ * ASP Conference Series, in preparation.
+ *****************************************************************************/
+
+#include <stdio.h>
+#include <math.h>
+
+#ifdef CFORTRAN
+#include "cfortran.h"
+PROTOCCALLSFSUB5(SLA_PRECES, sla_preces, STRING, DOUBLE, DOUBLE, PDOUBLE, \
+ PDOUBLE)
+#define slaPreces(SYSTEM, EP0, EP1, RA, DC) \
+ CCALLSFSUB5(SLA_PRECES, sla_preces, STRING, DOUBLE, DOUBLE, PDOUBLE, \
+ PDOUBLE, SYSTEM, EP0, EP1, RA, DC)
+#else
+#include "slalib.h"
+#include "slamac.h"
+#endif
+
+#include "calfuse.h"
+
+void state_geod(double pos[3], double mjdate,
+ double *lon, double *lat, double *gmst)
+{
+ double ra, dec, epoch2, c1, r, intmjd, frcmjd;
+ char fk5_st[10]="FK5";
+
+ /* pos[0]=x
+ pos[1]=y
+ pos[2]=z
+ */
+
+ r=sqrt(pos[0]*pos[0]+pos[1]*pos[1]+pos[2]*pos[2]);
+ ra=atan2(pos[1],pos[0]);
+ dec=asin(pos[2]/r);
+
+ /* We must precess the J2000 RA and DEC to date of observation. This
+ * is a very small correction, and could probably be ignored.
+ */
+
+ epoch2=2000.0-((51544.0-mjdate)/365.25);
+
+#ifdef CFORTRAN
+ slaPreces(fk5_st, 2000.0, epoch2, ra, dec);
+#else
+ slaPreces(fk5_st, 2000.0, epoch2, &ra, &dec);
+#endif
+
+ /* Calculate the Greenwich Mean Sidereal Time in seconds
+ * Astronomical Almanac, 1998, p. B6.
+ */
+
+ frcmjd=modf(mjdate, &intmjd);
+
+ c1=(intmjd-51544.5)/36525.0;
+
+ /* The following line gives the GMST at 0 hr UT */
+ *gmst=24110.54841 + 8640184.812866*c1+0.093104*c1*c1-6.2E-6*c1*c1*c1;
+ /* The following adds on the number of seconds since the UT above */
+ *gmst+=frcmjd*1.00273791*86400.0;
+
+ *gmst*=(2*M_PI)/86400.0;
+
+ while (*gmst < 0.0) *gmst+=2*M_PI;
+
+ while (*gmst > 2*M_PI) *gmst-=2*M_PI;
+
+ *lon=(ra-*gmst)/RADIAN;
+
+ while (*lon > 180.0) *lon-=360.0;
+
+ while (*lon < -180.0) *lon+=360.0;
+
+ *lat=dec/RADIAN;
+
+ *gmst*=24.0/(2*M_PI);
+}
diff --git a/src/libcf/state_limb.c b/src/libcf/state_limb.c
new file mode 100644
index 0000000..9aacfb6
--- /dev/null
+++ b/src/libcf/state_limb.c
@@ -0,0 +1,159 @@
+/*****************************************************************************
+ * Johns Hopkins University
+ * Center For Astrophysical Sciences
+ * FUSE
+ *****************************************************************************
+ *
+ * Synopsis: double state_limb(double pos[3], double mjdate,
+ * double ra, double dec, double *zdis,tint day_limb)
+ *
+ * Description: Computes the earth limb angle from J2000 RA and DEC given
+ * the 3-vector position of FUSE.
+ *
+ * Arguments: double pos (km) 3-vector position of satellite
+ * double mjdate (days) Modified Julian date
+ * double ra,dec (deg) J2000.0 RA and DEC
+ * double zdist (deg) zenith angle
+ * integer day_limb output : 1 if bright limb, 0 if dark limb
+ *
+ * Returns: double (deg) Earth limb angle
+ * integer day_limb will have the value 1 or 0 when
+ * returning in the main program.
+ *
+ * Calls: slaPreces preces.f
+ * slaDcc2s
+ * slaDranrm
+ * slaEvp
+ *
+ * History: 03/10/98 E. Murphy Begin work.
+ * 03/10/98 E. Murphy Initial version working
+ * 07/07/99 E. Murphy Changed call to use pos instead of x,y,z
+ * 08/26/99 E. Murphy Added zenith distance.
+ * 05/31/00 peb Implemented cfortran.h calls for slalib
+ * functions.
+ * Ake, T. 1998 in The Scientific Impact of the Goddard
+ * High Resolution Spectrograph, ed. J. C. Brandt et al.,
+ * ASP Conference Series, in preparation.
+ *
+ * 09/23/00 v1.5 ma Now this function determine bright or
+ * dark limb
+ * To do so, the procedure has a new
+ * input argument: day_limb.
+ * day_limb = 1 if bright, 0 if dark.
+ * 09/24/00 v1.6 ma Fixed a bug in the input argument
+ * 09/27/00 v1.7 ma Fixed bug in limbvec calc.
+ * 10/02/00 v1.8 jwk Add fortran wrappers for slaDcc2s,
+ * slaEvp, and slaDranrm
+ * 12/18/03 bjg 1.3 Change calfusettag.h to calfuse.h
+ * 06/17/04 bjg Corrected cfortran call to sla_preces
+ * 07/22/04 bjg 1.4 Remove unused variables
+ ****************************************************************************/
+
+#include <math.h>
+
+#ifdef CFORTRAN
+#include "cfortran.h"
+PROTOCCALLSFSUB5(SLA_PRECES, sla_preces, STRING, DOUBLE, DOUBLE, PDOUBLE, \
+ PDOUBLE)
+#define slaPreces(SYSTEM, EP0, EP1, RA, DC) \
+ CCALLSFSUB5(SLA_PRECES, sla_preces, STRING, DOUBLE, DOUBLE, PDOUBLE, \
+ PDOUBLE, SYSTEM, EP0, EP1, RA, DC)
+PROTOCCALLSFSUB3(SLA_DCC2S, sla_dcc2s, DOUBLEV, PDOUBLE, PDOUBLE)
+#define slaDcc2s(V, A, B) \
+ CCALLSFSUB3(SLA_DCC2S, sla_dcc2s, DOUBLEV, PDOUBLE, PDOUBLE, V, A, B)
+PROTOCCALLSFFUN1(DOUBLE, SLA_DRANRM, sla_dranrm, DOUBLE)
+#define slaDranrm(ANGLE) \
+ CCALLSFFUN1(SLA_DRANRM, sla_dranrm, DOUBLE, ANGLE)
+PROTOCCALLSFSUB6(SLA_EVP, sla_evp, DOUBLE, DOUBLE, DOUBLEV, DOUBLEV, DOUBLEV, \
+ DOUBLEV)
+#define slaEvp(DATE, DEQX, DVB, DPB, DVH, DPH) \
+ CCALLSFSUB6(SLA_EVP, sla_evp, DOUBLE, DOUBLE, DOUBLEV, DOUBLEV, DOUBLEV, \
+ DOUBLEV, DATE, DEQX, DVB, DPB, DVH, DPH)
+#else
+#include "slalib.h"
+#include "slamac.h"
+#endif
+
+#include "calfuse.h"
+
+double state_limb(double pos[3], double mjdate,
+ double ra, double dec, double *zdist,int *day_limb)
+{
+ double dvb[3], dpb[3], dvh[3], dph[3], limbvec[3], epoch2;
+ double ra_earth, dec_earth, r, ndist;
+ double ra_sun, dec_sun;
+ int i;
+ char fk5_st[10]="FK5";
+
+ ra*=RADIAN;
+ dec*=RADIAN;
+
+ r=sqrt(pos[0]*pos[0]+pos[1]*pos[1]+pos[2]*pos[2]);
+ ra_earth=atan2(-pos[1],-pos[0]);
+ dec_earth=asin(-pos[2]/r);
+ /*
+ * We must precess the J2000 RA and DEC to date of observation. This
+ * is a very small correction, and could probably be ignored.
+ */
+ epoch2=2000.0-((51544.0-mjdate)/365.25);
+
+#ifdef CFORTRAN
+ slaPreces(fk5_st, 2000.0, epoch2, ra_earth, dec_earth);
+#else
+ slaPreces(fk5_st, 2000.0, epoch2, &ra_earth, &dec_earth);
+#endif
+
+ /* Now we need the position of the sun (same code as in eclipse.c) */
+
+ slaEvp(mjdate, 2000.0, dvb, dpb, dvh, dph);
+
+ /* Convert the 3-vector position of the Sun into a J2000.0 RA and DEC */
+
+ for (i=0; i<3; i++) dph[i]*=-1.0;
+
+
+#ifdef CFORTRAN
+ slaDcc2s(dph, ra_sun, dec_sun);
+#else
+ slaDcc2s(dph, &ra_sun, &dec_sun);
+#endif
+
+ ra_sun=slaDranrm(ra_sun);
+
+ /* We must precess the J2000 RA and DEC to date of observation. This
+ * is a very small correction, and could probably be ignored.
+ */
+
+ epoch2=2000.0-((51544.0-mjdate)/365.25);
+
+#ifdef CFORTRAN
+ slaPreces(fk5_st, 2000.0, epoch2, ra_sun, dec_sun);
+#else
+ slaPreces(fk5_st, 2000.0, epoch2, &ra_sun, &dec_sun);
+#endif
+
+ /* ndist is the angular distance (RADIAN) from the nadir to the target */
+ ndist = (acos(sin(dec)*sin(dec_earth)+
+ cos(dec)*cos(dec_earth)*cos(ra-ra_earth)));
+
+ /* Now we want to calculate the limb vector (originating at the center
+ of Earth and crossing the target-FUSE line perpendicularily)*/
+
+ limbvec[2]=pos[2]+r*cos(ndist)*sin(dec);
+ limbvec[1]=pos[1]+r*cos(ndist)*cos(dec)*sin(ra);
+ limbvec[0]=pos[0]+r*cos(ndist)*cos(dec)*cos(ra);
+
+ /* Now we do the scalar product with the sun vector; then
+ if the result is <0 the limb is in the day zone (less
+ than 90 degrees between sun vector and limb vector)*/
+
+ if ((limbvec[0]*cos(dec_sun)*cos(ra_sun) +
+ limbvec[1]*cos(dec_sun)*sin(ra_sun)+limbvec[2]*sin(dec_sun)) >0) {
+ *day_limb=1;
+ } else {
+ *day_limb=0;
+ }
+ *zdist = 180.0 - ndist/RADIAN;
+
+ return ndist/RADIAN-(asin(RE/r)/RADIAN);
+}
diff --git a/src/slalib/Makefile.am b/src/slalib/Makefile.am
new file mode 100644
index 0000000..895eea9
--- /dev/null
+++ b/src/slalib/Makefile.am
@@ -0,0 +1,187 @@
+lib_LTLIBRARIES = libsla.la
+libsla_la_SOURCES = \
+ addet.f \
+ afin.f \
+ airmas.f \
+ altaz.f \
+ amp.f \
+ ampqk.f \
+ aop.f \
+ aoppa.f \
+ aoppat.f \
+ aopqk.f \
+ atmdsp.f \
+ atms.f \
+ atmt.f \
+ av2m.f \
+ bear.f \
+ caf2r.f \
+ caldj.f \
+ calyd.f \
+ cc2s.f \
+ cc62s.f \
+ cd2tf.f \
+ cldj.f \
+ clyd.f \
+ combn.f \
+ cr2af.f \
+ cr2tf.f \
+ cs2c.f \
+ cs2c6.f \
+ ctf2d.f \
+ ctf2r.f \
+ daf2r.f \
+ dafin.f \
+ dat.f \
+ dav2m.f \
+ dbear.f \
+ dbjin.f \
+ dc62s.f \
+ dcc2s.f \
+ dcmpf.f \
+ dcs2c.f \
+ dd2tf.f \
+ de2h.f \
+ deuler.f \
+ dfltin.f \
+ dh2e.f \
+ dimxv.f \
+ djcal.f \
+ djcl.f \
+ dm2av.f \
+ dmat.f \
+ dmoon.f \
+ dmxm.f \
+ dmxv.f \
+ dpav.f \
+ dr2af.f \
+ dr2tf.f \
+ drange.f \
+ dranrm.f \
+ ds2c6.f \
+ ds2tp.f \
+ dsep.f \
+ dt.f \
+ dtf2d.f \
+ dtf2r.f \
+ dtp2s.f \
+ dtp2v.f \
+ dtps2c.f \
+ dtpv2c.f \
+ dtt.f \
+ dv2tp.f \
+ dvdv.f \
+ dvn.f \
+ dvxv.f \
+ e2h.f \
+ earth.f \
+ ecleq.f \
+ ecmat.f \
+ ecor.f \
+ eg50.f \
+ el2ue.f \
+ epb.f \
+ epb2d.f \
+ epco.f \
+ epj.f \
+ epj2d.f \
+ eqecl.f \
+ eqeqx.f \
+ eqgal.f \
+ etrms.f \
+ euler.f \
+ evp.f \
+ fitxy.f \
+ fk425.f \
+ fk45z.f \
+ fk524.f \
+ fk52h.f \
+ fk54z.f \
+ fk5hz.f \
+ flotin.f \
+ galeq.f \
+ galsup.f \
+ ge50.f \
+ geoc.f \
+ gmst.f \
+ gmsta.f \
+ h2e.f \
+ h2fk5.f \
+ hfk5z.f \
+ idchf.f \
+ idchi.f \
+ imxv.f \
+ intin.f \
+ invf.f \
+ kbj.f \
+ m2av.f \
+ map.f \
+ mappa.f \
+ mapqk.f \
+ mapqkz.f \
+ moon.f \
+ mxm.f \
+ mxv.f \
+ nut.f \
+ nutc.f \
+ oap.f \
+ oapqk.f \
+ obs.f \
+ pa.f \
+ pav.f \
+ pcd.f \
+ pda2h.f \
+ pdq2h.f \
+ permut.f \
+ pertel.f \
+ pertue.f \
+ planel.f \
+ planet.f \
+ plante.f \
+ pm.f \
+ polmo.f \
+ prebn.f \
+ prec.f \
+ precl.f \
+ preces.f \
+ prenut.f \
+ pv2el.f \
+ pv2ue.f \
+ pvobs.f \
+ pxy.f \
+ range.f \
+ ranorm.f \
+ rcc.f \
+ rdplan.f \
+ refco.f \
+ refro.f \
+ refv.f \
+ refz.f \
+ rverot.f \
+ rvgalc.f \
+ rvlg.f \
+ rvlsrd.f \
+ rvlsrk.f \
+ s2tp.f \
+ sep.f \
+ smat.f \
+ subet.f \
+ supgal.f \
+ svd.f \
+ svdcov.f \
+ svdsol.f \
+ tp2s.f \
+ tp2v.f \
+ tps2c.f \
+ tpv2c.f \
+ ue2el.f \
+ ue2pv.f \
+ unpcd.f \
+ v2tp.f \
+ vdv.f \
+ vn.f \
+ vxv.f \
+ xy2xy.f \
+ zd.f
+
+AM_CFLAGS = -I../include -I./
diff --git a/src/slalib/Makefile.in b/src/slalib/Makefile.in
new file mode 100644
index 0000000..718fd59
--- /dev/null
+++ b/src/slalib/Makefile.in
@@ -0,0 +1,830 @@
+# Makefile.in generated by automake 1.15 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = src/slalib
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(libdir)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
+libsla_la_LIBADD =
+am_libsla_la_OBJECTS = addet.lo afin.lo airmas.lo altaz.lo amp.lo \
+ ampqk.lo aop.lo aoppa.lo aoppat.lo aopqk.lo atmdsp.lo atms.lo \
+ atmt.lo av2m.lo bear.lo caf2r.lo caldj.lo calyd.lo cc2s.lo \
+ cc62s.lo cd2tf.lo cldj.lo clyd.lo combn.lo cr2af.lo cr2tf.lo \
+ cs2c.lo cs2c6.lo ctf2d.lo ctf2r.lo daf2r.lo dafin.lo dat.lo \
+ dav2m.lo dbear.lo dbjin.lo dc62s.lo dcc2s.lo dcmpf.lo dcs2c.lo \
+ dd2tf.lo de2h.lo deuler.lo dfltin.lo dh2e.lo dimxv.lo djcal.lo \
+ djcl.lo dm2av.lo dmat.lo dmoon.lo dmxm.lo dmxv.lo dpav.lo \
+ dr2af.lo dr2tf.lo drange.lo dranrm.lo ds2c6.lo ds2tp.lo \
+ dsep.lo dt.lo dtf2d.lo dtf2r.lo dtp2s.lo dtp2v.lo dtps2c.lo \
+ dtpv2c.lo dtt.lo dv2tp.lo dvdv.lo dvn.lo dvxv.lo e2h.lo \
+ earth.lo ecleq.lo ecmat.lo ecor.lo eg50.lo el2ue.lo epb.lo \
+ epb2d.lo epco.lo epj.lo epj2d.lo eqecl.lo eqeqx.lo eqgal.lo \
+ etrms.lo euler.lo evp.lo fitxy.lo fk425.lo fk45z.lo fk524.lo \
+ fk52h.lo fk54z.lo fk5hz.lo flotin.lo galeq.lo galsup.lo \
+ ge50.lo geoc.lo gmst.lo gmsta.lo h2e.lo h2fk5.lo hfk5z.lo \
+ idchf.lo idchi.lo imxv.lo intin.lo invf.lo kbj.lo m2av.lo \
+ map.lo mappa.lo mapqk.lo mapqkz.lo moon.lo mxm.lo mxv.lo \
+ nut.lo nutc.lo oap.lo oapqk.lo obs.lo pa.lo pav.lo pcd.lo \
+ pda2h.lo pdq2h.lo permut.lo pertel.lo pertue.lo planel.lo \
+ planet.lo plante.lo pm.lo polmo.lo prebn.lo prec.lo precl.lo \
+ preces.lo prenut.lo pv2el.lo pv2ue.lo pvobs.lo pxy.lo range.lo \
+ ranorm.lo rcc.lo rdplan.lo refco.lo refro.lo refv.lo refz.lo \
+ rverot.lo rvgalc.lo rvlg.lo rvlsrd.lo rvlsrk.lo s2tp.lo sep.lo \
+ smat.lo subet.lo supgal.lo svd.lo svdcov.lo svdsol.lo tp2s.lo \
+ tp2v.lo tps2c.lo tpv2c.lo ue2el.lo ue2pv.lo unpcd.lo v2tp.lo \
+ vdv.lo vn.lo vxv.lo xy2xy.lo zd.lo
+libsla_la_OBJECTS = $(am_libsla_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+F77COMPILE = $(F77) $(AM_FFLAGS) $(FFLAGS)
+LTF77COMPILE = $(LIBTOOL) $(AM_V_lt) --tag=F77 $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS)
+AM_V_F77 = $(am__v_F77_@AM_V@)
+am__v_F77_ = $(am__v_F77_@AM_DEFAULT_V@)
+am__v_F77_0 = @echo " F77 " $@;
+am__v_F77_1 =
+F77LD = $(F77)
+F77LINK = $(LIBTOOL) $(AM_V_lt) --tag=F77 $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(F77LD) $(AM_FFLAGS) $(FFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_F77LD = $(am__v_F77LD_@AM_V@)
+am__v_F77LD_ = $(am__v_F77LD_@AM_DEFAULT_V@)
+am__v_F77LD_0 = @echo " F77LD " $@;
+am__v_F77LD_1 =
+SOURCES = $(libsla_la_SOURCES)
+DIST_SOURCES = $(libsla_la_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+lib_LTLIBRARIES = libsla.la
+libsla_la_SOURCES = \
+ addet.f \
+ afin.f \
+ airmas.f \
+ altaz.f \
+ amp.f \
+ ampqk.f \
+ aop.f \
+ aoppa.f \
+ aoppat.f \
+ aopqk.f \
+ atmdsp.f \
+ atms.f \
+ atmt.f \
+ av2m.f \
+ bear.f \
+ caf2r.f \
+ caldj.f \
+ calyd.f \
+ cc2s.f \
+ cc62s.f \
+ cd2tf.f \
+ cldj.f \
+ clyd.f \
+ combn.f \
+ cr2af.f \
+ cr2tf.f \
+ cs2c.f \
+ cs2c6.f \
+ ctf2d.f \
+ ctf2r.f \
+ daf2r.f \
+ dafin.f \
+ dat.f \
+ dav2m.f \
+ dbear.f \
+ dbjin.f \
+ dc62s.f \
+ dcc2s.f \
+ dcmpf.f \
+ dcs2c.f \
+ dd2tf.f \
+ de2h.f \
+ deuler.f \
+ dfltin.f \
+ dh2e.f \
+ dimxv.f \
+ djcal.f \
+ djcl.f \
+ dm2av.f \
+ dmat.f \
+ dmoon.f \
+ dmxm.f \
+ dmxv.f \
+ dpav.f \
+ dr2af.f \
+ dr2tf.f \
+ drange.f \
+ dranrm.f \
+ ds2c6.f \
+ ds2tp.f \
+ dsep.f \
+ dt.f \
+ dtf2d.f \
+ dtf2r.f \
+ dtp2s.f \
+ dtp2v.f \
+ dtps2c.f \
+ dtpv2c.f \
+ dtt.f \
+ dv2tp.f \
+ dvdv.f \
+ dvn.f \
+ dvxv.f \
+ e2h.f \
+ earth.f \
+ ecleq.f \
+ ecmat.f \
+ ecor.f \
+ eg50.f \
+ el2ue.f \
+ epb.f \
+ epb2d.f \
+ epco.f \
+ epj.f \
+ epj2d.f \
+ eqecl.f \
+ eqeqx.f \
+ eqgal.f \
+ etrms.f \
+ euler.f \
+ evp.f \
+ fitxy.f \
+ fk425.f \
+ fk45z.f \
+ fk524.f \
+ fk52h.f \
+ fk54z.f \
+ fk5hz.f \
+ flotin.f \
+ galeq.f \
+ galsup.f \
+ ge50.f \
+ geoc.f \
+ gmst.f \
+ gmsta.f \
+ h2e.f \
+ h2fk5.f \
+ hfk5z.f \
+ idchf.f \
+ idchi.f \
+ imxv.f \
+ intin.f \
+ invf.f \
+ kbj.f \
+ m2av.f \
+ map.f \
+ mappa.f \
+ mapqk.f \
+ mapqkz.f \
+ moon.f \
+ mxm.f \
+ mxv.f \
+ nut.f \
+ nutc.f \
+ oap.f \
+ oapqk.f \
+ obs.f \
+ pa.f \
+ pav.f \
+ pcd.f \
+ pda2h.f \
+ pdq2h.f \
+ permut.f \
+ pertel.f \
+ pertue.f \
+ planel.f \
+ planet.f \
+ plante.f \
+ pm.f \
+ polmo.f \
+ prebn.f \
+ prec.f \
+ precl.f \
+ preces.f \
+ prenut.f \
+ pv2el.f \
+ pv2ue.f \
+ pvobs.f \
+ pxy.f \
+ range.f \
+ ranorm.f \
+ rcc.f \
+ rdplan.f \
+ refco.f \
+ refro.f \
+ refv.f \
+ refz.f \
+ rverot.f \
+ rvgalc.f \
+ rvlg.f \
+ rvlsrd.f \
+ rvlsrk.f \
+ s2tp.f \
+ sep.f \
+ smat.f \
+ subet.f \
+ supgal.f \
+ svd.f \
+ svdcov.f \
+ svdsol.f \
+ tp2s.f \
+ tp2v.f \
+ tps2c.f \
+ tpv2c.f \
+ ue2el.f \
+ ue2pv.f \
+ unpcd.f \
+ v2tp.f \
+ vdv.f \
+ vn.f \
+ vxv.f \
+ xy2xy.f \
+ zd.f
+
+AM_CFLAGS = -I../include -I./
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .f .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/slalib/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign src/slalib/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+ }
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
+ done
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ @list='$(lib_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
+
+libsla.la: $(libsla_la_OBJECTS) $(libsla_la_DEPENDENCIES) $(EXTRA_libsla_la_DEPENDENCIES)
+ $(AM_V_F77LD)$(F77LINK) -rpath $(libdir) $(libsla_la_OBJECTS) $(libsla_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+.f.o:
+ $(AM_V_F77)$(F77COMPILE) -c -o $@ $<
+
+.f.obj:
+ $(AM_V_F77)$(F77COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.f.lo:
+ $(AM_V_F77)$(LTF77COMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+installdirs:
+ for dir in "$(DESTDIR)$(libdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libLTLIBRARIES
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+ clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \
+ ctags-am distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-libLTLIBRARIES install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES
+
+.PRECIOUS: Makefile
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/slalib/addet.f b/src/slalib/addet.f
new file mode 100644
index 0000000..c039aff
--- /dev/null
+++ b/src/slalib/addet.f
@@ -0,0 +1,67 @@
+ SUBROUTINE sla_ADDET (RM, DM, EQ, RC, DC)
+*+
+* - - - - - -
+* A D D E T
+* - - - - - -
+*
+* Add the E-terms (elliptic component of annual aberration)
+* to a pre IAU 1976 mean place to conform to the old
+* catalogue convention (double precision)
+*
+* Given:
+* RM,DM dp RA,Dec (radians) without E-terms
+* EQ dp Besselian epoch of mean equator and equinox
+*
+* Returned:
+* RC,DC dp RA,Dec (radians) with E-terms included
+*
+* Note:
+*
+* Most star positions from pre-1984 optical catalogues (or
+* derived from astrometry using such stars) embody the
+* E-terms. If it is necessary to convert a formal mean
+* place (for example a pulsar timing position) to one
+* consistent with such a star catalogue, then the RA,Dec
+* should be adjusted using this routine.
+*
+* Reference:
+* Explanatory Supplement to the Astronomical Ephemeris,
+* section 2D, page 48.
+*
+* Called: sla_ETRMS, sla_DCS2C, sla_DCC2S, sla_DRANRM, sla_DRANGE
+*
+* P.T.Wallace Starlink 18 March 1999
+*
+* Copyright (C) 1999 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION RM,DM,EQ,RC,DC
+
+ DOUBLE PRECISION sla_DRANRM
+
+ DOUBLE PRECISION A(3),V(3)
+
+ INTEGER I
+
+
+
+* E-terms vector
+ CALL sla_ETRMS(EQ,A)
+
+* Spherical to Cartesian
+ CALL sla_DCS2C(RM,DM,V)
+
+* Include the E-terms
+ DO I=1,3
+ V(I)=V(I)+A(I)
+ END DO
+
+* Cartesian to spherical
+ CALL sla_DCC2S(V,RC,DC)
+
+* Bring RA into conventional range
+ RC=sla_DRANRM(RC)
+
+ END
diff --git a/src/slalib/afin.f b/src/slalib/afin.f
new file mode 100644
index 0000000..2308c74
--- /dev/null
+++ b/src/slalib/afin.f
@@ -0,0 +1,102 @@
+ SUBROUTINE sla_AFIN (STRING, IPTR, A, J)
+*+
+* - - - - -
+* A F I N
+* - - - - -
+*
+* Sexagesimal character string to angle (single precision)
+*
+* Given:
+* STRING c*(*) string containing deg, arcmin, arcsec fields
+* IPTR i pointer to start of decode (1st = 1)
+*
+* Returned:
+* IPTR i advanced past the decoded angle
+* A r angle in radians
+* J i status: 0 = OK
+* +1 = default, A unchanged
+* -1 = bad degrees )
+* -2 = bad arcminutes ) (note 3)
+* -3 = bad arcseconds )
+*
+* Example:
+*
+* argument before after
+*
+* STRING '-57 17 44.806 12 34 56.7' unchanged
+* IPTR 1 16 (points to 12...)
+* A ? -1.00000
+* J ? 0
+*
+* A further call to sla_AFIN, without adjustment of IPTR, will
+* decode the second angle, 12deg 34min 56.7sec.
+*
+* Notes:
+*
+* 1) The first three "fields" in STRING are degrees, arcminutes,
+* arcseconds, separated by spaces or commas. The degrees field
+* may be signed, but not the others. The decoding is carried
+* out by the DFLTIN routine and is free-format.
+*
+* 2) Successive fields may be absent, defaulting to zero. For
+* zero status, the only combinations allowed are degrees alone,
+* degrees and arcminutes, and all three fields present. If all
+* three fields are omitted, a status of +1 is returned and A is
+* unchanged. In all other cases A is changed.
+*
+* 3) Range checking:
+*
+* The degrees field is not range checked. However, it is
+* expected to be integral unless the other two fields are
+* absent.
+*
+* The arcminutes field is expected to be 0-59, and integral if
+* the arcseconds field is present. If the arcseconds field
+* is absent, the arcminutes is expected to be 0-59.9999...
+*
+* The arcseconds field is expected to be 0-59.9999...
+*
+* 4) Decoding continues even when a check has failed. Under these
+* circumstances the field takes the supplied value, defaulting
+* to zero, and the result A is computed and returned.
+*
+* 5) Further fields after the three expected ones are not treated
+* as an error. The pointer IPTR is left in the correct state
+* for further decoding with the present routine or with DFLTIN
+* etc. See the example, above.
+*
+* 6) If STRING contains hours, minutes, seconds instead of degrees
+* etc, or if the required units are turns (or days) instead of
+* radians, the result A should be multiplied as follows:
+*
+* for to obtain multiply
+* STRING A in A by
+*
+* d ' " radians 1 = 1.0
+* d ' " turns 1/2pi = 0.1591549430918953358
+* h m s radians 15 = 15.0
+* h m s days 15/2pi = 2.3873241463784300365
+*
+* Called: sla_DAFIN
+*
+* P.T.Wallace Starlink 13 September 1990
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ CHARACTER*(*) STRING
+ INTEGER IPTR
+ REAL A
+ INTEGER J
+
+ DOUBLE PRECISION AD
+
+
+
+* Call the double precision version
+ CALL sla_DAFIN(STRING,IPTR,AD,J)
+ IF (J.LE.0) A=REAL(AD)
+
+ END
diff --git a/src/slalib/airmas.f b/src/slalib/airmas.f
new file mode 100644
index 0000000..12431c8
--- /dev/null
+++ b/src/slalib/airmas.f
@@ -0,0 +1,58 @@
+ DOUBLE PRECISION FUNCTION sla_AIRMAS (ZD)
+*+
+* - - - - - - -
+* A I R M A S
+* - - - - - - -
+*
+* Air mass at given zenith distance (double precision)
+*
+* Given:
+* ZD d Observed zenith distance (radians)
+*
+* The result is an estimate of the air mass, in units of that
+* at the zenith.
+*
+* Notes:
+*
+* 1) The "observed" zenith distance referred to above means "as
+* affected by refraction".
+*
+* 2) Uses Hardie's (1962) polynomial fit to Bemporad's data for
+* the relative air mass, X, in units of thickness at the zenith
+* as tabulated by Schoenberg (1929). This is adequate for all
+* normal needs as it is accurate to better than 0.1% up to X =
+* 6.8 and better than 1% up to X = 10. Bemporad's tabulated
+* values are unlikely to be trustworthy to such accuracy
+* because of variations in density, pressure and other
+* conditions in the atmosphere from those assumed in his work.
+*
+* 3) The sign of the ZD is ignored.
+*
+* 4) At zenith distances greater than about ZD = 87 degrees the
+* air mass is held constant to avoid arithmetic overflows.
+*
+* References:
+* Hardie, R.H., 1962, in "Astronomical Techniques"
+* ed. W.A. Hiltner, University of Chicago Press, p180.
+* Schoenberg, E., 1929, Hdb. d. Ap.,
+* Berlin, Julius Springer, 2, 268.
+*
+* Original code by P.W.Hill, St Andrews
+*
+* P.T.Wallace Starlink 18 March 1999
+*
+* Copyright (C) 1999 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION ZD
+
+ DOUBLE PRECISION SECZM1
+
+
+ SECZM1 = 1D0/(COS(MIN(1.52D0,ABS(ZD))))-1D0
+ sla_AIRMAS = 1D0 + SECZM1*(0.9981833D0
+ : - SECZM1*(0.002875D0 + 0.0008083D0*SECZM1))
+
+ END
diff --git a/src/slalib/altaz.f b/src/slalib/altaz.f
new file mode 100644
index 0000000..3a7124b
--- /dev/null
+++ b/src/slalib/altaz.f
@@ -0,0 +1,145 @@
+ SUBROUTINE sla_ALTAZ (HA, DEC, PHI,
+ : AZ, AZD, AZDD, EL, ELD, ELDD, PA, PAD, PADD)
+*+
+* - - - - - -
+* A L T A Z
+* - - - - - -
+*
+* Positions, velocities and accelerations for an altazimuth
+* telescope mount.
+*
+* (double precision)
+*
+* Given:
+* HA d hour angle
+* DEC d declination
+* PHI d observatory latitude
+*
+* Returned:
+* AZ d azimuth
+* AZD d " velocity
+* AZDD d " acceleration
+* EL d elevation
+* ELD d " velocity
+* ELDD d " acceleration
+* PA d parallactic angle
+* PAD d " " velocity
+* PADD d " " acceleration
+*
+* Notes:
+*
+* 1) Natural units are used throughout. HA, DEC, PHI, AZ, EL
+* and ZD are in radians. The velocities and accelerations
+* assume constant declination and constant rate of change of
+* hour angle (as for tracking a star); the units of AZD, ELD
+* and PAD are radians per radian of HA, while the units of AZDD,
+* ELDD and PADD are radians per radian of HA squared. To
+* convert into practical degree- and second-based units:
+*
+* angles * 360/2pi -> degrees
+* velocities * (2pi/86400)*(360/2pi) -> degree/sec
+* accelerations * ((2pi/86400)**2)*(360/2pi) -> degree/sec/sec
+*
+* Note that the seconds here are sidereal rather than SI. One
+* sidereal second is about 0.99727 SI seconds.
+*
+* The velocity and acceleration factors assume the sidereal
+* tracking case. Their respective numerical values are (exactly)
+* 1/240 and (approximately) 1/3300236.9.
+*
+* 2) Azimuth is returned in the range 0-2pi; north is zero,
+* and east is +pi/2. Elevation and parallactic angle are
+* returned in the range +/-pi/2. Position angle is +ve
+* for a star west of the meridian and is the angle NP-star-zenith.
+*
+* 3) The latitude is geodetic as opposed to geocentric. The
+* hour angle and declination are topocentric. Refraction and
+* deficiencies in the telescope mounting are ignored. The
+* purpose of the routine is to give the general form of the
+* quantities. The details of a real telescope could profoundly
+* change the results, especially close to the zenith.
+*
+* 4) No range checking of arguments is carried out.
+*
+* 5) In applications which involve many such calculations, rather
+* than calling the present routine it will be more efficient to
+* use inline code, having previously computed fixed terms such
+* as sine and cosine of latitude, and (for tracking a star)
+* sine and cosine of declination.
+*
+* P.T.Wallace Starlink 14 March 1997
+*
+* Copyright (C) 1997 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION HA,DEC,PHI,AZ,AZD,AZDD,EL,ELD,ELDD,PA,PAD,PADD
+
+ DOUBLE PRECISION DPI,D2PI,TINY
+ PARAMETER (DPI=3.1415926535897932384626433832795D0,
+ : D2PI=6.283185307179586476925286766559D0,
+ : TINY=1D-30)
+
+ DOUBLE PRECISION SH,CH,SD,CD,SP,CP,CHCD,SDCP,X,Y,Z,RSQ,R,A,E,C,S,
+ : Q,QD,AD,ED,EDR,ADD,EDD,QDD
+
+
+* Useful functions
+ SH=SIN(HA)
+ CH=COS(HA)
+ SD=SIN(DEC)
+ CD=COS(DEC)
+ SP=SIN(PHI)
+ CP=COS(PHI)
+ CHCD=CH*CD
+ SDCP=SD*CP
+ X=-CHCD*SP+SDCP
+ Y=-SH*CD
+ Z=CHCD*CP+SD*SP
+ RSQ=X*X+Y*Y
+ R=SQRT(RSQ)
+
+* Azimuth and elevation
+ IF (RSQ.EQ.0D0) THEN
+ A=0D0
+ ELSE
+ A=ATAN2(Y,X)
+ END IF
+ IF (A.LT.0D0) A=A+D2PI
+ E=ATAN2(Z,R)
+
+* Parallactic angle
+ C=CD*SP-CH*SDCP
+ S=SH*CP
+ IF (C*C+S*S.GT.0) THEN
+ Q=ATAN2(S,C)
+ ELSE
+ Q=DPI-HA
+ END IF
+
+* Velocities and accelerations (clamped at zenith/nadir)
+ IF (RSQ.LT.TINY) THEN
+ RSQ=TINY
+ R=SQRT(RSQ)
+ END IF
+ QD=-X*CP/RSQ
+ AD=SP+Z*QD
+ ED=CP*Y/R
+ EDR=ED/R
+ ADD=EDR*(Z*SP+(2D0-RSQ)*QD)
+ EDD=-R*QD*AD
+ QDD=EDR*(SP+2D0*Z*QD)
+
+* Results
+ AZ=A
+ AZD=AD
+ AZDD=ADD
+ EL=E
+ ELD=ED
+ ELDD=EDD
+ PA=Q
+ PAD=QD
+ PADD=QDD
+
+ END
diff --git a/src/slalib/amp.f b/src/slalib/amp.f
new file mode 100644
index 0000000..6feb570
--- /dev/null
+++ b/src/slalib/amp.f
@@ -0,0 +1,68 @@
+ SUBROUTINE sla_AMP (RA, DA, DATE, EQ, RM, DM)
+*+
+* - - - -
+* A M P
+* - - - -
+*
+* Convert star RA,Dec from geocentric apparent to mean place
+*
+* The mean coordinate system is the post IAU 1976 system,
+* loosely called FK5.
+*
+* Given:
+* RA d apparent RA (radians)
+* DA d apparent Dec (radians)
+* DATE d TDB for apparent place (JD-2400000.5)
+* EQ d equinox: Julian epoch of mean place
+*
+* Returned:
+* RM d mean RA (radians)
+* DM d mean Dec (radians)
+*
+* References:
+* 1984 Astronomical Almanac, pp B39-B41.
+* (also Lederle & Schwan, Astron. Astrophys. 134,
+* 1-6, 1984)
+*
+* Notes:
+*
+* 1) The distinction between the required TDB and TT is
+* always negligible. Moreover, for all but the most
+* critical applications UTC is adequate.
+*
+* 2) The accuracy is limited by the routine sla_EVP, called
+* by sla_MAPPA, which computes the Earth position and
+* velocity using the methods of Stumpff. The maximum
+* error is about 0.3 milliarcsecond.
+*
+* 3) Iterative techniques are used for the aberration and
+* light deflection corrections so that the routines
+* sla_AMP (or sla_AMPQK) and sla_MAP (or sla_MAPQK) are
+* accurate inverses; even at the edge of the Sun's disc
+* the discrepancy is only about 1 nanoarcsecond.
+*
+* 4) Where multiple apparent places are to be converted to
+* mean places, for a fixed date and equinox, it is more
+* efficient to use the sla_MAPPA routine to compute the
+* required parameters once, followed by one call to
+* sla_AMPQK per star.
+*
+* Called: sla_MAPPA, sla_AMPQK
+*
+* P.T.Wallace Starlink 19 January 1993
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION RA,DA,DATE,EQ,RM,DM
+
+ DOUBLE PRECISION AMPRMS(21)
+
+
+
+ CALL sla_MAPPA(EQ,DATE,AMPRMS)
+ CALL sla_AMPQK(RA,DA,AMPRMS,RM,DM)
+
+ END
diff --git a/src/slalib/ampqk.f b/src/slalib/ampqk.f
new file mode 100644
index 0000000..6b94db1
--- /dev/null
+++ b/src/slalib/ampqk.f
@@ -0,0 +1,127 @@
+ SUBROUTINE sla_AMPQK (RA, DA, AMPRMS, RM, DM)
+*+
+* - - - - - -
+* A M P Q K
+* - - - - - -
+*
+* Convert star RA,Dec from geocentric apparent to mean place
+*
+* The mean coordinate system is the post IAU 1976 system,
+* loosely called FK5.
+*
+* Use of this routine is appropriate when efficiency is important
+* and where many star positions are all to be transformed for
+* one epoch and equinox. The star-independent parameters can be
+* obtained by calling the sla_MAPPA routine.
+*
+* Given:
+* RA d apparent RA (radians)
+* DA d apparent Dec (radians)
+*
+* AMPRMS d(21) star-independent mean-to-apparent parameters:
+*
+* (1) time interval for proper motion (Julian years)
+* (2-4) barycentric position of the Earth (AU)
+* (5-7) heliocentric direction of the Earth (unit vector)
+* (8) (grav rad Sun)*2/(Sun-Earth distance)
+* (9-11) ABV: barycentric Earth velocity in units of c
+* (12) sqrt(1-v**2) where v=modulus(ABV)
+* (13-21) precession/nutation (3,3) matrix
+*
+* Returned:
+* RM d mean RA (radians)
+* DM d mean Dec (radians)
+*
+* References:
+* 1984 Astronomical Almanac, pp B39-B41.
+* (also Lederle & Schwan, Astron. Astrophys. 134,
+* 1-6, 1984)
+*
+* Notes:
+*
+* 1) The accuracy is limited by the routine sla_EVP, called
+* by sla_MAPPA, which computes the Earth position and
+* velocity using the methods of Stumpff. The maximum
+* error is about 0.3 milliarcsecond.
+*
+* 2) Iterative techniques are used for the aberration and
+* light deflection corrections so that the routines
+* sla_AMP (or sla_AMPQK) and sla_MAP (or sla_MAPQK) are
+* accurate inverses; even at the edge of the Sun's disc
+* the discrepancy is only about 1 nanoarcsecond.
+*
+* Called: sla_DCS2C, sla_DIMXV, sla_DVDV, sla_DVN, sla_DCC2S,
+* sla_DRANRM
+*
+* P.T.Wallace Starlink 21 June 1993
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION RA,DA,AMPRMS(21),RM,DM
+
+ INTEGER I,J
+
+ DOUBLE PRECISION GR2E,AB1,EHN(3),ABV(3),P3(3),P2(3),
+ : AB1P1,P1DV,P1DVP1,P1(3),W,PDE,PDEP1,P(3)
+
+ DOUBLE PRECISION sla_DVDV,sla_DRANRM
+
+
+
+* Unpack scalar and vector parameters
+ GR2E = AMPRMS(8)
+ AB1 = AMPRMS(12)
+ DO I=1,3
+ EHN(I) = AMPRMS(I+4)
+ ABV(I) = AMPRMS(I+8)
+ END DO
+
+* Apparent RA,Dec to Cartesian
+ CALL sla_DCS2C(RA,DA,P3)
+
+* Precession and nutation
+ CALL sla_DIMXV(AMPRMS(13),P3,P2)
+
+* Aberration
+ AB1P1 = AB1+1D0
+ DO I=1,3
+ P1(I) = P2(I)
+ END DO
+ DO J=1,2
+ P1DV = sla_DVDV(P1,ABV)
+ P1DVP1 = 1D0+P1DV
+ W = 1D0+P1DV/AB1P1
+ DO I=1,3
+ P1(I) = (P1DVP1*P2(I)-W*ABV(I))/AB1
+ END DO
+ CALL sla_DVN(P1,P3,W)
+ DO I=1,3
+ P1(I) = P3(I)
+ END DO
+ END DO
+
+* Light deflection
+ DO I=1,3
+ P(I) = P1(I)
+ END DO
+ DO J=1,5
+ PDE = sla_DVDV(P,EHN)
+ PDEP1 = 1D0+PDE
+ W = PDEP1-GR2E*PDE
+ DO I=1,3
+ P(I) = (PDEP1*P1(I)-GR2E*EHN(I))/W
+ END DO
+ CALL sla_DVN(P,P2,W)
+ DO I=1,3
+ P(I) = P2(I)
+ END DO
+ END DO
+
+* Mean RA,Dec
+ CALL sla_DCC2S(P,RM,DM)
+ RM = sla_DRANRM(RM)
+
+ END
diff --git a/src/slalib/aop.f b/src/slalib/aop.f
new file mode 100644
index 0000000..66ef9c4
--- /dev/null
+++ b/src/slalib/aop.f
@@ -0,0 +1,174 @@
+ SUBROUTINE sla_AOP (RAP, DAP, DATE, DUT, ELONGM, PHIM, HM,
+ : XP, YP, TDK, PMB, RH, WL, TLR,
+ : AOB, ZOB, HOB, DOB, ROB)
+*+
+* - - - -
+* A O P
+* - - - -
+*
+* Apparent to observed place, for optical sources distant from
+* the solar system.
+*
+* Given:
+* RAP d geocentric apparent right ascension
+* DAP d geocentric apparent declination
+* DATE d UTC date/time (Modified Julian Date, JD-2400000.5)
+* DUT d delta UT: UT1-UTC (UTC seconds)
+* ELONGM d mean longitude of the observer (radians, east +ve)
+* PHIM d mean geodetic latitude of the observer (radians)
+* HM d observer's height above sea level (metres)
+* XP d polar motion x-coordinate (radians)
+* YP d polar motion y-coordinate (radians)
+* TDK d local ambient temperature (DegK; std=273.155D0)
+* PMB d local atmospheric pressure (mB; std=1013.25D0)
+* RH d local relative humidity (in the range 0D0-1D0)
+* WL d effective wavelength (micron, e.g. 0.55D0)
+* TLR d tropospheric lapse rate (DegK/metre, e.g. 0.0065D0)
+*
+* Returned:
+* AOB d observed azimuth (radians: N=0,E=90)
+* ZOB d observed zenith distance (radians)
+* HOB d observed Hour Angle (radians)
+* DOB d observed Declination (radians)
+* ROB d observed Right Ascension (radians)
+*
+* Notes:
+*
+* 1) This routine returns zenith distance rather than elevation
+* in order to reflect the fact that no allowance is made for
+* depression of the horizon.
+*
+* 2) The accuracy of the result is limited by the corrections for
+* refraction. Providing the meteorological parameters are
+* known accurately and there are no gross local effects, the
+* predicted apparent RA,Dec should be within about 0.1 arcsec
+* for a zenith distance of less than 70 degrees. Even at a
+* topocentric zenith distance of 90 degrees, the accuracy in
+* elevation should be better than 1 arcmin; useful results
+* are available for a further 3 degrees, beyond which the
+* sla_REFRO routine returns a fixed value of the refraction.
+* The complementary routines sla_AOP (or sla_AOPQK) and sla_OAP
+* (or sla_OAPQK) are self-consistent to better than 1 micro-
+* arcsecond all over the celestial sphere.
+*
+* 3) It is advisable to take great care with units, as even
+* unlikely values of the input parameters are accepted and
+* processed in accordance with the models used.
+*
+* 4) "Apparent" place means the geocentric apparent right ascension
+* and declination, which is obtained from a catalogue mean place
+* by allowing for space motion, parallax, precession, nutation,
+* annual aberration, and the Sun's gravitational lens effect. For
+* star positions in the FK5 system (i.e. J2000), these effects can
+* be applied by means of the sla_MAP etc routines. Starting from
+* other mean place systems, additional transformations will be
+* needed; for example, FK4 (i.e. B1950) mean places would first
+* have to be converted to FK5, which can be done with the
+* sla_FK425 etc routines.
+*
+* 5) "Observed" Az,El means the position that would be seen by a
+* perfect theodolite located at the observer. This is obtained
+* from the geocentric apparent RA,Dec by allowing for Earth
+* orientation and diurnal aberration, rotating from equator
+* to horizon coordinates, and then adjusting for refraction.
+* The HA,Dec is obtained by rotating back into equatorial
+* coordinates, using the geodetic latitude corrected for polar
+* motion, and is the position that would be seen by a perfect
+* equatorial located at the observer and with its polar axis
+* aligned to the Earth's axis of rotation (n.b. not to the
+* refracted pole). Finally, the RA is obtained by subtracting
+* the HA from the local apparent ST.
+*
+* 6) To predict the required setting of a real telescope, the
+* observed place produced by this routine would have to be
+* adjusted for the tilt of the azimuth or polar axis of the
+* mounting (with appropriate corrections for mount flexures),
+* for non-perpendicularity between the mounting axes, for the
+* position of the rotator axis and the pointing axis relative
+* to it, for tube flexure, for gear and encoder errors, and
+* finally for encoder zero points. Some telescopes would, of
+* course, exhibit other properties which would need to be
+* accounted for at the appropriate point in the sequence.
+*
+* 7) This routine takes time to execute, due mainly to the
+* rigorous integration used to evaluate the refraction.
+* For processing multiple stars for one location and time,
+* call sla_AOPPA once followed by one call per star to sla_AOPQK.
+* Where a range of times within a limited period of a few hours
+* is involved, and the highest precision is not required, call
+* sla_AOPPA once, followed by a call to sla_AOPPAT each time the
+* time changes, followed by one call per star to sla_AOPQK.
+*
+* 8) The DATE argument is UTC expressed as an MJD. This is,
+* strictly speaking, wrong, because of leap seconds. However,
+* as long as the delta UT and the UTC are consistent there
+* are no difficulties, except during a leap second. In this
+* case, the start of the 61st second of the final minute should
+* begin a new MJD day and the old pre-leap delta UT should
+* continue to be used. As the 61st second completes, the MJD
+* should revert to the start of the day as, simultaneously,
+* the delta UTC changes by one second to its post-leap new value.
+*
+* 9) The delta UT (UT1-UTC) is tabulated in IERS circulars and
+* elsewhere. It increases by exactly one second at the end of
+* each UTC leap second, introduced in order to keep delta UT
+* within +/- 0.9 seconds.
+*
+* 10) IMPORTANT -- TAKE CARE WITH THE LONGITUDE SIGN CONVENTION.
+* The longitude required by the present routine is east-positive,
+* in accordance with geographical convention (and right-handed).
+* In particular, note that the longitudes returned by the
+* sla_OBS routine are west-positive, following astronomical
+* usage, and must be reversed in sign before use in the present
+* routine.
+*
+* 11) The polar coordinates XP,YP can be obtained from IERS
+* circulars and equivalent publications. The maximum amplitude
+* is about 0.3 arcseconds. If XP,YP values are unavailable,
+* use XP=YP=0D0. See page B60 of the 1988 Astronomical Almanac
+* for a definition of the two angles.
+*
+* 12) The height above sea level of the observing station, HM,
+* can be obtained from the Astronomical Almanac (Section J
+* in the 1988 edition), or via the routine sla_OBS. If P,
+* the pressure in millibars, is available, an adequate
+* estimate of HM can be obtained from the expression
+*
+* HM ~ -29.3D0*TSL*LOG(P/1013.25D0).
+*
+* where TSL is the approximate sea-level air temperature in
+* deg K (see Astrophysical Quantities, C.W.Allen, 3rd edition,
+* section 52). Similarly, if the pressure P is not known,
+* it can be estimated from the height of the observing
+* station, HM as follows:
+*
+* P ~ 1013.25D0*EXP(-HM/(29.3D0*TSL)).
+*
+* Note, however, that the refraction is proportional to the
+* pressure and that an accurate P value is important for
+* precise work.
+*
+* 13) The azimuths etc produced by the present routine are with
+* respect to the celestial pole. Corrections to the terrestrial
+* pole can be computed using sla_POLMO.
+*
+* Called: sla_AOPPA, sla_AOPQK
+*
+* P.T.Wallace Starlink 6 September 1999
+*
+* Copyright (C) 1999 P.T.Wallace and CCLRC
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION RAP,DAP,DATE,DUT,ELONGM,PHIM,HM,
+ : XP,YP,TDK,PMB,RH,WL,TLR,AOB,ZOB,HOB,DOB,ROB
+
+ DOUBLE PRECISION AOPRMS(14)
+
+
+ CALL sla_AOPPA(DATE,DUT,ELONGM,PHIM,HM,XP,YP,TDK,PMB,RH,WL,TLR,
+ : AOPRMS)
+ CALL sla_AOPQK(RAP,DAP,AOPRMS,AOB,ZOB,HOB,DOB,ROB)
+
+ END
diff --git a/src/slalib/aoppa.f b/src/slalib/aoppa.f
new file mode 100644
index 0000000..b497fdb
--- /dev/null
+++ b/src/slalib/aoppa.f
@@ -0,0 +1,176 @@
+ SUBROUTINE sla_AOPPA (DATE, DUT, ELONGM, PHIM, HM,
+ : XP, YP, TDK, PMB, RH, WL, TLR, AOPRMS)
+*+
+* - - - - - -
+* A O P P A
+* - - - - - -
+*
+* Precompute apparent to observed place parameters required by
+* sla_AOPQK and sla_OAPQK.
+*
+* Given:
+* DATE d UTC date/time (modified Julian Date, JD-2400000.5)
+* DUT d delta UT: UT1-UTC (UTC seconds)
+* ELONGM d mean longitude of the observer (radians, east +ve)
+* PHIM d mean geodetic latitude of the observer (radians)
+* HM d observer's height above sea level (metres)
+* XP d polar motion x-coordinate (radians)
+* YP d polar motion y-coordinate (radians)
+* TDK d local ambient temperature (DegK; std=273.155D0)
+* PMB d local atmospheric pressure (mB; std=1013.25D0)
+* RH d local relative humidity (in the range 0D0-1D0)
+* WL d effective wavelength (micron, e.g. 0.55D0)
+* TLR d tropospheric lapse rate (DegK/metre, e.g. 0.0065D0)
+*
+* Returned:
+* AOPRMS d(14) star-independent apparent-to-observed parameters:
+*
+* (1) geodetic latitude (radians)
+* (2,3) sine and cosine of geodetic latitude
+* (4) magnitude of diurnal aberration vector
+* (5) height (HM)
+* (6) ambient temperature (TDK)
+* (7) pressure (PMB)
+* (8) relative humidity (RH)
+* (9) wavelength (WL)
+* (10) lapse rate (TLR)
+* (11,12) refraction constants A and B (radians)
+* (13) longitude + eqn of equinoxes + sidereal DUT (radians)
+* (14) local apparent sidereal time (radians)
+*
+* Notes:
+*
+* 1) It is advisable to take great care with units, as even
+* unlikely values of the input parameters are accepted and
+* processed in accordance with the models used.
+*
+* 2) The DATE argument is UTC expressed as an MJD. This is,
+* strictly speaking, improper, because of leap seconds. However,
+* as long as the delta UT and the UTC are consistent there
+* are no difficulties, except during a leap second. In this
+* case, the start of the 61st second of the final minute should
+* begin a new MJD day and the old pre-leap delta UT should
+* continue to be used. As the 61st second completes, the MJD
+* should revert to the start of the day as, simultaneously,
+* the delta UTC changes by one second to its post-leap new value.
+*
+* 3) The delta UT (UT1-UTC) is tabulated in IERS circulars and
+* elsewhere. It increases by exactly one second at the end of
+* each UTC leap second, introduced in order to keep delta UT
+* within +/- 0.9 seconds.
+*
+* 4) IMPORTANT -- TAKE CARE WITH THE LONGITUDE SIGN CONVENTION.
+* The longitude required by the present routine is east-positive,
+* in accordance with geographical convention (and right-handed).
+* In particular, note that the longitudes returned by the
+* sla_OBS routine are west-positive, following astronomical
+* usage, and must be reversed in sign before use in the present
+* routine.
+*
+* 5) The polar coordinates XP,YP can be obtained from IERS
+* circulars and equivalent publications. The maximum amplitude
+* is about 0.3 arcseconds. If XP,YP values are unavailable,
+* use XP=YP=0D0. See page B60 of the 1988 Astronomical Almanac
+* for a definition of the two angles.
+*
+* 6) The height above sea level of the observing station, HM,
+* can be obtained from the Astronomical Almanac (Section J
+* in the 1988 edition), or via the routine sla_OBS. If P,
+* the pressure in millibars, is available, an adequate
+* estimate of HM can be obtained from the expression
+*
+* HM ~ -29.3D0*TSL*LOG(P/1013.25D0).
+*
+* where TSL is the approximate sea-level air temperature in
+* deg K (see Astrophysical Quantities, C.W.Allen, 3rd edition,
+* section 52). Similarly, if the pressure P is not known,
+* it can be estimated from the height of the observing
+* station, HM as follows:
+*
+* P ~ 1013.25D0*EXP(-HM/(29.3D0*TSL)).
+*
+* Note, however, that the refraction is proportional to the
+* pressure and that an accurate P value is important for
+* precise work.
+*
+* 7) Repeated, computationally-expensive, calls to sla_AOPPA for
+* times that are very close together can be avoided by calling
+* sla_AOPPA just once and then using sla_AOPPAT for the subsequent
+* times. Fresh calls to sla_AOPPA will be needed only when changes
+* in the precession have grown to unacceptable levels or when
+* anything affecting the refraction has changed.
+*
+* Called: sla_GEOC, sla_REFCO, sla_EQEQX, sla_AOPPAT
+*
+* P.T.Wallace Starlink 6 September 1999
+*
+* Copyright (C) 1999 P.T.Wallace and CCLRC
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION DATE,DUT,ELONGM,PHIM,HM,XP,YP,TDK,PMB,
+ : RH,WL,TLR,AOPRMS(14)
+
+ DOUBLE PRECISION sla_EQEQX
+
+* 2Pi
+ DOUBLE PRECISION D2PI
+ PARAMETER (D2PI=6.283185307179586476925287D0)
+
+* Seconds of time to radians
+ DOUBLE PRECISION S2R
+ PARAMETER (S2R=7.272205216643039903848712D-5)
+
+* Speed of light (AU per day)
+ DOUBLE PRECISION C
+ PARAMETER (C=173.14463331D0)
+
+* Ratio between solar and sidereal time
+ DOUBLE PRECISION SOLSID
+ PARAMETER (SOLSID=1.00273790935D0)
+
+ DOUBLE PRECISION CPHIM,XT,YT,ZT,XC,YC,ZC,ELONG,PHI,UAU,VAU
+
+
+
+* Observer's location corrected for polar motion
+ CPHIM = COS(PHIM)
+ XT = COS(ELONGM)*CPHIM
+ YT = SIN(ELONGM)*CPHIM
+ ZT = SIN(PHIM)
+ XC = XT-XP*ZT
+ YC = YT+YP*ZT
+ ZC = XP*XT-YP*YT+ZT
+ IF (XC.EQ.0D0.AND.YC.EQ.0D0) THEN
+ ELONG = 0D0
+ ELSE
+ ELONG = ATAN2(YC,XC)
+ END IF
+ PHI = ATAN2(ZC,SQRT(XC*XC+YC*YC))
+ AOPRMS(1) = PHI
+ AOPRMS(2) = SIN(PHI)
+ AOPRMS(3) = COS(PHI)
+
+* Magnitude of the diurnal aberration vector
+ CALL sla_GEOC(PHI,HM,UAU,VAU)
+ AOPRMS(4) = D2PI*UAU*SOLSID/C
+
+* Copy the refraction parameters and compute the A & B constants
+ AOPRMS(5) = HM
+ AOPRMS(6) = TDK
+ AOPRMS(7) = PMB
+ AOPRMS(8) = RH
+ AOPRMS(9) = WL
+ AOPRMS(10) = TLR
+ CALL sla_REFCO(HM,TDK,PMB,RH,WL,PHI,TLR,1D-10,
+ : AOPRMS(11),AOPRMS(12))
+
+* Longitude + equation of the equinoxes + sidereal equivalent of DUT
+* (ignoring change in equation of the equinoxes between UTC and TDB)
+ AOPRMS(13) = ELONG+sla_EQEQX(DATE)+DUT*SOLSID*S2R
+
+* Sidereal time
+ CALL sla_AOPPAT(DATE,AOPRMS)
+
+ END
diff --git a/src/slalib/aoppat.f b/src/slalib/aoppat.f
new file mode 100644
index 0000000..1342024
--- /dev/null
+++ b/src/slalib/aoppat.f
@@ -0,0 +1,45 @@
+ SUBROUTINE sla_AOPPAT (DATE, AOPRMS)
+*+
+* - - - - - - -
+* A O P P A T
+* - - - - - - -
+*
+* Recompute the sidereal time in the apparent to observed place
+* star-independent parameter block.
+*
+* Given:
+* DATE d UTC date/time (modified Julian Date, JD-2400000.5)
+* (see AOPPA source for comments on leap seconds)
+*
+* AOPRMS d(14) star-independent apparent-to-observed parameters
+*
+* (1-12) not required
+* (13) longitude + eqn of equinoxes + sidereal DUT
+* (14) not required
+*
+* Returned:
+* AOPRMS d(14) star-independent apparent-to-observed parameters:
+*
+* (1-13) not changed
+* (14) local apparent sidereal time (radians)
+*
+* For more information, see sla_AOPPA.
+*
+* Called: sla_GMST
+*
+* P.T.Wallace Starlink 1 July 1993
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION DATE,AOPRMS(14)
+
+ DOUBLE PRECISION sla_GMST
+
+
+
+ AOPRMS(14) = sla_GMST(DATE)+AOPRMS(13)
+
+ END
diff --git a/src/slalib/aopqk.f b/src/slalib/aopqk.f
new file mode 100644
index 0000000..9f8a45c
--- /dev/null
+++ b/src/slalib/aopqk.f
@@ -0,0 +1,242 @@
+ SUBROUTINE sla_AOPQK (RAP, DAP, AOPRMS, AOB, ZOB, HOB, DOB, ROB)
+*+
+* - - - - - -
+* A O P Q K
+* - - - - - -
+*
+* Quick apparent to observed place (but see note 8, below, for
+* remarks about speed).
+*
+* Given:
+* RAP d geocentric apparent right ascension
+* DAP d geocentric apparent declination
+* AOPRMS d(14) star-independent apparent-to-observed parameters:
+*
+* (1) geodetic latitude (radians)
+* (2,3) sine and cosine of geodetic latitude
+* (4) magnitude of diurnal aberration vector
+* (5) height (HM)
+* (6) ambient temperature (T)
+* (7) pressure (P)
+* (8) relative humidity (RH)
+* (9) wavelength (WL)
+* (10) lapse rate (TLR)
+* (11,12) refraction constants A and B (radians)
+* (13) longitude + eqn of equinoxes + sidereal DUT (radians)
+* (14) local apparent sidereal time (radians)
+*
+* Returned:
+* AOB d observed azimuth (radians: N=0,E=90)
+* ZOB d observed zenith distance (radians)
+* HOB d observed Hour Angle (radians)
+* DOB d observed Declination (radians)
+* ROB d observed Right Ascension (radians)
+*
+* Notes:
+*
+* 1) This routine returns zenith distance rather than elevation
+* in order to reflect the fact that no allowance is made for
+* depression of the horizon.
+*
+* 2) The accuracy of the result is limited by the corrections for
+* refraction. Providing the meteorological parameters are
+* known accurately and there are no gross local effects, the
+* observed RA,Dec predicted by this routine should be within
+* about 0.1 arcsec for a zenith distance of less than 70 degrees.
+* Even at a topocentric zenith distance of 90 degrees, the
+* accuracy in elevation should be better than 1 arcmin; useful
+* results are available for a further 3 degrees, beyond which
+* the slaRefro routine returns a fixed value of the refraction.
+* The complementary routines slaAop (or slaAopqk) and slaOap
+* (or slaOapqk) are self-consistent to better than 1 micro-
+* arcsecond all over the celestial sphere.
+*
+* 3) It is advisable to take great care with units, as even
+* unlikely values of the input parameters are accepted and
+* processed in accordance with the models used.
+*
+* 4) "Apparent" place means the geocentric apparent right ascension
+* and declination, which is obtained from a catalogue mean place
+* by allowing for space motion, parallax, precession, nutation,
+* annual aberration, and the Sun's gravitational lens effect. For
+* star positions in the FK5 system (i.e. J2000), these effects can
+* be applied by means of the sla_MAP etc routines. Starting from
+* other mean place systems, additional transformations will be
+* needed; for example, FK4 (i.e. B1950) mean places would first
+* have to be converted to FK5, which can be done with the
+* sla_FK425 etc routines.
+*
+* 5) "Observed" Az,El means the position that would be seen by a
+* perfect theodolite located at the observer. This is obtained
+* from the geocentric apparent RA,Dec by allowing for Earth
+* orientation and diurnal aberration, rotating from equator
+* to horizon coordinates, and then adjusting for refraction.
+* The HA,Dec is obtained by rotating back into equatorial
+* coordinates, using the geodetic latitude corrected for polar
+* motion, and is the position that would be seen by a perfect
+* equatorial located at the observer and with its polar axis
+* aligned to the Earth's axis of rotation (n.b. not to the
+* refracted pole). Finally, the RA is obtained by subtracting
+* the HA from the local apparent ST.
+*
+* 6) To predict the required setting of a real telescope, the
+* observed place produced by this routine would have to be
+* adjusted for the tilt of the azimuth or polar axis of the
+* mounting (with appropriate corrections for mount flexures),
+* for non-perpendicularity between the mounting axes, for the
+* position of the rotator axis and the pointing axis relative
+* to it, for tube flexure, for gear and encoder errors, and
+* finally for encoder zero points. Some telescopes would, of
+* course, exhibit other properties which would need to be
+* accounted for at the appropriate point in the sequence.
+*
+* 7) The star-independent apparent-to-observed-place parameters
+* in AOPRMS may be computed by means of the sla_AOPPA routine.
+* If nothing has changed significantly except the time, the
+* sla_AOPPAT routine may be used to perform the requisite
+* partial recomputation of AOPRMS.
+*
+* 8) At zenith distances beyond about 76 degrees, the need for
+* special care with the corrections for refraction causes a
+* marked increase in execution time. Moreover, the effect
+* gets worse with increasing zenith distance. Adroit
+* programming in the calling application may allow the
+* problem to be reduced. Prepare an alternative AOPRMS array,
+* computed for zero air-pressure; this will disable the
+* refraction corrections and cause rapid execution. Using
+* this AOPRMS array, a preliminary call to the present routine
+* will, depending on the application, produce a rough position
+* which may be enough to establish whether the full, slow
+* calculation (using the real AOPRMS array) is worthwhile.
+* For example, there would be no need for the full calculation
+* if the preliminary call had already established that the
+* source was well below the elevation limits for a particular
+* telescope.
+*
+* 9) The azimuths etc produced by the present routine are with
+* respect to the celestial pole. Corrections to the terrestrial
+* pole can be computed using sla_POLMO.
+*
+* Called: sla_DCS2C, sla_REFZ, sla_REFRO, sla_DCC2S, sla_DRANRM
+*
+* P.T.Wallace Starlink 22 February 1996
+*
+* Copyright (C) 1996 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION RAP,DAP,AOPRMS(14),AOB,ZOB,HOB,DOB,ROB
+
+* Breakpoint for fast/slow refraction algorithm:
+* ZD greater than arctan(4), (see sla_REFCO routine)
+* or vector Z less than cosine(arctan(Z)) = 1/sqrt(17)
+ DOUBLE PRECISION ZBREAK
+ PARAMETER (ZBREAK=0.242535625D0)
+
+ INTEGER I
+
+ DOUBLE PRECISION SPHI,CPHI,ST,V(3),XHD,YHD,ZHD,DIURAB,F,
+ : XHDT,YHDT,ZHDT,XAET,YAET,ZAET,AZOBS,
+ : ZDT,REFA,REFB,ZDOBS,DZD,DREF,CE,
+ : XAEO,YAEO,ZAEO,HMOBS,DCOBS,RAOBS
+
+ DOUBLE PRECISION sla_DRANRM
+
+
+
+* Sin, cos of latitude
+ SPHI = AOPRMS(2)
+ CPHI = AOPRMS(3)
+
+* Local apparent sidereal time
+ ST = AOPRMS(14)
+
+* Apparent RA,Dec to Cartesian -HA,Dec
+ CALL sla_DCS2C(RAP-ST,DAP,V)
+ XHD = V(1)
+ YHD = V(2)
+ ZHD = V(3)
+
+* Diurnal aberration
+ DIURAB = AOPRMS(4)
+ F = (1D0-DIURAB*YHD)
+ XHDT = F*XHD
+ YHDT = F*(YHD+DIURAB)
+ ZHDT = F*ZHD
+
+* Cartesian -HA,Dec to Cartesian Az,El (S=0,E=90)
+ XAET = SPHI*XHDT-CPHI*ZHDT
+ YAET = YHDT
+ ZAET = CPHI*XHDT+SPHI*ZHDT
+
+* Azimuth (N=0,E=90)
+ IF (XAET.EQ.0D0.AND.YAET.EQ.0D0) THEN
+ AZOBS = 0D0
+ ELSE
+ AZOBS = ATAN2(YAET,-XAET)
+ END IF
+
+* Topocentric zenith distance
+ ZDT = ATAN2(SQRT(XAET*XAET+YAET*YAET),ZAET)
+
+*
+* Refraction
+* ----------
+
+* Fast algorithm using two constant model
+ REFA = AOPRMS(11)
+ REFB = AOPRMS(12)
+ CALL sla_REFZ(ZDT,REFA,REFB,ZDOBS)
+
+* Large zenith distance?
+ IF (COS(ZDOBS).LT.ZBREAK) THEN
+
+* Yes: use rigorous algorithm
+
+* Initialize loop (maximum of 10 iterations)
+ I = 1
+ DZD = 1D1
+ DO WHILE (ABS(DZD).GT.1D-10.AND.I.LE.10)
+
+* Compute refraction using current estimate of observed ZD
+ CALL sla_REFRO(ZDOBS,AOPRMS(5),AOPRMS(6),AOPRMS(7),
+ : AOPRMS(8),AOPRMS(9),AOPRMS(1),
+ : AOPRMS(10),1D-8,DREF)
+
+* Remaining discrepancy
+ DZD = ZDOBS+DREF-ZDT
+
+* Update the estimate
+ ZDOBS = ZDOBS-DZD
+
+* Increment the iteration counter
+ I = I+1
+ END DO
+ END IF
+
+* To Cartesian Az/ZD
+ CE = SIN(ZDOBS)
+ XAEO = -COS(AZOBS)*CE
+ YAEO = SIN(AZOBS)*CE
+ ZAEO = COS(ZDOBS)
+
+* Cartesian Az/ZD to Cartesian -HA,Dec
+ V(1) = SPHI*XAEO+CPHI*ZAEO
+ V(2) = YAEO
+ V(3) = -CPHI*XAEO+SPHI*ZAEO
+
+* To spherical -HA,Dec
+ CALL sla_DCC2S(V,HMOBS,DCOBS)
+
+* Right Ascension
+ RAOBS = sla_DRANRM(ST+HMOBS)
+
+* Return the results
+ AOB = AZOBS
+ ZOB = ZDOBS
+ HOB = -HMOBS
+ DOB = DCOBS
+ ROB = RAOBS
+
+ END
diff --git a/src/slalib/atmdsp.f b/src/slalib/atmdsp.f
new file mode 100644
index 0000000..62869aa
--- /dev/null
+++ b/src/slalib/atmdsp.f
@@ -0,0 +1,121 @@
+ SUBROUTINE sla_ATMDSP (TDK, PMB, RH, WL1, A1, B1, WL2, A2, B2)
+*+
+* - - - - - - -
+* A T M D S P
+* - - - - - - -
+*
+* Apply atmospheric-dispersion adjustments to refraction coefficients.
+*
+* Given:
+* TDK d ambient temperature, degrees K
+* PMB d ambient pressure, millibars
+* RH d ambient relative humidity, 0-1
+* WL1 d reference wavelength, micrometre (0.4D0 recommended)
+* A1 d refraction coefficient A for wavelength WL1 (radians)
+* B1 d refraction coefficient B for wavelength WL1 (radians)
+* WL2 d wavelength for which adjusted A,B required
+*
+* Returned:
+* A2 d refraction coefficient A for wavelength WL2 (radians)
+* B2 d refraction coefficient B for wavelength WL2 (radians)
+*
+* Notes:
+*
+* 1 To use this routine, first call sla_REFCO specifying WL1 as the
+* wavelength. This yields refraction coefficients A1,B1, correct
+* for that wavelength. Subsequently, calls to sla_ATMDSP specifying
+* different wavelengths will produce new, slightly adjusted
+* refraction coefficients which apply to the specified wavelength.
+*
+* 2 Most of the atmospheric dispersion happens between 0.7 micrometre
+* and the UV atmospheric cutoff, and the effect increases strongly
+* towards the UV end. For this reason a blue reference wavelength
+* is recommended, for example 0.4 micrometres.
+*
+* 3 The accuracy, for this set of conditions:
+*
+* height above sea level 2000 m
+* latitude 29 deg
+* pressure 793 mB
+* temperature 17 degC
+* humidity 50%
+* lapse rate 0.0065 degC/m
+* reference wavelength 0.4 micrometre
+* star elevation 15 deg
+*
+* is about 2.5 mas RMS between 0.3 and 1.0 micrometres, and stays
+* within 4 mas for the whole range longward of 0.3 micrometres
+* (compared with a total dispersion from 0.3 to 20.0 micrometres
+* of about 11 arcsec). These errors are typical for ordinary
+* conditions and the given elevation; in extreme conditions values
+* a few times this size may occur, while at higher elevations the
+* errors become much smaller.
+*
+* 4 If either wavelength exceeds 100 micrometres, the radio case
+* is assumed and the returned refraction coefficients are the
+* same as the given ones.
+*
+* 5 The algorithm consists of calculation of the refractivity of the
+* air at the observer for the two wavelengths, using the methods
+* of the sla_REFRO routine, and then scaling of the two refraction
+* coefficients according to classical refraction theory. This
+* amounts to scaling the A coefficient in proportion to (n-1) and
+* the B coefficient almost in the same ratio (see R.M.Green,
+* "Spherical Astronomy", Cambridge University Press, 1985).
+*
+* P.T.Wallace Starlink 6 October 1995
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION TDK,PMB,RH,WL1,A1,B1,WL2,A2,B2
+
+ DOUBLE PRECISION F,TDKOK,PMBOK,RHOK,
+ : PSAT,PWO,W1,WLOK,WLSQ,W2,DN1,DN2
+
+
+* Check for radio wavelengths
+ IF (WL1.GT.100D0.OR.WL2.GT.100D0) THEN
+
+* Radio: no dispersion
+ A2 = A1
+ B2 = B1
+ ELSE
+
+* Optical: keep arguments within safe bounds
+ TDKOK = MIN(MAX(TDK,100D0),500D0)
+ PMBOK = MIN(MAX(PMB,0D0),10000D0)
+ RHOK = MIN(MAX(RH,0D0),1D0)
+
+* Atmosphere parameters at the observer
+ PSAT = 10D0**(-8.7115D0+0.03477D0*TDKOK)
+ PWO = RHOK*PSAT
+ W1 = 11.2684D-6*PWO
+
+* Refractivity at the observer for first wavelength
+ WLOK = MAX(WL1,0.1D0)
+ WLSQ = WLOK*WLOK
+ W2 = 77.5317D-6+(0.43909D-6+0.00367D-6/WLSQ)/WLSQ
+ DN1 = (W2*PMBOK-W1)/TDKOK
+
+* Refractivity at the observer for second wavelength
+ WLOK = MAX(WL2,0.1D0)
+ WLSQ = WLOK*WLOK
+ W2 = 77.5317D-6+(0.43909D-6+0.00367D-6/WLSQ)/WLSQ
+ DN2 = (W2*PMBOK-W1)/TDKOK
+
+* Scale the refraction coefficients (see Green 4.31, p93)
+ IF (DN1.NE.0D0) THEN
+ F = DN2/DN1
+ A2 = A1*F
+ B2 = B1*F
+ IF (DN1.NE.A1) B2=B2*(1D0+DN1*(DN1-DN2)/(2D0*(DN1-A1)))
+ ELSE
+ A2 = A1
+ B2 = B1
+ END IF
+ END IF
+
+ END
diff --git a/src/slalib/atms.f b/src/slalib/atms.f
new file mode 100644
index 0000000..3b991f4
--- /dev/null
+++ b/src/slalib/atms.f
@@ -0,0 +1,40 @@
+ SUBROUTINE sla__ATMS (RT, TT, DNT, GAMAL, R, DN, RDNDR)
+*+
+* - - - - -
+* A T M S
+* - - - - -
+*
+* Internal routine used by REFRO
+*
+* Refractive index and derivative with respect to height for the
+* stratosphere.
+*
+* Given:
+* RT d height of tropopause from centre of the Earth (metre)
+* TT d temperature at the tropopause (deg K)
+* DNT d refractive index at the tropopause
+* GAMAL d constant of the atmospheric model = G*MD/R
+* R d current distance from the centre of the Earth (metre)
+*
+* Returned:
+* DN d refractive index at R
+* RDNDR d R * rate the refractive index is changing at R
+*
+* P.T.Wallace Starlink 14 July 1995
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION RT,TT,DNT,GAMAL,R,DN,RDNDR
+
+ DOUBLE PRECISION B,W
+
+
+ B = GAMAL/TT
+ W = (DNT-1D0)*EXP(-B*(R-RT))
+ DN = 1D0+W
+ RDNDR = -R*B*W
+
+ END
diff --git a/src/slalib/atmt.f b/src/slalib/atmt.f
new file mode 100644
index 0000000..82d0ecd
--- /dev/null
+++ b/src/slalib/atmt.f
@@ -0,0 +1,54 @@
+ SUBROUTINE sla__ATMT (R0, T0, ALPHA, GAMM2, DELM2,
+ : C1, C2, C3, C4, C5, C6, R, T, DN, RDNDR)
+*+
+* - - - - -
+* A T M T
+* - - - - -
+*
+* Internal routine used by REFRO
+*
+* Refractive index and derivative with respect to height for the
+* troposphere.
+*
+* Given:
+* R0 d height of observer from centre of the Earth (metre)
+* T0 d temperature at the observer (deg K)
+* ALPHA d alpha )
+* GAMM2 d gamma minus 2 ) see HMNAO paper
+* DELM2 d delta minus 2 )
+* C1 d useful term )
+* C2 d useful term )
+* C3 d useful term ) see source
+* C4 d useful term ) of sla_REFRO
+* C5 d useful term )
+* C6 d useful term )
+* R d current distance from the centre of the Earth (metre)
+*
+* Returned:
+* T d temperature at R (deg K)
+* DN d refractive index at R
+* RDNDR d R * rate the refractive index is changing at R
+*
+* Note that in the optical case C5 and C6 are zero.
+*
+* P.T.Wallace Starlink 30 May 1997
+*
+* Copyright (C) 1997 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION R0,T0,ALPHA,GAMM2,DELM2,C1,C2,C3,C4,C5,C6,
+ : R,T,DN,RDNDR
+
+ DOUBLE PRECISION TT0,TT0GM2,TT0DM2
+
+
+ T = MAX(MIN(T0-ALPHA*(R-R0),320D0),100D0)
+ TT0 = T/T0
+ TT0GM2 = TT0**GAMM2
+ TT0DM2 = TT0**DELM2
+ DN = 1D0+(C1*TT0GM2-(C2-C5/T)*TT0DM2)*TT0
+ RDNDR = R*(-C3*TT0GM2+(C4-C6/TT0)*TT0DM2)
+
+ END
diff --git a/src/slalib/av2m.f b/src/slalib/av2m.f
new file mode 100644
index 0000000..ec1967c
--- /dev/null
+++ b/src/slalib/av2m.f
@@ -0,0 +1,68 @@
+ SUBROUTINE sla_AV2M (AXVEC, RMAT)
+*+
+* - - - - -
+* A V 2 M
+* - - - - -
+*
+* Form the rotation matrix corresponding to a given axial vector.
+*
+* (single precision)
+*
+* A rotation matrix describes a rotation about some arbitrary axis.
+* The axis is called the Euler axis, and the angle through which the
+* reference frame rotates is called the Euler angle. The axial
+* vector supplied to this routine has the same direction as the
+* Euler axis, and its magnitude is the Euler angle in radians.
+*
+* Given:
+* AXVEC r(3) axial vector (radians)
+*
+* Returned:
+* RMAT r(3,3) rotation matrix
+*
+* If AXVEC is null, the unit matrix is returned.
+*
+* The reference frame rotates clockwise as seen looking along
+* the axial vector from the origin.
+*
+* P.T.Wallace Starlink June 1989
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL AXVEC(3),RMAT(3,3)
+
+ REAL X,Y,Z,PHI,S,C,W
+
+
+
+* Euler angle - magnitude of axial vector - and functions
+ X = AXVEC(1)
+ Y = AXVEC(2)
+ Z = AXVEC(3)
+ PHI = SQRT(X*X+Y*Y+Z*Z)
+ S = SIN(PHI)
+ C = COS(PHI)
+ W = 1.0-C
+
+* Euler axis - direction of axial vector (perhaps null)
+ IF (PHI.NE.0.0) THEN
+ X = X/PHI
+ Y = Y/PHI
+ Z = Z/PHI
+ END IF
+
+* Compute the rotation matrix
+ RMAT(1,1) = X*X*W+C
+ RMAT(1,2) = X*Y*W+Z*S
+ RMAT(1,3) = X*Z*W-Y*S
+ RMAT(2,1) = X*Y*W-Z*S
+ RMAT(2,2) = Y*Y*W+C
+ RMAT(2,3) = Y*Z*W+X*S
+ RMAT(3,1) = X*Z*W+Y*S
+ RMAT(3,2) = Y*Z*W-X*S
+ RMAT(3,3) = Z*Z*W+C
+
+ END
diff --git a/src/slalib/bear.f b/src/slalib/bear.f
new file mode 100644
index 0000000..11238ff
--- /dev/null
+++ b/src/slalib/bear.f
@@ -0,0 +1,42 @@
+ REAL FUNCTION sla_BEAR (A1, B1, A2, B2)
+*+
+* - - - - -
+* B E A R
+* - - - - -
+*
+* Bearing (position angle) of one point on a sphere relative to another
+* (single precision)
+*
+* Given:
+* A1,B1 r spherical coordinates of one point
+* A2,B2 r spherical coordinates of the other point
+*
+* (The spherical coordinates are RA,Dec, Long,Lat etc, in radians.)
+*
+* The result is the bearing (position angle), in radians, of point
+* A2,B2 as seen from point A1,B1. It is in the range +/- pi. If
+* A2,B2 is due east of A1,B1 the bearing is +pi/2. Zero is returned
+* if the two points are coincident.
+*
+* P.T.Wallace Starlink 23 March 1991
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL A1,B1,A2,B2
+
+ REAL DA,X,Y
+
+
+ DA=A2-A1
+ Y=SIN(DA)*COS(B2)
+ X=SIN(B2)*COS(B1)-COS(B2)*SIN(B1)*COS(DA)
+ IF (X.NE.0.0.OR.Y.NE.0.0) THEN
+ sla_BEAR=ATAN2(Y,X)
+ ELSE
+ sla_BEAR=0.0
+ END IF
+
+ END
diff --git a/src/slalib/caf2r.f b/src/slalib/caf2r.f
new file mode 100644
index 0000000..5e5b616
--- /dev/null
+++ b/src/slalib/caf2r.f
@@ -0,0 +1,57 @@
+ SUBROUTINE sla_CAF2R (IDEG, IAMIN, ASEC, RAD, J)
+*+
+* - - - - - -
+* C A F 2 R
+* - - - - - -
+*
+* Convert degrees, arcminutes, arcseconds to radians
+* (single precision)
+*
+* Given:
+* IDEG int degrees
+* IAMIN int arcminutes
+* ASEC real arcseconds
+*
+* Returned:
+* RAD real angle in radians
+* J int status: 0 = OK
+* 1 = IDEG outside range 0-359
+* 2 = IAMIN outside range 0-59
+* 3 = ASEC outside range 0-59.999...
+*
+* Notes:
+*
+* 1) The result is computed even if any of the range checks
+* fail.
+*
+* 2) The sign must be dealt with outside this routine.
+*
+* P.T.Wallace Starlink 23 August 1996
+*
+* Copyright (C) 1996 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ INTEGER IDEG,IAMIN
+ REAL ASEC,RAD
+ INTEGER J
+
+* Arc seconds to radians
+ REAL AS2R
+ PARAMETER (AS2R=0.484813681109535994E-5)
+
+
+
+* Preset status
+ J=0
+
+* Validate arcsec, arcmin, deg
+ IF (ASEC.LT.0.0.OR.ASEC.GE.60.0) J=3
+ IF (IAMIN.LT.0.OR.IAMIN.GT.59) J=2
+ IF (IDEG.LT.0.OR.IDEG.GT.359) J=1
+
+* Compute angle
+ RAD=AS2R*(60.0*(60.0*REAL(IDEG)+REAL(IAMIN))+ASEC)
+
+ END
diff --git a/src/slalib/caldj.f b/src/slalib/caldj.f
new file mode 100644
index 0000000..c2d9a6d
--- /dev/null
+++ b/src/slalib/caldj.f
@@ -0,0 +1,57 @@
+ SUBROUTINE sla_CALDJ (IY, IM, ID, DJM, J)
+*+
+* - - - - - -
+* C A L D J
+* - - - - - -
+*
+* Gregorian Calendar to Modified Julian Date
+*
+* (Includes century default feature: use sla_CLDJ for years
+* before 100AD.)
+*
+* Given:
+* IY,IM,ID int year, month, day in Gregorian calendar
+*
+* Returned:
+* DJM dp modified Julian Date (JD-2400000.5) for 0 hrs
+* J int status:
+* 0 = OK
+* 1 = bad year (MJD not computed)
+* 2 = bad month (MJD not computed)
+* 3 = bad day (MJD computed)
+*
+* Acceptable years are 00-49, interpreted as 2000-2049,
+* 50-99, " " 1950-1999,
+* 100 upwards, interpreted literally.
+*
+* Called: sla_CLDJ
+*
+* P.T.Wallace Starlink November 1985
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ INTEGER IY,IM,ID
+ DOUBLE PRECISION DJM
+ INTEGER J
+
+ INTEGER NY
+
+
+
+
+* Default century if appropriate
+ IF (IY.GE.0.AND.IY.LE.49) THEN
+ NY=IY+2000
+ ELSE IF (IY.GE.50.AND.IY.LE.99) THEN
+ NY=IY+1900
+ ELSE
+ NY=IY
+ END IF
+
+* Modified Julian Date
+ CALL sla_CLDJ(NY,IM,ID,DJM,J)
+
+ END
diff --git a/src/slalib/calyd.f b/src/slalib/calyd.f
new file mode 100644
index 0000000..240a887
--- /dev/null
+++ b/src/slalib/calyd.f
@@ -0,0 +1,65 @@
+ SUBROUTINE sla_CALYD (IY, IM, ID, NY, ND, J)
+*+
+* - - - - - -
+* C A L Y D
+* - - - - - -
+*
+* Gregorian calendar date to year and day in year (in a Julian
+* calendar aligned to the 20th/21st century Gregorian calendar).
+*
+* (Includes century default feature: use sla_CLYD for years
+* before 100AD.)
+*
+* Given:
+* IY,IM,ID int year, month, day in Gregorian calendar
+* (year may optionally omit the century)
+* Returned:
+* NY int year (re-aligned Julian calendar)
+* ND int day in year (1 = January 1st)
+* J int status:
+* 0 = OK
+* 1 = bad year (before -4711)
+* 2 = bad month
+* 3 = bad day (but conversion performed)
+*
+* Notes:
+*
+* 1 This routine exists to support the low-precision routines
+* sla_EARTH, sla_MOON and sla_ECOR.
+*
+* 2 Between 1900 March 1 and 2100 February 28 it returns answers
+* which are consistent with the ordinary Gregorian calendar.
+* Outside this range there will be a discrepancy which increases
+* by one day for every non-leap century year.
+*
+* 3 Years in the range 50-99 are interpreted as 1950-1999, and
+* years in the range 00-49 are interpreted as 2000-2049.
+*
+* Called: sla_CLYD
+*
+* P.T.Wallace Starlink 23 November 1994
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ INTEGER IY,IM,ID,NY,ND,J
+
+ INTEGER I
+
+
+
+* Default century if appropriate
+ IF (IY.GE.0.AND.IY.LE.49) THEN
+ I=IY+2000
+ ELSE IF (IY.GE.50.AND.IY.LE.99) THEN
+ I=IY+1900
+ ELSE
+ I=IY
+ END IF
+
+* Perform the conversion
+ CALL sla_CLYD(I,IM,ID,NY,ND,J)
+
+ END
diff --git a/src/slalib/cc2s.f b/src/slalib/cc2s.f
new file mode 100644
index 0000000..2e24b9d
--- /dev/null
+++ b/src/slalib/cc2s.f
@@ -0,0 +1,53 @@
+ SUBROUTINE sla_CC2S (V, A, B)
+*+
+* - - - - -
+* C C 2 S
+* - - - - -
+*
+* Direction cosines to spherical coordinates (single precision)
+*
+* Given:
+* V r(3) x,y,z vector
+*
+* Returned:
+* A,B r spherical coordinates in radians
+*
+* The spherical coordinates are longitude (+ve anticlockwise
+* looking from the +ve latitude pole) and latitude. The
+* Cartesian coordinates are right handed, with the x axis
+* at zero longitude and latitude, and the z axis at the
+* +ve latitude pole.
+*
+* If V is null, zero A and B are returned.
+* At either pole, zero A is returned.
+*
+* P.T.Wallace Starlink July 1989
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL V(3),A,B
+
+ REAL X,Y,Z,R
+
+
+ X = V(1)
+ Y = V(2)
+ Z = V(3)
+ R = SQRT(X*X+Y*Y)
+
+ IF (R.EQ.0.0) THEN
+ A = 0.0
+ ELSE
+ A = ATAN2(Y,X)
+ END IF
+
+ IF (Z.EQ.0.0) THEN
+ B = 0.0
+ ELSE
+ B = ATAN2(Z,R)
+ END IF
+
+ END
diff --git a/src/slalib/cc62s.f b/src/slalib/cc62s.f
new file mode 100644
index 0000000..c2ccd8d
--- /dev/null
+++ b/src/slalib/cc62s.f
@@ -0,0 +1,82 @@
+ SUBROUTINE sla_CC62S (V, A, B, R, AD, BD, RD)
+*+
+* - - - - - -
+* C C 6 2 S
+* - - - - - -
+*
+* Conversion of position & velocity in Cartesian coordinates
+* to spherical coordinates (single precision)
+*
+* Given:
+* V r(6) Cartesian position & velocity vector
+*
+* Returned:
+* A r longitude (radians)
+* B r latitude (radians)
+* R r radial coordinate
+* AD r longitude derivative (radians per unit time)
+* BD r latitude derivative (radians per unit time)
+* RD r radial derivative
+*
+* P.T.Wallace Starlink 28 April 1996
+*
+* Copyright (C) 1996 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL V(6),A,B,R,AD,BD,RD
+
+ REAL X,Y,Z,XD,YD,ZD,RXY2,RXY,R2,XYP
+
+
+
+* Components of position/velocity vector
+ X=V(1)
+ Y=V(2)
+ Z=V(3)
+ XD=V(4)
+ YD=V(5)
+ ZD=V(6)
+
+* Component of R in XY plane squared
+ RXY2=X*X+Y*Y
+
+* Modulus squared
+ R2=RXY2+Z*Z
+
+* Protection against null vector
+ IF (R2.EQ.0.0) THEN
+ X=XD
+ Y=YD
+ Z=ZD
+ RXY2=X*X+Y*Y
+ R2=RXY2+Z*Z
+ END IF
+
+* Position and velocity in spherical coordinates
+ RXY=SQRT(RXY2)
+ XYP=X*XD+Y*YD
+ IF (RXY2.NE.0.0) THEN
+ A=ATAN2(Y,X)
+ B=ATAN2(Z,RXY)
+ AD=(X*YD-Y*XD)/RXY2
+ BD=(ZD*RXY2-Z*XYP)/(R2*RXY)
+ ELSE
+ A=0.0
+ IF (Z.NE.0.0) THEN
+ B=ATAN2(Z,RXY)
+ ELSE
+ B=0.0
+ END IF
+ AD=0.0
+ BD=0.0
+ END IF
+ R=SQRT(R2)
+ IF (R.NE.0.0) THEN
+ RD=(XYP+Z*ZD)/R
+ ELSE
+ RD=0.0
+ END IF
+
+ END
diff --git a/src/slalib/cd2tf.f b/src/slalib/cd2tf.f
new file mode 100644
index 0000000..abd26ef
--- /dev/null
+++ b/src/slalib/cd2tf.f
@@ -0,0 +1,55 @@
+ SUBROUTINE sla_CD2TF (NDP, DAYS, SIGN, IHMSF)
+*+
+* - - - - - -
+* C D 2 T F
+* - - - - - -
+*
+* Convert an interval in days into hours, minutes, seconds
+*
+* (single precision)
+*
+* Given:
+* NDP int number of decimal places of seconds
+* DAYS real interval in days
+*
+* Returned:
+* SIGN char '+' or '-'
+* IHMSF int(4) hours, minutes, seconds, fraction
+*
+* Notes:
+*
+* 1) NDP less than zero is interpreted as zero.
+*
+* 2) The largest useful value for NDP is determined by the size of
+* DAYS, the format of REAL floating-point numbers on the target
+* machine, and the risk of overflowing IHMSF(4). For example,
+* on the VAX, for DAYS up to 1.0, the available floating-point
+* precision corresponds roughly to NDP=3. This is well below
+* the ultimate limit of NDP=9 set by the capacity of the 32-bit
+* integer IHMSF(4).
+*
+* 3) The absolute value of DAYS may exceed 1.0. In cases where it
+* does not, it is up to the caller to test for and handle the
+* case where DAYS is very nearly 1.0 and rounds up to 24 hours,
+* by testing for IHMSF(1)=24 and setting IHMSF(1-4) to zero.
+*
+* Called: sla_DD2TF
+*
+* P.T.Wallace Starlink 12 December 1993
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ INTEGER NDP
+ REAL DAYS
+ CHARACTER SIGN*(*)
+ INTEGER IHMSF(4)
+
+
+
+* Call double precision version
+ CALL sla_DD2TF(NDP,DBLE(DAYS),SIGN,IHMSF)
+
+ END
diff --git a/src/slalib/cldj.f b/src/slalib/cldj.f
new file mode 100644
index 0000000..0536259
--- /dev/null
+++ b/src/slalib/cldj.f
@@ -0,0 +1,78 @@
+ SUBROUTINE sla_CLDJ (IY, IM, ID, DJM, J)
+*+
+* - - - - -
+* C L D J
+* - - - - -
+*
+* Gregorian Calendar to Modified Julian Date
+*
+* Given:
+* IY,IM,ID int year, month, day in Gregorian calendar
+*
+* Returned:
+* DJM dp modified Julian Date (JD-2400000.5) for 0 hrs
+* J int status:
+* 0 = OK
+* 1 = bad year (MJD not computed)
+* 2 = bad month (MJD not computed)
+* 3 = bad day (MJD computed)
+*
+* The year must be -4699 (i.e. 4700BC) or later.
+*
+* The algorithm is derived from that of Hatcher 1984
+* (QJRAS 25, 53-55).
+*
+* P.T.Wallace Starlink 11 March 1998
+*
+* Copyright (C) 1998 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ INTEGER IY,IM,ID
+ DOUBLE PRECISION DJM
+ INTEGER J
+
+* Month lengths in days
+ INTEGER MTAB(12)
+ DATA MTAB / 31,28,31,30,31,30,31,31,30,31,30,31 /
+
+
+
+* Preset status
+ J=0
+
+* Validate year
+ IF (IY.LT.-4699) THEN
+ J=1
+ ELSE
+
+* Validate month
+ IF (IM.GE.1.AND.IM.LE.12) THEN
+
+* Allow for leap year
+ IF (MOD(IY,4).EQ.0) THEN
+ MTAB(2)=29
+ ELSE
+ MTAB(2)=28
+ END IF
+ IF (MOD(IY,100).EQ.0.AND.MOD(IY,400).NE.0)
+ : MTAB(2)=28
+
+* Validate day
+ IF (ID.LT.1.OR.ID.GT.MTAB(IM)) J=3
+
+* Modified Julian Date
+ DJM=DBLE((1461*(IY-(12-IM)/10+4712))/4
+ : +(306*MOD(IM+9,12)+5)/10
+ : -(3*((IY-(12-IM)/10+4900)/100))/4
+ : +ID-2399904)
+
+* Bad month
+ ELSE
+ J=2
+ END IF
+
+ END IF
+
+ END
diff --git a/src/slalib/clyd.f b/src/slalib/clyd.f
new file mode 100644
index 0000000..ee4fb92
--- /dev/null
+++ b/src/slalib/clyd.f
@@ -0,0 +1,101 @@
+ SUBROUTINE sla_CLYD (IY, IM, ID, NY, ND, JSTAT)
+*+
+* - - - - -
+* C L Y D
+* - - - - -
+*
+* Gregorian calendar to year and day in year (in a Julian calendar
+* aligned to the 20th/21st century Gregorian calendar).
+*
+* Given:
+* IY,IM,ID i year, month, day in Gregorian calendar
+*
+* Returned:
+* NY i year (re-aligned Julian calendar)
+* ND i day in year (1 = January 1st)
+* JSTAT i status:
+* 0 = OK
+* 1 = bad year (before -4711)
+* 2 = bad month
+* 3 = bad day (but conversion performed)
+*
+* Notes:
+*
+* 1 This routine exists to support the low-precision routines
+* sla_EARTH, sla_MOON and sla_ECOR.
+*
+* 2 Between 1900 March 1 and 2100 February 28 it returns answers
+* which are consistent with the ordinary Gregorian calendar.
+* Outside this range there will be a discrepancy which increases
+* by one day for every non-leap century year.
+*
+* 3 The essence of the algorithm is first to express the Gregorian
+* date as a Julian Day Number and then to convert this back to
+* a Julian calendar date, with day-in-year instead of month and
+* day. See 12.92-1 and 12.95-1 in the reference.
+*
+* Reference: Explanatory Supplement to the Astronomical Almanac,
+* ed P.K.Seidelmann, University Science Books (1992),
+* p604-606.
+*
+* P.T.Wallace Starlink 26 November 1994
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ INTEGER IY,IM,ID,NY,ND,JSTAT
+
+ INTEGER I,J,K,L,N
+
+* Month lengths in days
+ INTEGER MTAB(12)
+ DATA MTAB/31,28,31,30,31,30,31,31,30,31,30,31/
+
+
+
+* Preset status
+ JSTAT=0
+
+* Validate year
+ IF (IY.GE.-4711) THEN
+
+* Validate month
+ IF (IM.GE.1.AND.IM.LE.12) THEN
+
+* Allow for (Gregorian) leap year
+ IF (MOD(IY,4).EQ.0.AND.
+ : (MOD(IY,100).NE.0.OR.MOD(IY,400).EQ.0)) THEN
+ MTAB(2)=29
+ ELSE
+ MTAB(2)=28
+ END IF
+
+* Validate day
+ IF (ID.LT.1.OR.ID.GT.MTAB(IM)) JSTAT=3
+
+* Perform the conversion
+ I=(14-IM)/12
+ K=IY-I
+ J=(1461*(K+4800))/4+(367*(IM-2+12*I))/12
+ : -(3*((K+4900)/100))/4+ID-30660
+ K=(J-1)/1461
+ L=J-1461*K
+ N=(L-1)/365-L/1461
+ J=((80*(L-365*N+30))/2447)/11
+ I=N+J
+ ND=59+L-365*I+((4-N)/4)*(1-J)
+ NY=4*K+I-4716
+
+* Bad month
+ ELSE
+ JSTAT=2
+ END IF
+ ELSE
+
+* Bad year
+ JSTAT=1
+ END IF
+
+ END
diff --git a/src/slalib/combn.f b/src/slalib/combn.f
new file mode 100644
index 0000000..9e2354d
--- /dev/null
+++ b/src/slalib/combn.f
@@ -0,0 +1,142 @@
+ SUBROUTINE sla_COMBN ( NSEL, NCAND, LIST, J )
+*+
+* - - - - - -
+* C O M B N
+* - - - - - -
+*
+* Generate the next combination, a subset of a specified size chosen
+* from a specified number of items.
+*
+* Given:
+* NSEL i number of items (subset size)
+* NCAND i number of candidates (set size)
+*
+* Given and returned:
+* LIST i(NSEL) latest combination, LIST(1)=0 to initialize
+*
+* Returned:
+* J i status: -1 = illegal NSEL or NCAND
+* 0 = OK
+* +1 = no more combinations available
+*
+* Notes:
+*
+* 1) NSEL and NCAND must both be at least 1, and NSEL must be less
+* than or equal to NCAND.
+*
+* 2) This routine returns, in the LIST array, a subset of NSEL integers
+* chosen from the range 1 to NCAND inclusive, in ascending order.
+* Before calling the routine for the first time, the caller must set
+* the first element of the LIST array to zero (any value less than 1
+* will do) to cause initialization.
+*
+* 2) The first combination to be generated is:
+*
+* LIST(1)=1, LIST(2)=2, ..., LIST(NSEL)=NSEL
+*
+* This is also the combination returned for the "finished" (J=1)
+* case.
+*
+* The final permutation to be generated is:
+*
+* LIST(1)=NCAND, LIST(2)=NCAND-1, ..., LIST(NSEL)=NCAND-NSEL+1
+*
+* 3) If the "finished" (J=1) status is ignored, the routine
+* continues to deliver combinations, the pattern repeating
+* every NCAND!/(NSEL!*(NCAND-NSEL)!) calls.
+*
+* 4) The algorithm is by R.F.Warren-Smith (private communication).
+*
+* P.T.Wallace Starlink 25 August 1999
+*
+* Copyright (C) 1999 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ INTEGER NSEL,NCAND,LIST(NSEL),J
+
+ INTEGER I,LISTI,NMAX,M
+ LOGICAL MORE
+
+
+* Validate, and set status.
+ IF (NSEL.LT.1.OR.NCAND.LT.1.OR.NSEL.GT.NCAND) THEN
+ J = -1
+ GO TO 9999
+ ELSE
+ J = 0
+ END IF
+
+* Just starting?
+ IF (LIST(1).LT.1) THEN
+
+* Yes: return 1,2,3...
+ DO I=1,NSEL
+ LIST(I) = I
+ END DO
+
+ ELSE
+
+* No: find the first selection that we can increment.
+
+* Start with the first list item.
+ I = 1
+
+* Loop.
+ MORE = .TRUE.
+ DO WHILE (MORE)
+
+* Current list item.
+ LISTI = LIST(I)
+
+* Is this the final list item?
+ IF (I.GE.NSEL) THEN
+
+* Yes: comparison value is number of candidates plus one.
+ NMAX = NCAND+1
+ ELSE
+
+* No: comparison value is next list item.
+ NMAX = LIST(I+1)
+ END IF
+
+* Can the current item be incremented?
+ IF (NMAX-LISTI.GT.1) THEN
+
+* Yes: increment it.
+ LIST(I) = LISTI+1
+
+* Reinitialize the preceding items.
+ DO M=1,I-1
+ LIST(M) = M
+ END DO
+
+* Break.
+ MORE = .FALSE.
+ ELSE
+
+* Can't increment the current item: is it the final one?
+ IF (I.GE.NSEL) THEN
+
+* Yes: set the status.
+ J = 1
+
+* Restart the sequence.
+ DO I=1,NSEL
+ LIST(I) = I
+ END DO
+
+* Break.
+ MORE = .FALSE.
+ ELSE
+
+* No: next list item.
+ I = I+1
+ END IF
+ END IF
+ END DO
+ END IF
+ 9999 CONTINUE
+
+ END
diff --git a/src/slalib/cr2af.f b/src/slalib/cr2af.f
new file mode 100644
index 0000000..74afa0f
--- /dev/null
+++ b/src/slalib/cr2af.f
@@ -0,0 +1,58 @@
+ SUBROUTINE sla_CR2AF (NDP, ANGLE, SIGN, IDMSF)
+*+
+* - - - - - -
+* C R 2 A F
+* - - - - - -
+*
+* Convert an angle in radians into degrees, arcminutes, arcseconds
+* (single precision)
+*
+* Given:
+* NDP int number of decimal places of arcseconds
+* ANGLE real angle in radians
+*
+* Returned:
+* SIGN char '+' or '-'
+* IDMSF int(4) degrees, arcminutes, arcseconds, fraction
+*
+* Notes:
+*
+* 1) NDP less than zero is interpreted as zero.
+*
+* 2) The largest useful value for NDP is determined by the size of
+* ANGLE, the format of REAL floating-point numbers on the target
+* machine, and the risk of overflowing IDMSF(4). For example,
+* on the VAX, for ANGLE up to 2pi, the available floating-point
+* precision corresponds roughly to NDP=3. This is well below
+* the ultimate limit of NDP=9 set by the capacity of the 32-bit
+* integer IHMSF(4).
+*
+* 3) The absolute value of ANGLE may exceed 2pi. In cases where it
+* does not, it is up to the caller to test for and handle the
+* case where ANGLE is very nearly 2pi and rounds up to 360 deg,
+* by testing for IDMSF(1)=360 and setting IDMSF(1-4) to zero.
+*
+* Called: sla_CD2TF
+*
+* P.T.Wallace Starlink 18 March 1999
+*
+* Copyright (C) 1999 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ INTEGER NDP
+ REAL ANGLE
+ CHARACTER SIGN*(*)
+ INTEGER IDMSF(4)
+
+* Hours to degrees * radians to turns
+ REAL F
+ PARAMETER (F=15.0/6.283185307179586476925287)
+
+
+
+* Scale then use days to h,m,s routine
+ CALL sla_CD2TF(NDP,ANGLE*F,SIGN,IDMSF)
+
+ END
diff --git a/src/slalib/cr2tf.f b/src/slalib/cr2tf.f
new file mode 100644
index 0000000..3e9214b
--- /dev/null
+++ b/src/slalib/cr2tf.f
@@ -0,0 +1,58 @@
+ SUBROUTINE sla_CR2TF (NDP, ANGLE, SIGN, IHMSF)
+*+
+* - - - - - -
+* C R 2 T F
+* - - - - - -
+*
+* Convert an angle in radians into hours, minutes, seconds
+* (single precision)
+*
+* Given:
+* NDP int number of decimal places of seconds
+* ANGLE real angle in radians
+*
+* Returned:
+* SIGN char '+' or '-'
+* IHMSF int(4) hours, minutes, seconds, fraction
+*
+* Notes:
+*
+* 1) NDP less than zero is interpreted as zero.
+*
+* 2) The largest useful value for NDP is determined by the size of
+* ANGLE, the format of REAL floating-point numbers on the target
+* machine, and the risk of overflowing IHMSF(4). For example,
+* on the VAX, for ANGLE up to 2pi, the available floating-point
+* precision corresponds roughly to NDP=3. This is well below
+* the ultimate limit of NDP=9 set by the capacity of the 32-bit
+* integer IHMSF(4).
+*
+* 3) The absolute value of ANGLE may exceed 2pi. In cases where it
+* does not, it is up to the caller to test for and handle the
+* case where ANGLE is very nearly 2pi and rounds up to 24 hours,
+* by testing for IHMSF(1)=24 and setting IHMSF(1-4) to zero.
+*
+* Called: sla_CD2TF
+*
+* P.T.Wallace Starlink 18 March 1999
+*
+* Copyright (C) 1999 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ INTEGER NDP
+ REAL ANGLE
+ CHARACTER SIGN*(*)
+ INTEGER IHMSF(4)
+
+* Turns to radians
+ REAL T2R
+ PARAMETER (T2R=6.283185307179586476925287)
+
+
+
+* Scale then use days to h,m,s routine
+ CALL sla_CD2TF(NDP,ANGLE/T2R,SIGN,IHMSF)
+
+ END
diff --git a/src/slalib/create.com b/src/slalib/create.com
new file mode 100755
index 0000000..161584c
--- /dev/null
+++ b/src/slalib/create.com
@@ -0,0 +1,140 @@
+$!
+$! - - - - - - -
+$! C R E A T E
+$! - - - - - - -
+$!
+$! Create SLALIB releases from source - VAX and Unix
+$!
+$! The command is @CREATE
+$!
+$! The default directory must be the one containing the source
+$! modules. The VAX release will be inserted into [.RELEASE]
+$! and the Unix release into [.UNIX]. Prior contents of any
+$! pre-existing [.RELEASE] and [.UNIX] directories will be lost.
+$!
+$! P.T.Wallace Starlink 22 January 1998
+$!
+$!----------------------------------------------------------------------
+$!
+$! VMS
+$!
+$! Create an empty [.RELEASE] directory
+$ IF F$SEARCH("RELEASE.DIR").EQS."" THEN $CREATE/DIR [.RELEASE]
+$ IF F$SEARCH("[.RELEASE]*.*").NES."" THEN $DELETE [.RELEASE]*.*;*
+$!
+$! Copy the document and news item
+$ COPY SUN67.TEX [.RELEASE]*.*
+$ COPY SLA.NEWS [.RELEASE]*.*
+$!
+$! Initialise the text and object libraries
+$ LIBR/CREATE/TEXT [.RELEASE]SLALIB.TLB
+$ PURGE [.RELEASE]SLALIB.TLB
+$ LIBR/CREATE [.RELEASE]SLALIB.OLB
+$ PURGE [.RELEASE]SLALIB.OLB
+$!
+$! Update the libraries
+$UPOBJ:
+$ FILE = F$SEARCH("*.FOR")
+$ IF FILE .EQS. "" THEN GOTO UPOBJX
+$ NAME = F$PARSE(FILE,,,"NAME")
+$ @PUT 'NAME'
+$ GOTO UPOBJ
+$UPOBJX:
+$ @PUT GRESID.VAX
+$ @PUT RANDOM.VAX
+$ @PUT WAIT.VAX
+$!
+$! Compress
+$ LIBR/COMP/DATA=REDUCE/TEXT/OUTPUT=[.RELEASE]SLALIB.TLB -
+ [.RELEASE]SLALIB.TLB
+$ PURGE [.RELEASE]SLALIB.TLB
+$ LIBR/COMP/OUTPUT=[.RELEASE]SLALIB.OLB [.RELEASE]SLALIB.OLB
+$ PURGE [.RELEASE]SLALIB.OLB
+$!
+$!----------------------------------------------------------------------
+$!
+$! UNIX
+$!
+$! Create an empty [.UNIX] directory
+$ IF F$SEARCH("UNIX.DIR").EQS."" THEN $CREATE/DIR [.UNIX]
+$ IF F$SEARCH("[.UNIX]*.*").NES."" THEN $DELETE [.UNIX]*.*;*
+$!
+$! Copy the platform-independent Fortran source
+$FLOOP:
+$ FILE = F$SEARCH("*.FOR")
+$ IF FILE.EQS."" THEN $GOTO FLOOPX
+$ FILE=F$EXTRACT(0,F$LOCATE(";",FILE),FILE)
+$ NAME = F$PARSE(FILE,,,"NAME")
+$ IF NAME .EQS. "GRESID" THEN $GOTO FLOOP
+$ IF NAME .EQS. "RANDOM" THEN $GOTO FLOOP
+$ IF NAME .EQS. "WAIT" THEN $GOTO FLOOP
+$ CONVERT/FDL=SYS$SYSTEM:UCX$CONVERT 'FILE' [.UNIX]'NAME'.F
+$ GOTO FLOOP
+$FLOOPX:
+$!
+$! Copy the platform specific source code
+$ CONVERT/FDL=SYS$SYSTEM:UCX$CONVERT GRESID.VAX [.UNIX]GRESID.VAX
+$ CONVERT/FDL=SYS$SYSTEM:UCX$CONVERT GRESID.PCM [.UNIX]GRESID.PCM
+$ CONVERT/FDL=SYS$SYSTEM:UCX$CONVERT GRESID.CNVX [.UNIX]GRESID.CNVX
+$ CONVERT/FDL=SYS$SYSTEM:UCX$CONVERT GRESID.MIPS [.UNIX]GRESID.MIPS
+$ CONVERT/FDL=SYS$SYSTEM:UCX$CONVERT GRESID.SUN4 [.UNIX]GRESID.SUN4
+$ CONVERT/FDL=SYS$SYSTEM:UCX$CONVERT GRESID.LNX [.UNIX]GRESID.LNX
+$ CONVERT/FDL=SYS$SYSTEM:UCX$CONVERT GRESID.DEC [.UNIX]GRESID.DEC
+$ CONVERT/FDL=SYS$SYSTEM:UCX$CONVERT RANDOM.VAX [.UNIX]RANDOM.VAX
+$ CONVERT/FDL=SYS$SYSTEM:UCX$CONVERT RANDOM.PCM [.UNIX]RANDOM.PCM
+$ CONVERT/FDL=SYS$SYSTEM:UCX$CONVERT RANDOM.CNVX [.UNIX]RANDOM.CNVX
+$ CONVERT/FDL=SYS$SYSTEM:UCX$CONVERT RANDOM.MIPS [.UNIX]RANDOM.MIPS
+$ CONVERT/FDL=SYS$SYSTEM:UCX$CONVERT RANDOM.SUN4 [.UNIX]RANDOM.SUN4
+$ CONVERT/FDL=SYS$SYSTEM:UCX$CONVERT RANDOM.LNX [.UNIX]RANDOM.LNX
+$ CONVERT/FDL=SYS$SYSTEM:UCX$CONVERT RANDOM.DEC [.UNIX]RANDOM.DEC
+$ CONVERT/FDL=SYS$SYSTEM:UCX$CONVERT RTL_RANDOM.C [.UNIX]RTL_RANDOM.C
+$ CONVERT/FDL=SYS$SYSTEM:UCX$CONVERT WAIT.VAX [.UNIX]WAIT.VAX
+$ CONVERT/FDL=SYS$SYSTEM:UCX$CONVERT WAIT.PCM [.UNIX]WAIT.PCM
+$ CONVERT/FDL=SYS$SYSTEM:UCX$CONVERT WAIT.CNVX [.UNIX]WAIT.CNVX
+$ CONVERT/FDL=SYS$SYSTEM:UCX$CONVERT WAIT.MIPS [.UNIX]WAIT.MIPS
+$ CONVERT/FDL=SYS$SYSTEM:UCX$CONVERT WAIT.SUN4 [.UNIX]WAIT.SUN4
+$ CONVERT/FDL=SYS$SYSTEM:UCX$CONVERT WAIT.LNX [.UNIX]WAIT.LNX
+$ CONVERT/FDL=SYS$SYSTEM:UCX$CONVERT WAIT.DEC [.UNIX]WAIT.DEC
+$!
+$! Copy the miscellaneous files
+$ CONVERT/FDL=SYS$SYSTEM:UCX$CONVERT MK [.UNIX]MK
+$ CONVERT/FDL=SYS$SYSTEM:UCX$CONVERT MAKEFILE [.UNIX]MAKEFILE
+$ CONVERT/FDL=SYS$SYSTEM:UCX$CONVERT SLA_LINK [.UNIX]SLA_LINK
+$ CONVERT/FDL=SYS$SYSTEM:UCX$CONVERT SLA_LINK_ADAM [.UNIX]SLA_LINK_ADAM
+$ CONVERT/FDL=SYS$SYSTEM:UCX$CONVERT SUN67.TEX [.UNIX]SUN67.TEX
+$ CONVERT/FDL=SYS$SYSTEM:UCX$CONVERT READ.ME [.UNIX]READ.ME
+$ CONVERT/FDL=SYS$SYSTEM:UCX$CONVERT SLA.NEWS [.UNIX]SLA.NEWS
+$ CONVERT/FDL=SYS$SYSTEM:UCX$CONVERT PC.BAT [.UNIX]PC.BAT
+$ CONVERT/FDL=SYS$SYSTEM:UCX$CONVERT REP.BAT [.UNIX]REP.BAT
+$ CONVERT/FDL=SYS$SYSTEM:UCX$CONVERT CREATE.COM [.UNIX]CREATE.COM
+$ CONVERT/FDL=SYS$SYSTEM:UCX$CONVERT PUT.COM [.UNIX]PUT.COM
+$ CONVERT/FDL=SYS$SYSTEM:UCX$CONVERT VAX_TO_UNIX.USH [.UNIX]VAX_TO_UNIX.
+$! ^^^
+$! The USH suffix prevents accidental
+$! execution of the script when the
+$! working directory is .RELEASE instead
+$! of .UNIX
+$!
+$! Explain what to do next
+$ COPY SYS$INPUT SYS$OUTPUT
+
+ To complete building the Unix release, please do the following:
+
+ 1) Login to the Unix machine.
+
+ 2) Locate the NFS-served directory corresponding to subdirectory
+ [.UNIX] of the current default directory.
+
+ 3) For efficiency, and to avoid possible problems involving case
+ sensitivity in filenames, copy all the files in that directory
+ to a scratch directory on the Unix machine.
+
+ 4) Type "vax_to_unix" to archive all the source files.
+
+$!
+$!----------------------------------------------------------------------
+$!
+$! Wrap up
+$ PURGE [...]
+$ SET FILE/TRUNCATE [...]*.*/EXCLUDE=CREATE.COM
+$ EXIT
diff --git a/src/slalib/cs2c.f b/src/slalib/cs2c.f
new file mode 100644
index 0000000..7d516c8
--- /dev/null
+++ b/src/slalib/cs2c.f
@@ -0,0 +1,41 @@
+ SUBROUTINE sla_CS2C (A, B, V)
+*+
+* - - - - -
+* C S 2 C
+* - - - - -
+*
+* Spherical coordinates to direction cosines (single precision)
+*
+* Given:
+* A,B real spherical coordinates in radians
+* (RA,Dec), (Long,Lat) etc
+*
+* Returned:
+* V real(3) x,y,z unit vector
+*
+* The spherical coordinates are longitude (+ve anticlockwise
+* looking from the +ve latitude pole) and latitude. The
+* Cartesian coordinates are right handed, with the x axis
+* at zero longitude and latitude, and the z axis at the
+* +ve latitude pole.
+*
+* P.T.Wallace Starlink October 1984
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL A,B,V(3)
+
+ REAL COSB
+
+
+
+ COSB=COS(B)
+
+ V(1)=COS(A)*COSB
+ V(2)=SIN(A)*COSB
+ V(3)=SIN(B)
+
+ END
diff --git a/src/slalib/cs2c6.f b/src/slalib/cs2c6.f
new file mode 100644
index 0000000..e0b9e06
--- /dev/null
+++ b/src/slalib/cs2c6.f
@@ -0,0 +1,56 @@
+ SUBROUTINE sla_CS2C6 (A, B, R, AD, BD, RD, V)
+*+
+* - - - - - -
+* C S 2 C 6
+* - - - - - -
+*
+* Conversion of position & velocity in spherical coordinates
+* to Cartesian coordinates (single precision)
+*
+* Given:
+* A r longitude (radians)
+* B r latitude (radians)
+* R r radial coordinate
+* AD r longitude derivative (radians per unit time)
+* BD r latitude derivative (radians per unit time)
+* RD r radial derivative
+*
+* Returned:
+* V r(6) Cartesian position & velocity vector
+*
+* P.T.Wallace Starlink November 1984
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL A,B,R,AD,BD,RD,V(6)
+
+ REAL SA,CA,SB,CB,RCB,X,Y,RBD,CBRD,W
+
+
+
+* Useful functions
+ SA=SIN(A)
+ CA=COS(A)
+ SB=SIN(B)
+ CB=COS(B)
+ RCB=R*CB
+ X=RCB*CA
+ Y=RCB*SA
+ RBD=R*BD
+ CBRD=CB*RD
+ W=RBD*SB-CB*RD
+
+* Position
+ V(1)=X
+ V(2)=Y
+ V(3)=R*SB
+
+* Velocity
+ V(4)=-Y*AD-W*CA
+ V(5)=X*AD-W*SA
+ V(6)=RBD*CB+SB*RD
+
+ END
diff --git a/src/slalib/ctf2d.f b/src/slalib/ctf2d.f
new file mode 100644
index 0000000..9280616
--- /dev/null
+++ b/src/slalib/ctf2d.f
@@ -0,0 +1,56 @@
+ SUBROUTINE sla_CTF2D (IHOUR, IMIN, SEC, DAYS, J)
+*+
+* - - - - - -
+* C T F 2 D
+* - - - - - -
+*
+* Convert hours, minutes, seconds to days (single precision)
+*
+* Given:
+* IHOUR int hours
+* IMIN int minutes
+* SEC real seconds
+*
+* Returned:
+* DAYS real interval in days
+* J int status: 0 = OK
+* 1 = IHOUR outside range 0-23
+* 2 = IMIN outside range 0-59
+* 3 = SEC outside range 0-59.999...
+*
+* Notes:
+*
+* 1) The result is computed even if any of the range checks
+* fail.
+*
+* 2) The sign must be dealt with outside this routine.
+*
+* P.T.Wallace Starlink November 1984
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ INTEGER IHOUR,IMIN
+ REAL SEC,DAYS
+ INTEGER J
+
+* Seconds per day
+ REAL D2S
+ PARAMETER (D2S=86400.0)
+
+
+
+* Preset status
+ J=0
+
+* Validate sec, min, hour
+ IF (SEC.LT.0.0.OR.SEC.GE.60.0) J=3
+ IF (IMIN.LT.0.OR.IMIN.GT.59) J=2
+ IF (IHOUR.LT.0.OR.IHOUR.GT.23) J=1
+
+* Compute interval
+ DAYS=(60.0*(60.0*REAL(IHOUR)+REAL(IMIN))+SEC)/D2S
+
+ END
diff --git a/src/slalib/ctf2r.f b/src/slalib/ctf2r.f
new file mode 100644
index 0000000..585d587
--- /dev/null
+++ b/src/slalib/ctf2r.f
@@ -0,0 +1,54 @@
+ SUBROUTINE sla_CTF2R (IHOUR, IMIN, SEC, RAD, J)
+*+
+* - - - - - -
+* C T F 2 R
+* - - - - - -
+*
+* Convert hours, minutes, seconds to radians (single precision)
+*
+* Given:
+* IHOUR int hours
+* IMIN int minutes
+* SEC real seconds
+*
+* Returned:
+* RAD real angle in radians
+* J int status: 0 = OK
+* 1 = IHOUR outside range 0-23
+* 2 = IMIN outside range 0-59
+* 3 = SEC outside range 0-59.999...
+*
+* Called:
+* sla_CTF2D
+*
+* Notes:
+*
+* 1) The result is computed even if any of the range checks
+* fail.
+*
+* 2) The sign must be dealt with outside this routine.
+*
+* P.T.Wallace Starlink November 1984
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ INTEGER IHOUR,IMIN
+ REAL SEC,RAD
+ INTEGER J
+
+ REAL TURNS
+
+* Turns to radians
+ REAL T2R
+ PARAMETER (T2R=6.283185307179586476925287)
+
+
+
+* Convert to turns then radians
+ CALL sla_CTF2D(IHOUR,IMIN,SEC,TURNS,J)
+ RAD=T2R*TURNS
+
+ END
diff --git a/src/slalib/daf2r.f b/src/slalib/daf2r.f
new file mode 100644
index 0000000..3f89864
--- /dev/null
+++ b/src/slalib/daf2r.f
@@ -0,0 +1,55 @@
+ SUBROUTINE sla_DAF2R (IDEG, IAMIN, ASEC, RAD, J)
+*+
+* - - - - - -
+* D A F 2 R
+* - - - - - -
+*
+* Convert degrees, arcminutes, arcseconds to radians
+* (double precision)
+*
+* Given:
+* IDEG int degrees
+* IAMIN int arcminutes
+* ASEC dp arcseconds
+*
+* Returned:
+* RAD dp angle in radians
+* J int status: 0 = OK
+* 1 = IDEG outside range 0-359
+* 2 = IAMIN outside range 0-59
+* 3 = ASEC outside range 0-59.999...
+*
+* Notes:
+* 1) The result is computed even if any of the range checks
+* fail.
+* 2) The sign must be dealt with outside this routine.
+*
+* P.T.Wallace Starlink 23 August 1996
+*
+* Copyright (C) 1996 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ INTEGER IDEG,IAMIN
+ DOUBLE PRECISION ASEC,RAD
+ INTEGER J
+
+* Arc seconds to radians
+ DOUBLE PRECISION AS2R
+ PARAMETER (AS2R=0.484813681109535994D-5)
+
+
+
+* Preset status
+ J=0
+
+* Validate arcsec, arcmin, deg
+ IF (ASEC.LT.0D0.OR.ASEC.GE.60D0) J=3
+ IF (IAMIN.LT.0.OR.IAMIN.GT.59) J=2
+ IF (IDEG.LT.0.OR.IDEG.GT.359) J=1
+
+* Compute angle
+ RAD=AS2R*(60D0*(60D0*DBLE(IDEG)+DBLE(IAMIN))+ASEC)
+
+ END
diff --git a/src/slalib/dafin.f b/src/slalib/dafin.f
new file mode 100644
index 0000000..e8dc456
--- /dev/null
+++ b/src/slalib/dafin.f
@@ -0,0 +1,163 @@
+ SUBROUTINE sla_DAFIN (STRING, IPTR, A, J)
+*+
+* - - - - - -
+* D A F I N
+* - - - - - -
+*
+* Sexagesimal character string to angle (double precision)
+*
+* Given:
+* STRING c*(*) string containing deg, arcmin, arcsec fields
+* IPTR i pointer to start of decode (1st = 1)
+*
+* Returned:
+* IPTR i advanced past the decoded angle
+* A d angle in radians
+* J i status: 0 = OK
+* +1 = default, A unchanged
+* -1 = bad degrees )
+* -2 = bad arcminutes ) (note 3)
+* -3 = bad arcseconds )
+*
+* Example:
+*
+* argument before after
+*
+* STRING '-57 17 44.806 12 34 56.7' unchanged
+* IPTR 1 16 (points to 12...)
+* A ? -1.00000D0
+* J ? 0
+*
+* A further call to sla_DAFIN, without adjustment of IPTR, will
+* decode the second angle, 12deg 34min 56.7sec.
+*
+* Notes:
+*
+* 1) The first three "fields" in STRING are degrees, arcminutes,
+* arcseconds, separated by spaces or commas. The degrees field
+* may be signed, but not the others. The decoding is carried
+* out by the DFLTIN routine and is free-format.
+*
+* 2) Successive fields may be absent, defaulting to zero. For
+* zero status, the only combinations allowed are degrees alone,
+* degrees and arcminutes, and all three fields present. If all
+* three fields are omitted, a status of +1 is returned and A is
+* unchanged. In all other cases A is changed.
+*
+* 3) Range checking:
+*
+* The degrees field is not range checked. However, it is
+* expected to be integral unless the other two fields are absent.
+*
+* The arcminutes field is expected to be 0-59, and integral if
+* the arcseconds field is present. If the arcseconds field
+* is absent, the arcminutes is expected to be 0-59.9999...
+*
+* The arcseconds field is expected to be 0-59.9999...
+*
+* 4) Decoding continues even when a check has failed. Under these
+* circumstances the field takes the supplied value, defaulting
+* to zero, and the result A is computed and returned.
+*
+* 5) Further fields after the three expected ones are not treated
+* as an error. The pointer IPTR is left in the correct state
+* for further decoding with the present routine or with DFLTIN
+* etc. See the example, above.
+*
+* 6) If STRING contains hours, minutes, seconds instead of degrees
+* etc, or if the required units are turns (or days) instead of
+* radians, the result A should be multiplied as follows:
+*
+* for to obtain multiply
+* STRING A in A by
+*
+* d ' " radians 1 = 1D0
+* d ' " turns 1/2pi = 0.1591549430918953358D0
+* h m s radians 15 = 15D0
+* h m s days 15/2pi = 2.3873241463784300365D0
+*
+* Called: sla_DFLTIN
+*
+* P.T.Wallace Starlink 1 August 1996
+*
+* Copyright (C) 1996 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ CHARACTER*(*) STRING
+ INTEGER IPTR
+ DOUBLE PRECISION A
+ INTEGER J
+
+ DOUBLE PRECISION AS2R
+ PARAMETER (AS2R=4.84813681109535993589914102358D-6)
+ INTEGER JF,JD,JM,JS
+ DOUBLE PRECISION DEG,ARCMIN,ARCSEC
+
+
+
+* Preset the status to OK
+ JF=0
+
+* Defaults
+ DEG=0D0
+ ARCMIN=0D0
+ ARCSEC=0D0
+
+* Decode degrees, arcminutes, arcseconds
+ CALL sla_DFLTIN(STRING,IPTR,DEG,JD)
+ IF (JD.GT.1) THEN
+ JF=-1
+ ELSE
+ CALL sla_DFLTIN(STRING,IPTR,ARCMIN,JM)
+ IF (JM.LT.0.OR.JM.GT.1) THEN
+ JF=-2
+ ELSE
+ CALL sla_DFLTIN(STRING,IPTR,ARCSEC,JS)
+ IF (JS.LT.0.OR.JS.GT.1) THEN
+ JF=-3
+
+* See if the combination of fields is credible
+ ELSE IF (JD.GT.0) THEN
+* No degrees: arcmin, arcsec ought also to be absent
+ IF (JM.EQ.0) THEN
+* Suspect arcmin
+ JF=-2
+ ELSE IF (JS.EQ.0) THEN
+* Suspect arcsec
+ JF=-3
+ ELSE
+* All three fields absent
+ JF=1
+ END IF
+* Degrees present: if arcsec present so ought arcmin to be
+ ELSE IF (JM.NE.0.AND.JS.EQ.0) THEN
+ JF=-3
+
+* Tests for range and integrality
+
+* Degrees
+ ELSE IF (JM.EQ.0.AND.DINT(DEG).NE.DEG) THEN
+ JF=-1
+* Arcminutes
+ ELSE IF ((JS.EQ.0.AND.DINT(ARCMIN).NE.ARCMIN).OR.
+ : ARCMIN.GE.60D0) THEN
+ JF=-2
+* Arcseconds
+ ELSE IF (ARCSEC.GE.60D0) THEN
+ JF=-3
+ END IF
+ END IF
+ END IF
+
+* Unless all three fields absent, compute angle value
+ IF (JF.LE.0) THEN
+ A=AS2R*(60D0*(60D0*ABS(DEG)+ARCMIN)+ARCSEC)
+ IF (JD.LT.0) A=-A
+ END IF
+
+* Return the status
+ J=JF
+
+ END
diff --git a/src/slalib/dat.f b/src/slalib/dat.f
new file mode 100644
index 0000000..423e59b
--- /dev/null
+++ b/src/slalib/dat.f
@@ -0,0 +1,219 @@
+ DOUBLE PRECISION FUNCTION sla_DAT (UTC)
+*+
+* - - - -
+* D A T
+* - - - -
+*
+* Increment to be applied to Coordinated Universal Time UTC to give
+* International Atomic Time TAI (double precision)
+*
+* Given:
+* UTC d UTC date as a modified JD (JD-2400000.5)
+*
+* Result: TAI-UTC in seconds
+*
+* Notes:
+*
+* 1 The UTC is specified to be a date rather than a time to indicate
+* that care needs to be taken not to specify an instant which lies
+* within a leap second. Though in most cases UTC can include the
+* fractional part, correct behaviour on the day of a leap second
+* can only be guaranteed up to the end of the second 23:59:59.
+*
+* 2 For epochs from 1961 January 1 onwards, the expressions from the
+* file ftp://maia.usno.navy.mil/ser7/tai-utc.dat are used.
+*
+* 3 The 5ms timestep at 1961 January 1 is taken from 2.58.1 (p87) of
+* the 1992 Explanatory Supplement.
+*
+* 4 UTC began at 1960 January 1.0 (JD 2436934.5) and it is improper
+* to call the routine with an earlier epoch. However, if this
+* is attempted, the TAI-UTC expression for the year 1960 is used.
+*
+*
+* :-----------------------------------------:
+* : :
+* : IMPORTANT :
+* : :
+* : This routine must be updated on each :
+* : occasion that a leap second is :
+* : announced :
+* : :
+* : Latest leap second: 1999 January 1 :
+* : :
+* :-----------------------------------------:
+*
+* P.T.Wallace Starlink 31 May 1999
+*
+* Copyright (C) 1999 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION UTC
+
+ DOUBLE PRECISION DT
+
+
+
+ IF (.FALSE.) THEN
+
+* - - - - - - - - - - - - - - - - - - - - - - *
+* Add new code here on each occasion that a *
+* leap second is announced, and update the *
+* preamble comments appropriately. *
+* - - - - - - - - - - - - - - - - - - - - - - *
+
+* 1999 January 1
+ ELSE IF (UTC.GE.51179D0) THEN
+ DT=32D0
+
+* 1997 July 1
+ ELSE IF (UTC.GE.50630D0) THEN
+ DT=31D0
+
+* 1996 January 1
+ ELSE IF (UTC.GE.50083D0) THEN
+ DT=30D0
+
+* 1994 July 1
+ ELSE IF (UTC.GE.49534D0) THEN
+ DT=29D0
+
+* 1993 July 1
+ ELSE IF (UTC.GE.49169D0) THEN
+ DT=28D0
+
+* 1992 July 1
+ ELSE IF (UTC.GE.48804D0) THEN
+ DT=27D0
+
+* 1991 January 1
+ ELSE IF (UTC.GE.48257D0) THEN
+ DT=26D0
+
+* 1990 January 1
+ ELSE IF (UTC.GE.47892D0) THEN
+ DT=25D0
+
+* 1988 January 1
+ ELSE IF (UTC.GE.47161D0) THEN
+ DT=24D0
+
+* 1985 July 1
+ ELSE IF (UTC.GE.46247D0) THEN
+ DT=23D0
+
+* 1983 July 1
+ ELSE IF (UTC.GE.45516D0) THEN
+ DT=22D0
+
+* 1982 July 1
+ ELSE IF (UTC.GE.45151D0) THEN
+ DT=21D0
+
+* 1981 July 1
+ ELSE IF (UTC.GE.44786D0) THEN
+ DT=20D0
+
+* 1980 January 1
+ ELSE IF (UTC.GE.44239D0) THEN
+ DT=19D0
+
+* 1979 January 1
+ ELSE IF (UTC.GE.43874D0) THEN
+ DT=18D0
+
+* 1978 January 1
+ ELSE IF (UTC.GE.43509D0) THEN
+ DT=17D0
+
+* 1977 January 1
+ ELSE IF (UTC.GE.43144D0) THEN
+ DT=16D0
+
+* 1976 January 1
+ ELSE IF (UTC.GE.42778D0) THEN
+ DT=15D0
+
+* 1975 January 1
+ ELSE IF (UTC.GE.42413D0) THEN
+ DT=14D0
+
+* 1974 January 1
+ ELSE IF (UTC.GE.42048D0) THEN
+ DT=13D0
+
+* 1973 January 1
+ ELSE IF (UTC.GE.41683D0) THEN
+ DT=12D0
+
+* 1972 July 1
+ ELSE IF (UTC.GE.41499D0) THEN
+ DT=11D0
+
+* 1972 January 1
+ ELSE IF (UTC.GE.41317D0) THEN
+ DT=10D0
+
+* 1968 February 1
+ ELSE IF (UTC.GE.39887D0) THEN
+ DT=4.2131700D0+(UTC-39126D0)*0.002592D0
+
+* 1966 January 1
+ ELSE IF (UTC.GE.39126D0) THEN
+ DT=4.3131700D0+(UTC-39126D0)*0.002592D0
+
+* 1965 September 1
+ ELSE IF (UTC.GE.39004D0) THEN
+ DT=3.8401300D0+(UTC-38761D0)*0.001296D0
+
+* 1965 July 1
+ ELSE IF (UTC.GE.38942D0) THEN
+ DT=3.7401300D0+(UTC-38761D0)*0.001296D0
+
+* 1965 March 1
+ ELSE IF (UTC.GE.38820D0) THEN
+ DT=3.6401300D0+(UTC-38761D0)*0.001296D0
+
+* 1965 January 1
+ ELSE IF (UTC.GE.38761D0) THEN
+ DT=3.5401300D0+(UTC-38761D0)*0.001296D0
+
+* 1964 September 1
+ ELSE IF (UTC.GE.38639D0) THEN
+ DT=3.4401300D0+(UTC-38761D0)*0.001296D0
+
+* 1964 April 1
+ ELSE IF (UTC.GE.38486D0) THEN
+ DT=3.3401300D0+(UTC-38761D0)*0.001296D0
+
+* 1964 January 1
+ ELSE IF (UTC.GE.38395D0) THEN
+ DT=3.2401300D0+(UTC-38761D0)*0.001296D0
+
+* 1963 November 1
+ ELSE IF (UTC.GE.38334D0) THEN
+ DT=1.9458580D0+(UTC-37665D0)*0.0011232D0
+
+* 1962 January 1
+ ELSE IF (UTC.GE.37665D0) THEN
+ DT=1.8458580D0+(UTC-37665D0)*0.0011232D0
+
+* 1961 August 1
+ ELSE IF (UTC.GE.37512D0) THEN
+ DT=1.3728180D0+(UTC-37300D0)*0.001296D0
+
+* 1961 January 1
+ ELSE IF (UTC.GE.37300D0) THEN
+ DT=1.4228180D0+(UTC-37300D0)*0.001296D0
+
+* Before that
+ ELSE
+ DT=1.4178180D0+(UTC-37300D0)*0.001296D0
+
+ END IF
+
+ sla_DAT=DT
+
+ END
diff --git a/src/slalib/dav2m.f b/src/slalib/dav2m.f
new file mode 100644
index 0000000..dc3f46c
--- /dev/null
+++ b/src/slalib/dav2m.f
@@ -0,0 +1,67 @@
+ SUBROUTINE sla_DAV2M (AXVEC, RMAT)
+*+
+* - - - - - -
+* D A V 2 M
+* - - - - - -
+*
+* Form the rotation matrix corresponding to a given axial vector.
+* (double precision)
+*
+* A rotation matrix describes a rotation about some arbitrary axis.
+* The axis is called the Euler axis, and the angle through which the
+* reference frame rotates is called the Euler angle. The axial
+* vector supplied to this routine has the same direction as the
+* Euler axis, and its magnitude is the Euler angle in radians.
+*
+* Given:
+* AXVEC d(3) axial vector (radians)
+*
+* Returned:
+* RMAT d(3,3) rotation matrix
+*
+* If AXVEC is null, the unit matrix is returned.
+*
+* The reference frame rotates clockwise as seen looking along
+* the axial vector from the origin.
+*
+* P.T.Wallace Starlink June 1989
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION AXVEC(3),RMAT(3,3)
+
+ DOUBLE PRECISION X,Y,Z,PHI,S,C,W
+
+
+
+* Euler angle - magnitude of axial vector - and functions
+ X = AXVEC(1)
+ Y = AXVEC(2)
+ Z = AXVEC(3)
+ PHI = SQRT(X*X+Y*Y+Z*Z)
+ S = SIN(PHI)
+ C = COS(PHI)
+ W = 1D0-C
+
+* Euler axis - direction of axial vector (perhaps null)
+ IF (PHI.NE.0D0) THEN
+ X = X/PHI
+ Y = Y/PHI
+ Z = Z/PHI
+ END IF
+
+* Compute the rotation matrix
+ RMAT(1,1) = X*X*W+C
+ RMAT(1,2) = X*Y*W+Z*S
+ RMAT(1,3) = X*Z*W-Y*S
+ RMAT(2,1) = X*Y*W-Z*S
+ RMAT(2,2) = Y*Y*W+C
+ RMAT(2,3) = Y*Z*W+X*S
+ RMAT(3,1) = X*Z*W+Y*S
+ RMAT(3,2) = Y*Z*W-X*S
+ RMAT(3,3) = Z*Z*W+C
+
+ END
diff --git a/src/slalib/dbear.f b/src/slalib/dbear.f
new file mode 100644
index 0000000..7cd5818
--- /dev/null
+++ b/src/slalib/dbear.f
@@ -0,0 +1,42 @@
+ DOUBLE PRECISION FUNCTION sla_DBEAR (A1, B1, A2, B2)
+*+
+* - - - - - -
+* D B E A R
+* - - - - - -
+*
+* Bearing (position angle) of one point on a sphere relative to another
+* (double precision)
+*
+* Given:
+* A1,B1 d spherical coordinates of one point
+* A2,B2 d spherical coordinates of the other point
+*
+* (The spherical coordinates are RA,Dec, Long,Lat etc, in radians.)
+*
+* The result is the bearing (position angle), in radians, of point
+* A2,B2 as seen from point A1,B1. It is in the range +/- pi. If
+* A2,B2 is due east of A1,B1 the bearing is +pi/2. Zero is returned
+* if the two points are coincident.
+*
+* P.T.Wallace Starlink 23 March 1991
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION A1,B1,A2,B2
+
+ DOUBLE PRECISION DA,X,Y
+
+
+ DA=A2-A1
+ Y=SIN(DA)*COS(B2)
+ X=SIN(B2)*COS(B1)-COS(B2)*SIN(B1)*COS(DA)
+ IF (X.NE.0D0.OR.Y.NE.0D0) THEN
+ sla_DBEAR=ATAN2(Y,X)
+ ELSE
+ sla_DBEAR=0D0
+ END IF
+
+ END
diff --git a/src/slalib/dbjin.f b/src/slalib/dbjin.f
new file mode 100644
index 0000000..60563e4
--- /dev/null
+++ b/src/slalib/dbjin.f
@@ -0,0 +1,113 @@
+ SUBROUTINE sla_DBJIN (STRING, NSTRT, DRESLT, J1, J2)
+*+
+* - - - - - -
+* D B J I N
+* - - - - - -
+*
+* Convert free-format input into double precision floating point,
+* using DFLTIN but with special syntax extensions.
+*
+* The purpose of the syntax extensions is to help cope with mixed
+* FK4 and FK5 data. In addition to the syntax accepted by DFLTIN,
+* the following two extensions are recognized by DBJIN:
+*
+* 1) A valid non-null field preceded by the character 'B'
+* (or 'b') is accepted.
+*
+* 2) A valid non-null field preceded by the character 'J'
+* (or 'j') is accepted.
+*
+* The calling program is notified of the incidence of either of these
+* extensions through an supplementary status argument. The rest of
+* the arguments are as for DFLTIN.
+*
+* Given:
+* STRING char string containing field to be decoded
+* NSTRT int pointer to 1st character of field in string
+*
+* Returned:
+* NSTRT int incremented
+* DRESLT double result
+* J1 int DFLTIN status: -1 = -OK
+* 0 = +OK
+* +1 = null field
+* +2 = error
+* J2 int syntax flag: 0 = normal DFLTIN syntax
+* +1 = 'B' or 'b'
+* +2 = 'J' or 'j'
+*
+* Called: sla_DFLTIN
+*
+* For details of the basic syntax, see sla_DFLTIN.
+*
+* P.T.Wallace Starlink 23 November 1995
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ CHARACTER*(*) STRING
+ INTEGER NSTRT
+ DOUBLE PRECISION DRESLT
+ INTEGER J1,J2
+
+ INTEGER J2A,LENSTR,NA,J1A,NB,J1B
+ CHARACTER C
+
+
+
+* Preset syntax flag
+ J2A=0
+
+* Length of string
+ LENSTR=LEN(STRING)
+
+* Pointer to current character
+ NA=NSTRT
+
+* Attempt normal decode
+ CALL sla_DFLTIN(STRING,NA,DRESLT,J1A)
+
+* Proceed only if pointer still within string
+ IF (NA.GE.1.AND.NA.LE.LENSTR) THEN
+
+* See if DFLTIN reported a null field
+ IF (J1A.EQ.1) THEN
+
+* It did: examine character it stuck on
+ C=STRING(NA:NA)
+ IF (C.EQ.'B'.OR.C.EQ.'b') THEN
+* 'B' - provisionally note
+ J2A=1
+ ELSE IF (C.EQ.'J'.OR.C.EQ.'j') THEN
+* 'J' - provisionally note
+ J2A=2
+ END IF
+
+* Following B or J, attempt to decode a number
+ IF (J2A.EQ.1.OR.J2A.EQ.2) THEN
+ NB=NA+1
+ CALL sla_DFLTIN(STRING,NB,DRESLT,J1B)
+
+* If successful, copy pointer and status
+ IF (J1B.LE.0) THEN
+ NA=NB
+ J1A=J1B
+* If not, forget about the B or J
+ ELSE
+ J2A=0
+ END IF
+
+ END IF
+
+ END IF
+
+ END IF
+
+* Return argument values and exit
+ NSTRT=NA
+ J1=J1A
+ J2=J2A
+
+ END
diff --git a/src/slalib/dc62s.f b/src/slalib/dc62s.f
new file mode 100644
index 0000000..2dd63ba
--- /dev/null
+++ b/src/slalib/dc62s.f
@@ -0,0 +1,82 @@
+ SUBROUTINE sla_DC62S (V, A, B, R, AD, BD, RD)
+*+
+* - - - - - -
+* D C 6 2 S
+* - - - - - -
+*
+* Conversion of position & velocity in Cartesian coordinates
+* to spherical coordinates (double precision)
+*
+* Given:
+* V d(6) Cartesian position & velocity vector
+*
+* Returned:
+* A d longitude (radians)
+* B d latitude (radians)
+* R d radial coordinate
+* AD d longitude derivative (radians per unit time)
+* BD d latitude derivative (radians per unit time)
+* RD d radial derivative
+*
+* P.T.Wallace Starlink 28 April 1996
+*
+* Copyright (C) 1996 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION V(6),A,B,R,AD,BD,RD
+
+ DOUBLE PRECISION X,Y,Z,XD,YD,ZD,RXY2,RXY,R2,XYP
+
+
+
+* Components of position/velocity vector
+ X=V(1)
+ Y=V(2)
+ Z=V(3)
+ XD=V(4)
+ YD=V(5)
+ ZD=V(6)
+
+* Component of R in XY plane squared
+ RXY2=X*X+Y*Y
+
+* Modulus squared
+ R2=RXY2+Z*Z
+
+* Protection against null vector
+ IF (R2.EQ.0D0) THEN
+ X=XD
+ Y=YD
+ Z=ZD
+ RXY2=X*X+Y*Y
+ R2=RXY2+Z*Z
+ END IF
+
+* Position and velocity in spherical coordinates
+ RXY=SQRT(RXY2)
+ XYP=X*XD+Y*YD
+ IF (RXY2.NE.0D0) THEN
+ A=ATAN2(Y,X)
+ B=ATAN2(Z,RXY)
+ AD=(X*YD-Y*XD)/RXY2
+ BD=(ZD*RXY2-Z*XYP)/(R2*RXY)
+ ELSE
+ A=0D0
+ IF (Z.NE.0D0) THEN
+ B=ATAN2(Z,RXY)
+ ELSE
+ B=0D0
+ END IF
+ AD=0D0
+ BD=0D0
+ END IF
+ R=SQRT(R2)
+ IF (R.NE.0D0) THEN
+ RD=(XYP+Z*ZD)/R
+ ELSE
+ RD=0D0
+ END IF
+
+ END
diff --git a/src/slalib/dcc2s.f b/src/slalib/dcc2s.f
new file mode 100644
index 0000000..9f5d0fe
--- /dev/null
+++ b/src/slalib/dcc2s.f
@@ -0,0 +1,53 @@
+ SUBROUTINE sla_DCC2S (V, A, B)
+*+
+* - - - - - -
+* D C C 2 S
+* - - - - - -
+*
+* Direction cosines to spherical coordinates (double precision)
+*
+* Given:
+* V d(3) x,y,z vector
+*
+* Returned:
+* A,B d spherical coordinates in radians
+*
+* The spherical coordinates are longitude (+ve anticlockwise
+* looking from the +ve latitude pole) and latitude. The
+* Cartesian coordinates are right handed, with the x axis
+* at zero longitude and latitude, and the z axis at the
+* +ve latitude pole.
+*
+* If V is null, zero A and B are returned.
+* At either pole, zero A is returned.
+*
+* P.T.Wallace Starlink July 1989
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION V(3),A,B
+
+ DOUBLE PRECISION X,Y,Z,R
+
+
+ X = V(1)
+ Y = V(2)
+ Z = V(3)
+ R = SQRT(X*X+Y*Y)
+
+ IF (R.EQ.0D0) THEN
+ A = 0D0
+ ELSE
+ A = ATAN2(Y,X)
+ END IF
+
+ IF (Z.EQ.0D0) THEN
+ B = 0D0
+ ELSE
+ B = ATAN2(Z,R)
+ END IF
+
+ END
diff --git a/src/slalib/dcmpf.f b/src/slalib/dcmpf.f
new file mode 100644
index 0000000..3689e25
--- /dev/null
+++ b/src/slalib/dcmpf.f
@@ -0,0 +1,140 @@
+ SUBROUTINE sla_DCMPF (COEFFS,XZ,YZ,XS,YS,PERP,ORIENT)
+*+
+* - - - - - -
+* D C M P F
+* - - - - - -
+*
+* Decompose an [X,Y] linear fit into its constituent parameters:
+* zero points, scales, nonperpendicularity and orientation.
+*
+* Given:
+* COEFFS d(6) transformation coefficients (see note)
+*
+* Returned:
+* XZ d x zero point
+* YZ d y zero point
+* XS d x scale
+* YS d y scale
+* PERP d nonperpendicularity (radians)
+* ORIENT d orientation (radians)
+*
+* The model relates two sets of [X,Y] coordinates as follows.
+* Naming the elements of COEFFS:
+*
+* COEFFS(1) = A
+* COEFFS(2) = B
+* COEFFS(3) = C
+* COEFFS(4) = D
+* COEFFS(5) = E
+* COEFFS(6) = F
+*
+* the model transforms coordinates [X1,Y1] into coordinates
+* [X2,Y2] as follows:
+*
+* X2 = A + B*X1 + C*Y1
+* Y2 = D + E*X1 + F*Y1
+*
+* The transformation can be decomposed into four steps:
+*
+* 1) Zero points:
+*
+* x' = XZ + X1
+* y' = YZ + Y1
+*
+* 2) Scales:
+*
+* x'' = XS*x'
+* y'' = YS*y'
+*
+* 3) Nonperpendicularity:
+*
+* x''' = cos(PERP/2)*x'' + sin(PERP/2)*y''
+* y''' = sin(PERP/2)*x'' + cos(PERP/2)*y''
+*
+* 4) Orientation:
+*
+* X2 = cos(ORIENT)*x''' + sin(ORIENT)*y'''
+* Y2 =-sin(ORIENT)*y''' + cos(ORIENT)*y'''
+*
+* See also sla_FITXY, sla_PXY, sla_INVF, sla_XY2XY
+*
+* P.T.Wallace Starlink 14 August 1994
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION COEFFS(6),XZ,YZ,XS,YS,PERP,ORIENT
+
+ DOUBLE PRECISION A,B,C,D,E,F,RB2E2,RC2F2,XSC,YSC,P1,P2,P,WS,WC,
+ : OR,HP,SHP,CHP,SOR,COR,DET,X0,Y0
+
+
+
+* Copy the six coefficients
+ A=COEFFS(1)
+ B=COEFFS(2)
+ C=COEFFS(3)
+ D=COEFFS(4)
+ E=COEFFS(5)
+ F=COEFFS(6)
+
+* Scales
+ RB2E2=SQRT(B*B+E*E)
+ RC2F2=SQRT(C*C+F*F)
+ IF (B*F-C*E.GE.0D0) THEN
+ XSC=RB2E2
+ ELSE
+ B=-B
+ C=-C
+ XSC=-RB2E2
+ END IF
+ YSC=RC2F2
+
+* Non-perpendicularity
+ IF (C.NE.0D0.OR.F.NE.0D0) THEN
+ P1=ATAN2(C,F)
+ ELSE
+ P1=0D0
+ END IF
+ IF (E.NE.0D0.OR.B.NE.0D0) THEN
+ P2=ATAN2(E,B)
+ ELSE
+ P2=0D0
+ END IF
+ P=P1+P2
+
+* Orientation
+ WS=C*RB2E2-E*RC2F2
+ WC=B*RC2F2+F*RB2E2
+ IF (WS.NE.0D0.OR.WC.NE.0D0) THEN
+ OR=ATAN2(WS,WC)
+ ELSE
+ OR=0D0
+ END IF
+
+* Zero corrections
+ HP=P/2D0
+ SHP=SIN(HP)
+ CHP=COS(HP)
+ SOR=SIN(OR)
+ COR=COS(OR)
+ DET=XSC*YSC*(CHP+SHP)*(CHP-SHP)
+ IF (ABS(DET).GT.0D0) THEN
+ X0=YSC*(A*(CHP*COR-SHP*SOR)-D*(CHP*SOR+SHP*COR))/DET
+ Y0=XSC*(A*(CHP*SOR-SHP*COR)+D*(CHP*COR+SHP*SOR))/DET
+ ELSE
+ X0=0D0
+ Y0=0D0
+ END IF
+
+* Results
+ XZ=X0
+ YZ=Y0
+ XS=XSC
+ YS=YSC
+ PERP=P
+ ORIENT=OR
+
+ END
diff --git a/src/slalib/dcs2c.f b/src/slalib/dcs2c.f
new file mode 100644
index 0000000..5c20009
--- /dev/null
+++ b/src/slalib/dcs2c.f
@@ -0,0 +1,41 @@
+ SUBROUTINE sla_DCS2C (A, B, V)
+*+
+* - - - - - -
+* D C S 2 C
+* - - - - - -
+*
+* Spherical coordinates to direction cosines (double precision)
+*
+* Given:
+* A,B dp spherical coordinates in radians
+* (RA,Dec), (Long,Lat) etc
+*
+* Returned:
+* V dp(3) x,y,z unit vector
+*
+* The spherical coordinates are longitude (+ve anticlockwise
+* looking from the +ve latitude pole) and latitude. The
+* Cartesian coordinates are right handed, with the x axis
+* at zero longitude and latitude, and the z axis at the
+* +ve latitude pole.
+*
+* P.T.Wallace Starlink October 1984
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION A,B,V(3)
+
+ DOUBLE PRECISION COSB
+
+
+
+ COSB=COS(B)
+
+ V(1)=COS(A)*COSB
+ V(2)=SIN(A)*COSB
+ V(3)=SIN(B)
+
+ END
diff --git a/src/slalib/dd2tf.f b/src/slalib/dd2tf.f
new file mode 100644
index 0000000..2fc0db6
--- /dev/null
+++ b/src/slalib/dd2tf.f
@@ -0,0 +1,89 @@
+ SUBROUTINE sla_DD2TF (NDP, DAYS, SIGN, IHMSF)
+*+
+* - - - - - -
+* D D 2 T F
+* - - - - - -
+*
+* Convert an interval in days into hours, minutes, seconds
+* (double precision)
+*
+* Given:
+* NDP i number of decimal places of seconds
+* DAYS d interval in days
+*
+* Returned:
+* SIGN c '+' or '-'
+* IHMSF i(4) hours, minutes, seconds, fraction
+*
+* Notes:
+*
+* 1) NDP less than zero is interpreted as zero.
+*
+* 2) The largest useful value for NDP is determined by the size
+* of DAYS, the format of DOUBLE PRECISION floating-point numbers
+* on the target machine, and the risk of overflowing IHMSF(4).
+* For example, on the VAX, for DAYS up to 1D0, the available
+* floating-point precision corresponds roughly to NDP=12.
+* However, the practical limit is NDP=9, set by the capacity of
+* the 32-bit integer IHMSF(4).
+*
+* 3) The absolute value of DAYS may exceed 1D0. In cases where it
+* does not, it is up to the caller to test for and handle the
+* case where DAYS is very nearly 1D0 and rounds up to 24 hours,
+* by testing for IHMSF(1)=24 and setting IHMSF(1-4) to zero.
+*
+* P.T.Wallace Starlink 19 March 1999
+*
+* Copyright (C) 1999 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ INTEGER NDP
+ DOUBLE PRECISION DAYS
+ CHARACTER SIGN*(*)
+ INTEGER IHMSF(4)
+
+* Days to seconds
+ DOUBLE PRECISION D2S
+ PARAMETER (D2S=86400D0)
+
+ INTEGER NRS,N
+ DOUBLE PRECISION RS,RM,RH,A,AH,AM,AS,AF
+
+
+
+* Handle sign
+ IF (DAYS.GE.0D0) THEN
+ SIGN='+'
+ ELSE
+ SIGN='-'
+ END IF
+
+* Field units in terms of least significant figure
+ NRS=1
+ DO N=1,NDP
+ NRS=NRS*10
+ END DO
+ RS=DBLE(NRS)
+ RM=RS*60D0
+ RH=RM*60D0
+
+* Round interval and express in smallest units required
+ A=ANINT(RS*D2S*ABS(DAYS))
+
+* Separate into fields
+ AH=AINT(A/RH)
+ A=A-AH*RH
+ AM=AINT(A/RM)
+ A=A-AM*RM
+ AS=AINT(A/RS)
+ AF=A-AS*RS
+
+* Return results
+ IHMSF(1)=MAX(NINT(AH),0)
+ IHMSF(2)=MAX(MIN(NINT(AM),59),0)
+ IHMSF(3)=MAX(MIN(NINT(AS),59),0)
+ IHMSF(4)=MAX(NINT(MIN(AF,RS-1D0)),0)
+
+ END
diff --git a/src/slalib/de2h.f b/src/slalib/de2h.f
new file mode 100644
index 0000000..138a3f7
--- /dev/null
+++ b/src/slalib/de2h.f
@@ -0,0 +1,89 @@
+ SUBROUTINE sla_DE2H (HA, DEC, PHI, AZ, EL)
+*+
+* - - - - -
+* D E 2 H
+* - - - - -
+*
+* Equatorial to horizon coordinates: HA,Dec to Az,El
+*
+* (double precision)
+*
+* Given:
+* HA d hour angle
+* DEC d declination
+* PHI d observatory latitude
+*
+* Returned:
+* AZ d azimuth
+* EL d elevation
+*
+* Notes:
+*
+* 1) All the arguments are angles in radians.
+*
+* 2) Azimuth is returned in the range 0-2pi; north is zero,
+* and east is +pi/2. Elevation is returned in the range
+* +/-pi/2.
+*
+* 3) The latitude must be geodetic. In critical applications,
+* corrections for polar motion should be applied.
+*
+* 4) In some applications it will be important to specify the
+* correct type of hour angle and declination in order to
+* produce the required type of azimuth and elevation. In
+* particular, it may be important to distinguish between
+* elevation as affected by refraction, which would
+* require the "observed" HA,Dec, and the elevation
+* in vacuo, which would require the "topocentric" HA,Dec.
+* If the effects of diurnal aberration can be neglected, the
+* "apparent" HA,Dec may be used instead of the topocentric
+* HA,Dec.
+*
+* 5) No range checking of arguments is carried out.
+*
+* 6) In applications which involve many such calculations, rather
+* than calling the present routine it will be more efficient to
+* use inline code, having previously computed fixed terms such
+* as sine and cosine of latitude, and (for tracking a star)
+* sine and cosine of declination.
+*
+* P.T.Wallace Starlink 9 July 1994
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION HA,DEC,PHI,AZ,EL
+
+ DOUBLE PRECISION D2PI
+ PARAMETER (D2PI=6.283185307179586476925286766559D0)
+
+ DOUBLE PRECISION SH,CH,SD,CD,SP,CP,X,Y,Z,R,A
+
+
+* Useful trig functions
+ SH=SIN(HA)
+ CH=COS(HA)
+ SD=SIN(DEC)
+ CD=COS(DEC)
+ SP=SIN(PHI)
+ CP=COS(PHI)
+
+* Az,El as x,y,z
+ X=-CH*CD*SP+SD*CP
+ Y=-SH*CD
+ Z=CH*CD*CP+SD*SP
+
+* To spherical
+ R=SQRT(X*X+Y*Y)
+ IF (R.EQ.0D0) THEN
+ A=0D0
+ ELSE
+ A=ATAN2(Y,X)
+ END IF
+ IF (A.LT.0D0) A=A+D2PI
+ AZ=A
+ EL=ATAN2(Z,R)
+
+ END
diff --git a/src/slalib/deuler.f b/src/slalib/deuler.f
new file mode 100644
index 0000000..6ce1479
--- /dev/null
+++ b/src/slalib/deuler.f
@@ -0,0 +1,163 @@
+ SUBROUTINE sla_DEULER (ORDER, PHI, THETA, PSI, RMAT)
+*+
+* - - - - - - -
+* D E U L E R
+* - - - - - - -
+*
+* Form a rotation matrix from the Euler angles - three successive
+* rotations about specified Cartesian axes (double precision)
+*
+* Given:
+* ORDER c*(*) specifies about which axes the rotations occur
+* PHI d 1st rotation (radians)
+* THETA d 2nd rotation ( " )
+* PSI d 3rd rotation ( " )
+*
+* Returned:
+* RMAT d(3,3) rotation matrix
+*
+* A rotation is positive when the reference frame rotates
+* anticlockwise as seen looking towards the origin from the
+* positive region of the specified axis.
+*
+* The characters of ORDER define which axes the three successive
+* rotations are about. A typical value is 'ZXZ', indicating that
+* RMAT is to become the direction cosine matrix corresponding to
+* rotations of the reference frame through PHI radians about the
+* old Z-axis, followed by THETA radians about the resulting X-axis,
+* then PSI radians about the resulting Z-axis.
+*
+* The axis names can be any of the following, in any order or
+* combination: X, Y, Z, uppercase or lowercase, 1, 2, 3. Normal
+* axis labelling/numbering conventions apply; the xyz (=123)
+* triad is right-handed. Thus, the 'ZXZ' example given above
+* could be written 'zxz' or '313' (or even 'ZxZ' or '3xZ'). ORDER
+* is terminated by length or by the first unrecognized character.
+*
+* Fewer than three rotations are acceptable, in which case the later
+* angle arguments are ignored. If all rotations are zero, the
+* identity matrix is produced.
+*
+* P.T.Wallace Starlink 23 May 1997
+*
+* Copyright (C) 1997 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ CHARACTER*(*) ORDER
+ DOUBLE PRECISION PHI,THETA,PSI,RMAT(3,3)
+
+ INTEGER J,I,L,N,K
+ DOUBLE PRECISION RESULT(3,3),ROTN(3,3),ANGLE,S,C,W,WM(3,3)
+ CHARACTER AXIS
+
+
+
+* Initialize result matrix
+ DO J=1,3
+ DO I=1,3
+ IF (I.NE.J) THEN
+ RESULT(I,J) = 0D0
+ ELSE
+ RESULT(I,J) = 1D0
+ END IF
+ END DO
+ END DO
+
+* Establish length of axis string
+ L = LEN(ORDER)
+
+* Look at each character of axis string until finished
+ DO N=1,3
+ IF (N.LE.L) THEN
+
+* Initialize rotation matrix for the current rotation
+ DO J=1,3
+ DO I=1,3
+ IF (I.NE.J) THEN
+ ROTN(I,J) = 0D0
+ ELSE
+ ROTN(I,J) = 1D0
+ END IF
+ END DO
+ END DO
+
+* Pick up the appropriate Euler angle and take sine & cosine
+ IF (N.EQ.1) THEN
+ ANGLE = PHI
+ ELSE IF (N.EQ.2) THEN
+ ANGLE = THETA
+ ELSE
+ ANGLE = PSI
+ END IF
+ S = SIN(ANGLE)
+ C = COS(ANGLE)
+
+* Identify the axis
+ AXIS = ORDER(N:N)
+ IF (AXIS.EQ.'X'.OR.
+ : AXIS.EQ.'x'.OR.
+ : AXIS.EQ.'1') THEN
+
+* Matrix for x-rotation
+ ROTN(2,2) = C
+ ROTN(2,3) = S
+ ROTN(3,2) = -S
+ ROTN(3,3) = C
+
+ ELSE IF (AXIS.EQ.'Y'.OR.
+ : AXIS.EQ.'y'.OR.
+ : AXIS.EQ.'2') THEN
+
+* Matrix for y-rotation
+ ROTN(1,1) = C
+ ROTN(1,3) = -S
+ ROTN(3,1) = S
+ ROTN(3,3) = C
+
+ ELSE IF (AXIS.EQ.'Z'.OR.
+ : AXIS.EQ.'z'.OR.
+ : AXIS.EQ.'3') THEN
+
+* Matrix for z-rotation
+ ROTN(1,1) = C
+ ROTN(1,2) = S
+ ROTN(2,1) = -S
+ ROTN(2,2) = C
+
+ ELSE
+
+* Unrecognized character - fake end of string
+ L = 0
+
+ END IF
+
+* Apply the current rotation (matrix ROTN x matrix RESULT)
+ DO I=1,3
+ DO J=1,3
+ W = 0D0
+ DO K=1,3
+ W = W+ROTN(I,K)*RESULT(K,J)
+ END DO
+ WM(I,J) = W
+ END DO
+ END DO
+ DO J=1,3
+ DO I=1,3
+ RESULT(I,J) = WM(I,J)
+ END DO
+ END DO
+
+ END IF
+
+ END DO
+
+* Copy the result
+ DO J=1,3
+ DO I=1,3
+ RMAT(I,J) = RESULT(I,J)
+ END DO
+ END DO
+
+ END
diff --git a/src/slalib/dfltin.f b/src/slalib/dfltin.f
new file mode 100644
index 0000000..1fbdb94
--- /dev/null
+++ b/src/slalib/dfltin.f
@@ -0,0 +1,280 @@
+ SUBROUTINE sla_DFLTIN (STRING, NSTRT, DRESLT, JFLAG)
+*+
+* - - - - - - -
+* D F L T I N
+* - - - - - - -
+*
+* Convert free-format input into double precision floating point
+*
+* Given:
+* STRING c string containing number to be decoded
+* NSTRT i pointer to where decoding is to start
+* DRESLT d current value of result
+*
+* Returned:
+* NSTRT i advanced to next number
+* DRESLT d result
+* JFLAG i status: -1 = -OK, 0 = +OK, 1 = null, 2 = error
+*
+* Notes:
+*
+* 1 The reason DFLTIN has separate OK status values for +
+* and - is to enable minus zero to be detected. This is
+* of crucial importance when decoding mixed-radix numbers.
+* For example, an angle expressed as deg, arcmin, arcsec
+* may have a leading minus sign but a zero degrees field.
+*
+* 2 A TAB is interpreted as a space, and lowercase characters
+* are interpreted as uppercase.
+*
+* 3 The basic format is the sequence of fields #^.^@#^, where
+* # is a sign character + or -, ^ means a string of decimal
+* digits, and @, which indicates an exponent, means D or E.
+* Various combinations of these fields can be omitted, and
+* embedded blanks are permissible in certain places.
+*
+* 4 Spaces:
+*
+* . Leading spaces are ignored.
+*
+* . Embedded spaces are allowed only after +, -, D or E,
+* and after the decomal point if the first sequence of
+* digits is absent.
+*
+* . Trailing spaces are ignored; the first signifies
+* end of decoding and subsequent ones are skipped.
+*
+* 5 Delimiters:
+*
+* . Any character other than +,-,0-9,.,D,E or space may be
+* used to signal the end of the number and terminate
+* decoding.
+*
+* . Comma is recognized by DFLTIN as a special case; it
+* is skipped, leaving the pointer on the next character.
+* See 13, below.
+*
+* 6 Both signs are optional. The default is +.
+*
+* 7 The mantissa ^.^ defaults to 1.
+*
+* 8 The exponent @#^ defaults to D0.
+*
+* 9 The strings of decimal digits may be of any length.
+*
+* 10 The decimal point is optional for whole numbers.
+*
+* 11 A "null result" occurs when the string of characters being
+* decoded does not begin with +,-,0-9,.,D or E, or consists
+* entirely of spaces. When this condition is detected, JFLAG
+* is set to 1 and DRESLT is left untouched.
+*
+* 12 NSTRT = 1 for the first character in the string.
+*
+* 13 On return from DFLTIN, NSTRT is set ready for the next
+* decode - following trailing blanks and any comma. If a
+* delimiter other than comma is being used, NSTRT must be
+* incremented before the next call to DFLTIN, otherwise
+* all subsequent calls will return a null result.
+*
+* 14 Errors (JFLAG=2) occur when:
+*
+* . a +, -, D or E is left unsatisfied; or
+*
+* . the decimal point is present without at least
+* one decimal digit before or after it; or
+*
+* . an exponent more than 100 has been presented.
+*
+* 15 When an error has been detected, NSTRT is left
+* pointing to the character following the last
+* one used before the error came to light. This
+* may be after the point at which a more sophisticated
+* program could have detected the error. For example,
+* DFLTIN does not detect that '1D999' is unacceptable
+* (on a computer where this is so) until the entire number
+* has been decoded.
+*
+* 16 Certain highly unlikely combinations of mantissa &
+* exponent can cause arithmetic faults during the
+* decode, in some cases despite the fact that they
+* together could be construed as a valid number.
+*
+* 17 Decoding is left to right, one pass.
+*
+* 18 See also FLOTIN and INTIN
+*
+* Called: sla__IDCHF
+*
+* P.T.Wallace Starlink 18 March 1999
+*
+* Copyright (C) 1999 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ CHARACTER*(*) STRING
+ INTEGER NSTRT
+ DOUBLE PRECISION DRESLT
+ INTEGER JFLAG
+
+ INTEGER NPTR,MSIGN,NEXP,NDP,NVEC,NDIGIT,ISIGNX,J
+ DOUBLE PRECISION DMANT,DIGIT
+
+
+
+* Current character
+ NPTR=NSTRT
+
+* Set defaults: mantissa & sign, exponent & sign, decimal place count
+ DMANT=0D0
+ MSIGN=1
+ NEXP=0
+ ISIGNX=1
+ NDP=0
+
+* Look for sign
+ 100 CONTINUE
+ CALL sla__IDCHF(STRING,NPTR,NVEC,NDIGIT,DIGIT)
+ GO TO ( 400, 100, 800, 500, 300, 200, 9110, 9100, 9110),NVEC
+* 0-9 SP D/E . + - , ELSE END
+
+* Negative
+ 200 CONTINUE
+ MSIGN=-1
+
+* Look for first leading decimal
+ 300 CONTINUE
+ CALL sla__IDCHF(STRING,NPTR,NVEC,NDIGIT,DIGIT)
+ GO TO ( 400, 300, 800, 500, 9200, 9200, 9200, 9200, 9210),NVEC
+* 0-9 SP D/E . + - , ELSE END
+
+* Accept leading decimals
+ 400 CONTINUE
+ DMANT=DMANT*1D1+DIGIT
+ CALL sla__IDCHF(STRING,NPTR,NVEC,NDIGIT,DIGIT)
+ GO TO ( 400, 1310, 900, 600, 1300, 1300, 1300, 1300, 1310),NVEC
+* 0-9 SP D/E . + - , ELSE END
+
+* Look for decimal when none preceded the point
+ 500 CONTINUE
+ CALL sla__IDCHF(STRING,NPTR,NVEC,NDIGIT,DIGIT)
+ GO TO ( 700, 500, 9200, 9200, 9200, 9200, 9200, 9200, 9210),NVEC
+* 0-9 SP D/E . + - , ELSE END
+
+* Look for trailing decimals
+ 600 CONTINUE
+ CALL sla__IDCHF(STRING,NPTR,NVEC,NDIGIT,DIGIT)
+ GO TO ( 700, 1310, 900, 1300, 1300, 1300, 1300, 1300, 1310),NVEC
+* 0-9 SP D/E . + - , ELSE END
+
+* Accept trailing decimals
+ 700 CONTINUE
+ NDP=NDP+1
+ DMANT=DMANT*1D1+DIGIT
+ GO TO 600
+
+* Exponent symbol first in field: default mantissa to 1
+ 800 CONTINUE
+ DMANT=1D0
+
+* Look for sign of exponent
+ 900 CONTINUE
+ CALL sla__IDCHF(STRING,NPTR,NVEC,NDIGIT,DIGIT)
+ GO TO (1200, 900, 9200, 9200, 1100, 1000, 9200, 9200, 9210),NVEC
+* 0-9 SP D/E . + - , ELSE END
+
+* Exponent negative
+ 1000 CONTINUE
+ ISIGNX=-1
+
+* Look for first digit of exponent
+ 1100 CONTINUE
+ CALL sla__IDCHF(STRING,NPTR,NVEC,NDIGIT,DIGIT)
+ GO TO (1200, 1100, 9200, 9200, 9200, 9200, 9200, 9200, 9210),NVEC
+* 0-9 SP D/E . + - , ELSE END
+
+* Use exponent digit
+ 1200 CONTINUE
+ NEXP=NEXP*10+NDIGIT
+ IF (NEXP.GT.100) GO TO 9200
+
+* Look for subsequent digits of exponent
+ CALL sla__IDCHF(STRING,NPTR,NVEC,NDIGIT,DIGIT)
+ GO TO (1200, 1310, 1300, 1300, 1300, 1300, 1300, 1300, 1310),NVEC
+* 0-9 SP D/E . + - , ELSE END
+
+* Combine exponent and decimal place count
+ 1300 CONTINUE
+ NPTR=NPTR-1
+ 1310 CONTINUE
+ NEXP=NEXP*ISIGNX-NDP
+
+* Skip if net exponent negative
+ IF (NEXP.LT.0) GO TO 1500
+
+* Positive exponent: scale up
+ 1400 CONTINUE
+ IF (NEXP.LT.10) GO TO 1410
+ DMANT=DMANT*1D10
+ NEXP=NEXP-10
+ GO TO 1400
+ 1410 CONTINUE
+ IF (NEXP.LT.1) GO TO 1600
+ DMANT=DMANT*1D1
+ NEXP=NEXP-1
+ GO TO 1410
+
+* Negative exponent: scale down
+ 1500 CONTINUE
+ IF (NEXP.GT.-10) GO TO 1510
+ DMANT=DMANT/1D10
+ NEXP=NEXP+10
+ GO TO 1500
+ 1510 CONTINUE
+ IF (NEXP.GT.-1) GO TO 1600
+ DMANT=DMANT/1D1
+ NEXP=NEXP+1
+ GO TO 1510
+
+* Get result & status
+ 1600 CONTINUE
+ J=0
+ IF (MSIGN.EQ.1) GO TO 1610
+ J=-1
+ DMANT=-DMANT
+ 1610 CONTINUE
+ DRESLT=DMANT
+
+* Skip to end of field
+ 1620 CONTINUE
+ CALL sla__IDCHF(STRING,NPTR,NVEC,NDIGIT,DIGIT)
+ GO TO (1720, 1620, 1720, 1720, 1720, 1720, 9900, 1720, 9900),NVEC
+* 0-9 SP D/E . + - , ELSE END
+
+ 1720 CONTINUE
+ NPTR=NPTR-1
+ GO TO 9900
+
+
+* Exits
+
+* Null field
+ 9100 CONTINUE
+ NPTR=NPTR-1
+ 9110 CONTINUE
+ J=1
+ GO TO 9900
+
+* Errors
+ 9200 CONTINUE
+ NPTR=NPTR-1
+ 9210 CONTINUE
+ J=2
+
+* Return
+ 9900 CONTINUE
+ NSTRT=NPTR
+ JFLAG=J
+
+ END
diff --git a/src/slalib/dh2e.f b/src/slalib/dh2e.f
new file mode 100644
index 0000000..688a087
--- /dev/null
+++ b/src/slalib/dh2e.f
@@ -0,0 +1,83 @@
+ SUBROUTINE sla_DH2E (AZ, EL, PHI, HA, DEC)
+*+
+* - - - - -
+* D E 2 H
+* - - - - -
+*
+* Horizon to equatorial coordinates: Az,El to HA,Dec
+*
+* (double precision)
+*
+* Given:
+* AZ d azimuth
+* EL d elevation
+* PHI d observatory latitude
+*
+* Returned:
+* HA d hour angle
+* DEC d declination
+*
+* Notes:
+*
+* 1) All the arguments are angles in radians.
+*
+* 2) The sign convention for azimuth is north zero, east +pi/2.
+*
+* 3) HA is returned in the range +/-pi. Declination is returned
+* in the range +/-pi/2.
+*
+* 4) The latitude is (in principle) geodetic. In critical
+* applications, corrections for polar motion should be applied.
+*
+* 5) In some applications it will be important to specify the
+* correct type of elevation in order to produce the required
+* type of HA,Dec. In particular, it may be important to
+* distinguish between the elevation as affected by refraction,
+* which will yield the "observed" HA,Dec, and the elevation
+* in vacuo, which will yield the "topocentric" HA,Dec. If the
+* effects of diurnal aberration can be neglected, the
+* topocentric HA,Dec may be used as an approximation to the
+* "apparent" HA,Dec.
+*
+* 6) No range checking of arguments is done.
+*
+* 7) In applications which involve many such calculations, rather
+* than calling the present routine it will be more efficient to
+* use inline code, having previously computed fixed terms such
+* as sine and cosine of latitude.
+*
+* P.T.Wallace Starlink 21 February 1996
+*
+* Copyright (C) 1996 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION AZ,EL,PHI,HA,DEC
+
+ DOUBLE PRECISION SA,CA,SE,CE,SP,CP,X,Y,Z,R
+
+
+* Useful trig functions
+ SA=SIN(AZ)
+ CA=COS(AZ)
+ SE=SIN(EL)
+ CE=COS(EL)
+ SP=SIN(PHI)
+ CP=COS(PHI)
+
+* HA,Dec as x,y,z
+ X=-CA*CE*SP+SE*CP
+ Y=-SA*CE
+ Z=CA*CE*CP+SE*SP
+
+* To HA,Dec
+ R=SQRT(X*X+Y*Y)
+ IF (R.EQ.0D0) THEN
+ HA=0D0
+ ELSE
+ HA=ATAN2(Y,X)
+ END IF
+ DEC=ATAN2(Z,R)
+
+ END
diff --git a/src/slalib/dimxv.f b/src/slalib/dimxv.f
new file mode 100644
index 0000000..3da8fad
--- /dev/null
+++ b/src/slalib/dimxv.f
@@ -0,0 +1,51 @@
+ SUBROUTINE sla_DIMXV (DM, VA, VB)
+*+
+* - - - - - -
+* D I M X V
+* - - - - - -
+*
+* Performs the 3-D backward unitary transformation:
+*
+* vector VB = (inverse of matrix DM) * vector VA
+*
+* (double precision)
+*
+* (n.b. the matrix must be unitary, as this routine assumes that
+* the inverse and transpose are identical)
+*
+* Given:
+* DM dp(3,3) matrix
+* VA dp(3) vector
+*
+* Returned:
+* VB dp(3) result vector
+*
+* P.T.Wallace Starlink March 1986
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION DM(3,3),VA(3),VB(3)
+
+ INTEGER I,J
+ DOUBLE PRECISION W,VW(3)
+
+
+
+* Inverse of matrix DM * vector VA -> vector VW
+ DO J=1,3
+ W=0D0
+ DO I=1,3
+ W=W+DM(I,J)*VA(I)
+ END DO
+ VW(J)=W
+ END DO
+
+* Vector VW -> vector VB
+ DO J=1,3
+ VB(J)=VW(J)
+ END DO
+
+ END
diff --git a/src/slalib/djcal.f b/src/slalib/djcal.f
new file mode 100644
index 0000000..7da1a07
--- /dev/null
+++ b/src/slalib/djcal.f
@@ -0,0 +1,77 @@
+ SUBROUTINE sla_DJCAL (NDP, DJM, IYMDF, J)
+*+
+* - - - - - -
+* D J C A L
+* - - - - - -
+*
+* Modified Julian Date to Gregorian Calendar, expressed
+* in a form convenient for formatting messages (namely
+* rounded to a specified precision, and with the fields
+* stored in a single array)
+*
+* Given:
+* NDP i number of decimal places of days in fraction
+* DJM d modified Julian Date (JD-2400000.5)
+*
+* Returned:
+* IYMDF i(4) year, month, day, fraction in Gregorian
+* calendar
+* J i status: nonzero = out of range
+*
+* Any date after 4701BC March 1 is accepted.
+*
+* NDP should be 4 or less if internal overflows are to be avoided
+* on machines which use 32-bit integers.
+*
+* The algorithm is derived from that of Hatcher 1984
+* (QJRAS 25, 53-55).
+*
+* P.T.Wallace Starlink 27 April 1998
+*
+* Copyright (C) 1998 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ INTEGER NDP
+ DOUBLE PRECISION DJM
+ INTEGER IYMDF(4),J
+
+ INTEGER NFD
+ DOUBLE PRECISION FD,DF,F,D
+ INTEGER JD,N4,ND10
+
+
+
+* Validate
+ IF (DJM.LE.-2395520D0.OR.DJM.GE.1D9) THEN
+ J=-1
+ ELSE
+ J=0
+
+* Denominator of fraction
+ NFD=10**MAX(NDP,0)
+ FD=DBLE(NFD)
+
+* Round date and express in units of fraction
+ DF=ANINT(DJM*FD)
+
+* Separate day and fraction
+ F=MOD(DF,FD)
+ IF (F.LT.0D0) F=F+FD
+ D=(DF-F)/FD
+
+* Express day in Gregorian calendar
+ JD=NINT(D)+2400001
+
+ N4=4*(JD+((2*((4*JD-17918)/146097)*3)/4+1)/2-37)
+ ND10=10*(MOD(N4-237,1461)/4)+5
+
+ IYMDF(1)=N4/1461-4712
+ IYMDF(2)=MOD(ND10/306+2,12)+1
+ IYMDF(3)=MOD(ND10,306)/10+1
+ IYMDF(4)=NINT(F)
+
+ END IF
+
+ END
diff --git a/src/slalib/djcl.f b/src/slalib/djcl.f
new file mode 100644
index 0000000..add7a48
--- /dev/null
+++ b/src/slalib/djcl.f
@@ -0,0 +1,68 @@
+ SUBROUTINE sla_DJCL (DJM, IY, IM, ID, FD, J)
+*+
+* - - - - -
+* D J C L
+* - - - - -
+*
+* Modified Julian Date to Gregorian year, month, day,
+* and fraction of a day.
+*
+* Given:
+* DJM dp modified Julian Date (JD-2400000.5)
+*
+* Returned:
+* IY int year
+* IM int month
+* ID int day
+* FD dp fraction of day
+* J int status:
+* 0 = OK
+* -1 = unacceptable date (before 4701BC March 1)
+*
+* The algorithm is derived from that of Hatcher 1984
+* (QJRAS 25, 53-55).
+*
+* P.T.Wallace Starlink 27 April 1998
+*
+* Copyright (C) 1998 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION DJM
+ INTEGER IY,IM,ID
+ DOUBLE PRECISION FD
+ INTEGER J
+
+ DOUBLE PRECISION F,D
+ INTEGER JD,N4,ND10
+
+
+
+* Check if date is acceptable
+ IF (DJM.LE.-2395520D0.OR.DJM.GE.1D9) THEN
+ J=-1
+ ELSE
+ J=0
+
+* Separate day and fraction
+ F=MOD(DJM,1D0)
+ IF (F.LT.0D0) F=F+1D0
+ D=ANINT(DJM-F)
+
+* Express day in Gregorian calendar
+ JD=NINT(D)+2400001
+
+ N4=4*(JD+((6*((4*JD-17918)/146097))/4+1)/2-37)
+ ND10=10*(MOD(N4-237,1461)/4)+5
+
+ IY=N4/1461-4712
+ IM=MOD(ND10/306+2,12)+1
+ ID=MOD(ND10,306)/10+1
+ FD=F
+
+ J=0
+
+ END IF
+
+ END
diff --git a/src/slalib/dm2av.f b/src/slalib/dm2av.f
new file mode 100644
index 0000000..3f684fb
--- /dev/null
+++ b/src/slalib/dm2av.f
@@ -0,0 +1,59 @@
+ SUBROUTINE sla_DM2AV (RMAT, AXVEC)
+*+
+* - - - - - -
+* D M 2 A V
+* - - - - - -
+*
+* From a rotation matrix, determine the corresponding axial vector.
+* (double precision)
+*
+* A rotation matrix describes a rotation about some arbitrary axis.
+* The axis is called the Euler axis, and the angle through which the
+* reference frame rotates is called the Euler angle. The axial
+* vector returned by this routine has the same direction as the
+* Euler axis, and its magnitude is the Euler angle in radians. (The
+* magnitude and direction can be separated by means of the routine
+* sla_DVN.)
+*
+* Given:
+* RMAT d(3,3) rotation matrix
+*
+* Returned:
+* AXVEC d(3) axial vector (radians)
+*
+* The reference frame rotates clockwise as seen looking along
+* the axial vector from the origin.
+*
+* If RMAT is null, so is the result.
+*
+* P.T.Wallace Starlink 24 December 1992
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION RMAT(3,3),AXVEC(3)
+
+ DOUBLE PRECISION X,Y,Z,S2,C2,PHI,F
+
+
+
+ X = RMAT(2,3)-RMAT(3,2)
+ Y = RMAT(3,1)-RMAT(1,3)
+ Z = RMAT(1,2)-RMAT(2,1)
+ S2 = SQRT(X*X+Y*Y+Z*Z)
+ IF (S2.NE.0D0) THEN
+ C2 = (RMAT(1,1)+RMAT(2,2)+RMAT(3,3)-1D0)
+ PHI = ATAN2(S2/2D0,C2/2D0)
+ F = PHI/S2
+ AXVEC(1) = X*F
+ AXVEC(2) = Y*F
+ AXVEC(3) = Z*F
+ ELSE
+ AXVEC(1) = 0D0
+ AXVEC(2) = 0D0
+ AXVEC(3) = 0D0
+ END IF
+
+ END
diff --git a/src/slalib/dmat.f b/src/slalib/dmat.f
new file mode 100644
index 0000000..2480b82
--- /dev/null
+++ b/src/slalib/dmat.f
@@ -0,0 +1,140 @@
+ SUBROUTINE sla_DMAT (N, A, Y, D, JF, IW)
+*+
+* - - - - -
+* D M A T
+* - - - - -
+*
+* Matrix inversion & solution of simultaneous equations
+* (double precision)
+*
+* For the set of n simultaneous equations in n unknowns:
+* A.Y = X
+*
+* where:
+* A is a non-singular N x N matrix
+* Y is the vector of N unknowns
+* X is the known vector
+*
+* DMATRX computes:
+* the inverse of matrix A
+* the determinant of matrix A
+* the vector of N unknowns
+*
+* Arguments:
+*
+* symbol type dimension before after
+*
+* N i no. of unknowns unchanged
+* A d (N,N) matrix inverse
+* Y d (N) vector solution
+* D d - determinant
+* * JF i - singularity flag
+* IW i (N) - workspace
+*
+* * JF is the singularity flag. If the matrix is non-singular,
+* JF=0 is returned. If the matrix is singular, JF=-1 & D=0D0 are
+* returned. In the latter case, the contents of array A on return
+* are undefined.
+*
+* Algorithm:
+* Gaussian elimination with partial pivoting.
+*
+* Speed:
+* Very fast.
+*
+* Accuracy:
+* Fairly accurate - errors 1 to 4 times those of routines optimized
+* for accuracy.
+*
+* P.T.Wallace Starlink 7 February 1995
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ INTEGER N
+ DOUBLE PRECISION A(N,N),Y(N),D
+ INTEGER JF
+ INTEGER IW(N)
+
+ DOUBLE PRECISION SFA
+ PARAMETER (SFA=1D-20)
+
+ INTEGER K,IMX,I,J,NP1MK,KI
+ DOUBLE PRECISION AMX,T,AKK,YK,AIK
+
+
+ JF=0
+ D=1D0
+ DO K=1,N
+ AMX=DABS(A(K,K))
+ IMX=K
+ IF (K.NE.N) THEN
+ DO I=K+1,N
+ T=DABS(A(I,K))
+ IF (T.GT.AMX) THEN
+ AMX=T
+ IMX=I
+ END IF
+ END DO
+ END IF
+ IF (AMX.LT.SFA) THEN
+ JF=-1
+ ELSE
+ IF (IMX.NE.K) THEN
+ DO J=1,N
+ T=A(K,J)
+ A(K,J)=A(IMX,J)
+ A(IMX,J)=T
+ END DO
+ T=Y(K)
+ Y(K)=Y(IMX)
+ Y(IMX)=T
+ D=-D
+ END IF
+ IW(K)=IMX
+ AKK=A(K,K)
+ D=D*AKK
+ IF (DABS(D).LT.SFA) THEN
+ JF=-1
+ ELSE
+ AKK=1D0/AKK
+ A(K,K)=AKK
+ DO J=1,N
+ IF (J.NE.K) A(K,J)=A(K,J)*AKK
+ END DO
+ YK=Y(K)*AKK
+ Y(K)=YK
+ DO I=1,N
+ AIK=A(I,K)
+ IF (I.NE.K) THEN
+ DO J=1,N
+ IF (J.NE.K) A(I,J)=A(I,J)-AIK*A(K,J)
+ END DO
+ Y(I)=Y(I)-AIK*YK
+ END IF
+ END DO
+ DO I=1,N
+ IF (I.NE.K) A(I,K)=-A(I,K)*AKK
+ END DO
+ END IF
+ END IF
+ END DO
+ IF (JF.NE.0) THEN
+ D=0D0
+ ELSE
+ DO K=1,N
+ NP1MK=N+1-K
+ KI=IW(NP1MK)
+ IF (NP1MK.NE.KI) THEN
+ DO I=1,N
+ T=A(I,NP1MK)
+ A(I,NP1MK)=A(I,KI)
+ A(I,KI)=T
+ END DO
+ END IF
+ END DO
+ END IF
+
+ END
diff --git a/src/slalib/dmoon.f b/src/slalib/dmoon.f
new file mode 100644
index 0000000..7794255
--- /dev/null
+++ b/src/slalib/dmoon.f
@@ -0,0 +1,641 @@
+ SUBROUTINE sla_DMOON (DATE, PV)
+*+
+* - - - - - -
+* D M O O N
+* - - - - - -
+*
+* Approximate geocentric position and velocity of the Moon
+* (double precision)
+*
+* Given:
+* DATE D TDB (loosely ET) as a Modified Julian Date
+* (JD-2400000.5)
+*
+* Returned:
+* PV D(6) Moon x,y,z,xdot,ydot,zdot, mean equator and
+* equinox of date (AU, AU/s)
+*
+* Notes:
+*
+* 1 This routine is a full implementation of the algorithm
+* published by Meeus (see reference).
+*
+* 2 Meeus quotes accuracies of 10 arcsec in longitude, 3 arcsec in
+* latitude and 0.2 arcsec in HP (equivalent to about 20 km in
+* distance). Comparison with JPL DE200 over the interval
+* 1960-2025 gives RMS errors of 3.7 arcsec and 83 mas/hour in
+* longitude, 2.3 arcsec and 48 mas/hour in latitude, 11 km
+* and 81 mm/s in distance. The maximum errors over the same
+* interval are 18 arcsec and 0.50 arcsec/hour in longitude,
+* 11 arcsec and 0.24 arcsec/hour in latitude, 40 km and 0.29 m/s
+* in distance.
+*
+* 3 The original algorithm is expressed in terms of the obsolete
+* timescale Ephemeris Time. Either TDB or TT can be used, but
+* not UT without incurring significant errors (30 arcsec at
+* the present time) due to the Moon's 0.5 arcsec/sec movement.
+*
+* 4 The algorithm is based on pre IAU 1976 standards. However,
+* the result has been moved onto the new (FK5) equinox, an
+* adjustment which is in any case much smaller than the
+* intrinsic accuracy of the procedure.
+*
+* 5 Velocity is obtained by a complete analytical differentiation
+* of the Meeus model.
+*
+* Reference:
+* Meeus, l'Astronomie, June 1984, p348.
+*
+* P.T.Wallace Starlink 22 January 1998
+*
+* Copyright (C) 1998 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION DATE,PV(6)
+
+* Degrees, arcseconds and seconds of time to radians
+ DOUBLE PRECISION D2R,DAS2R,DS2R
+ PARAMETER (D2R=0.0174532925199432957692369D0,
+ : DAS2R=4.848136811095359935899141D-6,
+ : DS2R=7.272205216643039903848712D-5)
+
+* Seconds per Julian century (86400*36525)
+ DOUBLE PRECISION CJ
+ PARAMETER (CJ=3155760000D0)
+
+* Julian epoch of B1950
+ DOUBLE PRECISION B1950
+ PARAMETER (B1950=1949.9997904423D0)
+
+* Earth equatorial radius in AU ( = 6378.137 / 149597870 )
+ DOUBLE PRECISION ERADAU
+ PARAMETER (ERADAU=4.2635212653763D-5)
+
+ DOUBLE PRECISION T,THETA,SINOM,COSOM,DOMCOM,WA,DWA,WB,DWB,WOM,
+ : DWOM,SINWOM,COSWOM,V,DV,COEFF,EMN,EMPN,DN,FN,EN,
+ : DEN,DTHETA,FTHETA,EL,DEL,B,DB,BF,DBF,P,DP,SP,R,
+ : DR,X,Y,Z,XD,YD,ZD,SEL,CEL,SB,CB,RCB,RBD,W,EPJ,
+ : EQCOR,EPS,SINEPS,COSEPS,ES,EC
+ INTEGER N,I
+
+*
+* Coefficients for fundamental arguments
+*
+* at J1900: T**0, T**1, T**2, T**3
+* at epoch: T**0, T**1
+*
+* Units are degrees for position and Julian centuries for time
+*
+
+* Moon's mean longitude
+ DOUBLE PRECISION ELP0,ELP1,ELP2,ELP3,ELP,DELP
+ PARAMETER (ELP0=270.434164D0,
+ : ELP1=481267.8831D0,
+ : ELP2=-0.001133D0,
+ : ELP3=0.0000019D0)
+
+* Sun's mean anomaly
+ DOUBLE PRECISION EM0,EM1,EM2,EM3,EM,DEM
+ PARAMETER (EM0=358.475833D0,
+ : EM1=35999.0498D0,
+ : EM2=-0.000150D0,
+ : EM3=-0.0000033D0)
+
+* Moon's mean anomaly
+ DOUBLE PRECISION EMP0,EMP1,EMP2,EMP3,EMP,DEMP
+ PARAMETER (EMP0=296.104608D0,
+ : EMP1=477198.8491D0,
+ : EMP2=0.009192D0,
+ : EMP3=0.0000144D0)
+
+* Moon's mean elongation
+ DOUBLE PRECISION D0,D1,D2,D3,D,DD
+ PARAMETER (D0=350.737486D0,
+ : D1=445267.1142D0,
+ : D2=-0.001436D0,
+ : D3=0.0000019D0)
+
+* Mean distance of the Moon from its ascending node
+ DOUBLE PRECISION F0,F1,F2,F3,F,DF
+ PARAMETER (F0=11.250889D0,
+ : F1=483202.0251D0,
+ : F2=-0.003211D0,
+ : F3=-0.0000003D0)
+
+* Longitude of the Moon's ascending node
+ DOUBLE PRECISION OM0,OM1,OM2,OM3,OM,DOM
+ PARAMETER (OM0=259.183275D0,
+ : OM1=-1934.1420D0,
+ : OM2=0.002078D0,
+ : OM3=0.0000022D0)
+
+* Coefficients for (dimensionless) E factor
+ DOUBLE PRECISION E1,E2,E,DE,ESQ,DESQ
+ PARAMETER (E1=-0.002495D0,E2=-0.00000752D0)
+
+* Coefficients for periodic variations etc
+ DOUBLE PRECISION PAC,PA0,PA1
+ PARAMETER (PAC=0.000233D0,PA0=51.2D0,PA1=20.2D0)
+ DOUBLE PRECISION PBC
+ PARAMETER (PBC=-0.001778D0)
+ DOUBLE PRECISION PCC
+ PARAMETER (PCC=0.000817D0)
+ DOUBLE PRECISION PDC
+ PARAMETER (PDC=0.002011D0)
+ DOUBLE PRECISION PEC,PE0,PE1,PE2
+ PARAMETER (PEC=0.003964D0,
+ : PE0=346.560D0,PE1=132.870D0,PE2=-0.0091731D0)
+ DOUBLE PRECISION PFC
+ PARAMETER (PFC=0.001964D0)
+ DOUBLE PRECISION PGC
+ PARAMETER (PGC=0.002541D0)
+ DOUBLE PRECISION PHC
+ PARAMETER (PHC=0.001964D0)
+ DOUBLE PRECISION PIC
+ PARAMETER (PIC=-0.024691D0)
+ DOUBLE PRECISION PJC,PJ0,PJ1
+ PARAMETER (PJC=-0.004328D0,PJ0=275.05D0,PJ1=-2.30D0)
+ DOUBLE PRECISION CW1
+ PARAMETER (CW1=0.0004664D0)
+ DOUBLE PRECISION CW2
+ PARAMETER (CW2=0.0000754D0)
+
+*
+* Coefficients for Moon position
+*
+* Tx(N) = coefficient of L, B or P term (deg)
+* ITx(N,1-5) = coefficients of M, M', D, F, E**n in argument
+*
+ INTEGER NL,NB,NP
+ PARAMETER (NL=50,NB=45,NP=31)
+ DOUBLE PRECISION TL(NL),TB(NB),TP(NP)
+ INTEGER ITL(5,NL),ITB(5,NB),ITP(5,NP)
+*
+* Longitude
+* M M' D F n
+ DATA TL( 1)/ +6.288750D0 /,
+ : (ITL(I, 1),I=1,5)/ +0, +1, +0, +0, 0 /
+ DATA TL( 2)/ +1.274018D0 /,
+ : (ITL(I, 2),I=1,5)/ +0, -1, +2, +0, 0 /
+ DATA TL( 3)/ +0.658309D0 /,
+ : (ITL(I, 3),I=1,5)/ +0, +0, +2, +0, 0 /
+ DATA TL( 4)/ +0.213616D0 /,
+ : (ITL(I, 4),I=1,5)/ +0, +2, +0, +0, 0 /
+ DATA TL( 5)/ -0.185596D0 /,
+ : (ITL(I, 5),I=1,5)/ +1, +0, +0, +0, 1 /
+ DATA TL( 6)/ -0.114336D0 /,
+ : (ITL(I, 6),I=1,5)/ +0, +0, +0, +2, 0 /
+ DATA TL( 7)/ +0.058793D0 /,
+ : (ITL(I, 7),I=1,5)/ +0, -2, +2, +0, 0 /
+ DATA TL( 8)/ +0.057212D0 /,
+ : (ITL(I, 8),I=1,5)/ -1, -1, +2, +0, 1 /
+ DATA TL( 9)/ +0.053320D0 /,
+ : (ITL(I, 9),I=1,5)/ +0, +1, +2, +0, 0 /
+ DATA TL(10)/ +0.045874D0 /,
+ : (ITL(I,10),I=1,5)/ -1, +0, +2, +0, 1 /
+ DATA TL(11)/ +0.041024D0 /,
+ : (ITL(I,11),I=1,5)/ -1, +1, +0, +0, 1 /
+ DATA TL(12)/ -0.034718D0 /,
+ : (ITL(I,12),I=1,5)/ +0, +0, +1, +0, 0 /
+ DATA TL(13)/ -0.030465D0 /,
+ : (ITL(I,13),I=1,5)/ +1, +1, +0, +0, 1 /
+ DATA TL(14)/ +0.015326D0 /,
+ : (ITL(I,14),I=1,5)/ +0, +0, +2, -2, 0 /
+ DATA TL(15)/ -0.012528D0 /,
+ : (ITL(I,15),I=1,5)/ +0, +1, +0, +2, 0 /
+ DATA TL(16)/ -0.010980D0 /,
+ : (ITL(I,16),I=1,5)/ +0, -1, +0, +2, 0 /
+ DATA TL(17)/ +0.010674D0 /,
+ : (ITL(I,17),I=1,5)/ +0, -1, +4, +0, 0 /
+ DATA TL(18)/ +0.010034D0 /,
+ : (ITL(I,18),I=1,5)/ +0, +3, +0, +0, 0 /
+ DATA TL(19)/ +0.008548D0 /,
+ : (ITL(I,19),I=1,5)/ +0, -2, +4, +0, 0 /
+ DATA TL(20)/ -0.007910D0 /,
+ : (ITL(I,20),I=1,5)/ +1, -1, +2, +0, 1 /
+ DATA TL(21)/ -0.006783D0 /,
+ : (ITL(I,21),I=1,5)/ +1, +0, +2, +0, 1 /
+ DATA TL(22)/ +0.005162D0 /,
+ : (ITL(I,22),I=1,5)/ +0, +1, -1, +0, 0 /
+ DATA TL(23)/ +0.005000D0 /,
+ : (ITL(I,23),I=1,5)/ +1, +0, +1, +0, 1 /
+ DATA TL(24)/ +0.004049D0 /,
+ : (ITL(I,24),I=1,5)/ -1, +1, +2, +0, 1 /
+ DATA TL(25)/ +0.003996D0 /,
+ : (ITL(I,25),I=1,5)/ +0, +2, +2, +0, 0 /
+ DATA TL(26)/ +0.003862D0 /,
+ : (ITL(I,26),I=1,5)/ +0, +0, +4, +0, 0 /
+ DATA TL(27)/ +0.003665D0 /,
+ : (ITL(I,27),I=1,5)/ +0, -3, +2, +0, 0 /
+ DATA TL(28)/ +0.002695D0 /,
+ : (ITL(I,28),I=1,5)/ -1, +2, +0, +0, 1 /
+ DATA TL(29)/ +0.002602D0 /,
+ : (ITL(I,29),I=1,5)/ +0, +1, -2, -2, 0 /
+ DATA TL(30)/ +0.002396D0 /,
+ : (ITL(I,30),I=1,5)/ -1, -2, +2, +0, 1 /
+ DATA TL(31)/ -0.002349D0 /,
+ : (ITL(I,31),I=1,5)/ +0, +1, +1, +0, 0 /
+ DATA TL(32)/ +0.002249D0 /,
+ : (ITL(I,32),I=1,5)/ -2, +0, +2, +0, 2 /
+ DATA TL(33)/ -0.002125D0 /,
+ : (ITL(I,33),I=1,5)/ +1, +2, +0, +0, 1 /
+ DATA TL(34)/ -0.002079D0 /,
+ : (ITL(I,34),I=1,5)/ +2, +0, +0, +0, 2 /
+ DATA TL(35)/ +0.002059D0 /,
+ : (ITL(I,35),I=1,5)/ -2, -1, +2, +0, 2 /
+ DATA TL(36)/ -0.001773D0 /,
+ : (ITL(I,36),I=1,5)/ +0, +1, +2, -2, 0 /
+ DATA TL(37)/ -0.001595D0 /,
+ : (ITL(I,37),I=1,5)/ +0, +0, +2, +2, 0 /
+ DATA TL(38)/ +0.001220D0 /,
+ : (ITL(I,38),I=1,5)/ -1, -1, +4, +0, 1 /
+ DATA TL(39)/ -0.001110D0 /,
+ : (ITL(I,39),I=1,5)/ +0, +2, +0, +2, 0 /
+ DATA TL(40)/ +0.000892D0 /,
+ : (ITL(I,40),I=1,5)/ +0, +1, -3, +0, 0 /
+ DATA TL(41)/ -0.000811D0 /,
+ : (ITL(I,41),I=1,5)/ +1, +1, +2, +0, 1 /
+ DATA TL(42)/ +0.000761D0 /,
+ : (ITL(I,42),I=1,5)/ -1, -2, +4, +0, 1 /
+ DATA TL(43)/ +0.000717D0 /,
+ : (ITL(I,43),I=1,5)/ -2, +1, +0, +0, 2 /
+ DATA TL(44)/ +0.000704D0 /,
+ : (ITL(I,44),I=1,5)/ -2, +1, -2, +0, 2 /
+ DATA TL(45)/ +0.000693D0 /,
+ : (ITL(I,45),I=1,5)/ +1, -2, +2, +0, 1 /
+ DATA TL(46)/ +0.000598D0 /,
+ : (ITL(I,46),I=1,5)/ -1, +0, +2, -2, 1 /
+ DATA TL(47)/ +0.000550D0 /,
+ : (ITL(I,47),I=1,5)/ +0, +1, +4, +0, 0 /
+ DATA TL(48)/ +0.000538D0 /,
+ : (ITL(I,48),I=1,5)/ +0, +4, +0, +0, 0 /
+ DATA TL(49)/ +0.000521D0 /,
+ : (ITL(I,49),I=1,5)/ -1, +0, +4, +0, 1 /
+ DATA TL(50)/ +0.000486D0 /,
+ : (ITL(I,50),I=1,5)/ +0, +2, -1, +0, 0 /
+*
+* Latitude
+* M M' D F n
+ DATA TB( 1)/ +5.128189D0 /,
+ : (ITB(I, 1),I=1,5)/ +0, +0, +0, +1, 0 /
+ DATA TB( 2)/ +0.280606D0 /,
+ : (ITB(I, 2),I=1,5)/ +0, +1, +0, +1, 0 /
+ DATA TB( 3)/ +0.277693D0 /,
+ : (ITB(I, 3),I=1,5)/ +0, +1, +0, -1, 0 /
+ DATA TB( 4)/ +0.173238D0 /,
+ : (ITB(I, 4),I=1,5)/ +0, +0, +2, -1, 0 /
+ DATA TB( 5)/ +0.055413D0 /,
+ : (ITB(I, 5),I=1,5)/ +0, -1, +2, +1, 0 /
+ DATA TB( 6)/ +0.046272D0 /,
+ : (ITB(I, 6),I=1,5)/ +0, -1, +2, -1, 0 /
+ DATA TB( 7)/ +0.032573D0 /,
+ : (ITB(I, 7),I=1,5)/ +0, +0, +2, +1, 0 /
+ DATA TB( 8)/ +0.017198D0 /,
+ : (ITB(I, 8),I=1,5)/ +0, +2, +0, +1, 0 /
+ DATA TB( 9)/ +0.009267D0 /,
+ : (ITB(I, 9),I=1,5)/ +0, +1, +2, -1, 0 /
+ DATA TB(10)/ +0.008823D0 /,
+ : (ITB(I,10),I=1,5)/ +0, +2, +0, -1, 0 /
+ DATA TB(11)/ +0.008247D0 /,
+ : (ITB(I,11),I=1,5)/ -1, +0, +2, -1, 1 /
+ DATA TB(12)/ +0.004323D0 /,
+ : (ITB(I,12),I=1,5)/ +0, -2, +2, -1, 0 /
+ DATA TB(13)/ +0.004200D0 /,
+ : (ITB(I,13),I=1,5)/ +0, +1, +2, +1, 0 /
+ DATA TB(14)/ +0.003372D0 /,
+ : (ITB(I,14),I=1,5)/ -1, +0, -2, +1, 1 /
+ DATA TB(15)/ +0.002472D0 /,
+ : (ITB(I,15),I=1,5)/ -1, -1, +2, +1, 1 /
+ DATA TB(16)/ +0.002222D0 /,
+ : (ITB(I,16),I=1,5)/ -1, +0, +2, +1, 1 /
+ DATA TB(17)/ +0.002072D0 /,
+ : (ITB(I,17),I=1,5)/ -1, -1, +2, -1, 1 /
+ DATA TB(18)/ +0.001877D0 /,
+ : (ITB(I,18),I=1,5)/ -1, +1, +0, +1, 1 /
+ DATA TB(19)/ +0.001828D0 /,
+ : (ITB(I,19),I=1,5)/ +0, -1, +4, -1, 0 /
+ DATA TB(20)/ -0.001803D0 /,
+ : (ITB(I,20),I=1,5)/ +1, +0, +0, +1, 1 /
+ DATA TB(21)/ -0.001750D0 /,
+ : (ITB(I,21),I=1,5)/ +0, +0, +0, +3, 0 /
+ DATA TB(22)/ +0.001570D0 /,
+ : (ITB(I,22),I=1,5)/ -1, +1, +0, -1, 1 /
+ DATA TB(23)/ -0.001487D0 /,
+ : (ITB(I,23),I=1,5)/ +0, +0, +1, +1, 0 /
+ DATA TB(24)/ -0.001481D0 /,
+ : (ITB(I,24),I=1,5)/ +1, +1, +0, +1, 1 /
+ DATA TB(25)/ +0.001417D0 /,
+ : (ITB(I,25),I=1,5)/ -1, -1, +0, +1, 1 /
+ DATA TB(26)/ +0.001350D0 /,
+ : (ITB(I,26),I=1,5)/ -1, +0, +0, +1, 1 /
+ DATA TB(27)/ +0.001330D0 /,
+ : (ITB(I,27),I=1,5)/ +0, +0, -1, +1, 0 /
+ DATA TB(28)/ +0.001106D0 /,
+ : (ITB(I,28),I=1,5)/ +0, +3, +0, +1, 0 /
+ DATA TB(29)/ +0.001020D0 /,
+ : (ITB(I,29),I=1,5)/ +0, +0, +4, -1, 0 /
+ DATA TB(30)/ +0.000833D0 /,
+ : (ITB(I,30),I=1,5)/ +0, -1, +4, +1, 0 /
+ DATA TB(31)/ +0.000781D0 /,
+ : (ITB(I,31),I=1,5)/ +0, +1, +0, -3, 0 /
+ DATA TB(32)/ +0.000670D0 /,
+ : (ITB(I,32),I=1,5)/ +0, -2, +4, +1, 0 /
+ DATA TB(33)/ +0.000606D0 /,
+ : (ITB(I,33),I=1,5)/ +0, +0, +2, -3, 0 /
+ DATA TB(34)/ +0.000597D0 /,
+ : (ITB(I,34),I=1,5)/ +0, +2, +2, -1, 0 /
+ DATA TB(35)/ +0.000492D0 /,
+ : (ITB(I,35),I=1,5)/ -1, +1, +2, -1, 1 /
+ DATA TB(36)/ +0.000450D0 /,
+ : (ITB(I,36),I=1,5)/ +0, +2, -2, -1, 0 /
+ DATA TB(37)/ +0.000439D0 /,
+ : (ITB(I,37),I=1,5)/ +0, +3, +0, -1, 0 /
+ DATA TB(38)/ +0.000423D0 /,
+ : (ITB(I,38),I=1,5)/ +0, +2, +2, +1, 0 /
+ DATA TB(39)/ +0.000422D0 /,
+ : (ITB(I,39),I=1,5)/ +0, -3, +2, -1, 0 /
+ DATA TB(40)/ -0.000367D0 /,
+ : (ITB(I,40),I=1,5)/ +1, -1, +2, +1, 1 /
+ DATA TB(41)/ -0.000353D0 /,
+ : (ITB(I,41),I=1,5)/ +1, +0, +2, +1, 1 /
+ DATA TB(42)/ +0.000331D0 /,
+ : (ITB(I,42),I=1,5)/ +0, +0, +4, +1, 0 /
+ DATA TB(43)/ +0.000317D0 /,
+ : (ITB(I,43),I=1,5)/ -1, +1, +2, +1, 1 /
+ DATA TB(44)/ +0.000306D0 /,
+ : (ITB(I,44),I=1,5)/ -2, +0, +2, -1, 2 /
+ DATA TB(45)/ -0.000283D0 /,
+ : (ITB(I,45),I=1,5)/ +0, +1, +0, +3, 0 /
+*
+* Parallax
+* M M' D F n
+ DATA TP( 1)/ +0.950724D0 /,
+ : (ITP(I, 1),I=1,5)/ +0, +0, +0, +0, 0 /
+ DATA TP( 2)/ +0.051818D0 /,
+ : (ITP(I, 2),I=1,5)/ +0, +1, +0, +0, 0 /
+ DATA TP( 3)/ +0.009531D0 /,
+ : (ITP(I, 3),I=1,5)/ +0, -1, +2, +0, 0 /
+ DATA TP( 4)/ +0.007843D0 /,
+ : (ITP(I, 4),I=1,5)/ +0, +0, +2, +0, 0 /
+ DATA TP( 5)/ +0.002824D0 /,
+ : (ITP(I, 5),I=1,5)/ +0, +2, +0, +0, 0 /
+ DATA TP( 6)/ +0.000857D0 /,
+ : (ITP(I, 6),I=1,5)/ +0, +1, +2, +0, 0 /
+ DATA TP( 7)/ +0.000533D0 /,
+ : (ITP(I, 7),I=1,5)/ -1, +0, +2, +0, 1 /
+ DATA TP( 8)/ +0.000401D0 /,
+ : (ITP(I, 8),I=1,5)/ -1, -1, +2, +0, 1 /
+ DATA TP( 9)/ +0.000320D0 /,
+ : (ITP(I, 9),I=1,5)/ -1, +1, +0, +0, 1 /
+ DATA TP(10)/ -0.000271D0 /,
+ : (ITP(I,10),I=1,5)/ +0, +0, +1, +0, 0 /
+ DATA TP(11)/ -0.000264D0 /,
+ : (ITP(I,11),I=1,5)/ +1, +1, +0, +0, 1 /
+ DATA TP(12)/ -0.000198D0 /,
+ : (ITP(I,12),I=1,5)/ +0, -1, +0, +2, 0 /
+ DATA TP(13)/ +0.000173D0 /,
+ : (ITP(I,13),I=1,5)/ +0, +3, +0, +0, 0 /
+ DATA TP(14)/ +0.000167D0 /,
+ : (ITP(I,14),I=1,5)/ +0, -1, +4, +0, 0 /
+ DATA TP(15)/ -0.000111D0 /,
+ : (ITP(I,15),I=1,5)/ +1, +0, +0, +0, 1 /
+ DATA TP(16)/ +0.000103D0 /,
+ : (ITP(I,16),I=1,5)/ +0, -2, +4, +0, 0 /
+ DATA TP(17)/ -0.000084D0 /,
+ : (ITP(I,17),I=1,5)/ +0, +2, -2, +0, 0 /
+ DATA TP(18)/ -0.000083D0 /,
+ : (ITP(I,18),I=1,5)/ +1, +0, +2, +0, 1 /
+ DATA TP(19)/ +0.000079D0 /,
+ : (ITP(I,19),I=1,5)/ +0, +2, +2, +0, 0 /
+ DATA TP(20)/ +0.000072D0 /,
+ : (ITP(I,20),I=1,5)/ +0, +0, +4, +0, 0 /
+ DATA TP(21)/ +0.000064D0 /,
+ : (ITP(I,21),I=1,5)/ -1, +1, +2, +0, 1 /
+ DATA TP(22)/ -0.000063D0 /,
+ : (ITP(I,22),I=1,5)/ +1, -1, +2, +0, 1 /
+ DATA TP(23)/ +0.000041D0 /,
+ : (ITP(I,23),I=1,5)/ +1, +0, +1, +0, 1 /
+ DATA TP(24)/ +0.000035D0 /,
+ : (ITP(I,24),I=1,5)/ -1, +2, +0, +0, 1 /
+ DATA TP(25)/ -0.000033D0 /,
+ : (ITP(I,25),I=1,5)/ +0, +3, -2, +0, 0 /
+ DATA TP(26)/ -0.000030D0 /,
+ : (ITP(I,26),I=1,5)/ +0, +1, +1, +0, 0 /
+ DATA TP(27)/ -0.000029D0 /,
+ : (ITP(I,27),I=1,5)/ +0, +0, -2, +2, 0 /
+ DATA TP(28)/ -0.000029D0 /,
+ : (ITP(I,28),I=1,5)/ +1, +2, +0, +0, 1 /
+ DATA TP(29)/ +0.000026D0 /,
+ : (ITP(I,29),I=1,5)/ -2, +0, +2, +0, 2 /
+ DATA TP(30)/ -0.000023D0 /,
+ : (ITP(I,30),I=1,5)/ +0, +1, -2, +2, 0 /
+ DATA TP(31)/ +0.000019D0 /,
+ : (ITP(I,31),I=1,5)/ -1, -1, +4, +0, 1 /
+
+
+
+* Centuries since J1900
+ T=(DATE-15019.5D0)/36525D0
+
+*
+* Fundamental arguments (radians) and derivatives (radians per
+* Julian century) for the current epoch
+*
+
+* Moon's mean longitude
+ ELP=D2R*MOD(ELP0+(ELP1+(ELP2+ELP3*T)*T)*T,360D0)
+ DELP=D2R*(ELP1+(2D0*ELP2+3D0*ELP3*T)*T)
+
+* Sun's mean anomaly
+ EM=D2R*MOD(EM0+(EM1+(EM2+EM3*T)*T)*T,360D0)
+ DEM=D2R*(EM1+(2D0*EM2+3D0*EM3*T)*T)
+
+* Moon's mean anomaly
+ EMP=D2R*MOD(EMP0+(EMP1+(EMP2+EMP3*T)*T)*T,360D0)
+ DEMP=D2R*(EMP1+(2D0*EMP2+3D0*EMP3*T)*T)
+
+* Moon's mean elongation
+ D=D2R*MOD(D0+(D1+(D2+D3*T)*T)*T,360D0)
+ DD=D2R*(D1+(2D0*D2+3D0*D3*T)*T)
+
+* Mean distance of the Moon from its ascending node
+ F=D2R*MOD(F0+(F1+(F2+F3*T)*T)*T,360D0)
+ DF=D2R*(F1+(2D0*F2+3D0*F3*T)*T)
+
+* Longitude of the Moon's ascending node
+ OM=D2R*MOD(OM0+(OM1+(OM2+OM3*T)*T)*T,360D0)
+ DOM=D2R*(OM1+(2D0*OM2+3D0*OM3*T)*T)
+ SINOM=SIN(OM)
+ COSOM=COS(OM)
+ DOMCOM=DOM*COSOM
+
+* Add the periodic variations
+ THETA=D2R*(PA0+PA1*T)
+ WA=SIN(THETA)
+ DWA=D2R*PA1*COS(THETA)
+ THETA=D2R*(PE0+(PE1+PE2*T)*T)
+ WB=PEC*SIN(THETA)
+ DWB=D2R*PEC*(PE1+2D0*PE2*T)*COS(THETA)
+ ELP=ELP+D2R*(PAC*WA+WB+PFC*SINOM)
+ DELP=DELP+D2R*(PAC*DWA+DWB+PFC*DOMCOM)
+ EM=EM+D2R*PBC*WA
+ DEM=DEM+D2R*PBC*DWA
+ EMP=EMP+D2R*(PCC*WA+WB+PGC*SINOM)
+ DEMP=DEMP+D2R*(PCC*DWA+DWB+PGC*DOMCOM)
+ D=D+D2R*(PDC*WA+WB+PHC*SINOM)
+ DD=DD+D2R*(PDC*DWA+DWB+PHC*DOMCOM)
+ WOM=OM+D2R*(PJ0+PJ1*T)
+ DWOM=DOM+D2R*PJ1
+ SINWOM=SIN(WOM)
+ COSWOM=COS(WOM)
+ F=F+D2R*(WB+PIC*SINOM+PJC*SINWOM)
+ DF=DF+D2R*(DWB+PIC*DOMCOM+PJC*DWOM*COSWOM)
+
+* E-factor, and square
+ E=1D0+(E1+E2*T)*T
+ DE=E1+2D0*E2*T
+ ESQ=E*E
+ DESQ=2D0*E*DE
+
+*
+* Series expansions
+*
+
+* Longitude
+ V=0D0
+ DV=0D0
+ DO N=NL,1,-1
+ COEFF=TL(N)
+ EMN=DBLE(ITL(1,N))
+ EMPN=DBLE(ITL(2,N))
+ DN=DBLE(ITL(3,N))
+ FN=DBLE(ITL(4,N))
+ I=ITL(5,N)
+ IF (I.EQ.0) THEN
+ EN=1D0
+ DEN=0D0
+ ELSE IF (I.EQ.1) THEN
+ EN=E
+ DEN=DE
+ ELSE
+ EN=ESQ
+ DEN=DESQ
+ END IF
+ THETA=EMN*EM+EMPN*EMP+DN*D+FN*F
+ DTHETA=EMN*DEM+EMPN*DEMP+DN*DD+FN*DF
+ FTHETA=SIN(THETA)
+ V=V+COEFF*FTHETA*EN
+ DV=DV+COEFF*(COS(THETA)*DTHETA*EN+FTHETA*DEN)
+ END DO
+ EL=ELP+D2R*V
+ DEL=(DELP+D2R*DV)/CJ
+
+* Latitude
+ V=0D0
+ DV=0D0
+ DO N=NB,1,-1
+ COEFF=TB(N)
+ EMN=DBLE(ITB(1,N))
+ EMPN=DBLE(ITB(2,N))
+ DN=DBLE(ITB(3,N))
+ FN=DBLE(ITB(4,N))
+ I=ITB(5,N)
+ IF (I.EQ.0) THEN
+ EN=1D0
+ DEN=0D0
+ ELSE IF (I.EQ.1) THEN
+ EN=E
+ DEN=DE
+ ELSE
+ EN=ESQ
+ DEN=DESQ
+ END IF
+ THETA=EMN*EM+EMPN*EMP+DN*D+FN*F
+ DTHETA=EMN*DEM+EMPN*DEMP+DN*DD+FN*DF
+ FTHETA=SIN(THETA)
+ V=V+COEFF*FTHETA*EN
+ DV=DV+COEFF*(COS(THETA)*DTHETA*EN+FTHETA*DEN)
+ END DO
+ BF=1D0-CW1*COSOM-CW2*COSWOM
+ DBF=CW1*DOM*SINOM+CW2*DWOM*SINWOM
+ B=D2R*V*BF
+ DB=D2R*(DV*BF+V*DBF)/CJ
+
+* Parallax
+ V=0D0
+ DV=0D0
+ DO N=NP,1,-1
+ COEFF=TP(N)
+ EMN=DBLE(ITP(1,N))
+ EMPN=DBLE(ITP(2,N))
+ DN=DBLE(ITP(3,N))
+ FN=DBLE(ITP(4,N))
+ I=ITP(5,N)
+ IF (I.EQ.0) THEN
+ EN=1D0
+ DEN=0D0
+ ELSE IF (I.EQ.1) THEN
+ EN=E
+ DEN=DE
+ ELSE
+ EN=ESQ
+ DEN=DESQ
+ END IF
+ THETA=EMN*EM+EMPN*EMP+DN*D+FN*F
+ DTHETA=EMN*DEM+EMPN*DEMP+DN*DD+FN*DF
+ FTHETA=COS(THETA)
+ V=V+COEFF*FTHETA*EN
+ DV=DV+COEFF*(-SIN(THETA)*DTHETA*EN+FTHETA*DEN)
+ END DO
+ P=D2R*V
+ DP=D2R*DV/CJ
+
+*
+* Transformation into final form
+*
+
+* Parallax to distance (AU, AU/sec)
+ SP=SIN(P)
+ R=ERADAU/SP
+ DR=-R*DP*COS(P)/SP
+
+* Longitude, latitude to x,y,z (AU)
+ SEL=SIN(EL)
+ CEL=COS(EL)
+ SB=SIN(B)
+ CB=COS(B)
+ RCB=R*CB
+ RBD=R*DB
+ W=RBD*SB-CB*DR
+ X=RCB*CEL
+ Y=RCB*SEL
+ Z=R*SB
+ XD=-Y*DEL-W*CEL
+ YD=X*DEL-W*SEL
+ ZD=RBD*CB+SB*DR
+
+* Julian centuries since J2000
+ T=(DATE-51544.5D0)/36525D0
+
+* Fricke equinox correction
+ EPJ=2000D0+T*100D0
+ EQCOR=DS2R*(0.035D0+0.00085D0*(EPJ-B1950))
+
+* Mean obliquity (IAU 1976)
+ EPS=DAS2R*(84381.448D0+(-46.8150D0+(-0.00059D0+0.001813D0*T)*T)*T)
+
+* To the equatorial system, mean of date, FK5 system
+ SINEPS=SIN(EPS)
+ COSEPS=COS(EPS)
+ ES=EQCOR*SINEPS
+ EC=EQCOR*COSEPS
+ PV(1)=X-EC*Y+ES*Z
+ PV(2)=EQCOR*X+Y*COSEPS-Z*SINEPS
+ PV(3)=Y*SINEPS+Z*COSEPS
+ PV(4)=XD-EC*YD+ES*ZD
+ PV(5)=EQCOR*XD+YD*COSEPS-ZD*SINEPS
+ PV(6)=YD*SINEPS+ZD*COSEPS
+
+ END
diff --git a/src/slalib/dmxm.f b/src/slalib/dmxm.f
new file mode 100644
index 0000000..41f3d99
--- /dev/null
+++ b/src/slalib/dmxm.f
@@ -0,0 +1,56 @@
+ SUBROUTINE sla_DMXM (A, B, C)
+*+
+* - - - - -
+* D M X M
+* - - - - -
+*
+* Product of two 3x3 matrices:
+*
+* matrix C = matrix A x matrix B
+*
+* (double precision)
+*
+* Given:
+* A dp(3,3) matrix
+* B dp(3,3) matrix
+*
+* Returned:
+* C dp(3,3) matrix result
+*
+* To comply with the ANSI Fortran 77 standard, A, B and C must
+* be different arrays. However, the routine is coded so as to
+* work properly on the VAX and many other systems even if this
+* rule is violated.
+*
+* P.T.Wallace Starlink 5 April 1990
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION A(3,3),B(3,3),C(3,3)
+
+ INTEGER I,J,K
+ DOUBLE PRECISION W,WM(3,3)
+
+
+* Multiply into scratch matrix
+ DO I=1,3
+ DO J=1,3
+ W=0D0
+ DO K=1,3
+ W=W+A(I,K)*B(K,J)
+ END DO
+ WM(I,J)=W
+ END DO
+ END DO
+
+* Return the result
+ DO J=1,3
+ DO I=1,3
+ C(I,J)=WM(I,J)
+ END DO
+ END DO
+
+ END
diff --git a/src/slalib/dmxv.f b/src/slalib/dmxv.f
new file mode 100644
index 0000000..e70a28e
--- /dev/null
+++ b/src/slalib/dmxv.f
@@ -0,0 +1,47 @@
+ SUBROUTINE sla_DMXV (DM, VA, VB)
+*+
+* - - - - -
+* D M X V
+* - - - - -
+*
+* Performs the 3-D forward unitary transformation:
+*
+* vector VB = matrix DM * vector VA
+*
+* (double precision)
+*
+* Given:
+* DM dp(3,3) matrix
+* VA dp(3) vector
+*
+* Returned:
+* VB dp(3) result vector
+*
+* P.T.Wallace Starlink March 1986
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION DM(3,3),VA(3),VB(3)
+
+ INTEGER I,J
+ DOUBLE PRECISION W,VW(3)
+
+
+* Matrix DM * vector VA -> vector VW
+ DO J=1,3
+ W=0D0
+ DO I=1,3
+ W=W+DM(J,I)*VA(I)
+ END DO
+ VW(J)=W
+ END DO
+
+* Vector VW -> vector VB
+ DO J=1,3
+ VB(J)=VW(J)
+ END DO
+
+ END
diff --git a/src/slalib/dpav.f b/src/slalib/dpav.f
new file mode 100644
index 0000000..63ad759
--- /dev/null
+++ b/src/slalib/dpav.f
@@ -0,0 +1,72 @@
+ DOUBLE PRECISION FUNCTION sla_DPAV ( V1, V2 )
+*+
+* - - - - -
+* D P A V
+* - - - - -
+*
+* Position angle of one celestial direction with respect to another.
+*
+* (double precision)
+*
+* Given:
+* V1 d(3) direction cosines of one point
+* V2 d(3) direction cosines of the other point
+*
+* (The coordinate frames correspond to RA,Dec, Long,Lat etc.)
+*
+* The result is the bearing (position angle), in radians, of point
+* V2 with respect to point V1. It is in the range +/- pi. The
+* sense is such that if V2 is a small distance east of V1, the
+* bearing is about +pi/2. Zero is returned if the two points
+* are coincident.
+*
+* V1 and V2 need not be unit vectors.
+*
+* The routine sla_DBEAR performs an equivalent function except
+* that the points are specified in the form of spherical
+* coordinates.
+*
+* Patrick Wallace Starlink 13 July 1997
+*
+* Copyright (C) 1997 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION V1(3),V2(3)
+
+ DOUBLE PRECISION X1,Y1,Z1,W,R,XU1,YU1,ZU1,DX,DY,DZ,SQ,CQ
+
+
+
+* Unit vector to point 1
+ X1=V1(1)
+ Y1=V1(2)
+ Z1=V1(3)
+ W=SQRT(X1*X1+Y1*Y1+Z1*Z1)
+ IF (W.NE.0D0) THEN
+ X1=X1/W
+ Y1=Y1/W
+ Z1=Z1/W
+ END IF
+
+* Unit vector "north" from point 1
+ R=SQRT(X1*X1+Y1*Y1)
+ IF (R.EQ.0.0) R=1D-5
+ W=Z1/R
+ XU1=-X1*W
+ YU1=-Y1*W
+ ZU1=R
+
+* Vector from point 1 to point 2
+ DX=V2(1)-X1
+ DY=V2(2)-Y1
+ DZ=V2(3)-Z1
+
+* Position angle
+ SQ=DX*YU1*Z1+DY*ZU1*X1+DZ*XU1*Y1-DZ*YU1*X1-DY*XU1*Z1-DX*ZU1*Y1
+ CQ=DX*XU1+DY*YU1+DZ*ZU1
+ IF (SQ.EQ.0D0.AND.CQ.EQ.0D0) CQ=1D0
+ sla_DPAV=ATAN2(SQ,CQ)
+
+ END
diff --git a/src/slalib/dr2af.f b/src/slalib/dr2af.f
new file mode 100644
index 0000000..3f9dbf3
--- /dev/null
+++ b/src/slalib/dr2af.f
@@ -0,0 +1,58 @@
+ SUBROUTINE sla_DR2AF (NDP, ANGLE, SIGN, IDMSF)
+*+
+* - - - - - -
+* D R 2 A F
+* - - - - - -
+*
+* Convert an angle in radians to degrees, arcminutes, arcseconds
+* (double precision)
+*
+* Given:
+* NDP i number of decimal places of arcseconds
+* ANGLE d angle in radians
+*
+* Returned:
+* SIGN c '+' or '-'
+* IDMSF i(4) degrees, arcminutes, arcseconds, fraction
+*
+* Notes:
+*
+* 1) NDP less than zero is interpreted as zero.
+*
+* 2) The largest useful value for NDP is determined by the size
+* of ANGLE, the format of DOUBLE PRECISION floating-point
+* numbers on the target machine, and the risk of overflowing
+* IDMSF(4). For example, on the VAX, for ANGLE up to 2pi, the
+* available floating-point precision corresponds roughly to
+* NDP=12. However, the practical limit is NDP=9, set by the
+* capacity of the 32-bit integer IDMSF(4).
+*
+* 3) The absolute value of ANGLE may exceed 2pi. In cases where it
+* does not, it is up to the caller to test for and handle the
+* case where ANGLE is very nearly 2pi and rounds up to 360 deg,
+* by testing for IDMSF(1)=360 and setting IDMSF(1-4) to zero.
+*
+* Called: sla_DD2TF
+*
+* P.T.Wallace Starlink 19 March 1999
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ INTEGER NDP
+ DOUBLE PRECISION ANGLE
+ CHARACTER SIGN*(*)
+ INTEGER IDMSF(4)
+
+* Hours to degrees * radians to turns
+ DOUBLE PRECISION F
+ PARAMETER (F=15D0/6.283185307179586476925287D0)
+
+
+
+* Scale then use days to h,m,s routine
+ CALL sla_DD2TF(NDP,ANGLE*F,SIGN,IDMSF)
+
+ END
diff --git a/src/slalib/dr2tf.f b/src/slalib/dr2tf.f
new file mode 100644
index 0000000..f8f2a71
--- /dev/null
+++ b/src/slalib/dr2tf.f
@@ -0,0 +1,58 @@
+ SUBROUTINE sla_DR2TF (NDP, ANGLE, SIGN, IHMSF)
+*+
+* - - - - - -
+* D R 2 T F
+* - - - - - -
+*
+* Convert an angle in radians to hours, minutes, seconds
+* (double precision)
+*
+* Given:
+* NDP i number of decimal places of seconds
+* ANGLE d angle in radians
+*
+* Returned:
+* SIGN c '+' or '-'
+* IHMSF i(4) hours, minutes, seconds, fraction
+*
+* Notes:
+*
+* 1) NDP less than zero is interpreted as zero.
+*
+* 2) The largest useful value for NDP is determined by the size
+* of ANGLE, the format of DOUBLE PRECISION floating-point
+* numbers on the target machine, and the risk of overflowing
+* IHMSF(4). For example, on the VAX, for ANGLE up to 2pi, the
+* available floating-point precision corresponds roughly to
+* NDP=12. However, the practical limit is NDP=9, set by the
+* capacity of the 32-bit integer IHMSF(4).
+*
+* 3) The absolute value of ANGLE may exceed 2pi. In cases where it
+* does not, it is up to the caller to test for and handle the
+* case where ANGLE is very nearly 2pi and rounds up to 24 hours,
+* by testing for IHMSF(1)=24 and setting IHMSF(1-4) to zero.
+*
+* Called: sla_DD2TF
+*
+* P.T.Wallace Starlink 19 March 1999
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ INTEGER NDP
+ DOUBLE PRECISION ANGLE
+ CHARACTER SIGN*(*)
+ INTEGER IHMSF(4)
+
+* Turns to radians
+ DOUBLE PRECISION T2R
+ PARAMETER (T2R=6.283185307179586476925287D0)
+
+
+
+* Scale then use days to h,m,s routine
+ CALL sla_DD2TF(NDP,ANGLE/T2R,SIGN,IHMSF)
+
+ END
diff --git a/src/slalib/drange.f b/src/slalib/drange.f
new file mode 100644
index 0000000..9e678af
--- /dev/null
+++ b/src/slalib/drange.f
@@ -0,0 +1,32 @@
+ DOUBLE PRECISION FUNCTION sla_DRANGE (ANGLE)
+*+
+* - - - - - - -
+* D R A N G E
+* - - - - - - -
+*
+* Normalize angle into range +/- pi (double precision)
+*
+* Given:
+* ANGLE dp the angle in radians
+*
+* The result (double precision) is ANGLE expressed in the range +/- pi.
+*
+* P.T.Wallace Starlink 23 November 1995
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION ANGLE
+
+ DOUBLE PRECISION DPI,D2PI
+ PARAMETER (DPI=3.141592653589793238462643D0)
+ PARAMETER (D2PI=6.283185307179586476925287D0)
+
+
+ sla_DRANGE=MOD(ANGLE,D2PI)
+ IF (ABS(sla_DRANGE).GE.DPI)
+ : sla_DRANGE=sla_DRANGE-SIGN(D2PI,ANGLE)
+
+ END
diff --git a/src/slalib/dranrm.f b/src/slalib/dranrm.f
new file mode 100644
index 0000000..ee9af25
--- /dev/null
+++ b/src/slalib/dranrm.f
@@ -0,0 +1,31 @@
+ DOUBLE PRECISION FUNCTION sla_DRANRM (ANGLE)
+*+
+* - - - - - - -
+* D R A N R M
+* - - - - - - -
+*
+* Normalize angle into range 0-2 pi (double precision)
+*
+* Given:
+* ANGLE dp the angle in radians
+*
+* The result is ANGLE expressed in the range 0-2 pi (double
+* precision).
+*
+* P.T.Wallace Starlink 23 November 1995
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION ANGLE
+
+ DOUBLE PRECISION D2PI
+ PARAMETER (D2PI=6.283185307179586476925286766559D0)
+
+
+ sla_DRANRM=MOD(ANGLE,D2PI)
+ IF (sla_DRANRM.LT.0D0) sla_DRANRM=sla_DRANRM+D2PI
+
+ END
diff --git a/src/slalib/ds2c6.f b/src/slalib/ds2c6.f
new file mode 100644
index 0000000..56298f3
--- /dev/null
+++ b/src/slalib/ds2c6.f
@@ -0,0 +1,57 @@
+ SUBROUTINE sla_DS2C6 (A, B, R, AD, BD, RD, V)
+*+
+* - - - - - -
+* D S 2 C 6
+* - - - - - -
+*
+* Conversion of position & velocity in spherical coordinates
+* to Cartesian coordinates
+*
+* (double precision)
+*
+* Given:
+* A dp longitude (radians)
+* B dp latitude (radians)
+* R dp radial coordinate
+* AD dp longitude derivative (radians per unit time)
+* BD dp latitude derivative (radians per unit time)
+* RD dp radial derivative
+*
+* Returned:
+* V dp(6) Cartesian position & velocity vector
+*
+* P.T.Wallace Starlink 10 July 1993
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION A,B,R,AD,BD,RD,V(6)
+
+ DOUBLE PRECISION SA,CA,SB,CB,RCB,X,Y,RBD,W
+
+
+
+* Useful functions
+ SA=SIN(A)
+ CA=COS(A)
+ SB=SIN(B)
+ CB=COS(B)
+ RCB=R*CB
+ X=RCB*CA
+ Y=RCB*SA
+ RBD=R*BD
+ W=RBD*SB-CB*RD
+
+* Position
+ V(1)=X
+ V(2)=Y
+ V(3)=R*SB
+
+* Velocity
+ V(4)=-Y*AD-W*CA
+ V(5)=X*AD-W*SA
+ V(6)=RBD*CB+SB*RD
+
+ END
diff --git a/src/slalib/ds2tp.f b/src/slalib/ds2tp.f
new file mode 100644
index 0000000..ab1ccf9
--- /dev/null
+++ b/src/slalib/ds2tp.f
@@ -0,0 +1,67 @@
+ SUBROUTINE sla_DS2TP (RA, DEC, RAZ, DECZ, XI, ETA, J)
+*+
+* - - - - - -
+* D S 2 T P
+* - - - - - -
+*
+* Projection of spherical coordinates onto tangent plane:
+* "gnomonic" projection - "standard coordinates" (double precision)
+*
+* Given:
+* RA,DEC dp spherical coordinates of point to be projected
+* RAZ,DECZ dp spherical coordinates of tangent point
+*
+* Returned:
+* XI,ETA dp rectangular coordinates on tangent plane
+* J int status: 0 = OK, star on tangent plane
+* 1 = error, star too far from axis
+* 2 = error, antistar on tangent plane
+* 3 = error, antistar too far from axis
+*
+* P.T.Wallace Starlink 18 July 1996
+*
+* Copyright (C) 1996 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION RA,DEC,RAZ,DECZ,XI,ETA
+ INTEGER J
+
+ DOUBLE PRECISION SDECZ,SDEC,CDECZ,CDEC,
+ : RADIF,SRADIF,CRADIF,DENOM
+
+ DOUBLE PRECISION TINY
+ PARAMETER (TINY=1D-6)
+
+
+* Trig functions
+ SDECZ=SIN(DECZ)
+ SDEC=SIN(DEC)
+ CDECZ=COS(DECZ)
+ CDEC=COS(DEC)
+ RADIF=RA-RAZ
+ SRADIF=SIN(RADIF)
+ CRADIF=COS(RADIF)
+
+* Reciprocal of star vector length to tangent plane
+ DENOM=SDEC*SDECZ+CDEC*CDECZ*CRADIF
+
+* Handle vectors too far from axis
+ IF (DENOM.GT.TINY) THEN
+ J=0
+ ELSE IF (DENOM.GE.0D0) THEN
+ J=1
+ DENOM=TINY
+ ELSE IF (DENOM.GT.-TINY) THEN
+ J=2
+ DENOM=-TINY
+ ELSE
+ J=3
+ END IF
+
+* Compute tangent plane coordinates (even in dubious cases)
+ XI=CDEC*SRADIF/DENOM
+ ETA=(SDEC*CDECZ-CDEC*SDECZ*CRADIF)/DENOM
+
+ END
diff --git a/src/slalib/dsep.f b/src/slalib/dsep.f
new file mode 100644
index 0000000..b1bd4be
--- /dev/null
+++ b/src/slalib/dsep.f
@@ -0,0 +1,48 @@
+ DOUBLE PRECISION FUNCTION sla_DSEP (A1, B1, A2, B2)
+*+
+* - - - - -
+* D S E P
+* - - - - -
+*
+* Angle between two points on a sphere (double precision)
+*
+* Given:
+* A1,B1 dp spherical coordinates of one point
+* A2,B2 dp spherical coordinates of the other point
+*
+* (The spherical coordinates are RA,Dec, Long,Lat etc, in radians.)
+*
+* The result is the angle, in radians, between the two points. It
+* is always positive.
+*
+* Called: sla_DCS2C
+*
+* P.T.Wallace Starlink April 1985
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION A1,B1,A2,B2
+
+ INTEGER I
+ DOUBLE PRECISION V1(3),V2(3),W
+
+
+
+* Convert coordinates from spherical to Cartesian
+ CALL sla_DCS2C(A1,B1,V1)
+ CALL sla_DCS2C(A2,B2,V2)
+
+* Modulus squared of half the difference vector
+ W=0D0
+ DO I=1,3
+ W=W+(V1(I)-V2(I))**2
+ END DO
+ W=W/4D0
+
+* Angle between the vectors
+ sla_DSEP=2D0*ATAN2(SQRT(W),SQRT(MAX(0D0,1D0-W)))
+
+ END
diff --git a/src/slalib/dt.f b/src/slalib/dt.f
new file mode 100644
index 0000000..d46c7be
--- /dev/null
+++ b/src/slalib/dt.f
@@ -0,0 +1,79 @@
+ DOUBLE PRECISION FUNCTION sla_DT (EPOCH)
+*+
+* - - -
+* D T
+* - - -
+*
+* Estimate the offset between dynamical time and Universal Time
+* for a given historical epoch.
+*
+* Given:
+* EPOCH d (Julian) epoch (e.g. 1850D0)
+*
+* The result is a rough estimate of ET-UT (after 1984, TT-UT) at
+* the given epoch, in seconds.
+*
+* Notes:
+*
+* 1 Depending on the epoch, one of three parabolic approximations
+* is used:
+*
+* before 979 Stephenson & Morrison's 390 BC to AD 948 model
+* 979 to 1708 Stephenson & Morrison's 948 to 1600 model
+* after 1708 McCarthy & Babcock's post-1650 model
+*
+* The breakpoints are chosen to ensure continuity: they occur
+* at places where the adjacent models give the same answer as
+* each other.
+*
+* 2 The accuracy is modest, with errors of up to 20 sec during
+* the interval since 1650, rising to perhaps 30 min by 1000 BC.
+* Comparatively accurate values from AD 1600 are tabulated in
+* the Astronomical Almanac (see section K8 of the 1995 AA).
+*
+* 3 The use of double-precision for both argument and result is
+* purely for compatibility with other SLALIB time routines.
+*
+* 4 The models used are based on a lunar tidal acceleration value
+* of -26.00 arcsec per century.
+*
+* Reference: Explanatory Supplement to the Astronomical Almanac,
+* ed P.K.Seidelmann, University Science Books (1992),
+* section 2.553, p83. This contains references to
+* the Stephenson & Morrison and McCarthy & Babcock
+* papers.
+*
+* P.T.Wallace Starlink 1 March 1995
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION EPOCH
+ DOUBLE PRECISION T,W,S
+
+
+* Centuries since 1800
+ T=(EPOCH-1800D0)/100D0
+
+* Select model
+ IF (EPOCH.GE.1708.185161980887D0) THEN
+
+* Post-1708: use McCarthy & Babcock
+ W=T-0.19D0
+ S=5.156D0+13.3066D0*W*W
+ ELSE IF (EPOCH.GE.979.0258204760233D0) THEN
+
+* 979-1708: use Stephenson & Morrison's 948-1600 model
+ S=25.5D0*T*T
+ ELSE
+
+* Pre-979: use Stephenson & Morrison's 390 BC to AD 948 model
+ S=1360.0D0+(320D0+44.3D0*T)*T
+ END IF
+
+* Result
+ sla_DT=S
+
+ END
diff --git a/src/slalib/dtf2d.f b/src/slalib/dtf2d.f
new file mode 100644
index 0000000..4a25ac6
--- /dev/null
+++ b/src/slalib/dtf2d.f
@@ -0,0 +1,55 @@
+ SUBROUTINE sla_DTF2D (IHOUR, IMIN, SEC, DAYS, J)
+*+
+* - - - - - -
+* D T F 2 D
+* - - - - - -
+*
+* Convert hours, minutes, seconds to days (double precision)
+*
+* Given:
+* IHOUR int hours
+* IMIN int minutes
+* SEC dp seconds
+*
+* Returned:
+* DAYS dp interval in days
+* J int status: 0 = OK
+* 1 = IHOUR outside range 0-23
+* 2 = IMIN outside range 0-59
+* 3 = SEC outside range 0-59.999...
+*
+* Notes:
+*
+* 1) The result is computed even if any of the range checks fail.
+*
+* 2) The sign must be dealt with outside this routine.
+*
+* P.T.Wallace Starlink July 1984
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ INTEGER IHOUR,IMIN
+ DOUBLE PRECISION SEC,DAYS
+ INTEGER J
+
+* Seconds per day
+ DOUBLE PRECISION D2S
+ PARAMETER (D2S=86400D0)
+
+
+
+* Preset status
+ J=0
+
+* Validate sec, min, hour
+ IF (SEC.LT.0D0.OR.SEC.GE.60D0) J=3
+ IF (IMIN.LT.0.OR.IMIN.GT.59) J=2
+ IF (IHOUR.LT.0.OR.IHOUR.GT.23) J=1
+
+* Compute interval
+ DAYS=(60D0*(60D0*DBLE(IHOUR)+DBLE(IMIN))+SEC)/D2S
+
+ END
diff --git a/src/slalib/dtf2r.f b/src/slalib/dtf2r.f
new file mode 100644
index 0000000..b100889
--- /dev/null
+++ b/src/slalib/dtf2r.f
@@ -0,0 +1,53 @@
+ SUBROUTINE sla_DTF2R (IHOUR, IMIN, SEC, RAD, J)
+*+
+* - - - - - -
+* D T F 2 R
+* - - - - - -
+*
+* Convert hours, minutes, seconds to radians (double precision)
+*
+* Given:
+* IHOUR int hours
+* IMIN int minutes
+* SEC dp seconds
+*
+* Returned:
+* RAD dp angle in radians
+* J int status: 0 = OK
+* 1 = IHOUR outside range 0-23
+* 2 = IMIN outside range 0-59
+* 3 = SEC outside range 0-59.999...
+*
+* Called:
+* sla_DTF2D
+*
+* Notes:
+*
+* 1) The result is computed even if any of the range checks fail.
+*
+* 2) The sign must be dealt with outside this routine.
+*
+* P.T.Wallace Starlink July 1984
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ INTEGER IHOUR,IMIN
+ DOUBLE PRECISION SEC,RAD
+ INTEGER J
+
+ DOUBLE PRECISION TURNS
+
+* Turns to radians
+ DOUBLE PRECISION T2R
+ PARAMETER (T2R=6.283185307179586476925287D0)
+
+
+
+* Convert to turns then radians
+ CALL sla_DTF2D(IHOUR,IMIN,SEC,TURNS,J)
+ RAD=T2R*TURNS
+
+ END
diff --git a/src/slalib/dtp2s.f b/src/slalib/dtp2s.f
new file mode 100644
index 0000000..0a67a11
--- /dev/null
+++ b/src/slalib/dtp2s.f
@@ -0,0 +1,42 @@
+ SUBROUTINE sla_DTP2S (XI, ETA, RAZ, DECZ, RA, DEC)
+*+
+* - - - - - -
+* D T P 2 S
+* - - - - - -
+*
+* Transform tangent plane coordinates into spherical
+* (double precision)
+*
+* Given:
+* XI,ETA dp tangent plane rectangular coordinates
+* RAZ,DECZ dp spherical coordinates of tangent point
+*
+* Returned:
+* RA,DEC dp spherical coordinates (0-2pi,+/-pi/2)
+*
+* Called: sla_DRANRM
+*
+* P.T.Wallace Starlink 24 July 1995
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION XI,ETA,RAZ,DECZ,RA,DEC
+
+ DOUBLE PRECISION sla_DRANRM
+
+ DOUBLE PRECISION SDECZ,CDECZ,DENOM
+
+
+
+ SDECZ=SIN(DECZ)
+ CDECZ=COS(DECZ)
+
+ DENOM=CDECZ-ETA*SDECZ
+
+ RA=sla_DRANRM(ATAN2(XI,DENOM)+RAZ)
+ DEC=ATAN2(SDECZ+ETA*CDECZ,SQRT(XI*XI+DENOM*DENOM))
+
+ END
diff --git a/src/slalib/dtp2v.f b/src/slalib/dtp2v.f
new file mode 100644
index 0000000..e1795b9
--- /dev/null
+++ b/src/slalib/dtp2v.f
@@ -0,0 +1,56 @@
+ SUBROUTINE sla_DTP2V (XI, ETA, V0, V)
+*+
+* - - - - - -
+* D T P 2 V
+* - - - - - -
+*
+* Given the tangent-plane coordinates of a star and the direction
+* cosines of the tangent point, determine the direction cosines
+* of the star.
+*
+* (double precision)
+*
+* Given:
+* XI,ETA d tangent plane coordinates of star
+* V0 d(3) direction cosines of tangent point
+*
+* Returned:
+* V d(3) direction cosines of star
+*
+* Notes:
+*
+* 1 If vector V0 is not of unit length, the returned vector V will
+* be wrong.
+*
+* 2 If vector V0 points at a pole, the returned vector V will be
+* based on the arbitrary assumption that the RA of the tangent
+* point is zero.
+*
+* 3 This routine is the Cartesian equivalent of the routine sla_DTP2S.
+*
+* P.T.Wallace Starlink 11 February 1995
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION XI,ETA,V0(3),V(3)
+
+ DOUBLE PRECISION X,Y,Z,F,R
+
+
+ X=V0(1)
+ Y=V0(2)
+ Z=V0(3)
+ F=SQRT(1D0+XI*XI+ETA*ETA)
+ R=SQRT(X*X+Y*Y)
+ IF (R.EQ.0D0) THEN
+ R=1D-20
+ X=R
+ END IF
+ V(1)=(X-(XI*Y+ETA*X*Z)/R)/F
+ V(2)=(Y+(XI*X-ETA*Y*Z)/R)/F
+ V(3)=(Z+ETA*R)/F
+
+ END
diff --git a/src/slalib/dtps2c.f b/src/slalib/dtps2c.f
new file mode 100644
index 0000000..43e3bad
--- /dev/null
+++ b/src/slalib/dtps2c.f
@@ -0,0 +1,91 @@
+ SUBROUTINE sla_DTPS2C (XI, ETA, RA, DEC, RAZ1, DECZ1,
+ : RAZ2, DECZ2, N)
+*+
+* - - - - - - -
+* D T P S 2 C
+* - - - - - - -
+*
+* From the tangent plane coordinates of a star of known RA,Dec,
+* determine the RA,Dec of the tangent point.
+*
+* (double precision)
+*
+* Given:
+* XI,ETA d tangent plane rectangular coordinates
+* RA,DEC d spherical coordinates
+*
+* Returned:
+* RAZ1,DECZ1 d spherical coordinates of tangent point, solution 1
+* RAZ2,DECZ2 d spherical coordinates of tangent point, solution 2
+* N i number of solutions:
+* 0 = no solutions returned (note 2)
+* 1 = only the first solution is useful (note 3)
+* 2 = both solutions are useful (note 3)
+*
+* Notes:
+*
+* 1 The RAZ1 and RAZ2 values are returned in the range 0-2pi.
+*
+* 2 Cases where there is no solution can only arise near the poles.
+* For example, it is clearly impossible for a star at the pole
+* itself to have a non-zero XI value, and hence it is
+* meaningless to ask where the tangent point would have to be
+* to bring about this combination of XI and DEC.
+*
+* 3 Also near the poles, cases can arise where there are two useful
+* solutions. The argument N indicates whether the second of the
+* two solutions returned is useful. N=1 indicates only one useful
+* solution, the usual case; under these circumstances, the second
+* solution corresponds to the "over-the-pole" case, and this is
+* reflected in the values of RAZ2 and DECZ2 which are returned.
+*
+* 4 The DECZ1 and DECZ2 values are returned in the range +/-pi, but
+* in the usual, non-pole-crossing, case, the range is +/-pi/2.
+*
+* 5 This routine is the spherical equivalent of the routine sla_DTPV2C.
+*
+* Called: sla_DRANRM
+*
+* P.T.Wallace Starlink 5 June 1995
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION XI,ETA,RA,DEC,RAZ1,DECZ1,RAZ2,DECZ2
+ INTEGER N
+
+ DOUBLE PRECISION X2,Y2,SD,CD,SDF,R2,R,S,C
+
+ DOUBLE PRECISION sla_DRANRM
+
+
+ X2=XI*XI
+ Y2=ETA*ETA
+ SD=SIN(DEC)
+ CD=COS(DEC)
+ SDF=SD*SQRT(1D0+X2+Y2)
+ R2=CD*CD*(1D0+Y2)-SD*SD*X2
+ IF (R2.GE.0D0) THEN
+ R=SQRT(R2)
+ S=SDF-ETA*R
+ C=SDF*ETA+R
+ IF (XI.EQ.0D0.AND.R.EQ.0D0) R=1D0
+ RAZ1=sla_DRANRM(RA-ATAN2(XI,R))
+ DECZ1=ATAN2(S,C)
+ R=-R
+ S=SDF-ETA*R
+ C=SDF*ETA+R
+ RAZ2=sla_DRANRM(RA-ATAN2(XI,R))
+ DECZ2=ATAN2(S,C)
+ IF (ABS(SDF).LT.1D0) THEN
+ N=1
+ ELSE
+ N=2
+ END IF
+ ELSE
+ N=0
+ END IF
+
+ END
diff --git a/src/slalib/dtpv2c.f b/src/slalib/dtpv2c.f
new file mode 100644
index 0000000..6ea2c29
--- /dev/null
+++ b/src/slalib/dtpv2c.f
@@ -0,0 +1,83 @@
+ SUBROUTINE sla_DTPV2C (XI, ETA, V, V01, V02, N)
+*+
+* - - - - - - -
+* D T P V 2 C
+* - - - - - - -
+*
+* Given the tangent-plane coordinates of a star and its direction
+* cosines, determine the direction cosines of the tangent-point.
+*
+* (double precision)
+*
+* Given:
+* XI,ETA d tangent plane coordinates of star
+* V d(3) direction cosines of star
+*
+* Returned:
+* V01 d(3) direction cosines of tangent point, solution 1
+* V02 d(3) direction cosines of tangent point, solution 2
+* N i number of solutions:
+* 0 = no solutions returned (note 2)
+* 1 = only the first solution is useful (note 3)
+* 2 = both solutions are useful (note 3)
+*
+* Notes:
+*
+* 1 The vector V must be of unit length or the result will be wrong.
+*
+* 2 Cases where there is no solution can only arise near the poles.
+* For example, it is clearly impossible for a star at the pole
+* itself to have a non-zero XI value, and hence it is meaningless
+* to ask where the tangent point would have to be.
+*
+* 3 Also near the poles, cases can arise where there are two useful
+* solutions. The argument N indicates whether the second of the
+* two solutions returned is useful. N=1 indicates only one useful
+* solution, the usual case; under these circumstances, the second
+* solution can be regarded as valid if the vector V02 is interpreted
+* as the "over-the-pole" case.
+*
+* 4 This routine is the Cartesian equivalent of the routine sla_DTPS2C.
+*
+* P.T.Wallace Starlink 5 June 1995
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION XI,ETA,V(3),V01(3),V02(3)
+ INTEGER N
+
+ DOUBLE PRECISION X,Y,Z,RXY2,XI2,ETA2P1,SDF,R2,R,C
+
+
+ X=V(1)
+ Y=V(2)
+ Z=V(3)
+ RXY2=X*X+Y*Y
+ XI2=XI*XI
+ ETA2P1=ETA*ETA+1D0
+ SDF=Z*SQRT(XI2+ETA2P1)
+ R2=RXY2*ETA2P1-Z*Z*XI2
+ IF (R2.GT.0D0) THEN
+ R=SQRT(R2)
+ C=(SDF*ETA+R)/(ETA2P1*SQRT(RXY2*(R2+XI2)))
+ V01(1)=C*(X*R+Y*XI)
+ V01(2)=C*(Y*R-X*XI)
+ V01(3)=(SDF-ETA*R)/ETA2P1
+ R=-R
+ C=(SDF*ETA+R)/(ETA2P1*SQRT(RXY2*(R2+XI2)))
+ V02(1)=C*(X*R+Y*XI)
+ V02(2)=C*(Y*R-X*XI)
+ V02(3)=(SDF-ETA*R)/ETA2P1
+ IF (ABS(SDF).LT.1D0) THEN
+ N=1
+ ELSE
+ N=2
+ END IF
+ ELSE
+ N=0
+ END IF
+
+ END
diff --git a/src/slalib/dtt.f b/src/slalib/dtt.f
new file mode 100644
index 0000000..9d456ef
--- /dev/null
+++ b/src/slalib/dtt.f
@@ -0,0 +1,46 @@
+ DOUBLE PRECISION FUNCTION sla_DTT (UTC)
+*+
+* - - - -
+* D T T
+* - - - -
+*
+* Increment to be applied to Coordinated Universal Time UTC to give
+* Terrestrial Time TT (formerly Ephemeris Time ET)
+*
+* (double precision)
+*
+* Given:
+* UTC d UTC date as a modified JD (JD-2400000.5)
+*
+* Result: TT-UTC in seconds
+*
+* Notes:
+*
+* 1 The UTC is specified to be a date rather than a time to indicate
+* that care needs to be taken not to specify an instant which lies
+* within a leap second. Though in most cases UTC can include the
+* fractional part, correct behaviour on the day of a leap second
+* can only be guaranteed up to the end of the second 23:59:59.
+*
+* 2 Pre 1972 January 1 a fixed value of 10 + ET-TAI is returned.
+*
+* 3 See also the routine sla_DT, which roughly estimates ET-UT for
+* historical epochs.
+*
+* Called: sla_DAT
+*
+* P.T.Wallace Starlink 6 December 1994
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION UTC
+
+ DOUBLE PRECISION sla_DAT
+
+
+ sla_DTT=32.184D0+sla_DAT(UTC)
+
+ END
diff --git a/src/slalib/dv2tp.f b/src/slalib/dv2tp.f
new file mode 100644
index 0000000..9bf2c33
--- /dev/null
+++ b/src/slalib/dv2tp.f
@@ -0,0 +1,78 @@
+ SUBROUTINE sla_DV2TP (V, V0, XI, ETA, J)
+*+
+* - - - - - -
+* D V 2 T P
+* - - - - - -
+*
+* Given the direction cosines of a star and of the tangent point,
+* determine the star's tangent-plane coordinates.
+*
+* (double precision)
+*
+* Given:
+* V d(3) direction cosines of star
+* V0 d(3) direction cosines of tangent point
+*
+* Returned:
+* XI,ETA d tangent plane coordinates of star
+* J i status: 0 = OK
+* 1 = error, star too far from axis
+* 2 = error, antistar on tangent plane
+* 3 = error, antistar too far from axis
+*
+* Notes:
+*
+* 1 If vector V0 is not of unit length, or if vector V is of zero
+* length, the results will be wrong.
+*
+* 2 If V0 points at a pole, the returned XI,ETA will be based on the
+* arbitrary assumption that the RA of the tangent point is zero.
+*
+* 3 This routine is the Cartesian equivalent of the routine sla_DS2TP.
+*
+* P.T.Wallace Starlink 27 November 1996
+*
+* Copyright (C) 1996 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION V(3),V0(3),XI,ETA
+ INTEGER J
+
+ DOUBLE PRECISION X,Y,Z,X0,Y0,Z0,R2,R,W,D
+
+ DOUBLE PRECISION TINY
+ PARAMETER (TINY=1D-6)
+
+
+ X=V(1)
+ Y=V(2)
+ Z=V(3)
+ X0=V0(1)
+ Y0=V0(2)
+ Z0=V0(3)
+ R2=X0*X0+Y0*Y0
+ R=SQRT(R2)
+ IF (R.EQ.0D0) THEN
+ R=1D-20
+ X0=R
+ END IF
+ W=X*X0+Y*Y0
+ D=W+Z*Z0
+ IF (D.GT.TINY) THEN
+ J=0
+ ELSE IF (D.GE.0D0) THEN
+ J=1
+ D=TINY
+ ELSE IF (D.GT.-TINY) THEN
+ J=2
+ D=-TINY
+ ELSE
+ J=3
+ END IF
+ D=D*R
+ XI=(Y*X0-X*Y0)/D
+ ETA=(Z*R2-Z0*W)/D
+
+ END
diff --git a/src/slalib/dvdv.f b/src/slalib/dvdv.f
new file mode 100644
index 0000000..ab3e411
--- /dev/null
+++ b/src/slalib/dvdv.f
@@ -0,0 +1,27 @@
+ DOUBLE PRECISION FUNCTION sla_DVDV (VA, VB)
+*+
+* - - - - -
+* D V D V
+* - - - - -
+*
+* Scalar product of two 3-vectors (double precision)
+*
+* Given:
+* VA dp(3) first vector
+* VB dp(3) second vector
+*
+* The result is the scalar product VA.VB (double precision)
+*
+* P.T.Wallace Starlink November 1984
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION VA(3),VB(3)
+
+
+ sla_DVDV=VA(1)*VB(1)+VA(2)*VB(2)+VA(3)*VB(3)
+
+ END
diff --git a/src/slalib/dvn.f b/src/slalib/dvn.f
new file mode 100644
index 0000000..37a4a6d
--- /dev/null
+++ b/src/slalib/dvn.f
@@ -0,0 +1,46 @@
+ SUBROUTINE sla_DVN (V, UV, VM)
+*+
+* - - - -
+* D V N
+* - - - -
+*
+* Normalizes a 3-vector also giving the modulus (double precision)
+*
+* Given:
+* V dp(3) vector
+*
+* Returned:
+* UV dp(3) unit vector in direction of V
+* VM dp modulus of V
+*
+* If the modulus of V is zero, UV is set to zero as well
+*
+* P.T.Wallace Starlink 23 November 1995
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION V(3),UV(3),VM
+
+ INTEGER I
+ DOUBLE PRECISION W1,W2
+
+
+* Modulus
+ W1=0D0
+ DO I=1,3
+ W2=V(I)
+ W1=W1+W2*W2
+ END DO
+ W1=SQRT(W1)
+ VM=W1
+
+* Normalize the vector
+ IF (W1.LE.0D0) W1=1D0
+ DO I=1,3
+ UV(I)=V(I)/W1
+ END DO
+
+ END
diff --git a/src/slalib/dvxv.f b/src/slalib/dvxv.f
new file mode 100644
index 0000000..389deb4
--- /dev/null
+++ b/src/slalib/dvxv.f
@@ -0,0 +1,39 @@
+ SUBROUTINE sla_DVXV (VA, VB, VC)
+*+
+* - - - - -
+* D V X V
+* - - - - -
+*
+* Vector product of two 3-vectors (double precision)
+*
+* Given:
+* VA dp(3) first vector
+* VB dp(3) second vector
+*
+* Returned:
+* VC dp(3) vector result
+*
+* P.T.Wallace Starlink March 1986
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION VA(3),VB(3),VC(3)
+
+ DOUBLE PRECISION VW(3)
+ INTEGER I
+
+
+* Form the vector product VA cross VB
+ VW(1)=VA(2)*VB(3)-VA(3)*VB(2)
+ VW(2)=VA(3)*VB(1)-VA(1)*VB(3)
+ VW(3)=VA(1)*VB(2)-VA(2)*VB(1)
+
+* Return the result
+ DO I=1,3
+ VC(I)=VW(I)
+ END DO
+
+ END
diff --git a/src/slalib/e2h.f b/src/slalib/e2h.f
new file mode 100644
index 0000000..03e36d3
--- /dev/null
+++ b/src/slalib/e2h.f
@@ -0,0 +1,89 @@
+ SUBROUTINE sla_E2H (HA, DEC, PHI, AZ, EL)
+*+
+* - - - -
+* E 2 H
+* - - - -
+*
+* Equatorial to horizon coordinates: HA,Dec to Az,El
+*
+* (single precision)
+*
+* Given:
+* HA r hour angle
+* DEC r declination
+* PHI r observatory latitude
+*
+* Returned:
+* AZ r azimuth
+* EL r elevation
+*
+* Notes:
+*
+* 1) All the arguments are angles in radians.
+*
+* 2) Azimuth is returned in the range 0-2pi; north is zero,
+* and east is +pi/2. Elevation is returned in the range
+* +/-pi/2.
+*
+* 3) The latitude must be geodetic. In critical applications,
+* corrections for polar motion should be applied.
+*
+* 4) In some applications it will be important to specify the
+* correct type of hour angle and declination in order to
+* produce the required type of azimuth and elevation. In
+* particular, it may be important to distinguish between
+* elevation as affected by refraction, which would
+* require the "observed" HA,Dec, and the elevation
+* in vacuo, which would require the "topocentric" HA,Dec.
+* If the effects of diurnal aberration can be neglected, the
+* "apparent" HA,Dec may be used instead of the topocentric
+* HA,Dec.
+*
+* 5) No range checking of arguments is carried out.
+*
+* 6) In applications which involve many such calculations, rather
+* than calling the present routine it will be more efficient to
+* use inline code, having previously computed fixed terms such
+* as sine and cosine of latitude, and (for tracking a star)
+* sine and cosine of declination.
+*
+* P.T.Wallace Starlink 9 July 1994
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL HA,DEC,PHI,AZ,EL
+
+ REAL R2PI
+ PARAMETER (R2PI=6.283185307179586476925286766559)
+
+ REAL SH,CH,SD,CD,SP,CP,X,Y,Z,R,A
+
+
+* Useful trig functions
+ SH=SIN(HA)
+ CH=COS(HA)
+ SD=SIN(DEC)
+ CD=COS(DEC)
+ SP=SIN(PHI)
+ CP=COS(PHI)
+
+* Az,El as x,y,z
+ X=-CH*CD*SP+SD*CP
+ Y=-SH*CD
+ Z=CH*CD*CP+SD*SP
+
+* To spherical
+ R=SQRT(X*X+Y*Y)
+ IF (R.EQ.0.0) THEN
+ A=0.0
+ ELSE
+ A=ATAN2(Y,X)
+ END IF
+ IF (A.LT.0.0) A=A+R2PI
+ AZ=A
+ EL=ATAN2(Z,R)
+
+ END
diff --git a/src/slalib/earth.f b/src/slalib/earth.f
new file mode 100644
index 0000000..f37ba2e
--- /dev/null
+++ b/src/slalib/earth.f
@@ -0,0 +1,111 @@
+ SUBROUTINE sla_EARTH (IY, ID, FD, PV)
+*+
+* - - - - - -
+* E A R T H
+* - - - - - -
+*
+* Approximate heliocentric position and velocity of the Earth
+*
+* Given:
+* IY I year
+* ID I day in year (1 = Jan 1st)
+* FD R fraction of day
+*
+* Returned:
+* PV R(6) Earth position & velocity vector
+*
+* Notes:
+*
+* 1 The date and time is TDB (loosely ET) in a Julian calendar
+* which has been aligned to the ordinary Gregorian
+* calendar for the interval 1900 March 1 to 2100 February 28.
+* The year and day can be obtained by calling sla_CALYD or
+* sla_CLYD.
+*
+* 2 The Earth heliocentric 6-vector is mean equator and equinox
+* of date. Position part, PV(1-3), is in AU; velocity part,
+* PV(4-6), is in AU/sec.
+*
+* 3 Max/RMS errors 1950-2050:
+* 13/5 E-5 AU = 19200/7600 km in position
+* 47/26 E-10 AU/s = 0.0070/0.0039 km/s in speed
+*
+* 4 More precise results are obtainable with the routine sla_EVP.
+*
+* P.T.Wallace Starlink 23 November 1994
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ INTEGER IY,ID
+ REAL FD,PV(6)
+
+ INTEGER IY4
+ REAL TWOPI,SPEED,REMB,SEMB,YI,YF,T,ELM,GAMMA,EM,ELT,EPS0,
+ : E,ESQ,V,R,ELMM,COSELT,SINEPS,COSEPS,W1,W2,SELMM,CELMM
+
+ PARAMETER (TWOPI=6.28318530718)
+
+* Mean orbital speed of Earth, AU/s
+ PARAMETER (SPEED=1.9913E-7)
+
+* Mean Earth:EMB distance and speed, AU and AU/s
+ PARAMETER (REMB=3.12E-5,SEMB=8.31E-11)
+
+
+
+* Whole years & fraction of year, and years since J1900.0
+ YI=FLOAT(IY-1900)
+ IY4=MOD(MOD(IY,4)+4,4)
+ YF=(FLOAT(4*(ID-1/(IY4+1))-IY4-2)+4.0*FD)/1461.0
+ T=YI+YF
+
+* Geometric mean longitude of Sun
+* (cf 4.881627938+6.283319509911*T MOD 2PI)
+ ELM=MOD(4.881628+TWOPI*YF+0.00013420*T,TWOPI)
+
+* Mean longitude of perihelion
+ GAMMA=4.908230+3.0005E-4*T
+
+* Mean anomaly
+ EM=ELM-GAMMA
+
+* Mean obliquity
+ EPS0=0.40931975-2.27E-6*T
+
+* Eccentricity
+ E=0.016751-4.2E-7*T
+ ESQ=E*E
+
+* True anomaly
+ V=EM+2.0*E*SIN(EM)+1.25*ESQ*SIN(2.0*EM)
+
+* True ecliptic longitude
+ ELT=V+GAMMA
+
+* True distance
+ R=(1.0-ESQ)/(1.0+E*COS(V))
+
+* Moon's mean longitude
+ ELMM=MOD(4.72+83.9971*T,TWOPI)
+
+* Useful functions
+ COSELT=COS(ELT)
+ SINEPS=SIN(EPS0)
+ COSEPS=COS(EPS0)
+ W1=-R*SIN(ELT)
+ W2=-SPEED*(COSELT+E*COS(GAMMA))
+ SELMM=SIN(ELMM)
+ CELMM=COS(ELMM)
+
+* Earth position and velocity
+ PV(1)=-R*COSELT-REMB*CELMM
+ PV(2)=(W1-REMB*SELMM)*COSEPS
+ PV(3)=W1*SINEPS
+ PV(4)=SPEED*(SIN(ELT)+E*SIN(GAMMA))+SEMB*SELMM
+ PV(5)=(W2-SEMB*CELMM)*COSEPS
+ PV(6)=W2*SINEPS
+
+ END
diff --git a/src/slalib/ecleq.f b/src/slalib/ecleq.f
new file mode 100644
index 0000000..5aa93c9
--- /dev/null
+++ b/src/slalib/ecleq.f
@@ -0,0 +1,55 @@
+ SUBROUTINE sla_ECLEQ (DL, DB, DATE, DR, DD)
+*+
+* - - - - - -
+* E C L E Q
+* - - - - - -
+*
+* Transformation from ecliptic coordinates to
+* J2000.0 equatorial coordinates (double precision)
+*
+* Given:
+* DL,DB dp ecliptic longitude and latitude
+* (mean of date, IAU 1980 theory, radians)
+* DATE dp TDB (loosely ET) as Modified Julian Date
+* (JD-2400000.5)
+* Returned:
+* DR,DD dp J2000.0 mean RA,Dec (radians)
+*
+* Called:
+* sla_DCS2C, sla_ECMAT, sla_DIMXV, sla_PREC, sla_EPJ, sla_DCC2S,
+* sla_DRANRM, sla_DRANGE
+*
+* P.T.Wallace Starlink March 1986
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION DL,DB,DATE,DR,DD
+
+ DOUBLE PRECISION sla_EPJ,sla_DRANRM,sla_DRANGE
+
+ DOUBLE PRECISION RMAT(3,3),V1(3),V2(3)
+
+
+
+* Spherical to Cartesian
+ CALL sla_DCS2C(DL,DB,V1)
+
+* Ecliptic to equatorial
+ CALL sla_ECMAT(DATE,RMAT)
+ CALL sla_DIMXV(RMAT,V1,V2)
+
+* Mean of date to J2000
+ CALL sla_PREC(2000D0,sla_EPJ(DATE),RMAT)
+ CALL sla_DIMXV(RMAT,V2,V1)
+
+* Cartesian to spherical
+ CALL sla_DCC2S(V1,DR,DD)
+
+* Express in conventional ranges
+ DR=sla_DRANRM(DR)
+ DD=sla_DRANGE(DD)
+
+ END
diff --git a/src/slalib/ecmat.f b/src/slalib/ecmat.f
new file mode 100644
index 0000000..3a1f8d4
--- /dev/null
+++ b/src/slalib/ecmat.f
@@ -0,0 +1,52 @@
+ SUBROUTINE sla_ECMAT (DATE, RMAT)
+*+
+* - - - - - -
+* E C M A T
+* - - - - - -
+*
+* Form the equatorial to ecliptic rotation matrix - IAU 1980 theory
+* (double precision)
+*
+* Given:
+* DATE dp TDB (loosely ET) as Modified Julian Date
+* (JD-2400000.5)
+* Returned:
+* RMAT dp(3,3) matrix
+*
+* Reference:
+* Murray,C.A., Vectorial Astrometry, section 4.3.
+*
+* Note:
+* The matrix is in the sense V(ecl) = RMAT * V(equ); the
+* equator, equinox and ecliptic are mean of date.
+*
+* Called: sla_DEULER
+*
+* P.T.Wallace Starlink 23 August 1996
+*
+* Copyright (C) 1996 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION DATE,RMAT(3,3)
+
+* Arc seconds to radians
+ DOUBLE PRECISION AS2R
+ PARAMETER (AS2R=0.484813681109535994D-5)
+
+ DOUBLE PRECISION T,EPS0
+
+
+
+* Interval between basic epoch J2000.0 and current epoch (JC)
+ T = (DATE-51544.5D0)/36525D0
+
+* Mean obliquity
+ EPS0 = AS2R*
+ : (84381.448D0+(-46.8150D0+(-0.00059D0+0.001813D0*T)*T)*T)
+
+* Matrix
+ CALL sla_DEULER('X',EPS0,0D0,0D0,RMAT)
+
+ END
diff --git a/src/slalib/ecor.f b/src/slalib/ecor.f
new file mode 100644
index 0000000..b936909
--- /dev/null
+++ b/src/slalib/ecor.f
@@ -0,0 +1,78 @@
+ SUBROUTINE sla_ECOR (RM, DM, IY, ID, FD, RV, TL)
+*+
+* - - - - -
+* E C O R
+* - - - - -
+*
+* Component of Earth orbit velocity and heliocentric
+* light time in a given direction (single precision)
+*
+* Given:
+* RM,DM real mean RA, Dec of date (radians)
+* IY int year
+* ID int day in year (1 = Jan 1st)
+* FD real fraction of day
+*
+* Returned:
+* RV real component of Earth orbital velocity (km/sec)
+* TL real component of heliocentric light time (sec)
+*
+* Notes:
+*
+* 1 The date and time is TDB (loosely ET) in a Julian calendar
+* which has been aligned to the ordinary Gregorian
+* calendar for the interval 1900 March 1 to 2100 February 28.
+* The year and day can be obtained by calling sla_CALYD or
+* sla_CLYD.
+*
+* 2 Sign convention:
+*
+* The velocity component is +ve when the Earth is receding from
+* the given point on the sky. The light time component is +ve
+* when the Earth lies between the Sun and the given point on
+* the sky.
+*
+* 3 Accuracy:
+*
+* The velocity component is usually within 0.004 km/s of the
+* correct value and is never in error by more than 0.007 km/s.
+* The error in light time correction is about 0.03s at worst,
+* but is usually better than 0.01s. For applications requiring
+* higher accuracy, see the sla_EVP routine.
+*
+* Called: sla_EARTH, sla_CS2C, sla_VDV
+*
+* P.T.Wallace Starlink 24 November 1994
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL RM,DM
+ INTEGER IY,ID
+ REAL FD,RV,TL
+
+ REAL sla_VDV
+
+ REAL PV(6),V(3),AUKM,AUSEC
+
+* AU to km and light sec (1985 Almanac)
+ PARAMETER (AUKM=1.4959787066E8,
+ : AUSEC=499.0047837)
+
+
+
+* Sun:Earth position & velocity vector
+ CALL sla_EARTH(IY,ID,FD,PV)
+
+* Star position vector
+ CALL sla_CS2C(RM,DM,V)
+
+* Velocity component
+ RV=-AUKM*sla_VDV(PV(4),V)
+
+* Light time component
+ TL=AUSEC*sla_VDV(PV(1),V)
+
+ END
diff --git a/src/slalib/eg50.f b/src/slalib/eg50.f
new file mode 100644
index 0000000..343fc11
--- /dev/null
+++ b/src/slalib/eg50.f
@@ -0,0 +1,90 @@
+ SUBROUTINE sla_EG50 (DR, DD, DL, DB)
+*+
+* - - - - -
+* E G 5 0
+* - - - - -
+*
+* Transformation from B1950.0 'FK4' equatorial coordinates to
+* IAU 1958 galactic coordinates (double precision)
+*
+* Given:
+* DR,DD dp B1950.0 'FK4' RA,Dec
+*
+* Returned:
+* DL,DB dp galactic longitude and latitude L2,B2
+*
+* (all arguments are radians)
+*
+* Called:
+* sla_DCS2C, sla_DMXV, sla_DCC2S, sla_SUBET, sla_DRANRM, sla_DRANGE
+*
+* Note:
+* The equatorial coordinates are B1950.0 'FK4'. Use the
+* routine sla_EQGAL if conversion from J2000.0 coordinates
+* is required.
+*
+* Reference:
+* Blaauw et al, Mon.Not.R.Astron.Soc.,121,123 (1960)
+*
+* P.T.Wallace Starlink 5 September 1993
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION DR,DD,DL,DB
+
+ DOUBLE PRECISION sla_DRANRM,sla_DRANGE
+
+ DOUBLE PRECISION V1(3),V2(3),R,D
+
+*
+* L2,B2 system of galactic coordinates
+*
+* P = 192.25 RA of galactic north pole (mean B1950.0)
+* Q = 62.6 inclination of galactic to mean B1950.0 equator
+* R = 33 longitude of ascending node
+*
+* P,Q,R are degrees
+*
+*
+* Equatorial to galactic rotation matrix
+*
+* The Euler angles are P, Q, 90-R, about the z then y then
+* z axes.
+*
+* +CP.CQ.SR-SP.CR +SP.CQ.SR+CP.CR -SQ.SR
+*
+* -CP.CQ.CR-SP.SR -SP.CQ.CR+CP.SR +SQ.CR
+*
+* +CP.SQ +SP.SQ +CQ
+*
+
+ DOUBLE PRECISION RMAT(3,3)
+ DATA RMAT(1,1),RMAT(1,2),RMAT(1,3),
+ : RMAT(2,1),RMAT(2,2),RMAT(2,3),
+ : RMAT(3,1),RMAT(3,2),RMAT(3,3) /
+ : -0.066988739415D0,-0.872755765852D0,-0.483538914632D0,
+ : +0.492728466075D0,-0.450346958020D0,+0.744584633283D0,
+ : -0.867600811151D0,-0.188374601723D0,+0.460199784784D0 /
+
+
+
+* Remove E-terms
+ CALL sla_SUBET(DR,DD,1950D0,R,D)
+
+* Spherical to Cartesian
+ CALL sla_DCS2C(R,D,V1)
+
+* Rotate to galactic
+ CALL sla_DMXV(RMAT,V1,V2)
+
+* Cartesian to spherical
+ CALL sla_DCC2S(V2,DL,DB)
+
+* Express angles in conventional ranges
+ DL=sla_DRANRM(DL)
+ DB=sla_DRANGE(DB)
+
+ END
diff --git a/src/slalib/el2ue.f b/src/slalib/el2ue.f
new file mode 100644
index 0000000..49f8ed6
--- /dev/null
+++ b/src/slalib/el2ue.f
@@ -0,0 +1,301 @@
+ SUBROUTINE sla_EL2UE (DATE, JFORM, EPOCH, ORBINC, ANODE,
+ : PERIH, AORQ, E, AORL, DM,
+ : U, JSTAT)
+*+
+* - - - - - -
+* E L 2 U E
+* - - - - - -
+*
+* Transform conventional osculating orbital elements into "universal" form.
+*
+* Given:
+* DATE d epoch (TT MJD) of osculation (Note 3)
+* JFORM i choice of element set (1-3, Note 6)
+* EPOCH d epoch (TT MJD) of the elements
+* ORBINC d inclination (radians)
+* ANODE d longitude of the ascending node (radians)
+* PERIH d longitude or argument of perihelion (radians)
+* AORQ d mean distance or perihelion distance (AU)
+* E d eccentricity
+* AORL d mean anomaly or longitude (radians, JFORM=1,2 only)
+* DM d daily motion (radians, JFORM=1 only)
+*
+* Returned:
+* U d(13) universal orbital elements (Note 1)
+*
+* (1) combined mass (M+m)
+* (2) total energy of the orbit (alpha)
+* (3) reference (osculating) epoch (t0)
+* (4-6) position at reference epoch (r0)
+* (7-9) velocity at reference epoch (v0)
+* (10) heliocentric distance at reference epoch
+* (11) r0.v0
+* (12) date (t)
+* (13) universal eccentric anomaly (psi) of date, approx
+*
+* JSTAT i status: 0 = OK
+* -1 = illegal JFORM
+* -2 = illegal E
+* -3 = illegal AORQ
+* -4 = illegal DM
+* -5 = numerical error
+*
+* Called: sla_UE2PV, sla_PV2UE
+*
+* Notes
+*
+* 1 The "universal" elements are those which define the orbit for the
+* purposes of the method of universal variables (see reference).
+* They consist of the combined mass of the two bodies, an epoch,
+* and the position and velocity vectors (arbitrary reference frame)
+* at that epoch. The parameter set used here includes also various
+* quantities that can, in fact, be derived from the other
+* information. This approach is taken to avoiding unnecessary
+* computation and loss of accuracy. The supplementary quantities
+* are (i) alpha, which is proportional to the total energy of the
+* orbit, (ii) the heliocentric distance at epoch, (iii) the
+* outwards component of the velocity at the given epoch, (iv) an
+* estimate of psi, the "universal eccentric anomaly" at a given
+* date and (v) that date.
+*
+* 2 The companion routine is sla_UE2PV. This takes the set of numbers
+* that the present routine outputs and uses them to derive the
+* object's position and velocity. A single prediction requires one
+* call to the present routine followed by one call to sla_UE2PV;
+* for convenience, the two calls are packaged as the routine
+* sla_PLANEL. Multiple predictions may be made by again calling the
+* present routine once, but then calling sla_UE2PV multiple times,
+* which is faster than multiple calls to sla_PLANEL.
+*
+* 3 DATE is the epoch of osculation. It is in the TT timescale
+* (formerly Ephemeris Time, ET) and is a Modified Julian Date
+* (JD-2400000.5).
+*
+* 4 The supplied orbital elements are with respect to the J2000
+* ecliptic and equinox. The position and velocity parameters
+* returned in the array U are with respect to the mean equator and
+* equinox of epoch J2000, and are for the perihelion prior to the
+* specified epoch.
+*
+* 5 The universal elements returned in the array U are in canonical
+* units (solar masses, AU and canonical days).
+*
+* 6 Three different element-format options are available:
+*
+* Option JFORM=1, suitable for the major planets:
+*
+* EPOCH = epoch of elements (TT MJD)
+* ORBINC = inclination i (radians)
+* ANODE = longitude of the ascending node, big omega (radians)
+* PERIH = longitude of perihelion, curly pi (radians)
+* AORQ = mean distance, a (AU)
+* E = eccentricity, e (range 0 to <1)
+* AORL = mean longitude L (radians)
+* DM = daily motion (radians)
+*
+* Option JFORM=2, suitable for minor planets:
+*
+* EPOCH = epoch of elements (TT MJD)
+* ORBINC = inclination i (radians)
+* ANODE = longitude of the ascending node, big omega (radians)
+* PERIH = argument of perihelion, little omega (radians)
+* AORQ = mean distance, a (AU)
+* E = eccentricity, e (range 0 to <1)
+* AORL = mean anomaly M (radians)
+*
+* Option JFORM=3, suitable for comets:
+*
+* EPOCH = epoch of perihelion (TT MJD)
+* ORBINC = inclination i (radians)
+* ANODE = longitude of the ascending node, big omega (radians)
+* PERIH = argument of perihelion, little omega (radians)
+* AORQ = perihelion distance, q (AU)
+* E = eccentricity, e (range 0 to 10)
+*
+* 7 Unused elements (DM for JFORM=2, AORL and DM for JFORM=3) are
+* not accessed.
+*
+* 8 The algorithm was originally adapted from the EPHSLA program of
+* D.H.P.Jones (private communication, 1996). The method is based
+* on Stumpff's Universal Variables.
+*
+* Reference: Everhart & Pitkin, Am.J.Phys. 51, 712 (1983).
+*
+* P.T.Wallace Starlink 18 February 1999
+*
+* Copyright (C) 1999 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION DATE
+ INTEGER JFORM
+ DOUBLE PRECISION EPOCH,ORBINC,ANODE,PERIH,AORQ,E,AORL,DM,U(13)
+ INTEGER JSTAT
+
+* Gaussian gravitational constant (exact)
+ DOUBLE PRECISION GCON
+ PARAMETER (GCON=0.01720209895D0)
+
+* Sin and cos of J2000 mean obliquity (IAU 1976)
+ DOUBLE PRECISION SE,CE
+ PARAMETER (SE=0.3977771559319137D0,
+ : CE=0.9174820620691818D0)
+
+ INTEGER J
+
+ DOUBLE PRECISION PHT,ARGPH,Q,W,CM,ALPHA,PHS,SW,CW,SI,CI,SO,CO,
+ : X,Y,Z,PX,PY,PZ,VX,VY,VZ,DT,FC,FP,PSI,
+ : UL(13),PV(6)
+
+
+
+* Validate arguments.
+ IF (JFORM.LT.1.OR.JFORM.GT.3) THEN
+ JSTAT = -1
+ GO TO 9999
+ END IF
+ IF (E.LT.0D0.OR.E.GT.10D0.OR.(E.GE.1D0.AND.JFORM.NE.3)) THEN
+ JSTAT = -2
+ GO TO 9999
+ END IF
+ IF (AORQ.LE.0D0) THEN
+ JSTAT = -3
+ GO TO 9999
+ END IF
+ IF (JFORM.EQ.1.AND.DM.LE.0D0) THEN
+ JSTAT = -4
+ GO TO 9999
+ END IF
+
+*
+* Transform elements into standard form:
+*
+* PHT = epoch of perihelion passage
+* ARGPH = argument of perihelion (little omega)
+* Q = perihelion distance (q)
+* CM = combined mass, M+m (mu)
+
+ IF (JFORM.EQ.1) THEN
+ PHT = EPOCH-(AORL-PERIH)/DM
+ ARGPH = PERIH-ANODE
+ Q = AORQ*(1D0-E)
+ W = DM/GCON
+ CM = W*W*AORQ*AORQ*AORQ
+ ELSE IF (JFORM.EQ.2) THEN
+ PHT = EPOCH-AORL*SQRT(AORQ*AORQ*AORQ)/GCON
+ ARGPH = PERIH
+ Q = AORQ*(1D0-E)
+ CM = 1D0
+ ELSE IF (JFORM.EQ.3) THEN
+ PHT = EPOCH
+ ARGPH = PERIH
+ Q = AORQ
+ CM = 1D0
+ END IF
+
+* The universal variable alpha. This is proportional to the total
+* energy of the orbit: -ve for an ellipse, zero for a parabola,
+* +ve for a hyperbola.
+
+ ALPHA = CM*(E-1D0)/Q
+
+* Speed at perihelion.
+
+ PHS = SQRT(ALPHA+2D0*CM/Q)
+
+* In a Cartesian coordinate system which has the x-axis pointing
+* to perihelion and the z-axis normal to the orbit (such that the
+* object orbits counter-clockwise as seen from +ve z), the
+* perihelion position and velocity vectors are:
+*
+* position [Q,0,0]
+* velocity [0,PHS,0]
+*
+* To express the results in J2000 equatorial coordinates we make a
+* series of four rotations of the Cartesian axes:
+*
+* axis Euler angle
+*
+* 1 z argument of perihelion (little omega)
+* 2 x inclination (i)
+* 3 z longitude of the ascending node (big omega)
+* 4 x J2000 obliquity (epsilon)
+*
+* In each case the rotation is clockwise as seen from the +ve end of
+* the axis concerned.
+
+* Functions of the Euler angles.
+ SW = SIN(ARGPH)
+ CW = COS(ARGPH)
+ SI = SIN(ORBINC)
+ CI = COS(ORBINC)
+ SO = SIN(ANODE)
+ CO = COS(ANODE)
+
+* Position at perihelion (AU).
+ X = Q*CW
+ Y = Q*SW
+ Z = Y*SI
+ Y = Y*CI
+ PX = X*CO-Y*SO
+ Y = X*SO+Y*CO
+ PY = Y*CE-Z*SE
+ PZ = Y*SE+Z*CE
+
+* Velocity at perihelion (AU per canonical day).
+ X = -PHS*SW
+ Y = PHS*CW
+ Z = Y*SI
+ Y = Y*CI
+ VX = X*CO-Y*SO
+ Y = X*SO+Y*CO
+ VY = Y*CE-Z*SE
+ VZ = Y*SE+Z*CE
+
+* Time from perihelion to date (in Canonical Days: a canonical day
+* is 58.1324409... days, defined as 1/GCON).
+
+ DT = (DATE-PHT)*GCON
+
+* First Approximation to the Universal Eccentric Anomaly, PSI,
+* based on the circle (FC) and parabola (FP) values.
+
+ FC = DT/Q
+ W = (3D0*DT+SQRT(9D0*DT*DT+8D0*Q*Q*Q))**(1D0/3D0)
+ FP = W-2D0*Q/W
+ PSI = (1D0-E)*FC+E*FP
+
+* Assemble local copy of element set.
+ UL(1) = CM
+ UL(2) = ALPHA
+ UL(3) = PHT
+ UL(4) = PX
+ UL(5) = PY
+ UL(6) = PZ
+ UL(7) = VX
+ UL(8) = VY
+ UL(9) = VZ
+ UL(10) = Q
+ UL(11) = 0D0
+ UL(12) = DATE
+ UL(13) = PSI
+
+* Predict position+velocity at epoch of osculation.
+ CALL sla_UE2PV(DATE,UL,PV,J)
+ IF (J.NE.0) GO TO 9010
+
+* Convert back to universal elements.
+ CALL sla_PV2UE(PV,DATE,CM-1D0,U,J)
+ IF (J.NE.0) GO TO 9010
+
+* OK exit.
+ JSTAT = 0
+ GO TO 9999
+
+* Quasi-impossible numerical errors.
+ 9010 CONTINUE
+ JSTAT = -5
+
+ 9999 CONTINUE
+ END
diff --git a/src/slalib/epb.f b/src/slalib/epb.f
new file mode 100644
index 0000000..4cc4d49
--- /dev/null
+++ b/src/slalib/epb.f
@@ -0,0 +1,30 @@
+ DOUBLE PRECISION FUNCTION sla_EPB (DATE)
+*+
+* - - - -
+* E P B
+* - - - -
+*
+* Conversion of Modified Julian Date to Besselian Epoch
+* (double precision)
+*
+* Given:
+* DATE dp Modified Julian Date (JD - 2400000.5)
+*
+* The result is the Besselian Epoch.
+*
+* Reference:
+* Lieske,J.H., 1979. Astron.Astrophys.,73,282.
+*
+* P.T.Wallace Starlink February 1984
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION DATE
+
+
+ sla_EPB = 1900D0 + (DATE-15019.81352D0)/365.242198781D0
+
+ END
diff --git a/src/slalib/epb2d.f b/src/slalib/epb2d.f
new file mode 100644
index 0000000..cb1be4f
--- /dev/null
+++ b/src/slalib/epb2d.f
@@ -0,0 +1,30 @@
+ DOUBLE PRECISION FUNCTION sla_EPB2D (EPB)
+*+
+* - - - - - -
+* E P B 2 D
+* - - - - - -
+*
+* Conversion of Besselian Epoch to Modified Julian Date
+* (double precision)
+*
+* Given:
+* EPB dp Besselian Epoch
+*
+* The result is the Modified Julian Date (JD - 2400000.5).
+*
+* Reference:
+* Lieske,J.H., 1979. Astron.Astrophys.,73,282.
+*
+* P.T.Wallace Starlink February 1984
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION EPB
+
+
+ sla_EPB2D = 15019.81352D0 + (EPB-1900D0)*365.242198781D0
+
+ END
diff --git a/src/slalib/epco.f b/src/slalib/epco.f
new file mode 100644
index 0000000..ef642ca
--- /dev/null
+++ b/src/slalib/epco.f
@@ -0,0 +1,51 @@
+ DOUBLE PRECISION FUNCTION sla_EPCO (K0, K, E)
+*+
+* - - - - -
+* E P C O
+* - - - - -
+*
+* Convert an epoch into the appropriate form - 'B' or 'J'
+*
+* Given:
+* K0 char form of result: 'B'=Besselian, 'J'=Julian
+* K char form of given epoch: 'B' or 'J'
+* E dp epoch
+*
+* Called: sla_EPB, sla_EPJ2D, sla_EPJ, sla_EPB2D
+*
+* Notes:
+*
+* 1) The result is always either equal to or very close to
+* the given epoch E. The routine is required only in
+* applications where punctilious treatment of heterogeneous
+* mixtures of star positions is necessary.
+*
+* 2) K0 and K are not validated. They are interpreted as follows:
+*
+* o If K0 and K are the same the result is E.
+* o If K0 is 'B' or 'b' and K isn't, the conversion is J to B.
+* o In all other cases, the conversion is B to J.
+*
+* Note that K0 and K won't match if their cases differ.
+*
+* P.T.Wallace Starlink 5 September 1993
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ CHARACTER*(*) K0,K
+ DOUBLE PRECISION E
+ DOUBLE PRECISION sla_EPB,sla_EPJ2D,sla_EPJ,sla_EPB2D
+
+
+ IF (K.EQ.K0) THEN
+ sla_EPCO=E
+ ELSE IF (K0.EQ.'B'.OR.K0.EQ.'b') THEN
+ sla_EPCO=sla_EPB(sla_EPJ2D(E))
+ ELSE
+ sla_EPCO=sla_EPJ(sla_EPB2D(E))
+ END IF
+
+ END
diff --git a/src/slalib/epj.f b/src/slalib/epj.f
new file mode 100644
index 0000000..66d5eb9
--- /dev/null
+++ b/src/slalib/epj.f
@@ -0,0 +1,29 @@
+ DOUBLE PRECISION FUNCTION sla_EPJ (DATE)
+*+
+* - - - -
+* E P J
+* - - - -
+*
+* Conversion of Modified Julian Date to Julian Epoch (double precision)
+*
+* Given:
+* DATE dp Modified Julian Date (JD - 2400000.5)
+*
+* The result is the Julian Epoch.
+*
+* Reference:
+* Lieske,J.H., 1979. Astron.Astrophys.,73,282.
+*
+* P.T.Wallace Starlink February 1984
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION DATE
+
+
+ sla_EPJ = 2000D0 + (DATE-51544.5D0)/365.25D0
+
+ END
diff --git a/src/slalib/epj2d.f b/src/slalib/epj2d.f
new file mode 100644
index 0000000..c6a5c5f
--- /dev/null
+++ b/src/slalib/epj2d.f
@@ -0,0 +1,29 @@
+ DOUBLE PRECISION FUNCTION sla_EPJ2D (EPJ)
+*+
+* - - - - - -
+* E P J 2 D
+* - - - - - -
+*
+* Conversion of Julian Epoch to Modified Julian Date (double precision)
+*
+* Given:
+* EPJ dp Julian Epoch
+*
+* The result is the Modified Julian Date (JD - 2400000.5).
+*
+* Reference:
+* Lieske,J.H., 1979. Astron.Astrophys.,73,282.
+*
+* P.T.Wallace Starlink February 1984
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION EPJ
+
+
+ sla_EPJ2D = 51544.5D0 + (EPJ-2000D0)*365.25D0
+
+ END
diff --git a/src/slalib/eqecl.f b/src/slalib/eqecl.f
new file mode 100644
index 0000000..a3a73f6
--- /dev/null
+++ b/src/slalib/eqecl.f
@@ -0,0 +1,55 @@
+ SUBROUTINE sla_EQECL (DR, DD, DATE, DL, DB)
+*+
+* - - - - - -
+* E Q E C L
+* - - - - - -
+*
+* Transformation from J2000.0 equatorial coordinates to
+* ecliptic coordinates (double precision)
+*
+* Given:
+* DR,DD dp J2000.0 mean RA,Dec (radians)
+* DATE dp TDB (loosely ET) as Modified Julian Date
+* (JD-2400000.5)
+* Returned:
+* DL,DB dp ecliptic longitude and latitude
+* (mean of date, IAU 1980 theory, radians)
+*
+* Called:
+* sla_DCS2C, sla_PREC, sla_EPJ, sla_DMXV, sla_ECMAT, sla_DCC2S,
+* sla_DRANRM, sla_DRANGE
+*
+* P.T.Wallace Starlink March 1986
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION DR,DD,DATE,DL,DB
+
+ DOUBLE PRECISION sla_EPJ,sla_DRANRM,sla_DRANGE
+
+ DOUBLE PRECISION RMAT(3,3),V1(3),V2(3)
+
+
+
+* Spherical to Cartesian
+ CALL sla_DCS2C(DR,DD,V1)
+
+* Mean J2000 to mean of date
+ CALL sla_PREC(2000D0,sla_EPJ(DATE),RMAT)
+ CALL sla_DMXV(RMAT,V1,V2)
+
+* Equatorial to ecliptic
+ CALL sla_ECMAT(DATE,RMAT)
+ CALL sla_DMXV(RMAT,V2,V1)
+
+* Cartesian to spherical
+ CALL sla_DCC2S(V1,DL,DB)
+
+* Express in conventional ranges
+ DL=sla_DRANRM(DL)
+ DB=sla_DRANGE(DB)
+
+ END
diff --git a/src/slalib/eqeqx.f b/src/slalib/eqeqx.f
new file mode 100644
index 0000000..f811039
--- /dev/null
+++ b/src/slalib/eqeqx.f
@@ -0,0 +1,57 @@
+ DOUBLE PRECISION FUNCTION sla_EQEQX (DATE)
+*+
+* - - - - - -
+* E Q E Q X
+* - - - - - -
+*
+* Equation of the equinoxes (IAU 1994, double precision)
+*
+* Given:
+* DATE dp TDB (loosely ET) as Modified Julian Date
+* (JD-2400000.5)
+*
+* The result is the equation of the equinoxes (double precision)
+* in radians:
+*
+* Greenwich apparent ST = GMST + sla_EQEQX
+*
+* References: IAU Resolution C7, Recommendation 3 (1994)
+* Capitaine, N. & Gontier, A.-M., Astron. Astrophys.,
+* 275, 645-650 (1993)
+*
+* Called: sla_NUTC
+*
+* Patrick Wallace Starlink 23 August 1996
+*
+* Copyright (C) 1996 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION DATE
+
+* Turns to arc seconds and arc seconds to radians
+ DOUBLE PRECISION T2AS,AS2R
+ PARAMETER (T2AS=1296000D0,
+ : AS2R=0.484813681109535994D-5)
+
+ DOUBLE PRECISION T,OM,DPSI,DEPS,EPS0
+
+
+
+* Interval between basic epoch J2000.0 and current epoch (JC)
+ T=(DATE-51544.5D0)/36525D0
+
+* Longitude of the mean ascending node of the lunar orbit on the
+* ecliptic, measured from the mean equinox of date
+ OM=AS2R*(450160.280D0+(-5D0*T2AS-482890.539D0
+ : +(7.455D0+0.008D0*T)*T)*T)
+
+* Nutation
+ CALL sla_NUTC(DATE,DPSI,DEPS,EPS0)
+
+* Equation of the equinoxes
+ sla_EQEQX=DPSI*COS(EPS0)+AS2R*(0.00264D0*SIN(OM)+
+ : 0.000063D0*SIN(OM+OM))
+
+ END
diff --git a/src/slalib/eqgal.f b/src/slalib/eqgal.f
new file mode 100644
index 0000000..bb59cc6
--- /dev/null
+++ b/src/slalib/eqgal.f
@@ -0,0 +1,79 @@
+ SUBROUTINE sla_EQGAL (DR, DD, DL, DB)
+*+
+* - - - - - -
+* E Q G A L
+* - - - - - -
+*
+* Transformation from J2000.0 equatorial coordinates to
+* IAU 1958 galactic coordinates (double precision)
+*
+* Given:
+* DR,DD dp J2000.0 RA,Dec
+*
+* Returned:
+* DL,DB dp galactic longitude and latitude L2,B2
+*
+* (all arguments are radians)
+*
+* Called:
+* sla_DCS2C, sla_DMXV, sla_DCC2S, sla_DRANRM, sla_DRANGE
+*
+* Note:
+* The equatorial coordinates are J2000.0. Use the routine
+* sla_EG50 if conversion from B1950.0 'FK4' coordinates is
+* required.
+*
+* Reference:
+* Blaauw et al, Mon.Not.R.Astron.Soc.,121,123 (1960)
+*
+* P.T.Wallace Starlink 21 September 1998
+*
+* Copyright (C) 1998 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION DR,DD,DL,DB
+
+ DOUBLE PRECISION sla_DRANRM,sla_DRANGE
+
+ DOUBLE PRECISION V1(3),V2(3)
+
+*
+* L2,B2 system of galactic coordinates
+*
+* P = 192.25 RA of galactic north pole (mean B1950.0)
+* Q = 62.6 inclination of galactic to mean B1950.0 equator
+* R = 33 longitude of ascending node
+*
+* P,Q,R are degrees
+*
+* Equatorial to galactic rotation matrix (J2000.0), obtained by
+* applying the standard FK4 to FK5 transformation, for zero proper
+* motion in FK5, to the columns of the B1950 equatorial to
+* galactic rotation matrix:
+*
+ DOUBLE PRECISION RMAT(3,3)
+ DATA RMAT(1,1),RMAT(1,2),RMAT(1,3),
+ : RMAT(2,1),RMAT(2,2),RMAT(2,3),
+ : RMAT(3,1),RMAT(3,2),RMAT(3,3)/
+ : -0.054875539726D0,-0.873437108010D0,-0.483834985808D0,
+ : +0.494109453312D0,-0.444829589425D0,+0.746982251810D0,
+ : -0.867666135858D0,-0.198076386122D0,+0.455983795705D0/
+
+
+
+* Spherical to Cartesian
+ CALL sla_DCS2C(DR,DD,V1)
+
+* Equatorial to galactic
+ CALL sla_DMXV(RMAT,V1,V2)
+
+* Cartesian to spherical
+ CALL sla_DCC2S(V2,DL,DB)
+
+* Express in conventional ranges
+ DL=sla_DRANRM(DL)
+ DB=sla_DRANGE(DB)
+
+ END
diff --git a/src/slalib/etrms.f b/src/slalib/etrms.f
new file mode 100644
index 0000000..efac204
--- /dev/null
+++ b/src/slalib/etrms.f
@@ -0,0 +1,62 @@
+ SUBROUTINE sla_ETRMS (EP, EV)
+*+
+* - - - - - -
+* E T R M S
+* - - - - - -
+*
+* Compute the E-terms (elliptic component of annual aberration)
+* vector (double precision)
+*
+* Given:
+* EP dp Besselian epoch
+*
+* Returned:
+* EV dp(3) E-terms as (dx,dy,dz)
+*
+* Note the use of the J2000 aberration constant (20.49552 arcsec).
+* This is a reflection of the fact that the E-terms embodied in
+* existing star catalogues were computed from a variety of
+* aberration constants. Rather than adopting one of the old
+* constants the latest value is used here.
+*
+* References:
+* 1 Smith, C.A. et al., 1989. Astr.J. 97, 265.
+* 2 Yallop, B.D. et al., 1989. Astr.J. 97, 274.
+*
+* P.T.Wallace Starlink 23 August 1996
+*
+* Copyright (C) 1996 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION EP,EV(3)
+
+* Arcseconds to radians
+ DOUBLE PRECISION AS2R
+ PARAMETER (AS2R=0.484813681109535994D-5)
+
+ DOUBLE PRECISION T,E,E0,P,EK,CP
+
+
+
+* Julian centuries since B1950
+ T=(EP-1950D0)*1.00002135903D-2
+
+* Eccentricity
+ E=0.01673011D0-(0.00004193D0+0.000000126D0*T)*T
+
+* Mean obliquity
+ E0=(84404.836D0-(46.8495D0+(0.00319D0+0.00181D0*T)*T)*T)*AS2R
+
+* Mean longitude of perihelion
+ P=(1015489.951D0+(6190.67D0+(1.65D0+0.012D0*T)*T)*T)*AS2R
+
+* E-terms
+ EK=E*20.49552D0*AS2R
+ CP=COS(P)
+ EV(1)= EK*SIN(P)
+ EV(2)=-EK*CP*COS(E0)
+ EV(3)=-EK*CP*SIN(E0)
+
+ END
diff --git a/src/slalib/euler.f b/src/slalib/euler.f
new file mode 100644
index 0000000..278da31
--- /dev/null
+++ b/src/slalib/euler.f
@@ -0,0 +1,68 @@
+ SUBROUTINE sla_EULER (ORDER, PHI, THETA, PSI, RMAT)
+*+
+* - - - - - -
+* E U L E R
+* - - - - - -
+*
+* Form a rotation matrix from the Euler angles - three successive
+* rotations about specified Cartesian axes (single precision)
+*
+* Given:
+* ORDER c*(*) specifies about which axes the rotations occur
+* PHI r 1st rotation (radians)
+* THETA r 2nd rotation ( " )
+* PSI r 3rd rotation ( " )
+*
+* Returned:
+* RMAT r(3,3) rotation matrix
+*
+* A rotation is positive when the reference frame rotates
+* anticlockwise as seen looking towards the origin from the
+* positive region of the specified axis.
+*
+* The characters of ORDER define which axes the three successive
+* rotations are about. A typical value is 'ZXZ', indicating that
+* RMAT is to become the direction cosine matrix corresponding to
+* rotations of the reference frame through PHI radians about the
+* old Z-axis, followed by THETA radians about the resulting X-axis,
+* then PSI radians about the resulting Z-axis.
+*
+* The axis names can be any of the following, in any order or
+* combination: X, Y, Z, uppercase or lowercase, 1, 2, 3. Normal
+* axis labelling/numbering conventions apply; the xyz (=123)
+* triad is right-handed. Thus, the 'ZXZ' example given above
+* could be written 'zxz' or '313' (or even 'ZxZ' or '3xZ'). ORDER
+* is terminated by length or by the first unrecognized character.
+*
+* Fewer than three rotations are acceptable, in which case the later
+* angle arguments are ignored. If all rotations are zero, the
+* identity matrix is produced.
+*
+* Called: sla_DEULER
+*
+* P.T.Wallace Starlink 23 May 1997
+*
+* Copyright (C) 1997 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ CHARACTER*(*) ORDER
+ REAL PHI,THETA,PSI,RMAT(3,3)
+
+ INTEGER J,I
+ DOUBLE PRECISION W(3,3)
+
+
+
+* Compute matrix in double precision
+ CALL sla_DEULER(ORDER,DBLE(PHI),DBLE(THETA),DBLE(PSI),W)
+
+* Copy the result
+ DO J=1,3
+ DO I=1,3
+ RMAT(I,J) = REAL(W(I,J))
+ END DO
+ END DO
+
+ END
diff --git a/src/slalib/evp.f b/src/slalib/evp.f
new file mode 100644
index 0000000..b295a12
--- /dev/null
+++ b/src/slalib/evp.f
@@ -0,0 +1,441 @@
+ SUBROUTINE sla_EVP (DATE, DEQX, DVB, DPB, DVH, DPH)
+*+
+* - - - -
+* E V P
+* - - - -
+*
+* Barycentric and heliocentric velocity and position of the Earth
+*
+* All arguments are double precision
+*
+* Given:
+*
+* DATE TDB (loosely ET) as a Modified Julian Date
+* (JD-2400000.5)
+*
+* DEQX Julian Epoch (e.g. 2000.0D0) of mean equator and
+* equinox of the vectors returned. If DEQX .LE. 0D0,
+* all vectors are referred to the mean equator and
+* equinox (FK5) of epoch DATE.
+*
+* Returned (all 3D Cartesian vectors):
+*
+* DVB,DPB barycentric velocity, position
+*
+* DVH,DPH heliocentric velocity, position
+*
+* (Units are AU/s for velocity and AU for position)
+*
+* Called: sla_EPJ, sla_PREC
+*
+* Accuracy:
+*
+* The maximum deviations from the JPL DE96 ephemeris are as
+* follows:
+*
+* barycentric velocity 0.42 m/s
+* barycentric position 6900 km
+*
+* heliocentric velocity 0.42 m/s
+* heliocentric position 1600 km
+*
+* This routine is adapted from the BARVEL and BARCOR
+* subroutines of P.Stumpff, which are described in
+* Astron. Astrophys. Suppl. Ser. 41, 1-8 (1980). Most of the
+* changes are merely cosmetic and do not affect the results at
+* all. However, some adjustments have been made so as to give
+* results that refer to the new (IAU 1976 'FK5') equinox
+* and precession, although the differences these changes make
+* relative to the results from Stumpff's original 'FK4' version
+* are smaller than the inherent accuracy of the algorithm. One
+* minor shortcoming in the original routines that has NOT been
+* corrected is that better numerical accuracy could be achieved
+* if the various polynomial evaluations were nested. Note also
+* that one of Stumpff's precession constants differs by 0.001 arcsec
+* from the value given in the Explanatory Supplement to the A.E.
+*
+* P.T.Wallace Starlink 21 March 1999
+*
+* Copyright (C) 1999 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION DATE,DEQX,DVB(3),DPB(3),DVH(3),DPH(3)
+
+ INTEGER IDEQ,I,J,K
+
+ REAL CC2PI,CCSEC3,CCSGD,CCKM,CCMLD,CCFDI,CCIM,T,TSQ,A,PERTL,
+ : PERTLD,PERTR,PERTRD,COSA,SINA,ESQ,E,PARAM,TWOE,TWOG,G,
+ : PHI,F,SINF,COSF,PHID,PSID,PERTP,PERTPD,TL,SINLM,COSLM,
+ : SIGMA,B,PLON,POMG,PECC,FLATM,FLAT
+
+ DOUBLE PRECISION DC2PI,DS2R,DCSLD,DC1MME,DT,DTSQ,DLOCAL,DML,
+ : DEPS,DPARAM,DPSI,D1PDRO,DRD,DRLD,DTL,DSINLS,
+ : DCOSLS,DXHD,DYHD,DZHD,DXBD,DYBD,DZBD,DCOSEP,
+ : DSINEP,DYAHD,DZAHD,DYABD,DZABD,DR,
+ : DXH,DYH,DZH,DXB,DYB,DZB,DYAH,DZAH,DYAB,
+ : DZAB,DEPJ,DEQCOR,B1950
+
+ REAL SN(4),CCSEL(3,17),CCAMPS(5,15),CCSEC(3,4),CCAMPM(4,3),
+ : CCPAMV(4),CCPAM(4),FORBEL(7),SORBEL(17),SINLP(4),COSLP(4)
+ EQUIVALENCE (SORBEL(1),E),(FORBEL(1),G)
+
+ DOUBLE PRECISION DCFEL(3,8),DCEPS(3),DCARGS(2,15),DCARGM(2,3),
+ : DPREMA(3,3),W,VW(3)
+
+ DOUBLE PRECISION sla_EPJ
+
+ PARAMETER (DC2PI=6.2831853071796D0,CC2PI=6.283185)
+ PARAMETER (DS2R=0.7272205216643D-4)
+ PARAMETER (B1950=1949.9997904423D0)
+
+*
+* Constants DCFEL(I,K) of fast changing elements
+* I=1 I=2 I=3
+ DATA DCFEL/ 1.7400353D+00, 6.2833195099091D+02, 5.2796D-06,
+ : 6.2565836D+00, 6.2830194572674D+02,-2.6180D-06,
+ : 4.7199666D+00, 8.3997091449254D+03,-1.9780D-05,
+ : 1.9636505D-01, 8.4334662911720D+03,-5.6044D-05,
+ : 4.1547339D+00, 5.2993466764997D+01, 5.8845D-06,
+ : 4.6524223D+00, 2.1354275911213D+01, 5.6797D-06,
+ : 4.2620486D+00, 7.5025342197656D+00, 5.5317D-06,
+ : 1.4740694D+00, 3.8377331909193D+00, 5.6093D-06/
+
+*
+* Constants DCEPS and CCSEL(I,K) of slowly changing elements
+* I=1 I=2 I=3
+ DATA DCEPS/ 4.093198D-01,-2.271110D-04,-2.860401D-08 /
+ DATA CCSEL/ 1.675104E-02,-4.179579E-05,-1.260516E-07,
+ : 2.220221E-01, 2.809917E-02, 1.852532E-05,
+ : 1.589963E+00, 3.418075E-02, 1.430200E-05,
+ : 2.994089E+00, 2.590824E-02, 4.155840E-06,
+ : 8.155457E-01, 2.486352E-02, 6.836840E-06,
+ : 1.735614E+00, 1.763719E-02, 6.370440E-06,
+ : 1.968564E+00, 1.524020E-02,-2.517152E-06,
+ : 1.282417E+00, 8.703393E-03, 2.289292E-05,
+ : 2.280820E+00, 1.918010E-02, 4.484520E-06,
+ : 4.833473E-02, 1.641773E-04,-4.654200E-07,
+ : 5.589232E-02,-3.455092E-04,-7.388560E-07,
+ : 4.634443E-02,-2.658234E-05, 7.757000E-08,
+ : 8.997041E-03, 6.329728E-06,-1.939256E-09,
+ : 2.284178E-02,-9.941590E-05, 6.787400E-08,
+ : 4.350267E-02,-6.839749E-05,-2.714956E-07,
+ : 1.348204E-02, 1.091504E-05, 6.903760E-07,
+ : 3.106570E-02,-1.665665E-04,-1.590188E-07/
+
+*
+* Constants of the arguments of the short-period perturbations
+* by the planets: DCARGS(I,K)
+* I=1 I=2
+ DATA DCARGS/ 5.0974222D+00,-7.8604195454652D+02,
+ : 3.9584962D+00,-5.7533848094674D+02,
+ : 1.6338070D+00,-1.1506769618935D+03,
+ : 2.5487111D+00,-3.9302097727326D+02,
+ : 4.9255514D+00,-5.8849265665348D+02,
+ : 1.3363463D+00,-5.5076098609303D+02,
+ : 1.6072053D+00,-5.2237501616674D+02,
+ : 1.3629480D+00,-1.1790629318198D+03,
+ : 5.5657014D+00,-1.0977134971135D+03,
+ : 5.0708205D+00,-1.5774000881978D+02,
+ : 3.9318944D+00, 5.2963464780000D+01,
+ : 4.8989497D+00, 3.9809289073258D+01,
+ : 1.3097446D+00, 7.7540959633708D+01,
+ : 3.5147141D+00, 7.9618578146517D+01,
+ : 3.5413158D+00,-5.4868336758022D+02/
+
+*
+* Amplitudes CCAMPS(N,K) of the short-period perturbations
+* N=1 N=2 N=3 N=4 N=5
+ DATA CCAMPS/
+ : -2.279594E-5, 1.407414E-5, 8.273188E-6, 1.340565E-5,-2.490817E-7,
+ : -3.494537E-5, 2.860401E-7, 1.289448E-7, 1.627237E-5,-1.823138E-7,
+ : 6.593466E-7, 1.322572E-5, 9.258695E-6,-4.674248E-7,-3.646275E-7,
+ : 1.140767E-5,-2.049792E-5,-4.747930E-6,-2.638763E-6,-1.245408E-7,
+ : 9.516893E-6,-2.748894E-6,-1.319381E-6,-4.549908E-6,-1.864821E-7,
+ : 7.310990E-6,-1.924710E-6,-8.772849E-7,-3.334143E-6,-1.745256E-7,
+ : -2.603449E-6, 7.359472E-6, 3.168357E-6, 1.119056E-6,-1.655307E-7,
+ : -3.228859E-6, 1.308997E-7, 1.013137E-7, 2.403899E-6,-3.736225E-7,
+ : 3.442177E-7, 2.671323E-6, 1.832858E-6,-2.394688E-7,-3.478444E-7,
+ : 8.702406E-6,-8.421214E-6,-1.372341E-6,-1.455234E-6,-4.998479E-8,
+ : -1.488378E-6,-1.251789E-5, 5.226868E-7,-2.049301E-7, 0.0E0,
+ : -8.043059E-6,-2.991300E-6, 1.473654E-7,-3.154542E-7, 0.0E0,
+ : 3.699128E-6,-3.316126E-6, 2.901257E-7, 3.407826E-7, 0.0E0,
+ : 2.550120E-6,-1.241123E-6, 9.901116E-8, 2.210482E-7, 0.0E0,
+ : -6.351059E-7, 2.341650E-6, 1.061492E-6, 2.878231E-7, 0.0E0/
+
+*
+* Constants of the secular perturbations in longitude
+* CCSEC3 and CCSEC(N,K)
+* N=1 N=2 N=3
+ DATA CCSEC3/-7.757020E-08/,
+ : CCSEC/ 1.289600E-06, 5.550147E-01, 2.076942E+00,
+ : 3.102810E-05, 4.035027E+00, 3.525565E-01,
+ : 9.124190E-06, 9.990265E-01, 2.622706E+00,
+ : 9.793240E-07, 5.508259E+00, 1.559103E+01/
+
+* Sidereal rate DCSLD in longitude, rate CCSGD in mean anomaly
+ DATA DCSLD/1.990987D-07/,
+ : CCSGD/1.990969E-07/
+
+* Some constants used in the calculation of the lunar contribution
+ DATA CCKM/3.122140E-05/,
+ : CCMLD/2.661699E-06/,
+ : CCFDI/2.399485E-07/
+
+*
+* Constants DCARGM(I,K) of the arguments of the perturbations
+* of the motion of the Moon
+* I=1 I=2
+ DATA DCARGM/ 5.1679830D+00, 8.3286911095275D+03,
+ : 5.4913150D+00,-7.2140632838100D+03,
+ : 5.9598530D+00, 1.5542754389685D+04/
+
+*
+* Amplitudes CCAMPM(N,K) of the perturbations of the Moon
+* N=1 N=2 N=3 N=4
+ DATA CCAMPM/
+ : 1.097594E-01, 2.896773E-07, 5.450474E-02, 1.438491E-07,
+ : -2.223581E-02, 5.083103E-08, 1.002548E-02,-2.291823E-08,
+ : 1.148966E-02, 5.658888E-08, 8.249439E-03, 4.063015E-08/
+
+*
+* CCPAMV(K)=A*M*DL/DT (planets), DC1MME=1-MASS(Earth+Moon)
+ DATA CCPAMV/8.326827E-11,1.843484E-11,1.988712E-12,1.881276E-12/
+ DATA DC1MME/0.99999696D0/
+
+* CCPAM(K)=A*M(planets), CCIM=INCLINATION(Moon)
+ DATA CCPAM/4.960906E-3,2.727436E-3,8.392311E-4,1.556861E-3/
+ DATA CCIM/8.978749E-2/
+
+
+
+
+*
+* EXECUTION
+* ---------
+
+* Control parameter IDEQ, and time arguments
+ IDEQ = 0
+ IF (DEQX.GT.0D0) IDEQ=1
+ DT = (DATE-15019.5D0)/36525D0
+ T = REAL(DT)
+ DTSQ = DT*DT
+ TSQ = REAL(DTSQ)
+
+* Values of all elements for the instant DATE
+ DO K=1,8
+ DLOCAL = MOD(DCFEL(1,K)+DT*DCFEL(2,K)+DTSQ*DCFEL(3,K), DC2PI)
+ IF (K.EQ.1) THEN
+ DML = DLOCAL
+ ELSE
+ FORBEL(K-1) = REAL(DLOCAL)
+ END IF
+ END DO
+ DEPS = MOD(DCEPS(1)+DT*DCEPS(2)+DTSQ*DCEPS(3), DC2PI)
+ DO K=1,17
+ SORBEL(K) = MOD(CCSEL(1,K)+T*CCSEL(2,K)+TSQ*CCSEL(3,K),
+ : CC2PI)
+ END DO
+
+* Secular perturbations in longitude
+ DO K=1,4
+ A = MOD(CCSEC(2,K)+T*CCSEC(3,K), CC2PI)
+ SN(K) = SIN(A)
+ END DO
+
+* Periodic perturbations of the EMB (Earth-Moon barycentre)
+ PERTL = CCSEC(1,1) *SN(1) +CCSEC(1,2)*SN(2)+
+ : (CCSEC(1,3)+T*CCSEC3)*SN(3) +CCSEC(1,4)*SN(4)
+ PERTLD = 0.0
+ PERTR = 0.0
+ PERTRD = 0.0
+ DO K=1,15
+ A = SNGL(MOD(DCARGS(1,K)+DT*DCARGS(2,K), DC2PI))
+ COSA = COS(A)
+ SINA = SIN(A)
+ PERTL = PERTL + CCAMPS(1,K)*COSA+CCAMPS(2,K)*SINA
+ PERTR = PERTR + CCAMPS(3,K)*COSA+CCAMPS(4,K)*SINA
+ IF (K.LT.11) THEN
+ PERTLD = PERTLD+
+ : (CCAMPS(2,K)*COSA-CCAMPS(1,K)*SINA)*CCAMPS(5,K)
+ PERTRD = PERTRD+
+ : (CCAMPS(4,K)*COSA-CCAMPS(3,K)*SINA)*CCAMPS(5,K)
+ END IF
+ END DO
+
+* Elliptic part of the motion of the EMB
+ ESQ = E*E
+ DPARAM = 1D0-DBLE(ESQ)
+ PARAM = REAL(DPARAM)
+ TWOE = E+E
+ TWOG = G+G
+ PHI = TWOE*((1.0-ESQ*0.125)*SIN(G)+E*0.625*SIN(TWOG)
+ : +ESQ*0.54166667*SIN(G+TWOG) )
+ F = G+PHI
+ SINF = SIN(F)
+ COSF = COS(F)
+ DPSI = DPARAM/(1D0+DBLE(E*COSF))
+ PHID = TWOE*CCSGD*((1.0+ESQ*1.5)*COSF+E*(1.25-SINF*SINF*0.5))
+ PSID = CCSGD*E*SINF/SQRT(PARAM)
+
+* Perturbed heliocentric motion of the EMB
+ D1PDRO = 1D0+DBLE(PERTR)
+ DRD = D1PDRO*(DBLE(PSID)+DPSI*DBLE(PERTRD))
+ DRLD = D1PDRO*DPSI*(DCSLD+DBLE(PHID)+DBLE(PERTLD))
+ DTL = MOD(DML+DBLE(PHI)+DBLE(PERTL), DC2PI)
+ DSINLS = SIN(DTL)
+ DCOSLS = COS(DTL)
+ DXHD = DRD*DCOSLS-DRLD*DSINLS
+ DYHD = DRD*DSINLS+DRLD*DCOSLS
+
+* Influence of eccentricity, evection and variation on the
+* geocentric motion of the Moon
+ PERTL = 0.0
+ PERTLD = 0.0
+ PERTP = 0.0
+ PERTPD = 0.0
+ DO K=1,3
+ A = SNGL(MOD(DCARGM(1,K)+DT*DCARGM(2,K), DC2PI))
+ SINA = SIN(A)
+ COSA = COS(A)
+ PERTL = PERTL +CCAMPM(1,K)*SINA
+ PERTLD = PERTLD+CCAMPM(2,K)*COSA
+ PERTP = PERTP +CCAMPM(3,K)*COSA
+ PERTPD = PERTPD-CCAMPM(4,K)*SINA
+ END DO
+
+* Heliocentric motion of the Earth
+ TL = FORBEL(2)+PERTL
+ SINLM = SIN(TL)
+ COSLM = COS(TL)
+ SIGMA = CCKM/(1.0+PERTP)
+ A = SIGMA*(CCMLD+PERTLD)
+ B = SIGMA*PERTPD
+ DXHD = DXHD+DBLE(A*SINLM)+DBLE(B*COSLM)
+ DYHD = DYHD-DBLE(A*COSLM)+DBLE(B*SINLM)
+ DZHD = -DBLE(SIGMA*CCFDI*COS(FORBEL(3)))
+
+* Barycentric motion of the Earth
+ DXBD = DXHD*DC1MME
+ DYBD = DYHD*DC1MME
+ DZBD = DZHD*DC1MME
+ DO K=1,4
+ PLON = FORBEL(K+3)
+ POMG = SORBEL(K+1)
+ PECC = SORBEL(K+9)
+ TL = MOD(PLON+2.0*PECC*SIN(PLON-POMG), CC2PI)
+ SINLP(K) = SIN(TL)
+ COSLP(K) = COS(TL)
+ DXBD = DXBD+DBLE(CCPAMV(K)*(SINLP(K)+PECC*SIN(POMG)))
+ DYBD = DYBD-DBLE(CCPAMV(K)*(COSLP(K)+PECC*COS(POMG)))
+ DZBD = DZBD-DBLE(CCPAMV(K)*SORBEL(K+13)*COS(PLON-SORBEL(K+5)))
+ END DO
+
+* Transition to mean equator of date
+ DCOSEP = COS(DEPS)
+ DSINEP = SIN(DEPS)
+ DYAHD = DCOSEP*DYHD-DSINEP*DZHD
+ DZAHD = DSINEP*DYHD+DCOSEP*DZHD
+ DYABD = DCOSEP*DYBD-DSINEP*DZBD
+ DZABD = DSINEP*DYBD+DCOSEP*DZBD
+
+* Heliocentric coordinates of the Earth
+ DR = DPSI*D1PDRO
+ FLATM = CCIM*SIN(FORBEL(3))
+ A = SIGMA*COS(FLATM)
+ DXH = DR*DCOSLS-DBLE(A*COSLM)
+ DYH = DR*DSINLS-DBLE(A*SINLM)
+ DZH = -DBLE(SIGMA*SIN(FLATM))
+
+* Barycentric coordinates of the Earth
+ DXB = DXH*DC1MME
+ DYB = DYH*DC1MME
+ DZB = DZH*DC1MME
+ DO K=1,4
+ FLAT = SORBEL(K+13)*SIN(FORBEL(K+3)-SORBEL(K+5))
+ A = CCPAM(K)*(1.0-SORBEL(K+9)*COS(FORBEL(K+3)-SORBEL(K+1)))
+ B = A*COS(FLAT)
+ DXB = DXB-DBLE(B*COSLP(K))
+ DYB = DYB-DBLE(B*SINLP(K))
+ DZB = DZB-DBLE(A*SIN(FLAT))
+ END DO
+
+* Transition to mean equator of date
+ DYAH = DCOSEP*DYH-DSINEP*DZH
+ DZAH = DSINEP*DYH+DCOSEP*DZH
+ DYAB = DCOSEP*DYB-DSINEP*DZB
+ DZAB = DSINEP*DYB+DCOSEP*DZB
+
+* Copy result components into vectors, correcting for FK4 equinox
+ DEPJ=sla_EPJ(DATE)
+ DEQCOR = DS2R*(0.035D0+0.00085D0*(DEPJ-B1950))
+ DVH(1) = DXHD-DEQCOR*DYAHD
+ DVH(2) = DYAHD+DEQCOR*DXHD
+ DVH(3) = DZAHD
+ DVB(1) = DXBD-DEQCOR*DYABD
+ DVB(2) = DYABD+DEQCOR*DXBD
+ DVB(3) = DZABD
+ DPH(1) = DXH-DEQCOR*DYAH
+ DPH(2) = DYAH+DEQCOR*DXH
+ DPH(3) = DZAH
+ DPB(1) = DXB-DEQCOR*DYAB
+ DPB(2) = DYAB+DEQCOR*DXB
+ DPB(3) = DZAB
+
+* Was precession to another equinox requested?
+ IF (IDEQ.NE.0) THEN
+
+* Yes: compute precession matrix from MJD DATE to Julian epoch DEQX
+ CALL sla_PREC(DEPJ,DEQX,DPREMA)
+
+* Rotate DVH
+ DO J=1,3
+ W=0D0
+ DO I=1,3
+ W=W+DPREMA(J,I)*DVH(I)
+ END DO
+ VW(J)=W
+ END DO
+ DO J=1,3
+ DVH(J)=VW(J)
+ END DO
+
+* Rotate DVB
+ DO J=1,3
+ W=0D0
+ DO I=1,3
+ W=W+DPREMA(J,I)*DVB(I)
+ END DO
+ VW(J)=W
+ END DO
+ DO J=1,3
+ DVB(J)=VW(J)
+ END DO
+
+* Rotate DPH
+ DO J=1,3
+ W=0D0
+ DO I=1,3
+ W=W+DPREMA(J,I)*DPH(I)
+ END DO
+ VW(J)=W
+ END DO
+ DO J=1,3
+ DPH(J)=VW(J)
+ END DO
+
+* Rotate DPB
+ DO J=1,3
+ W=0D0
+ DO I=1,3
+ W=W+DPREMA(J,I)*DPB(I)
+ END DO
+ VW(J)=W
+ END DO
+ DO J=1,3
+ DPB(J)=VW(J)
+ END DO
+ END IF
+
+ END
diff --git a/src/slalib/fitxy.f b/src/slalib/fitxy.f
new file mode 100644
index 0000000..97f1e00
--- /dev/null
+++ b/src/slalib/fitxy.f
@@ -0,0 +1,300 @@
+ SUBROUTINE sla_FITXY (ITYPE,NP,XYE,XYM,COEFFS,J)
+*+
+* - - - - - -
+* F I T X Y
+* - - - - - -
+*
+* Fit a linear model to relate two sets of [X,Y] coordinates.
+*
+* Given:
+* ITYPE i type of model: 4 or 6 (note 1)
+* NP i number of samples (note 2)
+* XYE d(2,np) expected [X,Y] for each sample
+* XYM d(2,np) measured [X,Y] for each sample
+*
+* Returned:
+* COEFFS d(6) coefficients of model (note 3)
+* J i status: 0 = OK
+* -1 = illegal ITYPE
+* -2 = insufficient data
+* -3 = singular solution
+*
+* Notes:
+*
+* 1) ITYPE, which must be either 4 or 6, selects the type of model
+* fitted. Both allowed ITYPE values produce a model COEFFS which
+* consists of six coefficients, namely the zero points and, for
+* each of XE and YE, the coefficient of XM and YM. For ITYPE=6,
+* all six coefficients are independent, modelling squash and shear
+* as well as origin, scale, and orientation. However, ITYPE=4
+* selects the "solid body rotation" option; the model COEFFS
+* still consists of the same six coefficients, but now two of
+* them are used twice (appropriately signed). Origin, scale
+* and orientation are still modelled, but not squash or shear -
+* the units of X and Y have to be the same.
+*
+* 2) For NC=4, NP must be at least 2. For NC=6, NP must be at
+* least 3.
+*
+* 3) The model is returned in the array COEFFS. Naming the
+* elements of COEFFS as follows:
+*
+* COEFFS(1) = A
+* COEFFS(2) = B
+* COEFFS(3) = C
+* COEFFS(4) = D
+* COEFFS(5) = E
+* COEFFS(6) = F
+*
+* the model is:
+*
+* XE = A + B*XM + C*YM
+* YE = D + E*XM + F*YM
+*
+* For the "solid body rotation" option (ITYPE=4), the
+* magnitudes of B and F, and of C and E, are equal. The
+* signs of these coefficients depend on whether there is a
+* sign reversal between XE,YE and XM,YM; fits are performed
+* with and without a sign reversal and the best one chosen.
+*
+* 4) Error status values J=-1 and -2 leave COEFFS unchanged;
+* if J=-3 COEFFS may have been changed.
+*
+* See also sla_PXY, sla_INVF, sla_XY2XY, sla_DCMPF
+*
+* Called: sla_DMAT, sla_DMXV
+*
+* P.T.Wallace Starlink 11 February 1991
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ INTEGER ITYPE,NP
+ DOUBLE PRECISION XYE(2,NP),XYM(2,NP),COEFFS(6)
+ INTEGER J
+
+ INTEGER I,JSTAT,IW(4),NSOL
+ DOUBLE PRECISION P,SXE,SXEXM,SXEYM,SYE,SYEYM,SYEXM,SXM,
+ : SYM,SXMXM,SXMYM,SYMYM,XE,YE,
+ : XM,YM,V(4),DM3(3,3),DM4(4,4),DET,
+ : SGN,SXXYY,SXYYX,SX2Y2,A,B,C,D,
+ : SDR2,XR,YR,AOLD,BOLD,COLD,DOLD,SOLD
+
+
+
+* Preset the status
+ J=0
+
+* Float the number of samples
+ P=DBLE(NP)
+
+* Check ITYPE
+ IF (ITYPE.EQ.6) THEN
+
+*
+* Six-coefficient linear model
+* ----------------------------
+
+* Check enough samples
+ IF (NP.GE.3) THEN
+
+* Form summations
+ SXE=0D0
+ SXEXM=0D0
+ SXEYM=0D0
+ SYE=0D0
+ SYEYM=0D0
+ SYEXM=0D0
+ SXM=0D0
+ SYM=0D0
+ SXMXM=0D0
+ SXMYM=0D0
+ SYMYM=0D0
+ DO I=1,NP
+ XE=XYE(1,I)
+ YE=XYE(2,I)
+ XM=XYM(1,I)
+ YM=XYM(2,I)
+ SXE=SXE+XE
+ SXEXM=SXEXM+XE*XM
+ SXEYM=SXEYM+XE*YM
+ SYE=SYE+YE
+ SYEYM=SYEYM+YE*YM
+ SYEXM=SYEXM+YE*XM
+ SXM=SXM+XM
+ SYM=SYM+YM
+ SXMXM=SXMXM+XM*XM
+ SXMYM=SXMYM+XM*YM
+ SYMYM=SYMYM+YM*YM
+ END DO
+
+* Solve for A,B,C in XE = A + B*XM + C*YM
+ V(1)=SXE
+ V(2)=SXEXM
+ V(3)=SXEYM
+ DM3(1,1)=P
+ DM3(1,2)=SXM
+ DM3(1,3)=SYM
+ DM3(2,1)=SXM
+ DM3(2,2)=SXMXM
+ DM3(2,3)=SXMYM
+ DM3(3,1)=SYM
+ DM3(3,2)=SXMYM
+ DM3(3,3)=SYMYM
+ CALL sla_DMAT(3,DM3,V,DET,JSTAT,IW)
+ IF (JSTAT.EQ.0) THEN
+ DO I=1,3
+ COEFFS(I)=V(I)
+ END DO
+
+* Solve for D,E,F in YE = D + E*XM + F*YM
+ V(1)=SYE
+ V(2)=SYEXM
+ V(3)=SYEYM
+ CALL sla_DMXV(DM3,V,COEFFS(4))
+
+ ELSE
+
+* No 6-coefficient solution possible
+ J=-3
+
+ END IF
+
+ ELSE
+
+* Insufficient data for 6-coefficient fit
+ J=-2
+
+ END IF
+
+ ELSE IF (ITYPE.EQ.4) THEN
+
+*
+* Four-coefficient solid body rotation model
+* ------------------------------------------
+
+* Check enough samples
+ IF (NP.GE.2) THEN
+
+* Try two solutions, first without then with flip in X
+ DO NSOL=1,2
+ IF (NSOL.EQ.1) THEN
+ SGN=1D0
+ ELSE
+ SGN=-1D0
+ END IF
+
+* Form summations
+ SXE=0D0
+ SXXYY=0D0
+ SXYYX=0D0
+ SYE=0D0
+ SXM=0D0
+ SYM=0D0
+ SX2Y2=0D0
+ DO I=1,NP
+ XE=XYE(1,I)*SGN
+ YE=XYE(2,I)
+ XM=XYM(1,I)
+ YM=XYM(2,I)
+ SXE=SXE+XE
+ SXXYY=SXXYY+XE*XM+YE*YM
+ SXYYX=SXYYX+XE*YM-YE*XM
+ SYE=SYE+YE
+ SXM=SXM+XM
+ SYM=SYM+YM
+ SX2Y2=SX2Y2+XM*XM+YM*YM
+ END DO
+
+*
+* Solve for A,B,C,D in: +/- XE = A + B*XM - C*YM
+* + YE = D + C*XM + B*YM
+ V(1)=SXE
+ V(2)=SXXYY
+ V(3)=SXYYX
+ V(4)=SYE
+ DM4(1,1)=P
+ DM4(1,2)=SXM
+ DM4(1,3)=-SYM
+ DM4(1,4)=0D0
+ DM4(2,1)=SXM
+ DM4(2,2)=SX2Y2
+ DM4(2,3)=0D0
+ DM4(2,4)=SYM
+ DM4(3,1)=SYM
+ DM4(3,2)=0D0
+ DM4(3,3)=-SX2Y2
+ DM4(3,4)=-SXM
+ DM4(4,1)=0D0
+ DM4(4,2)=SYM
+ DM4(4,3)=SXM
+ DM4(4,4)=P
+ CALL sla_DMAT(4,DM4,V,DET,JSTAT,IW)
+ IF (JSTAT.EQ.0) THEN
+ A=V(1)
+ B=V(2)
+ C=V(3)
+ D=V(4)
+
+* Determine sum of radial errors squared
+ SDR2=0D0
+ DO I=1,NP
+ XM=XYM(1,I)
+ YM=XYM(2,I)
+ XR=A+B*XM-C*YM-XYE(1,I)*SGN
+ YR=D+C*XM+B*YM-XYE(2,I)
+ SDR2=SDR2+XR*XR+YR*YR
+ END DO
+
+ ELSE
+
+* Singular: set flag
+ SDR2=-1D0
+
+ END IF
+
+* If first pass and non-singular, save variables
+ IF (NSOL.EQ.1.AND.JSTAT.EQ.0) THEN
+ AOLD=A
+ BOLD=B
+ COLD=C
+ DOLD=D
+ SOLD=SDR2
+ END IF
+
+ END DO
+
+* Pick the best of the two solutions
+ IF (SOLD.GE.0D0.AND.(SOLD.LE.SDR2.OR.NP.EQ.2)) THEN
+ COEFFS(1)=AOLD
+ COEFFS(2)=BOLD
+ COEFFS(3)=-COLD
+ COEFFS(4)=DOLD
+ COEFFS(5)=COLD
+ COEFFS(6)=BOLD
+ ELSE IF (JSTAT.EQ.0) THEN
+ COEFFS(1)=-A
+ COEFFS(2)=-B
+ COEFFS(3)=C
+ COEFFS(4)=D
+ COEFFS(5)=C
+ COEFFS(6)=B
+ ELSE
+
+* No 4-coefficient fit possible
+ J=-3
+ END IF
+ ELSE
+
+* Insufficient data for 4-coefficient fit
+ J=-2
+ END IF
+ ELSE
+
+* Illegal ITYPE - not 4 or 6
+ J=-1
+ END IF
+
+ END
diff --git a/src/slalib/fk425.f b/src/slalib/fk425.f
new file mode 100644
index 0000000..9b8465f
--- /dev/null
+++ b/src/slalib/fk425.f
@@ -0,0 +1,249 @@
+ SUBROUTINE sla_FK425 (R1950,D1950,DR1950,DD1950,P1950,V1950,
+ : R2000,D2000,DR2000,DD2000,P2000,V2000)
+*+
+* - - - - - -
+* F K 4 2 5
+* - - - - - -
+*
+* Convert B1950.0 FK4 star data to J2000.0 FK5 (double precision)
+*
+* This routine converts stars from the old, Bessel-Newcomb, FK4
+* system to the new, IAU 1976, FK5, Fricke system. The precepts
+* of Smith et al (Ref 1) are followed, using the implementation
+* by Yallop et al (Ref 2) of a matrix method due to Standish.
+* Kinoshita's development of Andoyer's post-Newcomb precession is
+* used. The numerical constants from Seidelmann et al (Ref 3) are
+* used canonically.
+*
+* Given: (all B1950.0,FK4)
+* R1950,D1950 dp B1950.0 RA,Dec (rad)
+* DR1950,DD1950 dp B1950.0 proper motions (rad/trop.yr)
+* P1950 dp parallax (arcsec)
+* V1950 dp radial velocity (km/s, +ve = moving away)
+*
+* Returned: (all J2000.0,FK5)
+* R2000,D2000 dp J2000.0 RA,Dec (rad)
+* DR2000,DD2000 dp J2000.0 proper motions (rad/Jul.yr)
+* P2000 dp parallax (arcsec)
+* V2000 dp radial velocity (km/s, +ve = moving away)
+*
+* Notes:
+*
+* 1) The proper motions in RA are dRA/dt rather than
+* cos(Dec)*dRA/dt, and are per year rather than per century.
+*
+* 2) Conversion from Besselian epoch 1950.0 to Julian epoch
+* 2000.0 only is provided for. Conversions involving other
+* epochs will require use of the appropriate precession,
+* proper motion, and E-terms routines before and/or
+* after FK425 is called.
+*
+* 3) In the FK4 catalogue the proper motions of stars within
+* 10 degrees of the poles do not embody the differential
+* E-term effect and should, strictly speaking, be handled
+* in a different manner from stars outside these regions.
+* However, given the general lack of homogeneity of the star
+* data available for routine astrometry, the difficulties of
+* handling positions that may have been determined from
+* astrometric fields spanning the polar and non-polar regions,
+* the likelihood that the differential E-terms effect was not
+* taken into account when allowing for proper motion in past
+* astrometry, and the undesirability of a discontinuity in
+* the algorithm, the decision has been made in this routine to
+* include the effect of differential E-terms on the proper
+* motions for all stars, whether polar or not. At epoch 2000,
+* and measuring on the sky rather than in terms of dRA, the
+* errors resulting from this simplification are less than
+* 1 milliarcsecond in position and 1 milliarcsecond per
+* century in proper motion.
+*
+* References:
+*
+* 1 Smith, C.A. et al, 1989. "The transformation of astrometric
+* catalog systems to the equinox J2000.0". Astron.J. 97, 265.
+*
+* 2 Yallop, B.D. et al, 1989. "Transformation of mean star places
+* from FK4 B1950.0 to FK5 J2000.0 using matrices in 6-space".
+* Astron.J. 97, 274.
+*
+* 3 Seidelmann, P.K. (ed), 1992. "Explanatory Supplement to
+* the Astronomical Almanac", ISBN 0-935702-68-7.
+*
+* P.T.Wallace Starlink 19 December 1993
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION R1950,D1950,DR1950,DD1950,P1950,V1950,
+ : R2000,D2000,DR2000,DD2000,P2000,V2000
+
+
+* Miscellaneous
+ DOUBLE PRECISION R,D,UR,UD,PX,RV,SR,CR,SD,CD,W,WD
+ DOUBLE PRECISION X,Y,Z,XD,YD,ZD
+ DOUBLE PRECISION RXYSQ,RXYZSQ,RXY,RXYZ,SPXY,SPXYZ
+ INTEGER I,J
+
+* Star position and velocity vectors
+ DOUBLE PRECISION R0(3),RD0(3)
+
+* Combined position and velocity vectors
+ DOUBLE PRECISION V1(6),V2(6)
+
+* 2Pi
+ DOUBLE PRECISION D2PI
+ PARAMETER (D2PI=6.283185307179586476925287D0)
+
+* Radians per year to arcsec per century
+ DOUBLE PRECISION PMF
+ PARAMETER (PMF=100D0*60D0*60D0*360D0/D2PI)
+
+* Small number to avoid arithmetic problems
+ DOUBLE PRECISION TINY
+ PARAMETER (TINY=1D-30)
+
+
+*
+* CANONICAL CONSTANTS (see references)
+*
+
+* Km per sec to AU per tropical century
+* = 86400 * 36524.2198782 / 149597870
+ DOUBLE PRECISION VF
+ PARAMETER (VF=21.095D0)
+
+* Constant vector and matrix (by columns)
+ DOUBLE PRECISION A(3),AD(3),EM(6,6)
+ DATA A,AD/ -1.62557D-6, -0.31919D-6, -0.13843D-6,
+ : +1.245D-3, -1.580D-3, -0.659D-3/
+
+ DATA (EM(I,1),I=1,6) / +0.9999256782D0,
+ : +0.0111820610D0,
+ : +0.0048579479D0,
+ : -0.000551D0,
+ : +0.238514D0,
+ : -0.435623D0 /
+
+ DATA (EM(I,2),I=1,6) / -0.0111820611D0,
+ : +0.9999374784D0,
+ : -0.0000271474D0,
+ : -0.238565D0,
+ : -0.002667D0,
+ : +0.012254D0 /
+
+ DATA (EM(I,3),I=1,6) / -0.0048579477D0,
+ : -0.0000271765D0,
+ : +0.9999881997D0,
+ : +0.435739D0,
+ : -0.008541D0,
+ : +0.002117D0 /
+
+ DATA (EM(I,4),I=1,6) / +0.00000242395018D0,
+ : +0.00000002710663D0,
+ : +0.00000001177656D0,
+ : +0.99994704D0,
+ : +0.01118251D0,
+ : +0.00485767D0 /
+
+ DATA (EM(I,5),I=1,6) / -0.00000002710663D0,
+ : +0.00000242397878D0,
+ : -0.00000000006582D0,
+ : -0.01118251D0,
+ : +0.99995883D0,
+ : -0.00002714D0 /
+
+ DATA (EM(I,6),I=1,6) / -0.00000001177656D0,
+ : -0.00000000006587D0,
+ : +0.00000242410173D0,
+ : -0.00485767D0,
+ : -0.00002718D0,
+ : +1.00000956D0 /
+
+
+
+* Pick up B1950 data (units radians and arcsec/TC)
+ R=R1950
+ D=D1950
+ UR=DR1950*PMF
+ UD=DD1950*PMF
+ PX=P1950
+ RV=V1950
+
+* Spherical to Cartesian
+ SR=SIN(R)
+ CR=COS(R)
+ SD=SIN(D)
+ CD=COS(D)
+
+ R0(1)=CR*CD
+ R0(2)=SR*CD
+ R0(3)= SD
+
+ W=VF*RV*PX
+
+ RD0(1)=-SR*CD*UR-CR*SD*UD+W*R0(1)
+ RD0(2)= CR*CD*UR-SR*SD*UD+W*R0(2)
+ RD0(3)= CD*UD+W*R0(3)
+
+* Allow for e-terms and express as position+velocity 6-vector
+ W=R0(1)*A(1)+R0(2)*A(2)+R0(3)*A(3)
+ WD=R0(1)*AD(1)+R0(2)*AD(2)+R0(3)*AD(3)
+ DO I=1,3
+ V1(I)=R0(I)-A(I)+W*R0(I)
+ V1(I+3)=RD0(I)-AD(I)+WD*R0(I)
+ END DO
+
+* Convert position+velocity vector to Fricke system
+ DO I=1,6
+ W=0D0
+ DO J=1,6
+ W=W+EM(I,J)*V1(J)
+ END DO
+ V2(I)=W
+ END DO
+
+* Revert to spherical coordinates
+ X=V2(1)
+ Y=V2(2)
+ Z=V2(3)
+ XD=V2(4)
+ YD=V2(5)
+ ZD=V2(6)
+
+ RXYSQ=X*X+Y*Y
+ RXYZSQ=RXYSQ+Z*Z
+ RXY=SQRT(RXYSQ)
+ RXYZ=SQRT(RXYZSQ)
+
+ SPXY=X*XD+Y*YD
+ SPXYZ=SPXY+Z*ZD
+
+ IF (X.EQ.0D0.AND.Y.EQ.0D0) THEN
+ R=0D0
+ ELSE
+ R=ATAN2(Y,X)
+ IF (R.LT.0.0D0) R=R+D2PI
+ END IF
+ D=ATAN2(Z,RXY)
+
+ IF (RXY.GT.TINY) THEN
+ UR=(X*YD-Y*XD)/RXYSQ
+ UD=(ZD*RXYSQ-Z*SPXY)/(RXYZSQ*RXY)
+ END IF
+
+ IF (PX.GT.TINY) THEN
+ RV=SPXYZ/(PX*RXYZ*VF)
+ PX=PX/RXYZ
+ END IF
+
+* Return results
+ R2000=R
+ D2000=D
+ DR2000=UR/PMF
+ DD2000=UD/PMF
+ V2000=RV
+ P2000=PX
+
+ END
diff --git a/src/slalib/fk45z.f b/src/slalib/fk45z.f
new file mode 100644
index 0000000..350251d
--- /dev/null
+++ b/src/slalib/fk45z.f
@@ -0,0 +1,165 @@
+ SUBROUTINE sla_FK45Z (R1950,D1950,BEPOCH,R2000,D2000)
+*+
+* - - - - - -
+* F K 4 5 Z
+* - - - - - -
+*
+* Convert B1950.0 FK4 star data to J2000.0 FK5 assuming zero
+* proper motion in the FK5 frame (double precision)
+*
+* This routine converts stars from the old, Bessel-Newcomb, FK4
+* system to the new, IAU 1976, FK5, Fricke system, in such a
+* way that the FK5 proper motion is zero. Because such a star
+* has, in general, a non-zero proper motion in the FK4 system,
+* the routine requires the epoch at which the position in the
+* FK4 system was determined.
+*
+* The method is from Appendix 2 of Ref 1, but using the constants
+* of Ref 4.
+*
+* Given:
+* R1950,D1950 dp B1950.0 FK4 RA,Dec at epoch (rad)
+* BEPOCH dp Besselian epoch (e.g. 1979.3D0)
+*
+* Returned:
+* R2000,D2000 dp J2000.0 FK5 RA,Dec (rad)
+*
+* Notes:
+*
+* 1) The epoch BEPOCH is strictly speaking Besselian, but
+* if a Julian epoch is supplied the result will be
+* affected only to a negligible extent.
+*
+* 2) Conversion from Besselian epoch 1950.0 to Julian epoch
+* 2000.0 only is provided for. Conversions involving other
+* epochs will require use of the appropriate precession,
+* proper motion, and E-terms routines before and/or
+* after FK45Z is called.
+*
+* 3) In the FK4 catalogue the proper motions of stars within
+* 10 degrees of the poles do not embody the differential
+* E-term effect and should, strictly speaking, be handled
+* in a different manner from stars outside these regions.
+* However, given the general lack of homogeneity of the star
+* data available for routine astrometry, the difficulties of
+* handling positions that may have been determined from
+* astrometric fields spanning the polar and non-polar regions,
+* the likelihood that the differential E-terms effect was not
+* taken into account when allowing for proper motion in past
+* astrometry, and the undesirability of a discontinuity in
+* the algorithm, the decision has been made in this routine to
+* include the effect of differential E-terms on the proper
+* motions for all stars, whether polar or not. At epoch 2000,
+* and measuring on the sky rather than in terms of dRA, the
+* errors resulting from this simplification are less than
+* 1 milliarcsecond in position and 1 milliarcsecond per
+* century in proper motion.
+*
+* References:
+*
+* 1 Aoki,S., et al, 1983. Astron.Astrophys., 128, 263.
+*
+* 2 Smith, C.A. et al, 1989. "The transformation of astrometric
+* catalog systems to the equinox J2000.0". Astron.J. 97, 265.
+*
+* 3 Yallop, B.D. et al, 1989. "Transformation of mean star places
+* from FK4 B1950.0 to FK5 J2000.0 using matrices in 6-space".
+* Astron.J. 97, 274.
+*
+* 4 Seidelmann, P.K. (ed), 1992. "Explanatory Supplement to
+* the Astronomical Almanac", ISBN 0-935702-68-7.
+*
+* Called: sla_DCS2C, sla_EPJ, sla_EPB2D, sla_DCC2S, sla_DRANRM
+*
+* P.T.Wallace Starlink 21 September 1998
+*
+* Copyright (C) 1998 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION R1950,D1950,BEPOCH,R2000,D2000
+
+ DOUBLE PRECISION D2PI
+ PARAMETER (D2PI=6.283185307179586476925287D0)
+
+ DOUBLE PRECISION W
+ INTEGER I,J
+
+* Position and position+velocity vectors
+ DOUBLE PRECISION R0(3),A1(3),V1(3),V2(6)
+
+* Radians per year to arcsec per century
+ DOUBLE PRECISION PMF
+ PARAMETER (PMF=100D0*60D0*60D0*360D0/D2PI)
+
+* Functions
+ DOUBLE PRECISION sla_EPJ,sla_EPB2D,sla_DRANRM
+
+*
+* CANONICAL CONSTANTS (see references)
+*
+
+* Vectors A and Adot, and matrix M (only half of which is needed here)
+ DOUBLE PRECISION A(3),AD(3),EM(6,3)
+ DATA A,AD/ -1.62557D-6, -0.31919D-6, -0.13843D-6,
+ : +1.245D-3, -1.580D-3, -0.659D-3/
+
+ DATA (EM(I,1),I=1,6) / +0.9999256782D0,
+ : +0.0111820610D0,
+ : +0.0048579479D0,
+ : -0.000551D0,
+ : +0.238514D0,
+ : -0.435623D0 /
+
+ DATA (EM(I,2),I=1,6) / -0.0111820611D0,
+ : +0.9999374784D0,
+ : -0.0000271474D0,
+ : -0.238565D0,
+ : -0.002667D0,
+ : +0.012254D0 /
+
+ DATA (EM(I,3),I=1,6) / -0.0048579477D0,
+ : -0.0000271765D0,
+ : +0.9999881997D0,
+ : +0.435739D0,
+ : -0.008541D0,
+ : +0.002117D0 /
+
+
+
+* Spherical to Cartesian
+ CALL sla_DCS2C(R1950,D1950,R0)
+
+* Adjust vector A to give zero proper motion in FK5
+ W=(BEPOCH-1950D0)/PMF
+ DO I=1,3
+ A1(I)=A(I)+W*AD(I)
+ END DO
+
+* Remove e-terms
+ W=R0(1)*A1(1)+R0(2)*A1(2)+R0(3)*A1(3)
+ DO I=1,3
+ V1(I)=R0(I)-A1(I)+W*R0(I)
+ END DO
+
+* Convert position vector to Fricke system
+ DO I=1,6
+ W=0D0
+ DO J=1,3
+ W=W+EM(I,J)*V1(J)
+ END DO
+ V2(I)=W
+ END DO
+
+* Allow for fictitious proper motion in FK4
+ W=(sla_EPJ(sla_EPB2D(BEPOCH))-2000D0)/PMF
+ DO I=1,3
+ V2(I)=V2(I)+W*V2(I+3)
+ END DO
+
+* Revert to spherical coordinates
+ CALL sla_DCC2S(V2,W,D2000)
+ R2000=sla_DRANRM(W)
+
+ END
diff --git a/src/slalib/fk524.f b/src/slalib/fk524.f
new file mode 100644
index 0000000..1b990dc
--- /dev/null
+++ b/src/slalib/fk524.f
@@ -0,0 +1,257 @@
+ SUBROUTINE sla_FK524 (R2000,D2000,DR2000,DD2000,P2000,V2000,
+ : R1950,D1950,DR1950,DD1950,P1950,V1950)
+*+
+* - - - - - -
+* F K 5 2 4
+* - - - - - -
+*
+* Convert J2000.0 FK5 star data to B1950.0 FK4 (double precision)
+*
+* This routine converts stars from the new, IAU 1976, FK5, Fricke
+* system, to the old, Bessel-Newcomb, FK4 system. The precepts
+* of Smith et al (Ref 1) are followed, using the implementation
+* by Yallop et al (Ref 2) of a matrix method due to Standish.
+* Kinoshita's development of Andoyer's post-Newcomb precession is
+* used. The numerical constants from Seidelmann et al (Ref 3) are
+* used canonically.
+*
+* Given: (all J2000.0,FK5)
+* R2000,D2000 dp J2000.0 RA,Dec (rad)
+* DR2000,DD2000 dp J2000.0 proper motions (rad/Jul.yr)
+* P2000 dp parallax (arcsec)
+* V2000 dp radial velocity (km/s, +ve = moving away)
+*
+* Returned: (all B1950.0,FK4)
+* R1950,D1950 dp B1950.0 RA,Dec (rad)
+* DR1950,DD1950 dp B1950.0 proper motions (rad/trop.yr)
+* P1950 dp parallax (arcsec)
+* V1950 dp radial velocity (km/s, +ve = moving away)
+*
+* Notes:
+*
+* 1) The proper motions in RA are dRA/dt rather than
+* cos(Dec)*dRA/dt, and are per year rather than per century.
+*
+* 2) Note that conversion from Julian epoch 2000.0 to Besselian
+* epoch 1950.0 only is provided for. Conversions involving
+* other epochs will require use of the appropriate precession,
+* proper motion, and E-terms routines before and/or after
+* FK524 is called.
+*
+* 3) In the FK4 catalogue the proper motions of stars within
+* 10 degrees of the poles do not embody the differential
+* E-term effect and should, strictly speaking, be handled
+* in a different manner from stars outside these regions.
+* However, given the general lack of homogeneity of the star
+* data available for routine astrometry, the difficulties of
+* handling positions that may have been determined from
+* astrometric fields spanning the polar and non-polar regions,
+* the likelihood that the differential E-terms effect was not
+* taken into account when allowing for proper motion in past
+* astrometry, and the undesirability of a discontinuity in
+* the algorithm, the decision has been made in this routine to
+* include the effect of differential E-terms on the proper
+* motions for all stars, whether polar or not. At epoch 2000,
+* and measuring on the sky rather than in terms of dRA, the
+* errors resulting from this simplification are less than
+* 1 milliarcsecond in position and 1 milliarcsecond per
+* century in proper motion.
+*
+* References:
+*
+* 1 Smith, C.A. et al, 1989. "The transformation of astrometric
+* catalog systems to the equinox J2000.0". Astron.J. 97, 265.
+*
+* 2 Yallop, B.D. et al, 1989. "Transformation of mean star places
+* from FK4 B1950.0 to FK5 J2000.0 using matrices in 6-space".
+* Astron.J. 97, 274.
+*
+* 3 Seidelmann, P.K. (ed), 1992. "Explanatory Supplement to
+* the Astronomical Almanac", ISBN 0-935702-68-7.
+*
+* P.T.Wallace Starlink 19 December 1993
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION R2000,D2000,DR2000,DD2000,P2000,V2000,
+ : R1950,D1950,DR1950,DD1950,P1950,V1950
+
+
+* Miscellaneous
+ DOUBLE PRECISION R,D,UR,UD,PX,RV
+ DOUBLE PRECISION SR,CR,SD,CD,X,Y,Z,W
+ DOUBLE PRECISION V1(6),V2(6)
+ DOUBLE PRECISION XD,YD,ZD
+ DOUBLE PRECISION RXYZ,WD,RXYSQ,RXY
+ INTEGER I,J
+
+* 2Pi
+ DOUBLE PRECISION D2PI
+ PARAMETER (D2PI=6.283185307179586476925287D0)
+
+* Radians per year to arcsec per century
+ DOUBLE PRECISION PMF
+ PARAMETER (PMF=100D0*60D0*60D0*360D0/D2PI)
+
+* Small number to avoid arithmetic problems
+ DOUBLE PRECISION TINY
+ PARAMETER (TINY=1D-30)
+
+*
+* CANONICAL CONSTANTS (see references)
+*
+
+* Km per sec to AU per tropical century
+* = 86400 * 36524.2198782 / 149597870
+ DOUBLE PRECISION VF
+ PARAMETER (VF=21.095D0)
+
+* Constant vector and matrix (by columns)
+ DOUBLE PRECISION A(6),EMI(6,6)
+ DATA A/ -1.62557D-6, -0.31919D-6, -0.13843D-6,
+ : +1.245D-3, -1.580D-3, -0.659D-3/
+
+ DATA (EMI(I,1),I=1,6) / +0.9999256795D0,
+ : -0.0111814828D0,
+ : -0.0048590040D0,
+ : -0.000551D0,
+ : -0.238560D0,
+ : +0.435730D0 /
+
+ DATA (EMI(I,2),I=1,6) / +0.0111814828D0,
+ : +0.9999374849D0,
+ : -0.0000271557D0,
+ : +0.238509D0,
+ : -0.002667D0,
+ : -0.008541D0 /
+
+ DATA (EMI(I,3),I=1,6) / +0.0048590039D0,
+ : -0.0000271771D0,
+ : +0.9999881946D0,
+ : -0.435614D0,
+ : +0.012254D0,
+ : +0.002117D0 /
+
+ DATA (EMI(I,4),I=1,6) / -0.00000242389840D0,
+ : +0.00000002710544D0,
+ : +0.00000001177742D0,
+ : +0.99990432D0,
+ : -0.01118145D0,
+ : -0.00485852D0 /
+
+ DATA (EMI(I,5),I=1,6) / -0.00000002710544D0,
+ : -0.00000242392702D0,
+ : +0.00000000006585D0,
+ : +0.01118145D0,
+ : +0.99991613D0,
+ : -0.00002716D0 /
+
+ DATA (EMI(I,6),I=1,6) / -0.00000001177742D0,
+ : +0.00000000006585D0,
+ : -0.00000242404995D0,
+ : +0.00485852D0,
+ : -0.00002717D0,
+ : +0.99996684D0 /
+
+
+
+* Pick up J2000 data (units radians and arcsec/JC)
+ R=R2000
+ D=D2000
+ UR=DR2000*PMF
+ UD=DD2000*PMF
+ PX=P2000
+ RV=V2000
+
+* Spherical to Cartesian
+ SR=SIN(R)
+ CR=COS(R)
+ SD=SIN(D)
+ CD=COS(D)
+
+ X=CR*CD
+ Y=SR*CD
+ Z= SD
+
+ W=VF*RV*PX
+
+ V1(1)=X
+ V1(2)=Y
+ V1(3)=Z
+
+ V1(4)=-UR*Y-CR*SD*UD+W*X
+ V1(5)= UR*X-SR*SD*UD+W*Y
+ V1(6)= CD*UD+W*Z
+
+* Convert position+velocity vector to BN system
+ DO I=1,6
+ W=0D0
+ DO J=1,6
+ W=W+EMI(I,J)*V1(J)
+ END DO
+ V2(I)=W
+ END DO
+
+* Position vector components and magnitude
+ X=V2(1)
+ Y=V2(2)
+ Z=V2(3)
+ RXYZ=SQRT(X*X+Y*Y+Z*Z)
+
+* Apply E-terms to position
+ W=X*A(1)+Y*A(2)+Z*A(3)
+ X=X+A(1)*RXYZ-W*X
+ Y=Y+A(2)*RXYZ-W*Y
+ Z=Z+A(3)*RXYZ-W*Z
+
+* Recompute magnitude
+ RXYZ=SQRT(X*X+Y*Y+Z*Z)
+
+* Apply E-terms to both position and velocity
+ X=V2(1)
+ Y=V2(2)
+ Z=V2(3)
+ W=X*A(1)+Y*A(2)+Z*A(3)
+ WD=X*A(4)+Y*A(5)+Z*A(6)
+ X=X+A(1)*RXYZ-W*X
+ Y=Y+A(2)*RXYZ-W*Y
+ Z=Z+A(3)*RXYZ-W*Z
+ XD=V2(4)+A(4)*RXYZ-WD*X
+ YD=V2(5)+A(5)*RXYZ-WD*Y
+ ZD=V2(6)+A(6)*RXYZ-WD*Z
+
+* Convert to spherical
+ RXYSQ=X*X+Y*Y
+ RXY=SQRT(RXYSQ)
+
+ IF (X.EQ.0D0.AND.Y.EQ.0D0) THEN
+ R=0D0
+ ELSE
+ R=ATAN2(Y,X)
+ IF (R.LT.0.0D0) R=R+D2PI
+ END IF
+ D=ATAN2(Z,RXY)
+
+ IF (RXY.GT.TINY) THEN
+ UR=(X*YD-Y*XD)/RXYSQ
+ UD=(ZD*RXYSQ-Z*(X*XD+Y*YD))/((RXYSQ+Z*Z)*RXY)
+ END IF
+
+* Radial velocity and parallax
+ IF (PX.GT.TINY) THEN
+ RV=(X*XD+Y*YD+Z*ZD)/(PX*VF*RXYZ)
+ PX=PX/RXYZ
+ END IF
+
+* Return results
+ R1950=R
+ D1950=D
+ DR1950=UR/PMF
+ DD1950=UD/PMF
+ P1950=PX
+ V1950=RV
+
+ END
diff --git a/src/slalib/fk52h.f b/src/slalib/fk52h.f
new file mode 100644
index 0000000..c31a8fe
--- /dev/null
+++ b/src/slalib/fk52h.f
@@ -0,0 +1,105 @@
+ SUBROUTINE sla_FK52H (R5,D5,DR5,DD5,RH,DH,DRH,DDH)
+*+
+* - - - - - -
+* F K 5 2 H
+* - - - - - -
+*
+* Transform FK5 (J2000) star data into the Hipparcos frame.
+*
+* (double precision)
+*
+* This routine transforms FK5 star positions and proper motions
+* into the frame of the Hipparcos catalogue.
+*
+* Given (all FK5, equinox J2000, epoch J2000):
+* R5 d RA (radians)
+* D5 d Dec (radians)
+* DR5 d proper motion in RA (dRA/dt, rad/Jyear)
+* DD5 d proper motion in Dec (dDec/dt, rad/Jyear)
+*
+* Returned (all Hipparcos, epoch J2000):
+* RH d RA (radians)
+* DH d Dec (radians)
+* DRH d proper motion in RA (dRA/dt, rad/Jyear)
+* DDH d proper motion in Dec (dDec/dt, rad/Jyear)
+*
+* Called: sla_DS2C6, sla_DAV2M, sla_DMXV, sla_DVXV, sla_DC62S,
+* sla_DRANRM
+*
+* Notes:
+*
+* 1) The proper motions in RA are dRA/dt rather than
+* cos(Dec)*dRA/dt, and are per year rather than per century.
+*
+* 2) The FK5 to Hipparcos transformation consists of a pure
+* rotation and spin; zonal errors in the FK5 catalogue are
+* not taken into account.
+*
+* 3) The published orientation and spin components are interpreted
+* as "axial vectors". An axial vector points at the pole of the
+* rotation and its length is the amount of rotation in radians.
+*
+* 4) See also sla_H2FK5, sla_FK5HZ, sla_HFK5Z.
+*
+* Reference:
+*
+* M.Feissel & F.Mignard, Astron. Astrophys. 331, L33-L36 (1998).
+*
+* P.T.Wallace Starlink 22 June 1999
+*
+* Copyright (C) 1999 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION R5,D5,DR5,DD5,RH,DH,DRH,DDH
+
+ DOUBLE PRECISION AS2R
+ PARAMETER (AS2R=0.484813681109535994D-5)
+
+* FK5 to Hipparcos orientation and spin (radians, radians/year)
+ DOUBLE PRECISION EPX,EPY,EPZ
+ DOUBLE PRECISION OMX,OMY,OMZ
+
+ PARAMETER ( EPX = -19.9D-3 * AS2R,
+ : EPY = -9.1D-3 * AS2R,
+ : EPZ = +22.9D-3 * AS2R )
+
+ PARAMETER ( OMX = -0.30D-3 * AS2R,
+ : OMY = +0.60D-3 * AS2R,
+ : OMZ = +0.70D-3 * AS2R )
+
+ DOUBLE PRECISION PV5(6),ORTN(3),R5H(3,3),S5(3),VV(3),PVH(6),W,R,V
+ INTEGER I
+
+ DOUBLE PRECISION sla_DRANRM
+
+
+
+* FK5 barycentric position/velocity 6-vector (normalized).
+ CALL sla_DS2C6(R5,D5,1D0,DR5,DD5,0D0,PV5)
+
+* FK5 to Hipparcos orientation matrix.
+ ORTN(1) = EPX
+ ORTN(2) = EPY
+ ORTN(3) = EPZ
+ CALL sla_DAV2M(ORTN,R5H)
+
+* Hipparcos wrt FK5 spin vector.
+ S5(1) = OMX
+ S5(2) = OMY
+ S5(3) = OMZ
+
+* Orient & spin the 6-vector into the Hipparcos frame.
+ CALL sla_DMXV(R5H,PV5,PVH)
+ CALL sla_DVXV(PV5,S5,VV)
+ DO I=1,3
+ VV(I) = PV5(I+3)+VV(I)
+ END DO
+ CALL sla_DMXV(R5H,VV,PVH(4))
+
+* Hipparcos 6-vector to spherical.
+ CALL sla_DC62S(PVH,W,DH,R,DRH,DDH,V)
+ RH = sla_DRANRM(W)
+
+ END
diff --git a/src/slalib/fk54z.f b/src/slalib/fk54z.f
new file mode 100644
index 0000000..4ab564f
--- /dev/null
+++ b/src/slalib/fk54z.f
@@ -0,0 +1,69 @@
+ SUBROUTINE sla_FK54Z (R2000,D2000,BEPOCH,
+ : R1950,D1950,DR1950,DD1950)
+*+
+* - - - - - -
+* F K 5 4 Z
+* - - - - - -
+*
+* Convert a J2000.0 FK5 star position to B1950.0 FK4 assuming
+* zero proper motion and parallax (double precision)
+*
+* This routine converts star positions from the new, IAU 1976,
+* FK5, Fricke system to the old, Bessel-Newcomb, FK4 system.
+*
+* Given:
+* R2000,D2000 dp J2000.0 FK5 RA,Dec (rad)
+* BEPOCH dp Besselian epoch (e.g. 1950D0)
+*
+* Returned:
+* R1950,D1950 dp B1950.0 FK4 RA,Dec (rad) at epoch BEPOCH
+* DR1950,DD1950 dp B1950.0 FK4 proper motions (rad/trop.yr)
+*
+* Notes:
+*
+* 1) The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt.
+*
+* 2) Conversion from Julian epoch 2000.0 to Besselian epoch 1950.0
+* only is provided for. Conversions involving other epochs will
+* require use of the appropriate precession routines before and
+* after this routine is called.
+*
+* 3) Unlike in the sla_FK524 routine, the FK5 proper motions, the
+* parallax and the radial velocity are presumed zero.
+*
+* 4) It is the intention that FK5 should be a close approximation
+* to an inertial frame, so that distant objects have zero proper
+* motion; such objects have (in general) non-zero proper motion
+* in FK4, and this routine returns those fictitious proper
+* motions.
+*
+* 5) The position returned by this routine is in the B1950
+* reference frame but at Besselian epoch BEPOCH. For
+* comparison with catalogues the BEPOCH argument will
+* frequently be 1950D0.
+*
+* Called: sla_FK524, sla_PM
+*
+* P.T.Wallace Starlink 10 April 1990
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION R2000,D2000,BEPOCH,
+ : R1950,D1950,DR1950,DD1950
+
+ DOUBLE PRECISION R,D,PX,RV
+
+
+
+* FK5 equinox J2000 (any epoch) to FK4 equinox B1950 epoch B1950
+ CALL sla_FK524(R2000,D2000,0D0,0D0,0D0,0D0,
+ : R,D,DR1950,DD1950,PX,RV)
+
+* Fictitious proper motion to epoch BEPOCH
+ CALL sla_PM(R,D,DR1950,DD1950,0D0,0D0,1950D0,BEPOCH,
+ : R1950,D1950)
+
+ END
diff --git a/src/slalib/fk5hz.f b/src/slalib/fk5hz.f
new file mode 100644
index 0000000..7aa209d
--- /dev/null
+++ b/src/slalib/fk5hz.f
@@ -0,0 +1,107 @@
+ SUBROUTINE sla_FK5HZ (R5,D5,EPOCH,RH,DH)
+*+
+* - - - - - -
+* F K 5 H Z
+* - - - - - -
+*
+* Transform an FK5 (J2000) star position into the frame of the
+* Hipparcos catalogue, assuming zero Hipparcos proper motion.
+*
+* (double precision)
+*
+* This routine converts a star position from the FK5 system to
+* the Hipparcos system, in such a way that the Hipparcos proper
+* motion is zero. Because such a star has, in general, a non-zero
+* proper motion in the FK5 system, the routine requires the epoch
+* at which the position in the FK5 system was determined.
+*
+* Given:
+* R5 d FK5 RA (radians), equinox J2000, epoch EPOCH
+* D5 d FK5 Dec (radians), equinox J2000, epoch EPOCH
+* EPOCH d Julian epoch (TDB)
+*
+* Returned (all Hipparcos):
+* RH d RA (radians)
+* DH d Dec (radians)
+*
+* Called: sla_DCS2C, sla_DAV2M, sla_DIMXV, sla_DMXV, sla_DCC2S,
+* sla_DRANRM
+*
+* Notes:
+*
+* 1) The FK5 to Hipparcos transformation consists of a pure
+* rotation and spin; zonal errors in the FK5 catalogue are
+* not taken into account.
+*
+* 2) The published orientation and spin components are interpreted
+* as "axial vectors". An axial vector points at the pole of the
+* rotation and its length is the amount of rotation in radians.
+*
+* 3) See also sla_FK52H, sla_H2FK5, sla_HFK5Z.
+*
+* Reference:
+*
+* M.Feissel & F.Mignard, Astron. Astrophys. 331, L33-L36 (1998).
+*
+* P.T.Wallace Starlink 22 June 1999
+*
+* Copyright (C) 1999 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION R5,D5,EPOCH,RH,DH
+
+ DOUBLE PRECISION AS2R
+ PARAMETER (AS2R=0.484813681109535994D-5)
+
+* FK5 to Hipparcos orientation and spin (radians, radians/year)
+ DOUBLE PRECISION EPX,EPY,EPZ
+ DOUBLE PRECISION OMX,OMY,OMZ
+
+ PARAMETER ( EPX = -19.9D-3 * AS2R,
+ : EPY = -9.1D-3 * AS2R,
+ : EPZ = +22.9D-3 * AS2R )
+
+ PARAMETER ( OMX = -0.30D-3 * AS2R,
+ : OMY = +0.60D-3 * AS2R,
+ : OMZ = +0.70D-3 * AS2R )
+
+ DOUBLE PRECISION P5E(3),ORTN(3),R5H(3,3),T,VST(3),RST(3,3),
+ : P5(3),PH(3),W
+
+ DOUBLE PRECISION sla_DRANRM
+
+
+
+* FK5 barycentric position vector.
+ CALL sla_DCS2C(R5,D5,P5E)
+
+* FK5 to Hipparcos orientation matrix.
+ ORTN(1) = EPX
+ ORTN(2) = EPY
+ ORTN(3) = EPZ
+ CALL sla_DAV2M(ORTN,R5H)
+
+* Time interval from epoch to J2000.
+ T = 2000D0-EPOCH
+
+* Axial vector: accumulated Hipparcos wrt FK5 spin over that interval.
+ VST(1) = OMX*T
+ VST(2) = OMY*T
+ VST(3) = OMZ*T
+
+* Express the accumulated spin as a rotation matrix.
+ CALL sla_DAV2M(VST,RST)
+
+* Derotate the vector's FK5 axes back to epoch.
+ CALL sla_DIMXV(RST,P5E,P5)
+
+* Rotate the vector into the Hipparcos frame.
+ CALL sla_DMXV(R5H,P5,PH)
+
+* Hipparcos vector to spherical.
+ CALL sla_DCC2S(PH,W,DH)
+ RH = sla_DRANRM(W)
+
+ END
diff --git a/src/slalib/flotin.f b/src/slalib/flotin.f
new file mode 100644
index 0000000..ce90726
--- /dev/null
+++ b/src/slalib/flotin.f
@@ -0,0 +1,128 @@
+ SUBROUTINE sla_FLOTIN (STRING, NSTRT, RESLT, JFLAG)
+*+
+* - - - - - - -
+* F L O T I N
+* - - - - - - -
+*
+* Convert free-format input into single precision floating point
+*
+* Given:
+* STRING c string containing number to be decoded
+* NSTRT i pointer to where decoding is to start
+* RESLT r current value of result
+*
+* Returned:
+* NSTRT i advanced to next number
+* RESLT r result
+* JFLAG i status: -1 = -OK, 0 = +OK, 1 = null, 2 = error
+*
+* Called: sla_DFLTIN
+*
+* Notes:
+*
+* 1 The reason FLOTIN has separate OK status values for +
+* and - is to enable minus zero to be detected. This is
+* of crucial importance when decoding mixed-radix numbers.
+* For example, an angle expressed as deg, arcmin, arcsec
+* may have a leading minus sign but a zero degrees field.
+*
+* 2 A TAB is interpreted as a space, and lowercase characters
+* are interpreted as uppercase.
+*
+* 3 The basic format is the sequence of fields #^.^@#^, where
+* # is a sign character + or -, ^ means a string of decimal
+* digits, and @, which indicates an exponent, means D or E.
+* Various combinations of these fields can be omitted, and
+* embedded blanks are permissible in certain places.
+*
+* 4 Spaces:
+*
+* . Leading spaces are ignored.
+*
+* . Embedded spaces are allowed only after +, -, D or E,
+* and after the decomal point if the first sequence of
+* digits is absent.
+*
+* . Trailing spaces are ignored; the first signifies
+* end of decoding and subsequent ones are skipped.
+*
+* 5 Delimiters:
+*
+* . Any character other than +,-,0-9,.,D,E or space may be
+* used to signal the end of the number and terminate
+* decoding.
+*
+* . Comma is recognized by FLOTIN as a special case; it
+* is skipped, leaving the pointer on the next character.
+* See 13, below.
+*
+* 6 Both signs are optional. The default is +.
+*
+* 7 The mantissa ^.^ defaults to 1.
+*
+* 8 The exponent @#^ defaults to E0.
+*
+* 9 The strings of decimal digits may be of any length.
+*
+* 10 The decimal point is optional for whole numbers.
+*
+* 11 A "null result" occurs when the string of characters being
+* decoded does not begin with +,-,0-9,.,D or E, or consists
+* entirely of spaces. When this condition is detected, JFLAG
+* is set to 1 and RESLT is left untouched.
+*
+* 12 NSTRT = 1 for the first character in the string.
+*
+* 13 On return from FLOTIN, NSTRT is set ready for the next
+* decode - following trailing blanks and any comma. If a
+* delimiter other than comma is being used, NSTRT must be
+* incremented before the next call to FLOTIN, otherwise
+* all subsequent calls will return a null result.
+*
+* 14 Errors (JFLAG=2) occur when:
+*
+* . a +, -, D or E is left unsatisfied; or
+*
+* . the decimal point is present without at least
+* one decimal digit before or after it; or
+*
+* . an exponent more than 100 has been presented.
+*
+* 15 When an error has been detected, NSTRT is left
+* pointing to the character following the last
+* one used before the error came to light. This
+* may be after the point at which a more sophisticated
+* program could have detected the error. For example,
+* FLOTIN does not detect that '1E999' is unacceptable
+* (on a computer where this is so) until the entire number
+* has been decoded.
+*
+* 16 Certain highly unlikely combinations of mantissa &
+* exponent can cause arithmetic faults during the
+* decode, in some cases despite the fact that they
+* together could be construed as a valid number.
+*
+* 17 Decoding is left to right, one pass.
+*
+* 18 See also DFLTIN and INTIN
+*
+* P.T.Wallace Starlink 23 November 1995
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ CHARACTER*(*) STRING
+ INTEGER NSTRT
+ REAL RESLT
+ INTEGER JFLAG
+
+ DOUBLE PRECISION DRESLT
+
+
+* Call the double precision version
+ CALL sla_DFLTIN(STRING,NSTRT,DRESLT,JFLAG)
+ IF (JFLAG.LE.0) RESLT=REAL(DRESLT)
+
+ END
diff --git a/src/slalib/galeq.f b/src/slalib/galeq.f
new file mode 100644
index 0000000..c2c3718
--- /dev/null
+++ b/src/slalib/galeq.f
@@ -0,0 +1,79 @@
+ SUBROUTINE sla_GALEQ (DL, DB, DR, DD)
+*+
+* - - - - - -
+* G A L E Q
+* - - - - - -
+*
+* Transformation from IAU 1958 galactic coordinates to
+* J2000.0 equatorial coordinates (double precision)
+*
+* Given:
+* DL,DB dp galactic longitude and latitude L2,B2
+*
+* Returned:
+* DR,DD dp J2000.0 RA,Dec
+*
+* (all arguments are radians)
+*
+* Called:
+* sla_DCS2C, sla_DIMXV, sla_DCC2S, sla_DRANRM, sla_DRANGE
+*
+* Note:
+* The equatorial coordinates are J2000.0. Use the routine
+* sla_GE50 if conversion to B1950.0 'FK4' coordinates is
+* required.
+*
+* Reference:
+* Blaauw et al, Mon.Not.R.Astron.Soc.,121,123 (1960)
+*
+* P.T.Wallace Starlink 21 September 1998
+*
+* Copyright (C) 1998 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION DL,DB,DR,DD
+
+ DOUBLE PRECISION sla_DRANRM,sla_DRANGE
+
+ DOUBLE PRECISION V1(3),V2(3)
+
+*
+* L2,B2 system of galactic coordinates
+*
+* P = 192.25 RA of galactic north pole (mean B1950.0)
+* Q = 62.6 inclination of galactic to mean B1950.0 equator
+* R = 33 longitude of ascending node
+*
+* P,Q,R are degrees
+*
+* Equatorial to galactic rotation matrix (J2000.0), obtained by
+* applying the standard FK4 to FK5 transformation, for zero proper
+* motion in FK5, to the columns of the B1950 equatorial to
+* galactic rotation matrix:
+*
+ DOUBLE PRECISION RMAT(3,3)
+ DATA RMAT(1,1),RMAT(1,2),RMAT(1,3),
+ : RMAT(2,1),RMAT(2,2),RMAT(2,3),
+ : RMAT(3,1),RMAT(3,2),RMAT(3,3)/
+ : -0.054875539726D0,-0.873437108010D0,-0.483834985808D0,
+ : +0.494109453312D0,-0.444829589425D0,+0.746982251810D0,
+ : -0.867666135858D0,-0.198076386122D0,+0.455983795705D0/
+
+
+
+* Spherical to Cartesian
+ CALL sla_DCS2C(DL,DB,V1)
+
+* Galactic to equatorial
+ CALL sla_DIMXV(RMAT,V1,V2)
+
+* Cartesian to spherical
+ CALL sla_DCC2S(V2,DR,DD)
+
+* Express in conventional ranges
+ DR=sla_DRANRM(DR)
+ DD=sla_DRANGE(DD)
+
+ END
diff --git a/src/slalib/galsup.f b/src/slalib/galsup.f
new file mode 100644
index 0000000..b2520b9
--- /dev/null
+++ b/src/slalib/galsup.f
@@ -0,0 +1,79 @@
+ SUBROUTINE sla_GALSUP (DL, DB, DSL, DSB)
+*+
+* - - - - - - -
+* G A L S U P
+* - - - - - - -
+*
+* Transformation from IAU 1958 galactic coordinates to
+* de Vaucouleurs supergalactic coordinates (double precision)
+*
+* Given:
+* DL,DB dp galactic longitude and latitude L2,B2
+*
+* Returned:
+* DSL,DSB dp supergalactic longitude and latitude
+*
+* (all arguments are radians)
+*
+* Called:
+* sla_DCS2C, sla_DMXV, sla_DCC2S, sla_DRANRM, sla_DRANGE
+*
+* References:
+*
+* de Vaucouleurs, de Vaucouleurs, & Corwin, Second Reference
+* Catalogue of Bright Galaxies, U. Texas, page 8.
+*
+* Systems & Applied Sciences Corp., Documentation for the
+* machine-readable version of the above catalogue,
+* Contract NAS 5-26490.
+*
+* (These two references give different values for the galactic
+* longitude of the supergalactic origin. Both are wrong; the
+* correct value is L2=137.37.)
+*
+* P.T.Wallace Starlink 25 January 1999
+*
+* Copyright (C) 1999 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION DL,DB,DSL,DSB
+
+ DOUBLE PRECISION sla_DRANRM,sla_DRANGE
+
+ DOUBLE PRECISION V1(3),V2(3)
+
+*
+* System of supergalactic coordinates:
+*
+* SGL SGB L2 B2 (deg)
+* - +90 47.37 +6.32
+* 0 0 - 0
+*
+* Galactic to supergalactic rotation matrix:
+*
+ DOUBLE PRECISION RMAT(3,3)
+ DATA RMAT(1,1),RMAT(1,2),RMAT(1,3),
+ : RMAT(2,1),RMAT(2,2),RMAT(2,3),
+ : RMAT(3,1),RMAT(3,2),RMAT(3,3)/
+ : -0.735742574804D0,+0.677261296414D0,+0.000000000000D0,
+ : -0.074553778365D0,-0.080991471307D0,+0.993922590400D0,
+ : +0.673145302109D0,+0.731271165817D0,+0.110081262225D0/
+
+
+
+* Spherical to Cartesian
+ CALL sla_DCS2C(DL,DB,V1)
+
+* Galactic to supergalactic
+ CALL sla_DMXV(RMAT,V1,V2)
+
+* Cartesian to spherical
+ CALL sla_DCC2S(V2,DSL,DSB)
+
+* Express in conventional ranges
+ DSL=sla_DRANRM(DSL)
+ DSB=sla_DRANGE(DSB)
+
+ END
diff --git a/src/slalib/ge50.f b/src/slalib/ge50.f
new file mode 100644
index 0000000..fed5728
--- /dev/null
+++ b/src/slalib/ge50.f
@@ -0,0 +1,90 @@
+ SUBROUTINE sla_GE50 (DL, DB, DR, DD)
+*+
+* - - - - -
+* G E 5 0
+* - - - - -
+*
+* Transformation from IAU 1958 galactic coordinates to
+* B1950.0 'FK4' equatorial coordinates (double precision)
+*
+* Given:
+* DL,DB dp galactic longitude and latitude L2,B2
+*
+* Returned:
+* DR,DD dp B1950.0 'FK4' RA,Dec
+*
+* (all arguments are radians)
+*
+* Called:
+* sla_DCS2C, sla_DIMXV, sla_DCC2S, sla_ADDET, sla_DRANRM, sla_DRANGE
+*
+* Note:
+* The equatorial coordinates are B1950.0 'FK4'. Use the
+* routine sla_GALEQ if conversion to J2000.0 coordinates
+* is required.
+*
+* Reference:
+* Blaauw et al, Mon.Not.R.Astron.Soc.,121,123 (1960)
+*
+* P.T.Wallace Starlink 5 September 1993
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION DL,DB,DR,DD
+
+ DOUBLE PRECISION sla_DRANRM,sla_DRANGE
+
+ DOUBLE PRECISION V1(3),V2(3),R,D,RE,DE
+
+*
+* L2,B2 system of galactic coordinates
+*
+* P = 192.25 RA of galactic north pole (mean B1950.0)
+* Q = 62.6 inclination of galactic to mean B1950.0 equator
+* R = 33 longitude of ascending node
+*
+* P,Q,R are degrees
+*
+*
+* Equatorial to galactic rotation matrix
+*
+* The Euler angles are P, Q, 90-R, about the z then y then
+* z axes.
+*
+* +CP.CQ.SR-SP.CR +SP.CQ.SR+CP.CR -SQ.SR
+*
+* -CP.CQ.CR-SP.SR -SP.CQ.CR+CP.SR +SQ.CR
+*
+* +CP.SQ +SP.SQ +CQ
+*
+
+ DOUBLE PRECISION RMAT(3,3)
+ DATA RMAT(1,1),RMAT(1,2),RMAT(1,3),
+ : RMAT(2,1),RMAT(2,2),RMAT(2,3),
+ : RMAT(3,1),RMAT(3,2),RMAT(3,3) /
+ : -0.066988739415D0,-0.872755765852D0,-0.483538914632D0,
+ : +0.492728466075D0,-0.450346958020D0,+0.744584633283D0,
+ : -0.867600811151D0,-0.188374601723D0,+0.460199784784D0 /
+
+
+
+* Spherical to Cartesian
+ CALL sla_DCS2C(DL,DB,V1)
+
+* Rotate to mean B1950.0
+ CALL sla_DIMXV(RMAT,V1,V2)
+
+* Cartesian to spherical
+ CALL sla_DCC2S(V2,R,D)
+
+* Introduce E-terms
+ CALL sla_ADDET(R,D,1950D0,RE,DE)
+
+* Express in conventional ranges
+ DR=sla_DRANRM(RE)
+ DD=sla_DRANGE(DE)
+
+ END
diff --git a/src/slalib/geoc.f b/src/slalib/geoc.f
new file mode 100644
index 0000000..89f51b7
--- /dev/null
+++ b/src/slalib/geoc.f
@@ -0,0 +1,57 @@
+ SUBROUTINE sla_GEOC (P, H, R, Z)
+*+
+* - - - - -
+* G E O C
+* - - - - -
+*
+* Convert geodetic position to geocentric (double precision)
+*
+* Given:
+* P dp latitude (geodetic, radians)
+* H dp height above reference spheroid (geodetic, metres)
+*
+* Returned:
+* R dp distance from Earth axis (AU)
+* Z dp distance from plane of Earth equator (AU)
+*
+* Notes:
+* 1) Geocentric latitude can be obtained by evaluating ATAN2(Z,R).
+* 2) IAU 1976 constants are used.
+*
+* Reference:
+* Green,R.M., Spherical Astronomy, CUP 1985, p98.
+*
+* P.T.Wallace Starlink 4th October 1989
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION P,H,R,Z
+
+* Earth equatorial radius (metres)
+ DOUBLE PRECISION A0
+ PARAMETER (A0=6378140D0)
+
+* Reference spheroid flattening factor and useful function
+ DOUBLE PRECISION F,B
+ PARAMETER (F=1D0/298.257D0,B=(1D0-F)**2)
+
+* Astronomical unit in metres
+ DOUBLE PRECISION AU
+ PARAMETER (AU=1.49597870D11)
+
+ DOUBLE PRECISION SP,CP,C,S
+
+
+
+* Geodetic to geocentric conversion
+ SP=SIN(P)
+ CP=COS(P)
+ C=1D0/SQRT(CP*CP+B*SP*SP)
+ S=B*C
+ R=(A0*C+H)*CP/AU
+ Z=(A0*S+H)*SP/AU
+
+ END
diff --git a/src/slalib/gmst.f b/src/slalib/gmst.f
new file mode 100644
index 0000000..b115311
--- /dev/null
+++ b/src/slalib/gmst.f
@@ -0,0 +1,60 @@
+ DOUBLE PRECISION FUNCTION sla_GMST (UT1)
+*+
+* - - - - -
+* G M S T
+* - - - - -
+*
+* Conversion from universal time to sidereal time (double precision)
+*
+* Given:
+* UT1 dp universal time (strictly UT1) expressed as
+* modified Julian Date (JD-2400000.5)
+*
+* The result is the Greenwich mean sidereal time (double
+* precision, radians).
+*
+* The IAU 1982 expression (see page S15 of 1984 Astronomical
+* Almanac) is used, but rearranged to reduce rounding errors.
+* This expression is always described as giving the GMST at
+* 0 hours UT. In fact, it gives the difference between the
+* GMST and the UT, which happens to equal the GMST (modulo
+* 24 hours) at 0 hours UT each day. In this routine, the
+* entire UT is used directly as the argument for the
+* standard formula, and the fractional part of the UT is
+* added separately; note that the factor 1.0027379... does
+* not appear.
+*
+* See also the routine sla_GMSTA, which delivers better numerical
+* precision by accepting the UT date and time as separate arguments.
+*
+* Called: sla_DRANRM
+*
+* P.T.Wallace Starlink 14 September 1995
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION UT1
+
+ DOUBLE PRECISION sla_DRANRM
+
+ DOUBLE PRECISION D2PI,S2R
+ PARAMETER (D2PI=6.283185307179586476925286766559D0,
+ : S2R=7.272205216643039903848711535369D-5)
+
+ DOUBLE PRECISION TU
+
+
+
+* Julian centuries from fundamental epoch J2000 to this UT
+ TU=(UT1-51544.5D0)/36525D0
+
+* GMST at this UT
+ sla_GMST=sla_DRANRM(MOD(UT1,1D0)*D2PI+
+ : (24110.54841D0+
+ : (8640184.812866D0+
+ : (0.093104D0-6.2D-6*TU)*TU)*TU)*S2R)
+
+ END
diff --git a/src/slalib/gmsta.f b/src/slalib/gmsta.f
new file mode 100644
index 0000000..5259f6f
--- /dev/null
+++ b/src/slalib/gmsta.f
@@ -0,0 +1,80 @@
+ DOUBLE PRECISION FUNCTION sla_GMSTA (DATE, UT)
+*+
+* - - - - - -
+* G M S T A
+* - - - - - -
+*
+* Conversion from Universal Time to Greenwich mean sidereal time,
+* with rounding errors minimized.
+*
+* double precision
+*
+* Given:
+* DATE d UT1 date (MJD: integer part of JD-2400000.5))
+* UT d UT1 time (fraction of a day)
+*
+* The result is the Greenwich mean sidereal time (double precision,
+* radians, in the range 0 to 2pi).
+*
+* There is no restriction on how the UT is apportioned between the
+* DATE and UT arguments. Either of the two arguments could, for
+* example, be zero and the entire date+time supplied in the other.
+* However, the routine is designed to deliver maximum accuracy when
+* the DATE argument is a whole number and the UT lies in the range
+* 0 to 1 (or vice versa).
+*
+* The algorithm is based on the IAU 1982 expression (see page S15 of
+* the 1984 Astronomical Almanac). This is always described as giving
+* the GMST at 0 hours UT1. In fact, it gives the difference between
+* the GMST and the UT, the steady 4-minutes-per-day drawing-ahead of
+* ST with respect to UT. When whole days are ignored, the expression
+* happens to equal the GMST at 0 hours UT1 each day.
+*
+* In this routine, the entire UT1 (the sum of the two arguments DATE
+* and UT) is used directly as the argument for the standard formula.
+* The UT1 is then added, but omitting whole days to conserve accuracy.
+*
+* See also the routine sla_GMST, which accepts the UT as a single
+* argument. Compared with sla_GMST, the extra numerical precision
+* delivered by the present routine is unlikely to be important in
+* an absolute sense, but may be useful when critically comparing
+* algorithms and in applications where two sidereal times close
+* together are differenced.
+*
+* Called: sla_DRANRM
+*
+* P.T.Wallace Starlink 13 April 1998
+*
+* Copyright (C) 1998 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION DATE,UT
+
+* Seconds of time to radians
+ DOUBLE PRECISION S2R
+ PARAMETER (S2R=7.272205216643039903848712D-5)
+
+ DOUBLE PRECISION D1,D2,T
+ DOUBLE PRECISION sla_DRANRM
+
+
+* Julian centuries since J2000.
+ IF (DATE.LT.UT) THEN
+ D1=DATE
+ D2=UT
+ ELSE
+ D1=UT
+ D2=DATE
+ END IF
+ T=(D1+(D2-51544.5D0))/36525D0
+
+* GMST at this UT1.
+ sla_GMSTA=sla_DRANRM(S2R*(24110.54841D0+
+ : (8640184.812866D0+
+ : (0.093104D0
+ : -6.2D-6*T)*T)*T
+ : +86400D0*(MOD(D1,1D0)+MOD(D2,1D0))))
+
+ END
diff --git a/src/slalib/gresid.f_alpha_OSF1 b/src/slalib/gresid.f_alpha_OSF1
new file mode 100644
index 0000000..9cc021b
--- /dev/null
+++ b/src/slalib/gresid.f_alpha_OSF1
@@ -0,0 +1,76 @@
+ REAL FUNCTION sla_GRESID (S)
+*+
+* - - - - - - -
+* G R E S I D
+* - - - - - - -
+*
+* Generate pseudo-random normal deviate ( = 'Gaussian residual')
+* (single precision)
+*
+* !!! Version for DEC Alpha/OSF1 !!!
+*
+* Given:
+* S real standard deviation
+*
+* The results of many calls to this routine will be
+* normally distributed with mean zero and standard deviation S.
+*
+* The Box-Muller algorithm is used. This is described in
+* Numerical Recipes, section 7.2.
+*
+* P.T.Wallace Starlink 14 October 1991
+* Revised for new recommended RTL RANDOM(3f) function.
+* B.K.McIlwrath Starlink 12 January 1996
+*-
+
+ IMPLICIT NONE
+
+ REAL S
+
+ REAL X,Y,R,W,GNEXT,G
+ LOGICAL FTF,FIRST
+
+ REAL RANDOM
+
+ SAVE GNEXT,FTF,FIRST
+ DATA FTF,FIRST / .TRUE.,.TRUE. /
+
+* First time through, initialise the random-number generator
+ IF (FTF) THEN
+ X = RANDOM(12345678)
+ FTF = .FALSE.
+ END IF
+
+* Second normal deviate of the pair available?
+ IF (FIRST) THEN
+
+* No - generate two random numbers inside unit circle
+ R = 2.0
+ DO WHILE (R.GE.1.0)
+
+* Generate two random numbers in range +/- 1
+ X = 2.0*RANDOM(0)-1.0
+ Y = 2.0*RANDOM(0)-1.0
+
+* Try again if not in unit circle
+ R = X*X+Y*Y
+ END DO
+
+* Box-Muller transformation, generating two deviates
+ W = SQRT(-2.0*LOG(R)/MAX(R,1E-20))
+ GNEXT = X*W
+ G = Y*W
+
+* Set flag to indicate availability of next deviate
+ FIRST = .FALSE.
+ ELSE
+
+* Return second deviate of the pair & reset flag
+ G = GNEXT
+ FIRST = .TRUE.
+ END IF
+
+* Scale the deviate by the required standard deviation
+ sla_GRESID = G*S
+
+ END
diff --git a/src/slalib/gresid.f_convex b/src/slalib/gresid.f_convex
new file mode 100644
index 0000000..278a79e
--- /dev/null
+++ b/src/slalib/gresid.f_convex
@@ -0,0 +1,80 @@
+ REAL FUNCTION sla_GRESID (S)
+*+
+* - - - - - - -
+* G R E S I D
+* - - - - - - -
+*
+* Generate pseudo-random normal deviate ( = 'Gaussian residual')
+* (single precision)
+*
+* !!! Convex specific !!!
+*
+* Given:
+* S real standard deviation
+*
+* The results of many calls to this routine will be
+* normally distributed with mean zero and standard deviation S.
+*
+* The Box-Muller algorithm is used. This is described in
+* Numerical Recipes, section 7.2.
+*
+* Called: RAND (a REAL function from the Convex Fortran Library)
+*
+* P.T.Wallace Starlink 28 June 1994
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL S
+
+ REAL X,Y,R,W,GNEXT,G
+ LOGICAL FTF,FIRST
+
+ REAL RAND
+
+ SAVE GNEXT,FIRST
+ DATA FTF,FIRST / .TRUE.,.TRUE. /
+
+
+
+* First time through, initialise the random-number generator
+ IF (FTF) THEN
+ X = RAND(123456789)
+ FTF = .FALSE.
+ END IF
+
+* Second normal deviate of the pair available?
+ IF (FIRST) THEN
+
+* No - generate two random numbers inside unit circle
+ R = 2.0
+ DO WHILE (R.GE.1.0)
+
+* Generate two random numbers in range +/- 1
+ X = 2.0*RAND(0)-1.0
+ Y = 2.0*RAND(0)-1.0
+
+* Try again if not in unit circle
+ R = X*X+Y*Y
+ END DO
+
+* Box-Muller transformation, generating two deviates
+ W = SQRT(-2.0*LOG(R)/MAX(R,1E-20))
+ GNEXT = X*W
+ G = Y*W
+
+* Set flag to indicate availability of next deviate
+ FIRST = .FALSE.
+ ELSE
+
+* Return second deviate of the pair & reset flag
+ G = GNEXT
+ FIRST = .TRUE.
+ END IF
+
+* Scale the deviate by the required standard deviation
+ sla_GRESID = G*S
+
+ END
diff --git a/src/slalib/gresid.f_ix86_Linux b/src/slalib/gresid.f_ix86_Linux
new file mode 100644
index 0000000..ec93bdd
--- /dev/null
+++ b/src/slalib/gresid.f_ix86_Linux
@@ -0,0 +1,74 @@
+ REAL FUNCTION sla_GRESID (S)
+*+
+* - - - - - - -
+* G R E S I D
+* - - - - - - -
+*
+* Generate pseudo-random normal deviate ( = 'Gaussian residual')
+* (single precision)
+*
+* !!! Version for Linux !!!
+*
+* Given:
+* S real standard deviation
+*
+* The results of many calls to this routine will be
+* normally distributed with mean zero and standard deviation S.
+*
+* The Box-Muller algorithm is used. This is described in
+* Numerical Recipes, section 7.2.
+*
+* B.K.McIlwrath Starlink 12 January 1996
+*-
+
+ IMPLICIT NONE
+
+ REAL S
+
+ REAL X,Y,R,W,GNEXT,G
+ LOGICAL FTF,FIRST
+
+ REAL RANDOM
+
+ SAVE GNEXT,FTF,FIRST
+ DATA FTF,FIRST / .TRUE.,.TRUE. /
+
+* First time through, initialise the random-number generator
+ IF (FTF) THEN
+ X = RANDOM(12345678)
+ FTF = .FALSE.
+ END IF
+
+* Second normal deviate of the pair available?
+ IF (FIRST) THEN
+
+* No - generate two random numbers inside unit circle
+ R = 2.0
+ DO WHILE (R.GE.1.0)
+
+* Generate two random numbers in range +/- 1
+ X = 2.0*RANDOM(0)-1.0
+ Y = 2.0*RANDOM(0)-1.0
+
+* Try again if not in unit circle
+ R = X*X+Y*Y
+ END DO
+
+* Box-Muller transformation, generating two deviates
+ W = SQRT(-2.0*LOG(R)/MAX(R,1E-20))
+ GNEXT = X*W
+ G = Y*W
+
+* Set flag to indicate availability of next deviate
+ FIRST = .FALSE.
+ ELSE
+
+* Return second deviate of the pair & reset flag
+ G = GNEXT
+ FIRST = .TRUE.
+ END IF
+
+* Scale the deviate by the required standard deviation
+ sla_GRESID = G*S
+
+ END
diff --git a/src/slalib/gresid.f_mips b/src/slalib/gresid.f_mips
new file mode 100644
index 0000000..7f353f9
--- /dev/null
+++ b/src/slalib/gresid.f_mips
@@ -0,0 +1,74 @@
+ REAL FUNCTION sla_GRESID (S)
+*+
+* - - - - - - -
+* G R E S I D
+* - - - - - - -
+*
+* Generate pseudo-random normal deviate ( = 'Gaussian residual')
+* (single precision)
+*
+* !!! Version for VAX/VMS and DECstation !!!
+*
+* Given:
+* S real standard deviation
+*
+* The results of many calls to this routine will be
+* normally distributed with mean zero and standard deviation S.
+*
+* The Box-Muller algorithm is used. This is described in
+* Numerical Recipes, section 7.2.
+*
+* P.T.Wallace Starlink 14 October 1991
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL S
+
+ REAL X,Y,R,W,GNEXT,G
+ INTEGER ISEED
+ LOGICAL FIRST
+
+ REAL RAN
+
+ SAVE GNEXT,ISEED,FIRST
+ DATA ISEED / 123456789 /
+ DATA FIRST / .TRUE. /
+
+
+
+* Second normal deviate of the pair available?
+ IF (FIRST) THEN
+
+* No - generate two random numbers inside unit circle
+ R = 2.0
+ DO WHILE (R.GE.1.0)
+
+* Generate two random numbers in range +/- 1
+ X = 2.0*RAN(ISEED)-1.0
+ Y = 2.0*RAN(ISEED)-1.0
+
+* Try again if not in unit circle
+ R = X*X+Y*Y
+ END DO
+
+* Box-Muller transformation, generating two deviates
+ W = SQRT(-2.0*LOG(R)/MAX(R,1E-20))
+ GNEXT = X*W
+ G = Y*W
+
+* Set flag to indicate availability of next deviate
+ FIRST = .FALSE.
+ ELSE
+
+* Return second deviate of the pair & reset flag
+ G = GNEXT
+ FIRST = .TRUE.
+ END IF
+
+* Scale the deviate by the required standard deviation
+ sla_GRESID = G*S
+
+ END
diff --git a/src/slalib/gresid.f_pcm b/src/slalib/gresid.f_pcm
new file mode 100644
index 0000000..b2c6f76
--- /dev/null
+++ b/src/slalib/gresid.f_pcm
@@ -0,0 +1,73 @@
+ REAL FUNCTION sla_GRESID (S)
+*+
+* - - - - - - -
+* G R E S I D
+* - - - - - - -
+*
+* Generate pseudo-random normal deviate ( = 'Gaussian residual')
+* (single precision)
+*
+* Given:
+* S real standard deviation
+*
+* The results of many calls to this routine will be
+* normally distributed with mean zero and standard deviation S.
+*
+* The Box-Muller algorithm is used. This is described in
+* Numerical Recipes, section 7.2.
+*
+* !!! Microsoft Fortran dependent - calls the RAN routine !!!
+* !!! To seed the random-number generator, either call the !!!
+* !!! Microsoft SEED routine specifying some INTEGER*2 !!!
+* !!! seed or call the function sla_RANDOM specifying some !!!
+* !!! REAL seed. !!!
+*
+* P.T.Wallace Starlink 1 April 1993
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL S
+
+ REAL X,Y,RV,R,W,GNEXT,G
+ LOGICAL FIRST
+
+ SAVE GNEXT,RV,FIRST
+ DATA FIRST / .TRUE. /
+
+
+
+* Second normal deviate of the pair available?
+ IF (FIRST) THEN
+
+* No - generate two random numbers in range +/- 1
+ 1 CONTINUE
+ CALL RANDOM(RV) !!! PC
+ X = 2.0*RV-1.0
+ CALL RANDOM(RV) !!! PC
+ Y = 2.0*RV-1.0
+
+* Try again if not in unit circle
+ R = X*X+Y*Y
+ IF (R.GE.1.0) GO TO 1
+
+* Box-Muller transformation, generating two deviates
+ W = SQRT(-2.0*LOG(R)/MAX(R,1E-20))
+ GNEXT = X*W
+ G = Y*W
+
+* Set flag to indicate availability of next deviate
+ FIRST = .FALSE.
+ ELSE
+
+* Return second deviate of the pair & reset flag
+ G = GNEXT
+ FIRST = .TRUE.
+ END IF
+
+* Scale the deviate by the required standard deviation
+ sla_GRESID = G*S
+
+ END
diff --git a/src/slalib/gresid.f_sun4 b/src/slalib/gresid.f_sun4
new file mode 100644
index 0000000..3205062
--- /dev/null
+++ b/src/slalib/gresid.f_sun4
@@ -0,0 +1,80 @@
+ REAL FUNCTION sla_GRESID (S)
+*+
+* - - - - - - -
+* G R E S I D
+* - - - - - - -
+*
+* Generate pseudo-random normal deviate ( = 'Gaussian residual')
+* (single precision)
+*
+* !!! Sun 4 specific !!!
+*
+* Given:
+* S real standard deviation
+*
+* The results of many calls to this routine will be
+* normally distributed with mean zero and standard deviation S.
+*
+* The Box-Muller algorithm is used. This is described in
+* Numerical Recipes, section 7.2.
+*
+* Called: RAND (a REAL function from the Sun Fortran Library)
+*
+* P.T.Wallace Starlink 14 October 1991
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL S
+
+ REAL X,Y,R,W,GNEXT,G
+ LOGICAL FTF,FIRST
+
+ REAL RAND
+
+ SAVE GNEXT,FIRST
+ DATA FTF,FIRST / .TRUE.,.TRUE. /
+
+
+
+* First time through, initialise the random-number generator
+ IF (FTF) THEN
+ X = RAND(123456789)
+ FTF = .FALSE.
+ END IF
+
+* Second normal deviate of the pair available?
+ IF (FIRST) THEN
+
+* No - generate two random numbers inside unit circle
+ R = 2.0
+ DO WHILE (R.GE.1.0)
+
+* Generate two random numbers in range +/- 1
+ X = 2.0*RAND(0)-1.0
+ Y = 2.0*RAND(0)-1.0
+
+* Try again if not in unit circle
+ R = X*X+Y*Y
+ END DO
+
+* Box-Muller transformation, generating two deviates
+ W = SQRT(-2.0*LOG(R)/MAX(R,1E-20))
+ GNEXT = X*W
+ G = Y*W
+
+* Set flag to indicate availability of next deviate
+ FIRST = .FALSE.
+ ELSE
+
+* Return second deviate of the pair & reset flag
+ G = GNEXT
+ FIRST = .TRUE.
+ END IF
+
+* Scale the deviate by the required standard deviation
+ sla_GRESID = G*S
+
+ END
diff --git a/src/slalib/gresid.f_sun4_Solaris b/src/slalib/gresid.f_sun4_Solaris
new file mode 100644
index 0000000..3205062
--- /dev/null
+++ b/src/slalib/gresid.f_sun4_Solaris
@@ -0,0 +1,80 @@
+ REAL FUNCTION sla_GRESID (S)
+*+
+* - - - - - - -
+* G R E S I D
+* - - - - - - -
+*
+* Generate pseudo-random normal deviate ( = 'Gaussian residual')
+* (single precision)
+*
+* !!! Sun 4 specific !!!
+*
+* Given:
+* S real standard deviation
+*
+* The results of many calls to this routine will be
+* normally distributed with mean zero and standard deviation S.
+*
+* The Box-Muller algorithm is used. This is described in
+* Numerical Recipes, section 7.2.
+*
+* Called: RAND (a REAL function from the Sun Fortran Library)
+*
+* P.T.Wallace Starlink 14 October 1991
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL S
+
+ REAL X,Y,R,W,GNEXT,G
+ LOGICAL FTF,FIRST
+
+ REAL RAND
+
+ SAVE GNEXT,FIRST
+ DATA FTF,FIRST / .TRUE.,.TRUE. /
+
+
+
+* First time through, initialise the random-number generator
+ IF (FTF) THEN
+ X = RAND(123456789)
+ FTF = .FALSE.
+ END IF
+
+* Second normal deviate of the pair available?
+ IF (FIRST) THEN
+
+* No - generate two random numbers inside unit circle
+ R = 2.0
+ DO WHILE (R.GE.1.0)
+
+* Generate two random numbers in range +/- 1
+ X = 2.0*RAND(0)-1.0
+ Y = 2.0*RAND(0)-1.0
+
+* Try again if not in unit circle
+ R = X*X+Y*Y
+ END DO
+
+* Box-Muller transformation, generating two deviates
+ W = SQRT(-2.0*LOG(R)/MAX(R,1E-20))
+ GNEXT = X*W
+ G = Y*W
+
+* Set flag to indicate availability of next deviate
+ FIRST = .FALSE.
+ ELSE
+
+* Return second deviate of the pair & reset flag
+ G = GNEXT
+ FIRST = .TRUE.
+ END IF
+
+* Scale the deviate by the required standard deviation
+ sla_GRESID = G*S
+
+ END
diff --git a/src/slalib/gresid.f_vax b/src/slalib/gresid.f_vax
new file mode 100644
index 0000000..90dab0a
--- /dev/null
+++ b/src/slalib/gresid.f_vax
@@ -0,0 +1,72 @@
+ REAL FUNCTION sla_GRESID (S)
+*+
+* - - - - - - -
+* G R E S I D
+* - - - - - - -
+*
+* Generate pseudo-random normal deviate ( = 'Gaussian residual')
+* (single precision)
+*
+* !!! Version for VAX/VMS and DECstation !!!
+*
+* Given:
+* S real standard deviation
+*
+* The results of many calls to this routine will be
+* normally distributed with mean zero and standard deviation S.
+*
+* The Box-Muller algorithm is used. This is described in
+* Numerical Recipes, section 7.2.
+*
+* P.T.Wallace Starlink 14 October 1991
+*-
+
+ IMPLICIT NONE
+
+ REAL S
+
+ REAL X,Y,R,W,GNEXT,G
+ INTEGER ISEED
+ LOGICAL FIRST
+
+ REAL RAN
+
+ SAVE GNEXT,ISEED,FIRST
+ DATA ISEED / 123456789 /
+ DATA FIRST / .TRUE. /
+
+
+
+* Second normal deviate of the pair available?
+ IF (FIRST) THEN
+
+* No - generate two random numbers inside unit circle
+ R = 2.0
+ DO WHILE (R.GE.1.0)
+
+* Generate two random numbers in range +/- 1
+ X = 2.0*RAN(ISEED)-1.0
+ Y = 2.0*RAN(ISEED)-1.0
+
+* Try again if not in unit circle
+ R = X*X+Y*Y
+ END DO
+
+* Box-Muller transformation, generating two deviates
+ W = SQRT(-2.0*LOG(R)/MAX(R,1E-20))
+ GNEXT = X*W
+ G = Y*W
+
+* Set flag to indicate availability of next deviate
+ FIRST = .FALSE.
+ ELSE
+
+* Return second deviate of the pair & reset flag
+ G = GNEXT
+ FIRST = .TRUE.
+ END IF
+
+* Scale the deviate by the required standard deviation
+ sla_GRESID = G*S
+
+ END
diff --git a/src/slalib/gresid.f_x86_64 b/src/slalib/gresid.f_x86_64
new file mode 100644
index 0000000..ec93bdd
--- /dev/null
+++ b/src/slalib/gresid.f_x86_64
@@ -0,0 +1,74 @@
+ REAL FUNCTION sla_GRESID (S)
+*+
+* - - - - - - -
+* G R E S I D
+* - - - - - - -
+*
+* Generate pseudo-random normal deviate ( = 'Gaussian residual')
+* (single precision)
+*
+* !!! Version for Linux !!!
+*
+* Given:
+* S real standard deviation
+*
+* The results of many calls to this routine will be
+* normally distributed with mean zero and standard deviation S.
+*
+* The Box-Muller algorithm is used. This is described in
+* Numerical Recipes, section 7.2.
+*
+* B.K.McIlwrath Starlink 12 January 1996
+*-
+
+ IMPLICIT NONE
+
+ REAL S
+
+ REAL X,Y,R,W,GNEXT,G
+ LOGICAL FTF,FIRST
+
+ REAL RANDOM
+
+ SAVE GNEXT,FTF,FIRST
+ DATA FTF,FIRST / .TRUE.,.TRUE. /
+
+* First time through, initialise the random-number generator
+ IF (FTF) THEN
+ X = RANDOM(12345678)
+ FTF = .FALSE.
+ END IF
+
+* Second normal deviate of the pair available?
+ IF (FIRST) THEN
+
+* No - generate two random numbers inside unit circle
+ R = 2.0
+ DO WHILE (R.GE.1.0)
+
+* Generate two random numbers in range +/- 1
+ X = 2.0*RANDOM(0)-1.0
+ Y = 2.0*RANDOM(0)-1.0
+
+* Try again if not in unit circle
+ R = X*X+Y*Y
+ END DO
+
+* Box-Muller transformation, generating two deviates
+ W = SQRT(-2.0*LOG(R)/MAX(R,1E-20))
+ GNEXT = X*W
+ G = Y*W
+
+* Set flag to indicate availability of next deviate
+ FIRST = .FALSE.
+ ELSE
+
+* Return second deviate of the pair & reset flag
+ G = GNEXT
+ FIRST = .TRUE.
+ END IF
+
+* Scale the deviate by the required standard deviation
+ sla_GRESID = G*S
+
+ END
diff --git a/src/slalib/h2e.f b/src/slalib/h2e.f
new file mode 100644
index 0000000..e850493
--- /dev/null
+++ b/src/slalib/h2e.f
@@ -0,0 +1,83 @@
+ SUBROUTINE sla_H2E (AZ, EL, PHI, HA, DEC)
+*+
+* - - - - -
+* D E 2 H
+* - - - - -
+*
+* Horizon to equatorial coordinates: Az,El to HA,Dec
+*
+* (single precision)
+*
+* Given:
+* AZ r azimuth
+* EL r elevation
+* PHI r observatory latitude
+*
+* Returned:
+* HA r hour angle
+* DEC r declination
+*
+* Notes:
+*
+* 1) All the arguments are angles in radians.
+*
+* 2) The sign convention for azimuth is north zero, east +pi/2.
+*
+* 3) HA is returned in the range +/-pi. Declination is returned
+* in the range +/-pi/2.
+*
+* 4) The latitude is (in principle) geodetic. In critical
+* applications, corrections for polar motion should be applied.
+*
+* 5) In some applications it will be important to specify the
+* correct type of elevation in order to produce the required
+* type of HA,Dec. In particular, it may be important to
+* distinguish between the elevation as affected by refraction,
+* which will yield the "observed" HA,Dec, and the elevation
+* in vacuo, which will yield the "topocentric" HA,Dec. If the
+* effects of diurnal aberration can be neglected, the
+* topocentric HA,Dec may be used as an approximation to the
+* "apparent" HA,Dec.
+*
+* 6) No range checking of arguments is done.
+*
+* 7) In applications which involve many such calculations, rather
+* than calling the present routine it will be more efficient to
+* use inline code, having previously computed fixed terms such
+* as sine and cosine of latitude.
+*
+* P.T.Wallace Starlink 21 February 1996
+*
+* Copyright (C) 1996 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL AZ,EL,PHI,HA,DEC
+
+ DOUBLE PRECISION SA,CA,SE,CE,SP,CP,X,Y,Z,R
+
+
+* Useful trig functions
+ SA=SIN(AZ)
+ CA=COS(AZ)
+ SE=SIN(EL)
+ CE=COS(EL)
+ SP=SIN(PHI)
+ CP=COS(PHI)
+
+* HA,Dec as x,y,z
+ X=-CA*CE*SP+SE*CP
+ Y=-SA*CE
+ Z=CA*CE*CP+SE*SP
+
+* To HA,Dec
+ R=SQRT(X*X+Y*Y)
+ IF (R.EQ.0.0) THEN
+ HA=0.0
+ ELSE
+ HA=ATAN2(Y,X)
+ END IF
+ DEC=ATAN2(Z,R)
+
+ END
diff --git a/src/slalib/h2fk5.f b/src/slalib/h2fk5.f
new file mode 100644
index 0000000..d3a0116
--- /dev/null
+++ b/src/slalib/h2fk5.f
@@ -0,0 +1,109 @@
+ SUBROUTINE sla_H2FK5 (RH,DH,DRH,DDH,R5,D5,DR5,DD5)
+*+
+* - - - - - -
+* H 2 F K 5
+* - - - - - -
+*
+* Transform Hipparcos star data into the FK5 (J2000) system.
+*
+* (double precision)
+*
+* This routine transforms Hipparcos star positions and proper
+* motions into FK5 J2000.
+*
+* Given (all Hipparcos, epoch J2000):
+* RH d RA (radians)
+* DH d Dec (radians)
+* DRH d proper motion in RA (dRA/dt, rad/Jyear)
+* DDH d proper motion in Dec (dDec/dt, rad/Jyear)
+*
+* Returned (all FK5, equinox J2000, epoch J2000):
+* R5 d RA (radians)
+* D5 d Dec (radians)
+* DR5 d proper motion in RA (dRA/dt, rad/Jyear)
+* DD5 d proper motion in Dec (dDec/dt, rad/Jyear)
+*
+* Called: sla_DS2C6, sla_DAV2M, sla_DMXV, sla_DIMXV, sla_DVXV,
+* sla_DC62S, sla_DRANRM
+*
+* Notes:
+*
+* 1) The proper motions in RA are dRA/dt rather than
+* cos(Dec)*dRA/dt, and are per year rather than per century.
+*
+* 2) The FK5 to Hipparcos transformation consists of a pure
+* rotation and spin; zonal errors in the FK5 catalogue are
+* not taken into account.
+*
+* 3) The published orientation and spin components are interpreted
+* as "axial vectors". An axial vector points at the pole of the
+* rotation and its length is the amount of rotation in radians.
+*
+* 4) See also sla_FK52H, sla_FK5HZ, sla_HFK5Z.
+*
+* Reference:
+*
+* M.Feissel & F.Mignard, Astron. Astrophys. 331, L33-L36 (1998).
+*
+* P.T.Wallace Starlink 22 June 1999
+*
+* Copyright (C) 1999 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION RH,DH,DRH,DDH,R5,D5,DR5,DD5
+
+ DOUBLE PRECISION AS2R
+ PARAMETER (AS2R=0.484813681109535994D-5)
+
+* FK5 to Hipparcos orientation and spin (radians, radians/year)
+ DOUBLE PRECISION EPX,EPY,EPZ
+ DOUBLE PRECISION OMX,OMY,OMZ
+
+ PARAMETER ( EPX = -19.9D-3 * AS2R,
+ : EPY = -9.1D-3 * AS2R,
+ : EPZ = +22.9D-3 * AS2R )
+
+ PARAMETER ( OMX = -0.30D-3 * AS2R,
+ : OMY = +0.60D-3 * AS2R,
+ : OMZ = +0.70D-3 * AS2R )
+
+ DOUBLE PRECISION PVH(6),ORTN(3),R5H(3,3),S5(3),SH(3),VV(3),
+ : PV5(6),W,R,V
+ INTEGER I
+
+ DOUBLE PRECISION sla_DRANRM
+
+
+
+* Hipparcos barycentric position/velocity 6-vector (normalized).
+ CALL sla_DS2C6(RH,DH,1D0,DRH,DDH,0D0,PVH)
+
+* FK5 to Hipparcos orientation matrix.
+ ORTN(1) = EPX
+ ORTN(2) = EPY
+ ORTN(3) = EPZ
+ CALL sla_DAV2M(ORTN,R5H)
+
+* Hipparcos wrt FK5 spin vector.
+ S5(1) = OMX
+ S5(2) = OMY
+ S5(3) = OMZ
+
+* Rotate the spin vector into the Hipparcos frame.
+ CALL sla_DMXV(R5H,S5,SH)
+
+* De-orient & de-spin the 6-vector into FK5 J2000.
+ CALL sla_DIMXV(R5H,PVH,PV5)
+ CALL sla_DVXV(PVH,SH,VV)
+ DO I=1,3
+ VV(I) = PVH(I+3)-VV(I)
+ END DO
+ CALL sla_DIMXV(R5H,VV,PV5(4))
+
+* FK5 6-vector to spherical.
+ CALL sla_DC62S(PV5,W,D5,R,DR5,DD5,V)
+ R5 = sla_DRANRM(W)
+
+ END
diff --git a/src/slalib/hfk5z.f b/src/slalib/hfk5z.f
new file mode 100644
index 0000000..b50d38a
--- /dev/null
+++ b/src/slalib/hfk5z.f
@@ -0,0 +1,122 @@
+ SUBROUTINE sla_HFK5Z (RH,DH,EPOCH,R5,D5,DR5,DD5)
+*+
+* - - - - - -
+* H F K 5 Z
+* - - - - - -
+*
+* Transform a Hipparcos star position into FK5 J2000, assuming
+* zero Hipparcos proper motion.
+*
+* (double precision)
+*
+* Given:
+* RH d Hipparcos RA (radians)
+* DH d Hipparcos Dec (radians)
+* EPOCH d Julian epoch (TDB)
+*
+* Returned (all FK5, equinox J2000, epoch EPOCH):
+* R5 d RA (radians)
+* D5 d Dec (radians)
+*
+* Called: sla_DCS2C, sla_DAV2M, sla_DMXV, sla_DAV2M, sla_DMXM,
+* sla_DIMXV, sla_DVXV, sla_DC62S, sla_DRANRM
+*
+* Notes:
+*
+* 1) The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt.
+*
+* 2) The FK5 to Hipparcos transformation consists of a pure
+* rotation and spin; zonal errors in the FK5 catalogue are
+* not taken into account.
+*
+* 3) The published orientation and spin components are interpreted
+* as "axial vectors". An axial vector points at the pole of the
+* rotation and its length is the amount of rotation in radians.
+*
+* 4) It was the intention that Hipparcos should be a close
+* approximation to an inertial frame, so that distant objects
+* have zero proper motion; such objects have (in general)
+* non-zero proper motion in FK5, and this routine returns those
+* fictitious proper motions.
+*
+* 5) The position returned by this routine is in the FK5 J2000
+* reference frame but at Julian epoch EPOCH.
+*
+* 6) See also sla_FK52H, sla_H2FK5, sla_FK5ZHZ.
+*
+* Reference:
+*
+* M.Feissel & F.Mignard, Astron. Astrophys. 331, L33-L36 (1998).
+*
+* P.T.Wallace Starlink 22 June 1999
+*
+* Copyright (C) 1999 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION RH,DH,EPOCH,R5,D5,DR5,DD5
+
+ DOUBLE PRECISION AS2R
+ PARAMETER (AS2R=0.484813681109535994D-5)
+
+* FK5 to Hipparcos orientation and spin (radians, radians/year)
+ DOUBLE PRECISION EPX,EPY,EPZ
+ DOUBLE PRECISION OMX,OMY,OMZ
+
+ PARAMETER ( EPX = -19.9D-3 * AS2R,
+ : EPY = -9.1D-3 * AS2R,
+ : EPZ = +22.9D-3 * AS2R )
+
+ PARAMETER ( OMX = -0.30D-3 * AS2R,
+ : OMY = +0.60D-3 * AS2R,
+ : OMZ = +0.70D-3 * AS2R )
+
+ DOUBLE PRECISION PH(6),ORTN(3),R5H(3,3),S5(3),SH(3),T,VST(3),
+ : RST(3,3),R5HT(3,3),PV5E(6),VV(3),W,R,V
+
+ DOUBLE PRECISION sla_DRANRM
+
+
+
+* Hipparcos barycentric position vector (normalized).
+ CALL sla_DCS2C(RH,DH,PH)
+
+* FK5 to Hipparcos orientation matrix.
+ ORTN(1) = EPX
+ ORTN(2) = EPY
+ ORTN(3) = EPZ
+ CALL sla_DAV2M(ORTN,R5H)
+
+* Hipparcos wrt FK5 spin vector.
+ S5(1) = OMX
+ S5(2) = OMY
+ S5(3) = OMZ
+
+* Rotate the spin vector into the Hipparcos frame.
+ CALL sla_DMXV(R5H,S5,SH)
+
+* Time interval from J2000 to epoch.
+ T = EPOCH-2000D0
+
+* Axial vector: accumulated Hipparcos wrt FK5 spin over that interval.
+ VST(1) = OMX*T
+ VST(2) = OMY*T
+ VST(3) = OMZ*T
+
+* Express the accumulated spin as a rotation matrix.
+ CALL sla_DAV2M(VST,RST)
+
+* Rotation matrix: accumulated spin, then FK5 to Hipparcos.
+ CALL sla_DMXM(R5H,RST,R5HT)
+
+* De-orient & de-spin the vector into FK5 J2000 at epoch.
+ CALL sla_DIMXV(R5HT,PH,PV5E)
+ CALL sla_DVXV(SH,PH,VV)
+ CALL sla_DIMXV(R5HT,VV,PV5E(4))
+
+* FK5 position/velocity 6-vector to spherical.
+ CALL sla_DC62S(PV5E,W,D5,R,DR5,DD5,V)
+ R5 = sla_DRANRM(W)
+
+ END
diff --git a/src/slalib/idchf.f b/src/slalib/idchf.f
new file mode 100644
index 0000000..2f758bf
--- /dev/null
+++ b/src/slalib/idchf.f
@@ -0,0 +1,94 @@
+ SUBROUTINE sla__IDCHF (STRING, NPTR, NVEC, NDIGIT, DIGIT)
+*+
+* - - - - - -
+* I D C H F
+* - - - - - -
+*
+* Internal routine used by DFLTIN
+*
+* Identify next character in string
+*
+* Given:
+* STRING char string
+* NPTR int pointer to character to be identified
+*
+* Returned:
+* NPTR int incremented unless end of field
+* NVEC int vector for identified character
+* NDIGIT int 0-9 if character was a numeral
+* DIGIT double equivalent of NDIGIT
+*
+* NVEC takes the following values:
+*
+* 1 0-9
+* 2 space or TAB !!! n.b. ASCII TAB assumed !!!
+* 3 D,d,E or e
+* 4 .
+* 5 +
+* 6 -
+* 7 ,
+* 8 else
+* 9 outside field
+*
+* If the character is not 0-9, NDIGIT and DIGIT are either not
+* altered or are set to arbitrary values.
+*
+* P.T.Wallace Starlink 22 December 1992
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ CHARACTER*(*) STRING
+ INTEGER NPTR,NVEC,NDIGIT
+ DOUBLE PRECISION DIGIT
+
+ CHARACTER K
+ INTEGER NCHAR
+
+* Character/vector tables
+ INTEGER NCREC
+ PARAMETER (NCREC=19)
+ CHARACTER KCTAB(NCREC)
+ INTEGER KVTAB(NCREC)
+ DATA KCTAB/'0','1','2','3','4','5','6','7','8','9',
+ : ' ','D','d','E','e','.','+','-',','/
+ DATA KVTAB/10*1,2,4*3,4,5,6,7/
+
+
+* Handle pointer outside field
+ IF (NPTR.LT.1.OR.NPTR.GT.LEN(STRING)) THEN
+ NVEC=9
+ ELSE
+
+* Not end of field: identify the character
+ K=STRING(NPTR:NPTR)
+ DO NCHAR=1,NCREC
+ IF (K.EQ.KCTAB(NCHAR)) THEN
+
+* Recognized
+ NVEC=KVTAB(NCHAR)
+ NDIGIT=NCHAR-1
+ DIGIT=DBLE(NDIGIT)
+ GO TO 2300
+ END IF
+ END DO
+
+* Not recognized: check for TAB !!! n.b. ASCII assumed !!!
+ IF (K.EQ.CHAR(9)) THEN
+
+* TAB: treat as space
+ NVEC=2
+ ELSE
+
+* Unrecognized
+ NVEC=8
+ END IF
+
+* Increment pointer
+ 2300 CONTINUE
+ NPTR=NPTR+1
+ END IF
+
+ END
diff --git a/src/slalib/idchi.f b/src/slalib/idchi.f
new file mode 100644
index 0000000..56f596f
--- /dev/null
+++ b/src/slalib/idchi.f
@@ -0,0 +1,91 @@
+ SUBROUTINE sla__IDCHI (STRING, NPTR, NVEC, DIGIT)
+*+
+* - - - - - -
+* I D C H I
+* - - - - - -
+*
+* Internal routine used by INTIN
+*
+* Identify next character in string
+*
+* Given:
+* STRING char string
+* NPTR int pointer to character to be identified
+*
+* Returned:
+* NPTR int incremented unless end of field
+* NVEC int vector for identified character
+* DIGIT double double precision digit if 0-9
+*
+* NVEC takes the following values:
+*
+* 1 0-9
+* 2 space or TAB !!! n.b. ASCII TAB assumed !!!
+* 3 +
+* 4 -
+* 5 ,
+* 6 else
+* 7 outside string
+*
+* If the character is not 0-9, DIGIT is either unaltered or
+* is set to an arbitrary value.
+*
+* P.T.Wallace Starlink 22 December 1992
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ CHARACTER*(*) STRING
+ INTEGER NPTR,NVEC
+ DOUBLE PRECISION DIGIT
+
+ CHARACTER K
+ INTEGER NCHAR
+
+* Character/vector tables
+ INTEGER NCREC
+ PARAMETER (NCREC=14)
+ CHARACTER KCTAB(NCREC)
+ INTEGER KVTAB(NCREC)
+ DATA KCTAB/'0','1','2','3','4','5','6','7','8','9',
+ : ' ', '+','-',','/
+ DATA KVTAB/10*1,2,3,4,5/
+
+
+
+* Handle pointer outside field
+ IF (NPTR.LT.1.OR.NPTR.GT.LEN(STRING)) THEN
+ NVEC=7
+ ELSE
+
+* Not end of field: identify character
+ K=STRING(NPTR:NPTR)
+ DO NCHAR=1,NCREC
+ IF (K.EQ.KCTAB(NCHAR)) THEN
+
+* Recognized
+ NVEC=KVTAB(NCHAR)
+ DIGIT=DBLE(NCHAR-1)
+ GO TO 2300
+ END IF
+ END DO
+
+* Not recognized: check for TAB !!! n.b. ASCII assumed !!!
+ IF (K.EQ.CHAR(9)) THEN
+
+* TAB: treat as space
+ NVEC=2
+ ELSE
+
+* Unrecognized
+ NVEC=6
+ END IF
+
+* Increment pointer
+ 2300 CONTINUE
+ NPTR=NPTR+1
+ END IF
+
+ END
diff --git a/src/slalib/imxv.f b/src/slalib/imxv.f
new file mode 100644
index 0000000..2aef263
--- /dev/null
+++ b/src/slalib/imxv.f
@@ -0,0 +1,51 @@
+ SUBROUTINE sla_IMXV (RM, VA, VB)
+*+
+* - - - - -
+* I M X V
+* - - - - -
+*
+* Performs the 3-D backward unitary transformation:
+*
+* vector VB = (inverse of matrix RM) * vector VA
+*
+* (single precision)
+*
+* (n.b. the matrix must be unitary, as this routine assumes that
+* the inverse and transpose are identical)
+*
+* Given:
+* RM real(3,3) matrix
+* VA real(3) vector
+*
+* Returned:
+* VB real(3) result vector
+*
+* P.T.Wallace Starlink November 1984
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL RM(3,3),VA(3),VB(3)
+
+ INTEGER I,J
+ REAL W,VW(3)
+
+
+
+* Inverse of matrix RM * vector VA -> vector VW
+ DO J=1,3
+ W=0.0
+ DO I=1,3
+ W=W+RM(I,J)*VA(I)
+ END DO
+ VW(J)=W
+ END DO
+
+* Vector VW -> vector VB
+ DO J=1,3
+ VB(J)=VW(J)
+ END DO
+
+ END
diff --git a/src/slalib/intin.f b/src/slalib/intin.f
new file mode 100644
index 0000000..a4cee15
--- /dev/null
+++ b/src/slalib/intin.f
@@ -0,0 +1,176 @@
+ SUBROUTINE sla_INTIN (STRING, NSTRT, IRESLT, JFLAG)
+*+
+* - - - - - -
+* I N T I N
+* - - - - - -
+*
+* Convert free-format input into an integer
+*
+* Given:
+* STRING c string containing number to be decoded
+* NSTRT i pointer to where decoding is to start
+* IRESLT i current value of result
+*
+* Returned:
+* NSTRT i advanced to next number
+* IRESLT i result
+* JFLAG i status: -1 = -OK, 0 = +OK, 1 = null, 2 = error
+*
+* Called: sla__IDCHI
+*
+* Notes:
+*
+* 1 The reason INTIN has separate OK status values for +
+* and - is to enable minus zero to be detected. This is
+* of crucial importance when decoding mixed-radix numbers.
+* For example, an angle expressed as deg, arcmin, arcsec
+* may have a leading minus sign but a zero degrees field.
+*
+* 2 A TAB is interpreted as a space.
+*
+* 3 The basic format is the sequence of fields #^, where
+* # is a sign character + or -, and ^ means a string of
+* decimal digits.
+*
+* 4 Spaces:
+*
+* . Leading spaces are ignored.
+*
+* . Spaces between the sign and the number are allowed.
+*
+* . Trailing spaces are ignored; the first signifies
+* end of decoding and subsequent ones are skipped.
+*
+* 5 Delimiters:
+*
+* . Any character other than +,-,0-9 or space may be
+* used to signal the end of the number and terminate
+* decoding.
+*
+* . Comma is recognized by INTIN as a special case; it
+* is skipped, leaving the pointer on the next character.
+* See 9, below.
+*
+* 6 The sign is optional. The default is +.
+*
+* 7 A "null result" occurs when the string of characters being
+* decoded does not begin with +,- or 0-9, or consists
+* entirely of spaces. When this condition is detected, JFLAG
+* is set to 1 and IRESLT is left untouched.
+*
+* 8 NSTRT = 1 for the first character in the string.
+*
+* 9 On return from INTIN, NSTRT is set ready for the next
+* decode - following trailing blanks and any comma. If a
+* delimiter other than comma is being used, NSTRT must be
+* incremented before the next call to INTIN, otherwise
+* all subsequent calls will return a null result.
+*
+* 10 Errors (JFLAG=2) occur when:
+*
+* . there is a + or - but no number; or
+*
+* . the number is greater than BIG (defined below).
+*
+* 11 When an error has been detected, NSTRT is left
+* pointing to the character following the last
+* one used before the error came to light.
+*
+* 12 See also FLOTIN and DFLTIN.
+*
+* P.T.Wallace Starlink 27 April 1998
+*
+* Copyright (C) 1998 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ CHARACTER*(*) STRING
+ INTEGER NSTRT,IRESLT,JFLAG
+
+* Maximum allowed value
+ DOUBLE PRECISION BIG
+ PARAMETER (BIG=2147483647D0)
+
+ INTEGER JPTR,MSIGN,NVEC,J
+ DOUBLE PRECISION DRES,DIGIT
+
+
+
+* Current character
+ JPTR=NSTRT
+
+* Set defaults
+ DRES=0D0
+ MSIGN=1
+
+* Look for sign
+ 100 CONTINUE
+ CALL sla__IDCHI(STRING,JPTR,NVEC,DIGIT)
+ GO TO ( 400, 100, 300, 200, 9110, 9100, 9110),NVEC
+* 0-9 SP + - , ELSE END
+
+* Negative
+ 200 CONTINUE
+ MSIGN=-1
+
+* Look for first decimal
+ 300 CONTINUE
+ CALL sla__IDCHI(STRING,JPTR,NVEC,DIGIT)
+ GO TO ( 400, 300, 9200, 9200, 9200, 9200, 9210),NVEC
+* 0-9 SP + - , ELSE END
+
+* Accept decimals
+ 400 CONTINUE
+ DRES=DRES*1D1+DIGIT
+
+* Test for overflow
+ IF (DRES.GT.BIG) GO TO 9200
+
+* Look for subsequent decimals
+ CALL sla__IDCHI(STRING,JPTR,NVEC,DIGIT)
+ GO TO ( 400, 1610, 1600, 1600, 1600, 1600, 1610),NVEC
+* 0-9 SP + - , ELSE END
+
+* Get result & status
+ 1600 CONTINUE
+ JPTR=JPTR-1
+ 1610 CONTINUE
+ J=0
+ IF (MSIGN.EQ.1) GO TO 1620
+ J=-1
+ DRES=-DRES
+ 1620 CONTINUE
+ IRESLT=NINT(DRES)
+
+* Skip to end of field
+ 1630 CONTINUE
+ CALL sla__IDCHI(STRING,JPTR,NVEC,DIGIT)
+ GO TO (1720, 1630, 1720, 1720, 9900, 1720, 9900),NVEC
+* 0-9 SP + - , ELSE END
+
+ 1720 CONTINUE
+ JPTR=JPTR-1
+ GO TO 9900
+
+* Exits
+
+* Null field
+ 9100 CONTINUE
+ JPTR=JPTR-1
+ 9110 CONTINUE
+ J=1
+ GO TO 9900
+
+* Errors
+ 9200 CONTINUE
+ JPTR=JPTR-1
+ 9210 CONTINUE
+ J=2
+
+* Return
+ 9900 CONTINUE
+ NSTRT=JPTR
+ JFLAG=J
+
+ END
diff --git a/src/slalib/invf.f b/src/slalib/invf.f
new file mode 100644
index 0000000..f323228
--- /dev/null
+++ b/src/slalib/invf.f
@@ -0,0 +1,90 @@
+ SUBROUTINE sla_INVF (FWDS,BKWDS,J)
+*+
+* - - - - -
+* I N V F
+* - - - - -
+*
+* Invert a linear model of the type produced by the
+* sla_FITXY routine.
+*
+* Given:
+* FWDS d(6) model coefficients
+*
+* Returned:
+* BKWDS d(6) inverse model
+* J i status: 0 = OK, -1 = no inverse
+*
+* The models relate two sets of [X,Y] coordinates as follows.
+* Naming the elements of FWDS:
+*
+* FWDS(1) = A
+* FWDS(2) = B
+* FWDS(3) = C
+* FWDS(4) = D
+* FWDS(5) = E
+* FWDS(6) = F
+*
+* where two sets of coordinates [X1,Y1] and [X2,Y1] are related
+* thus:
+*
+* X2 = A + B*X1 + C*Y1
+* Y2 = D + E*X1 + F*Y1
+*
+* the present routine generates a new set of coefficients:
+*
+* BKWDS(1) = P
+* BKWDS(2) = Q
+* BKWDS(3) = R
+* BKWDS(4) = S
+* BKWDS(5) = T
+* BKWDS(6) = U
+*
+* such that:
+*
+* X1 = P + Q*X2 + R*Y2
+* Y1 = S + T*X2 + U*Y2
+*
+* Two successive calls to sla_INVF will thus deliver a set
+* of coefficients equal to the starting values.
+*
+* To comply with the ANSI Fortran standard, FWDS and BKWDS must
+* not be the same array, even though the routine is coded to
+* work on the VAX and most other computers even if this rule
+* is violated.
+*
+* See also sla_FITXY, sla_PXY, sla_XY2XY, sla_DCMPF
+*
+* P.T.Wallace Starlink 11 April 1990
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION FWDS(6),BKWDS(6)
+ INTEGER J
+
+ DOUBLE PRECISION A,B,C,D,E,F,DET
+
+
+
+ A=FWDS(1)
+ B=FWDS(2)
+ C=FWDS(3)
+ D=FWDS(4)
+ E=FWDS(5)
+ F=FWDS(6)
+ DET=B*F-C*E
+ IF (DET.NE.0D0) THEN
+ BKWDS(1)=(C*D-A*F)/DET
+ BKWDS(2)=F/DET
+ BKWDS(3)=-C/DET
+ BKWDS(4)=(A*E-B*D)/DET
+ BKWDS(5)=-E/DET
+ BKWDS(6)=B/DET
+ J=0
+ ELSE
+ J=-1
+ END IF
+
+ END
diff --git a/src/slalib/kbj.f b/src/slalib/kbj.f
new file mode 100644
index 0000000..6a3ddb4
--- /dev/null
+++ b/src/slalib/kbj.f
@@ -0,0 +1,56 @@
+ SUBROUTINE sla_KBJ (JB, E, K, J)
+*+
+* - - - -
+* K B J
+* - - - -
+*
+* Select epoch prefix 'B' or 'J'
+*
+* Given:
+* JB int sla_DBJIN prefix status: 0=none, 1='B', 2='J'
+* E dp epoch - Besselian or Julian
+*
+* Returned:
+* K char 'B' or 'J'
+* J int status: 0=OK
+*
+* If JB=0, B is assumed for E < 1984D0, otherwise J.
+*
+* P.T.Wallace Starlink 31 July 1989
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ INTEGER JB
+ DOUBLE PRECISION E
+ CHARACTER K*(*)
+ INTEGER J
+
+* Preset status
+ J=0
+
+* If prefix given expressly, use it
+ IF (JB.EQ.1) THEN
+ K='B'
+ ELSE IF (JB.EQ.2) THEN
+ K='J'
+
+* If no prefix, examine the epoch
+ ELSE IF (JB.EQ.0) THEN
+
+* If epoch is pre-1984.0, assume Besselian; otherwise Julian
+ IF (E.LT.1984D0) THEN
+ K='B'
+ ELSE
+ K='J'
+ END IF
+
+* If illegal prefix, return error status
+ ELSE
+ K=' '
+ J=1
+ END IF
+
+ END
diff --git a/src/slalib/m2av.f b/src/slalib/m2av.f
new file mode 100644
index 0000000..1299ed9
--- /dev/null
+++ b/src/slalib/m2av.f
@@ -0,0 +1,59 @@
+ SUBROUTINE sla_M2AV (RMAT, AXVEC)
+*+
+* - - - - -
+* M 2 A V
+* - - - - -
+*
+* From a rotation matrix, determine the corresponding axial vector
+* (single precision)
+*
+* A rotation matrix describes a rotation about some arbitrary axis.
+* The axis is called the Euler axis, and the angle through which the
+* reference frame rotates is called the Euler angle. The axial
+* vector returned by this routine has the same direction as the
+* Euler axis, and its magnitude is the Euler angle in radians. (The
+* magnitude and direction can be separated by means of the routine
+* sla_VN.)
+*
+* Given:
+* RMAT r(3,3) rotation matrix
+*
+* Returned:
+* AXVEC r(3) axial vector (radians)
+*
+* The reference frame rotates clockwise as seen looking along
+* the axial vector from the origin.
+*
+* If RMAT is null, so is the result.
+*
+* P.T.Wallace Starlink 11 April 1990
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL RMAT(3,3),AXVEC(3)
+
+ REAL X,Y,Z,S2,C2,PHI,F
+
+
+
+ X = RMAT(2,3)-RMAT(3,2)
+ Y = RMAT(3,1)-RMAT(1,3)
+ Z = RMAT(1,2)-RMAT(2,1)
+ S2 = SQRT(X*X+Y*Y+Z*Z)
+ IF (S2.NE.0.0) THEN
+ C2 = (RMAT(1,1)+RMAT(2,2)+RMAT(3,3)-1.0)
+ PHI = ATAN2(S2/2.0,C2/2.0)
+ F = PHI/S2
+ AXVEC(1) = X*F
+ AXVEC(2) = Y*F
+ AXVEC(3) = Z*F
+ ELSE
+ AXVEC(1) = 0.0
+ AXVEC(2) = 0.0
+ AXVEC(3) = 0.0
+ END IF
+
+ END
diff --git a/src/slalib/makefile.orig b/src/slalib/makefile.orig
new file mode 100644
index 0000000..ff61e16
--- /dev/null
+++ b/src/slalib/makefile.orig
@@ -0,0 +1,1426 @@
+#+
+# Name:
+# makefile
+#
+# Version:
+# Library makefile Mk V
+#
+# Purpose:
+# Build and install the SLALIB package.
+#
+# Type of Module:
+# Description file for the make utility.
+#
+# Description:
+# This description file is used by the make utility to build the
+# SLALIB package from the distributed source files, to install
+# the resulting system for use, and to perform other housekeeping
+# tasks.
+#
+# Invocation:
+# This makefile is not intended to be used by make when invoked
+# directly (although this is possible), but instead to be used via
+# the accompanying mk script. This script sets up a number of
+# environment variables which are used as macros within the
+# makefile and which accommodate differences between machines and
+# operating systems (it invokes make with the -e option). Please
+# consult the mk script prologue for full details.
+#
+# Targets:
+# The following make targets are defined in this script for
+# external use:
+#
+# [help]
+# This is the default target. It outputs a message describing
+# the mk script and lists the targets provided.
+#
+# check
+# Performs a simple check that all necessary source files are
+# present, and displays the version number and current state
+# of the package (built/installed/tested, etc.).
+#
+# build
+# Compiles the source files and creates all files needed
+# prior to installing the package for use.
+#
+# install
+# Installs the package for use by putting the necessary files
+# into sub-directories of the $INSTALL directory (the $HOME
+# directory is used if the environment variable INSTALL is
+# not defined). Links to the installed files are left in the
+# source directory.
+#
+# deinstall
+# Reverses the action of the install target, removing files
+# from sub-directories of the $INSTALL directory and
+# restoring them to the source directory (the $HOME directory
+# is used by default if the environment variable INSTALL is
+# not defined).
+#
+# test
+# Builds and runs a simple test program to check for correct
+# installation of the package.
+#
+# export
+# Produces an export copy of the built package suitable for
+# passing to another user. A compressed tar file is created
+# in the $EXPORT directory containing copies of the source
+# files and built files for the package (the current
+# directory is used by default if the environment variable
+# EXPORT is not defined). The package should normally be
+# built, installed and tested (see above) before using this
+# target. After unpacking the exported file on a similar
+# machine, the recipient may simply install it for use.
+#
+# export_run
+# Produces an export copy of the built package suitable for
+# passing to another user. A compressed tar file is created
+# in the $EXPORT directory containing copies of the built
+# files for the package (the current directory is used by
+# default if the environment variable EXPORT is not defined).
+# The package should normally be built, installed and tested
+# (see above) before using this target. After unpacking the
+# exported file on a similar machine, the recipient may simply
+# install it for use.
+#
+# export_source
+# Produces an export copy of the source for the package
+# suitable for passing to another user to build (possibly on
+# a different type of machine). A compressed tar file is
+# created in the $EXPORT directory containing copies of just
+# the source files for the package (the current directory is
+# used by default if the environment variable EXPORT is not
+# defined). After unpacking the exported file, the recipient
+# must build the package before installing it for use.
+#
+# clean
+# Cleans up after building the package, removing all
+# intermediate files created during the building process, but
+# leaving the built files themselves.
+#
+# unbuild
+# Reverses the building process, removing all intermediate
+# files along with all the built files.
+#
+# External Dependencies:
+# The SLALIB package depends on the following other Starlink
+# packages which must previously have been installed into the
+# appropriate sub-directories of the $STARLINK directory (/star is
+# used if the environment variable STARLINK is not defined).
+#
+# None.
+#
+# Notes:
+# This makefile uses the presence/absence of the hidden files
+# .BUILT, .INSTALLED_$(SYSTEM) and .TESTED_$(SYSTEM) to record the
+# current state of the system during housekeeping operations.
+#
+# Implementation Deficiencies:
+# The method of generating the list of external libraries passed to
+# the $(BLD_SHR) command is still preliminary.
+#
+# Copyright:
+# Copyright (C) 1995 Rutherford Appleton Laboratory
+#
+# Authors:
+# RFWS: R.F.Warren-Smith (Starlink, RAL)
+# PMA: P.M.Allan (Starlink, RAL)
+# PTW: P.T.Wallace (Starlink, RAL)
+# AJC: A.J.Chipperfield (Starlink, RAL)
+# BLY: M.J.Bly (Starlink, RAL)
+# {enter_new_authors_here}
+#
+# History:
+# 1-DEC-1993 (RFWS/PMA):
+# Starlink template.
+# 1-DEC-1993 (PTW):
+# SLALIB version.
+# 18-JAN-1994 (PTW):
+# Corrections to if statements.
+# 10-MAR-1994 (PTW):
+# sla_RVLSR replaced by sla_RVLSRD and sla_RVLSRK
+# 8-AUG-1994 (PTW):
+# New routines added: sla_DE2H, sla_DH2E, sla_DTPRD, sla_E2H,
+# sla_H2E, sla_PRECL, sla_TPRD. Version number changed to 1.3-4.
+# Missing dependencies on source archive added.
+# 19-OCT-1994 (PTW):
+# New routines added: sla_ALTAZ, sla_PDA2H, sla_PDQ2H. Package
+# version number changed to 1.4-1. Library version number
+# changed to 1.4.
+# 26-OCT-1994 (PTW):
+# Package version number changed to 1.4-2.
+# 15-DEC-1994 (PTW):
+# New routines added: sla_PLANET, sla_RDPLAN, sla_DMOON, sla_DT,
+# sla_CLYD. Package version number changed to 1.4-4.
+# 3-JAN-1995 (PTW):
+# Package version number changed to 1.4-5.
+# 13-FEB-1995 (PTW):
+# New routines added: sla_DTP2V, sla_DTPXYZ, sla_DV2TP, sla_TP2V,
+# sla_TPXYZ, sla_V2TP. Package version number changed to 1.4-6.
+# 20-FEB-1995 (PTW):
+# Package version number changed to 1.4-7 (sla_OBS enhanced).
+# 23-MAR-1995 (PTW):
+# Unnecessary creation of INSTALL_INC removed.
+# 05-JUN-1995 (PTW):
+# Four routines replaced: sla_DTPRD, sla_DTPXYZ, sla_TPRD and
+# sla_TPXYZ become sla_DTPS2C, sla_DTPXYZ, sla_TPS2C and sla_TPV2C.
+# Package version number changed to 1.5-1. Library version
+# number changed to 1.5.
+# 06-JUN-1995 (BLY/AJC):
+# Updated to match Mk IVa makefile standard.
+# 02-JUL-1995 (PTW):
+# Package version number changed to 1.5-2.
+# 21-JUL-1995 (PTW):
+# Package version number changed to 1.5-3.
+# 14-SEP-1995 (PTW):
+# New routine added: sla_GMSTA.
+# Package version number changed to 1.6-1.
+# 04-OCT-1995 (PTW):
+# New routine added: sla_ATMDSP.
+# Package version number changed to 1.6-2.
+# 14-NOV-1995 (PTW):
+# Bug fix: sla_DAT.
+# Package version number changed to 1.6-3.
+# 21-FEB-1996 (PTW):
+# New routine: sla_POLMO.
+# Bug fix: sla_DC62S, sla_CC62S.
+# Comment corrections: sla_DH2E, sla_H2E.
+# New, html-compatible, document: SUN/67.34.
+# Package version number changed to 1.6-4.
+# 04-MAR-1996 (BLY):
+# Update makefile to Mk V specification.
+# Add special HLINK macro definitions.
+# No change to version number.
+# 24-APR-1996 (BLY):
+# Integrate ix86_Linux version.
+# Update version to v1.7-0.
+# 10-MAY-1996 (BLY):
+# Update version to v1.7-1. No changes to Fortran version.
+# 18-JUL-1996 (PTW):
+# Comment corrections: sla_DS2TP, sla_DV2TP, sla_S2TP, sla_V2TP
+# New, html-compatible, document: SUN/67.34.
+# Package version number changed to 1.7-2.
+# 26-NOV-1996 (PTW):
+# Minor corrections to sla_DV2TP and sla_V2TP. In sla_OBS,
+# revision of Parkes position and addition of ATNF Mopra.
+# Package version number changed to 1.7-3.
+# 28-MAY-1997 (PTW):
+# New routines: sla_PLANEL, sla_PLANTE.
+# Functionally enhanced: sla_PLANET, sla_RDPLAN.
+# Minor code improvements: several.
+# Comment corrections: numerous.
+# Revised document: SUN/67.36.
+# Package version number changed to 2.0-1.
+# 6-JAN-1998 (PTW):
+# Functionally enhanced: sla_DAT.
+# Revised document: SUN/67.38.
+# Package version number changed to 2.0-3.
+# 15-APR-1998 (PTW):
+# Code improvements: sla_GMSTA.
+# Revised document: SUN/67.40.
+# Package version number changed to 2.0-4.
+# 28-MAY-1998 (PTW):
+# Code improvements: sla_PLANEL.
+# New routine: sla_PV2EL
+# Revised document: SUN/67.41.
+# Package version number changed to 2.1-0.
+# 14-JUL-1998 (PTW):
+# Makefile updated - sla_PAV had been omitted.
+# 18-JUL-1998 (PTW):
+# 1999 January 1 leap second added to sla_DAT.
+# Package version number changed to 2.1-1.
+# 11-AUG-1998 (PTW):
+# Makefile updated - sla_DPAV had been omitted (!).
+# 30-SEP-1998 (PTW):
+# New routines: sla_FK52H, sla_H2FK5, sla_FK5HZ and sla_HFK5Z.
+# Revised document: SUN/67.43.
+# Package version number changed to 2.2-0.
+# 19-MAR-1999 (PTW):
+# New routines: sla_EL2UE, sla_PERTEL, sla_PERTUE,
+# sla_PV2UE, sla_UE2EL and sla_UE2PV
+# Revised document: SUN/67.44.
+# Package version number changed to 2.3-0.
+# 2-AUG-1999 (PTW):
+# New routines: sla_COMBN and sla_PERMUT
+# Revised document: SUN/67.45.
+# Package version number changed to 2.4-0.
+# 29-OCT-1999 (PTW):
+# The F_ROUTINES definition lacked entries for sla_EL2UE,
+# sla_PERTEL, sla_PERTUE, sla_PV2UE, sla_UE2EL, sla_UE2PV,
+# sla_COMBN and sla_PERMUT.
+# {enter_further_changes_here}
+#
+# Bugs:
+# {note_any_bugs_here}
+#
+#-------------------------------------------------------------------------------
+
+# Help target.
+# ===========
+#
+# This is the default target, so it appears first.
+
+# Display information about the mk script and the make targets.
+
+help:
+ @ echo \
+ ' The makefile provided is intended to be used by the make utility when';\
+ echo \
+ ' invoked via the associated mk script. This script defines environment';\
+ echo \
+ ' variables which are used by make to accommodate differing machine and';\
+ echo \
+ ' operating system characteristics. Please see the mk script prologue';\
+ echo \
+ ' for full details.';\
+ echo;\
+ echo \
+ ' The following targets are provided:';\
+ echo;\
+ echo \
+ ' help - Display this message';\
+ echo \
+ ' check - Check source file presence and show current state';\
+ echo \
+ ' build - Build the package from source';\
+ echo \
+ ' install - Install the built package for use';\
+ echo \
+ ' deinstall - Deinstall the package';\
+ echo \
+ ' test - Perform a quick test of the installation';\
+ echo \
+ ' export - Make a compressed tar file for exporting the'\
+ 'built package';\
+ echo \
+ ' complete with source and documentation';\
+ echo \
+ ' export_run - Make a compressed tar file for exporting the'\
+ 'built package';\
+ echo \
+ ' with documentation but no source';\
+ echo \
+ ' export_source - Make a compressed tar file for exporting the'\
+ 'source files';\
+ echo \
+ ' clean - Tidy up after building the package';\
+ echo \
+ ' unbuild - Remove all the built files';\
+ echo;\
+ echo \
+ ' To build and install the $(PACK_NAME) package on a supported system:';\
+ echo;\
+ echo \
+ ' mk build; mk install; mk test; mk clean';\
+ echo
+
+#-------------------------------------------------------------------------------
+
+# Defaults.
+# ========
+#
+# This section defines default macros and should rarely need changing.
+# The values given here should be overridden externally to adapt to
+# the local system setup (either use the mk script or use environment
+# variables and invoke "make" with the "-e" option).
+
+# Name of computer hardware/OS combination.
+
+SYSTEM = unknown
+
+# Name used to distinguish platform-specific source files.
+
+SOURCE_VARIANT = $(SYSTEM)
+
+# Pathname of the root directory beneath which other Starlink software
+# is currently installed.
+
+STARLINK = /star
+
+# Pathnames of Starlink sub-directories that may be referenced when
+# building this package.
+
+STAR_BIN = $(STARLINK)/bin
+STAR_DATES = $(STARLINK)/dates
+STAR_DOCS = $(STARLINK)/docs
+STAR_ETC = $(STARLINK)/etc
+STAR_HELP = $(STARLINK)/help
+STAR_INC = $(STARLINK)/include
+STAR_LIB = $(STARLINK)/lib
+
+# Pathname of the root directory beneath which the built files for
+# this package should be installed for use. This defaults to the
+# user's home directory.
+
+INSTALL = $(HOME)
+
+# Pathname of the directory into which exported tar files will be
+# placed. This defaults to the current working directory.
+
+EXPORT = .
+
+# Default macros for compiling C and Fortran source code.
+
+CC = c89
+CFLAGS = -O
+FC = fort77
+FFLAGS = -O
+
+# Command for forming a link to a file.
+
+LINK = ln
+
+# Command for "randomizing" an object library. The default acts as a
+# null command.
+
+RANLIB = :
+
+# Commands for adding to and extracting from an archive file (.tar).
+
+TAR_IN = pax -w -v -x ustar -f
+TAR_OUT = pax -r -f
+
+# Command for adding a file to an object archive (.a).
+
+AR_IN = ar -r
+
+# Default file type extension for a shareable library and command for
+# building a shareable library (the default acts as a null command).
+
+SHARE = .so
+BLD_SHR = :
+
+# Default command for linking hypertext document to others, including those
+# on the RAL document server.
+
+HLINK = :
+
+#-------------------------------------------------------------------------------
+################################################################################
+#
+# Define package source files.
+# ===========================
+#
+# This section defines the set of source files for the package.
+
+# Name of the package as specified in documentation
+# The value is used in messages from make to the user.
+
+PACK_NAME = SLALIB
+
+# Prefix for the package in lower-case as used in filenames etc.
+PKG_NAME = sla
+
+# Prefix for the package in upper-case as used in include file links.
+PKG_LINK = SLA
+
+# Version number (as in the documentation - i.e. not the same thing
+# as the shared library version number).
+#
+# The major component of the version number (before the dot) should
+# normally only be incremented following major changes to the package.
+# The minor version number (after the dot) is the number normally
+# incremented following development which introduces new documented
+# functionality. Any revision number (appended after a dash) should
+# be incremented for other minor changes (bug fixes, etc.) which do
+# not merit documentation changes.
+
+PKG_VERS = 2.4-0
+
+# Library version number.
+#
+# n.b. Care needed - may affect existing applications.
+#
+# The minor component of this number (following the dot) should be
+# incremented whenever a new routine is added to a library or some
+# other change is made such that programs built with the latest
+# version would fail to run using an earlier version. The major number
+# should be incremented if a change is made such that existing
+# programs would have to be re-built in order to work with the new
+# version.
+
+LIB_VERS = 1.6
+
+# List of files comprising the distributed source-only system. This
+# defines the minimum set of files required to rebuild completely the
+# package from source (including this makefile, the associated mk
+# script and any documentation files).
+
+SOURCE_FILES = $(PKG_NAME)_source.tar makefile mk $(DOCUMENTATION)
+
+# List of public script files. These are scripts which form part of
+# the package and will be required by users of it. They will be
+# installed in the $(INSTALL_BIN) directory with execute permission
+# set.
+
+PUBLIC_SCRIPTS = $(PKG_NAME)_link $(PKG_NAME)_link_adam
+
+# Startup script. This is the file that must be executed by a
+# programmer using this package in order to define links to include
+# files. It is listed separately from the public scripts as it is
+# edited by the installation procedure.
+
+STARTUP_SCRIPT =
+
+# List of public include files. These are include files which form
+# part of the package and may be required by users of it. They will be
+# installed in the $(INSTALL_INC) directory.
+
+PUBLIC_INCLUDES =
+
+# List of private include files. These are additional include files
+# which form part of the package and are required in order to build
+# it, but which are not required by users of it.
+
+PRIVATE_INCLUDES =
+
+# List of external include files. These are files which are required
+# in order to build the package but form part of other, externally
+# installed packages. This list should contain the names used to
+# reference the files within the source code, not the actual names of
+# the files.
+
+EXTERNAL_INCLUDES =
+
+# List of Fortran routines required for building the package. This is
+# just a list of all the Fortran source files (excluding BLOCK DATA
+# routines, which are treated separately).
+
+F_ROUTINES = \
+ addet.f \
+ afin.f \
+ airmas.f \
+ altaz.f \
+ amp.f \
+ ampqk.f \
+ aop.f \
+ aoppa.f \
+ aoppat.f \
+ aopqk.f \
+ atmdsp.f \
+ atms.f \
+ atmt.f \
+ av2m.f \
+ bear.f \
+ caf2r.f \
+ caldj.f \
+ calyd.f \
+ cc2s.f \
+ cc62s.f \
+ cd2tf.f \
+ cldj.f \
+ clyd.f \
+ combn.f \
+ cr2af.f \
+ cr2tf.f \
+ cs2c.f \
+ cs2c6.f \
+ ctf2d.f \
+ ctf2r.f \
+ daf2r.f \
+ dafin.f \
+ dat.f \
+ dav2m.f \
+ dbear.f \
+ dbjin.f \
+ dc62s.f \
+ dcc2s.f \
+ dcmpf.f \
+ dcs2c.f \
+ dd2tf.f \
+ de2h.f \
+ deuler.f \
+ dfltin.f \
+ dh2e.f \
+ dimxv.f \
+ djcal.f \
+ djcl.f \
+ dm2av.f \
+ dmat.f \
+ dmoon.f \
+ dmxm.f \
+ dmxv.f \
+ dpav.f \
+ dr2af.f \
+ dr2tf.f \
+ drange.f \
+ dranrm.f \
+ ds2c6.f \
+ ds2tp.f \
+ dsep.f \
+ dt.f \
+ dtf2d.f \
+ dtf2r.f \
+ dtp2s.f \
+ dtp2v.f \
+ dtps2c.f \
+ dtpv2c.f \
+ dtt.f \
+ dv2tp.f \
+ dvdv.f \
+ dvn.f \
+ dvxv.f \
+ e2h.f \
+ earth.f \
+ ecleq.f \
+ ecmat.f \
+ ecor.f \
+ eg50.f \
+ el2ue.f \
+ epb.f \
+ epb2d.f \
+ epco.f \
+ epj.f \
+ epj2d.f \
+ eqecl.f \
+ eqeqx.f \
+ eqgal.f \
+ etrms.f \
+ euler.f \
+ evp.f \
+ fitxy.f \
+ fk425.f \
+ fk45z.f \
+ fk524.f \
+ fk52h.f \
+ fk54z.f \
+ fk5hz.f \
+ flotin.f \
+ galeq.f \
+ galsup.f \
+ ge50.f \
+ geoc.f \
+ gmst.f \
+ gmsta.f \
+ h2e.f \
+ h2fk5.f \
+ hfk5z.f \
+ idchf.f \
+ idchi.f \
+ imxv.f \
+ intin.f \
+ invf.f \
+ kbj.f \
+ m2av.f \
+ map.f \
+ mappa.f \
+ mapqk.f \
+ mapqkz.f \
+ moon.f \
+ mxm.f \
+ mxv.f \
+ nut.f \
+ nutc.f \
+ oap.f \
+ oapqk.f \
+ obs.f \
+ pa.f \
+ pav.f \
+ pcd.f \
+ pda2h.f \
+ pdq2h.f \
+ permut.f \
+ pertel.f \
+ pertue.f \
+ planel.f \
+ planet.f \
+ plante.f \
+ pm.f \
+ polmo.f \
+ prebn.f \
+ prec.f \
+ precl.f \
+ preces.f \
+ prenut.f \
+ pv2el.f \
+ pv2ue.f \
+ pvobs.f \
+ pxy.f \
+ range.f \
+ ranorm.f \
+ rcc.f \
+ rdplan.f \
+ refco.f \
+ refro.f \
+ refv.f \
+ refz.f \
+ rverot.f \
+ rvgalc.f \
+ rvlg.f \
+ rvlsrd.f \
+ rvlsrk.f \
+ s2tp.f \
+ sep.f \
+ smat.f \
+ subet.f \
+ supgal.f \
+ svd.f \
+ svdcov.f \
+ svdsol.f \
+ tp2s.f \
+ tp2v.f \
+ tps2c.f \
+ tpv2c.f \
+ ue2el.f \
+ ue2pv.f \
+ unpcd.f \
+ v2tp.f \
+ vdv.f \
+ vn.f \
+ vxv.f \
+ xy2xy.f \
+ zd.f
+
+# List of Fortran BLOCK DATA routines.
+
+BLOCK_DATA =
+
+# List of platform specific Fortran routines. The source tar file will
+# contain a version of these files for each set of platforms. The names
+# given here are the general version of the file, e.g. pkg_open.f. The
+# names in the tar file will be pkg_open.f_sun4, pkg_open.f_mips, etc.
+
+PLATFORM_F = \
+ gresid.f \
+ random.f \
+ wait.f
+
+# C routines required for building the package. This is just a list of
+# all the C source files.
+
+C_ROUTINES =
+
+# Lists of Latex and hypertext documents.
+
+LATEX_DOCS = sun67.tex
+HYPERTEXT_DOCS = sun67.htx
+
+# List of documentation files.
+
+DOCUMENTATION = $(LATEX_DOCS) $(HYPERTEXT_DOCS:.htx=.htx_tar) \
+$(PKG_NAME).news read.me
+
+################################################################################
+#-------------------------------------------------------------------------------
+
+# Define files required for building the package.
+# ==============================================
+#
+# This section defines the set of files produced from the source files
+# when the package is built and installed.
+
+# Use only .o, .c and .f suffix rules.
+
+.SUFFIXES:
+.SUFFIXES: .o .c .f
+
+# List of files which must be built from the source files before the
+# package can be installed for use. This should comprise all the files
+# that are required to use the package (but excluding the date stamp
+# file).
+
+BUILT_FILES = $(PUBLIC_SCRIPTS) $(PUBLIC_INCLUDES) $(OBJECT_LIBRARIES) \
+$(SHAREABLE_LIBRARIES) $(STARTUP_SCRIPT)
+
+# List of links used to access include files during compilation. This
+# should comprise all the external include files and any other include
+# files whose names do not exactly match the names used in the source
+# code.
+
+INCLUDE_LINKS = $(EXTERNAL_INCLUDES)
+
+# Rules to set up links to locate each of the above include files.
+
+# Rules for extracting source files from the source archive.
+
+$(PUBLIC_SCRIPTS) $(PUBLIC_INCLUDES) $(F_ROUTINES) \
+$(BLOCK_DATA) $(C_ROUTINES) $(STARTUP_SCRIPT):
+ $(TAR_OUT) $(PKG_NAME)_source.tar $@
+ @ if test -f $@; then :;\
+ else echo $@ is not in the tar file; exit 1; fi
+
+# Rules for extracting platform specific source files from the source
+# archive.
+
+# It is quite likely that there are no platform-specific source files
+# and that the macro PLATFORM_F is empty. To prevent a syntax error in
+# make, a dummy target is present.
+
+$(PLATFORM_F) dummy_target1:
+ $(TAR_OUT) $(PKG_NAME)_source.tar $@_$(SOURCE_VARIANT)
+ @ if test -f $@_$(SOURCE_VARIANT); then :;\
+ else echo $@_$(SOURCE_VARIANT) is not in the tar file; exit 1; fi
+ mv $@_$(SOURCE_VARIANT) $@
+
+# List of object files produced by compiling the source code and rules
+# for performing the compilations.
+
+OBJECT_FILES = $(BLOCK_DATA:.f=.o) $(F_ROUTINES:.f=.o) \
+ $(PLATFORM_F:.f=.o) $(C_ROUTINES:.c=.o)
+
+.c.o:
+ $(CC) $(CFLAGS) -c $<
+.f.o:
+ $(FC) $(FFLAGS) -c $<
+
+# List of object library files to be built and rules for building
+# them.
+
+OBJECT_LIBRARIES = lib$(PKG_NAME).a
+
+lib$(PKG_NAME).a: $(OBJECT_FILES)
+ $(AR_IN) $@ $?
+ $(RANLIB) $@
+
+# List of shareable library files to be built and rules for building
+# them. The third argument to $(BLD_SHR) should provide the information
+# necessary to link any libraries called by this package.
+
+SHAREABLE_LIBRARIES = lib$(PKG_NAME)$(SHARE)
+
+lib$(PKG_NAME)$(SHARE): $(OBJECT_FILES)
+ touch $@
+ $(BLD_SHR) $@ '$(OBJECT_FILES)'
+
+# Name of the date stamp file. This is used to record the time of the
+# most recent build for use in subsequent operations that require it.
+# There must be no rule for generating this file; it is updated only
+# as a side effect of building the package.
+
+DATE_STAMP = $(PKG_NAME)_datestamp
+
+# Pathnames of directories into which files may be placed when the
+# package is installed.
+
+INSTALL_BIN = $(INSTALL)/bin
+INSTALL_DATES = $(INSTALL)/dates
+INSTALL_DOCS = $(INSTALL)/docs
+INSTALL_ETC = $(INSTALL)/etc
+INSTALL_HELP = $(INSTALL)/help
+INSTALL_INC = $(INSTALL)/include
+INSTALL_LIB = $(INSTALL)/lib
+INSTALL_SHARE = $(INSTALL)/share
+
+# List of directories actually used for installation (selected from
+# those above) and rules to create them.
+
+INSTALL_DIRS = $(INSTALL_BIN) $(INSTALL_DATES) $(INSTALL_DOCS) $(INSTALL_LIB) \
+$(INSTALL_SHARE)
+
+$(INSTALL_DIRS):
+ mkdir -p $@
+
+#-------------------------------------------------------------------------------
+
+# Primary targets.
+# ===============
+#
+# These are the targets intended for normal external use (apart from
+# help, which appears at the start of the file).
+
+# check: Check source file presence and show current state.
+# --------------------------------------------------------
+
+check:
+ @ echo
+ @ echo \
+ '*** This is $(PACK_NAME) version V$(PKG_VERS) on system $(SYSTEM)'
+ @ echo
+ @ nosource='';\
+ for f in $(SOURCE_FILES); do \
+ if test ! -f $$f; then \
+ nosource='1';\
+ break;\
+ else :; fi;\
+ done;\
+ if test -n "$$nosource"; then \
+ echo ' Source files are NOT present';\
+ else \
+ echo ' All essential source files are present';\
+ fi
+ @ echo
+#
+# Display the current state.
+ @ if test -f .BUILT;\
+ then echo ' The package is currently: built for system'\
+ `cat .BUILT`;\
+ else echo ' The package is currently: not built';fi
+ @ if test -f .INSTALLED_$(SYSTEM);\
+ then echo ' installed in'\
+ `cat .INSTALLED_$(SYSTEM)`;\
+ else echo ' not installed';fi
+ @ if test -f .TESTED_$(SYSTEM);\
+ then echo ' tested';\
+ else echo ' not tested';fi
+ @ echo
+ @ if test -f .BUILT;\
+ then if test "$(SYSTEM)" != "`cat .BUILT`";\
+ then echo '*** WARNING ***';\
+ echo \
+' The package is built for a system other than the current one';\
+ echo ;\
+ else :;fi;\
+ else :;fi
+
+# build: Build the system.
+# -----------------------
+#
+# Compile the source and build the required files in the source
+# directory.
+
+# The build target first checks that the package is not installed. If
+# not, it then causes the .BUILT target to be made which ensures that
+# the package has been built.
+
+build:
+ @ if test -f .INSTALLED_$(SYSTEM); then \
+ echo;\
+ echo \
+ '*** The $(PACK_NAME) package is currently installed -- please use the';\
+ echo ' "deinstall" target before re-building it';\
+ echo;\
+ elif $(MAKE) .BUILT; then \
+ echo;\
+ echo '*** The $(PACK_NAME) package has been built';\
+ echo;\
+ else \
+ echo;\
+ echo '*** "make" failed building the $(PACK_NAME) package';\
+ echo;\
+ exit 1;\
+ fi
+
+# The .BUILT target records the time of the most recent build which
+# modified any of the built files. It depends on all the built files
+# being up to date (which causes them to be built).
+
+.BUILT: $(BUILT_FILES)
+#
+# Enter information about the current machine and build environment
+# into the date stamp file.
+ @ echo 'Package : $(PACK_NAME)' >$(DATE_STAMP)
+ @ echo 'Version : V$(PKG_VERS)' >>$(DATE_STAMP)
+ @ echo 'Library : V$(LIB_VERS)' >>$(DATE_STAMP)
+ @ echo '' >>$(DATE_STAMP)
+ @ echo "Built by: $(USER) on node `uname -n`" \
+ >>$(DATE_STAMP)
+ @ echo "On : `date`" >>$(DATE_STAMP)
+ @ echo '' >>$(DATE_STAMP)
+ @ echo \
+ "Machine : `uname -m` running `uname -s` `uname -v` (release `uname -r`)" \
+ >>$(DATE_STAMP)
+ @ echo '' >>$(DATE_STAMP)
+ @ echo 'make macros:' >>$(DATE_STAMP)
+ @ echo '' >>$(DATE_STAMP)
+ @ echo ' SYSTEM : $(SYSTEM)' >>$(DATE_STAMP)
+ @ echo '' >>$(DATE_STAMP)
+ @ echo ' EXPORT : $(EXPORT)' >>$(DATE_STAMP)
+ @ echo ' INSTALL : $(INSTALL)' >>$(DATE_STAMP)
+ @ echo ' STARLINK: $(STARLINK)' >>$(DATE_STAMP)
+ @ echo '' >>$(DATE_STAMP)
+ @ echo ' AR_IN : $(AR_IN)' >>$(DATE_STAMP)
+ @ echo ' BLD_SHR : $(BLD_SHR)' >>$(DATE_STAMP)
+ @ echo ' CC : $(CC)' >>$(DATE_STAMP)
+ @ echo ' CFLAGS : $(CFLAGS)' >>$(DATE_STAMP)
+ @ echo ' FC : $(FC)' >>$(DATE_STAMP)
+ @ echo ' FFLAGS : $(FFLAGS)' >>$(DATE_STAMP)
+ @ echo ' LINK : $(LINK)' >>$(DATE_STAMP)
+ @ echo ' RANLIB : $(RANLIB)' >>$(DATE_STAMP)
+ @ echo ' SHARE : $(SHARE)' >>$(DATE_STAMP)
+ @ echo ' SOURCE_VARIANT: $(SOURCE_VARIANT)' \
+ >>$(DATE_STAMP)
+ @ echo ' TAR_IN : $(TAR_IN)' >>$(DATE_STAMP)
+ @ echo ' TAR_OUT : $(TAR_OUT)' >>$(DATE_STAMP)
+ @ echo '' >>$(DATE_STAMP)
+#
+# Record completion of the build.
+ @ echo '$(SYSTEM)' > .BUILT
+
+# install: Install the package for use.
+# ------------------------------------
+#
+# Copy the built files to their installation directories, from where
+# they may be accessed.
+
+# The install target first checks if any part of the package is
+# already installed. If not, it checks that the system is built for this
+# SYSTEM and, if it is, causes the .INSTALLED_$(SYSTEM) target to be made
+# which performs the installation.
+
+install:
+ @ if test -f .INSTALLED_$(SYSTEM); then \
+ echo;\
+ echo \
+ '*** The $(PACK_NAME) package has already been installed -- please use the';\
+ echo \
+ ' "deinstall" target first if you wish to reinstall it';\
+ echo;\
+ elif test -f .BUILT; then \
+ if test "`cat .BUILT`" = "$(SYSTEM)"; then \
+ if $(MAKE) .INSTALLED_$(SYSTEM); then \
+ echo;\
+ echo \
+ '*** The $(PACK_NAME) package has been installed in directory $(INSTALL)';\
+ echo;\
+ else \
+ echo;\
+ echo \
+ '*** "make" failed installing the $(PACK_NAME) package in directory $(INSTALL)';\
+ echo;\
+ exit 1;\
+ fi;\
+ else \
+ echo;\
+ echo \
+ "*** The $(PACK_NAME) package is built for system `cat .BUILT` -"\
+ 'so cannot be installed on system $(SYSTEM)';\
+ echo;\
+ exit 1;\
+ fi;\
+ else \
+ echo;\
+ echo \
+ '*** The $(PACK_NAME) package is not built, so cannot be installed';\
+ echo;\
+ exit 1;\
+ fi
+
+# The .INSTALLED_$(SYSTEM) target copies each file from the source
+# directory using "cp -p" to preserve its date, and replaces each
+# original file by a link to the installed copy.
+
+.INSTALLED_$(SYSTEM): $(INSTALL_DIRS)
+#
+# Create .INSTALLED_$(SYSTEM), containing $INSTALL, to record that the
+# package is installed (at least in part).
+ @ echo $(INSTALL) > .INSTALLED_$(SYSTEM)
+#
+# Install the public scripts, giving them world execute permission.
+ for f in $(PUBLIC_SCRIPTS) ""; do \
+ if test -n "$$f"; then \
+ cp -p $$f $(INSTALL_BIN);\
+ chmod 755 $(INSTALL_BIN)/$$f;\
+ rm -f $$f;\
+ $(LINK) $(INSTALL_BIN)/$$f $$f;\
+ else :; fi;\
+ done
+#
+# Install the public include files, giving them world read permission.
+ for f in $(PUBLIC_INCLUDES) ""; do \
+ if test -n "$$f"; then \
+ cp -p $$f $(INSTALL_INC);\
+ chmod 644 $(INSTALL_INC)/$$f;\
+ rm -f $$f;\
+ $(LINK) $(INSTALL_INC)/$$f $$f;\
+ else :; fi;\
+ done
+#
+# Install the object libraries, giving them world read permission.
+ for f in $(OBJECT_LIBRARIES) ""; do \
+ if test -n "$$f"; then \
+ cp -p $$f $(INSTALL_LIB);\
+ chmod 644 $(INSTALL_LIB)/$$f;\
+ rm -f $$f;\
+ $(LINK) $(INSTALL_LIB)/$$f $$f;\
+ else :; fi;\
+ done
+#
+# Install shareable libraries, giving them read permission (unless
+# they are dummy, zero size, files in which case they are left in
+# place).
+ for f in $(SHAREABLE_LIBRARIES) ""; do \
+ if test -n "$$f" -a -s "$$f"; then \
+ cp -p $$f $(INSTALL_SHARE);\
+ chmod 755 $(INSTALL_SHARE)/$$f;\
+ rm -f $$f;\
+ $(LINK) $(INSTALL_SHARE)/$$f $$f;\
+ else :; fi;\
+ done
+#
+# Install the package startup script. The name of the directory
+# containing the installed public include files must be edited into
+# this, and execute permission given. Leave the original file in
+# place.
+ if test -n "$(STARTUP_SCRIPT)"; then \
+ sed -e 's#LINK#$(LINK)#' -e s#INSTALL_INC#$(INSTALL_INC)# \
+ $(STARTUP_SCRIPT) >$(INSTALL_BIN)/$(STARTUP_SCRIPT) ;\
+ chmod 755 $(INSTALL_BIN)/$(STARTUP_SCRIPT) ;\
+ else :; fi
+#
+# Install the Latex documentation, giving it world read permission,
+# leaving the source copy in place.
+ for f in $(LATEX_DOCS) ""; do \
+ if test -n "$$f"; then \
+ cp -p $$f $(INSTALL_DOCS);\
+ chmod 644 $(INSTALL_DOCS)/$$f;\
+ else :; fi;\
+ done
+#
+# Install any hypertext documents, giving world read access to all the files
+# they contain and linking with other documents.
+ if test -n "$(HYPERTEXT_DOCS)"; then \
+ pwd=`pwd`;\
+ (cd $(INSTALL_DOCS);\
+ for f in $(HYPERTEXT_DOCS) ""; do \
+ if test -n "$$f"; then\
+ $(TAR_OUT) $$pwd/$${f}_tar;\
+ chmod 755 `find $$f -type d -print`;\
+ chmod 644 `find $$f ! -type d -print`;\
+ touch $$f;\
+ else :; fi;\
+ done);\
+ HTX_PATH='$(STAR_DOCS):$(STAR_HELP)';\
+ export HTX_PATH;\
+ $(HLINK) $(INSTALL_DOCS) $(INSTALL_HELP);\
+ fi;
+#
+# Install the date stamp file and make it read-only to prevent its
+# date being changed.
+ cp -p $(DATE_STAMP) $(INSTALL_DATES)
+ chmod 444 $(INSTALL_DATES)/$(DATE_STAMP)
+ chmod 644 $(DATE_STAMP)
+ rm $(DATE_STAMP)
+ $(LINK) $(INSTALL_DATES)/$(DATE_STAMP) $(DATE_STAMP)
+
+# deinstall: Deinstall the package.
+# --------------------------------
+#
+# Reverse the action of the install target, removing the installed
+# files and returning them to the source directory.
+
+# The deinstall target checks that the package is installed in the INSTALL
+# directory. If so, it causes the do_deinstall target to be made which
+# performs the deinstallation.
+
+deinstall:
+ @ if test ! -f .INSTALLED_$(SYSTEM); then \
+ echo;\
+ echo '*** The $(PACK_NAME) package is not currently installed';\
+ echo;\
+ else \
+ if test "`cat .INSTALLED_$(SYSTEM)`" = "$(INSTALL)"; then \
+ if $(MAKE) do_deinstall; then \
+ echo;\
+ echo \
+'*** The $(PACK_NAME) package has been deinstalled from directory $(INSTALL)';\
+ echo;\
+ else \
+ echo;\
+ echo \
+'*** "make" failed deinstalling the $(PACK_NAME) package from directory $(INSTALL)';\
+ echo;\
+ exit 1;\
+ fi;\
+ else \
+ echo;\
+ echo \
+"*** The $(PACK_NAME) package is installed in `cat .INSTALLED_$(SYSTEM)`";\
+ echo \
+"*** and not in your INSTALL directory ($(INSTALL))";\
+ echo '*** Not deinstalled';\
+ exit 1;\
+ fi;\
+ fi
+
+# The do_deinstall target (which should never exist) checks that an
+# installed version of each file exists (in case an install failed
+# part of the way through) and returns it to the source directory,
+# using "cp -p" to preserve file dates. Links are removed from the
+# source directory before copying.
+
+do_deinstall:
+#
+# Note the package will need to be tested again.
+ @- if test -f .TESTED_$(SYSTEM); then rm -f .TESTED_$(SYSTEM); else :; fi
+#
+# Deinstall the public script files, if installed versions exist.
+ - for f in $(PUBLIC_SCRIPTS) ""; do \
+ if test -n "$$f" -a -f $(INSTALL_BIN)/$$f; then \
+ rm -f $$f;\
+ cp -p $(INSTALL_BIN)/$$f .;\
+ rm -f $(INSTALL_BIN)/$$f;\
+ else :; fi;\
+ done
+#
+# Deinstall the public include files, if installed versions exist.
+ - for f in $(PUBLIC_INCLUDES) ""; do \
+ if test -n "$$f" -a -f $(INSTALL_INC)/$$f; then \
+ rm -f $$f;\
+ cp -p $(INSTALL_INC)/$$f .;\
+ rm -f $(INSTALL_INC)/$$f;\
+ else :; fi;\
+ done
+#
+# Deinstall the object libraries, if installed versions exist.
+ - for f in $(OBJECT_LIBRARIES) ""; do \
+ if test -n "$$f" -a -f $(INSTALL_LIB)/$$f; then \
+ rm -f $$f;\
+ cp -p $(INSTALL_LIB)/$$f .;\
+ rm -f $(INSTALL_LIB)/$$f;\
+ else :; fi;\
+ done
+#
+# Deinstall the shareable libraries, if installed versions exist.
+ - for f in $(SHAREABLE_LIBRARIES) ""; do \
+ if test -n "$$f" -a -f $(INSTALL_SHARE)/$$f; then \
+ rm -f $$f;\
+ cp -p $(INSTALL_SHARE)/$$f .;\
+ rm -f $(INSTALL_SHARE)/$$f;\
+ else :; fi;\
+ done
+#
+# Deinstall the package startup file. Since it will have been edited
+# during installation, we remove the installed copy, if present, and
+# then ensure that the original exists.
+ - if test -n "$(STARTUP_SCRIPT)"; then \
+ if test -f $(INSTALL_BIN)/$(STARTUP_SCRIPT); then\
+ rm -f $(INSTALL_BIN)/$(STARTUP_SCRIPT);\
+ else :; fi ;\
+ $(MAKE) $(STARTUP_SCRIPT);\
+ else :; fi
+#
+# Deinstall the Latex documentation, if installed versions exist.
+ - for f in $(LATEX_DOCS) ""; do \
+ if test -n "$$f" -a -f $(INSTALL_DOCS)/$$f; then \
+ rm -f $(INSTALL_DOCS)/$$f;\
+ else :; fi;\
+ done
+#
+# Deinstall any hypertext documents, and relink the hypertext if required.
+ - if test -n "$(HYPERTEXT_DOCS)"; then \
+ for f in $(HYPERTEXT_DOCS) ""; do \
+ if test -n "$$f" -a -d $(INSTALL_DOCS)/$$f; then \
+ rm -f -r $(INSTALL_DOCS)/$$f;\
+ else :; fi;\
+ done;\
+ HTX_PATH='$(STAR_DOCS):$(STAR_HELP)';\
+ export HTX_PATH;\
+ $(HLINK) $(INSTALL_DOCS) $(INSTALL_HELP);\
+ fi
+#
+# Deinstall the date stamp file after setting its protection so it may
+# be removed.
+ - if test -f $(INSTALL_DATES)/$(DATE_STAMP); then \
+ chmod 644 $(DATE_STAMP); rm $(DATE_STAMP);\
+ chmod 644 $(INSTALL_DATES)/$(DATE_STAMP);\
+ cp -p $(INSTALL_DATES)/$(DATE_STAMP) .;\
+ rm $(INSTALL_DATES)/$(DATE_STAMP);\
+ else :; fi
+#
+# Note the system is no longer installed. Re-create .BUILT, since we have
+# returned the built files to the source directory but an unbuild may have
+# been done.
+ @- rm -f .INSTALLED_$(SYSTEM) 1>/dev/null 2>/dev/null
+ @ echo '$(SYSTEM)' > .BUILT
+
+# test: Perform an installation test.
+# ----------------------------------
+#
+# Check that installed files are in their correct places and that a
+# simple test program will run correctly.
+
+# The test target checks that the package is currently installed. If
+# so, it causes the do_test target to be made, which performs the
+# installation test.
+
+test:
+ @ if test ! -f .INSTALLED_$(SYSTEM); then \
+ echo;\
+ echo '*** The $(PACK_NAME) package is not currently installed';\
+ echo;\
+ elif $(MAKE) do_test; then\
+ echo;\
+ echo \
+ '*** Installation test for the $(PACK_NAME) package has been run';\
+ echo;\
+ else \
+ echo;\
+ echo \
+ '*** Installation test for the $(PACK_NAME) package failed';\
+ echo;\
+ exit 1;\
+ fi
+
+# The do_test target performs the installation test. A file named do_test
+# should never exist.
+
+do_test: $(EXTERNAL_INCLUDES)
+#
+# Note the test has not yet succeeded.
+ @- if test -f .TESTED_$(SYSTEM); then rm -f .TESTED_$(SYSTEM); else :; fi
+#
+# Extract the test program from the archive and set up new links for
+# the include files which point at the installed versions. Remove any
+# pre-existing links first if necessary.
+ $(TAR_OUT) $(PKG_NAME)_source.tar $(PKG_NAME)_test.f
+ @ if test -f $(PKG_NAME)_test.f; then :;\
+ else echo $(PKG_NAME)_test.f is not in the tar file; exit 1; fi
+#
+# Build the test program, ensuring that the installed version of the library
+# and link files are used.
+ $(FC) $(FFLAGS) $(PKG_NAME)_test.f -L$(INSTALL_LIB) -L$(STAR_LIB) \
+ `$(INSTALL_BIN)/$(PKG_NAME)_link` -o $(PKG_NAME)_test
+#
+# Remove the test program source and the include file links used to
+# build it.
+ rm -f $(PKG_NAME)_test.f $(EXTERNAL_INCLUDES)
+#
+# Execute the test program and remove the binary file when done. Note
+# that any external mechanism for locating shareable libraries (e.g. a
+# search path) must previously have been set up.
+ ./$(PKG_NAME)_test
+ rm -f $(PKG_NAME)_test
+#
+# Note the test has been run.
+ @ touch .TESTED_$(SYSTEM)
+
+# export: Export the installed system.
+# -----------------------------------
+#
+# Export the source plus all the built files to a new user.
+
+# The export target depends on the resulting compressed tar file being
+# up to date.
+
+export: $(EXPORT)/$(PKG_NAME)_$(SYSTEM).tar.Z
+ @ echo
+ @ echo \
+'*** Export copy of the built $(PACK_NAME) package is in the compressed'
+ @ echo \
+' tar file $(EXPORT)/$(PKG_NAME)_$(SYSTEM).tar.Z'
+ @ echo
+
+# The compressed tar file is up to date if it exists and is more
+# recent than all the source files and the date stamp file (which
+# records the time of the last build which modified any files).
+
+$(EXPORT)/$(PKG_NAME)_$(SYSTEM).tar.Z: $(SOURCE_FILES) $(DATE_STAMP)
+#
+# Issue a warning if the package has not been tested.
+ @ if test ! -f .TESTED_$(SYSTEM); then \
+ echo;\
+ echo '*** Warning: the $(PACK_NAME) package has not been tested';\
+ echo;\
+ else :; fi
+#
+# Remove any pre-existing tar files before creating new ones.
+ if test -f $(EXPORT)/$(PKG_NAME)_$(SYSTEM).tar.Z; then \
+ rm -f $(EXPORT)/$(PKG_NAME)_$(SYSTEM).tar.Z; else :; fi
+ $(TAR_IN) - $(SOURCE_FILES) $(BUILT_FILES) $(DATE_STAMP) .BUILT \
+ | compress -v > $(EXPORT)/$(PKG_NAME)_$(SYSTEM).tar.Z
+
+# export_run: Export the built system (without source).
+# -----------------------------------------------------
+#
+# Export all the built files to a new user.
+
+# The export_run target depends on the resulting compressed tar file being
+# up to date.
+
+export_run: $(EXPORT)/$(PKG_NAME)_$(SYSTEM)_run.tar.Z
+ @ echo
+ @ echo \
+'*** Export copy of the "runtime" $(PACK_NAME) package is in the compressed'
+ @ echo \
+' tar file $(EXPORT)/$(PKG_NAME)_$(SYSTEM)_run.tar.Z'
+ @ echo
+
+# The compressed tar file is up to date if it exists and is more
+# recent than all the source files and the date stamp file (which
+# records the time of the last build which modified any files).
+
+$(EXPORT)/$(PKG_NAME)_$(SYSTEM)_run.tar.Z: $(SOURCE_FILES) $(DATE_STAMP)
+#
+# Issue a warning if the package has not been tested.
+ @ if test ! -f .TESTED_$(SYSTEM); then \
+ echo;\
+ echo '*** Warning: the $(PACK_NAME) package has not been tested';\
+ echo;\
+ else :; fi
+#
+# Remove any pre-existing tar files before creating new ones.
+ if test -f $(EXPORT)/$(PKG_NAME)_$(SYSTEM)_run.tar.Z; then \
+ rm -f $(EXPORT)/$(PKG_NAME)_$(SYSTEM)_run.tar.Z; else :; fi
+ $(TAR_IN) - mk makefile $(DOCUMENTATION) $(BUILT_FILES) \
+ $(DATE_STAMP) .BUILT \
+ | compress -v > $(EXPORT)/$(PKG_NAME)_$(SYSTEM)_run.tar.Z
+
+# export_source: Export the source.
+# --------------------------------
+#
+# Export the source files only to a new user.
+
+# This target depends on the resulting compressed tar file being up to
+# date.
+
+export_source: $(EXPORT)/$(PKG_NAME).tar.Z
+ @ echo
+ @ echo \
+'*** Export copy of the $(PACK_NAME) package source is in the compressed'
+ @ echo \
+' tar file $(EXPORT)/$(PKG_NAME).tar.Z'
+ @ echo
+
+# The compressed tar file is up to date if it exists and is more
+# recent than all the source files.
+
+$(EXPORT)/$(PKG_NAME).tar.Z: $(SOURCE_FILES)
+#
+# Remove any pre-existing tar files before creating new ones.
+ if test -f $(EXPORT)/$(PKG_NAME).tar.Z; then \
+ rm -f $(EXPORT)/$(PKG_NAME).tar.Z; else :; fi
+ $(TAR_IN) - $(SOURCE_FILES) \
+ | compress -v > $(EXPORT)/$(PKG_NAME).tar.Z
+
+# clean: Clean up the source directory.
+# ------------------------------------
+#
+# Remove all intermediate files. Do not remove built files.
+
+clean:
+ @- rm -f $(INCLUDE_LINKS) $(F_ROUTINES) \
+ $(PLATFORM_F) $(BLOCK_DATA) 1>/dev/null 2>/dev/null
+ @- rm -f $(C_ROUTINES) $(OBJECT_FILES) 1>/dev/null 2>/dev/null
+ @ echo
+ @ echo '*** Intermediate files removed'
+ @ echo
+
+# unbuild: Reverse the build process.
+# ----------------------------------
+
+# Remove all intermediate files and all built files, and note that the
+# package is no longer built or tested.
+
+unbuild: clean
+ @- rm -f $(BUILT_FILES) $(DATE_STAMP) .BUILT 1>/dev/null 2>/dev/null
+ @ echo '*** Built files removed'
+ @ echo
+
+#-------------------------------------------------------------------------------
+
+# Include file dependencies.
+# =========================
+
+# Object file dependencies on include files (or links to those include
+# files). These are normally generated automatically from the source
+# files.
+
+#-------------------------------------------------------------------------------
+
+# Private targets.
+
+# Targets for manipulating the hypertext documentation (creating,
+# generating tar files etc, cleaning etc).
+
+hypertext: sun67.tex sun67.aux
+ star2html -aux -m ptw@star.rl.ac.uk sun67.tex
+
+hypertext_tar:
+ $(TAR_IN) sun67.htx_tar sun67.htx/*
+
+hypertext_clean:
+ rm -rf sun67.htx
+#-------------------------------------------------------------------------------
+#
+# End of makefile.
+#.
diff --git a/src/slalib/map.f b/src/slalib/map.f
new file mode 100644
index 0000000..6046774
--- /dev/null
+++ b/src/slalib/map.f
@@ -0,0 +1,75 @@
+ SUBROUTINE sla_MAP (RM, DM, PR, PD, PX, RV, EQ, DATE, RA, DA)
+*+
+* - - - -
+* M A P
+* - - - -
+*
+* Transform star RA,Dec from mean place to geocentric apparent
+*
+* The reference frames and timescales used are post IAU 1976.
+*
+* References:
+* 1984 Astronomical Almanac, pp B39-B41.
+* (also Lederle & Schwan, Astron. Astrophys. 134,
+* 1-6, 1984)
+*
+* Given:
+* RM,DM dp mean RA,Dec (rad)
+* PR,PD dp proper motions: RA,Dec changes per Julian year
+* PX dp parallax (arcsec)
+* RV dp radial velocity (km/sec, +ve if receding)
+* EQ dp epoch and equinox of star data (Julian)
+* DATE dp TDB for apparent place (JD-2400000.5)
+*
+* Returned:
+* RA,DA dp apparent RA,Dec (rad)
+*
+* Called:
+* sla_MAPPA star-independent parameters
+* sla_MAPQK quick mean to apparent
+*
+* Notes:
+*
+* 1) EQ is the Julian epoch specifying both the reference
+* frame and the epoch of the position - usually 2000.
+* For positions where the epoch and equinox are
+* different, use the routine sla_PM to apply proper
+* motion corrections before using this routine.
+*
+* 2) The distinction between the required TDB and TT is
+* always negligible. Moreover, for all but the most
+* critical applications UTC is adequate.
+*
+* 3) The proper motions in RA are dRA/dt rather than
+* cos(Dec)*dRA/dt.
+*
+* 4) This routine may be wasteful for some applications
+* because it recomputes the Earth position/velocity and
+* the precession/nutation matrix each time, and because
+* it allows for parallax and proper motion. Where
+* multiple transformations are to be carried out for one
+* epoch, a faster method is to call the sla_MAPPA routine
+* once and then either the sla_MAPQK routine (which includes
+* parallax and proper motion) or sla_MAPQKZ (which assumes
+* zero parallax and proper motion).
+*
+* P.T.Wallace Starlink 19 January 1993
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION RM,DM,PR,PD,PX,RV,EQ,DATE,RA,DA
+
+ DOUBLE PRECISION AMPRMS(21)
+
+
+
+* Star-independent parameters
+ CALL sla_MAPPA(EQ,DATE,AMPRMS)
+
+* Mean to apparent
+ CALL sla_MAPQK(RM,DM,PR,PD,PX,RV,AMPRMS,RA,DA)
+
+ END
diff --git a/src/slalib/mappa.f b/src/slalib/mappa.f
new file mode 100644
index 0000000..8dce865
--- /dev/null
+++ b/src/slalib/mappa.f
@@ -0,0 +1,107 @@
+ SUBROUTINE sla_MAPPA (EQ, DATE, AMPRMS)
+*+
+* - - - - - -
+* M A P P A
+* - - - - - -
+*
+* Compute star-independent parameters in preparation for
+* conversions between mean place and geocentric apparent place.
+*
+* The parameters produced by this routine are required in the
+* parallax, light deflection, aberration, and precession/nutation
+* parts of the mean/apparent transformations.
+*
+* The reference frames and timescales used are post IAU 1976.
+*
+* Given:
+* EQ d epoch of mean equinox to be used (Julian)
+* DATE d TDB (JD-2400000.5)
+*
+* Returned:
+* AMPRMS d(21) star-independent mean-to-apparent parameters:
+*
+* (1) time interval for proper motion (Julian years)
+* (2-4) barycentric position of the Earth (AU)
+* (5-7) heliocentric direction of the Earth (unit vector)
+* (8) (grav rad Sun)*2/(Sun-Earth distance)
+* (9-11) ABV: barycentric Earth velocity in units of c
+* (12) sqrt(1-v**2) where v=modulus(ABV)
+* (13-21) precession/nutation (3,3) matrix
+*
+* References:
+* 1984 Astronomical Almanac, pp B39-B41.
+* (also Lederle & Schwan, Astron. Astrophys. 134,
+* 1-6, 1984)
+*
+* Notes:
+*
+* 1) For DATE, the distinction between the required TDB and TT
+* is always negligible. Moreover, for all but the most
+* critical applications UTC is adequate.
+*
+* 2) The accuracy of the routines using the parameters AMPRMS is
+* limited by the routine sla_EVP, used here to compute the
+* Earth position and velocity by the methods of Stumpff.
+* The maximum error in the resulting aberration corrections is
+* about 0.3 milliarcsecond.
+*
+* 3) The vectors AMPRMS(2-4) and AMPRMS(5-7) are referred to
+* the mean equinox and equator of epoch EQ.
+*
+* 4) The parameters AMPRMS produced by this routine are used by
+* sla_MAPQK and sla_MAPQKZ.
+*
+* Called:
+* sla_EPJ MDJ to Julian epoch
+* sla_EVP earth position & velocity
+* sla_DVN normalize vector
+* sla_PRENUT precession/nutation matrix
+*
+* P.T.Wallace Starlink 23 November 1995
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION EQ,DATE,AMPRMS(21)
+
+* Light time for 1 AU (sec)
+ DOUBLE PRECISION CR
+ PARAMETER (CR=499.004782D0)
+
+* Gravitational radius of the sun x 2 (2*mu/c**2, AU)
+ DOUBLE PRECISION GR2
+ PARAMETER (GR2=2D0*9.87063D-9)
+
+ INTEGER I
+
+ DOUBLE PRECISION EBD(3),EHD(3),EH(3),E,VN(3),VM
+
+ DOUBLE PRECISION sla_EPJ
+
+
+
+* Time interval for proper motion correction
+ AMPRMS(1) = sla_EPJ(DATE)-EQ
+
+* Get Earth barycentric and heliocentric position and velocity
+ CALL sla_EVP(DATE,EQ,EBD,AMPRMS(2),EHD,EH)
+
+* Heliocentric direction of earth (normalized) and modulus
+ CALL sla_DVN(EH,AMPRMS(5),E)
+
+* Light deflection parameter
+ AMPRMS(8) = GR2/E
+
+* Aberration parameters
+ DO I=1,3
+ AMPRMS(I+8) = EBD(I)*CR
+ END DO
+ CALL sla_DVN(AMPRMS(9),VN,VM)
+ AMPRMS(12) = SQRT(1D0-VM*VM)
+
+* Precession/nutation matrix
+ CALL sla_PRENUT(EQ,DATE,AMPRMS(13))
+
+ END
diff --git a/src/slalib/mapqk.f b/src/slalib/mapqk.f
new file mode 100644
index 0000000..4cd0f95
--- /dev/null
+++ b/src/slalib/mapqk.f
@@ -0,0 +1,143 @@
+ SUBROUTINE sla_MAPQK (RM, DM, PR, PD, PX, RV, AMPRMS, RA, DA)
+*+
+* - - - - - -
+* M A P Q K
+* - - - - - -
+*
+* Quick mean to apparent place: transform a star RA,Dec from
+* mean place to geocentric apparent place, given the
+* star-independent parameters.
+*
+* Use of this routine is appropriate when efficiency is important
+* and where many star positions, all referred to the same equator
+* and equinox, are to be transformed for one epoch. The
+* star-independent parameters can be obtained by calling the
+* sla_MAPPA routine.
+*
+* If the parallax and proper motions are zero the sla_MAPQKZ
+* routine can be used instead.
+*
+* The reference frames and timescales used are post IAU 1976.
+*
+* Given:
+* RM,DM d mean RA,Dec (rad)
+* PR,PD d proper motions: RA,Dec changes per Julian year
+* PX d parallax (arcsec)
+* RV d radial velocity (km/sec, +ve if receding)
+*
+* AMPRMS d(21) star-independent mean-to-apparent parameters:
+*
+* (1) time interval for proper motion (Julian years)
+* (2-4) barycentric position of the Earth (AU)
+* (5-7) heliocentric direction of the Earth (unit vector)
+* (8) (grav rad Sun)*2/(Sun-Earth distance)
+* (9-11) barycentric Earth velocity in units of c
+* (12) sqrt(1-v**2) where v=modulus(ABV)
+* (13-21) precession/nutation (3,3) matrix
+*
+* Returned:
+* RA,DA d apparent RA,Dec (rad)
+*
+* References:
+* 1984 Astronomical Almanac, pp B39-B41.
+* (also Lederle & Schwan, Astron. Astrophys. 134,
+* 1-6, 1984)
+*
+* Notes:
+*
+* 1) The vectors AMPRMS(2-4) and AMPRMS(5-7) are referred to
+* the mean equinox and equator of epoch EQ.
+*
+* 2) Strictly speaking, the routine is not valid for solar-system
+* sources, though the error will usually be extremely small.
+* However, to prevent gross errors in the case where the
+* position of the Sun is specified, the gravitational
+* deflection term is restrained within about 920 arcsec of the
+* centre of the Sun's disc. The term has a maximum value of
+* about 1.85 arcsec at this radius, and decreases to zero as
+* the centre of the disc is approached.
+*
+* Called:
+* sla_DCS2C spherical to Cartesian
+* sla_DVDV dot product
+* sla_DMXV matrix x vector
+* sla_DCC2S Cartesian to spherical
+* sla_DRANRM normalize angle 0-2Pi
+*
+* P.T.Wallace Starlink 23 August 1996
+*
+* Copyright (C) 1996 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION RM,DM,PR,PD,PX,RV,AMPRMS(21),RA,DA
+
+* Arc seconds to radians
+ DOUBLE PRECISION AS2R
+ PARAMETER (AS2R=0.484813681109535994D-5)
+
+* Km/s to AU/year
+ DOUBLE PRECISION VF
+ PARAMETER (VF=0.21094502D0)
+
+ INTEGER I
+
+ DOUBLE PRECISION PMT,GR2E,AB1,EB(3),EHN(3),ABV(3),
+ : Q(3),PXR,W,EM(3),P(3),PN(3),PDE,PDEP1,
+ : P1(3),P1DV,P1DVP1,P2(3),P3(3)
+
+ DOUBLE PRECISION sla_DVDV,sla_DRANRM
+
+
+
+* Unpack scalar and vector parameters
+ PMT = AMPRMS(1)
+ GR2E = AMPRMS(8)
+ AB1 = AMPRMS(12)
+ DO I=1,3
+ EB(I) = AMPRMS(I+1)
+ EHN(I) = AMPRMS(I+4)
+ ABV(I) = AMPRMS(I+8)
+ END DO
+
+* Spherical to x,y,z
+ CALL sla_DCS2C(RM,DM,Q)
+
+* Space motion (radians per year)
+ PXR = PX*AS2R
+ W = VF*RV*PXR
+ EM(1) = -PR*Q(2)-PD*COS(RM)*SIN(DM)+W*Q(1)
+ EM(2) = PR*Q(1)-PD*SIN(RM)*SIN(DM)+W*Q(2)
+ EM(3) = PD*COS(DM) +W*Q(3)
+
+* Geocentric direction of star (normalized)
+ DO I=1,3
+ P(I) = Q(I)+PMT*EM(I)-PXR*EB(I)
+ END DO
+ CALL sla_DVN(P,PN,W)
+
+* Light deflection (restrained within the Sun's disc)
+ PDE = sla_DVDV(PN,EHN)
+ PDEP1 = PDE+1D0
+ W = GR2E/MAX(PDEP1,1D-5)
+ DO I=1,3
+ P1(I) = PN(I)+W*(EHN(I)-PDE*PN(I))
+ END DO
+
+* Aberration
+ P1DV = sla_DVDV(P1,ABV)
+ P1DVP1 = P1DV+1D0
+ W = 1D0+P1DV/(AB1+1D0)
+ DO I=1,3
+ P2(I) = (AB1*P1(I)+W*ABV(I))/P1DVP1
+ END DO
+
+* Precession and nutation
+ CALL sla_DMXV(AMPRMS(13),P2,P3)
+
+* Geocentric apparent RA,Dec
+ CALL sla_DCC2S(P3,RA,DA)
+ RA = sla_DRANRM(RA)
+
+ END
diff --git a/src/slalib/mapqkz.f b/src/slalib/mapqkz.f
new file mode 100644
index 0000000..2922874
--- /dev/null
+++ b/src/slalib/mapqkz.f
@@ -0,0 +1,113 @@
+ SUBROUTINE sla_MAPQKZ (RM, DM, AMPRMS, RA, DA)
+*+
+* - - - - - - -
+* M A P Q K Z
+* - - - - - - -
+*
+* Quick mean to apparent place: transform a star RA,Dec from
+* mean place to geocentric apparent place, given the
+* star-independent parameters, and assuming zero parallax
+* and proper motion.
+*
+* Use of this routine is appropriate when efficiency is important
+* and where many star positions, all with parallax and proper
+* motion either zero or already allowed for, and all referred to
+* the same equator and equinox, are to be transformed for one
+* epoch. The star-independent parameters can be obtained by
+* calling the sla_MAPPA routine.
+*
+* The corresponding routine for the case of non-zero parallax
+* and proper motion is sla_MAPQK.
+*
+* The reference frames and timescales used are post IAU 1976.
+*
+* Given:
+* RM,DM d mean RA,Dec (rad)
+* AMPRMS d(21) star-independent mean-to-apparent parameters:
+*
+* (1-4) not used
+* (5-7) heliocentric direction of the Earth (unit vector)
+* (8) (grav rad Sun)*2/(Sun-Earth distance)
+* (9-11) ABV: barycentric Earth velocity in units of c
+* (12) sqrt(1-v**2) where v=modulus(ABV)
+* (13-21) precession/nutation (3,3) matrix
+*
+* Returned:
+* RA,DA d apparent RA,Dec (rad)
+*
+* References:
+* 1984 Astronomical Almanac, pp B39-B41.
+* (also Lederle & Schwan, Astron. Astrophys. 134,
+* 1-6, 1984)
+*
+* Notes:
+*
+* 1) The vectors AMPRMS(2-4) and AMPRMS(5-7) are referred to the
+* mean equinox and equator of epoch EQ.
+*
+* 2) Strictly speaking, the routine is not valid for solar-system
+* sources, though the error will usually be extremely small.
+* However, to prevent gross errors in the case where the
+* position of the Sun is specified, the gravitational
+* deflection term is restrained within about 920 arcsec of the
+* centre of the Sun's disc. The term has a maximum value of
+* about 1.85 arcsec at this radius, and decreases to zero as
+* the centre of the disc is approached.
+*
+* Called: sla_DCS2C, sla_DVDV, sla_DMXV, sla_DCC2S, sla_DRANRM
+*
+* P.T.Wallace Starlink 18 March 1999
+*
+* Copyright (C) 1999 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION RM,DM,AMPRMS(21),RA,DA
+
+ INTEGER I
+
+ DOUBLE PRECISION GR2E,AB1,EHN(3),ABV(3),
+ : P(3),PDE,PDEP1,W,P1(3),P1DV,
+ : P1DVP1,P2(3),P3(3)
+
+ DOUBLE PRECISION sla_DVDV,sla_DRANRM
+
+
+
+
+* Unpack scalar and vector parameters
+ GR2E = AMPRMS(8)
+ AB1 = AMPRMS(12)
+ DO I=1,3
+ EHN(I) = AMPRMS(I+4)
+ ABV(I) = AMPRMS(I+8)
+ END DO
+
+* Spherical to x,y,z
+ CALL sla_DCS2C(RM,DM,P)
+
+* Light deflection
+ PDE = sla_DVDV(P,EHN)
+ PDEP1 = PDE+1D0
+ W = GR2E/MAX(PDEP1,1D-5)
+ DO I=1,3
+ P1(I) = P(I)+W*(EHN(I)-PDE*P(I))
+ END DO
+
+* Aberration
+ P1DV = sla_DVDV(P1,ABV)
+ P1DVP1 = P1DV+1D0
+ W = 1D0+P1DV/(AB1+1D0)
+ DO I=1,3
+ P2(I) = (AB1*P1(I)+W*ABV(I))/P1DVP1
+ END DO
+
+* Precession and nutation
+ CALL sla_DMXV(AMPRMS(13),P2,P3)
+
+* Geocentric apparent RA,Dec
+ CALL sla_DCC2S(P3,RA,DA)
+ RA = sla_DRANRM(RA)
+
+ END
diff --git a/src/slalib/mk b/src/slalib/mk
new file mode 100755
index 0000000..5a186c3
--- /dev/null
+++ b/src/slalib/mk
@@ -0,0 +1,437 @@
+
+# This is a Bourne shell script. In order to be POSIX-compliant, the
+# first line must be blank.
+
+#+
+# Name:
+# mk
+#
+# Version:
+# Version for Mk V library makefile.
+#
+# Purpose:
+# Invoke make to build and install the SLALIB package.
+#
+# Type of Module:
+# Shell script.
+#
+# Description:
+# This script should normally be used to invoke the make utility
+# to build and install the SLALIB package and to perform other
+# housekeeping tasks. It invokes the make utility after first
+# defining appropriate environment variables and macros for the
+# computer system in use. This file also serves to document the
+# systems on which SLALIB is implemented.
+#
+# Invocation:
+# The user of this script should normally first define the SYSTEM
+# environment variable to identify the host computer system (see
+# the "Supported Systems" section). This script should then be used
+# in the same way as the make utility would be used. For instance,
+# to build, install and test SLALIB, you might use the following
+# commands:
+#
+# ./mk build
+# ./mk install
+# ./mk test
+# ./mk clean
+#
+# Supported Systems:
+# The following systems are currently supported and may be
+# identified by defining the SYSTEM environment variable
+# appropriately before invoking this script:
+#
+# alpha_OSF1
+# DEC Alpha machines running OSF1
+#
+# ix86_Linux
+# Intel PC machines running Linux
+#
+# sun4_Solaris
+# SUN Sparcstations running SunOS 5.x (Solaris)
+#
+# In addition, the following systems have been supported at some
+# time in the past. This script contains the macro definitions
+# needed for these systems, but it is not known whether {PACKAGE}
+# will still build or run on these systems:
+#
+# convex
+# Convex running ConvexOS
+#
+# mips
+# DECstations running Ultrix
+#
+# sun4
+# SUN Sparcstations running SunOS 4.x
+#
+# This script will exit without action if the SYSTEM environment
+# variable is not defined. A warning will be issued if it is
+# defined but is not set to one of the values above. In this case,
+# the only environment variable that will be defined by this script
+# is SOURCE_VARIANT, which is set to unknown (any that are
+# pre-defined will be passed on to make unaltered).
+#
+# Targets:
+# For details of what targets are provided, see the associated
+# makefile. The latter will normally provide a default target
+# called "help", which outputs a message describing this script
+# and lists the targets provided.
+#
+# Notes on Porting:
+# If your machine or system setup does not appear in this script,
+# then it should be possible to build and install SLALIB by
+# adding a new case to this script with appropriate definitions
+# (probably based on one of the existing implementations).
+#
+# make Macros:
+# The following "global" make macros are used in the associated
+# makefile and may be changed by means of appropriate environment
+# variable definitions (in each case the default is shown in
+# parentheses). Note that these macros are provided to allow
+# external control over the directories in which software is
+# installed, etc., so they should not normally be re-defined within
+# this script.
+#
+# STARLINK (/star)
+# Pathname of the root directory beneath which Starlink
+# software is currently installed. This indicates to
+# SLALIB where to find other Starlink software (include
+# files, libraries, etc.) which it uses.
+#
+# INSTALL ($HOME)
+# Pathname of the root directory beneath which SLALIB will
+# be installed for use. Your home directory will be used by
+# default. This macro is provided to allow SLALIB to be
+# installed locally for personal use (e.g. during development
+# or testing). It should be set to the $STARLINK directory if
+# you want to add SLALIB into an already installed set of
+# Starlink software. You should ensure that the appropriate
+# sub-directories appear on any relevant search paths which
+# your system uses for locating software (e.g. binaries and
+# libraries).
+#
+# EXPORT (.)
+# Pathname of the directory into which compressed tar files
+# will be written if the "export" or "export_source" make
+# targets are used to produce an exportable copy of SLALIB
+# or its source files. The current working directory (i.e.
+# the SLALIB source directory) will be used by default.
+#
+# The following "local" make macros are used in the associated
+# makefile and should normally be overridden by environment variable
+# definitions within this script. All the local macros that are
+# used in building a package should overridden even when the value
+# is the same as the default. This documents which macros are used
+# and ensures that the package will continue to build correctly even
+# if the default values are changed. Macros that are not used on a
+# particular machine (e.g. BLD_SHR on DECstations) should not be
+# overridden. In each case the default is shown in parentheses.
+#
+# AR_IN (ar -r)
+# The command to use to insert an object (.o) file into an
+# archive (.a) library. On some systems the variation 'ar r'
+# may be required instead.
+#
+# BLD_SHR (:)
+# Command to build a shareable library when given three
+# arguments specifying (1) the name of the library file to be
+# built (2) a list of the object files to be used in the
+# library and (3) a list of any additional libraries against
+# which to link. By default, it is assumed that shareable
+# libraries are not available, and the default acts as a null
+# command.
+#
+# CC (c89)
+# The C compiler command to use.
+#
+# CFLAGS (-O)
+# The C compiler options to use.
+#
+# C_ROUTINES ()
+# Names of the C routines needed to build the library. Some
+# systems (ix86_Linux) require extra C routines to provide
+# missing system functions.
+#
+# FC (fort77)
+# The Fortran compiler command to use. SLALIB requires a Fortran
+# 77 compiler that supports the common "permitted" Starlink
+# extensions, as documented in Starlink General Paper SGP/16.
+# (These include only the most common extensions, such as
+# long names, end of line comments, include files, etc.)
+#
+# FFLAGS (-O)
+# The Fortran compiler options to be used.
+#
+# HLINK (:)
+# The command required to perform the linking of the package
+# hypertext documentation into a cohesive whole with the rest
+# (if any) Starlink documentation at the installation site, and
+# with the Hypertext document server at RAL. This service is not
+# available on Sparc SunOS4, Dec MIPS Ultrix or Convex. This
+# macro is not a standard Starlink macro.
+#
+# LINK (ln)
+# The command required to establish a link to a file. The
+# default assumes POSIX.2 behavior, which only provides a
+# "hard" link operating within a single file system. If the
+# host operating system allows "symbolic" links, then this
+# macro might be re-defined as 'ln -s'. Alternatively, if the
+# use of multiple file systems is essential but not supported
+# by any form of link, then a copy command could be
+# substituted (e.g. 'cp -p'), at some cost in file space.
+#
+# SOURCE_VARIANT ($SYSTEM)
+# The name used to distinguish between platform-specific
+# files. Using the default ($SYSTEM) implies that multiple
+# copies of the same source may exist under different names.
+# For example, the files sub1.f_sun4 and sun1.f_sun4_Solaris
+# may contain identical source code. If this is to be
+# avoided (to save space), edit this script to set
+# SOURCE_VARIANT to a suitable string - for example setting it
+# to "sun" would allow one copy of the source called
+# sub1.f_sun to be used. To do this, add to each of the
+# per-system sections a statement of the form:
+#
+# SOURCE_VARIANT='string'
+#
+# RANLIB (:)
+# The command required to "randomise" an object library. By
+# default, this operation is not performed (the default acts
+# as a null command). On systems which require it, this
+# should typically be set to 'ranlib'.
+#
+# SHARE (.so)
+# The file type suffix to be applied to produce the name of a
+# shareable library file. By default, the ".so" suffix is
+# applied without a library version number. For systems which
+# support version numbers on shareable libraries, the macro
+# LIB_VERS is defined within the associated makefile and may
+# be used as part of a definition such as '.so.$(LIB_VERS)'.
+#
+# TAR_IN (pax -w -v -x ustar -f)
+# Command to use to insert a file into a .tar archive file.
+# The default uses the POSIX.2 pax command, which is not
+# available on traditional UNIX systems. These typically use
+# a tar command such as 'tar -cvhf' instead (if symbolic
+# links are supported, then an option to follow these must be
+# included in this command).
+#
+# TAR_OUT (pax -r -f)
+# Command to use to extract a file from a .tar archive file.
+# The default uses the POSIX.2 pax command, which is not
+# available on traditional UNIX systems. These typically use
+# a tar command such as 'tar -xf' instead.
+#
+# Implementation Deficiencies:
+# - The implementation of shareable libraries on the alpha_OSF1
+# system is still preliminary.
+#
+# Copyright:
+# Copyright (C) 1995 Rutherford Appleton Laboratory
+#
+# Authors:
+# RFWS: R.F.Warren-Smith (Starlink, RAL)
+# PMA: P.M.Allan (Starlink, RAL)
+# PTW: P.T.Wallace (Starlink, RAL)
+# AJC: A.J.Chipperfield (Starlink, RAL)
+# BLY: M.J.Bly (Starlink, RAL)
+# BKM: B.K.McIlwrath (Starlink, RAL)
+# {enter_new_authors_here}
+#
+# History:
+# 26-NOV-1993 (RFWS/PMA):
+# Starlink template.
+# 26-NOV-1993 (PTW):
+# Version for SLALIB.
+# 28-JUN-1993 (PTW):
+# Convex added.
+# 06-JUN-1995 (BLY):
+# Updated to Mk IVa standard.
+# 04-MAR-1996 (BLY):
+# Updated to Mk V specification.
+# Added HLINK macro and definitions.
+# 24-APR-1996 (BLY):
+# Integrated Linux support from BKM version.
+# 22-JAN-1998 (BLY):
+# Removed rtl_sleep.c from C_ROUTINES for Linux case.
+# {enter_further_changes_here}
+#
+# Bugs:
+# {note_any_bugs_here}
+#
+#-
+
+# Export "local" definitions to the environment for use by make.
+ export AR_IN
+ export BLD_SHR
+ export CC
+ export CFLAGS
+ export C_ROUTINES
+ export FC
+ export FFLAGS
+ export HLINK
+ export LINK
+ export SOURCE_VARIANT
+ export RANLIB
+ export SHARE
+ export TAR_IN
+ export TAR_OUT
+
+# Check that the SYSTEM environment variable is defined.
+ if test "$SYSTEM" = ""; then
+ echo "mk: Please define the environment variable SYSTEM to identify"
+ echo " your computer system (the prologue in the mk script file"
+ echo " contains more information if you require it)."
+
+# If OK, test for each recognised system.
+ else
+ case "$SYSTEM" in
+
+# DEC Alpha:
+# =========
+# DEC Alpha machines running OSF1.
+# -------------------------------
+ alpha_OSF1)
+ AR_IN='ar -r'
+# BLD_SHR=\
+#'f() ld -shared -update_registry $(INSTALL)/share/so_locations -o $$1 $$2 $$3 \
+#-lfor -lFutil -lUfor -lm -lots -lc; f'
+ CC='cc'
+ CFLAGS='-I$(STAR_INC) -O -std1'
+ FC='f77'
+ FFLAGS='-O'
+ HLINK='$(STAR_BIN)/hlink'
+ LINK='ln -s'
+ RANLIB='ranlib'
+# SHARE='.so'
+ TAR_IN='tar -cvhf'
+ TAR_OUT='tar -xf'
+ echo "mk: Environment variables defined for $SYSTEM system"
+ ;;
+
+# DECstations:
+# ===========
+# DECstations running Ultrix.
+# --------------------------
+ mips)
+ AR_IN='ar -r'
+ CC='c89'
+ CFLAGS='-I$(STAR_INC) -O'
+ FC='f77'
+ FFLAGS='-O'
+ LINK='ln -s'
+ RANLIB='ranlib'
+ TAR_IN='tar -cvhf'
+ TAR_OUT='tar -xf'
+ echo "mk: Environment variables defined for $SYSTEM system"
+ ;;
+
+# SUN4 systems:
+# ============
+# SUN Sparcstations running SunOS 4.x.
+# -----------------------------------
+ sun4)
+ AR_IN='ar r'
+ BLD_SHR='f() ld -assert pure-text -o $$1 $$2; f'
+ CC='gcc'
+ CFLAGS='-I$(STAR_INC) -O -fPIC'
+ FC='f77'
+ FFLAGS='-O -PIC'
+ LINK='ln -s'
+ RANLIB='ranlib'
+ SHARE='.so.$(LIB_VERS)'
+ TAR_IN='tar -cvhf'
+ TAR_OUT='tar -xf'
+ echo "mk: Environment variables defined for $SYSTEM system"
+ ;;
+
+# SUN Sparcstations running SunOS 5.x (Solaris).
+# ---------------------------------------------
+ sun4_Solaris)
+ AR_IN='ar -r'
+ BLD_SHR='f() ld -G -z text -o $$1 $$2; f'
+ CC='cc'
+ CFLAGS='-I$(STAR_INC) -O -K PIC'
+ FC='f77'
+ FFLAGS='-O -PIC'
+ HLINK='$(STAR_BIN)/hlink'
+ LINK='ln -s'
+ SHARE='.so'
+ TAR_IN='tar -cvhf'
+ TAR_OUT='tar -xf'
+ echo "mk: Environment variables defined for $SYSTEM system"
+ ;;
+
+# PC systems:
+# ==========
+# Intel PC running Linux.
+# ----------------------
+ ix86_Linux)
+ AR_IN='ar r'
+ CC='gcc'
+ CFLAGS='-O'
+ C_ROUTINES='rtl_random.c'
+ FC='gfortran'
+ FFLAGS='-fno-second-underscore -O'
+ HLINK='$(STAR_BIN)/hlink'
+ LINK='ln -s'
+ RANLIB='ranlib'
+ TAR_IN='tar -cvhf'
+ TAR_OUT='tar -xf'
+ echo "mk: Environment variables defined for $SYSTEM system"
+ ;;
+
+# Intel PC running Linux on 64 architecture.
+# -----------------------------------------
+ x86_64)
+ AR_IN='ar r'
+ CC='gcc'
+ CFLAGS='-O -fPIC'
+ C_ROUTINES='rtl_random.c'
+ FC='gfortran'
+ FFLAGS='-fno-second-underscore -O -fPIC'
+ HLINK='$(STAR_BIN)/hlink'
+ LINK='ln -s'
+ RANLIB='ranlib'
+ TAR_IN='tar -cvhf'
+ TAR_OUT='tar -xf'
+ echo "mk: Environment variables defined for $SYSTEM system"
+ ;;
+
+# Convex running ConvexOS.
+# ------------------------
+ convex)
+ AR_IN='ar r'
+ FC='fc'
+ FFLAGS='-O3'
+ CC='gcc'
+ CFLAGS='-I$(STAR_INC) -O -fPIC'
+ LINK='ln -s'
+ RANLIB='ranlib'
+ TAR_IN='tar -cvhf'
+ TAR_OUT='tar -xf'
+ echo "mk: Environment variables defined for $SYSTEM system"
+ ;;
+
+# IMPORTANT NOTE - Because Convex make doesn't support the -e
+# qualifier (as stipulated by the POSIX standard) it will be
+# necessary to use another version of make, for example the
+# GNU one. This can be accomplished either by editing this script,
+# or by setting up a link.
+
+# Issue a warning if SYSTEM is not recognised.
+ *)
+ SOURCE_VARIANT='unknown'
+ echo "mk: WARNING: value of SYSTEM = $SYSTEM not recognised..."
+ echo " ...assuming default system characteristics"
+ echo ' ...setting SOURCE_VARIANT to "unknown"'
+ ;;
+ esac
+
+# Invoke make with the appropriate environment variables set to override
+# default macros defined in the makefile.
+ echo make -e $*
+ make -e $*
+ fi
+
+# End of script.
diff --git a/src/slalib/mk.sv b/src/slalib/mk.sv
new file mode 100755
index 0000000..5a186c3
--- /dev/null
+++ b/src/slalib/mk.sv
@@ -0,0 +1,437 @@
+
+# This is a Bourne shell script. In order to be POSIX-compliant, the
+# first line must be blank.
+
+#+
+# Name:
+# mk
+#
+# Version:
+# Version for Mk V library makefile.
+#
+# Purpose:
+# Invoke make to build and install the SLALIB package.
+#
+# Type of Module:
+# Shell script.
+#
+# Description:
+# This script should normally be used to invoke the make utility
+# to build and install the SLALIB package and to perform other
+# housekeeping tasks. It invokes the make utility after first
+# defining appropriate environment variables and macros for the
+# computer system in use. This file also serves to document the
+# systems on which SLALIB is implemented.
+#
+# Invocation:
+# The user of this script should normally first define the SYSTEM
+# environment variable to identify the host computer system (see
+# the "Supported Systems" section). This script should then be used
+# in the same way as the make utility would be used. For instance,
+# to build, install and test SLALIB, you might use the following
+# commands:
+#
+# ./mk build
+# ./mk install
+# ./mk test
+# ./mk clean
+#
+# Supported Systems:
+# The following systems are currently supported and may be
+# identified by defining the SYSTEM environment variable
+# appropriately before invoking this script:
+#
+# alpha_OSF1
+# DEC Alpha machines running OSF1
+#
+# ix86_Linux
+# Intel PC machines running Linux
+#
+# sun4_Solaris
+# SUN Sparcstations running SunOS 5.x (Solaris)
+#
+# In addition, the following systems have been supported at some
+# time in the past. This script contains the macro definitions
+# needed for these systems, but it is not known whether {PACKAGE}
+# will still build or run on these systems:
+#
+# convex
+# Convex running ConvexOS
+#
+# mips
+# DECstations running Ultrix
+#
+# sun4
+# SUN Sparcstations running SunOS 4.x
+#
+# This script will exit without action if the SYSTEM environment
+# variable is not defined. A warning will be issued if it is
+# defined but is not set to one of the values above. In this case,
+# the only environment variable that will be defined by this script
+# is SOURCE_VARIANT, which is set to unknown (any that are
+# pre-defined will be passed on to make unaltered).
+#
+# Targets:
+# For details of what targets are provided, see the associated
+# makefile. The latter will normally provide a default target
+# called "help", which outputs a message describing this script
+# and lists the targets provided.
+#
+# Notes on Porting:
+# If your machine or system setup does not appear in this script,
+# then it should be possible to build and install SLALIB by
+# adding a new case to this script with appropriate definitions
+# (probably based on one of the existing implementations).
+#
+# make Macros:
+# The following "global" make macros are used in the associated
+# makefile and may be changed by means of appropriate environment
+# variable definitions (in each case the default is shown in
+# parentheses). Note that these macros are provided to allow
+# external control over the directories in which software is
+# installed, etc., so they should not normally be re-defined within
+# this script.
+#
+# STARLINK (/star)
+# Pathname of the root directory beneath which Starlink
+# software is currently installed. This indicates to
+# SLALIB where to find other Starlink software (include
+# files, libraries, etc.) which it uses.
+#
+# INSTALL ($HOME)
+# Pathname of the root directory beneath which SLALIB will
+# be installed for use. Your home directory will be used by
+# default. This macro is provided to allow SLALIB to be
+# installed locally for personal use (e.g. during development
+# or testing). It should be set to the $STARLINK directory if
+# you want to add SLALIB into an already installed set of
+# Starlink software. You should ensure that the appropriate
+# sub-directories appear on any relevant search paths which
+# your system uses for locating software (e.g. binaries and
+# libraries).
+#
+# EXPORT (.)
+# Pathname of the directory into which compressed tar files
+# will be written if the "export" or "export_source" make
+# targets are used to produce an exportable copy of SLALIB
+# or its source files. The current working directory (i.e.
+# the SLALIB source directory) will be used by default.
+#
+# The following "local" make macros are used in the associated
+# makefile and should normally be overridden by environment variable
+# definitions within this script. All the local macros that are
+# used in building a package should overridden even when the value
+# is the same as the default. This documents which macros are used
+# and ensures that the package will continue to build correctly even
+# if the default values are changed. Macros that are not used on a
+# particular machine (e.g. BLD_SHR on DECstations) should not be
+# overridden. In each case the default is shown in parentheses.
+#
+# AR_IN (ar -r)
+# The command to use to insert an object (.o) file into an
+# archive (.a) library. On some systems the variation 'ar r'
+# may be required instead.
+#
+# BLD_SHR (:)
+# Command to build a shareable library when given three
+# arguments specifying (1) the name of the library file to be
+# built (2) a list of the object files to be used in the
+# library and (3) a list of any additional libraries against
+# which to link. By default, it is assumed that shareable
+# libraries are not available, and the default acts as a null
+# command.
+#
+# CC (c89)
+# The C compiler command to use.
+#
+# CFLAGS (-O)
+# The C compiler options to use.
+#
+# C_ROUTINES ()
+# Names of the C routines needed to build the library. Some
+# systems (ix86_Linux) require extra C routines to provide
+# missing system functions.
+#
+# FC (fort77)
+# The Fortran compiler command to use. SLALIB requires a Fortran
+# 77 compiler that supports the common "permitted" Starlink
+# extensions, as documented in Starlink General Paper SGP/16.
+# (These include only the most common extensions, such as
+# long names, end of line comments, include files, etc.)
+#
+# FFLAGS (-O)
+# The Fortran compiler options to be used.
+#
+# HLINK (:)
+# The command required to perform the linking of the package
+# hypertext documentation into a cohesive whole with the rest
+# (if any) Starlink documentation at the installation site, and
+# with the Hypertext document server at RAL. This service is not
+# available on Sparc SunOS4, Dec MIPS Ultrix or Convex. This
+# macro is not a standard Starlink macro.
+#
+# LINK (ln)
+# The command required to establish a link to a file. The
+# default assumes POSIX.2 behavior, which only provides a
+# "hard" link operating within a single file system. If the
+# host operating system allows "symbolic" links, then this
+# macro might be re-defined as 'ln -s'. Alternatively, if the
+# use of multiple file systems is essential but not supported
+# by any form of link, then a copy command could be
+# substituted (e.g. 'cp -p'), at some cost in file space.
+#
+# SOURCE_VARIANT ($SYSTEM)
+# The name used to distinguish between platform-specific
+# files. Using the default ($SYSTEM) implies that multiple
+# copies of the same source may exist under different names.
+# For example, the files sub1.f_sun4 and sun1.f_sun4_Solaris
+# may contain identical source code. If this is to be
+# avoided (to save space), edit this script to set
+# SOURCE_VARIANT to a suitable string - for example setting it
+# to "sun" would allow one copy of the source called
+# sub1.f_sun to be used. To do this, add to each of the
+# per-system sections a statement of the form:
+#
+# SOURCE_VARIANT='string'
+#
+# RANLIB (:)
+# The command required to "randomise" an object library. By
+# default, this operation is not performed (the default acts
+# as a null command). On systems which require it, this
+# should typically be set to 'ranlib'.
+#
+# SHARE (.so)
+# The file type suffix to be applied to produce the name of a
+# shareable library file. By default, the ".so" suffix is
+# applied without a library version number. For systems which
+# support version numbers on shareable libraries, the macro
+# LIB_VERS is defined within the associated makefile and may
+# be used as part of a definition such as '.so.$(LIB_VERS)'.
+#
+# TAR_IN (pax -w -v -x ustar -f)
+# Command to use to insert a file into a .tar archive file.
+# The default uses the POSIX.2 pax command, which is not
+# available on traditional UNIX systems. These typically use
+# a tar command such as 'tar -cvhf' instead (if symbolic
+# links are supported, then an option to follow these must be
+# included in this command).
+#
+# TAR_OUT (pax -r -f)
+# Command to use to extract a file from a .tar archive file.
+# The default uses the POSIX.2 pax command, which is not
+# available on traditional UNIX systems. These typically use
+# a tar command such as 'tar -xf' instead.
+#
+# Implementation Deficiencies:
+# - The implementation of shareable libraries on the alpha_OSF1
+# system is still preliminary.
+#
+# Copyright:
+# Copyright (C) 1995 Rutherford Appleton Laboratory
+#
+# Authors:
+# RFWS: R.F.Warren-Smith (Starlink, RAL)
+# PMA: P.M.Allan (Starlink, RAL)
+# PTW: P.T.Wallace (Starlink, RAL)
+# AJC: A.J.Chipperfield (Starlink, RAL)
+# BLY: M.J.Bly (Starlink, RAL)
+# BKM: B.K.McIlwrath (Starlink, RAL)
+# {enter_new_authors_here}
+#
+# History:
+# 26-NOV-1993 (RFWS/PMA):
+# Starlink template.
+# 26-NOV-1993 (PTW):
+# Version for SLALIB.
+# 28-JUN-1993 (PTW):
+# Convex added.
+# 06-JUN-1995 (BLY):
+# Updated to Mk IVa standard.
+# 04-MAR-1996 (BLY):
+# Updated to Mk V specification.
+# Added HLINK macro and definitions.
+# 24-APR-1996 (BLY):
+# Integrated Linux support from BKM version.
+# 22-JAN-1998 (BLY):
+# Removed rtl_sleep.c from C_ROUTINES for Linux case.
+# {enter_further_changes_here}
+#
+# Bugs:
+# {note_any_bugs_here}
+#
+#-
+
+# Export "local" definitions to the environment for use by make.
+ export AR_IN
+ export BLD_SHR
+ export CC
+ export CFLAGS
+ export C_ROUTINES
+ export FC
+ export FFLAGS
+ export HLINK
+ export LINK
+ export SOURCE_VARIANT
+ export RANLIB
+ export SHARE
+ export TAR_IN
+ export TAR_OUT
+
+# Check that the SYSTEM environment variable is defined.
+ if test "$SYSTEM" = ""; then
+ echo "mk: Please define the environment variable SYSTEM to identify"
+ echo " your computer system (the prologue in the mk script file"
+ echo " contains more information if you require it)."
+
+# If OK, test for each recognised system.
+ else
+ case "$SYSTEM" in
+
+# DEC Alpha:
+# =========
+# DEC Alpha machines running OSF1.
+# -------------------------------
+ alpha_OSF1)
+ AR_IN='ar -r'
+# BLD_SHR=\
+#'f() ld -shared -update_registry $(INSTALL)/share/so_locations -o $$1 $$2 $$3 \
+#-lfor -lFutil -lUfor -lm -lots -lc; f'
+ CC='cc'
+ CFLAGS='-I$(STAR_INC) -O -std1'
+ FC='f77'
+ FFLAGS='-O'
+ HLINK='$(STAR_BIN)/hlink'
+ LINK='ln -s'
+ RANLIB='ranlib'
+# SHARE='.so'
+ TAR_IN='tar -cvhf'
+ TAR_OUT='tar -xf'
+ echo "mk: Environment variables defined for $SYSTEM system"
+ ;;
+
+# DECstations:
+# ===========
+# DECstations running Ultrix.
+# --------------------------
+ mips)
+ AR_IN='ar -r'
+ CC='c89'
+ CFLAGS='-I$(STAR_INC) -O'
+ FC='f77'
+ FFLAGS='-O'
+ LINK='ln -s'
+ RANLIB='ranlib'
+ TAR_IN='tar -cvhf'
+ TAR_OUT='tar -xf'
+ echo "mk: Environment variables defined for $SYSTEM system"
+ ;;
+
+# SUN4 systems:
+# ============
+# SUN Sparcstations running SunOS 4.x.
+# -----------------------------------
+ sun4)
+ AR_IN='ar r'
+ BLD_SHR='f() ld -assert pure-text -o $$1 $$2; f'
+ CC='gcc'
+ CFLAGS='-I$(STAR_INC) -O -fPIC'
+ FC='f77'
+ FFLAGS='-O -PIC'
+ LINK='ln -s'
+ RANLIB='ranlib'
+ SHARE='.so.$(LIB_VERS)'
+ TAR_IN='tar -cvhf'
+ TAR_OUT='tar -xf'
+ echo "mk: Environment variables defined for $SYSTEM system"
+ ;;
+
+# SUN Sparcstations running SunOS 5.x (Solaris).
+# ---------------------------------------------
+ sun4_Solaris)
+ AR_IN='ar -r'
+ BLD_SHR='f() ld -G -z text -o $$1 $$2; f'
+ CC='cc'
+ CFLAGS='-I$(STAR_INC) -O -K PIC'
+ FC='f77'
+ FFLAGS='-O -PIC'
+ HLINK='$(STAR_BIN)/hlink'
+ LINK='ln -s'
+ SHARE='.so'
+ TAR_IN='tar -cvhf'
+ TAR_OUT='tar -xf'
+ echo "mk: Environment variables defined for $SYSTEM system"
+ ;;
+
+# PC systems:
+# ==========
+# Intel PC running Linux.
+# ----------------------
+ ix86_Linux)
+ AR_IN='ar r'
+ CC='gcc'
+ CFLAGS='-O'
+ C_ROUTINES='rtl_random.c'
+ FC='gfortran'
+ FFLAGS='-fno-second-underscore -O'
+ HLINK='$(STAR_BIN)/hlink'
+ LINK='ln -s'
+ RANLIB='ranlib'
+ TAR_IN='tar -cvhf'
+ TAR_OUT='tar -xf'
+ echo "mk: Environment variables defined for $SYSTEM system"
+ ;;
+
+# Intel PC running Linux on 64 architecture.
+# -----------------------------------------
+ x86_64)
+ AR_IN='ar r'
+ CC='gcc'
+ CFLAGS='-O -fPIC'
+ C_ROUTINES='rtl_random.c'
+ FC='gfortran'
+ FFLAGS='-fno-second-underscore -O -fPIC'
+ HLINK='$(STAR_BIN)/hlink'
+ LINK='ln -s'
+ RANLIB='ranlib'
+ TAR_IN='tar -cvhf'
+ TAR_OUT='tar -xf'
+ echo "mk: Environment variables defined for $SYSTEM system"
+ ;;
+
+# Convex running ConvexOS.
+# ------------------------
+ convex)
+ AR_IN='ar r'
+ FC='fc'
+ FFLAGS='-O3'
+ CC='gcc'
+ CFLAGS='-I$(STAR_INC) -O -fPIC'
+ LINK='ln -s'
+ RANLIB='ranlib'
+ TAR_IN='tar -cvhf'
+ TAR_OUT='tar -xf'
+ echo "mk: Environment variables defined for $SYSTEM system"
+ ;;
+
+# IMPORTANT NOTE - Because Convex make doesn't support the -e
+# qualifier (as stipulated by the POSIX standard) it will be
+# necessary to use another version of make, for example the
+# GNU one. This can be accomplished either by editing this script,
+# or by setting up a link.
+
+# Issue a warning if SYSTEM is not recognised.
+ *)
+ SOURCE_VARIANT='unknown'
+ echo "mk: WARNING: value of SYSTEM = $SYSTEM not recognised..."
+ echo " ...assuming default system characteristics"
+ echo ' ...setting SOURCE_VARIANT to "unknown"'
+ ;;
+ esac
+
+# Invoke make with the appropriate environment variables set to override
+# default macros defined in the makefile.
+ echo make -e $*
+ make -e $*
+ fi
+
+# End of script.
diff --git a/src/slalib/moon.f b/src/slalib/moon.f
new file mode 100644
index 0000000..eaf1c72
--- /dev/null
+++ b/src/slalib/moon.f
@@ -0,0 +1,362 @@
+ SUBROUTINE sla_MOON (IY, ID, FD, PV)
+*+
+* - - - - -
+* M O O N
+* - - - - -
+*
+* Approximate geocentric position and velocity of the Moon
+* (single precision).
+*
+* Given:
+* IY i year
+* ID i day in year (1 = Jan 1st)
+* FD r fraction of day
+*
+* Returned:
+* PV r(6) Moon position & velocity vector
+*
+* Notes:
+*
+* 1 The date and time is TDB (loosely ET) in a Julian calendar
+* which has been aligned to the ordinary Gregorian
+* calendar for the interval 1900 March 1 to 2100 February 28.
+* The year and day can be obtained by calling sla_CALYD or
+* sla_CLYD.
+*
+* 2 The Moon 6-vector is Moon centre relative to Earth centre,
+* mean equator and equinox of date. Position part, PV(1-3),
+* is in AU; velocity part, PV(4-6), is in AU/sec.
+*
+* 3 The position is accurate to better than 0.5 arcminute
+* in direction and 1000 km in distance. The velocity
+* is accurate to better than 0.5"/hour in direction and
+* 4 m/s in distance. (RMS figures with respect to JPL DE200
+* for the interval 1960-2025 are 14 arcsec and 0.2 arcsec/hour in
+* longitude, 9 arcsec and 0.2 arcsec/hour in latitude, 350 km and
+* 2 m/s in distance.) Note that the distance accuracy is
+* comparatively poor because this routine is principally intended
+* for computing topocentric direction.
+*
+* 4 This routine is only a partial implementation of the original
+* Meeus algorithm (reference below), which offers 4 times the
+* accuracy in direction and 30 times the accuracy in distance
+* when fully implemented (as it is in sla_DMOON).
+*
+* Reference:
+* Meeus, l'Astronomie, June 1984, p348.
+*
+* Called: sla_CS2C6
+*
+* P.T.Wallace Starlink 8 December 1994
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ INTEGER IY,ID
+ REAL FD,PV(6)
+
+ INTEGER ITP(4,4),ITL(4,39),ITB(4,29),I,IY4,N
+ REAL D2R,RATCON,ERADAU
+ REAL ELP0,ELP1,ELP1I,ELP1F
+ REAL EM0,EM1,EM1F
+ REAL EMP0,EMP1,EMP1I,EMP1F
+ REAL D0,D1,D1I,D1F
+ REAL F0,F1,F1I,F1F
+ REAL TL(39)
+ REAL TB(29)
+ REAL TP(4)
+ REAL YI,YF,T,ELP,EM,EMP,D,F,EL,ELD,COEFF,CEM,CEMP
+ REAL CD,CF,THETA,THETAD,B,BD,P,PD,SP,R,RD
+ REAL V(6),EPS,SINEPS,COSEPS
+
+* Degrees to radians
+ PARAMETER (D2R=1.745329252E-2)
+
+* Rate conversion factor: D2R**2/(86400*365.25)
+ PARAMETER (RATCON=9.652743551E-12)
+
+* Earth radius in AU: 6378.137/149597870
+ PARAMETER (ERADAU=4.2635212653763E-5)
+
+*
+* Coefficients for fundamental arguments
+*
+* Fixed term (deg), term in T (deg & whole revs + fraction per year)
+*
+* Moon's mean longitude
+ DATA ELP0,ELP1,ELP1I,ELP1F /
+ : 270.434164, 4812.678831, 4680., 132.678831 /
+*
+* Sun's mean anomaly
+ DATA EM0,EM1,EM1F /
+ : 358.475833, 359.990498, 359.990498 /
+*
+* Moon's mean anomaly
+ DATA EMP0,EMP1,EMP1I,EMP1F /
+ : 296.104608, 4771.988491, 4680., 91.988491 /
+*
+* Moon's mean elongation
+ DATA D0,D1,D1I,D1F /
+ : 350.737486, 4452.671142, 4320., 132.671142 /
+*
+* Mean distance of the Moon from its ascending node
+ DATA F0,F1,F1I,F1F /
+ : 11.250889, 4832.020251, 4680., 152.020251 /
+
+*
+* Coefficients for Moon position
+*
+* T(N) = coefficient of term (deg)
+* IT(N,1-4) = coefficients of M, M', D, F in argument
+*
+* Longitude
+* M M' D F
+ DATA TL( 1)/ +6.288750 /,
+ : (ITL(I, 1),I=1,4)/ 0, +1, 0, 0 /
+ DATA TL( 2)/ +1.274018 /,
+ : (ITL(I, 2),I=1,4)/ 0, -1, +2, 0 /
+ DATA TL( 3)/ +0.658309 /,
+ : (ITL(I, 3),I=1,4)/ 0, 0, +2, 0 /
+ DATA TL( 4)/ +0.213616 /,
+ : (ITL(I, 4),I=1,4)/ 0, +2, 0, 0 /
+ DATA TL( 5)/ -0.185596 /,
+ : (ITL(I, 5),I=1,4)/ +1, 0, 0, 0 /
+ DATA TL( 6)/ -0.114336 /,
+ : (ITL(I, 6),I=1,4)/ 0, 0, 0, +2 /
+ DATA TL( 7)/ +0.058793 /,
+ : (ITL(I, 7),I=1,4)/ 0, -2, +2, 0 /
+ DATA TL( 8)/ +0.057212 /,
+ : (ITL(I, 8),I=1,4)/ -1, -1, +2, 0 /
+ DATA TL( 9)/ +0.053320 /,
+ : (ITL(I, 9),I=1,4)/ 0, +1, +2, 0 /
+ DATA TL(10)/ +0.045874 /,
+ : (ITL(I,10),I=1,4)/ -1, 0, +2, 0 /
+ DATA TL(11)/ +0.041024 /,
+ : (ITL(I,11),I=1,4)/ -1, +1, 0, 0 /
+ DATA TL(12)/ -0.034718 /,
+ : (ITL(I,12),I=1,4)/ 0, 0, +1, 0 /
+ DATA TL(13)/ -0.030465 /,
+ : (ITL(I,13),I=1,4)/ +1, +1, 0, 0 /
+ DATA TL(14)/ +0.015326 /,
+ : (ITL(I,14),I=1,4)/ 0, 0, +2, -2 /
+ DATA TL(15)/ -0.012528 /,
+ : (ITL(I,15),I=1,4)/ 0, +1, 0, +2 /
+ DATA TL(16)/ -0.010980 /,
+ : (ITL(I,16),I=1,4)/ 0, -1, 0, +2 /
+ DATA TL(17)/ +0.010674 /,
+ : (ITL(I,17),I=1,4)/ 0, -1, +4, 0 /
+ DATA TL(18)/ +0.010034 /,
+ : (ITL(I,18),I=1,4)/ 0, +3, 0, 0 /
+ DATA TL(19)/ +0.008548 /,
+ : (ITL(I,19),I=1,4)/ 0, -2, +4, 0 /
+ DATA TL(20)/ -0.007910 /,
+ : (ITL(I,20),I=1,4)/ +1, -1, +2, 0 /
+ DATA TL(21)/ -0.006783 /,
+ : (ITL(I,21),I=1,4)/ +1, 0, +2, 0 /
+ DATA TL(22)/ +0.005162 /,
+ : (ITL(I,22),I=1,4)/ 0, +1, -1, 0 /
+ DATA TL(23)/ +0.005000 /,
+ : (ITL(I,23),I=1,4)/ +1, 0, +1, 0 /
+ DATA TL(24)/ +0.004049 /,
+ : (ITL(I,24),I=1,4)/ -1, +1, +2, 0 /
+ DATA TL(25)/ +0.003996 /,
+ : (ITL(I,25),I=1,4)/ 0, +2, +2, 0 /
+ DATA TL(26)/ +0.003862 /,
+ : (ITL(I,26),I=1,4)/ 0, 0, +4, 0 /
+ DATA TL(27)/ +0.003665 /,
+ : (ITL(I,27),I=1,4)/ 0, -3, +2, 0 /
+ DATA TL(28)/ +0.002695 /,
+ : (ITL(I,28),I=1,4)/ -1, +2, 0, 0 /
+ DATA TL(29)/ +0.002602 /,
+ : (ITL(I,29),I=1,4)/ 0, +1, -2, -2 /
+ DATA TL(30)/ +0.002396 /,
+ : (ITL(I,30),I=1,4)/ -1, -2, +2, 0 /
+ DATA TL(31)/ -0.002349 /,
+ : (ITL(I,31),I=1,4)/ 0, +1, +1, 0 /
+ DATA TL(32)/ +0.002249 /,
+ : (ITL(I,32),I=1,4)/ -2, 0, +2, 0 /
+ DATA TL(33)/ -0.002125 /,
+ : (ITL(I,33),I=1,4)/ +1, +2, 0, 0 /
+ DATA TL(34)/ -0.002079 /,
+ : (ITL(I,34),I=1,4)/ +2, 0, 0, 0 /
+ DATA TL(35)/ +0.002059 /,
+ : (ITL(I,35),I=1,4)/ -2, -1, +2, 0 /
+ DATA TL(36)/ -0.001773 /,
+ : (ITL(I,36),I=1,4)/ 0, +1, +2, -2 /
+ DATA TL(37)/ -0.001595 /,
+ : (ITL(I,37),I=1,4)/ 0, 0, +2, +2 /
+ DATA TL(38)/ +0.001220 /,
+ : (ITL(I,38),I=1,4)/ -1, -1, +4, 0 /
+ DATA TL(39)/ -0.001110 /,
+ : (ITL(I,39),I=1,4)/ 0, +2, 0, +2 /
+*
+* Latitude
+* M M' D F
+ DATA TB( 1)/ +5.128189 /,
+ : (ITB(I, 1),I=1,4)/ 0, 0, 0, +1 /
+ DATA TB( 2)/ +0.280606 /,
+ : (ITB(I, 2),I=1,4)/ 0, +1, 0, +1 /
+ DATA TB( 3)/ +0.277693 /,
+ : (ITB(I, 3),I=1,4)/ 0, +1, 0, -1 /
+ DATA TB( 4)/ +0.173238 /,
+ : (ITB(I, 4),I=1,4)/ 0, 0, +2, -1 /
+ DATA TB( 5)/ +0.055413 /,
+ : (ITB(I, 5),I=1,4)/ 0, -1, +2, +1 /
+ DATA TB( 6)/ +0.046272 /,
+ : (ITB(I, 6),I=1,4)/ 0, -1, +2, -1 /
+ DATA TB( 7)/ +0.032573 /,
+ : (ITB(I, 7),I=1,4)/ 0, 0, +2, +1 /
+ DATA TB( 8)/ +0.017198 /,
+ : (ITB(I, 8),I=1,4)/ 0, +2, 0, +1 /
+ DATA TB( 9)/ +0.009267 /,
+ : (ITB(I, 9),I=1,4)/ 0, +1, +2, -1 /
+ DATA TB(10)/ +0.008823 /,
+ : (ITB(I,10),I=1,4)/ 0, +2, 0, -1 /
+ DATA TB(11)/ +0.008247 /,
+ : (ITB(I,11),I=1,4)/ -1, 0, +2, -1 /
+ DATA TB(12)/ +0.004323 /,
+ : (ITB(I,12),I=1,4)/ 0, -2, +2, -1 /
+ DATA TB(13)/ +0.004200 /,
+ : (ITB(I,13),I=1,4)/ 0, +1, +2, +1 /
+ DATA TB(14)/ +0.003372 /,
+ : (ITB(I,14),I=1,4)/ -1, 0, -2, +1 /
+ DATA TB(15)/ +0.002472 /,
+ : (ITB(I,15),I=1,4)/ -1, -1, +2, +1 /
+ DATA TB(16)/ +0.002222 /,
+ : (ITB(I,16),I=1,4)/ -1, 0, +2, +1 /
+ DATA TB(17)/ +0.002072 /,
+ : (ITB(I,17),I=1,4)/ -1, -1, +2, -1 /
+ DATA TB(18)/ +0.001877 /,
+ : (ITB(I,18),I=1,4)/ -1, +1, 0, +1 /
+ DATA TB(19)/ +0.001828 /,
+ : (ITB(I,19),I=1,4)/ 0, -1, +4, -1 /
+ DATA TB(20)/ -0.001803 /,
+ : (ITB(I,20),I=1,4)/ +1, 0, 0, +1 /
+ DATA TB(21)/ -0.001750 /,
+ : (ITB(I,21),I=1,4)/ 0, 0, 0, +3 /
+ DATA TB(22)/ +0.001570 /,
+ : (ITB(I,22),I=1,4)/ -1, +1, 0, -1 /
+ DATA TB(23)/ -0.001487 /,
+ : (ITB(I,23),I=1,4)/ 0, 0, +1, +1 /
+ DATA TB(24)/ -0.001481 /,
+ : (ITB(I,24),I=1,4)/ +1, +1, 0, +1 /
+ DATA TB(25)/ +0.001417 /,
+ : (ITB(I,25),I=1,4)/ -1, -1, 0, +1 /
+ DATA TB(26)/ +0.001350 /,
+ : (ITB(I,26),I=1,4)/ -1, 0, 0, +1 /
+ DATA TB(27)/ +0.001330 /,
+ : (ITB(I,27),I=1,4)/ 0, 0, -1, +1 /
+ DATA TB(28)/ +0.001106 /,
+ : (ITB(I,28),I=1,4)/ 0, +3, 0, +1 /
+ DATA TB(29)/ +0.001020 /,
+ : (ITB(I,29),I=1,4)/ 0, 0, +4, -1 /
+*
+* Parallax
+* M M' D F
+ DATA TP( 1)/ +0.051818 /,
+ : (ITP(I, 1),I=1,4)/ 0, +1, 0, 0 /
+ DATA TP( 2)/ +0.009531 /,
+ : (ITP(I, 2),I=1,4)/ 0, -1, +2, 0 /
+ DATA TP( 3)/ +0.007843 /,
+ : (ITP(I, 3),I=1,4)/ 0, 0, +2, 0 /
+ DATA TP( 4)/ +0.002824 /,
+ : (ITP(I, 4),I=1,4)/ 0, +2, 0, 0 /
+
+
+
+* Whole years & fraction of year, and years since J1900.0
+ YI=FLOAT(IY-1900)
+ IY4=MOD(MOD(IY,4)+4,4)
+ YF=(FLOAT(4*(ID-1/(IY4+1))-IY4-2)+4.0*FD)/1461.0
+ T=YI+YF
+
+* Moon's mean longitude
+ ELP=D2R*MOD(ELP0+ELP1I*YF+ELP1F*T,360.0)
+
+* Sun's mean anomaly
+ EM=D2R*MOD(EM0+EM1F*T,360.0)
+
+* Moon's mean anomaly
+ EMP=D2R*MOD(EMP0+EMP1I*YF+EMP1F*T,360.0)
+
+* Moon's mean elongation
+ D=D2R*MOD(D0+D1I*YF+D1F*T,360.0)
+
+* Mean distance of the moon from its ascending node
+ F=D2R*MOD(F0+F1I*YF+F1F*T,360.0)
+
+* Longitude
+ EL=0.0
+ ELD=0.0
+ DO N=39,1,-1
+ COEFF=TL(N)
+ CEM=FLOAT(ITL(1,N))
+ CEMP=FLOAT(ITL(2,N))
+ CD=FLOAT(ITL(3,N))
+ CF=FLOAT(ITL(4,N))
+ THETA=CEM*EM+CEMP*EMP+CD*D+CF*F
+ THETAD=CEM*EM1+CEMP*EMP1+CD*D1+CF*F1
+ EL=EL+COEFF*SIN(THETA)
+ ELD=ELD+COEFF*COS(THETA)*THETAD
+ END DO
+ EL=EL*D2R+ELP
+ ELD=RATCON*(ELD+ELP1/D2R)
+
+* Latitude
+ B=0.0
+ BD=0.0
+ DO N=29,1,-1
+ COEFF=TB(N)
+ CEM=FLOAT(ITB(1,N))
+ CEMP=FLOAT(ITB(2,N))
+ CD=FLOAT(ITB(3,N))
+ CF=FLOAT(ITB(4,N))
+ THETA=CEM*EM+CEMP*EMP+CD*D+CF*F
+ THETAD=CEM*EM1+CEMP*EMP1+CD*D1+CF*F1
+ B=B+COEFF*SIN(THETA)
+ BD=BD+COEFF*COS(THETA)*THETAD
+ END DO
+ B=B*D2R
+ BD=RATCON*BD
+
+* Parallax
+ P=0.0
+ PD=0.0
+ DO N=4,1,-1
+ COEFF=TP(N)
+ CEM=FLOAT(ITP(1,N))
+ CEMP=FLOAT(ITP(2,N))
+ CD=FLOAT(ITP(3,N))
+ CF=FLOAT(ITP(4,N))
+ THETA=CEM*EM+CEMP*EMP+CD*D+CF*F
+ THETAD=CEM*EM1+CEMP*EMP1+CD*D1+CF*F1
+ P=P+COEFF*COS(THETA)
+ PD=PD-COEFF*SIN(THETA)*THETAD
+ END DO
+ P=(P+0.950724)*D2R
+ PD=RATCON*PD
+
+* Transform parallax to distance (AU, AU/sec)
+ SP=SIN(P)
+ R=ERADAU/SP
+ RD=-R*PD/SP
+
+* Longitude, latitude to x,y,z (AU)
+ CALL sla_CS2C6(EL,B,R,ELD,BD,RD,V)
+
+* Mean obliquity
+ EPS=D2R*(23.45229-0.00013*T)
+ SINEPS=SIN(EPS)
+ COSEPS=COS(EPS)
+
+* Rotate Moon position and velocity into equatorial system
+ PV(1)=V(1)
+ PV(2)=V(2)*COSEPS-V(3)*SINEPS
+ PV(3)=V(2)*SINEPS+V(3)*COSEPS
+ PV(4)=V(4)
+ PV(5)=V(5)*COSEPS-V(6)*SINEPS
+ PV(6)=V(5)*SINEPS+V(6)*COSEPS
+
+ END
diff --git a/src/slalib/mxm.f b/src/slalib/mxm.f
new file mode 100644
index 0000000..67ce113
--- /dev/null
+++ b/src/slalib/mxm.f
@@ -0,0 +1,55 @@
+ SUBROUTINE sla_MXM (A, B, C)
+*+
+* - - - -
+* M X M
+* - - - -
+*
+* Product of two 3x3 matrices:
+* matrix C = matrix A x matrix B
+*
+* (single precision)
+*
+* Given:
+* A real(3,3) matrix
+* B real(3,3) matrix
+*
+* Returned:
+* C real(3,3) matrix result
+*
+* To comply with the ANSI Fortran 77 standard, A, B and C must
+* be different arrays. However, the routine is coded so as to
+* work properly on the VAX and many other systems even if this
+* rule is violated.
+*
+* P.T.Wallace Starlink 5 April 1990
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL A(3,3),B(3,3),C(3,3)
+
+ INTEGER I,J,K
+ REAL W,WM(3,3)
+
+
+* Multiply into scratch matrix
+ DO I=1,3
+ DO J=1,3
+ W=0.0
+ DO K=1,3
+ W=W+A(I,K)*B(K,J)
+ END DO
+ WM(I,J)=W
+ END DO
+ END DO
+
+* Return the result
+ DO J=1,3
+ DO I=1,3
+ C(I,J)=WM(I,J)
+ END DO
+ END DO
+
+ END
diff --git a/src/slalib/mxv.f b/src/slalib/mxv.f
new file mode 100644
index 0000000..2935f72
--- /dev/null
+++ b/src/slalib/mxv.f
@@ -0,0 +1,47 @@
+ SUBROUTINE sla_MXV (RM, VA, VB)
+*+
+* - - - -
+* M X V
+* - - - -
+*
+* Performs the 3-D forward unitary transformation:
+*
+* vector VB = matrix RM * vector VA
+*
+* (single precision)
+*
+* Given:
+* RM real(3,3) matrix
+* VA real(3) vector
+*
+* Returned:
+* VB real(3) result vector
+*
+* P.T.Wallace Starlink March 1986
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL RM(3,3),VA(3),VB(3)
+
+ INTEGER I,J
+ REAL W,VW(3)
+
+
+* Matrix RM * vector VA -> vector VW
+ DO J=1,3
+ W=0.0
+ DO I=1,3
+ W=W+RM(J,I)*VA(I)
+ END DO
+ VW(J)=W
+ END DO
+
+* Vector VW -> vector VB
+ DO J=1,3
+ VB(J)=VW(J)
+ END DO
+
+ END
diff --git a/src/slalib/nut.f b/src/slalib/nut.f
new file mode 100644
index 0000000..bf2d196
--- /dev/null
+++ b/src/slalib/nut.f
@@ -0,0 +1,44 @@
+ SUBROUTINE sla_NUT (DATE, RMATN)
+*+
+* - - - -
+* N U T
+* - - - -
+*
+* Form the matrix of nutation for a given date - IAU 1980 theory
+* (double precision)
+*
+* References:
+* Final report of the IAU Working Group on Nutation,
+* chairman P.K.Seidelmann, 1980.
+* Kaplan,G.H., 1981, USNO circular no. 163, pA3-6.
+*
+* Given:
+* DATE dp TDB (loosely ET) as Modified Julian Date
+* (=JD-2400000.5)
+* Returned:
+* RMATN dp(3,3) nutation matrix
+*
+* The matrix is in the sense V(true) = RMATN * V(mean)
+*
+* Called: sla_NUTC, sla_DEULER
+*
+* P.T.Wallace Starlink 1 January 1993
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION DATE,RMATN(3,3)
+
+ DOUBLE PRECISION DPSI,DEPS,EPS0
+
+
+
+* Nutation components and mean obliquity
+ CALL sla_NUTC(DATE,DPSI,DEPS,EPS0)
+
+* Rotation matrix
+ CALL sla_DEULER('XZX',EPS0,-DPSI,-(EPS0+DEPS),RMATN)
+
+ END
diff --git a/src/slalib/nutc.f b/src/slalib/nutc.f
new file mode 100644
index 0000000..1f5890c
--- /dev/null
+++ b/src/slalib/nutc.f
@@ -0,0 +1,442 @@
+ SUBROUTINE sla_NUTC (DATE, DPSI, DEPS, EPS0)
+*+
+* - - - - -
+* N U T C
+* - - - - -
+*
+* Nutation: longitude & obliquity components and mean
+* obliquity - IAU 1980 theory (double precision)
+*
+* Given:
+*
+* DATE dp TDB (loosely ET) as Modified Julian Date
+* (JD-2400000.5)
+* Returned:
+*
+* DPSI,DEPS dp nutation in longitude,obliquity
+* EPS0 dp mean obliquity
+*
+* References:
+* Final report of the IAU Working Group on Nutation,
+* chairman P.K.Seidelmann, 1980.
+* Kaplan,G.H., 1981, USNO circular no. 163, pA3-6.
+*
+* P.T.Wallace Starlink 23 August 1996
+*
+* Copyright (C) 1996 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION DATE,DPSI,DEPS,EPS0
+
+ DOUBLE PRECISION T2AS,AS2R,U2R
+ DOUBLE PRECISION T,EL,EL2,EL3
+ DOUBLE PRECISION ELP,ELP2
+ DOUBLE PRECISION F,F2,F4
+ DOUBLE PRECISION D,D2,D4
+ DOUBLE PRECISION OM,OM2
+ DOUBLE PRECISION DP,DE
+ DOUBLE PRECISION A
+
+
+* Turns to arc seconds
+ PARAMETER (T2AS=1296000D0)
+* Arc seconds to radians
+ PARAMETER (AS2R=0.484813681109535994D-5)
+* Units of 0.0001 arcsec to radians
+ PARAMETER (U2R=AS2R/1D4)
+
+
+
+
+* Interval between basic epoch J2000.0 and current epoch (JC)
+ T=(DATE-51544.5D0)/36525D0
+
+*
+* FUNDAMENTAL ARGUMENTS in the FK5 reference system
+*
+
+* Mean longitude of the Moon minus mean longitude of the Moon's perigee
+ EL=AS2R*(485866.733D0+(1325D0*T2AS+715922.633D0
+ : +(31.310D0+0.064D0*T)*T)*T)
+
+* Mean longitude of the Sun minus mean longitude of the Sun's perigee
+ ELP=AS2R*(1287099.804D0+(99D0*T2AS+1292581.224D0
+ : +(-0.577D0-0.012D0*T)*T)*T)
+
+* Mean longitude of the Moon minus mean longitude of the Moon's node
+ F=AS2R*(335778.877D0+(1342D0*T2AS+295263.137D0
+ : +(-13.257D0+0.011D0*T)*T)*T)
+
+* Mean elongation of the Moon from the Sun
+ D=AS2R*(1072261.307D0+(1236D0*T2AS+1105601.328D0
+ : +(-6.891D0+0.019D0*T)*T)*T)
+
+* Longitude of the mean ascending node of the lunar orbit on the
+* ecliptic, measured from the mean equinox of date
+ OM=AS2R*(450160.280D0+(-5D0*T2AS-482890.539D0
+ : +(7.455D0+0.008D0*T)*T)*T)
+
+* Multiples of arguments
+ EL2=EL+EL
+ EL3=EL2+EL
+ ELP2=ELP+ELP
+ F2=F+F
+ F4=F2+F2
+ D2=D+D
+ D4=D2+D2
+ OM2=OM+OM
+
+
+*
+* SERIES FOR THE NUTATION
+*
+ DP=0D0
+ DE=0D0
+
+* 106
+ DP=DP+SIN(ELP+D)
+* 105
+ DP=DP-SIN(F2+D4+OM2)
+* 104
+ DP=DP+SIN(EL2+D2)
+* 103
+ DP=DP-SIN(EL-F2+D2)
+* 102
+ DP=DP-SIN(EL+ELP-D2+OM)
+* 101
+ DP=DP-SIN(-ELP+F2+OM)
+* 100
+ DP=DP-SIN(EL-F2-D2)
+* 99
+ DP=DP-SIN(ELP+D2)
+* 98
+ DP=DP-SIN(F2-D+OM2)
+* 97
+ DP=DP-SIN(-F2+OM)
+* 96
+ DP=DP+SIN(-EL-ELP+D2+OM)
+* 95
+ DP=DP+SIN(ELP+F2+OM)
+* 94
+ DP=DP-SIN(EL+F2-D2)
+* 93
+ DP=DP+SIN(EL3+F2-D2+OM2)
+* 92
+ DP=DP+SIN(F4-D2+OM2)
+* 91
+ DP=DP-SIN(EL+D2+OM)
+* 90
+ DP=DP-SIN(EL2+F2+D2+OM2)
+* 89
+ A=EL2+F2-D2+OM
+ DP=DP+SIN(A)
+ DE=DE-COS(A)
+* 88
+ DP=DP+SIN(EL-ELP-D2)
+* 87
+ DP=DP+SIN(-EL+F4+OM2)
+* 86
+ A=-EL2+F2+D4+OM2
+ DP=DP-SIN(A)
+ DE=DE+COS(A)
+* 85
+ A=EL+F2+D2+OM
+ DP=DP-SIN(A)
+ DE=DE+COS(A)
+* 84
+ A=EL+ELP+F2-D2+OM2
+ DP=DP+SIN(A)
+ DE=DE-COS(A)
+* 83
+ DP=DP-SIN(EL2-D4)
+* 82
+ A=-EL+F2+D4+OM2
+ DP=DP-2D0*SIN(A)
+ DE=DE+COS(A)
+* 81
+ A=-EL2+F2+D2+OM2
+ DP=DP+SIN(A)
+ DE=DE-COS(A)
+* 80
+ DP=DP-SIN(EL-D4)
+* 79
+ A=-EL+OM2
+ DP=DP+SIN(A)
+ DE=DE-COS(A)
+* 78
+ A=F2+D+OM2
+ DP=DP+2D0*SIN(A)
+ DE=DE-COS(A)
+* 77
+ DP=DP+2D0*SIN(EL3)
+* 76
+ A=EL+OM2
+ DP=DP-2D0*SIN(A)
+ DE=DE+COS(A)
+* 75
+ A=EL2+OM
+ DP=DP+2D0*SIN(A)
+ DE=DE-COS(A)
+* 74
+ A=-EL+F2-D2+OM
+ DP=DP-2D0*SIN(A)
+ DE=DE+COS(A)
+* 73
+ A=EL+ELP+F2+OM2
+ DP=DP+2D0*SIN(A)
+ DE=DE-COS(A)
+* 72
+ A=-ELP+F2+D2+OM2
+ DP=DP-3D0*SIN(A)
+ DE=DE+COS(A)
+* 71
+ A=EL3+F2+OM2
+ DP=DP-3D0*SIN(A)
+ DE=DE+COS(A)
+* 70
+ A=-EL2+OM
+ DP=DP-2D0*SIN(A)
+ DE=DE+COS(A)
+* 69
+ A=-EL-ELP+F2+D2+OM2
+ DP=DP-3D0*SIN(A)
+ DE=DE+COS(A)
+* 68
+ A=EL-ELP+F2+OM2
+ DP=DP-3D0*SIN(A)
+ DE=DE+COS(A)
+* 67
+ DP=DP+3D0*SIN(EL+F2)
+* 66
+ DP=DP-3D0*SIN(EL+ELP)
+* 65
+ DP=DP-4D0*SIN(D)
+* 64
+ DP=DP+4D0*SIN(EL-F2)
+* 63
+ DP=DP-4D0*SIN(ELP-D2)
+* 62
+ A=EL2+F2+OM
+ DP=DP-5D0*SIN(A)
+ DE=DE+3D0*COS(A)
+* 61
+ DP=DP+5D0*SIN(EL-ELP)
+* 60
+ A=-D2+OM
+ DP=DP-5D0*SIN(A)
+ DE=DE+3D0*COS(A)
+* 59
+ A=EL+F2-D2+OM
+ DP=DP+6D0*SIN(A)
+ DE=DE-3D0*COS(A)
+* 58
+ A=F2+D2+OM
+ DP=DP-7D0*SIN(A)
+ DE=DE+3D0*COS(A)
+* 57
+ A=D2+OM
+ DP=DP-6D0*SIN(A)
+ DE=DE+3D0*COS(A)
+* 56
+ A=EL2+F2-D2+OM2
+ DP=DP+6D0*SIN(A)
+ DE=DE-3D0*COS(A)
+* 55
+ DP=DP+6D0*SIN(EL+D2)
+* 54
+ A=EL+F2+D2+OM2
+ DP=DP-8D0*SIN(A)
+ DE=DE+3D0*COS(A)
+* 53
+ A=-ELP+F2+OM2
+ DP=DP-7D0*SIN(A)
+ DE=DE+3D0*COS(A)
+* 52
+ A=ELP+F2+OM2
+ DP=DP+7D0*SIN(A)
+ DE=DE-3D0*COS(A)
+* 51
+ DP=DP-7D0*SIN(EL+ELP-D2)
+* 50
+ A=-EL+F2+D2+OM
+ DP=DP-10D0*SIN(A)
+ DE=DE+5D0*COS(A)
+* 49
+ A=EL-D2+OM
+ DP=DP-13D0*SIN(A)
+ DE=DE+7D0*COS(A)
+* 48
+ A=-EL+D2+OM
+ DP=DP+16D0*SIN(A)
+ DE=DE-8D0*COS(A)
+* 47
+ A=-EL+F2+OM
+ DP=DP+21D0*SIN(A)
+ DE=DE-10D0*COS(A)
+* 46
+ DP=DP+26D0*SIN(F2)
+ DE=DE-COS(F2)
+* 45
+ A=EL2+F2+OM2
+ DP=DP-31D0*SIN(A)
+ DE=DE+13D0*COS(A)
+* 44
+ A=EL+F2-D2+OM2
+ DP=DP+29D0*SIN(A)
+ DE=DE-12D0*COS(A)
+* 43
+ DP=DP+29D0*SIN(EL2)
+ DE=DE-COS(EL2)
+* 42
+ A=F2+D2+OM2
+ DP=DP-38D0*SIN(A)
+ DE=DE+16D0*COS(A)
+* 41
+ A=EL+F2+OM
+ DP=DP-51D0*SIN(A)
+ DE=DE+27D0*COS(A)
+* 40
+ A=-EL+F2+D2+OM2
+ DP=DP-59D0*SIN(A)
+ DE=DE+26D0*COS(A)
+* 39
+ A=-EL+OM
+ DP=DP+(-58D0-0.1D0*T)*SIN(A)
+ DE=DE+32D0*COS(A)
+* 38
+ A=EL+OM
+ DP=DP+(63D0+0.1D0*T)*SIN(A)
+ DE=DE-33D0*COS(A)
+* 37
+ DP=DP+63D0*SIN(D2)
+ DE=DE-2D0*COS(D2)
+* 36
+ A=-EL+F2+OM2
+ DP=DP+123D0*SIN(A)
+ DE=DE-53D0*COS(A)
+* 35
+ A=EL-D2
+ DP=DP-158D0*SIN(A)
+ DE=DE-COS(A)
+* 34
+ A=EL+F2+OM2
+ DP=DP-301D0*SIN(A)
+ DE=DE+(129D0-0.1D0*T)*COS(A)
+* 33
+ A=F2+OM
+ DP=DP+(-386D0-0.4D0*T)*SIN(A)
+ DE=DE+200D0*COS(A)
+* 32
+ DP=DP+(712D0+0.1D0*T)*SIN(EL)
+ DE=DE-7D0*COS(EL)
+* 31
+ A=F2+OM2
+ DP=DP+(-2274D0-0.2D0*T)*SIN(A)
+ DE=DE+(977D0-0.5D0*T)*COS(A)
+* 30
+ DP=DP-SIN(ELP+F2-D2)
+* 29
+ DP=DP+SIN(-EL+D+OM)
+* 28
+ DP=DP+SIN(ELP+OM2)
+* 27
+ DP=DP-SIN(ELP-F2+D2)
+* 26
+ DP=DP+SIN(-F2+D2+OM)
+* 25
+ DP=DP+SIN(EL2+ELP-D2)
+* 24
+ DP=DP-4D0*SIN(EL-D)
+* 23
+ A=ELP+F2-D2+OM
+ DP=DP+4D0*SIN(A)
+ DE=DE-2D0*COS(A)
+* 22
+ A=EL2-D2+OM
+ DP=DP+4D0*SIN(A)
+ DE=DE-2D0*COS(A)
+* 21
+ A=-ELP+F2-D2+OM
+ DP=DP-5D0*SIN(A)
+ DE=DE+3D0*COS(A)
+* 20
+ A=-EL2+D2+OM
+ DP=DP-6D0*SIN(A)
+ DE=DE+3D0*COS(A)
+* 19
+ A=-ELP+OM
+ DP=DP-12D0*SIN(A)
+ DE=DE+6D0*COS(A)
+* 18
+ A=ELP2+F2-D2+OM2
+ DP=DP+(-16D0+0.1D0*T)*SIN(A)
+ DE=DE+7D0*COS(A)
+* 17
+ A=ELP+OM
+ DP=DP-15D0*SIN(A)
+ DE=DE+9D0*COS(A)
+* 16
+ DP=DP+(17D0-0.1D0*T)*SIN(ELP2)
+* 15
+ DP=DP-22D0*SIN(F2-D2)
+* 14
+ A=EL2-D2
+ DP=DP+48D0*SIN(A)
+ DE=DE+COS(A)
+* 13
+ A=F2-D2+OM
+ DP=DP+(129D0+0.1D0*T)*SIN(A)
+ DE=DE-70D0*COS(A)
+* 12
+ A=-ELP+F2-D2+OM2
+ DP=DP+(217D0-0.5D0*T)*SIN(A)
+ DE=DE+(-95D0+0.3D0*T)*COS(A)
+* 11
+ A=ELP+F2-D2+OM2
+ DP=DP+(-517D0+1.2D0*T)*SIN(A)
+ DE=DE+(224D0-0.6D0*T)*COS(A)
+* 10
+ DP=DP+(1426D0-3.4D0*T)*SIN(ELP)
+ DE=DE+(54D0-0.1D0*T)*COS(ELP)
+* 9
+ A=F2-D2+OM2
+ DP=DP+(-13187D0-1.6D0*T)*SIN(A)
+ DE=DE+(5736D0-3.1D0*T)*COS(A)
+* 8
+ DP=DP+SIN(EL2-F2+OM)
+* 7
+ A=-ELP2+F2-D2+OM
+ DP=DP-2D0*SIN(A)
+ DE=DE+1D0*COS(A)
+* 6
+ DP=DP-3D0*SIN(EL-ELP-D)
+* 5
+ A=-EL2+F2+OM2
+ DP=DP-3D0*SIN(A)
+ DE=DE+1D0*COS(A)
+* 4
+ DP=DP+11D0*SIN(EL2-F2)
+* 3
+ A=-EL2+F2+OM
+ DP=DP+46D0*SIN(A)
+ DE=DE-24D0*COS(A)
+* 2
+ DP=DP+(2062D0+0.2D0*T)*SIN(OM2)
+ DE=DE+(-895D0+0.5D0*T)*COS(OM2)
+* 1
+ DP=DP+(-171996D0-174.2D0*T)*SIN(OM)
+ DE=DE+(92025D0+8.9D0*T)*COS(OM)
+
+* Convert results to radians
+ DPSI=DP*U2R
+ DEPS=DE*U2R
+
+* Mean obliquity
+ EPS0=AS2R*(84381.448D0+
+ : (-46.8150D0+
+ : (-0.00059D0+
+ : 0.001813D0*T)*T)*T)
+
+ END
diff --git a/src/slalib/oap.f b/src/slalib/oap.f
new file mode 100644
index 0000000..6376397
--- /dev/null
+++ b/src/slalib/oap.f
@@ -0,0 +1,172 @@
+ SUBROUTINE sla_OAP (TYPE, OB1, OB2, DATE, DUT, ELONGM, PHIM,
+ : HM, XP, YP, TDK, PMB, RH, WL, TLR,
+ : RAP, DAP)
+*+
+* - - - -
+* O A P
+* - - - -
+*
+* Observed to apparent place
+*
+* Given:
+* TYPE c*(*) type of coordinates - 'R', 'H' or 'A' (see below)
+* OB1 d observed Az, HA or RA (radians; Az is N=0,E=90)
+* OB2 d observed ZD or Dec (radians)
+* DATE d UTC date/time (modified Julian Date, JD-2400000.5)
+* DUT d delta UT: UT1-UTC (UTC seconds)
+* ELONGM d mean longitude of the observer (radians, east +ve)
+* PHIM d mean geodetic latitude of the observer (radians)
+* HM d observer's height above sea level (metres)
+* XP d polar motion x-coordinate (radians)
+* YP d polar motion y-coordinate (radians)
+* TDK d local ambient temperature (DegK; std=273.155D0)
+* PMB d local atmospheric pressure (mB; std=1013.25D0)
+* RH d local relative humidity (in the range 0D0-1D0)
+* WL d effective wavelength (micron, e.g. 0.55D0)
+* TLR d tropospheric lapse rate (DegK/metre, e.g. 0.0065D0)
+*
+* Returned:
+* RAP d geocentric apparent right ascension
+* DAP d geocentric apparent declination
+*
+* Notes:
+*
+* 1) Only the first character of the TYPE argument is significant.
+* 'R' or 'r' indicates that OBS1 and OBS2 are the observed Right
+* Ascension and Declination; 'H' or 'h' indicates that they are
+* Hour Angle (West +ve) and Declination; anything else ('A' or
+* 'a' is recommended) indicates that OBS1 and OBS2 are Azimuth
+* (North zero, East is 90 deg) and zenith distance. (Zenith
+* distance is used rather than elevation in order to reflect the
+* fact that no allowance is made for depression of the horizon.)
+*
+* 2) The accuracy of the result is limited by the corrections for
+* refraction. Providing the meteorological parameters are
+* known accurately and there are no gross local effects, the
+* predicted apparent RA,Dec should be within about 0.1 arcsec
+* for a zenith distance of less than 70 degrees. Even at a
+* topocentric zenith distance of 90 degrees, the accuracy in
+* elevation should be better than 1 arcmin; useful results
+* are available for a further 3 degrees, beyond which the
+* sla_REFRO routine returns a fixed value of the refraction.
+* The complementary routines sla_AOP (or sla_AOPQK) and sla_OAP
+* (or sla_OAPQK) are self-consistent to better than 1 micro-
+* arcsecond all over the celestial sphere.
+*
+* 3) It is advisable to take great care with units, as even
+* unlikely values of the input parameters are accepted and
+* processed in accordance with the models used.
+*
+* 4) "Observed" Az,El means the position that would be seen by a
+* perfect theodolite located at the observer. This is
+* related to the observed HA,Dec via the standard rotation, using
+* the geodetic latitude (corrected for polar motion), while the
+* observed HA and RA are related simply through the local
+* apparent ST. "Observed" RA,Dec or HA,Dec thus means the
+* position that would be seen by a perfect equatorial located
+* at the observer and with its polar axis aligned to the
+* Earth's axis of rotation (n.b. not to the refracted pole).
+* By removing from the observed place the effects of
+* atmospheric refraction and diurnal aberration, the
+* geocentric apparent RA,Dec is obtained.
+*
+* 5) Frequently, mean rather than apparent RA,Dec will be required,
+* in which case further transformations will be necessary. The
+* sla_AMP etc routines will convert the apparent RA,Dec produced
+* by the present routine into an "FK5" (J2000) mean place, by
+* allowing for the Sun's gravitational lens effect, annual
+* aberration, nutation and precession. Should "FK4" (1950)
+* coordinates be needed, the routines sla_FK524 etc will also
+* need to be applied.
+*
+* 6) To convert to apparent RA,Dec the coordinates read from a
+* real telescope, corrections would have to be applied for
+* encoder zero points, gear and encoder errors, tube flexure,
+* the position of the rotator axis and the pointing axis
+* relative to it, non-perpendicularity between the mounting
+* axes, and finally for the tilt of the azimuth or polar axis
+* of the mounting (with appropriate corrections for mount
+* flexures). Some telescopes would, of course, exhibit other
+* properties which would need to be accounted for at the
+* appropriate point in the sequence.
+*
+* 7) The star-independent apparent-to-observed-place parameters
+* in AOPRMS may be computed by means of the sla_AOPPA routine.
+* If nothing has changed significantly except the time, the
+* sla_AOPPAT routine may be used to perform the requisite
+* partial recomputation of AOPRMS.
+*
+* 8) The DATE argument is UTC expressed as an MJD. This is,
+* strictly speaking, wrong, because of leap seconds. However,
+* as long as the delta UT and the UTC are consistent there
+* are no difficulties, except during a leap second. In this
+* case, the start of the 61st second of the final minute should
+* begin a new MJD day and the old pre-leap delta UT should
+* continue to be used. As the 61st second completes, the MJD
+* should revert to the start of the day as, simultaneously,
+* the delta UTC changes by one second to its post-leap new value.
+*
+* 9) The delta UT (UT1-UTC) is tabulated in IERS circulars and
+* elsewhere. It increases by exactly one second at the end of
+* each UTC leap second, introduced in order to keep delta UT
+* within +/- 0.9 seconds.
+*
+* 10) IMPORTANT -- TAKE CARE WITH THE LONGITUDE SIGN CONVENTION.
+* The longitude required by the present routine is east-positive,
+* in accordance with geographical convention (and right-handed).
+* In particular, note that the longitudes returned by the
+* sla_OBS routine are west-positive, following astronomical
+* usage, and must be reversed in sign before use in the present
+* routine.
+*
+* 11) The polar coordinates XP,YP can be obtained from IERS
+* circulars and equivalent publications. The maximum amplitude
+* is about 0.3 arcseconds. If XP,YP values are unavailable,
+* use XP=YP=0D0. See page B60 of the 1988 Astronomical Almanac
+* for a definition of the two angles.
+*
+* 12) The height above sea level of the observing station, HM,
+* can be obtained from the Astronomical Almanac (Section J
+* in the 1988 edition), or via the routine sla_OBS. If P,
+* the pressure in millibars, is available, an adequate
+* estimate of HM can be obtained from the expression
+*
+* HM ~ -29.3D0*TSL*LOG(P/1013.25D0).
+*
+* where TSL is the approximate sea-level air temperature in
+* deg K (see Astrophysical Quantities, C.W.Allen, 3rd edition,
+* section 52). Similarly, if the pressure P is not known,
+* it can be estimated from the height of the observing
+* station, HM as follows:
+*
+* P ~ 1013.25D0*EXP(-HM/(29.3D0*TSL)).
+*
+* Note, however, that the refraction is proportional to the
+* pressure and that an accurate P value is important for
+* precise work.
+*
+* 13) The azimuths etc used by the present routine are with respect
+* to the celestial pole. Corrections from the terrestrial pole
+* can be computed using sla_POLMO.
+*
+* Called: sla_AOPPA, sla_OAPQK
+*
+* P.T.Wallace Starlink 6 September 1999
+*
+* Copyright (C) 1999 P.T.Wallace and CCLRC
+*-
+
+ IMPLICIT NONE
+
+ CHARACTER*(*) TYPE
+ DOUBLE PRECISION OB1,OB2,DATE,DUT,ELONGM,PHIM,HM,
+ : XP,YP,TDK,PMB,RH,WL,TLR,RAP,DAP
+
+ DOUBLE PRECISION AOPRMS(14)
+
+
+ CALL sla_AOPPA(DATE,DUT,ELONGM,PHIM,HM,XP,YP,TDK,PMB,RH,WL,TLR,
+ : AOPRMS)
+ CALL sla_OAPQK(TYPE,OB1,OB2,AOPRMS,RAP,DAP)
+
+ END
diff --git a/src/slalib/oapqk.f b/src/slalib/oapqk.f
new file mode 100644
index 0000000..c50feb1
--- /dev/null
+++ b/src/slalib/oapqk.f
@@ -0,0 +1,233 @@
+ SUBROUTINE sla_OAPQK (TYPE, OB1, OB2, AOPRMS, RAP, DAP)
+*+
+* - - - - - -
+* O A P Q K
+* - - - - - -
+*
+* Quick observed to apparent place
+*
+* Given:
+* TYPE c*(*) type of coordinates - 'R', 'H' or 'A' (see below)
+* OB1 d observed Az, HA or RA (radians; Az is N=0,E=90)
+* OB2 d observed ZD or Dec (radians)
+* AOPRMS d(14) star-independent apparent-to-observed parameters:
+*
+* (1) geodetic latitude (radians)
+* (2,3) sine and cosine of geodetic latitude
+* (4) magnitude of diurnal aberration vector
+* (5) height (HM)
+* (6) ambient temperature (T)
+* (7) pressure (P)
+* (8) relative humidity (RH)
+* (9) wavelength (WL)
+* (10) lapse rate (TLR)
+* (11,12) refraction constants A and B (radians)
+* (13) longitude + eqn of equinoxes + sidereal DUT (radians)
+* (14) local apparent sidereal time (radians)
+*
+* Returned:
+* RAP d geocentric apparent right ascension
+* DAP d geocentric apparent declination
+*
+* Notes:
+*
+* 1) Only the first character of the TYPE argument is significant.
+* 'R' or 'r' indicates that OBS1 and OBS2 are the observed Right
+* Ascension and Declination; 'H' or 'h' indicates that they are
+* Hour Angle (West +ve) and Declination; anything else ('A' or
+* 'a' is recommended) indicates that OBS1 and OBS2 are Azimuth
+* (North zero, East is 90 deg) and zenith distance. (Zenith
+* distance is used rather than elevation in order to reflect the
+* fact that no allowance is made for depression of the horizon.)
+*
+* 2) The accuracy of the result is limited by the corrections for
+* refraction. Providing the meteorological parameters are
+* known accurately and there are no gross local effects, the
+* predicted apparent RA,Dec should be within about 0.1 arcsec
+* for a zenith distance of less than 70 degrees. Even at a
+* topocentric zenith distance of 90 degrees, the accuracy in
+* elevation should be better than 1 arcmin; useful results
+* are available for a further 3 degrees, beyond which the
+* sla_REFRO routine returns a fixed value of the refraction.
+* The complementary routines sla_AOP (or sla_AOPQK) and sla_OAP
+* (or sla_OAPQK) are self-consistent to better than 1 micro-
+* arcsecond all over the celestial sphere.
+*
+* 3) It is advisable to take great care with units, as even
+* unlikely values of the input parameters are accepted and
+* processed in accordance with the models used.
+*
+* 5) "Observed" Az,El means the position that would be seen by a
+* perfect theodolite located at the observer. This is
+* related to the observed HA,Dec via the standard rotation, using
+* the geodetic latitude (corrected for polar motion), while the
+* observed HA and RA are related simply through the local
+* apparent ST. "Observed" RA,Dec or HA,Dec thus means the
+* position that would be seen by a perfect equatorial located
+* at the observer and with its polar axis aligned to the
+* Earth's axis of rotation (n.b. not to the refracted pole).
+* By removing from the observed place the effects of
+* atmospheric refraction and diurnal aberration, the
+* geocentric apparent RA,Dec is obtained.
+*
+* 5) Frequently, mean rather than apparent RA,Dec will be required,
+* in which case further transformations will be necessary. The
+* sla_AMP etc routines will convert the apparent RA,Dec produced
+* by the present routine into an "FK5" (J2000) mean place, by
+* allowing for the Sun's gravitational lens effect, annual
+* aberration, nutation and precession. Should "FK4" (1950)
+* coordinates be needed, the routines sla_FK524 etc will also
+* need to be applied.
+*
+* 6) To convert to apparent RA,Dec the coordinates read from a
+* real telescope, corrections would have to be applied for
+* encoder zero points, gear and encoder errors, tube flexure,
+* the position of the rotator axis and the pointing axis
+* relative to it, non-perpendicularity between the mounting
+* axes, and finally for the tilt of the azimuth or polar axis
+* of the mounting (with appropriate corrections for mount
+* flexures). Some telescopes would, of course, exhibit other
+* properties which would need to be accounted for at the
+* appropriate point in the sequence.
+*
+* 7) The star-independent apparent-to-observed-place parameters
+* in AOPRMS may be computed by means of the sla_AOPPA routine.
+* If nothing has changed significantly except the time, the
+* sla_AOPPAT routine may be used to perform the requisite
+* partial recomputation of AOPRMS.
+*
+* 8) The azimuths etc used by the present routine are with respect
+* to the celestial pole. Corrections from the terrestrial pole
+* can be computed using sla_POLMO.
+*
+* Called: sla_DCS2C, sla_DCC2S, sla_REFRO, sla_DRANRM
+*
+* P.T.Wallace Starlink 23 June 1997
+*
+* Copyright (C) 1996 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ CHARACTER*(*) TYPE
+ DOUBLE PRECISION OB1,OB2,AOPRMS(14),RAP,DAP
+
+* Breakpoint for fast/slow refraction algorithm:
+* ZD greater than arctan(4), (see sla_REFCO routine)
+* or vector Z less than cosine(arctan(Z)) = 1/sqrt(17)
+ DOUBLE PRECISION ZBREAK
+ PARAMETER (ZBREAK=0.242535625D0)
+
+ CHARACTER C
+ DOUBLE PRECISION C1,C2,SPHI,CPHI,ST,CE,XAEO,YAEO,ZAEO,V(3),
+ : XMHDO,YMHDO,ZMHDO,AZ,SZ,ZDO,TZ,DREF,ZDT,
+ : XAET,YAET,ZAET,XMHDA,YMHDA,ZMHDA,DIURAB,F,HMA
+
+ DOUBLE PRECISION sla_DRANRM
+
+
+
+* Coordinate type
+ C = TYPE(1:1)
+
+* Coordinates
+ C1 = OB1
+ C2 = OB2
+
+* Sin, cos of latitude
+ SPHI = AOPRMS(2)
+ CPHI = AOPRMS(3)
+
+* Local apparent sidereal time
+ ST = AOPRMS(14)
+
+* Standardise coordinate type
+ IF (C.EQ.'R'.OR.C.EQ.'r') THEN
+ C = 'R'
+ ELSE IF (C.EQ.'H'.OR.C.EQ.'h') THEN
+ C = 'H'
+ ELSE
+ C = 'A'
+ END IF
+
+* If Az,ZD convert to Cartesian (S=0,E=90)
+ IF (C.EQ.'A') THEN
+ CE = SIN(C2)
+ XAEO = -COS(C1)*CE
+ YAEO = SIN(C1)*CE
+ ZAEO = COS(C2)
+ ELSE
+
+* If RA,Dec convert to HA,Dec
+ IF (C.EQ.'R') THEN
+ C1 = ST-C1
+ END IF
+
+* To Cartesian -HA,Dec
+ CALL sla_DCS2C(-C1,C2,V)
+ XMHDO = V(1)
+ YMHDO = V(2)
+ ZMHDO = V(3)
+
+* To Cartesian Az,El (S=0,E=90)
+ XAEO = SPHI*XMHDO-CPHI*ZMHDO
+ YAEO = YMHDO
+ ZAEO = CPHI*XMHDO+SPHI*ZMHDO
+ END IF
+
+* Azimuth (S=0,E=90)
+ IF (XAEO.NE.0D0.OR.YAEO.NE.0D0) THEN
+ AZ = ATAN2(YAEO,XAEO)
+ ELSE
+ AZ = 0D0
+ END IF
+
+* Sine of observed ZD, and observed ZD
+ SZ = SQRT(XAEO*XAEO+YAEO*YAEO)
+ ZDO = ATAN2(SZ,ZAEO)
+
+*
+* Refraction
+* ----------
+
+* Large zenith distance?
+ IF (ZAEO.GE.ZBREAK) THEN
+
+* Fast algorithm using two constant model
+ TZ = SZ/ZAEO
+ DREF = AOPRMS(11)*TZ+AOPRMS(12)*TZ*TZ*TZ
+
+ ELSE
+
+* Rigorous algorithm for large ZD
+ CALL sla_REFRO(ZDO,AOPRMS(5),AOPRMS(6),AOPRMS(7),AOPRMS(8),
+ : AOPRMS(9),AOPRMS(1),AOPRMS(10),1D-8,DREF)
+ END IF
+
+ ZDT = ZDO+DREF
+
+* To Cartesian Az,ZD
+ CE = SIN(ZDT)
+ XAET = COS(AZ)*CE
+ YAET = SIN(AZ)*CE
+ ZAET = COS(ZDT)
+
+* Cartesian Az,ZD to Cartesian -HA,Dec
+ XMHDA = SPHI*XAET+CPHI*ZAET
+ YMHDA = YAET
+ ZMHDA = -CPHI*XAET+SPHI*ZAET
+
+* Diurnal aberration
+ DIURAB = -AOPRMS(4)
+ F = (1D0-DIURAB*YMHDA)
+ V(1) = F*XMHDA
+ V(2) = F*(YMHDA+DIURAB)
+ V(3) = F*ZMHDA
+
+* To spherical -HA,Dec
+ CALL sla_DCC2S(V,HMA,DAP)
+
+* Right Ascension
+ RAP = sla_DRANRM(ST+HMA)
+
+ END
diff --git a/src/slalib/obs.f b/src/slalib/obs.f
new file mode 100644
index 0000000..756678b
--- /dev/null
+++ b/src/slalib/obs.f
@@ -0,0 +1,844 @@
+ SUBROUTINE sla_OBS (N, C, NAME, W, P, H)
+*+
+* - - - -
+* O B S
+* - - - -
+*
+* Parameters of selected groundbased observing stations
+*
+* Given:
+* N int number specifying observing station
+*
+* Either given or returned
+* C c*(*) identifier specifying observing station
+*
+* Returned:
+* NAME c*(*) name of specified observing station
+* W dp longitude (radians, West +ve)
+* P dp geodetic latitude (radians, North +ve)
+* H dp height above sea level (metres)
+*
+* Notes:
+*
+* Station identifiers C may be up to 10 characters long,
+* and station names NAME may be up to 40 characters long.
+*
+* C and N are alternative ways of specifying the observing
+* station. The C option, which is the most generally useful,
+* may be selected by specifying an N value of zero or less.
+* If N is 1 or more, the parameters of the Nth station
+* in the currently supported list are interrogated, and
+* the station identifier C is returned as well as NAME, W,
+* P and H.
+*
+* If the station parameters are not available, either because
+* the station identifier C is not recognized, or because an
+* N value greater than the number of stations supported is
+* given, a name of '?' is returned and C, W, P and H are left
+* in their current states.
+*
+* Programs can obtain a list of all currently supported
+* stations by calling the routine repeatedly, with N=1,2,3...
+* When NAME='?' is seen, the list of stations has been
+* exhausted.
+*
+* Station numbers, identifiers, names and other details are
+* subject to change and should not be hardwired into
+* application programs.
+*
+* All station identifiers C are uppercase only; lowercase
+* characters must be converted to uppercase by the calling
+* program. The station names returned may contain both upper-
+* and lowercase. All characters up to the first space are
+* checked; thus an abbreviated ID will return the parameters
+* for the first station in the list which matches the
+* abbreviation supplied, and no station in the list will ever
+* contain embedded spaces. C must not have leading spaces.
+*
+* IMPORTANT -- BEWARE OF THE LONGITUDE SIGN CONVENTION. The
+* longitude returned by sla_OBS is west-positive in accordance
+* with astronomical usage. However, this sign convention is
+* left-handed and is the opposite of the one used by geographers;
+* elsewhere in SLALIB the preferable east-positive convention is
+* used. In particular, note that for use in sla_AOP, sla_AOPPA
+* and sla_OAP the sign of the longitude must be reversed.
+*
+* Users are urged to inform the author of any improvements
+* they would like to see made. For example:
+*
+* typographical corrections
+* more accurate parameters
+* better station identifiers or names
+* additional stations
+*
+* P.T.Wallace Starlink 21 April 1999
+*
+* Copyright (C) 1999 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ INTEGER N
+ CHARACTER C*(*),NAME*(*)
+ DOUBLE PRECISION W,P,H
+
+ INTEGER NMAX,M,NS,I
+ CHARACTER*10 CC
+
+ DOUBLE PRECISION AS2R,WEST,NORTH,EAST,SOUTH
+ INTEGER ID,IAM
+ REAL AS
+ PARAMETER (AS2R=0.484813681109535994D-5)
+
+* Table of station identifiers
+ PARAMETER (NMAX=75)
+ CHARACTER*10 CTAB(NMAX)
+ DATA CTAB (1) /'AAT '/
+ DATA CTAB (2) /'LPO4.2 '/
+ DATA CTAB (3) /'LPO2.5 '/
+ DATA CTAB (4) /'LPO1 '/
+ DATA CTAB (5) /'LICK120 '/
+ DATA CTAB (6) /'MMT '/
+ DATA CTAB (7) /'DAO72 '/
+ DATA CTAB (8) /'DUPONT '/
+ DATA CTAB (9) /'MTHOP1.5 '/
+ DATA CTAB (10) /'STROMLO74 '/
+ DATA CTAB (11) /'ANU2.3 '/
+ DATA CTAB (12) /'GBVA140 '/
+ DATA CTAB (13) /'TOLOLO4M '/
+ DATA CTAB (14) /'TOLOLO1.5M'/
+ DATA CTAB (15) /'TIDBINBLA '/
+ DATA CTAB (16) /'BLOEMF '/
+ DATA CTAB (17) /'BOSQALEGRE'/
+ DATA CTAB (18) /'FLAGSTF61 '/
+ DATA CTAB (19) /'LOWELL72 '/
+ DATA CTAB (20) /'HARVARD '/
+ DATA CTAB (21) /'OKAYAMA '/
+ DATA CTAB (22) /'KPNO158 '/
+ DATA CTAB (23) /'KPNO90 '/
+ DATA CTAB (24) /'KPNO84 '/
+ DATA CTAB (25) /'KPNO36FT '/
+ DATA CTAB (26) /'KOTTAMIA '/
+ DATA CTAB (27) /'ESO3.6 '/
+ DATA CTAB (28) /'MAUNAK88 '/
+ DATA CTAB (29) /'UKIRT '/
+ DATA CTAB (30) /'QUEBEC1.6 '/
+ DATA CTAB (31) /'MTEKAR '/
+ DATA CTAB (32) /'MTLEMMON60'/
+ DATA CTAB (33) /'MCDONLD2.7'/
+ DATA CTAB (34) /'MCDONLD2.1'/
+ DATA CTAB (35) /'PALOMAR200'/
+ DATA CTAB (36) /'PALOMAR60 '/
+ DATA CTAB (37) /'DUNLAP74 '/
+ DATA CTAB (38) /'HPROV1.93 '/
+ DATA CTAB (39) /'HPROV1.52 '/
+ DATA CTAB (40) /'SANPM83 '/
+ DATA CTAB (41) /'SAAO74 '/
+ DATA CTAB (42) /'TAUTNBG '/
+ DATA CTAB (43) /'CATALINA61'/
+ DATA CTAB (44) /'STEWARD90 '/
+ DATA CTAB (45) /'USSR6 '/
+ DATA CTAB (46) /'ARECIBO '/
+ DATA CTAB (47) /'CAMB5KM '/
+ DATA CTAB (48) /'CAMB1MILE '/
+ DATA CTAB (49) /'EFFELSBERG'/
+ DATA CTAB (50) /'GBVA300 '/
+ DATA CTAB (51) /'JODRELL1 '/
+ DATA CTAB (52) /'PARKES '/
+ DATA CTAB (53) /'VLA '/
+ DATA CTAB (54) /'SUGARGROVE'/
+ DATA CTAB (55) /'USSR600 '/
+ DATA CTAB (56) /'NOBEYAMA '/
+ DATA CTAB (57) /'JCMT '/
+ DATA CTAB (58) /'ESONTT '/
+ DATA CTAB (59) /'ST.ANDREWS'/
+ DATA CTAB (60) /'APO3.5 '/
+ DATA CTAB (61) /'KECK1 '/
+ DATA CTAB (62) /'TAUTSCHM '/
+ DATA CTAB (63) /'PALOMAR48 '/
+ DATA CTAB (64) /'UKST '/
+ DATA CTAB (65) /'KISO '/
+ DATA CTAB (66) /'ESOSCHM '/
+ DATA CTAB (67) /'ATCA '/
+ DATA CTAB (68) /'MOPRA '/
+ DATA CTAB (69) /'SUBARU '/
+ DATA CTAB (70) /'CFHT '/
+ DATA CTAB (71) /'KECK2 '/
+ DATA CTAB (72) /'GEMININ '/
+ DATA CTAB (73) /'FCRAO '/
+ DATA CTAB (74) /'IRTF '/
+ DATA CTAB (75) /'CSO '/
+
+* Degrees, arcminutes, arcseconds to radians
+ WEST(ID,IAM,AS)=AS2R*(DBLE(60*(60*ID+IAM))+DBLE(AS))
+ NORTH(ID,IAM,AS)=WEST(ID,IAM,AS)
+ EAST(ID,IAM,AS)=-WEST(ID,IAM,AS)
+ SOUTH(ID,IAM,AS)=-WEST(ID,IAM,AS)
+
+
+
+
+* Station specified by number or identifier?
+ IF (N.GT.0) THEN
+
+* Station specified by number
+ M=N
+ IF (M.LE.NMAX) C=CTAB(M)
+
+ ELSE
+
+* Station specified by identifier: determine corresponding number
+ CC=C
+ DO NS=1,NMAX
+ DO I=1,10
+ IF (CC(I:I).EQ.' ') GO TO 5
+ IF (CC(I:I).NE.CTAB(NS)(I:I)) GO TO 1
+ END DO
+ GO TO 5
+ 1 CONTINUE
+ END DO
+ NS=NMAX+1
+ 5 CONTINUE
+ IF (C(1:1).NE.' ') THEN
+ M=NS
+ ELSE
+ M=NMAX+1
+ END IF
+
+ END IF
+
+*
+* Return parameters of Mth station
+* --------------------------------
+
+ GO TO (10,20,30,40,50,60,70,80,90,100,
+ : 110,120,130,140,150,160,170,180,190,200,
+ : 210,220,230,240,250,260,270,280,290,300,
+ : 310,320,330,340,350,360,370,380,390,400,
+ : 410,420,430,440,450,460,470,480,490,500,
+ : 510,520,530,540,550,560,570,580,590,600,
+ : 610,620,630,640,650,660,670,680,690,700,
+ : 710,720,730,740,750) M
+ GO TO 9000
+
+* AAT (Observer's Guide) AAT
+ 10 CONTINUE
+ NAME='Anglo-Australian 3.9m Telescope'
+ W=EAST(149,03,57.91)
+ P=SOUTH(31,16,37.34)
+ H=1164D0
+ GO TO 9999
+
+* WHT (Gemini, April 1987) LPO4.2
+ 20 CONTINUE
+ NAME='William Herschel 4.2m Telescope'
+ W=WEST(17,52,53.9)
+ P=NORTH(28,45,38.1)
+ H=2332D0
+ GO TO 9999
+
+* INT (Gemini, April 1987) LPO2.5
+ 30 CONTINUE
+ NAME='Isaac Newton 2.5m Telescope'
+ W=WEST(17,52,39.5)
+ P=NORTH(28,45,43.2)
+ H=2336D0
+ GO TO 9999
+
+* JKT (Gemini, April 1987) LPO1
+ 40 CONTINUE
+ NAME='Jacobus Kapteyn 1m Telescope'
+ W=WEST(17,52,41.2)
+ P=NORTH(28,45,39.9)
+ H=2364D0
+ GO TO 9999
+
+* Lick 120" (1984 Almanac) LICK120
+ 50 CONTINUE
+ NAME='Lick 120 inch'
+ W=WEST(121,38,09.9)
+ P=NORTH(37,20,35.2)
+ H=1290D0
+ GO TO 9999
+
+* MMT 6.5m conversion (MMT Observatory website) MMT
+ 60 CONTINUE
+ NAME='MMT 6.5m, Mt Hopkins'
+ W=WEST(110,53,04.4)
+ P=NORTH(31,41,19.6)
+ H=2608D0
+ GO TO 9999
+
+* Victoria B.C. 1.85m (1984 Almanac) DAO72
+ 70 CONTINUE
+ NAME='DAO Victoria BC 1.85 metre'
+ W=WEST(123,25,01.18)
+ P=NORTH(48,31,11.9)
+ H=238D0
+ GO TO 9999
+
+* Las Campanas (1983 Almanac) DUPONT
+ 80 CONTINUE
+ NAME='Du Pont 2.5m Telescope, Las Campanas'
+ W=WEST(70,42,9.)
+ P=SOUTH(29,00,11.)
+ H=2280D0
+ GO TO 9999
+
+* Mt Hopkins 1.5m (1983 Almanac) MTHOP1.5
+ 90 CONTINUE
+ NAME='Mt Hopkins 1.5 metre'
+ W=WEST(110,52,39.00)
+ P=NORTH(31,40,51.4)
+ H=2344D0
+ GO TO 9999
+
+* Mt Stromlo 74" (1983 Almanac) STROMLO74
+ 100 CONTINUE
+ NAME='Mount Stromlo 74 inch'
+ W=EAST(149,00,27.59)
+ P=SOUTH(35,19,14.3)
+ H=767D0
+ GO TO 9999
+
+* ANU 2.3m, SSO (Gary Hovey) ANU2.3
+ 110 CONTINUE
+ NAME='Siding Spring 2.3 metre'
+ W=EAST(149,03,40.3)
+ P=SOUTH(31,16,24.1)
+ H=1149D0
+ GO TO 9999
+
+* Greenbank 140' (1983 Almanac) GBVA140
+ 120 CONTINUE
+ NAME='Greenbank 140 foot'
+ W=WEST(79,50,09.61)
+ P=NORTH(38,26,15.4)
+ H=881D0
+ GO TO 9999
+
+* Cerro Tololo 4m (1982 Almanac) TOLOLO4M
+ 130 CONTINUE
+ NAME='Cerro Tololo 4 metre'
+ W=WEST(70,48,53.6)
+ P=SOUTH(30,09,57.8)
+ H=2235D0
+ GO TO 9999
+
+* Cerro Tololo 1.5m (1982 Almanac) TOLOLO1.5M
+ 140 CONTINUE
+ NAME='Cerro Tololo 1.5 metre'
+ W=WEST(70,48,54.5)
+ P=SOUTH(30,09,56.3)
+ H=2225D0
+ GO TO 9999
+
+* Tidbinbilla 64m (1982 Almanac) TIDBINBLA
+ 150 CONTINUE
+ NAME='Tidbinbilla 64 metre'
+ W=EAST(148,58,48.20)
+ P=SOUTH(35,24,14.3)
+ H=670D0
+ GO TO 9999
+
+* Bloemfontein 1.52m (1981 Almanac) BLOEMF
+ 160 CONTINUE
+ NAME='Bloemfontein 1.52 metre'
+ W=EAST(26,24,18.)
+ P=SOUTH(29,02,18.)
+ H=1387D0
+ GO TO 9999
+
+* Bosque Alegre 1.54m (1981 Almanac) BOSQALEGRE
+ 170 CONTINUE
+ NAME='Bosque Alegre 1.54 metre'
+ W=WEST(64,32,48.0)
+ P=SOUTH(31,35,53.)
+ H=1250D0
+ GO TO 9999
+
+* USNO 61" astrographic reflector, Flagstaff (1981 Almanac) FLAGSTF61
+ 180 CONTINUE
+ NAME='USNO 61 inch astrograph, Flagstaff'
+ W=WEST(111,44,23.6)
+ P=NORTH(35,11,02.5)
+ H=2316D0
+ GO TO 9999
+
+* Lowell 72" (1981 Almanac) LOWELL72
+ 190 CONTINUE
+ NAME='Perkins 72 inch, Lowell'
+ W=WEST(111,32,09.3)
+ P=NORTH(35,05,48.6)
+ H=2198D0
+ GO TO 9999
+
+* Harvard 1.55m (1981 Almanac) HARVARD
+ 200 CONTINUE
+ NAME='Harvard College Observatory 1.55m'
+ W=WEST(71,33,29.32)
+ P=NORTH(42,30,19.0)
+ H=185D0
+ GO TO 9999
+
+* Okayama 1.88m (1981 Almanac) OKAYAMA
+ 210 CONTINUE
+ NAME='Okayama 1.88 metre'
+ W=EAST(133,35,47.29)
+ P=NORTH(34,34,26.1)
+ H=372D0
+ GO TO 9999
+
+* Kitt Peak Mayall 4m (1981 Almanac) KPNO158
+ 220 CONTINUE
+ NAME='Kitt Peak 158 inch'
+ W=WEST(111,35,57.61)
+ P=NORTH(31,57,50.3)
+ H=2120D0
+ GO TO 9999
+
+* Kitt Peak 90 inch (1981 Almanac) KPNO90
+ 230 CONTINUE
+ NAME='Kitt Peak 90 inch'
+ W=WEST(111,35,58.24)
+ P=NORTH(31,57,46.9)
+ H=2071D0
+ GO TO 9999
+
+* Kitt Peak 84 inch (1981 Almanac) KPNO84
+ 240 CONTINUE
+ NAME='Kitt Peak 84 inch'
+ W=WEST(111,35,51.56)
+ P=NORTH(31,57,29.2)
+ H=2096D0
+ GO TO 9999
+
+* Kitt Peak 36 foot (1981 Almanac) KPNO36FT
+ 250 CONTINUE
+ NAME='Kitt Peak 36 foot'
+ W=WEST(111,36,51.12)
+ P=NORTH(31,57,12.1)
+ H=1939D0
+ GO TO 9999
+
+* Kottamia 74" (1981 Almanac) KOTTAMIA
+ 260 CONTINUE
+ NAME='Kottamia 74 inch'
+ W=EAST(31,49,30.)
+ P=NORTH(29,55,54.)
+ H=476D0
+ GO TO 9999
+
+* La Silla 3.6m (1981 Almanac) ESO3.6
+ 270 CONTINUE
+ NAME='ESO 3.6 metre'
+ W=WEST(70,43,36.)
+ P=SOUTH(29,15,36.)
+ H=2428D0
+ GO TO 9999
+
+* Mauna Kea 88 inch MAUNAK88
+* (IfA website, Richard Wainscoat)
+ 280 CONTINUE
+ NAME='Mauna Kea 88 inch'
+ W=WEST(155,28,09.96)
+ P=NORTH(19,49,22.77)
+ H=4213.6D0
+ GO TO 9999
+
+* UKIRT (IfA website, Richard Wainscoat) UKIRT
+ 290 CONTINUE
+ NAME='UK Infra Red Telescope'
+ W=WEST(155,28,13.18)
+ P=NORTH(19,49,20.75)
+ H=4198.5D0
+ GO TO 9999
+
+* Quebec 1.6m (1981 Almanac) QUEBEC1.6
+ 300 CONTINUE
+ NAME='Quebec 1.6 metre'
+ W=WEST(71,09,09.7)
+ P=NORTH(45,27,20.6)
+ H=1114D0
+ GO TO 9999
+
+* Mt Ekar 1.82m (1981 Almanac) MTEKAR
+ 310 CONTINUE
+ NAME='Mt Ekar 1.82 metre'
+ W=EAST(11,34,15.)
+ P=NORTH(45,50,48.)
+ H=1365D0
+ GO TO 9999
+
+* Mt Lemmon 60" (1981 Almanac) MTLEMMON60
+ 320 CONTINUE
+ NAME='Mt Lemmon 60 inch'
+ W=WEST(110,42,16.9)
+ P=NORTH(32,26,33.9)
+ H=2790D0
+ GO TO 9999
+
+* Mt Locke 2.7m (1981 Almanac) MCDONLD2.7
+ 330 CONTINUE
+ NAME='McDonald 2.7 metre'
+ W=WEST(104,01,17.60)
+ P=NORTH(30,40,17.7)
+ H=2075D0
+ GO TO 9999
+
+* Mt Locke 2.1m (1981 Almanac) MCDONLD2.1
+ 340 CONTINUE
+ NAME='McDonald 2.1 metre'
+ W=WEST(104,01,20.10)
+ P=NORTH(30,40,17.7)
+ H=2075D0
+ GO TO 9999
+
+* Palomar 200" (1981 Almanac) PALOMAR200
+ 350 CONTINUE
+ NAME='Palomar 200 inch'
+ W=WEST(116,51,50.)
+ P=NORTH(33,21,22.)
+ H=1706D0
+ GO TO 9999
+
+* Palomar 60" (1981 Almanac) PALOMAR60
+ 360 CONTINUE
+ NAME='Palomar 60 inch'
+ W=WEST(116,51,31.)
+ P=NORTH(33,20,56.)
+ H=1706D0
+ GO TO 9999
+
+* David Dunlap 74" (1981 Almanac) DUNLAP74
+ 370 CONTINUE
+ NAME='David Dunlap 74 inch'
+ W=WEST(79,25,20.)
+ P=NORTH(43,51,46.)
+ H=244D0
+ GO TO 9999
+
+* Haute Provence 1.93m (1981 Almanac) HPROV1.93
+ 380 CONTINUE
+ NAME='Haute Provence 1.93 metre'
+ W=EAST(5,42,46.75)
+ P=NORTH(43,55,53.3)
+ H=665D0
+ GO TO 9999
+
+* Haute Provence 1.52m (1981 Almanac) HPROV1.52
+ 390 CONTINUE
+ NAME='Haute Provence 1.52 metre'
+ W=EAST(5,42,43.82)
+ P=NORTH(43,56,00.2)
+ H=667D0
+ GO TO 9999
+
+* San Pedro Martir 83" (1981 Almanac) SANPM83
+ 400 CONTINUE
+ NAME='San Pedro Martir 83 inch'
+ W=WEST(115,27,47.)
+ P=NORTH(31,02,38.)
+ H=2830D0
+ GO TO 9999
+
+* Sutherland 74" (1981 Almanac) SAAO74
+ 410 CONTINUE
+ NAME='Sutherland 74 inch'
+ W=EAST(20,48,44.3)
+ P=SOUTH(32,22,43.4)
+ H=1771D0
+ GO TO 9999
+
+* Tautenburg 2m (1981 Almanac) TAUTNBG
+ 420 CONTINUE
+ NAME='Tautenburg 2 metre'
+ W=EAST(11,42,45.)
+ P=NORTH(50,58,51.)
+ H=331D0
+ GO TO 9999
+
+* Catalina 61" (1981 Almanac) CATALINA61
+ 430 CONTINUE
+ NAME='Catalina 61 inch'
+ W=WEST(110,43,55.1)
+ P=NORTH(32,25,00.7)
+ H=2510D0
+ GO TO 9999
+
+* Steward 90" (1981 Almanac) STEWARD90
+ 440 CONTINUE
+ NAME='Steward 90 inch'
+ W=WEST(111,35,58.24)
+ P=NORTH(31,57,46.9)
+ H=2071D0
+ GO TO 9999
+
+* Russian 6m (1981 Almanac) USSR6
+ 450 CONTINUE
+ NAME='USSR 6 metre'
+ W=EAST(41,26,30.0)
+ P=NORTH(43,39,12.)
+ H=2100D0
+ GO TO 9999
+
+* Arecibo 1000' (1981 Almanac) ARECIBO
+ 460 CONTINUE
+ NAME='Arecibo 1000 foot'
+ W=WEST(66,45,11.1)
+ P=NORTH(18,20,36.6)
+ H=496D0
+ GO TO 9999
+
+* Cambridge 5km (1981 Almanac) CAMB5KM
+ 470 CONTINUE
+ NAME='Cambridge 5km'
+ W=EAST(0,02,37.23)
+ P=NORTH(52,10,12.2)
+ H=17D0
+ GO TO 9999
+
+* Cambridge 1 mile (1981 Almanac) CAMB1MILE
+ 480 CONTINUE
+ NAME='Cambridge 1 mile'
+ W=EAST(0,02,21.64)
+ P=NORTH(52,09,47.3)
+ H=17D0
+ GO TO 9999
+
+* Bonn 100m (1981 Almanac) EFFELSBERG
+ 490 CONTINUE
+ NAME='Effelsberg 100 metre'
+ W=EAST(6,53,01.5)
+ P=NORTH(50,31,28.6)
+ H=366D0
+ GO TO 9999
+
+* Greenbank 300' (1981 Almanac) GBVA300 (R.I.P.)
+ 500 CONTINUE
+ NAME='Greenbank 300 foot'
+ W=WEST(79,50,56.36)
+ P=NORTH(38,25,46.3)
+ H=894D0
+ GO TO 9999
+
+* Jodrell Bank Mk 1 (1981 Almanac) JODRELL1
+ 510 CONTINUE
+ NAME='Jodrell Bank 250 foot'
+ W=WEST(2,18,25.)
+ P=NORTH(53,14,10.5)
+ H=78D0
+ GO TO 9999
+
+* Australia Telescope Parkes Observatory PARKES
+* (Peter te Lintel Hekkert, private comm)
+ 520 CONTINUE
+ NAME='Parkes 64 metre'
+ W=EAST(148,15,44.3591)
+ P=SOUTH(32,59,59.8657)
+ H=391.79D0
+ GO TO 9999
+
+* VLA (1981 Almanac) VLA
+ 530 CONTINUE
+ NAME='Very Large Array'
+ W=WEST(107,37,03.82)
+ P=NORTH(34,04,43.5)
+ H=2124D0
+ GO TO 9999
+
+* Sugar Grove 150' (1981 Almanac) SUGARGROVE
+ 540 CONTINUE
+ NAME='Sugar Grove 150 foot'
+ W=WEST(79,16,23.)
+ P=NORTH(38,31,14.)
+ H=705D0
+ GO TO 9999
+
+* Russian 600' (1981 Almanac) USSR600
+ 550 CONTINUE
+ NAME='USSR 600 foot'
+ W=EAST(41,35,25.5)
+ P=NORTH(43,49,32.)
+ H=973D0
+ GO TO 9999
+
+* Nobeyama 45 metre mm dish (based on 1981 Almanac entry) NOBEYAMA
+ 560 CONTINUE
+ NAME='Nobeyama 45 metre'
+ W=EAST(138,29,12.)
+ P=NORTH(35,56,19.)
+ H=1350D0
+ GO TO 9999
+
+* James Clerk Maxwell 15 metre mm telescope, Mauna Kea JCMT
+* (IfA website, Richard Wainscoat, height from I.Coulson)
+ 570 CONTINUE
+ NAME='JCMT 15 metre'
+ W=WEST(155,28,37.20)
+ P=NORTH(19,49,22.11)
+ H=4111D0
+ GO TO 9999
+
+* ESO 3.5 metre NTT, La Silla (K.Wirenstrand) ESONTT
+ 580 CONTINUE
+ NAME='ESO 3.5 metre NTT'
+ W=WEST(70,43,07.)
+ P=SOUTH(29,15,30.)
+ H=2377D0
+ GO TO 9999
+
+* St Andrews University Observatory (1982 Almanac) ST.ANDREWS
+ 590 CONTINUE
+ NAME='St Andrews'
+ W=WEST(2,48,52.5)
+ P=NORTH(56,20,12.)
+ H=30D0
+ GO TO 9999
+
+* Apache Point 3.5 metre (R.Owen) APO3.5
+ 600 CONTINUE
+ NAME='Apache Point 3.5m'
+ W=WEST(105,49,11.56)
+ P=NORTH(32,46,48.96)
+ H=2809D0
+ GO TO 9999
+
+* W.M.Keck Observatory, Telescope 1 KECK1
+* (William Lupton, private comm)
+ 610 CONTINUE
+ NAME='Keck 10m Telescope #1'
+ W=WEST(155,28,28.99)
+ P=NORTH(19,49,33.41)
+ H=4160D0
+ GO TO 9999
+
+* Tautenberg Schmidt (1983 Almanac) TAUTSCHM
+ 620 CONTINUE
+ NAME='Tautenberg 1.34 metre Schmidt'
+ W=EAST(11,42,45.0)
+ P=NORTH(50,58,51.0)
+ H=331D0
+ GO TO 9999
+
+* Palomar Schmidt (1981 Almanac) PALOMAR48
+ 630 CONTINUE
+ NAME='Palomar 48-inch Schmidt'
+ W=WEST(116,51,32.0)
+ P=NORTH(33,21,26.0)
+ H=1706D0
+ GO TO 9999
+
+* UK Schmidt, Siding Spring (1983 Almanac) UKST
+ 640 CONTINUE
+ NAME='UK 1.2 metre Schmidt, Siding Spring'
+ W=EAST(149,04,12.8)
+ P=SOUTH(31,16,27.8)
+ H=1145D0
+ GO TO 9999
+
+* Kiso Schmidt, Japan (1981 Almanac) KISO
+ 650 CONTINUE
+ NAME='Kiso 1.05 metre Schmidt, Japan'
+ W=EAST(137,37,42.2)
+ P=NORTH(35,47,38.7)
+ H=1130D0
+ GO TO 9999
+
+* ESO Schmidt, La Silla (1981 Almanac) ESOSCHM
+ 660 CONTINUE
+ NAME='ESO 1 metre Schmidt, La Silla'
+ W=WEST(70,43,46.5)
+ P=SOUTH(29,15,25.8)
+ H=2347D0
+ GO TO 9999
+
+* Australia Telescope Compact Array ATCA
+* (WGS84 coordinates of Station 35, Mark Calabretta, private comm)
+ 670 CONTINUE
+ NAME='Australia Telescope Compact Array'
+ W=EAST(149,33,00.500)
+ P=SOUTH(30,18,46.385)
+ H=236.9D0
+ GO TO 9999
+
+* Australia Telescope Mopra Observatory MOPRA
+* (Peter te Lintel Hekkert, private comm)
+ 680 CONTINUE
+ NAME='ATNF Mopra Observatory'
+ W=EAST(149,05,58.732)
+ P=SOUTH(31,16,04.451)
+ H=850D0
+ GO TO 9999
+
+* Subaru telescope, Mauna Kea SUBARU
+* (IfA website, Richard Wainscoat)
+ 690 CONTINUE
+ NAME='Subaru 8m telescope'
+ W=WEST(155,28,33.67)
+ P=NORTH(19,49,31.81)
+ H=4163D0
+ GO TO 9999
+
+* Canada-France-Hawaii Telescope, Mauna Kea CFHT
+* (IfA website, Richard Wainscoat)
+ 700 CONTINUE
+ NAME='Canada-France-Hawaii 3.6m Telescope'
+ W=WEST(155,28,07.95)
+ P=NORTH(19,49,30.91)
+ H=4204.1D0
+ GO TO 9999
+
+* W.M.Keck Observatory, Telescope 2 KECK2
+* (William Lupton, private comm)
+ 710 CONTINUE
+ NAME='Keck 10m Telescope #2'
+ W=WEST(155,28,27.24)
+ P=NORTH(19,49,35.62)
+ H=4159.6D0
+ GO TO 9999
+
+* Gemini North, Mauna Kea GEMININ
+* (IfA website, Richard Wainscoat)
+ 720 CONTINUE
+ NAME='Gemini North 8-m telescope'
+ W=WEST(155,28,08.57)
+ P=NORTH(19,49,25.69)
+ H=4213.4D0
+ GO TO 9999
+
+* Five College Radio Astronomy Observatory FCRAO
+* (Tim Jenness, private comm)
+ 730 CONTINUE
+ NAME='Five College Radio Astronomy Obs'
+ W=WEST(72,20,42.0)
+ P=NORTH(42,23,30.0)
+ H=314D0
+ GO TO 9999
+
+* NASA Infra Red Telescope Facility IRTF
+* (IfA website, Richard Wainscoat)
+ 740 CONTINUE
+ NAME='NASA IR Telescope Facility, Mauna Kea'
+ W=WEST(155,28,19.20)
+ P=NORTH(19,49,34.39)
+ H=4168.1D0
+ GO TO 9999
+
+* Caltech Submillimeter Observatory CSO
+* (IfA website, Richard Wainscoat; height estimated)
+ 750 CONTINUE
+ NAME='Caltech Sub-mm Observatory, Mauna Kea'
+ W=WEST(155,28,31.79)
+ P=NORTH(19,49,20.78)
+ H=4080D0
+ GO TO 9999
+
+* Unrecognized station
+ 9000 CONTINUE
+ NAME='?'
+
+* Exit
+ 9999 CONTINUE
+
+ END
diff --git a/src/slalib/pa.f b/src/slalib/pa.f
new file mode 100644
index 0000000..8c68296
--- /dev/null
+++ b/src/slalib/pa.f
@@ -0,0 +1,46 @@
+ DOUBLE PRECISION FUNCTION sla_PA (HA, DEC, PHI)
+*+
+* - - -
+* P A
+* - - -
+*
+* HA, Dec to Parallactic Angle (double precision)
+*
+* Given:
+* HA d hour angle in radians (geocentric apparent)
+* DEC d declination in radians (geocentric apparent)
+* PHI d observatory latitude in radians (geodetic)
+*
+* The result is in the range -pi to +pi
+*
+* Notes:
+*
+* 1) The parallactic angle at a point in the sky is the position
+* angle of the vertical, i.e. the angle between the direction to
+* the pole and to the zenith. In precise applications care must
+* be taken only to use geocentric apparent HA,Dec and to consider
+* separately the effects of atmospheric refraction and telescope
+* mount errors.
+*
+* 2) At the pole a zero result is returned.
+*
+* P.T.Wallace Starlink 16 August 1994
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION HA,DEC,PHI
+
+ DOUBLE PRECISION CP,SQSZ,CQSZ
+
+
+
+ CP=COS(PHI)
+ SQSZ=CP*SIN(HA)
+ CQSZ=SIN(PHI)*COS(DEC)-CP*SIN(DEC)*COS(HA)
+ IF (SQSZ.EQ.0D0.AND.CQSZ.EQ.0D0) CQSZ=1D0
+ sla_PA=ATAN2(SQSZ,CQSZ)
+
+ END
diff --git a/src/slalib/pav.f b/src/slalib/pav.f
new file mode 100644
index 0000000..7eb1c12
--- /dev/null
+++ b/src/slalib/pav.f
@@ -0,0 +1,53 @@
+ REAL FUNCTION sla_PAV ( V1, V2 )
+*+
+* - - - -
+* P A V
+* - - - -
+*
+* Position angle of one celestial direction with respect to another.
+*
+* (single precision)
+*
+* Given:
+* V1 r(3) direction cosines of one point
+* V2 r(3) direction cosines of the other point
+*
+* (The coordinate frames correspond to RA,Dec, Long,Lat etc.)
+*
+* The result is the bearing (position angle), in radians, of point
+* V2 with respect to point V1. It is in the range +/- pi. The
+* sense is such that if V2 is a small distance east of V1, the
+* bearing is about +pi/2. Zero is returned if the two points
+* are coincident.
+*
+* V1 and V2 do not have to be unit vectors.
+*
+* The routine sla_BEAR performs an equivalent function except
+* that the points are specified in the form of spherical
+* coordinates.
+*
+* Called: sla_DPAV
+*
+* Patrick Wallace Starlink 23 May 1997
+*
+* Copyright (C) 1997 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL V1(3),V2(3)
+
+ INTEGER I
+ DOUBLE PRECISION D1(3),D2(3)
+
+ DOUBLE PRECISION sla_DPAV
+
+
+* Call the double precision version
+ DO I=1,3
+ D1(I)=V1(I)
+ D2(I)=V2(I)
+ END DO
+ sla_PAV=sla_DPAV(D1,D2)
+
+ END
diff --git a/src/slalib/pc.bat b/src/slalib/pc.bat
new file mode 100755
index 0000000..d0f43b4
--- /dev/null
+++ b/src/slalib/pc.bat
@@ -0,0 +1,75 @@
+@echo off
+rem
+rem - - - - - - -
+rem P C . B A T
+rem - - - - - - -
+rem
+rem Create the SLALIB library, starting either from the release
+rem version copied from the VAX or from the PC version produced
+rem by a prior run of the present procedure.
+rem
+rem Environment variable temp must point to a scratch directory.
+rem
+rem !!! Non-reversible - it is not possible to recreate !!!
+rem !!! the VAX version from the PC version !!!
+rem
+rem P.T.Wallace Starlink 25 April 1996
+rem
+if exist *.pcm copy *.pcm *.for
+if exist *.pcm del *.pcm
+if exist *.c del *.c
+if exist *.obj del *.obj
+if exist *.exe del *.exe
+if exist *.olb del *.olb
+if exist *.vax del *.vax
+if exist *.ush del *.ush
+if exist *.cnv del *.cnv
+if exist *.mip del *.mip
+if exist *.sun del *.sun
+if exist *.ind del *.ind
+if exist *.com del *.com
+if exist *.new del *.new
+if exist *.obs del *.obs
+if exist *.toc del *.toc
+if exist *.dir del *.dir
+if exist sla_test.for del sla_test.for
+if exist makefile del makefile
+if exist mk del mk
+if exist sla_link del sla_link
+if exist a*.for fl/c /FPi a*.for
+if exist b*.for fl/c /FPi b*.for
+if exist c*.for fl/c /FPi c*.for
+if exist d*.for fl/c /FPi d*.for
+if exist e*.for fl/c /FPi e*.for
+if exist f*.for fl/c /FPi f*.for
+if exist g*.for fl/c /FPi g*.for
+if exist h*.for fl/c /FPi h*.for
+if exist i*.for fl/c /FPi i*.for
+if exist j*.for fl/c /FPi j*.for
+if exist k*.for fl/c /FPi k*.for
+if exist l*.for fl/c /FPi l*.for
+if exist m*.for fl/c /FPi m*.for
+if exist n*.for fl/c /FPi n*.for
+if exist o*.for fl/c /FPi o*.for
+if exist p*.for fl/c /FPi p*.for
+if exist q*.for fl/c /FPi q*.for
+if exist r*.for fl/c /FPi r*.for
+if exist s*.for fl/c /FPi s*.for
+if exist t*.for fl/c /FPi t*.for
+if exist u*.for fl/c /FPi u*.for
+if exist v*.for fl/c /FPi v*.for
+if exist w*.for fl/c /FPi w*.for
+if exist x*.for fl/c /FPi x*.for
+if exist y*.for fl/c /FPi y*.for
+if exist z*.for fl/c /FPi z*.for
+echo Building library SLALIB.LIB ...
+@echo slalib > %temp%\slalib.tmp
+@echo y >> %temp%\slalib.tmp
+for %%f in (*.obj) do echo +%%f& >> %temp%\slalib.tmp
+@echo ;. >> %temp%\slalib.tmp
+if exist slalib.lib del slalib.lib
+lib @%temp%\slalib.tmp
+del %temp%\slalib.tmp
+del *.obj
+echo ... done.
+echo:
diff --git a/src/slalib/pcd.f b/src/slalib/pcd.f
new file mode 100644
index 0000000..71241a7
--- /dev/null
+++ b/src/slalib/pcd.f
@@ -0,0 +1,59 @@
+ SUBROUTINE sla_PCD (DISCO,X,Y)
+*+
+* - - - -
+* P C D
+* - - - -
+*
+* Apply pincushion/barrel distortion to a tangent-plane [x,y].
+*
+* Given:
+* DISCO d pincushion/barrel distortion coefficient
+* X,Y d tangent-plane coordinates
+*
+* Returned:
+* X,Y d distorted coordinates
+*
+* Notes:
+*
+* 1) The distortion is of the form RP = R*(1 + C*R**2), where R is
+* the radial distance from the tangent point, C is the DISCO
+* argument, and RP is the radial distance in the presence of
+* the distortion.
+*
+* 2) For pincushion distortion, C is +ve; for barrel distortion,
+* C is -ve.
+*
+* 3) For X,Y in units of one projection radius (in the case of
+* a photographic plate, the focal length), the following
+* DISCO values apply:
+*
+* Geometry DISCO
+*
+* astrograph 0.0
+* Schmidt -0.3333
+* AAT PF doublet +147.069
+* AAT PF triplet +178.585
+* AAT f/8 +21.20
+* JKT f/8 +13.32
+*
+* 4) There is a companion routine, sla_UNPCD, which performs
+* an approximately inverse operation.
+*
+* P.T.Wallace Starlink 31 December 1992
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION DISCO,X,Y
+
+ DOUBLE PRECISION F
+
+
+
+ F=1D0+DISCO*(X*X+Y*Y)
+ X=X*F
+ Y=Y*F
+
+ END
diff --git a/src/slalib/pda2h.f b/src/slalib/pda2h.f
new file mode 100644
index 0000000..cd31acf
--- /dev/null
+++ b/src/slalib/pda2h.f
@@ -0,0 +1,100 @@
+ SUBROUTINE sla_PDA2H (P, D, A, H1, J1, H2, J2)
+*+
+* - - - - - -
+* P D A 2 H
+* - - - - - -
+*
+* Hour Angle corresponding to a given azimuth
+*
+* (double precision)
+*
+* Given:
+* P d latitude
+* D d declination
+* A d azimuth
+*
+* Returned:
+* H1 d hour angle: first solution if any
+* J1 i flag: 0 = solution 1 is valid
+* H2 d hour angle: second solution if any
+* J2 i flag: 0 = solution 2 is valid
+*
+* Called: sla_DRANGE
+*
+* P.T.Wallace Starlink 6 October 1994
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION P,D,A,H1
+ INTEGER J1
+ DOUBLE PRECISION H2
+ INTEGER J2
+
+ DOUBLE PRECISION DPI
+ PARAMETER (DPI=3.141592653589793238462643D0)
+ DOUBLE PRECISION D90
+ PARAMETER (D90=DPI/2D0)
+ DOUBLE PRECISION TINY
+ PARAMETER (TINY=1D-12)
+ DOUBLE PRECISION PN,AN,DN,SA,CA,SASP,QT,QB,HPT,T
+ DOUBLE PRECISION sla_DRANGE
+
+
+* Preset status flags to OK
+ J1=0
+ J2=0
+
+* Adjust latitude, azimuth, declination to avoid critical values
+ PN=sla_DRANGE(P)
+ IF (ABS(ABS(PN)-D90).LT.TINY) THEN
+ PN=PN-SIGN(TINY,PN)
+ ELSE IF (ABS(PN).LT.TINY) THEN
+ PN=TINY
+ END IF
+ AN=sla_DRANGE(A)
+ IF (ABS(ABS(AN)-DPI).LT.TINY) THEN
+ AN=AN-SIGN(TINY,AN)
+ ELSE IF (ABS(AN).LT.TINY) THEN
+ AN=TINY
+ END IF
+ DN=sla_DRANGE(D)
+ IF (ABS(ABS(DN)-ABS(P)).LT.TINY) THEN
+ DN=DN-SIGN(TINY,DN)
+ ELSE IF (ABS(ABS(DN)-D90).LT.TINY) THEN
+ DN=DN-SIGN(TINY,DN)
+ ELSE IF (ABS(DN).LT.TINY) THEN
+ DN=TINY
+ END IF
+
+* Useful functions
+ SA=SIN(AN)
+ CA=COS(AN)
+ SASP=SA*SIN(PN)
+
+* Quotient giving sin(h+t)
+ QT=SIN(DN)*SA*COS(PN)
+ QB=COS(DN)*SQRT(CA*CA+SASP*SASP)
+
+* Any solutions?
+ IF (ABS(QT).LE.QB) THEN
+
+* Yes: find h+t and t
+ HPT=ASIN(QT/QB)
+ T=ATAN2(SASP,-CA)
+
+* The two solutions
+ H1=sla_DRANGE(HPT-T)
+ H2=sla_DRANGE(-HPT-(T+DPI))
+
+* Reject unless h and A different signs
+ IF (H1*AN.GT.0D0) J1=-1
+ IF (H2*AN.GT.0D0) J2=-1
+ ELSE
+ J1=-1
+ J2=-1
+ END IF
+
+ END
diff --git a/src/slalib/pdq2h.f b/src/slalib/pdq2h.f
new file mode 100644
index 0000000..a12ba72
--- /dev/null
+++ b/src/slalib/pdq2h.f
@@ -0,0 +1,98 @@
+ SUBROUTINE sla_PDQ2H (P, D, Q, H1, J1, H2, J2)
+*+
+* - - - - - -
+* P D Q 2 H
+* - - - - - -
+*
+* Hour Angle corresponding to a given parallactic angle
+*
+* (double precision)
+*
+* Given:
+* P d latitude
+* D d declination
+* Q d parallactic angle
+*
+* Returned:
+* H1 d hour angle: first solution if any
+* J1 i flag: 0 = solution 1 is valid
+* H2 d hour angle: second solution if any
+* J2 i flag: 0 = solution 2 is valid
+*
+* Called: sla_DRANGE
+*
+* P.T.Wallace Starlink 6 October 1994
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION P,D,Q,H1
+ INTEGER J1
+ DOUBLE PRECISION H2
+ INTEGER J2
+
+ DOUBLE PRECISION DPI
+ PARAMETER (DPI=3.141592653589793238462643D0)
+ DOUBLE PRECISION D90
+ PARAMETER (D90=DPI/2D0)
+ DOUBLE PRECISION TINY
+ PARAMETER (TINY=1D-12)
+ DOUBLE PRECISION PN,QN,DN,SQ,CQ,SQSD,QT,QB,HPT,T
+ DOUBLE PRECISION sla_DRANGE
+
+
+* Preset status flags to OK
+ J1=0
+ J2=0
+
+* Adjust latitude, declination, parallactic angle to avoid critical values
+ PN=sla_DRANGE(P)
+ IF (ABS(ABS(PN)-D90).LT.TINY) THEN
+ PN=PN-SIGN(TINY,PN)
+ ELSE IF (ABS(PN).LT.TINY) THEN
+ PN=TINY
+ END IF
+ QN=sla_DRANGE(Q)
+ IF (ABS(ABS(QN)-DPI).LT.TINY) THEN
+ QN=QN-SIGN(TINY,QN)
+ ELSE IF (ABS(QN).LT.TINY) THEN
+ QN=TINY
+ END IF
+ DN=sla_DRANGE(D)
+ IF (ABS(ABS(D)-ABS(P)).LT.TINY) THEN
+ DN=DN-SIGN(TINY,DN)
+ ELSE IF (ABS(ABS(D)-D90).LT.TINY) THEN
+ DN=DN-SIGN(TINY,DN)
+ END IF
+
+* Useful functions
+ SQ=SIN(QN)
+ CQ=COS(QN)
+ SQSD=SQ*SIN(DN)
+
+* Quotient giving sin(h+t)
+ QT=SIN(PN)*SQ*COS(DN)
+ QB=COS(PN)*SQRT(CQ*CQ+SQSD*SQSD)
+
+* Any solutions?
+ IF (ABS(QT).LE.QB) THEN
+
+* Yes: find h+t and t
+ HPT=ASIN(QT/QB)
+ T=ATAN2(SQSD,CQ)
+
+* The two solutions
+ H1=sla_DRANGE(HPT-T)
+ H2=sla_DRANGE(-HPT-(T+DPI))
+
+* Reject if h and Q different signs
+ IF (H1*QN.LT.0D0) J1=-1
+ IF (H2*QN.LT.0D0) J2=-1
+ ELSE
+ J1=-1
+ J2=-1
+ END IF
+
+ END
diff --git a/src/slalib/permut.f b/src/slalib/permut.f
new file mode 100644
index 0000000..20b8a27
--- /dev/null
+++ b/src/slalib/permut.f
@@ -0,0 +1,141 @@
+ SUBROUTINE sla_PERMUT ( N, ISTATE, IORDER, J )
+*+
+* - - - - - - -
+* P E R M U T
+* - - - - - - -
+*
+* Generate the next permutation of a specified number of items.
+*
+* Given:
+* N i number of items: there will be N! permutations
+* ISTATE i(N) state, ISTATE(1)=-1 to initialize
+*
+* Returned:
+* ISTATE i(N) state, updated ready for next time
+* IORDER i(N) next permutation of numbers 1,2,...,N
+* J i status: -1 = illegal N (zero or less is illegal)
+* 0 = OK
+* +1 = no more permutations available
+*
+* Notes:
+*
+* 1) This routine returns, in the IORDER array, the integers 1 to N
+* inclusive, in an order that depends on the current contents of
+* the ISTATE array. Before calling the routine for the first
+* time, the caller must set the first element of the ISTATE array
+* to -1 (any negative number will do) to cause the ISTATE array
+* to be fully initialized.
+*
+* 2) The first permutation to be generated is:
+*
+* IORDER(1)=N, IORDER(2)=N-1, ..., IORDER(N)=1
+*
+* This is also the permutation returned for the "finished"
+* (J=1) case.
+*
+* The final permutation to be generated is:
+*
+* IORDER(1)=1, IORDER(2)=2, ..., IORDER(N)=N
+*
+* 3) If the "finished" (J=1) status is ignored, the routine continues
+* to deliver permutations, the pattern repeating every N! calls.
+*
+* P.T.Wallace Starlink 25 August 1999
+*
+* Copyright (C) 1999 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ INTEGER N,IORDER(N),ISTATE(N),J
+
+ INTEGER I,IP1,ISLOT,ISKIP
+
+
+* -------------
+* Preliminaries
+* -------------
+
+* Validate, and set status.
+ IF (N.LT.1) THEN
+ J = -1
+ GO TO 9999
+ ELSE
+ J = 0
+ END IF
+
+* If just starting, initialize state array
+ IF (ISTATE(1).LT.0) THEN
+ ISTATE(1) = -1
+ DO I=2,N
+ ISTATE(I) = 0
+ END DO
+ END IF
+
+* --------------------------
+* Increment the state number
+* --------------------------
+
+* The state number, maintained in the ISTATE array, is a mixed-radix
+* number with N! states. The least significant digit, with a radix of
+* 1, is in ISTATE(1). The next digit, in ISTATE(2), has a radix of 2,
+* and so on.
+
+* Increment the least-significant digit of the state number.
+ ISTATE(1) = ISTATE(1)+1
+
+* Digit by digit starting with the least significant.
+ DO I=1,N
+
+* Carry?
+ IF (ISTATE(I).GE.I) THEN
+
+* Yes: reset the current digit.
+ ISTATE(I) = 0
+
+* Overflow?
+ IF (I.GE.N) THEN
+
+* Yes: there are no more permutations.
+ J = 1
+ ELSE
+
+* No: carry.
+ IP1 = I+1
+ ISTATE(IP1) = ISTATE(IP1)+1
+ END IF
+ END IF
+ END DO
+
+* -------------------------------------------------------------------
+* Translate the state number into the corresponding permutation order
+* -------------------------------------------------------------------
+
+* Initialize the order array. All but one element will be overwritten.
+ DO I=1,N
+ IORDER(I) = 1
+ END DO
+
+* Look at each state number digit, starting with the most significant.
+ DO I=N,2,-1
+
+* Initialize the position where the new number will go.
+ ISLOT = 0
+
+* The state number digit says which unfilled slot is to be used.
+ DO ISKIP=0,ISTATE(I)
+
+* Increment the slot number until an unused slot is found.
+ ISLOT = ISLOT+1
+ DO WHILE (IORDER(ISLOT).GT.1)
+ ISLOT = ISLOT+1
+ END DO
+ END DO
+
+* Store the number in the permutation order array.
+ IORDER(ISLOT) = I
+ END DO
+
+ 9999 CONTINUE
+
+ END
diff --git a/src/slalib/pertel.f b/src/slalib/pertel.f
new file mode 100644
index 0000000..45537b4
--- /dev/null
+++ b/src/slalib/pertel.f
@@ -0,0 +1,159 @@
+ SUBROUTINE sla_PERTEL (JFORM, DATE0, DATE1,
+ : EPOCH0, ORBI0, ANODE0, PERIH0, AORQ0, E0, AM0,
+ : EPOCH1, ORBI1, ANODE1, PERIH1, AORQ1, E1, AM1,
+ : JSTAT)
+*+
+* - - - - - - -
+* P E R T E L
+* - - - - - - -
+*
+* Update the osculating orbital elements of an asteroid or comet by
+* applying planetary perturbations.
+*
+* Given (format and dates):
+* JFORM i choice of element set (2 or 3; Note 1)
+* DATE0 d date of osculation (TT MJD) for the given elements
+* DATE1 d date of osculation (TT MJD) for the updated elements
+*
+* Given (the unperturbed elements):
+* EPOCH0 d epoch (TT MJD) of the given element set (Note 2)
+* ORBI0 d inclination (radians)
+* ANODE0 d longitude of the ascending node (radians)
+* PERIH0 d argument of perihelion (radians)
+* AORQ0 d mean distance or perihelion distance (AU)
+* E0 d eccentricity
+* AM0 d mean anomaly (radians, JFORM=2 only)
+*
+* Returned (the updated elements):
+* EPOCH1 d epoch (TT MJD) of the updated element set (Note 2)
+* ORBI1 d inclination (radians)
+* ANODE1 d longitude of the ascending node (radians)
+* PERIH1 d argument of perihelion (radians)
+* AORQ1 d mean distance or perihelion distance (AU)
+* E1 d eccentricity
+* AM1 d mean anomaly (radians, JFORM=2 only)
+*
+* Returned (status flag):
+* JSTAT i status: +102 = warning, distant epoch
+* +101 = warning, large timespan ( > 100 years)
+* +1 to +8 = coincident with major planet (Note 6)
+* 0 = OK
+* -1 = illegal JFORM
+* -2 = illegal E0
+* -3 = illegal AORQ0
+* -4 = internal error
+* -5 = numerical error
+*
+* Notes:
+*
+* 1 Two different element-format options are available:
+*
+* Option JFORM=2, suitable for minor planets:
+*
+* EPOCH = epoch of elements (TT MJD)
+* ORBI = inclination i (radians)
+* ANODE = longitude of the ascending node, big omega (radians)
+* PERIH = argument of perihelion, little omega (radians)
+* AORQ = mean distance, a (AU)
+* E = eccentricity, e
+* AM = mean anomaly M (radians)
+*
+* Option JFORM=3, suitable for comets:
+*
+* EPOCH = epoch of perihelion (TT MJD)
+* ORBI = inclination i (radians)
+* ANODE = longitude of the ascending node, big omega (radians)
+* PERIH = argument of perihelion, little omega (radians)
+* AORQ = perihelion distance, q (AU)
+* E = eccentricity, e
+*
+* 2 DATE0, DATE1, EPOCH0 and EPOCH1 are all instants of time in
+* the TT timescale (formerly Ephemeris Time, ET), expressed
+* as Modified Julian Dates (JD-2400000.5).
+*
+* DATE0 is the instant at which the given (i.e. unperturbed)
+* osculating elements are correct.
+*
+* DATE1 is the specified instant at which the updated osculating
+* elements are correct.
+*
+* EPOCH0 and EPOCH1 will be the same as DATE0 and DATE1
+* (respectively) for the JFORM=2 case, normally used for minor
+* planets. For the JFORM=3 case, the two epochs will refer to
+* perihelion passage and so will not, in general, be the same as
+* DATE0 and/or DATE1 though they may be similar to one another.
+*
+* 3 The elements are with respect to the J2000 ecliptic and equinox.
+*
+* 4 Unused elements (AM0 and AM1 for JFORM=3) are not accessed.
+*
+* 5 See the sla_PERTUE routine for details of the algorithm used.
+*
+* 6 This routine is not intended to be used for major planets, which
+* is why JFORM=1 is not available and why there is no opportunity
+* to specify either the longitude of perihelion or the daily
+* motion. However, if JFORM=2 elements are somehow obtained for a
+* major planet and supplied to the routine, sensible results will,
+* in fact, be produced. This happens because the sla_PERTUE routine
+* that is called to perform the calculations checks the separation
+* between the body and each of the planets and interprets a
+* suspiciously small value (0.001 AU) as an attempt to apply it to
+* the planet concerned. If this condition is detected, the
+* contribution from that planet is ignored, and the status is set to
+* the planet number (Mercury=1,...,Neptune=8) as a warning.
+*
+* Reference:
+*
+* Sterne, Theodore E., "An Introduction to Celestial Mechanics",
+* Interscience Publishers Inc., 1960. Section 6.7, p199.
+*
+* Called: sla_EL2UE, sla_PERTUE, sla_UE2EL
+*
+* P.T.Wallace Starlink 14 March 1999
+*
+* Copyright (C) 1999 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+ INTEGER JFORM
+ DOUBLE PRECISION DATE0,DATE1,
+ : EPOCH0,ORBI0,ANODE0,PERIH0,AORQ0,E0,AM0,
+ : EPOCH1,ORBI1,ANODE1,PERIH1,AORQ1,E1,AM1
+ INTEGER JSTAT
+
+ DOUBLE PRECISION U(13),DM
+ INTEGER J,JF
+
+
+
+* Check that the elements are either minor-planet or comet format.
+ IF (JFORM.LT.2.OR.JFORM.GT.3) THEN
+ JSTAT = -1
+ GO TO 9999
+ END IF
+
+* Transform the elements from conventional to universal form.
+ CALL sla_EL2UE(DATE0,JFORM,EPOCH0,ORBI0,ANODE0,PERIH0,
+ : AORQ0,E0,AM0,0D0,U,J)
+ IF (J.NE.0) THEN
+ JSTAT = J
+ GO TO 9999
+ END IF
+
+* Update the universal elements.
+ CALL sla_PERTUE(DATE1,U,J)
+ IF (J.GT.0) THEN
+ JSTAT = J
+ ELSE IF (J.LT.0) THEN
+ JSTAT = -5
+ GO TO 9999
+ END IF
+
+* Transform from universal to conventional elements.
+ CALL sla_UE2EL(U,2,
+ : JF, EPOCH1, ORBI1, ANODE1, PERIH1,
+ : AORQ1, E1, AM1, DM, J)
+ IF (JF.NE.JFORM.OR.J.NE.0) JSTAT=-5
+
+ 9999 CONTINUE
+ END
diff --git a/src/slalib/pertue.f b/src/slalib/pertue.f
new file mode 100644
index 0000000..d6f6f53
--- /dev/null
+++ b/src/slalib/pertue.f
@@ -0,0 +1,535 @@
+ SUBROUTINE sla_PERTUE (DATE, U, JSTAT)
+*+
+* - - - - - - -
+* P E R T U E
+* - - - - - - -
+*
+* Update the universal elements of an asteroid or comet by applying
+* planetary perturbations.
+*
+* Given:
+* DATE d final epoch (TT MJD) for the updated elements
+*
+* Given and returned:
+* U d(13) universal elements (updated in place)
+*
+* (1) combined mass (M+m)
+* (2) total energy of the orbit (alpha)
+* (3) reference (osculating) epoch (t0)
+* (4-6) position at reference epoch (r0)
+* (7-9) velocity at reference epoch (v0)
+* (10) heliocentric distance at reference epoch
+* (11) r0.v0
+* (12) date (t)
+* (13) universal eccentric anomaly (psi) of date, approx
+*
+* Returned:
+* JSTAT i status:
+* +102 = warning, distant epoch
+* +101 = warning, large timespan ( > 100 years)
+* +1 to +8 = coincident with major planet (Note 5)
+* 0 = OK
+* -1 = numerical error
+*
+* Called: sla_PLANET, sla_UE2PV, sla_PV2UE
+*
+* Notes:
+*
+* 1 The "universal" elements are those which define the orbit for the
+* purposes of the method of universal variables (see reference 2).
+* They consist of the combined mass of the two bodies, an epoch,
+* and the position and velocity vectors (arbitrary reference frame)
+* at that epoch. The parameter set used here includes also various
+* quantities that can, in fact, be derived from the other
+* information. This approach is taken to avoiding unnecessary
+* computation and loss of accuracy. The supplementary quantities
+* are (i) alpha, which is proportional to the total energy of the
+* orbit, (ii) the heliocentric distance at epoch, (iii) the
+* outwards component of the velocity at the given epoch, (iv) an
+* estimate of psi, the "universal eccentric anomaly" at a given
+* date and (v) that date.
+*
+* 2 The universal elements are with respect to the J2000 equator and
+* equinox.
+*
+* 3 The epochs DATE, U(3) and U(12) are all Modified Julian Dates
+* (JD-2400000.5).
+*
+* 4 The algorithm is a simplified form of Encke's method. It takes as
+* a basis the unperturbed motion of the body, and numerically
+* integrates the perturbing accelerations from the major planets.
+* The expression used is essentially Sterne's 6.7-2 (reference 1).
+* Everhart and Pitkin (reference 2) suggest rectifying the orbit at
+* each integration step by propagating the new perturbed position
+* and velocity as the new universal variables. In the present
+* routine the orbit is rectified less frequently than this, in order
+* to gain a slight speed advantage. However, the rectification is
+* done directly in terms of position and velocity, as suggested by
+* Everhart and Pitkin, bypassing the use of conventional orbital
+* elements.
+*
+* The f(q) part of the full Encke method is not used. The purpose
+* of this part is to avoid subtracting two nearly equal quantities
+* when calculating the "indirect member", which takes account of the
+* small change in the Sun's attraction due to the slightly displaced
+* position of the perturbed body. A simpler, direct calculation in
+* double precision proves to be faster and not significantly less
+* accurate.
+*
+* Apart from employing a variable timestep, and occasionally
+* "rectifying the orbit" to keep the indirect member small, the
+* integration is done in a fairly straightforward way. The
+* acceleration estimated for the middle of the timestep is assumed
+* to apply throughout that timestep; it is also used in the
+* extrapolation of the perturbations to the middle of the next
+* timestep, to predict the new disturbed position. There is no
+* iteration within a timestep.
+*
+* Measures are taken to reach a compromise between execution time
+* and accuracy. The starting-point is the goal of achieving
+* arcsecond accuracy for ordinary minor planets over a ten-year
+* timespan. This goal dictates how large the timesteps can be,
+* which in turn dictates how frequently the unperturbed motion has
+* to be recalculated from the osculating elements.
+*
+* Within predetermined limits, the timestep for the numerical
+* integration is varied in length in inverse proportion to the
+* magnitude of the net acceleration on the body from the major
+* planets.
+*
+* The numerical integration requires estimates of the major-planet
+* motions. Approximate positions for the major planets (Pluto
+* alone is omitted) are obtained from the routine sla_PLANET. Two
+* levels of interpolation are used, to enhance speed without
+* significantly degrading accuracy. At a low frequency, the routine
+* sla_PLANET is called to generate updated position+velocity "state
+* vectors". The only task remaining to be carried out at the full
+* frequency (i.e. at each integration step) is to use the state
+* vectors to extrapolate the planetary positions. In place of a
+* strictly linear extrapolation, some allowance is made for the
+* curvature of the orbit by scaling back the radius vector as the
+* linear extrapolation goes off at a tangent.
+*
+* Various other approximations are made. For example, perturbations
+* by Pluto and the minor planets are neglected, relativistic effects
+* are not taken into account and the Earth-Moon system is treated as
+* a single body.
+*
+* In the interests of simplicity, the background calculations for
+* the major planets are carried out en masse. The mean elements and
+* state vectors for all the planets are refreshed at the same time,
+* without regard for orbit curvature, mass or proximity.
+*
+* 5 This routine is not intended to be used for major planets.
+* However, if major-planet elements are supplied, sensible results
+* will, in fact, be produced. This happens because the routine
+* checks the separation between the body and each of the planets and
+* interprets a suspiciously small value (0.001 AU) as an attempt to
+* apply the routine to the planet concerned. If this condition is
+* detected, the contribution from that planet is ignored, and the
+* status is set to the planet number (Mercury=1,...,Neptune=8) as a
+* warning.
+*
+* References:
+*
+* 1 Sterne, Theodore E., "An Introduction to Celestial Mechanics",
+* Interscience Publishers Inc., 1960. Section 6.7, p199.
+*
+* 2 Everhart, E. & Pitkin, E.T., Am.J.Phys. 51, 712, 1983.
+*
+* P.T.Wallace Starlink 18 March 1999
+*
+* Copyright (C) 1999 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+ DOUBLE PRECISION DATE,U(13)
+ INTEGER JSTAT
+
+* Coefficient relating timestep to perturbing force
+ DOUBLE PRECISION TSC
+ PARAMETER (TSC=1D-4)
+
+* Minimum and maximum timestep (days)
+ DOUBLE PRECISION TSMIN,TSMAX
+ PARAMETER (TSMIN=0.01D0,TSMAX=10D0)
+
+* Age limit for major-planet state vector (days)
+ DOUBLE PRECISION AGEPMO
+ PARAMETER (AGEPMO=5D0)
+
+* Age limit for major-planet mean elements (days)
+ DOUBLE PRECISION AGEPEL
+ PARAMETER (AGEPEL=50D0)
+
+* Margin for error when deciding whether to renew the planetary data
+ DOUBLE PRECISION TINY
+ PARAMETER (TINY=1D-6)
+
+* Age limit for the body's osculating elements (before rectification)
+ DOUBLE PRECISION AGEBEL
+ PARAMETER (AGEBEL=100D0)
+
+* Gaussian gravitational constant (exact) and square
+ DOUBLE PRECISION GCON,GCON2
+ PARAMETER (GCON=0.01720209895D0,GCON2=GCON*GCON)
+
+* The final epoch
+ DOUBLE PRECISION TFINAL
+
+* The body's current universal elements
+ DOUBLE PRECISION UL(13)
+
+* Current reference epoch
+ DOUBLE PRECISION T0
+
+* Timespan from latest orbit rectification to final epoch (days)
+ DOUBLE PRECISION TSPAN
+
+* Time left to go before integration is complete
+ DOUBLE PRECISION TLEFT
+
+* Time direction flag: +1=forwards, -1=backwards
+ DOUBLE PRECISION FB
+
+* First-time flag
+ LOGICAL FIRST
+
+*
+* The current perturbations
+*
+* Epoch (days relative to current reference epoch)
+ DOUBLE PRECISION RTN
+* Position (AU)
+ DOUBLE PRECISION PERP(3)
+* Velocity (AU/d)
+ DOUBLE PRECISION PERV(3)
+* Acceleration (AU/d/d)
+ DOUBLE PRECISION PERA(3)
+*
+
+* Length of current timestep (days), and half that
+ DOUBLE PRECISION TS,HTS
+
+* Epoch of middle of timestep
+ DOUBLE PRECISION T
+
+* Epoch of planetary mean elements
+ DOUBLE PRECISION TPEL
+
+* Planet number (1=Mercury, 2=Venus, 3=EMB...8=Neptune)
+ INTEGER NP
+
+* Planetary universal orbital elements
+ DOUBLE PRECISION UP(13,8)
+
+* Epoch of planetary state vectors
+ DOUBLE PRECISION TPMO
+
+* State vectors for the major planets (AU,AU/s)
+ DOUBLE PRECISION PVIN(6,8)
+
+*
+* Correction terms for extrapolated major planet vectors
+*
+* Sun-to-planet distances squared multiplied by 3
+ DOUBLE PRECISION R2X3(8)
+* Sunward acceleration terms, G/2R^3
+ DOUBLE PRECISION GC(8)
+* Tangential-to-circular correction factor
+ DOUBLE PRECISION FC
+* Radial correction factor due to Sunwards acceleration
+ DOUBLE PRECISION FG
+*
+
+* The body's unperturbed and perturbed state vectors (AU,AU/s)
+ DOUBLE PRECISION PV0(6),PV(6)
+
+* The body's perturbed and unperturbed heliocentric distances (AU) cubed
+ DOUBLE PRECISION R03,R3
+
+* The perturbating accelerations, indirect and direct
+ DOUBLE PRECISION FI(3),FD(3)
+
+* Sun-to-planet vector, and distance cubed
+ DOUBLE PRECISION RHO(3),RHO3
+
+* Body-to-planet vector, and distance cubed
+ DOUBLE PRECISION DELTA(3),DELTA3
+
+* Miscellaneous
+ INTEGER I,J
+ DOUBLE PRECISION R2,W,DT,DT2,FT
+
+* Planetary inverse masses, Mercury through Neptune
+ DOUBLE PRECISION AMAS(8)
+ DATA AMAS / 6023600D0,408523.5D0,328900.5D0,3098710D0,
+ : 1047.355D0,3498.5D0,22869D0,19314D0 /
+
+*---------------------------------------------------------------------*
+
+
+* Preset the status to OK.
+ JSTAT = 0
+
+* Copy the final epoch.
+ TFINAL = DATE
+
+* Copy the elements (which will be periodically updated).
+ DO I=1,13
+ UL(I) = U(I)
+ END DO
+
+* Initialize the working reference epoch.
+ T0=UL(3)
+
+* Total timespan (days) and hence time left.
+ TSPAN = TFINAL-T0
+ TLEFT = TSPAN
+
+* Warn if excessive.
+ IF (ABS(TSPAN).GT.36525D0) JSTAT=101
+
+* Time direction: +1 for forwards, -1 for backwards.
+ FB = SIGN(1D0,TSPAN)
+
+* Initialize relative epoch for start of current timestep.
+ RTN = 0D0
+
+* Reset the perturbations (position, velocity, acceleration).
+ DO I=1,3
+ PERP(I) = 0D0
+ PERV(I) = 0D0
+ PERA(I) = 0D0
+ END DO
+
+* Set "first iteration" flag.
+ FIRST = .TRUE.
+
+* Step through the time left.
+ DO WHILE (FB*TLEFT.GT.0D0)
+
+* Magnitude of current acceleration due to planetary attractions.
+ IF (FIRST) THEN
+ TS = TSMIN
+ ELSE
+ R2 = 0D0
+ DO I=1,3
+ W = FD(I)
+ R2 = R2+W*W
+ END DO
+ W = SQRT(R2)
+
+* Use the acceleration to decide how big a timestep can be tolerated.
+ IF (W.NE.0D0) THEN
+ TS = MIN(TSMAX,MAX(TSMIN,TSC/W))
+ ELSE
+ TS = TSMAX
+ END IF
+ END IF
+ TS = TS*FB
+
+* Override if final epoch is imminent.
+ TLEFT = TSPAN-RTN
+ IF (ABS(TS).GT.ABS(TLEFT)) TS=TLEFT
+
+* Epoch of middle of timestep.
+ HTS = TS/2D0
+ T = T0+RTN+HTS
+
+* Is it time to recompute the major-planet elements?
+ IF (FIRST.OR.ABS(T-TPEL)-AGEPEL.GE.TINY) THEN
+
+* Yes: go forward in time by just under the maximum allowed.
+ TPEL = T+FB*AGEPEL
+
+* Compute the state vector for the new epoch.
+ DO NP=1,8
+ CALL sla_PLANET(TPEL,NP,PV,J)
+
+* Warning if remote epoch, abort if error.
+ IF (J.EQ.1) THEN
+ JSTAT = 102
+ ELSE IF (J.NE.0) THEN
+ GO TO 9010
+ END IF
+
+* Transform the vector into universal elements.
+ CALL sla_PV2UE(PV,TPEL,0D0,UP(1,NP),J)
+ IF (J.NE.0) GO TO 9010
+ END DO
+ END IF
+
+* Is it time to recompute the major-planet motions?
+ IF (FIRST.OR.ABS(T-TPMO)-AGEPMO.GE.TINY) THEN
+
+* Yes: look ahead.
+ TPMO = T+FB*AGEPMO
+
+* Compute the motions of each planet (AU,AU/d).
+ DO NP=1,8
+
+* The planet's position and velocity (AU,AU/s).
+ CALL sla_UE2PV(TPMO,UP(1,NP),PVIN(1,NP),J)
+ IF (J.NE.0) GO TO 9010
+
+* Scale velocity to AU/d.
+ DO J=4,6
+ PVIN(J,NP) = PVIN(J,NP)*86400D0
+ END DO
+
+* Precompute also the extrapolation correction terms.
+ R2 = 0D0
+ DO I=1,3
+ W = PVIN(I,NP)
+ R2 = R2+W*W
+ END DO
+ R2X3(NP) = R2*3D0
+ GC(NP) = GCON2/(2D0*R2*SQRT(R2))
+ END DO
+ END IF
+
+* Reset the first-time flag.
+ FIRST = .FALSE.
+
+* Unperturbed motion of the body at middle of timestep (AU,AU/s).
+ CALL sla_UE2PV(T,UL,PV0,J)
+ IF (J.NE.0) GO TO 9010
+
+* Perturbed position of the body (AU) and heliocentric distance cubed.
+ R2 = 0D0
+ DO I=1,3
+ W = PV0(I)+PERP(I)+(PERV(I)+PERA(I)*HTS/2D0)*HTS
+ PV(I) = W
+ R2 = R2+W*W
+ END DO
+ R3 = R2*SQRT(R2)
+
+* The body's unperturbed heliocentric distance cubed.
+ R2 = 0D0
+ DO I=1,3
+ W = PV0(I)
+ R2 = R2+W*W
+ END DO
+ R03 = R2*SQRT(R2)
+
+* Compute indirect and initialize direct parts of the perturbation.
+ DO I=1,3
+ FI(I) = PV0(I)/R03-PV(I)/R3
+ FD(I) = 0D0
+ END DO
+
+* Ready to compute the direct planetary effects.
+
+* Interval from state-vector epoch to middle of current timestep.
+ DT = T-TPMO
+ DT2 = DT*DT
+
+* Planet by planet.
+ DO NP=1,8
+
+* First compute the extrapolation in longitude (squared).
+ R2 = 0D0
+ DO J=4,6
+ W = PVIN(J,NP)*DT
+ R2 = R2+W*W
+ END DO
+
+* Hence the tangential-to-circular correction factor.
+ FC = 1D0+R2/R2X3(NP)
+
+* The radial correction factor due to the inwards acceleration.
+ FG = 1D0-GC(NP)*DT2
+
+* Planet's position, and heliocentric distance cubed.
+ R2 = 0D0
+ DO I=1,3
+ W = FG*(PVIN(I,NP)+FC*PVIN(I+3,NP)*DT)
+ RHO(I) = W
+ R2 = R2+W*W
+ END DO
+ RHO3 = R2*SQRT(R2)
+
+* Body-to-planet vector, light-time, and distance cubed.
+ R2 = 0D0
+ DO I=1,3
+ W = RHO(I)-PV(I)
+ DELTA(I) = W
+ R2 = R2+W*W
+ END DO
+ W = SQRT(R2)
+ DELTA3 = R2*SQRT(R2)
+
+* If too close, ignore this planet and set a warning.
+ IF (R2.LT.1D-6) THEN
+ JSTAT = NP
+ ELSE
+
+* Accumulate "direct" part of perturbation acceleration.
+ W = AMAS(NP)
+ DO I=1,3
+ FD(I) = FD(I)+(DELTA(I)/DELTA3-RHO(I)/RHO3)/W
+ END DO
+ END IF
+ END DO
+
+* Update the perturbations to the end of the timestep.
+ RTN = RTN+TS
+ DO I=1,3
+ W = (FI(I)+FD(I))*GCON2
+ FT = W*TS
+ PERP(I) = PERP(I)+(PERV(I)+FT/2D0)*TS
+ PERV(I) = PERV(I)+FT
+ PERA(I) = W
+ END DO
+
+* Time still to go.
+ TLEFT = TSPAN-RTN
+
+* Is it either time to rectify the orbit or the last time through?
+ IF (ABS(RTN).GE.AGEBEL.OR.FB*TLEFT.LE.0D0) THEN
+
+* Yes: update to the end of the current timestep.
+ T0 = T0+RTN
+ RTN = 0D0
+
+* The body's unperturbed motion (AU,AU/s).
+ CALL sla_UE2PV(T0,UL,PV0,J)
+ IF (J.NE.0) GO TO 9010
+
+* Add and re-initialize the perturbations.
+ DO I=1,3
+ J = I+3
+ PV(I) = PV0(I)+PERP(I)
+ PV(J) = PV0(J)+PERV(I)/86400D0
+ PERP(I) = 0D0
+ PERV(I) = 0D0
+ PERA(I) = FD(I)*GCON2
+ END DO
+
+* Use the position and velocity to set up new universal elements.
+ CALL sla_PV2UE(PV,T0,0D0,UL,J)
+ IF (J.NE.0) GO TO 9010
+
+* Adjust the timespan and time left.
+ TSPAN = TFINAL-T0
+ TLEFT = TSPAN
+ END IF
+
+* Next timestep.
+ END DO
+
+* Return the updated universal-element set.
+ DO I=1,13
+ U(I) = UL(I)
+ END DO
+
+* Finished.
+ GO TO 9999
+
+* Miscellaneous numerical error.
+ 9010 CONTINUE
+ JSTAT = -1
+
+ 9999 CONTINUE
+ END
diff --git a/src/slalib/planel.f b/src/slalib/planel.f
new file mode 100644
index 0000000..064e51c
--- /dev/null
+++ b/src/slalib/planel.f
@@ -0,0 +1,117 @@
+ SUBROUTINE sla_PLANEL (DATE, JFORM, EPOCH, ORBINC, ANODE, PERIH,
+ : AORQ, E, AORL, DM, PV, JSTAT)
+*+
+* - - - - - - -
+* P L A N E L
+* - - - - - - -
+*
+* Heliocentric position and velocity of a planet, asteroid or comet,
+* starting from orbital elements.
+*
+* Given:
+* DATE d date, Modified Julian Date (JD - 2400000.5)
+* JFORM i choice of element set (1-3; Note 3)
+* EPOCH d epoch of elements (TT MJD)
+* ORBINC d inclination (radians)
+* ANODE d longitude of the ascending node (radians)
+* PERIH d longitude or argument of perihelion (radians)
+* AORQ d mean distance or perihelion distance (AU)
+* E d eccentricity
+* AORL d mean anomaly or longitude (radians, JFORM=1,2 only)
+* DM d daily motion (radians, JFORM=1 only)
+*
+* Returned:
+* PV d(6) heliocentric x,y,z,xdot,ydot,zdot of date,
+* J2000 equatorial triad (AU,AU/s)
+* JSTAT i status: 0 = OK
+* -1 = illegal JFORM
+* -2 = illegal E
+* -3 = illegal AORQ
+* -4 = illegal DM
+* -5 = numerical error
+*
+* Called: sla_EL2UE, sla_UE2PV
+*
+* Notes
+*
+* 1 DATE is the instant for which the prediction is required. It is
+* in the TT timescale (formerly Ephemeris Time, ET) and is a
+* Modified Julian Date (JD-2400000.5).
+*
+* 2 The elements are with respect to the J2000 ecliptic and equinox.
+*
+* 3 Three different element-format options are available:
+*
+* Option JFORM=1, suitable for the major planets:
+*
+* EPOCH = epoch of elements (TT MJD)
+* ORBINC = inclination i (radians)
+* ANODE = longitude of the ascending node, big omega (radians)
+* PERIH = longitude of perihelion, curly pi (radians)
+* AORQ = mean distance, a (AU)
+* E = eccentricity, e (range 0 to <1)
+* AORL = mean longitude L (radians)
+* DM = daily motion (radians)
+*
+* Option JFORM=2, suitable for minor planets:
+*
+* EPOCH = epoch of elements (TT MJD)
+* ORBINC = inclination i (radians)
+* ANODE = longitude of the ascending node, big omega (radians)
+* PERIH = argument of perihelion, little omega (radians)
+* AORQ = mean distance, a (AU)
+* E = eccentricity, e (range 0 to <1)
+* AORL = mean anomaly M (radians)
+*
+* Option JFORM=3, suitable for comets:
+*
+* EPOCH = epoch of perihelion (TT MJD)
+* ORBINC = inclination i (radians)
+* ANODE = longitude of the ascending node, big omega (radians)
+* PERIH = argument of perihelion, little omega (radians)
+* AORQ = perihelion distance, q (AU)
+* E = eccentricity, e (range 0 to 10)
+*
+* 4 Unused elements (DM for JFORM=2, AORL and DM for JFORM=3) are
+* not accessed.
+*
+* 5 The reference frame for the result is with respect to the mean
+* equator and equinox of epoch J2000.
+*
+* 6 The algorithm was originally adapted from the EPHSLA program of
+* D.H.P.Jones (private communication, 1996). The method is based
+* on Stumpff's Universal Variables.
+*
+* Reference: Everhart, E. & Pitkin, E.T., Am.J.Phys. 51, 712, 1983.
+*
+* P.T.Wallace Starlink 18 March 1999
+*
+* Copyright (C) 1999 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION DATE
+ INTEGER JFORM
+ DOUBLE PRECISION EPOCH,ORBINC,ANODE,PERIH,AORQ,E,AORL,DM,PV(6)
+ INTEGER JSTAT
+
+ DOUBLE PRECISION U(13)
+ INTEGER J
+
+
+
+* Validate elements and convert to "universal variables" parameters.
+ CALL sla_EL2UE(DATE,JFORM,
+ : EPOCH,ORBINC,ANODE,PERIH,AORQ,E,AORL,DM,U,J)
+
+* Determine the position and velocity.
+ IF (J.EQ.0) THEN
+ CALL sla_UE2PV(DATE,U,PV,J)
+ IF (J.NE.0) J=-5
+ END IF
+
+* Wrap up.
+ JSTAT = J
+
+ END
diff --git a/src/slalib/planet.f b/src/slalib/planet.f
new file mode 100644
index 0000000..095dff7
--- /dev/null
+++ b/src/slalib/planet.f
@@ -0,0 +1,707 @@
+ SUBROUTINE sla_PLANET (DATE, NP, PV, JSTAT)
+*+
+* - - - - - - -
+* P L A N E T
+* - - - - - - -
+*
+* Approximate heliocentric position and velocity of a specified
+* major planet.
+*
+* Given:
+* DATE d Modified Julian Date (JD - 2400000.5)
+* NP i planet (1=Mercury, 2=Venus, 3=EMB ... 9=Pluto)
+*
+* Returned:
+* PV d(6) heliocentric x,y,z,xdot,ydot,zdot, J2000
+* equatorial triad (AU,AU/s)
+* JSTAT i status: +1 = warning: date out of range
+* 0 = OK
+* -1 = illegal NP (outside 1-9)
+* -2 = solution didn't converge
+*
+* Called: sla_PLANEL
+*
+* Notes
+*
+* 1 The epoch, DATE, is in the TDB timescale and is a Modified
+* Julian Date (JD-2400000.5).
+*
+* 2 The reference frame is equatorial and is with respect to the
+* mean equinox and ecliptic of epoch J2000.
+*
+* 3 If an NP value outside the range 1-9 is supplied, an error
+* status (JSTAT = -1) is returned and the PV vector set to zeroes.
+*
+* 4 The algorithm for obtaining the mean elements of the planets
+* from Mercury to Neptune is due to J.L. Simon, P. Bretagnon,
+* J. Chapront, M. Chapront-Touze, G. Francou and J. Laskar
+* (Bureau des Longitudes, Paris). The (completely different)
+* algorithm for calculating the ecliptic coordinates of Pluto
+* is by Meeus.
+*
+* 5 Comparisons of the present routine with the JPL DE200 ephemeris
+* give the following RMS errors over the interval 1960-2025:
+*
+* position (km) speed (metre/sec)
+*
+* Mercury 334 0.437
+* Venus 1060 0.855
+* EMB 2010 0.815
+* Mars 7690 1.98
+* Jupiter 71700 7.70
+* Saturn 199000 19.4
+* Uranus 564000 16.4
+* Neptune 158000 14.4
+* Pluto 36400 0.137
+*
+* From comparisons with DE102, Simon et al quote the following
+* longitude accuracies over the interval 1800-2200:
+*
+* Mercury 4"
+* Venus 5"
+* EMB 6"
+* Mars 17"
+* Jupiter 71"
+* Saturn 81"
+* Uranus 86"
+* Neptune 11"
+*
+* In the case of Pluto, Meeus quotes an accuracy of 0.6 arcsec
+* in longitude and 0.2 arcsec in latitude for the period
+* 1885-2099.
+*
+* For all except Pluto, over the period 1000-3000 the accuracy
+* is better than 1.5 times that over 1800-2200. Outside the
+* period 1000-3000 the accuracy declines. For Pluto the
+* accuracy declines rapidly outside the period 1885-2099.
+* Outside these ranges (1885-2099 for Pluto, 1000-3000 for
+* the rest) a "date out of range" warning status (JSTAT=+1)
+* is returned.
+*
+* 6 The algorithms for (i) Mercury through Neptune and (ii) Pluto
+* are completely independent. In the Mercury through Neptune
+* case, the present SLALIB implementation differs from the
+* original Simon et al Fortran code in the following respects.
+*
+* * The date is supplied as a Modified Julian Date rather
+* than a Julian Date (MJD = JD - 2400000.5).
+*
+* * The result is returned only in equatorial Cartesian form;
+* the ecliptic longitude, latitude and radius vector are not
+* returned.
+*
+* * The velocity is in AU per second, not AU per day.
+*
+* * Different error/warning status values are used.
+*
+* * Kepler's equation is not solved inline.
+*
+* * Polynomials in T are nested to minimize rounding errors.
+*
+* * Explicit double-precision constants are used to avoid
+* mixed-mode expressions.
+*
+* * There are other, cosmetic, changes to comply with
+* Starlink/SLALIB style guidelines.
+*
+* None of the above changes affects the result significantly.
+*
+* 7 For NP=3 the result is for the Earth-Moon Barycentre. To
+* obtain the heliocentric position and velocity of the Earth,
+* either use the SLALIB routine sla_EVP or call sla_DMOON and
+* subtract 0.012150581 times the geocentric Moon vector from
+* the EMB vector produced by the present routine. (The Moon
+* vector should be precessed to J2000 first, but this can
+* be omitted for modern epochs without introducing significant
+* inaccuracy.)
+*
+* References: Simon et al., Astron. Astrophys. 282, 663 (1994).
+* Meeus, Astronomical Algorithms, Willmann-Bell (1991).
+*
+* P.T.Wallace Starlink 27 May 1997
+*
+* Copyright (C) 1997 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION DATE
+ INTEGER NP
+ DOUBLE PRECISION PV(6)
+ INTEGER JSTAT
+
+* 2Pi, deg to radians, arcsec to radians
+ DOUBLE PRECISION D2PI,D2R,AS2R
+ PARAMETER (D2PI=6.283185307179586476925286766559D0,
+ : D2R=0.017453292519943295769236907684886D0,
+ : AS2R=4.848136811095359935899141023579D-6)
+
+* Gaussian gravitational constant (exact)
+ DOUBLE PRECISION GCON
+ PARAMETER (GCON=0.01720209895D0)
+
+* Seconds per Julian century
+ DOUBLE PRECISION SPC
+ PARAMETER (SPC=36525D0*86400D0)
+
+* Sin and cos of J2000 mean obliquity (IAU 1976)
+ DOUBLE PRECISION SE,CE
+ PARAMETER (SE=0.3977771559319137D0,
+ : CE=0.9174820620691818D0)
+
+ INTEGER I,J,IJSP(3,43)
+ DOUBLE PRECISION AMAS(8),A(3,8),DLM(3,8),E(3,8),
+ : PI(3,8),DINC(3,8),OMEGA(3,8),
+ : DKP(9,8),CA(9,8),SA(9,8),
+ : DKQ(10,8),CLO(10,8),SLO(10,8),
+ : T,DA,DE,DPE,DI,DO,DMU,ARGA,ARGL,DM,
+ : AB(2,3,43),DJ0,DS0,DP0,DL0,DLD0,DB0,DR0,
+ : DJ,DS,DP,DJD,DSD,DPD,WLBR(3),WLBRD(3),
+ : WJ,WS,WP,AL,ALD,SAL,CAL,
+ : AC,BC,DL,DLD,DB,DBD,DR,DRD,
+ : SL,CL,SB,CB,SLCB,CLCB,X,Y,Z,XD,YD,ZD
+
+* -----------------------
+* Mercury through Neptune
+* -----------------------
+
+* Planetary inverse masses
+ DATA AMAS / 6023600D0,408523.5D0,328900.5D0,3098710D0,
+ : 1047.355D0,3498.5D0,22869D0,19314D0 /
+
+*
+* Tables giving the mean Keplerian elements, limited to T**2 terms:
+*
+* A semi-major axis (AU)
+* DLM mean longitude (degree and arcsecond)
+* E eccentricity
+* PI longitude of the perihelion (degree and arcsecond)
+* DINC inclination (degree and arcsecond)
+* OMEGA longitude of the ascending node (degree and arcsecond)
+*
+ DATA A /
+ : 0.3870983098D0, 0D0, 0D0,
+ : 0.7233298200D0, 0D0, 0D0,
+ : 1.0000010178D0, 0D0, 0D0,
+ : 1.5236793419D0, 3D-10, 0D0,
+ : 5.2026032092D0, 19132D-10, -39D-10,
+ : 9.5549091915D0, -0.0000213896D0, 444D-10,
+ : 19.2184460618D0, -3716D-10, 979D-10,
+ : 30.1103868694D0, -16635D-10, 686D-10 /
+*
+ DATA DLM /
+ : 252.25090552D0, 5381016286.88982D0, -1.92789D0,
+ : 181.97980085D0, 2106641364.33548D0, 0.59381D0,
+ : 100.46645683D0, 1295977422.83429D0, -2.04411D0,
+ : 355.43299958D0, 689050774.93988D0, 0.94264D0,
+ : 34.35151874D0, 109256603.77991D0, -30.60378D0,
+ : 50.07744430D0, 43996098.55732D0, 75.61614D0,
+ : 314.05500511D0, 15424811.93933D0, -1.75083D0,
+ : 304.34866548D0, 7865503.20744D0, 0.21103D0/
+*
+ DATA E /
+ : 0.2056317526D0, 0.0002040653D0, -28349D-10,
+ : 0.0067719164D0, -0.0004776521D0, 98127D-10,
+ : 0.0167086342D0, -0.0004203654D0, -0.0000126734D0,
+ : 0.0934006477D0, 0.0009048438D0, -80641D-10,
+ : 0.0484979255D0, 0.0016322542D0, -0.0000471366D0,
+ : 0.0555481426D0, -0.0034664062D0, -0.0000643639D0,
+ : 0.0463812221D0, -0.0002729293D0, 0.0000078913D0,
+ : 0.0094557470D0, 0.0000603263D0, 0D0 /
+*
+ DATA PI /
+ : 77.45611904D0, 5719.11590D0, -4.83016D0,
+ : 131.56370300D0, 175.48640D0, -498.48184D0,
+ : 102.93734808D0, 11612.35290D0, 53.27577D0,
+ : 336.06023395D0, 15980.45908D0, -62.32800D0,
+ : 14.33120687D0, 7758.75163D0, 259.95938D0,
+ : 93.05723748D0, 20395.49439D0, 190.25952D0,
+ : 173.00529106D0, 3215.56238D0, -34.09288D0,
+ : 48.12027554D0, 1050.71912D0, 27.39717D0 /
+*
+ DATA DINC /
+ : 7.00498625D0, -214.25629D0, 0.28977D0,
+ : 3.39466189D0, -30.84437D0, -11.67836D0,
+ : 0D0, 469.97289D0, -3.35053D0,
+ : 1.84972648D0, -293.31722D0, -8.11830D0,
+ : 1.30326698D0, -71.55890D0, 11.95297D0,
+ : 2.48887878D0, 91.85195D0, -17.66225D0,
+ : 0.77319689D0, -60.72723D0, 1.25759D0,
+ : 1.76995259D0, 8.12333D0, 0.08135D0 /
+*
+ DATA OMEGA /
+ : 48.33089304D0, -4515.21727D0, -31.79892D0,
+ : 76.67992019D0, -10008.48154D0, -51.32614D0,
+ : 174.87317577D0, -8679.27034D0, 15.34191D0,
+ : 49.55809321D0, -10620.90088D0, -230.57416D0,
+ : 100.46440702D0, 6362.03561D0, 326.52178D0,
+ : 113.66550252D0, -9240.19942D0, -66.23743D0,
+ : 74.00595701D0, 2669.15033D0, 145.93964D0,
+ : 131.78405702D0, -221.94322D0, -0.78728D0 /
+*
+* Tables for trigonometric terms to be added to the mean elements
+* of the semi-major axes.
+*
+ DATA DKP /
+ : 69613, 75645, 88306, 59899, 15746, 71087, 142173, 3086, 0,
+ : 21863, 32794, 26934, 10931, 26250, 43725, 53867, 28939, 0,
+ : 16002, 21863, 32004, 10931, 14529, 16368, 15318, 32794, 0,
+ : 6345, 7818, 15636, 7077, 8184, 14163, 1107, 4872, 0,
+ : 1760, 1454, 1167, 880, 287, 2640, 19, 2047, 1454,
+ : 574, 0, 880, 287, 19, 1760, 1167, 306, 574,
+ : 204, 0, 177, 1265, 4, 385, 200, 208, 204,
+ : 0, 102, 106, 4, 98, 1367, 487, 204, 0 /
+*
+ DATA CA /
+ : 4, -13, 11, -9, -9, -3, -1, 4, 0,
+ : -156, 59, -42, 6, 19, -20, -10, -12, 0,
+ : 64, -152, 62, -8, 32, -41, 19, -11, 0,
+ : 124, 621, -145, 208, 54, -57, 30, 15, 0,
+ : -23437, -2634, 6601, 6259, -1507, -1821, 2620, -2115,-1489,
+ : 62911,-119919, 79336, 17814,-24241, 12068, 8306, -4893, 8902,
+ : 389061,-262125,-44088, 8387,-22976, -2093, -615, -9720, 6633,
+ :-412235,-157046,-31430, 37817, -9740, -13, -7449, 9644, 0 /
+*
+ DATA SA /
+ : -29, -1, 9, 6, -6, 5, 4, 0, 0,
+ : -48, -125, -26, -37, 18, -13, -20, -2, 0,
+ : -150, -46, 68, 54, 14, 24, -28, 22, 0,
+ : -621, 532, -694, -20, 192, -94, 71, -73, 0,
+ : -14614,-19828, -5869, 1881, -4372, -2255, 782, 930, 913,
+ : 139737, 0, 24667, 51123, -5102, 7429, -4095, -1976,-9566,
+ : -138081, 0, 37205,-49039,-41901,-33872,-27037,-12474,18797,
+ : 0, 28492,133236, 69654, 52322,-49577,-26430, -3593, 0 /
+*
+* Tables giving the trigonometric terms to be added to the mean
+* elements of the mean longitudes.
+*
+ DATA DKQ /
+ : 3086, 15746, 69613, 59899, 75645, 88306, 12661, 2658, 0, 0,
+ : 21863, 32794, 10931, 73, 4387, 26934, 1473, 2157, 0, 0,
+ : 10, 16002, 21863, 10931, 1473, 32004, 4387, 73, 0, 0,
+ : 10, 6345, 7818, 1107, 15636, 7077, 8184, 532, 10, 0,
+ : 19, 1760, 1454, 287, 1167, 880, 574, 2640, 19,1454,
+ : 19, 574, 287, 306, 1760, 12, 31, 38, 19, 574,
+ : 4, 204, 177, 8, 31, 200, 1265, 102, 4, 204,
+ : 4, 102, 106, 8, 98, 1367, 487, 204, 4, 102 /
+*
+ DATA CLO /
+ : 21, -95, -157, 41, -5, 42, 23, 30, 0, 0,
+ : -160, -313, -235, 60, -74, -76, -27, 34, 0, 0,
+ : -325, -322, -79, 232, -52, 97, 55, -41, 0, 0,
+ : 2268, -979, 802, 602, -668, -33, 345, 201, -55, 0,
+ : 7610, -4997,-7689,-5841,-2617, 1115, -748, -607, 6074, 354,
+ : -18549, 30125,20012, -730, 824, 23, 1289, -352,-14767,-2062,
+ :-135245,-14594, 4197,-4030,-5630,-2898, 2540, -306, 2939, 1986,
+ : 89948, 2103, 8963, 2695, 3682, 1648, 866, -154, -1963, -283 /
+*
+ DATA SLO /
+ : -342, 136, -23, 62, 66, -52, -33, 17, 0, 0,
+ : 524, -149, -35, 117, 151, 122, -71, -62, 0, 0,
+ : -105, -137, 258, 35, -116, -88, -112, -80, 0, 0,
+ : 854, -205, -936, -240, 140, -341, -97, -232, 536, 0,
+ : -56980, 8016, 1012, 1448,-3024,-3710, 318, 503, 3767, 577,
+ : 138606,-13478,-4964, 1441,-1319,-1482, 427, 1236, -9167,-1918,
+ : 71234,-41116, 5334,-4935,-1848, 66, 434,-1748, 3780, -701,
+ : -47645, 11647, 2166, 3194, 679, 0, -244, -419, -2531, 48 /
+
+* -----
+* Pluto
+* -----
+
+*
+* Coefficients for fundamental arguments: mean longitudes
+* (degrees) and mean rate of change of longitude (degrees per
+* Julian century) for Jupiter, Saturn and Pluto
+*
+ DATA DJ0, DJD / 34.35D0, 3034.9057D0 /
+ DATA DS0, DSD / 50.08D0, 1222.1138D0 /
+ DATA DP0, DPD / 238.96D0, 144.9600D0 /
+
+* Coefficients for latitude, longitude, radius vector
+ DATA DL0,DLD0 / 238.956785D0, 144.96D0 /
+ DATA DB0 / -3.908202D0 /
+ DATA DR0 / 40.7247248D0 /
+
+*
+* Coefficients for periodic terms (Meeus's Table 36.A)
+*
+* The coefficients for term n in the series are:
+*
+* IJSP(1,n) J
+* IJSP(2,n) S
+* IJSP(3,n) P
+* AB(1,1,n) longitude sine (degrees)
+* AB(2,1,n) longitude cosine (degrees)
+* AB(1,2,n) latitude sine (degrees)
+* AB(2,2,n) latitude cosine (degrees)
+* AB(1,3,n) radius vector sine (AU)
+* AB(2,3,n) radius vector cosine (AU)
+*
+ DATA (IJSP(I, 1),I=1,3),((AB(J,I, 1),J=1,2),I=1,3) /
+ : 0, 0, 1,
+ : -19798886D-6, 19848454D-6,
+ : -5453098D-6, -14974876D-6,
+ : 66867334D-7, 68955876D-7 /
+ DATA (IJSP(I, 2),I=1,3),((AB(J,I, 2),J=1,2),I=1,3) /
+ : 0, 0, 2,
+ : 897499D-6, -4955707D-6,
+ : 3527363D-6, 1672673D-6,
+ : -11826086D-7, -333765D-7 /
+ DATA (IJSP(I, 3),I=1,3),((AB(J,I, 3),J=1,2),I=1,3) /
+ : 0, 0, 3,
+ : 610820D-6, 1210521D-6,
+ : -1050939D-6, 327763D-6,
+ : 1593657D-7, -1439953D-7 /
+ DATA (IJSP(I, 4),I=1,3),((AB(J,I, 4),J=1,2),I=1,3) /
+ : 0, 0, 4,
+ : -341639D-6, -189719D-6,
+ : 178691D-6, -291925D-6,
+ : -18948D-7, 482443D-7 /
+ DATA (IJSP(I, 5),I=1,3),((AB(J,I, 5),J=1,2),I=1,3) /
+ : 0, 0, 5,
+ : 129027D-6, -34863D-6,
+ : 18763D-6, 100448D-6,
+ : -66634D-7, -85576D-7 /
+ DATA (IJSP(I, 6),I=1,3),((AB(J,I, 6),J=1,2),I=1,3) /
+ : 0, 0, 6,
+ : -38215D-6, 31061D-6,
+ : -30594D-6, -25838D-6,
+ : 30841D-7, -5765D-7 /
+ DATA (IJSP(I, 7),I=1,3),((AB(J,I, 7),J=1,2),I=1,3) /
+ : 0, 1, -1,
+ : 20349D-6, -9886D-6,
+ : 4965D-6, 11263D-6,
+ : -6140D-7, 22254D-7 /
+ DATA (IJSP(I, 8),I=1,3),((AB(J,I, 8),J=1,2),I=1,3) /
+ : 0, 1, 0,
+ : -4045D-6, -4904D-6,
+ : 310D-6, -132D-6,
+ : 4434D-7, 4443D-7 /
+ DATA (IJSP(I, 9),I=1,3),((AB(J,I, 9),J=1,2),I=1,3) /
+ : 0, 1, 1,
+ : -5885D-6, -3238D-6,
+ : 2036D-6, -947D-6,
+ : -1518D-7, 641D-7 /
+ DATA (IJSP(I,10),I=1,3),((AB(J,I,10),J=1,2),I=1,3) /
+ : 0, 1, 2,
+ : -3812D-6, 3011D-6,
+ : -2D-6, -674D-6,
+ : -5D-7, 792D-7 /
+ DATA (IJSP(I,11),I=1,3),((AB(J,I,11),J=1,2),I=1,3) /
+ : 0, 1, 3,
+ : -601D-6, 3468D-6,
+ : -329D-6, -563D-6,
+ : 518D-7, 518D-7 /
+ DATA (IJSP(I,12),I=1,3),((AB(J,I,12),J=1,2),I=1,3) /
+ : 0, 2, -2,
+ : 1237D-6, 463D-6,
+ : -64D-6, 39D-6,
+ : -13D-7, -221D-7 /
+ DATA (IJSP(I,13),I=1,3),((AB(J,I,13),J=1,2),I=1,3) /
+ : 0, 2, -1,
+ : 1086D-6, -911D-6,
+ : -94D-6, 210D-6,
+ : 837D-7, -494D-7 /
+ DATA (IJSP(I,14),I=1,3),((AB(J,I,14),J=1,2),I=1,3) /
+ : 0, 2, 0,
+ : 595D-6, -1229D-6,
+ : -8D-6, -160D-6,
+ : -281D-7, 616D-7 /
+ DATA (IJSP(I,15),I=1,3),((AB(J,I,15),J=1,2),I=1,3) /
+ : 1, -1, 0,
+ : 2484D-6, -485D-6,
+ : -177D-6, 259D-6,
+ : 260D-7, -395D-7 /
+ DATA (IJSP(I,16),I=1,3),((AB(J,I,16),J=1,2),I=1,3) /
+ : 1, -1, 1,
+ : 839D-6, -1414D-6,
+ : 17D-6, 234D-6,
+ : -191D-7, -396D-7 /
+ DATA (IJSP(I,17),I=1,3),((AB(J,I,17),J=1,2),I=1,3) /
+ : 1, 0, -3,
+ : -964D-6, 1059D-6,
+ : 582D-6, -285D-6,
+ : -3218D-7, 370D-7 /
+ DATA (IJSP(I,18),I=1,3),((AB(J,I,18),J=1,2),I=1,3) /
+ : 1, 0, -2,
+ : -2303D-6, -1038D-6,
+ : -298D-6, 692D-6,
+ : 8019D-7, -7869D-7 /
+ DATA (IJSP(I,19),I=1,3),((AB(J,I,19),J=1,2),I=1,3) /
+ : 1, 0, -1,
+ : 7049D-6, 747D-6,
+ : 157D-6, 201D-6,
+ : 105D-7, 45637D-7 /
+ DATA (IJSP(I,20),I=1,3),((AB(J,I,20),J=1,2),I=1,3) /
+ : 1, 0, 0,
+ : 1179D-6, -358D-6,
+ : 304D-6, 825D-6,
+ : 8623D-7, 8444D-7 /
+ DATA (IJSP(I,21),I=1,3),((AB(J,I,21),J=1,2),I=1,3) /
+ : 1, 0, 1,
+ : 393D-6, -63D-6,
+ : -124D-6, -29D-6,
+ : -896D-7, -801D-7 /
+ DATA (IJSP(I,22),I=1,3),((AB(J,I,22),J=1,2),I=1,3) /
+ : 1, 0, 2,
+ : 111D-6, -268D-6,
+ : 15D-6, 8D-6,
+ : 208D-7, -122D-7 /
+ DATA (IJSP(I,23),I=1,3),((AB(J,I,23),J=1,2),I=1,3) /
+ : 1, 0, 3,
+ : -52D-6, -154D-6,
+ : 7D-6, 15D-6,
+ : -133D-7, 65D-7 /
+ DATA (IJSP(I,24),I=1,3),((AB(J,I,24),J=1,2),I=1,3) /
+ : 1, 0, 4,
+ : -78D-6, -30D-6,
+ : 2D-6, 2D-6,
+ : -16D-7, 1D-7 /
+ DATA (IJSP(I,25),I=1,3),((AB(J,I,25),J=1,2),I=1,3) /
+ : 1, 1, -3,
+ : -34D-6, -26D-6,
+ : 4D-6, 2D-6,
+ : -22D-7, 7D-7 /
+ DATA (IJSP(I,26),I=1,3),((AB(J,I,26),J=1,2),I=1,3) /
+ : 1, 1, -2,
+ : -43D-6, 1D-6,
+ : 3D-6, 0D-6,
+ : -8D-7, 16D-7 /
+ DATA (IJSP(I,27),I=1,3),((AB(J,I,27),J=1,2),I=1,3) /
+ : 1, 1, -1,
+ : -15D-6, 21D-6,
+ : 1D-6, -1D-6,
+ : 2D-7, 9D-7 /
+ DATA (IJSP(I,28),I=1,3),((AB(J,I,28),J=1,2),I=1,3) /
+ : 1, 1, 0,
+ : -1D-6, 15D-6,
+ : 0D-6, -2D-6,
+ : 12D-7, 5D-7 /
+ DATA (IJSP(I,29),I=1,3),((AB(J,I,29),J=1,2),I=1,3) /
+ : 1, 1, 1,
+ : 4D-6, 7D-6,
+ : 1D-6, 0D-6,
+ : 1D-7, -3D-7 /
+ DATA (IJSP(I,30),I=1,3),((AB(J,I,30),J=1,2),I=1,3) /
+ : 1, 1, 3,
+ : 1D-6, 5D-6,
+ : 1D-6, -1D-6,
+ : 1D-7, 0D-7 /
+ DATA (IJSP(I,31),I=1,3),((AB(J,I,31),J=1,2),I=1,3) /
+ : 2, 0, -6,
+ : 8D-6, 3D-6,
+ : -2D-6, -3D-6,
+ : 9D-7, 5D-7 /
+ DATA (IJSP(I,32),I=1,3),((AB(J,I,32),J=1,2),I=1,3) /
+ : 2, 0, -5,
+ : -3D-6, 6D-6,
+ : 1D-6, 2D-6,
+ : 2D-7, -1D-7 /
+ DATA (IJSP(I,33),I=1,3),((AB(J,I,33),J=1,2),I=1,3) /
+ : 2, 0, -4,
+ : 6D-6, -13D-6,
+ : -8D-6, 2D-6,
+ : 14D-7, 10D-7 /
+ DATA (IJSP(I,34),I=1,3),((AB(J,I,34),J=1,2),I=1,3) /
+ : 2, 0, -3,
+ : 10D-6, 22D-6,
+ : 10D-6, -7D-6,
+ : -65D-7, 12D-7 /
+ DATA (IJSP(I,35),I=1,3),((AB(J,I,35),J=1,2),I=1,3) /
+ : 2, 0, -2,
+ : -57D-6, -32D-6,
+ : 0D-6, 21D-6,
+ : 126D-7, -233D-7 /
+ DATA (IJSP(I,36),I=1,3),((AB(J,I,36),J=1,2),I=1,3) /
+ : 2, 0, -1,
+ : 157D-6, -46D-6,
+ : 8D-6, 5D-6,
+ : 270D-7, 1068D-7 /
+ DATA (IJSP(I,37),I=1,3),((AB(J,I,37),J=1,2),I=1,3) /
+ : 2, 0, 0,
+ : 12D-6, -18D-6,
+ : 13D-6, 16D-6,
+ : 254D-7, 155D-7 /
+ DATA (IJSP(I,38),I=1,3),((AB(J,I,38),J=1,2),I=1,3) /
+ : 2, 0, 1,
+ : -4D-6, 8D-6,
+ : -2D-6, -3D-6,
+ : -26D-7, -2D-7 /
+ DATA (IJSP(I,39),I=1,3),((AB(J,I,39),J=1,2),I=1,3) /
+ : 2, 0, 2,
+ : -5D-6, 0D-6,
+ : 0D-6, 0D-6,
+ : 7D-7, 0D-7 /
+ DATA (IJSP(I,40),I=1,3),((AB(J,I,40),J=1,2),I=1,3) /
+ : 2, 0, 3,
+ : 3D-6, 4D-6,
+ : 0D-6, 1D-6,
+ : -11D-7, 4D-7 /
+ DATA (IJSP(I,41),I=1,3),((AB(J,I,41),J=1,2),I=1,3) /
+ : 3, 0, -2,
+ : -1D-6, -1D-6,
+ : 0D-6, 1D-6,
+ : 4D-7, -14D-7 /
+ DATA (IJSP(I,42),I=1,3),((AB(J,I,42),J=1,2),I=1,3) /
+ : 3, 0, -1,
+ : 6D-6, -3D-6,
+ : 0D-6, 0D-6,
+ : 18D-7, 35D-7 /
+ DATA (IJSP(I,43),I=1,3),((AB(J,I,43),J=1,2),I=1,3) /
+ : 3, 0, 0,
+ : -1D-6, -2D-6,
+ : 0D-6, 1D-6,
+ : 13D-7, 3D-7 /
+
+
+* Validate the planet number.
+ IF (NP.LT.1.OR.NP.GT.9) THEN
+ JSTAT=-1
+ DO I=1,6
+ PV(I)=0D0
+ END DO
+ ELSE
+
+* Separate algorithms for Pluto and the rest.
+ IF (NP.NE.9) THEN
+
+* -----------------------
+* Mercury through Neptune
+* -----------------------
+
+* Time: Julian millennia since J2000.
+ T=(DATE-51544.5D0)/365250D0
+
+* OK status unless remote epoch.
+ IF (ABS(T).LE.1D0) THEN
+ JSTAT=0
+ ELSE
+ JSTAT=1
+ END IF
+
+* Compute the mean elements.
+ DA=A(1,NP)+(A(2,NP)+A(3,NP)*T)*T
+ DL=(3600D0*DLM(1,NP)+(DLM(2,NP)+DLM(3,NP)*T)*T)*AS2R
+ DE=E(1,NP)+(E(2,NP)+E(3,NP)*T)*T
+ DPE=MOD((3600D0*PI(1,NP)+(PI(2,NP)+PI(3,NP)*T)*T)*AS2R,D2PI)
+ DI=(3600D0*DINC(1,NP)+(DINC(2,NP)+DINC(3,NP)*T)*T)*AS2R
+ DO=MOD((3600D0*OMEGA(1,NP)
+ : +(OMEGA(2,NP)+OMEGA(3,NP)*T)*T)*AS2R,D2PI)
+
+* Apply the trigonometric terms.
+ DMU=0.35953620D0*T
+ DO J=1,8
+ ARGA=DKP(J,NP)*DMU
+ ARGL=DKQ(J,NP)*DMU
+ DA=DA+(CA(J,NP)*COS(ARGA)+SA(J,NP)*SIN(ARGA))*1D-7
+ DL=DL+(CLO(J,NP)*COS(ARGL)+SLO(J,NP)*SIN(ARGL))*1D-7
+ END DO
+ ARGA=DKP(9,NP)*DMU
+ DA=DA+T*(CA(9,NP)*COS(ARGA)+SA(9,NP)*SIN(ARGA))*1D-7
+ DO J=9,10
+ ARGL=DKQ(J,NP)*DMU
+ DL=DL+T*(CLO(J,NP)*COS(ARGL)+SLO(J,NP)*SIN(ARGL))*1D-7
+ END DO
+ DL=MOD(DL,D2PI)
+
+* Daily motion.
+ DM=GCON*SQRT((1D0+1D0/AMAS(NP))/(DA*DA*DA))
+
+* Make the prediction.
+ CALL sla_PLANEL(DATE,1,DATE,DI,DO,DPE,DA,DE,DL,DM,PV,J)
+ IF (J.LT.0) JSTAT=-2
+
+ ELSE
+
+* -----
+* Pluto
+* -----
+
+* Time: Julian centuries since J2000.
+ T=(DATE-51544.5D0)/36525D0
+
+* OK status unless remote epoch.
+ IF (T.GE.-1.15D0.AND.T.LE.1D0) THEN
+ JSTAT=0
+ ELSE
+ JSTAT=1
+ END IF
+
+* Fundamental arguments (radians).
+ DJ=(DJ0+DJD*T)*D2R
+ DS=(DS0+DSD*T)*D2R
+ DP=(DP0+DPD*T)*D2R
+
+* Initialize coefficients and derivatives.
+ DO I=1,3
+ WLBR(I)=0D0
+ WLBRD(I)=0D0
+ END DO
+
+* Term by term through Meeus Table 36.A.
+ DO J=1,43
+
+* Argument and derivative (radians, radians per century).
+ WJ=DBLE(IJSP(1,J))
+ WS=DBLE(IJSP(2,J))
+ WP=DBLE(IJSP(3,J))
+ AL=WJ*DJ+WS*DS+WP*DP
+ ALD=(WJ*DJD+WS*DSD+WP*DPD)*D2R
+
+* Functions of argument.
+ SAL=SIN(AL)
+ CAL=COS(AL)
+
+* Periodic terms in longitude, latitude, radius vector.
+ DO I=1,3
+
+* A and B coefficients (deg, AU).
+ AC=AB(1,I,J)
+ BC=AB(2,I,J)
+
+* Periodic terms (deg, AU, deg/Jc, AU/Jc).
+ WLBR(I)=WLBR(I)+AC*SAL+BC*CAL
+ WLBRD(I)=WLBRD(I)+(AC*CAL-BC*SAL)*ALD
+ END DO
+ END DO
+
+* Heliocentric longitude and derivative (radians, radians/sec).
+ DL=(DL0+DLD0*T+WLBR(1))*D2R
+ DLD=(DLD0+WLBRD(1))*D2R/SPC
+
+* Heliocentric latitude and derivative (radians, radians/sec).
+ DB=(DB0+WLBR(2))*D2R
+ DBD=WLBRD(2)*D2R/SPC
+
+* Heliocentric radius vector and derivative (AU, AU/sec).
+ DR=DR0+WLBR(3)
+ DRD=WLBRD(3)/SPC
+
+* Functions of latitude, longitude, radius vector.
+ SL=SIN(DL)
+ CL=COS(DL)
+ SB=SIN(DB)
+ CB=COS(DB)
+ SLCB=SL*CB
+ CLCB=CL*CB
+
+* Heliocentric vector and derivative, J2000 ecliptic and equinox.
+ X=DR*CLCB
+ Y=DR*SLCB
+ Z=DR*SB
+ XD=DRD*CLCB-DR*(CL*SB*DBD+SLCB*DLD)
+ YD=DRD*SLCB+DR*(-SL*SB*DBD+CLCB*DLD)
+ ZD=DRD*SB+DR*CB*DBD
+
+* Transform to J2000 equator and equinox.
+ PV(1)=X
+ PV(2)=Y*CE-Z*SE
+ PV(3)=Y*SE+Z*CE
+ PV(4)=XD
+ PV(5)=YD*CE-ZD*SE
+ PV(6)=YD*SE+ZD*CE
+ END IF
+ END IF
+
+ END
diff --git a/src/slalib/plante.f b/src/slalib/plante.f
new file mode 100644
index 0000000..e8f89d9
--- /dev/null
+++ b/src/slalib/plante.f
@@ -0,0 +1,157 @@
+ SUBROUTINE sla_PLANTE (DATE, ELONG, PHI, JFORM, EPOCH,
+ : ORBINC, ANODE, PERIH, AORQ, E,
+ : AORL, DM, RA, DEC, R, JSTAT)
+*+
+* - - - - - - -
+* P L A N T E
+* - - - - - - -
+*
+* Topocentric apparent RA,Dec of a Solar-System object whose
+* heliocentric orbital elements are known.
+*
+* Given:
+* DATE d MJD of observation (JD - 2400000.5)
+* ELONG d observer's east longitude (radians)
+* PHI d observer's geodetic latitude (radians)
+* JFORM i choice of element set (1-3; Note 4)
+* EPOCH d epoch of elements (TT MJD)
+* ORBINC d inclination (radians)
+* ANODE d longitude of the ascending node (radians)
+* PERIH d longitude or argument of perihelion (radians)
+* AORQ d mean distance or perihelion distance (AU)
+* E d eccentricity
+* AORL d mean anomaly or longitude (radians, JFORM=1,2 only)
+* DM d daily motion (radians, JFORM=1 only )
+*
+* Returned:
+* RA,DEC d RA, Dec (topocentric apparent, radians)
+* R d distance from observer (AU)
+* JSTAT i status: 0 = OK
+* -1 = illegal JFORM
+* -2 = illegal E
+* -3 = illegal AORQ
+* -4 = illegal DM
+* -5 = numerical error
+*
+* Notes:
+*
+* 1 DATE is the instant for which the prediction is required. It is
+* in the TT timescale (formerly Ephemeris Time, ET) and is a
+* Modified Julian Date (JD-2400000.5).
+*
+* 2 The longitude and latitude allow correction for geocentric
+* parallax. This is usually a small effect, but can become
+* important for Earth-crossing asteroids. Geocentric positions
+* can be generated by appropriate use of routines sla_EVP and
+* sla_PLANEL.
+*
+* 3 The elements are with respect to the J2000 ecliptic and equinox.
+*
+* 4 Three different element-format options are available:
+*
+* Option JFORM=1, suitable for the major planets:
+*
+* EPOCH = epoch of elements (TT MJD)
+* ORBINC = inclination i (radians)
+* ANODE = longitude of the ascending node, big omega (radians)
+* PERIH = longitude of perihelion, curly pi (radians)
+* AORQ = mean distance, a (AU)
+* E = eccentricity, e
+* AORL = mean longitude L (radians)
+* DM = daily motion (radians)
+*
+* Option JFORM=2, suitable for minor planets:
+*
+* EPOCH = epoch of elements (TT MJD)
+* ORBINC = inclination i (radians)
+* ANODE = longitude of the ascending node, big omega (radians)
+* PERIH = argument of perihelion, little omega (radians)
+* AORQ = mean distance, a (AU)
+* E = eccentricity, e
+* AORL = mean anomaly M (radians)
+*
+* Option JFORM=3, suitable for comets:
+*
+* EPOCH = epoch of perihelion (TT MJD)
+* ORBINC = inclination i (radians)
+* ANODE = longitude of the ascending node, big omega (radians)
+* PERIH = argument of perihelion, little omega (radians)
+* AORQ = perihelion distance, q (AU)
+* E = eccentricity, e
+*
+* 5 Unused elements (DM for JFORM=2, AORL and DM for JFORM=3) are
+* not accessed.
+*
+* Called: sla_GMST, sla_DT, sla_EPJ, sla_PVOBS, sla_PRENUT,
+* sla_PLANEL, sla_DMXV, sla_DCC2S, sla_DRANRM
+*
+* P.T.Wallace Starlink 17 March 1999
+*
+* Copyright (C) 1999 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION DATE,ELONG,PHI
+ INTEGER JFORM
+ DOUBLE PRECISION EPOCH,ORBINC,ANODE,PERIH,AORQ,E,
+ : AORL,DM,RA,DEC,R
+ INTEGER JSTAT
+
+* Light time for unit distance (sec)
+ DOUBLE PRECISION TAU
+ PARAMETER (TAU=499.004782D0)
+
+ INTEGER I
+ DOUBLE PRECISION DVB(3),DPB(3),VSG(6),VSP(6),V(6),RMAT(3,3),
+ : VGP(6),STL,VGO(6),DX,DY,DZ,D,TL
+ DOUBLE PRECISION sla_GMST,sla_DT,sla_EPJ,sla_DRANRM
+
+
+
+* Sun to geocentre (J2000).
+ CALL sla_EVP(DATE,2000D0,DVB,DPB,VSG(4),VSG)
+
+* Sun to planet (J2000).
+ CALL sla_PLANEL(DATE,JFORM,EPOCH,ORBINC,ANODE,PERIH,AORQ,
+ : E,AORL,DM,VSP,JSTAT)
+
+* Geocentre to planet (J2000).
+ DO I=1,6
+ V(I)=VSP(I)-VSG(I)
+ END DO
+
+* Precession and nutation to date.
+ CALL sla_PRENUT(2000D0,DATE,RMAT)
+ CALL sla_DMXV(RMAT,V,VGP)
+ CALL sla_DMXV(RMAT,V(4),VGP(4))
+
+* Geocentre to observer (date).
+ STL=sla_GMST(DATE-sla_DT(sla_EPJ(DATE))/86400D0)+ELONG
+ CALL sla_PVOBS(PHI,0D0,STL,VGO)
+
+* Observer to planet (date).
+ DO I=1,6
+ V(I)=VGP(I)-VGO(I)
+ END DO
+
+* Geometric distance (AU).
+ DX=V(1)
+ DY=V(2)
+ DZ=V(3)
+ D=SQRT(DX*DX+DY*DY+DZ*DZ)
+
+* Light time (sec).
+ TL=TAU*D
+
+* Correct position for planetary aberration
+ DO I=1,3
+ V(I)=V(I)-TL*V(I+3)
+ END DO
+
+* To RA,Dec.
+ CALL sla_DCC2S(V,RA,DEC)
+ RA=sla_DRANRM(RA)
+ R=D
+
+ END
diff --git a/src/slalib/pm.f b/src/slalib/pm.f
new file mode 100644
index 0000000..82a5772
--- /dev/null
+++ b/src/slalib/pm.f
@@ -0,0 +1,74 @@
+ SUBROUTINE sla_PM (R0, D0, PR, PD, PX, RV, EP0, EP1, R1, D1)
+*+
+* - - -
+* P M
+* - - -
+*
+* Apply corrections for proper motion to a star RA,Dec
+* (double precision)
+*
+* References:
+* 1984 Astronomical Almanac, pp B39-B41.
+* (also Lederle & Schwan, Astron. Astrophys. 134,
+* 1-6, 1984)
+*
+* Given:
+* R0,D0 dp RA,Dec at epoch EP0 (rad)
+* PR,PD dp proper motions: RA,Dec changes per year of epoch
+* PX dp parallax (arcsec)
+* RV dp radial velocity (km/sec, +ve if receding)
+* EP0 dp start epoch in years (e.g. Julian epoch)
+* EP1 dp end epoch in years (same system as EP0)
+*
+* Returned:
+* R1,D1 dp RA,Dec at epoch EP1 (rad)
+*
+* Called:
+* sla_DCS2C spherical to Cartesian
+* sla_DCC2S Cartesian to spherical
+* sla_DRANRM normalize angle 0-2Pi
+*
+* Note:
+* The proper motions in RA are dRA/dt rather than
+* cos(Dec)*dRA/dt, and are in the same coordinate
+* system as R0,D0.
+*
+* P.T.Wallace Starlink 23 August 1996
+*
+* Copyright (C) 1996 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION R0,D0,PR,PD,PX,RV,EP0,EP1,R1,D1
+
+* Km/s to AU/year multiplied by arc seconds to radians
+ DOUBLE PRECISION VFR
+ PARAMETER (VFR=0.21094502D0*0.484813681109535994D-5)
+
+ INTEGER I
+ DOUBLE PRECISION sla_DRANRM
+ DOUBLE PRECISION W,EM(3),T,P(3)
+
+
+
+* Spherical to Cartesian
+ CALL sla_DCS2C(R0,D0,P)
+
+* Space motion (radians per year)
+ W=VFR*RV*PX
+ EM(1)=-PR*P(2)-PD*COS(R0)*SIN(D0)+W*P(1)
+ EM(2)= PR*P(1)-PD*SIN(R0)*SIN(D0)+W*P(2)
+ EM(3)= PD*COS(D0) +W*P(3)
+
+* Apply the motion
+ T=EP1-EP0
+ DO I=1,3
+ P(I)=P(I)+T*EM(I)
+ END DO
+
+* Cartesian to spherical
+ CALL sla_DCC2S(P,R1,D1)
+ R1=sla_DRANRM(R1)
+
+ END
diff --git a/src/slalib/polmo.f b/src/slalib/polmo.f
new file mode 100644
index 0000000..4532ca8
--- /dev/null
+++ b/src/slalib/polmo.f
@@ -0,0 +1,133 @@
+ SUBROUTINE sla_POLMO ( ELONGM, PHIM, XP, YP, ELONG, PHI, DAZ )
+*+
+* - - - - - -
+* P O L M O
+* - - - - - -
+*
+* Polar motion: correct site longitude and latitude for polar
+* motion and calculate azimuth difference between celestial and
+* terrestrial poles.
+*
+* Given:
+* ELONGM d mean longitude of the observer (radians, east +ve)
+* PHIM d mean geodetic latitude of the observer (radians)
+* XP d polar motion x-coordinate (radians)
+* YP d polar motion y-coordinate (radians)
+*
+* Returned:
+* ELONG d true longitude of the observer (radians, east +ve)
+* PHI d true geodetic latitude of the observer (radians)
+* DAZ d azimuth correction (terrestrial-celestial, radians)
+*
+* Notes:
+*
+* 1) "Mean" longitude and latitude are the (fixed) values for the
+* site's location with respect to the IERS terrestrial reference
+* frame; the latitude is geodetic. TAKE CARE WITH THE LONGITUDE
+* SIGN CONVENTION. The longitudes used by the present routine
+* are east-positive, in accordance with geographical convention
+* (and right-handed). In particular, note that the longitudes
+* returned by the sla_OBS routine are west-positive, following
+* astronomical usage, and must be reversed in sign before use in
+* the present routine.
+*
+* 2) XP and YP are the (changing) coordinates of the Celestial
+* Ephemeris Pole with respect to the IERS Reference Pole.
+* XP is positive along the meridian at longitude 0 degrees,
+* and YP is positive along the meridian at longitude
+* 270 degrees (i.e. 90 degrees west). Values for XP,YP can
+* be obtained from IERS circulars and equivalent publications;
+* the maximum amplitude observed so far is about 0.3 arcseconds.
+*
+* 3) "True" longitude and latitude are the (moving) values for
+* the site's location with respect to the celestial ephemeris
+* pole and the meridian which corresponds to the Greenwich
+* apparent sidereal time. The true longitude and latitude
+* link the terrestrial coordinates with the standard celestial
+* models (for precession, nutation, sidereal time etc).
+*
+* 4) The azimuths produced by sla_AOP and sla_AOPQK are with
+* respect to due north as defined by the Celestial Ephemeris
+* Pole, and can therefore be called "celestial azimuths".
+* However, a telescope fixed to the Earth measures azimuth
+* essentially with respect to due north as defined by the
+* IERS Reference Pole, and can therefore be called "terrestrial
+* azimuth". Uncorrected, this would manifest itself as a
+* changing "azimuth zero-point error". The value DAZ is the
+* correction to be added to a celestial azimuth to produce
+* a terrestrial azimuth.
+*
+* 5) The present routine is rigorous. For most practical
+* purposes, the following simplified formulae provide an
+* adequate approximation:
+*
+* ELONG = ELONGM+XP*COS(ELONGM)-YP*SIN(ELONGM)
+* PHI = PHIM+(XP*SIN(ELONGM)+YP*COS(ELONGM))*TAN(PHIM)
+* DAZ = -SQRT(XP*XP+YP*YP)*COS(ELONGM-ATAN2(XP,YP))/COS(PHIM)
+*
+* An alternative formulation for DAZ is:
+*
+* X = COS(ELONGM)*COS(PHIM)
+* Y = SIN(ELONGM)*COS(PHIM)
+* DAZ = ATAN2(-X*YP-Y*XP,X*X+Y*Y)
+*
+* Reference: Seidelmann, P.K. (ed), 1992. "Explanatory Supplement
+* to the Astronomical Almanac", ISBN 0-935702-68-7,
+* sections 3.27, 4.25, 4.52.
+*
+* P.T.Wallace Starlink 22 February 1996
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION ELONGM,PHIM,XP,YP,ELONG,PHI,DAZ
+
+ DOUBLE PRECISION SEL,CEL,SPH,CPH,XM,YM,ZM,XNM,YNM,ZNM,
+ : SXP,CXP,SYP,CYP,ZW,XT,YT,ZT,XNT,YNT
+
+
+
+* Site mean longitude and mean geodetic latitude as a Cartesian vector
+ SEL=SIN(ELONGM)
+ CEL=COS(ELONGM)
+ SPH=SIN(PHIM)
+ CPH=COS(PHIM)
+
+ XM=CEL*CPH
+ YM=SEL*CPH
+ ZM=SPH
+
+* Rotate site vector by polar motion, Y-component then X-component
+ SXP=SIN(XP)
+ CXP=COS(XP)
+ SYP=SIN(YP)
+ CYP=COS(YP)
+
+ ZW=(-YM*SYP+ZM*CYP)
+
+ XT=XM*CXP-ZW*SXP
+ YT=YM*CYP+ZM*SYP
+ ZT=XM*SXP+ZW*CXP
+
+* Rotate also the geocentric direction of the terrestrial pole (0,0,1)
+ XNM=-SXP*CYP
+ YNM=SYP
+ ZNM=CXP*CYP
+
+ CPH=SQRT(XT*XT+YT*YT)
+ IF (CPH.EQ.0D0) XT=1D0
+ SEL=YT/CPH
+ CEL=XT/CPH
+
+* Return true longitude and true geodetic latitude of site
+ ELONG=ATAN2(YT,XT)
+ PHI=ATAN2(ZT,CPH)
+
+* Return current azimuth of terrestrial pole seen from site position
+ XNT=(XNM*CEL+YNM*SEL)*ZT-ZNM*CPH
+ YNT=-XNM*SEL+YNM*CEL
+ DAZ=ATAN2(-YNT,-XNT)
+
+ END
diff --git a/src/slalib/prebn.f b/src/slalib/prebn.f
new file mode 100644
index 0000000..a99dd51
--- /dev/null
+++ b/src/slalib/prebn.f
@@ -0,0 +1,62 @@
+ SUBROUTINE sla_PREBN (BEP0, BEP1, RMATP)
+*+
+* - - - - - -
+* P R E B N
+* - - - - - -
+*
+* Generate the matrix of precession between two epochs,
+* using the old, pre-IAU1976, Bessel-Newcomb model, using
+* Kinoshita's formulation (double precision)
+*
+* Given:
+* BEP0 dp beginning Besselian epoch
+* BEP1 dp ending Besselian epoch
+*
+* Returned:
+* RMATP dp(3,3) precession matrix
+*
+* The matrix is in the sense V(BEP1) = RMATP * V(BEP0)
+*
+* Reference:
+* Kinoshita, H. (1975) 'Formulas for precession', SAO Special
+* Report No. 364, Smithsonian Institution Astrophysical
+* Observatory, Cambridge, Massachusetts.
+*
+* Called: sla_DEULER
+*
+* P.T.Wallace Starlink 23 August 1996
+*
+* Copyright (C) 1996 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION BEP0,BEP1,RMATP(3,3)
+
+* Arc seconds to radians
+ DOUBLE PRECISION AS2R
+ PARAMETER (AS2R=0.484813681109535994D-5)
+
+ DOUBLE PRECISION BIGT,T,TAS2R,W,ZETA,Z,THETA
+
+
+
+* Interval between basic epoch B1850.0 and beginning epoch in TC
+ BIGT = (BEP0-1850D0)/100D0
+
+* Interval over which precession required, in tropical centuries
+ T = (BEP1-BEP0)/100D0
+
+* Euler angles
+ TAS2R = T*AS2R
+ W = 2303.5548D0+(1.39720D0+0.000059D0*BIGT)*BIGT
+
+ ZETA = (W+(0.30242D0-0.000269D0*BIGT+0.017996D0*T)*T)*TAS2R
+ Z = (W+(1.09478D0+0.000387D0*BIGT+0.018324D0*T)*T)*TAS2R
+ THETA = (2005.1125D0+(-0.85294D0-0.000365D0*BIGT)*BIGT+
+ : (-0.42647D0-0.000365D0*BIGT-0.041802D0*T)*T)*TAS2R
+
+* Rotation matrix
+ CALL sla_DEULER('ZYZ',-ZETA,THETA,-Z,RMATP)
+
+ END
diff --git a/src/slalib/prec.f b/src/slalib/prec.f
new file mode 100644
index 0000000..65a4bb6
--- /dev/null
+++ b/src/slalib/prec.f
@@ -0,0 +1,79 @@
+ SUBROUTINE sla_PREC (EP0, EP1, RMATP)
+*+
+* - - - - -
+* P R E C
+* - - - - -
+*
+* Form the matrix of precession between two epochs (IAU 1976, FK5)
+* (double precision)
+*
+* Given:
+* EP0 dp beginning epoch
+* EP1 dp ending epoch
+*
+* Returned:
+* RMATP dp(3,3) precession matrix
+*
+* Notes:
+*
+* 1) The epochs are TDB (loosely ET) Julian epochs.
+*
+* 2) The matrix is in the sense V(EP1) = RMATP * V(EP0)
+*
+* 3) Though the matrix method itself is rigorous, the precession
+* angles are expressed through canonical polynomials which are
+* valid only for a limited time span. There are also known
+* errors in the IAU precession rate. The absolute accuracy
+* of the present formulation is better than 0.1 arcsec from
+* 1960AD to 2040AD, better than 1 arcsec from 1640AD to 2360AD,
+* and remains below 3 arcsec for the whole of the period
+* 500BC to 3000AD. The errors exceed 10 arcsec outside the
+* range 1200BC to 3900AD, exceed 100 arcsec outside 4200BC to
+* 5600AD and exceed 1000 arcsec outside 6800BC to 8200AD.
+* The SLALIB routine sla_PRECL implements a more elaborate
+* model which is suitable for problems spanning several
+* thousand years.
+*
+* References:
+* Lieske,J.H., 1979. Astron.Astrophys.,73,282.
+* equations (6) & (7), p283.
+* Kaplan,G.H., 1981. USNO circular no. 163, pA2.
+*
+* Called: sla_DEULER
+*
+* P.T.Wallace Starlink 23 August 1996
+*
+* Copyright (C) 1996 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION EP0,EP1,RMATP(3,3)
+
+* Arc seconds to radians
+ DOUBLE PRECISION AS2R
+ PARAMETER (AS2R=0.484813681109535994D-5)
+
+ DOUBLE PRECISION T0,T,TAS2R,W,ZETA,Z,THETA
+
+
+
+* Interval between basic epoch J2000.0 and beginning epoch (JC)
+ T0 = (EP0-2000D0)/100D0
+
+* Interval over which precession required (JC)
+ T = (EP1-EP0)/100D0
+
+* Euler angles
+ TAS2R = T*AS2R
+ W = 2306.2181D0+(1.39656D0-0.000139D0*T0)*T0
+
+ ZETA = (W+((0.30188D0-0.000344D0*T0)+0.017998D0*T)*T)*TAS2R
+ Z = (W+((1.09468D0+0.000066D0*T0)+0.018203D0*T)*T)*TAS2R
+ THETA = ((2004.3109D0+(-0.85330D0-0.000217D0*T0)*T0)
+ : +((-0.42665D0-0.000217D0*T0)-0.041833D0*T)*T)*TAS2R
+
+* Rotation matrix
+ CALL sla_DEULER('ZYZ',-ZETA,THETA,-Z,RMATP)
+
+ END
diff --git a/src/slalib/preces.f b/src/slalib/preces.f
new file mode 100644
index 0000000..09f946e
--- /dev/null
+++ b/src/slalib/preces.f
@@ -0,0 +1,84 @@
+ SUBROUTINE sla_PRECES (SYSTEM, EP0, EP1, RA, DC)
+*+
+* - - - - - - -
+* P R E C E S
+* - - - - - - -
+*
+* Precession - either FK4 (Bessel-Newcomb, pre IAU 1976) or
+* FK5 (Fricke, post IAU 1976) as required.
+*
+* Given:
+* SYSTEM char precession to be applied: 'FK4' or 'FK5'
+* EP0,EP1 dp starting and ending epoch
+* RA,DC dp RA,Dec, mean equator & equinox of epoch EP0
+*
+* Returned:
+* RA,DC dp RA,Dec, mean equator & equinox of epoch EP1
+*
+* Called: sla_DRANRM, sla_PREBN, sla_PREC, sla_DCS2C,
+* sla_DMXV, sla_DCC2S
+*
+* Notes:
+*
+* 1) Lowercase characters in SYSTEM are acceptable.
+*
+* 2) The epochs are Besselian if SYSTEM='FK4' and Julian if 'FK5'.
+* For example, to precess coordinates in the old system from
+* equinox 1900.0 to 1950.0 the call would be:
+* CALL sla_PRECES ('FK4', 1900D0, 1950D0, RA, DC)
+*
+* 3) This routine will NOT correctly convert between the old and
+* the new systems - for example conversion from B1950 to J2000.
+* For these purposes see sla_FK425, sla_FK524, sla_FK45Z and
+* sla_FK54Z.
+*
+* 4) If an invalid SYSTEM is supplied, values of -99D0,-99D0 will
+* be returned for both RA and DC.
+*
+* P.T.Wallace Starlink 20 April 1990
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ CHARACTER SYSTEM*(*)
+ DOUBLE PRECISION EP0,EP1,RA,DC
+
+ DOUBLE PRECISION PM(3,3),V1(3),V2(3)
+ CHARACTER SYSUC*3
+
+ DOUBLE PRECISION sla_DRANRM
+
+
+
+
+* Convert to uppercase and validate SYSTEM
+ SYSUC=SYSTEM
+ IF (SYSUC(1:1).EQ.'f') SYSUC(1:1)='F'
+ IF (SYSUC(2:2).EQ.'k') SYSUC(2:2)='K'
+ IF (SYSUC.NE.'FK4'.AND.SYSUC.NE.'FK5') THEN
+ RA=-99D0
+ DC=-99D0
+ ELSE
+
+* Generate appropriate precession matrix
+ IF (SYSUC.EQ.'FK4') THEN
+ CALL sla_PREBN(EP0,EP1,PM)
+ ELSE
+ CALL sla_PREC(EP0,EP1,PM)
+ END IF
+
+* Convert RA,Dec to x,y,z
+ CALL sla_DCS2C(RA,DC,V1)
+
+* Precess
+ CALL sla_DMXV(PM,V1,V2)
+
+* Back to RA,Dec
+ CALL sla_DCC2S(V2,RA,DC)
+ RA=sla_DRANRM(RA)
+
+ END IF
+
+ END
diff --git a/src/slalib/precl.f b/src/slalib/precl.f
new file mode 100644
index 0000000..e24b3d3
--- /dev/null
+++ b/src/slalib/precl.f
@@ -0,0 +1,125 @@
+ SUBROUTINE sla_PRECL (EP0, EP1, RMATP)
+*+
+* - - - - - -
+* P R E C L
+* - - - - - -
+*
+* Form the matrix of precession between two epochs, using the
+* model of Simon et al (1994), which is suitable for long
+* periods of time.
+*
+* (double precision)
+*
+* Given:
+* EP0 dp beginning epoch
+* EP1 dp ending epoch
+*
+* Returned:
+* RMATP dp(3,3) precession matrix
+*
+* Notes:
+*
+* 1) The epochs are TDB Julian epochs.
+*
+* 2) The matrix is in the sense V(EP1) = RMATP * V(EP0)
+*
+* 3) The absolute accuracy of the model is limited by the
+* uncertainty in the general precession, about 0.3 arcsec per
+* 1000 years. The remainder of the formulation provides a
+* precision of 1 mas over the interval from 1000AD to 3000AD,
+* 0.1 arcsec from 1000BC to 5000AD and 1 arcsec from
+* 4000BC to 8000AD.
+*
+* Reference:
+* Simon, J.L. et al., 1994. Astron.Astrophys., 282, 663-683.
+*
+* Called: sla_DEULER
+*
+* P.T.Wallace Starlink 23 August 1996
+*
+* Copyright (C) 1996 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION EP0,EP1,RMATP(3,3)
+
+* Arc seconds to radians
+ DOUBLE PRECISION AS2R
+ PARAMETER (AS2R=0.484813681109535994D-5)
+
+ DOUBLE PRECISION T0,T,TAS2R,W,ZETA,Z,THETA
+
+
+
+* Interval between basic epoch J2000.0 and beginning epoch (1000JY)
+ T0 = (EP0-2000D0)/1000D0
+
+* Interval over which precession required (1000JY)
+ T = (EP1-EP0)/1000D0
+
+* Euler angles
+ TAS2R = T*AS2R
+ W = 23060.9097D0+
+ : (139.7459D0+
+ : (-0.0038D0+
+ : (-0.5918D0+
+ : (-0.0037D0+
+ : 0.0007D0*T0)*T0)*T0)*T0)*T0
+
+ ZETA = (W+(30.2226D0+
+ : (-0.2523D0+
+ : (-0.3840D0+
+ : (-0.0014D0+
+ : 0.0007D0*T0)*T0)*T0)*T0+
+ : (18.0183D0+
+ : (-0.1326D0+
+ : (0.0006D0+
+ : 0.0005D0*T0)*T0)*T0+
+ : (-0.0583D0+
+ : (-0.0001D0+
+ : 0.0007D0*T0)*T0+
+ : (-0.0285D0+
+ : (-0.0002D0)*T)*T)*T)*T)*T)*TAS2R
+
+ Z = (W+(109.5270D0+
+ : (0.2446D0+
+ : (-1.3913D0+
+ : (-0.0134D0+
+ : 0.0026D0*T0)*T0)*T0)*T0+
+ : (18.2667D0+
+ : (-1.1400D0+
+ : (-0.0173D0+
+ : 0.0044D0*T0)*T0)*T0+
+ : (-0.2821D0+
+ : (-0.0093D0+
+ : 0.0032D0*T0)*T0+
+ : (-0.0301D0+
+ : 0.0006D0*T0
+ : -0.0001D0*T)*T)*T)*T)*T)*TAS2R
+
+ THETA = (20042.0207D0+
+ : (-85.3131D0+
+ : (-0.2111D0+
+ : (0.3642D0+
+ : (0.0008D0+
+ : (-0.0005D0)*T0)*T0)*T0)*T0)*T0+
+ : (-42.6566D0+
+ : (-0.2111D0+
+ : (0.5463D0+
+ : (0.0017D0+
+ : (-0.0012D0)*T0)*T0)*T0)*T0+
+ : (-41.8238D0+
+ : (0.0359D0+
+ : (0.0027D0+
+ : (-0.0001D0)*T0)*T0)*T0+
+ : (-0.0731D0+
+ : (0.0019D0+
+ : 0.0009D0*T0)*T0+
+ : (-0.0127D0+
+ : 0.0011D0*T0+0.0004D0*T)*T)*T)*T)*T)*TAS2R
+
+* Rotation matrix
+ CALL sla_DEULER('ZYZ',-ZETA,THETA,-Z,RMATP)
+
+ END
diff --git a/src/slalib/prenut.f b/src/slalib/prenut.f
new file mode 100644
index 0000000..96d6bdc
--- /dev/null
+++ b/src/slalib/prenut.f
@@ -0,0 +1,48 @@
+ SUBROUTINE sla_PRENUT (EPOCH, DATE, RMATPN)
+*+
+* - - - - - - -
+* P R E N U T
+* - - - - - - -
+*
+* Form the matrix of precession and nutation (IAU1976/FK5)
+* (double precision)
+*
+* Given:
+* EPOCH dp Julian Epoch for mean coordinates
+* DATE dp Modified Julian Date (JD-2400000.5)
+* for true coordinates
+*
+* Returned:
+* RMATPN dp(3,3) combined precession/nutation matrix
+*
+* Called: sla_PREC, sla_EPJ, sla_NUT, sla_DMXM
+*
+* Notes:
+*
+* 1) The epoch and date are TDB (loosely ET).
+*
+* 2) The matrix is in the sense V(true) = RMATPN * V(mean)
+*
+* P.T.Wallace Starlink April 1987
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION EPOCH,DATE,RMATPN(3,3)
+
+ DOUBLE PRECISION RMATP(3,3),RMATN(3,3),sla_EPJ
+
+
+
+* Precession
+ CALL sla_PREC(EPOCH,sla_EPJ(DATE),RMATP)
+
+* Nutation
+ CALL sla_NUT(DATE,RMATN)
+
+* Combine the matrices: PN = N x P
+ CALL sla_DMXM(RMATN,RMATP,RMATPN)
+
+ END
diff --git a/src/slalib/put.com b/src/slalib/put.com
new file mode 100755
index 0000000..fc42fe8
--- /dev/null
+++ b/src/slalib/put.com
@@ -0,0 +1,38 @@
+$!
+$! - - - -
+$! P U T
+$! - - - -
+$!
+$! Update one SLALIB routine from Fortran source
+$!
+$! DCL command is @PUT file
+$!
+$! The default directory must be the one containing the
+$! Fortran source, with the libraries in [.RELEASE].
+$!
+$! P T Wallace Starlink 22 January 1993
+$!
+$! Save supplied file name and strip recognized extensions
+$ FILE=''P1''
+$ P1=P1-".FOR"-".VAX"
+$!
+$! No action required for TEST program
+ IF P1.EQS."TEST" THEN $ GOTO DONE
+$!
+$! If platform-specific module, make .FOR file ...
+$ IF F$SEARCH("''P1'.VAX").NES."" THEN $ COPY 'P1'.VAX *.FOR
+$!
+$! Update the source library
+$ LIBR/REPL/TEXT [.RELEASE]SLALIB.TLB 'P1'.FOR
+$!
+$! Compile, update object library, delete object
+$ FORTRAN/NOLIST 'P1'.FOR
+$ LIBR/REPL [.RELEASE]SLALIB.OLB 'P1'.OBJ
+$ DELETE 'P1'.OBJ;*
+$!
+$! If module just updated was platform-specific, delete the .FOR version
+$ IF F$SEARCH("''P1'.VAX",1).NES."" THEN $ DELETE 'P1'.FOR;*
+$!
+$! Finished
+$DONE:
+$ EXIT
diff --git a/src/slalib/pv2el.f b/src/slalib/pv2el.f
new file mode 100644
index 0000000..e45ad64
--- /dev/null
+++ b/src/slalib/pv2el.f
@@ -0,0 +1,351 @@
+ SUBROUTINE sla_PV2EL (PV, DATE, PMASS, JFORMR,
+ : JFORM, EPOCH, ORBINC, ANODE, PERIH,
+ : AORQ, E, AORL, DM, JSTAT)
+*+
+* - - - - - -
+* P V 2 E L
+* - - - - - -
+*
+* Heliocentric osculating elements obtained from instantaneous position
+* and velocity.
+*
+* Given:
+* PV d(6) heliocentric x,y,z,xdot,ydot,zdot of date,
+* J2000 equatorial triad (AU,AU/s; Note 1)
+* DATE d date (TT Modified Julian Date = JD-2400000.5)
+* PMASS d mass of the planet (Sun=1; Note 2)
+* JFORMR i requested element set (1-3; Note 3)
+*
+* Returned:
+* JFORM d element set actually returned (1-3; Note 4)
+* EPOCH d epoch of elements (TT MJD)
+* ORBINC d inclination (radians)
+* ANODE d longitude of the ascending node (radians)
+* PERIH d longitude or argument of perihelion (radians)
+* AORQ d mean distance or perihelion distance (AU)
+* E d eccentricity
+* AORL d mean anomaly or longitude (radians, JFORM=1,2 only)
+* DM d daily motion (radians, JFORM=1 only)
+* JSTAT i status: 0 = OK
+* -1 = illegal PMASS
+* -2 = illegal JFORMR
+* -3 = position/velocity out of range
+*
+* Notes
+*
+* 1 The PV 6-vector is with respect to the mean equator and equinox of
+* epoch J2000. The orbital elements produced are with respect to
+* the J2000 ecliptic and mean equinox.
+*
+* 2 The mass, PMASS, is important only for the larger planets. For
+* most purposes (e.g. asteroids) use 0D0. Values less than zero
+* are illegal.
+*
+* 3 Three different element-format options are supported:
+*
+* Option JFORM=1, suitable for the major planets:
+*
+* EPOCH = epoch of elements (TT MJD)
+* ORBINC = inclination i (radians)
+* ANODE = longitude of the ascending node, big omega (radians)
+* PERIH = longitude of perihelion, curly pi (radians)
+* AORQ = mean distance, a (AU)
+* E = eccentricity, e
+* AORL = mean longitude L (radians)
+* DM = daily motion (radians)
+*
+* Option JFORM=2, suitable for minor planets:
+*
+* EPOCH = epoch of elements (TT MJD)
+* ORBINC = inclination i (radians)
+* ANODE = longitude of the ascending node, big omega (radians)
+* PERIH = argument of perihelion, little omega (radians)
+* AORQ = mean distance, a (AU)
+* E = eccentricity, e
+* AORL = mean anomaly M (radians)
+*
+* Option JFORM=3, suitable for comets:
+*
+* EPOCH = epoch of perihelion (TT MJD)
+* ORBINC = inclination i (radians)
+* ANODE = longitude of the ascending node, big omega (radians)
+* PERIH = argument of perihelion, little omega (radians)
+* AORQ = perihelion distance, q (AU)
+* E = eccentricity, e
+*
+* 4 It may not be possible to generate elements in the form
+* requested through JFORMR. The caller is notified of the form
+* of elements actually returned by means of the JFORM argument:
+*
+* JFORMR JFORM meaning
+*
+* 1 1 OK - elements are in the requested format
+* 1 2 never happens
+* 1 3 orbit not elliptical
+*
+* 2 1 never happens
+* 2 2 OK - elements are in the requested format
+* 2 3 orbit not elliptical
+*
+* 3 1 never happens
+* 3 2 never happens
+* 3 3 OK - elements are in the requested format
+*
+* 5 The arguments returned for each value of JFORM (cf Note 5: JFORM
+* may not be the same as JFORMR) are as follows:
+*
+* JFORM 1 2 3
+* EPOCH t0 t0 T
+* ORBINC i i i
+* ANODE Omega Omega Omega
+* PERIH curly pi omega omega
+* AORQ a a q
+* E e e e
+* AORL L M -
+* DM n - -
+*
+* where:
+*
+* t0 is the epoch of the elements (MJD, TT)
+* T " epoch of perihelion (MJD, TT)
+* i " inclination (radians)
+* Omega " longitude of the ascending node (radians)
+* curly pi " longitude of perihelion (radians)
+* omega " argument of perihelion (radians)
+* a " mean distance (AU)
+* q " perihelion distance (AU)
+* e " eccentricity
+* L " longitude (radians, 0-2pi)
+* M " mean anomaly (radians, 0-2pi)
+* n " daily motion (radians)
+* - means no value is set
+*
+* 6 At very small inclinations, the longitude of the ascending node
+* ANODE becomes indeterminate and under some circumstances may be
+* set arbitrarily to zero. Similarly, if the orbit is close to
+* circular, the true anomaly becomes indeterminate and under some
+* circumstances may be set arbitrarily to zero. In such cases,
+* the other elements are automatically adjusted to compensate,
+* and so the elements remain a valid description of the orbit.
+*
+* Reference: Sterne, Theodore E., "An Introduction to Celestial
+* Mechanics", Interscience Publishers, 1960
+*
+* Called: sla_DRANRM
+*
+* P.T.Wallace Starlink 13 February 1999
+*
+* Copyright (C) 1999 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION PV(6),DATE,PMASS
+ INTEGER JFORMR,JFORM
+ DOUBLE PRECISION EPOCH,ORBINC,ANODE,PERIH,AORQ,E,AORL,DM
+ INTEGER JSTAT
+
+* Seconds to days
+ DOUBLE PRECISION DAY
+ PARAMETER (DAY=86400D0)
+
+* Gaussian gravitational constant (exact)
+ DOUBLE PRECISION GCON
+ PARAMETER (GCON=0.01720209895D0)
+
+* Sin and cos of J2000 mean obliquity (IAU 1976)
+ DOUBLE PRECISION SE,CE
+ PARAMETER (SE=0.3977771559319137D0,
+ : CE=0.9174820620691818D0)
+
+* Minimum allowed distance (AU) and speed (AU/day)
+ DOUBLE PRECISION RMIN,VMIN
+ PARAMETER (RMIN=1D-3,VMIN=1D-8)
+
+* How close to unity the eccentricity has to be to call it a parabola
+ DOUBLE PRECISION PARAB
+ PARAMETER (PARAB=1D-8)
+
+ DOUBLE PRECISION X,Y,Z,XD,YD,ZD,R,V2,V,RDV,GMU,HX,HY,HZ,
+ : HX2PY2,H2,H,OI,BIGOM,AR,ECC,S,C,AT,U,OM,
+ : GAR3,EM1,EP1,HAT,SHAT,CHAT,AE,AM,DN,PL,
+ : EL,Q,TP,THAT,THHF,F
+
+ INTEGER JF
+
+ DOUBLE PRECISION sla_DRANRM
+
+
+* Validate arguments PMASS and JFORMR.
+ IF (PMASS.LT.0D0) THEN
+ JSTAT = -1
+ GO TO 999
+ END IF
+ IF (JFORMR.LT.1.OR.JFORMR.GT.3) THEN
+ JSTAT = -2
+ GO TO 999
+ END IF
+
+* Provisionally assume the elements will be in the chosen form.
+ JF = JFORMR
+
+* Rotate the position from equatorial to ecliptic coordinates.
+ X = PV(1)
+ Y = PV(2)*CE+PV(3)*SE
+ Z = -PV(2)*SE+PV(3)*CE
+
+* Rotate the velocity similarly, scaling to AU/day.
+ XD = DAY*PV(4)
+ YD = DAY*(PV(5)*CE+PV(6)*SE)
+ ZD = DAY*(-PV(5)*SE+PV(6)*CE)
+
+* Distance and speed.
+ R = SQRT(X*X+Y*Y+Z*Z)
+ V2 = XD*XD+YD*YD+ZD*ZD
+ V = SQRT(V2)
+
+* Reject unreasonably small values.
+ IF (R.LT.RMIN.OR.V.LT.VMIN) THEN
+ JSTAT = -3
+ GO TO 999
+ END IF
+
+* R dot V.
+ RDV = X*XD+Y*YD+Z*ZD
+
+* Mu.
+ GMU = (1D0+PMASS)*GCON*GCON
+
+* Vector angular momentum per unit reduced mass.
+ HX = Y*ZD-Z*YD
+ HY = Z*XD-X*ZD
+ HZ = X*YD-Y*XD
+
+* Areal constant.
+ HX2PY2 = HX*HX+HY*HY
+ H2 = HX2PY2+HZ*HZ
+ H = SQRT(H2)
+
+* Inclination.
+ OI = ATAN2(SQRT(HX2PY2),HZ)
+
+* Longitude of ascending node.
+ IF (HX.NE.0D0.OR.HY.NE.0D0) THEN
+ BIGOM = ATAN2(HX,-HY)
+ ELSE
+ BIGOM=0D0
+ END IF
+
+* Reciprocal of mean distance etc.
+ AR = 2D0/R-V2/GMU
+
+* Eccentricity.
+ ECC = SQRT(MAX(1D0-AR*H2/GMU,0D0))
+
+* True anomaly.
+ S = H*RDV
+ C = H2-R*GMU
+ IF (S.NE.0D0.AND.C.NE.0D0) THEN
+ AT = ATAN2(S,C)
+ ELSE
+ AT = 0D0
+ END IF
+
+* Argument of the latitude.
+ S = SIN(BIGOM)
+ C = COS(BIGOM)
+ U = ATAN2((-X*S+Y*C)*COS(OI)+Z*SIN(OI),X*C+Y*S)
+
+* Argument of perihelion.
+ OM = U-AT
+
+* Capture near-parabolic cases.
+ IF (ABS(ECC-1D0).LT.PARAB) ECC=1D0
+
+* Comply with JFORMR = 1 or 2 only if orbit is elliptical.
+ IF (ECC.GE.1D0) JF=3
+
+* Functions.
+ GAR3 = GMU*AR*AR*AR
+ EM1 = ECC-1D0
+ EP1 = ECC+1D0
+ HAT = AT/2D0
+ SHAT = SIN(HAT)
+ CHAT = COS(HAT)
+
+* Ellipse?
+ IF (ECC.LT.1D0 ) THEN
+
+* Eccentric anomaly.
+ AE = 2D0*ATAN2(SQRT(-EM1)*SHAT,SQRT(EP1)*CHAT)
+
+* Mean anomaly.
+ AM = AE-ECC*SIN(AE)
+
+* Daily motion.
+ DN = SQRT(GAR3)
+ END IF
+
+* "Major planet" element set?
+ IF (JF.EQ.1) THEN
+
+* Longitude of perihelion.
+ PL = BIGOM+OM
+
+* Longitude at epoch.
+ EL = PL+AM
+ END IF
+
+* "Comet" element set?
+ IF (JF.EQ.3) THEN
+
+* Perihelion distance.
+ Q = H2/(GMU*EP1)
+
+* Ellipse, parabola, hyperbola?
+ IF (ECC.LT.1D0) THEN
+
+* Ellipse: epoch of perihelion.
+ TP = DATE-AM/DN
+ ELSE
+
+* Parabola or hyperbola: evaluate tan ( ( true anomaly ) / 2 )
+ THAT = SHAT/CHAT
+ IF (ECC.EQ.1D0) THEN
+
+* Parabola: epoch of perihelion.
+ TP = DATE-THAT*(1D0+THAT*THAT/3D0)*H*H2/(2D0*GMU*GMU)
+ ELSE
+
+* Hyperbola: epoch of perihelion.
+ THHF = SQRT(EM1/EP1)*THAT
+ F = LOG(1D0+THHF)-LOG(1D0-THHF)
+ TP = DATE-(ECC*SINH(F)-F)/SQRT(-GAR3)
+ END IF
+ END IF
+ END IF
+
+* Return the appropriate set of elements.
+ JFORM = JF
+ ORBINC = OI
+ ANODE = sla_DRANRM(BIGOM)
+ E = ECC
+ IF (JF.EQ.1) THEN
+ PERIH = sla_DRANRM(PL)
+ AORL = sla_DRANRM(EL)
+ DM = DN
+ ELSE
+ PERIH = sla_DRANRM(OM)
+ IF (JF.EQ.2) AORL = sla_DRANRM(AM)
+ END IF
+ IF (JF.NE.3) THEN
+ EPOCH = DATE
+ AORQ = 1D0/AR
+ ELSE
+ EPOCH = TP
+ AORQ = Q
+ END IF
+ JSTAT = 0
+
+ 999 CONTINUE
+ END
diff --git a/src/slalib/pv2ue.f b/src/slalib/pv2ue.f
new file mode 100644
index 0000000..de141e3
--- /dev/null
+++ b/src/slalib/pv2ue.f
@@ -0,0 +1,150 @@
+ SUBROUTINE sla_PV2UE (PV, DATE, PMASS, U, JSTAT)
+*+
+* - - - - - -
+* P V 2 U E
+* - - - - - -
+*
+* Construct a universal element set based on an instantaneous position
+* and velocity.
+*
+* Given:
+* PV d(6) heliocentric x,y,z,xdot,ydot,zdot of date,
+* (AU,AU/s; Note 1)
+* DATE d date (TT Modified Julian Date = JD-2400000.5)
+* PMASS d mass of the planet (Sun=1; Note 2)
+*
+* Returned:
+* U d(13) universal orbital elements (Note 3)
+*
+* (1) combined mass (M+m)
+* (2) total energy of the orbit (alpha)
+* (3) reference (osculating) epoch (t0)
+* (4-6) position at reference epoch (r0)
+* (7-9) velocity at reference epoch (v0)
+* (10) heliocentric distance at reference epoch
+* (11) r0.v0
+* (12) date (t)
+* (13) universal eccentric anomaly (psi) of date, approx
+*
+* JSTAT i status: 0 = OK
+* -1 = illegal PMASS
+* -2 = too close to Sun
+* -3 = too slow
+*
+* Notes
+*
+* 1 The PV 6-vector can be with respect to any chosen inertial frame,
+* and the resulting universal-element set will be with respect to
+* the same frame. A common choice will be mean equator and ecliptic
+* of epoch J2000.
+*
+* 2 The mass, PMASS, is important only for the larger planets. For
+* most purposes (e.g. asteroids) use 0D0. Values less than zero
+* are illegal.
+*
+* 3 The "universal" elements are those which define the orbit for the
+* purposes of the method of universal variables (see reference).
+* They consist of the combined mass of the two bodies, an epoch,
+* and the position and velocity vectors (arbitrary reference frame)
+* at that epoch. The parameter set used here includes also various
+* quantities that can, in fact, be derived from the other
+* information. This approach is taken to avoiding unnecessary
+* computation and loss of accuracy. The supplementary quantities
+* are (i) alpha, which is proportional to the total energy of the
+* orbit, (ii) the heliocentric distance at epoch, (iii) the
+* outwards component of the velocity at the given epoch, (iv) an
+* estimate of psi, the "universal eccentric anomaly" at a given
+* date and (v) that date.
+*
+* Reference: Everhart, E. & Pitkin, E.T., Am.J.Phys. 51, 712, 1983.
+*
+* P.T.Wallace Starlink 18 March 1999
+*
+* Copyright (C) 1999 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION PV(6),DATE,PMASS,U(13)
+ INTEGER JSTAT
+
+* Gaussian gravitational constant (exact)
+ DOUBLE PRECISION GCON
+ PARAMETER (GCON=0.01720209895D0)
+
+* Canonical days to seconds
+ DOUBLE PRECISION CD2S
+ PARAMETER (CD2S=GCON/86400D0)
+
+* Minimum allowed distance (AU) and speed (AU per canonical day)
+ DOUBLE PRECISION RMIN,VMIN
+ PARAMETER (RMIN=1D-3,VMIN=1D-3)
+
+ DOUBLE PRECISION T0,CM,X,Y,Z,XD,YD,ZD,R,V2,V,ALPHA,RDV
+
+
+* Reference epoch.
+ T0 = DATE
+
+* Combined mass (mu=M+m).
+ IF (PMASS.LT.0D0) GO TO 9010
+ CM = 1D0+PMASS
+
+* Unpack the state vector, expressing velocity in AU per canonical day.
+ X = PV(1)
+ Y = PV(2)
+ Z = PV(3)
+ XD = PV(4)/CD2S
+ YD = PV(5)/CD2S
+ ZD = PV(6)/CD2S
+
+* Heliocentric distance, and speed.
+ R = SQRT(X*X+Y*Y+Z*Z)
+ V2 = XD*XD+YD*YD+ZD*ZD
+ V = SQRT(V2)
+
+* Reject unreasonably small values.
+ IF (R.LT.RMIN) GO TO 9020
+ IF (V.LT.VMIN) GO TO 9030
+
+* Total energy of the orbit.
+ ALPHA = V2-2D0*CM/R
+
+* Outward component of velocity.
+ RDV = X*XD+Y*YD+Z*ZD
+
+* Construct the universal-element set.
+ U(1) = CM
+ U(2) = ALPHA
+ U(3) = T0
+ U(4) = X
+ U(5) = Y
+ U(6) = Z
+ U(7) = XD
+ U(8) = YD
+ U(9) = ZD
+ U(10) = R
+ U(11) = RDV
+ U(12) = T0
+ U(13) = 0D0
+
+* Exit.
+ JSTAT = 0
+ GO TO 9999
+
+* Negative PMASS.
+ 9010 CONTINUE
+ JSTAT = -1
+ GO TO 9999
+
+* Too close.
+ 9020 CONTINUE
+ JSTAT = -2
+ GO TO 9999
+
+* Too slow.
+ 9030 CONTINUE
+ JSTAT = -3
+
+ 9999 CONTINUE
+ END
diff --git a/src/slalib/pvobs.f b/src/slalib/pvobs.f
new file mode 100644
index 0000000..116bc06
--- /dev/null
+++ b/src/slalib/pvobs.f
@@ -0,0 +1,59 @@
+ SUBROUTINE sla_PVOBS (P, H, STL, PV)
+*+
+* - - - - - -
+* P V O B S
+* - - - - - -
+*
+* Position and velocity of an observing station (double precision)
+*
+* Given:
+* P dp latitude (geodetic, radians)
+* H dp height above reference spheroid (geodetic, metres)
+* STL dp local apparent sidereal time (radians)
+*
+* Returned:
+* PV dp(6) position/velocity 6-vector (AU, AU/s, true equator
+* and equinox of date)
+*
+* Called: sla_GEOC
+*
+* IAU 1976 constants are used.
+*
+* P.T.Wallace Starlink 14 November 1994
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION P,H,STL,PV(6)
+
+ DOUBLE PRECISION R,Z,S,C,V
+
+* Mean sidereal rate (at J2000) in radians per (UT1) second
+ DOUBLE PRECISION SR
+ PARAMETER (SR=7.292115855306589D-5)
+
+
+
+* Geodetic to geocentric conversion
+ CALL sla_GEOC(P,H,R,Z)
+
+* Functions of ST
+ S=SIN(STL)
+ C=COS(STL)
+
+* Speed
+ V=SR*R
+
+* Position
+ PV(1)=R*C
+ PV(2)=R*S
+ PV(3)=Z
+
+* Velocity
+ PV(4)=-V*S
+ PV(5)=V*C
+ PV(6)=0D0
+
+ END
diff --git a/src/slalib/pxy.f b/src/slalib/pxy.f
new file mode 100644
index 0000000..3dd880f
--- /dev/null
+++ b/src/slalib/pxy.f
@@ -0,0 +1,92 @@
+ SUBROUTINE sla_PXY (NP,XYE,XYM,COEFFS,XYP,XRMS,YRMS,RRMS)
+*+
+* - - - -
+* P X Y
+* - - - -
+*
+* Given arrays of "expected" and "measured" [X,Y] coordinates, and a
+* linear model relating them (as produced by sla_FITXY), compute
+* the array of "predicted" coordinates and the RMS residuals.
+*
+* Given:
+* NP i number of samples
+* XYE d(2,np) expected [X,Y] for each sample
+* XYM d(2,np) measured [X,Y] for each sample
+* COEFFS d(6) coefficients of model (see below)
+*
+* Returned:
+* XYP d(2,np) predicted [X,Y] for each sample
+* XRMS d RMS in X
+* YRMS d RMS in Y
+* RRMS d total RMS (vector sum of XRMS and YRMS)
+*
+* The model is supplied in the array COEFFS. Naming the
+* elements of COEFF as follows:
+*
+* COEFFS(1) = A
+* COEFFS(2) = B
+* COEFFS(3) = C
+* COEFFS(4) = D
+* COEFFS(5) = E
+* COEFFS(6) = F
+*
+* the model is applied thus:
+*
+* XP = A + B*XM + C*YM
+* YP = D + E*XM + F*YM
+*
+* The residuals are (XP-XE) and (YP-YE).
+*
+* If NP is less than or equal to zero, no coordinates are
+* transformed, and the RMS residuals are all zero.
+*
+* See also sla_FITXY, sla_INVF, sla_XY2XY, sla_DCMPF
+*
+* Called: sla_XY2XY
+*
+* P.T.Wallace Starlink 22 May 1996
+*
+* Copyright (C) 1996 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ INTEGER NP
+ DOUBLE PRECISION XYE(2,NP),XYM(2,NP),COEFFS(6),
+ : XYP(2,NP),XRMS,YRMS,RRMS
+
+ INTEGER I
+ DOUBLE PRECISION SDX2,SDY2,XP,YP,DX,DY,DX2,DY2,P
+
+
+
+* Initialize summations
+ SDX2=0D0
+ SDY2=0D0
+
+* Loop by sample
+ DO I=1,NP
+
+* Transform "measured" [X,Y] to "predicted" [X,Y]
+ CALL sla_XY2XY(XYM(1,I),XYM(2,I),COEFFS,XP,YP)
+ XYP(1,I)=XP
+ XYP(2,I)=YP
+
+* Compute residuals in X and Y, and update summations
+ DX=XYE(1,I)-XP
+ DY=XYE(2,I)-YP
+ DX2=DX*DX
+ DY2=DY*DY
+ SDX2=SDX2+DX2
+ SDY2=SDY2+DY2
+
+* Next sample
+ END DO
+
+* Compute RMS values
+ P=MAX(1D0,DBLE(NP))
+ XRMS=SQRT(SDX2/P)
+ YRMS=SQRT(SDY2/P)
+ RRMS=SQRT(XRMS*XRMS+YRMS*YRMS)
+
+ END
diff --git a/src/slalib/random.f_alpha_OSF1 b/src/slalib/random.f_alpha_OSF1
new file mode 100644
index 0000000..54544e3
--- /dev/null
+++ b/src/slalib/random.f_alpha_OSF1
@@ -0,0 +1,56 @@
+ REAL FUNCTION sla_RANDOM (SEED)
+*+
+* - - - - - - -
+* R A N D O M
+* - - - - - - -
+*
+* Generate pseudo-random real number in the range 0 <= X < 1.
+* (single precision)
+*
+* !!! Version for Alpha/OSF1 !!!
+*
+* Given:
+* SEED real an arbitrary real number
+*
+* Notes:
+*
+* 1) The result is a pseudo-random REAL number in the range
+* 0 <= sla_RANDOM < 1.
+*
+* 2) SEED is used first time through only.
+*
+* Called: RANDOM (a REAL function from the DEC Fortran Library)
+*
+* P.T.Wallace Starlink 14 October 1991
+* Revised for new recommended RTL RANDOM(3f) function.
+* B.K.McIlwrath Starlink 12 January 1996
+*-
+
+ IMPLICIT NONE
+
+ REAL SEED
+
+ REAL RANDOM
+
+ REAL AS
+ INTEGER ISEED
+ LOGICAL FIRST
+ SAVE FIRST
+ DATA FIRST /.TRUE./
+
+
+
+* If first time, turn SEED into a large, odd integer
+ IF (FIRST) THEN
+ AS=ABS(SEED)+1.0
+ ISEED=NINT(AS/10.0**(NINT(ALOG10(AS))-6))
+ IF (MOD(ISEED,2).EQ.0) ISEED=ISEED+1
+ FIRST=.FALSE.
+ ELSE
+ ISEED = 0
+ END IF
+
+* Next pseudo-random number
+ sla_RANDOM=RANDOM(ISEED)
+
+ END
diff --git a/src/slalib/random.f_convex b/src/slalib/random.f_convex
new file mode 100644
index 0000000..336983f
--- /dev/null
+++ b/src/slalib/random.f_convex
@@ -0,0 +1,56 @@
+ REAL FUNCTION sla_RANDOM (SEED)
+*+
+* - - - - - - -
+* R A N D O M
+* - - - - - - -
+*
+* Generate pseudo-random real number in the range 0 <= X < 1.
+* (single precision)
+*
+* !!! Convex dependent !!!
+*
+* Given:
+* SEED real an arbitrary real number
+*
+* Notes:
+*
+* 1) The result is a pseudo-random REAL number in the range
+* 0 <= sla_RANDOM < 1.
+*
+* 2) SEED is used first time through only.
+*
+* Called: RAND (a REAL function from the Convex Fortran Library)
+*
+* P.T.Wallace Starlink 28 June 1994
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL SEED
+
+ REAL RAND
+
+ REAL AS
+ INTEGER ISEED
+ LOGICAL FIRST
+ SAVE FIRST
+ DATA FIRST /.TRUE./
+
+
+
+* If first time, turn SEED into a large, odd integer, and start the
+* generator
+ IF (FIRST) THEN
+ AS=ABS(SEED)+1.0
+ ISEED=NINT(AS/10.0**(NINT(ALOG10(AS))-6))
+ IF (MOD(ISEED,2).EQ.0) ISEED=ISEED+1
+ FIRST=.FALSE.
+ AS=RAND(ISEED)
+ END IF
+
+* Next pseudo-random number
+ sla_RANDOM=RAND(0)
+
+ END
diff --git a/src/slalib/random.f_ix86_Linux b/src/slalib/random.f_ix86_Linux
new file mode 100644
index 0000000..acd1047
--- /dev/null
+++ b/src/slalib/random.f_ix86_Linux
@@ -0,0 +1,54 @@
+ REAL FUNCTION sla_RANDOM (SEED)
+*+
+* - - - - - - -
+* R A N D O M
+* - - - - - - -
+*
+* Generate pseudo-random real number in the range 0 <= X < 1.
+* (single precision)
+*
+* !!! Version for Linux !!!
+*
+* Given:
+* SEED real an arbitrary real number
+*
+* Notes:
+*
+* 1) The result is a pseudo-random REAL number in the range
+* 0 <= sla_RANDOM < 1.
+*
+* 2) SEED is used first time through only.
+*
+* Called: RANDOM (a REAL function compiled by the makefile from rtl_random.c)
+*
+* B.K.McIlwrath Starlink 12 January 1996
+*-
+
+ IMPLICIT NONE
+
+ REAL SEED
+
+ REAL RANDOM
+
+ REAL AS
+ INTEGER ISEED
+ LOGICAL FIRST
+ SAVE FIRST
+ DATA FIRST /.TRUE./
+
+
+
+* If first time, turn SEED into a large, odd integer
+ IF (FIRST) THEN
+ AS=ABS(SEED)+1.0
+ ISEED=NINT(AS/10.0**(NINT(ALOG10(AS))-6))
+ IF (MOD(ISEED,2).EQ.0) ISEED=ISEED+1
+ FIRST=.FALSE.
+ ELSE
+ ISEED = 0
+ END IF
+
+* Next pseudo-random number
+ sla_RANDOM=RANDOM(ISEED)
+
+ END
diff --git a/src/slalib/random.f_mips b/src/slalib/random.f_mips
new file mode 100644
index 0000000..b82b1bb
--- /dev/null
+++ b/src/slalib/random.f_mips
@@ -0,0 +1,54 @@
+ REAL FUNCTION sla_RANDOM (SEED)
+*+
+* - - - - - - -
+* R A N D O M
+* - - - - - - -
+*
+* Generate pseudo-random real number in the range 0 <= X < 1.
+* (single precision)
+*
+* !!! Version for VAX/VMS and DECstation !!!
+*
+* Given:
+* SEED real an arbitrary real number
+*
+* Notes:
+*
+* 1) The result is a pseudo-random REAL number in the range
+* 0 <= sla_RANDOM < 1.
+*
+* 2) SEED is used first time through only.
+*
+* Called: RAN (a REAL function from the DEC Fortran Library)
+*
+* P.T.Wallace Starlink 14 October 1991
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL SEED
+
+ REAL RAN
+
+ REAL AS
+ INTEGER ISEED
+ LOGICAL FIRST
+ SAVE FIRST
+ DATA FIRST /.TRUE./
+
+
+
+* If first time, turn SEED into a large, odd integer
+ IF (FIRST) THEN
+ AS=ABS(SEED)+1.0
+ ISEED=NINT(AS/10.0**(NINT(ALOG10(AS))-6))
+ IF (MOD(ISEED,2).EQ.0) ISEED=ISEED+1
+ FIRST=.FALSE.
+ END IF
+
+* Next pseudo-random number
+ sla_RANDOM=RAN(ISEED)
+
+ END
diff --git a/src/slalib/random.f_pcm b/src/slalib/random.f_pcm
new file mode 100644
index 0000000..4f96ddb
--- /dev/null
+++ b/src/slalib/random.f_pcm
@@ -0,0 +1,42 @@
+ REAL FUNCTION sla_RANDOM (XSEED)
+*+
+* - - - - - - -
+* R A N D O M
+* - - - - - - -
+*
+* Generate pseudo-random real number in the range 0 <= X < 1.
+*
+* (single precision)
+*
+* !!! Microsoft Fortran dependent !!!
+*
+* Given (but used first time only):
+* XSEED real an arbitrary real number
+*
+* The value returned is a pseudo-random number such that
+* 0 <= sla_RANDOM < 1.
+*
+* Called: RANDOM (Microsoft run-time library)
+*
+* P.T.Wallace Starlink 28 February 1993
+*
+*+
+
+ IMPLICIT NONE
+
+ REAL XSEED
+
+ REAL X
+ LOGICAL FIRST
+ SAVE FIRST
+ DATA FIRST /.TRUE./
+
+
+ IF (FIRST) THEN
+ CALL SEED(NINT(MOD(XSEED*1.234E7,32E3))) ! Microsoft Fortran
+ FIRST=.FALSE.
+ END IF
+ CALL RANDOM(X) ! Microsoft Fortran
+ sla_RANDOM=X
+
+ END
diff --git a/src/slalib/random.f_sun4 b/src/slalib/random.f_sun4
new file mode 100644
index 0000000..9f49fb6
--- /dev/null
+++ b/src/slalib/random.f_sun4
@@ -0,0 +1,56 @@
+ REAL FUNCTION sla_RANDOM (SEED)
+*+
+* - - - - - - -
+* R A N D O M
+* - - - - - - -
+*
+* Generate pseudo-random real number in the range 0 <= X < 1.
+* (single precision)
+*
+* !!! Sun 4 dependent !!!
+*
+* Given:
+* SEED real an arbitrary real number
+*
+* Notes:
+*
+* 1) The result is a pseudo-random REAL number in the range
+* 0 <= sla_RANDOM < 1.
+*
+* 2) SEED is used first time through only.
+*
+* Called: RAND (a REAL function from the Sun Fortran Library)
+*
+* P.T.Wallace Starlink 14 October 1991
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL SEED
+
+ REAL RAND
+
+ REAL AS
+ INTEGER ISEED
+ LOGICAL FIRST
+ SAVE FIRST
+ DATA FIRST /.TRUE./
+
+
+
+* If first time, turn SEED into a large, odd integer, and start the
+* generator
+ IF (FIRST) THEN
+ AS=ABS(SEED)+1.0
+ ISEED=NINT(AS/10.0**(NINT(ALOG10(AS))-6))
+ IF (MOD(ISEED,2).EQ.0) ISEED=ISEED+1
+ FIRST=.FALSE.
+ AS=RAND(ISEED)
+ END IF
+
+* Next pseudo-random number
+ sla_RANDOM=RAND(0)
+
+ END
diff --git a/src/slalib/random.f_sun4_Solaris b/src/slalib/random.f_sun4_Solaris
new file mode 100644
index 0000000..9f49fb6
--- /dev/null
+++ b/src/slalib/random.f_sun4_Solaris
@@ -0,0 +1,56 @@
+ REAL FUNCTION sla_RANDOM (SEED)
+*+
+* - - - - - - -
+* R A N D O M
+* - - - - - - -
+*
+* Generate pseudo-random real number in the range 0 <= X < 1.
+* (single precision)
+*
+* !!! Sun 4 dependent !!!
+*
+* Given:
+* SEED real an arbitrary real number
+*
+* Notes:
+*
+* 1) The result is a pseudo-random REAL number in the range
+* 0 <= sla_RANDOM < 1.
+*
+* 2) SEED is used first time through only.
+*
+* Called: RAND (a REAL function from the Sun Fortran Library)
+*
+* P.T.Wallace Starlink 14 October 1991
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL SEED
+
+ REAL RAND
+
+ REAL AS
+ INTEGER ISEED
+ LOGICAL FIRST
+ SAVE FIRST
+ DATA FIRST /.TRUE./
+
+
+
+* If first time, turn SEED into a large, odd integer, and start the
+* generator
+ IF (FIRST) THEN
+ AS=ABS(SEED)+1.0
+ ISEED=NINT(AS/10.0**(NINT(ALOG10(AS))-6))
+ IF (MOD(ISEED,2).EQ.0) ISEED=ISEED+1
+ FIRST=.FALSE.
+ AS=RAND(ISEED)
+ END IF
+
+* Next pseudo-random number
+ sla_RANDOM=RAND(0)
+
+ END
diff --git a/src/slalib/random.f_vax b/src/slalib/random.f_vax
new file mode 100644
index 0000000..bdf9ffe
--- /dev/null
+++ b/src/slalib/random.f_vax
@@ -0,0 +1,52 @@
+ REAL FUNCTION sla_RANDOM (SEED)
+*+
+* - - - - - - -
+* R A N D O M
+* - - - - - - -
+*
+* Generate pseudo-random real number in the range 0 <= X < 1.
+* (single precision)
+*
+* !!! Version for VAX/VMS and DECstation !!!
+*
+* Given:
+* SEED real an arbitrary real number
+*
+* Notes:
+*
+* 1) The result is a pseudo-random REAL number in the range
+* 0 <= sla_RANDOM < 1.
+*
+* 2) SEED is used first time through only.
+*
+* Called: RAN (a REAL function from the DEC Fortran Library)
+*
+* P.T.Wallace Starlink 14 October 1991
+*-
+
+ IMPLICIT NONE
+
+ REAL SEED
+
+ REAL RAN
+
+ REAL AS
+ INTEGER ISEED
+ LOGICAL FIRST
+ SAVE FIRST
+ DATA FIRST /.TRUE./
+
+
+
+* If first time, turn SEED into a large, odd integer
+ IF (FIRST) THEN
+ AS=ABS(SEED)+1.0
+ ISEED=NINT(AS/10.0**(NINT(ALOG10(AS))-6))
+ IF (MOD(ISEED,2).EQ.0) ISEED=ISEED+1
+ FIRST=.FALSE.
+ END IF
+
+* Next pseudo-random number
+ sla_RANDOM=RAN(ISEED)
+
+ END
diff --git a/src/slalib/random.f_x86_64 b/src/slalib/random.f_x86_64
new file mode 100644
index 0000000..acd1047
--- /dev/null
+++ b/src/slalib/random.f_x86_64
@@ -0,0 +1,54 @@
+ REAL FUNCTION sla_RANDOM (SEED)
+*+
+* - - - - - - -
+* R A N D O M
+* - - - - - - -
+*
+* Generate pseudo-random real number in the range 0 <= X < 1.
+* (single precision)
+*
+* !!! Version for Linux !!!
+*
+* Given:
+* SEED real an arbitrary real number
+*
+* Notes:
+*
+* 1) The result is a pseudo-random REAL number in the range
+* 0 <= sla_RANDOM < 1.
+*
+* 2) SEED is used first time through only.
+*
+* Called: RANDOM (a REAL function compiled by the makefile from rtl_random.c)
+*
+* B.K.McIlwrath Starlink 12 January 1996
+*-
+
+ IMPLICIT NONE
+
+ REAL SEED
+
+ REAL RANDOM
+
+ REAL AS
+ INTEGER ISEED
+ LOGICAL FIRST
+ SAVE FIRST
+ DATA FIRST /.TRUE./
+
+
+
+* If first time, turn SEED into a large, odd integer
+ IF (FIRST) THEN
+ AS=ABS(SEED)+1.0
+ ISEED=NINT(AS/10.0**(NINT(ALOG10(AS))-6))
+ IF (MOD(ISEED,2).EQ.0) ISEED=ISEED+1
+ FIRST=.FALSE.
+ ELSE
+ ISEED = 0
+ END IF
+
+* Next pseudo-random number
+ sla_RANDOM=RANDOM(ISEED)
+
+ END
diff --git a/src/slalib/range.f b/src/slalib/range.f
new file mode 100644
index 0000000..a3684cb
--- /dev/null
+++ b/src/slalib/range.f
@@ -0,0 +1,33 @@
+ REAL FUNCTION sla_RANGE (ANGLE)
+*+
+* - - - - - -
+* R A N G E
+* - - - - - -
+*
+* Normalize angle into range +/- pi (single precision)
+*
+* Given:
+* ANGLE dp the angle in radians
+*
+* The result is ANGLE expressed in the +/- pi (single
+* precision).
+*
+* P.T.Wallace Starlink 23 November 1995
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL ANGLE
+
+ REAL API,A2PI
+ PARAMETER (API=3.141592653589793238462643)
+ PARAMETER (A2PI=6.283185307179586476925287)
+
+
+ sla_RANGE=MOD(ANGLE,A2PI)
+ IF (ABS(sla_RANGE).GE.API)
+ : sla_RANGE=sla_RANGE-SIGN(A2PI,ANGLE)
+
+ END
diff --git a/src/slalib/ranorm.f b/src/slalib/ranorm.f
new file mode 100644
index 0000000..c2e32a5
--- /dev/null
+++ b/src/slalib/ranorm.f
@@ -0,0 +1,31 @@
+ REAL FUNCTION sla_RANORM (ANGLE)
+*+
+* - - - - - - -
+* R A N O R M
+* - - - - - - -
+*
+* Normalize angle into range 0-2 pi (single precision)
+*
+* Given:
+* ANGLE dp the angle in radians
+*
+* The result is ANGLE expressed in the range 0-2 pi (single
+* precision).
+*
+* P.T.Wallace Starlink 23 November 1995
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL ANGLE
+
+ REAL A2PI
+ PARAMETER (A2PI=6.283185307179586476925287)
+
+
+ sla_RANORM=MOD(ANGLE,A2PI)
+ IF (sla_RANORM.LT.0.0) sla_RANORM=sla_RANORM+A2PI
+
+ END
diff --git a/src/slalib/rcc.f b/src/slalib/rcc.f
new file mode 100644
index 0000000..74a8874
--- /dev/null
+++ b/src/slalib/rcc.f
@@ -0,0 +1,1063 @@
+ DOUBLE PRECISION FUNCTION sla_RCC (TDB, UT1, WL, U, V)
+*+
+* - - - -
+* R C C
+* - - - -
+*
+* Relativistic clock correction: the difference between proper time at
+* a point on the surface of the Earth and coordinate time in the Solar
+* System barycentric space-time frame of reference.
+*
+* The proper time is Terrestrial Time TT; the coordinate
+* time is an implementation of the Barycentric Dynamical Time TDB.
+*
+* Given:
+* TDB dp coordinate time (MJD: JD-2400000.5)
+* UT1 dp universal time (fraction of one day)
+* WL dp clock longitude (radians west)
+* U dp clock distance from Earth spin axis (km)
+* V dp clock distance north of Earth equatorial plane (km)
+*
+* Returned:
+* The clock correction, TDB-TT, in seconds. TDB may be considered
+* to be the coordinate time in the Solar System barycentre frame of
+* reference, and TT is the proper time given by clocks at mean sea
+* level on the Earth.
+*
+* The result has a main (annual) sinusoidal term of amplitude
+* approximately 0.00166 seconds, plus planetary terms up to about
+* 20 microseconds, and lunar and diurnal terms up to 2 microseconds.
+* The variation arises from the transverse Doppler effect and the
+* gravitational red-shift as the observer varies in speed and moves
+* through different gravitational potentials.
+*
+* The argument TDB is, strictly, the barycentric coordinate time;
+* however, the terrestrial proper time (TT) can in practice be used.
+*
+* The geocentric model is that of Fairhead & Bretagnon (1990), in its
+* full form. It was supplied by Fairhead (private communication) as a
+* FORTRAN subroutine. The original Fairhead routine used explicit
+* formulae, in such large numbers that problems were experienced with
+* certain compilers (Microsoft Fortran on PC aborted with stack
+* overflow, Convex compiled successfully but extremely slowly). The
+* present implementation is a complete recoding, with the original
+* Fairhead coefficients held in a table. To optimise arithmetic
+* precision, the terms are accumulated in reverse order, smallest
+* first. A number of other coding changes were made, in order to match
+* the calling sequence of previous versions of the present routine, and
+* to comply with Starlink programming standards. Under VAX/VMS, the
+* numerical results compared with those from the Fairhead form are
+* essentially unaffected by the changes, the differences being at the
+* 10^-20 sec level.
+*
+* The topocentric part of the model is from Moyer (1981) and
+* Murray (1983).
+*
+* During the interval 1950-2050, the absolute accuracy is better
+* than +/- 3 nanoseconds relative to direct numerical integrations
+* using the JPL DE200/LE200 solar system ephemeris.
+*
+* The IAU definition of TDB is that it must differ from TT only by
+* periodic terms. Though practical, this is an imprecise definition
+* which ignores the existence of very long-period and secular effects
+* in the dynamics of the solar system. As a consequence, different
+* implementations of TDB will, in general, differ in zero-point and
+* will drift linearly relative to one other.
+*
+* References:
+* Bretagnon P, 1982 Astron. Astrophys., 114, 278-288.
+* Fairhead L & Bretagnon P, 1990, Astron. Astrophys., 229, 240-247.
+* Meeus J, 1984, l'Astronomie, 348-354.
+* Moyer T D, 1981, Cel. Mech., 23, 33.
+* Murray C A, 1983, Vectorial Astrometry, Adam Hilger.
+*
+* P.T.Wallace Starlink 10 November 1995
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION TDB,UT1,WL,U,V
+
+ DOUBLE PRECISION D2PI
+ PARAMETER (D2PI=6.283185307179586476925287D0)
+
+ DOUBLE PRECISION T,TSOL,RLE,RGE,RTJ,RTS,RDMOON,
+ : WT,W0,W1,W2,W3,W4,WF,WJ
+
+* -----------------------------------------------------------------------
+*
+* Fairhead and Bretagnon canonical coefficients
+*
+* 787 sets of three coefficients.
+*
+* Each set is amplitude (microseconds)
+* frequency (radians per Julian millenium since J2000),
+* phase (radians).
+*
+* Sets 1-474 are the T**0 terms,
+* " 475-679 " " T**1 "
+* " 680-764 " " T**2 "
+* " 765-784 " " T**3 "
+* " 785-787 " " T**4 " .
+*
+ DOUBLE PRECISION FAIRHD(3,787)
+ INTEGER I,J
+ DATA ((FAIRHD(I,J),I=1,3),J= 1, 10) /
+ : 1656.674564D-6, 6283.075849991D0, 6.240054195D0,
+ : 22.417471D-6, 5753.384884897D0, 4.296977442D0,
+ : 13.839792D-6, 12566.151699983D0, 6.196904410D0,
+ : 4.770086D-6, 529.690965095D0, 0.444401603D0,
+ : 4.676740D-6, 6069.776754553D0, 4.021195093D0,
+ : 2.256707D-6, 213.299095438D0, 5.543113262D0,
+ : 1.694205D-6, -3.523118349D0, 5.025132748D0,
+ : 1.554905D-6, 77713.771467920D0, 5.198467090D0,
+ : 1.276839D-6, 7860.419392439D0, 5.988822341D0,
+ : 1.193379D-6, 5223.693919802D0, 3.649823730D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J= 11, 20) /
+ : 1.115322D-6, 3930.209696220D0, 1.422745069D0,
+ : 0.794185D-6, 11506.769769794D0, 2.322313077D0,
+ : 0.447061D-6, 26.298319800D0, 3.615796498D0,
+ : 0.435206D-6, -398.149003408D0, 4.349338347D0,
+ : 0.600309D-6, 1577.343542448D0, 2.678271909D0,
+ : 0.496817D-6, 6208.294251424D0, 5.696701824D0,
+ : 0.486306D-6, 5884.926846583D0, 0.520007179D0,
+ : 0.432392D-6, 74.781598567D0, 2.435898309D0,
+ : 0.468597D-6, 6244.942814354D0, 5.866398759D0,
+ : 0.375510D-6, 5507.553238667D0, 4.103476804D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J= 21, 30) /
+ : 0.243085D-6, -775.522611324D0, 3.651837925D0,
+ : 0.173435D-6, 18849.227549974D0, 6.153743485D0,
+ : 0.230685D-6, 5856.477659115D0, 4.773852582D0,
+ : 0.203747D-6, 12036.460734888D0, 4.333987818D0,
+ : 0.143935D-6, -796.298006816D0, 5.957517795D0,
+ : 0.159080D-6, 10977.078804699D0, 1.890075226D0,
+ : 0.119979D-6, 38.133035638D0, 4.551585768D0,
+ : 0.118971D-6, 5486.777843175D0, 1.914547226D0,
+ : 0.116120D-6, 1059.381930189D0, 0.873504123D0,
+ : 0.137927D-6, 11790.629088659D0, 1.135934669D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J= 31, 40) /
+ : 0.098358D-6, 2544.314419883D0, 0.092793886D0,
+ : 0.101868D-6, -5573.142801634D0, 5.984503847D0,
+ : 0.080164D-6, 206.185548437D0, 2.095377709D0,
+ : 0.079645D-6, 4694.002954708D0, 2.949233637D0,
+ : 0.062617D-6, 20.775395492D0, 2.654394814D0,
+ : 0.075019D-6, 2942.463423292D0, 4.980931759D0,
+ : 0.064397D-6, 5746.271337896D0, 1.280308748D0,
+ : 0.063814D-6, 5760.498431898D0, 4.167901731D0,
+ : 0.048042D-6, 2146.165416475D0, 1.495846011D0,
+ : 0.048373D-6, 155.420399434D0, 2.251573730D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J= 41, 50) /
+ : 0.058844D-6, 426.598190876D0, 4.839650148D0,
+ : 0.046551D-6, -0.980321068D0, 0.921573539D0,
+ : 0.054139D-6, 17260.154654690D0, 3.411091093D0,
+ : 0.042411D-6, 6275.962302991D0, 2.869567043D0,
+ : 0.040184D-6, -7.113547001D0, 3.565975565D0,
+ : 0.036564D-6, 5088.628839767D0, 3.324679049D0,
+ : 0.040759D-6, 12352.852604545D0, 3.981496998D0,
+ : 0.036507D-6, 801.820931124D0, 6.248866009D0,
+ : 0.036955D-6, 3154.687084896D0, 5.071801441D0,
+ : 0.042732D-6, 632.783739313D0, 5.720622217D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J= 51, 60) /
+ : 0.042560D-6, 161000.685737473D0, 1.270837679D0,
+ : 0.040480D-6, 15720.838784878D0, 2.546610123D0,
+ : 0.028244D-6, -6286.598968340D0, 5.069663519D0,
+ : 0.033477D-6, 6062.663207553D0, 4.144987272D0,
+ : 0.034867D-6, 522.577418094D0, 5.210064075D0,
+ : 0.032438D-6, 6076.890301554D0, 0.749317412D0,
+ : 0.030215D-6, 7084.896781115D0, 3.389610345D0,
+ : 0.029247D-6, -71430.695617928D0, 4.183178762D0,
+ : 0.033529D-6, 9437.762934887D0, 2.404714239D0,
+ : 0.032423D-6, 8827.390269875D0, 5.541473556D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J= 61, 70) /
+ : 0.027567D-6, 6279.552731642D0, 5.040846034D0,
+ : 0.029862D-6, 12139.553509107D0, 1.770181024D0,
+ : 0.022509D-6, 10447.387839604D0, 1.460726241D0,
+ : 0.020937D-6, 8429.241266467D0, 0.652303414D0,
+ : 0.020322D-6, 419.484643875D0, 3.735430632D0,
+ : 0.024816D-6, -1194.447010225D0, 1.087136918D0,
+ : 0.025196D-6, 1748.016413067D0, 2.901883301D0,
+ : 0.021691D-6, 14143.495242431D0, 5.952658009D0,
+ : 0.017673D-6, 6812.766815086D0, 3.186129845D0,
+ : 0.022567D-6, 6133.512652857D0, 3.307984806D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J= 71, 80) /
+ : 0.016155D-6, 10213.285546211D0, 1.331103168D0,
+ : 0.014751D-6, 1349.867409659D0, 4.308933301D0,
+ : 0.015949D-6, -220.412642439D0, 4.005298270D0,
+ : 0.015974D-6, -2352.866153772D0, 6.145309371D0,
+ : 0.014223D-6, 17789.845619785D0, 2.104551349D0,
+ : 0.017806D-6, 73.297125859D0, 3.475975097D0,
+ : 0.013671D-6, -536.804512095D0, 5.971672571D0,
+ : 0.011942D-6, 8031.092263058D0, 2.053414715D0,
+ : 0.014318D-6, 16730.463689596D0, 3.016058075D0,
+ : 0.012462D-6, 103.092774219D0, 1.737438797D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J= 81, 90) /
+ : 0.010962D-6, 3.590428652D0, 2.196567739D0,
+ : 0.015078D-6, 19651.048481098D0, 3.969480770D0,
+ : 0.010396D-6, 951.718406251D0, 5.717799605D0,
+ : 0.011707D-6, -4705.732307544D0, 2.654125618D0,
+ : 0.010453D-6, 5863.591206116D0, 1.913704550D0,
+ : 0.012420D-6, 4690.479836359D0, 4.734090399D0,
+ : 0.011847D-6, 5643.178563677D0, 5.489005403D0,
+ : 0.008610D-6, 3340.612426700D0, 3.661698944D0,
+ : 0.011622D-6, 5120.601145584D0, 4.863931876D0,
+ : 0.010825D-6, 553.569402842D0, 0.842715011D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J= 91,100) /
+ : 0.008666D-6, -135.065080035D0, 3.293406547D0,
+ : 0.009963D-6, 149.563197135D0, 4.870690598D0,
+ : 0.009858D-6, 6309.374169791D0, 1.061816410D0,
+ : 0.007959D-6, 316.391869657D0, 2.465042647D0,
+ : 0.010099D-6, 283.859318865D0, 1.942176992D0,
+ : 0.007147D-6, -242.728603974D0, 3.661486981D0,
+ : 0.007505D-6, 5230.807466803D0, 4.920937029D0,
+ : 0.008323D-6, 11769.853693166D0, 1.229392026D0,
+ : 0.007490D-6, -6256.777530192D0, 3.658444681D0,
+ : 0.009370D-6, 149854.400134205D0, 0.673880395D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=101,110) /
+ : 0.007117D-6, 38.027672636D0, 5.294249518D0,
+ : 0.007857D-6, 12168.002696575D0, 0.525733528D0,
+ : 0.007019D-6, 6206.809778716D0, 0.837688810D0,
+ : 0.006056D-6, 955.599741609D0, 4.194535082D0,
+ : 0.008107D-6, 13367.972631107D0, 3.793235253D0,
+ : 0.006731D-6, 5650.292110678D0, 5.639906583D0,
+ : 0.007332D-6, 36.648562930D0, 0.114858677D0,
+ : 0.006366D-6, 4164.311989613D0, 2.262081818D0,
+ : 0.006858D-6, 5216.580372801D0, 0.642063318D0,
+ : 0.006919D-6, 6681.224853400D0, 6.018501522D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=111,120) /
+ : 0.006826D-6, 7632.943259650D0, 3.458654112D0,
+ : 0.005308D-6, -1592.596013633D0, 2.500382359D0,
+ : 0.005096D-6, 11371.704689758D0, 2.547107806D0,
+ : 0.004841D-6, 5333.900241022D0, 0.437078094D0,
+ : 0.005582D-6, 5966.683980335D0, 2.246174308D0,
+ : 0.006304D-6, 11926.254413669D0, 2.512929171D0,
+ : 0.006603D-6, 23581.258177318D0, 5.393136889D0,
+ : 0.005123D-6, -1.484472708D0, 2.999641028D0,
+ : 0.004648D-6, 1589.072895284D0, 1.275847090D0,
+ : 0.005119D-6, 6438.496249426D0, 1.486539246D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=121,130) /
+ : 0.004521D-6, 4292.330832950D0, 6.140635794D0,
+ : 0.005680D-6, 23013.539539587D0, 4.557814849D0,
+ : 0.005488D-6, -3.455808046D0, 0.090675389D0,
+ : 0.004193D-6, 7234.794256242D0, 4.869091389D0,
+ : 0.003742D-6, 7238.675591600D0, 4.691976180D0,
+ : 0.004148D-6, -110.206321219D0, 3.016173439D0,
+ : 0.004553D-6, 11499.656222793D0, 5.554998314D0,
+ : 0.004892D-6, 5436.993015240D0, 1.475415597D0,
+ : 0.004044D-6, 4732.030627343D0, 1.398784824D0,
+ : 0.004164D-6, 12491.370101415D0, 5.650931916D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=131,140) /
+ : 0.004349D-6, 11513.883316794D0, 2.181745369D0,
+ : 0.003919D-6, 12528.018664345D0, 5.823319737D0,
+ : 0.003129D-6, 6836.645252834D0, 0.003844094D0,
+ : 0.004080D-6, -7058.598461315D0, 3.690360123D0,
+ : 0.003270D-6, 76.266071276D0, 1.517189902D0,
+ : 0.002954D-6, 6283.143160294D0, 4.447203799D0,
+ : 0.002872D-6, 28.449187468D0, 1.158692983D0,
+ : 0.002881D-6, 735.876513532D0, 0.349250250D0,
+ : 0.003279D-6, 5849.364112115D0, 4.893384368D0,
+ : 0.003625D-6, 6209.778724132D0, 1.473760578D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=141,150) /
+ : 0.003074D-6, 949.175608970D0, 5.185878737D0,
+ : 0.002775D-6, 9917.696874510D0, 1.030026325D0,
+ : 0.002646D-6, 10973.555686350D0, 3.918259169D0,
+ : 0.002575D-6, 25132.303399966D0, 6.109659023D0,
+ : 0.003500D-6, 263.083923373D0, 1.892100742D0,
+ : 0.002740D-6, 18319.536584880D0, 4.320519510D0,
+ : 0.002464D-6, 202.253395174D0, 4.698203059D0,
+ : 0.002409D-6, 2.542797281D0, 5.325009315D0,
+ : 0.003354D-6, -90955.551694697D0, 1.942656623D0,
+ : 0.002296D-6, 6496.374945429D0, 5.061810696D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=151,160) /
+ : 0.003002D-6, 6172.869528772D0, 2.797822767D0,
+ : 0.003202D-6, 27511.467873537D0, 0.531673101D0,
+ : 0.002954D-6, -6283.008539689D0, 4.533471191D0,
+ : 0.002353D-6, 639.897286314D0, 3.734548088D0,
+ : 0.002401D-6, 16200.772724501D0, 2.605547070D0,
+ : 0.003053D-6, 233141.314403759D0, 3.029030662D0,
+ : 0.003024D-6, 83286.914269554D0, 2.355556099D0,
+ : 0.002863D-6, 17298.182327326D0, 5.240963796D0,
+ : 0.002103D-6, -7079.373856808D0, 5.756641637D0,
+ : 0.002303D-6, 83996.847317911D0, 2.013686814D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=161,170) /
+ : 0.002303D-6, 18073.704938650D0, 1.089100410D0,
+ : 0.002381D-6, 63.735898303D0, 0.759188178D0,
+ : 0.002493D-6, 6386.168624210D0, 0.645026535D0,
+ : 0.002366D-6, 3.932153263D0, 6.215885448D0,
+ : 0.002169D-6, 11015.106477335D0, 4.845297676D0,
+ : 0.002397D-6, 6243.458341645D0, 3.809290043D0,
+ : 0.002183D-6, 1162.474704408D0, 6.179611691D0,
+ : 0.002353D-6, 6246.427287062D0, 4.781719760D0,
+ : 0.002199D-6, -245.831646229D0, 5.956152284D0,
+ : 0.001729D-6, 3894.181829542D0, 1.264976635D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=171,180) /
+ : 0.001896D-6, -3128.388765096D0, 4.914231596D0,
+ : 0.002085D-6, 35.164090221D0, 1.405158503D0,
+ : 0.002024D-6, 14712.317116458D0, 2.752035928D0,
+ : 0.001737D-6, 6290.189396992D0, 5.280820144D0,
+ : 0.002229D-6, 491.557929457D0, 1.571007057D0,
+ : 0.001602D-6, 14314.168113050D0, 4.203664806D0,
+ : 0.002186D-6, 454.909366527D0, 1.402101526D0,
+ : 0.001897D-6, 22483.848574493D0, 4.167932508D0,
+ : 0.001825D-6, -3738.761430108D0, 0.545828785D0,
+ : 0.001894D-6, 1052.268383188D0, 5.817167450D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=181,190) /
+ : 0.001421D-6, 20.355319399D0, 2.419886601D0,
+ : 0.001408D-6, 10984.192351700D0, 2.732084787D0,
+ : 0.001847D-6, 10873.986030480D0, 2.903477885D0,
+ : 0.001391D-6, -8635.942003763D0, 0.593891500D0,
+ : 0.001388D-6, -7.046236698D0, 1.166145902D0,
+ : 0.001810D-6, -88860.057071188D0, 0.487355242D0,
+ : 0.001288D-6, -1990.745017041D0, 3.913022880D0,
+ : 0.001297D-6, 23543.230504682D0, 3.063805171D0,
+ : 0.001335D-6, -266.607041722D0, 3.995764039D0,
+ : 0.001376D-6, 10969.965257698D0, 5.152914309D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=191,200) /
+ : 0.001745D-6, 244287.600007027D0, 3.626395673D0,
+ : 0.001649D-6, 31441.677569757D0, 1.952049260D0,
+ : 0.001416D-6, 9225.539273283D0, 4.996408389D0,
+ : 0.001238D-6, 4804.209275927D0, 5.503379738D0,
+ : 0.001472D-6, 4590.910180489D0, 4.164913291D0,
+ : 0.001169D-6, 6040.347246017D0, 5.841719038D0,
+ : 0.001039D-6, 5540.085789459D0, 2.769753519D0,
+ : 0.001004D-6, -170.672870619D0, 0.755008103D0,
+ : 0.001284D-6, 10575.406682942D0, 5.306538209D0,
+ : 0.001278D-6, 71.812653151D0, 4.713486491D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=201,210) /
+ : 0.001321D-6, 18209.330263660D0, 2.624866359D0,
+ : 0.001297D-6, 21228.392023546D0, 0.382603541D0,
+ : 0.000954D-6, 6282.095528923D0, 0.882213514D0,
+ : 0.001145D-6, 6058.731054289D0, 1.169483931D0,
+ : 0.000979D-6, 5547.199336460D0, 5.448375984D0,
+ : 0.000987D-6, -6262.300454499D0, 2.656486959D0,
+ : 0.001070D-6, -154717.609887482D0, 1.827624012D0,
+ : 0.000991D-6, 4701.116501708D0, 4.387001801D0,
+ : 0.001155D-6, -14.227094002D0, 3.042700750D0,
+ : 0.001176D-6, 277.034993741D0, 3.335519004D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=211,220) /
+ : 0.000890D-6, 13916.019109642D0, 5.601498297D0,
+ : 0.000884D-6, -1551.045222648D0, 1.088831705D0,
+ : 0.000876D-6, 5017.508371365D0, 3.969902609D0,
+ : 0.000806D-6, 15110.466119866D0, 5.142876744D0,
+ : 0.000773D-6, -4136.910433516D0, 0.022067765D0,
+ : 0.001077D-6, 175.166059800D0, 1.844913056D0,
+ : 0.000954D-6, -6284.056171060D0, 0.968480906D0,
+ : 0.000737D-6, 5326.786694021D0, 4.923831588D0,
+ : 0.000845D-6, -433.711737877D0, 4.749245231D0,
+ : 0.000819D-6, 8662.240323563D0, 5.991247817D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=221,230) /
+ : 0.000852D-6, 199.072001436D0, 2.189604979D0,
+ : 0.000723D-6, 17256.631536341D0, 6.068719637D0,
+ : 0.000940D-6, 6037.244203762D0, 6.197428148D0,
+ : 0.000885D-6, 11712.955318231D0, 3.280414875D0,
+ : 0.000706D-6, 12559.038152982D0, 2.824848947D0,
+ : 0.000732D-6, 2379.164473572D0, 2.501813417D0,
+ : 0.000764D-6, -6127.655450557D0, 2.236346329D0,
+ : 0.000908D-6, 131.541961686D0, 2.521257490D0,
+ : 0.000907D-6, 35371.887265976D0, 3.370195967D0,
+ : 0.000673D-6, 1066.495477190D0, 3.876512374D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=231,240) /
+ : 0.000814D-6, 17654.780539750D0, 4.627122566D0,
+ : 0.000630D-6, 36.027866677D0, 0.156368499D0,
+ : 0.000798D-6, 515.463871093D0, 5.151962502D0,
+ : 0.000798D-6, 148.078724426D0, 5.909225055D0,
+ : 0.000806D-6, 309.278322656D0, 6.054064447D0,
+ : 0.000607D-6, -39.617508346D0, 2.839021623D0,
+ : 0.000601D-6, 412.371096874D0, 3.984225404D0,
+ : 0.000646D-6, 11403.676995575D0, 3.852959484D0,
+ : 0.000704D-6, 13521.751441591D0, 2.300991267D0,
+ : 0.000603D-6, -65147.619767937D0, 4.140083146D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=241,250) /
+ : 0.000609D-6, 10177.257679534D0, 0.437122327D0,
+ : 0.000631D-6, 5767.611978898D0, 4.026532329D0,
+ : 0.000576D-6, 11087.285125918D0, 4.760293101D0,
+ : 0.000674D-6, 14945.316173554D0, 6.270510511D0,
+ : 0.000726D-6, 5429.879468239D0, 6.039606892D0,
+ : 0.000710D-6, 28766.924424484D0, 5.672617711D0,
+ : 0.000647D-6, 11856.218651625D0, 3.397132627D0,
+ : 0.000678D-6, -5481.254918868D0, 6.249666675D0,
+ : 0.000618D-6, 22003.914634870D0, 2.466427018D0,
+ : 0.000738D-6, 6134.997125565D0, 2.242668890D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=251,260) /
+ : 0.000660D-6, 625.670192312D0, 5.864091907D0,
+ : 0.000694D-6, 3496.032826134D0, 2.668309141D0,
+ : 0.000531D-6, 6489.261398429D0, 1.681888780D0,
+ : 0.000611D-6, -143571.324284214D0, 2.424978312D0,
+ : 0.000575D-6, 12043.574281889D0, 4.216492400D0,
+ : 0.000553D-6, 12416.588502848D0, 4.772158039D0,
+ : 0.000689D-6, 4686.889407707D0, 6.224271088D0,
+ : 0.000495D-6, 7342.457780181D0, 3.817285811D0,
+ : 0.000567D-6, 3634.621024518D0, 1.649264690D0,
+ : 0.000515D-6, 18635.928454536D0, 3.945345892D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=261,270) /
+ : 0.000486D-6, -323.505416657D0, 4.061673868D0,
+ : 0.000662D-6, 25158.601719765D0, 1.794058369D0,
+ : 0.000509D-6, 846.082834751D0, 3.053874588D0,
+ : 0.000472D-6, -12569.674818332D0, 5.112133338D0,
+ : 0.000461D-6, 6179.983075773D0, 0.513669325D0,
+ : 0.000641D-6, 83467.156352816D0, 3.210727723D0,
+ : 0.000520D-6, 10344.295065386D0, 2.445597761D0,
+ : 0.000493D-6, 18422.629359098D0, 1.676939306D0,
+ : 0.000478D-6, 1265.567478626D0, 5.487314569D0,
+ : 0.000472D-6, -18.159247265D0, 1.999707589D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=271,280) /
+ : 0.000559D-6, 11190.377900137D0, 5.783236356D0,
+ : 0.000494D-6, 9623.688276691D0, 3.022645053D0,
+ : 0.000463D-6, 5739.157790895D0, 1.411223013D0,
+ : 0.000432D-6, 16858.482532933D0, 1.179256434D0,
+ : 0.000574D-6, 72140.628666286D0, 1.758191830D0,
+ : 0.000484D-6, 17267.268201691D0, 3.290589143D0,
+ : 0.000550D-6, 4907.302050146D0, 0.864024298D0,
+ : 0.000399D-6, 14.977853527D0, 2.094441910D0,
+ : 0.000491D-6, 224.344795702D0, 0.878372791D0,
+ : 0.000432D-6, 20426.571092422D0, 6.003829241D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=281,290) /
+ : 0.000481D-6, 5749.452731634D0, 4.309591964D0,
+ : 0.000480D-6, 5757.317038160D0, 1.142348571D0,
+ : 0.000485D-6, 6702.560493867D0, 0.210580917D0,
+ : 0.000426D-6, 6055.549660552D0, 4.274476529D0,
+ : 0.000480D-6, 5959.570433334D0, 5.031351030D0,
+ : 0.000466D-6, 12562.628581634D0, 4.959581597D0,
+ : 0.000520D-6, 39302.096962196D0, 4.788002889D0,
+ : 0.000458D-6, 12132.439962106D0, 1.880103788D0,
+ : 0.000470D-6, 12029.347187887D0, 1.405611197D0,
+ : 0.000416D-6, -7477.522860216D0, 1.082356330D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=291,300) /
+ : 0.000449D-6, 11609.862544012D0, 4.179989585D0,
+ : 0.000465D-6, 17253.041107690D0, 0.353496295D0,
+ : 0.000362D-6, -4535.059436924D0, 1.583849576D0,
+ : 0.000383D-6, 21954.157609398D0, 3.747376371D0,
+ : 0.000389D-6, 17.252277143D0, 1.395753179D0,
+ : 0.000331D-6, 18052.929543158D0, 0.566790582D0,
+ : 0.000430D-6, 13517.870106233D0, 0.685827538D0,
+ : 0.000368D-6, -5756.908003246D0, 0.731374317D0,
+ : 0.000330D-6, 10557.594160824D0, 3.710043680D0,
+ : 0.000332D-6, 20199.094959633D0, 1.652901407D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=301,310) /
+ : 0.000384D-6, 11933.367960670D0, 5.827781531D0,
+ : 0.000387D-6, 10454.501386605D0, 2.541182564D0,
+ : 0.000325D-6, 15671.081759407D0, 2.178850542D0,
+ : 0.000318D-6, 138.517496871D0, 2.253253037D0,
+ : 0.000305D-6, 9388.005909415D0, 0.578340206D0,
+ : 0.000352D-6, 5749.861766548D0, 3.000297967D0,
+ : 0.000311D-6, 6915.859589305D0, 1.693574249D0,
+ : 0.000297D-6, 24072.921469776D0, 1.997249392D0,
+ : 0.000363D-6, -640.877607382D0, 5.071820966D0,
+ : 0.000323D-6, 12592.450019783D0, 1.072262823D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=311,320) /
+ : 0.000341D-6, 12146.667056108D0, 4.700657997D0,
+ : 0.000290D-6, 9779.108676125D0, 1.812320441D0,
+ : 0.000342D-6, 6132.028180148D0, 4.322238614D0,
+ : 0.000329D-6, 6268.848755990D0, 3.033827743D0,
+ : 0.000374D-6, 17996.031168222D0, 3.388716544D0,
+ : 0.000285D-6, -533.214083444D0, 4.687313233D0,
+ : 0.000338D-6, 6065.844601290D0, 0.877776108D0,
+ : 0.000276D-6, 24.298513841D0, 0.770299429D0,
+ : 0.000336D-6, -2388.894020449D0, 5.353796034D0,
+ : 0.000290D-6, 3097.883822726D0, 4.075291557D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=321,330) /
+ : 0.000318D-6, 709.933048357D0, 5.941207518D0,
+ : 0.000271D-6, 13095.842665077D0, 3.208912203D0,
+ : 0.000331D-6, 6073.708907816D0, 4.007881169D0,
+ : 0.000292D-6, 742.990060533D0, 2.714333592D0,
+ : 0.000362D-6, 29088.811415985D0, 3.215977013D0,
+ : 0.000280D-6, 12359.966151546D0, 0.710872502D0,
+ : 0.000267D-6, 10440.274292604D0, 4.730108488D0,
+ : 0.000262D-6, 838.969287750D0, 1.327720272D0,
+ : 0.000250D-6, 16496.361396202D0, 0.898769761D0,
+ : 0.000325D-6, 20597.243963041D0, 0.180044365D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=331,340) /
+ : 0.000268D-6, 6148.010769956D0, 5.152666276D0,
+ : 0.000284D-6, 5636.065016677D0, 5.655385808D0,
+ : 0.000301D-6, 6080.822454817D0, 2.135396205D0,
+ : 0.000294D-6, -377.373607916D0, 3.708784168D0,
+ : 0.000236D-6, 2118.763860378D0, 1.733578756D0,
+ : 0.000234D-6, 5867.523359379D0, 5.575209112D0,
+ : 0.000268D-6, -226858.238553767D0, 0.069432392D0,
+ : 0.000265D-6, 167283.761587465D0, 4.369302826D0,
+ : 0.000280D-6, 28237.233459389D0, 5.304829118D0,
+ : 0.000292D-6, 12345.739057544D0, 4.096094132D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=341,350) /
+ : 0.000223D-6, 19800.945956225D0, 3.069327406D0,
+ : 0.000301D-6, 43232.306658416D0, 6.205311188D0,
+ : 0.000264D-6, 18875.525869774D0, 1.417263408D0,
+ : 0.000304D-6, -1823.175188677D0, 3.409035232D0,
+ : 0.000301D-6, 109.945688789D0, 0.510922054D0,
+ : 0.000260D-6, 813.550283960D0, 2.389438934D0,
+ : 0.000299D-6, 316428.228673312D0, 5.384595078D0,
+ : 0.000211D-6, 5756.566278634D0, 3.789392838D0,
+ : 0.000209D-6, 5750.203491159D0, 1.661943545D0,
+ : 0.000240D-6, 12489.885628707D0, 5.684549045D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=351,360) /
+ : 0.000216D-6, 6303.851245484D0, 3.862942261D0,
+ : 0.000203D-6, 1581.959348283D0, 5.549853589D0,
+ : 0.000200D-6, 5642.198242609D0, 1.016115785D0,
+ : 0.000197D-6, -70.849445304D0, 4.690702525D0,
+ : 0.000227D-6, 6287.008003254D0, 2.911891613D0,
+ : 0.000197D-6, 533.623118358D0, 1.048982898D0,
+ : 0.000205D-6, -6279.485421340D0, 1.829362730D0,
+ : 0.000209D-6, -10988.808157535D0, 2.636140084D0,
+ : 0.000208D-6, -227.526189440D0, 4.127883842D0,
+ : 0.000191D-6, 415.552490612D0, 4.401165650D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=361,370) /
+ : 0.000190D-6, 29296.615389579D0, 4.175658539D0,
+ : 0.000264D-6, 66567.485864652D0, 4.601102551D0,
+ : 0.000256D-6, -3646.350377354D0, 0.506364778D0,
+ : 0.000188D-6, 13119.721102825D0, 2.032195842D0,
+ : 0.000185D-6, -209.366942175D0, 4.694756586D0,
+ : 0.000198D-6, 25934.124331089D0, 3.832703118D0,
+ : 0.000195D-6, 4061.219215394D0, 3.308463427D0,
+ : 0.000234D-6, 5113.487598583D0, 1.716090661D0,
+ : 0.000188D-6, 1478.866574064D0, 5.686865780D0,
+ : 0.000222D-6, 11823.161639450D0, 1.942386641D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=371,380) /
+ : 0.000181D-6, 10770.893256262D0, 1.999482059D0,
+ : 0.000171D-6, 6546.159773364D0, 1.182807992D0,
+ : 0.000206D-6, 70.328180442D0, 5.934076062D0,
+ : 0.000169D-6, 20995.392966449D0, 2.169080622D0,
+ : 0.000191D-6, 10660.686935042D0, 5.405515999D0,
+ : 0.000228D-6, 33019.021112205D0, 4.656985514D0,
+ : 0.000184D-6, -4933.208440333D0, 3.327476868D0,
+ : 0.000220D-6, -135.625325010D0, 1.765430262D0,
+ : 0.000166D-6, 23141.558382925D0, 3.454132746D0,
+ : 0.000191D-6, 6144.558353121D0, 5.020393445D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=381,390) /
+ : 0.000180D-6, 6084.003848555D0, 0.602182191D0,
+ : 0.000163D-6, 17782.732072784D0, 4.960593133D0,
+ : 0.000225D-6, 16460.333529525D0, 2.596451817D0,
+ : 0.000222D-6, 5905.702242076D0, 3.731990323D0,
+ : 0.000204D-6, 227.476132789D0, 5.636192701D0,
+ : 0.000159D-6, 16737.577236597D0, 3.600691544D0,
+ : 0.000200D-6, 6805.653268085D0, 0.868220961D0,
+ : 0.000187D-6, 11919.140866668D0, 2.629456641D0,
+ : 0.000161D-6, 127.471796607D0, 2.862574720D0,
+ : 0.000205D-6, 6286.666278643D0, 1.742882331D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=391,400) /
+ : 0.000189D-6, 153.778810485D0, 4.812372643D0,
+ : 0.000168D-6, 16723.350142595D0, 0.027860588D0,
+ : 0.000149D-6, 11720.068865232D0, 0.659721876D0,
+ : 0.000189D-6, 5237.921013804D0, 5.245313000D0,
+ : 0.000143D-6, 6709.674040867D0, 4.317625647D0,
+ : 0.000146D-6, 4487.817406270D0, 4.815297007D0,
+ : 0.000144D-6, -664.756045130D0, 5.381366880D0,
+ : 0.000175D-6, 5127.714692584D0, 4.728443327D0,
+ : 0.000162D-6, 6254.626662524D0, 1.435132069D0,
+ : 0.000187D-6, 47162.516354635D0, 1.354371923D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=401,410) /
+ : 0.000146D-6, 11080.171578918D0, 3.369695406D0,
+ : 0.000180D-6, -348.924420448D0, 2.490902145D0,
+ : 0.000148D-6, 151.047669843D0, 3.799109588D0,
+ : 0.000157D-6, 6197.248551160D0, 1.284375887D0,
+ : 0.000167D-6, 146.594251718D0, 0.759969109D0,
+ : 0.000133D-6, -5331.357443741D0, 5.409701889D0,
+ : 0.000154D-6, 95.979227218D0, 3.366890614D0,
+ : 0.000148D-6, -6418.140930027D0, 3.384104996D0,
+ : 0.000128D-6, -6525.804453965D0, 3.803419985D0,
+ : 0.000130D-6, 11293.470674356D0, 0.939039445D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=411,420) /
+ : 0.000152D-6, -5729.506447149D0, 0.734117523D0,
+ : 0.000138D-6, 210.117701700D0, 2.564216078D0,
+ : 0.000123D-6, 6066.595360816D0, 4.517099537D0,
+ : 0.000140D-6, 18451.078546566D0, 0.642049130D0,
+ : 0.000126D-6, 11300.584221356D0, 3.485280663D0,
+ : 0.000119D-6, 10027.903195729D0, 3.217431161D0,
+ : 0.000151D-6, 4274.518310832D0, 4.404359108D0,
+ : 0.000117D-6, 6072.958148291D0, 0.366324650D0,
+ : 0.000165D-6, -7668.637425143D0, 4.298212528D0,
+ : 0.000117D-6, -6245.048177356D0, 5.379518958D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=421,430) /
+ : 0.000130D-6, -5888.449964932D0, 4.527681115D0,
+ : 0.000121D-6, -543.918059096D0, 6.109429504D0,
+ : 0.000162D-6, 9683.594581116D0, 5.720092446D0,
+ : 0.000141D-6, 6219.339951688D0, 0.679068671D0,
+ : 0.000118D-6, 22743.409379516D0, 4.881123092D0,
+ : 0.000129D-6, 1692.165669502D0, 0.351407289D0,
+ : 0.000126D-6, 5657.405657679D0, 5.146592349D0,
+ : 0.000114D-6, 728.762966531D0, 0.520791814D0,
+ : 0.000120D-6, 52.596639600D0, 0.948516300D0,
+ : 0.000115D-6, 65.220371012D0, 3.504914846D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=431,440) /
+ : 0.000126D-6, 5881.403728234D0, 5.577502482D0,
+ : 0.000158D-6, 163096.180360983D0, 2.957128968D0,
+ : 0.000134D-6, 12341.806904281D0, 2.598576764D0,
+ : 0.000151D-6, 16627.370915377D0, 3.985702050D0,
+ : 0.000109D-6, 1368.660252845D0, 0.014730471D0,
+ : 0.000131D-6, 6211.263196841D0, 0.085077024D0,
+ : 0.000146D-6, 5792.741760812D0, 0.708426604D0,
+ : 0.000146D-6, -77.750543984D0, 3.121576600D0,
+ : 0.000107D-6, 5341.013788022D0, 0.288231904D0,
+ : 0.000138D-6, 6281.591377283D0, 2.797450317D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=441,450) /
+ : 0.000113D-6, -6277.552925684D0, 2.788904128D0,
+ : 0.000115D-6, -525.758811831D0, 5.895222200D0,
+ : 0.000138D-6, 6016.468808270D0, 6.096188999D0,
+ : 0.000139D-6, 23539.707386333D0, 2.028195445D0,
+ : 0.000146D-6, -4176.041342449D0, 4.660008502D0,
+ : 0.000107D-6, 16062.184526117D0, 4.066520001D0,
+ : 0.000142D-6, 83783.548222473D0, 2.936315115D0,
+ : 0.000128D-6, 9380.959672717D0, 3.223844306D0,
+ : 0.000135D-6, 6205.325306007D0, 1.638054048D0,
+ : 0.000101D-6, 2699.734819318D0, 5.481603249D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=451,460) /
+ : 0.000104D-6, -568.821874027D0, 2.205734493D0,
+ : 0.000103D-6, 6321.103522627D0, 2.440421099D0,
+ : 0.000119D-6, 6321.208885629D0, 2.547496264D0,
+ : 0.000138D-6, 1975.492545856D0, 2.314608466D0,
+ : 0.000121D-6, 137.033024162D0, 4.539108237D0,
+ : 0.000123D-6, 19402.796952817D0, 4.538074405D0,
+ : 0.000119D-6, 22805.735565994D0, 2.869040566D0,
+ : 0.000133D-6, 64471.991241142D0, 6.056405489D0,
+ : 0.000129D-6, -85.827298831D0, 2.540635083D0,
+ : 0.000131D-6, 13613.804277336D0, 4.005732868D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=461,470) /
+ : 0.000104D-6, 9814.604100291D0, 1.959967212D0,
+ : 0.000112D-6, 16097.679950283D0, 3.589026260D0,
+ : 0.000123D-6, 2107.034507542D0, 1.728627253D0,
+ : 0.000121D-6, 36949.230808424D0, 6.072332087D0,
+ : 0.000108D-6, -12539.853380183D0, 3.716133846D0,
+ : 0.000113D-6, -7875.671863624D0, 2.725771122D0,
+ : 0.000109D-6, 4171.425536614D0, 4.033338079D0,
+ : 0.000101D-6, 6247.911759770D0, 3.441347021D0,
+ : 0.000113D-6, 7330.728427345D0, 0.656372122D0,
+ : 0.000113D-6, 51092.726050855D0, 2.791483066D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=471,480) /
+ : 0.000106D-6, 5621.842923210D0, 1.815323326D0,
+ : 0.000101D-6, 111.430161497D0, 5.711033677D0,
+ : 0.000103D-6, 909.818733055D0, 2.812745443D0,
+ : 0.000101D-6, 1790.642637886D0, 1.965746028D0,
+
+* T
+ : 102.156724D-6, 6283.075849991D0, 4.249032005D0,
+ : 1.706807D-6, 12566.151699983D0, 4.205904248D0,
+ : 0.269668D-6, 213.299095438D0, 3.400290479D0,
+ : 0.265919D-6, 529.690965095D0, 5.836047367D0,
+ : 0.210568D-6, -3.523118349D0, 6.262738348D0,
+ : 0.077996D-6, 5223.693919802D0, 4.670344204D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=481,490) /
+ : 0.054764D-6, 1577.343542448D0, 4.534800170D0,
+ : 0.059146D-6, 26.298319800D0, 1.083044735D0,
+ : 0.034420D-6, -398.149003408D0, 5.980077351D0,
+ : 0.032088D-6, 18849.227549974D0, 4.162913471D0,
+ : 0.033595D-6, 5507.553238667D0, 5.980162321D0,
+ : 0.029198D-6, 5856.477659115D0, 0.623811863D0,
+ : 0.027764D-6, 155.420399434D0, 3.745318113D0,
+ : 0.025190D-6, 5746.271337896D0, 2.980330535D0,
+ : 0.022997D-6, -796.298006816D0, 1.174411803D0,
+ : 0.024976D-6, 5760.498431898D0, 2.467913690D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=491,500) /
+ : 0.021774D-6, 206.185548437D0, 3.854787540D0,
+ : 0.017925D-6, -775.522611324D0, 1.092065955D0,
+ : 0.013794D-6, 426.598190876D0, 2.699831988D0,
+ : 0.013276D-6, 6062.663207553D0, 5.845801920D0,
+ : 0.011774D-6, 12036.460734888D0, 2.292832062D0,
+ : 0.012869D-6, 6076.890301554D0, 5.333425680D0,
+ : 0.012152D-6, 1059.381930189D0, 6.222874454D0,
+ : 0.011081D-6, -7.113547001D0, 5.154724984D0,
+ : 0.010143D-6, 4694.002954708D0, 4.044013795D0,
+ : 0.009357D-6, 5486.777843175D0, 3.416081409D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=501,510) /
+ : 0.010084D-6, 522.577418094D0, 0.749320262D0,
+ : 0.008587D-6, 10977.078804699D0, 2.777152598D0,
+ : 0.008628D-6, 6275.962302991D0, 4.562060226D0,
+ : 0.008158D-6, -220.412642439D0, 5.806891533D0,
+ : 0.007746D-6, 2544.314419883D0, 1.603197066D0,
+ : 0.007670D-6, 2146.165416475D0, 3.000200440D0,
+ : 0.007098D-6, 74.781598567D0, 0.443725817D0,
+ : 0.006180D-6, -536.804512095D0, 1.302642751D0,
+ : 0.005818D-6, 5088.628839767D0, 4.827723531D0,
+ : 0.004945D-6, -6286.598968340D0, 0.268305170D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=511,520) /
+ : 0.004774D-6, 1349.867409659D0, 5.808636673D0,
+ : 0.004687D-6, -242.728603974D0, 5.154890570D0,
+ : 0.006089D-6, 1748.016413067D0, 4.403765209D0,
+ : 0.005975D-6, -1194.447010225D0, 2.583472591D0,
+ : 0.004229D-6, 951.718406251D0, 0.931172179D0,
+ : 0.005264D-6, 553.569402842D0, 2.336107252D0,
+ : 0.003049D-6, 5643.178563677D0, 1.362634430D0,
+ : 0.002974D-6, 6812.766815086D0, 1.583012668D0,
+ : 0.003403D-6, -2352.866153772D0, 2.552189886D0,
+ : 0.003030D-6, 419.484643875D0, 5.286473844D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=521,530) /
+ : 0.003210D-6, -7.046236698D0, 1.863796539D0,
+ : 0.003058D-6, 9437.762934887D0, 4.226420633D0,
+ : 0.002589D-6, 12352.852604545D0, 1.991935820D0,
+ : 0.002927D-6, 5216.580372801D0, 2.319951253D0,
+ : 0.002425D-6, 5230.807466803D0, 3.084752833D0,
+ : 0.002656D-6, 3154.687084896D0, 2.487447866D0,
+ : 0.002445D-6, 10447.387839604D0, 2.347139160D0,
+ : 0.002990D-6, 4690.479836359D0, 6.235872050D0,
+ : 0.002890D-6, 5863.591206116D0, 0.095197563D0,
+ : 0.002498D-6, 6438.496249426D0, 2.994779800D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=531,540) /
+ : 0.001889D-6, 8031.092263058D0, 3.569003717D0,
+ : 0.002567D-6, 801.820931124D0, 3.425611498D0,
+ : 0.001803D-6, -71430.695617928D0, 2.192295512D0,
+ : 0.001782D-6, 3.932153263D0, 5.180433689D0,
+ : 0.001694D-6, -4705.732307544D0, 4.641779174D0,
+ : 0.001704D-6, -1592.596013633D0, 3.997097652D0,
+ : 0.001735D-6, 5849.364112115D0, 0.417558428D0,
+ : 0.001643D-6, 8429.241266467D0, 2.180619584D0,
+ : 0.001680D-6, 38.133035638D0, 4.164529426D0,
+ : 0.002045D-6, 7084.896781115D0, 0.526323854D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=541,550) /
+ : 0.001458D-6, 4292.330832950D0, 1.356098141D0,
+ : 0.001437D-6, 20.355319399D0, 3.895439360D0,
+ : 0.001738D-6, 6279.552731642D0, 0.087484036D0,
+ : 0.001367D-6, 14143.495242431D0, 3.987576591D0,
+ : 0.001344D-6, 7234.794256242D0, 0.090454338D0,
+ : 0.001438D-6, 11499.656222793D0, 0.974387904D0,
+ : 0.001257D-6, 6836.645252834D0, 1.509069366D0,
+ : 0.001358D-6, 11513.883316794D0, 0.495572260D0,
+ : 0.001628D-6, 7632.943259650D0, 4.968445721D0,
+ : 0.001169D-6, 103.092774219D0, 2.838496795D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=551,560) /
+ : 0.001162D-6, 4164.311989613D0, 3.408387778D0,
+ : 0.001092D-6, 6069.776754553D0, 3.617942651D0,
+ : 0.001008D-6, 17789.845619785D0, 0.286350174D0,
+ : 0.001008D-6, 639.897286314D0, 1.610762073D0,
+ : 0.000918D-6, 10213.285546211D0, 5.532798067D0,
+ : 0.001011D-6, -6256.777530192D0, 0.661826484D0,
+ : 0.000753D-6, 16730.463689596D0, 3.905030235D0,
+ : 0.000737D-6, 11926.254413669D0, 4.641956361D0,
+ : 0.000694D-6, 3340.612426700D0, 2.111120332D0,
+ : 0.000701D-6, 3894.181829542D0, 2.760823491D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=561,570) /
+ : 0.000689D-6, -135.065080035D0, 4.768800780D0,
+ : 0.000700D-6, 13367.972631107D0, 5.760439898D0,
+ : 0.000664D-6, 6040.347246017D0, 1.051215840D0,
+ : 0.000654D-6, 5650.292110678D0, 4.911332503D0,
+ : 0.000788D-6, 6681.224853400D0, 4.699648011D0,
+ : 0.000628D-6, 5333.900241022D0, 5.024608847D0,
+ : 0.000755D-6, -110.206321219D0, 4.370971253D0,
+ : 0.000628D-6, 6290.189396992D0, 3.660478857D0,
+ : 0.000635D-6, 25132.303399966D0, 4.121051532D0,
+ : 0.000534D-6, 5966.683980335D0, 1.173284524D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=571,580) /
+ : 0.000543D-6, -433.711737877D0, 0.345585464D0,
+ : 0.000517D-6, -1990.745017041D0, 5.414571768D0,
+ : 0.000504D-6, 5767.611978898D0, 2.328281115D0,
+ : 0.000485D-6, 5753.384884897D0, 1.685874771D0,
+ : 0.000463D-6, 7860.419392439D0, 5.297703006D0,
+ : 0.000604D-6, 515.463871093D0, 0.591998446D0,
+ : 0.000443D-6, 12168.002696575D0, 4.830881244D0,
+ : 0.000570D-6, 199.072001436D0, 3.899190272D0,
+ : 0.000465D-6, 10969.965257698D0, 0.476681802D0,
+ : 0.000424D-6, -7079.373856808D0, 1.112242763D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=581,590) /
+ : 0.000427D-6, 735.876513532D0, 1.994214480D0,
+ : 0.000478D-6, -6127.655450557D0, 3.778025483D0,
+ : 0.000414D-6, 10973.555686350D0, 5.441088327D0,
+ : 0.000512D-6, 1589.072895284D0, 0.107123853D0,
+ : 0.000378D-6, 10984.192351700D0, 0.915087231D0,
+ : 0.000402D-6, 11371.704689758D0, 4.107281715D0,
+ : 0.000453D-6, 9917.696874510D0, 1.917490952D0,
+ : 0.000395D-6, 149.563197135D0, 2.763124165D0,
+ : 0.000371D-6, 5739.157790895D0, 3.112111866D0,
+ : 0.000350D-6, 11790.629088659D0, 0.440639857D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=591,600) /
+ : 0.000356D-6, 6133.512652857D0, 5.444568842D0,
+ : 0.000344D-6, 412.371096874D0, 5.676832684D0,
+ : 0.000383D-6, 955.599741609D0, 5.559734846D0,
+ : 0.000333D-6, 6496.374945429D0, 0.261537984D0,
+ : 0.000340D-6, 6055.549660552D0, 5.975534987D0,
+ : 0.000334D-6, 1066.495477190D0, 2.335063907D0,
+ : 0.000399D-6, 11506.769769794D0, 5.321230910D0,
+ : 0.000314D-6, 18319.536584880D0, 2.313312404D0,
+ : 0.000424D-6, 1052.268383188D0, 1.211961766D0,
+ : 0.000307D-6, 63.735898303D0, 3.169551388D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=601,610) /
+ : 0.000329D-6, 29.821438149D0, 6.106912080D0,
+ : 0.000357D-6, 6309.374169791D0, 4.223760346D0,
+ : 0.000312D-6, -3738.761430108D0, 2.180556645D0,
+ : 0.000301D-6, 309.278322656D0, 1.499984572D0,
+ : 0.000268D-6, 12043.574281889D0, 2.447520648D0,
+ : 0.000257D-6, 12491.370101415D0, 3.662331761D0,
+ : 0.000290D-6, 625.670192312D0, 1.272834584D0,
+ : 0.000256D-6, 5429.879468239D0, 1.913426912D0,
+ : 0.000339D-6, 3496.032826134D0, 4.165930011D0,
+ : 0.000283D-6, 3930.209696220D0, 4.325565754D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=611,620) /
+ : 0.000241D-6, 12528.018664345D0, 3.832324536D0,
+ : 0.000304D-6, 4686.889407707D0, 1.612348468D0,
+ : 0.000259D-6, 16200.772724501D0, 3.470173146D0,
+ : 0.000238D-6, 12139.553509107D0, 1.147977842D0,
+ : 0.000236D-6, 6172.869528772D0, 3.776271728D0,
+ : 0.000296D-6, -7058.598461315D0, 0.460368852D0,
+ : 0.000306D-6, 10575.406682942D0, 0.554749016D0,
+ : 0.000251D-6, 17298.182327326D0, 0.834332510D0,
+ : 0.000290D-6, 4732.030627343D0, 4.759564091D0,
+ : 0.000261D-6, 5884.926846583D0, 0.298259862D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=621,630) /
+ : 0.000249D-6, 5547.199336460D0, 3.749366406D0,
+ : 0.000213D-6, 11712.955318231D0, 5.415666119D0,
+ : 0.000223D-6, 4701.116501708D0, 2.703203558D0,
+ : 0.000268D-6, -640.877607382D0, 0.283670793D0,
+ : 0.000209D-6, 5636.065016677D0, 1.238477199D0,
+ : 0.000193D-6, 10177.257679534D0, 1.943251340D0,
+ : 0.000182D-6, 6283.143160294D0, 2.456157599D0,
+ : 0.000184D-6, -227.526189440D0, 5.888038582D0,
+ : 0.000182D-6, -6283.008539689D0, 0.241332086D0,
+ : 0.000228D-6, -6284.056171060D0, 2.657323816D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=631,640) /
+ : 0.000166D-6, 7238.675591600D0, 5.930629110D0,
+ : 0.000167D-6, 3097.883822726D0, 5.570955333D0,
+ : 0.000159D-6, -323.505416657D0, 5.786670700D0,
+ : 0.000154D-6, -4136.910433516D0, 1.517805532D0,
+ : 0.000176D-6, 12029.347187887D0, 3.139266834D0,
+ : 0.000167D-6, 12132.439962106D0, 3.556352289D0,
+ : 0.000153D-6, 202.253395174D0, 1.463313961D0,
+ : 0.000157D-6, 17267.268201691D0, 1.586837396D0,
+ : 0.000142D-6, 83996.847317911D0, 0.022670115D0,
+ : 0.000152D-6, 17260.154654690D0, 0.708528947D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=641,650) /
+ : 0.000144D-6, 6084.003848555D0, 5.187075177D0,
+ : 0.000135D-6, 5756.566278634D0, 1.993229262D0,
+ : 0.000134D-6, 5750.203491159D0, 3.457197134D0,
+ : 0.000144D-6, 5326.786694021D0, 6.066193291D0,
+ : 0.000160D-6, 11015.106477335D0, 1.710431974D0,
+ : 0.000133D-6, 3634.621024518D0, 2.836451652D0,
+ : 0.000134D-6, 18073.704938650D0, 5.453106665D0,
+ : 0.000134D-6, 1162.474704408D0, 5.326898811D0,
+ : 0.000128D-6, 5642.198242609D0, 2.511652591D0,
+ : 0.000160D-6, 632.783739313D0, 5.628785365D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=651,660) /
+ : 0.000132D-6, 13916.019109642D0, 0.819294053D0,
+ : 0.000122D-6, 14314.168113050D0, 5.677408071D0,
+ : 0.000125D-6, 12359.966151546D0, 5.251984735D0,
+ : 0.000121D-6, 5749.452731634D0, 2.210924603D0,
+ : 0.000136D-6, -245.831646229D0, 1.646502367D0,
+ : 0.000120D-6, 5757.317038160D0, 3.240883049D0,
+ : 0.000134D-6, 12146.667056108D0, 3.059480037D0,
+ : 0.000137D-6, 6206.809778716D0, 1.867105418D0,
+ : 0.000141D-6, 17253.041107690D0, 2.069217456D0,
+ : 0.000129D-6, -7477.522860216D0, 2.781469314D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=661,670) /
+ : 0.000116D-6, 5540.085789459D0, 4.281176991D0,
+ : 0.000116D-6, 9779.108676125D0, 3.320925381D0,
+ : 0.000129D-6, 5237.921013804D0, 3.497704076D0,
+ : 0.000113D-6, 5959.570433334D0, 0.983210840D0,
+ : 0.000122D-6, 6282.095528923D0, 2.674938860D0,
+ : 0.000140D-6, -11.045700264D0, 4.957936982D0,
+ : 0.000108D-6, 23543.230504682D0, 1.390113589D0,
+ : 0.000106D-6, -12569.674818332D0, 0.429631317D0,
+ : 0.000110D-6, -266.607041722D0, 5.501340197D0,
+ : 0.000115D-6, 12559.038152982D0, 4.691456618D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=671,680) /
+ : 0.000134D-6, -2388.894020449D0, 0.577313584D0,
+ : 0.000109D-6, 10440.274292604D0, 6.218148717D0,
+ : 0.000102D-6, -543.918059096D0, 1.477842615D0,
+ : 0.000108D-6, 21228.392023546D0, 2.237753948D0,
+ : 0.000101D-6, -4535.059436924D0, 3.100492232D0,
+ : 0.000103D-6, 76.266071276D0, 5.594294322D0,
+ : 0.000104D-6, 949.175608970D0, 5.674287810D0,
+ : 0.000101D-6, 13517.870106233D0, 2.196632348D0,
+ : 0.000100D-6, 11933.367960670D0, 4.056084160D0,
+ : 4.322990D-6, 6283.075849991D0, 2.642893748D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=681,690) /
+ : 0.406495D-6, 0.000000000D0, 4.712388980D0,
+ : 0.122605D-6, 12566.151699983D0, 2.438140634D0,
+ : 0.019476D-6, 213.299095438D0, 1.642186981D0,
+ : 0.016916D-6, 529.690965095D0, 4.510959344D0,
+ : 0.013374D-6, -3.523118349D0, 1.502210314D0,
+ : 0.008042D-6, 26.298319800D0, 0.478549024D0,
+ : 0.007824D-6, 155.420399434D0, 5.254710405D0,
+ : 0.004894D-6, 5746.271337896D0, 4.683210850D0,
+ : 0.004875D-6, 5760.498431898D0, 0.759507698D0,
+ : 0.004416D-6, 5223.693919802D0, 6.028853166D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=691,700) /
+ : 0.004088D-6, -7.113547001D0, 0.060926389D0,
+ : 0.004433D-6, 77713.771467920D0, 3.627734103D0,
+ : 0.003277D-6, 18849.227549974D0, 2.327912542D0,
+ : 0.002703D-6, 6062.663207553D0, 1.271941729D0,
+ : 0.003435D-6, -775.522611324D0, 0.747446224D0,
+ : 0.002618D-6, 6076.890301554D0, 3.633715689D0,
+ : 0.003146D-6, 206.185548437D0, 5.647874613D0,
+ : 0.002544D-6, 1577.343542448D0, 6.232904270D0,
+ : 0.002218D-6, -220.412642439D0, 1.309509946D0,
+ : 0.002197D-6, 5856.477659115D0, 2.407212349D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=701,710) /
+ : 0.002897D-6, 5753.384884897D0, 5.863842246D0,
+ : 0.001766D-6, 426.598190876D0, 0.754113147D0,
+ : 0.001738D-6, -796.298006816D0, 2.714942671D0,
+ : 0.001695D-6, 522.577418094D0, 2.629369842D0,
+ : 0.001584D-6, 5507.553238667D0, 1.341138229D0,
+ : 0.001503D-6, -242.728603974D0, 0.377699736D0,
+ : 0.001552D-6, -536.804512095D0, 2.904684667D0,
+ : 0.001370D-6, -398.149003408D0, 1.265599125D0,
+ : 0.001889D-6, -5573.142801634D0, 4.413514859D0,
+ : 0.001722D-6, 6069.776754553D0, 2.445966339D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=711,720) /
+ : 0.001124D-6, 1059.381930189D0, 5.041799657D0,
+ : 0.001258D-6, 553.569402842D0, 3.849557278D0,
+ : 0.000831D-6, 951.718406251D0, 2.471094709D0,
+ : 0.000767D-6, 4694.002954708D0, 5.363125422D0,
+ : 0.000756D-6, 1349.867409659D0, 1.046195744D0,
+ : 0.000775D-6, -11.045700264D0, 0.245548001D0,
+ : 0.000597D-6, 2146.165416475D0, 4.543268798D0,
+ : 0.000568D-6, 5216.580372801D0, 4.178853144D0,
+ : 0.000711D-6, 1748.016413067D0, 5.934271972D0,
+ : 0.000499D-6, 12036.460734888D0, 0.624434410D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=721,730) /
+ : 0.000671D-6, -1194.447010225D0, 4.136047594D0,
+ : 0.000488D-6, 5849.364112115D0, 2.209679987D0,
+ : 0.000621D-6, 6438.496249426D0, 4.518860804D0,
+ : 0.000495D-6, -6286.598968340D0, 1.868201275D0,
+ : 0.000456D-6, 5230.807466803D0, 1.271231591D0,
+ : 0.000451D-6, 5088.628839767D0, 0.084060889D0,
+ : 0.000435D-6, 5643.178563677D0, 3.324456609D0,
+ : 0.000387D-6, 10977.078804699D0, 4.052488477D0,
+ : 0.000547D-6, 161000.685737473D0, 2.841633844D0,
+ : 0.000522D-6, 3154.687084896D0, 2.171979966D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=731,740) /
+ : 0.000375D-6, 5486.777843175D0, 4.983027306D0,
+ : 0.000421D-6, 5863.591206116D0, 4.546432249D0,
+ : 0.000439D-6, 7084.896781115D0, 0.522967921D0,
+ : 0.000309D-6, 2544.314419883D0, 3.172606705D0,
+ : 0.000347D-6, 4690.479836359D0, 1.479586566D0,
+ : 0.000317D-6, 801.820931124D0, 3.553088096D0,
+ : 0.000262D-6, 419.484643875D0, 0.606635550D0,
+ : 0.000248D-6, 6836.645252834D0, 3.014082064D0,
+ : 0.000245D-6, -1592.596013633D0, 5.519526220D0,
+ : 0.000225D-6, 4292.330832950D0, 2.877956536D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=741,750) /
+ : 0.000214D-6, 7234.794256242D0, 1.605227587D0,
+ : 0.000205D-6, 5767.611978898D0, 0.625804796D0,
+ : 0.000180D-6, 10447.387839604D0, 3.499954526D0,
+ : 0.000229D-6, 199.072001436D0, 5.632304604D0,
+ : 0.000214D-6, 639.897286314D0, 5.960227667D0,
+ : 0.000175D-6, -433.711737877D0, 2.162417992D0,
+ : 0.000209D-6, 515.463871093D0, 2.322150893D0,
+ : 0.000173D-6, 6040.347246017D0, 2.556183691D0,
+ : 0.000184D-6, 6309.374169791D0, 4.732296790D0,
+ : 0.000227D-6, 149854.400134205D0, 5.385812217D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=751,760) /
+ : 0.000154D-6, 8031.092263058D0, 5.120720920D0,
+ : 0.000151D-6, 5739.157790895D0, 4.815000443D0,
+ : 0.000197D-6, 7632.943259650D0, 0.222827271D0,
+ : 0.000197D-6, 74.781598567D0, 3.910456770D0,
+ : 0.000138D-6, 6055.549660552D0, 1.397484253D0,
+ : 0.000149D-6, -6127.655450557D0, 5.333727496D0,
+ : 0.000137D-6, 3894.181829542D0, 4.281749907D0,
+ : 0.000135D-6, 9437.762934887D0, 5.979971885D0,
+ : 0.000139D-6, -2352.866153772D0, 4.715630782D0,
+ : 0.000142D-6, 6812.766815086D0, 0.513330157D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=761,770) /
+ : 0.000120D-6, -4705.732307544D0, 0.194160689D0,
+ : 0.000131D-6, -71430.695617928D0, 0.000379226D0,
+ : 0.000124D-6, 6279.552731642D0, 2.122264908D0,
+ : 0.000108D-6, -6256.777530192D0, 0.883445696D0,
+ : 0.143388D-6, 6283.075849991D0, 1.131453581D0,
+ : 0.006671D-6, 12566.151699983D0, 0.775148887D0,
+ : 0.001480D-6, 155.420399434D0, 0.480016880D0,
+ : 0.000934D-6, 213.299095438D0, 6.144453084D0,
+ : 0.000795D-6, 529.690965095D0, 2.941595619D0,
+ : 0.000673D-6, 5746.271337896D0, 0.120415406D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=771,780) /
+ : 0.000672D-6, 5760.498431898D0, 5.317009738D0,
+ : 0.000389D-6, -220.412642439D0, 3.090323467D0,
+ : 0.000373D-6, 6062.663207553D0, 3.003551964D0,
+ : 0.000360D-6, 6076.890301554D0, 1.918913041D0,
+ : 0.000316D-6, -21.340641002D0, 5.545798121D0,
+ : 0.000315D-6, -242.728603974D0, 1.884932563D0,
+ : 0.000278D-6, 206.185548437D0, 1.266254859D0,
+ : 0.000238D-6, -536.804512095D0, 4.532664830D0,
+ : 0.000185D-6, 522.577418094D0, 4.578313856D0,
+ : 0.000245D-6, 18849.227549974D0, 0.587467082D0 /
+ DATA ((FAIRHD(I,J),I=1,3),J=781,787) /
+ : 0.000180D-6, 426.598190876D0, 5.151178553D0,
+ : 0.000200D-6, 553.569402842D0, 5.355983739D0,
+ : 0.000141D-6, 5223.693919802D0, 1.336556009D0,
+ : 0.000104D-6, 5856.477659115D0, 4.239842759D0,
+ : 0.003826D-6, 6283.075849991D0, 5.705257275D0,
+ : 0.000303D-6, 12566.151699983D0, 5.407132842D0,
+ : 0.000209D-6, 155.420399434D0, 1.989815753D0 /
+* -----------------------------------------------------------------------
+
+
+
+* Time since J2000.0 in Julian millennia
+ T=(TDB-51544.5D0)/365250D0
+
+* -------------------- Topocentric terms -------------------------------
+
+* Convert UT1 to local solar time in radians
+ TSOL = MOD(UT1,1D0)*D2PI - WL
+
+* Planetary arguments: taken or derived from Bretagnon 1982
+
+* RLp = mean longitude, mean equinox of date
+* RGp = mean anomaly
+* RTp = mean longitude difference, EMB minus planet
+
+* EMB
+ RLE = MOD (1.75347031435D0 + 6283.3196666635D0 * T, D2PI)
+ RGE = MOD (6.24005997418D0 + 6283.0195512850D0 * T, D2PI)
+* Jupiter
+ RTJ = MOD (1.15392381696D0 + 5753.3848591241D0 * T, D2PI)
+* Saturn
+ RTS = MOD (0.87945355785D0 + 6069.7767103654D0 * T, D2PI)
+
+* Lunar mean elongation: derived from Meeus 1984.
+ RDMOON = MOD (5.198468D0 + 77713.77144D0 * T, D2PI)
+
+* Topocentric terms (Moyer 1981 and Murray 1983)
+ WT = + 0.00029D-10 * U * SIN (TSOL+RTS)
+ : + 0.00100D-10 * U * SIN (TSOL-2D0*RGE)
+ : + 0.00133D-10 * U * SIN (TSOL-RDMOON)
+ : + 0.00133D-10 * U * SIN (TSOL+RTJ)
+ : - 0.00229D-10 * U * SIN (TSOL+2D0*RLE+RGE)
+ : - 0.0220 D-10 * V * SIN (RLE+RGE)
+ : + 0.05312D-10 * U * SIN (TSOL-RGE)
+ : - 0.13677D-10 * U * SIN (TSOL+2D0*RLE)
+ : - 1.3184 D-10 * V * COS (RLE)
+ : + 3.17679D-10 * U * SIN (TSOL)
+
+* --------------- Fairhead model ---------------------------------------
+
+* T**0
+ W0=0D0
+ DO I=474,1,-1
+ W0=W0+FAIRHD(1,I)*SIN(FAIRHD(2,I)*T+FAIRHD(3,I))
+ END DO
+
+* T**1
+ W1=0D0
+ DO I=679,475,-1
+ W1=W1+FAIRHD(1,I)*SIN(FAIRHD(2,I)*T+FAIRHD(3,I))
+ END DO
+
+* T**2
+ W2=0D0
+ DO I=764,680,-1
+ W2=W2+FAIRHD(1,I)*SIN(FAIRHD(2,I)*T+FAIRHD(3,I))
+ END DO
+
+* T**3
+ W3=0D0
+ DO I=784,765,-1
+ W3=W3+FAIRHD(1,I)*SIN(FAIRHD(2,I)*T+FAIRHD(3,I))
+ END DO
+
+* T**4
+ W4=0D0
+ DO I=787,785,-1
+ W4=W4+FAIRHD(1,I)*SIN(FAIRHD(2,I)*T+FAIRHD(3,I))
+ END DO
+
+* Multiply by powers of T and combine
+ WF=T*(T*(T*(T*W4+W3)+W2)+W1)+W0
+
+* Adjustments to use JPL planetary masses instead of IAU
+ WJ= 0.00065D-6 * SIN( 6069.776754D0 *T + 4.021194D0 ) +
+ : 0.00033D-6 * SIN( 213.299095D0 *T + 5.543132D0 ) +
+ : (-0.00196D-6 * SIN( 6208.294251D0 *T + 5.696701D0 ))+
+ : (-0.00173D-6 * SIN( 74.781599D0 *T + 2.435900D0 ))+
+ : 0.03638D-6*T*T
+
+* -----------------------------------------------------------------------
+
+* Final result: TDB-TT in seconds
+ sla_RCC=WT+WF+WJ
+
+ END
diff --git a/src/slalib/rdplan.f b/src/slalib/rdplan.f
new file mode 100644
index 0000000..e00ec1d
--- /dev/null
+++ b/src/slalib/rdplan.f
@@ -0,0 +1,183 @@
+ SUBROUTINE sla_RDPLAN (DATE, NP, ELONG, PHI, RA, DEC, DIAM)
+*+
+* - - - - - - -
+* R D P L A N
+* - - - - - - -
+*
+* Approximate topocentric apparent RA,Dec of a planet, and its
+* angular diameter.
+*
+* Given:
+* DATE d MJD of observation (JD - 2400000.5)
+* NP i planet: 1 = Mercury
+* 2 = Venus
+* 3 = Moon
+* 4 = Mars
+* 5 = Jupiter
+* 6 = Saturn
+* 7 = Uranus
+* 8 = Neptune
+* 9 = Pluto
+* else = Sun
+* ELONG,PHI d observer's east longitude and geodetic
+* latitude (radians)
+*
+* Returned:
+* RA,DEC d RA, Dec (topocentric apparent, radians)
+* DIAM d angular diameter (equatorial, radians)
+*
+* Notes:
+*
+* 1 The date is in a dynamical timescale (TDB, formerly ET) and is
+* in the form of a Modified Julian Date (JD-2400000.5). For all
+* practical purposes, TT can be used instead of TDB, and for many
+* applications UT will do (except for the Moon).
+*
+* 2 The longitude and latitude allow correction for geocentric
+* parallax. This is a major effect for the Moon, but in the
+* context of the limited accuracy of the present routine its
+* effect on planetary positions is small (negligible for the
+* outer planets). Geocentric positions can be generated by
+* appropriate use of the routines sla_DMOON and sla_PLANET.
+*
+* 3 The direction accuracy (arcsec, 1000-3000AD) is of order:
+*
+* Sun 5
+* Mercury 2
+* Venus 10
+* Moon 30
+* Mars 50
+* Jupiter 90
+* Saturn 90
+* Uranus 90
+* Neptune 10
+* Pluto 1 (1885-2099AD only)
+*
+* The angular diameter accuracy is about 0.4% for the Moon,
+* and 0.01% or better for the Sun and planets.
+*
+* See the sla_PLANET routine for references.
+*
+* Called: sla_GMST, sla_DT, sla_EPJ, sla_DMOON, sla_PVOBS, sla_PRENUT,
+* sla_PLANET, sla_DMXV, sla_DCC2S, sla_DRANRM
+*
+* P.T.Wallace Starlink 26 May 1997
+*
+* Copyright (C) 1997 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION DATE
+ INTEGER NP
+ DOUBLE PRECISION ELONG,PHI,RA,DEC,DIAM
+
+* AU in km
+ DOUBLE PRECISION AUKM
+ PARAMETER (AUKM=1.49597870D8)
+
+* Light time for unit distance (sec)
+ DOUBLE PRECISION TAU
+ PARAMETER (TAU=499.004782D0)
+
+ INTEGER IP,J,I
+ DOUBLE PRECISION EQRAU(0:9),STL,VGM(6),V(6),RMAT(3,3),
+ : VSE(6),VSG(6),VSP(6),VGO(6),DX,DY,DZ,R,TL
+ DOUBLE PRECISION sla_GMST,sla_DT,sla_EPJ,sla_DRANRM
+
+* Equatorial radii (km)
+ DATA EQRAU / 696000D0,2439.7D0,6051.9D0,1738D0,3397D0,71492D0,
+ : 60268D0,25559D0,24764D0,1151D0 /
+
+
+
+* Classify NP
+ IP=NP
+ IF (IP.LT.0.OR.IP.GT.9) IP=0
+
+* Approximate local ST
+ STL=sla_GMST(DATE-sla_DT(sla_EPJ(DATE))/86400D0)+ELONG
+
+* Geocentre to Moon (mean of date)
+ CALL sla_DMOON(DATE,V)
+
+* Nutation to true of date
+ CALL sla_NUT(DATE,RMAT)
+ CALL sla_DMXV(RMAT,V,VGM)
+ CALL sla_DMXV(RMAT,V(4),VGM(4))
+
+* Moon?
+ IF (IP.EQ.3) THEN
+
+* Yes: geocentre to Moon (true of date)
+ DO I=1,6
+ V(I)=VGM(I)
+ END DO
+ ELSE
+
+* No: precession/nutation matrix, J2000 to date
+ CALL sla_PRENUT(2000D0,DATE,RMAT)
+
+* Sun to Earth-Moon Barycentre (J2000)
+ CALL sla_PLANET(DATE,3,V,J)
+
+* Precession and nutation to date
+ CALL sla_DMXV(RMAT,V,VSE)
+ CALL sla_DMXV(RMAT,V(4),VSE(4))
+
+* Sun to geocentre (true of date)
+ DO I=1,6
+ VSG(I)=VSE(I)-0.012150581D0*VGM(I)
+ END DO
+
+* Sun?
+ IF (IP.EQ.0) THEN
+
+* Yes: geocentre to Sun
+ DO I=1,6
+ V(I)=-VSG(I)
+ END DO
+ ELSE
+
+* No: Sun to Planet (J2000)
+ CALL sla_PLANET(DATE,IP,V,J)
+
+* Precession and nutation to date
+ CALL sla_DMXV(RMAT,V,VSP)
+ CALL sla_DMXV(RMAT,V(4),VSP(4))
+
+* Geocentre to planet
+ DO I=1,6
+ V(I)=VSP(I)-VSG(I)
+ END DO
+ END IF
+ END IF
+
+* Refer to origin at the observer
+ CALL sla_PVOBS(PHI,0D0,STL,VGO)
+ DO I=1,6
+ V(I)=V(I)-VGO(I)
+ END DO
+
+* Geometric distance (AU)
+ DX=V(1)
+ DY=V(2)
+ DZ=V(3)
+ R=SQRT(DX*DX+DY*DY+DZ*DZ)
+
+* Light time (sec)
+ TL=TAU*R
+
+* Correct position for planetary aberration
+ DO I=1,3
+ V(I)=V(I)-TL*V(I+3)
+ END DO
+
+* To RA,Dec
+ CALL sla_DCC2S(V,RA,DEC)
+ RA=sla_DRANRM(RA)
+
+* Angular diameter (radians)
+ DIAM=2D0*ASIN(EQRAU(IP)/(R*AUKM))
+
+ END
diff --git a/src/slalib/read.me b/src/slalib/read.me
new file mode 100644
index 0000000..bfa92ba
--- /dev/null
+++ b/src/slalib/read.me
@@ -0,0 +1,441 @@
+READ.ME
+
+Revision date 17 August 1999 SLALIB Version 2.4-0
+
+-----------------------------------------------------------------------
+
+FILES IN THE ORIGINAL SOURCE DIRECTORY (VAX)
+
+ READ.ME this file
+ *.FOR Fortran source (separate modules)
+ *.OBS ditto, but obsolete routines
+ *.NEW ditto, but new and not yet ready for release
+ *.VAX Fortran source for VAX/VMS
+ *.CNVX Fortran source for Convex
+ *.MIPS Fortran source for DECstation
+ *.SUN4 Fortran source for Sun SPARCstation
+ *.LNX Fortran source for Linux
+ *.PCM Microsoft Fortran source for PC
+ *.C C functions needed for Linux version
+ PC.BAT rebuilds PC version
+ REP.BAT on PC, compiles one module and updates library
+ CREATE.COM complete rebuild of VAX and Unix releases
+ PUT.COM compile one module and update libraries
+ VAX_TO_UNIX.USH script to complete transfer to Unix platforms
+ SLA.NEWS NEWS item for latest release
+ MAKEFILE Unix make file
+ MK C-shell script to run make
+ SUN67.TEX document
+
+FILES IN [.RELEASE] DIRECTORY ON VAX
+
+ SLALIB.OLB object library
+ SLALIB.TLB source library
+ SUN67.TEX document
+
+FILES IN [.UNIX] DIRECTORY ON VAX
+
+ MAKEFILE make file for DECstation and Sun SPARC
+ MK C-shell script to run make
+ SLA.A archive file containing everything else
+ VAX_TO_UNIX script to complete transfer to Unix platforms
+ SLA.NEWS NEWS item for latest release
+ SUN67.TEX document
+
+FILES IN (INFORMAL) FTP DIRECTORIES
+
+ The files distributed informally through anonymous FTP may differ
+ slightly in both content and name from the ones listed above. For
+ example the PC Fortran modules may be stored in archive files and
+ called xxx.f_pcm rather than XXX.PCM etc.
+
+-----------------------------------------------------------------------
+
+DISTRIBUTION - THIS DIRECTORY
+
+ Nothing from this directory needs to be distributed.
+
+DISTRIBUTION - [.RELEASE] DIRECTORY
+
+ SLALIB.* SLALIB_DIR
+ SLA.NEWS SLALIB_DIR
+ SUN67.TEX DOCSDIR
+
+INSTRUCTIONS FOR SAVING SPACE
+
+ Extract from the SLALIB_DIR BACKUP save set only the file SLALIB.OLB.
+
+-----------------------------------------------------------------------
+
+PORTING FORTRAN SLALIB TO OTHER SYSTEMS
+
+FORTRAN SLALIB runs on VAX (VMS), PC (Linux+f2c), PC (Microsoft FORTRAN),
+Convex (ConvexOS), DECstation (Ultrix), DEC Alpha (OSF-1) and Sun
+SPARCstation (SunOS and Solaris).
+
+For most platforms, the required changes are confined to these routines:
+
+ sla_GRESID
+ sla_RANDOM
+ sla_WAIT
+
+VAX, CONVEX, DECSTATION/ALPHA, SUN & PC
+
+Versions suitable for the above platforms are supplied in the
+development directory as *.VAX, *,CNVX, *.MIPS, *.SUN4, *.PCM and
+*.LNX respectively.
+
+
+-----------------------------------------------------------------------
+
+LATEST RELEASE INFORMATION
+
+The latest release of SLALIB includes the following changes (most recent
+at the end):
+
+* In sla_RCC, the topocentric term of coefficient 1.3184D-10 sec
+ had the wrong sign. Minus is correct.
+
+* The IAU decided in 1991 to rename the Terrestrial Dynamical
+ Time, TDT, which is now called "Terrestrial Time" or TT.
+ Appropriate changes have been made in the SLALIB documentation.
+ The same IAU resolutions introduced the timescales TCG and TCB;
+ there are at present no SLALIB routines to handle these new
+ timescales.
+
+* The Keck 1 Telescope has been added to sla_OBS.
+
+* The handling of the random-number seed in the PC versions of
+ sla_RANDOM and sla_GRESID was flawed and has been improved.
+
+* The UTC leap second at the end of June 1993 has been added to the
+ routine sla_DAT. Existing applications which call sla_DAT or
+ sla_DTT require relinking.
+
+* Some unnecessary code in sla_AMPQK has been removed.
+
+* Minor reorganization of the sla_REFRO code has led to an improvement
+ in speed of about 20%, and precautions have been taken against
+ potential arithmetic errors.
+
+* There have been small revisions to sla_FK425 and sla_FK524. The
+ results are not significantly affected, except in the pathological
+ case of large proper motion combined with immense distance, where
+ sla_FK524 could produce erroneous radial velocity values. The
+ latest versions are close to the algorithms published in the 1992
+ Explanatory Supplement to the Astronomical Almanac.
+
+* The leap second at the end of June 1994 has been added to sla_DAT.
+
+* THE SLA_RVLSR ROUTINE HAS BEEN RETIRED. Its place has been taken
+ by two new routines: sla_RVLSRK and sla_RVLSRD. The original
+ sla_RVLSR had used a "kinematical" LSR. When this was later changed
+ to a "dynamical" LSR for (what seemed liked good reasons at the time),
+ the small differences were noticed by spectral-line radio observers,
+ who had to fall back on old copies of the routine to remain consistent
+ with existing practice. The new routines provide both sorts of LSR:
+ sla_RVLSRK uses a kinematical LSR and sla_RVLSRD uses the dynamical LSR.
+
+* The sla_PA routine (computation of parallactic angle) used an
+ unnecessarily complicated formulation, which has been simplified.
+ The results are unaffected.
+
+* The sla_ZD routine (computation of zenith distance) used a
+ straightforward cosine-formula-based method, which suffered from
+ decreased accuracy near the zenith. A better, vector-derived,
+ formulation has been substituted, without materially affecting
+ the results. Because sla_ZD is double precision, the old
+ formulation was always adequate; however, had anyone transcribed
+ the code in single precision errors approaching 1 arcmin could
+ have resulted. The new formulation delivers good results all
+ over the sky even in a single precision version.
+
+* Routines have been added to transform equatorial coordinates
+ (HA,Dec) to horizon coordinates (Az,El) and back. Single and
+ double precision are both supported. The routines are called
+ sla_E2H, sla_DE2H, sla_H2E, sla_DH2E.
+
+* A new routine has been added to the tangent-plane projection set.
+ The single and double precision versions are called sla_TPRD and
+ sla_DTPRD respectively. Given the RA,Dec of a star and its
+ xi,eta coordinates, the routine determines the "plate centre".
+
+* The existing routine sla_PREC for obtaining the precession matrix
+ uses the official IAU model and should continue to be used for
+ canonical purposes. A new version, called sla_PRECL, uses a
+ more up-to-date model which delivers better accuracy, especially
+ over intervals of millennia.
+
+* The routine sla_PVOBS was returning velocities in AU per sidereal
+ second rather than per UT second. This has been corrected. The
+ maximum error was equivalent to about 0.001 km/s.
+
+* In sla_MAPQK and sla_MAPQKZ, the area within which the gravitional
+ light-deflection term is restrained has been extended from its
+ original 300 arcsec radius to about 920 arcsec, just inside the
+ Sun's disc.
+
+* A chapter of explanation, with examples, has been added to SUN/67,
+ which has also undergone various cosmetic revisions.
+
+* There were two discrepancies between the documentation of sla_DCMPF
+ (program comments and SUN/67) and the code. The first was that the
+ formulae for the nonperpendicularity used PERP instead of PERP/2;
+ the documentation has been corrected. The other was that the
+ documentation showed the zero point corrections being applied first,
+ whereas the code returned zero point corrections corresponding to
+ being applied last. The code has been corrected to match the
+ documentation.
+
+* The C module slaCldj gave incorrect answers for dates during
+ January and February. The error, which did not affect the Fortran
+ version, has been corrected.
+
+* THE CALLS FOR sla_TPRD AND sla_DTPRD HAS BEEN CHANGED. An integer
+ status argument has been added; non-zero means the supplied RA,Dec
+ and Xi,Eta describe an impossible case. (This can only happen
+ near the pole and with non-zero Xi.) Also, a slightly neater
+ formulation has been introduced.
+
+* Three new routines have been added. sla_ALTAZ takes a star's HA,Dec
+ and produces position, velocity and acceleration for azimuth,
+ elevation and parallactic angle. sla_PDA2H predicts the HA at which
+ a given azimuth will be reached. sla_PDQ2H does the same for
+ position angle.
+
+* In the sla_OBS routine, the wrong sign was returned for the Perkins
+ 72 inch telescope at Lowell - fixed.
+
+* A revised model for the equation of the equinoxes has been
+ installed in sla_EQEQX, in line with recent IAU resolutions. The
+ change amounts to less than 3 mas.
+
+* A bug in sla_DFLTIN has been corrected. A negative number following
+ an E- or D-format number without intervening spaces lost its sign.
+
+* Four stations have been added to sla_OBS:
+
+ TAUTENBERG Tautenberg 1.34 metre Schmidt
+ PALOMAR48 Palomar 48-inch Schmidt
+ UKST UK 1.2 metre Schmidt, Siding Spring
+ KISO Kiso 1.05 metre Schmidt, Japan
+ ESOSCHMIDT ESO 1 metre Schmidt, La Silla
+
+* The sla_EARTH and sla_MOON routines could give an integer divide by zero
+ for years before 1 BC. This has been corrected.
+
+* sla_CALYD (provided to support the sla_EARTH and sla_MOON routines)
+ has been upgraded to work outside the interval 1900 March 1 to
+ 2100 February 28. The status value indicating dates outside that
+ range has been dropped; a new error value for year before -4711
+ has been introduced.
+
+* A new routine, sla_CLYD, has been added. It is a version of sla_CALYD
+ without the century-default feature and is to enable 1st-century
+ dates to be supplied to sla_EARTH and sla_MOON.
+
+* Two new routines, sla_PLANET and sla_RDPLAN, have been added, which
+ compute approximate planetary ephemerides.
+
+* A new routine, sla_DMOON, implements the same (Meeus) model as the
+ sla_MOON routine, but in full and in double precision. The time
+ argument is a straightforward MJD rather than sla_MOON's year and
+ day-in-year.
+
+* The sla_REFRO code has been speeded up by a factor of two (and is
+ also clearer).
+
+* sla_REFV and sla_REFZ have, in different ways, been made more accurate
+ for cases close to the horizon. The improvement to sla_REFV is
+ relatively modest, but sla_REFZ is now capable of delivering useful
+ results for rise/set phenomena.
+
+* sla_AOPQK has been speeded up for low-elevation cases.
+
+* Versions of the tangent-plane routines working directly in x,y,z
+ instead of spherical coordinates have been added. They may be
+ faster in some applications. The routines are sla_DV2TP, sla_V2TP,
+ sla_DTP2V, sla_TP2V, sla_DTPXYZ, sla_TPXYZ.
+
+* The coordinates of the Australia Telescope Compact Array have been
+ added to sla_OBS. The name is 'ATCA'.
+
+* Despite their recent introduction THE ROUTINES sla_DTPRD, sla_DTPXYZ,
+ sla_TPRD AND sla_TPXYZ HAVE BEEN WITHDRAWN. They have been replaced
+ by the new routines sla_DTPS2C, sla_DTPV2C, sla_TPS2C and sla_TPV2C.
+ These are functionally equivalent to the earlier routines but return
+ two solutions instead of one: the second solution can arise near a
+ pole.
+
+* The UTC leap second at the end of 1995 has been added to sla_DAT.
+
+* The refraction routine sla_REFRO has been extensively revised. The
+ principal motivation was to improve the radio predictions by
+ introducing better humidity models. The models previously in
+ use had been entirely adequate for the optical case, for which
+ they had been devised, but improved models were required for
+ the radio case. None of the changes significantly affects the
+ optical results with respect to the earlier version of the sla_REFRO
+ routine. For example, at 70 deg zenith distance the new version
+ agrees with the old version to better than 0.05 arcsec for any
+ reasonable combination of parameters. However, the improved
+ water-vapour expressions do make a significant difference in the
+ radio band, at 70 deg zenith distance reaching almost 4 arcsec
+ for a hot, humid, low-altitude site during a period of low pressure.
+
+* There was a bug in slaRdplan, the (private) C version of sla_RDPLAN.
+ The answers were unaffected but there could be floating-point
+ problems on some platforms.
+
+* A new routine has been added, sla_GMSTA. This gives greater numerical
+ precision than the existing GMST function by allowing the date and
+ time to be specified separately rather than as a single MJD.
+
+* Measures taken in sla_MAPQK to avoid trouble when processing Solar
+ positions had not been carried through into sla_MAPQKZ. The two
+ routines now use the same strategy.
+
+* In sla_REFRO, at zenith distances well beyond 90 deg and under some
+ conditions, it was possible to encounter arithmetic errors due to
+ failure of the tropospheric model-atmosphere to deliver sensible
+ temperatures. This is inherent in the published algorithm. To
+ avoid the problem, the temperature delivered by the model has been
+ constrained to the range 200 to 320 deg K.
+
+* A new routine has been added, sla_ATMDSP, for rapidly recalculating
+ the A,B refraction coefficients for different wavelengths.
+
+* The first UTC leap-second date in the sla_DAT routine was one day early.
+ This will have had no effect on the results for more recent epochs.
+
+* slaObs, the C version of sla_OBS, had some problems related to character
+ string handling. A call using the "number" option retured an invalid
+ station ID, and station ID and name strings of the stipulated 10
+ and 40 character lengths were improperly terminated.
+
+* A new routine, sla_POLMO has been added. This is a specialist tool
+ to do with Earth polar motion.
+
+* sla_DC62S and sla_CC62S could give floating point errors if vectors in
+ unlikely units were supplied. The handling of difficult cases has
+ been improved.
+
+* Support for Linux has been added.
+
+* slaRefreo, the C version of sla_REFRO, was not re-entrant. It is now;
+ there has been a small (4%) speed penalty.
+
+* The C routines slaRandom, slaGresid and slaWait have been dropped.
+ They could not easily be made re-entrant and posed perennial platform-
+ dependency problems.
+
+* The value for the arcsec to radians factor in several routines
+ had an incorrect (and superfluous) 19th digit, which has been
+ removed.
+
+* There was a minor bug in sla_DV2TP and sla_V2TP, to do with protection
+ against the special case where the tangent point is the pole.
+
+* In sla_OBS, the position of the Parkes radiotelescope has been revised,
+ and the ATNF Mopra observatory has been added.
+
+* Two new routines have been added. sla_PAV (single precision) and
+ sla_DPAV (double precision) are like sla_BEAR and sla_DBEAR but start
+ with direction cosines rather than spherical coordinates - they return
+ the position angle of one point with respect to the other.
+
+* slaRefro, the C version of sla_REFRO, still wasn't re-entrant, but is
+ now.
+
+* slaDtf2d, the C version of sla_DTF2D, used to accept 60.0 in the seconds
+ field; this has been corrected.
+
+* The sla_PLANET and sla_RDPLAN routines now include Pluto. The ephemeris
+ is accurate (sub-arcsecond) but covers the 20th and 21st centuries
+ only.
+
+ !!! IMPORTANT NOTE !!!
+
+ sla_RDPLAN used to interpret any planet number outside the range 1-8
+ as meaning the Sun. The new version uses planet number 9. Existing
+ programs using 9 for the Sun should be changed to use 0. The rule
+ has not been changed, except that the range is now 1-9 instead of
+ 1-8, as it is unlikely that the equivalent problem will arise in the
+ future.
+
+* Two new routines have been added, sla_PLANEL and sla_PLANTE. They are
+ analogues of sla_PLANET and sla_RDPLAN but for the case where orbital
+ elements are available. They can be used for predicting the
+ positions of asteroids and comets, and, if up-to-date osculating
+ elements are supplied, more accurate positions for the major
+ planets than can be provided through the sla_PLANET and sla_RDPLAN
+ routines.
+
+* The sla_REFRO routine could give inaccurate results for low temperatures
+ (subzero C). This was caused by over-cautious defensive programming,
+ which prevented the tropospheric temperature falling below 200 K.
+
+* A new routine has been added, sla_REFCOQ. This calculates the coefficients
+ of a two-term refraction model. It complements the existing sla_REFCO
+ routine, being much faster at the expense of some accuracy.
+
+* The 1997 July 1 UTC leap second has been added to the sla_DAT routine.
+
+* A bug in slaSvd, the C version of sla_SVD, caused occasional false
+ indications of ill-conditioning. The results of least-squares
+ fits do not seem to have been affected. The Fortran version did not
+ have the bug.
+
+* The Subaru telescope (Japanese National 8-metre telescope, Mauna Kea)
+ has been added to the sla_OBS routine.
+
+* The sla_DAT routine has been extended back to the inception of UTC in
+ 1960.
+
+* The "earliest date possible" in DJCL sla_was two days out (disagreeing
+ with sla_DJCAL, which had the correct value).
+
+* The sla_GMSTA code has been improved.
+
+* A new routine, sla_PV2EL, takes a heliocentric J2000 equatorial position
+ and velocity and produces the equivalent set of osculating elements.
+
+* The 1999 January 1 UTC leap second has been added to the sla_DAT routine.
+
+* Four new routines have been introduced which transform between the
+ FK5 system and the ICRS (Hipparcos) system. sla_FK52H and sla_H2FK5
+ transform star positions and proper motions from FK5 coordinates to
+ Hipparcos coordinates and vice versa. sla_FK5HZ and sla_HFK5Z do the
+ same but for the case where the Hipparcos proper motions are zero.
+
+* Six new routines have been introduced for dealing with orbital elements.
+ Four of them (sla_EL2UE, sla_PV2UE, sla_UE2EL and sla_UE2PV) provide
+ applications with direct access to the "universal variables" method
+ that was already being used internally. Compared with using conventional
+ (angular) elements and solving Kepler's equation, the universal variables
+ approach has a number of advantages, including better handling of near-
+ parabolic orbits and greater efficiency. The remaining two routines
+ (sla_PERTEL and sla_PERTUE) generate updated elements by applying
+ major-planet perturbations. The new elements can then be used to
+ predict positions that are much more accurate. For minor planets,
+ sub-arcsecond accuracy over a decade is achievable.
+
+* Several observatory sites have been added to the OBS routine: CFHT,
+ Keck 2, Gemini North, FCRAO, IRTF and CSO. The coordinates for all
+ the Mauna Kea sites have been updated in accordance with recent aerial
+ photography results made available by the Institute for Astronomy,
+ University of Hawaii.
+
+* A bug in sla_DAT has been corrected. It used to give incorrect
+ results for dates in the first 54 days of 1972.
+
+* There are new routines for generating permutations (sla_PERMUT) and
+ combinations (sla_COMBN).
+
+-----------------------------------------------------------------------
+
+
+ P.T.Wallace
+
+ ptw@star.rl.ac.uk
+ +44-1235-44-5372
diff --git a/src/slalib/refco.f b/src/slalib/refco.f
new file mode 100644
index 0000000..3bc8816
--- /dev/null
+++ b/src/slalib/refco.f
@@ -0,0 +1,70 @@
+ SUBROUTINE sla_REFCO (HM, TDK, PMB, RH, WL, PHI, TLR, EPS,
+ : REFA, REFB)
+*+
+* - - - - - -
+* R E F C O
+* - - - - - -
+*
+* Determine the constants A and B in the atmospheric refraction
+* model dZ = A tan Z + B tan**3 Z.
+*
+* Z is the "observed" zenith distance (i.e. affected by refraction)
+* and dZ is what to add to Z to give the "topocentric" (i.e. in vacuo)
+* zenith distance.
+*
+* Given:
+* HM d height of the observer above sea level (metre)
+* TDK d ambient temperature at the observer (deg K)
+* PMB d pressure at the observer (millibar)
+* RH d relative humidity at the observer (range 0-1)
+* WL d effective wavelength of the source (micrometre)
+* PHI d latitude of the observer (radian, astronomical)
+* TLR d temperature lapse rate in the troposphere (degK/metre)
+* EPS d precision required to terminate iteration (radian)
+*
+* Returned:
+* REFA d tan Z coefficient (radian)
+* REFB d tan**3 Z coefficient (radian)
+*
+* Called: sla_REFRO
+*
+* Notes:
+*
+* 1 Typical values for the TLR and EPS arguments might be 0.0065D0 and
+* 1D-10 respectively.
+*
+* 2 The radio refraction is chosen by specifying WL > 100 micrometres.
+*
+* 3 The routine is a slower but more accurate alternative to the
+* sla_REFCOQ routine. The constants it produces give perfect
+* agreement with sla_REFRO at zenith distances arctan(1) (45 deg)
+* and arctan(4) (about 76 deg). It achieves 0.5 arcsec accuracy
+* for ZD < 80 deg, 0.01 arcsec accuracy for ZD < 60 deg, and
+* 0.001 arcsec accuracy for ZD < 45 deg.
+*
+* P.T.Wallace Starlink 3 June 1997
+*
+* Copyright (C) 1997 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION HM,TDK,PMB,RH,WL,PHI,TLR,EPS,REFA,REFB
+
+ DOUBLE PRECISION ATN1,ATN4,R1,R2
+
+* Sample zenith distances: arctan(1) and arctan(4)
+ PARAMETER (ATN1=0.7853981633974483D0,
+ : ATN4=1.325817663668033D0)
+
+
+
+* Determine refraction for the two sample zenith distances
+ CALL sla_REFRO(ATN1,HM,TDK,PMB,RH,WL,PHI,TLR,EPS,R1)
+ CALL sla_REFRO(ATN4,HM,TDK,PMB,RH,WL,PHI,TLR,EPS,R2)
+
+* Solve for refraction constants
+ REFA = (64D0*R1-R2)/60D0
+ REFB = (R2-4D0*R1)/60D0
+
+ END
diff --git a/src/slalib/refcoq.f b/src/slalib/refcoq.f
new file mode 100644
index 0000000..15e3af0
--- /dev/null
+++ b/src/slalib/refcoq.f
@@ -0,0 +1,208 @@
+ SUBROUTINE sla_REFCOQ (TDK, PMB, RH, WL, REFA, REFB)
+*+
+* - - - - - - -
+* R E F C O Q
+* - - - - - - -
+*
+* Determine the constants A and B in the atmospheric refraction
+* model dZ = A tan Z + B tan**3 Z. This is a fast alternative
+* to the sla_REFCO routine - see notes.
+*
+* Z is the "observed" zenith distance (i.e. affected by refraction)
+* and dZ is what to add to Z to give the "topocentric" (i.e. in vacuo)
+* zenith distance.
+*
+* Given:
+* TDK d ambient temperature at the observer (deg K)
+* PMB d pressure at the observer (millibar)
+* RH d relative humidity at the observer (range 0-1)
+* WL d effective wavelength of the source (micrometre)
+*
+* Returned:
+* REFA d tan Z coefficient (radian)
+* REFB d tan**3 Z coefficient (radian)
+*
+* The radio refraction is chosen by specifying WL > 100 micrometres.
+*
+* Notes:
+*
+* 1 The model is an approximation, for moderate zenith distances,
+* to the predictions of the sla_REFRO routine. The approximation
+* is maintained across a range of conditions, and applies to
+* both optical/IR and radio.
+*
+* 2 The algorithm is a fast alternative to the sla_REFCO routine.
+* The latter calls the sla_REFRO routine itself: this involves
+* integrations through a model atmosphere, and is costly in
+* processor time. However, the model which is produced is precisely
+* correct for two zenith distance (45 degrees and about 76 degrees)
+* and at other zenith distances is limited in accuracy only by the
+* A tan Z + B tan**3 Z formulation itself. The present routine
+* is not as accurate, though it satisfies most practical
+* requirements.
+*
+* 3 The model omits the effects of (i) height above sea level (apart
+* from the reduced pressure itself), (ii) latitude (i.e. the
+* flattening of the Earth) and (iii) variations in tropospheric
+* lapse rate.
+*
+* The model was tested using the following range of conditions:
+*
+* lapse rates 0.0055, 0.0065, 0.0075 deg/metre
+* latitudes 0, 25, 50, 75 degrees
+* heights 0, 2500, 5000 metres ASL
+* pressures mean for height -10% to +5% in steps of 5%
+* temperatures -10 deg to +20 deg with respect to 280 deg at SL
+* relative humidity 0, 0.5, 1
+* wavelengths 0.4, 0.6, ... 2 micron, + radio
+* zenith distances 15, 45, 75 degrees
+*
+* The accuracy with respect to direct use of the sla_REFRO routine
+* was as follows:
+*
+* worst RMS
+*
+* optical/IR 62 mas 8 mas
+* radio 319 mas 49 mas
+*
+* For this particular set of conditions:
+*
+* lapse rate 0.0065 degK/metre
+* latitude 50 degrees
+* sea level
+* pressure 1005 mB
+* temperature 280.15 degK
+* humidity 80%
+* wavelength 5740 Angstroms
+*
+* the results were as follows:
+*
+* ZD sla_REFRO sla_REFCOQ Saastamoinen
+*
+* 10 10.27 10.27 10.27
+* 20 21.19 21.20 21.19
+* 30 33.61 33.61 33.60
+* 40 48.82 48.83 48.81
+* 45 58.16 58.18 58.16
+* 50 69.28 69.30 69.27
+* 55 82.97 82.99 82.95
+* 60 100.51 100.54 100.50
+* 65 124.23 124.26 124.20
+* 70 158.63 158.68 158.61
+* 72 177.32 177.37 177.31
+* 74 200.35 200.38 200.32
+* 76 229.45 229.43 229.42
+* 78 267.44 267.29 267.41
+* 80 319.13 318.55 319.10
+*
+* deg arcsec arcsec arcsec
+*
+* The values for Saastamoinen's formula (which includes terms
+* up to tan^5) are taken from Hohenkerk and Sinclair (1985).
+*
+* The results from the much slower but more accurate sla_REFCO
+* routine have not been included in the tabulation as they are
+* identical to those in the sla_REFRO column to the 0.01 arcsec
+* resolution used.
+*
+* 4 Outlandish input parameters are silently limited to mathematically
+* safe values. Zero pressure is permissible, and causes zeroes to
+* be returned.
+*
+* 5 The algorithm draws on several sources, as follows:
+*
+* a) The formula for the saturation vapour pressure of water as
+* a function of temperature and temperature is taken from
+* expressions A4.5-A4.7 of Gill (1982).
+*
+* b) The formula for the water vapour pressure, given the
+* saturation pressure and the relative humidity, is from
+* Crane (1976), expression 2.5.5.
+*
+* c) The refractivity of air is a function of temperature,
+* total pressure, water-vapour pressure and, in the case
+* of optical/IR but not radio, wavelength. The formulae
+* for the two cases are developed from the Essen and Froome
+* expressions adopted in Resolution 1 of the 12th International
+* Geodesy Association General Assembly (1963).
+*
+* The above three items are as used in the sla_REFRO routine.
+*
+* d) The formula for beta, the ratio of the scale height of the
+* atmosphere to the geocentric distance of the observer, is
+* an adaption of expression 9 from Stone (1996). The
+* adaptations, arrived at empirically, consist of (i) a
+* small adjustment to the coefficient and (ii) a humidity
+* term for the radio case only.
+*
+* e) The formulae for the refraction constants as a function of
+* n-1 and beta are from Green (1987), expression 4.31.
+*
+* References:
+*
+* Crane, R.K., Meeks, M.L. (ed), "Refraction Effects in the Neutral
+* Atmosphere", Methods of Experimental Physics: Astrophysics 12B,
+* Academic Press, 1976.
+*
+* Gill, Adrian E., "Atmosphere-Ocean Dynamics", Academic Press, 1982.
+*
+* Hohenkerk, C.Y., & Sinclair, A.T., NAO Technical Note No. 63, 1985.
+*
+* International Geodesy Association General Assembly, Bulletin
+* Geodesique 70 p390, 1963.
+*
+* Stone, Ronald C., P.A.S.P. 108 1051-1058, 1996.
+*
+* Green, R.M., "Spherical Astronomy", Cambridge University Press, 1987.
+*
+* P.T.Wallace Starlink 4 June 1997
+*
+* Copyright (C) 1997 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION TDK,PMB,RH,WL,REFA,REFB
+
+ LOGICAL OPTIC
+ DOUBLE PRECISION T,P,R,W,TDC,PS,PW,WLSQ,GAMMA,BETA
+
+
+
+* Decide whether optical/IR or radio case: switch at 100 microns.
+ OPTIC = WL.LE.100D0
+
+* Restrict parameters to safe values.
+ T = MIN(MAX(TDK,100D0),500D0)
+ P = MIN(MAX(PMB,0D0),10000D0)
+ R = MIN(MAX(RH,0D0),1D0)
+ W = MIN(MAX(WL,0.1D0),1D6)
+
+* Water vapour pressure at the observer.
+ IF (P.GT.0D0) THEN
+ TDC = T-273.15D0
+ PS = 10D0**((0.7859D0+0.03477D0*TDC)/(1D0+0.00412D0*TDC))*
+ : (1D0+P*(4.5D-6+6D-10*TDC*TDC))
+ PW = R*PS/(1D0-(1D0-R)*PS/P)
+ ELSE
+ PW = 0D0
+ END IF
+
+* Refractive index minus 1 at the observer.
+ IF (OPTIC) THEN
+ WLSQ = WL*WL
+ GAMMA = ((77.532D-6+(4.391D-7+3.57D-9/WLSQ)/WLSQ)*P
+ : -11.2684D-6*PW)/T
+ ELSE
+ GAMMA = (77.624D-6*P-(12.92D-6-0.371897D0/T)*PW)/T
+ END IF
+
+* Formula for beta adapted from Stone, with empirical adjustments.
+ BETA=4.4474D-6*T
+ IF (.NOT.OPTIC) BETA=BETA-0.0074D0*PW*BETA
+
+* Refraction constants from Green.
+ REFA = GAMMA*(1D0-BETA)
+ REFB = -GAMMA*(BETA-GAMMA/2D0)
+
+ END
diff --git a/src/slalib/refro.f b/src/slalib/refro.f
new file mode 100644
index 0000000..8d11184
--- /dev/null
+++ b/src/slalib/refro.f
@@ -0,0 +1,374 @@
+ SUBROUTINE sla_REFRO (ZOBS, HM, TDK, PMB, RH, WL, PHI, TLR,
+ : EPS, REF)
+*+
+* - - - - - -
+* R E F R O
+* - - - - - -
+*
+* Atmospheric refraction for radio and optical/IR wavelengths.
+*
+* Given:
+* ZOBS d observed zenith distance of the source (radian)
+* HM d height of the observer above sea level (metre)
+* TDK d ambient temperature at the observer (deg K)
+* PMB d pressure at the observer (millibar)
+* RH d relative humidity at the observer (range 0-1)
+* WL d effective wavelength of the source (micrometre)
+* PHI d latitude of the observer (radian, astronomical)
+* TLR d temperature lapse rate in the troposphere (degK/metre)
+* EPS d precision required to terminate iteration (radian)
+*
+* Returned:
+* REF d refraction: in vacuo ZD minus observed ZD (radian)
+*
+* Notes:
+*
+* 1 A suggested value for the TLR argument is 0.0065D0. The
+* refraction is significantly affected by TLR, and if studies
+* of the local atmosphere have been carried out a better TLR
+* value may be available.
+*
+* 2 A suggested value for the EPS argument is 1D-8. The result is
+* usually at least two orders of magnitude more computationally
+* precise than the supplied EPS value.
+*
+* 3 The routine computes the refraction for zenith distances up
+* to and a little beyond 90 deg using the method of Hohenkerk
+* and Sinclair (NAO Technical Notes 59 and 63, subsequently adopted
+* in the Explanatory Supplement, 1992 edition - see section 3.281).
+*
+* 4 The code is a development of the optical/IR refraction subroutine
+* AREF of C.Hohenkerk (HMNAO, September 1984), with extensions to
+* support the radio case. Apart from merely cosmetic changes, the
+* following modifications to the original HMNAO optical/IR refraction
+* code have been made:
+*
+* . The angle arguments have been changed to radians.
+*
+* . Any value of ZOBS is allowed (see note 6, below).
+*
+* . Other argument values have been limited to safe values.
+*
+* . Murray's values for the gas constants have been used
+* (Vectorial Astrometry, Adam Hilger, 1983).
+*
+* . The numerical integration phase has been rearranged for
+* extra clarity.
+*
+* . A better model for Ps(T) has been adopted (taken from
+* Gill, Atmosphere-Ocean Dynamics, Academic Press, 1982).
+*
+* . More accurate expressions for Pwo have been adopted
+* (again from Gill 1982).
+*
+* . Provision for radio wavelengths has been added using
+* expressions devised by A.T.Sinclair, RGO (private
+* communication 1989), based on the Essen & Froome
+* refractivity formula adopted in Resolution 1 of the
+* 13th International Geodesy Association General Assembly
+* (Bulletin Geodesique 70 p390, 1963).
+*
+* . Various small changes have been made to gain speed.
+*
+* None of the changes significantly affects the optical/IR results
+* with respect to the algorithm given in the 1992 Explanatory
+* Supplement. For example, at 70 deg zenith distance the present
+* routine agrees with the ES algorithm to better than 0.05 arcsec
+* for any reasonable combination of parameters. However, the
+* improved water-vapour expressions do make a significant difference
+* in the radio band, at 70 deg zenith distance reaching almost
+* 4 arcsec for a hot, humid, low-altitude site during a period of
+* low pressure.
+*
+* 5 The radio refraction is chosen by specifying WL > 100 micrometres.
+* Because the algorithm takes no account of the ionosphere, the
+* accuracy deteriorates at low frequencies, below about 30 MHz.
+*
+* 6 Before use, the value of ZOBS is expressed in the range +/- pi.
+* If this ranged ZOBS is -ve, the result REF is computed from its
+* absolute value before being made -ve to match. In addition, if
+* it has an absolute value greater than 93 deg, a fixed REF value
+* equal to the result for ZOBS = 93 deg is returned, appropriately
+* signed.
+*
+* 7 As in the original Hohenkerk and Sinclair algorithm, fixed values
+* of the water vapour polytrope exponent, the height of the
+* tropopause, and the height at which refraction is negligible are
+* used.
+*
+* 8 The radio refraction has been tested against work done by
+* Iain Coulson, JACH, (private communication 1995) for the
+* James Clerk Maxwell Telescope, Mauna Kea. For typical conditions,
+* agreement at the 0.1 arcsec level is achieved for moderate ZD,
+* worsening to perhaps 0.5-1.0 arcsec at ZD 80 deg. At hot and
+* humid sea-level sites the accuracy will not be as good.
+*
+* 9 It should be noted that the relative humidity RH is formally
+* defined in terms of "mixing ratio" rather than pressures or
+* densities as is often stated. It is the mass of water per unit
+* mass of dry air divided by that for saturated air at the same
+* temperature and pressure (see Gill 1982).
+*
+* Called: sla_DRANGE, sla__ATMT, sla__ATMS
+*
+* P.T.Wallace Starlink 3 June 1997
+*
+* Copyright (C) 1997 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION ZOBS,HM,TDK,PMB,RH,WL,PHI,TLR,EPS,REF
+
+*
+* Fixed parameters
+*
+ DOUBLE PRECISION D93,GCR,DMD,DMW,S,DELTA,HT,HS
+* 93 degrees in radians
+ PARAMETER (D93=1.623156204D0)
+* Universal gas constant
+ PARAMETER (GCR=8314.32D0)
+* Molecular weight of dry air
+ PARAMETER (DMD=28.9644D0)
+* Molecular weight of water vapour
+ PARAMETER (DMW=18.0152D0)
+* Mean Earth radius (metre)
+ PARAMETER (S=6378120D0)
+* Exponent of temperature dependence of water vapour pressure
+ PARAMETER (DELTA=18.36D0)
+* Height of tropopause (metre)
+ PARAMETER (HT=11000D0)
+* Upper limit for refractive effects (metre)
+ PARAMETER (HS=80000D0)
+
+ INTEGER IS,K,N,I,J
+ LOGICAL OPTIC,LOOP
+ DOUBLE PRECISION ZOBS1,ZOBS2,HMOK,TDKOK,PMBOK,RHOK,WLOK,ALPHA,
+ : TOL,WLSQ,GB,A,GAMAL,GAMMA,GAMM2,DELM2,
+ : TDC,PSAT,PWO,W,
+ : C1,C2,C3,C4,C5,C6,R0,TEMPO,DN0,RDNDR0,SK0,F0,
+ : RT,TT,DNT,RDNDRT,SINE,ZT,FT,DNTS,RDNDRP,ZTS,FTS,
+ : RS,DNS,RDNDRS,ZS,FS,REFOLD,Z0,ZRANGE,FB,FF,FO,FE,
+ : H,R,SZ,RG,DR,TG,DN,RDNDR,T,F,REFP,REFT
+
+ DOUBLE PRECISION sla_DRANGE
+
+* The refraction integrand
+ DOUBLE PRECISION REFI
+ REFI(R,DN,RDNDR) = RDNDR/(DN+RDNDR)
+
+
+
+* Transform ZOBS into the normal range.
+ ZOBS1 = sla_DRANGE(ZOBS)
+ ZOBS2 = MIN(ABS(ZOBS1),D93)
+
+* Keep other arguments within safe bounds.
+ HMOK = MIN(MAX(HM,-1D3),10D3)
+ TDKOK = MIN(MAX(TDK,100D0),500D0)
+ PMBOK = MIN(MAX(PMB,0D0),10000D0)
+ RHOK = MIN(MAX(RH,0D0),1D0)
+ WLOK = MAX(WL,0.1D0)
+ ALPHA = MIN(MAX(ABS(TLR),0.001D0),0.01D0)
+
+* Tolerance for iteration.
+ TOL = MIN(MAX(ABS(EPS),1D-12),0.1D0)/2D0
+
+* Decide whether optical/IR or radio case - switch at 100 microns.
+ OPTIC = WLOK.LE.100D0
+
+* Set up model atmosphere parameters defined at the observer.
+ WLSQ = WLOK*WLOK
+ GB = 9.784D0*(1D0-0.0026D0*COS(PHI+PHI)-0.00000028D0*HMOK)
+ IF (OPTIC) THEN
+ A = (287.604D0+(1.6288D0+0.0136D0/WLSQ)/WLSQ)
+ : *273.15D-6/1013.25D0
+ ELSE
+ A = 77.624D-6
+ END IF
+ GAMAL = (GB*DMD)/GCR
+ GAMMA = GAMAL/ALPHA
+ GAMM2 = GAMMA-2D0
+ DELM2 = DELTA-2D0
+ TDC = TDKOK-273.15D0
+ PSAT = 10D0**((0.7859D0+0.03477D0*TDC)/(1D0+0.00412D0*TDC))*
+ : (1D0+PMBOK*(4.5D-6+6D-10*TDC*TDC))
+ IF (PMBOK.GT.0D0) THEN
+ PWO = RHOK*PSAT/(1D0-(1D0-RHOK)*PSAT/PMBOK)
+ ELSE
+ PWO = 0D0
+ END IF
+ W = PWO*(1D0-DMW/DMD)*GAMMA/(DELTA-GAMMA)
+ C1 = A*(PMBOK+W)/TDKOK
+ IF (OPTIC) THEN
+ C2 = (A*W+11.2684D-6*PWO)/TDKOK
+ ELSE
+ C2 = (A*W+12.92D-6*PWO)/TDKOK
+ END IF
+ C3 = (GAMMA-1D0)*ALPHA*C1/TDKOK
+ C4 = (DELTA-1D0)*ALPHA*C2/TDKOK
+ IF (OPTIC) THEN
+ C5 = 0D0
+ C6 = 0D0
+ ELSE
+ C5 = 371897D-6*PWO/TDKOK
+ C6 = C5*DELM2*ALPHA/(TDKOK*TDKOK)
+ END IF
+
+* Conditions at the observer.
+ R0 = S+HMOK
+ CALL sla__ATMT(R0,TDKOK,ALPHA,GAMM2,DELM2,C1,C2,C3,C4,C5,C6,
+ : R0,TEMPO,DN0,RDNDR0)
+ SK0 = DN0*R0*SIN(ZOBS2)
+ F0 = REFI(R0,DN0,RDNDR0)
+
+* Conditions in the troposphere at the tropopause.
+ RT = S+HT
+ CALL sla__ATMT(R0,TDKOK,ALPHA,GAMM2,DELM2,C1,C2,C3,C4,C5,C6,
+ : RT,TT,DNT,RDNDRT)
+ SINE = SK0/(RT*DNT)
+ ZT = ATAN2(SINE,SQRT(MAX(1D0-SINE*SINE,0D0)))
+ FT = REFI(RT,DNT,RDNDRT)
+
+* Conditions in the stratosphere at the tropopause.
+ CALL sla__ATMS(RT,TT,DNT,GAMAL,RT,DNTS,RDNDRP)
+ SINE = SK0/(RT*DNTS)
+ ZTS = ATAN2(SINE,SQRT(MAX(1D0-SINE*SINE,0D0)))
+ FTS = REFI(RT,DNTS,RDNDRP)
+
+* Conditions at the stratosphere limit.
+ RS = S+HS
+ CALL sla__ATMS(RT,TT,DNT,GAMAL,RS,DNS,RDNDRS)
+ SINE = SK0/(RS*DNS)
+ ZS = ATAN2(SINE,SQRT(MAX(1D0-SINE*SINE,0D0)))
+ FS = REFI(RS,DNS,RDNDRS)
+
+*
+* Integrate the refraction integral in two parts; first in the
+* troposphere (K=1), then in the stratosphere (K=2).
+*
+
+* Initialize previous refraction to ensure at least two iterations.
+ REFOLD = 1D6
+
+* Start off with 8 strips for the troposphere integration, and then
+* use the final troposphere value for the stratosphere integration,
+* which tends to need more strips.
+ IS = 8
+
+* Troposphere then stratosphere.
+ DO K = 1,2
+
+* Start Z, Z range, and start and end values.
+ IF (K.EQ.1) THEN
+ Z0 = ZOBS2
+ ZRANGE = ZT-Z0
+ FB = F0
+ FF = FT
+ ELSE
+ Z0 = ZTS
+ ZRANGE = ZS-Z0
+ FB = FTS
+ FF = FS
+ END IF
+
+* Sums of odd and even values.
+ FO = 0D0
+ FE = 0D0
+
+* First time through the loop we have to do every point.
+ N = 1
+
+* Start of iteration loop (terminates at specified precision).
+ LOOP = .TRUE.
+ DO WHILE (LOOP)
+
+* Strip width.
+ H = ZRANGE/DBLE(IS)
+
+* Initialize distance from Earth centre for quadrature pass.
+ IF (K.EQ.1) THEN
+ R = R0
+ ELSE
+ R = RT
+ END IF
+
+* One pass (no need to compute evens after first time).
+ DO I=1,IS-1,N
+
+* Sine of observed zenith distance.
+ SZ = SIN(Z0+H*DBLE(I))
+
+* Find R (to the nearest metre, maximum four iterations).
+ IF (SZ.GT.1D-20) THEN
+ W = SK0/SZ
+ RG = R
+ DR = 1D6
+ J = 0
+ DO WHILE (ABS(DR).GT.1D0.AND.J.LT.4)
+ J=J+1
+ IF (K.EQ.1) THEN
+ CALL sla__ATMT(R0,TDKOK,ALPHA,GAMM2,DELM2,
+ : C1,C2,C3,C4,C5,C6,RG,TG,DN,RDNDR)
+ ELSE
+ CALL sla__ATMS(RT,TT,DNT,GAMAL,RG,DN,RDNDR)
+ END IF
+ DR = (RG*DN-W)/(DN+RDNDR)
+ RG = RG-DR
+ END DO
+ R = RG
+ END IF
+
+* Find the refractive index and integrand at R.
+ IF (K.EQ.1) THEN
+ CALL sla__ATMT(R0,TDKOK,ALPHA,GAMM2,DELM2,
+ : C1,C2,C3,C4,C5,C6,R,T,DN,RDNDR)
+ ELSE
+ CALL sla__ATMS(RT,TT,DNT,GAMAL,R,DN,RDNDR)
+ END IF
+ F = REFI(R,DN,RDNDR)
+
+* Accumulate odd and (first time only) even values.
+ IF (N.EQ.1.AND.MOD(I,2).EQ.0) THEN
+ FE = FE+F
+ ELSE
+ FO = FO+F
+ END IF
+ END DO
+
+* Evaluate the integrand using Simpson's Rule.
+ REFP = H*(FB+4D0*FO+2D0*FE+FF)/3D0
+
+* Has the required precision been achieved?
+ IF (ABS(REFP-REFOLD).GT.TOL) THEN
+
+* No: prepare for next iteration.
+
+* Save current value for convergence test.
+ REFOLD = REFP
+
+* Double the number of strips.
+ IS = IS+IS
+
+* Sum of all current values = sum of next pass's even values.
+ FE = FE+FO
+
+* Prepare for new odd values.
+ FO = 0D0
+
+* Skip even values next time.
+ N = 2
+ ELSE
+
+* Yes: save troposphere component and terminate the loop.
+ IF (K.EQ.1) REFT = REFP
+ LOOP = .FALSE.
+ END IF
+ END DO
+ END DO
+
+* Result.
+ REF = REFT+REFP
+ IF (ZOBS1.LT.0D0) REF = -REF
+
+ END
diff --git a/src/slalib/refv.f b/src/slalib/refv.f
new file mode 100644
index 0000000..e81b03c
--- /dev/null
+++ b/src/slalib/refv.f
@@ -0,0 +1,106 @@
+ SUBROUTINE sla_REFV (VU, REFA, REFB, VR)
+*+
+* - - - - -
+* R E F V
+* - - - - -
+*
+* Adjust an unrefracted Cartesian vector to include the effect of
+* atmospheric refraction, using the simple A tan Z + B tan**3 Z
+* model.
+*
+* Given:
+* VU dp unrefracted position of the source (Az/El 3-vector)
+* REFA dp tan Z coefficient (radian)
+* REFB dp tan**3 Z coefficient (radian)
+*
+* Returned:
+* VR dp refracted position of the source (Az/El 3-vector)
+*
+* Notes:
+*
+* 1 This routine applies the adjustment for refraction in the
+* opposite sense to the usual one - it takes an unrefracted
+* (in vacuo) position and produces an observed (refracted)
+* position, whereas the A tan Z + B tan**3 Z model strictly
+* applies to the case where an observed position is to have the
+* refraction removed. The unrefracted to refracted case is
+* harder, and requires an inverted form of the text-book
+* refraction models; the algorithm used here is equivalent to
+* one iteration of the Newton-Raphson method applied to the above
+* formula.
+*
+* 2 Though optimized for speed rather than precision, the present
+* routine achieves consistency with the refracted-to-unrefracted
+* A tan Z + B tan**3 Z model at better than 1 microarcsecond within
+* 30 degrees of the zenith and remains within 1 milliarcsecond to
+* beyond ZD 70 degrees. The inherent accuracy of the model is, of
+* course, far worse than this - see the documentation for sla_REFCO
+* for more information.
+*
+* 3 At low elevations (below about 3 degrees) the refraction
+* correction is held back to prevent arithmetic problems and
+* wildly wrong results. Over a wide range of observer heights
+* and corresponding temperatures and pressures, the following
+* levels of accuracy (arcsec) are achieved, relative to numerical
+* integration through a model atmosphere:
+*
+* ZD error
+*
+* 80 0.4
+* 81 0.8
+* 82 1.6
+* 83 3
+* 84 7
+* 85 17
+* 86 45
+* 87 150
+* 88 340
+* 89 620
+* 90 1100
+* 91 1900 } relevant only to
+* 92 3200 } high-elevation sites
+*
+* 4 See also the routine sla_REFZ, which performs the adjustment to
+* the zenith distance rather than in Cartesian Az/El coordinates.
+* The present routine is faster than sla_REFZ and, except very low down,
+* is equally accurate for all practical purposes. However, beyond
+* about ZD 84 degrees sla_REFZ should be used, and for the utmost
+* accuracy iterative use of sla_REFRO should be considered.
+*
+* P.T.Wallace Starlink 26 December 1994
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION VU(3),REFA,REFB,VR(3)
+
+ DOUBLE PRECISION X,Y,Z1,Z,ZSQ,RSQ,R,WB,WT,D,CD,F
+
+
+
+* Initial estimate = unrefracted vector
+ X = VU(1)
+ Y = VU(2)
+ Z1 = VU(3)
+
+* Keep correction approximately constant below about 3 deg elevation
+ Z = MAX(Z1,0.05D0)
+
+* One Newton-Raphson iteration
+ ZSQ = Z*Z
+ RSQ = X*X+Y*Y
+ R = SQRT(RSQ)
+ WB = REFB*RSQ/ZSQ
+ WT = (REFA+WB)/(1D0+(REFA+3D0*WB)*(ZSQ+RSQ)/ZSQ)
+ D = WT*R/Z
+ CD = 1D0-D*D/2D0
+ F = CD*(1D0-WT)
+
+* Post-refraction x,y,z
+ VR(1) = X*F
+ VR(2) = Y*F
+ VR(3) = CD*(Z+D*R)+(Z1-Z)
+
+ END
diff --git a/src/slalib/refz.f b/src/slalib/refz.f
new file mode 100644
index 0000000..d558c87
--- /dev/null
+++ b/src/slalib/refz.f
@@ -0,0 +1,139 @@
+ SUBROUTINE sla_REFZ (ZU, REFA, REFB, ZR)
+*+
+* - - - - -
+* R E F Z
+* - - - - -
+*
+* Adjust an unrefracted zenith distance to include the effect of
+* atmospheric refraction, using the simple A tan Z + B tan**3 Z
+* model (plus special handling for large ZDs).
+*
+* Given:
+* ZU dp unrefracted zenith distance of the source (radian)
+* REFA dp tan Z coefficient (radian)
+* REFB dp tan**3 Z coefficient (radian)
+*
+* Returned:
+* ZR dp refracted zenith distance (radian)
+*
+* Notes:
+*
+* 1 This routine applies the adjustment for refraction in the
+* opposite sense to the usual one - it takes an unrefracted
+* (in vacuo) position and produces an observed (refracted)
+* position, whereas the A tan Z + B tan**3 Z model strictly
+* applies to the case where an observed position is to have the
+* refraction removed. The unrefracted to refracted case is
+* harder, and requires an inverted form of the text-book
+* refraction models; the formula used here is based on the
+* Newton-Raphson method. For the utmost numerical consistency
+* with the refracted to unrefracted model, two iterations are
+* carried out, achieving agreement at the 1D-11 arcseconds level
+* for a ZD of 80 degrees. The inherent accuracy of the model
+* is, of course, far worse than this - see the documentation for
+* sla_REFCO for more information.
+*
+* 2 At ZD 83 degrees, the rapidly-worsening A tan Z + B tan**3 Z
+* model is abandoned and an empirical formula takes over. Over a
+* wide range of observer heights and corresponding temperatures and
+* pressures, the following levels of accuracy (arcsec) are
+* typically achieved, relative to numerical integration through a
+* model atmosphere:
+*
+* ZR error
+*
+* 80 0.4
+* 81 0.8
+* 82 1.5
+* 83 3.2
+* 84 4.9
+* 85 5.8
+* 86 6.1
+* 87 7.1
+* 88 10
+* 89 20
+* 90 40
+* 91 100 } relevant only to
+* 92 200 } high-elevation sites
+*
+* The high-ZD model is scaled to match the normal model at the
+* transition point; there is no glitch.
+*
+* 3 Beyond 93 deg zenith distance, the refraction is held at its
+* 93 deg value.
+*
+* 4 See also the routine sla_REFV, which performs the adjustment in
+* Cartesian Az/El coordinates, and with the emphasis on speed
+* rather than numerical accuracy.
+*
+* P.T.Wallace Starlink 19 September 1995
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION ZU,REFA,REFB,ZR
+
+* Radians to degrees
+ DOUBLE PRECISION R2D
+ PARAMETER (R2D=57.29577951308232D0)
+
+* Largest usable ZD (deg)
+ DOUBLE PRECISION D93
+ PARAMETER (D93=93D0)
+
+* Coefficients for high ZD model (used beyond ZD 83 deg)
+ DOUBLE PRECISION C1,C2,C3,C4,C5
+ PARAMETER (C1=+0.55445D0,
+ : C2=-0.01133D0,
+ : C3=+0.00202D0,
+ : C4=+0.28385D0,
+ : C5=+0.02390D0)
+
+* ZD at which one model hands over to the other (radians)
+ DOUBLE PRECISION Z83
+ PARAMETER (Z83=83D0/R2D)
+
+* High-ZD-model prediction (deg) for that point
+ DOUBLE PRECISION REF83
+ PARAMETER (REF83=(C1+C2*7D0+C3*49D0)/(1D0+C4*7D0+C5*49D0))
+
+ DOUBLE PRECISION ZU1,ZL,S,C,T,TSQ,TCU,REF,E,E2
+
+
+
+* Perform calculations for ZU or 83 deg, whichever is smaller
+ ZU1 = MIN(ZU,Z83)
+
+* Functions of ZD
+ ZL = ZU1
+ S = SIN(ZL)
+ C = COS(ZL)
+ T = S/C
+ TSQ = T*T
+ TCU = T*TSQ
+
+* Refracted ZD (mathematically to better than 1 mas at 70 deg)
+ ZL = ZL-(REFA*T+REFB*TCU)/(1D0+(REFA+3D0*REFB*TSQ)/(C*C))
+
+* Further iteration
+ S = SIN(ZL)
+ C = COS(ZL)
+ T = S/C
+ TSQ = T*T
+ TCU = T*TSQ
+ REF = ZU1-ZL+
+ : (ZL-ZU1+REFA*T+REFB*TCU)/(1D0+(REFA+3D0*REFB*TSQ)/(C*C))
+
+* Special handling for large ZU
+ IF (ZU.GT.ZU1) THEN
+ E = 90D0-MIN(D93,ZU*R2D)
+ E2 = E*E
+ REF = (REF/REF83)*(C1+C2*E+C3*E2)/(1D0+C4*E+C5*E2)
+ END IF
+
+* Return refracted ZD
+ ZR = ZU-REF
+
+ END
diff --git a/src/slalib/rep.bat b/src/slalib/rep.bat
new file mode 100755
index 0000000..0d00777
--- /dev/null
+++ b/src/slalib/rep.bat
@@ -0,0 +1,21 @@
+@echo off
+rem
+rem - - - - - - - -
+rem R E P . B A T
+rem - - - - - - - -
+rem
+rem Update one module in the SLALIB library
+rem
+rem Command:
+rem
+rem REP module
+rem
+rem File SLALIB.BAK is deleted.
+rem
+rem P.T.Wallace Starlink 5 April 1992
+rem
+fl/c /FPi %1.for
+lib slalib -+%1;
+del %1.obj
+del slalib.bak
+echo:
diff --git a/src/slalib/rtl_random.c b/src/slalib/rtl_random.c
new file mode 100644
index 0000000..a8730c0
--- /dev/null
+++ b/src/slalib/rtl_random.c
@@ -0,0 +1,33 @@
+#include <stdlib.h>
+
+float
+random_ ( int *iseed )
+/*
+** - - - - - - -
+** r a n d o m
+** - - - - - - -
+**
+** Generate pseudo-random real number in the range 0 <= x < 1.
+**
+** (single precision)
+**
+** This function is designed to replace the Fortran->C interface routine
+** random(3f) on systems which do not have this library (for example Linux)
+**
+** Fortran call: X = RANDOM(ISEED)
+**
+** Given:
+** iseed int seed value
+**
+** If iseed !=0 random-number generator is initialised and first number
+** is returned.
+** iseed == 0 next number in the sequence is returned
+**
+** B.K.McIlwrath Starlink 12 January 1996
+*/
+{
+ if( *iseed != 0 )
+ srand(*iseed);
+
+ return (float) rand() / (float) RAND_MAX;
+}
diff --git a/src/slalib/rverot.f b/src/slalib/rverot.f
new file mode 100644
index 0000000..5fbe6d9
--- /dev/null
+++ b/src/slalib/rverot.f
@@ -0,0 +1,48 @@
+ REAL FUNCTION sla_RVEROT (PHI, RA, DA, ST)
+*+
+* - - - - - - -
+* R V E R O T
+* - - - - - - -
+*
+* Velocity component in a given direction due to Earth rotation
+* (single precision)
+*
+* Given:
+* PHI real latitude of observing station (geodetic)
+* RA,DA real apparent RA,DEC
+* ST real local apparent sidereal time
+*
+* PHI, RA, DEC and ST are all in radians.
+*
+* Result:
+* Component of Earth rotation in direction RA,DA (km/s)
+*
+* Sign convention:
+* The result is +ve when the observatory is receding from the
+* given point on the sky.
+*
+* Accuracy:
+* The simple algorithm used assumes a spherical Earth, of
+* a radius chosen to give results accurate to about 0.0005 km/s
+* for observing stations at typical latitudes and heights. For
+* applications requiring greater precision, use the routine
+* sla_PVOBS.
+*
+* P.T.Wallace Starlink 20 July 1994
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL PHI,RA,DA,ST
+
+* Nominal mean sidereal speed of Earth equator in km/s (the actual
+* value is about 0.4651)
+ REAL ESPEED
+ PARAMETER (ESPEED=0.4655)
+
+
+ sla_RVEROT=ESPEED*COS(PHI)*SIN(ST-RA)*COS(DA)
+
+ END
diff --git a/src/slalib/rvgalc.f b/src/slalib/rvgalc.f
new file mode 100644
index 0000000..868c307
--- /dev/null
+++ b/src/slalib/rvgalc.f
@@ -0,0 +1,69 @@
+ REAL FUNCTION sla_RVGALC (R2000, D2000)
+*+
+* - - - - - - -
+* R V G A L C
+* - - - - - - -
+*
+* Velocity component in a given direction due to the rotation
+* of the Galaxy (single precision)
+*
+* Given:
+* R2000,D2000 real J2000.0 mean RA,Dec (radians)
+*
+* Result:
+* Component of dynamical LSR motion in direction R2000,D2000 (km/s)
+*
+* Sign convention:
+* The result is +ve when the dynamical LSR is receding from the
+* given point on the sky.
+*
+* Note: The Local Standard of Rest used here is a point in the
+* vicinity of the Sun which is in a circular orbit around
+* the Galactic centre. Sometimes called the "dynamical" LSR,
+* it is not to be confused with a "kinematical" LSR, which
+* is the mean standard of rest of star catalogues or stellar
+* populations.
+*
+* Reference: The orbital speed of 220 km/s used here comes from
+* Kerr & Lynden-Bell (1986), MNRAS, 221, p1023.
+*
+* Called:
+* sla_CS2C, sla_VDV
+*
+* P.T.Wallace Starlink 23 March 1994
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL R2000,D2000
+
+ REAL VA(3), VB(3)
+
+ REAL sla_VDV
+
+*
+* LSR velocity due to Galactic rotation
+*
+* Speed = 220 km/s
+* Apex = L2,B2 90deg, 0deg
+* = RA,Dec 21 12 01.1 +48 19 47 J2000.0
+*
+* This is expressed in the form of a J2000.0 x,y,z vector:
+*
+* VA(1) = X = -SPEED*COS(RA)*COS(DEC)
+* VA(2) = Y = -SPEED*SIN(RA)*COS(DEC)
+* VA(3) = Z = -SPEED*SIN(DEC)
+
+ DATA VA / -108.70408, +97.86251, -164.33610 /
+
+
+
+* Convert given J2000 RA,Dec to x,y,z
+ CALL sla_CS2C(R2000,D2000,VB)
+
+* Compute dot product with LSR motion vector
+ sla_RVGALC=sla_VDV(VA,VB)
+
+ END
diff --git a/src/slalib/rvlg.f b/src/slalib/rvlg.f
new file mode 100644
index 0000000..ba0216e
--- /dev/null
+++ b/src/slalib/rvlg.f
@@ -0,0 +1,64 @@
+ REAL FUNCTION sla_RVLG (R2000, D2000)
+*+
+* - - - - -
+* R V L G
+* - - - - -
+*
+* Velocity component in a given direction due to the combination
+* of the rotation of the Galaxy and the motion of the Galaxy
+* relative to the mean motion of the local group (single precision)
+*
+* Given:
+* R2000,D2000 real J2000.0 mean RA,Dec (radians)
+*
+* Result:
+* Component of SOLAR motion in direction R2000,D2000 (km/s)
+*
+* Sign convention:
+* The result is +ve when the Sun is receding from the
+* given point on the sky.
+*
+* Reference:
+* IAU Trans 1976, 168, p201.
+*
+* Called:
+* sla_CS2C, sla_VDV
+*
+* P.T.Wallace Starlink June 1985
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL R2000,D2000
+
+ REAL VA(3), VB(3)
+
+ REAL sla_VDV
+
+*
+* Solar velocity due to Galactic rotation and translation
+*
+* Speed = 300 km/s
+*
+* Apex = L2,B2 90deg, 0deg
+* = RA,Dec 21 12 01.1 +48 19 47 J2000.0
+*
+* This is expressed in the form of a J2000.0 x,y,z vector:
+*
+* VA(1) = X = -SPEED*COS(RA)*COS(DEC)
+* VA(2) = Y = -SPEED*SIN(RA)*COS(DEC)
+* VA(3) = Z = -SPEED*SIN(DEC)
+
+ DATA VA / -148.23284, +133.44888, -224.09467 /
+
+
+
+* Convert given J2000 RA,Dec to x,y,z
+ CALL sla_CS2C(R2000,D2000,VB)
+
+* Compute dot product with Solar motion vector
+ sla_RVLG=sla_VDV(VA,VB)
+
+ END
diff --git a/src/slalib/rvlsrd.f b/src/slalib/rvlsrd.f
new file mode 100644
index 0000000..96f90c9
--- /dev/null
+++ b/src/slalib/rvlsrd.f
@@ -0,0 +1,78 @@
+ REAL FUNCTION sla_RVLSRD (R2000, D2000)
+*+
+* - - - - - - -
+* R V L S R D
+* - - - - - - -
+*
+* Velocity component in a given direction due to the Sun's motion
+* with respect to the dynamical Local Standard of Rest.
+*
+* (single precision)
+*
+* Given:
+* R2000,D2000 r J2000.0 mean RA,Dec (radians)
+*
+* Result:
+* Component of "peculiar" solar motion in direction R2000,D2000 (km/s)
+*
+* Sign convention:
+* The result is +ve when the Sun is receding from the given point on
+* the sky.
+*
+* Note: The Local Standard of Rest used here is the "dynamical" LSR,
+* a point in the vicinity of the Sun which is in a circular
+* orbit around the Galactic centre. The Sun's motion with
+* respect to the dynamical LSR is called the "peculiar" solar
+* motion.
+*
+* There is another type of LSR, called a "kinematical" LSR. A
+* kinematical LSR is the mean standard of rest of specified star
+* catalogues or stellar populations, and several slightly
+* different kinematical LSRs are in use. The Sun's motion with
+* respect to an agreed kinematical LSR is known as the "standard"
+* solar motion. To obtain a radial velocity correction with
+* respect to an adopted kinematical LSR use the routine sla_RVLSRK.
+*
+* Reference: Delhaye (1965), in "Stars and Stellar Systems", vol 5,
+* p73.
+*
+* Called:
+* sla_CS2C, sla_VDV
+*
+* P.T.Wallace Starlink 9 March 1994
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL R2000,D2000
+
+ REAL VA(3), VB(3)
+
+ REAL sla_VDV
+
+*
+* Peculiar solar motion from Delhaye 1965: in Galactic Cartesian
+* coordinates (+9,+12,+7) km/s. This corresponds to about 16.6 km/s
+* towards Galactic coordinates L2 = 53 deg, B2 = +25 deg, or RA,Dec
+* 17 49 58.7 +28 07 04 J2000.
+*
+* The solar motion is expressed here in the form of a J2000.0
+* equatorial Cartesian vector:
+*
+* VA(1) = X = -SPEED*COS(RA)*COS(DEC)
+* VA(2) = Y = -SPEED*SIN(RA)*COS(DEC)
+* VA(3) = Z = -SPEED*SIN(DEC)
+
+ DATA VA / +0.63823, +14.58542, -7.80116 /
+
+
+
+* Convert given J2000 RA,Dec to x,y,z
+ CALL sla_CS2C(R2000,D2000,VB)
+
+* Compute dot product with solar motion vector
+ sla_RVLSRD=sla_VDV(VA,VB)
+
+ END
diff --git a/src/slalib/rvlsrk.f b/src/slalib/rvlsrk.f
new file mode 100644
index 0000000..b484fe8
--- /dev/null
+++ b/src/slalib/rvlsrk.f
@@ -0,0 +1,77 @@
+ REAL FUNCTION sla_RVLSRK (R2000, D2000)
+*+
+* - - - - - - -
+* R V L S R K
+* - - - - - - -
+*
+* Velocity component in a given direction due to the Sun's motion
+* with respect to an adopted kinematic Local Standard of Rest.
+*
+* (single precision)
+*
+* Given:
+* R2000,D2000 r J2000.0 mean RA,Dec (radians)
+*
+* Result:
+* Component of "standard" solar motion in direction R2000,D2000 (km/s)
+*
+* Sign convention:
+* The result is +ve when the Sun is receding from the given point on
+* the sky.
+*
+* Note: The Local Standard of Rest used here is one of several
+* "kinematical" LSRs in common use. A kinematical LSR is the
+* mean standard of rest of specified star catalogues or stellar
+* populations. The Sun's motion with respect to a kinematical
+* LSR is known as the "standard" solar motion.
+*
+* There is another sort of LSR, the "dynamical" LSR, which is a
+* point in the vicinity of the Sun which is in a circular orbit
+* around the Galactic centre. The Sun's motion with respect to
+* the dynamical LSR is called the "peculiar" solar motion. To
+* obtain a radial velocity correction with respect to the
+* dynamical LSR use the routine sla_RVLSRD.
+*
+* Reference: Delhaye (1965), in "Stars and Stellar Systems", vol 5,
+* p73.
+*
+* Called:
+* sla_CS2C, sla_VDV
+*
+* P.T.Wallace Starlink 11 March 1994
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL R2000,D2000
+
+ REAL VA(3), VB(3)
+
+ REAL sla_VDV
+
+*
+* Standard solar motion (from Methods of Experimental Physics, ed Meeks,
+* vol 12, part C, sec 6.1.5.2, p281):
+*
+* 20 km/s towards RA 18h Dec +30d (1900).
+*
+* The solar motion is expressed here in the form of a J2000.0
+* equatorial Cartesian vector:
+*
+* VA(1) = X = -SPEED*COS(RA)*COS(DEC)
+* VA(2) = Y = -SPEED*SIN(RA)*COS(DEC)
+* VA(3) = Z = -SPEED*SIN(DEC)
+
+ DATA VA / -0.29000, +17.31726, -10.00141 /
+
+
+
+* Convert given J2000 RA,Dec to x,y,z
+ CALL sla_CS2C(R2000,D2000,VB)
+
+* Compute dot product with solar motion vector
+ sla_RVLSRK=sla_VDV(VA,VB)
+
+ END
diff --git a/src/slalib/s2tp.f b/src/slalib/s2tp.f
new file mode 100644
index 0000000..1ec36f2
--- /dev/null
+++ b/src/slalib/s2tp.f
@@ -0,0 +1,67 @@
+ SUBROUTINE sla_S2TP (RA, DEC, RAZ, DECZ, XI, ETA, J)
+*+
+* - - - - -
+* S 2 T P
+* - - - - -
+*
+* Projection of spherical coordinates onto tangent plane:
+* "gnomonic" projection - "standard coordinates"
+* (single precision)
+*
+* Given:
+* RA,DEC real spherical coordinates of point to be projected
+* RAZ,DECZ real spherical coordinates of tangent point
+*
+* Returned:
+* XI,ETA real rectangular coordinates on tangent plane
+* J int status: 0 = OK, star on tangent plane
+* 1 = error, star too far from axis
+* 2 = error, antistar on tangent plane
+* 3 = error, antistar too far from axis
+*
+* P.T.Wallace Starlink 18 July 1996
+*
+* Copyright (C) 1996 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL RA,DEC,RAZ,DECZ,XI,ETA
+ INTEGER J
+
+ REAL SDECZ,SDEC,CDECZ,CDEC,RADIF,SRADIF,CRADIF,DENOM
+
+ REAL TINY
+ PARAMETER (TINY=1E-6)
+
+
+* Trig functions
+ SDECZ=SIN(DECZ)
+ SDEC=SIN(DEC)
+ CDECZ=COS(DECZ)
+ CDEC=COS(DEC)
+ RADIF=RA-RAZ
+ SRADIF=SIN(RADIF)
+ CRADIF=COS(RADIF)
+
+* Reciprocal of star vector length to tangent plane
+ DENOM=SDEC*SDECZ+CDEC*CDECZ*CRADIF
+
+* Handle vectors too far from axis
+ IF (DENOM.GT.TINY) THEN
+ J=0
+ ELSE IF (DENOM.GE.0.0) THEN
+ J=1
+ DENOM=TINY
+ ELSE IF (DENOM.GT.-TINY) THEN
+ J=2
+ DENOM=-TINY
+ ELSE
+ J=3
+ END IF
+
+* Compute tangent plane coordinates (even in dubious cases)
+ XI=CDEC*SRADIF/DENOM
+ ETA=(SDEC*CDECZ-CDEC*SDECZ*CRADIF)/DENOM
+
+ END
diff --git a/src/slalib/sep.f b/src/slalib/sep.f
new file mode 100644
index 0000000..c977985
--- /dev/null
+++ b/src/slalib/sep.f
@@ -0,0 +1,48 @@
+ REAL FUNCTION sla_SEP (A1, B1, A2, B2)
+*+
+* - - - -
+* S E P
+* - - - -
+*
+* Angle between two points on a sphere (single precision)
+*
+* Given:
+* A1,B1 real spherical coordinates of one point
+* A2,B2 real spherical coordinates of the other point
+*
+* (The spherical coordinates are RA,Dec, Long,Lat etc, in radians.)
+*
+* The result is the angle, in radians, between the two points. It
+* is always positive.
+*
+* Called: sla_CS2C
+*
+* P.T.Wallace Starlink April 1985
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL A1,B1,A2,B2
+
+ INTEGER I
+ REAL V1(3),V2(3),W
+
+
+
+* Convert coordinates from spherical to Cartesian
+ CALL sla_CS2C(A1,B1,V1)
+ CALL sla_CS2C(A2,B2,V2)
+
+* Modulus squared of half the difference vector
+ W=0.0
+ DO I=1,3
+ W=W+(V1(I)-V2(I))**2
+ END DO
+ W=W/4.0
+
+* Angle between the vectors
+ sla_SEP=2.0*ATAN2(SQRT(W),SQRT(MAX(0.0,1.0-W)))
+
+ END
diff --git a/src/slalib/sla.news b/src/slalib/sla.news
new file mode 100644
index 0000000..51b2888
--- /dev/null
+++ b/src/slalib/sla.news
@@ -0,0 +1,40 @@
+SLALIB_Version_2.4-0 Expiry 31 December 1999
+
+The latest releases of SLALIB include the following changes:
+
+* Four new routines have been introduced which transform between the
+ FK5 system and the ICRS (Hipparcos) system. sla_FK52H and sla_H2FK5
+ transform star positions and proper motions from FK5 coordinates to
+ Hipparcos coordinates and vice versa. sla_FK5HZ and sla_HFK5Z do the
+ same but for the case where the Hipparcos proper motions are zero.
+
+* Six new routines have been introduced for dealing with orbital elements.
+ Four of them (sla_EL2UE, sla_PV2UE, sla_UE2EL and sla_UE2PV) provide
+ applications with direct access to the "universal variables" method
+ that was already being used internally. Compared with using conventional
+ (angular) elements and solving Kepler's equation, the universal variables
+ approach has a number of advantages, including better handling of near-
+ parabolic orbits and greater efficiency. The remaining two routines
+ (sla_PERTEL and sla_PERTUE) generate updated elements by applying
+ major-planet perturbations. The new elements can then be used to
+ predict positions that are much more accurate. For minor planets,
+ sub-arcsecond accuracy over a decade is achievable.
+
+* Several observatory sites have been added to the sla_OBS routine: CFHT,
+ Keck 2, Gemini North, FCRAO, IRTF and CSO. The coordinates for all
+ the Mauna Kea sites have been updated in accordance with recent aerial
+ photography results made available by the Institute for Astronomy,
+ University of Hawaii.
+
+* A bug in sla_DAT has been corrected. It used to give incorrect
+ results for dates in the first 54 days of 1972.
+
+* There are new routines for generating permutations (sla_PERMUT) and
+ combinations (sla_COMBN).
+
+ P.T.Wallace
+ 17 August 1999
+
+ ptw@star.rl.ac.uk
+ +44-1235-44-5372
+--------------------------------------------------------------------------
diff --git a/src/slalib/sla_link b/src/slalib/sla_link
new file mode 100755
index 0000000..40aa195
--- /dev/null
+++ b/src/slalib/sla_link
@@ -0,0 +1 @@
+echo -lsla
diff --git a/src/slalib/sla_link_adam b/src/slalib/sla_link_adam
new file mode 100755
index 0000000..40aa195
--- /dev/null
+++ b/src/slalib/sla_link_adam
@@ -0,0 +1 @@
+echo -lsla
diff --git a/src/slalib/sla_test.f b/src/slalib/sla_test.f
new file mode 100644
index 0000000..c094c26
--- /dev/null
+++ b/src/slalib/sla_test.f
@@ -0,0 +1,28 @@
+ PROGRAM SLA_TEST
+*+
+* - - - - -
+* T E S T
+* - - - - -
+*
+* Simple test of SLALIB library - checks that a program can be
+* linked and a correct result returned from at least one subprogram.
+*
+* P.T.Wallace Starlink 24 August 1992
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION D
+ INTEGER J
+
+
+ CALL sla_CALDJ(1946,4,30,D,J)
+ IF (J.EQ.0.AND.NINT(D).EQ.31940) THEN
+ PRINT *,'SLALIB test completed satisfactorily.'
+ ELSE
+ PRINT *,'SLALIB test fails!'
+ END IF
+
+ END
diff --git a/src/slalib/smat.f b/src/slalib/smat.f
new file mode 100644
index 0000000..93dbee7
--- /dev/null
+++ b/src/slalib/smat.f
@@ -0,0 +1,141 @@
+ SUBROUTINE sla_SMAT (N, A, Y, D, JF, IW)
+*+
+* - - - - -
+* S M A T
+* - - - - -
+*
+* Matrix inversion & solution of simultaneous equations
+* (single precision)
+*
+* For the set of n simultaneous equations in n unknowns:
+* A.Y = X
+*
+* where:
+* A is a non-singular N x N matrix
+* Y is the vector of N unknowns
+* X is the known vector
+*
+* SMATRX computes:
+* the inverse of matrix A
+* the determinant of matrix A
+* the vector of N unknowns
+*
+* Arguments:
+*
+* symbol type dimension before after
+*
+* N int no. of unknowns unchanged
+* A real (N,N) matrix inverse
+* Y real (N) vector solution
+* D real - determinant
+* * JF int - singularity flag
+* IW int (N) - workspace
+*
+* * JF is the singularity flag. If the matrix is non-singular,
+* JF=0 is returned. If the matrix is singular, JF=-1 & D=0.0 are
+* returned. In the latter case, the contents of array A on return
+* are undefined.
+*
+* Algorithm:
+* Gaussian elimination with partial pivoting.
+*
+* Speed:
+* Very fast.
+*
+* Accuracy:
+* Fairly accurate - errors 1 to 4 times those of routines optimised
+* for accuracy.
+*
+* Note: replaces the obsolete sla_SMATRX routine.
+*
+* P.T.Wallace Starlink 10 September 1990
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ INTEGER N
+ REAL A(N,N),Y(N),D
+ INTEGER JF
+ INTEGER IW(N)
+
+ REAL SFA
+ PARAMETER (SFA=1E-20)
+
+ INTEGER K,IMX,I,J,NP1MK,KI
+ REAL AMX,T,AKK,YK,AIK
+
+
+ JF=0
+ D=1.0
+ DO K=1,N
+ AMX=ABS(A(K,K))
+ IMX=K
+ IF (K.NE.N) THEN
+ DO I=K+1,N
+ T=ABS(A(I,K))
+ IF (T.GT.AMX) THEN
+ AMX=T
+ IMX=I
+ END IF
+ END DO
+ END IF
+ IF (AMX.LT.SFA) THEN
+ JF=-1
+ ELSE
+ IF (IMX.NE.K) THEN
+ DO J=1,N
+ T=A(K,J)
+ A(K,J)=A(IMX,J)
+ A(IMX,J)=T
+ END DO
+ T=Y(K)
+ Y(K)=Y(IMX)
+ Y(IMX)=T
+ D=-D
+ END IF
+ IW(K)=IMX
+ AKK=A(K,K)
+ D=D*AKK
+ IF (ABS(D).LT.SFA) THEN
+ JF=-1
+ ELSE
+ AKK=1.0/AKK
+ A(K,K)=AKK
+ DO J=1,N
+ IF (J.NE.K) A(K,J)=A(K,J)*AKK
+ END DO
+ YK=Y(K)*AKK
+ Y(K)=YK
+ DO I=1,N
+ AIK=A(I,K)
+ IF (I.NE.K) THEN
+ DO J=1,N
+ IF (J.NE.K) A(I,J)=A(I,J)-AIK*A(K,J)
+ END DO
+ Y(I)=Y(I)-AIK*YK
+ END IF
+ END DO
+ DO I=1,N
+ IF (I.NE.K) A(I,K)=-A(I,K)*AKK
+ END DO
+ END IF
+ END IF
+ END DO
+ IF (JF.NE.0) THEN
+ D=0.0
+ ELSE
+ DO K=1,N
+ NP1MK=N+1-K
+ KI=IW(NP1MK)
+ IF (NP1MK.NE.KI) THEN
+ DO I=1,N
+ T=A(I,NP1MK)
+ A(I,NP1MK)=A(I,KI)
+ A(I,KI)=T
+ END DO
+ END IF
+ END DO
+ END IF
+ END
diff --git a/src/slalib/subet.f b/src/slalib/subet.f
new file mode 100644
index 0000000..e36575b
--- /dev/null
+++ b/src/slalib/subet.f
@@ -0,0 +1,66 @@
+ SUBROUTINE sla_SUBET (RC, DC, EQ, RM, DM)
+*+
+* - - - - - -
+* S U B E T
+* - - - - - -
+*
+* Remove the E-terms (elliptic component of annual aberration)
+* from a pre IAU 1976 catalogue RA,Dec to give a mean place
+* (double precision)
+*
+* Given:
+* RC,DC dp RA,Dec (radians) with E-terms included
+* EQ dp Besselian epoch of mean equator and equinox
+*
+* Returned:
+* RM,DM dp RA,Dec (radians) without E-terms
+*
+* Called:
+* sla_ETRMS, sla_DCS2C, sla_,DVDV, sla_DCC2S, sla_DRANRM
+*
+* Explanation:
+* Most star positions from pre-1984 optical catalogues (or
+* derived from astrometry using such stars) embody the
+* E-terms. This routine converts such a position to a
+* formal mean place (allowing, for example, comparison with a
+* pulsar timing position).
+*
+* Reference:
+* Explanatory Supplement to the Astronomical Ephemeris,
+* section 2D, page 48.
+*
+* P.T.Wallace Starlink 10 May 1990
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION RC,DC,EQ,RM,DM
+
+ DOUBLE PRECISION sla_DRANRM,sla_DVDV
+ DOUBLE PRECISION A(3),V(3),F
+
+ INTEGER I
+
+
+
+* E-terms
+ CALL sla_ETRMS(EQ,A)
+
+* Spherical to Cartesian
+ CALL sla_DCS2C(RC,DC,V)
+
+* Include the E-terms
+ F=1D0+sla_DVDV(V,A)
+ DO I=1,3
+ V(I)=F*V(I)-A(I)
+ END DO
+
+* Cartesian to spherical
+ CALL sla_DCC2S(V,RM,DM)
+
+* Bring RA into conventional range
+ RM=sla_DRANRM(RM)
+
+ END
diff --git a/src/slalib/sun67.htx/blueball.gif b/src/slalib/sun67.htx/blueball.gif
new file mode 100644
index 0000000..c481395
--- /dev/null
+++ b/src/slalib/sun67.htx/blueball.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/change_begin.gif b/src/slalib/sun67.htx/change_begin.gif
new file mode 100644
index 0000000..dbe8d7e
--- /dev/null
+++ b/src/slalib/sun67.htx/change_begin.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/change_begin_right.gif b/src/slalib/sun67.htx/change_begin_right.gif
new file mode 100644
index 0000000..331ddf2
--- /dev/null
+++ b/src/slalib/sun67.htx/change_begin_right.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/change_delete.gif b/src/slalib/sun67.htx/change_delete.gif
new file mode 100644
index 0000000..63398f5
--- /dev/null
+++ b/src/slalib/sun67.htx/change_delete.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/change_delete_right.gif b/src/slalib/sun67.htx/change_delete_right.gif
new file mode 100644
index 0000000..63398f5
--- /dev/null
+++ b/src/slalib/sun67.htx/change_delete_right.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/change_end.gif b/src/slalib/sun67.htx/change_end.gif
new file mode 100644
index 0000000..8f1e455
--- /dev/null
+++ b/src/slalib/sun67.htx/change_end.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/change_end_right.gif b/src/slalib/sun67.htx/change_end_right.gif
new file mode 100644
index 0000000..409246c
--- /dev/null
+++ b/src/slalib/sun67.htx/change_end_right.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/contents.xbm b/src/slalib/sun67.htx/contents.xbm
new file mode 100644
index 0000000..a3aed9f
--- /dev/null
+++ b/src/slalib/sun67.htx/contents.xbm
@@ -0,0 +1,12 @@
+#define contents_width 63
+#define contents_height 16
+static char contents_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xc0,0x01,0x00,0x08,0x00,0x00,0x01,0x00,0x20,0x02,0x00,0x08,0x00,
+ 0x00,0x01,0x00,0x20,0xe2,0x74,0x7c,0x9c,0x8e,0x8f,0x03,0x20,0x10,0x99,0x08,
+ 0x22,0x13,0x41,0x04,0x20,0x10,0x89,0x08,0x3e,0x11,0x81,0x03,0x20,0x12,0x89,
+ 0x08,0x02,0x11,0x01,0x04,0x20,0x12,0x89,0x88,0x22,0x11,0x51,0x04,0xc0,0xe1,
+ 0x9c,0x71,0x9c,0x33,0x8e,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/src/slalib/sun67.htx/contents_motif.gif b/src/slalib/sun67.htx/contents_motif.gif
new file mode 100644
index 0000000..7b3c904
--- /dev/null
+++ b/src/slalib/sun67.htx/contents_motif.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/cross_ref_motif.gif b/src/slalib/sun67.htx/cross_ref_motif.gif
new file mode 100644
index 0000000..4c074e1
--- /dev/null
+++ b/src/slalib/sun67.htx/cross_ref_motif.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/foot_motif.gif b/src/slalib/sun67.htx/foot_motif.gif
new file mode 100644
index 0000000..f29222a
--- /dev/null
+++ b/src/slalib/sun67.htx/foot_motif.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/footnode.html b/src/slalib/sun67.htx/footnode.html
new file mode 100644
index 0000000..b6bcb72
--- /dev/null
+++ b/src/slalib/sun67.htx/footnode.html
@@ -0,0 +1,224 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Footnotes</TITLE>
+<META NAME="description" CONTENT="Footnotes">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="previous" HREF="node228.html">
+<LINK REL="up" HREF="sun67.html">
+</HEAD>
+<BODY >
+<P><DL>
+<DT><A NAME="412">...SLALIB</A>
+<DD>The name isn't an acronym;
+it just stands for ``Subprogram Library&nbsp;A''.
+<PRE>.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+</PRE>
+<DT><A NAME="27724">...papers;</A>
+<DD>One frame not included in
+Figure&nbsp;1 is that of the Hipparcos catalogue. This is currently the
+best available implementation in the optical of the <I>International
+Celestial Reference System</I> (ICRS), which is based on extragalactic
+radio sources observed by VLBI. The distinction between FK5 J2000
+and Hipparcos coordinates only becomes important when accuracies of
+50&nbsp;mas or better are required. More details are given in
+Section&nbsp;4.14.
+<PRE>.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+</PRE>
+<DT><A NAME="27833">...<I>equinox</I>.</A>
+<DD>With
+the introduction of the International Celestial Reference System (ICRS), the
+connection between (i)&nbsp;star coordinates and (ii)&nbsp;the Earth's orientation
+and orbit has been broken. However, the orientation of the
+International Celestial Reference Frame (ICRF) axes was, for convenience,
+chosen to match J2000 FK5, and for most practical purposes ICRF coordinates
+(for example entries in the Hipparcos catalogue) can be regarded as
+synonymous with J2000 FK5. See Section 4.14 for further details.
+<PRE>.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+</PRE>
+<DT><A NAME="27903">...used.</A>
+<DD>An equinox is, however, not required for coordinates
+in the International Celestial Reference System. Such coordinates must
+be labelled simply ``ICRS'', or the specific catalogue can be mentioned,
+such as ``Hipparcos''; constructions such as ``Hipparcos, J2000'' are
+redundant and misleading.
+<PRE>.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+</PRE>
+<DT><A NAME="28038">...catalogues.</A>
+<DD>This was
+true until the inception of the International Celestial Reference
+System, which is based on the idea of axes locked into the
+distant background. The coordinates
+of the extragalactic sources which realize these
+axes have no individual significance; there is a ``no net rotation''
+condition which has to be satisfied each time any revisions take
+place.
+<PRE>.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+</PRE>
+</DL><ADDRESS>
+<I>SLALIB -- Positional Astronomy Library
+<BR>
+Starlink User Note 67
+<BR>
+P. T. Wallace
+<BR>
+12 October 1999
+<BR>
+E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/greenball.gif b/src/slalib/sun67.htx/greenball.gif
new file mode 100644
index 0000000..2ffbb22
--- /dev/null
+++ b/src/slalib/sun67.htx/greenball.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/icons.html b/src/slalib/sun67.htx/icons.html
new file mode 100644
index 0000000..d6b38c3
--- /dev/null
+++ b/src/slalib/sun67.htx/icons.html
@@ -0,0 +1,42 @@
+
+<FORM METHOD="POST" >
+<INPUT TYPE="submit" VALUE="Next">
+ <P>
+<INPUT TYPE="submit" VALUE="Previous">
+ <P>
+<INPUT TYPE="submit" VALUE="Up">
+ <P>
+<INPUT TYPE="submit" VALUE="Next Group">
+ <P>
+<INPUT TYPE="submit" VALUE="Previous Group">
+ <P>
+<INPUT TYPE="submit" VALUE="Contents">
+ <P>
+<INPUT TYPE="submit" VALUE="Index">
+ <P>
+<INPUT TYPE="submit" VALUE=" New ">
+ <P>
+<INPUT TYPE="submit" VALUE=" Deleted ">
+ <P>
+<INPUT TYPE="submit" VALUE="Browse">
+ <P>
+<INPUT TYPE="submit" VALUE="Search">
+ <P>
+<INPUT TYPE="submit" VALUE="Home">
+ <P>
+<INPUT TYPE="submit" VALUE="Image">
+ <P>
+<INPUT TYPE="submit" VALUE="a">
+
+ <P>
+
+<INPUT TYPE="checkbox" NAME="xx" VALUE="nil">
+<INPUT TYPE="checkbox" NAME="xx" VALUE="nil">
+<INPUT TYPE="checkbox" NAME="xx" VALUE="nil">
+
+
+</FORM>
+
+<IMG ALIGN=MIDDLE SRC="changebegin.gif" ALT="changeend"><P>
+
+<P><IMG ALIGN=MIDDLE SRC="changeend.gif" ALT="changeend">
diff --git a/src/slalib/sun67.htx/image.gif b/src/slalib/sun67.htx/image.gif
new file mode 100644
index 0000000..7e6cb1a
--- /dev/null
+++ b/src/slalib/sun67.htx/image.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/images.aux b/src/slalib/sun67.htx/images.aux
new file mode 100644
index 0000000..f23e546
--- /dev/null
+++ b/src/slalib/sun67.htx/images.aux
@@ -0,0 +1 @@
+\relax
diff --git a/src/slalib/sun67.htx/images.log b/src/slalib/sun67.htx/images.log
new file mode 100644
index 0000000..6a48021
--- /dev/null
+++ b/src/slalib/sun67.htx/images.log
@@ -0,0 +1,1727 @@
+This is TeX, Version 3.14159 (C version 6.1) (format=latex 97.3.17) 12 OCT 1999 16:11
+**./images.tex
+(images.tex
+LaTeX2e <1996/12/01> patch level 1
+Babel <v3.6h> and hyphenation patterns for american, german, loaded.
+
+(/usr/local/teTeX/texmf/tex/latex/base/article.cls
+Document Class: article 1996/10/31 v1.3u Standard LaTeX document class
+(/usr/local/teTeX/texmf/tex/latex/base/size11.clo
+File: size11.clo 1996/10/31 v1.3u Standard LaTeX file (size option)
+)
+\c@part=\count79
+\c@section=\count80
+\c@subsection=\count81
+\c@subsubsection=\count82
+\c@paragraph=\count83
+\c@subparagraph=\count84
+\c@figure=\count85
+\c@table=\count86
+\abovecaptionskip=\skip41
+\belowcaptionskip=\skip42
+\bibindent=\dimen102
+) (/home/user1/dec/ptw/hypertext/sun67_htx/html.sty) (/home/user1/dec/ptw/hyper
+text/sun67_htx/star2html.sty)
+! Undefined control sequence.
+l.42 \latex
+ {\renewcommand {\_}{{\tt\symbol{95}}}}
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+
+\oldspacing=\skip43
+(/home/user1/dec/ptw/hypertext/sun67_htx/star2html.sty)
+\sizebox=\box26
+\lthtmlwrite=\write3
+(images.aux)
+LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 350.
+LaTeX Font Info: ... okay on input line 350.
+LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 350.
+LaTeX Font Info: ... okay on input line 350.
+LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 350.
+LaTeX Font Info: ... okay on input line 350.
+LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 350.
+LaTeX Font Info: ... okay on input line 350.
+LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 350.
+LaTeX Font Info: ... okay on input line 350.
+LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 350.
+LaTeX Font Info: ... okay on input line 350.
+latex2htmlLength hsize=451.0pt
+latex2htmlLength vsize=715.72284pt
+latex2htmlLength hoffset=0.0pt
+latex2htmlLength voffset=0.0pt
+latex2htmlLength topmargin=0.0pt
+latex2htmlLength topskip=0.00002pt
+latex2htmlLength headheight=0.0pt
+latex2htmlLength headsep=0.0pt
+latex2htmlLength parskip=6.0pt plus 2.0pt minus 2.0pt
+latex2htmlLength oddsidemargin=0.0pt
+latex2htmlLength evensidemargin=0.0pt
+LaTeX Font Info: External font `cmex10' loaded for size
+(Font) <10.95> on input line 374.
+LaTeX Font Info: External font `cmex10' loaded for size
+(Font) <8> on input line 374.
+LaTeX Font Info: External font `cmex10' loaded for size
+(Font) <6> on input line 374.
+l2hSize :tex2html_wrap_inline417:7.62646pt::0.0pt::10.22507pt.
+[1
+
+
+]
+l2hSize :tex2html_wrap_inline419:7.62646pt::7.62646pt::18.74176pt.
+[2
+
+
+]
+l2hSize :tex2html_wrap_inline528:8.2125pt::8.2125pt::26.92624pt.
+[3
+
+
+]
+l2hSize :tex2html_wrap_inline786:10.13034pt::0.0pt::58.35004pt.
+[4
+
+
+]
+l2hSize :tex2html_wrap_inline788:7.07185pt::0.0pt::5.475pt.
+[5
+
+
+]
+l2hSize :tex2html_wrap_inline802:8.2125pt::8.2125pt::150.20139pt.
+[6
+
+
+]
+l2hSize :tex2html_wrap_inline806:8.2125pt::8.2125pt::155.67639pt.
+[7
+
+
+]
+l2hSize :tex2html_wrap_inline893:7.62646pt::7.62646pt::35.89854pt.
+[8
+
+
+]
+l2hSize :tex2html_wrap_inline1090:8.2125pt::8.2125pt::42.52638pt.
+[9
+
+
+]
+l2hSize :tex2html_wrap_inline1092:7.07185pt::0.0pt::10.95003pt.
+[10
+
+
+]
+l2hSize :tex2html_wrap_inline1094:8.2125pt::8.2125pt::117.90274pt.
+[11
+
+
+]
+l2hSize :tex2html_wrap_inline1098:9.12923pt::9.12923pt::122.6528pt.
+[12
+
+
+]
+l2hSize :tex2html_wrap_inline1102:8.2125pt::8.2125pt::32.18459pt.
+[13
+
+
+]
+l2hSize :tex2html_wrap_inline1104:8.2125pt::8.2125pt::26.10136pt.
+[14
+
+
+]
+l2hSize :tex2html_wrap_inline1106:8.2125pt::8.2125pt::26.10136pt.
+[15
+
+
+]
+l2hSize :tex2html_wrap_inline1373:8.2125pt::8.2125pt::19.4667pt.
+[16
+
+
+]
+l2hSize :tex2html_wrap_inline1375:13.58197pt::13.58197pt::46.33769pt.
+[17
+
+
+]
+l2hSize :tex2html_wrap_inline1377:7.07185pt::7.07185pt::24.33328pt.
+[18
+
+
+]
+l2hSize :tex2html_wrap_inline1701:7.48248pt::0.0pt::9.12502pt.
+[19
+
+
+]
+l2hSize :tex2html_wrap_inline1705:8.2125pt::8.2125pt::26.61958pt.
+[20
+
+
+]
+l2hSize :tex2html_wrap_inline1707:7.07185pt::7.07185pt::15.72293pt.
+[21
+
+
+]
+l2hSize :tex2html_wrap_inline1709:7.62646pt::0.0pt::15.70007pt.
+[22
+
+
+]
+l2hSize :tex2html_wrap_inline1711:7.60416pt::0.0pt::5.28107pt.
+[23
+
+
+]
+l2hSize :tex2html_wrap_inline1713:7.07185pt::0.0pt::7.04526pt.
+[24
+
+
+]
+l2hSize :tex2html_wrap_inline1715:10.13034pt::0.0pt::13.85803pt.
+[25
+
+
+]
+l2hSize :tex2html_wrap_inline1717:7.62646pt::7.62646pt::35.89854pt.
+[26
+
+
+]
+l2hSize :tex2html_wrap_inline1721:7.62646pt::0.0pt::10.22507pt.
+[27
+
+
+]
+l2hSize :tex2html_wrap_inline1725:8.2125pt::8.2125pt::42.40842pt.
+[28
+
+
+]
+l2hSize :tex2html_wrap_inline1729:8.2125pt::8.2125pt::26.18991pt.
+[29
+
+
+]
+l2hSize :tex2html_wrap_inline1745:7.07185pt::7.07185pt::8.5167pt.
+[30
+
+
+]
+l2hSize :tex2html_wrap_inline1747:7.4181pt::0.0pt::14.55948pt.
+[31
+
+
+]
+l2hSize :tex2html_wrap_inline1749:10.13034pt::0.0pt::13.85803pt.
+[32
+
+
+]
+l2hSize :tex2html_wrap_inline2524:7.62646pt::0.0pt::15.70007pt.
+[33
+
+
+]
+l2hSize :tex2html_wrap_inline2704:7.07185pt::7.07185pt::31.53958pt.
+[34
+
+
+]
+l2hSize :tex2html_wrap_inline2706:7.07185pt::7.07185pt::31.53958pt.
+[35
+
+
+]
+l2hSize :tex2html_wrap_inline2708:7.62646pt::0.0pt::15.70007pt.
+[36
+
+
+]
+l2hSize :tex2html_wrap_inline2710:7.62646pt::0.0pt::21.17508pt.
+[37
+
+
+]
+l2hSize :tex2html_wrap_inline2712:9.12923pt::0.0pt::56.14227pt.
+[38
+
+
+]
+l2hSize :tex2html_wrap_inline2716:7.62646pt::0.0pt::15.70007pt.
+[39
+
+
+]
+l2hSize :tex2html_wrap_inline2718:7.07185pt::7.07185pt::31.53958pt.
+[40
+
+
+]
+l2hSize :tex2html_wrap_inline2720:7.07185pt::7.07185pt::31.53958pt.
+[41
+
+
+]
+l2hSize :tex2html_wrap_inline2722:7.07185pt::7.07185pt::28.49791pt.
+[42
+
+
+]
+l2hSize :tex2html_wrap_inline2724:10.13034pt::0.0pt::15.1963pt.
+[43
+
+
+]
+l2hSize :tex2html_wrap_inline2726:7.07185pt::7.07185pt::33.97292pt.
+[44
+
+
+]
+l2hSize :tex2html_wrap_inline2728:8.2125pt::8.2125pt::33.97289pt.
+[45
+
+
+]
+l2hSize :tex2html_wrap_inline2867:8.2125pt::8.2125pt::23.86188pt.
+[46
+
+
+]
+l2hSize :tex2html_wrap_inline2869:7.07185pt::7.07185pt::15.15135pt.
+[47
+
+
+]
+l2hSize :tex2html_wrap_inline3016:7.07185pt::0.0pt::12.77495pt.
+[48
+
+
+]
+l2hSize :tex2html_wrap_inline3160:9.52922pt::0.0pt::10.6973pt.
+[49
+
+
+]
+l2hSize :tex2html_wrap_inline3380:8.2125pt::8.2125pt::37.06009pt.
+[50
+
+
+]
+l2hSize :tex2html_wrap_inline3493:8.2125pt::8.2125pt::69.25354pt.
+[51
+
+
+]
+l2hSize :tex2html_wrap_inline4117:7.07185pt::0.0pt::12.10966pt.
+[52
+
+
+]
+l2hSize :tex2html_wrap_inline4123:7.62646pt::0.0pt::21.17508pt.
+[53
+
+
+]
+l2hSize :tex2html_wrap_inline5205:9.52922pt::0.0pt::53.15852pt.
+[54
+
+
+]
+l2hSize :tex2html_wrap_inline5954:8.2125pt::8.2125pt::33.90187pt.
+[55
+
+
+]
+l2hSize :tex2html_wrap_inline5956:8.2125pt::8.2125pt::33.90187pt.
+[56
+
+
+]
+l2hSize :tex2html_wrap_inline5962:8.41812pt::8.41812pt::62.95944pt.
+[57
+
+
+]
+l2hSize :tex2html_wrap_inline5964:8.41812pt::8.41812pt::61.57301pt.
+[58
+
+
+]
+l2hSize :tex2html_wrap_inline5966:8.41812pt::0.0pt::49.32889pt.
+[59
+
+
+]
+l2hSize :tex2html_wrap_inline5968:8.41812pt::8.41812pt::48.33533pt.
+[60
+
+
+]
+l2hSize :tex2html_wrap_inline5970:8.41812pt::8.41812pt::190.55496pt.
+[61
+
+
+]
+l2hSize :tex2html_wrap_inline5972:8.41812pt::8.41812pt::190.05818pt.
+[62
+
+
+]
+l2hSize :tex2html_wrap_inline5974:8.41812pt::8.41812pt::197.9745pt.
+[63
+
+
+]
+l2hSize :tex2html_wrap_inline5976:8.41812pt::8.41812pt::197.08485pt.
+[64
+
+
+]
+l2hSize :tex2html_wrap_inline6230:7.60416pt::7.60416pt::16.45663pt.
+[65
+
+
+]
+l2hSize :tex2html_wrap_inline6232:7.07185pt::7.07185pt::27.31801pt.
+[66
+
+
+]
+l2hSize :tex2html_wrap_inline6347:7.07185pt::0.0pt::27.98332pt.
+[67
+
+
+]
+l2hSize :tex2html_wrap_inline6475:7.07185pt::7.07185pt::50.91757pt.
+[68
+
+
+]
+l2hSize :tex2html_wrap_inline6491:7.07185pt::7.07185pt::22.56413pt.
+[69
+
+
+]
+l2hSize :tex2html_wrap_inline6713:9.44032pt::0.0pt::9.67093pt.
+[70
+
+
+]
+l2hSize :tex2html_wrap_inline6717:7.48248pt::0.0pt::10.03752pt.
+[71
+
+
+]
+l2hSize :tex2html_wrap_inline7186:7.07185pt::0.0pt::3.04167pt.
+[72
+
+
+]
+l2hSize :tex2html_wrap_inline7188:7.07185pt::7.07185pt::26.52841pt.
+[73
+
+
+]
+l2hSize :tex2html_wrap_inline7358:10.13034pt::0.0pt::15.1963pt.
+[74
+
+
+]
+l2hSize :tex2html_wrap_inline7360:10.13034pt::0.0pt::9.7213pt.
+[75
+
+
+]
+l2hSize :tex2html_wrap_inline7362:10.13034pt::0.0pt::13.85803pt.
+[76
+
+
+]
+l2hSize :tex2html_wrap_inline7364:10.13034pt::0.0pt::13.85803pt.
+[77
+
+
+]
+l2hSize :tex2html_wrap_inline7366:10.13034pt::0.0pt::13.85803pt.
+[78
+
+
+]
+l2hSize :tex2html_wrap_inline7368:10.13034pt::0.0pt::15.1963pt.
+[79
+
+
+]
+l2hSize :tex2html_wrap_inline7370:10.13034pt::0.0pt::19.33304pt.
+[80
+
+
+]
+l2hSize :tex2html_wrap_inline7374:10.13034pt::0.0pt::19.33304pt.
+[81
+
+
+]
+l2hSize :tex2html_wrap_inline7376:10.13034pt::0.0pt::15.1963pt.
+[82
+
+
+]
+l2hSize :tex2html_wrap_inline7378:10.13034pt::0.0pt::13.85803pt.
+[83
+
+
+]
+l2hSize :tex2html_wrap_inline7465:7.07185pt::7.07185pt::8.5167pt.
+[84
+
+
+]
+l2hSize :tex2html_wrap_inline8210:8.2125pt::8.2125pt::25.7242pt.
+[85
+
+
+]
+l2hSize :tex2html_wrap_inline8382:7.4181pt::0.0pt::14.80284pt.
+[86
+
+
+]
+l2hSize :tex2html_wrap_inline8384:7.4181pt::0.0pt::18.53345pt.
+[87
+
+
+]
+l2hSize :tex2html_wrap_inline8386:10.13034pt::10.13034pt::33.32474pt.
+[88
+
+
+]
+l2hSize :tex2html_wrap_inline8848:7.07185pt::0.0pt::27.12018pt.
+[89
+
+
+]
+l2hSize :tex2html_wrap_inline8993:7.60416pt::7.60416pt::15.99092pt.
+[90
+
+
+]
+l2hSize :tex2html_wrap_inline8995:7.60416pt::7.60416pt::17.19296pt.
+[91
+
+
+]
+l2hSize :tex2html_wrap_inline9003:7.60416pt::7.60416pt::5.2944pt.
+[92
+
+
+]
+l2hSize :tex2html_wrap_inline9812:9.12923pt::9.12923pt::30.82797pt.
+[93
+
+
+]
+l2hSize :tex2html_wrap_inline9814:9.12923pt::9.12923pt::35.07803pt.
+[94
+
+
+]
+l2hSize :tex2html_wrap_inline9967:7.60416pt::7.60416pt::52.25188pt.
+[95
+
+
+]
+l2hSize :tex2html_wrap_inline10116:7.4181pt::0.0pt::20.03448pt.
+[96
+
+
+]
+l2hSize :tex2html_wrap_inline10118:7.4181pt::0.0pt::20.03448pt.
+[97
+
+
+]
+l2hSize :tex2html_wrap_inline10191:9.44032pt::9.44032pt::38.18771pt.
+[98
+
+
+]
+l2hSize :tex2html_wrap_inline10601:7.48248pt::0.0pt::7.90834pt.
+[99
+
+
+]
+l2hSize :tex2html_wrap_inline10603:7.07185pt::0.0pt::9.37218pt.
+[100
+
+
+]
+l2hSize :tex2html_wrap_inline10605:7.07185pt::0.0pt::7.20874pt.
+[101
+
+
+]
+l2hSize :tex2html_wrap_inline10625:7.07185pt::7.07185pt::9.93608pt.
+[102
+
+
+]
+l2hSize :tex2html_wrap_inline10627:7.07185pt::7.07185pt::11.39606pt.
+[103
+
+
+]
+l2hSize :tex2html_wrap_inline10629:7.07185pt::7.07185pt::24.37381pt.
+[104
+
+
+]
+l2hSize :tex2html_wrap_inline10633:7.60416pt::7.60416pt::7.5256pt.
+[105
+
+
+]
+l2hSize :tex2html_wrap_inline10663:8.2125pt::8.2125pt::53.76514pt.
+[106
+
+
+]
+l2hSize :tex2html_wrap_inline10697:8.2125pt::8.2125pt::59.24014pt.
+[107
+
+
+]
+l2hSize :tex2html_wrap_inline11178:7.60416pt::7.60416pt::39.92438pt.
+[108
+
+
+]
+l2hSize :tex2html_wrap_inline11337:8.2125pt::8.2125pt::62.61017pt.
+[109
+
+
+]
+l2hSize :tex2html_wrap_inline11339:10.13034pt::0.0pt::41.23306pt.
+[110
+
+
+]
+l2hSize :tex2html_wrap_inline11594:8.2125pt::8.2125pt::37.06009pt.
+[111
+
+
+]
+l2hSize :tex2html_wrap_inline11608:10.13034pt::0.0pt::24.80804pt.
+[112
+
+
+]
+l2hSize :tex2html_wrap_inline11828:8.2125pt::8.2125pt::40.43898pt.
+[113
+
+
+]
+l2hSize :tex2html_wrap_inline11830:8.2125pt::8.2125pt::33.28798pt.
+[114
+
+
+]
+l2hSize :tex2html_wrap_inline12099:7.31305pt::0.0pt::7.04526pt.
+[115
+
+
+]
+l2hSize :tex2html_wrap_inline12101:7.60416pt::0.0pt::30.6371pt.
+[116
+
+
+]
+l2hSize :tex2html_wrap_inline12103:7.62646pt::0.0pt::15.70007pt.
+[117
+
+
+]
+l2hSize :tex2html_wrap_inline12105:7.48248pt::0.0pt::16.17027pt.
+[118
+
+
+]
+l2hSize :tex2html_wrap_inline13294:9.44032pt::0.0pt::56.2022pt.
+[119
+
+
+]
+l2hSize :tex2html_wrap_inline13534:7.07185pt::0.0pt::61.44164pt.
+[120
+
+
+]
+l2hSize :tex2html_wrap_inline13611:8.2125pt::8.2125pt::27.3749pt.
+[121
+
+
+]
+l2hSize :tex2html_wrap_inline14280:7.51291pt::0.0pt::11.95369pt.
+[122
+
+
+]
+l2hSize :tex2html_wrap_inline14410:7.07185pt::7.07185pt::15.08926pt.
+[123
+
+
+]
+l2hSize :tex2html_wrap_inline15250:10.13034pt::0.0pt::20.67131pt.
+[124
+
+
+]
+l2hSize :tex2html_wrap_inline15252:10.13034pt::0.0pt::19.33304pt.
+[125
+
+
+]
+l2hSize :tex2html_wrap_inline15578:10.13034pt::0.0pt::15.1963pt.
+[126
+
+
+]
+l2hSize :tex2html_wrap_inline15582:10.13034pt::0.0pt::9.7213pt.
+[127
+
+
+]
+l2hSize :tex2html_wrap_inline16974:9.12923pt::9.12923pt::67.61365pt.
+[128
+
+
+]
+l2hSize :tex2html_wrap_inline16980:7.07185pt::7.07185pt::5.66132pt.
+[129
+
+
+]
+l2hSize :tex2html_wrap_inline19044:10.13034pt::0.0pt::9.7213pt.
+[130
+
+
+]
+l2hSize :tex2html_wrap_inline19046:10.13034pt::0.0pt::9.7213pt.
+[131
+
+
+]
+l2hSize :tex2html_wrap_inline19048:10.13034pt::0.0pt::9.7213pt.
+[132
+
+
+]
+l2hSize :tex2html_wrap_inline19050:10.13034pt::0.0pt::15.1963pt.
+[133
+
+
+]
+l2hSize :tex2html_wrap_inline19052:10.13034pt::0.0pt::15.1963pt.
+[134
+
+
+]
+l2hSize :tex2html_wrap_inline19054:10.13034pt::0.0pt::15.1963pt.
+[135
+
+
+]
+l2hSize :tex2html_wrap_inline19056:10.13034pt::0.0pt::15.1963pt.
+[136
+
+
+]
+l2hSize :tex2html_wrap_inline19060:10.13034pt::0.0pt::13.85803pt.
+[137
+
+
+]
+l2hSize :tex2html_wrap_inline19064:8.2125pt::8.2125pt::117.10414pt.
+[138
+
+
+]
+l2hSize :tex2html_wrap_inline19834:7.62646pt::0.0pt::21.17508pt.
+[139
+
+
+]
+l2hSize :tex2html_wrap_inline20108:10.13034pt::0.0pt::9.7213pt.
+[140
+
+
+]
+l2hSize :tex2html_wrap_inline20114:10.13034pt::0.0pt::20.67131pt.
+[141
+
+
+]
+l2hSize :tex2html_wrap_inline20116:10.13034pt::0.0pt::26.14632pt.
+[142
+
+
+]
+l2hSize :tex2html_wrap_inline20952:7.07185pt::7.07185pt::30.96794pt.
+[143
+
+
+]
+l2hSize :tex2html_wrap_inline21527:8.2125pt::8.2125pt::33.95927pt.
+[144
+
+
+]
+l2hSize :tex2html_wrap_inline21604:7.07185pt::7.07185pt::46.40807pt.
+[145
+
+
+]
+l2hSize :tex2html_wrap_inline21862:7.07185pt::7.07185pt::6.59792pt.
+[146
+
+
+]
+l2hSize :tex2html_wrap_inline21866:7.07185pt::7.07185pt::13.9917pt.
+[147
+
+
+]
+l2hSize :tex2html_wrap_inline22333:9.12923pt::9.12923pt::108.07462pt.
+[148
+
+
+]
+l2hSize :tex2html_wrap_inline22335:7.60416pt::7.60416pt::5.59856pt.
+[149
+
+
+]
+l2hSize :tex2html_wrap_inline22337:7.60416pt::7.60416pt::14.72357pt.
+[150
+
+
+]
+l2hSize :tex2html_wrap_inline22343:7.60416pt::7.60416pt::23.24022pt.
+[151
+
+
+]
+l2hSize :tex2html_wrap_inline22345:9.12923pt::9.12923pt::27.99028pt.
+[152
+
+
+]
+l2hSize :tex2html_wrap_inline22353:9.12923pt::0.0pt::34.47794pt.
+[153
+
+
+]
+l2hSize :tex2html_wrap_inline22355:7.62646pt::0.0pt::15.70007pt.
+[154
+
+
+]
+l2hSize :tex2html_wrap_inline22357:9.12923pt::0.0pt::34.47794pt.
+[155
+
+
+]
+l2hSize :tex2html_wrap_inline22359:7.62646pt::0.0pt::27.25838pt.
+[156
+
+
+]
+l2hSize :tex2html_wrap_inline22363:7.62646pt::7.62646pt::35.89854pt.
+[157
+
+
+]
+l2hSize :tex2html_wrap_inline22365:10.13034pt::0.0pt::19.33304pt.
+[158
+
+
+]
+l2hSize :tex2html_wrap_inline22367:7.62646pt::7.62646pt::35.89854pt.
+[159
+
+
+]
+l2hSize :tex2html_wrap_inline22371:7.62646pt::7.62646pt::35.89854pt.
+[160
+
+
+]
+l2hSize :tex2html_wrap_inline22628:7.62646pt::0.0pt::25.43341pt.
+[161
+
+
+]
+l2hSize :tex2html_wrap_inline22638:7.62646pt::0.0pt::15.70007pt.
+[162
+
+
+]
+l2hSize :tex2html_wrap_inline22640:7.62646pt::0.0pt::15.70007pt.
+[163
+
+
+]
+l2hSize :tex2html_wrap_inline22642:7.62646pt::0.0pt::15.70007pt.
+[164
+
+
+]
+l2hSize :tex2html_wrap_inline22656:7.62646pt::7.62646pt::24.21677pt.
+[165
+
+
+]
+l2hSize :tex2html_wrap_inline22658:7.62646pt::7.62646pt::24.21677pt.
+[166
+
+
+]
+l2hSize :tex2html_wrap_inline22660:7.62646pt::0.0pt::21.17508pt.
+[167
+
+
+]
+l2hSize :tex2html_wrap_inline22666:7.07185pt::7.07185pt::21.19794pt.
+[168
+
+
+]
+l2hSize :tex2html_wrap_inline22678:9.12923pt::0.0pt::55.84569pt.
+[169
+
+
+]
+l2hSize :tex2html_wrap_inline22690:7.62646pt::0.0pt::10.22507pt.
+[170
+
+
+]
+l2hSize :tex2html_wrap_inline22698:9.12923pt::0.0pt::20.56676pt.
+[171
+
+
+]
+l2hSize :tex2html_wrap_inline22702:8.2125pt::8.2125pt::59.514pt.
+[172
+
+
+]
+l2hSize :tex2html_wrap_inline22706:7.60416pt::7.60416pt::6.77151pt.
+[173
+
+
+]
+l2hSize :tex2html_wrap_inline22933:7.62646pt::0.0pt::15.70007pt.
+[174
+
+
+]
+l2hSize :tex2html_wrap_inline22935:10.13034pt::0.0pt::19.33304pt.
+[175
+
+
+]
+l2hSize :tex2html_wrap_inline22947:7.62646pt::0.0pt::15.70007pt.
+[176
+
+
+]
+l2hSize :tex2html_wrap_inline22949:7.62646pt::0.0pt::27.25838pt.
+[177
+
+
+]
+l2hSize :tex2html_wrap_inline22955:10.13034pt::0.0pt::13.85803pt.
+[178
+
+
+]
+l2hSize :tex2html_wrap_inline22957:7.62646pt::0.0pt::15.70007pt.
+[179
+
+
+]
+l2hSize :tex2html_wrap_inline22959:8.2125pt::8.2125pt::48.445pt.
+[180
+
+
+]
+l2hSize :tex2html_wrap_inline22961:8.2125pt::8.2125pt::48.7492pt.
+[181
+
+
+]
+l2hSize :tex2html_wrap_inline23162:7.62646pt::0.0pt::15.70007pt.
+[182
+
+
+]
+l2hSize :tex2html_wrap_inline23164:7.62646pt::7.62646pt::35.89854pt.
+[183
+
+
+]
+l2hSize :tex2html_wrap_inline23168:7.60416pt::7.60416pt::16.9658pt.
+[184
+
+
+]
+l2hSize :tex2html_wrap_inline23172:10.13034pt::0.0pt::13.85803pt.
+[185
+
+
+]
+l2hSize :tex2html_wrap_inline23174:7.62646pt::0.0pt::15.70007pt.
+[186
+
+
+]
+l2hSize :tex2html_wrap_inline23176:10.13034pt::0.0pt::13.85803pt.
+[187
+
+
+]
+l2hSize :tex2html_wrap_inline23178:7.62646pt::0.0pt::15.70007pt.
+[188
+
+
+]
+l2hSize :tex2html_wrap_inline23180:10.13034pt::0.0pt::13.85803pt.
+[189
+
+
+]
+l2hSize :tex2html_wrap_inline23182:7.62646pt::0.0pt::15.70007pt.
+[190
+
+
+]
+l2hSize :tex2html_wrap_inline23186:7.62646pt::0.0pt::15.70007pt.
+[191
+
+
+]
+l2hSize :tex2html_wrap_inline23188:10.13034pt::0.0pt::9.7213pt.
+[192
+
+
+]
+l2hSize :tex2html_wrap_inline23190:7.62646pt::0.0pt::15.70007pt.
+[193
+
+
+]
+l2hSize :tex2html_wrap_inline23194:7.62646pt::0.0pt::15.70007pt.
+[194
+
+
+]
+l2hSize :tex2html_wrap_inline23196:10.13034pt::0.0pt::15.1963pt.
+[195
+
+
+]
+l2hSize :tex2html_wrap_inline23198:7.62646pt::0.0pt::15.70007pt.
+[196
+
+
+]
+l2hSize :tex2html_wrap_inline23200:10.13034pt::0.0pt::20.67131pt.
+[197
+
+
+]
+l2hSize :tex2html_wrap_inline23202:7.62646pt::0.0pt::15.70007pt.
+[198
+
+
+]
+l2hSize :tex2html_wrap_inline23204:10.13034pt::0.0pt::20.67131pt.
+[199
+
+
+]
+l2hSize :tex2html_wrap_inline23206:7.62646pt::0.0pt::15.70007pt.
+[200
+
+
+]
+l2hSize :tex2html_wrap_inline23208:10.13034pt::0.0pt::20.67131pt.
+[201
+
+
+]
+l2hSize :tex2html_wrap_inline23212:10.13034pt::0.0pt::26.14632pt.
+[202
+
+
+]
+l2hSize :tex2html_wrap_inline23214:7.62646pt::0.0pt::15.70007pt.
+[203
+
+
+]
+l2hSize :tex2html_wrap_inline23216:10.13034pt::0.0pt::26.14632pt.
+[204
+
+
+]
+l2hSize :tex2html_wrap_inline23220:7.62646pt::0.0pt::15.70007pt.
+[205
+
+
+]
+l2hSize :tex2html_wrap_inline23222:10.13034pt::0.0pt::26.14632pt.
+[206
+
+
+]
+l2hSize :tex2html_wrap_inline23228:7.62646pt::7.62646pt::35.89854pt.
+[207
+
+
+]
+l2hSize :tex2html_wrap_inline23469:7.62646pt::7.62646pt::35.89854pt.
+[208
+
+
+]
+l2hSize :tex2html_wrap_inline23471:7.62646pt::7.62646pt::35.89854pt.
+[209
+
+
+]
+l2hSize :displaymath23457:31.00029pt::0.0pt::451.0pt.
+[210
+
+
+]
+l2hSize :tex2html_wrap_inline23475:7.62646pt::7.62646pt::73.69403pt.
+[211
+
+
+]
+l2hSize :tex2html_wrap_inline23495:10.13034pt::0.0pt::13.85803pt.
+[212
+
+
+]
+l2hSize :tex2html_wrap_inline23499:10.13034pt::0.0pt::13.85803pt.
+[213
+
+
+]
+l2hSize :tex2html_wrap_inline23503:10.13034pt::0.0pt::13.85803pt.
+[214
+
+
+]
+l2hSize :tex2html_wrap_inline23507:10.13034pt::0.0pt::13.85803pt.
+[215
+
+
+]
+l2hSize :tex2html_wrap_inline23511:10.13034pt::0.0pt::13.85803pt.
+[216
+
+
+]
+l2hSize :tex2html_wrap_inline23515:10.13034pt::0.0pt::13.85803pt.
+[217
+
+
+]
+l2hSize :tex2html_wrap_inline23523:10.13034pt::0.0pt::15.1963pt.
+[218
+
+
+]
+l2hSize :tex2html_wrap_inline23527:10.13034pt::0.0pt::15.1963pt.
+[219
+
+
+]
+l2hSize :tex2html_wrap_inline23531:10.13034pt::0.0pt::15.1963pt.
+[220
+
+
+]
+l2hSize :tex2html_wrap_inline23537:10.13034pt::0.0pt::20.67131pt.
+[221
+
+
+]
+l2hSize :tex2html_wrap_inline23720:9.44032pt::0.0pt::41.48557pt.
+[222
+
+
+]
+l2hSize :tex2html_wrap_inline23722:9.44032pt::0.0pt::32.47714pt.
+[223
+
+
+]
+l2hSize :tex2html_wrap_inline23896:9.44032pt::9.44032pt::97.5711pt.
+[224
+
+
+]
+l2hSize :tex2html_wrap_inline23995:9.52922pt::9.52922pt::86.78186pt.
+[225
+
+
+]
+l2hSize :tex2html_wrap_inline24798:7.07185pt::7.07185pt::15.08926pt.
+[226
+
+
+]
+l2hSize :tex2html_wrap_inline24800:7.07185pt::7.07185pt::30.78673pt.
+[227
+
+
+]
+l2hSize :tex2html_wrap_inline24802:7.07185pt::7.07185pt::29.57008pt.
+[228
+
+
+]
+l2hSize :tex2html_wrap_inline24806:7.07185pt::7.07185pt::34.20212pt.
+[229
+
+
+]
+l2hSize :tex2html_wrap_inline25275:8.2125pt::8.2125pt::45.81715pt.
+[230
+
+
+]
+l2hSize :tex2html_wrap_inline25277:8.2125pt::8.2125pt::23.8652pt.
+[231
+
+
+]
+l2hSize :tex2html_wrap_inline26731:7.62646pt::0.0pt::14.90933pt.
+[232
+
+
+]
+l2hSize :tex2html_wrap_inline26733:7.62646pt::0.0pt::15.70007pt.
+[233
+
+
+]
+l2hSize :tex2html_wrap_inline27323:7.07185pt::7.07185pt::21.843pt.
+[234
+
+
+]
+l2hSize :tex2html_wrap_inline27383:7.62646pt::0.0pt::15.70007pt.
+[235
+
+
+]
+l2hSize :tex2html_wrap_inline27391:7.62646pt::7.62646pt::18.74176pt.
+[236
+
+
+]
+l2hSize :tex2html_wrap_inline27397:9.52922pt::0.0pt::73.81409pt.
+[237
+
+
+]
+l2hSize :tex2html_wrap_inline27464:8.2125pt::8.2125pt::28.3939pt.
+[238
+
+
+]
+l2hSize :tex2html_wrap_inline27478:8.2125pt::8.2125pt::64.43513pt.
+[239
+
+
+]
+l2hSize :tex2html_wrap_inline27484:7.51291pt::0.0pt::9.65723pt.
+[240
+
+
+]
+l2hSize :tex2html_wrap_inline27486:7.51291pt::0.0pt::15.81656pt.
+[241
+
+
+]
+l2hSize :tex2html_wrap_inline27488:7.51291pt::0.0pt::15.81656pt.
+[242
+
+
+]
+l2hSize :tex2html_wrap_inline27490:7.51291pt::7.51291pt::61.97366pt.
+[243
+
+
+]
+l2hSize :tex2html_wrap_inline27492:8.2125pt::8.2125pt::60.757pt.
+[244
+
+
+]
+l2hSize :tex2html_wrap_inline27494:7.60416pt::0.0pt::13.99544pt.
+[245
+
+
+]
+l2hSize :tex2html_wrap_inline27498:7.60416pt::0.0pt::60.23245pt.
+[246
+
+
+]
+l2hSize :tex2html_wrap_inline27504:7.60416pt::0.0pt::41.02058pt.
+[247
+
+
+]
+l2hSize :tex2html_wrap_inline27506:7.60416pt::0.0pt::39.80392pt.
+[248
+
+
+]
+l2hSize :tex2html_wrap_inline27512:7.60416pt::0.0pt::30.48125pt.
+[249
+
+
+]
+l2hSize :tex2html_wrap_inline27514:9.12923pt::9.12923pt::57.07048pt.
+[250
+
+
+]
+l2hSize :tex2html_wrap_inline27518:7.07185pt::0.0pt::8.5167pt.
+[251
+
+
+]
+l2hSize :tex2html_wrap_inline27524:10.20264pt::10.20264pt::44.62119pt.
+[252
+
+
+]
+l2hSize :tex2html_wrap_inline27750:7.60416pt::7.60416pt::18.02567pt.
+[253
+
+
+]
+l2hSize :tex2html_wrap_inline27752:9.44032pt::9.44032pt::28.45444pt.
+[254
+
+
+]
+l2hSize :figure27550:643.66522pt::0.0pt::451.0pt.
+[255
+
+
+]
+l2hSize :tex2html_wrap_inline27878:7.62646pt::0.0pt::20.38434pt.
+[256
+
+
+]
+l2hSize :tex2html_wrap_inline27888:7.07185pt::0.0pt::4.44464pt.
+[257
+
+
+]
+l2hSize :tex2html_wrap_inline27890:10.13034pt::0.0pt::30.28305pt.
+[258
+
+
+]
+l2hSize :tex2html_wrap_inline27892:8.2125pt::8.2125pt::32.84998pt.
+[259
+
+
+]
+l2hSize :tex2html_wrap_inline27894:7.62646pt::0.0pt::14.90933pt.
+[260
+
+
+]
+l2hSize :tex2html_wrap_inline27923:10.13034pt::0.0pt::15.1963pt.
+[261
+
+
+]
+l2hSize :tex2html_wrap_inline27927:9.52922pt::0.0pt::68.33908pt.
+[262
+
+
+]
+l2hSize :tex2html_wrap_inline27929:10.13034pt::10.13034pt::66.86673pt.
+[263
+
+
+]
+l2hSize :tex2html_wrap_inline27959:8.2125pt::8.2125pt::34.6663pt.
+[264
+
+
+]
+l2hSize :tex2html_wrap_inline28022:10.13034pt::0.0pt::19.33304pt.
+[265
+
+
+]
+l2hSize :tex2html_wrap_inline28106:7.07185pt::7.07185pt::35.67386pt.
+[266
+
+
+]
+l2hSize :tex2html_wrap_inline28108:7.4181pt::0.0pt::41.93451pt.
+[267
+
+
+]
+l2hSize :tex2html_wrap_inline28112:7.4181pt::0.0pt::41.93451pt.
+[268
+
+
+]
+l2hSize :tex2html_wrap_inline28114:7.31305pt::7.31305pt::36.30606pt.
+[269
+
+
+]
+l2hSize :tex2html_wrap_inline28116:7.4181pt::0.0pt::41.93451pt.
+[270
+
+
+]
+l2hSize :tex2html_wrap_inline28118:8.2125pt::8.2125pt::64.15625pt.
+[271
+
+
+]
+l2hSize :tex2html_wrap_inline28120:7.4181pt::0.0pt::41.93451pt.
+[272
+
+
+]
+l2hSize :tex2html_wrap_inline28122:7.07185pt::7.07185pt::37.52272pt.
+[273
+
+
+]
+l2hSize :tex2html_wrap_inline28124:7.4181pt::0.0pt::41.93451pt.
+[274
+
+
+]
+l2hSize :tex2html_wrap_inline28126:8.2125pt::8.2125pt::55.03122pt.
+[275
+
+
+]
+l2hSize :tex2html_wrap_inline28128:7.07185pt::7.07185pt::36.10065pt.
+[276
+
+
+]
+l2hSize :tex2html_wrap_inline28130:10.13034pt::0.0pt::35.75806pt.
+[277
+
+
+]
+l2hSize :tex2html_wrap_inline28134:10.13034pt::0.0pt::35.75806pt.
+[278
+
+
+]
+l2hSize :tex2html_wrap_inline28136:8.2125pt::8.2125pt::45.43098pt.
+[279
+
+
+]
+l2hSize :tex2html_wrap_inline28138:10.13034pt::0.0pt::35.75806pt.
+[280
+
+
+]
+l2hSize :tex2html_wrap_inline28140:7.31305pt::7.31305pt::36.30606pt.
+[281
+
+
+]
+l2hSize :tex2html_wrap_inline28142:10.13034pt::0.0pt::35.75806pt.
+[282
+
+
+]
+l2hSize :tex2html_wrap_inline28146:10.13034pt::0.0pt::35.75806pt.
+[283
+
+
+]
+l2hSize :tex2html_wrap_inline28148:7.60416pt::0.0pt::27.24184pt.
+[284
+
+
+]
+l2hSize :tex2html_wrap_inline28214:7.07185pt::0.0pt::18.60356pt.
+[285
+
+
+]
+l2hSize :tex2html_wrap_inline28216:9.52922pt::0.0pt::68.33908pt.
+[286
+
+
+]
+l2hSize :tex2html_wrap_inline28218:7.60416pt::0.0pt::16.83937pt.
+[287
+
+
+]
+l2hSize :tex2html_wrap_inline28220:10.13034pt::10.13034pt::66.86673pt.
+[288
+
+
+]
+l2hSize :tex2html_wrap_inline28222:7.07185pt::7.07185pt::24.11555pt.
+[289
+
+
+]
+l2hSize :tex2html_wrap_inline28224:7.4181pt::7.4181pt::39.50119pt.
+[290
+
+
+]
+l2hSize :tex2html_wrap_inline28228:7.07185pt::7.07185pt::22.71738pt.
+[291
+
+
+]
+l2hSize :tex2html_wrap_inline28230:10.13034pt::10.13034pt::33.32474pt.
+[292
+
+
+]
+l2hSize :tex2html_wrap_inline28234:10.13034pt::0.0pt::24.80804pt.
+[293
+
+
+]
+l2hSize :tex2html_wrap_inline28274:10.13034pt::0.0pt::19.33304pt.
+[294
+
+
+]
+l2hSize :tex2html_wrap_inline28276:10.13034pt::0.0pt::19.33304pt.
+[295
+
+
+]
+l2hSize :tex2html_wrap_inline28278:7.62646pt::0.0pt::15.70007pt.
+[296
+
+
+]
+l2hSize :tex2html_wrap_inline28282:7.62646pt::7.62646pt::34.36441pt.
+[297
+
+
+]
+l2hSize :tex2html_wrap_inline28386:7.60416pt::0.0pt::5.44458pt.
+[298
+
+
+]
+l2hSize :displaymath28366:14.51251pt::0.0pt::451.0pt.
+[299
+
+
+]
+l2hSize :tex2html_wrap_inline28394:7.60416pt::7.60416pt::50.96434pt.
+[300
+
+
+]
+l2hSize :tex2html_wrap_inline28408:7.62646pt::0.0pt::14.90933pt.
+[301
+
+
+]
+l2hSize :displaymath28367:15.72917pt::0.0pt::451.0pt.
+[302
+
+
+]
+l2hSize :tex2html_wrap_inline28412:7.60416pt::7.60416pt::17.91302pt.
+[303
+
+
+]
+l2hSize :tex2html_wrap_inline28420:10.13034pt::0.0pt::15.1963pt.
+[304
+
+
+]
+l2hSize :tex2html_wrap_inline28422:10.13034pt::10.13034pt::27.84973pt.
+[305
+
+
+]
+l2hSize :displaymath28368:27.78561pt::0.0pt::451.0pt.
+[306
+
+
+]
+l2hSize :tex2html_wrap_inline28444:7.07185pt::7.07185pt::32.63718pt.
+[307
+
+
+]
+l2hSize :tex2html_wrap_inline28549:9.52922pt::0.0pt::62.86407pt.
+[308
+
+
+]
+l2hSize :tex2html_wrap_inline28551:9.52922pt::0.0pt::62.86407pt.
+[309
+
+
+]
+l2hSize :tex2html_wrap_inline28555:7.60416pt::7.60416pt::39.40604pt.
+[310
+
+
+]
+l2hSize :tex2html_wrap_inline28561:7.4181pt::0.0pt::30.9845pt.
+[311
+
+
+]
+l2hSize :tex2html_wrap_inline28567:7.4181pt::0.0pt::30.9845pt.
+[312
+
+
+]
+l2hSize :tex2html_wrap_inline28569:7.4181pt::0.0pt::30.9845pt.
+[313
+
+
+]
+l2hSize :tex2html_wrap_inline28571:7.48248pt::7.48248pt::76.49782pt.
+[314
+
+
+]
+l2hSize :tex2html_wrap_inline28573:7.48248pt::0.0pt::17.03336pt.
+[315
+
+
+]
+l2hSize :tex2html_wrap_inline28650:10.13034pt::0.0pt::9.7213pt.
+[316
+
+
+]
+l2hSize :tex2html_wrap_inline28656:7.07185pt::7.07185pt::24.94171pt.
+[317
+
+
+]
+l2hSize :tex2html_wrap_inline28664:7.62646pt::0.0pt::10.22507pt.
+[318
+
+
+]
+l2hSize :tex2html_wrap_inline28666:10.13034pt::0.0pt::9.7213pt.
+[319
+
+
+]
+l2hSize :tex2html_wrap_inline28668:9.52922pt::0.0pt::31.05571pt.
+[320
+
+
+]
+l2hSize :tex2html_wrap_inline28728:7.48248pt::7.48248pt::52.47244pt.
+[321
+
+
+]
+l2hSize :tex2html_wrap_inline28740:7.48248pt::7.48248pt::56.62431pt.
+[322
+
+
+]
+l2hSize :tex2html_wrap_inline28752:7.48248pt::7.48248pt::37.80916pt.
+[323
+
+
+]
+l2hSize :tex2html_wrap_inline28769:7.07185pt::0.0pt::22.50832pt.
+[324
+
+
+]
+l2hSize :tex2html_wrap_inline28861:7.48248pt::7.48248pt::51.50961pt.
+[325
+
+
+]
+l2hSize :tex2html_wrap_inline28863:7.48248pt::7.48248pt::46.0346pt.
+[326
+
+
+]
+l2hSize :tex2html_wrap_inline28865:7.48248pt::7.48248pt::51.50961pt.
+[327
+
+
+]
+l2hSize :tex2html_wrap_inline28867:7.48248pt::7.48248pt::51.50961pt.
+[328
+
+
+]
+l2hSize :tex2html_wrap_inline28869:7.07185pt::0.0pt::35.24144pt.
+[329
+
+
+]
+l2hSize :tex2html_wrap_inline28871:7.07185pt::7.07185pt::46.2333pt.
+[330
+
+
+] (images.aux) )
+Here is how much of TeX's memory you used:
+ 351 strings out of 10906
+ 3619 string characters out of 71914
+ 61584 words of memory out of 262141
+ 3274 multiletter control sequences out of 9500
+ 7308 words of font info for 26 fonts, out of 150000 for 255
+ 14 hyphenation exceptions out of 607
+ 21i,13n,21p,242b,498s stack positions out of 300i,40n,60p,3000b,4000s
+
+Output written on images.dvi (330 pages, 51052 bytes).
diff --git a/src/slalib/sun67.htx/images.pl b/src/slalib/sun67.htx/images.pl
new file mode 100644
index 0000000..498f422
--- /dev/null
+++ b/src/slalib/sun67.htx/images.pl
@@ -0,0 +1,1686 @@
+# LaTeX2HTML 97.1 (release) (July 13th, 1997)
+# Associate images original text with physical files.
+
+
+$key = q/{_inline}1hspace-0.05em^'hspace-0.1em'hspace-0.4em.74{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="31" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img294.gif"
+ ALT="$1\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.74$">|;
+
+$key = q/{_inline}cosdeltaE{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="48" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img249.gif"
+ ALT="$\cos \delta E$">|;
+
+$key = q/{_inline}0^rmshspace-0.3em.03{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="32" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img96.gif"
+ ALT="$0^{\rm s}\hspace{-0.3em}.03$">|;
+
+$key = q/{_inline}0leqx<1{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="72" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img145.gif"
+ ALT="$0 \leq x < 1$">|;
+
+$key = q/{_inline}zeta=80^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="56" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img208.gif"
+ ALT="$\zeta=80^\circ$">|;
+
+$key = q/{_inline}-75^circ,59^',27^''.2{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="102" HEIGHT="35" ALIGN="MIDDLE" BORDER="0"
+ SRC="img288.gif"
+ ALT="$-75^{\circ}\,59^{'}\,27^{''}.2$">|;
+
+$key = q/{_inline}150hspace-0.05em^'hspace-0.1em'{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="33" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img197.gif"
+ ALT="$150\hspace{-0.05em}^{'\hspace{-0.1em}'}$">|;
+
+$key = q/{_inline}2hspace-0.05em^'hspace-0.1em'hspace-0.4em.3{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img78.gif"
+ ALT="$2\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.3$">|;
+
+$key = q/{_inline}1hspace-0.05em^'hspace-0.1em'hspace-0.4em.6{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img189.gif"
+ ALT="$1\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.6$">|;
+
+$key = q/{displaymath}zeta_vacapproxzeta_obs+Atanzeta_obs+Btan^3zeta_obs{displaymath}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="255" HEIGHT="27"
+ SRC="img302.gif"
+ ALT="\begin{displaymath}
+\zeta _{vac} \approx \zeta _{obs}
+ + A \tan \zeta _{obs}
+ + B \tan ^{3}\zeta _{obs} \end{displaymath}">|;
+
+$key = q/{_inline}1000times20{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="72" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img330.gif"
+ ALT="$1000\times20$">|;
+
+$key = q/{_inline}times3602pi{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="66" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img9.gif"
+ ALT="$\times 360/2\pi$">|;
+
+$key = q/{_inline}21hspace-0.05em^'hspace-0.1em'{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="25" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img218.gif"
+ ALT="$21\hspace{-0.05em}^{'\hspace{-0.1em}'}$">|;
+
+$key = q/{_inline}12^h,07^m,58^s.09{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="104" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img262.gif"
+ ALT="$12^{h}\,07^{m}\,58^{s}.09$">|;
+
+$key = q/{_inline}81^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img186.gif"
+ ALT="$81^\circ$">|;
+
+$key = q/{_inline}omega{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img101.gif"
+ ALT="$\omega$">|;
+
+$key = q/{_inline}30^rmm{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="30" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img87.gif"
+ ALT="$30^{\rm m}$">|;
+
+$key = q/{_inline}89^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img200.gif"
+ ALT="$89^\circ$">|;
+
+$key = q/{displaymath}zeta_obsapproxzeta_vac-fracAtanzeta_vac+Btan^3zeta_vac1+(A+3Btan^2zeta_vac)sec^2zeta_vac{displaymath}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="313" HEIGHT="45"
+ SRC="img306.gif"
+ ALT="\begin{displaymath}
+\zeta _{obs} \approx \zeta _{vac}
+ - \frac{A \tan \zeta _{va...
+ ...
+ {1 + ( A + 3 B \tan ^{2}\zeta _{vac} ) \sec ^{2}\zeta _{vac}}\end{displaymath}">|;
+
+$key = q/{_inline}1^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="18" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img318.gif"
+ ALT="$1^\circ$">|;
+
+$key = q/{_inline}=Deltapsicosepsilon{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="78" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img300.gif"
+ ALT="$=\Delta\psi\cos\epsilon$">|;
+
+$key = q/{_inline}(3times3){_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="51" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img259.gif"
+ ALT="$(3\times3)$">|;
+
+$key = q/{_inline}epsilon{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="9" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img257.gif"
+ ALT="$\epsilon$">|;
+
+$key = q/{_inline}290^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="34" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img37.gif"
+ ALT="$290^\circ$">|;
+
+$key = q/{_inline}+1^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="30" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img236.gif"
+ ALT="$+1^{\circ}$">|;
+
+$key = q/{_inline}20,murmm{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="45" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img42.gif"
+ ALT="$20\,\mu{\rm m}$">|;
+
+$key = q/{_inline}0hspace-0.05em^'hspace-0.1em'hspace-0.4em.6{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img137.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.6$">|;
+
+$key = q/{_inline}7hspace-0.05em^'hspace-0.1em'hspace-0.4em.1{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img217.gif"
+ ALT="$7\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.1$">|;
+
+$key = q/{_inline}C_3!=!-10.0{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="79" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img327.gif"
+ ALT="$C_3\!=\!-10.0$">|;
+
+$key = q/{_inline}~sinalpha+({_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="70" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img279.gif"
+ ALT="$~\sin \alpha +
+ ($">|;
+
+$key = q/{_inline}xi{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="10" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img92.gif"
+ ALT="$\xi$">|;
+
+$key = q/{_inline}1100hspace-0.05em^'hspace-0.1em'{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="41" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img202.gif"
+ ALT="$1100\hspace{-0.05em}^{'\hspace{-0.1em}'}$">|;
+
+$key = q/{_inline}[lambda,phi]{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="38" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img46.gif"
+ ALT="$[\lambda,\phi]$">|;
+
+$key = q/{_inline}30hspace-0.05em^'hspace-0.1em'{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="25" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img82.gif"
+ ALT="$30\hspace{-0.05em}^{'\hspace{-0.1em}'}$">|;
+
+$key = q/{_inline}1.0027379cdots{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="94" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img120.gif"
+ ALT="$1.0027379\cdots$">|;
+
+$key = q/{_inline}90^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img22.gif"
+ ALT="$90^{\circ}$">|;
+
+$key = q/{_inline}14hspace-0.05em^'hspace-0.1em'{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="25" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img126.gif"
+ ALT="$14\hspace{-0.05em}^{'\hspace{-0.1em}'}$">|;
+
+$key = q/{_inline}rho=r(1+cr^2){_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="103" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
+ SRC="img128.gif"
+ ALT="$\rho = r (1 + c r^{2})$">|;
+
+$key = q/{_inline}pmn{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="25" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img123.gif"
+ ALT="$\pm n$">|;
+
+$key = q/{_inline}bfD{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="17" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img240.gif"
+ ALT="${\bf D}$">|;
+
+$key = q/{_inline}0hspace-0.05em^'hspace-0.1em'hspace-0.4em.24{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="31" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img81.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.24$">|;
+
+$key = q/{_inline}0^rmshspace-0.3em.015869{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="65" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img267.gif"
+ ALT="$0^{\rm s}\hspace{-0.3em}.015869$">|;
+
+$key = q/{_inline}0hspace-0.05em^'hspace-0.1em'hspace-0.4em.43549{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="56" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img277.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.43549$">|;
+
+$key = q/{_inline}[,Deltax,Deltay,Deltaz,]{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="99" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img239.gif"
+ ALT="$[\,\Delta x,\Delta y, \Delta z\,]$">|;
+
+$key = q/{_inline}86hspace-0.05em^'hspace-0.1em'{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="25" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img136.gif"
+ ALT="$86\hspace{-0.05em}^{'\hspace{-0.1em}'}$">|;
+
+$key = q/{_inline}(0leqe<1){_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="83" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img106.gif"
+ ALT="$( 0 \leq e < 1 )$">|;
+
+$key = q/{_inline}0^rmh{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="18" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img49.gif"
+ ALT="$0^{\rm h}$">|;
+
+$key = q/{_inline}~cosalpha-{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="58" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img273.gif"
+ ALT="$~\cos \alpha
+ -$">|;
+
+$key = q/{_inline}[theta,phi,dottheta,dotphi]{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="69" HEIGHT="35" ALIGN="MIDDLE" BORDER="0"
+ SRC="img252.gif"
+ ALT="$[\theta,\phi,\dot{\theta},\dot{\phi}]$">|;
+
+$key = q/{_inline}1hspace-0.05em^'hspace-0.1em'hspace-0.4em.0{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img178.gif"
+ ALT="$1\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.0$">|;
+
+$key = q/{_inline}nu=rho_wrho_s{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="75" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img181.gif"
+ ALT="$\nu=\rho_w/\rho_s$">|;
+
+$key = q/{_inline}0hspace-0.05em^'hspace-0.1em'hspace-0.4em.3{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img32.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.3$">|;
+
+$key = q/{_inline}varpi=Omega+omega{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="81" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img321.gif"
+ ALT="$\varpi = \Omega + \omega$">|;
+
+$key = q/{_inline}6hspace-0.05em^'hspace-0.1em'hspace-0.4em.1{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img216.gif"
+ ALT="$6\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.1$">|;
+
+$key = q/{_inline}mu_delta,=+{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="56" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img276.gif"
+ ALT="$\mu_\delta\,=+$">|;
+
+$key = q/{_inline}920hspace-0.05em^'hspace-0.1em'{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="33" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img124.gif"
+ ALT="$920\hspace{-0.05em}^{'\hspace{-0.1em}'}$">|;
+
+$key = q/{_inline}b^I!I=0{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="51" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img223.gif"
+ ALT="$b^{I\!I}=0$">|;
+
+$key = q/{_inline}x'=x_1+rmXZ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="96" HEIGHT="30" ALIGN="MIDDLE" BORDER="0"
+ SRC="img57.gif"
+ ALT="$x' = x_{1} + {\rm XZ}$">|;
+
+$key = q/{_inline}mu_alpha={_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="38" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img289.gif"
+ ALT="$\mu_\alpha=$">|;
+
+$key = q/{_inline}rmbfr_0{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="17" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img102.gif"
+ ALT="${\rm \bf r}_0$">|;
+
+$key = q/{_inline}zeta_vac{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="29" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img303.gif"
+ ALT="$\zeta _{vac}$">|;
+
+$key = q/{_inline}86^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img194.gif"
+ ALT="$86^\circ$">|;
+
+$key = q/{_inline}y'''=+x''sinrmPERP2+y''cosrmPERP2{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="286" HEIGHT="30" ALIGN="MIDDLE" BORDER="0"
+ SRC="img62.gif"
+ ALT="$y''' = + x'' \sin {\rm PERP}/2 + y'' \cos {\rm PERP}/2$">|;
+
+$key = q/{_inline}C_2!=!-2.0{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="71" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img326.gif"
+ ALT="$C_2\!=\!-2.0$">|;
+
+$key = q/{_inline}0.0065^circm^-1{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="86" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img38.gif"
+ ALT="$0.0065^\circ m^{-1}$">|;
+
+$key = q/{_inline}alpha=18^rmh,delta=+30^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="132" HEIGHT="33" ALIGN="MIDDLE" BORDER="0"
+ SRC="img225.gif"
+ ALT="$\alpha=18^{\rm h},\delta=+30^{\circ}$">|;
+
+$key = q/{_inline}[mu_alpha,mu_delta]{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="54" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img264.gif"
+ ALT="$[\mu_\alpha,\mu_\delta]$">|;
+
+$key = q/{_inline}5^rmh,25^rmm{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="49" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img320.gif"
+ ALT="$5^{\rm h}\,25^{\rm m}$">|;
+
+$key = q/{figure}centertabular|cccccc|hline&&&&&hspace5em&hspace5em&hspace5em&hspace5em&halloftheprecessionandE-termscorrectionsaresuperfluous.{figure}MSF=1.5;FSF=1;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="450" HEIGHT="642"
+ SRC="img255.gif"
+ ALT="\begin{figure}
+\begin{center}
+\begin{tabular}
+{\vert cccccc\vert} \hline
+& & & &...
+ ...2000, all of the precession and E-terms corrections
+are superfluous.\end{figure}">|;
+
+$key = q/{_inline}~sinalpha-{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="56" HEIGHT="26" ALIGN="MIDDLE" BORDER="0"
+ SRC="img281.gif"
+ ALT="$~\sin \alpha
+ -$">|;
+
+$key = q/{_inline}equiv123{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="44" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img67.gif"
+ ALT="$\equiv123$">|;
+
+$key = q/{_inline}3hspace-0.05em^'hspace-0.1em'hspace-0.4em.7{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img77.gif"
+ ALT="$3\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.7$">|;
+
+$key = q/{_inline}12^circ,34^',56^''.7{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="90" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img4.gif"
+ ALT="$12^{\circ}\,34^{'}\,56^{''}.7$">|;
+
+$key = q/{_inline}y'=y_1+rmYZ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="94" HEIGHT="30" ALIGN="MIDDLE" BORDER="0"
+ SRC="img58.gif"
+ ALT="$y' = y_{1} + {\rm YZ}$">|;
+
+$key = q/{_inline}+0hspace-0.05em^'hspace-0.1em'hspace-0.4em.103{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="52" HEIGHT="35" ALIGN="MIDDLE" BORDER="0"
+ SRC="img292.gif"
+ ALT="$+0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.103$">|;
+
+$key = q/{_inline}=93^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="43" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img177.gif"
+ ALT="$=93^\circ$">|;
+
+$key = q/{_inline}0hspace-0.05em^'hspace-0.1em'hspace-0.4em.0001{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="47" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img258.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.0001$">|;
+
+$key = q/{_inline}[x_e,y_e,]{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="52" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img114.gif"
+ ALT="$[x_{e},y_{e}\,]$">|;
+
+$key = q/{_inline}[,0,,1,]{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="43" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img121.gif"
+ ALT="$[\,0,\,1\,]$">|;
+
+$key = q/{_inline}20hspace-0.05em^'hspace-0.1em'hspace-0.4em.5{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="31" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img265.gif"
+ ALT="$20\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.5$">|;
+
+$key = q/{_inline}theta{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="10" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img298.gif"
+ ALT="$\theta$">|;
+
+$key = q/{_inline}zeta<80^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="56" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img157.gif"
+ ALT="$\zeta<80^{\circ}$">|;
+
+$key = q/{_inline}0^rmshspace-0.3em.000340{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="65" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img270.gif"
+ ALT="$0^{\rm s}\hspace{-0.3em}.000340$">|;
+
+$key = q/{_inline}deltaEcosE{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="64" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img247.gif"
+ ALT="$\delta E \cos E$">|;
+
+$key = q/{_inline}[x_m,y_m,]{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="63" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img113.gif"
+ ALT="$[x_{m},y_{m}\,]$">|;
+
+$key = q/{_inline}-0hspace-0.05em^'hspace-0.1em'hspace-0.4em.06{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="44" HEIGHT="35" ALIGN="MIDDLE" BORDER="0"
+ SRC="img305.gif"
+ ALT="$-0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.06$">|;
+
+$key = q/{_inline}340hspace-0.05em^'hspace-0.1em'{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="33" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img199.gif"
+ ALT="$340\hspace{-0.05em}^{'\hspace{-0.1em}'}$">|;
+
+$key = q/{_inline}l^I!I,b^I!I{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="45" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
+ SRC="img254.gif"
+ ALT="$l^{I\!I},b^{I\!I}$">|;
+
+$key = q/{_inline}20^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img296.gif"
+ ALT="$20^\circ$">|;
+
+$key = q/{_inline}_j)]cdot({_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="38" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img231.gif"
+ ALT="$_{j})]
+ \cdot ($">|;
+
+$key = q/{_inline}times{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="15" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img84.gif"
+ ALT="$\times$">|;
+
+$key = q/{_inline}20hspace-0.05em^'hspace-0.1em'hspace-0.4em.49552{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="64" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img110.gif"
+ ALT="$20\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.49552$">|;
+
+$key = q/{_inline}tan^3zeta{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="44" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
+ SRC="img152.gif"
+ ALT="$\tan^{3} \zeta$">|;
+
+$key = q/{_inline}E=90^circ-zeta_true{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="113" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img211.gif"
+ ALT="$E=90^\circ-\zeta_{true}$">|;
+
+$key = q/{_inline}83^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img190.gif"
+ ALT="$83^\circ$">|;
+
+$key = q/{_inline}0^rmshspace-0.3em.9{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="24" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img31.gif"
+ ALT="$0^{\rm s}\hspace{-0.3em}.9$">|;
+
+$key = q/{_inline}(0leqeleq10){_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="91" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img107.gif"
+ ALT="$( 0 \leq e \leq 10 )$">|;
+
+$key = q/{_inline}17hspace-0.05em^'hspace-0.1em'{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="25" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img133.gif"
+ ALT="$17\hspace{-0.05em}^{'\hspace{-0.1em}'}$">|;
+
+$key = q/{_inline}0.4,murmm{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="50" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img35.gif"
+ ALT="$0.4\,\mu{\rm m}$">|;
+
+$key = q/{_inline}3^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="18" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img27.gif"
+ ALT="$3^{\circ}$">|;
+
+$key = q/{_inline}20^rms{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="24" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img86.gif"
+ ALT="$20^{\rm s}$">|;
+
+$key = q/{_inline}1hspace-0.05em^'hspace-0.1em'{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="17" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img140.gif"
+ ALT="$1\hspace{-0.05em}^{'\hspace{-0.1em}'}$">|;
+
+$key = q/{_inline}zeta=70^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="56" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img183.gif"
+ ALT="$\zeta=70^\circ$">|;
+
+$key = q/{_inline}0hspace-0.05em^'hspace-0.1em'hspace-0.4em.001{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="39" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img112.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.001$">|;
+
+$key = q/{_inline}DeltarmT{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="28" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img315.gif"
+ ALT="$\Delta {\rm T}$">|;
+
+$key = q/{_inline}pm{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="15" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img30.gif"
+ ALT="$\pm$">|;
+
+$key = q/{_inline}C_1!=!+50.0{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="79" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img325.gif"
+ ALT="$C_1\!=\!+50.0$">|;
+
+$key = q/{_inline}l^I!I=90^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="64" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img222.gif"
+ ALT="$l^{I\!I}=90^{\circ}$">|;
+
+$key = q/{_inline}50^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img163.gif"
+ ALT="$50^\circ$">|;
+
+$key = q/{_inline}[,theta,phi~]{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="45" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img238.gif"
+ ALT="$[\,\theta,\phi~]$">|;
+
+$key = q/{_inline}x!pm!n{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="36" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img69.gif"
+ ALT="$x\!\pm\!n$">|;
+
+$key = q/{_inline}mu_delta={_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="36" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img291.gif"
+ ALT="$\mu_\delta=$">|;
+
+$key = q/{_inline}3times3{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="39" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img18.gif"
+ ALT="$3\times3$">|;
+
+$key = q/{_inline}50hspace-0.05em^'hspace-0.1em'{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="25" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img261.gif"
+ ALT="$50\hspace{-0.05em}^{'\hspace{-0.1em}'}$">|;
+
+$key = q/{_inline}1.0,murmm{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="50" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img40.gif"
+ ALT="$1.0\,\mu{\rm m}$">|;
+
+$key = q/{_inline}92^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img205.gif"
+ ALT="$92^\circ$">|;
+
+$key = q/{_inline}18hspace-0.05em^'hspace-0.1em'{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="25" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img79.gif"
+ ALT="$18\hspace{-0.05em}^{'\hspace{-0.1em}'}$">|;
+
+$key = q/{_inline}0.7,murmm{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="50" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img34.gif"
+ ALT="$0.7\,\mu{\rm m}$">|;
+
+$key = q/{_inline}timesn{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="25" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img226.gif"
+ ALT="$\times n$">|;
+
+$key = q/{_inline}rmMJD=(rmJD-2400000.5{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="177" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img138.gif"
+ ALT="${\rm MJD} = ({\rm JD} - 2400000.5$">|;
+
+$key = q/{_inline}0^circhspace-0.37em.hspace0.02em5{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="25" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img301.gif"
+ ALT="$0^{\circ}
+ \hspace{-0.37em}.\hspace{0.02em}5$">|;
+
+$key = q/{_inline}tan^-14{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="54" HEIGHT="16" ALIGN="BOTTOM" BORDER="0"
+ SRC="img155.gif"
+ ALT="$\tan^{-1} 4$">|;
+
+$key = q/{_inline}0^rmshspace-0.3em.01{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="32" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img97.gif"
+ ALT="$0^{\rm s}\hspace{-0.3em}.01$">|;
+
+$key = q/{_inline}100hspace-0.05em^'hspace-0.1em'{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="33" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img141.gif"
+ ALT="$100\hspace{-0.05em}^{'\hspace{-0.1em}'}$">|;
+
+$key = q/{_inline}2hspace-0.05em^'hspace-0.1em'{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="17" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img316.gif"
+ ALT="$2\hspace{-0.05em}^{'\hspace{-0.1em}'}$">|;
+
+$key = q/{_inline}[,xi,eta,]{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img85.gif"
+ ALT="$[\,\xi,\eta\,]$">|;
+
+$key = q/{_inline}00^h,00^m,00^s.0{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="96" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img309.gif"
+ ALT="$00^{h}\,00^{m}\,00^{s}.0$">|;
+
+$key = q/{_inline}0!-!pi{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="35" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img234.gif"
+ ALT="$0\!-\!\pi$">|;
+
+$key = q/{_inline}280^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="34" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img167.gif"
+ ALT="$280^\circ$">|;
+
+$key = q/{_inline}beta{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="12" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img173.gif"
+ ALT="$\beta$">|;
+
+$key = q/{_inline}0^rmshspace-0.3em.000083{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="65" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img274.gif"
+ ALT="$0^{\rm s}\hspace{-0.3em}.000083$">|;
+
+$key = q/{_inline}0hspace-0.05em^'hspace-0.1em'hspace-0.4em.00510{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="56" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img278.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.00510$">|;
+
+$key = q/{_inline}zeta=87^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="56" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img8.gif"
+ ALT="$\zeta = 87^{\circ}$">|;
+
+$key = q/{_inline}90^circ-delta{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="54" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img297.gif"
+ ALT="$90^\circ-\delta$">|;
+
+$key = q/{_inline}2murmm{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="34" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img168.gif"
+ ALT="$2\mu{\rm m}$">|;
+
+$key = q/{_inline}<bfV1+bfD>{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="95" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img243.gif"
+ ALT="$<{\bf V1}+{\bf D}\gt$">|;
+
+$key = q/{_inline}5hspace-0.05em^'hspace-0.1em'hspace-0.4em.8{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img215.gif"
+ ALT="$5\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.8$">|;
+
+$key = q/{_inline}25^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img162.gif"
+ ALT="$25^\circ$">|;
+
+$key = q/{_inline}80^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img179.gif"
+ ALT="$80^\circ$">|;
+
+$key = q/{_inline}pmpi2{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img15.gif"
+ ALT="$\pm\pi/2$">|;
+
+$key = q/{_inline}0hspace-0.05em^'hspace-0.1em'hspace-0.4em.01{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="31" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img158.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.01$">|;
+
+$key = q/{_inline}rho{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="11" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img129.gif"
+ ALT="$\rho$">|;
+
+$key = q/{_inline}152pi=2.3873241463784300365{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="235" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img7.gif"
+ ALT="$15/{2\pi} = 2.3873241463784300365$">|;
+
+$key = q/{_inline}2pi{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="20" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img52.gif"
+ ALT="$2\pi$">|;
+
+$key = q/{_inline}43hspace-0.05em^'hspace-0.1em'{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="25" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img219.gif"
+ ALT="$43\hspace{-0.05em}^{'\hspace{-0.1em}'}$">|;
+
+$key = q/{_inline}sim20{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="36" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img324.gif"
+ ALT="$\sim20$">|;
+
+$key = q/{_inline}[,alpha,delta,]{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$">|;
+
+$key = q/{_inline}dotalpha{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="13" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img115.gif"
+ ALT="$\dot{\alpha}$">|;
+
+$key = q/{_inline}0^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="18" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img1.gif"
+ ALT="$0^{\circ}$">|;
+
+$key = q/{_inline}88^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img198.gif"
+ ALT="$88^\circ$">|;
+
+$key = q/{_inline}bfV1{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="26" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img241.gif"
+ ALT="${\bf V1}$">|;
+
+$key = q/{_inline}tan^-11{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="54" HEIGHT="16" ALIGN="BOTTOM" BORDER="0"
+ SRC="img153.gif"
+ ALT="$\tan^{-1} 1$">|;
+
+$key = q/{_inline}0^circhspace-0.37em.hspace0.02em2{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="25" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img260.gif"
+ ALT="$0^{\circ}
+ \hspace{-0.37em}.\hspace{0.02em}2$">|;
+
+$key = q/{_inline}-19^circ,44^',37^''.1{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="102" HEIGHT="35" ALIGN="MIDDLE" BORDER="0"
+ SRC="img263.gif"
+ ALT="$-19^{\circ}\,44^{'}\,37^{''}.1$">|;
+
+$key = q/{_inline}cdot~[diag(1{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="71" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img230.gif"
+ ALT="$\cdot~[diag(1/$">|;
+
+$key = q/{_inline}alpha=0{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="43" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img89.gif"
+ ALT="$\alpha=0$">|;
+
+$key = q/{_inline}~cosalpha)sindelta-{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="98" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img271.gif"
+ ALT="$~\cos \alpha ) \sin \delta
+ -$">|;
+
+$key = q/{_inline}zeta{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="11" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img149.gif"
+ ALT="$\zeta$">|;
+
+$key = q/{_inline}3hspace-0.05em^'hspace-0.1em'{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="17" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img75.gif"
+ ALT="$3\hspace{-0.05em}^{'\hspace{-0.1em}'}$">|;
+
+$key = q/{_inline}tanzeta{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="37" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img151.gif"
+ ALT="$\tan \zeta$">|;
+
+$key = q/{_inline}0^rmshspace-0.3em.000105{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="65" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img272.gif"
+ ALT="$0^{\rm s}\hspace{-0.3em}.000105$">|;
+
+$key = q/{_inline}0hspace-0.05em^'hspace-0.1em'hspace-0.4em.4{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img185.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.4$">|;
+
+$key = q/{_inline}~sinalpha)secdelta{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="84" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img275.gif"
+ ALT="$~\sin \alpha ) \sec \delta $">|;
+
+$key = q/{_inline}-1^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="30" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img2.gif"
+ ALT="$-1^{\circ}$">|;
+
+$key = q/{_inline}times10^-5{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="48" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
+ SRC="img93.gif"
+ ALT="$\times10^{-5}$">|;
+
+$key = q/{_inline}C_4!=!+25.0{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="79" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img328.gif"
+ ALT="$C_4\!=\!+25.0$">|;
+
+$key = q/{_inline}60hspace-0.05em^'hspace-0.1em'{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="25" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img304.gif"
+ ALT="$60\hspace{-0.05em}^{'\hspace{-0.1em}'}$">|;
+
+$key = q/{_inline}76^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img33.gif"
+ ALT="$76^\circ$">|;
+
+$key = q/{_inline}x'''=+x''cosrmPERP2+y''sinrmPERP2{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="287" HEIGHT="30" ALIGN="MIDDLE" BORDER="0"
+ SRC="img61.gif"
+ ALT="$x''' = + x'' \cos {\rm PERP}/2 + y'' \sin {\rm PERP}/2$">|;
+
+$key = q/{_inline}deltaE{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="23" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img245.gif"
+ ALT="$\delta E$">|;
+
+$key = q/{_inline}times2{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="31" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img16.gif"
+ ALT="$\times 2 / $">|;
+
+$key = q/{_inline}zeta_obs{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="28" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img184.gif"
+ ALT="$\zeta_{obs}$">|;
+
+$key = q/{_inline}0hspace-0.05em^'hspace-0.1em'hspace-0.4em.1{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img25.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.1$">|;
+
+$key = q/{_inline}4hspace-0.05em^'hspace-0.1em'{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="17" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img130.gif"
+ ALT="$4\hspace{-0.05em}^{'\hspace{-0.1em}'}$">|;
+
+$key = q/{_inline}0^rmshspace-0.3em.0016{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="48" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img312.gif"
+ ALT="$0^{\rm s}\hspace{-0.3em}.0016$">|;
+
+$key = q/{_inline}zeta=84^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="56" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img207.gif"
+ ALT="$\zeta=84^\circ$">|;
+
+$key = q/{_inline}100mum{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="51" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img307.gif"
+ ALT="$100\mu m$">|;
+
+$key = q/{_inline}sigma=5.0{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="55" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img329.gif"
+ ALT="$\sigma=5.0$">|;
+
+$key = q/{_inline}circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="10" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img5.gif"
+ ALT="${\circ}$">|;
+
+$key = q/{_inline}[x_1,y_1,]{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="53" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img55.gif"
+ ALT="$[x_{1},y_{1}\,]$">|;
+
+$key = q/{_inline}L=varpi+M{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="87" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img322.gif"
+ ALT="$L = \varpi + M$">|;
+
+$key = q/{_inline}16^h,09^m,55^s.13{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="104" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img286.gif"
+ ALT="$16^{h}\,09^{m}\,55^{s}.13$">|;
+
+$key = q/{_inline}times(2pi86400)^2times(3602pi){_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="186" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
+ SRC="img12.gif"
+ ALT="$\times (2\pi/86400)^2 \times (360/2\pi)$">|;
+
+$key = q/{_inline}xi,eta{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="26" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img90.gif"
+ ALT="$\xi,\eta$">|;
+
+$key = q/{_inline}Deltazeta=atanzeta+btan^3zeta{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="164" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
+ SRC="img148.gif"
+ ALT="$\Delta \zeta = a \tan \zeta + b \tan^{3} \zeta$">|;
+
+$key = q/{_inline}23^circhspace-0.37em.hspace0.02em5{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="33" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img256.gif"
+ ALT="$23^{\circ}
+ \hspace{-0.37em}.\hspace{0.02em}5$">|;
+
+$key = q/{_inline}rightarrow{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="19" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img10.gif"
+ ALT="$\rightarrow$">|;
+
+$key = q/{_inline}pmn.nxpmn{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="78" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img68.gif"
+ ALT="$\pm n.n x \pm n$">|;
+
+$key = q/{_inline}cdot{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="7" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img72.gif"
+ ALT="$\cdot$">|;
+
+$key = q/{_inline}85^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img193.gif"
+ ALT="$85^\circ$">|;
+
+$key = q/{_inline}45hspace-0.05em^'hspace-0.1em'{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="25" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img195.gif"
+ ALT="$45\hspace{-0.05em}^{'\hspace{-0.1em}'}$">|;
+
+$key = q/{_inline}pm3{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="23" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img147.gif"
+ ALT="$\pm3$">|;
+
+$key = q/{_inline}0^rmshspace-0.3em.0013{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="48" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img313.gif"
+ ALT="$0^{\rm s}\hspace{-0.3em}.0013$">|;
+
+$key = q/{_inline}zeta<70^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="56" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img26.gif"
+ ALT="$\zeta<70^{\circ}$">|;
+
+$key = q/{_inline}tan^5{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="33" HEIGHT="16" ALIGN="BOTTOM" BORDER="0"
+ SRC="img171.gif"
+ ALT="$\tan^5$">|;
+
+$key = q/{_inline}5hspace-0.05em^'hspace-0.1em'{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="17" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img131.gif"
+ ALT="$5\hspace{-0.05em}^{'\hspace{-0.1em}'}$">|;
+
+$key = q/{_inline}~sinalpha+{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="56" HEIGHT="26" ALIGN="MIDDLE" BORDER="0"
+ SRC="img269.gif"
+ ALT="$~\sin \alpha
+ +$">|;
+
+$key = q/{_inline}620hspace-0.05em^'hspace-0.1em'{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="33" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img201.gif"
+ ALT="$620\hspace{-0.05em}^{'\hspace{-0.1em}'}$">|;
+
+$key = q/{_inline}ntimesn{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="42" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img73.gif"
+ ALT="$n \times n$">|;
+
+$key = q/{_inline}Deltazeta{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="24" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img150.gif"
+ ALT="$\Delta \zeta$">|;
+
+$key = q/{_inline}0hspace-0.05em^'hspace-0.1em'hspace-0.4em.00125{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="56" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img282.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.00125$">|;
+
+$key = q/{_inline}10^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img117.gif"
+ ALT="$10^{\circ}$">|;
+
+$key = q/{_inline}varpi{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="16" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img100.gif"
+ ALT="$\varpi$">|;
+
+$key = q/{_inline}lambda,beta{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="29" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img253.gif"
+ ALT="$\lambda,\beta$">|;
+
+$key = q/{_inline}0.3,murmm{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="50" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img41.gif"
+ ALT="$0.3\,\mu{\rm m}$">|;
+
+$key = q/{_inline}pm100{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="39" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img317.gif"
+ ALT="$\pm100$">|;
+
+$key = q/{_inline}1900hspace-0.05em^'hspace-0.1em'{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="41" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img204.gif"
+ ALT="$1900\hspace{-0.05em}^{'\hspace{-0.1em}'}$">|;
+
+$key = q/{_inline}times10^-10{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="55" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
+ SRC="img94.gif"
+ ALT="$\times10^{-10}$">|;
+
+$key = q/{_inline}M_odot=1{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="59" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img323.gif"
+ ALT="$M_\odot = 1$">|;
+
+$key = q/{_inline}Deltaalpha{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="27" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img118.gif"
+ ALT="$\Delta\alpha$">|;
+
+$key = q/{displaymath}Deltazeta=Fleft(frac0^circhspace-0.37em.hspace0.02em55445-0^circhsp-0.37em.hspace0.02em00202E^21+0.28385E+0.02390E^2right){displaymath}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="321" HEIGHT="49"
+ SRC="img210.gif"
+ ALT="\begin{displaymath}
+\Delta \zeta = F \left(
+ \frac{0^\circ\hspace{-0.37em}.\hspa...
+ ...hspace{0.02em}00202 E^2}
+ {1 + 0.28385 E +0.02390 E^2} \right) \end{displaymath}">|;
+
+$key = q/{_inline}times(2pi86400)times(3602pi){_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="178" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img11.gif"
+ ALT="$\times (2\pi/86400) \times (360/2\pi)$">|;
+
+$key = q/{_inline}zeta<45^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="56" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img160.gif"
+ ALT="$\zeta<45^{\circ}$">|;
+
+$key = q/{_inline}[,Az,El~]{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="66" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img28.gif"
+ ALT="$[\,Az,El~]$">|;
+
+$key = q/{_inline}6hspace-0.05em^'hspace-0.1em'{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="17" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img132.gif"
+ ALT="$6\hspace{-0.05em}^{'\hspace{-0.1em}'}$">|;
+
+$key = q/{_inline}^Tcdot{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="17" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img70.gif"
+ ALT="$^{T}\cdot$">|;
+
+$key = q/{_inline}3hspace-0.05em^'hspace-0.1em'hspace-0.4em.2{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img213.gif"
+ ALT="$3\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.2$">|;
+
+$key = q/{_inline}[x_p,y_p,]{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="53" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img144.gif"
+ ALT="$[x_{p},y_{p}\,]$">|;
+
+$key = q/{_inline}[x_2,y_2,]{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="53" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img56.gif"
+ ALT="$[x_{2},y_{2}\,]$">|;
+
+$key = q/{_inline}0hspace-0.05em^'hspace-0.1em'hspace-0.4em.00158{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="56" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img280.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.00158$">|;
+
+$key = q/{_inline}x_2=+x'''cosrmORIENT+y'''sinrmORIENT{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="298" HEIGHT="30" ALIGN="MIDDLE" BORDER="0"
+ SRC="img63.gif"
+ ALT="$x_{2} = + x''' \cos {\rm ORIENT} +
+ y''' \sin {\rm ORIENT}$">|;
+
+$key = q/{_inline}61^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img235.gif"
+ ALT="$61^\circ$">|;
+
+$key = q/{_inline}y_2=-x'''sinrmORIENT+y'''cosrmORIENT{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="297" HEIGHT="30" ALIGN="MIDDLE" BORDER="0"
+ SRC="img64.gif"
+ ALT="$y_{2} = - x''' \sin {\rm ORIENT} +
+ y''' \cos {\rm ORIENT}$">|;
+
+$key = q/{_inline}82^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img188.gif"
+ ALT="$82^\circ$">|;
+
+$key = q/{_inline}0!-!2pi{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="43" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img66.gif"
+ ALT="$0\!-\!2\pi$">|;
+
+$key = q/{_inline}71hspace-0.05em^'hspace-0.1em'{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="25" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img134.gif"
+ ALT="$71\hspace{-0.05em}^{'\hspace{-0.1em}'}$">|;
+
+$key = q/{_inline}0hspace-0.05em^'hspace-0.1em'hspace-0.4em.05{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="31" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img175.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.05$">|;
+
+$key = q/{_inline}sqrt1-left|mboxbfvright|^2{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="72" HEIGHT="45" ALIGN="MIDDLE" BORDER="0"
+ SRC="img17.gif"
+ ALT="$\sqrt{1-\left\vert\mbox{\bf v}\right\vert^2}$">|;
+
+$key = q/{_inline}murmm{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="26" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img21.gif"
+ ALT="$\mu{\rm m}$">|;
+
+$key = q/{_inline}alpha,deltarightarrowlambda,beta{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="81" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img95.gif"
+ ALT="$\alpha,\delta\rightarrow\lambda,\beta$">|;
+
+$key = q/{displaymath}h=theta-alpha{displaymath}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="70" HEIGHT="25"
+ SRC="img299.gif"
+ ALT="\begin{displaymath}
+h = \theta - \alpha \end{displaymath}">|;
+
+$key = q/{_inline}2^circhspace-0.37em.hspace0.02em4{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="25" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img232.gif"
+ ALT="$2^{\circ}
+ \hspace{-0.37em}.\hspace{0.02em}4$">|;
+
+$key = q/{_inline}1hspace-0.05em^'hspace-0.1em'hspace-0.4em.85{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="31" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img125.gif"
+ ALT="$1\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.85$">|;
+
+$key = q/{_inline}+pi2{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img14.gif"
+ ALT="$+\pi/2$">|;
+
+$key = q/{_inline}sim!76^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="40" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img161.gif"
+ ALT="$\sim\!76^\circ$">|;
+
+$key = q/{_inline}[,x,y,z,dotx,doty,dotz,]{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="106" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img51.gif"
+ ALT="$[\,x,y,z,\dot{x},\dot{y},\dot{z}\,]$">|;
+
+$key = q/{_inline}6.5^circKkm^-1{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="86" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img169.gif"
+ ALT="$6.5^\circ K km^{-1}$">|;
+
+$key = q/{_inline}270^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="34" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img139.gif"
+ ALT="$270^\circ$">|;
+
+$key = q/{_inline}7hspace-0.05em^'hspace-0.1em'{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="17" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img192.gif"
+ ALT="$7\hspace{-0.05em}^{'\hspace{-0.1em}'}$">|;
+
+$key = q/{_inline}tandeltaEapproxdeltaE{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="92" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img246.gif"
+ ALT="${\tan \delta E\approx\delta E}$">|;
+
+$key = q/{_inline}cdots{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="21" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img48.gif"
+ ALT="$\cdots$">|;
+
+$key = q/{_inline}1hspace-0.05em^'hspace-0.1em'hspace-0.4em.5{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img212.gif"
+ ALT="$1\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.5$">|;
+
+$key = q/{_inline}0hspace-0.05em^'hspace-0.1em'hspace-0.4em.8{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img187.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.8$">|;
+
+$key = q/{_inline}(1-deltaE^22){_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="88" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
+ SRC="img250.gif"
+ ALT="$(1-\delta E^2 /2)$">|;
+
+$key = q/{_inline}mu{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="12" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img146.gif"
+ ALT="$\mu$">|;
+
+$key = q/{_inline}15^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img39.gif"
+ ALT="$15^\circ$">|;
+
+$key = q/{_inline}[Deltax,Deltay,Deltaz,]{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="96" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img109.gif"
+ ALT="$[\Delta x, \Delta y, \Delta z\,]$">|;
+
+$key = q/{_inline}70^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img174.gif"
+ ALT="$70^\circ$">|;
+
+$key = q/{_inline}DeltarmT=rmET-rmUT{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="117" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img314.gif"
+ ALT="$\Delta {\rm T} = {\rm ET} - {\rm UT}$">|;
+
+$key = q/{_inline}0hspace-0.05em^'hspace-0.1em'hspace-0.4em.02{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="31" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img295.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.02$">|;
+
+$key = q/{_inline}91^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img203.gif"
+ ALT="$91^\circ$">|;
+
+$key = q/{_inline}Delta{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="16" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img19.gif"
+ ALT="$\Delta$">|;
+
+$key = q/{_inline}l^I!I=53^circ,b^I!I=+25^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="148" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
+ SRC="img224.gif"
+ ALT="$l^{I\!I}=53^{\circ},b^{I\!I}=+25^{\circ}$">|;
+
+$key = q/{_inline}y''=y'rmYS{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="74" HEIGHT="30" ALIGN="MIDDLE" BORDER="0"
+ SRC="img60.gif"
+ ALT="$y'' = y' {\rm YS}$">|;
+
+$key = q/{_inline}bfV2{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="26" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img242.gif"
+ ALT="${\bf V2}$">|;
+
+$key = q/{_inline}[,0,2pi,]{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="50" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img13.gif"
+ ALT="$[\,0,2\pi\,]$">|;
+
+$key = q/{_inline}mgeqn{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="48" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img227.gif"
+ ALT="$m \geq n$">|;
+
+$key = q/{_inline}360^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="34" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img53.gif"
+ ALT="$360^{\circ}$">|;
+
+$key = q/{_inline}0hspace-0.05em^'hspace-0.1em'hspace-0.4em.5{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img83.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.5$">|;
+
+$key = q/{_inline}alpha,delta{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="28" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img91.gif"
+ ALT="$\alpha,\delta$">|;
+
+$key = q/{_inline}8hspace-0.05em^'hspace-0.1em'{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="17" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img319.gif"
+ ALT="$8\hspace{-0.05em}^{'\hspace{-0.1em}'}$">|;
+
+$key = q/{_inline}deltaEsinE{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="62" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img248.gif"
+ ALT="$\delta E \sin E$">|;
+
+$key = q/{_inline}alpha={_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="30" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img285.gif"
+ ALT="$\alpha=$">|;
+
+$key = q/{_inline}4hspace-0.05em^'hspace-0.1em'hspace-0.4em.9{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img214.gif"
+ ALT="$4\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.9$">|;
+
+$key = q/{_inline}45^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img154.gif"
+ ALT="$45^\circ$">|;
+
+$key = q/{_inline}3200hspace-0.05em^'hspace-0.1em'{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="41" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img206.gif"
+ ALT="$3200\hspace{-0.05em}^{'\hspace{-0.1em}'}$">|;
+
+$key = q/{_inline}equiv{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="15" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img251.gif"
+ ALT="$\equiv$">|;
+
+$key = q/{_inline}delta{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="10" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img23.gif"
+ ALT="$\delta$">|;
+
+$key = q/{_inline}-26hspace-0.05em^'hspace-0.1em'hspace-0.4em.00{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="52" HEIGHT="35" ALIGN="MIDDLE" BORDER="0"
+ SRC="img88.gif"
+ ALT="$-26\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.00$">|;
+
+$key = q/{_inline}psi{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="14" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img105.gif"
+ ALT="$\psi$">|;
+
+$key = q/{_inline}-10^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="38" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img165.gif"
+ ALT="$-10^\circ$">|;
+
+$key = q/{_inline}81hspace-0.05em^'hspace-0.1em'{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="25" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img135.gif"
+ ALT="$81\hspace{-0.05em}^{'\hspace{-0.1em}'}$">|;
+
+$key = q/{_inline}l^I!I=137.37{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="86" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img119.gif"
+ ALT="$l^{I\!I}=137.37$">|;
+
+$key = q/{_inline}87^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img196.gif"
+ ALT="$87^\circ$">|;
+
+$key = q/{_inline}(mu-1){_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="53" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img45.gif"
+ ALT="$(\mu-1)$">|;
+
+$key = q/{_inline}23^h,59^m,60^s.0{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="96" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img308.gif"
+ ALT="$23^{h}\,59^{m}\,60^{s}.0$">|;
+
+$key = q/{_inline}[,x,y,z,]{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="58" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img50.gif"
+ ALT="$[\,x,y,z\,]$">|;
+
+$key = q/{_inline}(1-bfDcdotbfV1){_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="93" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img244.gif"
+ ALT="$(1-{\bf D}\cdot{\bf V1})$">|;
+
+$key = q/{_inline}24^h,59^m,59^s.999{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="113" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img237.gif"
+ ALT="$24^{h}\,59^{m}\,59^{s}.999$">|;
+
+$key = q/{_inline}7^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="18" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img170.gif"
+ ALT="$7^\circ$">|;
+
+$key = q/{_inline}220hspace-0.05em^'hspace-0.1em'{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="33" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img221.gif"
+ ALT="$220\hspace{-0.05em}^{'\hspace{-0.1em}'}$">|;
+
+$key = q/{_inline}0hspace-0.05em^'hspace-0.1em'hspace-0.4em.2{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img76.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.2$">|;
+
+$key = q/{_inline}dotalphacosdelta{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="48" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img116.gif"
+ ALT="$\dot{\alpha}\cos\delta$">|;
+
+$key = q/{_inline}9hspace-0.05em^'hspace-0.1em'{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="17" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img127.gif"
+ ALT="$9\hspace{-0.05em}^{'\hspace{-0.1em}'}$">|;
+
+$key = q/{_inline}h,delta{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="27" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img65.gif"
+ ALT="$h,\delta$">|;
+
+$key = q/{_inline}beta~(=H_0r_0){_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="91" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img172.gif"
+ ALT="$\beta~(=H_0/r_0)$">|;
+
+$key = q/{_inline}0^rmshspace-0.3em.029032{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="65" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img268.gif"
+ ALT="$0^{\rm s}\hspace{-0.3em}.029032$">|;
+
+$key = q/{_inline}32^rmshspace-0.3em.184{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="48" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img311.gif"
+ ALT="$32^{\rm s}\hspace{-0.3em}.184$">|;
+
+$key = q/{_inline}10hspace-0.05em^'hspace-0.1em'{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="25" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img74.gif"
+ ALT="$10\hspace{-0.05em}^{'\hspace{-0.1em}'}$">|;
+
+$key = q/{_inline}alpha{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$">|;
+
+$key = q/{_inline}nu=p_wp_s{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="75" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img180.gif"
+ ALT="$\nu=p_w/p_s$">|;
+
+$key = q/{_inline}0-2pi{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="48" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img143.gif"
+ ALT="$0-2\pi$">|;
+
+$key = q/{_inline}[,dotx,doty,dotz,]{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="58" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img111.gif"
+ ALT="$[\,\dot{x},\dot{y},\dot{z}\,]$">|;
+
+$key = q/{_inline}75^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img164.gif"
+ ALT="$75^\circ$">|;
+
+$key = q/{_inline}100,murmm{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="53" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img44.gif"
+ ALT="$100\,\mu{\rm m}$">|;
+
+$key = q/{_inline}x''=x'rmXS{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="76" HEIGHT="16" ALIGN="BOTTOM" BORDER="0"
+ SRC="img59.gif"
+ ALT="$x'' = x' {\rm XS}$">|;
+
+$key = q/{_inline}[,x,y,]{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$">|;
+
+$key = q/{_inline}Deltapsi,cos,epsilon{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="62" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img108.gif"
+ ALT="$\Delta\psi\,cos\,\epsilon$">|;
+
+$key = q/{_inline}bfrmM{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="17" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img71.gif"
+ ALT="${\bf \rm M}$">|;
+
+$key = q/{_inline}zeta<60^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="56" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img159.gif"
+ ALT="$\zeta<60^{\circ}$">|;
+
+$key = q/{_inline}Deltapsicosepsilon{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="61" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img310.gif"
+ ALT="$\Delta\psi\cos\epsilon$">|;
+
+$key = q/{_inline}zeta=83^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="56" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img209.gif"
+ ALT="$\zeta=83^\circ$">|;
+
+$key = q/{_inline}mtimesn{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="46" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img228.gif"
+ ALT="$m \times n$">|;
+
+$key = q/{_inline}0hspace-0.05em^'hspace-0.1em'hspace-0.4em.062{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="39" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img293.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.062$">|;
+
+$key = q/{_inline}12pi=0.1591549430918953358{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="227" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img6.gif"
+ ALT="$1/{2 \pi} = 0.1591549430918953358$">|;
+
+$key = q/{_inline}42^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="26" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img233.gif"
+ ALT="$42^{\circ}$">|;
+
+$key = q/{_inline}1000hspace-0.05em^'hspace-0.1em'{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="41" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img142.gif"
+ ALT="$1000\hspace{-0.05em}^{'\hspace{-0.1em}'}$">|;
+
+$key = q/{_inline}11hspace-0.05em^'hspace-0.1em'{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="25" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img43.gif"
+ ALT="$11\hspace{-0.05em}^{'\hspace{-0.1em}'}$">|;
+
+$key = q/{_inline}29^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img36.gif"
+ ALT="$29^\circ$">|;
+
+$key = q/{_inline}84^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img191.gif"
+ ALT="$84^\circ$">|;
+
+$key = q/{_inline}[,l^I!I,b^I!I,]{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="59" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
+ SRC="img98.gif"
+ ALT="$[\,l^{I\!I},b^{I\!I}\,]$">|;
+
+$key = q/{_inline}rmbfv_0{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="19" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img103.gif"
+ ALT="${\rm \bf v}_0$">|;
+
+$key = q/{_inline}mu_alpha=-{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="56" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img266.gif"
+ ALT="$\mu_\alpha=-$">|;
+
+$key = q/{_inline}w_iigeq0{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="54" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img229.gif"
+ ALT="$w_{ii} \geq 0$">|;
+
+$key = q/{_inline}sim76^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="43" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img156.gif"
+ ALT="$\sim 76^\circ$">|;
+
+$key = q/{_inline}bfM{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="20" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img122.gif"
+ ALT="${\bf M}$">|;
+
+$key = q/{_inline}pmpi{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="25" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img47.gif"
+ ALT="$\pm \pi$">|;
+
+$key = q/{_inline}23^rmh,59^rmm,59^rms{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="82" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img54.gif"
+ ALT="$23^{\rm h}\,59^{\rm m}\,59^{\rm s}$">|;
+
+$key = q/{_inline}30^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img182.gif"
+ ALT="$30^\circ$">|;
+
+$key = q/{_inline}rmbfr_0.rmbfv_0{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="39" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img104.gif"
+ ALT="${\rm \bf r}_0.{\rm \bf v}_0$">|;
+
+$key = q/{_inline}0hspace-0.05em^'hspace-0.1em'hspace-0.4em.00066{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="56" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img283.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.00066$">|;
+
+$key = q/{_inline}-0^rmshspace-0.3em.0312{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="61" HEIGHT="26" ALIGN="MIDDLE" BORDER="0"
+ SRC="img290.gif"
+ ALT="$-0^{\rm s}\hspace{-0.3em}.0312$">|;
+
+$key = q/{_inline}delta={_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="28" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img287.gif"
+ ALT="$\delta=$">|;
+
+$key = q/{_inline}Omega{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img99.gif"
+ ALT="$\Omega$">|;
+
+$key = q/{_inline}93^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img176.gif"
+ ALT="$93^\circ$">|;
+
+$key = q/{_inline}+20^circ{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="38" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img166.gif"
+ ALT="$+20^\circ$">|;
+
+$key = q/{_inline}0hspace-0.05em^'hspace-0.1em'hspace-0.4em.50{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="31" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img80.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.50$">|;
+
+$key = q/{_inline}~cosdelta{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="43" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img284.gif"
+ ALT="$~\cos \delta $">|;
+
+$key = q/{_inline}[,h,delta,]{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$">|;
+
+$key = q/{_inline}92hspace-0.05em^'hspace-0.1em'{_inline}MSF=1.5;AAT;/;
+$cached_env_img{$key} = q|<IMG WIDTH="25" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img220.gif"
+ ALT="$92\hspace{-0.05em}^{'\hspace{-0.1em}'}$">|;
+
+1;
+
diff --git a/src/slalib/sun67.htx/images.tex b/src/slalib/sun67.htx/images.tex
new file mode 100644
index 0000000..8881d62
--- /dev/null
+++ b/src/slalib/sun67.htx/images.tex
@@ -0,0 +1,2852 @@
+\batchmode
+\documentclass[11pt,twoside]{article}
+\makeatletter
+\input{/home/user1/dec/ptw/hypertext/sun67_htx/html.sty}
+\input{/home/user1/dec/ptw/hypertext/sun67_htx/star2html.sty}
+\setcounter{tocdepth}{2}
+\pagestyle{myheadings}
+
+\markright{SUN/67.45}
+
+\setlength {\textwidth}{160mm}
+
+\setlength {\textheight}{230mm}
+
+\setlength {\topmargin}{-5mm}
+
+
+\setlength {\textwidth}{160mm}
+
+
+\setlength {\textheight}{230mm}
+
+
+\setlength {\topmargin}{-2mm}
+
+
+\setlength {\oddsidemargin}{0mm}
+
+
+\setlength {\evensidemargin}{0mm}
+
+
+\setlength {\parindent}{0mm}
+
+
+\setlength {\parskip}{\medskipamount}
+
+
+\setlength {\unitlength}{1mm}
+
+
+\latex{\renewcommand {\_}{{\tt\symbol{95}}}}
+
+\newlength {\oldspacing}
+
+
+\newcommand{\stardoccategory} {Starlink User Note}
+
+\newcommand{\stardocinitials} {SUN}
+
+\newcommand{\stardocsource} {sun67.45}
+
+\newcommand{\stardocnumber} {67.45}
+
+\newcommand{\stardocauthors} {P.\,T.\,Wallace}
+
+\newcommand{\stardocdate} {12 October 1999}
+
+\newcommand{\stardoctitle} {SLALIB --- Positional Astronomy Library}
+
+\newcommand{\stardocversion} {2.4-0}
+
+\newcommand{\stardocmanual} {Programmer's Manual}
+
+\newcommand{\stardocname}{\stardocinitials /\stardocnumber}
+
+\newcommand{\htmladdnormallinkfoot}[2]{#1\footnote{#2}}
+
+\newcommand{\htmladdnormallink}[2]{#1}
+
+\newcommand{\htmladdimg}[1]{}
+
+\newenvironment{latexonly}{}{}
+
+\newcommand{\hyperref}[4]{#2\ref{#4}#3}
+
+\newcommand{\htmlref}[2]{#1}
+
+\newcommand{\htmlimage}[1]{}
+
+\newcommand{\htmladdtonavigation}[1]{}
+
+\newcommand{\xref}[3]{#1}
+
+\newcommand{\xlabel}[1]{}
+
+\newcommand{\latextohtml}{{\bf LaTeX}{2}{\tt{HTML}}}
+
+\newcommand{\latex}[1]{#1}
+
+\newcommand{\setunderscore}{\renewcommand {\_}{{\tt\symbol{95}}}}
+
+\newcommand{\latexonlytoc}[0]{\tableofcontents}
+
+\newcommand{\nroutines} {183}
+
+\newcommand{\radec} {$[\,\alpha,\delta\,]$}
+
+\newcommand{\hadec} {$[\,h,\delta\,]$}
+
+\newcommand{\xieta} {$[\,\xi,\eta\,]$}
+
+\newcommand{\azel} {$[\,Az,El~]$}
+
+\newcommand{\ecl} {$[\,\lambda,\beta~]$}
+
+\newcommand{\gal} {$[\,l^{I\!I},b^{I\!I}\,]$}
+
+\newcommand{\xy} {$[\,x,y\,]$}
+
+\newcommand{\xyz} {$[\,x,y,z\,]$}
+
+\newcommand{\xyzd} {$[\,\dot{x},\dot{y},\dot{z}\,]$}
+
+\newcommand{\xyzxyzd} {$[\,x,y,z,\dot{x},\dot{y},\dot{z}\,]$}
+
+\newcommand{\degree}[2] {$#1^{\circ}
+ \hspace{-0.37em}.\hspace{0.02em}#2$}
+
+\newcommand{\arcsec}[2] {\arcseci{#1}$\hspace{-0.4em}.#2$}
+
+\newcommand{\arcseci}[1] {$#1\hspace{-0.05em}$\raisebox{-0.5ex}
+ {$^{'\hspace{-0.1em}'}$}}
+
+\renewcommand{\arcseci}[1] {$#1\hspace{-0.05em}^{'\hspace{-0.1em}'}$}
+
+\newcommand{\dms}[4] {$#1^{\circ}\,#2\raisebox{-0.5ex}
+ {$^{'}$}\,$\arcsec{#3}{#4}}
+
+\renewcommand{\dms}[4]{$#1^{\circ}\,#2^{'}\,#3^{''}.#4$}
+
+\newcommand{\tseci}[1] {$#1$\mbox{$^{\rm s}$}}
+
+\newcommand{\tsec}[2] {\tseci{#1}$\hspace{-0.3em}.#2$}
+
+\renewcommand{\tsec}[2] {$#1^{\rm s}\hspace{-0.3em}.#2$}
+
+\newcommand{\hms}[4] {$#1^{\rm h}\,#2^{\rm m}\,$\tsec{#3}{#4}}
+
+\renewcommand{\hms}[4] {$#1^{h}\,#2^{m}\,#3^{s}.#4$}
+
+\newcommand{\callhead}[1]{\goodbreak\vspace{\bigskipamount}{\large\bf{#1}}}
+
+\newenvironment{callset}{\begin{list}{}{\setlength{\leftmargin}{2cm}
+ \setlength{\parsep}{\smallskipamount}}}{\end{list}}
+
+\newcommand{\subp}[1]{\item\hspace{-1cm}#1\\}
+
+\newcommand{\subq}[2]{\item\hspace{-1cm}#1\\\hspace*{-1cm}#2\\}
+
+\newcommand{\name}[1]{\mbox{#1}}
+
+\newcommand{\fortvar}[1]{\mbox{\em #1}}
+
+\newcommand{\routine}[3]
+{\hbadness=10000
+ \vbox
+ {
+ \rule{\textwidth}{0.3mm}\\ {\Large {\bf #1} \hfill #2 \hfill {\bf #1}}\\ \setlength{\oldspacing}{\topsep}
+ \setlength{\topsep}{0.3ex}
+ \begin{description}
+ #3
+ \end{description}
+ \setlength{\topsep}{\oldspacing}
+ }
+}
+
+\renewcommand{\routine}[3]
+ {
+ \subsection{#1\xlabel{#1} - #2\label{#1}}
+ \begin{description}
+ #3
+ \end{description}
+ }
+
+\newcommand{\action}[1]
+{\item[ACTION]: #1}
+
+\newcommand{\call}[1]
+{\item[CALL]: \hspace{0.4em}{\tt #1}}
+
+\renewcommand{\call}[1]
+ {
+ \item[CALL:] {\tt #1}
+ }
+
+\newcommand{\args}[2]
+{
+ \goodbreak
+ \setlength{\oldspacing}{\topsep}
+ \setlength{\topsep}{0.3ex}
+ \begin{description}
+ \item[#1]:\\[1.5ex]
+ \begin{tabular}{p{7em}p{6em}p{22em}}
+ #2
+ \end{tabular}
+ \end{description}
+ \setlength{\topsep}{\oldspacing}
+}
+
+\renewcommand{\args}[2]
+ {
+ \begin{description}
+ \item[#1:]\\ \begin{tabular}{p{7em}p{6em}l}
+ #2
+ \end{tabular}
+ \end{description}
+ }
+
+\newcommand{\spec}[3]
+{
+ {\em {#1}} & {\bf \mbox{#2}} & {#3}
+}
+
+\newcommand{\specel}[2]
+{
+ \multicolumn{1}{c}{#1} & {} & {#2}
+}
+
+\newcommand{\anote}[1]
+{
+ \goodbreak
+ \setlength{\oldspacing}{\topsep}
+ \setlength{\topsep}{0.3ex}
+ \begin{description}
+ \item[NOTE]:
+ #1
+ \end{description}
+ \setlength{\topsep}{\oldspacing}
+}
+
+\renewcommand{\anote}[1]
+ {
+ \begin{description}
+ \item[NOTE:]
+ #1
+ \end{description}
+ }
+
+\newcommand{\notes}[1]
+{
+ \goodbreak
+ \setlength{\oldspacing}{\topsep}
+ \setlength{\topsep}{0.3ex}
+ \begin{description}
+ \item[NOTES]:
+ #1
+ \end{description}
+ \setlength{\topsep}{\oldspacing}
+}
+
+\renewcommand{\notes}[1]
+ {
+ \begin{description}
+ \item[NOTES:]
+ #1
+ \end{description}
+ }
+
+\newcommand{\aref}[1]
+{
+ \goodbreak
+ \setlength{\oldspacing}{\topsep}
+ \setlength{\topsep}{0.3ex}
+ \begin{description}
+ \item[REFERENCE]:
+ #1
+ \end{description}
+ \setlength{\topsep}{\oldspacing}
+}
+
+\newcommand{\refs}[1]
+{
+ \goodbreak
+ \setlength{\oldspacing}{\topsep}
+ \setlength{\topsep}{0.3ex}
+ \begin{description}
+ \item[REFERENCES]:
+ #1
+ \end{description}
+ \setlength{\topsep}{\oldspacing}
+}
+
+\newcommand{\exampleitem}{\item [EXAMPLE]:}
+
+\renewcommand{\exampleitem}{\item [EXAMPLE:]}
+
+\renewcommand{\thepage}{\roman{page}}
+
+\renewcommand{\latexonlytoc}[0]{}
+
+\renewcommand{\thepage}{\arabic{page}}
+\input{/home/user1/dec/ptw/hypertext/sun67_htx/star2html.sty}
+
+
+\makeatother
+\ifx\AtBeginDocument\undefined \newcommand{\AtBeginDocument}[1]{}\fi
+\newenvironment{tex2html_wrap}{}{}
+\newbox\sizebox
+\setlength{\hoffset}{0pt}\setlength{\voffset}{0pt}
+\addtolength{\textheight}{\footskip}\setlength{\footskip}{0pt}
+\addtolength{\textheight}{\topmargin}\setlength{\topmargin}{0pt}
+\addtolength{\textheight}{\headheight}\setlength{\headheight}{0pt}
+\addtolength{\textheight}{\headsep}\setlength{\headsep}{0pt}
+\setlength{\textwidth}{451pt}
+\newwrite\lthtmlwrite
+\makeatletter
+\let\realnormalsize=\normalsize
+\topskip=0pt
+\def\preveqno{}\let\real@float=\@float \let\realend@float=\end@float
+\def\@float{\let\@savefreelist\@freelist\real@float}
+\def\end@float{\realend@float\global\let\@freelist\@savefreelist}
+\let\real@dbflt=\@dbflt \let\end@dblfloat=\end@float
+\let\@largefloatcheck=\relax
+\def\@dbflt{\let\@savefreelist\@freelist\real@dbflt}
+\def\adjustnormalsize{\def\normalsize{\mathsurround=0pt \realnormalsize\parindent=0pt\abovedisplayskip=0pt\belowdisplayskip=0pt}\normalsize}
+\def\lthtmltypeout#1{{\let\protect\string\immediate\write\lthtmlwrite{#1}}}%
+\newcommand\lthtmlhboxmathA{\adjustnormalsize\setbox\sizebox=\hbox\bgroup}%
+\newcommand\lthtmlvboxmathA{\adjustnormalsize\setbox\sizebox=\vbox\bgroup%
+ \let\ifinner=\iffalse }%
+\newcommand\lthtmlboxmathZ{\@next\next\@currlist{}{\def\next{\voidb@x}}%
+ \expandafter\box\next\egroup}%
+\newcommand\lthtmlmathtype[1]{\def\lthtmlmathenv{#1}}%
+\newcommand\lthtmllogmath{\lthtmltypeout{l2hSize %
+:\lthtmlmathenv:\the\ht\sizebox::\the\dp\sizebox::\the\wd\sizebox.\preveqno}}%
+\newcommand\lthtmlfigureA[1]{\let\@savefreelist\@freelist
+ \lthtmlmathtype{#1}\lthtmlvboxmathA}%
+\newcommand\lthtmlfigureZ{\lthtmlboxmathZ\lthtmllogmath\copy\sizebox
+ \global\let\@freelist\@savefreelist}%
+\newcommand\lthtmldisplayA[1]{\lthtmlmathtype{#1}\lthtmlvboxmathA}%
+\newcommand\lthtmldisplayB[1]{\edef\preveqno{(\theequation)}%
+ \lthtmldisplayA{#1}\let\@eqnnum\relax}%
+\newcommand\lthtmldisplayZ{\lthtmlboxmathZ\lthtmllogmath\lthtmlsetmath}%
+\newcommand\lthtmlinlinemathA[1]{\lthtmlmathtype{#1}\lthtmlhboxmathA \vrule height1.5ex width0pt }%
+\newcommand\lthtmlinlinemathZ{\egroup\expandafter\ifdim\dp\sizebox>0pt %
+ \expandafter\centerinlinemath\fi\lthtmllogmath\lthtmlsetmath}
+\def\lthtmlsetmath{\hbox{\vrule width.5pt\vtop{\vbox{%
+ \kern.5pt\kern0.75 pt\hbox{\hglue.5pt\copy\sizebox\hglue0.75 pt}\kern.5pt%
+ \ifdim\dp\sizebox>0pt\kern0.75 pt\fi}%
+ \ifdim\hsize>\wd\sizebox \hrule depth1pt\fi}}}
+\def\centerinlinemath{\dimen1=\ht\sizebox
+ \ifdim\dimen1<\dp\sizebox \ht\sizebox=\dp\sizebox
+ \else \dp\sizebox=\ht\sizebox \fi}
+
+\def\lthtmlcheckvsize{\ifdim\ht\sizebox<\vsize\expandafter\vfill
+ \else\expandafter\vss\fi}%
+\makeatletter
+
+
+\begin{document}
+\pagestyle{empty}\thispagestyle{empty}%
+\lthtmltypeout{latex2htmlLength hsize=\the\hsize}%
+\lthtmltypeout{latex2htmlLength vsize=\the\vsize}%
+\lthtmltypeout{latex2htmlLength hoffset=\the\hoffset}%
+\lthtmltypeout{latex2htmlLength voffset=\the\voffset}%
+\lthtmltypeout{latex2htmlLength topmargin=\the\topmargin}%
+\lthtmltypeout{latex2htmlLength topskip=\the\topskip}%
+\lthtmltypeout{latex2htmlLength headheight=\the\headheight}%
+\lthtmltypeout{latex2htmlLength headsep=\the\headsep}%
+\lthtmltypeout{latex2htmlLength parskip=\the\parskip}%
+\lthtmltypeout{latex2htmlLength oddsidemargin=\the\oddsidemargin}%
+\makeatletter
+\if@twoside\lthtmltypeout{latex2htmlLength evensidemargin=\the\evensidemargin}%
+\else\lthtmltypeout{latex2htmlLength evensidemargin=\the\oddsidemargin}\fi%
+\makeatother
+\setcounter{tocdepth}{2}
+\stepcounter{section}
+\setcounter{page}{1}
+\stepcounter{section}
+\stepcounter{subsection}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline417}%
+$0^{\circ}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline419}%
+$-1^{\circ}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{section}
+\stepcounter{section}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline528}%
+$[\,\alpha,\delta\,]$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+
+\setlength {\oldspacing}{\topsep}
+%
+
+
+\setlength {\topsep}{0.3ex}
+%
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline786}%
+$12^{\circ}\,34^{'}\,56^{''}.7$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+
+\setlength {\topsep}{\oldspacing}
+%
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline788}%
+${\circ}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline802}%
+$1/{2 \pi} = 0.1591549430918953358$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline806}%
+$15/{2\pi} = 2.3873241463784300365$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline893}%
+$\zeta = 87^{\circ}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+
+\setlength {\parskip}{\medskipamount}
+%
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline1090}%
+$\times 360/2\pi$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline1092}%
+$\rightarrow$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline1094}%
+$\times (2\pi/86400) \times (360/2\pi)$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline1098}%
+$\times (2\pi/86400)^2 \times (360/2\pi)$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline1102}%
+$[\,0,2\pi\,]$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline1104}%
+$+\pi/2$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline1106}%
+$\pm\pi/2$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline1373}%
+$\times 2 / $%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline1375}%
+$\sqrt{1-\left|\mbox{\bf v}\right|^2}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline1377}%
+$3\times3$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline1701}%
+$\Delta$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline1705}%
+$[\,x,y\,]$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline1707}%
+$\mu{\rm m}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline1709}%
+$90^{\circ}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline1711}%
+$\delta$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline1713}%
+$\alpha$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline1715}%
+$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.1$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline1717}%
+$\zeta<70^{\circ}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline1721}%
+$3^{\circ}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline1725}%
+$[\,Az,El~]$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline1729}%
+$[\,h,\delta\,]$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline1745}%
+$\pm$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline1747}%
+$0^{\rm s}\hspace{-0.3em}.9$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline1749}%
+$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.3$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline2524}%
+$76^\circ$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline2704}%
+$0.7\,\mu{\rm m}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline2706}%
+$0.4\,\mu{\rm m}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline2708}%
+$29^\circ$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline2710}%
+$290^\circ$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline2712}%
+$0.0065^\circ m^{-1}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline2716}%
+$15^\circ$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline2718}%
+$1.0\,\mu{\rm m}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline2720}%
+$0.3\,\mu{\rm m}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline2722}%
+$20\,\mu{\rm m}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline2724}%
+$11\hspace{-0.05em}^{'\hspace{-0.1em}'}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline2726}%
+$100\,\mu{\rm m}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline2728}%
+$(\mu-1)$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline2867}%
+$[\lambda,\phi]$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline2869}%
+$\pm \pi$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline3016}%
+$\cdots$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline3160}%
+$0^{\rm h}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline3380}%
+$[\,x,y,z\,]$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline3493}%
+$[\,x,y,z,\dot{x},\dot{y},\dot{z}\,]$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline4117}%
+$2\pi$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline4123}%
+$360^{\circ}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+
+\setlength {\oldspacing}{\topsep}
+%
+
+
+\setlength {\topsep}{0.3ex}
+%
+
+
+\setlength {\topsep}{\oldspacing}
+%
+
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline5205}%
+$23^{\rm h}\,59^{\rm m}\,59^{\rm s}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline5954}%
+$[x_{1},y_{1}\,]$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline5956}%
+$[x_{2},y_{2}\,]$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline5962}%
+$x' = x_{1} + {\rm XZ}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline5964}%
+$y' = y_{1} + {\rm YZ}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline5966}%
+$x'' = x' {\rm XS}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline5968}%
+$y'' = y' {\rm YS}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline5970}%
+$x''' = + x'' \cos {\rm PERP}/2 + y'' \sin {\rm PERP}/2$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline5972}%
+$y''' = + x'' \sin {\rm PERP}/2 + y'' \cos {\rm PERP}/2$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline5974}%
+$x_{2} = + x''' \cos {\rm ORIENT} +
+ y''' \sin {\rm ORIENT}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline5976}%
+$y_{2} = - x''' \sin {\rm ORIENT} +
+ y''' \cos {\rm ORIENT}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline6230}%
+$h,\delta$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline6232}%
+$0\!-\!2\pi$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline6347}%
+$\equiv123$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline6475}%
+$\pm n.n x \pm n$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline6491}%
+$x\!\pm\!n$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline6713}%
+$^{T}\cdot$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline6717}%
+${\bf \rm M}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline7186}%
+$\cdot$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline7188}%
+$n \times n$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline7358}%
+$10\hspace{-0.05em}^{'\hspace{-0.1em}'}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline7360}%
+$3\hspace{-0.05em}^{'\hspace{-0.1em}'}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline7362}%
+$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.2$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline7364}%
+$3\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.7$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline7366}%
+$2\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.3$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline7368}%
+$18\hspace{-0.05em}^{'\hspace{-0.1em}'}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline7370}%
+$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.50$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline7374}%
+$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.24$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline7376}%
+$30\hspace{-0.05em}^{'\hspace{-0.1em}'}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline7378}%
+$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.5$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline7465}%
+$\times$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline8210}%
+$[\,\xi,\eta\,]$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline8382}%
+$20^{\rm s}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline8384}%
+$30^{\rm m}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline8386}%
+$-26\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.00$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline8848}%
+$\alpha=0$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline8993}%
+$\xi,\eta$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline8995}%
+$\alpha,\delta$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline9003}%
+$\xi$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline9812}%
+$\times10^{-5}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline9814}%
+$\times10^{-10}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline9967}%
+$\alpha,\delta\rightarrow\lambda,\beta$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline10116}%
+$0^{\rm s}\hspace{-0.3em}.03$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline10118}%
+$0^{\rm s}\hspace{-0.3em}.01$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline10191}%
+$[\,l^{I\!I},b^{I\!I}\,]$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline10601}%
+$\Omega$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline10603}%
+$\varpi$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline10605}%
+$\omega$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline10625}%
+${\rm \bf r}_0$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline10627}%
+${\rm \bf v}_0$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline10629}%
+${\rm \bf r}_0.{\rm \bf v}_0$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline10633}%
+$\psi$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline10663}%
+$( 0 \leq e < 1 )$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline10697}%
+$( 0 \leq e \leq 10 )$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline11178}%
+$\Delta\psi\,cos\,\epsilon$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline11337}%
+$[\Delta x, \Delta y, \Delta z\,]$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline11339}%
+$20\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.49552$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline11594}%
+$[\,\dot{x},\dot{y},\dot{z}\,]$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline11608}%
+$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.001$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline11828}%
+$[x_{m},y_{m}\,]$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline11830}%
+$[x_{e},y_{e}\,]$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline12099}%
+$\dot{\alpha}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline12101}%
+$\dot{\alpha}\cos\delta$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline12103}%
+$10^{\circ}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline12105}%
+$\Delta\alpha$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline13294}%
+$l^{I\!I}=137.37$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline13534}%
+$1.0027379\cdots$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline13611}%
+$[\,0,\,1\,]$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline14280}%
+${\bf M}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline14410}%
+$\pm n$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline15250}%
+$920\hspace{-0.05em}^{'\hspace{-0.1em}'}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline15252}%
+$1\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.85$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline15578}%
+$14\hspace{-0.05em}^{'\hspace{-0.1em}'}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline15582}%
+$9\hspace{-0.05em}^{'\hspace{-0.1em}'}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline16974}%
+$\rho = r (1 + c r^{2})$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline16980}%
+$\rho$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+
+\setlength {\parskip}{\medskipamount}
+%
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline19044}%
+$4\hspace{-0.05em}^{'\hspace{-0.1em}'}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline19046}%
+$5\hspace{-0.05em}^{'\hspace{-0.1em}'}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline19048}%
+$6\hspace{-0.05em}^{'\hspace{-0.1em}'}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline19050}%
+$17\hspace{-0.05em}^{'\hspace{-0.1em}'}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline19052}%
+$71\hspace{-0.05em}^{'\hspace{-0.1em}'}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline19054}%
+$81\hspace{-0.05em}^{'\hspace{-0.1em}'}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline19056}%
+$86\hspace{-0.05em}^{'\hspace{-0.1em}'}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline19060}%
+$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.6$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline19064}%
+${\rm MJD} = ({\rm JD} - 2400000.5$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline19834}%
+$270^\circ$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline20108}%
+$1\hspace{-0.05em}^{'\hspace{-0.1em}'}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline20114}%
+$100\hspace{-0.05em}^{'\hspace{-0.1em}'}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline20116}%
+$1000\hspace{-0.05em}^{'\hspace{-0.1em}'}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline20952}%
+$0-2\pi$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline21527}%
+$[x_{p},y_{p}\,]$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline21604}%
+$0 \leq x < 1$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline21862}%
+$\mu$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline21866}%
+$\pm3$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline22333}%
+$\Delta \zeta = a \tan \zeta + b \tan^{3} \zeta$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline22335}%
+$\zeta$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline22337}%
+$\Delta \zeta$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline22343}%
+$\tan \zeta$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline22345}%
+$\tan^{3} \zeta$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline22353}%
+$\tan^{-1} 1$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline22355}%
+$45^\circ$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline22357}%
+$\tan^{-1} 4$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline22359}%
+$\sim 76^\circ$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline22363}%
+$\zeta<80^{\circ}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline22365}%
+$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.01$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline22367}%
+$\zeta<60^{\circ}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline22371}%
+$\zeta<45^{\circ}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline22628}%
+$\sim\!76^\circ$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline22638}%
+$25^\circ$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline22640}%
+$50^\circ$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline22642}%
+$75^\circ$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline22656}%
+$-10^\circ$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline22658}%
+$+20^\circ$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline22660}%
+$280^\circ$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline22666}%
+$2\mu{\rm m}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline22678}%
+$6.5^\circ K km^{-1}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline22690}%
+$7^\circ$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline22698}%
+$\tan^5$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline22702}%
+$\beta~(=H_0/r_0)$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline22706}%
+$\beta$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline22933}%
+$70^\circ$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline22935}%
+$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.05$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline22947}%
+$93^\circ$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline22949}%
+$=93^\circ$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline22955}%
+$1\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.0$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline22957}%
+$80^\circ$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline22959}%
+$\nu=p_w/p_s$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline22961}%
+$\nu=\rho_w/\rho_s$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23162}%
+$30^\circ$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23164}%
+$\zeta=70^\circ$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23168}%
+$\zeta_{obs}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23172}%
+$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.4$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23174}%
+$81^\circ$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23176}%
+$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.8$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23178}%
+$82^\circ$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23180}%
+$1\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.6$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23182}%
+$83^\circ$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23186}%
+$84^\circ$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23188}%
+$7\hspace{-0.05em}^{'\hspace{-0.1em}'}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23190}%
+$85^\circ$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23194}%
+$86^\circ$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23196}%
+$45\hspace{-0.05em}^{'\hspace{-0.1em}'}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23198}%
+$87^\circ$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23200}%
+$150\hspace{-0.05em}^{'\hspace{-0.1em}'}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23202}%
+$88^\circ$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23204}%
+$340\hspace{-0.05em}^{'\hspace{-0.1em}'}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23206}%
+$89^\circ$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23208}%
+$620\hspace{-0.05em}^{'\hspace{-0.1em}'}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23212}%
+$1100\hspace{-0.05em}^{'\hspace{-0.1em}'}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23214}%
+$91^\circ$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23216}%
+$1900\hspace{-0.05em}^{'\hspace{-0.1em}'}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23220}%
+$92^\circ$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23222}%
+$3200\hspace{-0.05em}^{'\hspace{-0.1em}'}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23228}%
+$\zeta=84^\circ$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23469}%
+$\zeta=80^\circ$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23471}%
+$\zeta=83^\circ$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmldisplayA{displaymath23457}%
+\begin{displaymath}\Delta \zeta = F \left(
+ \frac{0^\circ\hspace{-0.37em}.\hspace{0.02em}55445
+ - 0^\circ\hspace{-0.37em}.\hspace{0.02em}01133 E
+ + 0^\circ\hspace{-0.37em}.\hspace{0.02em}00202 E^2}
+ {1 + 0.28385 E +0.02390 E^2} \right) \end{displaymath}%
+\lthtmldisplayZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23475}%
+$E=90^\circ-\zeta_{true}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23495}%
+$1\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.5$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23499}%
+$3\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.2$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23503}%
+$4\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.9$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23507}%
+$5\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.8$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23511}%
+$6\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.1$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23515}%
+$7\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.1$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23523}%
+$21\hspace{-0.05em}^{'\hspace{-0.1em}'}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23527}%
+$43\hspace{-0.05em}^{'\hspace{-0.1em}'}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23531}%
+$92\hspace{-0.05em}^{'\hspace{-0.1em}'}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23537}%
+$220\hspace{-0.05em}^{'\hspace{-0.1em}'}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23720}%
+$l^{I\!I}=90^{\circ}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23722}%
+$b^{I\!I}=0$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23896}%
+$l^{I\!I}=53^{\circ},b^{I\!I}=+25^{\circ}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline23995}%
+$\alpha=18^{\rm h},\delta=+30^{\circ}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline24798}%
+$\times n$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline24800}%
+$m \geq n$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline24802}%
+$m \times n$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline24806}%
+$w_{ii} \geq 0$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline25275}%
+$\cdot~[diag(1/$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline25277}%
+$_{j})]
+ \cdot ($%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+
+\setlength {\parskip}{\medskipamount}
+%
+
+\stepcounter{subsection}
+
+\setlength {\parskip}{\medskipamount}
+%
+
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline26731}%
+$2^{\circ}
+ \hspace{-0.37em}.\hspace{0.02em}4$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline26733}%
+$42^{\circ}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline27323}%
+$0\!-\!\pi$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{section}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline27383}%
+$61^\circ$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsubsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline27391}%
+$+1^{\circ}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline27397}%
+$24^{h}\,59^{m}\,59^{s}.999$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline27464}%
+$[\,\theta,\phi~]$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsubsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline27478}%
+$[\,\Delta x,\Delta y, \Delta z\,]$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline27484}%
+${\bf D}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline27486}%
+${\bf V1}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline27488}%
+${\bf V2}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline27490}%
+$<{\bf V1}+{\bf D}>$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline27492}%
+$(1-{\bf D}\cdot{\bf V1})$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline27494}%
+$\delta E$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline27498}%
+${\tan \delta E\approx\delta E}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline27504}%
+$\delta E \cos E$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline27506}%
+$\delta E \sin E$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline27512}%
+$\cos \delta E$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline27514}%
+$(1-\delta E^2 /2)$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline27518}%
+$\equiv$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline27524}%
+$[\theta,\phi,\dot{\theta},\dot{\phi}]$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline27750}%
+$\lambda,\beta$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline27752}%
+$l^{I\!I},b^{I\!I}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlfigureA{figure27550}%
+\begin{figure}\begin{center}
+\begin{tabular}{|cccccc|} \hline
+& & & & & \\\hspace{5em} & \hspace{5em} & \hspace{5em} &
+ \hspace{5em} & \hspace{5em} & \hspace{5em} \\\multicolumn{2}{|c}{\hspace{0em}
+\fbox {\parbox{8.5em}{\center \vspace{-2ex}
+ mean $[\,\alpha,\delta\,]$, FK4, \\ any equinox
+ \vspace{0.5ex}}}
+} &
+ \multicolumn{2}{c}{\hspace{0em}
+\fbox {\parbox{8.5em}{\center \vspace{-2ex}
+ mean $[\,\alpha,\delta\,]$, FK4,
+ no $\mu$, any equinox
+ \vspace{0.5ex}}}
+} &
+\multicolumn{2}{c|}{\hspace{0em}
+\fbox {\parbox{8.5em}{\center \vspace{-2ex}
+ mean $[\,\alpha,\delta\,]$, FK5, \\ any equinox
+ \vspace{0.5ex}}}
+} \\& \multicolumn{2}{|c|}{} & \multicolumn{2}{c|}{} & \\\multicolumn{2}{|c}{space motion} & \multicolumn{1}{c|}{} & &
+ \multicolumn{2}{c|}{space motion} \\\multicolumn{2}{|c}{-- E-terms} &
+ \multicolumn{2}{c}{-- E-terms} & \multicolumn{1}{c|}{} & \\\multicolumn{2}{|c}{precess to B1950} & \multicolumn{2}{c}{precess to B1950} &
+ \multicolumn{2}{c|}{precess to J2000} \\\multicolumn{2}{|c}{+ E-terms} &
+ \multicolumn{2}{c}{+ E-terms} & \multicolumn{1}{c|}{} & \\\multicolumn{2}{|c}{FK4 to FK5, no $\mu$} &
+ \multicolumn{2}{c}{FK4 to FK5, no $\mu$} & \multicolumn{1}{c|}{} & \\\multicolumn{2}{|c}{parallax} & \multicolumn{1}{c|}{} & &
+ \multicolumn{2}{c|}{parallax} \\& \multicolumn{2}{|c|}{} & \multicolumn{2}{c|}{} & \\ \cline{2-5}
+\multicolumn{3}{|c|}{} & & & \\& \multicolumn{4}{c}{
+\fbox {\parbox{18em}{\center \vspace{-2ex}
+ FK5, J2000, current epoch, geocentric
+ \vspace{0.5ex}}}
+} & \\\multicolumn{3}{|c|}{} & & & \\& \multicolumn{4}{c}{light deflection} & \\& \multicolumn{4}{c}{annual aberration} & \\& \multicolumn{4}{c}{precession/nutation} & \\\multicolumn{3}{|c|}{} & & & \\& \multicolumn{4}{c}{
+\fbox {Apparent $[\,\alpha,\delta\,]$}
+} & \\\multicolumn{3}{|c|}{} & & & \\& \multicolumn{4}{c}{Earth rotation} & \\\multicolumn{3}{|c|}{} & & & \\& \multicolumn{4}{c}{
+\fbox {Apparent $[\,h,\delta\,]$}
+} & \\\multicolumn{3}{|c|}{} & & & \\& \multicolumn{4}{c}{diurnal aberration} & \\\multicolumn{3}{|c|}{} & & & \\& \multicolumn{4}{c}{
+\fbox {Topocentric $[\,h,\delta\,]$}
+} & \\\multicolumn{3}{|c|}{} & & & \\& \multicolumn{4}{c}{$[\,h,\delta\,]$\ to $[\,Az,El~]$} & \\\multicolumn{3}{|c|}{} & & & \\& \multicolumn{4}{c}{
+\fbox {Topocentric $[\,Az,El~]$}
+} & \\\multicolumn{3}{|c|}{} & & & \\& \multicolumn{4}{c}{refraction} & \\\multicolumn{3}{|c|}{} & & & \\& \multicolumn{4}{c}{
+\fbox {Observed $[\,Az,El~]$}
+} & \\& & & & & \\& & & & & \\ \hline
+\end{tabular}
+\end{center}
+\vspace{-0.5ex}
+Star positions are published or catalogued using
+one of the mean $[\,\alpha,\delta\,]$\ systems shown at
+the top. The ``FK4'' systems
+were used before about 1980 and are usually
+equinox B1950. The ``FK5'' system, equinox J2000, is now preferred,
+or rather its modern equivalent, the International Celestial Reference
+Frame (in the optical, the Hipparcos catalogue).
+The figure relates a star's mean $[\,\alpha,\delta\,]$\ to the actual
+line-of-sight to the star.
+Note that for the conventional choices of equinox, namely
+B1950 or J2000, all of the precession and E-terms corrections
+are superfluous.
+\end{figure}%
+\lthtmlfigureZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline27878}%
+$23^{\circ}
+ \hspace{-0.37em}.\hspace{0.02em}5$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline27888}%
+$\epsilon$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline27890}%
+$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.0001$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsubsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline27892}%
+$(3\times3)$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline27894}%
+$0^{\circ}
+ \hspace{-0.37em}.\hspace{0.02em}2$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline27923}%
+$50\hspace{-0.05em}^{'\hspace{-0.1em}'}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline27927}%
+$12^{h}\,07^{m}\,58^{s}.09$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline27929}%
+$-19^{\circ}\,44^{'}\,37^{''}.1$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline27959}%
+$[\mu_\alpha,\mu_\delta]$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28022}%
+$20\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.5$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28106}%
+$\mu_\alpha=-$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28108}%
+$0^{\rm s}\hspace{-0.3em}.015869$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28112}%
+$0^{\rm s}\hspace{-0.3em}.029032$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28114}%
+$~\sin \alpha
+ +$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28116}%
+$0^{\rm s}\hspace{-0.3em}.000340$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28118}%
+$~\cos \alpha ) \sin \delta
+ -$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28120}%
+$0^{\rm s}\hspace{-0.3em}.000105$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28122}%
+$~\cos \alpha
+ -$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28124}%
+$0^{\rm s}\hspace{-0.3em}.000083$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28126}%
+$~\sin \alpha ) \sec \delta $%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28128}%
+$\mu_\delta\,=+$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28130}%
+$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.43549$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28134}%
+$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.00510$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28136}%
+$~\sin \alpha +
+ ($%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28138}%
+$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.00158$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28140}%
+$~\sin \alpha
+ -$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28142}%
+$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.00125$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28146}%
+$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.00066$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28148}%
+$~\cos \delta $%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28214}%
+$\alpha=$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28216}%
+$16^{h}\,09^{m}\,55^{s}.13$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28218}%
+$\delta=$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28220}%
+$-75^{\circ}\,59^{'}\,27^{''}.2$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28222}%
+$\mu_\alpha=$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28224}%
+$-0^{\rm s}\hspace{-0.3em}.0312$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28228}%
+$\mu_\delta=$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28230}%
+$+0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.103$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28234}%
+$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.062$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28274}%
+$1\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.74$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28276}%
+$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.02$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28278}%
+$20^\circ$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28282}%
+$90^\circ-\delta$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28386}%
+$\theta$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmldisplayA{displaymath28366}%
+\begin{displaymath}h = \theta - \alpha \end{displaymath}%
+\lthtmldisplayZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28394}%
+$=\Delta\psi\cos\epsilon$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsubsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28408}%
+$0^{\circ}
+ \hspace{-0.37em}.\hspace{0.02em}5$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmldisplayA{displaymath28367}%
+\begin{displaymath}\zeta _{vac} \approx \zeta _{obs}
+ + A \tan \zeta _{obs}
+ + B \tan ^{3}\zeta _{obs} \end{displaymath}%
+\lthtmldisplayZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28412}%
+$\zeta _{vac}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28420}%
+$60\hspace{-0.05em}^{'\hspace{-0.1em}'}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28422}%
+$-0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.06$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmldisplayA{displaymath28368}%
+\begin{displaymath}\zeta _{obs} \approx \zeta _{vac}
+ - \frac{A \tan \zeta _{vac} + B \tan ^{3}\zeta _{vac}}
+ {1 + ( A + 3 B \tan ^{2}\zeta _{vac} ) \sec ^{2}\zeta _{vac}}\end{displaymath}%
+\lthtmldisplayZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28444}%
+$100\mu m$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsubsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsubsection}
+\stepcounter{subsubsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28549}%
+$23^{h}\,59^{m}\,60^{s}.0$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28551}%
+$00^{h}\,00^{m}\,00^{s}.0$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsubsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28555}%
+$\Delta\psi\cos\epsilon$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsubsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28561}%
+$32^{\rm s}\hspace{-0.3em}.184$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28567}%
+$0^{\rm s}\hspace{-0.3em}.0016$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28569}%
+$0^{\rm s}\hspace{-0.3em}.0013$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28571}%
+$\Delta {\rm T} = {\rm ET} - {\rm UT}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28573}%
+$\Delta {\rm T}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28650}%
+$2\hspace{-0.05em}^{'\hspace{-0.1em}'}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28656}%
+$\pm100$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28664}%
+$1^\circ$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28666}%
+$8\hspace{-0.05em}^{'\hspace{-0.1em}'}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28668}%
+$5^{\rm h}\,25^{\rm m}$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28728}%
+$\varpi = \Omega + \omega$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28740}%
+$L = \varpi + M$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28752}%
+$M_\odot = 1$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28769}%
+$\sim20$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{subsection}
+\stepcounter{subsection}
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28861}%
+$C_1\!=\!+50.0$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28863}%
+$C_2\!=\!-2.0$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28865}%
+$C_3\!=\!-10.0$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28867}%
+$C_4\!=\!+25.0$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28869}%
+$\sigma=5.0$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+{\newpage\clearpage
+\lthtmlinlinemathA{tex2html_wrap_inline28871}%
+$1000\times20$%
+\lthtmlinlinemathZ
+\hfill\lthtmlcheckvsize\clearpage}
+
+\stepcounter{section}
+
+\setlength {\leftmargin}{2cm}
+%
+
+
+\setlength {\parsep}{\smallskipamount}
+%
+
+
+\setlength {\leftmargin}{2cm}
+%
+
+
+\setlength {\parsep}{\smallskipamount}
+%
+
+
+\setlength {\leftmargin}{2cm}
+%
+
+
+\setlength {\parsep}{\smallskipamount}
+%
+
+
+\setlength {\leftmargin}{2cm}
+%
+
+
+\setlength {\parsep}{\smallskipamount}
+%
+
+
+\setlength {\leftmargin}{2cm}
+%
+
+
+\setlength {\parsep}{\smallskipamount}
+%
+
+
+\setlength {\leftmargin}{2cm}
+%
+
+
+\setlength {\parsep}{\smallskipamount}
+%
+
+
+\setlength {\leftmargin}{2cm}
+%
+
+
+\setlength {\parsep}{\smallskipamount}
+%
+
+
+\setlength {\leftmargin}{2cm}
+%
+
+
+\setlength {\parsep}{\smallskipamount}
+%
+
+
+\setlength {\leftmargin}{2cm}
+%
+
+
+\setlength {\parsep}{\smallskipamount}
+%
+
+
+\setlength {\leftmargin}{2cm}
+%
+
+
+\setlength {\parsep}{\smallskipamount}
+%
+
+
+\setlength {\leftmargin}{2cm}
+%
+
+
+\setlength {\parsep}{\smallskipamount}
+%
+
+
+\setlength {\leftmargin}{2cm}
+%
+
+
+\setlength {\parsep}{\smallskipamount}
+%
+
+
+\setlength {\leftmargin}{2cm}
+%
+
+
+\setlength {\parsep}{\smallskipamount}
+%
+
+
+\setlength {\leftmargin}{2cm}
+%
+
+
+\setlength {\parsep}{\smallskipamount}
+%
+
+
+\setlength {\leftmargin}{2cm}
+%
+
+
+\setlength {\parsep}{\smallskipamount}
+%
+
+
+\setlength {\leftmargin}{2cm}
+%
+
+
+\setlength {\parsep}{\smallskipamount}
+%
+
+
+\setlength {\leftmargin}{2cm}
+%
+
+
+\setlength {\parsep}{\smallskipamount}
+%
+
+
+\setlength {\leftmargin}{2cm}
+%
+
+
+\setlength {\parsep}{\smallskipamount}
+%
+
+
+\setlength {\leftmargin}{2cm}
+%
+
+
+\setlength {\parsep}{\smallskipamount}
+%
+
+
+\setlength {\leftmargin}{2cm}
+%
+
+
+\setlength {\parsep}{\smallskipamount}
+%
+
+
+\end{document}
diff --git a/src/slalib/sun67.htx/img1.gif b/src/slalib/sun67.htx/img1.gif
new file mode 100644
index 0000000..d7b5e28
--- /dev/null
+++ b/src/slalib/sun67.htx/img1.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img10.gif b/src/slalib/sun67.htx/img10.gif
new file mode 100644
index 0000000..b62f1a8
--- /dev/null
+++ b/src/slalib/sun67.htx/img10.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img100.gif b/src/slalib/sun67.htx/img100.gif
new file mode 100644
index 0000000..398505a
--- /dev/null
+++ b/src/slalib/sun67.htx/img100.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img101.gif b/src/slalib/sun67.htx/img101.gif
new file mode 100644
index 0000000..f058067
--- /dev/null
+++ b/src/slalib/sun67.htx/img101.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img102.gif b/src/slalib/sun67.htx/img102.gif
new file mode 100644
index 0000000..8be43bb
--- /dev/null
+++ b/src/slalib/sun67.htx/img102.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img103.gif b/src/slalib/sun67.htx/img103.gif
new file mode 100644
index 0000000..709f499
--- /dev/null
+++ b/src/slalib/sun67.htx/img103.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img104.gif b/src/slalib/sun67.htx/img104.gif
new file mode 100644
index 0000000..12ef0a3
--- /dev/null
+++ b/src/slalib/sun67.htx/img104.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img105.gif b/src/slalib/sun67.htx/img105.gif
new file mode 100644
index 0000000..ddcae42
--- /dev/null
+++ b/src/slalib/sun67.htx/img105.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img106.gif b/src/slalib/sun67.htx/img106.gif
new file mode 100644
index 0000000..0ef06d5
--- /dev/null
+++ b/src/slalib/sun67.htx/img106.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img107.gif b/src/slalib/sun67.htx/img107.gif
new file mode 100644
index 0000000..ddef7b5
--- /dev/null
+++ b/src/slalib/sun67.htx/img107.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img108.gif b/src/slalib/sun67.htx/img108.gif
new file mode 100644
index 0000000..791b66a
--- /dev/null
+++ b/src/slalib/sun67.htx/img108.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img109.gif b/src/slalib/sun67.htx/img109.gif
new file mode 100644
index 0000000..ed30950
--- /dev/null
+++ b/src/slalib/sun67.htx/img109.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img11.gif b/src/slalib/sun67.htx/img11.gif
new file mode 100644
index 0000000..f7ed3a1
--- /dev/null
+++ b/src/slalib/sun67.htx/img11.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img110.gif b/src/slalib/sun67.htx/img110.gif
new file mode 100644
index 0000000..6dc29fe
--- /dev/null
+++ b/src/slalib/sun67.htx/img110.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img111.gif b/src/slalib/sun67.htx/img111.gif
new file mode 100644
index 0000000..bf7b222
--- /dev/null
+++ b/src/slalib/sun67.htx/img111.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img112.gif b/src/slalib/sun67.htx/img112.gif
new file mode 100644
index 0000000..cb0fc50
--- /dev/null
+++ b/src/slalib/sun67.htx/img112.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img113.gif b/src/slalib/sun67.htx/img113.gif
new file mode 100644
index 0000000..0bac8a0
--- /dev/null
+++ b/src/slalib/sun67.htx/img113.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img114.gif b/src/slalib/sun67.htx/img114.gif
new file mode 100644
index 0000000..d9fb000
--- /dev/null
+++ b/src/slalib/sun67.htx/img114.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img115.gif b/src/slalib/sun67.htx/img115.gif
new file mode 100644
index 0000000..5d01c21
--- /dev/null
+++ b/src/slalib/sun67.htx/img115.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img116.gif b/src/slalib/sun67.htx/img116.gif
new file mode 100644
index 0000000..243eba0
--- /dev/null
+++ b/src/slalib/sun67.htx/img116.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img117.gif b/src/slalib/sun67.htx/img117.gif
new file mode 100644
index 0000000..8b4d249
--- /dev/null
+++ b/src/slalib/sun67.htx/img117.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img118.gif b/src/slalib/sun67.htx/img118.gif
new file mode 100644
index 0000000..1c78304
--- /dev/null
+++ b/src/slalib/sun67.htx/img118.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img119.gif b/src/slalib/sun67.htx/img119.gif
new file mode 100644
index 0000000..d6338e5
--- /dev/null
+++ b/src/slalib/sun67.htx/img119.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img12.gif b/src/slalib/sun67.htx/img12.gif
new file mode 100644
index 0000000..91e6c1e
--- /dev/null
+++ b/src/slalib/sun67.htx/img12.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img120.gif b/src/slalib/sun67.htx/img120.gif
new file mode 100644
index 0000000..140c0d3
--- /dev/null
+++ b/src/slalib/sun67.htx/img120.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img121.gif b/src/slalib/sun67.htx/img121.gif
new file mode 100644
index 0000000..3f69858
--- /dev/null
+++ b/src/slalib/sun67.htx/img121.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img122.gif b/src/slalib/sun67.htx/img122.gif
new file mode 100644
index 0000000..b6ea2e4
--- /dev/null
+++ b/src/slalib/sun67.htx/img122.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img123.gif b/src/slalib/sun67.htx/img123.gif
new file mode 100644
index 0000000..b575d67
--- /dev/null
+++ b/src/slalib/sun67.htx/img123.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img124.gif b/src/slalib/sun67.htx/img124.gif
new file mode 100644
index 0000000..d4a6904
--- /dev/null
+++ b/src/slalib/sun67.htx/img124.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img125.gif b/src/slalib/sun67.htx/img125.gif
new file mode 100644
index 0000000..cd22fb5
--- /dev/null
+++ b/src/slalib/sun67.htx/img125.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img126.gif b/src/slalib/sun67.htx/img126.gif
new file mode 100644
index 0000000..aa02dc1
--- /dev/null
+++ b/src/slalib/sun67.htx/img126.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img127.gif b/src/slalib/sun67.htx/img127.gif
new file mode 100644
index 0000000..9ce71a6
--- /dev/null
+++ b/src/slalib/sun67.htx/img127.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img128.gif b/src/slalib/sun67.htx/img128.gif
new file mode 100644
index 0000000..f79525b
--- /dev/null
+++ b/src/slalib/sun67.htx/img128.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img129.gif b/src/slalib/sun67.htx/img129.gif
new file mode 100644
index 0000000..3c59b23
--- /dev/null
+++ b/src/slalib/sun67.htx/img129.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img13.gif b/src/slalib/sun67.htx/img13.gif
new file mode 100644
index 0000000..a68c1d9
--- /dev/null
+++ b/src/slalib/sun67.htx/img13.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img130.gif b/src/slalib/sun67.htx/img130.gif
new file mode 100644
index 0000000..882e609
--- /dev/null
+++ b/src/slalib/sun67.htx/img130.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img131.gif b/src/slalib/sun67.htx/img131.gif
new file mode 100644
index 0000000..c223db8
--- /dev/null
+++ b/src/slalib/sun67.htx/img131.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img132.gif b/src/slalib/sun67.htx/img132.gif
new file mode 100644
index 0000000..b4ff911
--- /dev/null
+++ b/src/slalib/sun67.htx/img132.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img133.gif b/src/slalib/sun67.htx/img133.gif
new file mode 100644
index 0000000..6df3c7a
--- /dev/null
+++ b/src/slalib/sun67.htx/img133.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img134.gif b/src/slalib/sun67.htx/img134.gif
new file mode 100644
index 0000000..10b35b5
--- /dev/null
+++ b/src/slalib/sun67.htx/img134.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img135.gif b/src/slalib/sun67.htx/img135.gif
new file mode 100644
index 0000000..3269790
--- /dev/null
+++ b/src/slalib/sun67.htx/img135.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img136.gif b/src/slalib/sun67.htx/img136.gif
new file mode 100644
index 0000000..d6fded5
--- /dev/null
+++ b/src/slalib/sun67.htx/img136.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img137.gif b/src/slalib/sun67.htx/img137.gif
new file mode 100644
index 0000000..6b68965
--- /dev/null
+++ b/src/slalib/sun67.htx/img137.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img138.gif b/src/slalib/sun67.htx/img138.gif
new file mode 100644
index 0000000..3f3e31c
--- /dev/null
+++ b/src/slalib/sun67.htx/img138.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img139.gif b/src/slalib/sun67.htx/img139.gif
new file mode 100644
index 0000000..3e56ce2
--- /dev/null
+++ b/src/slalib/sun67.htx/img139.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img14.gif b/src/slalib/sun67.htx/img14.gif
new file mode 100644
index 0000000..9bc0336
--- /dev/null
+++ b/src/slalib/sun67.htx/img14.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img140.gif b/src/slalib/sun67.htx/img140.gif
new file mode 100644
index 0000000..1e6348f
--- /dev/null
+++ b/src/slalib/sun67.htx/img140.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img141.gif b/src/slalib/sun67.htx/img141.gif
new file mode 100644
index 0000000..278957d
--- /dev/null
+++ b/src/slalib/sun67.htx/img141.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img142.gif b/src/slalib/sun67.htx/img142.gif
new file mode 100644
index 0000000..7c140ef
--- /dev/null
+++ b/src/slalib/sun67.htx/img142.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img143.gif b/src/slalib/sun67.htx/img143.gif
new file mode 100644
index 0000000..39ecd67
--- /dev/null
+++ b/src/slalib/sun67.htx/img143.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img144.gif b/src/slalib/sun67.htx/img144.gif
new file mode 100644
index 0000000..6ab1623
--- /dev/null
+++ b/src/slalib/sun67.htx/img144.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img145.gif b/src/slalib/sun67.htx/img145.gif
new file mode 100644
index 0000000..ad8e73e
--- /dev/null
+++ b/src/slalib/sun67.htx/img145.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img146.gif b/src/slalib/sun67.htx/img146.gif
new file mode 100644
index 0000000..c65c07a
--- /dev/null
+++ b/src/slalib/sun67.htx/img146.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img147.gif b/src/slalib/sun67.htx/img147.gif
new file mode 100644
index 0000000..de63550
--- /dev/null
+++ b/src/slalib/sun67.htx/img147.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img148.gif b/src/slalib/sun67.htx/img148.gif
new file mode 100644
index 0000000..4adf366
--- /dev/null
+++ b/src/slalib/sun67.htx/img148.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img149.gif b/src/slalib/sun67.htx/img149.gif
new file mode 100644
index 0000000..7bbadd9
--- /dev/null
+++ b/src/slalib/sun67.htx/img149.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img15.gif b/src/slalib/sun67.htx/img15.gif
new file mode 100644
index 0000000..55a91f6
--- /dev/null
+++ b/src/slalib/sun67.htx/img15.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img150.gif b/src/slalib/sun67.htx/img150.gif
new file mode 100644
index 0000000..215d6bd
--- /dev/null
+++ b/src/slalib/sun67.htx/img150.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img151.gif b/src/slalib/sun67.htx/img151.gif
new file mode 100644
index 0000000..34d893a
--- /dev/null
+++ b/src/slalib/sun67.htx/img151.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img152.gif b/src/slalib/sun67.htx/img152.gif
new file mode 100644
index 0000000..a4cd7b2
--- /dev/null
+++ b/src/slalib/sun67.htx/img152.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img153.gif b/src/slalib/sun67.htx/img153.gif
new file mode 100644
index 0000000..7d5fc3d
--- /dev/null
+++ b/src/slalib/sun67.htx/img153.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img154.gif b/src/slalib/sun67.htx/img154.gif
new file mode 100644
index 0000000..e10d26d
--- /dev/null
+++ b/src/slalib/sun67.htx/img154.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img155.gif b/src/slalib/sun67.htx/img155.gif
new file mode 100644
index 0000000..8a36cb9
--- /dev/null
+++ b/src/slalib/sun67.htx/img155.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img156.gif b/src/slalib/sun67.htx/img156.gif
new file mode 100644
index 0000000..b920388
--- /dev/null
+++ b/src/slalib/sun67.htx/img156.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img157.gif b/src/slalib/sun67.htx/img157.gif
new file mode 100644
index 0000000..9c2a20e
--- /dev/null
+++ b/src/slalib/sun67.htx/img157.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img158.gif b/src/slalib/sun67.htx/img158.gif
new file mode 100644
index 0000000..08323ac
--- /dev/null
+++ b/src/slalib/sun67.htx/img158.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img159.gif b/src/slalib/sun67.htx/img159.gif
new file mode 100644
index 0000000..9bb4943
--- /dev/null
+++ b/src/slalib/sun67.htx/img159.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img16.gif b/src/slalib/sun67.htx/img16.gif
new file mode 100644
index 0000000..db11f13
--- /dev/null
+++ b/src/slalib/sun67.htx/img16.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img160.gif b/src/slalib/sun67.htx/img160.gif
new file mode 100644
index 0000000..45bf04c
--- /dev/null
+++ b/src/slalib/sun67.htx/img160.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img161.gif b/src/slalib/sun67.htx/img161.gif
new file mode 100644
index 0000000..39801d7
--- /dev/null
+++ b/src/slalib/sun67.htx/img161.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img162.gif b/src/slalib/sun67.htx/img162.gif
new file mode 100644
index 0000000..e36f849
--- /dev/null
+++ b/src/slalib/sun67.htx/img162.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img163.gif b/src/slalib/sun67.htx/img163.gif
new file mode 100644
index 0000000..d2f8408
--- /dev/null
+++ b/src/slalib/sun67.htx/img163.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img164.gif b/src/slalib/sun67.htx/img164.gif
new file mode 100644
index 0000000..371d870
--- /dev/null
+++ b/src/slalib/sun67.htx/img164.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img165.gif b/src/slalib/sun67.htx/img165.gif
new file mode 100644
index 0000000..1fc8b8a
--- /dev/null
+++ b/src/slalib/sun67.htx/img165.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img166.gif b/src/slalib/sun67.htx/img166.gif
new file mode 100644
index 0000000..b2066f3
--- /dev/null
+++ b/src/slalib/sun67.htx/img166.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img167.gif b/src/slalib/sun67.htx/img167.gif
new file mode 100644
index 0000000..69baa0b
--- /dev/null
+++ b/src/slalib/sun67.htx/img167.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img168.gif b/src/slalib/sun67.htx/img168.gif
new file mode 100644
index 0000000..9c77a9f
--- /dev/null
+++ b/src/slalib/sun67.htx/img168.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img169.gif b/src/slalib/sun67.htx/img169.gif
new file mode 100644
index 0000000..2757ee2
--- /dev/null
+++ b/src/slalib/sun67.htx/img169.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img17.gif b/src/slalib/sun67.htx/img17.gif
new file mode 100644
index 0000000..f7e5825
--- /dev/null
+++ b/src/slalib/sun67.htx/img17.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img170.gif b/src/slalib/sun67.htx/img170.gif
new file mode 100644
index 0000000..7975d4a
--- /dev/null
+++ b/src/slalib/sun67.htx/img170.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img171.gif b/src/slalib/sun67.htx/img171.gif
new file mode 100644
index 0000000..e72edbd
--- /dev/null
+++ b/src/slalib/sun67.htx/img171.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img172.gif b/src/slalib/sun67.htx/img172.gif
new file mode 100644
index 0000000..70f8874
--- /dev/null
+++ b/src/slalib/sun67.htx/img172.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img173.gif b/src/slalib/sun67.htx/img173.gif
new file mode 100644
index 0000000..1bbbe94
--- /dev/null
+++ b/src/slalib/sun67.htx/img173.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img174.gif b/src/slalib/sun67.htx/img174.gif
new file mode 100644
index 0000000..25dff75
--- /dev/null
+++ b/src/slalib/sun67.htx/img174.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img175.gif b/src/slalib/sun67.htx/img175.gif
new file mode 100644
index 0000000..6a485af
--- /dev/null
+++ b/src/slalib/sun67.htx/img175.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img176.gif b/src/slalib/sun67.htx/img176.gif
new file mode 100644
index 0000000..9d0834f
--- /dev/null
+++ b/src/slalib/sun67.htx/img176.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img177.gif b/src/slalib/sun67.htx/img177.gif
new file mode 100644
index 0000000..bbd3a2b
--- /dev/null
+++ b/src/slalib/sun67.htx/img177.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img178.gif b/src/slalib/sun67.htx/img178.gif
new file mode 100644
index 0000000..7ebec9c
--- /dev/null
+++ b/src/slalib/sun67.htx/img178.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img179.gif b/src/slalib/sun67.htx/img179.gif
new file mode 100644
index 0000000..c1ac88a
--- /dev/null
+++ b/src/slalib/sun67.htx/img179.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img18.gif b/src/slalib/sun67.htx/img18.gif
new file mode 100644
index 0000000..b2b8324
--- /dev/null
+++ b/src/slalib/sun67.htx/img18.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img180.gif b/src/slalib/sun67.htx/img180.gif
new file mode 100644
index 0000000..6af2413
--- /dev/null
+++ b/src/slalib/sun67.htx/img180.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img181.gif b/src/slalib/sun67.htx/img181.gif
new file mode 100644
index 0000000..b5ac444
--- /dev/null
+++ b/src/slalib/sun67.htx/img181.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img182.gif b/src/slalib/sun67.htx/img182.gif
new file mode 100644
index 0000000..c5013f7
--- /dev/null
+++ b/src/slalib/sun67.htx/img182.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img183.gif b/src/slalib/sun67.htx/img183.gif
new file mode 100644
index 0000000..baa2252
--- /dev/null
+++ b/src/slalib/sun67.htx/img183.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img184.gif b/src/slalib/sun67.htx/img184.gif
new file mode 100644
index 0000000..c90b68f
--- /dev/null
+++ b/src/slalib/sun67.htx/img184.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img185.gif b/src/slalib/sun67.htx/img185.gif
new file mode 100644
index 0000000..113fa7c
--- /dev/null
+++ b/src/slalib/sun67.htx/img185.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img186.gif b/src/slalib/sun67.htx/img186.gif
new file mode 100644
index 0000000..6a3576d
--- /dev/null
+++ b/src/slalib/sun67.htx/img186.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img187.gif b/src/slalib/sun67.htx/img187.gif
new file mode 100644
index 0000000..f380409
--- /dev/null
+++ b/src/slalib/sun67.htx/img187.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img188.gif b/src/slalib/sun67.htx/img188.gif
new file mode 100644
index 0000000..6da976c
--- /dev/null
+++ b/src/slalib/sun67.htx/img188.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img189.gif b/src/slalib/sun67.htx/img189.gif
new file mode 100644
index 0000000..3175bde
--- /dev/null
+++ b/src/slalib/sun67.htx/img189.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img19.gif b/src/slalib/sun67.htx/img19.gif
new file mode 100644
index 0000000..8f39094
--- /dev/null
+++ b/src/slalib/sun67.htx/img19.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img190.gif b/src/slalib/sun67.htx/img190.gif
new file mode 100644
index 0000000..b4ad9b4
--- /dev/null
+++ b/src/slalib/sun67.htx/img190.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img191.gif b/src/slalib/sun67.htx/img191.gif
new file mode 100644
index 0000000..2f75e01
--- /dev/null
+++ b/src/slalib/sun67.htx/img191.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img192.gif b/src/slalib/sun67.htx/img192.gif
new file mode 100644
index 0000000..8e73a57
--- /dev/null
+++ b/src/slalib/sun67.htx/img192.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img193.gif b/src/slalib/sun67.htx/img193.gif
new file mode 100644
index 0000000..6cfd3d7
--- /dev/null
+++ b/src/slalib/sun67.htx/img193.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img194.gif b/src/slalib/sun67.htx/img194.gif
new file mode 100644
index 0000000..8c60dba
--- /dev/null
+++ b/src/slalib/sun67.htx/img194.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img195.gif b/src/slalib/sun67.htx/img195.gif
new file mode 100644
index 0000000..e61b714
--- /dev/null
+++ b/src/slalib/sun67.htx/img195.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img196.gif b/src/slalib/sun67.htx/img196.gif
new file mode 100644
index 0000000..eb4f3bd
--- /dev/null
+++ b/src/slalib/sun67.htx/img196.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img197.gif b/src/slalib/sun67.htx/img197.gif
new file mode 100644
index 0000000..c8e679f
--- /dev/null
+++ b/src/slalib/sun67.htx/img197.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img198.gif b/src/slalib/sun67.htx/img198.gif
new file mode 100644
index 0000000..6ef5f3a
--- /dev/null
+++ b/src/slalib/sun67.htx/img198.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img199.gif b/src/slalib/sun67.htx/img199.gif
new file mode 100644
index 0000000..13d024d
--- /dev/null
+++ b/src/slalib/sun67.htx/img199.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img2.gif b/src/slalib/sun67.htx/img2.gif
new file mode 100644
index 0000000..cd0188c
--- /dev/null
+++ b/src/slalib/sun67.htx/img2.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img20.gif b/src/slalib/sun67.htx/img20.gif
new file mode 100644
index 0000000..92345b7
--- /dev/null
+++ b/src/slalib/sun67.htx/img20.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img200.gif b/src/slalib/sun67.htx/img200.gif
new file mode 100644
index 0000000..895bb1e
--- /dev/null
+++ b/src/slalib/sun67.htx/img200.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img201.gif b/src/slalib/sun67.htx/img201.gif
new file mode 100644
index 0000000..e321eae
--- /dev/null
+++ b/src/slalib/sun67.htx/img201.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img202.gif b/src/slalib/sun67.htx/img202.gif
new file mode 100644
index 0000000..ee8b36c
--- /dev/null
+++ b/src/slalib/sun67.htx/img202.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img203.gif b/src/slalib/sun67.htx/img203.gif
new file mode 100644
index 0000000..0953ef2
--- /dev/null
+++ b/src/slalib/sun67.htx/img203.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img204.gif b/src/slalib/sun67.htx/img204.gif
new file mode 100644
index 0000000..3f2f023
--- /dev/null
+++ b/src/slalib/sun67.htx/img204.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img205.gif b/src/slalib/sun67.htx/img205.gif
new file mode 100644
index 0000000..4c352e9
--- /dev/null
+++ b/src/slalib/sun67.htx/img205.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img206.gif b/src/slalib/sun67.htx/img206.gif
new file mode 100644
index 0000000..04a0557
--- /dev/null
+++ b/src/slalib/sun67.htx/img206.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img207.gif b/src/slalib/sun67.htx/img207.gif
new file mode 100644
index 0000000..91d7a83
--- /dev/null
+++ b/src/slalib/sun67.htx/img207.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img208.gif b/src/slalib/sun67.htx/img208.gif
new file mode 100644
index 0000000..eb1fd5f
--- /dev/null
+++ b/src/slalib/sun67.htx/img208.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img209.gif b/src/slalib/sun67.htx/img209.gif
new file mode 100644
index 0000000..602560b
--- /dev/null
+++ b/src/slalib/sun67.htx/img209.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img21.gif b/src/slalib/sun67.htx/img21.gif
new file mode 100644
index 0000000..88688bd
--- /dev/null
+++ b/src/slalib/sun67.htx/img21.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img210.gif b/src/slalib/sun67.htx/img210.gif
new file mode 100644
index 0000000..e0f60e8
--- /dev/null
+++ b/src/slalib/sun67.htx/img210.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img211.gif b/src/slalib/sun67.htx/img211.gif
new file mode 100644
index 0000000..b3b874b
--- /dev/null
+++ b/src/slalib/sun67.htx/img211.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img212.gif b/src/slalib/sun67.htx/img212.gif
new file mode 100644
index 0000000..b0513df
--- /dev/null
+++ b/src/slalib/sun67.htx/img212.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img213.gif b/src/slalib/sun67.htx/img213.gif
new file mode 100644
index 0000000..5a952ee
--- /dev/null
+++ b/src/slalib/sun67.htx/img213.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img214.gif b/src/slalib/sun67.htx/img214.gif
new file mode 100644
index 0000000..663a28e
--- /dev/null
+++ b/src/slalib/sun67.htx/img214.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img215.gif b/src/slalib/sun67.htx/img215.gif
new file mode 100644
index 0000000..00510af
--- /dev/null
+++ b/src/slalib/sun67.htx/img215.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img216.gif b/src/slalib/sun67.htx/img216.gif
new file mode 100644
index 0000000..3732254
--- /dev/null
+++ b/src/slalib/sun67.htx/img216.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img217.gif b/src/slalib/sun67.htx/img217.gif
new file mode 100644
index 0000000..2a73dca
--- /dev/null
+++ b/src/slalib/sun67.htx/img217.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img218.gif b/src/slalib/sun67.htx/img218.gif
new file mode 100644
index 0000000..3e8e21c
--- /dev/null
+++ b/src/slalib/sun67.htx/img218.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img219.gif b/src/slalib/sun67.htx/img219.gif
new file mode 100644
index 0000000..c34ded4
--- /dev/null
+++ b/src/slalib/sun67.htx/img219.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img22.gif b/src/slalib/sun67.htx/img22.gif
new file mode 100644
index 0000000..3dd46fa
--- /dev/null
+++ b/src/slalib/sun67.htx/img22.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img220.gif b/src/slalib/sun67.htx/img220.gif
new file mode 100644
index 0000000..c00a9e4
--- /dev/null
+++ b/src/slalib/sun67.htx/img220.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img221.gif b/src/slalib/sun67.htx/img221.gif
new file mode 100644
index 0000000..b6a457c
--- /dev/null
+++ b/src/slalib/sun67.htx/img221.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img222.gif b/src/slalib/sun67.htx/img222.gif
new file mode 100644
index 0000000..241b1e9
--- /dev/null
+++ b/src/slalib/sun67.htx/img222.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img223.gif b/src/slalib/sun67.htx/img223.gif
new file mode 100644
index 0000000..095bdda
--- /dev/null
+++ b/src/slalib/sun67.htx/img223.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img224.gif b/src/slalib/sun67.htx/img224.gif
new file mode 100644
index 0000000..3e54f3c
--- /dev/null
+++ b/src/slalib/sun67.htx/img224.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img225.gif b/src/slalib/sun67.htx/img225.gif
new file mode 100644
index 0000000..5e132ae
--- /dev/null
+++ b/src/slalib/sun67.htx/img225.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img226.gif b/src/slalib/sun67.htx/img226.gif
new file mode 100644
index 0000000..b256d3d
--- /dev/null
+++ b/src/slalib/sun67.htx/img226.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img227.gif b/src/slalib/sun67.htx/img227.gif
new file mode 100644
index 0000000..7d27a2c
--- /dev/null
+++ b/src/slalib/sun67.htx/img227.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img228.gif b/src/slalib/sun67.htx/img228.gif
new file mode 100644
index 0000000..22b47de
--- /dev/null
+++ b/src/slalib/sun67.htx/img228.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img229.gif b/src/slalib/sun67.htx/img229.gif
new file mode 100644
index 0000000..cc99808
--- /dev/null
+++ b/src/slalib/sun67.htx/img229.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img23.gif b/src/slalib/sun67.htx/img23.gif
new file mode 100644
index 0000000..0f08bbb
--- /dev/null
+++ b/src/slalib/sun67.htx/img23.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img230.gif b/src/slalib/sun67.htx/img230.gif
new file mode 100644
index 0000000..7485114
--- /dev/null
+++ b/src/slalib/sun67.htx/img230.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img231.gif b/src/slalib/sun67.htx/img231.gif
new file mode 100644
index 0000000..8697b87
--- /dev/null
+++ b/src/slalib/sun67.htx/img231.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img232.gif b/src/slalib/sun67.htx/img232.gif
new file mode 100644
index 0000000..27ff60f
--- /dev/null
+++ b/src/slalib/sun67.htx/img232.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img233.gif b/src/slalib/sun67.htx/img233.gif
new file mode 100644
index 0000000..9c8cba5
--- /dev/null
+++ b/src/slalib/sun67.htx/img233.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img234.gif b/src/slalib/sun67.htx/img234.gif
new file mode 100644
index 0000000..459ccad
--- /dev/null
+++ b/src/slalib/sun67.htx/img234.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img235.gif b/src/slalib/sun67.htx/img235.gif
new file mode 100644
index 0000000..b225074
--- /dev/null
+++ b/src/slalib/sun67.htx/img235.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img236.gif b/src/slalib/sun67.htx/img236.gif
new file mode 100644
index 0000000..a784467
--- /dev/null
+++ b/src/slalib/sun67.htx/img236.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img237.gif b/src/slalib/sun67.htx/img237.gif
new file mode 100644
index 0000000..3683e0a
--- /dev/null
+++ b/src/slalib/sun67.htx/img237.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img238.gif b/src/slalib/sun67.htx/img238.gif
new file mode 100644
index 0000000..7f5312d
--- /dev/null
+++ b/src/slalib/sun67.htx/img238.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img239.gif b/src/slalib/sun67.htx/img239.gif
new file mode 100644
index 0000000..6127867
--- /dev/null
+++ b/src/slalib/sun67.htx/img239.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img24.gif b/src/slalib/sun67.htx/img24.gif
new file mode 100644
index 0000000..259482f
--- /dev/null
+++ b/src/slalib/sun67.htx/img24.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img240.gif b/src/slalib/sun67.htx/img240.gif
new file mode 100644
index 0000000..6ed8940
--- /dev/null
+++ b/src/slalib/sun67.htx/img240.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img241.gif b/src/slalib/sun67.htx/img241.gif
new file mode 100644
index 0000000..b381cfb
--- /dev/null
+++ b/src/slalib/sun67.htx/img241.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img242.gif b/src/slalib/sun67.htx/img242.gif
new file mode 100644
index 0000000..ef74cab
--- /dev/null
+++ b/src/slalib/sun67.htx/img242.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img243.gif b/src/slalib/sun67.htx/img243.gif
new file mode 100644
index 0000000..c2ea4ad
--- /dev/null
+++ b/src/slalib/sun67.htx/img243.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img244.gif b/src/slalib/sun67.htx/img244.gif
new file mode 100644
index 0000000..5f3f596
--- /dev/null
+++ b/src/slalib/sun67.htx/img244.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img245.gif b/src/slalib/sun67.htx/img245.gif
new file mode 100644
index 0000000..cb55533
--- /dev/null
+++ b/src/slalib/sun67.htx/img245.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img246.gif b/src/slalib/sun67.htx/img246.gif
new file mode 100644
index 0000000..567566b
--- /dev/null
+++ b/src/slalib/sun67.htx/img246.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img247.gif b/src/slalib/sun67.htx/img247.gif
new file mode 100644
index 0000000..3a037ac
--- /dev/null
+++ b/src/slalib/sun67.htx/img247.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img248.gif b/src/slalib/sun67.htx/img248.gif
new file mode 100644
index 0000000..56d7052
--- /dev/null
+++ b/src/slalib/sun67.htx/img248.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img249.gif b/src/slalib/sun67.htx/img249.gif
new file mode 100644
index 0000000..410a2e1
--- /dev/null
+++ b/src/slalib/sun67.htx/img249.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img25.gif b/src/slalib/sun67.htx/img25.gif
new file mode 100644
index 0000000..c23b91f
--- /dev/null
+++ b/src/slalib/sun67.htx/img25.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img250.gif b/src/slalib/sun67.htx/img250.gif
new file mode 100644
index 0000000..7f14038
--- /dev/null
+++ b/src/slalib/sun67.htx/img250.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img251.gif b/src/slalib/sun67.htx/img251.gif
new file mode 100644
index 0000000..d6b6e3b
--- /dev/null
+++ b/src/slalib/sun67.htx/img251.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img252.gif b/src/slalib/sun67.htx/img252.gif
new file mode 100644
index 0000000..6498340
--- /dev/null
+++ b/src/slalib/sun67.htx/img252.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img253.gif b/src/slalib/sun67.htx/img253.gif
new file mode 100644
index 0000000..0bebbe9
--- /dev/null
+++ b/src/slalib/sun67.htx/img253.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img254.gif b/src/slalib/sun67.htx/img254.gif
new file mode 100644
index 0000000..14c9013
--- /dev/null
+++ b/src/slalib/sun67.htx/img254.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img255.gif b/src/slalib/sun67.htx/img255.gif
new file mode 100644
index 0000000..8d24328
--- /dev/null
+++ b/src/slalib/sun67.htx/img255.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img256.gif b/src/slalib/sun67.htx/img256.gif
new file mode 100644
index 0000000..fc390da
--- /dev/null
+++ b/src/slalib/sun67.htx/img256.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img257.gif b/src/slalib/sun67.htx/img257.gif
new file mode 100644
index 0000000..5f3d164
--- /dev/null
+++ b/src/slalib/sun67.htx/img257.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img258.gif b/src/slalib/sun67.htx/img258.gif
new file mode 100644
index 0000000..24d889b
--- /dev/null
+++ b/src/slalib/sun67.htx/img258.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img259.gif b/src/slalib/sun67.htx/img259.gif
new file mode 100644
index 0000000..74f348d
--- /dev/null
+++ b/src/slalib/sun67.htx/img259.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img26.gif b/src/slalib/sun67.htx/img26.gif
new file mode 100644
index 0000000..c9c0f27
--- /dev/null
+++ b/src/slalib/sun67.htx/img26.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img260.gif b/src/slalib/sun67.htx/img260.gif
new file mode 100644
index 0000000..1b6f66e
--- /dev/null
+++ b/src/slalib/sun67.htx/img260.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img261.gif b/src/slalib/sun67.htx/img261.gif
new file mode 100644
index 0000000..746b653
--- /dev/null
+++ b/src/slalib/sun67.htx/img261.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img262.gif b/src/slalib/sun67.htx/img262.gif
new file mode 100644
index 0000000..254abab
--- /dev/null
+++ b/src/slalib/sun67.htx/img262.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img263.gif b/src/slalib/sun67.htx/img263.gif
new file mode 100644
index 0000000..4d4381b
--- /dev/null
+++ b/src/slalib/sun67.htx/img263.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img264.gif b/src/slalib/sun67.htx/img264.gif
new file mode 100644
index 0000000..8558d6d
--- /dev/null
+++ b/src/slalib/sun67.htx/img264.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img265.gif b/src/slalib/sun67.htx/img265.gif
new file mode 100644
index 0000000..a1ece2d
--- /dev/null
+++ b/src/slalib/sun67.htx/img265.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img266.gif b/src/slalib/sun67.htx/img266.gif
new file mode 100644
index 0000000..fb6e395
--- /dev/null
+++ b/src/slalib/sun67.htx/img266.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img267.gif b/src/slalib/sun67.htx/img267.gif
new file mode 100644
index 0000000..ffb5689
--- /dev/null
+++ b/src/slalib/sun67.htx/img267.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img268.gif b/src/slalib/sun67.htx/img268.gif
new file mode 100644
index 0000000..939b3b0
--- /dev/null
+++ b/src/slalib/sun67.htx/img268.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img269.gif b/src/slalib/sun67.htx/img269.gif
new file mode 100644
index 0000000..332c9c2
--- /dev/null
+++ b/src/slalib/sun67.htx/img269.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img27.gif b/src/slalib/sun67.htx/img27.gif
new file mode 100644
index 0000000..4bef4a6
--- /dev/null
+++ b/src/slalib/sun67.htx/img27.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img270.gif b/src/slalib/sun67.htx/img270.gif
new file mode 100644
index 0000000..d8f8eae
--- /dev/null
+++ b/src/slalib/sun67.htx/img270.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img271.gif b/src/slalib/sun67.htx/img271.gif
new file mode 100644
index 0000000..fd26501
--- /dev/null
+++ b/src/slalib/sun67.htx/img271.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img272.gif b/src/slalib/sun67.htx/img272.gif
new file mode 100644
index 0000000..446ed83
--- /dev/null
+++ b/src/slalib/sun67.htx/img272.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img273.gif b/src/slalib/sun67.htx/img273.gif
new file mode 100644
index 0000000..b2fae8a
--- /dev/null
+++ b/src/slalib/sun67.htx/img273.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img274.gif b/src/slalib/sun67.htx/img274.gif
new file mode 100644
index 0000000..283bafa
--- /dev/null
+++ b/src/slalib/sun67.htx/img274.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img275.gif b/src/slalib/sun67.htx/img275.gif
new file mode 100644
index 0000000..577f461
--- /dev/null
+++ b/src/slalib/sun67.htx/img275.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img276.gif b/src/slalib/sun67.htx/img276.gif
new file mode 100644
index 0000000..7f22c78
--- /dev/null
+++ b/src/slalib/sun67.htx/img276.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img277.gif b/src/slalib/sun67.htx/img277.gif
new file mode 100644
index 0000000..18d807e
--- /dev/null
+++ b/src/slalib/sun67.htx/img277.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img278.gif b/src/slalib/sun67.htx/img278.gif
new file mode 100644
index 0000000..c6ed15c
--- /dev/null
+++ b/src/slalib/sun67.htx/img278.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img279.gif b/src/slalib/sun67.htx/img279.gif
new file mode 100644
index 0000000..351f567
--- /dev/null
+++ b/src/slalib/sun67.htx/img279.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img28.gif b/src/slalib/sun67.htx/img28.gif
new file mode 100644
index 0000000..4b6919a
--- /dev/null
+++ b/src/slalib/sun67.htx/img28.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img280.gif b/src/slalib/sun67.htx/img280.gif
new file mode 100644
index 0000000..c228be9
--- /dev/null
+++ b/src/slalib/sun67.htx/img280.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img281.gif b/src/slalib/sun67.htx/img281.gif
new file mode 100644
index 0000000..8d51a56
--- /dev/null
+++ b/src/slalib/sun67.htx/img281.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img282.gif b/src/slalib/sun67.htx/img282.gif
new file mode 100644
index 0000000..aa9287e
--- /dev/null
+++ b/src/slalib/sun67.htx/img282.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img283.gif b/src/slalib/sun67.htx/img283.gif
new file mode 100644
index 0000000..fb8d1b1
--- /dev/null
+++ b/src/slalib/sun67.htx/img283.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img284.gif b/src/slalib/sun67.htx/img284.gif
new file mode 100644
index 0000000..fbd698f
--- /dev/null
+++ b/src/slalib/sun67.htx/img284.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img285.gif b/src/slalib/sun67.htx/img285.gif
new file mode 100644
index 0000000..5685c53
--- /dev/null
+++ b/src/slalib/sun67.htx/img285.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img286.gif b/src/slalib/sun67.htx/img286.gif
new file mode 100644
index 0000000..3af2f57
--- /dev/null
+++ b/src/slalib/sun67.htx/img286.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img287.gif b/src/slalib/sun67.htx/img287.gif
new file mode 100644
index 0000000..a908eb7
--- /dev/null
+++ b/src/slalib/sun67.htx/img287.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img288.gif b/src/slalib/sun67.htx/img288.gif
new file mode 100644
index 0000000..5c741bf
--- /dev/null
+++ b/src/slalib/sun67.htx/img288.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img289.gif b/src/slalib/sun67.htx/img289.gif
new file mode 100644
index 0000000..851a6bd
--- /dev/null
+++ b/src/slalib/sun67.htx/img289.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img29.gif b/src/slalib/sun67.htx/img29.gif
new file mode 100644
index 0000000..79608f4
--- /dev/null
+++ b/src/slalib/sun67.htx/img29.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img290.gif b/src/slalib/sun67.htx/img290.gif
new file mode 100644
index 0000000..9d978a9
--- /dev/null
+++ b/src/slalib/sun67.htx/img290.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img291.gif b/src/slalib/sun67.htx/img291.gif
new file mode 100644
index 0000000..558f6bd
--- /dev/null
+++ b/src/slalib/sun67.htx/img291.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img292.gif b/src/slalib/sun67.htx/img292.gif
new file mode 100644
index 0000000..7d1dea2
--- /dev/null
+++ b/src/slalib/sun67.htx/img292.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img293.gif b/src/slalib/sun67.htx/img293.gif
new file mode 100644
index 0000000..9bdcea6
--- /dev/null
+++ b/src/slalib/sun67.htx/img293.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img294.gif b/src/slalib/sun67.htx/img294.gif
new file mode 100644
index 0000000..405e13e
--- /dev/null
+++ b/src/slalib/sun67.htx/img294.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img295.gif b/src/slalib/sun67.htx/img295.gif
new file mode 100644
index 0000000..3ed0af7
--- /dev/null
+++ b/src/slalib/sun67.htx/img295.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img296.gif b/src/slalib/sun67.htx/img296.gif
new file mode 100644
index 0000000..a627d43
--- /dev/null
+++ b/src/slalib/sun67.htx/img296.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img297.gif b/src/slalib/sun67.htx/img297.gif
new file mode 100644
index 0000000..9975e0d
--- /dev/null
+++ b/src/slalib/sun67.htx/img297.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img298.gif b/src/slalib/sun67.htx/img298.gif
new file mode 100644
index 0000000..c3b3df9
--- /dev/null
+++ b/src/slalib/sun67.htx/img298.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img299.gif b/src/slalib/sun67.htx/img299.gif
new file mode 100644
index 0000000..26aea95
--- /dev/null
+++ b/src/slalib/sun67.htx/img299.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img3.gif b/src/slalib/sun67.htx/img3.gif
new file mode 100644
index 0000000..28305ee
--- /dev/null
+++ b/src/slalib/sun67.htx/img3.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img30.gif b/src/slalib/sun67.htx/img30.gif
new file mode 100644
index 0000000..58742b5
--- /dev/null
+++ b/src/slalib/sun67.htx/img30.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img300.gif b/src/slalib/sun67.htx/img300.gif
new file mode 100644
index 0000000..efe55e8
--- /dev/null
+++ b/src/slalib/sun67.htx/img300.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img301.gif b/src/slalib/sun67.htx/img301.gif
new file mode 100644
index 0000000..0f38885
--- /dev/null
+++ b/src/slalib/sun67.htx/img301.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img302.gif b/src/slalib/sun67.htx/img302.gif
new file mode 100644
index 0000000..7007302
--- /dev/null
+++ b/src/slalib/sun67.htx/img302.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img303.gif b/src/slalib/sun67.htx/img303.gif
new file mode 100644
index 0000000..ceca088
--- /dev/null
+++ b/src/slalib/sun67.htx/img303.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img304.gif b/src/slalib/sun67.htx/img304.gif
new file mode 100644
index 0000000..d468e94
--- /dev/null
+++ b/src/slalib/sun67.htx/img304.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img305.gif b/src/slalib/sun67.htx/img305.gif
new file mode 100644
index 0000000..eea091b
--- /dev/null
+++ b/src/slalib/sun67.htx/img305.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img306.gif b/src/slalib/sun67.htx/img306.gif
new file mode 100644
index 0000000..03e13a7
--- /dev/null
+++ b/src/slalib/sun67.htx/img306.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img307.gif b/src/slalib/sun67.htx/img307.gif
new file mode 100644
index 0000000..cb79407
--- /dev/null
+++ b/src/slalib/sun67.htx/img307.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img308.gif b/src/slalib/sun67.htx/img308.gif
new file mode 100644
index 0000000..1cd3549
--- /dev/null
+++ b/src/slalib/sun67.htx/img308.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img309.gif b/src/slalib/sun67.htx/img309.gif
new file mode 100644
index 0000000..4233e9b
--- /dev/null
+++ b/src/slalib/sun67.htx/img309.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img31.gif b/src/slalib/sun67.htx/img31.gif
new file mode 100644
index 0000000..428c955
--- /dev/null
+++ b/src/slalib/sun67.htx/img31.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img310.gif b/src/slalib/sun67.htx/img310.gif
new file mode 100644
index 0000000..309e909
--- /dev/null
+++ b/src/slalib/sun67.htx/img310.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img311.gif b/src/slalib/sun67.htx/img311.gif
new file mode 100644
index 0000000..f00e788
--- /dev/null
+++ b/src/slalib/sun67.htx/img311.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img312.gif b/src/slalib/sun67.htx/img312.gif
new file mode 100644
index 0000000..16e6dc2
--- /dev/null
+++ b/src/slalib/sun67.htx/img312.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img313.gif b/src/slalib/sun67.htx/img313.gif
new file mode 100644
index 0000000..8c3bfe9
--- /dev/null
+++ b/src/slalib/sun67.htx/img313.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img314.gif b/src/slalib/sun67.htx/img314.gif
new file mode 100644
index 0000000..181b5dd
--- /dev/null
+++ b/src/slalib/sun67.htx/img314.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img315.gif b/src/slalib/sun67.htx/img315.gif
new file mode 100644
index 0000000..73700d7
--- /dev/null
+++ b/src/slalib/sun67.htx/img315.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img316.gif b/src/slalib/sun67.htx/img316.gif
new file mode 100644
index 0000000..abcc748
--- /dev/null
+++ b/src/slalib/sun67.htx/img316.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img317.gif b/src/slalib/sun67.htx/img317.gif
new file mode 100644
index 0000000..67607bd
--- /dev/null
+++ b/src/slalib/sun67.htx/img317.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img318.gif b/src/slalib/sun67.htx/img318.gif
new file mode 100644
index 0000000..9d0e3ab
--- /dev/null
+++ b/src/slalib/sun67.htx/img318.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img319.gif b/src/slalib/sun67.htx/img319.gif
new file mode 100644
index 0000000..12cac0b
--- /dev/null
+++ b/src/slalib/sun67.htx/img319.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img32.gif b/src/slalib/sun67.htx/img32.gif
new file mode 100644
index 0000000..9fe70ea
--- /dev/null
+++ b/src/slalib/sun67.htx/img32.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img320.gif b/src/slalib/sun67.htx/img320.gif
new file mode 100644
index 0000000..2fa40fa
--- /dev/null
+++ b/src/slalib/sun67.htx/img320.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img321.gif b/src/slalib/sun67.htx/img321.gif
new file mode 100644
index 0000000..14a0607
--- /dev/null
+++ b/src/slalib/sun67.htx/img321.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img322.gif b/src/slalib/sun67.htx/img322.gif
new file mode 100644
index 0000000..bc4b6b5
--- /dev/null
+++ b/src/slalib/sun67.htx/img322.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img323.gif b/src/slalib/sun67.htx/img323.gif
new file mode 100644
index 0000000..301d22c
--- /dev/null
+++ b/src/slalib/sun67.htx/img323.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img324.gif b/src/slalib/sun67.htx/img324.gif
new file mode 100644
index 0000000..ac2beb5
--- /dev/null
+++ b/src/slalib/sun67.htx/img324.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img325.gif b/src/slalib/sun67.htx/img325.gif
new file mode 100644
index 0000000..257bb36
--- /dev/null
+++ b/src/slalib/sun67.htx/img325.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img326.gif b/src/slalib/sun67.htx/img326.gif
new file mode 100644
index 0000000..9e40eb5
--- /dev/null
+++ b/src/slalib/sun67.htx/img326.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img327.gif b/src/slalib/sun67.htx/img327.gif
new file mode 100644
index 0000000..0489499
--- /dev/null
+++ b/src/slalib/sun67.htx/img327.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img328.gif b/src/slalib/sun67.htx/img328.gif
new file mode 100644
index 0000000..adbcf42
--- /dev/null
+++ b/src/slalib/sun67.htx/img328.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img329.gif b/src/slalib/sun67.htx/img329.gif
new file mode 100644
index 0000000..10d6367
--- /dev/null
+++ b/src/slalib/sun67.htx/img329.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img33.gif b/src/slalib/sun67.htx/img33.gif
new file mode 100644
index 0000000..60cc80f
--- /dev/null
+++ b/src/slalib/sun67.htx/img33.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img330.gif b/src/slalib/sun67.htx/img330.gif
new file mode 100644
index 0000000..894b280
--- /dev/null
+++ b/src/slalib/sun67.htx/img330.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img34.gif b/src/slalib/sun67.htx/img34.gif
new file mode 100644
index 0000000..3dca0ca
--- /dev/null
+++ b/src/slalib/sun67.htx/img34.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img35.gif b/src/slalib/sun67.htx/img35.gif
new file mode 100644
index 0000000..19639cd
--- /dev/null
+++ b/src/slalib/sun67.htx/img35.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img36.gif b/src/slalib/sun67.htx/img36.gif
new file mode 100644
index 0000000..2d50927
--- /dev/null
+++ b/src/slalib/sun67.htx/img36.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img37.gif b/src/slalib/sun67.htx/img37.gif
new file mode 100644
index 0000000..e5d5bf1
--- /dev/null
+++ b/src/slalib/sun67.htx/img37.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img38.gif b/src/slalib/sun67.htx/img38.gif
new file mode 100644
index 0000000..4bb025e
--- /dev/null
+++ b/src/slalib/sun67.htx/img38.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img39.gif b/src/slalib/sun67.htx/img39.gif
new file mode 100644
index 0000000..395cb4c
--- /dev/null
+++ b/src/slalib/sun67.htx/img39.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img4.gif b/src/slalib/sun67.htx/img4.gif
new file mode 100644
index 0000000..fdb8e23
--- /dev/null
+++ b/src/slalib/sun67.htx/img4.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img40.gif b/src/slalib/sun67.htx/img40.gif
new file mode 100644
index 0000000..50874f2
--- /dev/null
+++ b/src/slalib/sun67.htx/img40.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img41.gif b/src/slalib/sun67.htx/img41.gif
new file mode 100644
index 0000000..aa024b5
--- /dev/null
+++ b/src/slalib/sun67.htx/img41.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img42.gif b/src/slalib/sun67.htx/img42.gif
new file mode 100644
index 0000000..e5df416
--- /dev/null
+++ b/src/slalib/sun67.htx/img42.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img43.gif b/src/slalib/sun67.htx/img43.gif
new file mode 100644
index 0000000..793fdfe
--- /dev/null
+++ b/src/slalib/sun67.htx/img43.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img44.gif b/src/slalib/sun67.htx/img44.gif
new file mode 100644
index 0000000..077f340
--- /dev/null
+++ b/src/slalib/sun67.htx/img44.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img45.gif b/src/slalib/sun67.htx/img45.gif
new file mode 100644
index 0000000..e3ff749
--- /dev/null
+++ b/src/slalib/sun67.htx/img45.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img46.gif b/src/slalib/sun67.htx/img46.gif
new file mode 100644
index 0000000..b0cf7e0
--- /dev/null
+++ b/src/slalib/sun67.htx/img46.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img47.gif b/src/slalib/sun67.htx/img47.gif
new file mode 100644
index 0000000..12601c3
--- /dev/null
+++ b/src/slalib/sun67.htx/img47.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img48.gif b/src/slalib/sun67.htx/img48.gif
new file mode 100644
index 0000000..a582489
--- /dev/null
+++ b/src/slalib/sun67.htx/img48.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img49.gif b/src/slalib/sun67.htx/img49.gif
new file mode 100644
index 0000000..ed7025f
--- /dev/null
+++ b/src/slalib/sun67.htx/img49.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img5.gif b/src/slalib/sun67.htx/img5.gif
new file mode 100644
index 0000000..b692faf
--- /dev/null
+++ b/src/slalib/sun67.htx/img5.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img50.gif b/src/slalib/sun67.htx/img50.gif
new file mode 100644
index 0000000..da83b3f
--- /dev/null
+++ b/src/slalib/sun67.htx/img50.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img51.gif b/src/slalib/sun67.htx/img51.gif
new file mode 100644
index 0000000..eabbd1e
--- /dev/null
+++ b/src/slalib/sun67.htx/img51.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img52.gif b/src/slalib/sun67.htx/img52.gif
new file mode 100644
index 0000000..5a84c00
--- /dev/null
+++ b/src/slalib/sun67.htx/img52.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img53.gif b/src/slalib/sun67.htx/img53.gif
new file mode 100644
index 0000000..384c210
--- /dev/null
+++ b/src/slalib/sun67.htx/img53.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img54.gif b/src/slalib/sun67.htx/img54.gif
new file mode 100644
index 0000000..da4e988
--- /dev/null
+++ b/src/slalib/sun67.htx/img54.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img55.gif b/src/slalib/sun67.htx/img55.gif
new file mode 100644
index 0000000..b312800
--- /dev/null
+++ b/src/slalib/sun67.htx/img55.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img56.gif b/src/slalib/sun67.htx/img56.gif
new file mode 100644
index 0000000..2faf373
--- /dev/null
+++ b/src/slalib/sun67.htx/img56.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img57.gif b/src/slalib/sun67.htx/img57.gif
new file mode 100644
index 0000000..84883c2
--- /dev/null
+++ b/src/slalib/sun67.htx/img57.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img58.gif b/src/slalib/sun67.htx/img58.gif
new file mode 100644
index 0000000..f2dc064
--- /dev/null
+++ b/src/slalib/sun67.htx/img58.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img59.gif b/src/slalib/sun67.htx/img59.gif
new file mode 100644
index 0000000..b17eac6
--- /dev/null
+++ b/src/slalib/sun67.htx/img59.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img6.gif b/src/slalib/sun67.htx/img6.gif
new file mode 100644
index 0000000..d06343f
--- /dev/null
+++ b/src/slalib/sun67.htx/img6.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img60.gif b/src/slalib/sun67.htx/img60.gif
new file mode 100644
index 0000000..9367888
--- /dev/null
+++ b/src/slalib/sun67.htx/img60.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img61.gif b/src/slalib/sun67.htx/img61.gif
new file mode 100644
index 0000000..34173ab
--- /dev/null
+++ b/src/slalib/sun67.htx/img61.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img62.gif b/src/slalib/sun67.htx/img62.gif
new file mode 100644
index 0000000..03d3e12
--- /dev/null
+++ b/src/slalib/sun67.htx/img62.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img63.gif b/src/slalib/sun67.htx/img63.gif
new file mode 100644
index 0000000..b64b4d8
--- /dev/null
+++ b/src/slalib/sun67.htx/img63.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img64.gif b/src/slalib/sun67.htx/img64.gif
new file mode 100644
index 0000000..69bef85
--- /dev/null
+++ b/src/slalib/sun67.htx/img64.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img65.gif b/src/slalib/sun67.htx/img65.gif
new file mode 100644
index 0000000..8faeca4
--- /dev/null
+++ b/src/slalib/sun67.htx/img65.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img66.gif b/src/slalib/sun67.htx/img66.gif
new file mode 100644
index 0000000..0437749
--- /dev/null
+++ b/src/slalib/sun67.htx/img66.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img67.gif b/src/slalib/sun67.htx/img67.gif
new file mode 100644
index 0000000..63fedd9
--- /dev/null
+++ b/src/slalib/sun67.htx/img67.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img68.gif b/src/slalib/sun67.htx/img68.gif
new file mode 100644
index 0000000..bd0d18f
--- /dev/null
+++ b/src/slalib/sun67.htx/img68.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img69.gif b/src/slalib/sun67.htx/img69.gif
new file mode 100644
index 0000000..65f6ac6
--- /dev/null
+++ b/src/slalib/sun67.htx/img69.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img7.gif b/src/slalib/sun67.htx/img7.gif
new file mode 100644
index 0000000..4d54546
--- /dev/null
+++ b/src/slalib/sun67.htx/img7.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img70.gif b/src/slalib/sun67.htx/img70.gif
new file mode 100644
index 0000000..5711ca9
--- /dev/null
+++ b/src/slalib/sun67.htx/img70.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img71.gif b/src/slalib/sun67.htx/img71.gif
new file mode 100644
index 0000000..dcbde3c
--- /dev/null
+++ b/src/slalib/sun67.htx/img71.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img72.gif b/src/slalib/sun67.htx/img72.gif
new file mode 100644
index 0000000..c58e3d1
--- /dev/null
+++ b/src/slalib/sun67.htx/img72.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img73.gif b/src/slalib/sun67.htx/img73.gif
new file mode 100644
index 0000000..37e1e89
--- /dev/null
+++ b/src/slalib/sun67.htx/img73.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img74.gif b/src/slalib/sun67.htx/img74.gif
new file mode 100644
index 0000000..01fee78
--- /dev/null
+++ b/src/slalib/sun67.htx/img74.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img75.gif b/src/slalib/sun67.htx/img75.gif
new file mode 100644
index 0000000..722695e
--- /dev/null
+++ b/src/slalib/sun67.htx/img75.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img76.gif b/src/slalib/sun67.htx/img76.gif
new file mode 100644
index 0000000..50dea3d
--- /dev/null
+++ b/src/slalib/sun67.htx/img76.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img77.gif b/src/slalib/sun67.htx/img77.gif
new file mode 100644
index 0000000..236375c
--- /dev/null
+++ b/src/slalib/sun67.htx/img77.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img78.gif b/src/slalib/sun67.htx/img78.gif
new file mode 100644
index 0000000..d48830d
--- /dev/null
+++ b/src/slalib/sun67.htx/img78.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img79.gif b/src/slalib/sun67.htx/img79.gif
new file mode 100644
index 0000000..26c8df8
--- /dev/null
+++ b/src/slalib/sun67.htx/img79.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img8.gif b/src/slalib/sun67.htx/img8.gif
new file mode 100644
index 0000000..aaabf5c
--- /dev/null
+++ b/src/slalib/sun67.htx/img8.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img80.gif b/src/slalib/sun67.htx/img80.gif
new file mode 100644
index 0000000..a3d56cb
--- /dev/null
+++ b/src/slalib/sun67.htx/img80.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img81.gif b/src/slalib/sun67.htx/img81.gif
new file mode 100644
index 0000000..e968ec3
--- /dev/null
+++ b/src/slalib/sun67.htx/img81.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img82.gif b/src/slalib/sun67.htx/img82.gif
new file mode 100644
index 0000000..7f9efc5
--- /dev/null
+++ b/src/slalib/sun67.htx/img82.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img83.gif b/src/slalib/sun67.htx/img83.gif
new file mode 100644
index 0000000..c8fb2dc
--- /dev/null
+++ b/src/slalib/sun67.htx/img83.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img84.gif b/src/slalib/sun67.htx/img84.gif
new file mode 100644
index 0000000..567d43d
--- /dev/null
+++ b/src/slalib/sun67.htx/img84.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img85.gif b/src/slalib/sun67.htx/img85.gif
new file mode 100644
index 0000000..a7fe52c
--- /dev/null
+++ b/src/slalib/sun67.htx/img85.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img86.gif b/src/slalib/sun67.htx/img86.gif
new file mode 100644
index 0000000..dce1c63
--- /dev/null
+++ b/src/slalib/sun67.htx/img86.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img87.gif b/src/slalib/sun67.htx/img87.gif
new file mode 100644
index 0000000..063722f
--- /dev/null
+++ b/src/slalib/sun67.htx/img87.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img88.gif b/src/slalib/sun67.htx/img88.gif
new file mode 100644
index 0000000..3ef4f13
--- /dev/null
+++ b/src/slalib/sun67.htx/img88.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img89.gif b/src/slalib/sun67.htx/img89.gif
new file mode 100644
index 0000000..ed6e37c
--- /dev/null
+++ b/src/slalib/sun67.htx/img89.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img9.gif b/src/slalib/sun67.htx/img9.gif
new file mode 100644
index 0000000..b608337
--- /dev/null
+++ b/src/slalib/sun67.htx/img9.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img90.gif b/src/slalib/sun67.htx/img90.gif
new file mode 100644
index 0000000..b3b96dc
--- /dev/null
+++ b/src/slalib/sun67.htx/img90.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img91.gif b/src/slalib/sun67.htx/img91.gif
new file mode 100644
index 0000000..b5bf656
--- /dev/null
+++ b/src/slalib/sun67.htx/img91.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img92.gif b/src/slalib/sun67.htx/img92.gif
new file mode 100644
index 0000000..8105c30
--- /dev/null
+++ b/src/slalib/sun67.htx/img92.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img93.gif b/src/slalib/sun67.htx/img93.gif
new file mode 100644
index 0000000..8f0e16c
--- /dev/null
+++ b/src/slalib/sun67.htx/img93.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img94.gif b/src/slalib/sun67.htx/img94.gif
new file mode 100644
index 0000000..1dbd091
--- /dev/null
+++ b/src/slalib/sun67.htx/img94.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img95.gif b/src/slalib/sun67.htx/img95.gif
new file mode 100644
index 0000000..3ace0ea
--- /dev/null
+++ b/src/slalib/sun67.htx/img95.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img96.gif b/src/slalib/sun67.htx/img96.gif
new file mode 100644
index 0000000..cf79e82
--- /dev/null
+++ b/src/slalib/sun67.htx/img96.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img97.gif b/src/slalib/sun67.htx/img97.gif
new file mode 100644
index 0000000..a1b4481
--- /dev/null
+++ b/src/slalib/sun67.htx/img97.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img98.gif b/src/slalib/sun67.htx/img98.gif
new file mode 100644
index 0000000..4acedf7
--- /dev/null
+++ b/src/slalib/sun67.htx/img98.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/img99.gif b/src/slalib/sun67.htx/img99.gif
new file mode 100644
index 0000000..308e155
--- /dev/null
+++ b/src/slalib/sun67.htx/img99.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/index_motif.gif b/src/slalib/sun67.htx/index_motif.gif
new file mode 100644
index 0000000..b9b3108
--- /dev/null
+++ b/src/slalib/sun67.htx/index_motif.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/internals.pl b/src/slalib/sun67.htx/internals.pl
new file mode 100644
index 0000000..d340e74
--- /dev/null
+++ b/src/slalib/sun67.htx/internals.pl
@@ -0,0 +1,1482 @@
+# LaTeX2HTML 97.1 (release) (July 13th, 1997)
+# Associate internals original text with physical files.
+
+
+$key = q/SLA_DR2TF/;
+$ref_files{$key} = "$dir".q|node67.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_OBS/;
+$ref_files{$key} = "$dir".q|node137.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DD2TF/;
+$ref_files{$key} = "$dir".q|node52.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DIMXV/;
+$ref_files{$key} = "$dir".q|node57.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PRECL/;
+$ref_files{$key} = "$dir".q|node154.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_EVP/;
+$ref_files{$key} = "$dir".q|node102.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_FLOTIN/;
+$ref_files{$key} = "$dir".q|node110.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DTP2S/;
+$ref_files{$key} = "$dir".q|node76.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_RANGE/;
+$ref_files{$key} = "$dir".q|node161.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_NUTC/;
+$ref_files{$key} = "$dir".q|node134.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_TPV2C/;
+$ref_files{$key} = "$dir".q|node186.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DTP2V/;
+$ref_files{$key} = "$dir".q|node77.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_VDV/;
+$ref_files{$key} = "$dir".q|node191.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_FK52H/;
+$ref_files{$key} = "$dir".q|node107.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DVN/;
+$ref_files{$key} = "$dir".q|node83.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PREC/;
+$ref_files{$key} = "$dir".q|node152.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_EQECL/;
+$ref_files{$key} = "$dir".q|node97.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_H2E/;
+$ref_files{$key} = "$dir".q|node118.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_AOP/;
+$ref_files{$key} = "$dir".q|node20.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DS2C6/;
+$ref_files{$key} = "$dir".q|node70.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DRANRM/;
+$ref_files{$key} = "$dir".q|node69.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PAV/;
+$ref_files{$key} = "$dir".q|node139.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_FITXY/;
+$ref_files{$key} = "$dir".q|node103.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_CS2C/;
+$ref_files{$key} = "$dir".q|node38.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_CC2S/;
+$ref_files{$key} = "$dir".q|node30.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DT/;
+$ref_files{$key} = "$dir".q|node73.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PDA2H/;
+$ref_files{$key} = "$dir".q|node141.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_RVLSRD/;
+$ref_files{$key} = "$dir".q|node173.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_EG50/;
+$ref_files{$key} = "$dir".q|node90.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DMOON/;
+$ref_files{$key} = "$dir".q|node62.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DJCAL/;
+$ref_files{$key} = "$dir".q|node58.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_AMP/;
+$ref_files{$key} = "$dir".q|node18.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_CD2TF/;
+$ref_files{$key} = "$dir".q|node32.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_EARTH/;
+$ref_files{$key} = "$dir".q|node86.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_OAP/;
+$ref_files{$key} = "$dir".q|node135.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_RANDOM/;
+$ref_files{$key} = "$dir".q|node160.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_WAIT/;
+$ref_files{$key} = "$dir".q|node194.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_AV2M/;
+$ref_files{$key} = "$dir".q|node25.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_NUT/;
+$ref_files{$key} = "$dir".q|node133.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_SUBET/;
+$ref_files{$key} = "$dir".q|node178.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_RVLSRK/;
+$ref_files{$key} = "$dir".q|node174.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_BEAR/;
+$ref_files{$key} = "$dir".q|node26.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PDQ2H/;
+$ref_files{$key} = "$dir".q|node142.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_CLYD/;
+$ref_files{$key} = "$dir".q|node34.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_V2TP/;
+$ref_files{$key} = "$dir".q|node190.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_INTIN/;
+$ref_files{$key} = "$dir".q|node122.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_COMBN/;
+$ref_files{$key} = "$dir".q|node35.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_CTF2D/;
+$ref_files{$key} = "$dir".q|node40.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_FK45Z/;
+$ref_files{$key} = "$dir".q|node105.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DVXV/;
+$ref_files{$key} = "$dir".q|node84.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_S2TP/;
+$ref_files{$key} = "$dir".q|node175.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_CALYD/;
+$ref_files{$key} = "$dir".q|node29.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DCS2C/;
+$ref_files{$key} = "$dir".q|node51.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DCC2S/;
+$ref_files{$key} = "$dir".q|node49.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DAF2R/;
+$ref_files{$key} = "$dir".q|node42.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_REFRO/;
+$ref_files{$key} = "$dir".q|node167.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_MXM/;
+$ref_files{$key} = "$dir".q|node131.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_CTF2R/;
+$ref_files{$key} = "$dir".q|node41.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DC62S/;
+$ref_files{$key} = "$dir".q|node48.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PCD/;
+$ref_files{$key} = "$dir".q|node140.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_OBS/;
+$ref_files{$key} = "$dir".q|node137.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DT/;
+$ref_files{$key} = "$dir".q|node73.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DAV2M/;
+$ref_files{$key} = "$dir".q|node45.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_MXV/;
+$ref_files{$key} = "$dir".q|node132.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_OAPQK/;
+$ref_files{$key} = "$dir".q|node136.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_EL2UE/;
+$ref_files{$key} = "$dir".q|node91.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_EULER/;
+$ref_files{$key} = "$dir".q|node101.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_RVLSRD/;
+$ref_files{$key} = "$dir".q|node173.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DBEAR/;
+$ref_files{$key} = "$dir".q|node46.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_EQGAL/;
+$ref_files{$key} = "$dir".q|node99.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_EVP/;
+$ref_files{$key} = "$dir".q|node102.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_RANDOM/;
+$ref_files{$key} = "$dir".q|node160.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_CR2AF/;
+$ref_files{$key} = "$dir".q|node36.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_REFCO/;
+$ref_files{$key} = "$dir".q|node165.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_RVLSRK/;
+$ref_files{$key} = "$dir".q|node174.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_VDV/;
+$ref_files{$key} = "$dir".q|node191.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_EPCO/;
+$ref_files{$key} = "$dir".q|node94.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_FK54Z/;
+$ref_files{$key} = "$dir".q|node108.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_M2AV/;
+$ref_files{$key} = "$dir".q|node125.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_FK425/;
+$ref_files{$key} = "$dir".q|node104.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DS2TP/;
+$ref_files{$key} = "$dir".q|node71.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_AOPPA/;
+$ref_files{$key} = "$dir".q|node21.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_GE50/;
+$ref_files{$key} = "$dir".q|node113.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_H2E/;
+$ref_files{$key} = "$dir".q|node118.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_AOP/;
+$ref_files{$key} = "$dir".q|node20.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DFLTIN/;
+$ref_files{$key} = "$dir".q|node55.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_VN/;
+$ref_files{$key} = "$dir".q|node192.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_UNPCD/;
+$ref_files{$key} = "$dir".q|node189.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_GMST/;
+$ref_files{$key} = "$dir".q|node115.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PAV/;
+$ref_files{$key} = "$dir".q|node139.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_ALTAZ/;
+$ref_files{$key} = "$dir".q|node17.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DJCL/;
+$ref_files{$key} = "$dir".q|node59.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_CC62S/;
+$ref_files{$key} = "$dir".q|node31.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_MAPPA/;
+$ref_files{$key} = "$dir".q|node127.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DRANGE/;
+$ref_files{$key} = "$dir".q|node68.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_UE2PV/;
+$ref_files{$key} = "$dir".q|node188.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DTPV2C/;
+$ref_files{$key} = "$dir".q|node79.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DVDV/;
+$ref_files{$key} = "$dir".q|node82.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_NUT/;
+$ref_files{$key} = "$dir".q|node133.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_ETRMS/;
+$ref_files{$key} = "$dir".q|node100.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PRECES/;
+$ref_files{$key} = "$dir".q|node153.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DAFIN/;
+$ref_files{$key} = "$dir".q|node43.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PREBN/;
+$ref_files{$key} = "$dir".q|node151.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DH2E/;
+$ref_files{$key} = "$dir".q|node56.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_AOPPAT/;
+$ref_files{$key} = "$dir".q|node22.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_AOPQK/;
+$ref_files{$key} = "$dir".q|node23.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_ECMAT/;
+$ref_files{$key} = "$dir".q|node88.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DPAV/;
+$ref_files{$key} = "$dir".q|node65.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_TPS2C/;
+$ref_files{$key} = "$dir".q|node185.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_SUPGAL/;
+$ref_files{$key} = "$dir".q|node179.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DFLTIN/;
+$ref_files{$key} = "$dir".q|node55.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_VXV/;
+$ref_files{$key} = "$dir".q|node193.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_VN/;
+$ref_files{$key} = "$dir".q|node192.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_EQEQX/;
+$ref_files{$key} = "$dir".q|node98.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_MXM/;
+$ref_files{$key} = "$dir".q|node131.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_POLMO/;
+$ref_files{$key} = "$dir".q|node150.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_INVF/;
+$ref_files{$key} = "$dir".q|node123.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DBJIN/;
+$ref_files{$key} = "$dir".q|node47.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_XY2XY/;
+$ref_files{$key} = "$dir".q|node195.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_MAPQKZ/;
+$ref_files{$key} = "$dir".q|node129.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_ECOR/;
+$ref_files{$key} = "$dir".q|node89.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PVOBS/;
+$ref_files{$key} = "$dir".q|node158.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DCMPF/;
+$ref_files{$key} = "$dir".q|node50.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PCD/;
+$ref_files{$key} = "$dir".q|node140.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_FK524/;
+$ref_files{$key} = "$dir".q|node106.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_MAPQK/;
+$ref_files{$key} = "$dir".q|node128.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_MXV/;
+$ref_files{$key} = "$dir".q|node132.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DRANGE/;
+$ref_files{$key} = "$dir".q|node68.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_GEOC/;
+$ref_files{$key} = "$dir".q|node114.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DTPV2C/;
+$ref_files{$key} = "$dir".q|node79.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DD2TF/;
+$ref_files{$key} = "$dir".q|node52.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_SMAT/;
+$ref_files{$key} = "$dir".q|node177.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_RDPLAN/;
+$ref_files{$key} = "$dir".q|node164.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PRECL/;
+$ref_files{$key} = "$dir".q|node154.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PLANTE/;
+$ref_files{$key} = "$dir".q|node148.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_IMXV/;
+$ref_files{$key} = "$dir".q|node121.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_MOON/;
+$ref_files{$key} = "$dir".q|node130.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_CLDJ/;
+$ref_files{$key} = "$dir".q|node33.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_TP2S/;
+$ref_files{$key} = "$dir".q|node183.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_FK52H/;
+$ref_files{$key} = "$dir".q|node107.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_TP2V/;
+$ref_files{$key} = "$dir".q|node184.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_EPB2D/;
+$ref_files{$key} = "$dir".q|node93.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PRECES/;
+$ref_files{$key} = "$dir".q|node153.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_AOPPAT/;
+$ref_files{$key} = "$dir".q|node22.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DTF2D/;
+$ref_files{$key} = "$dir".q|node74.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_EPJ2D/;
+$ref_files{$key} = "$dir".q|node96.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DMXM/;
+$ref_files{$key} = "$dir".q|node63.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_EQECL/;
+$ref_files{$key} = "$dir".q|node97.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_SUPGAL/;
+$ref_files{$key} = "$dir".q|node179.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_RVLG/;
+$ref_files{$key} = "$dir".q|node172.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PLANEL/;
+$ref_files{$key} = "$dir".q|node146.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DMXV/;
+$ref_files{$key} = "$dir".q|node64.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_FITXY/;
+$ref_files{$key} = "$dir".q|node103.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_MAPQKZ/;
+$ref_files{$key} = "$dir".q|node129.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DEULER/;
+$ref_files{$key} = "$dir".q|node54.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_/;
+$ref_files{$key} = "$dir".q|sun67.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_CR2TF/;
+$ref_files{$key} = "$dir".q|node37.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DTF2R/;
+$ref_files{$key} = "$dir".q|node75.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PLANET/;
+$ref_files{$key} = "$dir".q|node147.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_RCC/;
+$ref_files{$key} = "$dir".q|node163.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DMOON/;
+$ref_files{$key} = "$dir".q|node62.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DJCAL/;
+$ref_files{$key} = "$dir".q|node58.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_ECLEQ/;
+$ref_files{$key} = "$dir".q|node87.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_RDPLAN/;
+$ref_files{$key} = "$dir".q|node164.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DR2AF/;
+$ref_files{$key} = "$dir".q|node66.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_SUBET/;
+$ref_files{$key} = "$dir".q|node178.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DV2TP/;
+$ref_files{$key} = "$dir".q|node81.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PLANTE/;
+$ref_files{$key} = "$dir".q|node148.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_COMBN/;
+$ref_files{$key} = "$dir".q|node35.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_CALDJ/;
+$ref_files{$key} = "$dir".q|node28.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_ZD/;
+$ref_files{$key} = "$dir".q|node196.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_CTF2D/;
+$ref_files{$key} = "$dir".q|node40.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_REFV/;
+$ref_files{$key} = "$dir".q|node168.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_RVGALC/;
+$ref_files{$key} = "$dir".q|node171.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_FK45Z/;
+$ref_files{$key} = "$dir".q|node105.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_REFCOQ/;
+$ref_files{$key} = "$dir".q|node166.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_CS2C6/;
+$ref_files{$key} = "$dir".q|node39.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_RVEROT/;
+$ref_files{$key} = "$dir".q|node170.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_KBJ/;
+$ref_files{$key} = "$dir".q|node124.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_REFZ/;
+$ref_files{$key} = "$dir".q|node169.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_VXV/;
+$ref_files{$key} = "$dir".q|node193.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_FK5HZ/;
+$ref_files{$key} = "$dir".q|node109.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PLANEL/;
+$ref_files{$key} = "$dir".q|node146.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PV2EL/;
+$ref_files{$key} = "$dir".q|node156.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_REFRO/;
+$ref_files{$key} = "$dir".q|node167.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_CC2S/;
+$ref_files{$key} = "$dir".q|node30.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_CS2C/;
+$ref_files{$key} = "$dir".q|node38.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_CTF2R/;
+$ref_files{$key} = "$dir".q|node41.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DEULER/;
+$ref_files{$key} = "$dir".q|node54.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DC62S/;
+$ref_files{$key} = "$dir".q|node48.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DE2H/;
+$ref_files{$key} = "$dir".q|node53.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PLANET/;
+$ref_files{$key} = "$dir".q|node147.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_EG50/;
+$ref_files{$key} = "$dir".q|node90.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PV2UE/;
+$ref_files{$key} = "$dir".q|node157.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DMAT/;
+$ref_files{$key} = "$dir".q|node61.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_WAIT/;
+$ref_files{$key} = "$dir".q|node194.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_AV2M/;
+$ref_files{$key} = "$dir".q|node25.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_EQGAL/;
+$ref_files{$key} = "$dir".q|node99.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DSEP/;
+$ref_files{$key} = "$dir".q|node72.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_BEAR/;
+$ref_files{$key} = "$dir".q|node26.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_CR2AF/;
+$ref_files{$key} = "$dir".q|node36.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DM2AV/;
+$ref_files{$key} = "$dir".q|node60.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_REFCO/;
+$ref_files{$key} = "$dir".q|node165.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_UE2EL/;
+$ref_files{$key} = "$dir".q|node187.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_FK54Z/;
+$ref_files{$key} = "$dir".q|node108.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_H2FK5/;
+$ref_files{$key} = "$dir".q|node119.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DAT/;
+$ref_files{$key} = "$dir".q|node44.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DVXV/;
+$ref_files{$key} = "$dir".q|node84.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_S2TP/;
+$ref_files{$key} = "$dir".q|node175.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_ZD/;
+$ref_files{$key} = "$dir".q|node196.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_AFIN/;
+$ref_files{$key} = "$dir".q|node15.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_GALEQ/;
+$ref_files{$key} = "$dir".q|node111.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_RVGALC/;
+$ref_files{$key} = "$dir".q|node171.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_REFCOQ/;
+$ref_files{$key} = "$dir".q|node166.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_GALSUP/;
+$ref_files{$key} = "$dir".q|node112.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PXY/;
+$ref_files{$key} = "$dir".q|node159.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_RVEROT/;
+$ref_files{$key} = "$dir".q|node170.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_CAF2R/;
+$ref_files{$key} = "$dir".q|node27.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_RCC/;
+$ref_files{$key} = "$dir".q|node163.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_AMPQK/;
+$ref_files{$key} = "$dir".q|node19.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_MAPPA/;
+$ref_files{$key} = "$dir".q|node127.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_UE2PV/;
+$ref_files{$key} = "$dir".q|node188.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_ADDET/;
+$ref_files{$key} = "$dir".q|node14.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_EPB/;
+$ref_files{$key} = "$dir".q|node92.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_NUTC/;
+$ref_files{$key} = "$dir".q|node134.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_EPCO/;
+$ref_files{$key} = "$dir".q|node94.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_HFK5Z/;
+$ref_files{$key} = "$dir".q|node120.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_ATMDSP/;
+$ref_files{$key} = "$dir".q|node24.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_EPJ/;
+$ref_files{$key} = "$dir".q|node95.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PERTEL/;
+$ref_files{$key} = "$dir".q|node144.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DAFIN/;
+$ref_files{$key} = "$dir".q|node43.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_GE50/;
+$ref_files{$key} = "$dir".q|node113.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PERTUE/;
+$ref_files{$key} = "$dir".q|node145.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PREC/;
+$ref_files{$key} = "$dir".q|node152.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_ECMAT/;
+$ref_files{$key} = "$dir".q|node88.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_KBJ/;
+$ref_files{$key} = "$dir".q|node124.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_TPS2C/;
+$ref_files{$key} = "$dir".q|node185.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_GALSUP/;
+$ref_files{$key} = "$dir".q|node112.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_GMST/;
+$ref_files{$key} = "$dir".q|node115.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_GMSTA/;
+$ref_files{$key} = "$dir".q|node116.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DJCL/;
+$ref_files{$key} = "$dir".q|node59.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_XY2XY/;
+$ref_files{$key} = "$dir".q|node195.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DR2TF/;
+$ref_files{$key} = "$dir".q|node67.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_MAPQK/;
+$ref_files{$key} = "$dir".q|node128.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DIMXV/;
+$ref_files{$key} = "$dir".q|node57.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_MAP/;
+$ref_files{$key} = "$dir".q|node126.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_E2H/;
+$ref_files{$key} = "$dir".q|node85.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_RANGE/;
+$ref_files{$key} = "$dir".q|node161.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DTP2S/;
+$ref_files{$key} = "$dir".q|node76.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_TPV2C/;
+$ref_files{$key} = "$dir".q|node186.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_RANORM/;
+$ref_files{$key} = "$dir".q|node162.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DTP2V/;
+$ref_files{$key} = "$dir".q|node77.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_SEP/;
+$ref_files{$key} = "$dir".q|node176.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_SVDCOV/;
+$ref_files{$key} = "$dir".q|node181.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_ATMDSP/;
+$ref_files{$key} = "$dir".q|node24.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_V2TP/;
+$ref_files{$key} = "$dir".q|node190.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PERTEL/;
+$ref_files{$key} = "$dir".q|node144.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_CLYD/;
+$ref_files{$key} = "$dir".q|node34.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DAT/;
+$ref_files{$key} = "$dir".q|node44.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_EPB2D/;
+$ref_files{$key} = "$dir".q|node93.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_SVDSOL/;
+$ref_files{$key} = "$dir".q|node182.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_GRESID/;
+$ref_files{$key} = "$dir".q|node117.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PRENUT/;
+$ref_files{$key} = "$dir".q|node155.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DTF2D/;
+$ref_files{$key} = "$dir".q|node74.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_EPJ2D/;
+$ref_files{$key} = "$dir".q|node96.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PERTUE/;
+$ref_files{$key} = "$dir".q|node145.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PXY/;
+$ref_files{$key} = "$dir".q|node159.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DS2C6/;
+$ref_files{$key} = "$dir".q|node70.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_ECOR/;
+$ref_files{$key} = "$dir".q|node89.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_CR2TF/;
+$ref_files{$key} = "$dir".q|node37.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DTF2R/;
+$ref_files{$key} = "$dir".q|node75.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PDA2H/;
+$ref_files{$key} = "$dir".q|node141.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_CD2TF/;
+$ref_files{$key} = "$dir".q|node32.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_EARTH/;
+$ref_files{$key} = "$dir".q|node86.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_SMAT/;
+$ref_files{$key} = "$dir".q|node177.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_ECLEQ/;
+$ref_files{$key} = "$dir".q|node87.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_EPB/;
+$ref_files{$key} = "$dir".q|node92.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DTT/;
+$ref_files{$key} = "$dir".q|node80.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_MOON/;
+$ref_files{$key} = "$dir".q|node130.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_SVD/;
+$ref_files{$key} = "$dir".q|node180.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DR2AF/;
+$ref_files{$key} = "$dir".q|node66.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_RANORM/;
+$ref_files{$key} = "$dir".q|node162.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DV2TP/;
+$ref_files{$key} = "$dir".q|node81.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_AIRMAS/;
+$ref_files{$key} = "$dir".q|node16.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_CLDJ/;
+$ref_files{$key} = "$dir".q|node33.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PERMUT/;
+$ref_files{$key} = "$dir".q|node143.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_EPJ/;
+$ref_files{$key} = "$dir".q|node95.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PDQ2H/;
+$ref_files{$key} = "$dir".q|node142.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_SVDCOV/;
+$ref_files{$key} = "$dir".q|node181.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_M2AV/;
+$ref_files{$key} = "$dir".q|node125.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_INTIN/;
+$ref_files{$key} = "$dir".q|node122.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_SVDSOL/;
+$ref_files{$key} = "$dir".q|node182.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_GRESID/;
+$ref_files{$key} = "$dir".q|node117.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_CALDJ/;
+$ref_files{$key} = "$dir".q|node28.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PRENUT/;
+$ref_files{$key} = "$dir".q|node155.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_CALYD/;
+$ref_files{$key} = "$dir".q|node29.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_CS2C6/;
+$ref_files{$key} = "$dir".q|node39.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DAF2R/;
+$ref_files{$key} = "$dir".q|node42.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DCC2S/;
+$ref_files{$key} = "$dir".q|node49.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DCS2C/;
+$ref_files{$key} = "$dir".q|node51.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PA/;
+$ref_files{$key} = "$dir".q|node138.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_FK5HZ/;
+$ref_files{$key} = "$dir".q|node109.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PV2EL/;
+$ref_files{$key} = "$dir".q|node156.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DAV2M/;
+$ref_files{$key} = "$dir".q|node45.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_OAPQK/;
+$ref_files{$key} = "$dir".q|node136.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_EULER/;
+$ref_files{$key} = "$dir".q|node101.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_EL2UE/;
+$ref_files{$key} = "$dir".q|node91.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PM/;
+$ref_files{$key} = "$dir".q|node149.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_MAP/;
+$ref_files{$key} = "$dir".q|node126.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DBEAR/;
+$ref_files{$key} = "$dir".q|node46.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PV2UE/;
+$ref_files{$key} = "$dir".q|node157.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_E2H/;
+$ref_files{$key} = "$dir".q|node85.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DVDV/;
+$ref_files{$key} = "$dir".q|node82.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DM2AV/;
+$ref_files{$key} = "$dir".q|node60.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_SEP/;
+$ref_files{$key} = "$dir".q|node176.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_AIRMAS/;
+$ref_files{$key} = "$dir".q|node16.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PERMUT/;
+$ref_files{$key} = "$dir".q|node143.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_UE2EL/;
+$ref_files{$key} = "$dir".q|node187.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/stardoccontents/;
+$ref_files{$key} = "$dir".q|sun67.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_H2FK5/;
+$ref_files{$key} = "$dir".q|node119.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_FK425/;
+$ref_files{$key} = "$dir".q|node104.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DS2TP/;
+$ref_files{$key} = "$dir".q|node71.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DH2E/;
+$ref_files{$key} = "$dir".q|node56.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DTPS2C/;
+$ref_files{$key} = "$dir".q|node78.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_AOPPA/;
+$ref_files{$key} = "$dir".q|node21.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_REFV/;
+$ref_files{$key} = "$dir".q|node168.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DVN/;
+$ref_files{$key} = "$dir".q|node83.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_abstract/;
+$ref_files{$key} = "$dir".q|node1.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_GALEQ/;
+$ref_files{$key} = "$dir".q|node111.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DPAV/;
+$ref_files{$key} = "$dir".q|node65.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_REFZ/;
+$ref_files{$key} = "$dir".q|node169.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_CAF2R/;
+$ref_files{$key} = "$dir".q|node27.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_UNPCD/;
+$ref_files{$key} = "$dir".q|node189.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_ALTAZ/;
+$ref_files{$key} = "$dir".q|node17.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PA/;
+$ref_files{$key} = "$dir".q|node138.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_INVF/;
+$ref_files{$key} = "$dir".q|node123.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_CC62S/;
+$ref_files{$key} = "$dir".q|node31.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DE2H/;
+$ref_files{$key} = "$dir".q|node53.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_AMPQK/;
+$ref_files{$key} = "$dir".q|node19.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DMAT/;
+$ref_files{$key} = "$dir".q|node61.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PM/;
+$ref_files{$key} = "$dir".q|node149.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_GEOC/;
+$ref_files{$key} = "$dir".q|node114.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_AMP/;
+$ref_files{$key} = "$dir".q|node18.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_ETRMS/;
+$ref_files{$key} = "$dir".q|node100.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_OAP/;
+$ref_files{$key} = "$dir".q|node135.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_FLOTIN/;
+$ref_files{$key} = "$dir".q|node110.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DTT/;
+$ref_files{$key} = "$dir".q|node80.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DSEP/;
+$ref_files{$key} = "$dir".q|node72.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_SVD/;
+$ref_files{$key} = "$dir".q|node180.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_ADDET/;
+$ref_files{$key} = "$dir".q|node14.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_IMXV/;
+$ref_files{$key} = "$dir".q|node121.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_HFK5Z/;
+$ref_files{$key} = "$dir".q|node120.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_TP2S/;
+$ref_files{$key} = "$dir".q|node183.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PREBN/;
+$ref_files{$key} = "$dir".q|node151.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_TP2V/;
+$ref_files{$key} = "$dir".q|node184.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DTPS2C/;
+$ref_files{$key} = "$dir".q|node78.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_AOPQK/;
+$ref_files{$key} = "$dir".q|node23.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_AFIN/;
+$ref_files{$key} = "$dir".q|node15.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DMXM/;
+$ref_files{$key} = "$dir".q|node63.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_EQEQX/;
+$ref_files{$key} = "$dir".q|node98.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DRANRM/;
+$ref_files{$key} = "$dir".q|node69.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DBJIN/;
+$ref_files{$key} = "$dir".q|node47.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_POLMO/;
+$ref_files{$key} = "$dir".q|node150.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_RVLG/;
+$ref_files{$key} = "$dir".q|node172.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_GMSTA/;
+$ref_files{$key} = "$dir".q|node116.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DCMPF/;
+$ref_files{$key} = "$dir".q|node50.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PVOBS/;
+$ref_files{$key} = "$dir".q|node158.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DMXV/;
+$ref_files{$key} = "$dir".q|node64.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_FK524/;
+$ref_files{$key} = "$dir".q|node106.html|;
+$noresave{$key} = "$nosave";
+
+1;
+
diff --git a/src/slalib/sun67.htx/invis_anchor.xbm b/src/slalib/sun67.htx/invis_anchor.xbm
new file mode 100644
index 0000000..cc208a3
--- /dev/null
+++ b/src/slalib/sun67.htx/invis_anchor.xbm
@@ -0,0 +1,4 @@
+#define dot_anchor_width 1
+#define dot_anchor_height 1
+static char dot_anchor_bits[] = {
+ 0xfe};
diff --git a/src/slalib/sun67.htx/labels.pl b/src/slalib/sun67.htx/labels.pl
new file mode 100644
index 0000000..ab31648
--- /dev/null
+++ b/src/slalib/sun67.htx/labels.pl
@@ -0,0 +1,1482 @@
+# LaTeX2HTML 97.1 (release) (July 13th, 1997)
+# Associate labels original text with physical files.
+
+
+$key = q/SLA_DR2TF/;
+$external_labels{$key} = "$URL/" . q|node67.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_OBS/;
+$external_labels{$key} = "$URL/" . q|node137.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DD2TF/;
+$external_labels{$key} = "$URL/" . q|node52.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DIMXV/;
+$external_labels{$key} = "$URL/" . q|node57.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PRECL/;
+$external_labels{$key} = "$URL/" . q|node154.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_EVP/;
+$external_labels{$key} = "$URL/" . q|node102.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_FLOTIN/;
+$external_labels{$key} = "$URL/" . q|node110.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DTP2S/;
+$external_labels{$key} = "$URL/" . q|node76.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_RANGE/;
+$external_labels{$key} = "$URL/" . q|node161.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_NUTC/;
+$external_labels{$key} = "$URL/" . q|node134.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_TPV2C/;
+$external_labels{$key} = "$URL/" . q|node186.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DTP2V/;
+$external_labels{$key} = "$URL/" . q|node77.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_VDV/;
+$external_labels{$key} = "$URL/" . q|node191.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_FK52H/;
+$external_labels{$key} = "$URL/" . q|node107.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DVN/;
+$external_labels{$key} = "$URL/" . q|node83.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PREC/;
+$external_labels{$key} = "$URL/" . q|node152.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_EQECL/;
+$external_labels{$key} = "$URL/" . q|node97.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_H2E/;
+$external_labels{$key} = "$URL/" . q|node118.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_AOP/;
+$external_labels{$key} = "$URL/" . q|node20.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DS2C6/;
+$external_labels{$key} = "$URL/" . q|node70.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DRANRM/;
+$external_labels{$key} = "$URL/" . q|node69.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PAV/;
+$external_labels{$key} = "$URL/" . q|node139.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_FITXY/;
+$external_labels{$key} = "$URL/" . q|node103.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_CS2C/;
+$external_labels{$key} = "$URL/" . q|node38.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_CC2S/;
+$external_labels{$key} = "$URL/" . q|node30.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DT/;
+$external_labels{$key} = "$URL/" . q|node73.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PDA2H/;
+$external_labels{$key} = "$URL/" . q|node141.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_RVLSRD/;
+$external_labels{$key} = "$URL/" . q|node173.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_EG50/;
+$external_labels{$key} = "$URL/" . q|node90.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DMOON/;
+$external_labels{$key} = "$URL/" . q|node62.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DJCAL/;
+$external_labels{$key} = "$URL/" . q|node58.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_AMP/;
+$external_labels{$key} = "$URL/" . q|node18.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_CD2TF/;
+$external_labels{$key} = "$URL/" . q|node32.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_EARTH/;
+$external_labels{$key} = "$URL/" . q|node86.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_OAP/;
+$external_labels{$key} = "$URL/" . q|node135.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_RANDOM/;
+$external_labels{$key} = "$URL/" . q|node160.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_WAIT/;
+$external_labels{$key} = "$URL/" . q|node194.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_AV2M/;
+$external_labels{$key} = "$URL/" . q|node25.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_NUT/;
+$external_labels{$key} = "$URL/" . q|node133.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_SUBET/;
+$external_labels{$key} = "$URL/" . q|node178.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_RVLSRK/;
+$external_labels{$key} = "$URL/" . q|node174.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_BEAR/;
+$external_labels{$key} = "$URL/" . q|node26.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PDQ2H/;
+$external_labels{$key} = "$URL/" . q|node142.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_CLYD/;
+$external_labels{$key} = "$URL/" . q|node34.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_V2TP/;
+$external_labels{$key} = "$URL/" . q|node190.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_INTIN/;
+$external_labels{$key} = "$URL/" . q|node122.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_COMBN/;
+$external_labels{$key} = "$URL/" . q|node35.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_CTF2D/;
+$external_labels{$key} = "$URL/" . q|node40.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_FK45Z/;
+$external_labels{$key} = "$URL/" . q|node105.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DVXV/;
+$external_labels{$key} = "$URL/" . q|node84.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_S2TP/;
+$external_labels{$key} = "$URL/" . q|node175.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_CALYD/;
+$external_labels{$key} = "$URL/" . q|node29.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DCS2C/;
+$external_labels{$key} = "$URL/" . q|node51.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DCC2S/;
+$external_labels{$key} = "$URL/" . q|node49.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DAF2R/;
+$external_labels{$key} = "$URL/" . q|node42.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_REFRO/;
+$external_labels{$key} = "$URL/" . q|node167.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_MXM/;
+$external_labels{$key} = "$URL/" . q|node131.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_CTF2R/;
+$external_labels{$key} = "$URL/" . q|node41.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DC62S/;
+$external_labels{$key} = "$URL/" . q|node48.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PCD/;
+$external_labels{$key} = "$URL/" . q|node140.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_OBS/;
+$external_labels{$key} = "$URL/" . q|node137.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DT/;
+$external_labels{$key} = "$URL/" . q|node73.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DAV2M/;
+$external_labels{$key} = "$URL/" . q|node45.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_MXV/;
+$external_labels{$key} = "$URL/" . q|node132.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_OAPQK/;
+$external_labels{$key} = "$URL/" . q|node136.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_EL2UE/;
+$external_labels{$key} = "$URL/" . q|node91.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_EULER/;
+$external_labels{$key} = "$URL/" . q|node101.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_RVLSRD/;
+$external_labels{$key} = "$URL/" . q|node173.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DBEAR/;
+$external_labels{$key} = "$URL/" . q|node46.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_EQGAL/;
+$external_labels{$key} = "$URL/" . q|node99.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_EVP/;
+$external_labels{$key} = "$URL/" . q|node102.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_RANDOM/;
+$external_labels{$key} = "$URL/" . q|node160.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_CR2AF/;
+$external_labels{$key} = "$URL/" . q|node36.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_REFCO/;
+$external_labels{$key} = "$URL/" . q|node165.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_RVLSRK/;
+$external_labels{$key} = "$URL/" . q|node174.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_VDV/;
+$external_labels{$key} = "$URL/" . q|node191.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_EPCO/;
+$external_labels{$key} = "$URL/" . q|node94.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_FK54Z/;
+$external_labels{$key} = "$URL/" . q|node108.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_M2AV/;
+$external_labels{$key} = "$URL/" . q|node125.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_FK425/;
+$external_labels{$key} = "$URL/" . q|node104.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DS2TP/;
+$external_labels{$key} = "$URL/" . q|node71.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_AOPPA/;
+$external_labels{$key} = "$URL/" . q|node21.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_GE50/;
+$external_labels{$key} = "$URL/" . q|node113.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_H2E/;
+$external_labels{$key} = "$URL/" . q|node118.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_AOP/;
+$external_labels{$key} = "$URL/" . q|node20.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DFLTIN/;
+$external_labels{$key} = "$URL/" . q|node55.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_VN/;
+$external_labels{$key} = "$URL/" . q|node192.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_UNPCD/;
+$external_labels{$key} = "$URL/" . q|node189.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_GMST/;
+$external_labels{$key} = "$URL/" . q|node115.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PAV/;
+$external_labels{$key} = "$URL/" . q|node139.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_ALTAZ/;
+$external_labels{$key} = "$URL/" . q|node17.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DJCL/;
+$external_labels{$key} = "$URL/" . q|node59.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_CC62S/;
+$external_labels{$key} = "$URL/" . q|node31.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_MAPPA/;
+$external_labels{$key} = "$URL/" . q|node127.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DRANGE/;
+$external_labels{$key} = "$URL/" . q|node68.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_UE2PV/;
+$external_labels{$key} = "$URL/" . q|node188.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DTPV2C/;
+$external_labels{$key} = "$URL/" . q|node79.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DVDV/;
+$external_labels{$key} = "$URL/" . q|node82.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_NUT/;
+$external_labels{$key} = "$URL/" . q|node133.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_ETRMS/;
+$external_labels{$key} = "$URL/" . q|node100.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PRECES/;
+$external_labels{$key} = "$URL/" . q|node153.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DAFIN/;
+$external_labels{$key} = "$URL/" . q|node43.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PREBN/;
+$external_labels{$key} = "$URL/" . q|node151.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DH2E/;
+$external_labels{$key} = "$URL/" . q|node56.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_AOPPAT/;
+$external_labels{$key} = "$URL/" . q|node22.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_AOPQK/;
+$external_labels{$key} = "$URL/" . q|node23.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_ECMAT/;
+$external_labels{$key} = "$URL/" . q|node88.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DPAV/;
+$external_labels{$key} = "$URL/" . q|node65.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_TPS2C/;
+$external_labels{$key} = "$URL/" . q|node185.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_SUPGAL/;
+$external_labels{$key} = "$URL/" . q|node179.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DFLTIN/;
+$external_labels{$key} = "$URL/" . q|node55.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_VXV/;
+$external_labels{$key} = "$URL/" . q|node193.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_VN/;
+$external_labels{$key} = "$URL/" . q|node192.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_EQEQX/;
+$external_labels{$key} = "$URL/" . q|node98.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_MXM/;
+$external_labels{$key} = "$URL/" . q|node131.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_POLMO/;
+$external_labels{$key} = "$URL/" . q|node150.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_INVF/;
+$external_labels{$key} = "$URL/" . q|node123.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DBJIN/;
+$external_labels{$key} = "$URL/" . q|node47.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_XY2XY/;
+$external_labels{$key} = "$URL/" . q|node195.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_MAPQKZ/;
+$external_labels{$key} = "$URL/" . q|node129.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_ECOR/;
+$external_labels{$key} = "$URL/" . q|node89.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PVOBS/;
+$external_labels{$key} = "$URL/" . q|node158.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DCMPF/;
+$external_labels{$key} = "$URL/" . q|node50.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PCD/;
+$external_labels{$key} = "$URL/" . q|node140.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_FK524/;
+$external_labels{$key} = "$URL/" . q|node106.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_MAPQK/;
+$external_labels{$key} = "$URL/" . q|node128.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_MXV/;
+$external_labels{$key} = "$URL/" . q|node132.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DRANGE/;
+$external_labels{$key} = "$URL/" . q|node68.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_GEOC/;
+$external_labels{$key} = "$URL/" . q|node114.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DTPV2C/;
+$external_labels{$key} = "$URL/" . q|node79.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DD2TF/;
+$external_labels{$key} = "$URL/" . q|node52.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_SMAT/;
+$external_labels{$key} = "$URL/" . q|node177.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_RDPLAN/;
+$external_labels{$key} = "$URL/" . q|node164.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PRECL/;
+$external_labels{$key} = "$URL/" . q|node154.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PLANTE/;
+$external_labels{$key} = "$URL/" . q|node148.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_IMXV/;
+$external_labels{$key} = "$URL/" . q|node121.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_MOON/;
+$external_labels{$key} = "$URL/" . q|node130.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_CLDJ/;
+$external_labels{$key} = "$URL/" . q|node33.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_TP2S/;
+$external_labels{$key} = "$URL/" . q|node183.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_FK52H/;
+$external_labels{$key} = "$URL/" . q|node107.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_TP2V/;
+$external_labels{$key} = "$URL/" . q|node184.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_EPB2D/;
+$external_labels{$key} = "$URL/" . q|node93.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PRECES/;
+$external_labels{$key} = "$URL/" . q|node153.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_AOPPAT/;
+$external_labels{$key} = "$URL/" . q|node22.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DTF2D/;
+$external_labels{$key} = "$URL/" . q|node74.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_EPJ2D/;
+$external_labels{$key} = "$URL/" . q|node96.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DMXM/;
+$external_labels{$key} = "$URL/" . q|node63.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_EQECL/;
+$external_labels{$key} = "$URL/" . q|node97.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_SUPGAL/;
+$external_labels{$key} = "$URL/" . q|node179.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_RVLG/;
+$external_labels{$key} = "$URL/" . q|node172.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PLANEL/;
+$external_labels{$key} = "$URL/" . q|node146.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DMXV/;
+$external_labels{$key} = "$URL/" . q|node64.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_FITXY/;
+$external_labels{$key} = "$URL/" . q|node103.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_MAPQKZ/;
+$external_labels{$key} = "$URL/" . q|node129.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DEULER/;
+$external_labels{$key} = "$URL/" . q|node54.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_/;
+$external_labels{$key} = "$URL/" . q|sun67.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_CR2TF/;
+$external_labels{$key} = "$URL/" . q|node37.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DTF2R/;
+$external_labels{$key} = "$URL/" . q|node75.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PLANET/;
+$external_labels{$key} = "$URL/" . q|node147.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_RCC/;
+$external_labels{$key} = "$URL/" . q|node163.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DMOON/;
+$external_labels{$key} = "$URL/" . q|node62.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DJCAL/;
+$external_labels{$key} = "$URL/" . q|node58.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_ECLEQ/;
+$external_labels{$key} = "$URL/" . q|node87.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_RDPLAN/;
+$external_labels{$key} = "$URL/" . q|node164.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DR2AF/;
+$external_labels{$key} = "$URL/" . q|node66.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_SUBET/;
+$external_labels{$key} = "$URL/" . q|node178.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DV2TP/;
+$external_labels{$key} = "$URL/" . q|node81.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PLANTE/;
+$external_labels{$key} = "$URL/" . q|node148.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_COMBN/;
+$external_labels{$key} = "$URL/" . q|node35.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_CALDJ/;
+$external_labels{$key} = "$URL/" . q|node28.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_ZD/;
+$external_labels{$key} = "$URL/" . q|node196.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_CTF2D/;
+$external_labels{$key} = "$URL/" . q|node40.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_REFV/;
+$external_labels{$key} = "$URL/" . q|node168.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_RVGALC/;
+$external_labels{$key} = "$URL/" . q|node171.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_FK45Z/;
+$external_labels{$key} = "$URL/" . q|node105.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_REFCOQ/;
+$external_labels{$key} = "$URL/" . q|node166.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_CS2C6/;
+$external_labels{$key} = "$URL/" . q|node39.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_RVEROT/;
+$external_labels{$key} = "$URL/" . q|node170.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_KBJ/;
+$external_labels{$key} = "$URL/" . q|node124.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_REFZ/;
+$external_labels{$key} = "$URL/" . q|node169.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_VXV/;
+$external_labels{$key} = "$URL/" . q|node193.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_FK5HZ/;
+$external_labels{$key} = "$URL/" . q|node109.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PLANEL/;
+$external_labels{$key} = "$URL/" . q|node146.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PV2EL/;
+$external_labels{$key} = "$URL/" . q|node156.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_REFRO/;
+$external_labels{$key} = "$URL/" . q|node167.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_CC2S/;
+$external_labels{$key} = "$URL/" . q|node30.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_CS2C/;
+$external_labels{$key} = "$URL/" . q|node38.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_CTF2R/;
+$external_labels{$key} = "$URL/" . q|node41.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DEULER/;
+$external_labels{$key} = "$URL/" . q|node54.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DC62S/;
+$external_labels{$key} = "$URL/" . q|node48.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DE2H/;
+$external_labels{$key} = "$URL/" . q|node53.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PLANET/;
+$external_labels{$key} = "$URL/" . q|node147.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_EG50/;
+$external_labels{$key} = "$URL/" . q|node90.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PV2UE/;
+$external_labels{$key} = "$URL/" . q|node157.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DMAT/;
+$external_labels{$key} = "$URL/" . q|node61.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_WAIT/;
+$external_labels{$key} = "$URL/" . q|node194.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_AV2M/;
+$external_labels{$key} = "$URL/" . q|node25.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_EQGAL/;
+$external_labels{$key} = "$URL/" . q|node99.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DSEP/;
+$external_labels{$key} = "$URL/" . q|node72.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_BEAR/;
+$external_labels{$key} = "$URL/" . q|node26.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_CR2AF/;
+$external_labels{$key} = "$URL/" . q|node36.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DM2AV/;
+$external_labels{$key} = "$URL/" . q|node60.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_REFCO/;
+$external_labels{$key} = "$URL/" . q|node165.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_UE2EL/;
+$external_labels{$key} = "$URL/" . q|node187.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_FK54Z/;
+$external_labels{$key} = "$URL/" . q|node108.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_H2FK5/;
+$external_labels{$key} = "$URL/" . q|node119.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DAT/;
+$external_labels{$key} = "$URL/" . q|node44.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DVXV/;
+$external_labels{$key} = "$URL/" . q|node84.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_S2TP/;
+$external_labels{$key} = "$URL/" . q|node175.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_ZD/;
+$external_labels{$key} = "$URL/" . q|node196.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_AFIN/;
+$external_labels{$key} = "$URL/" . q|node15.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_GALEQ/;
+$external_labels{$key} = "$URL/" . q|node111.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_RVGALC/;
+$external_labels{$key} = "$URL/" . q|node171.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_REFCOQ/;
+$external_labels{$key} = "$URL/" . q|node166.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_GALSUP/;
+$external_labels{$key} = "$URL/" . q|node112.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PXY/;
+$external_labels{$key} = "$URL/" . q|node159.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_RVEROT/;
+$external_labels{$key} = "$URL/" . q|node170.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_CAF2R/;
+$external_labels{$key} = "$URL/" . q|node27.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_RCC/;
+$external_labels{$key} = "$URL/" . q|node163.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_AMPQK/;
+$external_labels{$key} = "$URL/" . q|node19.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_MAPPA/;
+$external_labels{$key} = "$URL/" . q|node127.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_UE2PV/;
+$external_labels{$key} = "$URL/" . q|node188.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_ADDET/;
+$external_labels{$key} = "$URL/" . q|node14.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_EPB/;
+$external_labels{$key} = "$URL/" . q|node92.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_NUTC/;
+$external_labels{$key} = "$URL/" . q|node134.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_EPCO/;
+$external_labels{$key} = "$URL/" . q|node94.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_HFK5Z/;
+$external_labels{$key} = "$URL/" . q|node120.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_ATMDSP/;
+$external_labels{$key} = "$URL/" . q|node24.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_EPJ/;
+$external_labels{$key} = "$URL/" . q|node95.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PERTEL/;
+$external_labels{$key} = "$URL/" . q|node144.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DAFIN/;
+$external_labels{$key} = "$URL/" . q|node43.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_GE50/;
+$external_labels{$key} = "$URL/" . q|node113.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PERTUE/;
+$external_labels{$key} = "$URL/" . q|node145.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PREC/;
+$external_labels{$key} = "$URL/" . q|node152.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_ECMAT/;
+$external_labels{$key} = "$URL/" . q|node88.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_KBJ/;
+$external_labels{$key} = "$URL/" . q|node124.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_TPS2C/;
+$external_labels{$key} = "$URL/" . q|node185.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_GALSUP/;
+$external_labels{$key} = "$URL/" . q|node112.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_GMST/;
+$external_labels{$key} = "$URL/" . q|node115.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_GMSTA/;
+$external_labels{$key} = "$URL/" . q|node116.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DJCL/;
+$external_labels{$key} = "$URL/" . q|node59.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_XY2XY/;
+$external_labels{$key} = "$URL/" . q|node195.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DR2TF/;
+$external_labels{$key} = "$URL/" . q|node67.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_MAPQK/;
+$external_labels{$key} = "$URL/" . q|node128.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DIMXV/;
+$external_labels{$key} = "$URL/" . q|node57.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_MAP/;
+$external_labels{$key} = "$URL/" . q|node126.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_E2H/;
+$external_labels{$key} = "$URL/" . q|node85.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_RANGE/;
+$external_labels{$key} = "$URL/" . q|node161.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DTP2S/;
+$external_labels{$key} = "$URL/" . q|node76.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_TPV2C/;
+$external_labels{$key} = "$URL/" . q|node186.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_RANORM/;
+$external_labels{$key} = "$URL/" . q|node162.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DTP2V/;
+$external_labels{$key} = "$URL/" . q|node77.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_SEP/;
+$external_labels{$key} = "$URL/" . q|node176.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_SVDCOV/;
+$external_labels{$key} = "$URL/" . q|node181.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_ATMDSP/;
+$external_labels{$key} = "$URL/" . q|node24.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_V2TP/;
+$external_labels{$key} = "$URL/" . q|node190.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PERTEL/;
+$external_labels{$key} = "$URL/" . q|node144.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_CLYD/;
+$external_labels{$key} = "$URL/" . q|node34.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DAT/;
+$external_labels{$key} = "$URL/" . q|node44.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_EPB2D/;
+$external_labels{$key} = "$URL/" . q|node93.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_SVDSOL/;
+$external_labels{$key} = "$URL/" . q|node182.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_GRESID/;
+$external_labels{$key} = "$URL/" . q|node117.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PRENUT/;
+$external_labels{$key} = "$URL/" . q|node155.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DTF2D/;
+$external_labels{$key} = "$URL/" . q|node74.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_EPJ2D/;
+$external_labels{$key} = "$URL/" . q|node96.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PERTUE/;
+$external_labels{$key} = "$URL/" . q|node145.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PXY/;
+$external_labels{$key} = "$URL/" . q|node159.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DS2C6/;
+$external_labels{$key} = "$URL/" . q|node70.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_ECOR/;
+$external_labels{$key} = "$URL/" . q|node89.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_CR2TF/;
+$external_labels{$key} = "$URL/" . q|node37.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DTF2R/;
+$external_labels{$key} = "$URL/" . q|node75.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PDA2H/;
+$external_labels{$key} = "$URL/" . q|node141.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_CD2TF/;
+$external_labels{$key} = "$URL/" . q|node32.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_EARTH/;
+$external_labels{$key} = "$URL/" . q|node86.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_SMAT/;
+$external_labels{$key} = "$URL/" . q|node177.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_ECLEQ/;
+$external_labels{$key} = "$URL/" . q|node87.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_EPB/;
+$external_labels{$key} = "$URL/" . q|node92.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DTT/;
+$external_labels{$key} = "$URL/" . q|node80.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_MOON/;
+$external_labels{$key} = "$URL/" . q|node130.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_SVD/;
+$external_labels{$key} = "$URL/" . q|node180.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DR2AF/;
+$external_labels{$key} = "$URL/" . q|node66.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_RANORM/;
+$external_labels{$key} = "$URL/" . q|node162.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DV2TP/;
+$external_labels{$key} = "$URL/" . q|node81.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_AIRMAS/;
+$external_labels{$key} = "$URL/" . q|node16.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_CLDJ/;
+$external_labels{$key} = "$URL/" . q|node33.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PERMUT/;
+$external_labels{$key} = "$URL/" . q|node143.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_EPJ/;
+$external_labels{$key} = "$URL/" . q|node95.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PDQ2H/;
+$external_labels{$key} = "$URL/" . q|node142.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_SVDCOV/;
+$external_labels{$key} = "$URL/" . q|node181.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_M2AV/;
+$external_labels{$key} = "$URL/" . q|node125.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_INTIN/;
+$external_labels{$key} = "$URL/" . q|node122.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_SVDSOL/;
+$external_labels{$key} = "$URL/" . q|node182.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_GRESID/;
+$external_labels{$key} = "$URL/" . q|node117.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_CALDJ/;
+$external_labels{$key} = "$URL/" . q|node28.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PRENUT/;
+$external_labels{$key} = "$URL/" . q|node155.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_CALYD/;
+$external_labels{$key} = "$URL/" . q|node29.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_CS2C6/;
+$external_labels{$key} = "$URL/" . q|node39.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DAF2R/;
+$external_labels{$key} = "$URL/" . q|node42.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DCC2S/;
+$external_labels{$key} = "$URL/" . q|node49.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DCS2C/;
+$external_labels{$key} = "$URL/" . q|node51.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PA/;
+$external_labels{$key} = "$URL/" . q|node138.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_FK5HZ/;
+$external_labels{$key} = "$URL/" . q|node109.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PV2EL/;
+$external_labels{$key} = "$URL/" . q|node156.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DAV2M/;
+$external_labels{$key} = "$URL/" . q|node45.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_OAPQK/;
+$external_labels{$key} = "$URL/" . q|node136.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_EULER/;
+$external_labels{$key} = "$URL/" . q|node101.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_EL2UE/;
+$external_labels{$key} = "$URL/" . q|node91.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PM/;
+$external_labels{$key} = "$URL/" . q|node149.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_MAP/;
+$external_labels{$key} = "$URL/" . q|node126.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DBEAR/;
+$external_labels{$key} = "$URL/" . q|node46.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PV2UE/;
+$external_labels{$key} = "$URL/" . q|node157.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_E2H/;
+$external_labels{$key} = "$URL/" . q|node85.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DVDV/;
+$external_labels{$key} = "$URL/" . q|node82.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DM2AV/;
+$external_labels{$key} = "$URL/" . q|node60.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_SEP/;
+$external_labels{$key} = "$URL/" . q|node176.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_AIRMAS/;
+$external_labels{$key} = "$URL/" . q|node16.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PERMUT/;
+$external_labels{$key} = "$URL/" . q|node143.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_UE2EL/;
+$external_labels{$key} = "$URL/" . q|node187.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/stardoccontents/;
+$external_labels{$key} = "$URL/" . q|sun67.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_H2FK5/;
+$external_labels{$key} = "$URL/" . q|node119.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_FK425/;
+$external_labels{$key} = "$URL/" . q|node104.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DS2TP/;
+$external_labels{$key} = "$URL/" . q|node71.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DH2E/;
+$external_labels{$key} = "$URL/" . q|node56.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DTPS2C/;
+$external_labels{$key} = "$URL/" . q|node78.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_AOPPA/;
+$external_labels{$key} = "$URL/" . q|node21.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_REFV/;
+$external_labels{$key} = "$URL/" . q|node168.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DVN/;
+$external_labels{$key} = "$URL/" . q|node83.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_abstract/;
+$external_labels{$key} = "$URL/" . q|node1.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_GALEQ/;
+$external_labels{$key} = "$URL/" . q|node111.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DPAV/;
+$external_labels{$key} = "$URL/" . q|node65.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_REFZ/;
+$external_labels{$key} = "$URL/" . q|node169.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_CAF2R/;
+$external_labels{$key} = "$URL/" . q|node27.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_UNPCD/;
+$external_labels{$key} = "$URL/" . q|node189.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_ALTAZ/;
+$external_labels{$key} = "$URL/" . q|node17.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PA/;
+$external_labels{$key} = "$URL/" . q|node138.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_INVF/;
+$external_labels{$key} = "$URL/" . q|node123.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_CC62S/;
+$external_labels{$key} = "$URL/" . q|node31.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DE2H/;
+$external_labels{$key} = "$URL/" . q|node53.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_AMPQK/;
+$external_labels{$key} = "$URL/" . q|node19.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DMAT/;
+$external_labels{$key} = "$URL/" . q|node61.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_PM/;
+$external_labels{$key} = "$URL/" . q|node149.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_GEOC/;
+$external_labels{$key} = "$URL/" . q|node114.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_AMP/;
+$external_labels{$key} = "$URL/" . q|node18.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_ETRMS/;
+$external_labels{$key} = "$URL/" . q|node100.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_OAP/;
+$external_labels{$key} = "$URL/" . q|node135.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_FLOTIN/;
+$external_labels{$key} = "$URL/" . q|node110.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DTT/;
+$external_labels{$key} = "$URL/" . q|node80.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DSEP/;
+$external_labels{$key} = "$URL/" . q|node72.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_SVD/;
+$external_labels{$key} = "$URL/" . q|node180.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_ADDET/;
+$external_labels{$key} = "$URL/" . q|node14.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_IMXV/;
+$external_labels{$key} = "$URL/" . q|node121.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_HFK5Z/;
+$external_labels{$key} = "$URL/" . q|node120.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_TP2S/;
+$external_labels{$key} = "$URL/" . q|node183.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PREBN/;
+$external_labels{$key} = "$URL/" . q|node151.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_TP2V/;
+$external_labels{$key} = "$URL/" . q|node184.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DTPS2C/;
+$external_labels{$key} = "$URL/" . q|node78.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_AOPQK/;
+$external_labels{$key} = "$URL/" . q|node23.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_AFIN/;
+$external_labels{$key} = "$URL/" . q|node15.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DMXM/;
+$external_labels{$key} = "$URL/" . q|node63.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_EQEQX/;
+$external_labels{$key} = "$URL/" . q|node98.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DRANRM/;
+$external_labels{$key} = "$URL/" . q|node69.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DBJIN/;
+$external_labels{$key} = "$URL/" . q|node47.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_POLMO/;
+$external_labels{$key} = "$URL/" . q|node150.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_RVLG/;
+$external_labels{$key} = "$URL/" . q|node172.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_GMSTA/;
+$external_labels{$key} = "$URL/" . q|node116.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_DCMPF/;
+$external_labels{$key} = "$URL/" . q|node50.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_PVOBS/;
+$external_labels{$key} = "$URL/" . q|node158.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/SLA_DMXV/;
+$external_labels{$key} = "$URL/" . q|node64.html|;
+$noresave{$key} = "$nosave";
+
+$key = q/xref_SLA_FK524/;
+$external_labels{$key} = "$URL/" . q|node106.html|;
+$noresave{$key} = "$nosave";
+
+1;
+
diff --git a/src/slalib/sun67.htx/next_group_motif.gif b/src/slalib/sun67.htx/next_group_motif.gif
new file mode 100644
index 0000000..833af4d
--- /dev/null
+++ b/src/slalib/sun67.htx/next_group_motif.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/next_group_motif_gr.gif b/src/slalib/sun67.htx/next_group_motif_gr.gif
new file mode 100644
index 0000000..c04fec3
--- /dev/null
+++ b/src/slalib/sun67.htx/next_group_motif_gr.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/next_motif.gif b/src/slalib/sun67.htx/next_motif.gif
new file mode 100644
index 0000000..7a2dbe9
--- /dev/null
+++ b/src/slalib/sun67.htx/next_motif.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/next_motif_gr.gif b/src/slalib/sun67.htx/next_motif_gr.gif
new file mode 100644
index 0000000..1416b1c
--- /dev/null
+++ b/src/slalib/sun67.htx/next_motif_gr.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/node1.html b/src/slalib/sun67.htx/node1.html
new file mode 100644
index 0000000..0a5b6da
--- /dev/null
+++ b/src/slalib/sun67.htx/node1.html
@@ -0,0 +1,65 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Abstract</TITLE>
+<META NAME="description" CONTENT="Abstract">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node2.html">
+<LINK REL="previous" HREF="sun67.html">
+<LINK REL="up" HREF="sun67.html">
+<LINK REL="next" HREF="node2.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html246" HREF="node2.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html244" HREF="sun67.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html238" HREF="sun67.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html247" HREF="node2.html">INTRODUCTION</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html245" HREF="sun67.html">SLALIB Positional Astronomy Library</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html239" HREF="sun67.html">SLALIB Positional Astronomy Library</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H1><A NAME="SECTION00010000000000000000">Abstract</A>
+<A NAME="xref_abstract">&#160;</A>
+</H1>
+SLALIB is a library used by writers of positional-astronomy applications.
+Most of the 183 routines are concerned with astronomical position and time,
+but a number have wider trigonometrical, numerical or general applications.
+<P>
+<BR> <HR>
+<A NAME="tex2html246" HREF="node2.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html244" HREF="sun67.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html238" HREF="sun67.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html247" HREF="node2.html">INTRODUCTION</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html245" HREF="sun67.html">SLALIB Positional Astronomy Library</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html239" HREF="sun67.html">SLALIB Positional Astronomy Library</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node10.html b/src/slalib/sun67.htx/node10.html
new file mode 100644
index 0000000..4a6a393
--- /dev/null
+++ b/src/slalib/sun67.htx/node10.html
@@ -0,0 +1,75 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>New Functions</TITLE>
+<META NAME="description" CONTENT="New Functions">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node11.html">
+<LINK REL="previous" HREF="node9.html">
+<LINK REL="up" HREF="node2.html">
+<LINK REL="next" HREF="node11.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html345" HREF="node11.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html343" HREF="node2.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html337" HREF="node9.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html346" HREF="node11.html">Acknowledgements</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html344" HREF="node2.html">INTRODUCTION</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html338" HREF="node9.html">Future Versions</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION00028000000000000000">
+New Functions</A>
+</H2>
+In a package like SLALIB it is difficult to know how far to go. Is it
+enough to provide the primitive operations, or should more
+complicated functions be packaged? Is it worth encroaching on
+specialist areas, where individual experts have all written their
+own software already? To what extent should CPU efficiency be
+an issue? How much support of different numerical precisions is
+required? And so on.
+<P>
+In practice, almost all the routines in SLALIB are there because they were
+needed for some specific application, and this is likely to remain the
+pattern for any enhancements in the future.
+Suggestions for additional SLALIB routines should be addressed to the
+author.
+<P>
+<BR> <HR>
+<A NAME="tex2html345" HREF="node11.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html343" HREF="node2.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html337" HREF="node9.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html346" HREF="node11.html">Acknowledgements</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html344" HREF="node2.html">INTRODUCTION</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html338" HREF="node9.html">Future Versions</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node100.html b/src/slalib/sun67.htx/node100.html
new file mode 100644
index 0000000..104db1d
--- /dev/null
+++ b/src/slalib/sun67.htx/node100.html
@@ -0,0 +1,110 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_ETRMS - E-terms of Aberration</TITLE>
+<META NAME="description" CONTENT="SLA_ETRMS - E-terms of Aberration">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node101.html">
+<LINK REL="previous" HREF="node99.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node101.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1426" HREF="node101.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1424" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1418" HREF="node99.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1427" HREF="node101.html">SLA_EULER - Rotation Matrix from Euler Angles</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1425" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1419" HREF="node99.html">SLA_EQGAL - J2000 to Galactic</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000487000000000000000">SLA_ETRMS - E-terms of Aberration</A>
+<A NAME="xref_SLA_ETRMS">&#160;</A><A NAME="SLA_ETRMS">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Compute the E-terms vector - the part of the annual
+aberration which arises from the eccentricity of the
+ Earth's orbit.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_ETRMS (EP, EV)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>EP</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>Besselian epoch</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>EV</EM></TD>
+<TH ALIGN="LEFT"><B>D(3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>E-terms as <IMG WIDTH="96" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img109.gif"
+ ALT="$[\Delta x, \Delta y, \Delta z\,]$"></TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTE:</STRONG>
+<DD>Note the use of the J2000 aberration constant (
+<IMG WIDTH="64" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img110.gif"
+ ALT="$20\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.49552$"> ).
+ This is a reflection of the fact that the E-terms embodied in
+ existing star catalogues were computed from a variety of
+ aberration constants. Rather than adopting one of the old
+ constants the latest value is used here.
+ </DL>
+<P> <DL>
+<DT><STRONG>REFERENCES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>Smith, C.A. <I>et al.</I>, 1989. <I>Astr.J.</I> <B>97</B>, 265.
+<DT>2.
+<DD>Yallop, B.D. <I>et al.</I>, 1989. <I>Astr.J.</I> <B>97</B>, 274.
+</DL></DL>
+<BR> <HR>
+<A NAME="tex2html1426" HREF="node101.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1424" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1418" HREF="node99.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1427" HREF="node101.html">SLA_EULER - Rotation Matrix from Euler Angles</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1425" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1419" HREF="node99.html">SLA_EQGAL - J2000 to Galactic</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node101.html b/src/slalib/sun67.htx/node101.html
new file mode 100644
index 0000000..e5bdda2
--- /dev/null
+++ b/src/slalib/sun67.htx/node101.html
@@ -0,0 +1,132 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_EULER - Rotation Matrix from Euler Angles</TITLE>
+<META NAME="description" CONTENT="SLA_EULER - Rotation Matrix from Euler Angles">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node102.html">
+<LINK REL="previous" HREF="node100.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node102.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1436" HREF="node102.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1434" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1428" HREF="node100.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1437" HREF="node102.html">SLA_EVP - Earth Position &amp; Velocity</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1435" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1429" HREF="node100.html">SLA_ETRMS - E-terms of Aberration</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000488000000000000000">SLA_EULER - Rotation Matrix from Euler Angles</A>
+<A NAME="xref_SLA_EULER">&#160;</A><A NAME="SLA_EULER">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Form a rotation matrix from the Euler angles - three
+successive rotations about specified Cartesian axes
+ (single precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_EULER (ORDER, PHI, THETA, PSI, RMAT)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ORDER</EM></TD>
+<TH ALIGN="LEFT"><B>C*(*)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>specifies about which axes the rotations occur</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PHI</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>1st rotation (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>THETA</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>2nd rotation (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PSI</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>3rd rotation (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RMAT</EM></TD>
+<TH ALIGN="LEFT"><B>R(3,3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>rotation matrix</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>A rotation is positive when the reference frame rotates
+anticlockwise as seen looking towards the origin from the
+positive region of the specified axis.
+ <DT>2.
+<DD>The characters of ORDER define which axes the three successive
+ rotations are about. A typical value is `ZXZ', indicating that
+ RMAT is to become the direction cosine matrix corresponding to
+ rotations of the reference frame through PHI radians about the
+ old <I>z</I>-axis, followed by THETA radians about the resulting
+ <I>x</I>-axis,
+ then PSI radians about the resulting <I>z</I>-axis. In detail:
+ <UL>
+<LI> The axis names can be any of the following, in any order or
+ combination: X, Y, Z, uppercase or lowercase, 1, 2, 3. Normal
+ axis labelling/numbering conventions apply;
+ the <I>xyz</I> (<IMG WIDTH="44" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img67.gif"
+ ALT="$\equiv123$">) triad is right-handed. Thus, the `ZXZ' example given above
+ could be written `zxz' or `313' (or even `ZxZ' or `3xZ').
+<LI> ORDER is terminated by length or by the first unrecognized
+ character.
+<LI> Fewer than three rotations are acceptable, in which case
+ the later angle arguments are ignored.
+ </UL>
+ <DT>3.
+<DD>Zero rotations produces a unit RMAT.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1436" HREF="node102.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1434" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1428" HREF="node100.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1437" HREF="node102.html">SLA_EVP - Earth Position &amp; Velocity</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1435" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1429" HREF="node100.html">SLA_ETRMS - E-terms of Aberration</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node102.html b/src/slalib/sun67.htx/node102.html
new file mode 100644
index 0000000..d22b187
--- /dev/null
+++ b/src/slalib/sun67.htx/node102.html
@@ -0,0 +1,149 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_EVP - Earth Position &amp; Velocity</TITLE>
+<META NAME="description" CONTENT="SLA_EVP - Earth Position &amp; Velocity">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node103.html">
+<LINK REL="previous" HREF="node101.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node103.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1446" HREF="node103.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1444" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1438" HREF="node101.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1447" HREF="node103.html">SLA_FITXY - Fit Linear Model to Two Sets</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1445" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1439" HREF="node101.html">SLA_EULER - Rotation Matrix from Euler Angles</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000489000000000000000">SLA_EVP - Earth Position &amp; Velocity</A>
+<A NAME="xref_SLA_EVP">&#160;</A><A NAME="SLA_EVP">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Barycentric and heliocentric velocity and position of the Earth.
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_EVP (DATE, DEQX, DVB, DPB, DVH, DPH)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DATE</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>TDB (formerly ET) as a Modified Julian Date
+(JD-2400000.5)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DEQX</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>Julian Epoch (<I>e.g.</I> 2000D0) of mean equator and
+equinox of the vectors returned. If DEQX&nbsp;&lt;0,
+all vectors are referred to the mean equator and
+equinox (FK5) of date DATE.</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DVB</EM></TD>
+<TH ALIGN="LEFT"><B>D(3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>barycentric <IMG WIDTH="58" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img111.gif"
+ ALT="$[\,\dot{x},\dot{y},\dot{z}\,]$">, AU&nbsp;s<SUP>-1</SUP></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DPB</EM></TD>
+<TD ALIGN="LEFT"><B>D(3)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>barycentric <IMG WIDTH="58" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img50.gif"
+ ALT="$[\,x,y,z\,]$">, AU</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DVH</EM></TD>
+<TD ALIGN="LEFT"><B>D(3)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>heliocentric <IMG WIDTH="58" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img111.gif"
+ ALT="$[\,\dot{x},\dot{y},\dot{z}\,]$">, AU&nbsp;s<SUP>-1</SUP></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DPH</EM></TD>
+<TD ALIGN="LEFT"><B>D(3)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>heliocentric <IMG WIDTH="58" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img50.gif"
+ ALT="$[\,x,y,z\,]$">, AU</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>This routine is used when accuracy is more important
+than CPU time, yet the extra complication of reading a
+pre-computed ephemeris is not justified. The maximum
+ deviations from the JPL&nbsp;DE96 ephemeris are as follows:
+ <UL>
+<LI> velocity (barycentric or heliocentric): 420&nbsp;mm&nbsp;s<SUP>-1</SUP>
+<LI> position (barycentric): 6900&nbsp;km
+<LI> position (heliocentric): 1600&nbsp;km
+ </UL>
+ <DT>2.
+<DD>The routine is an adaption of the BARVEL and BARCOR
+ subroutines of P.Stumpff, which are described in
+ <I>Astr.Astrophys.Suppl.Ser.</I> <B>41</B>, 1-8 (1980).
+ Most of the changes are merely cosmetic and do not affect
+ the results at all. However, some adjustments have been
+ made so as to give results that refer to the new (IAU 1976
+ `FK5') equinox and precession, although the differences these
+ changes make relative to the results from Stumpff's original
+ `FK4' version are smaller than the inherent accuracy of the
+ algorithm. One minor shortcoming in the original routines
+ that has <B>not</B> been corrected is that slightly better
+ numerical accuracy could be achieved if the various polynomial
+ evaluations were to be so arranged that the smallest terms were
+ computed first. Note also that one of Stumpff's precession
+ constants differs by
+ <IMG WIDTH="39" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img112.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.001$"> from the value given in the
+ <I>Explanatory Supplement</I>.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1446" HREF="node103.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1444" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1438" HREF="node101.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1447" HREF="node103.html">SLA_FITXY - Fit Linear Model to Two Sets</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1445" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1439" HREF="node101.html">SLA_EULER - Rotation Matrix from Euler Angles</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node103.html b/src/slalib/sun67.htx/node103.html
new file mode 100644
index 0000000..4525328
--- /dev/null
+++ b/src/slalib/sun67.htx/node103.html
@@ -0,0 +1,170 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_FITXY - Fit Linear Model to Two Sets</TITLE>
+<META NAME="description" CONTENT="SLA_FITXY - Fit Linear Model to Two Sets">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node104.html">
+<LINK REL="previous" HREF="node102.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node104.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1456" HREF="node104.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1454" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1448" HREF="node102.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1457" HREF="node104.html">SLA_FK425 - FK4 to FK5</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1455" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1449" HREF="node102.html">SLA_EVP - Earth Position &amp; Velocity</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000490000000000000000">&#160;</A><A NAME="xref_SLA_FITXY">&#160;</A><A NAME="SLA_FITXY">&#160;</A>
+<BR>
+SLA_FITXY - Fit Linear Model to Two <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$"> Sets
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Fit a linear model to relate two sets of <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$"> coordinates.
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_FITXY (ITYPE,NP,XYE,XYM,COEFFS,J)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ITYPE</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>type of model: 4 or 6 (note 1)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>NP</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>number of samples (note 2)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>XYE</EM></TD>
+<TD ALIGN="LEFT"><B>D(2,NP)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>expected <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$"> for each sample</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>XYM</EM></TD>
+<TD ALIGN="LEFT"><B>D(2,NP)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>measured <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$"> for each sample</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>COEFFS</EM></TD>
+<TH ALIGN="LEFT"><B>D(6)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>coefficients of model (note 3)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>J</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>status:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 0 = OK</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -1 = illegal ITYPE</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -2 = insufficient data</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -3 = singular solution</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>ITYPE, which must be either 4 or 6, selects the type of model
+fitted. Both allowed ITYPE values produce a model COEFFS which
+consists of six coefficients, namely the zero points and, for
+ each of XE and YE, the coefficient of XM and YM. For ITYPE=6,
+ all six coefficients are independent, modelling squash and shear
+ as well as origin, scale, and orientation. However, ITYPE=4
+ selects the <I>solid body rotation</I> option; the model COEFFS
+ still consists of the same six coefficients, but now two of
+ them are used twice (appropriately signed). Origin, scale
+ and orientation are still modelled, but not squash or shear -
+ the units of X and Y have to be the same.
+ <DT>2.
+<DD>For NC=4, NP must be at least 2. For NC=6, NP must be at
+ least 3.
+ <DT>3.
+<DD>The model is returned in the array COEFFS. Naming the
+ six elements of COEFFS <I>a</I>,<I>b</I>,<I>c</I>,<I>d</I>,<I>e</I> &amp; <I>f</I>,
+ the model transforms <I>measured</I> coordinates
+ <IMG WIDTH="63" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img113.gif"
+ ALT="$[x_{m},y_{m}\,]$"> into <I>expected</I> coordinates
+ <IMG WIDTH="52" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img114.gif"
+ ALT="$[x_{e},y_{e}\,]$"> as follows:
+ <BLOCKQUOTE><I>x</I><SUB><I>e</I></SUB> = <I>a</I> + <I>bx</I><SUB><I>m</I></SUB> + <I>cy</I><SUB><I>m</I></SUB> <BR>
+ <I>y</I><SUB><I>e</I></SUB> = <I>d</I> + <I>ex</I><SUB><I>m</I></SUB> + <I>fy</I><SUB><I>m</I></SUB></BLOCKQUOTE>
+ For the <I>solid body rotation</I> option (ITYPE=4), the
+ magnitudes of <I>b</I> and <I>f</I>, and of <I>c</I> and <I>e</I>, are equal. The
+ signs of these coefficients depend on whether there is a
+ sign reversal between [<I>x</I><SUB><I>e</I></SUB>,<I>y</I><SUB><I>e</I></SUB>] and [<I>x</I><SUB><I>m</I></SUB>,<I>y</I><SUB><I>m</I></SUB>];
+ fits are performed
+ with and without a sign reversal and the best one chosen.
+ <DT>4.
+<DD>Error status values J=-1 and -2 leave COEFFS unchanged;
+ if J=-3 COEFFS may have been changed.
+ <DT>5.
+<DD>See also sla_PXY, sla_INVF, sla_XY2XY, sla_DCMPF.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1456" HREF="node104.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1454" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1448" HREF="node102.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1457" HREF="node104.html">SLA_FK425 - FK4 to FK5</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1455" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1449" HREF="node102.html">SLA_EVP - Earth Position &amp; Velocity</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node104.html b/src/slalib/sun67.htx/node104.html
new file mode 100644
index 0000000..0a2f9ca
--- /dev/null
+++ b/src/slalib/sun67.htx/node104.html
@@ -0,0 +1,208 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_FK425 - FK4 to FK5</TITLE>
+<META NAME="description" CONTENT="SLA_FK425 - FK4 to FK5">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node105.html">
+<LINK REL="previous" HREF="node103.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node105.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1466" HREF="node105.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1464" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1458" HREF="node103.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1467" HREF="node105.html">SLA_FK45Z - FK4 to FK5, no P.M. or Parallax</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1465" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1459" HREF="node103.html">SLA_FITXY - Fit Linear Model to Two Sets</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000491000000000000000">SLA_FK425 - FK4 to FK5</A>
+<A NAME="xref_SLA_FK425">&#160;</A><A NAME="SLA_FK425">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Convert B1950.0 FK4 star data to J2000.0 FK5.
+This routine converts stars from the old, Bessel-Newcomb, FK4
+ system to the new, IAU&nbsp;1976, FK5, Fricke system. The precepts
+ of Smith&nbsp;<I>et&nbsp;al.</I> (see reference&nbsp;1) are followed,
+ using the implementation
+ by Yallop&nbsp;<I>et&nbsp;al.</I> (reference&nbsp;2) of a matrix method
+ due to Standish.
+ Kinoshita's development of Andoyer's post-Newcomb precession is
+ used. The numerical constants from
+ Seidelmann&nbsp;<I>et&nbsp;al.</I> (reference&nbsp;3) are used canonically.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_FK425 (
+ R1950,D1950,DR1950,DD1950,P1950,V1950,
+ R2000,D2000,DR2000,DD2000,P2000,V2000)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>R1950</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>B1950.0 <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$"> (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>D1950</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>B1950.0 <IMG WIDTH="10" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img23.gif"
+ ALT="$\delta$"> (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DR1950</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>B1950.0 proper motion in <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$">(radians per tropical year)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DD1950</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>B1950.0 proper motion in <IMG WIDTH="10" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img23.gif"
+ ALT="$\delta$">(radians per tropical year)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>P1950</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>B1950.0 parallax (arcsec)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>V1950</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>B1950.0 radial velocity (km&nbsp;s<SUP>-1</SUP>, +ve = moving away)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>R2000</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>J2000.0 <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$"> (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>D2000</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>J2000.0 <IMG WIDTH="10" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img23.gif"
+ ALT="$\delta$"> (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DR2000</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>J2000.0 proper motion in <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$">(radians per Julian year)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DD2000</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>J2000.0 proper motion in <IMG WIDTH="10" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img23.gif"
+ ALT="$\delta$">(radians per Julian year)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>P2000</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>J2000.0 parallax (arcsec)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>V2000</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>J2000.0 radial velocity (km&nbsp;s<SUP>-1</SUP>, +ve = moving away)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$"> proper motions are <IMG WIDTH="13" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img115.gif"
+ ALT="$\dot{\alpha}$"> rather than
+<IMG WIDTH="48" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img116.gif"
+ ALT="$\dot{\alpha}\cos\delta$">, and are per year rather than per century.
+<DT>2.
+<DD>Conversion from Besselian epoch 1950.0 to Julian epoch
+ 2000.0 only is provided for. Conversions involving other
+ epochs will require use of the appropriate precession,
+ proper motion, and E-terms routines before and/or after FK425
+ is called.
+ <DT>3.
+<DD>In the FK4 catalogue the proper motions of stars within
+ <IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img117.gif"
+ ALT="$10^{\circ}$"> of the poles do not include the <I>differential
+ E-terms</I> effect and should, strictly speaking, be handled
+ in a different manner from stars outside these regions.
+ However, given the general lack of homogeneity of the star
+ data available for routine astrometry, the difficulties of
+ handling positions that may have been determined from
+ astrometric fields spanning the polar and non-polar regions,
+ the likelihood that the differential E-terms effect was not
+ taken into account when allowing for proper motion in past
+ astrometry, and the undesirability of a discontinuity in
+ the algorithm, the decision has been made in this routine to
+ include the effect of differential E-terms on the proper
+ motions for all stars, whether polar or not. At epoch J2000,
+ and measuring on the sky rather than in terms of <IMG WIDTH="27" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img118.gif"
+ ALT="$\Delta\alpha$">, the errors resulting from this simplification are less than
+ 1&nbsp;milliarcsecond in position and 1&nbsp;milliarcsecond per
+ century in proper motion.
+ <DT>4.
+<DD>See also sla_FK45Z, sla_FK524, sla_FK54Z.
+ </DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>Smith, C.A. <I>et al.</I>, 1989. <I>Astr.J.</I> <B>97</B>, 265.
+<DT>2.
+<DD>Yallop, B.D. <I>et al.</I>, 1989. <I>Astr.J.</I> <B>97</B>, 274.
+<DT>3.
+<DD>Seidelmann, P.K. (ed), 1992. <I>Explanatory
+ Supplement to the Astronomical Almanac,</I> ISBN&nbsp;0-935702-68-7.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1466" HREF="node105.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1464" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1458" HREF="node103.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1467" HREF="node105.html">SLA_FK45Z - FK4 to FK5, no P.M. or Parallax</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1465" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1459" HREF="node103.html">SLA_FITXY - Fit Linear Model to Two Sets</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node105.html b/src/slalib/sun67.htx/node105.html
new file mode 100644
index 0000000..dde5fc9
--- /dev/null
+++ b/src/slalib/sun67.htx/node105.html
@@ -0,0 +1,166 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_FK45Z - FK4 to FK5, no P.M. or Parallax</TITLE>
+<META NAME="description" CONTENT="SLA_FK45Z - FK4 to FK5, no P.M. or Parallax">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node106.html">
+<LINK REL="previous" HREF="node104.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node106.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1476" HREF="node106.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1474" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1468" HREF="node104.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1477" HREF="node106.html">SLA_FK524 - FK5 to FK4</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1475" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1469" HREF="node104.html">SLA_FK425 - FK4 to FK5</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000492000000000000000">SLA_FK45Z - FK4 to FK5, no P.M. or Parallax</A>
+<A NAME="xref_SLA_FK45Z">&#160;</A><A NAME="SLA_FK45Z">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Convert B1950.0 FK4 star data to J2000.0 FK5 assuming zero
+proper motion in the FK5 frame.
+ This routine converts stars from the old, Bessel-Newcomb, FK4
+ system to the new, IAU&nbsp;1976, FK5, Fricke system, in such a
+ way that the FK5 proper motion is zero. Because such a star
+ has, in general, a non-zero proper motion in the FK4 system,
+ the routine requires the epoch at which the position in the
+ FK4 system was determined. The method is from appendix&nbsp;2 of
+ reference&nbsp;1, but using the constants of reference&nbsp;4.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_FK45Z (R1950,D1950,BEPOCH,R2000,D2000)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>R1950</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>B1950.0 FK4 <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$"> at epoch BEPOCH (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>D1950</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>B1950.0 FK4 <IMG WIDTH="10" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img23.gif"
+ ALT="$\delta$"> at epoch BEPOCH (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>BEPOCH</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>Besselian epoch (<I>e.g.</I> 1979.3D0)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>R2000</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>J2000.0 FK5 <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$"> (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>D2000</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>J2000.0 FK5 <IMG WIDTH="10" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img23.gif"
+ ALT="$\delta$"> (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The epoch BEPOCH is strictly speaking Besselian, but
+if a Julian epoch is supplied the result will be
+affected only to a negligible extent.
+ <DT>2.
+<DD>Conversion from Besselian epoch 1950.0 to Julian epoch
+ 2000.0 only is provided for. Conversions involving other
+ epochs will require use of the appropriate precession,
+ proper motion, and E-terms routines before and/or
+ after FK45Z is called.
+ <DT>3.
+<DD>In the FK4 catalogue the proper motions of stars within
+ <IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img117.gif"
+ ALT="$10^{\circ}$"> of the poles do not include the <I>differential
+ E-terms</I> effect and should, strictly speaking, be handled
+ in a different manner from stars outside these regions.
+ However, given the general lack of homogeneity of the star
+ data available for routine astrometry, the difficulties of
+ handling positions that may have been determined from
+ astrometric fields spanning the polar and non-polar regions,
+ the likelihood that the differential E-terms effect was not
+ taken into account when allowing for proper motion in past
+ astrometry, and the undesirability of a discontinuity in
+ the algorithm, the decision has been made in this routine to
+ include the effect of differential E-terms on the proper
+ motions for all stars, whether polar or not. At epoch 2000,
+ and measuring on the sky rather than in terms of <IMG WIDTH="27" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img118.gif"
+ ALT="$\Delta\alpha$">, the errors resulting from this simplification are less than
+ 1&nbsp;milliarcsecond in position and 1&nbsp;milliarcsecond per
+ century in proper motion.
+ <DT>4.
+<DD>See also sla_FK425, sla_FK524, sla_FK54Z.
+ </DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>Aoki, S., <I>et al.</I>, 1983. <I>Astr.Astrophys.</I>, <B>128</B>, 263.
+<DT>2.
+<DD>Smith, C.A. <I>et al.</I>, 1989. <I>Astr.J.</I> <B>97</B>, 265.
+<DT>3.
+<DD>Yallop, B.D. <I>et al.</I>, 1989. <I>Astr.J.</I> <B>97</B>, 274.
+ <DT>4.
+<DD>Seidelmann, P.K. (ed), 1992. <I>Explanatory
+ Supplement to the Astronomical Almanac,</I> ISBN&nbsp;0-935702-68-7.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1476" HREF="node106.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1474" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1468" HREF="node104.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1477" HREF="node106.html">SLA_FK524 - FK5 to FK4</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1475" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1469" HREF="node104.html">SLA_FK425 - FK4 to FK5</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node106.html b/src/slalib/sun67.htx/node106.html
new file mode 100644
index 0000000..8c1e64a
--- /dev/null
+++ b/src/slalib/sun67.htx/node106.html
@@ -0,0 +1,207 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_FK524 - FK5 to FK4</TITLE>
+<META NAME="description" CONTENT="SLA_FK524 - FK5 to FK4">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node107.html">
+<LINK REL="previous" HREF="node105.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node107.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1486" HREF="node107.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1484" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1478" HREF="node105.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1487" HREF="node107.html">SLA_FK52H - FK5 to Hipparcos</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1485" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1479" HREF="node105.html">SLA_FK45Z - FK4 to FK5, no P.M. or Parallax</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000493000000000000000">SLA_FK524 - FK5 to FK4</A>
+<A NAME="xref_SLA_FK524">&#160;</A><A NAME="SLA_FK524">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Convert J2000.0 FK5 star data to B1950.0 FK4.
+This routine converts stars from the new, IAU&nbsp;1976, FK5, Fricke
+ system, to the old, Bessel-Newcomb, FK4 system.
+ The precepts of Smith&nbsp;<I>et&nbsp;al.</I> (reference&nbsp;1) are followed,
+ using the implementation by Yallop&nbsp;<I>et&nbsp;al.</I> (reference&nbsp;2)
+ of a matrix method due to Standish. Kinoshita's development of
+ Andoyer's post-Newcomb precession is used. The numerical
+ constants from Seidelmann&nbsp;<I>et&nbsp;al.</I> (reference&nbsp;3) are
+ used canonically.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_FK524 (
+ R2000,D2000,DR2000,DD2000,P2000,V2000,
+ R1950,D1950,DR1950,DD1950,P1950,V1950)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>R2000</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>J2000.0 <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$"> (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>D2000</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>J2000.0 <IMG WIDTH="10" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img23.gif"
+ ALT="$\delta$"> (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DR2000</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>J2000.0 proper motion in <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$">(radians per Julian year)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DD2000</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>J2000.0 proper motion in <IMG WIDTH="10" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img23.gif"
+ ALT="$\delta$">(radians per Julian year)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>P2000</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>J2000.0 parallax (arcsec)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>V2000</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>J2000 radial velocity (km&nbsp;s<SUP>-1</SUP>, +ve = moving away)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>R1950</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>B1950.0 <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$"> (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>D1950</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>B1950.0 <IMG WIDTH="10" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img23.gif"
+ ALT="$\delta$"> (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DR1950</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>B1950.0 proper motion in <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$">(radians per tropical year)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DD1950</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>B1950.0 proper motion in <IMG WIDTH="10" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img23.gif"
+ ALT="$\delta$">(radians per tropical year)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>P1950</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>B1950.0 parallax (arcsec)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>V1950</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>radial velocity (km&nbsp;s<SUP>-1</SUP>, +ve = moving away)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$"> proper motions are <IMG WIDTH="13" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img115.gif"
+ ALT="$\dot{\alpha}$"> rather than
+<IMG WIDTH="48" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img116.gif"
+ ALT="$\dot{\alpha}\cos\delta$">, and are per year rather than per century.
+<DT>2.
+<DD>Note that conversion from Julian epoch 2000.0 to Besselian
+ epoch 1950.0 only is provided for. Conversions involving
+ other epochs will require use of the appropriate precession,
+ proper motion, and E-terms routines before and/or after
+ FK524 is called.
+ <DT>3.
+<DD>In the FK4 catalogue the proper motions of stars within
+ <IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img117.gif"
+ ALT="$10^{\circ}$"> of the poles do not include the <I>differential
+ E-terms</I> effect and should, strictly speaking, be handled
+ in a different manner from stars outside these regions.
+ However, given the general lack of homogeneity of the star
+ data available for routine astrometry, the difficulties of
+ handling positions that may have been determined from
+ astrometric fields spanning the polar and non-polar regions,
+ the likelihood that the differential E-terms effect was not
+ taken into account when allowing for proper motion in past
+ astrometry, and the undesirability of a discontinuity in
+ the algorithm, the decision has been made in this routine to
+ include the effect of differential E-terms on the proper
+ motions for all stars, whether polar or not. At epoch 2000,
+ and measuring on the sky rather than in terms of <IMG WIDTH="27" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img118.gif"
+ ALT="$\Delta\alpha$">, the errors resulting from this simplification are less than
+ 1&nbsp;milliarcsecond in position and 1&nbsp;milliarcsecond per
+ century in proper motion.
+ <DT>4.
+<DD>See also sla_FK425, sla_FK45Z, sla_FK54Z.
+ </DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>Smith, C.A. <I>et al.</I>, 1989. <I>Astr.J.</I> <B>97</B>, 265.
+<DT>2.
+<DD>Yallop, B.D. <I>et al.</I>, 1989. <I>Astr.J.</I> <B>97</B>, 274.
+<DT>3.
+<DD>Seidelmann, P.K. (ed), 1992. <I>Explanatory
+ Supplement to the Astronomical Almanac,</I> ISBN&nbsp;0-935702-68-7.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1486" HREF="node107.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1484" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1478" HREF="node105.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1487" HREF="node107.html">SLA_FK52H - FK5 to Hipparcos</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1485" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1479" HREF="node105.html">SLA_FK45Z - FK4 to FK5, no P.M. or Parallax</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node107.html b/src/slalib/sun67.htx/node107.html
new file mode 100644
index 0000000..e63af95
--- /dev/null
+++ b/src/slalib/sun67.htx/node107.html
@@ -0,0 +1,188 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_FK52H - FK5 to Hipparcos</TITLE>
+<META NAME="description" CONTENT="SLA_FK52H - FK5 to Hipparcos">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node108.html">
+<LINK REL="previous" HREF="node106.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node108.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1496" HREF="node108.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1494" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1488" HREF="node106.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1497" HREF="node108.html">SLA_FK54Z - FK5 to FK4, no P.M. or Parallax</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1495" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1489" HREF="node106.html">SLA_FK524 - FK5 to FK4</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000494000000000000000">SLA_FK52H - FK5 to Hipparcos</A>
+<A NAME="xref_SLA_FK52H">&#160;</A><A NAME="SLA_FK52H">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Transform an FK5 (J2000) position and proper motion
+into the frame of the Hipparcos catalogue.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_FK52H (R5,D5,DR5,DD5,RH,DH,DRH,DDH)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>R5</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>J2000.0 FK5 <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$"> (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>D5</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>J2000.0 FK5 <IMG WIDTH="10" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img23.gif"
+ ALT="$\delta$"> (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DR5</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>J2000.0 FK5 proper motion in <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$">(radians per Julian year)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DD5</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>J2000.0 FK5 proper motion in <IMG WIDTH="10" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img23.gif"
+ ALT="$\delta$">(radians per Julian year)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RH</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>Hipparcos <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$"> (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DH</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>Hipparcos <IMG WIDTH="10" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img23.gif"
+ ALT="$\delta$"> (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DRH</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>Hipparcos proper motion in <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$">(radians per Julian year)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DDH</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>Hipparcos proper motion in <IMG WIDTH="10" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img23.gif"
+ ALT="$\delta$">(radians per Julian year)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$"> proper motions are <IMG WIDTH="13" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img115.gif"
+ ALT="$\dot{\alpha}$"> rather than
+<IMG WIDTH="48" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img116.gif"
+ ALT="$\dot{\alpha}\cos\delta$">, and are per year rather than per century.
+<DT>2.
+<DD>The FK5 to Hipparcos
+ transformation consists of a pure rotation and spin;
+ zonal errors in the FK5 catalogue are not taken into account.
+ <DT>3.
+<DD>The adopted epoch J2000.0 FK5 to Hipparcos orientation and spin
+ values are as follows (see reference):
+<P> <BR>
+<BR>
+<BR>
+<P> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <TABLE CELLPADDING=3 BORDER="1">
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP>&nbsp;</TD>
+<TH ALIGN="CENTER" NOWRAP COLSPAN=1><I>orientation</I></TH>
+<TH ALIGN="CENTER" NOWRAP COLSPAN=1><I>&nbsp;&nbsp;&nbsp;spin&nbsp;&nbsp;&nbsp;</I></TH>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP><I>x</I></TD>
+<TD ALIGN="RIGHT" NOWRAP>-19.9&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+<TD ALIGN="RIGHT" NOWRAP>&nbsp;-0.30&nbsp;&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP><I>y</I></TD>
+<TD ALIGN="RIGHT" NOWRAP>-9.1&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+<TD ALIGN="RIGHT" NOWRAP>&nbsp;+0.60&nbsp;&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP><I>z</I></TD>
+<TD ALIGN="RIGHT" NOWRAP>+22.9&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+<TD ALIGN="RIGHT" NOWRAP>&nbsp;+0.70&nbsp;&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP>&nbsp;</TD>
+<TD ALIGN="RIGHT" NOWRAP><I>mas</I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+<TD ALIGN="RIGHT" NOWRAP>&nbsp;<I>mas/y</I>&nbsp;</TD>
+</TR>
+</TABLE>
+<P> <BR>
+<BR>
+<BR>
+<BR>
+<P>
+These orientation and spin components are interpreted as
+ <I>axial vectors.</I> An axial vector points at the pole of
+ the rotation and its length is the amount of rotation in radians.
+ <DT>4.
+<DD>See also sla_FK5HZ, sla_H2FK5, sla_HFK5Z.
+ </DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCE:</STRONG>
+<DD>Feissel, M. &amp; Mignard, F., 1998., <I>Astron.Astrophys.</I> <B>331</B>, L33-L36.
+ </DL>
+<BR> <HR>
+<A NAME="tex2html1496" HREF="node108.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1494" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1488" HREF="node106.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1497" HREF="node108.html">SLA_FK54Z - FK5 to FK4, no P.M. or Parallax</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1495" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1489" HREF="node106.html">SLA_FK524 - FK5 to FK4</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node108.html b/src/slalib/sun67.htx/node108.html
new file mode 100644
index 0000000..504a1a6
--- /dev/null
+++ b/src/slalib/sun67.htx/node108.html
@@ -0,0 +1,156 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_FK54Z - FK5 to FK4, no P.M. or Parallax</TITLE>
+<META NAME="description" CONTENT="SLA_FK54Z - FK5 to FK4, no P.M. or Parallax">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node109.html">
+<LINK REL="previous" HREF="node107.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node109.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1506" HREF="node109.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1504" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1498" HREF="node107.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1507" HREF="node109.html">SLA_FK5HZ - FK5 to Hipparcos, no P.M.</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1505" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1499" HREF="node107.html">SLA_FK52H - FK5 to Hipparcos</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000495000000000000000">SLA_FK54Z - FK5 to FK4, no P.M. or Parallax</A>
+<A NAME="xref_SLA_FK54Z">&#160;</A><A NAME="SLA_FK54Z">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Convert a J2000.0 FK5 star position to B1950.0 FK4 assuming
+FK5 zero proper motion and parallax.
+ This routine converts star positions from the new, IAU&nbsp;1976,
+ FK5, Fricke system to the old, Bessel-Newcomb, FK4 system.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_FK54Z (R2000,D2000,BEPOCH,R1950,D1950,DR1950,DD1950)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>R2000</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>J2000.0 FK5 <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$"> (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>D2000</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>J2000.0 FK5 <IMG WIDTH="10" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img23.gif"
+ ALT="$\delta$"> (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>BEPOCH</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>Besselian epoch (<I>e.g.</I> 1950D0)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>R1950</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>B1950.0 FK4 <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$"> at epoch BEPOCH (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>D1950</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>B1950.0 FK4 <IMG WIDTH="10" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img23.gif"
+ ALT="$\delta$"> at epoch BEPOCH (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DR1950</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>B1950.0 FK4 proper motion in <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$">(radians per tropical year)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DD1950</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>B1950.0 FK4 proper motion in <IMG WIDTH="10" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img23.gif"
+ ALT="$\delta$">(radians per tropical year)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$"> proper motions are <IMG WIDTH="13" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img115.gif"
+ ALT="$\dot{\alpha}$"> rather than
+<IMG WIDTH="48" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img116.gif"
+ ALT="$\dot{\alpha}\cos\delta$">, and are per year rather than per century.
+<DT>2.
+<DD>Conversion from Julian epoch 2000.0 to Besselian epoch 1950.0
+ only is provided for. Conversions involving other epochs will
+ require use of the appropriate precession routines before and
+ after this routine is called.
+ <DT>3.
+<DD>Unlike in the sla_FK524 routine, the FK5 proper motions, the
+ parallax and the radial velocity are presumed zero.
+ <DT>4.
+<DD>It was the intention that FK5 should be a close approximation
+ to an inertial frame, so that distant objects have zero proper
+ motion; such objects have (in general) non-zero proper motion
+ in FK4, and this routine returns those <I>fictitious proper
+ motions</I>.
+ <DT>5.
+<DD>The position returned by this routine is in the B1950
+ reference frame but at Besselian epoch BEPOCH. For
+ comparison with catalogues the BEPOCH argument will
+ frequently be 1950D0.
+ <DT>6.
+<DD>See also sla_FK425, sla_FK45Z, sla_FK524.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1506" HREF="node109.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1504" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1498" HREF="node107.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1507" HREF="node109.html">SLA_FK5HZ - FK5 to Hipparcos, no P.M.</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1505" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1499" HREF="node107.html">SLA_FK52H - FK5 to Hipparcos</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node109.html b/src/slalib/sun67.htx/node109.html
new file mode 100644
index 0000000..ddda44d
--- /dev/null
+++ b/src/slalib/sun67.htx/node109.html
@@ -0,0 +1,168 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_FK5HZ - FK5 to Hipparcos, no P.M.</TITLE>
+<META NAME="description" CONTENT="SLA_FK5HZ - FK5 to Hipparcos, no P.M.">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node110.html">
+<LINK REL="previous" HREF="node108.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node110.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1516" HREF="node110.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1514" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1508" HREF="node108.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1517" HREF="node110.html">SLA_FLOTIN - Decode a Real Number</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1515" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1509" HREF="node108.html">SLA_FK54Z - FK5 to FK4, no P.M. or Parallax</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000496000000000000000">SLA_FK5HZ - FK5 to Hipparcos, no P.M.</A>
+<A NAME="xref_SLA_FK5HZ">&#160;</A><A NAME="SLA_FK5HZ">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Transform an FK5 (J2000) star position into the frame of the
+Hipparcos catalogue, assuming zero Hipparcos proper motion.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_FK52H (R5,D5,EPOCH,RH,DH)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>R5</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>J2000.0 FK5 <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$"> (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>D5</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>J2000.0 FK5 <IMG WIDTH="10" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img23.gif"
+ ALT="$\delta$"> (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>EPOCH</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>Julian epoch (TDB)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RH</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>Hipparcos <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$"> (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DH</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>Hipparcos <IMG WIDTH="10" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img23.gif"
+ ALT="$\delta$"> (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$"> proper motions are <IMG WIDTH="13" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img115.gif"
+ ALT="$\dot{\alpha}$"> rather than
+<IMG WIDTH="48" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img116.gif"
+ ALT="$\dot{\alpha}\cos\delta$">, and are per year rather than per century.
+<DT>2.
+<DD>The FK5 to Hipparcos
+ transformation consists of a pure rotation and spin;
+ zonal errors in the FK5 catalogue are not taken into account.
+ <DT>3.
+<DD>The adopted epoch J2000.0 FK5 to Hipparcos orientation and spin
+ values are as follows (see reference):
+<P> <BR>
+<BR>
+<BR>
+<P> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <TABLE CELLPADDING=3 BORDER="1">
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP>&nbsp;</TD>
+<TH ALIGN="CENTER" NOWRAP COLSPAN=1><I>orientation</I></TH>
+<TH ALIGN="CENTER" NOWRAP COLSPAN=1><I>&nbsp;&nbsp;&nbsp;spin&nbsp;&nbsp;&nbsp;</I></TH>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP><I>x</I></TD>
+<TD ALIGN="RIGHT" NOWRAP>-19.9&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+<TD ALIGN="RIGHT" NOWRAP>&nbsp;-0.30&nbsp;&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP><I>y</I></TD>
+<TD ALIGN="RIGHT" NOWRAP>-9.1&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+<TD ALIGN="RIGHT" NOWRAP>&nbsp;+0.60&nbsp;&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP><I>z</I></TD>
+<TD ALIGN="RIGHT" NOWRAP>+22.9&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+<TD ALIGN="RIGHT" NOWRAP>&nbsp;+0.70&nbsp;&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP>&nbsp;</TD>
+<TD ALIGN="RIGHT" NOWRAP><I>mas</I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+<TD ALIGN="RIGHT" NOWRAP>&nbsp;<I>mas/y</I>&nbsp;</TD>
+</TR>
+</TABLE>
+<P> <BR>
+<BR>
+<BR>
+<BR>
+<P>
+These orientation and spin components are interpreted as
+ <I>axial vectors.</I> An axial vector points at the pole of
+ the rotation and its length is the amount of rotation in radians.
+ <DT>4.
+<DD>See also sla_FK52H, sla_H2FK5, sla_HFK5Z.
+ </DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCE:</STRONG>
+<DD>Feissel, M. &amp; Mignard, F., 1998., <I>Astron.Astrophys.</I> <B>331</B>, L33-L36.
+ </DL>
+<BR> <HR>
+<A NAME="tex2html1516" HREF="node110.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1514" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1508" HREF="node108.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1517" HREF="node110.html">SLA_FLOTIN - Decode a Real Number</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1515" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1509" HREF="node108.html">SLA_FK54Z - FK5 to FK4, no P.M. or Parallax</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node11.html b/src/slalib/sun67.htx/node11.html
new file mode 100644
index 0000000..a950b04
--- /dev/null
+++ b/src/slalib/sun67.htx/node11.html
@@ -0,0 +1,102 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Acknowledgements</TITLE>
+<META NAME="description" CONTENT="Acknowledgements">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="previous" HREF="node10.html">
+<LINK REL="up" HREF="node2.html">
+<LINK REL="next" HREF="node12.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html353" HREF="node12.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html351" HREF="node2.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html347" HREF="node10.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html354" HREF="node12.html">LINKING</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html352" HREF="node2.html">INTRODUCTION</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html348" HREF="node10.html">New Functions</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION00029000000000000000">
+Acknowledgements</A>
+</H2>
+SLALIB is descended from a package of routines written
+for the AAO 16-bit minicomputers
+in the mid-1970s. The coming of the VAX
+allowed a much more comprehensive and thorough package
+to be designed for Starlink, especially important
+at a time when the adoption
+of the IAU 1976 resolutions meant that astronomers
+would have to cope with a mixture of reference frames,
+timescales and nomenclature.
+<P>
+Much of the preparatory work on SLALIB was done by
+Althea&nbsp;Wilkinson of Manchester University.
+During its development,
+Andrew&nbsp;Murray,
+Catherine&nbsp;Hohenkerk,
+Andrew&nbsp;Sinclair,
+Bernard&nbsp;Yallop
+and
+Brian&nbsp;Emerson of Her Majesty's Nautical Almanac Office were consulted
+on many occasions; their advice was indispensable.
+I am especially grateful to
+Catherine&nbsp;Hohenkerk
+for supplying preprints of papers, and test data. A number of
+enhancements to SLALIB were at the suggestion of
+Russell&nbsp;Owen, University of Washington,
+the late Phil&nbsp;Hill, St&nbsp;Andrews University,
+Bill&nbsp;Vacca, JILA, Boulder and
+Ron&nbsp;Maddalena, NRAO.
+Mark&nbsp;Calabretta, CSIRO Radiophysics, Sydney supplied changes to suit Convex.
+I am indebted to Derek&nbsp;Jones (RGO) for introducing me to the
+``universal variables'' method of calculating orbits.
+<P>
+The first C version of SLALIB was a hand-coded transcription
+of the Starlink Fortran version carried out by
+Steve&nbsp;Eaton (University of Leeds) in the course of
+MSc work. This was later
+enhanced by John&nbsp;Straede (AAO) and Martin&nbsp;Shepherd (Caltech).
+The current C SLALIB is a complete rewrite by the present author and
+includes a comprehensive validation suite.
+Additional comments on the C version came from Bob&nbsp;Payne (NRAO) and
+Jeremy&nbsp;Bailey (AAO).
+<P>
+<BR> <HR>
+<A NAME="tex2html353" HREF="node12.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html351" HREF="node2.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html347" HREF="node10.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html354" HREF="node12.html">LINKING</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html352" HREF="node2.html">INTRODUCTION</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html348" HREF="node10.html">New Functions</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node110.html b/src/slalib/sun67.htx/node110.html
new file mode 100644
index 0000000..c13c949
--- /dev/null
+++ b/src/slalib/sun67.htx/node110.html
@@ -0,0 +1,200 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_FLOTIN - Decode a Real Number</TITLE>
+<META NAME="description" CONTENT="SLA_FLOTIN - Decode a Real Number">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node111.html">
+<LINK REL="previous" HREF="node109.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node111.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1526" HREF="node111.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1524" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1518" HREF="node109.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1527" HREF="node111.html">SLA_GALEQ - Galactic to J2000</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1525" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1519" HREF="node109.html">SLA_FK5HZ - FK5 to Hipparcos, no P.M.</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000497000000000000000">SLA_FLOTIN - Decode a Real Number</A>
+<A NAME="xref_SLA_FLOTIN">&#160;</A><A NAME="SLA_FLOTIN">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Convert free-format input into single precision floating point.
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_FLOTIN (STRING, NSTRT, RESLT, JFLAG)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>STRING</EM></TD>
+<TH ALIGN="LEFT"><B>C</B></TH>
+<TD ALIGN="LEFT" NOWRAP>string containing number to be decoded</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>NSTRT</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>pointer to where decoding is to commence</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RESLT</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>current value of result</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>NSTRT</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>advanced to next number</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RESLT</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>result</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>JFLAG</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>status: -1&nbsp;=&nbsp;-OK, 0&nbsp;=&nbsp;+OK, 1&nbsp;=&nbsp;null result, 2&nbsp;=&nbsp;error</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The reason sla_FLOTIN has separate `OK' status values
+for + and - is to enable minus zero to be detected.
+This is of crucial importance
+ when decoding mixed-radix numbers. For example, an angle
+ expressed as degrees, arcminutes and arcseconds may have a
+ leading minus sign but a zero degrees field.
+ <DT>2.
+<DD>A TAB is interpreted as a space, and lowercase characters are
+ interpreted as uppercase. <I>n.b.</I> The test for TAB is
+ ASCII-specific.
+ <DT>3.
+<DD>The basic format is the sequence of fields <IMG WIDTH="78" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img68.gif"
+ ALT="$\pm n.n x \pm n$">, where <IMG WIDTH="15" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img30.gif"
+ ALT="$\pm$"> is a sign
+ character `+' or `-', <I>n</I> means a string of decimal digits,
+ `.' is a decimal point, and <I>x</I>, which indicates an exponent,
+ means `D' or `E'. Various combinations of these fields can be
+ omitted, and embedded blanks are permissible in certain places.
+ <DT>4.
+<DD>Spaces:
+ <UL>
+<LI> Leading spaces are ignored.
+<LI> Embedded spaces are allowed only after +, -, D or E,
+ and after the decimal point if the first sequence of
+ digits is absent.
+<LI> Trailing spaces are ignored; the first signifies
+ end of decoding and subsequent ones are skipped.
+ </UL>
+ <DT>5.
+<DD>Delimiters:
+ <UL>
+<LI> Any character other than +,-,0-9,.,D,E or space may be
+ used to signal the end of the number and terminate decoding.
+<LI> Comma is recognized by sla_FLOTIN as a special case; it
+ is skipped, leaving the pointer on the next character. See
+ 13, below.
+<LI> Decoding will in all cases terminate if end of string
+ is reached.
+ </UL>
+ <DT>6.
+<DD>Both signs are optional. The default is +.
+ <DT>7.
+<DD>The mantissa <I>n</I>.<I>n</I> defaults to unity.
+ <DT>8.
+<DD>The exponent <IMG WIDTH="36" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img69.gif"
+ ALT="$x\!\pm\!n$"> defaults to `E0'.
+ <DT>9.
+<DD>The strings of decimal digits may be of any length.
+ <DT>10.
+<DD>The decimal point is optional for whole numbers.
+ <DT>11.
+<DD>A <I>null result</I> occurs when the string of characters
+ being decoded does not begin with +,-,0-9,.,D or E, or
+ consists entirely of spaces. When this condition is
+ detected, JFLAG is set to 1 and RESLT is left untouched.
+ <DT>12.
+<DD>NSTRT = 1 for the first character in the string.
+ <DT>13.
+<DD>On return from sla_FLOTIN, NSTRT is set ready for the next
+ decode - following trailing blanks and any comma. If a
+ delimiter other than comma is being used, NSTRT must be
+ incremented before the next call to sla_FLOTIN, otherwise
+ all subsequent calls will return a null result.
+ <DT>14.
+<DD>Errors (JFLAG=2) occur when:
+ <UL>
+<LI> a +, -, D or E is left unsatisfied; or
+<LI> the decimal point is present without at least
+ one decimal digit before or after it; or
+<LI> an exponent more than 100 has been presented.
+ </UL>
+ <DT>15.
+<DD>When an error has been detected, NSTRT is left
+ pointing to the character following the last
+ one used before the error came to light. This
+ may be after the point at which a more sophisticated
+ program could have detected the error. For example,
+ sla_FLOTIN does not detect that `1E999' is unacceptable
+ (on a computer where this is so)
+ until the entire number has been decoded.
+ <DT>16.
+<DD>Certain highly unlikely combinations of mantissa and
+ exponent can cause arithmetic faults during the
+ decode, in some cases despite the fact that they
+ together could be construed as a valid number.
+ <DT>17.
+<DD>Decoding is left to right, one pass.
+ <DT>18.
+<DD>See also sla_DFLTIN and sla_INTIN.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1526" HREF="node111.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1524" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1518" HREF="node109.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1527" HREF="node111.html">SLA_GALEQ - Galactic to J2000</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1525" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1519" HREF="node109.html">SLA_FK5HZ - FK5 to Hipparcos, no P.M.</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node111.html b/src/slalib/sun67.htx/node111.html
new file mode 100644
index 0000000..6e7927c
--- /dev/null
+++ b/src/slalib/sun67.htx/node111.html
@@ -0,0 +1,104 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_GALEQ - Galactic to J2000 </TITLE>
+<META NAME="description" CONTENT="SLA_GALEQ - Galactic to J2000 ">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node112.html">
+<LINK REL="previous" HREF="node110.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node112.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1536" HREF="node112.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1534" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1528" HREF="node110.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1537" HREF="node112.html">SLA_GALSUP - Galactic to Supergalactic</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1535" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1529" HREF="node110.html">SLA_FLOTIN - Decode a Real Number</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000498000000000000000">&#160;</A><A NAME="xref_SLA_GALEQ">&#160;</A><A NAME="SLA_GALEQ">&#160;</A>
+<BR>
+SLA_GALEQ - Galactic to J2000 <IMG WIDTH="28" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img91.gif"
+ ALT="$\alpha,\delta$"></H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Transformation from IAU 1958 galactic coordinates
+to J2000.0 FK5 equatorial coordinates.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_GALEQ (DL, DB, DR, DD)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DL,DB</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>galactic longitude and latitude <IMG WIDTH="59" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
+ SRC="img98.gif"
+ ALT="$[\,l^{I\!I},b^{I\!I}\,]$"></TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DR,DD</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>J2000.0 <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"></TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>All arguments are in radians.
+<DT>2.
+<DD>The equatorial coordinates are J2000.0 FK5. Use the routine
+sla_GE50 if conversion to B1950.0 FK4 coordinates is
+ required.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1536" HREF="node112.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1534" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1528" HREF="node110.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1537" HREF="node112.html">SLA_GALSUP - Galactic to Supergalactic</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1535" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1529" HREF="node110.html">SLA_FLOTIN - Decode a Real Number</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node112.html b/src/slalib/sun67.htx/node112.html
new file mode 100644
index 0000000..cfbdd9b
--- /dev/null
+++ b/src/slalib/sun67.htx/node112.html
@@ -0,0 +1,107 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_GALSUP - Galactic to Supergalactic</TITLE>
+<META NAME="description" CONTENT="SLA_GALSUP - Galactic to Supergalactic">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node113.html">
+<LINK REL="previous" HREF="node111.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node113.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1546" HREF="node113.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1544" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1538" HREF="node111.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1547" HREF="node113.html">SLA_GE50 - Galactic to B1950</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1545" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1539" HREF="node111.html">SLA_GALEQ - Galactic to J2000</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000499000000000000000">SLA_GALSUP - Galactic to Supergalactic</A>
+<A NAME="xref_SLA_GALSUP">&#160;</A><A NAME="SLA_GALSUP">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Transformation from IAU 1958 galactic coordinates to
+de Vaucouleurs supergalactic coordinates.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_GALSUP (DL, DB, DSL, DSB)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DL,DB</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>galactic longitude and latitude <IMG WIDTH="59" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
+ SRC="img98.gif"
+ ALT="$[\,l^{I\!I},b^{I\!I}\,]$"> (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DSL,DSB</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>supergalactic longitude and latitude (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>REFERENCES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>de Vaucouleurs, de Vaucouleurs, &amp; Corwin, <I>Second Reference
+Catalogue of Bright Galaxies</I>, U.Texas, p8.
+<DT>2.
+<DD>Systems &amp; Applied Sciences Corp., documentation for the
+ machine-readable version of the above catalogue,
+ Contract NAS 5-26490.
+ </DL>
+ (These two references give different values for the galactic
+ longitude of the supergalactic origin. Both are wrong; the
+ correct value is <IMG WIDTH="86" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img119.gif"
+ ALT="$l^{I\!I}=137.37$">.)
+<P> </DL>
+<BR> <HR>
+<A NAME="tex2html1546" HREF="node113.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1544" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1538" HREF="node111.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1547" HREF="node113.html">SLA_GE50 - Galactic to B1950</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1545" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1539" HREF="node111.html">SLA_GALEQ - Galactic to J2000</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node113.html b/src/slalib/sun67.htx/node113.html
new file mode 100644
index 0000000..e12bf51
--- /dev/null
+++ b/src/slalib/sun67.htx/node113.html
@@ -0,0 +1,109 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_GE50 - Galactic to B1950 </TITLE>
+<META NAME="description" CONTENT="SLA_GE50 - Galactic to B1950 ">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node114.html">
+<LINK REL="previous" HREF="node112.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node114.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1556" HREF="node114.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1554" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1548" HREF="node112.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1557" HREF="node114.html">SLA_GEOC - Geodetic to Geocentric</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1555" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1549" HREF="node112.html">SLA_GALSUP - Galactic to Supergalactic</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004100000000000000000">&#160;</A><A NAME="xref_SLA_GE50">&#160;</A><A NAME="SLA_GE50">&#160;</A>
+<BR>
+SLA_GE50 - Galactic to B1950 <IMG WIDTH="28" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img91.gif"
+ ALT="$\alpha,\delta$"></H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Transformation from IAU 1958 galactic coordinates to
+B1950.0 FK4 equatorial coordinates.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_GE50 (DL, DB, DR, DD)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DL,DB</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>galactic longitude and latitude <IMG WIDTH="59" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
+ SRC="img98.gif"
+ ALT="$[\,l^{I\!I},b^{I\!I}\,]$"></TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DR,DD</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>B1950.0 <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"></TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>All arguments are in radians.
+<DT>2.
+<DD>The equatorial coordinates are B1950.0 FK4. Use the
+routine sla_GALEQ if conversion to J2000.0 FK5 coordinates
+ is required.
+ </DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCE:</STRONG>
+<DD>Blaauw <I>et al.</I>, 1960, <I>Mon.Not.R.astr.Soc.</I>,
+<B>121</B>, 123.
+ </DL>
+<BR> <HR>
+<A NAME="tex2html1556" HREF="node114.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1554" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1548" HREF="node112.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1557" HREF="node114.html">SLA_GEOC - Geodetic to Geocentric</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1555" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1549" HREF="node112.html">SLA_GALSUP - Galactic to Supergalactic</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node114.html b/src/slalib/sun67.htx/node114.html
new file mode 100644
index 0000000..a2e570a
--- /dev/null
+++ b/src/slalib/sun67.htx/node114.html
@@ -0,0 +1,107 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_GEOC - Geodetic to Geocentric</TITLE>
+<META NAME="description" CONTENT="SLA_GEOC - Geodetic to Geocentric">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node115.html">
+<LINK REL="previous" HREF="node113.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node115.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1566" HREF="node115.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1564" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1558" HREF="node113.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1567" HREF="node115.html">SLA_GMST - UT to GMST</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1565" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1559" HREF="node113.html">SLA_GE50 - Galactic to B1950</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004101000000000000000">SLA_GEOC - Geodetic to Geocentric</A>
+<A NAME="xref_SLA_GEOC">&#160;</A><A NAME="SLA_GEOC">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Convert geodetic position to geocentric.
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_GEOC (P, H, R, Z)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>P</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>latitude (geodetic, radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>H</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>height above reference spheroid (geodetic, metres)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>R</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>distance from Earth axis (AU)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>Z</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>distance from plane of Earth equator (AU)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>Geocentric latitude can be obtained by evaluating <TT>ATAN2(Z,R)</TT>.
+<DT>2.
+<DD>IAU 1976 constants are used.
+</DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCE:</STRONG>
+<DD>Green, R.M., 1985. <I>Spherical Astronomy</I>, Cambridge U.P., p98.
+</DL>
+<BR> <HR>
+<A NAME="tex2html1566" HREF="node115.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1564" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1558" HREF="node113.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1567" HREF="node115.html">SLA_GMST - UT to GMST</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1565" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1559" HREF="node113.html">SLA_GE50 - Galactic to B1950</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node115.html b/src/slalib/sun67.htx/node115.html
new file mode 100644
index 0000000..cee01cc
--- /dev/null
+++ b/src/slalib/sun67.htx/node115.html
@@ -0,0 +1,115 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_GMST - UT to GMST</TITLE>
+<META NAME="description" CONTENT="SLA_GMST - UT to GMST">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node116.html">
+<LINK REL="previous" HREF="node114.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node116.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1576" HREF="node116.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1574" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1568" HREF="node114.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1577" HREF="node116.html">SLA_GMSTA - UT to GMST (extra precision)</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1575" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1569" HREF="node114.html">SLA_GEOC - Geodetic to Geocentric</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004102000000000000000">SLA_GMST - UT to GMST</A>
+<A NAME="xref_SLA_GMST">&#160;</A><A NAME="SLA_GMST">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Conversion from universal time UT1 to Greenwich mean
+sidereal time.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>D&nbsp;=&nbsp;sla_GMST (UT1)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>UT1</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>universal time (strictly UT1) expressed as
+modified Julian Date (JD-2400000.5)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>sla_GMST</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>Greenwich mean sidereal time (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The IAU&nbsp;1982 expression
+(see page&nbsp;S15 of the 1984 <I>Astronomical
+Almanac</I>) is used, but rearranged to reduce rounding errors. This
+ expression is always described as giving the GMST at <IMG WIDTH="18" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img49.gif"
+ ALT="$0^{\rm h}$">UT;
+ in fact, it gives the difference between the
+ GMST and the UT, which happens to equal the GMST (modulo
+ 24&nbsp;hours) at <IMG WIDTH="18" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img49.gif"
+ ALT="$0^{\rm h}$">UT each day. In sla_GMST, the
+ entire UT is used directly as the argument for the
+ canonical formula, and the fractional part of the UT is
+ added separately; note that the factor <IMG WIDTH="94" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img120.gif"
+ ALT="$1.0027379\cdots$"> does
+ not appear.
+ <DT>2.
+<DD>See also the routine sla_GMSTA, which
+ delivers better numerical
+ precision by accepting the UT date and time as separate arguments.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1576" HREF="node116.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1574" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1568" HREF="node114.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1577" HREF="node116.html">SLA_GMSTA - UT to GMST (extra precision)</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1575" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1569" HREF="node114.html">SLA_GEOC - Geodetic to Geocentric</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node116.html b/src/slalib/sun67.htx/node116.html
new file mode 100644
index 0000000..5055ecb
--- /dev/null
+++ b/src/slalib/sun67.htx/node116.html
@@ -0,0 +1,116 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_GMSTA - UT to GMST (extra precision)</TITLE>
+<META NAME="description" CONTENT="SLA_GMSTA - UT to GMST (extra precision)">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node117.html">
+<LINK REL="previous" HREF="node115.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node117.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1586" HREF="node117.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1584" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1578" HREF="node115.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1587" HREF="node117.html">SLA_GRESID - Gaussian Residual</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1585" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1579" HREF="node115.html">SLA_GMST - UT to GMST</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004103000000000000000">SLA_GMSTA - UT to GMST (extra precision)</A>
+<A NAME="xref_SLA_GMSTA">&#160;</A><A NAME="SLA_GMSTA">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Conversion from universal time UT1 to Greenwich Mean
+sidereal time, with rounding errors minimized.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>D&nbsp;=&nbsp;sla_GMSTA (DATE, UT1)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DATE</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>UT1 date as Modified Julian Date (integer part
+of JD-2400000.5)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>UT1</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>UT1 time (fraction of a day)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>sla_GMST</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>Greenwich mean sidereal time (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The algorithm is derived from the IAU 1982 expression
+(see page&nbsp;S15 of the 1984 Astronomical Almanac).
+<DT>2.
+<DD>There is no restriction on how the UT is apportioned between the
+ DATE and UT1 arguments. Either of the two arguments could, for
+ example, be zero and the entire date+time supplied in the other.
+ However, the routine is designed to deliver maximum accuracy when
+ the DATE argument is a whole number and the UT1 argument
+ lies in the range <IMG WIDTH="43" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img121.gif"
+ ALT="$[\,0,\,1\,]$">, or <I>vice versa</I>.
+ <DT>3.
+<DD>See also the routine sla_GMST, which accepts the UT1 as a single
+ argument. Compared with sla_GMST, the extra numerical precision
+ delivered by the present routine is unlikely to be important in
+ an absolute sense, but may be useful when critically comparing
+ algorithms and in applications where two sidereal times close
+ together are differenced.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1586" HREF="node117.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1584" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1578" HREF="node115.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1587" HREF="node117.html">SLA_GRESID - Gaussian Residual</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1585" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1579" HREF="node115.html">SLA_GMST - UT to GMST</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node117.html b/src/slalib/sun67.htx/node117.html
new file mode 100644
index 0000000..980f93a
--- /dev/null
+++ b/src/slalib/sun67.htx/node117.html
@@ -0,0 +1,92 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_GRESID - Gaussian Residual</TITLE>
+<META NAME="description" CONTENT="SLA_GRESID - Gaussian Residual">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node118.html">
+<LINK REL="previous" HREF="node116.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node118.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1596" HREF="node118.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1594" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1588" HREF="node116.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1597" HREF="node118.html">SLA_H2E - Az,El to</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1595" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1589" HREF="node116.html">SLA_GMSTA - UT to GMST (extra precision)</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004104000000000000000">SLA_GRESID - Gaussian Residual</A>
+<A NAME="xref_SLA_GRESID">&#160;</A><A NAME="SLA_GRESID">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Generate pseudo-random normal deviate or <I>Gaussian residual</I>.
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>R&nbsp;=&nbsp;sla_GRESID (S)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>S</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>standard deviation</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The results of many calls to this routine will be
+normally distributed with mean zero and standard deviation S.
+<DT>2.
+<DD>The Box-Muller algorithm is used.
+ <DT>3.
+<DD>The implementation is machine-dependent.
+ </DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCE:</STRONG>
+<DD>Ahrens &amp; Dieter, 1972. <I>Comm.A.C.M.</I> <B>15</B>, 873.
+</DL>
+<BR> <HR>
+<A NAME="tex2html1596" HREF="node118.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1594" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1588" HREF="node116.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1597" HREF="node118.html">SLA_H2E - Az,El to</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1595" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1589" HREF="node116.html">SLA_GMSTA - UT to GMST (extra precision)</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node118.html b/src/slalib/sun67.htx/node118.html
new file mode 100644
index 0000000..83df4b3
--- /dev/null
+++ b/src/slalib/sun67.htx/node118.html
@@ -0,0 +1,146 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_H2E - Az,El to </TITLE>
+<META NAME="description" CONTENT="SLA_H2E - Az,El to ">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node119.html">
+<LINK REL="previous" HREF="node117.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node119.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1606" HREF="node119.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1604" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1598" HREF="node117.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1607" HREF="node119.html">SLA_H2FK5 - Hipparcos to FK5</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1605" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1599" HREF="node117.html">SLA_GRESID - Gaussian Residual</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004105000000000000000">&#160;</A><A NAME="xref_SLA_H2E">&#160;</A><A NAME="SLA_H2E">&#160;</A>
+<BR>
+SLA_H2E - Az,El to <IMG WIDTH="27" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img65.gif"
+ ALT="$h,\delta$"></H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Horizon to equatorial coordinates
+(single precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_H2E (AZ, EL, PHI, HA, DEC)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>AZ</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>azimuth (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>EL</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>elevation (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PHI</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>latitude (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>HA</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>hour angle (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DEC</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>declination (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The sign convention for azimuth is north zero, east <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img14.gif"
+ ALT="$+\pi/2$">.<DT>2.
+<DD>HA is returned in the range <IMG WIDTH="25" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img47.gif"
+ ALT="$\pm \pi$">. Declination is returned
+in the range <IMG WIDTH="25" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img47.gif"
+ ALT="$\pm \pi$">. <DT>3.
+<DD>The latitude is (in principle) geodetic. In critical
+ applications, corrections for polar motion should be applied
+ (see sla_POLMO).
+ <DT>4.
+<DD>In some applications it will be important to specify the
+ correct type of elevation in order to produce the required
+ type of <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$">. In particular, it may be important to
+ distinguish between the elevation as affected by refraction,
+ which will yield the <I>observed</I> <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$">, and the elevation
+ <I>in vacuo</I>, which will yield the <I>topocentric</I>
+ <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$">. If the
+ effects of diurnal aberration can be neglected, the
+ topocentric <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$"> may be used as an approximation to the
+ <I>apparent</I> <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$">. <DT>5.
+<DD>No range checking of arguments is carried out.
+ <DT>6.
+<DD>In applications which involve many such calculations, rather
+ than calling the present routine it will be more efficient to
+ use inline code, having previously computed fixed terms such
+ as sine and cosine of latitude.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1606" HREF="node119.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1604" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1598" HREF="node117.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1607" HREF="node119.html">SLA_H2FK5 - Hipparcos to FK5</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1605" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1599" HREF="node117.html">SLA_GRESID - Gaussian Residual</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node119.html b/src/slalib/sun67.htx/node119.html
new file mode 100644
index 0000000..9133db9
--- /dev/null
+++ b/src/slalib/sun67.htx/node119.html
@@ -0,0 +1,188 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_H2FK5 - Hipparcos to FK5</TITLE>
+<META NAME="description" CONTENT="SLA_H2FK5 - Hipparcos to FK5">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node120.html">
+<LINK REL="previous" HREF="node118.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node120.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1616" HREF="node120.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1614" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1608" HREF="node118.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1617" HREF="node120.html">SLA_HFK5Z - Hipparcos to FK5, no P.M.</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1615" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1609" HREF="node118.html">SLA_H2E - Az,El to</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004106000000000000000">SLA_H2FK5 - Hipparcos to FK5</A>
+<A NAME="xref_SLA_H2FK5">&#160;</A><A NAME="SLA_H2FK5">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Transform a Hipparcos star position and proper motion
+into the FK5 (J2000) frame.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_H2FK5 (RH,DH,DRH,DDH,R5,D5,DR5,DD5)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RH</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>Hipparcos <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$"> (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DH</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>Hipparcos <IMG WIDTH="10" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img23.gif"
+ ALT="$\delta$"> (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DRH</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>Hipparcos proper motion in <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$">(radians per Julian year)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DDH</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>Hipparcos proper motion in <IMG WIDTH="10" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img23.gif"
+ ALT="$\delta$">(radians per Julian year)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>R5</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>J2000.0 FK5 <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$"> (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>D5</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>J2000.0 FK5 <IMG WIDTH="10" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img23.gif"
+ ALT="$\delta$"> (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DR5</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>J2000.0 FK5 proper motion in <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$">(radians per Julian year)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DD5</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>FK5 J2000.0 proper motion in <IMG WIDTH="10" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img23.gif"
+ ALT="$\delta$">(radians per Julian year)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$"> proper motions are <IMG WIDTH="13" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img115.gif"
+ ALT="$\dot{\alpha}$"> rather than
+<IMG WIDTH="48" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img116.gif"
+ ALT="$\dot{\alpha}\cos\delta$">, and are per year rather than per century.
+<DT>2.
+<DD>The FK5 to Hipparcos
+ transformation consists of a pure rotation and spin;
+ zonal errors in the FK5 catalogue are not taken into account.
+ <DT>3.
+<DD>The adopted epoch J2000.0 FK5 to Hipparcos orientation and spin
+ values are as follows (see reference):
+<P> <BR>
+<BR>
+<BR>
+<P> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <TABLE CELLPADDING=3 BORDER="1">
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP>&nbsp;</TD>
+<TH ALIGN="CENTER" NOWRAP COLSPAN=1><I>orientation</I></TH>
+<TH ALIGN="CENTER" NOWRAP COLSPAN=1><I>&nbsp;&nbsp;&nbsp;spin&nbsp;&nbsp;&nbsp;</I></TH>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP><I>x</I></TD>
+<TD ALIGN="RIGHT" NOWRAP>-19.9&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+<TD ALIGN="RIGHT" NOWRAP>&nbsp;-0.30&nbsp;&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP><I>y</I></TD>
+<TD ALIGN="RIGHT" NOWRAP>-9.1&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+<TD ALIGN="RIGHT" NOWRAP>&nbsp;+0.60&nbsp;&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP><I>z</I></TD>
+<TD ALIGN="RIGHT" NOWRAP>+22.9&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+<TD ALIGN="RIGHT" NOWRAP>&nbsp;+0.70&nbsp;&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP>&nbsp;</TD>
+<TD ALIGN="RIGHT" NOWRAP><I>mas</I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+<TD ALIGN="RIGHT" NOWRAP>&nbsp;<I>mas/y</I>&nbsp;</TD>
+</TR>
+</TABLE>
+<P> <BR>
+<BR>
+<BR>
+<BR>
+<P>
+These orientation and spin components are interpreted as
+ <I>axial vectors.</I> An axial vector points at the pole of
+ the rotation and its length is the amount of rotation in radians.
+ <DT>4.
+<DD>See also sla_FK52H, sla_FK5HZ, sla_HFK5Z.
+ </DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCE:</STRONG>
+<DD>Feissel, M. &amp; Mignard, F., 1998., <I>Astron.Astrophys.</I> <B>331</B>, L33-L36.
+ </DL>
+<BR> <HR>
+<A NAME="tex2html1616" HREF="node120.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1614" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1608" HREF="node118.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1617" HREF="node120.html">SLA_HFK5Z - Hipparcos to FK5, no P.M.</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1615" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1609" HREF="node118.html">SLA_H2E - Az,El to</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node12.html b/src/slalib/sun67.htx/node12.html
new file mode 100644
index 0000000..d75415d
--- /dev/null
+++ b/src/slalib/sun67.htx/node12.html
@@ -0,0 +1,75 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>LINKING</TITLE>
+<META NAME="description" CONTENT="LINKING">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node13.html">
+<LINK REL="previous" HREF="node2.html">
+<LINK REL="up" HREF="sun67.html">
+<LINK REL="next" HREF="node13.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html363" HREF="node13.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html361" HREF="sun67.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html355" HREF="node11.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html364" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html362" HREF="sun67.html">SLALIB Positional Astronomy Library</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html356" HREF="node11.html">Acknowledgements</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H1><A NAME="SECTION00030000000000000000">
+LINKING</A>
+</H1>
+<P>
+On Unix systems (Sun, DEC Alpha <I>etc.</I>):
+<BLOCKQUOTE><TT>%&nbsp;&nbsp;f77 progname.o -L/star/lib `sla_link` -o progname</TT>
+</BLOCKQUOTE>
+(The above assumes that all Starlink directories have been added to
+the <TT>LD_LIBRARY_PATH</TT> and <TT>PATH</TT> environment variables
+as described in SUN/202.)
+<P>
+On VAX/VMS:
+<BLOCKQUOTE><TT>$&nbsp;&nbsp;LINK progname,SLALIB_DIR:SLALIB/LIB</TT>
+</BLOCKQUOTE>
+<P>
+<BR>
+<P>
+<BR> <HR>
+<A NAME="tex2html363" HREF="node13.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html361" HREF="sun67.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html355" HREF="node11.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html364" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html362" HREF="sun67.html">SLALIB Positional Astronomy Library</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html356" HREF="node11.html">Acknowledgements</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node120.html b/src/slalib/sun67.htx/node120.html
new file mode 100644
index 0000000..ffd038a
--- /dev/null
+++ b/src/slalib/sun67.htx/node120.html
@@ -0,0 +1,190 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_HFK5Z - Hipparcos to FK5, no P.M.</TITLE>
+<META NAME="description" CONTENT="SLA_HFK5Z - Hipparcos to FK5, no P.M.">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node121.html">
+<LINK REL="previous" HREF="node119.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node121.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1626" HREF="node121.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1624" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1618" HREF="node119.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1627" HREF="node121.html">SLA_IMXV - Apply 3D Reverse Rotation</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1625" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1619" HREF="node119.html">SLA_H2FK5 - Hipparcos to FK5</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004107000000000000000">SLA_HFK5Z - Hipparcos to FK5, no P.M.</A>
+<A NAME="xref_SLA_HFK5Z">&#160;</A><A NAME="SLA_HFK5Z">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Transform a Hipparcos star position
+into the FK5 (J2000) frame assuming zero Hipparcos proper motion.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_HFK5Z (RH,DH,EPOCH,R5,D5,DR5,DD5)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RH</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>Hipparcos <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$"> (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DH</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>Hipparcos <IMG WIDTH="10" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img23.gif"
+ ALT="$\delta$"> (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>EPOCH</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>Julian epoch (TDB)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>R5</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>J2000.0 FK5 <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$"> (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>D5</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>J2000.0 FK5 <IMG WIDTH="10" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img23.gif"
+ ALT="$\delta$"> (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DR5</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>J2000.0 FK5 proper motion in <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$">(radians per Julian year)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DD5</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>FK5 J2000.0 proper motion in <IMG WIDTH="10" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img23.gif"
+ ALT="$\delta$">(radians per Julian year)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$"> proper motions are <IMG WIDTH="13" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img115.gif"
+ ALT="$\dot{\alpha}$"> rather than
+<IMG WIDTH="48" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img116.gif"
+ ALT="$\dot{\alpha}\cos\delta$">, and are per year rather than per century.
+<DT>2.
+<DD>The FK5 to Hipparcos
+ transformation consists of a pure rotation and spin;
+ zonal errors in the FK5 catalogue are not taken into account.
+ <DT>3.
+<DD>The adopted epoch J2000.0 FK5 to Hipparcos orientation and spin
+ values are as follows (see reference):
+<P> <BR>
+<BR>
+<BR>
+<P> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <TABLE CELLPADDING=3 BORDER="1">
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP>&nbsp;</TD>
+<TH ALIGN="CENTER" NOWRAP COLSPAN=1><I>orientation</I></TH>
+<TH ALIGN="CENTER" NOWRAP COLSPAN=1><I>&nbsp;&nbsp;&nbsp;spin&nbsp;&nbsp;&nbsp;</I></TH>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP><I>x</I></TD>
+<TD ALIGN="RIGHT" NOWRAP>-19.9&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+<TD ALIGN="RIGHT" NOWRAP>&nbsp;-0.30&nbsp;&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP><I>y</I></TD>
+<TD ALIGN="RIGHT" NOWRAP>-9.1&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+<TD ALIGN="RIGHT" NOWRAP>&nbsp;+0.60&nbsp;&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP><I>z</I></TD>
+<TD ALIGN="RIGHT" NOWRAP>+22.9&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+<TD ALIGN="RIGHT" NOWRAP>&nbsp;+0.70&nbsp;&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP>&nbsp;</TD>
+<TD ALIGN="RIGHT" NOWRAP><I>mas</I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+<TD ALIGN="RIGHT" NOWRAP>&nbsp;<I>mas/y</I>&nbsp;</TD>
+</TR>
+</TABLE>
+<P> <BR>
+<BR>
+<BR>
+<BR>
+<P>
+These orientation and spin components are interpreted as
+ <I>axial vectors.</I> An axial vector points at the pole of
+ the rotation and its length is the amount of rotation in radians.
+ The order of the rotations, which are very small,
+ <DT>4.
+<DD>It was the intention that Hipparcos should be a close
+ approximation to an inertial frame, so that distant objects
+ have zero proper motion; such objects have (in general)
+ non-zero proper motion in FK5, and this routine returns those
+ <I>fictitious proper motions.</I>
+ <DT>5.
+<DD>The position returned by this routine is in the FK5 J2000
+ reference frame but at Julian epoch EPOCH.
+ <DT>6.
+<DD>See also sla_FK52H, sla_FK5HZ, sla_H2FK5.
+ </DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCE:</STRONG>
+<DD>Feissel, M. &amp; Mignard, F., 1998., <I>Astron.Astrophys.</I> <B>331</B>, L33-L36.
+ </DL>
+<BR> <HR>
+<A NAME="tex2html1626" HREF="node121.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1624" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1618" HREF="node119.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1627" HREF="node121.html">SLA_IMXV - Apply 3D Reverse Rotation</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1625" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1619" HREF="node119.html">SLA_H2FK5 - Hipparcos to FK5</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node121.html b/src/slalib/sun67.htx/node121.html
new file mode 100644
index 0000000..68ace5b
--- /dev/null
+++ b/src/slalib/sun67.htx/node121.html
@@ -0,0 +1,118 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_IMXV - Apply 3D Reverse Rotation</TITLE>
+<META NAME="description" CONTENT="SLA_IMXV - Apply 3D Reverse Rotation">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node122.html">
+<LINK REL="previous" HREF="node120.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node122.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1636" HREF="node122.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1634" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1628" HREF="node120.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1637" HREF="node122.html">SLA_INTIN - Decode an Integer Number</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1635" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1629" HREF="node120.html">SLA_HFK5Z - Hipparcos to FK5, no P.M.</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004108000000000000000">SLA_IMXV - Apply 3D Reverse Rotation</A>
+<A NAME="xref_SLA_IMXV">&#160;</A><A NAME="SLA_IMXV">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Multiply a 3-vector by the inverse of a rotation
+matrix (single precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_IMXV (RM, VA, VB)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RM</EM></TD>
+<TH ALIGN="LEFT"><B>R(3,3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>rotation matrix</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>VA</EM></TD>
+<TD ALIGN="LEFT"><B>R(3)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>vector to be rotated</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>VB</EM></TD>
+<TH ALIGN="LEFT"><B>R(3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>result vector</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>This routine performs the operation:
+<BLOCKQUOTE><B>b</B> = <B>M</B><IMG WIDTH="17" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img70.gif"
+ ALT="$^{T}\cdot$"><B>a</B>
+</BLOCKQUOTE>
+ where <B>a</B> and <B>b</B> are the 3-vectors VA and VB
+ respectively, and <B>M</B> is the <IMG WIDTH="39" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img18.gif"
+ ALT="$3\times3$"> matrix RM.
+ <DT>2.
+<DD>The main function of this routine is apply an inverse
+ rotation; under these circumstances, <IMG WIDTH="20" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img122.gif"
+ ALT="${\bf M}$"> is
+ <I>orthogonal</I>, with its inverse the same as its transpose.
+ <DT>3.
+<DD>To comply with the ANSI Fortran 77 standard, VA and VB must
+ <B>not</B> be the same array. The routine is, in fact, coded
+ so as to work properly on the VAX and many other systems even
+ if this rule is violated, something that is <B>not</B>, however,
+ recommended.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1636" HREF="node122.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1634" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1628" HREF="node120.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1637" HREF="node122.html">SLA_INTIN - Decode an Integer Number</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1635" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1629" HREF="node120.html">SLA_HFK5Z - Hipparcos to FK5, no P.M.</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node122.html b/src/slalib/sun67.htx/node122.html
new file mode 100644
index 0000000..b06d5d3
--- /dev/null
+++ b/src/slalib/sun67.htx/node122.html
@@ -0,0 +1,170 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_INTIN - Decode an Integer Number</TITLE>
+<META NAME="description" CONTENT="SLA_INTIN - Decode an Integer Number">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node123.html">
+<LINK REL="previous" HREF="node121.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node123.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1646" HREF="node123.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1644" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1638" HREF="node121.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1647" HREF="node123.html">SLA_INVF - Invert Linear Model</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1645" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1639" HREF="node121.html">SLA_IMXV - Apply 3D Reverse Rotation</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004109000000000000000">SLA_INTIN - Decode an Integer Number</A>
+<A NAME="xref_SLA_INTIN">&#160;</A><A NAME="SLA_INTIN">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Convert free-format input into an integer.
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_INTIN (STRING, NSTRT, IRESLT, JFLAG)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>STRING</EM></TD>
+<TH ALIGN="LEFT"><B>C</B></TH>
+<TD ALIGN="LEFT" NOWRAP>string containing number to be decoded</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>NSTRT</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>pointer to where decoding is to commence</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>IRESLT</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>current value of result</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>NSTRT</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>advanced to next number</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>IRESLT</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>result</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>JFLAG</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>status: -1 = -OK, 0&nbsp;=&nbsp;+OK, 1&nbsp;=&nbsp;null result, 2&nbsp;=&nbsp;error</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The reason sla_INTIN has separate `OK' status values
+for + and - is to enable minus zero to be detected.
+This is of crucial importance
+ when decoding mixed-radix numbers. For example, an angle
+ expressed as degrees, arcminutes and arcseconds may have a
+ leading minus sign but a zero degrees field.
+ <DT>2.
+<DD>A TAB is interpreted as a space. <I>n.b.</I> The test for TAB is
+ ASCII-specific.
+ <DT>3.
+<DD>The basic format is the sequence of fields <IMG WIDTH="25" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img123.gif"
+ ALT="$\pm n$">, where <IMG WIDTH="15" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img30.gif"
+ ALT="$\pm$"> is a sign
+ character `+' or `-', and <I>n</I> means a string of decimal digits.
+ <DT>4.
+<DD>Spaces:
+ <UL>
+<LI> Leading spaces are ignored.
+<LI> Spaces between the sign and the number are allowed.
+<LI> Trailing spaces are ignored; the first signifies
+ end of decoding and subsequent ones are skipped.
+ </UL>
+ <DT>5.
+<DD>Delimiters:
+ <UL>
+<LI> Any character other than +,-,0-9 or space may be
+ used to signal the end of the number and terminate decoding.
+<LI> Comma is recognized by sla_INTIN as a special case; it
+ is skipped, leaving the pointer on the next character. See
+ 9, below.
+<LI> Decoding will in all cases terminate if end of string
+ is reached.
+ </UL>
+ <DT>6.
+<DD>The sign is optional. The default is +.
+ <DT>7.
+<DD>A <I>null result</I> occurs when the string of characters
+ being decoded does not begin with +,- or 0-9, or
+ consists entirely of spaces. When this condition is
+ detected, JFLAG is set to 1 and IRESLT is left untouched.
+ <DT>8.
+<DD>NSTRT = 1 for the first character in the string.
+ <DT>9.
+<DD>On return from sla_INTIN, NSTRT is set ready for the next
+ decode - following trailing blanks and any comma. If a
+ delimiter other than comma is being used, NSTRT must be
+ incremented before the next call to sla_INTIN, otherwise
+ all subsequent calls will return a null result.
+ <DT>10.
+<DD>Errors (JFLAG=2) occur when:
+ <UL>
+<LI> there is a + or - but no number; or
+<LI> the number is greater than 2<SUP>31</SUP>-1.
+ </UL>
+ <DT>11.
+<DD>When an error has been detected, NSTRT is left
+ pointing to the character following the last
+ one used before the error came to light.
+ <DT>12.
+<DD>See also sla_FLOTIN and sla_DFLTIN.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1646" HREF="node123.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1644" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1638" HREF="node121.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1647" HREF="node123.html">SLA_INVF - Invert Linear Model</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1645" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1639" HREF="node121.html">SLA_IMXV - Apply 3D Reverse Rotation</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node123.html b/src/slalib/sun67.htx/node123.html
new file mode 100644
index 0000000..a3d1a77
--- /dev/null
+++ b/src/slalib/sun67.htx/node123.html
@@ -0,0 +1,122 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_INVF - Invert Linear Model</TITLE>
+<META NAME="description" CONTENT="SLA_INVF - Invert Linear Model">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node124.html">
+<LINK REL="previous" HREF="node122.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node124.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1656" HREF="node124.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1654" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1648" HREF="node122.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1657" HREF="node124.html">SLA_KBJ - Select Epoch Prefix</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1655" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1649" HREF="node122.html">SLA_INTIN - Decode an Integer Number</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004110000000000000000">SLA_INVF - Invert Linear Model</A>
+<A NAME="xref_SLA_INVF">&#160;</A><A NAME="SLA_INVF">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Invert a linear model of the type produced by the
+sla_FITXY routine.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_INVF (FWDS,BKWDS,J)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>FWDS</EM></TD>
+<TH ALIGN="LEFT"><B>D(6)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>model coefficients</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>BKWDS</EM></TD>
+<TH ALIGN="LEFT"><B>D(6)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>inverse model</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>J</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>status: 0 = OK, -1 = no inverse</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The models relate two sets of <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$"> coordinates as follows.
+Naming the six elements of FWDS <I>a</I>,<I>b</I>,<I>c</I>,<I>d</I>,<I>e</I> &amp; <I>f</I>,
+where two sets of coordinates [<I>x<SUB>1</SUB></I>,<I>y<SUB>1</SUB></I>] and
+ <IMG WIDTH="53" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img56.gif"
+ ALT="$[x_{2},y_{2}\,]$"> are related thus:
+ <BLOCKQUOTE><I>x<SUB>2</SUB></I> = <I>a</I> + <I>bx<SUB>1</SUB></I> + <I>cy<SUB>1</SUB></I> <BR>
+ <I>y<SUB>2</SUB></I> = <I>d</I> + <I>ex<SUB>1</SUB></I> + <I>fy<SUB>1</SUB></I></BLOCKQUOTE>
+ The present routine generates a new set of coefficients
+ <I>p</I>,<I>q</I>,<I>r</I>,<I>s</I>,<I>t</I> &amp; <I>u</I> (the array BKWDS) such that:
+ <BLOCKQUOTE><I>x<SUB>1</SUB></I> = <I>p</I> + <I>qx<SUB>2</SUB></I> + <I>ry<SUB>2</SUB></I> <BR>
+ <I>y<SUB>1</SUB></I> = <I>s</I> + <I>tx<SUB>2</SUB></I> + <I>uy<SUB>2</SUB></I></BLOCKQUOTE>
+ <DT>2.
+<DD>Two successive calls to this routine will deliver a set
+ of coefficients equal to the starting values.
+ <DT>3.
+<DD>To comply with the ANSI Fortran 77 standard, FWDS and BKWDS must
+ <B>not</B> be the same array. The routine is, in fact, coded
+ so as to work properly on the VAX and many other systems even
+ if this rule is violated, something that is <B>not</B>, however,
+ recommended.
+ <DT>4.
+<DD>See also sla_FITXY, sla_PXY, sla_XY2XY, sla_DCMPF.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1656" HREF="node124.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1654" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1648" HREF="node122.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1657" HREF="node124.html">SLA_KBJ - Select Epoch Prefix</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1655" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1649" HREF="node122.html">SLA_INTIN - Decode an Integer Number</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node124.html b/src/slalib/sun67.htx/node124.html
new file mode 100644
index 0000000..6337e94
--- /dev/null
+++ b/src/slalib/sun67.htx/node124.html
@@ -0,0 +1,104 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_KBJ - Select Epoch Prefix</TITLE>
+<META NAME="description" CONTENT="SLA_KBJ - Select Epoch Prefix">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node125.html">
+<LINK REL="previous" HREF="node123.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node125.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1666" HREF="node125.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1664" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1658" HREF="node123.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1667" HREF="node125.html">SLA_M2AV - Rotation Matrix to Axial Vector</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1665" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1659" HREF="node123.html">SLA_INVF - Invert Linear Model</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004111000000000000000">SLA_KBJ - Select Epoch Prefix</A>
+<A NAME="xref_SLA_KBJ">&#160;</A><A NAME="SLA_KBJ">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Select epoch prefix `B' or `J'.
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_KBJ (JB, E, K, J)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>JB</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>sla_DBJIN prefix status: 0=none, 1=`B', 2=`J'</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>E</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>epoch - Besselian or Julian</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>K</EM></TD>
+<TH ALIGN="LEFT"><B>C</B></TH>
+<TD ALIGN="LEFT" NOWRAP>`B' or `J'</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>J</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>status: 0=OK</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTE:</STRONG>
+<DD>The routine is mainly intended for use in conjunction with the
+sla_DBJIN routine. If the value of JB indicates that an explicit
+ B or J prefix was detected by sla_DBJIN, a `B' or `J'
+ is returned to match. If JB indicates that no explicit B or J
+ was supplied, the choice is made on the basis of the epoch
+ itself; B is assumed for E &lt;1984, otherwise J.
+ </DL>
+<BR> <HR>
+<A NAME="tex2html1666" HREF="node125.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1664" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1658" HREF="node123.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1667" HREF="node125.html">SLA_M2AV - Rotation Matrix to Axial Vector</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1665" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1659" HREF="node123.html">SLA_INVF - Invert Linear Model</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node125.html b/src/slalib/sun67.htx/node125.html
new file mode 100644
index 0000000..2542649
--- /dev/null
+++ b/src/slalib/sun67.htx/node125.html
@@ -0,0 +1,107 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_M2AV - Rotation Matrix to Axial Vector</TITLE>
+<META NAME="description" CONTENT="SLA_M2AV - Rotation Matrix to Axial Vector">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node126.html">
+<LINK REL="previous" HREF="node124.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node126.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1676" HREF="node126.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1674" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1668" HREF="node124.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1677" HREF="node126.html">SLA_MAP - Mean to Apparent</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1675" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1669" HREF="node124.html">SLA_KBJ - Select Epoch Prefix</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004112000000000000000">SLA_M2AV - Rotation Matrix to Axial Vector</A>
+<A NAME="xref_SLA_M2AV">&#160;</A><A NAME="SLA_M2AV">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>From a rotation matrix, determine the corresponding axial vector
+(single precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_M2AV (RMAT, AXVEC)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RMAT</EM></TD>
+<TH ALIGN="LEFT"><B>R(3,3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>rotation matrix</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>AXVEC</EM></TD>
+<TH ALIGN="LEFT"><B>R(3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>axial vector (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>A rotation matrix describes a rotation about some arbitrary axis.
+The axis is called the <I>Euler axis</I>, and the angle through
+which the reference frame rotates is called the <I>Euler angle</I>.
+ The <I>axial vector</I> returned by this routine has the same
+ direction as the Euler axis, and its magnitude is the Euler angle
+ in radians.
+ <DT>2.
+<DD>The magnitude and direction of the axial vector can be separated
+ by means of the routine sla_VN.
+ <DT>3.
+<DD>The reference frame rotates clockwise as seen looking along
+ the axial vector from the origin.
+ <DT>4.
+<DD>If RMAT is null, so is the result.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1676" HREF="node126.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1674" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1668" HREF="node124.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1677" HREF="node126.html">SLA_MAP - Mean to Apparent</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1675" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1669" HREF="node124.html">SLA_KBJ - Select Epoch Prefix</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node126.html b/src/slalib/sun67.htx/node126.html
new file mode 100644
index 0000000..abe5fb6
--- /dev/null
+++ b/src/slalib/sun67.htx/node126.html
@@ -0,0 +1,157 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_MAP - Mean to Apparent</TITLE>
+<META NAME="description" CONTENT="SLA_MAP - Mean to Apparent">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node127.html">
+<LINK REL="previous" HREF="node125.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node127.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1686" HREF="node127.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1684" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1678" HREF="node125.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1687" HREF="node127.html">SLA_MAPPA - Mean to Apparent Parameters</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1685" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1679" HREF="node125.html">SLA_M2AV - Rotation Matrix to Axial Vector</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004113000000000000000">SLA_MAP - Mean to Apparent</A>
+<A NAME="xref_SLA_MAP">&#160;</A><A NAME="SLA_MAP">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Transform star <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> from mean place to geocentric apparent.
+The reference frames and timescales used are post IAU&nbsp;1976.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_MAP (RM, DM, PR, PD, PX, RV, EQ, DATE, RA, DA)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RM,DM</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>mean <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PR,PD</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>proper motions: <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> changes per Julian year</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PX</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>parallax (arcsec)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RV</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>radial velocity (km&nbsp;s<SUP>-1</SUP>, +ve if receding)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>EQ</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>epoch and equinox of star data (Julian)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DATE</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>TDB for apparent place (JD-2400000.5)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RA,DA</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>apparent <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>EQ is the Julian epoch specifying both the reference
+frame and the epoch of the position - usually 2000.
+For positions where the epoch and equinox are
+ different, use the routine sla_PM to apply proper
+ motion corrections before using this routine.
+ <DT>2.
+<DD>The distinction between the required TDB and TT is
+ always negligible. Moreover, for all but the most
+ critical applications UTC is adequate.
+ <DT>3.
+<DD>The <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$"> proper motions are <IMG WIDTH="13" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img115.gif"
+ ALT="$\dot{\alpha}$"> rather than
+ <IMG WIDTH="48" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img116.gif"
+ ALT="$\dot{\alpha}\cos\delta$">, and are per year rather than per century.
+ <DT>4.
+<DD>This routine may be wasteful for some applications
+ because it recomputes the Earth position/velocity and
+ the precession/nutation matrix each time, and because
+ it allows for parallax and proper motion. Where
+ multiple transformations are to be carried out for one
+ epoch, a faster method is to call the sla_MAPPA routine
+ once and then either the sla_MAPQK routine (which includes
+ parallax and proper motion) or sla_MAPQKZ (which assumes
+ zero parallax and FK5 proper motion).
+ </DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>1984 <I>Astronomical Almanac</I>, pp B39-B41.
+<DT>2.
+<DD>Lederle &amp; Schwan, 1984. <I>Astr.Astrophys.</I> <B>134</B>, 1-6.
+</DL></DL>
+<BR> <HR>
+<A NAME="tex2html1686" HREF="node127.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1684" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1678" HREF="node125.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1687" HREF="node127.html">SLA_MAPPA - Mean to Apparent Parameters</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1685" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1679" HREF="node125.html">SLA_M2AV - Rotation Matrix to Axial Vector</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node127.html b/src/slalib/sun67.htx/node127.html
new file mode 100644
index 0000000..6ed5222
--- /dev/null
+++ b/src/slalib/sun67.htx/node127.html
@@ -0,0 +1,159 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_MAPPA - Mean to Apparent Parameters</TITLE>
+<META NAME="description" CONTENT="SLA_MAPPA - Mean to Apparent Parameters">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node128.html">
+<LINK REL="previous" HREF="node126.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node128.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1696" HREF="node128.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1694" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1688" HREF="node126.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1697" HREF="node128.html">SLA_MAPQK - Quick Mean to Apparent</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1695" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1689" HREF="node126.html">SLA_MAP - Mean to Apparent</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004114000000000000000">SLA_MAPPA - Mean to Apparent Parameters</A>
+<A NAME="xref_SLA_MAPPA">&#160;</A><A NAME="SLA_MAPPA">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Compute star-independent parameters in preparation for
+conversions between mean place and geocentric apparent place.
+ The parameters produced by this routine are required in the
+ parallax, light deflection, aberration, and precession/nutation
+ parts of the mean/apparent transformations.
+ The reference frames and timescales used are post IAU&nbsp;1976.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_MAPPA (EQ, DATE, AMPRMS)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>EQ</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>epoch of mean equinox to be used (Julian)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DATE</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>TDB (JD-2400000.5)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>AMPRMS</EM></TD>
+<TH ALIGN="LEFT"><B>D(21)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>star-independent mean-to-apparent parameters:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(1)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>time interval for proper motion (Julian years)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(2-4)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>barycentric position of the Earth (AU)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(5-7)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>heliocentric direction of the Earth (unit vector)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(8)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>(gravitational radius of
+Sun)<IMG WIDTH="31" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img16.gif"
+ ALT="$\times 2 / $">(Sun-Earth distance)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(9-11)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP><B>v</B>: barycentric Earth velocity in units of c</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(12)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="72" HEIGHT="45" ALIGN="MIDDLE" BORDER="0"
+ SRC="img17.gif"
+ ALT="$\sqrt{1-\left\vert\mbox{\bf v}\right\vert^2}$"></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(13-21)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>precession/nutation <IMG WIDTH="39" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img18.gif"
+ ALT="$3\times3$"> matrix</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>For DATE, the distinction between the required TDB and TT
+is always negligible. Moreover, for all but the most
+critical applications UTC is adequate.
+ <DT>2.
+<DD>The accuracy of the routines using the parameters AMPRMS is
+ limited by the routine sla_EVP, used here to compute the
+ Earth position and velocity by the methods of Stumpff.
+ The maximum error in the resulting aberration corrections is
+ about 0.3 milliarcsecond.
+ <DT>3.
+<DD>The vectors AMPRMS(2-4) and AMPRMS(5-7) are referred to
+ the mean equinox and equator of epoch EQ.
+ <DT>4.
+<DD>The parameters produced by this routine are used by
+ sla_MAPQK and sla_MAPQKZ.
+ </DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>1984 <I>Astronomical Almanac</I>, pp B39-B41.
+<DT>2.
+<DD>Lederle &amp; Schwan, 1984. <I>Astr.Astrophys.</I> <B>134</B>, 1-6.
+</DL></DL>
+<BR> <HR>
+<A NAME="tex2html1696" HREF="node128.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1694" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1688" HREF="node126.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1697" HREF="node128.html">SLA_MAPQK - Quick Mean to Apparent</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1695" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1689" HREF="node126.html">SLA_MAP - Mean to Apparent</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node128.html b/src/slalib/sun67.htx/node128.html
new file mode 100644
index 0000000..b705fa9
--- /dev/null
+++ b/src/slalib/sun67.htx/node128.html
@@ -0,0 +1,187 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_MAPQK - Quick Mean to Apparent</TITLE>
+<META NAME="description" CONTENT="SLA_MAPQK - Quick Mean to Apparent">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node129.html">
+<LINK REL="previous" HREF="node127.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node129.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1706" HREF="node129.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1704" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1698" HREF="node127.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1707" HREF="node129.html">SLA_MAPQKZ - Quick Mean-Appt, no PM etc.</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1705" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1699" HREF="node127.html">SLA_MAPPA - Mean to Apparent Parameters</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004115000000000000000">SLA_MAPQK - Quick Mean to Apparent</A>
+<A NAME="xref_SLA_MAPQK">&#160;</A><A NAME="SLA_MAPQK">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Quick mean to apparent place: transform a star <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> from
+mean place to geocentric apparent place, given the
+ star-independent parameters. The reference frames and
+ timescales used are post IAU 1976.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_MAPQK (RM, DM, PR, PD, PX, RV, AMPRMS, RA, DA)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RM,DM</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>mean <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PR,PD</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>proper motions: <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> changes per Julian year</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PX</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>parallax (arcsec)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RV</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>radial velocity (km&nbsp;s<SUP>-1</SUP>, +ve if receding)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>AMPRMS</EM></TD>
+<TD ALIGN="LEFT"><B>D(21)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>star-independent mean-to-apparent parameters:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(1)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>time interval for proper motion (Julian years)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(2-4)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>barycentric position of the Earth (AU)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(5-7)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>heliocentric direction of the Earth (unit vector)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(8)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>(gravitational radius of
+Sun)<IMG WIDTH="31" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img16.gif"
+ ALT="$\times 2 / $">(Sun-Earth distance)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(9-11)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP><B>v</B>: barycentric Earth velocity in units of c</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(12)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="72" HEIGHT="45" ALIGN="MIDDLE" BORDER="0"
+ SRC="img17.gif"
+ ALT="$\sqrt{1-\left\vert\mbox{\bf v}\right\vert^2}$"></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(13-21)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>precession/nutation <IMG WIDTH="39" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img18.gif"
+ ALT="$3\times3$"> matrix</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RA,DA</EM></TD>
+<TH ALIGN="LEFT"><B>D </B></TH>
+<TD ALIGN="LEFT" NOWRAP>apparent <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>Use of this routine is appropriate when efficiency is important
+and where many star positions, all referred to the same equator
+and equinox, are to be transformed for one epoch. The
+ star-independent parameters can be obtained by calling the
+ sla_MAPPA routine.
+ <DT>2.
+<DD>If the parallax and proper motions are zero the sla_MAPQKZ
+ routine can be used instead.
+ <DT>3.
+<DD>The vectors AMPRMS(2-4) and AMPRMS(5-7) are referred to
+ the mean equinox and equator of epoch EQ.
+ <DT>4.
+<DD>Strictly speaking, the routine is not valid for solar-system
+ sources, though the error will usually be extremely small.
+ However, to prevent gross errors in the case where the
+ position of the Sun is specified, the gravitational
+ deflection term is restrained within about <IMG WIDTH="33" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img124.gif"
+ ALT="$920\hspace{-0.05em}^{'\hspace{-0.1em}'}$"> of the
+ centre of the Sun's disc. The term has a maximum value of
+ about
+ <IMG WIDTH="31" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img125.gif"
+ ALT="$1\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.85$"> at this radius, and decreases to zero as
+ the centre of the disc is approached.
+ </DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>1984 <I>Astronomical Almanac</I>, pp B39-B41.
+<DT>2.
+<DD>Lederle &amp; Schwan, 1984. <I>Astr.Astrophys.</I> <B>134</B>, 1-6.
+</DL></DL>
+<BR> <HR>
+<A NAME="tex2html1706" HREF="node129.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1704" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1698" HREF="node127.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1707" HREF="node129.html">SLA_MAPQKZ - Quick Mean-Appt, no PM etc.</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1705" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1699" HREF="node127.html">SLA_MAPPA - Mean to Apparent Parameters</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node129.html b/src/slalib/sun67.htx/node129.html
new file mode 100644
index 0000000..6cb5fed
--- /dev/null
+++ b/src/slalib/sun67.htx/node129.html
@@ -0,0 +1,175 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_MAPQKZ - Quick Mean-Appt, no PM etc.</TITLE>
+<META NAME="description" CONTENT="SLA_MAPQKZ - Quick Mean-Appt, no PM etc.">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node130.html">
+<LINK REL="previous" HREF="node128.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node130.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1716" HREF="node130.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1714" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1708" HREF="node128.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1717" HREF="node130.html">SLA_MOON - Approx Moon Pos/Vel</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1715" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1709" HREF="node128.html">SLA_MAPQK - Quick Mean to Apparent</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004116000000000000000">SLA_MAPQKZ - Quick Mean-Appt, no PM <I>etc.</I></A>
+<A NAME="xref_SLA_MAPQKZ">&#160;</A><A NAME="SLA_MAPQKZ">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Quick mean to apparent place: transform a star <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> from
+mean place to geocentric apparent place, given the
+ star-independent parameters, and assuming zero parallax
+ and FK5 proper motion.
+ The reference frames and timescales used are post IAU&nbsp;1976.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_MAPQKZ (RM, DM, AMPRMS, RA, DA)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RM,DM</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>mean <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>AMPRMS</EM></TD>
+<TD ALIGN="LEFT"><B>D(21)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>star-independent mean-to-apparent parameters:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(1)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>time interval for proper motion (Julian years)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(2-4)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>barycentric position of the Earth (AU)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(5-7)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>heliocentric direction of the Earth (unit vector)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(8)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>(gravitational radius of
+Sun)<IMG WIDTH="31" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img16.gif"
+ ALT="$\times 2 / $">(Sun-Earth distance)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(9-11)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP><B>v</B>: barycentric Earth velocity in units of c</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(12)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="72" HEIGHT="45" ALIGN="MIDDLE" BORDER="0"
+ SRC="img17.gif"
+ ALT="$\sqrt{1-\left\vert\mbox{\bf v}\right\vert^2}$"></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(13-21)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>precession/nutation <IMG WIDTH="39" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img18.gif"
+ ALT="$3\times3$"> matrix</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RA,DA</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>apparent <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>Use of this routine is appropriate when efficiency is important
+and where many star positions, all with parallax and proper
+motion either zero or already allowed for, and all referred to
+ the same equator and equinox, are to be transformed for one
+ epoch. The star-independent parameters can be obtained by
+ calling the sla_MAPPA routine.
+ <DT>2.
+<DD>The corresponding routine for the case of non-zero parallax
+ and FK5 proper motion is sla_MAPQK.
+ <DT>3.
+<DD>The vectors AMPRMS(2-4) and AMPRMS(5-7) are referred to the
+ mean equinox and equator of epoch EQ.
+ <DT>4.
+<DD>Strictly speaking, the routine is not valid for solar-system
+ sources, though the error will usually be extremely small.
+ However, to prevent gross errors in the case where the
+ position of the Sun is specified, the gravitational
+ deflection term is restrained within about <IMG WIDTH="33" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img124.gif"
+ ALT="$920\hspace{-0.05em}^{'\hspace{-0.1em}'}$"> of the
+ centre of the Sun's disc. The term has a maximum value of
+ about
+ <IMG WIDTH="31" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img125.gif"
+ ALT="$1\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.85$"> at this radius, and decreases to zero as
+ the centre of the disc is approached.
+ </DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>1984 <I>Astronomical Almanac</I>, pp B39-B41.
+<DT>2.
+<DD>Lederle &amp; Schwan, 1984. <I>Astr.Astrophys.</I> <B>134</B>, 1-6.
+</DL></DL>
+<BR> <HR>
+<A NAME="tex2html1716" HREF="node130.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1714" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1708" HREF="node128.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1717" HREF="node130.html">SLA_MOON - Approx Moon Pos/Vel</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1715" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1709" HREF="node128.html">SLA_MAPQK - Quick Mean to Apparent</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node13.html b/src/slalib/sun67.htx/node13.html
new file mode 100644
index 0000000..c8106bf
--- /dev/null
+++ b/src/slalib/sun67.htx/node13.html
@@ -0,0 +1,489 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SUBPROGRAM SPECIFICATIONS</TITLE>
+<META NAME="description" CONTENT="SUBPROGRAM SPECIFICATIONS">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node197.html">
+<LINK REL="previous" HREF="node12.html">
+<LINK REL="up" HREF="sun67.html">
+<LINK REL="next" HREF="node14.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html373" HREF="node14.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html371" HREF="sun67.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html365" HREF="node12.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html374" HREF="node14.html">SLA_ADDET - Add E-terms of Aberration</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html372" HREF="sun67.html">SLALIB Positional Astronomy Library</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html366" HREF="node12.html">LINKING</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H1><A NAME="SECTION00040000000000000000">
+SUBPROGRAM SPECIFICATIONS</A>
+</H1>
+<P> <BR><HR>
+<!--Table of Child-Links-->
+<A NAME="CHILD_LINKS">&#160;</A>
+<UL>
+<LI><A NAME="tex2html375" HREF="node14.html#SECTION00041000000000000000">
+SLA_ADDET - Add E-terms of Aberration</A>
+<LI><A NAME="tex2html376" HREF="node15.html#SECTION00042000000000000000">
+SLA_AFIN - Sexagesimal character string to angle</A>
+<LI><A NAME="tex2html377" HREF="node16.html#SECTION00043000000000000000">
+SLA_AIRMAS - Air Mass</A>
+<LI><A NAME="tex2html378" HREF="node17.html#SECTION00044000000000000000">
+SLA_ALTAZ - Velocities <I>etc.</I> for Altazimuth Mount</A>
+<LI><A NAME="tex2html379" HREF="node18.html#SECTION00045000000000000000">
+SLA_AMP - Apparent to Mean</A>
+<LI><A NAME="tex2html380" HREF="node19.html#SECTION00046000000000000000">
+SLA_AMPQK - Quick Apparent to Mean</A>
+<LI><A NAME="tex2html381" HREF="node20.html#SECTION00047000000000000000">
+SLA_AOP - Apparent to Observed</A>
+<LI><A NAME="tex2html382" HREF="node21.html#SECTION00048000000000000000">
+SLA_AOPPA - Appt-to-Obs Parameters</A>
+<LI><A NAME="tex2html383" HREF="node22.html#SECTION00049000000000000000">
+SLA_AOPPAT - Update Appt-to-Obs Parameters</A>
+<LI><A NAME="tex2html384" HREF="node23.html#SECTION000410000000000000000">
+SLA_AOPQK - Quick Appt-to-Observed</A>
+<LI><A NAME="tex2html385" HREF="node24.html#SECTION000411000000000000000">
+SLA_ATMDSP - Atmospheric Dispersion</A>
+<LI><A NAME="tex2html386" HREF="node25.html#SECTION000412000000000000000">
+SLA_AV2M - Rotation Matrix from Axial Vector</A>
+<LI><A NAME="tex2html387" HREF="node26.html#SECTION000413000000000000000">
+SLA_BEAR - Direction Between Points on a Sphere</A>
+<LI><A NAME="tex2html388" HREF="node27.html#SECTION000414000000000000000">
+SLA_CAF2R - Deg,Arcmin,Arcsec to Radians</A>
+<LI><A NAME="tex2html389" HREF="node28.html#SECTION000415000000000000000">
+SLA_CALDJ - Calendar Date to MJD</A>
+<LI><A NAME="tex2html390" HREF="node29.html#SECTION000416000000000000000">
+SLA_CALYD - Calendar to Year, Day</A>
+<LI><A NAME="tex2html391" HREF="node30.html#SECTION000417000000000000000">
+SLA_CC2S - Cartesian to Spherical</A>
+<LI><A NAME="tex2html392" HREF="node31.html#SECTION000418000000000000000">
+SLA_CC62S - Cartesian 6-Vector to Spherical</A>
+<LI><A NAME="tex2html393" HREF="node32.html#SECTION000419000000000000000">
+SLA_CD2TF - Days to Hour,Min,Sec</A>
+<LI><A NAME="tex2html394" HREF="node33.html#SECTION000420000000000000000">
+SLA_CLDJ - Calendar to MJD</A>
+<LI><A NAME="tex2html395" HREF="node34.html#SECTION000421000000000000000">
+SLA_CLYD - Calendar to Year, Day</A>
+<LI><A NAME="tex2html396" HREF="node35.html#SECTION000422000000000000000">
+SLA_COMBN - Next Combination</A>
+<LI><A NAME="tex2html397" HREF="node36.html#SECTION000423000000000000000">
+SLA_CR2AF - Radians to Deg,Arcmin,Arcsec</A>
+<LI><A NAME="tex2html398" HREF="node37.html#SECTION000424000000000000000">
+SLA_CR2TF - Radians to Hour,Min,Sec</A>
+<LI><A NAME="tex2html399" HREF="node38.html#SECTION000425000000000000000">
+SLA_CS2C - Spherical to Cartesian</A>
+<LI><A NAME="tex2html400" HREF="node39.html#SECTION000426000000000000000">
+SLA_CS2C6 - Spherical Pos/Vel to Cartesian</A>
+<LI><A NAME="tex2html401" HREF="node40.html#SECTION000427000000000000000">
+SLA_CTF2D - Hour,Min,Sec to Days</A>
+<LI><A NAME="tex2html402" HREF="node41.html#SECTION000428000000000000000">
+SLA_CTF2R - Hour,Min,Sec to Radians</A>
+<LI><A NAME="tex2html403" HREF="node42.html#SECTION000429000000000000000">
+SLA_DAF2R - Deg,Arcmin,Arcsec to Radians</A>
+<LI><A NAME="tex2html404" HREF="node43.html#SECTION000430000000000000000">
+SLA_DAFIN - Sexagesimal character string to angle</A>
+<LI><A NAME="tex2html405" HREF="node44.html#SECTION000431000000000000000">
+SLA_DAT - TAI-UTC</A>
+<LI><A NAME="tex2html406" HREF="node45.html#SECTION000432000000000000000">
+SLA_DAV2M - Rotation Matrix from Axial Vector</A>
+<LI><A NAME="tex2html407" HREF="node46.html#SECTION000433000000000000000">
+SLA_DBEAR - Direction Between Points on a Sphere</A>
+<LI><A NAME="tex2html408" HREF="node47.html#SECTION000434000000000000000">
+SLA_DBJIN - Decode String to B/J Epoch (DP)</A>
+<LI><A NAME="tex2html409" HREF="node48.html#SECTION000435000000000000000">
+SLA_DC62S - Cartesian 6-Vector to Spherical</A>
+<LI><A NAME="tex2html410" HREF="node49.html#SECTION000436000000000000000">
+SLA_DCC2S - Cartesian to Spherical</A>
+<LI><A NAME="tex2html411" HREF="node50.html#SECTION000437000000000000000">
+SLA_DCMPF - Interpret Linear Fit</A>
+<LI><A NAME="tex2html412" HREF="node51.html#SECTION000438000000000000000">
+SLA_DCS2C - Spherical to Cartesian</A>
+<LI><A NAME="tex2html413" HREF="node52.html#SECTION000439000000000000000">
+SLA_DD2TF - Days to Hour,Min,Sec</A>
+<LI><A NAME="tex2html414" HREF="node53.html#SECTION000440000000000000000">
+SLA_DE2H - <IMG WIDTH="27" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img65.gif"
+ ALT="$h,\delta$"> to Az,El</A>
+<LI><A NAME="tex2html415" HREF="node54.html#SECTION000441000000000000000">
+SLA_DEULER - Euler Angles to Rotation Matrix</A>
+<LI><A NAME="tex2html416" HREF="node55.html#SECTION000442000000000000000">
+SLA_DFLTIN - Decode a Double Precision Number</A>
+<LI><A NAME="tex2html417" HREF="node56.html#SECTION000443000000000000000">
+SLA_DH2E - Az,El to <IMG WIDTH="27" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img65.gif"
+ ALT="$h,\delta$"></A>
+<LI><A NAME="tex2html418" HREF="node57.html#SECTION000444000000000000000">
+SLA_DIMXV - Apply 3D Reverse Rotation</A>
+<LI><A NAME="tex2html419" HREF="node58.html#SECTION000445000000000000000">
+SLA_DJCAL - MJD to Gregorian for Output</A>
+<LI><A NAME="tex2html420" HREF="node59.html#SECTION000446000000000000000">
+SLA_DJCL - MJD to Year,Month,Day,Frac</A>
+<LI><A NAME="tex2html421" HREF="node60.html#SECTION000447000000000000000">
+SLA_DM2AV - Rotation Matrix to Axial Vector</A>
+<LI><A NAME="tex2html422" HREF="node61.html#SECTION000448000000000000000">
+SLA_DMAT - Solve Simultaneous Equations</A>
+<LI><A NAME="tex2html423" HREF="node62.html#SECTION000449000000000000000">
+SLA_DMOON - Approx Moon Pos/Vel</A>
+<LI><A NAME="tex2html424" HREF="node63.html#SECTION000450000000000000000">
+SLA_DMXM - Multiply <IMG WIDTH="39" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img18.gif"
+ ALT="$3\times3$"> Matrices</A>
+<LI><A NAME="tex2html425" HREF="node64.html#SECTION000451000000000000000">
+SLA_DMXV - Apply 3D Rotation</A>
+<LI><A NAME="tex2html426" HREF="node65.html#SECTION000452000000000000000">
+SLA_DPAV - Position-Angle Between Two Directions</A>
+<LI><A NAME="tex2html427" HREF="node66.html#SECTION000453000000000000000">
+SLA_DR2AF - Radians to Deg,Min,Sec,Frac</A>
+<LI><A NAME="tex2html428" HREF="node67.html#SECTION000454000000000000000">
+SLA_DR2TF - Radians to Hour,Min,Sec,Frac</A>
+<LI><A NAME="tex2html429" HREF="node68.html#SECTION000455000000000000000">
+SLA_DRANGE - Put Angle into Range <IMG WIDTH="25" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img47.gif"
+ ALT="$\pm \pi$"></A>
+<LI><A NAME="tex2html430" HREF="node69.html#SECTION000456000000000000000">
+SLA_DRANRM - Put Angle into Range <IMG WIDTH="43" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img66.gif"
+ ALT="$0\!-\!2\pi$"></A>
+<LI><A NAME="tex2html431" HREF="node70.html#SECTION000457000000000000000">
+SLA_DS2C6 - Spherical Pos/Vel to Cartesian</A>
+<LI><A NAME="tex2html432" HREF="node71.html#SECTION000458000000000000000">
+SLA_DS2TP - Spherical to Tangent Plane</A>
+<LI><A NAME="tex2html433" HREF="node72.html#SECTION000459000000000000000">
+SLA_DSEP - Angle Between 2 Points on Sphere</A>
+<LI><A NAME="tex2html434" HREF="node73.html#SECTION000460000000000000000">
+SLA_DT - Approximate ET minus UT</A>
+<LI><A NAME="tex2html435" HREF="node74.html#SECTION000461000000000000000">
+SLA_DTF2D - Hour,Min,Sec to Days</A>
+<LI><A NAME="tex2html436" HREF="node75.html#SECTION000462000000000000000">
+SLA_DTF2R - Hour,Min,Sec to Radians</A>
+<LI><A NAME="tex2html437" HREF="node76.html#SECTION000463000000000000000">
+SLA_DTP2S - Tangent Plane to Spherical</A>
+<LI><A NAME="tex2html438" HREF="node77.html#SECTION000464000000000000000">
+SLA_DTP2V - Tangent Plane to Direction Cosines</A>
+<LI><A NAME="tex2html439" HREF="node78.html#SECTION000465000000000000000">
+SLA_DTPS2C - Plate centre from <IMG WIDTH="26" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img90.gif"
+ ALT="$\xi,\eta$"> and <IMG WIDTH="28" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img91.gif"
+ ALT="$\alpha,\delta$"></A>
+<LI><A NAME="tex2html440" HREF="node79.html#SECTION000466000000000000000">
+SLA_DTPV2C - Plate centre from <IMG WIDTH="26" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img90.gif"
+ ALT="$\xi,\eta$"> and <I>x</I>,<I>y</I>,<I>z</I></A>
+<LI><A NAME="tex2html441" HREF="node80.html#SECTION000467000000000000000">
+SLA_DTT - TT minus UTC</A>
+<LI><A NAME="tex2html442" HREF="node81.html#SECTION000468000000000000000">
+SLA_DV2TP - Direction Cosines to Tangent Plane</A>
+<LI><A NAME="tex2html443" HREF="node82.html#SECTION000469000000000000000">
+SLA_DVDV - Scalar Product</A>
+<LI><A NAME="tex2html444" HREF="node83.html#SECTION000470000000000000000">
+SLA_DVN - Normalize Vector</A>
+<LI><A NAME="tex2html445" HREF="node84.html#SECTION000471000000000000000">
+SLA_DVXV - Vector Product</A>
+<LI><A NAME="tex2html446" HREF="node85.html#SECTION000472000000000000000">
+SLA_E2H - <IMG WIDTH="27" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img65.gif"
+ ALT="$h,\delta$"> to Az,El</A>
+<LI><A NAME="tex2html447" HREF="node86.html#SECTION000473000000000000000">
+SLA_EARTH - Approx Earth Pos/Vel</A>
+<LI><A NAME="tex2html448" HREF="node87.html#SECTION000474000000000000000">
+SLA_ECLEQ - Ecliptic to Equatorial</A>
+<LI><A NAME="tex2html449" HREF="node88.html#SECTION000475000000000000000">
+SLA_ECMAT - Form <IMG WIDTH="81" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img95.gif"
+ ALT="$\alpha,\delta\rightarrow\lambda,\beta$"> Matrix</A>
+<LI><A NAME="tex2html450" HREF="node89.html#SECTION000476000000000000000">
+SLA_ECOR - RV &amp; Time Corrns to Sun</A>
+<LI><A NAME="tex2html451" HREF="node90.html#SECTION000477000000000000000">
+SLA_EG50 - B1950 <IMG WIDTH="28" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img91.gif"
+ ALT="$\alpha,\delta$"> to Galactic</A>
+<LI><A NAME="tex2html452" HREF="node91.html#SECTION000478000000000000000">
+SLA_EL2UE - Conventional to Universal Elements</A>
+<LI><A NAME="tex2html453" HREF="node92.html#SECTION000479000000000000000">
+SLA_EPB - MJD to Besselian Epoch</A>
+<LI><A NAME="tex2html454" HREF="node93.html#SECTION000480000000000000000">
+SLA_EPB2D - Besselian Epoch to MJD</A>
+<LI><A NAME="tex2html455" HREF="node94.html#SECTION000481000000000000000">
+SLA_EPCO - Convert Epoch to B or J</A>
+<LI><A NAME="tex2html456" HREF="node95.html#SECTION000482000000000000000">
+SLA_EPJ - MJD to Julian Epoch</A>
+<LI><A NAME="tex2html457" HREF="node96.html#SECTION000483000000000000000">
+SLA_EPJ2D - Julian Epoch to MJD</A>
+<LI><A NAME="tex2html458" HREF="node97.html#SECTION000484000000000000000">
+SLA_EQECL - J2000 <IMG WIDTH="28" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img91.gif"
+ ALT="$\alpha,\delta$"> to Ecliptic</A>
+<LI><A NAME="tex2html459" HREF="node98.html#SECTION000485000000000000000">
+SLA_EQEQX - Equation of the Equinoxes</A>
+<LI><A NAME="tex2html460" HREF="node99.html#SECTION000486000000000000000">
+SLA_EQGAL - J2000 <IMG WIDTH="28" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img91.gif"
+ ALT="$\alpha,\delta$"> to Galactic</A>
+<LI><A NAME="tex2html461" HREF="node100.html#SECTION000487000000000000000">
+SLA_ETRMS - E-terms of Aberration</A>
+<LI><A NAME="tex2html462" HREF="node101.html#SECTION000488000000000000000">
+SLA_EULER - Rotation Matrix from Euler Angles</A>
+<LI><A NAME="tex2html463" HREF="node102.html#SECTION000489000000000000000">
+SLA_EVP - Earth Position &amp; Velocity</A>
+<LI><A NAME="tex2html464" HREF="node103.html#SECTION000490000000000000000">
+SLA_FITXY - Fit Linear Model to Two <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$"> Sets</A>
+<LI><A NAME="tex2html465" HREF="node104.html#SECTION000491000000000000000">
+SLA_FK425 - FK4 to FK5</A>
+<LI><A NAME="tex2html466" HREF="node105.html#SECTION000492000000000000000">
+SLA_FK45Z - FK4 to FK5, no P.M. or Parallax</A>
+<LI><A NAME="tex2html467" HREF="node106.html#SECTION000493000000000000000">
+SLA_FK524 - FK5 to FK4</A>
+<LI><A NAME="tex2html468" HREF="node107.html#SECTION000494000000000000000">
+SLA_FK52H - FK5 to Hipparcos</A>
+<LI><A NAME="tex2html469" HREF="node108.html#SECTION000495000000000000000">
+SLA_FK54Z - FK5 to FK4, no P.M. or Parallax</A>
+<LI><A NAME="tex2html470" HREF="node109.html#SECTION000496000000000000000">
+SLA_FK5HZ - FK5 to Hipparcos, no P.M.</A>
+<LI><A NAME="tex2html471" HREF="node110.html#SECTION000497000000000000000">
+SLA_FLOTIN - Decode a Real Number</A>
+<LI><A NAME="tex2html472" HREF="node111.html#SECTION000498000000000000000">
+SLA_GALEQ - Galactic to J2000 <IMG WIDTH="28" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img91.gif"
+ ALT="$\alpha,\delta$"></A>
+<LI><A NAME="tex2html473" HREF="node112.html#SECTION000499000000000000000">
+SLA_GALSUP - Galactic to Supergalactic</A>
+<LI><A NAME="tex2html474" HREF="node113.html#SECTION0004100000000000000000">
+SLA_GE50 - Galactic to B1950 <IMG WIDTH="28" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img91.gif"
+ ALT="$\alpha,\delta$"></A>
+<LI><A NAME="tex2html475" HREF="node114.html#SECTION0004101000000000000000">
+SLA_GEOC - Geodetic to Geocentric</A>
+<LI><A NAME="tex2html476" HREF="node115.html#SECTION0004102000000000000000">
+SLA_GMST - UT to GMST</A>
+<LI><A NAME="tex2html477" HREF="node116.html#SECTION0004103000000000000000">
+SLA_GMSTA - UT to GMST (extra precision)</A>
+<LI><A NAME="tex2html478" HREF="node117.html#SECTION0004104000000000000000">
+SLA_GRESID - Gaussian Residual</A>
+<LI><A NAME="tex2html479" HREF="node118.html#SECTION0004105000000000000000">
+SLA_H2E - Az,El to <IMG WIDTH="27" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img65.gif"
+ ALT="$h,\delta$"></A>
+<LI><A NAME="tex2html480" HREF="node119.html#SECTION0004106000000000000000">
+SLA_H2FK5 - Hipparcos to FK5</A>
+<LI><A NAME="tex2html481" HREF="node120.html#SECTION0004107000000000000000">
+SLA_HFK5Z - Hipparcos to FK5, no P.M.</A>
+<LI><A NAME="tex2html482" HREF="node121.html#SECTION0004108000000000000000">
+SLA_IMXV - Apply 3D Reverse Rotation</A>
+<LI><A NAME="tex2html483" HREF="node122.html#SECTION0004109000000000000000">
+SLA_INTIN - Decode an Integer Number</A>
+<LI><A NAME="tex2html484" HREF="node123.html#SECTION0004110000000000000000">
+SLA_INVF - Invert Linear Model</A>
+<LI><A NAME="tex2html485" HREF="node124.html#SECTION0004111000000000000000">
+SLA_KBJ - Select Epoch Prefix</A>
+<LI><A NAME="tex2html486" HREF="node125.html#SECTION0004112000000000000000">
+SLA_M2AV - Rotation Matrix to Axial Vector</A>
+<LI><A NAME="tex2html487" HREF="node126.html#SECTION0004113000000000000000">
+SLA_MAP - Mean to Apparent</A>
+<LI><A NAME="tex2html488" HREF="node127.html#SECTION0004114000000000000000">
+SLA_MAPPA - Mean to Apparent Parameters</A>
+<LI><A NAME="tex2html489" HREF="node128.html#SECTION0004115000000000000000">
+SLA_MAPQK - Quick Mean to Apparent</A>
+<LI><A NAME="tex2html490" HREF="node129.html#SECTION0004116000000000000000">
+SLA_MAPQKZ - Quick Mean-Appt, no PM <I>etc.</I></A>
+<LI><A NAME="tex2html491" HREF="node130.html#SECTION0004117000000000000000">
+SLA_MOON - Approx Moon Pos/Vel</A>
+<LI><A NAME="tex2html492" HREF="node131.html#SECTION0004118000000000000000">
+SLA_MXM - Multiply <IMG WIDTH="39" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img18.gif"
+ ALT="$3\times3$"> Matrices</A>
+<LI><A NAME="tex2html493" HREF="node132.html#SECTION0004119000000000000000">
+SLA_MXV - Apply 3D Rotation</A>
+<LI><A NAME="tex2html494" HREF="node133.html#SECTION0004120000000000000000">
+SLA_NUT - Nutation Matrix</A>
+<LI><A NAME="tex2html495" HREF="node134.html#SECTION0004121000000000000000">
+SLA_NUTC - Nutation Components</A>
+<LI><A NAME="tex2html496" HREF="node135.html#SECTION0004122000000000000000">
+SLA_OAP - Observed to Apparent</A>
+<LI><A NAME="tex2html497" HREF="node136.html#SECTION0004123000000000000000">
+SLA_OAPQK - Quick Observed to Apparent</A>
+<LI><A NAME="tex2html498" HREF="node137.html#SECTION0004124000000000000000">
+SLA_OBS - Observatory Parameters</A>
+<LI><A NAME="tex2html499" HREF="node138.html#SECTION0004125000000000000000">
+SLA_PA - <IMG WIDTH="27" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img65.gif"
+ ALT="$h,\delta$"> to Parallactic Angle</A>
+<LI><A NAME="tex2html500" HREF="node139.html#SECTION0004126000000000000000">
+SLA_PAV - Position-Angle Between Two Directions</A>
+<LI><A NAME="tex2html501" HREF="node140.html#SECTION0004127000000000000000">
+SLA_PCD - Apply Radial Distortion</A>
+<LI><A NAME="tex2html502" HREF="node141.html#SECTION0004128000000000000000">
+SLA_PDA2H - H.A. for a Given Azimuth</A>
+<LI><A NAME="tex2html503" HREF="node142.html#SECTION0004129000000000000000">
+SLA_PDQ2H - H.A. for a Given P.A.</A>
+<LI><A NAME="tex2html504" HREF="node143.html#SECTION0004130000000000000000">
+SLA_PERMUT - Next Permutation</A>
+<LI><A NAME="tex2html505" HREF="node144.html#SECTION0004131000000000000000">
+SLA_PERTEL - Perturbed Orbital Elements</A>
+<LI><A NAME="tex2html506" HREF="node145.html#SECTION0004132000000000000000">
+SLA_PERTUE - Perturbed Universal Elements</A>
+<LI><A NAME="tex2html507" HREF="node146.html#SECTION0004133000000000000000">
+SLA_PLANEL - Planet Position from Elements</A>
+<LI><A NAME="tex2html508" HREF="node147.html#SECTION0004134000000000000000">
+SLA_PLANET - Planetary Ephemerides</A>
+<LI><A NAME="tex2html509" HREF="node148.html#SECTION0004135000000000000000">
+SLA_PLANTE - <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> of Planet from Elements</A>
+<LI><A NAME="tex2html510" HREF="node149.html#SECTION0004136000000000000000">
+SLA_PM - Proper Motion</A>
+<LI><A NAME="tex2html511" HREF="node150.html#SECTION0004137000000000000000">
+SLA_POLMO - Polar Motion</A>
+<LI><A NAME="tex2html512" HREF="node151.html#SECTION0004138000000000000000">
+SLA_PREBN - Precession Matrix (FK4)</A>
+<LI><A NAME="tex2html513" HREF="node152.html#SECTION0004139000000000000000">
+SLA_PREC - Precession Matrix (FK5)</A>
+<LI><A NAME="tex2html514" HREF="node153.html#SECTION0004140000000000000000">
+SLA_PRECES - Precession</A>
+<LI><A NAME="tex2html515" HREF="node154.html#SECTION0004141000000000000000">
+SLA_PRECL - Precession Matrix (latest)</A>
+<LI><A NAME="tex2html516" HREF="node155.html#SECTION0004142000000000000000">
+SLA_PRENUT - Precession/Nutation Matrix</A>
+<LI><A NAME="tex2html517" HREF="node156.html#SECTION0004143000000000000000">
+SLA_PV2EL - Orbital Elements from Position/Velocity</A>
+<LI><A NAME="tex2html518" HREF="node157.html#SECTION0004144000000000000000">
+SLA_PV2UE - Position/Velocity to Universal Elements</A>
+<LI><A NAME="tex2html519" HREF="node158.html#SECTION0004145000000000000000">
+SLA_PVOBS - Observatory Position &amp; Velocity</A>
+<LI><A NAME="tex2html520" HREF="node159.html#SECTION0004146000000000000000">
+SLA_PXY - Apply Linear Model</A>
+<LI><A NAME="tex2html521" HREF="node160.html#SECTION0004147000000000000000">
+SLA_RANDOM - Random Number</A>
+<LI><A NAME="tex2html522" HREF="node161.html#SECTION0004148000000000000000">
+SLA_RANGE - Put Angle into Range <IMG WIDTH="25" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img47.gif"
+ ALT="$\pm \pi$"></A>
+<LI><A NAME="tex2html523" HREF="node162.html#SECTION0004149000000000000000">
+SLA_RANORM - Put Angle into Range <IMG WIDTH="43" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img66.gif"
+ ALT="$0\!-\!2\pi$"></A>
+<LI><A NAME="tex2html524" HREF="node163.html#SECTION0004150000000000000000">
+SLA_RCC - Barycentric Coordinate Time</A>
+<LI><A NAME="tex2html525" HREF="node164.html#SECTION0004151000000000000000">
+SLA_RDPLAN - Apparent <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> of Planet</A>
+<LI><A NAME="tex2html526" HREF="node165.html#SECTION0004152000000000000000">
+SLA_REFCO - Refraction Constants</A>
+<LI><A NAME="tex2html527" HREF="node166.html#SECTION0004153000000000000000">
+SLA_REFCOQ - Refraction Constants (fast)</A>
+<LI><A NAME="tex2html528" HREF="node167.html#SECTION0004154000000000000000">
+SLA_REFRO - Refraction</A>
+<LI><A NAME="tex2html529" HREF="node168.html#SECTION0004155000000000000000">
+SLA_REFV - Apply Refraction to Vector</A>
+<LI><A NAME="tex2html530" HREF="node169.html#SECTION0004156000000000000000">
+SLA_REFZ - Apply Refraction to ZD</A>
+<LI><A NAME="tex2html531" HREF="node170.html#SECTION0004157000000000000000">
+SLA_RVEROT - RV Corrn to Earth Centre</A>
+<LI><A NAME="tex2html532" HREF="node171.html#SECTION0004158000000000000000">
+SLA_RVGALC - RV Corrn to Galactic Centre</A>
+<LI><A NAME="tex2html533" HREF="node172.html#SECTION0004159000000000000000">
+SLA_RVLG - RV Corrn to Local Group</A>
+<LI><A NAME="tex2html534" HREF="node173.html#SECTION0004160000000000000000">
+SLA_RVLSRD - RV Corrn to Dynamical LSR</A>
+<LI><A NAME="tex2html535" HREF="node174.html#SECTION0004161000000000000000">
+SLA_RVLSRK - RV Corrn to Kinematical LSR</A>
+<LI><A NAME="tex2html536" HREF="node175.html#SECTION0004162000000000000000">
+SLA_S2TP - Spherical to Tangent Plane</A>
+<LI><A NAME="tex2html537" HREF="node176.html#SECTION0004163000000000000000">
+SLA_SEP - Angle Between 2 Points on Sphere</A>
+<LI><A NAME="tex2html538" HREF="node177.html#SECTION0004164000000000000000">
+SLA_SMAT - Solve Simultaneous Equations</A>
+<LI><A NAME="tex2html539" HREF="node178.html#SECTION0004165000000000000000">
+SLA_SUBET - Remove E-terms</A>
+<LI><A NAME="tex2html540" HREF="node179.html#SECTION0004166000000000000000">
+SLA_SUPGAL - Supergalactic to Galactic</A>
+<LI><A NAME="tex2html541" HREF="node180.html#SECTION0004167000000000000000">
+SLA_SVD - Singular Value Decomposition</A>
+<LI><A NAME="tex2html542" HREF="node181.html#SECTION0004168000000000000000">
+SLA_SVDCOV - Covariance Matrix from SVD</A>
+<LI><A NAME="tex2html543" HREF="node182.html#SECTION0004169000000000000000">
+SLA_SVDSOL - Solution Vector from SVD</A>
+<LI><A NAME="tex2html544" HREF="node183.html#SECTION0004170000000000000000">
+SLA_TP2S - Tangent Plane to Spherical</A>
+<LI><A NAME="tex2html545" HREF="node184.html#SECTION0004171000000000000000">
+SLA_TP2V - Tangent Plane to Direction Cosines</A>
+<LI><A NAME="tex2html546" HREF="node185.html#SECTION0004172000000000000000">
+SLA_TPS2C - Plate centre from <IMG WIDTH="26" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img90.gif"
+ ALT="$\xi,\eta$"> and <IMG WIDTH="28" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img91.gif"
+ ALT="$\alpha,\delta$"></A>
+<LI><A NAME="tex2html547" HREF="node186.html#SECTION0004173000000000000000">
+SLA_TPV2C - Plate centre from <IMG WIDTH="26" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img90.gif"
+ ALT="$\xi,\eta$"> and <I>x</I>,<I>y</I>,<I>z</I></A>
+<LI><A NAME="tex2html548" HREF="node187.html#SECTION0004174000000000000000">
+SLA_UE2EL - Universal to Conventional Elements</A>
+<LI><A NAME="tex2html549" HREF="node188.html#SECTION0004175000000000000000">
+SLA_UE2PV - Pos/Vel from Universal Elements</A>
+<LI><A NAME="tex2html550" HREF="node189.html#SECTION0004176000000000000000">
+SLA_UNPCD - Remove Radial Distortion</A>
+<LI><A NAME="tex2html551" HREF="node190.html#SECTION0004177000000000000000">
+SLA_V2TP - Direction Cosines to Tangent Plane</A>
+<LI><A NAME="tex2html552" HREF="node191.html#SECTION0004178000000000000000">
+SLA_VDV - Scalar Product</A>
+<LI><A NAME="tex2html553" HREF="node192.html#SECTION0004179000000000000000">
+SLA_VN - Normalize Vector</A>
+<LI><A NAME="tex2html554" HREF="node193.html#SECTION0004180000000000000000">
+SLA_VXV - Vector Product</A>
+<LI><A NAME="tex2html555" HREF="node194.html#SECTION0004181000000000000000">
+SLA_WAIT - Time Delay</A>
+<LI><A NAME="tex2html556" HREF="node195.html#SECTION0004182000000000000000">
+SLA_XY2XY - Apply Linear Model to an <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$"></A>
+<LI><A NAME="tex2html557" HREF="node196.html#SECTION0004183000000000000000">
+SLA_ZD - <IMG WIDTH="27" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img65.gif"
+ ALT="$h,\delta$"> to Zenith Distance</A>
+</UL>
+<!--End of Table of Child-Links-->
+<BR> <HR>
+<A NAME="tex2html373" HREF="node14.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html371" HREF="sun67.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html365" HREF="node12.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html374" HREF="node14.html">SLA_ADDET - Add E-terms of Aberration</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html372" HREF="sun67.html">SLALIB Positional Astronomy Library</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html366" HREF="node12.html">LINKING</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node130.html b/src/slalib/sun67.htx/node130.html
new file mode 100644
index 0000000..99d6086
--- /dev/null
+++ b/src/slalib/sun67.htx/node130.html
@@ -0,0 +1,140 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_MOON - Approx Moon Pos/Vel</TITLE>
+<META NAME="description" CONTENT="SLA_MOON - Approx Moon Pos/Vel">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node131.html">
+<LINK REL="previous" HREF="node129.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node131.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1726" HREF="node131.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1724" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1718" HREF="node129.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1727" HREF="node131.html">SLA_MXM - Multiply Matrices</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1725" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1719" HREF="node129.html">SLA_MAPQKZ - Quick Mean-Appt, no PM etc.</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004117000000000000000">SLA_MOON - Approx Moon Pos/Vel</A>
+<A NAME="xref_SLA_MOON">&#160;</A><A NAME="SLA_MOON">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Approximate geocentric position and velocity of the Moon
+(single precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_MOON (IY, ID, FD, PV)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>IY</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>year</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ID</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>day in year (1 = Jan 1st)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>FD</EM></TD>
+<TD ALIGN="LEFT"><B>R </B></TD>
+<TD ALIGN="LEFT" NOWRAP>fraction of day</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PV</EM></TD>
+<TH ALIGN="LEFT"><B>R(6)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>Moon <IMG WIDTH="106" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img51.gif"
+ ALT="$[\,x,y,z,\dot{x},\dot{y},\dot{z}\,]$">, mean equator and equinox of
+date (AU, AU&nbsp;s<SUP>-1</SUP>)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The date and time is TDB (loosely ET) in a Julian calendar
+which has been aligned to the ordinary Gregorian
+calendar for the interval 1900 March 1 to 2100 February 28.
+ The year and day can be obtained by calling sla_CALYD or
+ sla_CLYD.
+ <DT>2.
+<DD>The position is accurate to better than 0.5&nbsp;arcminute
+ in direction and 1000&nbsp;km in distance. The velocity
+ is accurate to better than
+ <IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img83.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.5$"> per hour in direction
+ and 4&nbsp;metres per socond in distance. (RMS figures with respect
+ to JPL DE200 for the interval 1960-2025 are <IMG WIDTH="25" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img126.gif"
+ ALT="$14\hspace{-0.05em}^{'\hspace{-0.1em}'}$"> and
+<P> <IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img76.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.2$"> per hour in longitude, <IMG WIDTH="17" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img127.gif"
+ ALT="$9\hspace{-0.05em}^{'\hspace{-0.1em}'}$"> and
+ <IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img76.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.2$"><P>
+per hour in latitude, 350&nbsp;km and 2&nbsp;metres per second in distance.)
+ Note that the distance accuracy is comparatively poor because this
+ routine is principally intended for computing topocentric direction.
+ <DT>3.
+<DD>This routine is only a partial implementation of the original
+ Meeus algorithm (reference below), which offers 4 times the
+ accuracy in direction and 20 times the accuracy in distance
+ when fully implemented (as it is in sla_DMOON).
+ </DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCE:</STRONG>
+<DD>Meeus, <I>l'Astronomie</I>, June 1984, p348.
+</DL>
+<BR> <HR>
+<A NAME="tex2html1726" HREF="node131.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1724" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1718" HREF="node129.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1727" HREF="node131.html">SLA_MXM - Multiply Matrices</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1725" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1719" HREF="node129.html">SLA_MAPQKZ - Quick Mean-Appt, no PM etc.</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node131.html b/src/slalib/sun67.htx/node131.html
new file mode 100644
index 0000000..7ee2c74
--- /dev/null
+++ b/src/slalib/sun67.htx/node131.html
@@ -0,0 +1,106 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_MXM - Multiply Matrices</TITLE>
+<META NAME="description" CONTENT="SLA_MXM - Multiply Matrices">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node132.html">
+<LINK REL="previous" HREF="node130.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node132.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1736" HREF="node132.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1734" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1728" HREF="node130.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1737" HREF="node132.html">SLA_MXV - Apply 3D Rotation</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1735" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1729" HREF="node130.html">SLA_MOON - Approx Moon Pos/Vel</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004118000000000000000">&#160;</A><A NAME="xref_SLA_MXM">&#160;</A><A NAME="SLA_MXM">&#160;</A>
+<BR>
+SLA_MXM - Multiply <IMG WIDTH="39" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img18.gif"
+ ALT="$3\times3$"> Matrices
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Product of two <IMG WIDTH="39" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img18.gif"
+ ALT="$3\times3$"> matrices (single precision).
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_MXM (A, B, C)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>A</EM></TD>
+<TH ALIGN="LEFT"><B>R(3,3)</B></TH>
+<TH ALIGN="LEFT" NOWRAP>matrix <B>A</B></TH>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>B</EM></TD>
+<TD ALIGN="LEFT"><B>R(3,3)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>matrix <B>B</B></TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>C</EM></TD>
+<TH ALIGN="LEFT"><B>R(3,3)</B></TH>
+<TH ALIGN="LEFT" NOWRAP>matrix result: <B>A</B><IMG WIDTH="15" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img84.gif"
+ ALT="$\times$"><B>B</B></TH>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTE:</STRONG>
+<DD>To comply with the ANSI Fortran 77 standard, A, B and C must
+be different arrays. The routine is, in fact, coded
+ so as to work properly on the VAX and many other systems even
+ if this rule is violated, something that is <B>not</B>, however,
+ recommended.
+ </DL>
+<BR> <HR>
+<A NAME="tex2html1736" HREF="node132.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1734" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1728" HREF="node130.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1737" HREF="node132.html">SLA_MXV - Apply 3D Rotation</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1735" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1729" HREF="node130.html">SLA_MOON - Approx Moon Pos/Vel</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node132.html b/src/slalib/sun67.htx/node132.html
new file mode 100644
index 0000000..5084d3d
--- /dev/null
+++ b/src/slalib/sun67.htx/node132.html
@@ -0,0 +1,117 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_MXV - Apply 3D Rotation</TITLE>
+<META NAME="description" CONTENT="SLA_MXV - Apply 3D Rotation">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node133.html">
+<LINK REL="previous" HREF="node131.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node133.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1746" HREF="node133.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1744" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1738" HREF="node131.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1747" HREF="node133.html">SLA_NUT - Nutation Matrix</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1745" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1739" HREF="node131.html">SLA_MXM - Multiply Matrices</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004119000000000000000">SLA_MXV - Apply 3D Rotation</A>
+<A NAME="xref_SLA_MXV">&#160;</A><A NAME="SLA_MXV">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Multiply a 3-vector by a rotation matrix (single precision).
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_MXV (RM, VA, VB)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RM</EM></TD>
+<TH ALIGN="LEFT"><B>R(3,3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>rotation matrix</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>VA</EM></TD>
+<TD ALIGN="LEFT"><B>R(3)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>vector to be rotated</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>VB</EM></TD>
+<TH ALIGN="LEFT"><B>R(3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>result vector</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>This routine performs the operation:
+<BLOCKQUOTE><B>b</B> = <B>M</B><IMG WIDTH="7" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img72.gif"
+ ALT="$\cdot$"><B>a</B>
+</BLOCKQUOTE>
+ where <B>a</B> and <B>b</B> are the 3-vectors VA and VB
+ respectively, and <B>M</B> is the <IMG WIDTH="39" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img18.gif"
+ ALT="$3\times3$"> matrix RM.
+ <DT>2.
+<DD>The main function of this routine is apply a
+ rotation; under these circumstances, <IMG WIDTH="20" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img122.gif"
+ ALT="${\bf M}$"> is a
+ <I>proper real orthogonal</I> matrix.
+ <DT>3.
+<DD>To comply with the ANSI Fortran 77 standard, VA and VB must
+ <B>not</B> be the same array. The routine is, in fact, coded
+ so as to work properly on the VAX and many other systems even
+ if this rule is violated, something that is <B>not</B>, however,
+ recommended.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1746" HREF="node133.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1744" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1738" HREF="node131.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1747" HREF="node133.html">SLA_NUT - Nutation Matrix</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1745" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1739" HREF="node131.html">SLA_MXM - Multiply Matrices</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node133.html b/src/slalib/sun67.htx/node133.html
new file mode 100644
index 0000000..a849a15
--- /dev/null
+++ b/src/slalib/sun67.htx/node133.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_NUT - Nutation Matrix</TITLE>
+<META NAME="description" CONTENT="SLA_NUT - Nutation Matrix">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node134.html">
+<LINK REL="previous" HREF="node132.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node134.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1756" HREF="node134.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1754" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1748" HREF="node132.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1757" HREF="node134.html">SLA_NUTC - Nutation Components</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1755" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1749" HREF="node132.html">SLA_MXV - Apply 3D Rotation</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004120000000000000000">SLA_NUT - Nutation Matrix</A>
+<A NAME="xref_SLA_NUT">&#160;</A><A NAME="SLA_NUT">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Form the matrix of nutation (IAU 1980 theory) for a given date.
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_NUT (DATE, RMATN)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DATE</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>TDB (formerly ET) as Modified Julian Date
+(JD-2400000.5)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RMATN</EM></TD>
+<TH ALIGN="LEFT"><B>D(3,3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>nutation matrix</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTE:</STRONG>
+<DD>The matrix is in the sense:
+<BLOCKQUOTE><B>v</B><SUB><I>true</I></SUB> = <B>M</B><IMG WIDTH="7" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img72.gif"
+ ALT="$\cdot$"><B>v</B><SUB><I>mean</I></SUB></BLOCKQUOTE>
+ where <B>v</B><SUB><I>true</I></SUB> is the star vector relative to the
+ true equator and equinox of date, <B>M</B> is the
+ <IMG WIDTH="39" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img18.gif"
+ ALT="$3\times3$"> matrix RMATN and
+ <B>v</B><SUB><I>mean</I></SUB> is the star vector relative to the
+ mean equator and equinox of date.
+ </DL>
+<P> <DL>
+<DT><STRONG>REFERENCES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>Final report of the IAU Working Group on Nutation,
+chairman P.K.Seidelmann, 1980.
+<DT>2.
+<DD>Kaplan, G.H., 1981. <I>USNO circular No. 163</I>, pA3-6.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1756" HREF="node134.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1754" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1748" HREF="node132.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1757" HREF="node134.html">SLA_NUTC - Nutation Components</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1755" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1749" HREF="node132.html">SLA_MXV - Apply 3D Rotation</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node134.html b/src/slalib/sun67.htx/node134.html
new file mode 100644
index 0000000..a2b5df6
--- /dev/null
+++ b/src/slalib/sun67.htx/node134.html
@@ -0,0 +1,102 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_NUTC - Nutation Components</TITLE>
+<META NAME="description" CONTENT="SLA_NUTC - Nutation Components">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node135.html">
+<LINK REL="previous" HREF="node133.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node135.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1766" HREF="node135.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1764" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1758" HREF="node133.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1767" HREF="node135.html">SLA_OAP - Observed to Apparent</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1765" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1759" HREF="node133.html">SLA_NUT - Nutation Matrix</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004121000000000000000">SLA_NUTC - Nutation Components</A>
+<A NAME="xref_SLA_NUTC">&#160;</A><A NAME="SLA_NUTC">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Nutation (IAU 1980 theory): longitude &amp; obliquity
+components, and mean obliquity.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_NUTC (DATE, DPSI, DEPS, EPS0)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DATE</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>TDB (formerly ET) as Modified Julian Date
+(JD-2400000.5)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DPSI,DEPS</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>nutation in longitude and obliquity (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>EPS0</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>mean obliquity (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>REFERENCES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>Final report of the IAU Working Group on Nutation,
+chairman P.K.Seidelmann, 1980.
+<DT>2.
+<DD>Kaplan, G.H., 1981. <I>USNO circular no. 163</I>, pA3-6.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1766" HREF="node135.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1764" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1758" HREF="node133.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1767" HREF="node135.html">SLA_OAP - Observed to Apparent</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1765" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1759" HREF="node133.html">SLA_NUT - Nutation Matrix</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node135.html b/src/slalib/sun67.htx/node135.html
new file mode 100644
index 0000000..753bc4c
--- /dev/null
+++ b/src/slalib/sun67.htx/node135.html
@@ -0,0 +1,319 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_OAP - Observed to Apparent</TITLE>
+<META NAME="description" CONTENT="SLA_OAP - Observed to Apparent">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node136.html">
+<LINK REL="previous" HREF="node134.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node136.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1776" HREF="node136.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1774" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1768" HREF="node134.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1777" HREF="node136.html">SLA_OAPQK - Quick Observed to Apparent</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1775" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1769" HREF="node134.html">SLA_NUTC - Nutation Components</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004122000000000000000">SLA_OAP - Observed to Apparent</A>
+<A NAME="xref_SLA_OAP">&#160;</A><A NAME="SLA_OAP">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Observed to apparent place.
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_OAP (
+ TYPE, OB1, OB2, DATE, DUT, ELONGM, PHIM,
+ HM, XP, YP, TDK, PMB, RH, WL, TLR, RAP, DAP)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>TYPE</EM></TD>
+<TH ALIGN="LEFT"><B>C*(*)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>type of coordinates - `R', `H' or `A' (see below)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>OB1</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>observed Az, HA or RA (radians; Az is N=0, E=<IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img22.gif"
+ ALT="$90^{\circ}$">)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>OB2</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>observed zenith distance or <IMG WIDTH="10" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img23.gif"
+ ALT="$\delta$"> (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DATE</EM></TD>
+<TD ALIGN="LEFT"><B>D </B></TD>
+<TD ALIGN="LEFT" NOWRAP>UTC date/time (Modified Julian Date, JD-2400000.5)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DUT</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="16" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img19.gif"
+ ALT="$\Delta$">UT: UT1-UTC (UTC seconds)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ELONGM</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>observer's mean longitude (radians, east +ve)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PHIM</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>observer's mean geodetic latitude (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>HM</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>observer's height above sea level (metres)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>XP,YP</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>polar motion <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$"> coordinates (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>TDK</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>local ambient temperature (degrees K; std=273.155D0)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PMB</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>local atmospheric pressure (mB; std=1013.25D0)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RH</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>local relative humidity (in the range 0D0-1D0)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>WL</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>effective wavelength (<IMG WIDTH="26" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img21.gif"
+ ALT="$\mu{\rm m}$">, <I>e.g.</I> 0.55D0)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>TLR</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>tropospheric lapse rate (degrees K per metre,
+<I>e.g.</I> 0.0065D0)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RAP,DAP</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>geocentric apparent <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"></TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>Only the first character of the TYPE argument is significant.
+`R' or `r' indicates that OBS1 and OBS2 are the observed Right
+Ascension and Declination; `H' or `h' indicates that they are
+ Hour Angle (west +ve) and Declination; anything else (`A' or
+ `a' is recommended) indicates that OBS1 and OBS2 are Azimuth
+ (north zero, east is <IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img22.gif"
+ ALT="$90^{\circ}$">) and Zenith Distance. (Zenith
+ distance is used rather than elevation in order to reflect the
+ fact that no allowance is made for depression of the horizon.)
+ <DT>2.
+<DD>The accuracy of the result is limited by the corrections for
+ refraction. Providing the meteorological parameters are
+ known accurately and there are no gross local effects, the
+ predicted azimuth and elevation should be within about
+<P> <IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img25.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.1$"> for <IMG WIDTH="56" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img26.gif"
+ ALT="$\zeta<70^{\circ}$">. Even
+ at a topocentric zenith distance of
+ <IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img22.gif"
+ ALT="$90^{\circ}$">, the accuracy in elevation should be better than
+ 1&nbsp;arcminute; useful results are available for a further
+ <IMG WIDTH="18" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img27.gif"
+ ALT="$3^{\circ}$">, beyond which the sla_REFRO routine returns a
+ fixed value of the refraction. The complementary
+ routines sla_AOP (or sla_AOPQK) and sla_OAP (or sla_OAPQK)
+ are self-consistent to better than 1&nbsp;microarcsecond all over
+ the celestial sphere.
+ <DT>3.
+<DD>It is advisable to take great care with units, as even
+ unlikely values of the input parameters are accepted and
+ processed in accordance with the models used.
+ <DT>4.
+<DD><I>Observed</I> <IMG WIDTH="66" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img28.gif"
+ ALT="$[\,Az,El~]$"> means the position that would be seen by a
+ perfect theodolite located at the observer. This is
+ related to the observed <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$"> via the standard rotation, using
+ the geodetic latitude (corrected for polar motion), while the
+ observed HA and RA are related simply through the local
+ apparent ST. <I>Observed</I> <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> or <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$"> thus means the
+ position that would be seen by a perfect equatorial located
+ at the observer and with its polar axis aligned to the
+ Earth's axis of rotation (<I>n.b.</I> not to the refracted pole).
+ By removing from the observed place the effects of
+ atmospheric refraction and diurnal aberration, the
+ geocentric apparent <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> is obtained.
+ <DT>5.
+<DD>Frequently, <I>mean</I> rather than <I>apparent</I>
+ <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> will be required,
+ in which case further transformations will be necessary. The
+ sla_AMP <I>etc.</I> routines will convert
+ the apparent <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> produced
+ by the present routine into an FK5 J2000 mean place, by
+ allowing for the Sun's gravitational lens effect, annual
+ aberration, nutation and precession. Should FK4 B1950
+ coordinates be needed, the routines sla_FK524 <I>etc.</I> will also
+ need to be applied.
+ <DT>6.
+<DD>To convert to apparent <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> the coordinates read from a
+ real telescope, corrections would have to be applied for
+ encoder zero points, gear and encoder errors, tube flexure,
+ the position of the rotator axis and the pointing axis
+ relative to it, non-perpendicularity between the mounting
+ axes, and finally for the tilt of the azimuth or polar axis
+ of the mounting (with appropriate corrections for mount
+ flexures). Some telescopes would, of course, exhibit other
+ properties which would need to be accounted for at the
+ appropriate point in the sequence.
+ <DT>7.
+<DD>The star-independent apparent-to-observed-place parameters
+ in AOPRMS may be computed by means of the sla_AOPPA routine.
+ If nothing has changed significantly except the time, the
+ sla_AOPPAT routine may be used to perform the requisite
+ partial recomputation of AOPRMS.
+ <DT>8.
+<DD>The DATE argument is UTC expressed as an MJD. This is,
+ strictly speaking, wrong, because of leap seconds. However,
+ as long as the <IMG WIDTH="16" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img19.gif"
+ ALT="$\Delta$">UT and the UTC are consistent there
+ are no difficulties, except during a leap second. In this
+ case, the start of the 61st second of the final minute should
+ begin a new MJD day and the old pre-leap <IMG WIDTH="16" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img19.gif"
+ ALT="$\Delta$">UT should
+ continue to be used. As the 61st second completes, the MJD
+ should revert to the start of the day as, simultaneously,
+ the <IMG WIDTH="16" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img19.gif"
+ ALT="$\Delta$">UT changes by one second to its post-leap new value.
+ <DT>9.
+<DD>The <IMG WIDTH="16" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img19.gif"
+ ALT="$\Delta$">UT (UT1-UTC) is tabulated in IERS circulars and
+ elsewhere. It increases by exactly one second at the end of
+ each UTC leap second, introduced in order to keep <IMG WIDTH="16" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img19.gif"
+ ALT="$\Delta$">UT
+ within <IMG WIDTH="15" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img30.gif"
+ ALT="$\pm$"><IMG WIDTH="24" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img31.gif"
+ ALT="$0^{\rm s}\hspace{-0.3em}.9$">. <DT>10.
+<DD>IMPORTANT - TAKE CARE WITH THE LONGITUDE SIGN CONVENTION. The
+ longitude required by the present routine is <B>east-positive</B>,
+ in accordance with geographical convention (and right-handed).
+ In particular, note that the longitudes returned by the
+ sla_OBS routine are west-positive (as in the <I>Astronomical
+ Almanac</I> before 1984) and must be reversed in sign before use
+ in the present routine.
+ <DT>11.
+<DD>The polar coordinates XP,YP can be obtained from IERS
+ circulars and equivalent publications. The
+ maximum amplitude is about
+ <IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img32.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.3$"> . If XP,YP values
+ are unavailable, use XP=YP=0D0. See page B60 of the 1988
+ <I>Astronomical Almanac</I> for a definition of the two angles.
+ <DT>12.
+<DD>The height above sea level of the observing station, HM,
+ can be obtained from the <I>Astronomical Almanac</I> (Section J
+ in the 1988 edition), or via the routine sla_OBS. If P,
+ the pressure in mB, is available, an adequate
+ estimate of HM can be obtained from the following expression:
+ <BLOCKQUOTE><TT>HM=-29.3D0*TSL*LOG(P/1013.25D0)</TT>
+ </BLOCKQUOTE>
+ where TSL is the approximate sea-level air temperature in degrees K
+ (see <I>Astrophysical Quantities</I>, C.W.Allen, 3rd&nbsp;edition,
+ &#167;52). Similarly, if the pressure P is not known,
+ it can be estimated from the height of the observing
+ station, HM as follows:
+ <BLOCKQUOTE><TT>P=1013.25D0*EXP(-HM/(29.3D0*TSL))</TT>
+ </BLOCKQUOTE>
+ Note, however, that the refraction is proportional to the
+ pressure and that an accurate P value is important for
+ precise work.
+ <DT>13.
+<DD>The azimuths <I>etc.</I> used by the present routine are with
+ respect to the celestial pole. Corrections from the terrestrial pole
+ can be computed using sla_POLMO.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1776" HREF="node136.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1774" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1768" HREF="node134.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1777" HREF="node136.html">SLA_OAPQK - Quick Observed to Apparent</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1775" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1769" HREF="node134.html">SLA_NUTC - Nutation Components</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node136.html b/src/slalib/sun67.htx/node136.html
new file mode 100644
index 0000000..dbf0e88
--- /dev/null
+++ b/src/slalib/sun67.htx/node136.html
@@ -0,0 +1,258 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_OAPQK - Quick Observed to Apparent</TITLE>
+<META NAME="description" CONTENT="SLA_OAPQK - Quick Observed to Apparent">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node137.html">
+<LINK REL="previous" HREF="node135.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node137.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1786" HREF="node137.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1784" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1778" HREF="node135.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1787" HREF="node137.html">SLA_OBS - Observatory Parameters</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1785" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1779" HREF="node135.html">SLA_OAP - Observed to Apparent</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004123000000000000000">SLA_OAPQK - Quick Observed to Apparent</A>
+<A NAME="xref_SLA_OAPQK">&#160;</A><A NAME="SLA_OAPQK">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Quick observed to apparent place.
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_OAPQK (TYPE, OB1, OB2, AOPRMS, RAP, DAP)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>TYPE</EM></TD>
+<TH ALIGN="LEFT"><B>C*(*)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>type of coordinates - `R', `H' or `A' (see below)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>OB1</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>observed Az, HA or RA (radians; Az is N=0, E=<IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img22.gif"
+ ALT="$90^{\circ}$">)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>OB2</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>observed zenith distance or <IMG WIDTH="10" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img23.gif"
+ ALT="$\delta$"> (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>AOPRMS</EM></TD>
+<TD ALIGN="LEFT"><B>D(14)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>star-independent apparent-to-observed parameters:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(1)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>geodetic latitude (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(2,3)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>sine and cosine of geodetic latitude</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(4)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>magnitude of diurnal aberration vector</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(5)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>height (HM)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(6)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>ambient temperature (TDK)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(7)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>pressure (PMB)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(8)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>relative humidity (RH)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(9)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>wavelength (WL)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(10)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>lapse rate (TLR)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(11,12)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>refraction constants A and B (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(13)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>longitude + eqn of equinoxes +
+``sidereal <IMG WIDTH="16" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img19.gif"
+ ALT="$\Delta$">UT'' (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(14)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>local apparent sidereal time (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RAP,DAP</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>geocentric apparent <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"></TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>Only the first character of the TYPE argument is significant.
+`R' or `r' indicates that OBS1 and OBS2 are the observed Right
+Ascension and Declination; `H' or `h' indicates that they are
+ Hour Angle (west +ve) and Declination; anything else (`A' or
+ `a' is recommended) indicates that OBS1 and OBS2 are Azimuth
+ (north zero, east is <IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img22.gif"
+ ALT="$90^{\circ}$">) and Zenith Distance. (Zenith
+ distance is used rather than elevation in order to reflect the
+ fact that no allowance is made for depression of the horizon.)
+ <DT>2.
+<DD>The accuracy of the result is limited by the corrections for
+ refraction. Providing the meteorological parameters are
+ known accurately and there are no gross local effects, the
+ predicted azimuth and elevation should be within about
+<P> <IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img25.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.1$"> for <IMG WIDTH="56" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img26.gif"
+ ALT="$\zeta<70^{\circ}$">. Even
+ at a topocentric zenith distance of
+ <IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img22.gif"
+ ALT="$90^{\circ}$">, the accuracy in elevation should be better than
+ 1&nbsp;arcminute; useful results are available for a further
+ <IMG WIDTH="18" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img27.gif"
+ ALT="$3^{\circ}$">, beyond which the sla_REFRO routine returns a
+ fixed value of the refraction. The complementary
+ routines sla_AOP (or sla_AOPQK) and sla_OAP (or sla_OAPQK)
+ are self-consistent to better than 1&nbsp;microarcsecond all over
+ the celestial sphere.
+ <DT>3.
+<DD>It is advisable to take great care with units, as even
+ unlikely values of the input parameters are accepted and
+ processed in accordance with the models used.
+ <DT>4.
+<DD><I>Observed</I> <IMG WIDTH="66" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img28.gif"
+ ALT="$[\,Az,El~]$"> means the position that would be seen by a
+ perfect theodolite located at the observer. This is
+ related to the observed <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$"> via the standard rotation, using
+ the geodetic latitude (corrected for polar motion), while the
+ observed HA and RA are related simply through the local
+ apparent ST. <I>Observed</I> <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> or <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$"> thus means the
+ position that would be seen by a perfect equatorial located
+ at the observer and with its polar axis aligned to the
+ Earth's axis of rotation (<I>n.b.</I> not to the refracted pole).
+ By removing from the observed place the effects of
+ atmospheric refraction and diurnal aberration, the
+ geocentric apparent <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> is obtained.
+ <DT>5.
+<DD>Frequently, <I>mean</I> rather than <I>apparent</I>
+ <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> will be required,
+ in which case further transformations will be necessary. The
+ sla_AMP <I>etc.</I> routines will convert
+ the apparent <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> produced
+ by the present routine into an FK5 J2000 mean place, by
+ allowing for the Sun's gravitational lens effect, annual
+ aberration, nutation and precession. Should FK4 B1950
+ coordinates be needed, the routines sla_FK524 <I>etc.</I> will also
+ need to be applied.
+ <DT>6.
+<DD>To convert to apparent <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> the coordinates read from a
+ real telescope, corrections would have to be applied for
+ encoder zero points, gear and encoder errors, tube flexure,
+ the position of the rotator axis and the pointing axis
+ relative to it, non-perpendicularity between the mounting
+ axes, and finally for the tilt of the azimuth or polar axis
+ of the mounting (with appropriate corrections for mount
+ flexures). Some telescopes would, of course, exhibit other
+ properties which would need to be accounted for at the
+ appropriate point in the sequence.
+ <DT>7.
+<DD>The star-independent apparent-to-observed-place parameters
+ in AOPRMS may be computed by means of the sla_AOPPA routine.
+ If nothing has changed significantly except the time, the
+ sla_AOPPAT routine may be used to perform the requisite
+ partial recomputation of AOPRMS.
+ <DT>8.
+<DD>The azimuths <I>etc.</I> used by the present routine are with
+ respect to the celestial pole. Corrections from the terrestrial pole
+ can be computed using sla_POLMO.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1786" HREF="node137.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1784" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1778" HREF="node135.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1787" HREF="node137.html">SLA_OBS - Observatory Parameters</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1785" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1779" HREF="node135.html">SLA_OAP - Observed to Apparent</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node137.html b/src/slalib/sun67.htx/node137.html
new file mode 100644
index 0000000..eda8158
--- /dev/null
+++ b/src/slalib/sun67.htx/node137.html
@@ -0,0 +1,247 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_OBS - Observatory Parameters</TITLE>
+<META NAME="description" CONTENT="SLA_OBS - Observatory Parameters">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node138.html">
+<LINK REL="previous" HREF="node136.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node138.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1796" HREF="node138.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1794" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1788" HREF="node136.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1797" HREF="node138.html">SLA_PA - to Parallactic Angle</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1795" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1789" HREF="node136.html">SLA_OAPQK - Quick Observed to Apparent</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004124000000000000000">SLA_OBS - Observatory Parameters</A>
+<A NAME="xref_SLA_OBS">&#160;</A><A NAME="SLA_OBS">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Look up an entry in a standard list of
+groundbased observing stations parameters.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_OBS (N, C, NAME, W, P, H)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>N</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>number specifying observing station</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>GIVEN or RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>C</EM></TD>
+<TH ALIGN="LEFT"><B>C*(*)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>identifier specifying observing station</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>NAME</EM></TD>
+<TH ALIGN="LEFT"><B>C*(*)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>name of specified observing station</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>W</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>longitude (radians, west +ve)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>P</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>geodetic latitude (radians, north +ve)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>H</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>height above sea level (metres)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>Station identifiers C may be up to 10 characters long,
+and station names NAME may be up to 40 characters long.
+<DT>2.
+<DD>C and N are <I>alternative</I> ways of specifying the observing
+ station. The C option, which is the most generally useful,
+ may be selected by specifying an N value of zero or less.
+ If N is 1 or more, the parameters of the Nth station
+ in the currently supported list are interrogated, and
+ the station identifier C is returned as well as NAME, W,
+ P and H.
+ <DT>3.
+<DD>If the station parameters are not available, either because
+ the station identifier C is not recognized, or because an
+ N value greater than the number of stations supported is
+ given, a name of `?' is returned and W, P and H are left in
+ their current states.
+ <DT>4.
+<DD>Programs can obtain a list of all currently supported
+ stations by calling the routine repeatedly, with N=1,2,3...
+ When NAME=`?' is seen, the list of stations has been
+ exhausted. The stations at the time of writing are listed
+ below.
+ <DT>5.
+<DD>Station numbers, identifiers, names and other details are
+ subject to change and should not be hardwired into
+ application programs.
+ <DT>6.
+<DD>All station identifiers C are uppercase only; lower case
+ characters must be converted to uppercase by the calling
+ program. The station names returned may contain both upper-
+ and lowercase. All characters up to the first space are
+ checked; thus an abbreviated ID will return the parameters
+ for the first station in the list which matches the
+ abbreviation supplied, and no station in the list will ever
+ contain embedded spaces. C must not have leading spaces.
+ <DT>7.
+<DD>IMPORTANT - BEWARE OF THE LONGITUDE SIGN CONVENTION. The
+ longitude returned by sla_OBS is
+ <B>west-positive</B>, following the pre-1984 <I>Astronomical
+ Almanac</I>. However, this sign convention is left-handed and is
+ the opposite of the one now used; elsewhere in
+ SLALIB the preferable east-positive convention is used. In
+ particular, note that for use in sla_AOP, sla_AOPPA and
+ sla_OAP the sign of the longitude must be reversed.
+ <DT>8.
+<DD>Users are urged to inform the author of any improvements
+ they would like to see made. For example:
+ <UL>
+<LI> typographical corrections
+<LI> more accurate parameters
+<LI> better station identifiers or names
+<LI> additional stations
+ </UL></DL>
+Stations supported by sla_OBS at the time of writing:
+<PRE><TT>
+<I>ID</I> <I>NAME</I>
+&nbsp;
+AAT Anglo-Australian 3.9m Telescope
+ANU2.3 Siding Spring 2.3 metre
+APO3.5 Apache Point 3.5m
+ARECIBO Arecibo 1000 foot
+ATCA Australia Telescope Compact Array
+BLOEMF Bloemfontein 1.52 metre
+BOSQALEGRE Bosque Alegre 1.54 metre
+CAMB1MILE Cambridge 1 mile
+CAMB5KM Cambridge 5km
+CATALINA61 Catalina 61 inch
+CFHT Canada-France-Hawaii 3.6m Telescope
+CSO Caltech Sub-mm Observatory, Mauna Kea
+DAO72 DAO Victoria BC 1.85 metre
+DUNLAP74 David Dunlap 74 inch
+DUPONT Du Pont 2.5m Telescope, Las Campanas
+EFFELSBERG Effelsberg 100 metre
+ESO3.6 ESO 3.6 metre
+ESONTT ESO 3.5 metre NTT
+ESOSCHM ESO 1 metre Schmidt, La Silla
+FCRAO Five College Radio Astronomy Obs
+FLAGSTF61 USNO 61 inch astrograph, Flagstaff
+GBVA140 Greenbank 140 foot
+GBVA300 Greenbank 300 foot
+GEMININ Gemini North 8-m telescope
+HARVARD Harvard College Observatory 1.55m
+HPROV1.52 Haute Provence 1.52 metre
+HPROV1.93 Haute Provence 1.93 metre
+IRTF NASA IR Telescope Facility, Mauna Kea
+JCMT JCMT 15 metre
+JODRELL1 Jodrell Bank 250 foot
+KECK1 Keck 10m Telescope 1
+KECK2 Keck 10m Telescope 2
+KISO Kiso 1.05 metre Schmidt, Japan
+KOTTAMIA Kottamia 74 inch
+KPNO158 Kitt Peak 158 inch
+KPNO36FT Kitt Peak 36 foot
+KPNO84 Kitt Peak 84 inch
+KPNO90 Kitt Peak 90 inch
+LICK120 Lick 120 inch
+LOWELL72 Perkins 72 inch, Lowell
+LPO1 Jacobus Kapteyn 1m Telescope
+LPO2.5 Isaac Newton 2.5m Telescope
+LPO4.2 William Herschel 4.2m Telescope
+MAUNAK88 Mauna Kea 88 inch
+MCDONLD2.1 McDonald 2.1 metre
+MCDONLD2.7 McDonald 2.7 metre
+MMT MMT, Mt Hopkins
+MOPRA ATNF Mopra Observatory
+MTEKAR Mt Ekar 1.82 metre
+MTHOP1.5 Mt Hopkins 1.5 metre
+MTLEMMON60 Mt Lemmon 60 inch
+NOBEYAMA Nobeyama 45 metre
+OKAYAMA Okayama 1.88 metre
+PALOMAR200 Palomar 200 inch
+PALOMAR48 Palomar 48-inch Schmidt
+PALOMAR60 Palomar 60 inch
+PARKES Parkes 64 metre
+QUEBEC1.6 Quebec 1.6 metre
+SAAO74 Sutherland 74 inch
+SANPM83 San Pedro Martir 83 inch
+ST.ANDREWS St Andrews University Observatory
+STEWARD90 Steward 90 inch
+STROMLO74 Mount Stromlo 74 inch
+SUBARU Subaru 8 metre
+SUGARGROVE Sugar Grove 150 foot
+TAUTNBG Tautenburg 2 metre
+TAUTSCHM Tautenberg 1.34 metre Schmidt
+TIDBINBLA Tidbinbilla 64 metre
+TOLOLO1.5M Cerro Tololo 1.5 metre
+TOLOLO4M Cerro Tololo 4 metre
+UKIRT UK Infra Red Telescope
+UKST UK 1.2 metre Schmidt, Siding Spring
+USSR6 USSR 6 metre
+USSR600 USSR 600 foot
+VLA Very Large Array
+</TT></PRE></DL>
+<BR> <HR>
+<A NAME="tex2html1796" HREF="node138.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1794" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1788" HREF="node136.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1797" HREF="node138.html">SLA_PA - to Parallactic Angle</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1795" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1789" HREF="node136.html">SLA_OAPQK - Quick Observed to Apparent</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node138.html b/src/slalib/sun67.htx/node138.html
new file mode 100644
index 0000000..d363298
--- /dev/null
+++ b/src/slalib/sun67.htx/node138.html
@@ -0,0 +1,116 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_PA - to Parallactic Angle</TITLE>
+<META NAME="description" CONTENT="SLA_PA - to Parallactic Angle">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node139.html">
+<LINK REL="previous" HREF="node137.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node139.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1806" HREF="node139.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1804" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1798" HREF="node137.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1807" HREF="node139.html">SLA_PAV - Position-Angle Between Two Directions</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1805" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1799" HREF="node137.html">SLA_OBS - Observatory Parameters</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004125000000000000000">&#160;</A><A NAME="xref_SLA_PA">&#160;</A><A NAME="SLA_PA">&#160;</A>
+<BR>
+SLA_PA - <IMG WIDTH="27" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img65.gif"
+ ALT="$h,\delta$"> to Parallactic Angle
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Hour angle and declination to parallactic angle
+(double precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>D&nbsp;=&nbsp;sla_PA (HA, DEC, PHI)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>HA</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>hour angle in radians (geocentric apparent)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DEC</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>declination in radians (geocentric apparent)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PHI</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>latitude in radians (geodetic)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>sla_PA</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>parallactic angle (radians, in the range <IMG WIDTH="25" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img47.gif"
+ ALT="$\pm \pi$">)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The parallactic angle at a point in the sky is the position
+angle of the vertical, <I>i.e.</I> the angle between the direction to
+the pole and to the zenith. In precise applications care must
+ be taken only to use geocentric apparent <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$"> and to consider
+ separately the effects of atmospheric refraction and telescope
+ mount errors.
+ <DT>2.
+<DD>At the pole a zero result is returned.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1806" HREF="node139.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1804" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1798" HREF="node137.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1807" HREF="node139.html">SLA_PAV - Position-Angle Between Two Directions</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1805" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1799" HREF="node137.html">SLA_OBS - Observatory Parameters</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node139.html b/src/slalib/sun67.htx/node139.html
new file mode 100644
index 0000000..13d3907
--- /dev/null
+++ b/src/slalib/sun67.htx/node139.html
@@ -0,0 +1,117 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_PAV - Position-Angle Between Two Directions</TITLE>
+<META NAME="description" CONTENT="SLA_PAV - Position-Angle Between Two Directions">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node140.html">
+<LINK REL="previous" HREF="node138.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node140.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1816" HREF="node140.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1814" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1808" HREF="node138.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1817" HREF="node140.html">SLA_PCD - Apply Radial Distortion</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1815" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1809" HREF="node138.html">SLA_PA - to Parallactic Angle</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004126000000000000000">SLA_PAV - Position-Angle Between Two Directions</A>
+<A NAME="xref_SLA_PAV">&#160;</A><A NAME="SLA_PAV">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Returns the bearing (position angle) of one celestial
+direction with respect to another (single precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>R&nbsp;=&nbsp;sla_PAV (V1, V2)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>V1</EM></TD>
+<TH ALIGN="LEFT"><B>R(3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>direction cosines of one point</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>V2</EM></TD>
+<TD ALIGN="LEFT"><B>R(3)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>directions cosines of the other point</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>sla_PAV</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>position-angle of 2nd point with respect to 1st</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The coordinate frames correspond to <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$">,<IMG WIDTH="38" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img46.gif"
+ ALT="$[\lambda,\phi]$"> <I>etc.</I>.
+<DT>2.
+<DD>The result is the bearing (position angle), in radians,
+ of point V2 as seen
+ from point V1. It is in the range <IMG WIDTH="25" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img47.gif"
+ ALT="$\pm \pi$">. The sense
+ is such that if V2
+ is a small distance due east of V1 the result
+ is about <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img14.gif"
+ ALT="$+\pi/2$">. Zero is returned
+ if the two points are coincident.
+ <DT>3.
+<DD>The routine sla_BEAR performs an equivalent function except
+ that the points are specified in the form of spherical coordinates.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1816" HREF="node140.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1814" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1808" HREF="node138.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1817" HREF="node140.html">SLA_PCD - Apply Radial Distortion</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1815" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1809" HREF="node138.html">SLA_PA - to Parallactic Angle</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node14.html b/src/slalib/sun67.htx/node14.html
new file mode 100644
index 0000000..9a2b861
--- /dev/null
+++ b/src/slalib/sun67.htx/node14.html
@@ -0,0 +1,112 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_ADDET - Add E-terms of Aberration</TITLE>
+<META NAME="description" CONTENT="SLA_ADDET - Add E-terms of Aberration">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node15.html">
+<LINK REL="previous" HREF="node13.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node15.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html566" HREF="node15.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html564" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html558" HREF="node13.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html567" HREF="node15.html">SLA_AFIN - Sexagesimal character string to angle</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html565" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html559" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION00041000000000000000">SLA_ADDET - Add E-terms of Aberration</A>
+<A NAME="xref_SLA_ADDET">&#160;</A><A NAME="SLA_ADDET">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Add the E-terms (elliptic component of annual aberration) to a
+pre IAU 1976 mean place to conform to the old catalogue convention.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_ADDET (RM, DM, EQ, RC, DC)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RM,DM</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> without E-terms (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>EQ</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>Besselian epoch of mean equator and equinox</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RC,DC</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> with E-terms included (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTE:</STRONG>
+<DD>Most star positions from pre-1984 optical catalogues (or
+obtained by astrometry with respect to such stars) have the
+ E-terms built-in. If it is necessary to convert a formal mean
+ place (for example a pulsar timing position) to one
+ consistent with such a star catalogue, then the
+ <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> should be adjusted using this routine.
+ </DL>
+<P> <DL>
+<DT><STRONG>REFERENCE:</STRONG>
+<DD><I>Explanatory Supplement to the Astronomical Ephemeris</I>,
+section 2D, page 48.
+ </DL>
+<BR> <HR>
+<A NAME="tex2html566" HREF="node15.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html564" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html558" HREF="node13.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html567" HREF="node15.html">SLA_AFIN - Sexagesimal character string to angle</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html565" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html559" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node140.html b/src/slalib/sun67.htx/node140.html
new file mode 100644
index 0000000..aaf99dc
--- /dev/null
+++ b/src/slalib/sun67.htx/node140.html
@@ -0,0 +1,148 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_PCD - Apply Radial Distortion</TITLE>
+<META NAME="description" CONTENT="SLA_PCD - Apply Radial Distortion">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node141.html">
+<LINK REL="previous" HREF="node139.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node141.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1826" HREF="node141.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1824" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1818" HREF="node139.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1827" HREF="node141.html">SLA_PDA2H - H.A. for a Given Azimuth</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1825" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1819" HREF="node139.html">SLA_PAV - Position-Angle Between Two Directions</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004127000000000000000">SLA_PCD - Apply Radial Distortion</A>
+<A NAME="xref_SLA_PCD">&#160;</A><A NAME="SLA_PCD">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Apply pincushion/barrel distortion to a tangent-plane <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$">.<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_PCD (DISCO,X,Y)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DISCO</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>pincushion/barrel distortion coefficient</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>X,Y</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>tangent-plane <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$"></TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>X,Y</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>distorted <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$"></TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The distortion is of the form <IMG WIDTH="103" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
+ SRC="img128.gif"
+ ALT="$\rho = r (1 + c r^{2})$">, where <I>r</I> is
+the radial distance from the tangent point, <I>c</I> is the DISCO
+argument, and <IMG WIDTH="11" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img129.gif"
+ ALT="$\rho$"> is the radial distance in the presence of
+ the distortion.
+ <DT>2.
+<DD>For <I>pincushion</I> distortion, C is +ve; for
+ <I>barrel</I> distortion, C is -ve.
+ <DT>3.
+<DD>For X,Y in units of one projection radius (in the case of
+ a photographic plate, the focal length), the following
+ DISCO values apply:
+<P> <BR>
+<BR>
+<BR>
+<P> <TABLE CELLPADDING=3 BORDER="1">
+<TR VALIGN="TOP"><TD ALIGN="LEFT" NOWRAP>Geometry</TD>
+<TD ALIGN="CENTER" NOWRAP>DISCO</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT" NOWRAP>astrograph</TD>
+<TD ALIGN="CENTER" NOWRAP>0.0</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT" NOWRAP>Schmidt</TD>
+<TD ALIGN="CENTER" NOWRAP>-0.3333</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT" NOWRAP>AAT PF doublet</TD>
+<TD ALIGN="CENTER" NOWRAP>+147.069</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT" NOWRAP>AAT PF triplet</TD>
+<TD ALIGN="CENTER" NOWRAP>+178.585</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT" NOWRAP>AAT f/8</TD>
+<TD ALIGN="CENTER" NOWRAP>+21.20</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT" NOWRAP>JKT f/8</TD>
+<TD ALIGN="CENTER" NOWRAP>+14.6</TD>
+</TR>
+</TABLE>
+<P> <BR>
+<BR>
+<BR>
+<P> <DT>4.
+<DD>There is a companion routine, sla_UNPCD, which performs
+ an approximately inverse operation.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1826" HREF="node141.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1824" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1818" HREF="node139.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1827" HREF="node141.html">SLA_PDA2H - H.A. for a Given Azimuth</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1825" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1819" HREF="node139.html">SLA_PAV - Position-Angle Between Two Directions</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node141.html b/src/slalib/sun67.htx/node141.html
new file mode 100644
index 0000000..6e011b5
--- /dev/null
+++ b/src/slalib/sun67.htx/node141.html
@@ -0,0 +1,107 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_PDA2H - H.A. for a Given Azimuth</TITLE>
+<META NAME="description" CONTENT="SLA_PDA2H - H.A. for a Given Azimuth">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node142.html">
+<LINK REL="previous" HREF="node140.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node142.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1836" HREF="node142.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1834" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1828" HREF="node140.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1837" HREF="node142.html">SLA_PDQ2H - H.A. for a Given P.A.</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1835" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1829" HREF="node140.html">SLA_PCD - Apply Radial Distortion</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004128000000000000000">SLA_PDA2H - H.A. for a Given Azimuth</A>
+<A NAME="xref_SLA_PDA2H">&#160;</A><A NAME="SLA_PDA2H">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Hour Angle corresponding to a given azimuth (double precision).
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_PDA2H (P, D, A, H1, J1, H2, J2)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>P</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>latitude</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>D</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>declination</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>A</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>azimuth</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>H1</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>hour angle: first solution if any</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>J1</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>flag: 0 = solution 1 is valid</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>H2</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>hour angle: second solution if any</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>J2</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>flag: 0 = solution 2 is valid</TD>
+</TR>
+</TABLE></DL>
+<BR> <HR>
+<A NAME="tex2html1836" HREF="node142.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1834" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1828" HREF="node140.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1837" HREF="node142.html">SLA_PDQ2H - H.A. for a Given P.A.</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1835" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1829" HREF="node140.html">SLA_PCD - Apply Radial Distortion</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node142.html b/src/slalib/sun67.htx/node142.html
new file mode 100644
index 0000000..f105cf4
--- /dev/null
+++ b/src/slalib/sun67.htx/node142.html
@@ -0,0 +1,108 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_PDQ2H - H.A. for a Given P.A.</TITLE>
+<META NAME="description" CONTENT="SLA_PDQ2H - H.A. for a Given P.A.">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node143.html">
+<LINK REL="previous" HREF="node141.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node143.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1846" HREF="node143.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1844" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1838" HREF="node141.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1847" HREF="node143.html">SLA_PERMUT - Next Permutation</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1845" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1839" HREF="node141.html">SLA_PDA2H - H.A. for a Given Azimuth</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004129000000000000000">SLA_PDQ2H - H.A. for a Given P.A.</A>
+<A NAME="xref_SLA_PDQ2H">&#160;</A><A NAME="SLA_PDQ2H">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Hour Angle corresponding to a given parallactic angle
+(double precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_PDQ2H (P, D, Q, H1, J1, H2, J2)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>P</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>latitude</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>D</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>declination</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>Q</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>azimuth</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>H1</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>hour angle: first solution if any</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>J1</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>flag: 0 = solution 1 is valid</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>H2</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>hour angle: second solution if any</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>J2</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>flag: 0 = solution 2 is valid</TD>
+</TR>
+</TABLE></DL>
+<BR> <HR>
+<A NAME="tex2html1846" HREF="node143.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1844" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1838" HREF="node141.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1847" HREF="node143.html">SLA_PERMUT - Next Permutation</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1845" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1839" HREF="node141.html">SLA_PDA2H - H.A. for a Given Azimuth</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node143.html b/src/slalib/sun67.htx/node143.html
new file mode 100644
index 0000000..46f3e9e
--- /dev/null
+++ b/src/slalib/sun67.htx/node143.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_PERMUT - Next Permutation</TITLE>
+<META NAME="description" CONTENT="SLA_PERMUT - Next Permutation">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node144.html">
+<LINK REL="previous" HREF="node142.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node144.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1856" HREF="node144.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1854" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1848" HREF="node142.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1857" HREF="node144.html">SLA_PERTEL - Perturbed Orbital Elements</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1855" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1849" HREF="node142.html">SLA_PDQ2H - H.A. for a Given P.A.</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004130000000000000000">SLA_PERMUT - Next Permutation</A>
+<A NAME="xref_SLA_PERMUT">&#160;</A><A NAME="SLA_PERMUT">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Generate the next permutation of a specified number of items.
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_PERMUT (N, ISTATE, IORDER, J)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>N</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>number of items: there will be N! permutations</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ISTATE</EM></TD>
+<TD ALIGN="LEFT"><B>I(N)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>state, ISTATE(1)=-1 to initialize</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ISTATE</EM></TD>
+<TH ALIGN="LEFT"><B>I(N)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>state, updated ready for next time</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>IORDER</EM></TD>
+<TD ALIGN="LEFT"><B>I(N)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>next permutation of numbers 1,2,...,N</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>J</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>status:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -1 = illegal N (zero or less is illegal)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 0 = OK</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> +1 = no more permutations available</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>This routine returns, in the IORDER array, the integers 1 to N
+inclusive, in an order that depends on the current contents of
+the ISTATE array. Before calling the routine for the first
+ time, the caller must set the first element of the ISTATE array
+ to -1 (any negative number will do) to cause the ISTATE array
+ to be fully initialized.
+ <DT>2.
+<DD>The first permutation to be generated is:
+ <BLOCKQUOTE>IORDER(1)=N, IORDER(2)=N-1, ..., IORDER(N)=1
+ </BLOCKQUOTE>
+ This is also the permutation returned for the ``finished'' (J=1) case.
+ The final permutation to be generated is:
+ <BLOCKQUOTE>IORDER(1)=1, IORDER(2)=2, ..., IORDER(N)=N
+ </BLOCKQUOTE>
+ <DT>3.
+<DD>If the ``finished'' (J=1) status is ignored, the routine continues
+ to deliver permutations, the pattern repeating every&nbsp;N!&nbsp;calls.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1856" HREF="node144.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1854" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1848" HREF="node142.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1857" HREF="node144.html">SLA_PERTEL - Perturbed Orbital Elements</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1855" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1849" HREF="node142.html">SLA_PDQ2H - H.A. for a Given P.A.</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node144.html b/src/slalib/sun67.htx/node144.html
new file mode 100644
index 0000000..eb511e6
--- /dev/null
+++ b/src/slalib/sun67.htx/node144.html
@@ -0,0 +1,310 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_PERTEL - Perturbed Orbital Elements</TITLE>
+<META NAME="description" CONTENT="SLA_PERTEL - Perturbed Orbital Elements">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node145.html">
+<LINK REL="previous" HREF="node143.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node145.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1866" HREF="node145.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1864" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1858" HREF="node143.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1867" HREF="node145.html">SLA_PERTUE - Perturbed Universal Elements</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1865" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1859" HREF="node143.html">SLA_PERMUT - Next Permutation</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004131000000000000000">SLA_PERTEL - Perturbed Orbital Elements</A>
+<A NAME="xref_SLA_PERTEL">&#160;</A><A NAME="SLA_PERTEL">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Update the osculating elements of an asteroid or comet by
+applying planetary perturbations.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_PERTEL (
+ JFORM, DATE0, DATE1,
+ EPOCH0, ORBI0, ANODE0, PERIH0, AORQ0, E0, AM0,
+ EPOCH1, ORBI1, ANODE1, PERIH1, AORQ1, E1, AM1,
+ JSTAT)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN (format and dates):</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>JFORM</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>choice of element set (2 or 3; Note&nbsp;1)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DATE0</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>date of osculation (TT MJD) for the given</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> elements</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DATE1</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>date of osculation (TT MJD) for the updated</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> elements</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>GIVEN (the unperturbed elements):</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>EPOCH0</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>epoch of the given element set
+(<I>t<SUB>0</SUB></I> or <I>T</I>, TT MJD;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> Note&nbsp;2)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ORBI0</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>inclination (<I>i</I>, radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ANODE0</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>longitude of the ascending node (<IMG WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img99.gif"
+ ALT="$\Omega$">, radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PERIH0</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>argument of perihelion
+(<IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img101.gif"
+ ALT="$\omega$">, radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>AORQ0</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>mean distance or perihelion distance (<I>a</I> or <I>q</I>, AU)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>E0</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>eccentricity (<I>e</I>)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>AM0</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>mean anomaly (<I>M</I>, radians, JFORM=2 only)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED (the updated elements):</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>EPOCH1</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>epoch of the updated element set
+(<I>t<SUB>0</SUB></I> or <I>T</I>,</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> TT MJD; Note&nbsp;2)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ORBI1</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>inclination (<I>i</I>, radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ANODE1</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>longitude of the ascending node (<IMG WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img99.gif"
+ ALT="$\Omega$">, radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PERIH1</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>argument of perihelion
+(<IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img101.gif"
+ ALT="$\omega$">, radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>AORQ1</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>mean distance or perihelion distance (<I>a</I> or <I>q</I>, AU)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>E1</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>eccentricity (<I>e</I>)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>AM1</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>mean anomaly (<I>M</I>, radians, JFORM=2 only)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED (status flag):</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>JSTAT</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>status:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> +102 = warning, distant epoch</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> +101 = warning, large timespan
+(&gt;100 years)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> +1 to +8 = coincident with major planet
+(Note&nbsp;6)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 0 = OK</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -1 = illegal JFORM</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -2 = illegal E0</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -3 = illegal AORQ0</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -4 = internal error</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -5 = numerical error</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>Two different element-format options are supported, as follows. <BR>
+JFORM=2, suitable for minor planets:
+<PRE><TT>
+ EPOCH = epoch of elements <I>t<SUB>0</SUB></I> (TT MJD)
+ ORBINC = inclination <I>i</I> (radians)
+ ANODE = longitude of the ascending node <IMG WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img99.gif"
+ ALT="$\Omega$"> (radians)
+ PERIH = argument of perihelion <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img101.gif"
+ ALT="$\omega$"> (radians)
+ AORQ = mean distance <I>a</I> (AU)
+ E = eccentricity <I>e</I> <IMG WIDTH="83" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img106.gif"
+ ALT="$( 0 \leq e < 1 )$">
+ AORL = mean anomaly <I>M</I> (radians)
+</TT></PRE>
+<P>
+JFORM=3, suitable for comets:
+<P> <PRE><TT>
+ EPOCH = epoch of perihelion <I>T</I> (TT MJD)
+ ORBINC = inclination <I>i</I> (radians)
+ ANODE = longitude of the ascending node <IMG WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img99.gif"
+ ALT="$\Omega$"> (radians)
+ PERIH = argument of perihelion <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img101.gif"
+ ALT="$\omega$"> (radians)
+ AORQ = perihelion distance <I>q</I> (AU)
+ E = eccentricity <I>e</I> <IMG WIDTH="91" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img107.gif"
+ ALT="$( 0 \leq e \leq 10 )$"></TT></PRE>
+ <DT>2.
+<DD>DATE0, DATE1, EPOCH0 and EPOCH1 are all instants of time in
+ the TT timescale (formerly Ephemeris Time, ET), expressed
+ as Modified Julian Dates (JD-2400000.5).
+ <UL>
+<LI> DATE0 is the instant at which the given
+ (<I>i.e.</I> unperturbed) osculating elements are correct.
+<LI> DATE1 is the specified instant at which the updated osculating
+ elements are correct.
+<LI> EPOCH0 and EPOCH1 will be the same as DATE0 and DATE1
+ (respectively) for the JFORM=2 case, normally used for minor
+ planets. For the JFORM=3 case, the two epochs will refer to
+ perihelion passage and so will not, in general, be the same as
+ DATE0 and/or DATE1 though they may be similar to one another.
+ </UL>
+ <DT>3.
+<DD>The elements are with respect to the J2000 ecliptic and mean equinox.
+ <DT>4.
+<DD>Unused elements (AM0 and AM1 for JFORM=3) are not accessed.
+ <DT>5.
+<DD>See the sla_PERTUE routine for details of the algorithm used.
+ <DT>6.
+<DD>This routine is not intended to be used for major planets, which
+ is why JFORM=1 is not available and why there is no opportunity
+ to specify either the longitude of perihelion or the daily
+ motion. However, if JFORM=2 elements are somehow obtained for a
+ major planet and supplied to the routine, sensible results will,
+ in fact, be produced. This happens because the sla_PERTUE routine
+ that is called to perform the calculations checks the separation
+ between the body and each of the planets and interprets a
+ suspiciously small value (0.001&nbsp;AU) as an attempt to apply it to
+ the planet concerned. If this condition is detected, the
+ contribution from that planet is ignored, and the status is set to
+ the planet number (Mercury=1,...,Neptune=8) as a warning.
+ </DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCE:</STRONG>
+<DD>Sterne, Theodore E., <I>An Introduction to Celestial Mechanics,</I>
+Interscience Publishers, 1960. Section 6.7, p199.
+ </DL>
+<BR> <HR>
+<A NAME="tex2html1866" HREF="node145.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1864" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1858" HREF="node143.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1867" HREF="node145.html">SLA_PERTUE - Perturbed Universal Elements</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1865" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1859" HREF="node143.html">SLA_PERMUT - Next Permutation</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node145.html b/src/slalib/sun67.htx/node145.html
new file mode 100644
index 0000000..8fbb853
--- /dev/null
+++ b/src/slalib/sun67.htx/node145.html
@@ -0,0 +1,279 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_PERTUE - Perturbed Universal Elements</TITLE>
+<META NAME="description" CONTENT="SLA_PERTUE - Perturbed Universal Elements">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node146.html">
+<LINK REL="previous" HREF="node144.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node146.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1876" HREF="node146.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1874" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1868" HREF="node144.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1877" HREF="node146.html">SLA_PLANEL - Planet Position from Elements</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1875" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1869" HREF="node144.html">SLA_PERTEL - Perturbed Orbital Elements</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004132000000000000000">SLA_PERTUE - Perturbed Universal Elements</A>
+<A NAME="xref_SLA_PERTUE">&#160;</A><A NAME="SLA_PERTUE">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Update the universal elements of an asteroid or comet by
+applying planetary perturbations.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_PERTUE (DATE, U, JSTAT)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DATE1</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>final epoch (TT MJD) for the updated elements</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>GIVEN and RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>U</EM></TD>
+<TH ALIGN="LEFT"><B>D(13)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>universal elements (updated in place)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(1)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>combined mass (<I>M</I>+<I>m</I>)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(2)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>total energy of the orbit (<IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$">)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(3)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>reference (osculating) epoch (<I>t<SUB>0</SUB></I>)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(4-6)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>position at reference epoch (<IMG WIDTH="17" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img102.gif"
+ ALT="${\rm \bf r}_0$">)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(7-9)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>velocity at reference epoch (<IMG WIDTH="19" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img103.gif"
+ ALT="${\rm \bf v}_0$">)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(10)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>heliocentric distance at reference epoch</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(11)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="39" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img104.gif"
+ ALT="${\rm \bf r}_0.{\rm \bf v}_0$"></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(12)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>date (<I>t</I>)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(13)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>universal eccentric anomaly (<IMG WIDTH="14" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img105.gif"
+ ALT="$\psi$">) of date, approx</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>JSTAT</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>status:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> +102 = warning, distant epoch</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> +101 = warning, large timespan
+(&gt;100 years)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> +1 to +8 = coincident with major planet
+(Note&nbsp;5)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 0 = OK</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -1 = numerical error</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The ``universal'' elements are those which define the orbit for the
+purposes of the method of universal variables (see reference 2).
+They consist of the combined mass of the two bodies, an epoch,
+ and the position and velocity vectors (arbitrary reference frame)
+ at that epoch. The parameter set used here includes also various
+ quantities that can, in fact, be derived from the other
+ information. This approach is taken to avoiding unnecessary
+ computation and loss of accuracy. The supplementary quantities
+ are (i)&nbsp;<IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$">, which is proportional to the total energy of the
+ orbit, (ii)&nbsp;the heliocentric distance at epoch,
+ (iii)&nbsp;the outwards component of the velocity at the given epoch,
+ (iv)&nbsp;an estimate of <IMG WIDTH="14" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img105.gif"
+ ALT="$\psi$">, the ``universal eccentric anomaly'' at a
+ given date and (v)&nbsp;that date.
+ <DT>2.
+<DD>The universal elements are with respect to the J2000 equator and
+ equinox.
+ <DT>3.
+<DD>The epochs DATE, U(3) and U(12) are all Modified Julian Dates
+ (JD-2400000.5).
+ <DT>4.
+<DD>The algorithm is a simplified form of Encke's method. It takes as
+ a basis the unperturbed motion of the body, and numerically
+ integrates the perturbing accelerations from the major planets.
+ The expression used is essentially Sterne's 6.7-2 (reference 1).
+ Everhart and Pitkin (reference 2) suggest rectifying the orbit at
+ each integration step by propagating the new perturbed position
+ and velocity as the new universal variables. In the present
+ routine the orbit is rectified less frequently than this, in order
+ to gain a slight speed advantage. However, the rectification is
+ done directly in terms of position and velocity, as suggested by
+ Everhart and Pitkin, bypassing the use of conventional orbital
+ elements.
+<P>
+The <I>f</I>(<I>q</I>) part of the full Encke method is not used. The purpose
+ of this part is to avoid subtracting two nearly equal quantities
+ when calculating the ``indirect member'', which takes account of the
+ small change in the Sun's attraction due to the slightly displaced
+ position of the perturbed body. A simpler, direct calculation in
+ double precision proves to be faster and not significantly less
+ accurate.
+<P>
+Apart from employing a variable timestep, and occasionally
+ ``rectifying the orbit'' to keep the indirect member small, the
+ integration is done in a fairly straightforward way. The
+ acceleration estimated for the middle of the timestep is assumed
+ to apply throughout that timestep; it is also used in the
+ extrapolation of the perturbations to the middle of the next
+ timestep, to predict the new disturbed position. There is no
+ iteration within a timestep.
+<P>
+Measures are taken to reach a compromise between execution time
+ and accuracy. The starting-point is the goal of achieving
+ arcsecond accuracy for ordinary minor planets over a ten-year
+ timespan. This goal dictates how large the timesteps can be,
+ which in turn dictates how frequently the unperturbed motion has
+ to be recalculated from the osculating elements.
+<P>
+Within predetermined limits, the timestep for the numerical
+ integration is varied in length in inverse proportion to the
+ magnitude of the net acceleration on the body from the major
+ planets.
+<P>
+The numerical integration requires estimates of the major-planet
+ motions. Approximate positions for the major planets (Pluto
+ alone is omitted) are obtained from the routine sla_PLANET. Two
+ levels of interpolation are used, to enhance speed without
+ significantly degrading accuracy. At a low frequency, the routine
+ sla_PLANET is called to generate updated position+velocity ``state
+ vectors''. The only task remaining to be carried out at the full
+ frequency (<I>i.e.</I> at each integration step) is to use the state
+ vectors to extrapolate the planetary positions. In place of a
+ strictly linear extrapolation, some allowance is made for the
+ curvature of the orbit by scaling back the radius vector as the
+ linear extrapolation goes off at a tangent.
+<P>
+Various other approximations are made. For example, perturbations
+ by Pluto and the minor planets are neglected, relativistic effects
+ are not taken into account and the Earth-Moon system is treated as
+ a single body.
+<P>
+In the interests of simplicity, the background calculations for
+ the major planets are carried out <I>en masse.</I>
+ The mean elements and
+ state vectors for all the planets are refreshed at the same time,
+ without regard for orbit curvature, mass or proximity.
+<P> <DT>5.
+<DD>This routine is not intended to be used for major planets.
+ However, if major-planet elements are supplied, sensible results
+ will, in fact, be produced. This happens because the routine
+ checks the separation between the body and each of the planets and
+ interprets a suspiciously small value (0.001&nbsp;AU) as an attempt to
+ apply the routine to the planet concerned. If this condition
+ is detected, the
+ contribution from that planet is ignored, and the status is set to
+ the planet number (Mercury=1,...,Neptune=8) as a warning.
+ </DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>Sterne, Theodore E., <I>An Introduction to Celestial Mechanics,</I>
+Interscience Publishers, 1960. Section 6.7, p199.
+<DT>2.
+<DD>Everhart, E. &amp; Pitkin, E.T., Am.&nbsp;J.&nbsp;Phys.&nbsp;51, 712, 1983.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1876" HREF="node146.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1874" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1868" HREF="node144.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1877" HREF="node146.html">SLA_PLANEL - Planet Position from Elements</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1875" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1869" HREF="node144.html">SLA_PERTEL - Perturbed Orbital Elements</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node146.html b/src/slalib/sun67.htx/node146.html
new file mode 100644
index 0000000..70b9139
--- /dev/null
+++ b/src/slalib/sun67.htx/node146.html
@@ -0,0 +1,255 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_PLANEL - Planet Position from Elements</TITLE>
+<META NAME="description" CONTENT="SLA_PLANEL - Planet Position from Elements">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node147.html">
+<LINK REL="previous" HREF="node145.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node147.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1886" HREF="node147.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1884" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1878" HREF="node145.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1887" HREF="node147.html">SLA_PLANET - Planetary Ephemerides</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1885" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1879" HREF="node145.html">SLA_PERTUE - Perturbed Universal Elements</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004133000000000000000">SLA_PLANEL - Planet Position from Elements</A>
+<A NAME="xref_SLA_PLANEL">&#160;</A><A NAME="SLA_PLANEL">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Heliocentric position and velocity of a planet,
+asteroid or comet, starting from orbital elements.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_PLANEL (
+ DATE, JFORM, EPOCH, ORBINC, ANODE, PERIH,
+ AORQ, E, AORL, DM, PV, JSTAT)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DATE</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>Modified Julian Date (JD-2400000.5)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>JFORM</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>choice of element set (1-3, see Note&nbsp;3, below)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>EPOCH</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>epoch of elements (<I>t<SUB>0</SUB></I> or <I>T</I>, TT MJD)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ORBINC</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>inclination (<I>i</I>, radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ANODE</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>longitude of the ascending node (<IMG WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img99.gif"
+ ALT="$\Omega$">, radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PERIH</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>longitude or argument of perihelion
+(<IMG WIDTH="16" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img100.gif"
+ ALT="$\varpi$"> or <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img101.gif"
+ ALT="$\omega$">,</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>AORQ</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>mean distance or perihelion distance (<I>a</I> or <I>q</I>, AU)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>E</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>eccentricity (<I>e</I>)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>AORL</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>mean anomaly or longitude
+(<I>M</I> or <I>L</I>, radians,</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> JFORM=1,2 only)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DM</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>daily motion (<I>n</I>, radians, JFORM=1 only)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PV</EM></TD>
+<TH ALIGN="LEFT"><B>D(6)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>heliocentric <IMG WIDTH="106" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img51.gif"
+ ALT="$[\,x,y,z,\dot{x},\dot{y},\dot{z}\,]$">, equatorial, J2000</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> (AU, AU/s)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>JSTAT</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>status:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 0 = OK</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -1 = illegal JFORM</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -2 = illegal E</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -3 = illegal AORQ</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -4 = illegal DM</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -5 = numerical error</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>DATE is the instant for which the prediction is
+required. It is in the TT timescale (formerly
+Ephemeris Time, ET) and is a
+ Modified Julian Date (JD-2400000.5).
+ <DT>2.
+<DD>The elements are with respect to
+ the J2000 ecliptic and equinox.
+ <DT>3.
+<DD>Three different element-format options are available, as
+ follows. <BR>
+<P>
+JFORM=1, suitable for the major planets:
+<P> <PRE><TT>
+ EPOCH = epoch of elements <I>t<SUB>0</SUB></I> (TT MJD)
+ ORBINC = inclination <I>i</I> (radians)
+ ANODE = longitude of the ascending node <IMG WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img99.gif"
+ ALT="$\Omega$"> (radians)
+ PERIH = longitude of perihelion <IMG WIDTH="16" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img100.gif"
+ ALT="$\varpi$"> (radians)
+ AORQ = mean distance <I>a</I> (AU)
+ E = eccentricity <I>e</I> <IMG WIDTH="83" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img106.gif"
+ ALT="$( 0 \leq e < 1 )$">
+ AORL = mean longitude <I>L</I> (radians)
+ DM = daily motion <I>n</I> (radians)
+</TT></PRE>
+<P>
+JFORM=2, suitable for minor planets:
+<P> <PRE><TT>
+ EPOCH = epoch of elements <I>t<SUB>0</SUB></I> (TT MJD)
+ ORBINC = inclination <I>i</I> (radians)
+ ANODE = longitude of the ascending node <IMG WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img99.gif"
+ ALT="$\Omega$"> (radians)
+ PERIH = argument of perihelion <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img101.gif"
+ ALT="$\omega$"> (radians)
+ AORQ = mean distance <I>a</I> (AU)
+ E = eccentricity <I>e</I> <IMG WIDTH="83" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img106.gif"
+ ALT="$( 0 \leq e < 1 )$">
+ AORL = mean anomaly <I>M</I> (radians)
+</TT></PRE>
+<P>
+JFORM=3, suitable for comets:
+<P> <PRE><TT>
+ EPOCH = epoch of perihelion <I>T</I> (TT MJD)
+ ORBINC = inclination <I>i</I> (radians)
+ ANODE = longitude of the ascending node <IMG WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img99.gif"
+ ALT="$\Omega$"> (radians)
+ PERIH = argument of perihelion <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img101.gif"
+ ALT="$\omega$"> (radians)
+ AORQ = perihelion distance <I>q</I> (AU)
+ E = eccentricity <I>e</I> <IMG WIDTH="91" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img107.gif"
+ ALT="$( 0 \leq e \leq 10 )$"></TT></PRE>
+ <DT>4.
+<DD>Unused elements (DM for JFORM=2, AORL and DM for JFORM=3) are
+ not accessed.
+ <DT>5.
+<DD>The reference frame for the result is equatorial and is with
+ respect to the mean equinox and ecliptic of epoch J2000.
+ <DT>6.
+<DD>The algorithm was originally adapted from the EPHSLA program of
+ D.H.P.Jones (private communication, 1996). The method
+ is based on Stumpff's Universal Variables.
+ </DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCE:</STRONG>
+<DD>Everhart, E. &amp; Pitkin, E.T., Am.&nbsp;J.&nbsp;Phys.&nbsp;51, 712, 1983.
+</DL>
+<BR> <HR>
+<A NAME="tex2html1886" HREF="node147.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1884" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1878" HREF="node145.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1887" HREF="node147.html">SLA_PLANET - Planetary Ephemerides</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1885" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1879" HREF="node145.html">SLA_PERTUE - Perturbed Universal Elements</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node147.html b/src/slalib/sun67.htx/node147.html
new file mode 100644
index 0000000..b9d19fb
--- /dev/null
+++ b/src/slalib/sun67.htx/node147.html
@@ -0,0 +1,278 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_PLANET - Planetary Ephemerides</TITLE>
+<META NAME="description" CONTENT="SLA_PLANET - Planetary Ephemerides">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node148.html">
+<LINK REL="previous" HREF="node146.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node148.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1896" HREF="node148.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1894" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1888" HREF="node146.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1897" HREF="node148.html">SLA_PLANTE - of Planet from Elements</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1895" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1889" HREF="node146.html">SLA_PLANEL - Planet Position from Elements</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004134000000000000000">SLA_PLANET - Planetary Ephemerides</A>
+<A NAME="xref_SLA_PLANET">&#160;</A><A NAME="SLA_PLANET">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Approximate heliocentric position and velocity of a planet.
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_PLANET (DATE, NP, PV, JSTAT)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DATE</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>Modified Julian Date (JD-2400000.5)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>NP</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>planet:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 1=Mercury</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 2=Venus</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 3=Earth-Moon Barycentre</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 4=Mars</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 5=Jupiter</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 6=Saturn</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 7=Uranus</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 8=Neptune</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 9=Pluto</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PV</EM></TD>
+<TH ALIGN="LEFT"><B>D(6)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>heliocentric <IMG WIDTH="106" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img51.gif"
+ ALT="$[\,x,y,z,\dot{x},\dot{y},\dot{z}\,]$">, equatorial, J2000</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> (AU, AU/s)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>JSTAT</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>status:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> +1 = warning: date outside of range</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 0 = OK</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -1 = illegal NP (outside 1-9)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -2 = solution didn't converge</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The epoch, DATE, is in the TDB timescale and is in the form
+of a Modified Julian Date (JD-2400000.5).
+<DT>2.
+<DD>The reference frame is equatorial and is with respect to
+ the mean equinox and ecliptic of epoch J2000.
+ <DT>3.
+<DD>If a planet number, NP, outside the range 1-9 is supplied, an error
+ status is returned (JSTAT&nbsp;=&nbsp;-1) and the PV vector
+ is set to zeroes.
+ <DT>4.
+<DD>The algorithm for obtaining the mean elements of the
+ planets from Mercury to Neptune is due to
+ J.L.Simon, P.Bretagnon, J.Chapront,
+ M.Chapront-Touze, G.Francou and J.Laskar (Bureau des
+ Longitudes, Paris, France). The (completely different)
+ algorithm for calculating the ecliptic coordinates of
+ Pluto is by Meeus.
+ <DT>5.
+<DD>Comparisons of the present routine with the JPL DE200 ephemeris
+ give the following RMS errors over the interval 1960-2025:
+ <PRE><TT>
+ <I>position (km)</I> <I>speed (metre/sec)</I>
+&nbsp;
+ Mercury 334 0.437
+ Venus 1060 0.855
+ EMB 2010 0.815
+ Mars 7690 1.98
+ Jupiter 71700 7.70
+ Saturn 199000 19.4
+ Uranus 564000 16.4
+ Neptune 158000 14.4
+ Pluto 36400 0.137
+</TT></PRE>
+ From comparisons with DE102, Simon <I>et al.</I> quote the following
+ longitude accuracies over the interval 1800-2200:
+ <PRE><TT>
+ Mercury <IMG WIDTH="17" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img130.gif"
+ ALT="$4\hspace{-0.05em}^{'\hspace{-0.1em}'}$">
+ Venus <IMG WIDTH="17" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img131.gif"
+ ALT="$5\hspace{-0.05em}^{'\hspace{-0.1em}'}$">
+ EMB <IMG WIDTH="17" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img132.gif"
+ ALT="$6\hspace{-0.05em}^{'\hspace{-0.1em}'}$">
+ Mars <IMG WIDTH="25" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img133.gif"
+ ALT="$17\hspace{-0.05em}^{'\hspace{-0.1em}'}$">
+ Jupiter <IMG WIDTH="25" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img134.gif"
+ ALT="$71\hspace{-0.05em}^{'\hspace{-0.1em}'}$">
+ Saturn <IMG WIDTH="25" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img135.gif"
+ ALT="$81\hspace{-0.05em}^{'\hspace{-0.1em}'}$">
+ Uranus <IMG WIDTH="25" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img136.gif"
+ ALT="$86\hspace{-0.05em}^{'\hspace{-0.1em}'}$">
+ Neptune <IMG WIDTH="25" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img43.gif"
+ ALT="$11\hspace{-0.05em}^{'\hspace{-0.1em}'}$"></TT></PRE>
+ In the case of Pluto, Meeus quotes an accuracy of
+ <IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img137.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.6$"><P>
+in longitude and
+ <IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img76.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.2$"> in latitude for the period
+ 1885-2099.
+<P>
+For all except Pluto, over the period 1000-3000,
+ the accuracy is better than 1.5
+ times that over 1800-2200. Outside the interval 1000-3000 the
+ accuracy declines. For Pluto the accuracy declines rapidly
+ outside the period 1885-2099. Outside these ranges
+ (1885-2099 for Pluto, 1000-3000 for the rest) a ``date out
+ of range'' warning status (<TT>JSTAT=+1</TT>) is returned.
+ <DT>6.
+<DD>The algorithms for (i)&nbsp;Mercury through Neptune and
+ (ii)&nbsp;Pluto are completely independent. In the Mercury
+ through Neptune case, the present SLALIB
+ implementation differs from the original
+ Simon <I>et al.</I> Fortran code in the following respects:
+ <UL>
+<LI> The date is supplied as a Modified Julian Date rather
+ a Julian Date (<IMG WIDTH="177" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img138.gif"
+ ALT="${\rm MJD} = ({\rm JD} - 2400000.5$">).
+<LI> The result is returned only in equatorial
+ Cartesian form; the ecliptic
+ longitude, latitude and radius vector are not returned.
+<LI> The velocity is in AU per second, not AU per day.
+<LI> Different error/warning status values are used.
+<LI> Kepler's Equation is not solved inline.
+<LI> Polynomials in T are nested to minimize rounding errors.
+<LI> Explicit double-precision constants are used to avoid
+ mixed-mode expressions.
+<LI> There are other, cosmetic, changes to comply with
+ Starlink/SLALIB style guidelines.
+ </UL>
+ None of the above changes affects the result significantly.
+ <DT>7.
+<DD>NP=3 the result is for the Earth-Moon Barycentre. To
+ obtain the heliocentric position and velocity of the Earth,
+ either use the SLALIB routine sla_EVP or call sla_DMOON and
+ subtract 0.012150581 times the geocentric Moon vector from
+ the EMB vector produced by the present routine. (The Moon
+ vector should be precessed to J2000 first, but this can
+ be omitted for modern epochs without introducing significant
+ inaccuracy.)
+ </DL>
+<P> <DL>
+<DT><STRONG>REFERENCES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>Simon <I>et al.,</I>
+Astron. Astrophys. <B>282</B>, 663 (1994).
+<DT>2.
+<DD>Meeus, J.,
+ <I>Astronomical Algorithms,</I> Willmann-Bell (1991).
+ </DL></DL></DL>
+<BR> <HR>
+<A NAME="tex2html1896" HREF="node148.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1894" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1888" HREF="node146.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1897" HREF="node148.html">SLA_PLANTE - of Planet from Elements</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1895" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1889" HREF="node146.html">SLA_PLANEL - Planet Position from Elements</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node148.html b/src/slalib/sun67.htx/node148.html
new file mode 100644
index 0000000..70ca411
--- /dev/null
+++ b/src/slalib/sun67.htx/node148.html
@@ -0,0 +1,256 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_PLANTE - of Planet from Elements</TITLE>
+<META NAME="description" CONTENT="SLA_PLANTE - of Planet from Elements">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node149.html">
+<LINK REL="previous" HREF="node147.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node149.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1906" HREF="node149.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1904" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1898" HREF="node147.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1907" HREF="node149.html">SLA_PM - Proper Motion</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1905" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1899" HREF="node147.html">SLA_PLANET - Planetary Ephemerides</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004135000000000000000">&#160;</A><A NAME="xref_SLA_PLANTE">&#160;</A><A NAME="SLA_PLANTE">&#160;</A>
+<BR>
+SLA_PLANTE - <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> of Planet from Elements
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Topocentric apparent <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> of a Solar-System object whose
+heliocentric orbital elements are known.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_PLANTE (
+ DATE, ELONG, PHI, JFORM, EPOCH, ORBINC, ANODE, PERIH,
+ AORQ, E, AORL, DM, RA, DEC, R, JSTAT)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DATE</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>MJD of observation (JD-2400000.5)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ELONG,PHI</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>observer's longitude (east +ve) and latitude</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>JFORM</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>choice of element set (1-3, see Note&nbsp;4, below)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>EPOCH</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>epoch of elements (<I>t<SUB>0</SUB></I> or <I>T</I>, TT MJD)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ORBINC</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>inclination (<I>i</I>, radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ANODE</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>longitude of the ascending node (<IMG WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img99.gif"
+ ALT="$\Omega$">, radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PERIH</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>longitude or argument of perihelion
+(<IMG WIDTH="16" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img100.gif"
+ ALT="$\varpi$"> or <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img101.gif"
+ ALT="$\omega$">,</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>AORQ</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>mean distance or perihelion distance (<I>a</I> or <I>q</I>, AU)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>E</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>eccentricity (<I>e</I>)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>AORL</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>mean anomaly or longitude (<I>M</I> or <I>L</I>,</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> radians, JFORM=1,2 only)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DM</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>daily motion (<I>n</I>, radians, JFORM=1 only)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RA,DEC</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>topocentric apparent <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>R</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>distance from observer (AU)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>JSTAT</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>status:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 0 = OK</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -1 = illegal JFORM</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -2 = illegal E</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -3 = illegal AORQ</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -4 = illegal DM</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -5 = numerical error</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>DATE is the instant for which the prediction is
+required. It is in the TT timescale (formerly
+Ephemeris Time, ET) and is a
+ Modified Julian Date (JD-2400000.5).
+ <DT>2.
+<DD>The longitude and latitude allow correction for geocentric
+ parallax. This is usually a small effect, but can become
+ important for Earth-crossing asteroids. Geocentric positions
+ can be generated by appropriate use of the routines
+ sla_EVP and sla_PLANEL.
+ <DT>3.
+<DD>The elements are with respect to the J2000 ecliptic and equinox.
+ <DT>4.
+<DD>Three different element-format options are available, as
+ follows. <BR>
+<P>
+JFORM=1, suitable for the major planets:
+<P> <PRE><TT>
+ EPOCH = epoch of elements <I>t<SUB>0</SUB></I> (TT MJD)
+ ORBINC = inclination <I>i</I> (radians)
+ ANODE = longitude of the ascending node <IMG WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img99.gif"
+ ALT="$\Omega$"> (radians)
+ PERIH = longitude of perihelion <IMG WIDTH="16" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img100.gif"
+ ALT="$\varpi$"> (radians)
+ AORQ = mean distance <I>a</I> (AU)
+ E = eccentricity <I>e</I>
+ AORL = mean longitude <I>L</I> (radians)
+ DM = daily motion <I>n</I> (radians)
+</TT></PRE>
+<P>
+JFORM=2, suitable for minor planets:
+<P> <PRE><TT>
+ EPOCH = epoch of elements <I>t<SUB>0</SUB></I> (TT MJD)
+ ORBINC = inclination <I>i</I> (radians)
+ ANODE = longitude of the ascending node <IMG WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img99.gif"
+ ALT="$\Omega$"> (radians)
+ PERIH = argument of perihelion <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img101.gif"
+ ALT="$\omega$"> (radians)
+ AORQ = mean distance <I>a</I> (AU)
+ E = eccentricity <I>e</I>
+ AORL = mean anomaly <I>M</I> (radians)
+</TT></PRE>
+<P>
+JFORM=3, suitable for comets:
+<P> <PRE><TT>
+ EPOCH = epoch of perihelion <I>T</I> (TT MJD)
+ ORBINC = inclination <I>i</I> (radians)
+ ANODE = longitude of the ascending node <IMG WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img99.gif"
+ ALT="$\Omega$"> (radians)
+ PERIH = argument of perihelion <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img101.gif"
+ ALT="$\omega$"> (radians)
+ AORQ = perihelion distance <I>q</I> (AU)
+ E = eccentricity <I>e</I>
+</TT></PRE>
+ <DT>5.
+<DD>Unused elements (DM for JFORM=2, AORL and DM for JFORM=3) are
+ not accessed.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1906" HREF="node149.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1904" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1898" HREF="node147.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1907" HREF="node149.html">SLA_PM - Proper Motion</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1905" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1899" HREF="node147.html">SLA_PLANET - Planetary Ephemerides</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node149.html b/src/slalib/sun67.htx/node149.html
new file mode 100644
index 0000000..999078a
--- /dev/null
+++ b/src/slalib/sun67.htx/node149.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_PM - Proper Motion</TITLE>
+<META NAME="description" CONTENT="SLA_PM - Proper Motion">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node150.html">
+<LINK REL="previous" HREF="node148.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node150.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1916" HREF="node150.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1914" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1908" HREF="node148.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1917" HREF="node150.html">SLA_POLMO - Polar Motion</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1915" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1909" HREF="node148.html">SLA_PLANTE - of Planet from Elements</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004136000000000000000">SLA_PM - Proper Motion</A>
+<A NAME="xref_SLA_PM">&#160;</A><A NAME="SLA_PM">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Apply corrections for proper motion to a star <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$">.<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_PM (R0, D0, PR, PD, PX, RV, EP0, EP1, R1, D1)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>R0,D0</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> at epoch EP0 (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PR,PD</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>proper motions: rate of change of
+<IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> (radians per year)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PX</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>parallax (arcsec)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RV</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>radial velocity (km&nbsp;s<SUP>-1</SUP>, +ve if receding)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>EP0</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>start epoch in years (<I>e.g.</I> Julian epoch)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>EP1</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>end epoch in years (same system as EP0)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>R1,D1</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> at epoch EP1 (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTE:</STRONG>
+<DD>The <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$"> proper motions are <IMG WIDTH="13" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img115.gif"
+ ALT="$\dot{\alpha}$"> rather than
+<IMG WIDTH="48" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img116.gif"
+ ALT="$\dot{\alpha}\cos\delta$">, and are in the same coordinate
+ system as R0,D0.
+ </DL>
+<P> <DL>
+<DT><STRONG>REFERENCES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>1984 <I>Astronomical Almanac</I>, pp B39-B41.
+<DT>2.
+<DD>Lederle &amp; Schwan, 1984. <I>Astr. Astrophys.</I> <B>134</B>, 1-6.
+</DL></DL>
+<BR> <HR>
+<A NAME="tex2html1916" HREF="node150.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1914" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1908" HREF="node148.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1917" HREF="node150.html">SLA_POLMO - Polar Motion</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1915" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1909" HREF="node148.html">SLA_PLANTE - of Planet from Elements</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node15.html b/src/slalib/sun67.htx/node15.html
new file mode 100644
index 0000000..45c1aeb
--- /dev/null
+++ b/src/slalib/sun67.htx/node15.html
@@ -0,0 +1,230 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_AFIN - Sexagesimal character string to angle</TITLE>
+<META NAME="description" CONTENT="SLA_AFIN - Sexagesimal character string to angle">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node16.html">
+<LINK REL="previous" HREF="node14.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node16.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html576" HREF="node16.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html574" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html568" HREF="node14.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html577" HREF="node16.html">SLA_AIRMAS - Air Mass</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html575" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html569" HREF="node14.html">SLA_ADDET - Add E-terms of Aberration</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION00042000000000000000">SLA_AFIN - Sexagesimal character string to angle</A>
+<A NAME="xref_SLA_AFIN">&#160;</A><A NAME="SLA_AFIN">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Decode a free-format sexagesimal string (degrees, arcminutes,
+arcseconds) into a single precision floating point
+ number (radians).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_AFIN (STRING, NSTRT, RESLT, JF)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>STRING</EM></TD>
+<TH ALIGN="LEFT"><B>C*(*)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>string containing deg, arcmin, arcsec fields</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>NSTRT</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>pointer to start of decode (beginning of STRING = 1)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>NSTRT</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>advanced past the decoded angle</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RESLT</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>angle in radians</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>JF</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>status:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 0 = OK</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> +1 = default, RESLT unchanged (note 2)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -1 = bad degrees (note 3)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -2 = bad arcminutes (note 3)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -3 = bad arcseconds (note 3)</TD>
+</TR>
+</TABLE></DL>
+<P><DL>
+<DT><STRONG>EXAMPLE:</STRONG>
+<DD>
+<BR>
+<BR>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TH ALIGN="LEFT"><I>argument</I></TH>
+<TH ALIGN="LEFT"><I>before</I></TH>
+<TH ALIGN="LEFT"><I>after</I></TH>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT">&nbsp;</TD>
+<TD ALIGN="LEFT">&nbsp;</TD>
+<TD ALIGN="LEFT">&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT">STRING</TD>
+<TD ALIGN="LEFT">'<code>-57 17 44.806 12 34 56.7</code>'</TD>
+<TD ALIGN="LEFT">unchanged</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT">NSTRT</TD>
+<TD ALIGN="LEFT">1</TD>
+<TD ALIGN="LEFT">16 (<I>i.e.</I> pointing to 12...)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT">RESLT</TD>
+<TD ALIGN="LEFT">-</TD>
+<TD ALIGN="LEFT">-1.00000</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT">JF</TD>
+<TD ALIGN="LEFT">-</TD>
+<TD ALIGN="LEFT">&nbsp;</TD>
+</TR>
+</TABLE>
+ <DT><DD> A further call to sla_AFIN, without adjustment of NSTRT, will
+ decode the second angle, <IMG WIDTH="90" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img4.gif"
+ ALT="$12^{\circ}\,34^{'}\,56^{''}.7$">.</DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The first three ``fields'' in STRING are degrees, arcminutes,
+arcseconds, separated by spaces or commas. The degrees field
+may be signed, but not the others. The decoding is carried
+ out by the sla_DFLTIN routine and is free-format.
+ <DT>2.
+<DD>Successive fields may be absent, defaulting to zero. For
+ zero status, the only combinations allowed are degrees alone,
+ degrees and arcminutes, and all three fields present. If all
+ three fields are omitted, a status of +1 is returned and RESLT is
+ unchanged. In all other cases RESLT is changed.
+ <DT>3.
+<DD>Range checking:
+ <UL>
+<LI> The degrees field is not range checked. However, it is
+ expected to be integral unless the other two fields are absent.
+<LI> The arcminutes field is expected to be 0-59, and integral if
+ the arcseconds field is present. If the arcseconds field
+ is absent, the arcminutes is expected to be 0-59.9999...
+<LI> The arcseconds field is expected to be 0-59.9999...
+<LI> Decoding continues even when a check has failed. Under these
+ circumstances the field takes the supplied value, defaulting to
+ zero, and the result RESLT is computed and returned.
+ </UL>
+ <DT>4.
+<DD>Further fields after the three expected ones are not treated as
+ an error. The pointer NSTRT is left in the correct state for
+ further decoding with the present routine or with sla_DFLTIN
+ <I>etc</I>. See the example, above.
+ <DT>5.
+<DD>If STRING contains hours, minutes, seconds instead of
+ degrees <I>etc</I>,
+ or if the required units are turns (or days) instead of radians,
+ the result RESLT should be multiplied as follows: <BR>
+<BR>
+<BR>
+ <TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TH ALIGN="LEFT"><I>for STRING</I></TH>
+<TH ALIGN="LEFT"><I>to obtain</I></TH>
+<TH ALIGN="LEFT"><I>multiply RESLT by</I></TH>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT">&nbsp;</TD>
+<TD ALIGN="LEFT">&nbsp;</TD>
+<TD ALIGN="LEFT">&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><IMG WIDTH="10" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img5.gif"
+ ALT="${\circ}$">&nbsp;&nbsp;'&nbsp;&nbsp;''</TD>
+<TD ALIGN="LEFT">radians</TD>
+<TD ALIGN="LEFT">1.0</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><IMG WIDTH="10" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img5.gif"
+ ALT="${\circ}$">&nbsp;&nbsp;'&nbsp;&nbsp;''</TD>
+<TD ALIGN="LEFT">turns</TD>
+<TD ALIGN="LEFT"><IMG WIDTH="227" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img6.gif"
+ ALT="$1/{2 \pi} = 0.1591549430918953358$"></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT">h m s</TD>
+<TD ALIGN="LEFT">radians</TD>
+<TD ALIGN="LEFT">15.0</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT">h m s</TD>
+<TD ALIGN="LEFT">days</TD>
+<TD ALIGN="LEFT"><IMG WIDTH="235" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img7.gif"
+ ALT="$15/{2\pi} = 2.3873241463784300365$"></TD>
+</TR>
+</TABLE></DL></DL>
+<BR> <HR>
+<A NAME="tex2html576" HREF="node16.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html574" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html568" HREF="node14.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html577" HREF="node16.html">SLA_AIRMAS - Air Mass</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html575" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html569" HREF="node14.html">SLA_ADDET - Add E-terms of Aberration</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node150.html b/src/slalib/sun67.htx/node150.html
new file mode 100644
index 0000000..4750c08
--- /dev/null
+++ b/src/slalib/sun67.htx/node150.html
@@ -0,0 +1,202 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_POLMO - Polar Motion</TITLE>
+<META NAME="description" CONTENT="SLA_POLMO - Polar Motion">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node151.html">
+<LINK REL="previous" HREF="node149.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node151.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1926" HREF="node151.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1924" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1918" HREF="node149.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1927" HREF="node151.html">SLA_PREBN - Precession Matrix (FK4)</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1925" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1919" HREF="node149.html">SLA_PM - Proper Motion</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004137000000000000000">SLA_POLMO - Polar Motion</A>
+<A NAME="xref_SLA_POLMO">&#160;</A><A NAME="SLA_POLMO">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Polar motion: correct site longitude and latitude for polar
+motion and calculate azimuth difference between celestial and
+ terrestrial poles.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_POLMO (ELONGM, PHIM, XP, YP, ELONG, PHI, DAZ)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ELONGM</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>mean longitude of the site (radians, east +ve)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PHIM</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>mean geodetic latitude of the site (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>XP</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>polar motion <I>x</I>-coordinate (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>YP</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>polar motion <I>y</I>-coordinate (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ELONG</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>true longitude of the site (radians, east +ve)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PHI</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>true geodetic latitude of the site (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DAZ</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>azimuth correction (terrestrial-celestial, radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>``Mean'' longitude and latitude are the (fixed) values for the
+site's location with respect to the IERS terrestrial reference
+frame; the latitude is geodetic. TAKE CARE WITH THE LONGITUDE
+ SIGN CONVENTION. The longitudes used by the present routine
+ are east-positive, in accordance with geographical convention
+ (and right-handed). In particular, note that the longitudes
+ returned by the sla_OBS routine are west-positive, following
+ astronomical usage, and must be reversed in sign before use in
+ the present routine.
+<DT>2.
+<DD>XP and YP are the (changing) coordinates of the Celestial
+ Ephemeris Pole with respect to the IERS Reference Pole.
+ XP is positive along the meridian at longitude <IMG WIDTH="18" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img1.gif"
+ ALT="$0^{\circ}$">, and YP is positive along the meridian at longitude
+ <IMG WIDTH="34" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img139.gif"
+ ALT="$270^\circ$"> (<I>i.e.</I> <IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img22.gif"
+ ALT="$90^{\circ}$"> west). Values for XP,YP can
+ be obtained from IERS circulars and equivalent publications;
+ the maximum amplitude observed so far is about
+ <IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img32.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.3$"> .
+<DT>3.
+<DD>``True'' longitude and latitude are the (moving) values for
+ the site's location with respect to the celestial ephemeris
+ pole and the meridian which corresponds to the Greenwich
+ apparent sidereal time. The true longitude and latitude
+ link the terrestrial coordinates with the standard celestial
+ models (for precession, nutation, sidereal time <I>etc</I>).
+<DT>4.
+<DD>The azimuths produced by sla_AOP and sla_AOPQK are with
+ respect to due north as defined by the Celestial Ephemeris
+ Pole, and can therefore be called ``celestial azimuths''.
+ However, a telescope fixed to the Earth measures azimuth
+ essentially with respect to due north as defined by the
+ IERS Reference Pole, and can therefore be called ``terrestrial
+ azimuth''. Uncorrected, this would manifest itself as a
+ changing ``azimuth zero-point error''. The value DAZ is the
+ correction to be added to a celestial azimuth to produce
+ a terrestrial azimuth.
+<DT>5.
+<DD>The present routine is rigorous. For most practical
+ purposes, the following simplified formulae provide an
+ adequate approximation: <BR>
+<BR>
+<BR>
+ <TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT" NOWRAP><TT>ELONG</TT></TD>
+<TD ALIGN="LEFT" NOWRAP><TT>=</TT></TD>
+<TD ALIGN="LEFT" NOWRAP><TT>ELONGM+XP*COS(ELONGM)-YP*SIN(ELONGM)</TT></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT" NOWRAP><TT>PHI </TT></TD>
+<TD ALIGN="LEFT" NOWRAP><TT>=</TT></TD>
+<TD ALIGN="LEFT" NOWRAP><TT>PHIM+(XP*SIN(ELONGM)+YP*COS(ELONGM))*TAN(PHIM)</TT></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT" NOWRAP><TT>DAZ </TT></TD>
+<TD ALIGN="LEFT" NOWRAP><TT>=</TT></TD>
+<TD ALIGN="LEFT" NOWRAP><TT>-SQRT(XP*XP+YP*YP)*COS(ELONGM-ATAN2(XP,YP))/COS(PHIM)</TT></TD>
+</TR>
+</TABLE> <BR>
+<BR>
+<BR>
+An alternative formulation for DAZ is:
+<BR>
+<BR>
+<BR>
+ <TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT" NOWRAP><TT>X </TT></TD>
+<TD ALIGN="LEFT" NOWRAP><TT>=</TT></TD>
+<TD ALIGN="LEFT" NOWRAP><TT>COS(ELONGM)*COS(PHIM)</TT></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT" NOWRAP><TT>Y </TT></TD>
+<TD ALIGN="LEFT" NOWRAP><TT>=</TT></TD>
+<TD ALIGN="LEFT" NOWRAP><TT>SIN(ELONGM)*COS(PHIM)</TT></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT" NOWRAP><TT>DAZ</TT></TD>
+<TD ALIGN="LEFT" NOWRAP><TT>=</TT></TD>
+<TD ALIGN="LEFT" NOWRAP><TT>ATAN2(-X*YP-Y*XP,X*X+Y*Y)</TT></TD>
+</TR>
+</TABLE></DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCE:</STRONG>
+<DD>Seidelmann, P.K. (ed), 1992. <I>Explanatory
+Supplement to the Astronomical Almanac,</I> ISBN&nbsp;0-935702-68-7,
+ sections 3.27, 4.25, 4.52.
+ </DL>
+<BR> <HR>
+<A NAME="tex2html1926" HREF="node151.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1924" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1918" HREF="node149.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1927" HREF="node151.html">SLA_PREBN - Precession Matrix (FK4)</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1925" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1919" HREF="node149.html">SLA_PM - Proper Motion</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node151.html b/src/slalib/sun67.htx/node151.html
new file mode 100644
index 0000000..f7c9a66
--- /dev/null
+++ b/src/slalib/sun67.htx/node151.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_PREBN - Precession Matrix (FK4)</TITLE>
+<META NAME="description" CONTENT="SLA_PREBN - Precession Matrix (FK4)">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node152.html">
+<LINK REL="previous" HREF="node150.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node152.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1936" HREF="node152.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1934" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1928" HREF="node150.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1937" HREF="node152.html">SLA_PREC - Precession Matrix (FK5)</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1935" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1929" HREF="node150.html">SLA_POLMO - Polar Motion</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004138000000000000000">SLA_PREBN - Precession Matrix (FK4)</A>
+<A NAME="xref_SLA_PREBN">&#160;</A><A NAME="SLA_PREBN">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Generate the matrix of precession between two epochs,
+using the old, pre IAU&nbsp;1976, Bessel-Newcomb model, in
+ Andoyer's formulation.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_PREBN (BEP0, BEP1, RMATP)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>BEP0</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>beginning Besselian epoch</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>BEP1</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>ending Besselian epoch</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RMATP</EM></TD>
+<TH ALIGN="LEFT"><B>D(3,3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>precession matrix</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTE:</STRONG>
+<DD>The matrix is in the sense:
+<BLOCKQUOTE><B>v</B><SUB>1</SUB> = <B>M</B><IMG WIDTH="7" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img72.gif"
+ ALT="$\cdot$"><B>v</B><SUB>0</SUB></BLOCKQUOTE>
+ where <B>v</B><SUB>1</SUB> is the star vector relative to the
+ mean equator and equinox of epoch BEP1, <B>M</B> is the
+ <IMG WIDTH="39" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img18.gif"
+ ALT="$3\times3$"> matrix RMATP and
+ <B>v</B><SUB>0</SUB> is the star vector relative to the
+ mean equator and equinox of epoch BEP0.
+ </DL>
+<P> <DL>
+<DT><STRONG>REFERENCE:</STRONG>
+<DD>Smith <I>et al.</I>, 1989. <I>Astr.J.</I> <B>97</B>, 269.
+</DL>
+<BR> <HR>
+<A NAME="tex2html1936" HREF="node152.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1934" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1928" HREF="node150.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1937" HREF="node152.html">SLA_PREC - Precession Matrix (FK5)</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1935" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1929" HREF="node150.html">SLA_POLMO - Polar Motion</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node152.html b/src/slalib/sun67.htx/node152.html
new file mode 100644
index 0000000..9e5ea39
--- /dev/null
+++ b/src/slalib/sun67.htx/node152.html
@@ -0,0 +1,145 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_PREC - Precession Matrix (FK5)</TITLE>
+<META NAME="description" CONTENT="SLA_PREC - Precession Matrix (FK5)">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node153.html">
+<LINK REL="previous" HREF="node151.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node153.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1946" HREF="node153.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1944" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1938" HREF="node151.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1947" HREF="node153.html">SLA_PRECES - Precession</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1945" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1939" HREF="node151.html">SLA_PREBN - Precession Matrix (FK4)</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004139000000000000000">SLA_PREC - Precession Matrix (FK5)</A>
+<A NAME="xref_SLA_PREC">&#160;</A><A NAME="SLA_PREC">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Form the matrix of precession between two epochs (IAU 1976, FK5).
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_PREC (EP0, EP1, RMATP)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>EP0</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>beginning epoch</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>EP1</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>ending epoch</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RMATP</EM></TD>
+<TH ALIGN="LEFT"><B>D(3,3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>precession matrix</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The epochs are TDB Julian epochs.
+<DT>2.
+<DD>The matrix is in the sense:
+<BLOCKQUOTE><B>v</B><SUB>1</SUB> = <B>M</B><IMG WIDTH="7" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img72.gif"
+ ALT="$\cdot$"><B>v</B><SUB>0</SUB></BLOCKQUOTE>
+ where <B>v</B><SUB>1</SUB> is the star vector relative to the
+ mean equator and equinox of epoch EP1, <B>M</B> is the
+ <IMG WIDTH="39" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img18.gif"
+ ALT="$3\times3$"> matrix RMATP and
+ <B>v</B><SUB>0</SUB> is the star vector relative to the
+ mean equator and equinox of epoch EP0.
+ <DT>3.
+<DD>Though the matrix method itself is rigorous, the precession
+ angles are expressed through canonical polynomials which are
+ valid only for a limited time span. There are also known
+ errors in the IAU precession rate. The absolute accuracy
+ of the present formulation is better than
+ <IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img25.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.1$"> from
+ 1960AD to 2040AD, better than <IMG WIDTH="17" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img140.gif"
+ ALT="$1\hspace{-0.05em}^{'\hspace{-0.1em}'}$"> from 1640AD to 2360AD,
+ and remains below <IMG WIDTH="17" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img75.gif"
+ ALT="$3\hspace{-0.05em}^{'\hspace{-0.1em}'}$"> for the whole of the period
+ 500BC to 3000AD. The errors exceed <IMG WIDTH="25" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img74.gif"
+ ALT="$10\hspace{-0.05em}^{'\hspace{-0.1em}'}$"> outside the
+ range 1200BC to 3900AD, exceed <IMG WIDTH="33" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img141.gif"
+ ALT="$100\hspace{-0.05em}^{'\hspace{-0.1em}'}$"> outside 4200BC to
+ 5600AD and exceed <IMG WIDTH="41" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img142.gif"
+ ALT="$1000\hspace{-0.05em}^{'\hspace{-0.1em}'}$"> outside 6800BC to 8200AD.
+ The SLALIB routine sla_PRECL implements a more elaborate
+ model which is suitable for problems spanning several
+ thousand years.
+ </DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>Lieske, J.H., 1979. <I>Astr.Astrophys.</I> <B>73</B>, 282;
+equations 6 &amp; 7, p283.
+<DT>2.
+<DD>Kaplan, G.H., 1981. <I>USNO circular no. 163</I>, pA2.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1946" HREF="node153.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1944" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1938" HREF="node151.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1947" HREF="node153.html">SLA_PRECES - Precession</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1945" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1939" HREF="node151.html">SLA_PREBN - Precession Matrix (FK4)</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node153.html b/src/slalib/sun67.htx/node153.html
new file mode 100644
index 0000000..e63959a
--- /dev/null
+++ b/src/slalib/sun67.htx/node153.html
@@ -0,0 +1,120 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_PRECES - Precession</TITLE>
+<META NAME="description" CONTENT="SLA_PRECES - Precession">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node154.html">
+<LINK REL="previous" HREF="node152.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node154.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1956" HREF="node154.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1954" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1948" HREF="node152.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1957" HREF="node154.html">SLA_PRECL - Precession Matrix (latest)</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1955" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1949" HREF="node152.html">SLA_PREC - Precession Matrix (FK5)</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004140000000000000000">SLA_PRECES - Precession</A>
+<A NAME="xref_SLA_PRECES">&#160;</A><A NAME="SLA_PRECES">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Precession - either the old ``FK4'' (Bessel-Newcomb, pre&nbsp;IAU&nbsp;1976)
+or new ``FK5'' (Fricke, post&nbsp;IAU&nbsp;1976) as required.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_PRECES (SYSTEM, EP0, EP1, RA, DC)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>SYSTEM</EM></TD>
+<TH ALIGN="LEFT"><B>C</B></TH>
+<TD ALIGN="LEFT" NOWRAP>precession to be applied: `FK4' or `FK5'</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>EP0,EP1</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>starting and ending epoch</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RA,DC</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$">, mean equator &amp; equinox of epoch EP0</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RA,DC</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$">, mean equator &amp; equinox of epoch EP1</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>Lowercase characters in SYSTEM are acceptable.
+<DT>2.
+<DD>The epochs are Besselian if SYSTEM=`FK4' and Julian if `FK5'.
+For example, to precess coordinates in the old system from
+ equinox 1900.0 to 1950.0 the call would be:
+ <BLOCKQUOTE><TT>CALL sla_PRECES ('FK4', 1900D0, 1950D0, RA, DC)</TT>
+ </BLOCKQUOTE>
+ <DT>3.
+<DD>This routine will <B>NOT</B> correctly convert between the old and
+ the new systems - for example conversion from B1950 to J2000.
+ For these purposes see sla_FK425, sla_FK524, sla_FK45Z and
+ sla_FK54Z.
+ <DT>4.
+<DD>If an invalid SYSTEM is supplied, values of -99D0,-99D0 are
+ returned for both RA and DC.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1956" HREF="node154.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1954" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1948" HREF="node152.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1957" HREF="node154.html">SLA_PRECL - Precession Matrix (latest)</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1955" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1949" HREF="node152.html">SLA_PREC - Precession Matrix (FK5)</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node154.html b/src/slalib/sun67.htx/node154.html
new file mode 100644
index 0000000..a20e26a
--- /dev/null
+++ b/src/slalib/sun67.htx/node154.html
@@ -0,0 +1,131 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_PRECL - Precession Matrix (latest)</TITLE>
+<META NAME="description" CONTENT="SLA_PRECL - Precession Matrix (latest)">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node155.html">
+<LINK REL="previous" HREF="node153.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node155.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1966" HREF="node155.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1964" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1958" HREF="node153.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1967" HREF="node155.html">SLA_PRENUT - Precession/Nutation Matrix</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1965" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1959" HREF="node153.html">SLA_PRECES - Precession</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004141000000000000000">SLA_PRECL - Precession Matrix (latest)</A>
+<A NAME="xref_SLA_PRECL">&#160;</A><A NAME="SLA_PRECL">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Form the matrix of precession between two epochs, using the
+model of Simon <I>et al</I>. (1994), which is suitable for long
+ periods of time.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_PRECL (EP0, EP1, RMATP)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>EP0</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>beginning epoch</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>EP1</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>ending epoch</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RMATP</EM></TD>
+<TH ALIGN="LEFT"><B>D(3,3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>precession matrix</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The epochs are TDB Julian epochs.
+<DT>2.
+<DD>The matrix is in the sense:
+<BLOCKQUOTE><B>v</B><SUB>1</SUB> = <B>M</B><IMG WIDTH="7" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img72.gif"
+ ALT="$\cdot$"><B>v</B><SUB>0</SUB></BLOCKQUOTE>
+ where <B>v</B><SUB>1</SUB> is the star vector relative to the
+ mean equator and equinox of epoch EP1, <B>M</B> is the
+ <IMG WIDTH="39" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img18.gif"
+ ALT="$3\times3$"> matrix RMATP and
+ <B>v</B><SUB>0</SUB> is the star vector relative to the
+ mean equator and equinox of epoch EP0.
+ <DT>3.
+<DD>The absolute accuracy of the model is limited by the
+ uncertainty in the general precession, about
+ <IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img32.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.3$"> per
+ 1000&nbsp;years. The remainder of the formulation provides a
+ precision of 1&nbsp;milliarcsecond over the interval from 1000AD
+ to 3000AD,
+ <IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img25.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.1$"> from 1000BC to 5000AD and
+ <IMG WIDTH="17" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img140.gif"
+ ALT="$1\hspace{-0.05em}^{'\hspace{-0.1em}'}$"> from 4000BC to 8000AD.
+ </DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCE:</STRONG>
+<DD>Simon, J.L. <I>et al</I>., 1994. <I>Astr.Astrophys.</I> <B>282</B>,
+663.
+ </DL>
+<BR> <HR>
+<A NAME="tex2html1966" HREF="node155.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1964" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1958" HREF="node153.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1967" HREF="node155.html">SLA_PRENUT - Precession/Nutation Matrix</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1965" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1959" HREF="node153.html">SLA_PRECES - Precession</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node155.html b/src/slalib/sun67.htx/node155.html
new file mode 100644
index 0000000..e7dc899
--- /dev/null
+++ b/src/slalib/sun67.htx/node155.html
@@ -0,0 +1,110 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_PRENUT - Precession/Nutation Matrix</TITLE>
+<META NAME="description" CONTENT="SLA_PRENUT - Precession/Nutation Matrix">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node156.html">
+<LINK REL="previous" HREF="node154.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node156.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1976" HREF="node156.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1974" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1968" HREF="node154.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1977" HREF="node156.html">SLA_PV2EL - Orbital Elements from Position/Velocity</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1975" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1969" HREF="node154.html">SLA_PRECL - Precession Matrix (latest)</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004142000000000000000">SLA_PRENUT - Precession/Nutation Matrix</A>
+<A NAME="xref_SLA_PRENUT">&#160;</A><A NAME="SLA_PRENUT">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Form the matrix of precession and nutation (IAU&nbsp;1976, FK5).
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_PRENUT (EPOCH, DATE, RMATPN)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>EPOCH</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>Julian Epoch for mean coordinates</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DATE</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>Modified Julian Date (JD-2400000.5)
+for true coordinates</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RMATPN</EM></TD>
+<TH ALIGN="LEFT"><B>D(3,3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>combined precession/nutation matrix</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The epoch and date are TDB.
+<DT>2.
+<DD>The matrix is in the sense:
+<BLOCKQUOTE><B>v</B><SUB><I>true</I></SUB> = <B>M</B><IMG WIDTH="7" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img72.gif"
+ ALT="$\cdot$"><B>v</B><SUB><I>mean</I></SUB></BLOCKQUOTE>
+ where <B>v</B><SUB><I>true</I></SUB> is the star vector relative to the
+ true equator and equinox of epoch DATE, <B>M</B> is the
+ <IMG WIDTH="39" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img18.gif"
+ ALT="$3\times3$"> matrix RMATPN and
+ <B>v</B><SUB><I>mean</I></SUB> is the star vector relative to the
+ mean equator and equinox of epoch EPOCH.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1976" HREF="node156.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1974" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1968" HREF="node154.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1977" HREF="node156.html">SLA_PV2EL - Orbital Elements from Position/Velocity</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1975" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1969" HREF="node154.html">SLA_PRECL - Precession Matrix (latest)</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node156.html b/src/slalib/sun67.htx/node156.html
new file mode 100644
index 0000000..ab897bc
--- /dev/null
+++ b/src/slalib/sun67.htx/node156.html
@@ -0,0 +1,323 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_PV2EL - Orbital Elements from Position/Velocity</TITLE>
+<META NAME="description" CONTENT="SLA_PV2EL - Orbital Elements from Position/Velocity">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node157.html">
+<LINK REL="previous" HREF="node155.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node157.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1986" HREF="node157.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1984" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1978" HREF="node155.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1987" HREF="node157.html">SLA_PV2UE - Position/Velocity to Universal Elements</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1985" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1979" HREF="node155.html">SLA_PRENUT - Precession/Nutation Matrix</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004143000000000000000">SLA_PV2EL - Orbital Elements from Position/Velocity</A>
+<A NAME="xref_SLA_PV2EL">&#160;</A><A NAME="SLA_PV2EL">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Heliocentric osculating elements obtained from instantaneous
+position and velocity.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_PV2EL (
+ PV, DATE, PMASS, JFORMR, JFORM, EPOCH, ORBINC,
+ ANODE, PERIH, AORQ, E, AORL, DM, JSTAT)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PV</EM></TD>
+<TH ALIGN="LEFT"><B>D(6)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>heliocentric <IMG WIDTH="106" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img51.gif"
+ ALT="$[\,x,y,z,\dot{x},\dot{y},\dot{z}\,]$">, equatorial, J2000</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> (AU, AU/s; Note&nbsp;1)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DATE</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>date (TT Modified Julian Date = JD-2400000.5)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PMASS</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>mass of the planet (Sun = 1; Note&nbsp;2)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>JFORMR</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>requested element set (1-3; Note&nbsp;3)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>JFORM</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>element set actually returned (1-3; Note&nbsp;4)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>EPOCH</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>epoch of elements (<I>t<SUB>0</SUB></I> or <I>T</I>, TT MJD)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ORBINC</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>inclination (<I>i</I>, radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ANODE</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>longitude of the ascending node (<IMG WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img99.gif"
+ ALT="$\Omega$">, radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PERIH</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>longitude or argument of perihelion
+(<IMG WIDTH="16" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img100.gif"
+ ALT="$\varpi$"> or <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img101.gif"
+ ALT="$\omega$">,</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>AORQ</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>mean distance or perihelion distance (<I>a</I> or <I>q</I>, AU)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>E</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>eccentricity (<I>e</I>)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>AORL</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>mean anomaly or longitude
+(<I>M</I> or <I>L</I>, radians,</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> JFORM=1,2 only)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DM</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>daily motion (<I>n</I>, radians, JFORM=1 only)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>JSTAT</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>status:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 0 = OK</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -1 = illegal PMASS</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -2 = illegal JFORMR</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -3 = position/velocity out of allowed range</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The PV 6-vector is with respect to the mean equator and equinox of
+epoch J2000. The orbital elements produced are with respect to
+the J2000 ecliptic and mean equinox.
+ <DT>2.
+<DD>The mass, PMASS, is important only for the larger planets. For
+ most purposes (<I>e.g.</I>&nbsp;asteroids) use 0D0. Values less than zero
+ are illegal.
+ <DT>3.
+<DD>Three different element-format options are supported, as
+ follows. <BR>
+<P>
+JFORM=1, suitable for the major planets:
+<P> <PRE><TT>
+ EPOCH = epoch of elements <I>t<SUB>0</SUB></I> (TT MJD)
+ ORBINC = inclination <I>i</I> (radians)
+ ANODE = longitude of the ascending node <IMG WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img99.gif"
+ ALT="$\Omega$"> (radians)
+ PERIH = longitude of perihelion <IMG WIDTH="16" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img100.gif"
+ ALT="$\varpi$"> (radians)
+ AORQ = mean distance <I>a</I> (AU)
+ E = eccentricity <I>e</I> <IMG WIDTH="83" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img106.gif"
+ ALT="$( 0 \leq e < 1 )$">
+ AORL = mean longitude <I>L</I> (radians)
+ DM = daily motion <I>n</I> (radians)
+</TT></PRE>
+<P>
+JFORM=2, suitable for minor planets:
+<P> <PRE><TT>
+ EPOCH = epoch of elements <I>t<SUB>0</SUB></I> (TT MJD)
+ ORBINC = inclination <I>i</I> (radians)
+ ANODE = longitude of the ascending node <IMG WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img99.gif"
+ ALT="$\Omega$"> (radians)
+ PERIH = argument of perihelion <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img101.gif"
+ ALT="$\omega$"> (radians)
+ AORQ = mean distance <I>a</I> (AU)
+ E = eccentricity <I>e</I> <IMG WIDTH="83" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img106.gif"
+ ALT="$( 0 \leq e < 1 )$">
+ AORL = mean anomaly <I>M</I> (radians)
+</TT></PRE>
+<P>
+JFORM=3, suitable for comets:
+<P> <PRE><TT>
+ EPOCH = epoch of perihelion <I>T</I> (TT MJD)
+ ORBINC = inclination <I>i</I> (radians)
+ ANODE = longitude of the ascending node <IMG WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img99.gif"
+ ALT="$\Omega$"> (radians)
+ PERIH = argument of perihelion <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img101.gif"
+ ALT="$\omega$"> (radians)
+ AORQ = perihelion distance <I>q</I> (AU)
+ E = eccentricity <I>e</I> <IMG WIDTH="91" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img107.gif"
+ ALT="$( 0 \leq e \leq 10 )$"></TT></PRE>
+ <DT>4.
+<DD>It may not be possible to generate elements in the form
+ requested through JFORMR. The caller is notified of the form
+ of elements actually returned by means of the JFORM argument:
+<P> <PRE><TT>
+ JFORMR JFORM meaning
+&nbsp;
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1 OK: elements are in the requested format
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2 never happens
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3 orbit not elliptical
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1 never happens
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2 OK: elements are in the requested format
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3 orbit not elliptical
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1 never happens
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2 never happens
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3 OK: elements are in the requested format
+</TT></PRE>
+ <DT>5.
+<DD>The arguments returned for each value of JFORM (<I>cf</I> Note&nbsp;5:
+ JFORM may not be the same as JFORMR) are as follows:
+<P> <PRE><TT>
+ JFORM 1 2 3
+&nbsp;
+ EPOCH <I>t<SUB>0</SUB></I> <I>t<SUB>0</SUB></I> <I>T</I>
+ ORBINC <I>i</I> <I>i</I> <I>i</I>
+ ANODE <IMG WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img99.gif"
+ ALT="$\Omega$"> <IMG WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img99.gif"
+ ALT="$\Omega$"> <IMG WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img99.gif"
+ ALT="$\Omega$">
+ PERIH <IMG WIDTH="16" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img100.gif"
+ ALT="$\varpi$"> <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img101.gif"
+ ALT="$\omega$"> <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img101.gif"
+ ALT="$\omega$">
+ AORQ <I>a</I> <I>a</I> <I>q</I>
+ E <I>e</I> <I>e</I> <I>e</I>
+ AORL <I>L</I> <I>M</I> -
+ DM <I>n</I> - -
+</TT></PRE>
+<P>
+where:
+ <PRE><TT>
+ <I>t<SUB>0</SUB></I> is the epoch of the elements (MJD, TT)
+ <I>T</I> is the epoch of perihelion (MJD, TT)
+ <I>i</I> is the inclination (radians)
+ <IMG WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img99.gif"
+ ALT="$\Omega$"> is the longitude of the ascending node (radians)
+ <IMG WIDTH="16" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img100.gif"
+ ALT="$\varpi$"> is the longitude of perihelion (radians)
+ <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img101.gif"
+ ALT="$\omega$"> is the argument of perihelion (radians)
+ <I>a</I> is the mean distance (AU)
+ <I>q</I> is the perihelion distance (AU)
+ <I>e</I> is the eccentricity
+ <I>L</I> is the longitude (radians, <IMG WIDTH="48" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img143.gif"
+ ALT="$0-2\pi$">) <I>M</I> is the mean anomaly (radians, <IMG WIDTH="48" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img143.gif"
+ ALT="$0-2\pi$">) <I>n</I> is the daily motion (radians)
+ - means no value is set
+</TT></PRE>
+ <DT>6.
+<DD>At very small inclinations, the longitude of the ascending node
+ ANODE becomes indeterminate and under some circumstances may be
+ set arbitrarily to zero. Similarly, if the orbit is close to
+ circular, the true anomaly becomes indeterminate and under some
+ circumstances may be set arbitrarily to zero. In such cases,
+ the other elements are automatically adjusted to compensate,
+ and so the elements remain a valid description of the orbit.
+ </DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCE:</STRONG>
+<DD>Sterne, Theodore E., <I>An Introduction to Celestial Mechanics,</I>
+Interscience Publishers, 1960.
+ </DL>
+<BR> <HR>
+<A NAME="tex2html1986" HREF="node157.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1984" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1978" HREF="node155.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1987" HREF="node157.html">SLA_PV2UE - Position/Velocity to Universal Elements</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1985" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1979" HREF="node155.html">SLA_PRENUT - Precession/Nutation Matrix</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node157.html b/src/slalib/sun67.htx/node157.html
new file mode 100644
index 0000000..08c25e9
--- /dev/null
+++ b/src/slalib/sun67.htx/node157.html
@@ -0,0 +1,203 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_PV2UE - Position/Velocity to Universal Elements</TITLE>
+<META NAME="description" CONTENT="SLA_PV2UE - Position/Velocity to Universal Elements">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node158.html">
+<LINK REL="previous" HREF="node156.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node158.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1996" HREF="node158.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1994" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1988" HREF="node156.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1997" HREF="node158.html">SLA_PVOBS - Observatory Position &amp; Velocity</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1995" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1989" HREF="node156.html">SLA_PV2EL - Orbital Elements from Position/Velocity</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004144000000000000000">SLA_PV2UE - Position/Velocity to Universal Elements</A>
+<A NAME="xref_SLA_PV2UE">&#160;</A><A NAME="SLA_PV2UE">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Construct a universal element set based on an instantaneous
+position and velocity.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_PV2UE (PV, DATE, PMASS, U, JSTAT)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PV</EM></TD>
+<TH ALIGN="LEFT"><B>D(6)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>heliocentric <IMG WIDTH="106" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img51.gif"
+ ALT="$[\,x,y,z,\dot{x},\dot{y},\dot{z}\,]$">, equatorial, J2000</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> (AU, AU/s; Note&nbsp;1)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DATE</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>date (TT Modified Julian Date = JD-2400000.5)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PMASS</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>mass of the planet (Sun = 1; Note&nbsp;2)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>U</EM></TD>
+<TH ALIGN="LEFT"><B>D(13)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>universal orbital elements (Note&nbsp;3)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(1)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>combined mass (<I>M</I>+<I>m</I>)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(2)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>total energy of the orbit (<IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$">)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(3)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>reference (osculating) epoch (<I>t<SUB>0</SUB></I>)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(4-6)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>position at reference epoch (<IMG WIDTH="17" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img102.gif"
+ ALT="${\rm \bf r}_0$">)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(7-9)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>velocity at reference epoch (<IMG WIDTH="19" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img103.gif"
+ ALT="${\rm \bf v}_0$">)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(10)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>heliocentric distance at reference epoch</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(11)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="39" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img104.gif"
+ ALT="${\rm \bf r}_0.{\rm \bf v}_0$"></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(12)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>date (<I>t</I>)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(13)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>universal eccentric anomaly (<IMG WIDTH="14" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img105.gif"
+ ALT="$\psi$">) of date, approx</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>JSTAT</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>status:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 0 = OK</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -1 = illegal PMASS</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -2 = too close to Sun</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -3 = too slow</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The PV 6-vector can be with respect to any chosen inertial frame,
+and the resulting universal-element set will be with respect to
+the same frame. A common choice will be mean equator and ecliptic
+ of epoch J2000.
+ <DT>2.
+<DD>The mass, PMASS, is important only for the larger planets. For
+ most purposes (<I>e.g.</I>&nbsp;asteroids) use 0D0. Values less than zero
+ are illegal.
+ <DT>3.
+<DD>The ``universal'' elements are those which define the orbit for the
+ purposes of the method of universal variables (see reference).
+ They consist of the combined mass of the two bodies, an epoch,
+ and the position and velocity vectors (arbitrary reference frame)
+ at that epoch. The parameter set used here includes also various
+ quantities that can, in fact, be derived from the other
+ information. This approach is taken to avoiding unnecessary
+ computation and loss of accuracy. The supplementary quantities
+ are (i)&nbsp;<IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$">, which is proportional to the total energy of the
+ orbit, (ii)&nbsp;the heliocentric distance at epoch,
+ (iii)&nbsp;the outwards component of the velocity at the given epoch,
+ (iv)&nbsp;an estimate of <IMG WIDTH="14" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img105.gif"
+ ALT="$\psi$">, the ``universal eccentric anomaly'' at a
+ given date and (v)&nbsp;that date.
+ </DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCE:</STRONG>
+<DD>Everhart, E. &amp; Pitkin, E.T., Am.&nbsp;J.&nbsp;Phys.&nbsp;51, 712, 1983.
+</DL>
+<BR> <HR>
+<A NAME="tex2html1996" HREF="node158.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1994" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1988" HREF="node156.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1997" HREF="node158.html">SLA_PVOBS - Observatory Position &amp; Velocity</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1995" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1989" HREF="node156.html">SLA_PV2EL - Orbital Elements from Position/Velocity</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node158.html b/src/slalib/sun67.htx/node158.html
new file mode 100644
index 0000000..02b37a3
--- /dev/null
+++ b/src/slalib/sun67.htx/node158.html
@@ -0,0 +1,102 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_PVOBS - Observatory Position &amp; Velocity</TITLE>
+<META NAME="description" CONTENT="SLA_PVOBS - Observatory Position &amp; Velocity">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node159.html">
+<LINK REL="previous" HREF="node157.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node159.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2006" HREF="node159.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2004" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1998" HREF="node157.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2007" HREF="node159.html">SLA_PXY - Apply Linear Model</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2005" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1999" HREF="node157.html">SLA_PV2UE - Position/Velocity to Universal Elements</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004145000000000000000">SLA_PVOBS - Observatory Position &amp; Velocity</A>
+<A NAME="xref_SLA_PVOBS">&#160;</A><A NAME="SLA_PVOBS">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Position and velocity of an observing station.
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_PVOBS (P, H, STL, PV)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>P</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>latitude (geodetic, radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>H</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>height above reference spheroid (geodetic, metres)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>STL</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>local apparent sidereal time (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PV</EM></TD>
+<TH ALIGN="LEFT"><B>D(6)</B></TH>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="106" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img51.gif"
+ ALT="$[\,x,y,z,\dot{x},\dot{y},\dot{z}\,]$"> (AU, AU&nbsp;s<SUP>-1</SUP>, true equator and equinox
+of date)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTE:</STRONG>
+<DD>IAU 1976 constants are used.
+</DL>
+<BR> <HR>
+<A NAME="tex2html2006" HREF="node159.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2004" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1998" HREF="node157.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2007" HREF="node159.html">SLA_PXY - Apply Linear Model</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2005" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1999" HREF="node157.html">SLA_PV2UE - Position/Velocity to Universal Elements</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node159.html b/src/slalib/sun67.htx/node159.html
new file mode 100644
index 0000000..6cf76da
--- /dev/null
+++ b/src/slalib/sun67.htx/node159.html
@@ -0,0 +1,145 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_PXY - Apply Linear Model</TITLE>
+<META NAME="description" CONTENT="SLA_PXY - Apply Linear Model">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node160.html">
+<LINK REL="previous" HREF="node158.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node160.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2016" HREF="node160.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2014" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2008" HREF="node158.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2017" HREF="node160.html">SLA_RANDOM - Random Number</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2015" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2009" HREF="node158.html">SLA_PVOBS - Observatory Position &amp; Velocity</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004146000000000000000">SLA_PXY - Apply Linear Model</A>
+<A NAME="xref_SLA_PXY">&#160;</A><A NAME="SLA_PXY">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Given arrays of <I>expected</I> and <I>measured</I>
+<IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$"> coordinates, and a
+ linear model relating them (as produced by sla_FITXY), compute
+ the array of <I>predicted</I> coordinates and the RMS residuals.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_PXY (NP,XYE,XYM,COEFFS,XYP,XRMS,YRMS,RRMS)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>NP</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>number of samples</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>XYE</EM></TD>
+<TD ALIGN="LEFT"><B>D(2,NP)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>expected <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$"> for each sample</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>XYM</EM></TD>
+<TD ALIGN="LEFT"><B>D(2,NP)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>measured <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$"> for each sample</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>COEFFS</EM></TD>
+<TD ALIGN="LEFT"><B>D(6)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>coefficients of model (see below)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>XYP</EM></TD>
+<TH ALIGN="LEFT"><B>D(2,NP)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>predicted <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$"> for each sample</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>XRMS</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>RMS in X</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>YRMS</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>RMS in Y</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RRMS</EM></TD>
+<TD ALIGN="LEFT"><B>D </B></TD>
+<TD ALIGN="LEFT" NOWRAP>total RMS (vector sum of XRMS and YRMS)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The model is supplied in the array COEFFS. Naming the
+six elements of COEFFS <I>a</I>,<I>b</I>,<I>c</I>,<I>d</I>,<I>e</I> &amp; <I>f</I>,
+the model transforms <I>measured</I> coordinates
+ <IMG WIDTH="63" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img113.gif"
+ ALT="$[x_{m},y_{m}\,]$"> into <I>predicted</I> coordinates
+ <IMG WIDTH="53" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img144.gif"
+ ALT="$[x_{p},y_{p}\,]$"> as follows:
+ <BLOCKQUOTE><I>x</I><SUB><I>p</I></SUB> = <I>a</I> + <I>bx</I><SUB><I>m</I></SUB> + <I>cy</I><SUB><I>m</I></SUB> <BR>
+ <I>y</I><SUB><I>p</I></SUB> = <I>d</I> + <I>ex</I><SUB><I>m</I></SUB> + <I>fy</I><SUB><I>m</I></SUB></BLOCKQUOTE>
+ <DT>2.
+<DD>The residuals are (<I>x</I><SUB><I>p</I></SUB>-<I>x</I><SUB><I>e</I></SUB>) and (<I>y</I><SUB><I>p</I></SUB>-<I>y</I><SUB><I>e</I></SUB>).
+ <DT>3.
+<DD>If NP is less than or equal to zero, no coordinates are
+ transformed, and the RMS residuals are all zero.
+ <DT>4.
+<DD>See also sla_FITXY, sla_INVF, sla_XY2XY, sla_DCMPF
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html2016" HREF="node160.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2014" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2008" HREF="node158.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2017" HREF="node160.html">SLA_RANDOM - Random Number</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2015" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2009" HREF="node158.html">SLA_PVOBS - Observatory Position &amp; Velocity</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node16.html b/src/slalib/sun67.htx/node16.html
new file mode 100644
index 0000000..682e1dd
--- /dev/null
+++ b/src/slalib/sun67.htx/node16.html
@@ -0,0 +1,121 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_AIRMAS - Air Mass</TITLE>
+<META NAME="description" CONTENT="SLA_AIRMAS - Air Mass">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node17.html">
+<LINK REL="previous" HREF="node15.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node17.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html586" HREF="node17.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html584" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html578" HREF="node15.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html587" HREF="node17.html">SLA_ALTAZ - Velocities etc. for Altazimuth Mount</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html585" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html579" HREF="node15.html">SLA_AFIN - Sexagesimal character string to angle</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION00043000000000000000">SLA_AIRMAS - Air Mass</A>
+<A NAME="xref_SLA_AIRMAS">&#160;</A><A NAME="SLA_AIRMAS">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Air mass at given zenith distance (double precision).
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>D&nbsp;=&nbsp;sla_AIRMAS (ZD)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ZD</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>observed zenith distance (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>sla_AIRMAS</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>air mass (1 at zenith)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The <I>observed</I> zenith distance referred to above means
+``as affected by refraction''.
+<DT>2.
+<DD>The routine uses Hardie's (1962) polynomial fit to Bemporad's
+ data for the relative air mass, <I>X</I>, in units of thickness at the
+ zenith as tabulated by Schoenberg (1929). This is adequate for all
+ normal needs as it is accurate to better than
+ 0.1% up to <I>X</I> = 6.8 and better than 1% up to <I>X</I> = 10.
+ Bemporad's tabulated values are unlikely to be trustworthy
+ to such accuracy
+ because of variations in density, pressure and other
+ conditions in the atmosphere from those assumed in his work.
+ <DT>3.
+<DD>The sign of the ZD is ignored.
+ <DT>4.
+<DD>At zenith distances greater than about <IMG WIDTH="56" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img8.gif"
+ ALT="$\zeta = 87^{\circ}$"> the
+ air mass is held constant to avoid arithmetic overflows.
+ </DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>Hardie, R.H., 1962, in <I>Astronomical Techniques</I>
+ed. W.A. Hiltner, University of Chicago Press, p180.
+<DT>2.
+<DD>Schoenberg, E., 1929, Hdb. d. Ap.,
+ Berlin, Julius Springer, 2, 268.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html586" HREF="node17.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html584" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html578" HREF="node15.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html587" HREF="node17.html">SLA_ALTAZ - Velocities etc. for Altazimuth Mount</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html585" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html579" HREF="node15.html">SLA_AFIN - Sexagesimal character string to angle</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node160.html b/src/slalib/sun67.htx/node160.html
new file mode 100644
index 0000000..972237c
--- /dev/null
+++ b/src/slalib/sun67.htx/node160.html
@@ -0,0 +1,98 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_RANDOM - Random Number</TITLE>
+<META NAME="description" CONTENT="SLA_RANDOM - Random Number">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node161.html">
+<LINK REL="previous" HREF="node159.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node161.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2026" HREF="node161.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2024" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2018" HREF="node159.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2027" HREF="node161.html">SLA_RANGE - Put Angle into Range</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2025" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2019" HREF="node159.html">SLA_PXY - Apply Linear Model</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004147000000000000000">SLA_RANDOM - Random Number</A>
+<A NAME="xref_SLA_RANDOM">&#160;</A><A NAME="SLA_RANDOM">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Generate pseudo-random real number in the range <IMG WIDTH="72" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img145.gif"
+ ALT="$0 \leq x < 1$">.<DT><STRONG>CALL:</STRONG>
+<DD><TT>R&nbsp;=&nbsp;sla_RANDOM (SEED)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>SEED</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>an arbitrary real number</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>SEED</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>a new arbitrary value</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>sla_RANDOM</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>Pseudo-random real number <IMG WIDTH="72" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img145.gif"
+ ALT="$0 \leq x < 1$">.</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTE:</STRONG>
+<DD>The implementation is machine-dependent.
+</DL>
+<BR> <HR>
+<A NAME="tex2html2026" HREF="node161.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2024" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2018" HREF="node159.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2027" HREF="node161.html">SLA_RANGE - Put Angle into Range</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2025" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2019" HREF="node159.html">SLA_PXY - Apply Linear Model</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node161.html b/src/slalib/sun67.htx/node161.html
new file mode 100644
index 0000000..b8c2cb4
--- /dev/null
+++ b/src/slalib/sun67.htx/node161.html
@@ -0,0 +1,93 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_RANGE - Put Angle into Range </TITLE>
+<META NAME="description" CONTENT="SLA_RANGE - Put Angle into Range ">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node162.html">
+<LINK REL="previous" HREF="node160.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node162.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2036" HREF="node162.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2034" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2028" HREF="node160.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2037" HREF="node162.html">SLA_RANORM - Put Angle into Range</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2035" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2029" HREF="node160.html">SLA_RANDOM - Random Number</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004148000000000000000">&#160;</A><A NAME="xref_SLA_RANGE">&#160;</A><A NAME="SLA_RANGE">&#160;</A>
+<BR>
+SLA_RANGE - Put Angle into Range <IMG WIDTH="25" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img47.gif"
+ ALT="$\pm \pi$"></H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Normalize an angle into the range <IMG WIDTH="25" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img47.gif"
+ ALT="$\pm \pi$"> (single precision).
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>R&nbsp;=&nbsp;sla_RANGE (ANGLE)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ANGLE</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>angle in radians</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>sla_RANGE</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>ANGLE expressed in the range <IMG WIDTH="25" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img47.gif"
+ ALT="$\pm \pi$">.</TD>
+</TR>
+</TABLE></DL>
+<BR> <HR>
+<A NAME="tex2html2036" HREF="node162.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2034" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2028" HREF="node160.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2037" HREF="node162.html">SLA_RANORM - Put Angle into Range</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2035" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2029" HREF="node160.html">SLA_RANDOM - Random Number</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node162.html b/src/slalib/sun67.htx/node162.html
new file mode 100644
index 0000000..3317041
--- /dev/null
+++ b/src/slalib/sun67.htx/node162.html
@@ -0,0 +1,93 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_RANORM - Put Angle into Range </TITLE>
+<META NAME="description" CONTENT="SLA_RANORM - Put Angle into Range ">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node163.html">
+<LINK REL="previous" HREF="node161.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node163.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2046" HREF="node163.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2044" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2038" HREF="node161.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2047" HREF="node163.html">SLA_RCC - Barycentric Coordinate Time</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2045" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2039" HREF="node161.html">SLA_RANGE - Put Angle into Range</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004149000000000000000">&#160;</A><A NAME="xref_SLA_RANORM">&#160;</A><A NAME="SLA_RANORM">&#160;</A>
+<BR>
+SLA_RANORM - Put Angle into Range <IMG WIDTH="43" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img66.gif"
+ ALT="$0\!-\!2\pi$"></H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Normalize an angle into the range <IMG WIDTH="43" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img66.gif"
+ ALT="$0\!-\!2\pi$"> (single precision).
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>R&nbsp;=&nbsp;sla_RANORM (ANGLE)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ANGLE</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>angle in radians</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>sla_RANORM</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>ANGLE expressed in the range <IMG WIDTH="43" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img66.gif"
+ ALT="$0\!-\!2\pi$"></TD>
+</TR>
+</TABLE></DL>
+<BR> <HR>
+<A NAME="tex2html2046" HREF="node163.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2044" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2038" HREF="node161.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2047" HREF="node163.html">SLA_RCC - Barycentric Coordinate Time</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2045" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2039" HREF="node161.html">SLA_RANGE - Put Angle into Range</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node163.html b/src/slalib/sun67.htx/node163.html
new file mode 100644
index 0000000..4f6cf04
--- /dev/null
+++ b/src/slalib/sun67.htx/node163.html
@@ -0,0 +1,166 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_RCC - Barycentric Coordinate Time</TITLE>
+<META NAME="description" CONTENT="SLA_RCC - Barycentric Coordinate Time">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node164.html">
+<LINK REL="previous" HREF="node162.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node164.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2056" HREF="node164.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2054" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2048" HREF="node162.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2057" HREF="node164.html">SLA_RDPLAN - Apparent of Planet</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2055" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2049" HREF="node162.html">SLA_RANORM - Put Angle into Range</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004150000000000000000">SLA_RCC - Barycentric Coordinate Time</A>
+<A NAME="xref_SLA_RCC">&#160;</A><A NAME="SLA_RCC">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>D&nbsp;=&nbsp;sla_RCC (TDB, UT1, WL, U, V)</TT>
+<DT><STRONG>ACTION:</STRONG>
+<DD>The relativistic clock correction TDB-TT, the
+ difference between <I>proper time</I>
+ on Earth and <I>coordinate time</I> in the solar system barycentric
+ space-time frame of reference. The proper time is TT; the
+ coordinate time is <I>an implementation</I> of TDB.
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>TDB</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>coordinate time (MJD: JD-2400000.5)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>UT1</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>universal time (fraction of one day)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>WL</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>clock longitude (radians west)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>U</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>clock distance from Earth spin axis (km)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>V</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>clock distance north of Earth equatorial plane (km)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>sla_RCC</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>TDB-TT (sec)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>TDB may be considered to
+be the coordinate time in the solar system barycentre frame of
+reference, and TT is the proper time given by clocks at mean sea
+ level on the Earth.
+ <DT>2.
+<DD>The result has a main (annual) sinusoidal term of amplitude
+ approximately 1.66ms, plus planetary terms up to about
+ 20<IMG WIDTH="12" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img146.gif"
+ ALT="$\mu$">s, and lunar and diurnal terms up to 2<IMG WIDTH="12" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img146.gif"
+ ALT="$\mu$">s. The
+ variation arises from the transverse Doppler effect and the
+ gravitational red-shift as the observer varies in speed and
+ moves through different gravitational potentials.
+ <DT>3.
+<DD>The argument TDB is, strictly, the barycentric coordinate time;
+ however, the terrestrial proper time (TT) can in practice be used.
+ <DT>4.
+<DD>The geocentric model is that of Fairhead &amp; Bretagnon (1990),
+ in its full
+ form. It was supplied by Fairhead (private communication)
+ as a Fortran subroutine. A number of coding changes were made to
+ this subroutine in order
+ match the calling sequence of previous versions of the present
+ routine, to comply with Starlink programming standards and to
+ avoid compilation problems on certain machines. On the supported
+ computer types,
+ the numerical results are essentially unaffected by the
+ changes. The topocentric model is from Moyer (1981) and Murray (1983).
+ During the interval 1950-2050, the absolute accuracy of the
+ geocentric model is better than <IMG WIDTH="23" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img147.gif"
+ ALT="$\pm3$">&nbsp;nanoseconds
+ relative to direct numerical integrations using the JPL DE200/LE200
+ solar system ephemeris.
+ <DT>5.
+<DD>The IAU definition of TDB is that it must differ from TT only by
+ periodic terms. Though practical, this is an imprecise definition
+ which ignores the existence of very long-period and secular effects
+ in the dynamics of the solar system. As a consequence, different
+ implementations of TDB will, in general, differ in zero-point and
+ will drift linearly relative to one other.
+ </DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>Fairhead, L. &amp;
+Bretagnon, P., 1990. <I>Astr.Astrophys.</I> <B>229</B>, 240-247.
+<DT>2.
+<DD>Moyer, T.D., 1981. <I>Cel.Mech.</I> <B>23</B>, 33.
+ <DT>3.
+<DD>Murray, C.A., 1983, <I>Vectorial Astrometry</I>, Adam Hilger.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html2056" HREF="node164.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2054" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2048" HREF="node162.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2057" HREF="node164.html">SLA_RDPLAN - Apparent of Planet</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2055" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2049" HREF="node162.html">SLA_RANORM - Put Angle into Range</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node164.html b/src/slalib/sun67.htx/node164.html
new file mode 100644
index 0000000..d45ee2f
--- /dev/null
+++ b/src/slalib/sun67.htx/node164.html
@@ -0,0 +1,184 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_RDPLAN - Apparent of Planet</TITLE>
+<META NAME="description" CONTENT="SLA_RDPLAN - Apparent of Planet">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node165.html">
+<LINK REL="previous" HREF="node163.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node165.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2066" HREF="node165.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2064" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2058" HREF="node163.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2067" HREF="node165.html">SLA_REFCO - Refraction Constants</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2065" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2059" HREF="node163.html">SLA_RCC - Barycentric Coordinate Time</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004151000000000000000">&#160;</A><A NAME="xref_SLA_RDPLAN">&#160;</A><A NAME="SLA_RDPLAN">&#160;</A>
+<BR>
+SLA_RDPLAN - Apparent <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> of Planet
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Approximate topocentric apparent <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> and angular
+size of a planet.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_RDPLAN (DATE, NP, ELONG, PHI, RA, DEC, DIAM)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DATE</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>MJD of observation (JD-2400000.5)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>NP</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>planet:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 1=Mercury</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 2=Venus</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 3=Moon</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 4=Mars</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 5=Jupiter</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 6=Saturn</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 7=Uranus</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 8=Neptune</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 9=Pluto</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> else=Sun</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ELONG,PHI</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>observer's longitude (east +ve) and latitude
+(radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RA,DEC</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>topocentric apparent <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DIAM</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>angular diameter (equatorial, radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The date is in a dynamical timescale (TDB, formerly ET)
+and is in the form of a Modified
+Julian Date (JD-2400000.5). For all practical purposes, TT can
+ be used instead of TDB, and for many applications UT will do
+ (except for the Moon).
+ <DT>2.
+<DD>The longitude and latitude allow correction for geocentric
+ parallax. This is a major effect for the Moon, but in the
+ context of the limited accuracy of the present routine its
+ effect on planetary positions is small (negligible for the
+ outer planets). Geocentric positions can be generated by
+ appropriate use of the routines sla_DMOON and sla_PLANET.
+ <DT>3.
+<DD>The direction accuracy (arcsec, 1000-3000AD) is of order:
+ <PRE><TT>
+ Sun 5
+ Mercury 2
+ Venus 10
+ Moon 30
+ Mars 50
+ Jupiter 90
+ Saturn 90
+ Uranus 90
+ Neptune 10
+ Pluto 1&nbsp;&nbsp;&nbsp;(1885-2099AD only)
+</TT></PRE>
+ The angular diameter accuracy is about 0.4% for the Moon,
+ and 0.01% or better for the Sun and planets.
+ For more information on accuracy,
+ refer to the routines sla_PLANET and sla_DMOON,
+ which the present routine uses.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html2066" HREF="node165.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2064" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2058" HREF="node163.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2067" HREF="node165.html">SLA_REFCO - Refraction Constants</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2065" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2059" HREF="node163.html">SLA_RCC - Barycentric Coordinate Time</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node165.html b/src/slalib/sun67.htx/node165.html
new file mode 100644
index 0000000..1fadca0
--- /dev/null
+++ b/src/slalib/sun67.htx/node165.html
@@ -0,0 +1,176 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_REFCO - Refraction Constants</TITLE>
+<META NAME="description" CONTENT="SLA_REFCO - Refraction Constants">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node166.html">
+<LINK REL="previous" HREF="node164.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node166.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2076" HREF="node166.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2074" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2068" HREF="node164.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2077" HREF="node166.html">SLA_REFCOQ - Refraction Constants (fast)</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2075" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2069" HREF="node164.html">SLA_RDPLAN - Apparent of Planet</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004152000000000000000">SLA_REFCO - Refraction Constants</A>
+<A NAME="xref_SLA_REFCO">&#160;</A><A NAME="SLA_REFCO">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Determine the constants <I>a</I> and <I>b</I> in the
+atmospheric refraction model
+ <IMG WIDTH="164" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
+ SRC="img148.gif"
+ ALT="$\Delta \zeta = a \tan \zeta + b \tan^{3} \zeta$">, where <IMG WIDTH="11" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img149.gif"
+ ALT="$\zeta$"> is the <I>observed</I> zenith distance
+ (<I>i.e.</I> affected by refraction) and <IMG WIDTH="24" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img150.gif"
+ ALT="$\Delta \zeta$"> is
+ what to add to <IMG WIDTH="11" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img149.gif"
+ ALT="$\zeta$"> to give the <I>topocentric</I>
+ (<I>i.e. in vacuo</I>) zenith distance.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_REFCO (HM, TDK, PMB, RH, WL, PHI, TLR, EPS, REFA, REFB)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>HM</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>height of the observer above sea level (metre)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>TDK</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>ambient temperature at the observer (degrees K)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PMB</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>pressure at the observer (mB)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RH</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>relative humidity at the observer (range 0-1)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>WL</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>effective wavelength of the source (<IMG WIDTH="26" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img21.gif"
+ ALT="$\mu{\rm m}$">)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PHI</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>latitude of the observer (radian, astronomical)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>TLR</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>temperature lapse rate in the troposphere
+(degrees K per metre)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>EPS</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>precision required to terminate iteration (radian)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>REFA</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="37" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img151.gif"
+ ALT="$\tan \zeta$"> coefficient (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>REFB</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="44" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
+ SRC="img152.gif"
+ ALT="$\tan^{3} \zeta$"> coefficient (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>Suggested values for the TLR and EPS arguments are 0.0065D0 and
+1D-8 respectively.
+<DT>2.
+<DD>The radio refraction is chosen by specifying WL &gt;100&nbsp;<IMG WIDTH="26" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img21.gif"
+ ALT="$\mu{\rm m}$">. <DT>3.
+<DD>The routine is a slower but more accurate alternative to the
+ sla_REFCOQ routine. The constants it produces give perfect
+ agreement with sla_REFRO at zenith distances
+ <IMG WIDTH="54" HEIGHT="16" ALIGN="BOTTOM" BORDER="0"
+ SRC="img153.gif"
+ ALT="$\tan^{-1} 1$"> (<IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img154.gif"
+ ALT="$45^\circ$">) and <IMG WIDTH="54" HEIGHT="16" ALIGN="BOTTOM" BORDER="0"
+ SRC="img155.gif"
+ ALT="$\tan^{-1} 4$"> (<IMG WIDTH="43" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img156.gif"
+ ALT="$\sim 76^\circ$">).
+ At other zenith distances, the model achieves:
+<P> <IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img83.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.5$"> accuracy for <IMG WIDTH="56" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img157.gif"
+ ALT="$\zeta<80^{\circ}$">,<P> <IMG WIDTH="31" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img158.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.01$"> accuracy for <IMG WIDTH="56" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img159.gif"
+ ALT="$\zeta<60^{\circ}$">, and
+<P> <IMG WIDTH="39" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img112.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.001$"> accuracy for <IMG WIDTH="56" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img160.gif"
+ ALT="$\zeta<45^{\circ}$">. </DL></DL>
+<BR> <HR>
+<A NAME="tex2html2076" HREF="node166.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2074" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2068" HREF="node164.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2077" HREF="node166.html">SLA_REFCOQ - Refraction Constants (fast)</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2075" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2069" HREF="node164.html">SLA_RDPLAN - Apparent of Planet</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node166.html b/src/slalib/sun67.htx/node166.html
new file mode 100644
index 0000000..4dd74d2
--- /dev/null
+++ b/src/slalib/sun67.htx/node166.html
@@ -0,0 +1,428 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_REFCOQ - Refraction Constants (fast)</TITLE>
+<META NAME="description" CONTENT="SLA_REFCOQ - Refraction Constants (fast)">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node167.html">
+<LINK REL="previous" HREF="node165.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node167.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2086" HREF="node167.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2084" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2078" HREF="node165.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2087" HREF="node167.html">SLA_REFRO - Refraction</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2085" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2079" HREF="node165.html">SLA_REFCO - Refraction Constants</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004153000000000000000">SLA_REFCOQ - Refraction Constants (fast)</A>
+<A NAME="xref_SLA_REFCOQ">&#160;</A><A NAME="SLA_REFCOQ">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Determine the constants <I>a</I> and <I>b</I> in the
+atmospheric refraction model
+ <IMG WIDTH="164" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
+ SRC="img148.gif"
+ ALT="$\Delta \zeta = a \tan \zeta + b \tan^{3} \zeta$">, where <IMG WIDTH="11" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img149.gif"
+ ALT="$\zeta$"> is the <I>observed</I> zenith distance
+ (<I>i.e.</I> affected by refraction) and <IMG WIDTH="24" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img150.gif"
+ ALT="$\Delta \zeta$"> is
+ what to add to <IMG WIDTH="11" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img149.gif"
+ ALT="$\zeta$"> to give the <I>topocentric</I>
+ (<I>i.e. in vacuo</I>) zenith distance. (This is a fast
+ alternative to the sla_REFCO routine - see notes.)
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_REFCOQ (TDK, PMB, RH, WL, REFA, REFB)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>TDK</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>ambient temperature at the observer (degrees K)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PMB</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>pressure at the observer (mB)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RH</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>relative humidity at the observer (range 0-1)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>WL</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>effective wavelength of the source (<IMG WIDTH="26" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img21.gif"
+ ALT="$\mu{\rm m}$">)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>REFA</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="37" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img151.gif"
+ ALT="$\tan \zeta$"> coefficient (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>REFB</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="44" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
+ SRC="img152.gif"
+ ALT="$\tan^{3} \zeta$"> coefficient (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The radio refraction is chosen by specifying WL &gt;100&nbsp;<IMG WIDTH="26" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img21.gif"
+ ALT="$\mu{\rm m}$">.<DT>2.
+<DD>The model is an approximation, for moderate zenith distances,
+to the predictions of the sla_REFRO routine. The approximation
+ is maintained across a range of conditions, and applies to
+ both optical/IR and radio.
+ <DT>3.
+<DD>The algorithm is a fast alternative to the sla_REFCO routine.
+ The latter calls the sla_REFRO routine itself: this involves
+ integrations through a model atmosphere, and is costly in
+ processor time. However, the model which is produced is precisely
+ correct for two zenith distances (<IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img154.gif"
+ ALT="$45^\circ$"> and <IMG WIDTH="40" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img161.gif"
+ ALT="$\sim\!76^\circ$">) and at other zenith distances is limited in accuracy only by the
+ <IMG WIDTH="164" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
+ SRC="img148.gif"
+ ALT="$\Delta \zeta = a \tan \zeta + b \tan^{3} \zeta$"> formulation
+ itself. The present routine is not as accurate, though it
+ satisfies most practical requirements.
+ <DT>4.
+<DD>The model omits the effects of (i)&nbsp;height above sea level (apart
+ from the reduced pressure itself), (ii)&nbsp;latitude (<I>i.e.</I> the
+ flattening of the Earth) and (iii)&nbsp;variations in tropospheric
+ lapse rate.
+ <DT>5.
+<DD>The model has been tested using the following range of conditions:
+ <DL COMPACT>
+<DT><IMG WIDTH="7" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img72.gif"
+ ALT="$\cdot$"><DD>lapse rates 0.0055, 0.0065, 0.0075&nbsp;degrees K per metre
+<DT><IMG WIDTH="7" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img72.gif"
+ ALT="$\cdot$"><DD>latitudes <IMG WIDTH="18" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img1.gif"
+ ALT="$0^{\circ}$">, <IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img162.gif"
+ ALT="$25^\circ$">, <IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img163.gif"
+ ALT="$50^\circ$">, <IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img164.gif"
+ ALT="$75^\circ$"> <DT><IMG WIDTH="7" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img72.gif"
+ ALT="$\cdot$"><DD>heights 0, 2500, 5000 metres above sea level
+ <DT><IMG WIDTH="7" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img72.gif"
+ ALT="$\cdot$"><DD>pressures mean for height -10% to +5% in steps of 5%
+ <DT><IMG WIDTH="7" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img72.gif"
+ ALT="$\cdot$"><DD>temperatures <IMG WIDTH="38" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img165.gif"
+ ALT="$-10^\circ$"> to <IMG WIDTH="38" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img166.gif"
+ ALT="$+20^\circ$"> with respect to
+ <IMG WIDTH="34" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img167.gif"
+ ALT="$280^\circ$">K at sea level
+ <DT><IMG WIDTH="7" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img72.gif"
+ ALT="$\cdot$"><DD>relative humidity 0, 0.5, 1
+ <DT><IMG WIDTH="7" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img72.gif"
+ ALT="$\cdot$"><DD>wavelength 0.4, 0.6, ... <IMG WIDTH="34" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img168.gif"
+ ALT="$2\mu{\rm m}$">, + radio
+ <DT><IMG WIDTH="7" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img72.gif"
+ ALT="$\cdot$"><DD>zenith distances <IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img39.gif"
+ ALT="$15^\circ$">, <IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img154.gif"
+ ALT="$45^\circ$">, <IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img164.gif"
+ ALT="$75^\circ$"></DL>
+ For the above conditions, the comparison with sla_REFRO
+ was as follows:
+<P> <BR>
+<BR>
+<BR>
+<P> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <TABLE CELLPADDING=3 BORDER="1">
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP>&nbsp;</TD>
+<TH ALIGN="RIGHT" NOWRAP><I>worst</I></TH>
+<TH ALIGN="RIGHT" NOWRAP><I>RMS</I></TH>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP>optical/IR</TD>
+<TD ALIGN="RIGHT" NOWRAP>62</TD>
+<TD ALIGN="RIGHT" NOWRAP>8</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP>radio</TD>
+<TD ALIGN="RIGHT" NOWRAP>319</TD>
+<TD ALIGN="RIGHT" NOWRAP>49</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP>&nbsp;</TD>
+<TD ALIGN="RIGHT" NOWRAP>mas</TD>
+<TD ALIGN="RIGHT" NOWRAP>mas</TD>
+</TR>
+</TABLE>
+<P> <BR>
+<BR>
+<BR>
+<BR>
+<P>
+For this particular set of conditions:
+ <DL COMPACT>
+<DT><IMG WIDTH="7" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img72.gif"
+ ALT="$\cdot$"><DD>lapse rate <IMG WIDTH="86" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img169.gif"
+ ALT="$6.5^\circ K km^{-1}$"><DT><IMG WIDTH="7" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img72.gif"
+ ALT="$\cdot$"><DD>latitude <IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img163.gif"
+ ALT="$50^\circ$"> <DT><IMG WIDTH="7" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img72.gif"
+ ALT="$\cdot$"><DD>sea level
+ <DT><IMG WIDTH="7" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img72.gif"
+ ALT="$\cdot$"><DD>pressure 1005mB
+ <DT><IMG WIDTH="7" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img72.gif"
+ ALT="$\cdot$"><DD>temperature <IMG WIDTH="18" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img170.gif"
+ ALT="$7^\circ$">C
+ <DT><IMG WIDTH="7" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img72.gif"
+ ALT="$\cdot$"><DD>humidity 80%
+ <DT><IMG WIDTH="7" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img72.gif"
+ ALT="$\cdot$"><DD>wavelength 5740A
+ </DL>
+ the results were as follows:
+<P> <BR>
+<BR>
+<BR>
+<P> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <TABLE CELLPADDING=3 BORDER="1">
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1><IMG WIDTH="11" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img149.gif"
+ ALT="$\zeta$"></TD>
+<TD ALIGN="CENTER" NOWRAP COLSPAN=1>sla_REFRO</TD>
+<TD ALIGN="CENTER" NOWRAP COLSPAN=1>sla_REFCOQ</TD>
+<TD ALIGN="CENTER" NOWRAP COLSPAN=1>Saastamoinen</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP>10</TD>
+<TD ALIGN="RIGHT" NOWRAP>10.27</TD>
+<TD ALIGN="RIGHT" NOWRAP>10.27</TD>
+<TD ALIGN="RIGHT" NOWRAP>10.27</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP>20</TD>
+<TD ALIGN="RIGHT" NOWRAP>21.19</TD>
+<TD ALIGN="RIGHT" NOWRAP>21.20</TD>
+<TD ALIGN="RIGHT" NOWRAP>21.19</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP>30</TD>
+<TD ALIGN="RIGHT" NOWRAP>33.61</TD>
+<TD ALIGN="RIGHT" NOWRAP>33.61</TD>
+<TD ALIGN="RIGHT" NOWRAP>33.60</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP>40</TD>
+<TD ALIGN="RIGHT" NOWRAP>48.82</TD>
+<TD ALIGN="RIGHT" NOWRAP>48.83</TD>
+<TD ALIGN="RIGHT" NOWRAP>48.81</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP>45</TD>
+<TD ALIGN="RIGHT" NOWRAP>58.16</TD>
+<TD ALIGN="RIGHT" NOWRAP>58.18</TD>
+<TD ALIGN="RIGHT" NOWRAP>58.16</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP>50</TD>
+<TD ALIGN="RIGHT" NOWRAP>69.28</TD>
+<TD ALIGN="RIGHT" NOWRAP>69.30</TD>
+<TD ALIGN="RIGHT" NOWRAP>69.27</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP>55</TD>
+<TD ALIGN="RIGHT" NOWRAP>82.97</TD>
+<TD ALIGN="RIGHT" NOWRAP>82.99</TD>
+<TD ALIGN="RIGHT" NOWRAP>82.95</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP>60</TD>
+<TD ALIGN="RIGHT" NOWRAP>100.51</TD>
+<TD ALIGN="RIGHT" NOWRAP>100.54</TD>
+<TD ALIGN="RIGHT" NOWRAP>100.50</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP>65</TD>
+<TD ALIGN="RIGHT" NOWRAP>124.23</TD>
+<TD ALIGN="RIGHT" NOWRAP>124.26</TD>
+<TD ALIGN="RIGHT" NOWRAP>124.20</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP>70</TD>
+<TD ALIGN="RIGHT" NOWRAP>158.63</TD>
+<TD ALIGN="RIGHT" NOWRAP>158.68</TD>
+<TD ALIGN="RIGHT" NOWRAP>158.61</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP>72</TD>
+<TD ALIGN="RIGHT" NOWRAP>177.32</TD>
+<TD ALIGN="RIGHT" NOWRAP>177.37</TD>
+<TD ALIGN="RIGHT" NOWRAP>177.31</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP>74</TD>
+<TD ALIGN="RIGHT" NOWRAP>200.35</TD>
+<TD ALIGN="RIGHT" NOWRAP>200.38</TD>
+<TD ALIGN="RIGHT" NOWRAP>200.32</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP>76</TD>
+<TD ALIGN="RIGHT" NOWRAP>229.45</TD>
+<TD ALIGN="RIGHT" NOWRAP>229.43</TD>
+<TD ALIGN="RIGHT" NOWRAP>229.42</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP>78</TD>
+<TD ALIGN="RIGHT" NOWRAP>267.44</TD>
+<TD ALIGN="RIGHT" NOWRAP>267.29</TD>
+<TD ALIGN="RIGHT" NOWRAP>267.41</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP>80</TD>
+<TD ALIGN="RIGHT" NOWRAP>319.13</TD>
+<TD ALIGN="RIGHT" NOWRAP>318.55</TD>
+<TD ALIGN="RIGHT" NOWRAP>319.10</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP>deg</TD>
+<TD ALIGN="RIGHT" NOWRAP>arcsec</TD>
+<TD ALIGN="RIGHT" NOWRAP>arcsec</TD>
+<TD ALIGN="RIGHT" NOWRAP>arcsec</TD>
+</TR>
+</TABLE>
+<P> <BR>
+<BR>
+<BR>
+<BR>
+<P>
+The values for Saastamoinen's formula (which includes terms
+ up to <IMG WIDTH="33" HEIGHT="16" ALIGN="BOTTOM" BORDER="0"
+ SRC="img171.gif"
+ ALT="$\tan^5$">) are taken from Hohenkerk and Sinclair (1985).
+<P>
+The results from the much slower but more accurate sla_REFCO
+ routine have not been included in the tabulation as they are
+ identical to those in the sla_REFRO column to the
+ <IMG WIDTH="31" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img158.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.01$"><P>
+resolution used.
+ <DT>6.
+<DD>Outlandish input parameters are silently limited
+ to mathematically safe values. Zero pressure is permissible,
+ and causes zeroes to be returned.
+ <DT>7.
+<DD>The algorithm draws on several sources, as follows:
+ <UL>
+<LI> The formula for the saturation vapour pressure of water as
+ a function of temperature and temperature is taken from
+ expressions A4.5-A4.7 of Gill (1982).
+<LI> The formula for the water vapour pressure, given the
+ saturation pressure and the relative humidity is from
+ Crane (1976), expression 2.5.5.
+<LI> The refractivity of air is a function of temperature,
+ total pressure, water-vapour pressure and, in the case
+ of optical/IR but not radio, wavelength. The formulae
+ for the two cases are developed from the Essen and Froome
+ expressions adopted in Resolution 1 of the 12th International
+ Geodesy Association General Assembly (1963).
+ </UL>
+ The above three items are as used in the sla_REFRO routine.
+ <UL>
+<LI> The formula for <IMG WIDTH="91" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img172.gif"
+ ALT="$\beta~(=H_0/r_0)$"> is
+ an adaption of expression 9 from Stone (1996). The
+ adaptations, arrived at empirically, consist of (i)&nbsp;a
+ small adjustment to the coefficient and (ii)&nbsp;a humidity
+ term for the radio case only.
+<LI> The formulae for the refraction constants as a function of
+ <I>n</I>-1 and <IMG WIDTH="12" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img173.gif"
+ ALT="$\beta$"> are from Green (1987), expression 4.31.
+ </UL></DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>Crane, R.K., Meeks, M.L. (ed), ``Refraction Effects in
+the Neutral Atmosphere'',
+<I>Methods of Experimental Physics: Astrophysics 12B,</I>
+ Academic Press, 1976.
+ <DT>2.
+<DD>Gill, Adrian E., <I>Atmosphere-Ocean Dynamics,</I>
+ Academic Press, 1982.
+ <DT>3.
+<DD>Hohenkerk, C.Y., &amp; Sinclair, A.T., NAO Technical Note
+ No.&nbsp;63, 1985.
+ <DT>4.
+<DD>International Geodesy Association General Assembly, Bulletin
+ G&#233;od&#233;sique <B>70</B> p390, 1963.
+ <DT>5.
+<DD>Stone, Ronald C., P.A.S.P.&nbsp;<B>108</B> 1051-1058, 1996.
+ <DT>6.
+<DD>Green, R.M., <I>Spherical Astronomy,</I> Cambridge
+ University Press, 1987.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html2086" HREF="node167.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2084" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2078" HREF="node165.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2087" HREF="node167.html">SLA_REFRO - Refraction</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2085" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2079" HREF="node165.html">SLA_REFCO - Refraction Constants</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node167.html b/src/slalib/sun67.htx/node167.html
new file mode 100644
index 0000000..f422ec8
--- /dev/null
+++ b/src/slalib/sun67.htx/node167.html
@@ -0,0 +1,232 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_REFRO - Refraction</TITLE>
+<META NAME="description" CONTENT="SLA_REFRO - Refraction">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node168.html">
+<LINK REL="previous" HREF="node166.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node168.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2096" HREF="node168.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2094" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2088" HREF="node166.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2097" HREF="node168.html">SLA_REFV - Apply Refraction to Vector</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2095" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2089" HREF="node166.html">SLA_REFCOQ - Refraction Constants (fast)</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004154000000000000000">SLA_REFRO - Refraction</A>
+<A NAME="xref_SLA_REFRO">&#160;</A><A NAME="SLA_REFRO">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Atmospheric refraction, for radio or optical/IR wavelengths.
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_REFRO (ZOBS, HM, TDK, PMB, RH, WL, PHI, TLR, EPS, REF)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ZOBS</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>observed zenith distance of the source (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>HM</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>height of the observer above sea level (metre)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>TDK</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>ambient temperature at the observer (degrees K)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PMB</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>pressure at the observer (mB)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RH</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>relative humidity at the observer (range 0-1)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>WL</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>effective wavelength of the source (<IMG WIDTH="26" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img21.gif"
+ ALT="$\mu{\rm m}$">)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PHI</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>latitude of the observer (radian, astronomical)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>TLR</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>temperature lapse rate in the troposphere
+(degrees K per metre)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>EPS</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>precision required to terminate iteration (radian)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>REF</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TH ALIGN="LEFT" NOWRAP>refraction: <I>in vacuo</I> ZD minus observed ZD (radians)</TH>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>A suggested value for the TLR argument is 0.0065D0. The
+refraction is significantly affected by TLR, and if studies
+of the local atmosphere have been carried out a better TLR
+ value may be available.
+ <DT>2.
+<DD>A suggested value for the EPS argument is 1D-8. The result is
+ usually at least two orders of magnitude more computationally
+ precise than the supplied EPS value.
+ <DT>3.
+<DD>The routine computes the refraction for zenith distances up
+ to and a little beyond <IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img22.gif"
+ ALT="$90^{\circ}$"> using the method of Hohenkerk
+ &amp; Sinclair (NAO Technical Notes 59 and 63, subsequently adopted
+ in the <I>Explanatory Supplement to the Astronomical Almanac,</I>
+ 1992 - see section 3.281).
+ <DT>4.
+<DD>The code is based on the AREF optical/IR refraction subroutine
+ of C.Hohenkerk (HMNAO, September 1984), with extensions to
+ support the radio case. The modifications to the original HMNAO
+ optical/IR refraction code which affect the results are:
+ <UL>
+<LI> Murray's values for the gas constants have been used
+ (<I>Vectorial Astrometry,</I> Adam Hilger, 1983).
+<LI> A better model for <I>P</I><SUB><I>s</I></SUB>(<I>T</I>) has been adopted (taken from
+ Gill, <I>Atmosphere-Ocean Dynamics,</I> Academic Press, 1982).
+<LI> More accurate expressions for <I>Pw</I><SUB><I>o</I></SUB> have been adopted
+ (again from Gill 1982).
+<LI> Provision for radio wavelengths has been added using
+ expressions devised by A.T.Sinclair, RGO (private
+ communication 1989), based on the Essen &amp; Froome
+ refractivity formula adopted in Resolution&nbsp;1 of the
+ 12th International Geodesy Association General Assembly
+ (Bulletin G&#233;od&#233;sique <B>70</B> p390, 1963).
+ </UL>
+ None of the changes significantly affects the optical/IR results
+ with respect to the algorithm given in the 1992 <I>Explanatory
+ Supplement.</I> For example, at <IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img174.gif"
+ ALT="$70^\circ$"> zenith distance the present
+ routine agrees with the ES algorithm to better than
+ <IMG WIDTH="31" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img175.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.05$"><P>
+for any reasonable combination of parameters. However, the
+ improved water-vapour expressions do make a significant difference
+ in the radio band, at <IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img174.gif"
+ ALT="$70^\circ$"> zenith distance reaching almost
+ <IMG WIDTH="17" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img130.gif"
+ ALT="$4\hspace{-0.05em}^{'\hspace{-0.1em}'}$"> for a hot, humid, low-altitude site during a period of
+ low pressure.
+ <DT>5.
+<DD>The radio refraction is chosen by specifying WL &gt;100&nbsp;<IMG WIDTH="26" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img21.gif"
+ ALT="$\mu{\rm m}$">. Because the algorithm takes no account of the ionosphere, the
+ accuracy deteriorates at low frequencies, below about 30MHz.
+ <DT>6.
+<DD>Before use, the value of ZOBS is expressed in the range <IMG WIDTH="25" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img47.gif"
+ ALT="$\pm \pi$">. If this ranged ZOBS is negative, the result REF is computed from its
+ absolute value before being made negative to match. In addition, if
+ it has an absolute value greater than <IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img176.gif"
+ ALT="$93^\circ$">, a fixed REF value
+ equal to the result for ZOBS&nbsp;<IMG WIDTH="43" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img177.gif"
+ ALT="$=93^\circ$"> is returned, appropriately
+ signed.
+ <DT>7.
+<DD>As in the original Hohenkerk and Sinclair algorithm, fixed values
+ of the water vapour polytrope exponent, the height of the
+ tropopause, and the height at which refraction is negligible are
+ used.
+ <DT>8.
+<DD>The radio refraction has been tested against work done by
+ Iain&nbsp;Coulson, JACH, (private communication 1995) for the
+ James Clerk Maxwell Telescope, Mauna Kea. For typical conditions,
+ agreement at the
+ <IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img25.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.1$"> level is achieved for moderate ZD,
+ worsening to perhaps
+ <IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img83.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.5$"> -
+ <IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img178.gif"
+ ALT="$1\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.0$"> at ZD <IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img179.gif"
+ ALT="$80^\circ$">. At hot and humid sea-level sites the accuracy will not be as good.
+ <DT>9.
+<DD>It should be noted that the relative humidity RH is formally
+ defined in terms of ``mixing ratio'' rather than pressures or
+ densities as is often stated. It is the mass of water per unit
+ mass of dry air divided by that for saturated air at the same
+ temperature and pressure (see Gill 1982). The familiar
+ <IMG WIDTH="75" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img180.gif"
+ ALT="$\nu=p_w/p_s$"> or <IMG WIDTH="75" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img181.gif"
+ ALT="$\nu=\rho_w/\rho_s$"> expressions can differ from
+ the formal definition by several percent, significant in the
+ radio case.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html2096" HREF="node168.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2094" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2088" HREF="node166.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2097" HREF="node168.html">SLA_REFV - Apply Refraction to Vector</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2095" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2089" HREF="node166.html">SLA_REFCOQ - Refraction Constants (fast)</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node168.html b/src/slalib/sun67.htx/node168.html
new file mode 100644
index 0000000..c695ed9
--- /dev/null
+++ b/src/slalib/sun67.htx/node168.html
@@ -0,0 +1,276 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_REFV - Apply Refraction to Vector</TITLE>
+<META NAME="description" CONTENT="SLA_REFV - Apply Refraction to Vector">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node169.html">
+<LINK REL="previous" HREF="node167.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node169.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2106" HREF="node169.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2104" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2098" HREF="node167.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2107" HREF="node169.html">SLA_REFZ - Apply Refraction to ZD</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2105" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2099" HREF="node167.html">SLA_REFRO - Refraction</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004155000000000000000">SLA_REFV - Apply Refraction to Vector</A>
+<A NAME="xref_SLA_REFV">&#160;</A><A NAME="SLA_REFV">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Adjust an unrefracted Cartesian vector to include the effect of
+atmospheric refraction, using the simple
+ <IMG WIDTH="164" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
+ SRC="img148.gif"
+ ALT="$\Delta \zeta = a \tan \zeta + b \tan^{3} \zeta$"> model.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_REFV (VU, REFA, REFB, VR)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>VU</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>unrefracted position of the source (<IMG WIDTH="66" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img28.gif"
+ ALT="$[\,Az,El~]$"> 3-vector)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>REFA</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="37" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img151.gif"
+ ALT="$\tan \zeta$"> coefficient (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>REFB</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="44" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
+ SRC="img152.gif"
+ ALT="$\tan^{3} \zeta$"> coefficient (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>VR</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>refracted position of the source (<IMG WIDTH="66" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img28.gif"
+ ALT="$[\,Az,El~]$"> 3-vector)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>This routine applies the adjustment for refraction in the
+opposite sense to the usual one - it takes an unrefracted
+(<I>in vacuo</I>) position and produces an observed (refracted)
+ position, whereas the
+ <IMG WIDTH="164" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
+ SRC="img148.gif"
+ ALT="$\Delta \zeta = a \tan \zeta + b \tan^{3} \zeta$"> model strictly
+ applies to the case where an observed position is to have the
+ refraction removed. The unrefracted to refracted case is
+ harder, and requires an inverted form of the text-book
+ refraction models; the algorithm used here is equivalent to
+ one iteration of the Newton-Raphson method applied to the
+ above formula.
+ <DT>2.
+<DD>Though optimized for speed rather than precision, the present
+ routine achieves consistency with the refracted-to-unrefracted
+ <IMG WIDTH="164" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
+ SRC="img148.gif"
+ ALT="$\Delta \zeta = a \tan \zeta + b \tan^{3} \zeta$"> model at better than 1&nbsp;microarcsecond within
+ <IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img182.gif"
+ ALT="$30^\circ$"> of the zenith and remains within 1&nbsp;milliarcsecond to
+ <IMG WIDTH="56" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img183.gif"
+ ALT="$\zeta=70^\circ$">. The inherent accuracy of the model is, of
+ course, far worse than this - see the documentation for sla_REFCO
+ for more information.
+ <DT>3.
+<DD>At low elevations (below about <IMG WIDTH="18" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img27.gif"
+ ALT="$3^{\circ}$">) the refraction
+ correction is held back to prevent arithmetic problems and
+ wildly wrong results. Over a wide range of observer heights
+ and corresponding temperatures and pressures, the following
+ levels of accuracy are achieved, relative to numerical
+ integration through a model atmosphere:
+<P> <DIV ALIGN="CENTER">
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP><IMG WIDTH="28" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img184.gif"
+ ALT="$\zeta_{obs}$"></TD>
+<TH ALIGN="CENTER" NOWRAP><I>error</I></TH>
+<TD ALIGN="LEFT" NOWRAP>&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP>&nbsp;</TD>
+<TD ALIGN="CENTER" NOWRAP>&nbsp;</TD>
+<TD ALIGN="LEFT" NOWRAP>&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP><IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img179.gif"
+ ALT="$80^\circ$"></TD>
+<TD ALIGN="CENTER" NOWRAP><IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img185.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.4$"></TD>
+<TD ALIGN="LEFT" NOWRAP>&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP><IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img186.gif"
+ ALT="$81^\circ$"></TD>
+<TD ALIGN="CENTER" NOWRAP><IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img187.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.8$"></TD>
+<TD ALIGN="LEFT" NOWRAP>&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP><IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img188.gif"
+ ALT="$82^\circ$"></TD>
+<TD ALIGN="CENTER" NOWRAP><IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img189.gif"
+ ALT="$1\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.6$"></TD>
+<TD ALIGN="LEFT" NOWRAP>&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP><IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img190.gif"
+ ALT="$83^\circ$"></TD>
+<TD ALIGN="CENTER" NOWRAP><IMG WIDTH="17" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img75.gif"
+ ALT="$3\hspace{-0.05em}^{'\hspace{-0.1em}'}$"></TD>
+<TD ALIGN="LEFT" NOWRAP>&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP><IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img191.gif"
+ ALT="$84^\circ$"></TD>
+<TD ALIGN="CENTER" NOWRAP><IMG WIDTH="17" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img192.gif"
+ ALT="$7\hspace{-0.05em}^{'\hspace{-0.1em}'}$"></TD>
+<TD ALIGN="LEFT" NOWRAP>&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP><IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img193.gif"
+ ALT="$85^\circ$"></TD>
+<TD ALIGN="CENTER" NOWRAP><IMG WIDTH="25" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img133.gif"
+ ALT="$17\hspace{-0.05em}^{'\hspace{-0.1em}'}$"></TD>
+<TD ALIGN="LEFT" NOWRAP>&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP><IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img194.gif"
+ ALT="$86^\circ$"></TD>
+<TD ALIGN="CENTER" NOWRAP><IMG WIDTH="25" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img195.gif"
+ ALT="$45\hspace{-0.05em}^{'\hspace{-0.1em}'}$"></TD>
+<TD ALIGN="LEFT" NOWRAP>&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP><IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img196.gif"
+ ALT="$87^\circ$"></TD>
+<TD ALIGN="CENTER" NOWRAP><IMG WIDTH="33" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img197.gif"
+ ALT="$150\hspace{-0.05em}^{'\hspace{-0.1em}'}$"></TD>
+<TD ALIGN="LEFT" NOWRAP>&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP><IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img198.gif"
+ ALT="$88^\circ$"></TD>
+<TD ALIGN="CENTER" NOWRAP><IMG WIDTH="33" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img199.gif"
+ ALT="$340\hspace{-0.05em}^{'\hspace{-0.1em}'}$"></TD>
+<TD ALIGN="LEFT" NOWRAP>&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP><IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img200.gif"
+ ALT="$89^\circ$"></TD>
+<TD ALIGN="CENTER" NOWRAP><IMG WIDTH="33" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img201.gif"
+ ALT="$620\hspace{-0.05em}^{'\hspace{-0.1em}'}$"></TD>
+<TD ALIGN="LEFT" NOWRAP>&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP><IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img22.gif"
+ ALT="$90^{\circ}$"></TD>
+<TD ALIGN="CENTER" NOWRAP><IMG WIDTH="41" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img202.gif"
+ ALT="$1100\hspace{-0.05em}^{'\hspace{-0.1em}'}$"></TD>
+<TD ALIGN="LEFT" NOWRAP>&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP><IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img203.gif"
+ ALT="$91^\circ$"></TD>
+<TD ALIGN="CENTER" NOWRAP><IMG WIDTH="41" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img204.gif"
+ ALT="$1900\hspace{-0.05em}^{'\hspace{-0.1em}'}$"></TD>
+<TD ALIGN="LEFT" NOWRAP>&lt; high-altitude</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP><IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img205.gif"
+ ALT="$92^\circ$"></TD>
+<TD ALIGN="CENTER" NOWRAP><IMG WIDTH="41" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img206.gif"
+ ALT="$3200\hspace{-0.05em}^{'\hspace{-0.1em}'}$"></TD>
+<TD ALIGN="LEFT" NOWRAP>&lt; sites only</TD>
+</TR>
+</TABLE></DIV>
+ <DT>4.
+<DD>See also the routine sla_REFZ, which performs the adjustment to
+ the zenith distance rather than in <IMG WIDTH="58" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img50.gif"
+ ALT="$[\,x,y,z\,]$">. The present routine is faster than sla_REFZ and,
+ except very low down,
+ is equally accurate for all practical purposes. However, beyond
+ about <IMG WIDTH="56" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img207.gif"
+ ALT="$\zeta=84^\circ$"> sla_REFZ should be used, and for the utmost
+ accuracy iterative use of sla_REFRO should be considered.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html2106" HREF="node169.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2104" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2098" HREF="node167.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2107" HREF="node169.html">SLA_REFZ - Apply Refraction to ZD</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2105" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2099" HREF="node167.html">SLA_REFRO - Refraction</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node169.html b/src/slalib/sun67.htx/node169.html
new file mode 100644
index 0000000..6180ab0
--- /dev/null
+++ b/src/slalib/sun67.htx/node169.html
@@ -0,0 +1,275 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_REFZ - Apply Refraction to ZD</TITLE>
+<META NAME="description" CONTENT="SLA_REFZ - Apply Refraction to ZD">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node170.html">
+<LINK REL="previous" HREF="node168.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node170.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2116" HREF="node170.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2114" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2108" HREF="node168.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2117" HREF="node170.html">SLA_RVEROT - RV Corrn to Earth Centre</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2115" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2109" HREF="node168.html">SLA_REFV - Apply Refraction to Vector</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004156000000000000000">SLA_REFZ - Apply Refraction to ZD</A>
+<A NAME="xref_SLA_REFZ">&#160;</A><A NAME="SLA_REFZ">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Adjust an unrefracted zenith distance to include the effect of
+atmospheric refraction, using the simple
+ <IMG WIDTH="164" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
+ SRC="img148.gif"
+ ALT="$\Delta \zeta = a \tan \zeta + b \tan^{3} \zeta$"> model.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_REFZ (ZU, REFA, REFB, ZR)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ZU</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>unrefracted zenith distance of the source (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>REFA</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="37" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img151.gif"
+ ALT="$\tan \zeta$"> coefficient (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>REFB</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="44" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
+ SRC="img152.gif"
+ ALT="$\tan^{3} \zeta$"> coefficient (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ZR</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>refracted zenith distance (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>This routine applies the adjustment for refraction in the
+opposite sense to the usual one - it takes an unrefracted
+(<I>in vacuo</I>) position and produces an observed (refracted)
+ position, whereas the
+ <IMG WIDTH="164" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
+ SRC="img148.gif"
+ ALT="$\Delta \zeta = a \tan \zeta + b \tan^{3} \zeta$"> model strictly
+ applies to the case where an observed position is to have the
+ refraction removed. The unrefracted to refracted case is
+ harder, and requires an inverted form of the text-book
+ refraction models; the formula used here is based on the
+ Newton-Raphson method. For the utmost numerical consistency
+ with the refracted to unrefracted model, two iterations are
+ carried out, achieving agreement at the 10<SUP>-11</SUP>&nbsp;arcsecond level
+ for <IMG WIDTH="56" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img208.gif"
+ ALT="$\zeta=80^\circ$">. The inherent accuracy of the model
+ is, of course, far worse than this - see the documentation for
+ sla_REFCO for more information.
+ <DT>2.
+<DD>At <IMG WIDTH="56" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img209.gif"
+ ALT="$\zeta=83^\circ$">, the rapidly-worsening
+ <IMG WIDTH="164" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
+ SRC="img148.gif"
+ ALT="$\Delta \zeta = a \tan \zeta + b \tan^{3} \zeta$"> model is abandoned and an empirical formula takes over:
+<P>
+<P ALIGN="CENTER"><IMG WIDTH="321" HEIGHT="49"
+ SRC="img210.gif"
+ ALT="\begin{displaymath}
+\Delta \zeta = F \left(
+ \frac{0^\circ\hspace{-0.37em}.\hspa...
+ ...hspace{0.02em}00202 E^2}
+ {1 + 0.28385 E +0.02390 E^2} \right) \end{displaymath}"></P>
+where <IMG WIDTH="113" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img211.gif"
+ ALT="$E=90^\circ-\zeta_{true}$"> and <I>F</I> is a factor chosen to meet the
+ <IMG WIDTH="164" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
+ SRC="img148.gif"
+ ALT="$\Delta \zeta = a \tan \zeta + b \tan^{3} \zeta$"> formula at <IMG WIDTH="56" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img209.gif"
+ ALT="$\zeta=83^\circ$">. Over a
+ wide range of observer heights and corresponding temperatures and
+ pressures, the following levels of accuracy are achieved,
+ relative to numerical integration through a model atmosphere:
+<P> <DIV ALIGN="CENTER">
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP><IMG WIDTH="28" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img184.gif"
+ ALT="$\zeta_{obs}$"></TD>
+<TH ALIGN="CENTER" NOWRAP><I>error</I></TH>
+<TD ALIGN="LEFT" NOWRAP>&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP>&nbsp;</TD>
+<TD ALIGN="CENTER" NOWRAP>&nbsp;</TD>
+<TD ALIGN="LEFT" NOWRAP>&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP><IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img179.gif"
+ ALT="$80^\circ$"></TD>
+<TD ALIGN="CENTER" NOWRAP><IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img185.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.4$"></TD>
+<TD ALIGN="LEFT" NOWRAP>&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP><IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img186.gif"
+ ALT="$81^\circ$"></TD>
+<TD ALIGN="CENTER" NOWRAP><IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img187.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.8$"></TD>
+<TD ALIGN="LEFT" NOWRAP>&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP><IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img188.gif"
+ ALT="$82^\circ$"></TD>
+<TD ALIGN="CENTER" NOWRAP><IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img212.gif"
+ ALT="$1\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.5$"></TD>
+<TD ALIGN="LEFT" NOWRAP>&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP><IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img190.gif"
+ ALT="$83^\circ$"></TD>
+<TD ALIGN="CENTER" NOWRAP><IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img213.gif"
+ ALT="$3\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.2$"></TD>
+<TD ALIGN="LEFT" NOWRAP>&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP><IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img191.gif"
+ ALT="$84^\circ$"></TD>
+<TD ALIGN="CENTER" NOWRAP><IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img214.gif"
+ ALT="$4\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.9$"></TD>
+<TD ALIGN="LEFT" NOWRAP>&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP><IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img193.gif"
+ ALT="$85^\circ$"></TD>
+<TD ALIGN="CENTER" NOWRAP><IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img215.gif"
+ ALT="$5\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.8$"></TD>
+<TD ALIGN="LEFT" NOWRAP>&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP><IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img194.gif"
+ ALT="$86^\circ$"></TD>
+<TD ALIGN="CENTER" NOWRAP><IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img216.gif"
+ ALT="$6\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.1$"></TD>
+<TD ALIGN="LEFT" NOWRAP>&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP><IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img196.gif"
+ ALT="$87^\circ$"></TD>
+<TD ALIGN="CENTER" NOWRAP><IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img217.gif"
+ ALT="$7\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.1$"></TD>
+<TD ALIGN="LEFT" NOWRAP>&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP><IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img198.gif"
+ ALT="$88^\circ$"></TD>
+<TD ALIGN="CENTER" NOWRAP><IMG WIDTH="25" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img43.gif"
+ ALT="$11\hspace{-0.05em}^{'\hspace{-0.1em}'}$"></TD>
+<TD ALIGN="LEFT" NOWRAP>&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP><IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img200.gif"
+ ALT="$89^\circ$"></TD>
+<TD ALIGN="CENTER" NOWRAP><IMG WIDTH="25" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img218.gif"
+ ALT="$21\hspace{-0.05em}^{'\hspace{-0.1em}'}$"></TD>
+<TD ALIGN="LEFT" NOWRAP>&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP><IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img22.gif"
+ ALT="$90^{\circ}$"></TD>
+<TD ALIGN="CENTER" NOWRAP><IMG WIDTH="25" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img219.gif"
+ ALT="$43\hspace{-0.05em}^{'\hspace{-0.1em}'}$"></TD>
+<TD ALIGN="LEFT" NOWRAP>&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP><IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img203.gif"
+ ALT="$91^\circ$"></TD>
+<TD ALIGN="CENTER" NOWRAP><IMG WIDTH="25" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img220.gif"
+ ALT="$92\hspace{-0.05em}^{'\hspace{-0.1em}'}$"></TD>
+<TD ALIGN="LEFT" NOWRAP>&lt; high-altitude</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP><IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img205.gif"
+ ALT="$92^\circ$"></TD>
+<TD ALIGN="CENTER" NOWRAP><IMG WIDTH="33" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img221.gif"
+ ALT="$220\hspace{-0.05em}^{'\hspace{-0.1em}'}$"></TD>
+<TD ALIGN="LEFT" NOWRAP>&lt; sites only</TD>
+</TR>
+</TABLE></DIV>
+ <DT>3.
+<DD>See also the routine sla_REFV, which performs the adjustment in
+ <IMG WIDTH="58" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img50.gif"
+ ALT="$[\,x,y,z\,]$">, and with the emphasis on speed rather than numerical accuracy.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html2116" HREF="node170.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2114" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2108" HREF="node168.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2117" HREF="node170.html">SLA_RVEROT - RV Corrn to Earth Centre</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2115" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2109" HREF="node168.html">SLA_REFV - Apply Refraction to Vector</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node17.html b/src/slalib/sun67.htx/node17.html
new file mode 100644
index 0000000..c44bc9c
--- /dev/null
+++ b/src/slalib/sun67.htx/node17.html
@@ -0,0 +1,205 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_ALTAZ - Velocities etc. for Altazimuth Mount</TITLE>
+<META NAME="description" CONTENT="SLA_ALTAZ - Velocities etc. for Altazimuth Mount">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node18.html">
+<LINK REL="previous" HREF="node16.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node18.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html596" HREF="node18.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html594" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html588" HREF="node16.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html597" HREF="node18.html">SLA_AMP - Apparent to Mean</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html595" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html589" HREF="node16.html">SLA_AIRMAS - Air Mass</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION00044000000000000000">SLA_ALTAZ - Velocities <I>etc.</I> for Altazimuth Mount</A>
+<A NAME="xref_SLA_ALTAZ">&#160;</A><A NAME="SLA_ALTAZ">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Positions, velocities and accelerations for an altazimuth
+telescope mount tracking a star (double precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_ALTAZ (
+ HA, DEC, PHI,
+ AZ, AZD, AZDD, EL, ELD, ELDD, PA, PAD, PADD)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>HA</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>hour angle</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DEC</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>declination</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PHI</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>observatory latitude</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>AZ</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>azimuth</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>AZD</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>azimuth velocity</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>AZDD</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>azimuth acceleration</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>EL</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>elevation</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ELD</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>elevation velocity</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ELDD</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>elevation acceleration</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PA</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>parallactic angle</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PAD</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>parallactic angle velocity</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PADD</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>parallactic angle acceleration</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>Natural units are used throughout. HA, DEC, PHI, AZ, EL
+and ZD are in radians. The velocities and accelerations
+assume constant declination and constant rate of change of
+ hour angle (as for tracking a star); the units of AZD, ELD
+ and PAD are radians per radian of HA, while the units of AZDD,
+ ELDD and PADD are radians per radian of HA squared. To
+ convert into practical degree- and second-based units:
+<P> <DIV ALIGN="CENTER">
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP>angles</TD>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="66" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img9.gif"
+ ALT="$\times 360/2\pi$"></TD>
+<TD ALIGN="CENTER" NOWRAP><IMG WIDTH="19" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img10.gif"
+ ALT="$\rightarrow$"></TD>
+<TD ALIGN="LEFT" NOWRAP>degrees</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP>velocities</TD>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="178" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img11.gif"
+ ALT="$\times (2\pi/86400) \times (360/2\pi)$"></TD>
+<TD ALIGN="CENTER" NOWRAP><IMG WIDTH="19" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img10.gif"
+ ALT="$\rightarrow$"></TD>
+<TD ALIGN="LEFT" NOWRAP>degree/sec</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP>accelerations</TD>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="186" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
+ SRC="img12.gif"
+ ALT="$\times (2\pi/86400)^2 \times (360/2\pi)$"></TD>
+<TD ALIGN="CENTER" NOWRAP><IMG WIDTH="19" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img10.gif"
+ ALT="$\rightarrow$"></TD>
+<TD ALIGN="LEFT" NOWRAP>degree/sec/sec</TD>
+</TR>
+</TABLE></DIV>
+<P>
+Note that the seconds here are sidereal rather than SI. One
+ sidereal second is about 0.99727 SI seconds.
+<P>
+The velocity and acceleration factors assume the sidereal
+ tracking case. Their respective numerical values are (exactly)
+ 1/240 and (approximately) 1/3300236.9.
+ <DT>2.
+<DD>Azimuth is returned in the range <IMG WIDTH="50" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img13.gif"
+ ALT="$[\,0,2\pi\,]$">; north is zero,
+ and east is <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img14.gif"
+ ALT="$+\pi/2$">. Elevation and parallactic angle are
+ returned in the range <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img15.gif"
+ ALT="$\pm\pi/2$">. Position angle is +ve
+ for a star west of the meridian and is the angle NP-star-zenith.
+ <DT>3.
+<DD>The latitude is geodetic as opposed to geocentric. The
+ hour angle and declination are topocentric. Refraction and
+ deficiencies in the telescope mounting are ignored. The
+ purpose of the routine is to give the general form of the
+ quantities. The details of a real telescope could profoundly
+ change the results, especially close to the zenith.
+ <DT>4.
+<DD>No range checking of arguments is carried out.
+ <DT>5.
+<DD>In applications which involve many such calculations, rather
+ than calling the present routine it will be more efficient to
+ use inline code, having previously computed fixed terms such
+ as sine and cosine of latitude, and (for tracking a star)
+ sine and cosine of declination.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html596" HREF="node18.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html594" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html588" HREF="node16.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html597" HREF="node18.html">SLA_AMP - Apparent to Mean</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html595" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html589" HREF="node16.html">SLA_AIRMAS - Air Mass</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node170.html b/src/slalib/sun67.htx/node170.html
new file mode 100644
index 0000000..3f0f1a1
--- /dev/null
+++ b/src/slalib/sun67.htx/node170.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_RVEROT - RV Corrn to Earth Centre</TITLE>
+<META NAME="description" CONTENT="SLA_RVEROT - RV Corrn to Earth Centre">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node171.html">
+<LINK REL="previous" HREF="node169.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node171.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2126" HREF="node171.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2124" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2118" HREF="node169.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2127" HREF="node171.html">SLA_RVGALC - RV Corrn to Galactic Centre</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2125" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2119" HREF="node169.html">SLA_REFZ - Apply Refraction to ZD</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004157000000000000000">SLA_RVEROT - RV Corrn to Earth Centre</A>
+<A NAME="xref_SLA_RVEROT">&#160;</A><A NAME="SLA_RVEROT">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Velocity component in a given direction due to Earth rotation.
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>R&nbsp;=&nbsp;sla_RVEROT (PHI, RA, DA, ST)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PHI</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>geodetic latitude of observing station (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RA,DA</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>apparent <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ST</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>local apparent sidereal time (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>sla_RVEROT</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>Component of Earth rotation in
+direction RA,DA (km&nbsp;s<SUP>-1</SUP>)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>Sign convention: the result is positive when the observatory
+is receding from the given point on the sky.
+<DT>2.
+<DD>Accuracy: the simple algorithm used assumes a spherical Earth and
+ an observing station at sea level; for actual observing
+ sites, the error is unlikely to be greater than 0.0005&nbsp;km&nbsp;s<SUP>-1</SUP>.
+ For applications requiring greater precision, use the routine
+ sla_PVOBS.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html2126" HREF="node171.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2124" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2118" HREF="node169.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2127" HREF="node171.html">SLA_RVGALC - RV Corrn to Galactic Centre</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2125" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2119" HREF="node169.html">SLA_REFZ - Apply Refraction to ZD</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node171.html b/src/slalib/sun67.htx/node171.html
new file mode 100644
index 0000000..307d861
--- /dev/null
+++ b/src/slalib/sun67.htx/node171.html
@@ -0,0 +1,115 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_RVGALC - RV Corrn to Galactic Centre</TITLE>
+<META NAME="description" CONTENT="SLA_RVGALC - RV Corrn to Galactic Centre">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node172.html">
+<LINK REL="previous" HREF="node170.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node172.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2136" HREF="node172.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2134" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2128" HREF="node170.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2137" HREF="node172.html">SLA_RVLG - RV Corrn to Local Group</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2135" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2129" HREF="node170.html">SLA_RVEROT - RV Corrn to Earth Centre</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004158000000000000000">SLA_RVGALC - RV Corrn to Galactic Centre</A>
+<A NAME="xref_SLA_RVGALC">&#160;</A><A NAME="SLA_RVGALC">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Velocity component in a given direction due to the rotation
+of the Galaxy.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>R&nbsp;=&nbsp;sla_RVGALC (R2000, D2000)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>R2000,D2000</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>J2000.0 mean <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>sla_RVGALC</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>Component of dynamical LSR motion in direction
+R2000,D2000 (km&nbsp;s<SUP>-1</SUP>)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>Sign convention: the result is positive when the LSR
+is receding from the given point on the sky.
+<DT>2.
+<DD>The Local Standard of Rest used here is a point in the
+ vicinity of the Sun which is in a circular orbit around
+ the Galactic centre. Sometimes called the <I>dynamical</I> LSR,
+ it is not to be confused with a <I>kinematical</I> LSR, which
+ is the mean standard of rest of star catalogues or stellar
+ populations.
+ <DT>3.
+<DD>The dynamical LSR velocity due to Galactic rotation is assumed to
+ be 220&nbsp;km&nbsp;s<SUP>-1</SUP> towards <IMG WIDTH="64" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img222.gif"
+ ALT="$l^{I\!I}=90^{\circ}$">, <IMG WIDTH="51" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img223.gif"
+ ALT="$b^{I\!I}=0$">. </DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCE:</STRONG>
+<DD>Kerr &amp; Lynden-Bell (1986), MNRAS, 221, p1023.
+</DL>
+<BR> <HR>
+<A NAME="tex2html2136" HREF="node172.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2134" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2128" HREF="node170.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2137" HREF="node172.html">SLA_RVLG - RV Corrn to Local Group</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2135" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2129" HREF="node170.html">SLA_RVEROT - RV Corrn to Earth Centre</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node172.html b/src/slalib/sun67.htx/node172.html
new file mode 100644
index 0000000..561680e
--- /dev/null
+++ b/src/slalib/sun67.htx/node172.html
@@ -0,0 +1,101 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_RVLG - RV Corrn to Local Group</TITLE>
+<META NAME="description" CONTENT="SLA_RVLG - RV Corrn to Local Group">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node173.html">
+<LINK REL="previous" HREF="node171.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node173.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2146" HREF="node173.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2144" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2138" HREF="node171.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2147" HREF="node173.html">SLA_RVLSRD - RV Corrn to Dynamical LSR</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2145" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2139" HREF="node171.html">SLA_RVGALC - RV Corrn to Galactic Centre</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004159000000000000000">SLA_RVLG - RV Corrn to Local Group</A>
+<A NAME="xref_SLA_RVLG">&#160;</A><A NAME="SLA_RVLG">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Velocity component in a given direction due to the combination
+of the rotation of the Galaxy and the motion of the Galaxy
+ relative to the mean motion of the local group.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>R&nbsp;=&nbsp;sla_RVLG (R2000, D2000)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>R2000,D2000</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>J2000.0 mean <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>sla_RVLG</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TH ALIGN="LEFT" NOWRAP>Component of <B>solar</B> (<I>n.b.</I>)
+motion in direction R2000,D2000 (km&nbsp;s<SUP>-1</SUP>)</TH>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTE:</STRONG>
+<DD>Sign convention: the result is positive when
+the Sun is receding from the given point on the sky.
+ </DL>
+<P> <DL>
+<DT><STRONG>REFERENCE:</STRONG>
+<DD><I>IAU Trans.</I> 1976. <B>16B</B>, p201.
+</DL>
+<BR> <HR>
+<A NAME="tex2html2146" HREF="node173.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2144" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2138" HREF="node171.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2147" HREF="node173.html">SLA_RVLSRD - RV Corrn to Dynamical LSR</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2145" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2139" HREF="node171.html">SLA_RVGALC - RV Corrn to Galactic Centre</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node173.html b/src/slalib/sun67.htx/node173.html
new file mode 100644
index 0000000..2ae01da
--- /dev/null
+++ b/src/slalib/sun67.htx/node173.html
@@ -0,0 +1,121 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_RVLSRD - RV Corrn to Dynamical LSR</TITLE>
+<META NAME="description" CONTENT="SLA_RVLSRD - RV Corrn to Dynamical LSR">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node174.html">
+<LINK REL="previous" HREF="node172.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node174.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2156" HREF="node174.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2154" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2148" HREF="node172.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2157" HREF="node174.html">SLA_RVLSRK - RV Corrn to Kinematical LSR</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2155" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2149" HREF="node172.html">SLA_RVLG - RV Corrn to Local Group</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004160000000000000000">SLA_RVLSRD - RV Corrn to Dynamical LSR</A>
+<A NAME="xref_SLA_RVLSRD">&#160;</A><A NAME="SLA_RVLSRD">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Velocity component in a given direction due to the Sun's
+motion with respect to the ``dynamical'' Local Standard of Rest.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>R&nbsp;=&nbsp;sla_RVLSRD (R2000, D2000)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>R2000,D2000</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>J2000.0 mean <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>sla_RVLSRD</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TH ALIGN="LEFT" NOWRAP>Component of <I>peculiar</I> solar motion
+in direction R2000,D2000 (km&nbsp;s<SUP>-1</SUP>)</TH>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>Sign convention: the result is positive when
+the Sun is receding from the given point on the sky.
+<DT>2.
+<DD>The Local Standard of Rest used here is the <I>dynamical</I> LSR,
+ a point in the vicinity of the Sun which is in a circular
+ orbit around the Galactic centre. The Sun's motion with
+ respect to the dynamical LSR is called the <I>peculiar</I> solar
+ motion.
+ <DT>3.
+<DD>There is another type of LSR, called a <I>kinematical</I> LSR. A
+ kinematical LSR is the mean standard of rest of specified star
+ catalogues or stellar populations, and several slightly
+ different kinematical LSRs are in use. The Sun's motion with
+ respect to an agreed kinematical LSR is known as the
+ <I>standard</I> solar motion.
+ The dynamical LSR is seldom used by observational astronomers,
+ who conventionally use a kinematical LSR such as the one implemented
+ in the routine sla_RVLSRK.
+ <DT>4.
+<DD>The peculiar solar motion is from Delhaye (1965), in <I>Stars
+ and Stellar Systems</I>, vol&nbsp;5, p73: in Galactic Cartesian
+ coordinates (+9,+12,+7)&nbsp;km&nbsp;s<SUP>-1</SUP>.
+ This corresponds to about 16.6&nbsp;km&nbsp;s<SUP>-1</SUP>
+ towards Galactic coordinates <IMG WIDTH="148" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
+ SRC="img224.gif"
+ ALT="$l^{I\!I}=53^{\circ},b^{I\!I}=+25^{\circ}$">. </DL></DL>
+<BR> <HR>
+<A NAME="tex2html2156" HREF="node174.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2154" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2148" HREF="node172.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2157" HREF="node174.html">SLA_RVLSRK - RV Corrn to Kinematical LSR</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2155" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2149" HREF="node172.html">SLA_RVLG - RV Corrn to Local Group</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node174.html b/src/slalib/sun67.htx/node174.html
new file mode 100644
index 0000000..f243766
--- /dev/null
+++ b/src/slalib/sun67.htx/node174.html
@@ -0,0 +1,126 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_RVLSRK - RV Corrn to Kinematical LSR</TITLE>
+<META NAME="description" CONTENT="SLA_RVLSRK - RV Corrn to Kinematical LSR">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node175.html">
+<LINK REL="previous" HREF="node173.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node175.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2166" HREF="node175.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2164" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2158" HREF="node173.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2167" HREF="node175.html">SLA_S2TP - Spherical to Tangent Plane</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2165" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2159" HREF="node173.html">SLA_RVLSRD - RV Corrn to Dynamical LSR</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004161000000000000000">SLA_RVLSRK - RV Corrn to Kinematical LSR</A>
+<A NAME="xref_SLA_RVLSRK">&#160;</A><A NAME="SLA_RVLSRK">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Velocity component in a given direction due to the Sun's
+motion with respect to a kinematical Local Standard of Rest.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>R&nbsp;=&nbsp;sla_RVLSRK (R2000, D2000)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>R2000,D2000</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>J2000.0 mean <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>sla_RVLSRK</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TH ALIGN="LEFT" NOWRAP>Component of <I>standard</I> solar motion
+in direction R2000,D2000 (km&nbsp;s<SUP>-1</SUP>)</TH>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>Sign convention: the result is positive when
+the Sun is receding from the given point on the sky.
+<DT>2.
+<DD>The Local Standard of Rest used here is one of several
+ <I>kinematical</I> LSRs in common use. A kinematical LSR is the
+ mean standard of rest of specified star catalogues or stellar
+ populations. The Sun's motion with respect to a kinematical
+ LSR is known as the <I>standard</I> solar motion.
+ <DT>3.
+<DD>There is another sort of LSR, seldom used by observational
+ astronomers, called the <I>dynamical</I> LSR. This is a
+ point in the vicinity of the Sun which is in a circular orbit
+ around the Galactic centre. The Sun's motion with respect to
+ the dynamical LSR is called the <I>peculiar</I> solar motion. To
+ obtain a radial velocity correction with respect to the
+ dynamical LSR use the routine sla_RVLSRD.
+ <DT>4.
+<DD>The adopted standard solar motion is 20&nbsp;km&nbsp;s<SUP>-1</SUP>
+ towards <IMG WIDTH="132" HEIGHT="33" ALIGN="MIDDLE" BORDER="0"
+ SRC="img225.gif"
+ ALT="$\alpha=18^{\rm h},\delta=+30^{\circ}$"> (1900).
+ </DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>Delhaye (1965), in <I>Stars and Stellar Systems</I>, vol&nbsp;5, p73.
+<DT>2.
+<DD><I>Methods of Experimental Physics</I> (ed Meeks), vol&nbsp;12,
+part&nbsp;C, sec&nbsp;6.1.5.2, p281.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html2166" HREF="node175.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2164" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2158" HREF="node173.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2167" HREF="node175.html">SLA_S2TP - Spherical to Tangent Plane</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2165" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2159" HREF="node173.html">SLA_RVLSRD - RV Corrn to Dynamical LSR</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node175.html b/src/slalib/sun67.htx/node175.html
new file mode 100644
index 0000000..5c3e6c7
--- /dev/null
+++ b/src/slalib/sun67.htx/node175.html
@@ -0,0 +1,129 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_S2TP - Spherical to Tangent Plane</TITLE>
+<META NAME="description" CONTENT="SLA_S2TP - Spherical to Tangent Plane">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node176.html">
+<LINK REL="previous" HREF="node174.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node176.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2176" HREF="node176.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2174" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2168" HREF="node174.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2177" HREF="node176.html">SLA_SEP - Angle Between 2 Points on Sphere</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2175" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2169" HREF="node174.html">SLA_RVLSRK - RV Corrn to Kinematical LSR</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004162000000000000000">SLA_S2TP - Spherical to Tangent Plane</A>
+<A NAME="xref_SLA_S2TP">&#160;</A><A NAME="SLA_S2TP">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Projection of spherical coordinates onto the tangent plane
+(single precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_S2TP (RA, DEC, RAZ, DECZ, XI, ETA, J)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RA,DEC</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>spherical coordinates of star (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RAZ,DECZ</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>spherical coordinates of tangent point (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>XI,ETA</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>tangent plane coordinates (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>J</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>status:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 0 = OK, star on tangent plane</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 1 = error, star too far from axis</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 2 = error, antistar on tangent plane</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 3 = error, antistar too far from axis</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The projection is called the <I>gnomonic</I> projection; the
+Cartesian coordinates <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img85.gif"
+ ALT="$[\,\xi,\eta\,]$"> are called
+<I>standard coordinates.</I> The latter
+ are in units of the distance from the tangent plane to the projection
+ point, <I>i.e.</I> radians near the origin.
+ <DT>2.
+<DD>When working in <IMG WIDTH="58" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img50.gif"
+ ALT="$[\,x,y,z\,]$"> rather than spherical coordinates, the
+ equivalent Cartesian routine sla_V2TP is available.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html2176" HREF="node176.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2174" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2168" HREF="node174.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2177" HREF="node176.html">SLA_SEP - Angle Between 2 Points on Sphere</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2175" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2169" HREF="node174.html">SLA_RVLSRK - RV Corrn to Kinematical LSR</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node176.html b/src/slalib/sun67.htx/node176.html
new file mode 100644
index 0000000..a12d2ab
--- /dev/null
+++ b/src/slalib/sun67.htx/node176.html
@@ -0,0 +1,100 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_SEP - Angle Between 2 Points on Sphere</TITLE>
+<META NAME="description" CONTENT="SLA_SEP - Angle Between 2 Points on Sphere">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node177.html">
+<LINK REL="previous" HREF="node175.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node177.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2186" HREF="node177.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2184" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2178" HREF="node175.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2187" HREF="node177.html">SLA_SMAT - Solve Simultaneous Equations</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2185" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2179" HREF="node175.html">SLA_S2TP - Spherical to Tangent Plane</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004163000000000000000">SLA_SEP - Angle Between 2 Points on Sphere</A>
+<A NAME="xref_SLA_SEP">&#160;</A><A NAME="SLA_SEP">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Angle between two points on a sphere (single precision).
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>R&nbsp;=&nbsp;sla_SEP (A1, B1, A2, B2)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>A1,B1</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>spherical coordinates of one point (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>A2,B2</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>spherical coordinates of the other point (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>sla_SEP</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>angle between [A1,B1] and [A2,B2] in radians</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The spherical coordinates are right ascension and declination,
+longitude and latitude, <I>etc.</I> in radians.
+<DT>2.
+<DD>The result is always positive.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html2186" HREF="node177.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2184" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2178" HREF="node175.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2187" HREF="node177.html">SLA_SMAT - Solve Simultaneous Equations</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2185" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2179" HREF="node175.html">SLA_S2TP - Spherical to Tangent Plane</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node177.html b/src/slalib/sun67.htx/node177.html
new file mode 100644
index 0000000..733a9c6
--- /dev/null
+++ b/src/slalib/sun67.htx/node177.html
@@ -0,0 +1,152 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_SMAT - Solve Simultaneous Equations</TITLE>
+<META NAME="description" CONTENT="SLA_SMAT - Solve Simultaneous Equations">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node178.html">
+<LINK REL="previous" HREF="node176.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node178.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2196" HREF="node178.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2194" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2188" HREF="node176.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2197" HREF="node178.html">SLA_SUBET - Remove E-terms</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2195" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2189" HREF="node176.html">SLA_SEP - Angle Between 2 Points on Sphere</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004164000000000000000">SLA_SMAT - Solve Simultaneous Equations</A>
+<A NAME="xref_SLA_SMAT">&#160;</A><A NAME="SLA_SMAT">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Matrix inversion and solution of simultaneous equations
+(single precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_SMAT (N, A, Y, D, JF, IW)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>N</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>number of unknowns</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>A</EM></TD>
+<TD ALIGN="LEFT"><B>R(N,N)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>matrix</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>Y</EM></TD>
+<TD ALIGN="LEFT"><B>R(N)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>vector</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>A</EM></TD>
+<TH ALIGN="LEFT"><B>R(N,N)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>matrix inverse</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>Y</EM></TD>
+<TD ALIGN="LEFT"><B>R(N)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>solution</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>D</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>determinant</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>JF</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>singularity flag: 0=OK</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>IW</EM></TD>
+<TD ALIGN="LEFT"><B>I(N)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>workspace</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>For the set of <I>n</I> simultaneous linear equations in <I>n</I> unknowns:
+<BLOCKQUOTE><B>A</B><IMG WIDTH="7" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img72.gif"
+ ALT="$\cdot$"><B>y</B> = <B>x</B>
+</BLOCKQUOTE>
+ where:
+ <UL>
+<LI> <B>A</B> is a non-singular <IMG WIDTH="42" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img73.gif"
+ ALT="$n \times n$"> matrix,
+<LI> <B>y</B> is the vector of <I>n</I> unknowns, and
+<LI> <B>x</B> is the known vector,
+ </UL>
+ sla_SMAT computes:
+ <UL>
+<LI> the inverse of matrix <B>A</B>,
+<LI> the determinant of matrix <B>A</B>, and
+<LI> the vector of <I>n</I> unknowns <B>y</B>.
+ </UL>
+ Argument N is the order <I>n</I>, A (given) is the matrix <B>A</B>,
+ Y (given) is the vector <B>x</B> and Y (returned)
+ is the vector <B>y</B>.
+ The argument A (returned) is the inverse matrix <B>A</B><SUP>-1</SUP>,
+ and D is <I>det</I>(<B>A</B>).
+ <DT>2.
+<DD>JF is the singularity flag. If the matrix is non-singular,
+ JF=0 is returned. If the matrix is singular, JF=-1
+ and D=0.0 are returned. In the latter case, the contents
+ of array A on return are undefined.
+ <DT>3.
+<DD>The algorithm is Gaussian elimination with partial pivoting.
+ This method is very fast; some much slower algorithms can give
+ better accuracy, but only by a small factor.
+ <DT>4.
+<DD>This routine replaces the obsolete sla_SMATRX.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html2196" HREF="node178.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2194" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2188" HREF="node176.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2197" HREF="node178.html">SLA_SUBET - Remove E-terms</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2195" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2189" HREF="node176.html">SLA_SEP - Angle Between 2 Points on Sphere</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node178.html b/src/slalib/sun67.htx/node178.html
new file mode 100644
index 0000000..3d7a547
--- /dev/null
+++ b/src/slalib/sun67.htx/node178.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_SUBET - Remove E-terms</TITLE>
+<META NAME="description" CONTENT="SLA_SUBET - Remove E-terms">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node179.html">
+<LINK REL="previous" HREF="node177.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node179.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2206" HREF="node179.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2204" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2198" HREF="node177.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2207" HREF="node179.html">SLA_SUPGAL - Supergalactic to Galactic</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2205" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2199" HREF="node177.html">SLA_SMAT - Solve Simultaneous Equations</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004165000000000000000">SLA_SUBET - Remove E-terms</A>
+<A NAME="xref_SLA_SUBET">&#160;</A><A NAME="SLA_SUBET">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Remove the E-terms (elliptic component of annual aberration)
+from a pre IAU&nbsp;1976 catalogue <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> to give a mean place.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_SUBET (RC, DC, EQ, RM, DM)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RC,DC</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> with E-terms included (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>EQ</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>Besselian epoch of mean equator and equinox</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RM,DM</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> without E-terms (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTE:</STRONG>
+<DD>Most star positions from pre-1984 optical catalogues (or
+obtained by astrometry with respect to such stars) have the
+ E-terms built-in. This routine converts such a position to a
+ formal mean place (allowing, for example, comparison with a
+ pulsar timing position).
+ </DL>
+<P> <DL>
+<DT><STRONG>REFERENCE:</STRONG>
+<DD><I>Explanatory Supplement to the Astronomical Ephemeris</I>,
+section 2D, page 48.
+ </DL>
+<BR> <HR>
+<A NAME="tex2html2206" HREF="node179.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2204" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2198" HREF="node177.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2207" HREF="node179.html">SLA_SUPGAL - Supergalactic to Galactic</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2205" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2199" HREF="node177.html">SLA_SMAT - Solve Simultaneous Equations</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node179.html b/src/slalib/sun67.htx/node179.html
new file mode 100644
index 0000000..1b5da60
--- /dev/null
+++ b/src/slalib/sun67.htx/node179.html
@@ -0,0 +1,107 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_SUPGAL - Supergalactic to Galactic</TITLE>
+<META NAME="description" CONTENT="SLA_SUPGAL - Supergalactic to Galactic">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node180.html">
+<LINK REL="previous" HREF="node178.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node180.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2216" HREF="node180.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2214" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2208" HREF="node178.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2217" HREF="node180.html">SLA_SVD - Singular Value Decomposition</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2215" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2209" HREF="node178.html">SLA_SUBET - Remove E-terms</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004166000000000000000">SLA_SUPGAL - Supergalactic to Galactic</A>
+<A NAME="xref_SLA_SUPGAL">&#160;</A><A NAME="SLA_SUPGAL">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Transformation from de Vaucouleurs supergalactic coordinates
+to IAU 1958 galactic coordinates.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_GALSUP (DL, DB, DSL, DSB)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DSL,DSB</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>supergalactic longitude and latitude (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DL,DB</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>galactic longitude and latitude <IMG WIDTH="59" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
+ SRC="img98.gif"
+ ALT="$[\,l^{I\!I},b^{I\!I}\,]$"> (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>REFERENCES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>de Vaucouleurs, de Vaucouleurs, &amp; Corwin, <I>Second Reference
+Catalogue of Bright Galaxies</I>, U.Texas, p8.
+<DT>2.
+<DD>Systems &amp; Applied Sciences Corp., documentation for the
+ machine-readable version of the above catalogue,
+ Contract NAS 5-26490.
+ </DL>
+ (These two references give different values for the galactic
+ longitude of the supergalactic origin. Both are wrong; the
+ correct value is <IMG WIDTH="86" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img119.gif"
+ ALT="$l^{I\!I}=137.37$">.)
+<P> </DL>
+<BR> <HR>
+<A NAME="tex2html2216" HREF="node180.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2214" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2208" HREF="node178.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2217" HREF="node180.html">SLA_SVD - Singular Value Decomposition</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2215" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2209" HREF="node178.html">SLA_SUBET - Remove E-terms</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node18.html b/src/slalib/sun67.htx/node18.html
new file mode 100644
index 0000000..e3aee75
--- /dev/null
+++ b/src/slalib/sun67.htx/node18.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_AMP - Apparent to Mean</TITLE>
+<META NAME="description" CONTENT="SLA_AMP - Apparent to Mean">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node19.html">
+<LINK REL="previous" HREF="node17.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node19.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html606" HREF="node19.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html604" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html598" HREF="node17.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html607" HREF="node19.html">SLA_AMPQK - Quick Apparent to Mean</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html605" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html599" HREF="node17.html">SLA_ALTAZ - Velocities etc. for Altazimuth Mount</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION00045000000000000000">SLA_AMP - Apparent to Mean</A>
+<A NAME="xref_SLA_AMP">&#160;</A><A NAME="SLA_AMP">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Convert star <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> from geocentric apparent to
+mean place (post IAU 1976).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_AMP (RA, DA, DATE, EQ, RM, DM)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RA,DA</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>apparent <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DATE</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>TDB for apparent place (JD-2400000.5)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>EQ</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>equinox: Julian epoch of mean place</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RM,DM</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>mean <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The distinction between the required TDB and TT is
+always negligible. Moreover, for all but the most
+critical applications UTC is adequate.
+ <DT>2.
+<DD>The accuracy is limited by the routine sla_EVP, called
+ by sla_MAPPA, which computes the Earth position and
+ velocity using the methods of Stumpff. The maximum
+ error is about 0.3&nbsp;milliarcsecond.
+ <DT>3.
+<DD>Iterative techniques are used for the aberration and
+ light deflection corrections so that the routines
+ sla_AMP (or sla_AMPQK) and sla_MAP (or sla_MAPQK) are
+ accurate inverses; even at the edge of the Sun's disc
+ the discrepancy is only about 1&nbsp;nanoarcsecond.
+ <DT>4.
+<DD>Where multiple apparent places are to be converted to
+ mean places, for a fixed date and equinox, it is more
+ efficient to use the sla_MAPPA routine to compute the
+ required parameters once, followed by one call to
+ sla_AMPQK per star.
+ </DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>1984 <I>Astronomical Almanac</I>, pp B39-B41.
+<DT>2.
+<DD>Lederle &amp; Schwan, 1984. <I>Astr.Astrophys.</I> <B>134</B>, 1-6.
+</DL></DL>
+<BR> <HR>
+<A NAME="tex2html606" HREF="node19.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html604" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html598" HREF="node17.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html607" HREF="node19.html">SLA_AMPQK - Quick Apparent to Mean</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html605" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html599" HREF="node17.html">SLA_ALTAZ - Velocities etc. for Altazimuth Mount</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node180.html b/src/slalib/sun67.htx/node180.html
new file mode 100644
index 0000000..2372b60
--- /dev/null
+++ b/src/slalib/sun67.htx/node180.html
@@ -0,0 +1,184 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_SVD - Singular Value Decomposition</TITLE>
+<META NAME="description" CONTENT="SLA_SVD - Singular Value Decomposition">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node181.html">
+<LINK REL="previous" HREF="node179.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node181.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2226" HREF="node181.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2224" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2218" HREF="node179.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2227" HREF="node181.html">SLA_SVDCOV - Covariance Matrix from SVD</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2225" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2219" HREF="node179.html">SLA_SUPGAL - Supergalactic to Galactic</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004167000000000000000">SLA_SVD - Singular Value Decomposition</A>
+<A NAME="xref_SLA_SVD">&#160;</A><A NAME="SLA_SVD">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Singular value decomposition.
+This routine expresses a given matrix <B>A</B> as the product of
+ three matrices <B>U</B>, <B>W</B>, <B>V</B><SUP><I>T</I></SUP>:
+ <PRE><TT>
+ <B>A</B> = <B>U</B> <IMG WIDTH="7" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img72.gif"
+ ALT="$\cdot$"> <B>W</B> <IMG WIDTH="7" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img72.gif"
+ ALT="$\cdot$"> <B>V</B><SUP><I>T</I></SUP>
+</TT></PRE>
+ where:
+ <PRE><TT>
+ <B>A</B> is any <I>m</I> (rows) <IMG WIDTH="25" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img226.gif"
+ ALT="$\times n$"> (columns) matrix, where <IMG WIDTH="48" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img227.gif"
+ ALT="$m \geq n$">
+ <B>U</B> is an <IMG WIDTH="46" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img228.gif"
+ ALT="$m \times n$"> column-orthogonal matrix
+ <B>W</B> is an <IMG WIDTH="42" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img73.gif"
+ ALT="$n \times n$"> diagonal matrix with <IMG WIDTH="54" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img229.gif"
+ ALT="$w_{ii} \geq 0$">
+ <B>V</B><SUP><I>T</I></SUP> is the transpose of an <IMG WIDTH="42" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img73.gif"
+ ALT="$n \times n$"> orthogonal matrix
+</TT></PRE>
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_SVD (M, N, MP, NP, A, W, V, WORK, JSTAT)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>M,N</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TH ALIGN="LEFT" NOWRAP><I>m</I>, <I>n</I>, the numbers of rows and columns in matrix <B>A</B></TH>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>MP,NP</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>physical dimensions of array containing matrix <B>A</B></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>A</EM></TD>
+<TD ALIGN="LEFT"><B>D(MP,NP)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>array containing <IMG WIDTH="46" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img228.gif"
+ ALT="$m \times n$"> matrix <B>A</B></TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>A</EM></TD>
+<TH ALIGN="LEFT"><B>D(MP,NP)</B></TH>
+<TH ALIGN="LEFT" NOWRAP>array containing <IMG WIDTH="46" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img228.gif"
+ ALT="$m \times n$"> column-orthogonal
+matrix <B>U</B></TH>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>W</EM></TD>
+<TD ALIGN="LEFT"><B>D(N)</B></TD>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="42" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img73.gif"
+ ALT="$n \times n$"> diagonal matrix <B>W</B>
+(diagonal elements only)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>V</EM></TD>
+<TD ALIGN="LEFT"><B>D(NP,NP)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>array containing <IMG WIDTH="42" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img73.gif"
+ ALT="$n \times n$"> orthogonal
+matrix <B>V</B> (<I>n.b.</I> not <B>V</B><SUP><I>T</I></SUP>)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>WORK</EM></TD>
+<TD ALIGN="LEFT"><B>D(N)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>workspace</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>JSTAT</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>0&nbsp;=&nbsp;OK, -1&nbsp;=&nbsp;array A wrong shape, &gt;0&nbsp;=&nbsp;index of W
+for which convergence failed (see note&nbsp;3, below)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>M and N are the <I>logical</I> dimensions of the
+matrices and vectors concerned, which can be located in
+arrays of larger <I>physical</I> dimensions, given by MP and NP.
+ <DT>2.
+<DD>V contains matrix V, not the transpose of matrix V.
+ <DT>3.
+<DD>If the status JSTAT is greater than zero, this need not
+ necessarily be treated as a failure. It means that, due to
+ chance properties of the matrix A, the QR transformation
+ phase of the routine did not fully converge in a predefined
+ number of iterations, something that very seldom occurs.
+ When this condition does arise, it is possible that the
+ elements of the diagonal matrix W have not been correctly
+ found. However, in practice the results are likely to
+ be trustworthy. Applications should report the condition
+ as a warning, but then proceed normally.
+ </DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCES:</STRONG>
+<DD>The algorithm is an adaptation of the routine SVD in the <I>EISPACK</I>
+library (Garbow&nbsp;<I>et&nbsp;al.</I> 1977, <I>EISPACK Guide Extension</I>,
+ Springer Verlag), which is a FORTRAN&nbsp;66 implementation of the Algol
+ routine SVD of Wilkinson &amp; Reinsch 1971 (<I>Handbook for Automatic
+ Computation</I>, vol&nbsp;2, ed Bauer&nbsp;<I>et&nbsp;al.</I>, Springer Verlag). These
+ references give full details of the algorithm used here.
+ A good account of the use of SVD in least squares problems is given
+ in <I>Numerical Recipes</I> (Press&nbsp;<I>et&nbsp;al.</I> 1987, Cambridge
+ University Press), which includes another variant of the EISPACK code.
+ </DL>
+<BR> <HR>
+<A NAME="tex2html2226" HREF="node181.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2224" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2218" HREF="node179.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2227" HREF="node181.html">SLA_SVDCOV - Covariance Matrix from SVD</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2225" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2219" HREF="node179.html">SLA_SUPGAL - Supergalactic to Galactic</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node181.html b/src/slalib/sun67.htx/node181.html
new file mode 100644
index 0000000..76e49b9
--- /dev/null
+++ b/src/slalib/sun67.htx/node181.html
@@ -0,0 +1,122 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_SVDCOV - Covariance Matrix from SVD</TITLE>
+<META NAME="description" CONTENT="SLA_SVDCOV - Covariance Matrix from SVD">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node182.html">
+<LINK REL="previous" HREF="node180.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node182.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2236" HREF="node182.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2234" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2228" HREF="node180.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2237" HREF="node182.html">SLA_SVDSOL - Solution Vector from SVD</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2235" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2229" HREF="node180.html">SLA_SVD - Singular Value Decomposition</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004168000000000000000">SLA_SVDCOV - Covariance Matrix from SVD</A>
+<A NAME="xref_SLA_SVDCOV">&#160;</A><A NAME="SLA_SVDCOV">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>From the <B>W</B> and <B>V</B> matrices from the SVD
+factorization of a matrix
+ (as obtained from the sla_SVD routine), obtain
+ the covariance matrix.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_SVDCOV (N, NP, NC, W, V, WORK, CVM)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>N</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TH ALIGN="LEFT" NOWRAP><I>n</I>, the number of rows and columns in
+matrices <B>W</B> and <B>V</B></TH>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>NP</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>first dimension of array containing <IMG WIDTH="42" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img73.gif"
+ ALT="$n \times n$">matrix <B>V</B></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>NC</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>first dimension of array CVM</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>W</EM></TD>
+<TD ALIGN="LEFT"><B>D(N)</B></TD>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="42" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img73.gif"
+ ALT="$n \times n$"> diagonal matrix <B>W</B>
+(diagonal elements only)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>V</EM></TD>
+<TD ALIGN="LEFT"><B>D(NP,NP)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>array containing <IMG WIDTH="42" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img73.gif"
+ ALT="$n \times n$"> orthogonal matrix <B>V</B></TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>WORK</EM></TD>
+<TH ALIGN="LEFT"><B>D(N)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>workspace</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>CVM</EM></TD>
+<TD ALIGN="LEFT"><B>D(NC,NC)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>array to receive covariance matrix</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>REFERENCE:</STRONG>
+<DD><I>Numerical Recipes</I>, section 14.3.
+</DL>
+<BR> <HR>
+<A NAME="tex2html2236" HREF="node182.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2234" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2228" HREF="node180.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2237" HREF="node182.html">SLA_SVDSOL - Solution Vector from SVD</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2235" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2229" HREF="node180.html">SLA_SVD - Singular Value Decomposition</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node182.html b/src/slalib/sun67.htx/node182.html
new file mode 100644
index 0000000..f99ea3f
--- /dev/null
+++ b/src/slalib/sun67.htx/node182.html
@@ -0,0 +1,201 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_SVDSOL - Solution Vector from SVD</TITLE>
+<META NAME="description" CONTENT="SLA_SVDSOL - Solution Vector from SVD">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node183.html">
+<LINK REL="previous" HREF="node181.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node183.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2246" HREF="node183.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2244" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2238" HREF="node181.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2247" HREF="node183.html">SLA_TP2S - Tangent Plane to Spherical</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2245" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2239" HREF="node181.html">SLA_SVDCOV - Covariance Matrix from SVD</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004169000000000000000">SLA_SVDSOL - Solution Vector from SVD</A>
+<A NAME="xref_SLA_SVDSOL">&#160;</A><A NAME="SLA_SVDSOL">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>From a given vector and the SVD of a matrix (as obtained from
+the sla_SVD routine), obtain the solution vector.
+ This routine solves the equation:
+ <PRE><TT>
+ <B>A</B> <IMG WIDTH="7" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img72.gif"
+ ALT="$\cdot$"> <B>x</B> = <B>b</B>
+</TT></PRE>
+ where:
+ <PRE><TT>
+ <B>A</B> is a given <I>m</I> (rows) <IMG WIDTH="25" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img226.gif"
+ ALT="$\times n$"> (columns) matrix, where <IMG WIDTH="48" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img227.gif"
+ ALT="$m \geq n$">
+ <B>x</B> is the <I>n</I>-vector we wish to find, and
+ <B>b</B> is a given <I>m</I>-vector
+</TT></PRE>
+ by means of the <I>Singular Value Decomposition</I> method (SVD).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_SVDSOL (M, N, MP, NP, B, U, W, V, WORK, X)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>M,N</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TH ALIGN="LEFT" NOWRAP><I>m</I>, <I>n</I>, the numbers of rows and columns in matrix <B>A</B></TH>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>MP,NP</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>physical dimensions of array containing matrix <B>A</B></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>B</EM></TD>
+<TD ALIGN="LEFT"><B>D(M)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>known vector <B>b</B></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>U</EM></TD>
+<TD ALIGN="LEFT"><B>D(MP,NP)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>array containing <IMG WIDTH="46" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img228.gif"
+ ALT="$m \times n$"> matrix <B>U</B></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>W</EM></TD>
+<TD ALIGN="LEFT"><B>D(N)</B></TD>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="42" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img73.gif"
+ ALT="$n \times n$"> diagonal matrix <B>W</B>
+(diagonal elements only)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>V</EM></TD>
+<TD ALIGN="LEFT"><B>D(NP,NP)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>array containing <IMG WIDTH="42" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img73.gif"
+ ALT="$n \times n$"> orthogonal matrix <B>V</B></TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>WORK</EM></TD>
+<TH ALIGN="LEFT"><B>D(N)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>workspace</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>X</EM></TD>
+<TD ALIGN="LEFT"><B>D(N)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>unknown vector <B>x</B></TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>In the Singular Value Decomposition method (SVD),
+the matrix <B>A</B> is first factorized (for example by
+the routine sla_SVD) into the following components:
+ <PRE><TT>
+ <B>A</B> = <B>U</B> <IMG WIDTH="7" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img72.gif"
+ ALT="$\cdot$"> <B>W</B> <IMG WIDTH="7" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img72.gif"
+ ALT="$\cdot$"> <B>V</B><SUP><I>T</I></SUP>
+</TT></PRE>
+ where:
+ <PRE><TT>
+ <B>A</B> is any <I>m</I> (rows) <IMG WIDTH="25" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img226.gif"
+ ALT="$\times n$"> (columns) matrix, where <I>m</I> &gt; <I>n</I>
+ <B>U</B> is an <IMG WIDTH="46" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img228.gif"
+ ALT="$m \times n$"> column-orthogonal matrix
+ <B>W</B> is an <IMG WIDTH="42" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img73.gif"
+ ALT="$n \times n$"> diagonal matrix with <IMG WIDTH="54" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img229.gif"
+ ALT="$w_{ii} \geq 0$">
+ <B>V</B><SUP><I>T</I></SUP> is the transpose of an <IMG WIDTH="42" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img73.gif"
+ ALT="$n \times n$"> orthogonal matrix
+</TT></PRE>
+ Note that <I>m</I> and <I>n</I> are the <I>logical</I> dimensions of the
+ matrices and vectors concerned, which can be located in
+ arrays of larger <I>physical</I> dimensions MP and NP.
+ The solution is then found from the expression:
+ <PRE><TT>
+ <B>x</B> = <B>V</B> <IMG WIDTH="71" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img230.gif"
+ ALT="$\cdot~[diag(1/$"><B>W</B><IMG WIDTH="38" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img231.gif"
+ ALT="$_{j})]
+ \cdot ($"><B>U</B><IMG WIDTH="17" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img70.gif"
+ ALT="$^{T}\cdot$"><B>b</B>)
+</TT></PRE>
+ <DT>2.
+<DD>If matrix <B>A</B> is square, and if the diagonal matrix <B>W</B> is not
+ altered, the method is equivalent to conventional solution
+ of simultaneous equations.
+ <DT>3.
+<DD>If <I>m</I> &gt; <I>n</I>, the result is a least-squares fit.
+ <DT>4.
+<DD>If the solution is poorly determined, this shows up in the
+ SVD factorization as very small or zero <B>W</B><SUB><I>j</I></SUB> values. Where
+ a <B>W</B><SUB><I>j</I></SUB> value is small but non-zero it can be set to zero to
+ avoid ill effects. The present routine detects such zero
+ <B>W</B><SUB><I>j</I></SUB> values and produces a sensible solution, with highly
+ correlated terms kept under control rather than being allowed
+ to elope to infinity, and with meaningful values for the
+ other terms.
+ </DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCE:</STRONG>
+<DD><I>Numerical Recipes</I>, section 2.9.
+</DL>
+<BR> <HR>
+<A NAME="tex2html2246" HREF="node183.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2244" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2238" HREF="node181.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2247" HREF="node183.html">SLA_TP2S - Tangent Plane to Spherical</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2245" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2239" HREF="node181.html">SLA_SVDCOV - Covariance Matrix from SVD</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node183.html b/src/slalib/sun67.htx/node183.html
new file mode 100644
index 0000000..ae3acd0
--- /dev/null
+++ b/src/slalib/sun67.htx/node183.html
@@ -0,0 +1,109 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_TP2S - Tangent Plane to Spherical</TITLE>
+<META NAME="description" CONTENT="SLA_TP2S - Tangent Plane to Spherical">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node184.html">
+<LINK REL="previous" HREF="node182.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node184.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2256" HREF="node184.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2254" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2248" HREF="node182.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2257" HREF="node184.html">SLA_TP2V - Tangent Plane to Direction Cosines</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2255" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2249" HREF="node182.html">SLA_SVDSOL - Solution Vector from SVD</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004170000000000000000">SLA_TP2S - Tangent Plane to Spherical</A>
+<A NAME="xref_SLA_TP2S">&#160;</A><A NAME="SLA_TP2S">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Transform tangent plane coordinates into spherical
+coordinates (single precision)
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_TP2S (XI, ETA, RAZ, DECZ, RA, DEC)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>XI,ETA</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>tangent plane rectangular coordinates (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RAZ,DECZ</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>spherical coordinates of tangent point (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RA,DEC</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>spherical coordinates (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The projection is called the <I>gnomonic</I> projection; the
+Cartesian coordinates <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img85.gif"
+ ALT="$[\,\xi,\eta\,]$"> are called
+<I>standard coordinates.</I> The latter
+ are in units of the distance from the tangent plane to the projection
+ point, <I>i.e.</I> radians near the origin.
+ <DT>2.
+<DD>When working in <IMG WIDTH="58" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img50.gif"
+ ALT="$[\,x,y,z\,]$"> rather than spherical coordinates, the
+ equivalent Cartesian routine sla_TP2V is available.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html2256" HREF="node184.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2254" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2248" HREF="node182.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2257" HREF="node184.html">SLA_TP2V - Tangent Plane to Direction Cosines</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2255" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2249" HREF="node182.html">SLA_SVDSOL - Solution Vector from SVD</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node184.html b/src/slalib/sun67.htx/node184.html
new file mode 100644
index 0000000..f069a46
--- /dev/null
+++ b/src/slalib/sun67.htx/node184.html
@@ -0,0 +1,117 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_TP2V - Tangent Plane to Direction Cosines</TITLE>
+<META NAME="description" CONTENT="SLA_TP2V - Tangent Plane to Direction Cosines">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node185.html">
+<LINK REL="previous" HREF="node183.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node185.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2266" HREF="node185.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2264" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2258" HREF="node183.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2267" HREF="node185.html">SLA_TPS2C - Plate centre from and</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2265" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2259" HREF="node183.html">SLA_TP2S - Tangent Plane to Spherical</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004171000000000000000">SLA_TP2V - Tangent Plane to Direction Cosines</A>
+<A NAME="xref_SLA_TP2V">&#160;</A><A NAME="SLA_TP2V">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Given the tangent-plane coordinates of a star and the direction
+cosines of the tangent point, determine the direction cosines
+ of the star
+ (single precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_TP2V (XI, ETA, V0, V)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>XI,ETA</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>tangent plane coordinates of star (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>V0</EM></TD>
+<TD ALIGN="LEFT"><B>R(3)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>direction cosines of tangent point</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>V</EM></TD>
+<TH ALIGN="LEFT"><B>R(3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>direction cosines of star</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>If vector V0 is not of unit length, the returned vector V will
+be wrong.
+<DT>2.
+<DD>If vector V0 points at a pole, the returned vector V will be
+ based on the arbitrary assumption that <IMG WIDTH="43" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img89.gif"
+ ALT="$\alpha=0$"> at
+ the tangent point.
+ <DT>3.
+<DD>The projection is called the <I>gnomonic</I> projection; the
+ Cartesian coordinates <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img85.gif"
+ ALT="$[\,\xi,\eta\,]$"> are called
+ <I>standard coordinates.</I> The latter
+ are in units of the distance from the tangent plane to the projection
+ point, <I>i.e.</I> radians near the origin.
+ <DT>4.
+<DD>This routine is the Cartesian equivalent of the routine sla_TP2S.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html2266" HREF="node185.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2264" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2258" HREF="node183.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2267" HREF="node185.html">SLA_TPS2C - Plate centre from and</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2265" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2259" HREF="node183.html">SLA_TP2S - Tangent Plane to Spherical</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node185.html b/src/slalib/sun67.htx/node185.html
new file mode 100644
index 0000000..0313e77
--- /dev/null
+++ b/src/slalib/sun67.htx/node185.html
@@ -0,0 +1,168 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_TPS2C - Plate centre from and </TITLE>
+<META NAME="description" CONTENT="SLA_TPS2C - Plate centre from and ">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node186.html">
+<LINK REL="previous" HREF="node184.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node186.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2276" HREF="node186.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2274" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2268" HREF="node184.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2277" HREF="node186.html">SLA_TPV2C - Plate centre from and x,y,z</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2275" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2269" HREF="node184.html">SLA_TP2V - Tangent Plane to Direction Cosines</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004172000000000000000">&#160;</A><A NAME="xref_SLA_TPS2C">&#160;</A><A NAME="SLA_TPS2C">&#160;</A>
+<BR>
+SLA_TPS2C - Plate centre from <IMG WIDTH="26" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img90.gif"
+ ALT="$\xi,\eta$"> and <IMG WIDTH="28" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img91.gif"
+ ALT="$\alpha,\delta$"></H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>From the tangent plane coordinates of a star of known <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$">,determine the <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> of the tangent point (single precision)
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_TPS2C (XI, ETA, RA, DEC, RAZ1, DECZ1, RAZ2, DECZ2, N)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>XI,ETA</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>tangent plane rectangular coordinates (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RA,DEC</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>spherical coordinates (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RAZ1,DECZ1</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>spherical coordinates of tangent point,
+solution 1</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RAZ2,DECZ2</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>spherical coordinates of tangent point,
+solution 2</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>N</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>number of solutions:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 0 = no solutions returned (note 2)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 1 = only the first solution is useful (note 3)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 2 = there are two useful solutions (note 3)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The RAZ1 and RAZ2 values returned are in the range <IMG WIDTH="43" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img66.gif"
+ ALT="$0\!-\!2\pi$">.<DT>2.
+<DD>Cases where there is no solution can only arise near the poles.
+For example, it is clearly impossible for a star at the pole
+ itself to have a non-zero <IMG WIDTH="10" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img92.gif"
+ ALT="$\xi$"> value, and hence it is
+ meaningless to ask where the tangent point would have to be
+ to bring about this combination of <IMG WIDTH="10" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img92.gif"
+ ALT="$\xi$"> and <IMG WIDTH="10" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img23.gif"
+ ALT="$\delta$">. <DT>3.
+<DD>Also near the poles, cases can arise where there are two useful
+ solutions. The argument N indicates whether the second of the
+ two solutions returned is useful. N=1
+ indicates only one useful solution, the usual case; under
+ these circumstances, the second solution corresponds to the
+ ``over-the-pole'' case, and this is reflected in the values
+ of RAZ2 and DECZ2 which are returned.
+ <DT>4.
+<DD>The DECZ1 and DECZ2 values returned are in the range <IMG WIDTH="25" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img47.gif"
+ ALT="$\pm \pi$">, but in the ordinary, non-pole-crossing, case, the range is
+ <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img15.gif"
+ ALT="$\pm\pi/2$">. <DT>5.
+<DD>RA, DEC, RAZ1, DECZ1, RAZ2, DECZ2 are all in radians.
+ <DT>6.
+<DD>The projection is called the <I>gnomonic</I> projection; the
+ Cartesian coordinates <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img85.gif"
+ ALT="$[\,\xi,\eta\,]$"> are called
+ <I>standard coordinates.</I> The latter
+ are in units of the distance from the tangent plane to the projection
+ point, <I>i.e.</I> radians near the origin.
+ <DT>7.
+<DD>When working in <IMG WIDTH="58" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img50.gif"
+ ALT="$[\,x,y,z\,]$"> rather than spherical coordinates, the
+ equivalent Cartesian routine sla_TPV2C is available.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html2276" HREF="node186.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2274" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2268" HREF="node184.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2277" HREF="node186.html">SLA_TPV2C - Plate centre from and x,y,z</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2275" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2269" HREF="node184.html">SLA_TP2V - Tangent Plane to Direction Cosines</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node186.html b/src/slalib/sun67.htx/node186.html
new file mode 100644
index 0000000..32d0e60
--- /dev/null
+++ b/src/slalib/sun67.htx/node186.html
@@ -0,0 +1,144 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_TPV2C - Plate centre from and x,y,z</TITLE>
+<META NAME="description" CONTENT="SLA_TPV2C - Plate centre from and x,y,z">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node187.html">
+<LINK REL="previous" HREF="node185.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node187.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2286" HREF="node187.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2284" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2278" HREF="node185.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2287" HREF="node187.html">SLA_UE2EL - Universal to Conventional Elements</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2285" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2279" HREF="node185.html">SLA_TPS2C - Plate centre from and</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004173000000000000000">&#160;</A><A NAME="xref_SLA_TPV2C">&#160;</A><A NAME="SLA_TPV2C">&#160;</A>
+<BR>
+SLA_TPV2C - Plate centre from <IMG WIDTH="26" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img90.gif"
+ ALT="$\xi,\eta$"> and <I>x</I>,<I>y</I>,<I>z</I>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>From the tangent plane coordinates of a star of known
+direction cosines, determine the direction cosines
+ of the tangent point (single precision)
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_TPV2C (XI, ETA, V, V01, V02, N)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>XI,ETA</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>tangent plane coordinates of star (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>V</EM></TD>
+<TD ALIGN="LEFT"><B>R(3)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>direction cosines of star</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>V01</EM></TD>
+<TH ALIGN="LEFT"><B>R(3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>direction cosines of tangent point, solution 1</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>V01</EM></TD>
+<TD ALIGN="LEFT"><B>R(3)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>direction cosines of tangent point, solution 2</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>N</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>number of solutions:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 0 = no solutions returned (note 2)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 1 = only the first solution is useful (note 3)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 2 = there are two useful solutions (note 3)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The vector V must be of unit length or the result will be wrong.
+<DT>2.
+<DD>Cases where there is no solution can only arise near the poles.
+For example, it is clearly impossible for a star at the pole
+ itself to have a non-zero XI value.
+ <DT>3.
+<DD>Also near the poles, cases can arise where there are two useful
+ solutions. The argument N indicates whether the second of the
+ two solutions returned is useful.
+ N=1
+ indicates only one useful solution, the usual case; under these
+ circumstances, the second solution can be regarded as valid if
+ the vector V02 is interpreted as the ``over-the-pole'' case.
+ <DT>4.
+<DD>The projection is called the <I>gnomonic</I> projection; the
+ Cartesian coordinates <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img85.gif"
+ ALT="$[\,\xi,\eta\,]$"> are called
+ <I>standard coordinates.</I> The latter
+ are in units of the distance from the tangent plane to the projection
+ point, <I>i.e.</I> radians near the origin.
+ <DT>5.
+<DD>This routine is the Cartesian equivalent of the routine sla_TPS2C.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html2286" HREF="node187.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2284" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2278" HREF="node185.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2287" HREF="node187.html">SLA_UE2EL - Universal to Conventional Elements</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2285" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2279" HREF="node185.html">SLA_TPS2C - Plate centre from and</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node187.html b/src/slalib/sun67.htx/node187.html
new file mode 100644
index 0000000..9b71eb3
--- /dev/null
+++ b/src/slalib/sun67.htx/node187.html
@@ -0,0 +1,378 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_UE2EL - Universal to Conventional Elements</TITLE>
+<META NAME="description" CONTENT="SLA_UE2EL - Universal to Conventional Elements">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node188.html">
+<LINK REL="previous" HREF="node186.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node188.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2296" HREF="node188.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2294" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2288" HREF="node186.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2297" HREF="node188.html">SLA_UE2PV - Pos/Vel from Universal Elements</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2295" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2289" HREF="node186.html">SLA_TPV2C - Plate centre from and x,y,z</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004174000000000000000">SLA_UE2EL - Universal to Conventional Elements</A>
+<A NAME="xref_SLA_UE2EL">&#160;</A><A NAME="SLA_UE2EL">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Transform universal elements into conventional heliocentric
+osculating elements.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_UE2EL (
+ U, JFORMR,
+ JFORM, EPOCH, ORBINC, ANODE, PERIH,
+ AORQ, E, AORL, DM, JSTAT)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>U</EM></TD>
+<TH ALIGN="LEFT"><B>D(13)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>universal orbital elements (updated; Note&nbsp;1)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(1)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>combined mass (<I>M</I>+<I>m</I>)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(2)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>total energy of the orbit (<IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$">)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(3)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>reference (osculating) epoch (<I>t<SUB>0</SUB></I>)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(4-6)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>position at reference epoch (<IMG WIDTH="17" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img102.gif"
+ ALT="${\rm \bf r}_0$">)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(7-9)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>velocity at reference epoch (<IMG WIDTH="19" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img103.gif"
+ ALT="${\rm \bf v}_0$">)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(10)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>heliocentric distance at reference epoch</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(11)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="39" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img104.gif"
+ ALT="${\rm \bf r}_0.{\rm \bf v}_0$"></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(12)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>date (<I>t</I>)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(13)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>universal eccentric anomaly (<IMG WIDTH="14" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img105.gif"
+ ALT="$\psi$">) of date, approx</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT">&nbsp;</TD>
+<TD ALIGN="LEFT">&nbsp;</TD>
+<TD ALIGN="LEFT" NOWRAP>&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>JFORMR</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>requested element set (1-3; Note&nbsp;3)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>JFORM</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>element set actually returned (1-3; Note&nbsp;4)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>EPOCH</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>epoch of elements (<I>t<SUB>0</SUB></I> or <I>T</I>, TT MJD)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ORBINC</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>inclination (<I>i</I>, radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ANODE</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>longitude of the ascending node (<IMG WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img99.gif"
+ ALT="$\Omega$">, radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PERIH</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>longitude or argument of perihelion
+(<IMG WIDTH="16" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img100.gif"
+ ALT="$\varpi$"> or <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img101.gif"
+ ALT="$\omega$">,</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>AORQ</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>mean distance or perihelion distance (<I>a</I> or <I>q</I>, AU)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>E</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>eccentricity (<I>e</I>)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>AORL</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>mean anomaly or longitude
+(<I>M</I> or <I>L</I>, radians,</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> JFORM=1,2 only)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DM</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>daily motion (<I>n</I>, radians, JFORM=1 only)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>JSTAT</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>status:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 0 = OK</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -1 = illegal PMASS</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -2 = illegal JFORMR</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -3 = position/velocity out of allowed range</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The ``universal'' elements are those which define the orbit for the
+purposes of the method of universal variables (see reference 2).
+They consist of the combined mass of the two bodies, an epoch,
+ and the position and velocity vectors (arbitrary reference frame)
+ at that epoch. The parameter set used here includes also various
+ quantities that can, in fact, be derived from the other
+ information. This approach is taken to avoiding unnecessary
+ computation and loss of accuracy. The supplementary quantities
+ are (i)&nbsp;<IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$">, which is proportional to the total energy of the
+ orbit, (ii)&nbsp;the heliocentric distance at epoch,
+ (iii)&nbsp;the outwards component of the velocity at the given epoch,
+ (iv)&nbsp;an estimate of <IMG WIDTH="14" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img105.gif"
+ ALT="$\psi$">, the ``universal eccentric anomaly'' at a
+ given date and (v)&nbsp;that date.
+ <DT>2.
+<DD>The universal elements are with respect to the mean equator and
+ equinox of epoch J2000. The orbital elements produced are with
+ respect to the J2000 ecliptic and mean equinox.
+ <DT>3.
+<DD>Three different element-format options are supported, as
+ follows. <BR>
+<P>
+JFORM=1, suitable for the major planets:
+<P> <PRE><TT>
+ EPOCH = epoch of elements <I>t<SUB>0</SUB></I> (TT MJD)
+ ORBINC = inclination <I>i</I> (radians)
+ ANODE = longitude of the ascending node <IMG WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img99.gif"
+ ALT="$\Omega$"> (radians)
+ PERIH = longitude of perihelion <IMG WIDTH="16" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img100.gif"
+ ALT="$\varpi$"> (radians)
+ AORQ = mean distance <I>a</I> (AU)
+ E = eccentricity <I>e</I> <IMG WIDTH="83" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img106.gif"
+ ALT="$( 0 \leq e < 1 )$">
+ AORL = mean longitude <I>L</I> (radians)
+ DM = daily motion <I>n</I> (radians)
+</TT></PRE>
+<P>
+JFORM=2, suitable for minor planets:
+<P> <PRE><TT>
+ EPOCH = epoch of elements <I>t<SUB>0</SUB></I> (TT MJD)
+ ORBINC = inclination <I>i</I> (radians)
+ ANODE = longitude of the ascending node <IMG WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img99.gif"
+ ALT="$\Omega$"> (radians)
+ PERIH = argument of perihelion <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img101.gif"
+ ALT="$\omega$"> (radians)
+ AORQ = mean distance <I>a</I> (AU)
+ E = eccentricity <I>e</I> <IMG WIDTH="83" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img106.gif"
+ ALT="$( 0 \leq e < 1 )$">
+ AORL = mean anomaly <I>M</I> (radians)
+</TT></PRE>
+<P>
+JFORM=3, suitable for comets:
+<P> <PRE><TT>
+ EPOCH = epoch of perihelion <I>T</I> (TT MJD)
+ ORBINC = inclination <I>i</I> (radians)
+ ANODE = longitude of the ascending node <IMG WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img99.gif"
+ ALT="$\Omega$"> (radians)
+ PERIH = argument of perihelion <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img101.gif"
+ ALT="$\omega$"> (radians)
+ AORQ = perihelion distance <I>q</I> (AU)
+ E = eccentricity <I>e</I> <IMG WIDTH="91" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img107.gif"
+ ALT="$( 0 \leq e \leq 10 )$"></TT></PRE>
+ <DT>4.
+<DD>It may not be possible to generate elements in the form
+ requested through JFORMR. The caller is notified of the form
+ of elements actually returned by means of the JFORM argument:
+<P> <PRE><TT>
+ JFORMR JFORM meaning
+&nbsp;
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1 OK: elements are in the requested format
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2 never happens
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3 orbit not elliptical
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1 never happens
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2 OK: elements are in the requested format
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3 orbit not elliptical
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1 never happens
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2 never happens
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3 OK: elements are in the requested format
+</TT></PRE>
+ <DT>5.
+<DD>The arguments returned for each value of JFORM (<I>cf</I> Note&nbsp;5:
+ JFORM may not be the same as JFORMR) are as follows:
+<P> <PRE><TT>
+ JFORM 1 2 3
+&nbsp;
+ EPOCH <I>t<SUB>0</SUB></I> <I>t<SUB>0</SUB></I> <I>T</I>
+ ORBINC <I>i</I> <I>i</I> <I>i</I>
+ ANODE <IMG WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img99.gif"
+ ALT="$\Omega$"> <IMG WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img99.gif"
+ ALT="$\Omega$"> <IMG WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img99.gif"
+ ALT="$\Omega$">
+ PERIH <IMG WIDTH="16" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img100.gif"
+ ALT="$\varpi$"> <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img101.gif"
+ ALT="$\omega$"> <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img101.gif"
+ ALT="$\omega$">
+ AORQ <I>a</I> <I>a</I> <I>q</I>
+ E <I>e</I> <I>e</I> <I>e</I>
+ AORL <I>L</I> <I>M</I> -
+ DM <I>n</I> - -
+</TT></PRE>
+<P>
+where:
+ <PRE><TT>
+ <I>t<SUB>0</SUB></I> is the epoch of the elements (MJD, TT)
+ <I>T</I> is the epoch of perihelion (MJD, TT)
+ <I>i</I> is the inclination (radians)
+ <IMG WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img99.gif"
+ ALT="$\Omega$"> is the longitude of the ascending node (radians)
+ <IMG WIDTH="16" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img100.gif"
+ ALT="$\varpi$"> is the longitude of perihelion (radians)
+ <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img101.gif"
+ ALT="$\omega$"> is the argument of perihelion (radians)
+ <I>a</I> is the mean distance (AU)
+ <I>q</I> is the perihelion distance (AU)
+ <I>e</I> is the eccentricity
+ <I>L</I> is the longitude (radians, <IMG WIDTH="48" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img143.gif"
+ ALT="$0-2\pi$">) <I>M</I> is the mean anomaly (radians, <IMG WIDTH="48" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img143.gif"
+ ALT="$0-2\pi$">) <I>n</I> is the daily motion (radians)
+ - means no value is set
+</TT></PRE>
+ <DT>6.
+<DD>At very small inclinations, the longitude of the ascending node
+ ANODE becomes indeterminate and under some circumstances may be
+ set arbitrarily to zero. Similarly, if the orbit is close to
+ circular, the true anomaly becomes indeterminate and under some
+ circumstances may be set arbitrarily to zero. In such cases,
+ the other elements are automatically adjusted to compensate,
+ and so the elements remain a valid description of the orbit.
+ </DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>Sterne, Theodore E., <I>An Introduction to Celestial Mechanics,</I>
+Interscience Publishers, 1960. Section 6.7, p199.
+<DT>2.
+<DD>Everhart, E. &amp; Pitkin, E.T., Am.&nbsp;J.&nbsp;Phys.&nbsp;51, 712, 1983.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html2296" HREF="node188.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2294" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2288" HREF="node186.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2297" HREF="node188.html">SLA_UE2PV - Pos/Vel from Universal Elements</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2295" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2289" HREF="node186.html">SLA_TPV2C - Plate centre from and x,y,z</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node188.html b/src/slalib/sun67.htx/node188.html
new file mode 100644
index 0000000..bc0c8bd
--- /dev/null
+++ b/src/slalib/sun67.htx/node188.html
@@ -0,0 +1,220 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_UE2PV - Pos/Vel from Universal Elements</TITLE>
+<META NAME="description" CONTENT="SLA_UE2PV - Pos/Vel from Universal Elements">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node189.html">
+<LINK REL="previous" HREF="node187.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node189.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2306" HREF="node189.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2304" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2298" HREF="node187.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2307" HREF="node189.html">SLA_UNPCD - Remove Radial Distortion</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2305" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2299" HREF="node187.html">SLA_UE2EL - Universal to Conventional Elements</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004175000000000000000">SLA_UE2PV - Pos/Vel from Universal Elements</A>
+<A NAME="xref_SLA_UE2PV">&#160;</A><A NAME="SLA_UE2PV">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Heliocentric position and velocity of a planet, asteroid or comet,
+starting from orbital elements in the ``universal variables'' form.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_UE2PV (DATE, U, PV, JSTAT)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DATE</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>date (TT Modified Julian Date = JD-2400000.5)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>GIVEN and RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>U</EM></TD>
+<TH ALIGN="LEFT"><B>D(13)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>universal orbital elements (updated; Note&nbsp;1)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(1)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>combined mass (<I>M</I>+<I>m</I>)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(2)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>total energy of the orbit (<IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$">)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(3)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>reference (osculating) epoch (<I>t<SUB>0</SUB></I>)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(4-6)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>position at reference epoch (<IMG WIDTH="17" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img102.gif"
+ ALT="${\rm \bf r}_0$">)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(7-9)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>velocity at reference epoch (<IMG WIDTH="19" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img103.gif"
+ ALT="${\rm \bf v}_0$">)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(10)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>heliocentric distance at reference epoch</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(11)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="39" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img104.gif"
+ ALT="${\rm \bf r}_0.{\rm \bf v}_0$"></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(12)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>date (<I>t</I>)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(13)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>universal eccentric anomaly (<IMG WIDTH="14" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img105.gif"
+ ALT="$\psi$">) of date, approx</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PV</EM></TD>
+<TH ALIGN="LEFT"><B>D(6)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>heliocentric <IMG WIDTH="106" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img51.gif"
+ ALT="$[\,x,y,z,\dot{x},\dot{y},\dot{z}\,]$">, equatorial, J2000</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> (AU, AU/s; Note&nbsp;1)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>JSTAT</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>status:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 0 = OK</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -1 = radius vector zero</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -2 = failed to converge</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The ``universal'' elements are those which define the orbit for the
+purposes of the method of universal variables (see reference).
+They consist of the combined mass of the two bodies, an epoch,
+ and the position and velocity vectors (arbitrary reference frame)
+ at that epoch. The parameter set used here includes also various
+ quantities that can, in fact, be derived from the other
+ information. This approach is taken to avoiding unnecessary
+ computation and loss of accuracy. The supplementary quantities
+ are (i)&nbsp;<IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$">, which is proportional to the total energy of the
+ orbit, (ii)&nbsp;the heliocentric distance at epoch,
+ (iii)&nbsp;the outwards component of the velocity at the given epoch,
+ (iv)&nbsp;an estimate of <IMG WIDTH="14" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img105.gif"
+ ALT="$\psi$">, the ``universal eccentric anomaly'' at a
+ given date and (v)&nbsp;that date.
+ <DT>2.
+<DD>The companion routine is sla_EL2UE. This takes the conventional
+ orbital elements and transforms them into the set of numbers
+ needed by the present routine. A single prediction requires one
+ one call to sla_EL2UE followed by one call to the present routine;
+ for convenience, the two calls are packaged as the routine
+ sla_PLANEL. Multiple predictions may be made by again
+ calling sla_EL2UE once, but then calling the present routine
+ multiple times, which is faster than multiple calls to sla_PLANEL.
+<P>
+It is not obligatory to use sla_EL2UE to obtain the parameters.
+ However, it should be noted that because sla_EL2UE performs its
+ own validation, no checks on the contents of the array U are made
+ by the present routine.
+ <DT>3.
+<DD>DATE is the instant for which the prediction is required. It is
+ in the TT timescale (formerly Ephemeris Time, ET) and is a
+ Modified Julian Date (JD-2400000.5).
+ <DT>4.
+<DD>The universal elements supplied in the array U are in canonical
+ units (solar masses, AU and canonical days). The position and
+ velocity are not sensitive to the choice of reference frame. The
+ sla_EL2UE routine in fact produces coordinates with respect to the
+ J2000 equator and equinox.
+ <DT>5.
+<DD>The algorithm was originally adapted from the EPHSLA program of
+ D.H.P.Jones (private communication, 1996). The method
+ is based on Stumpff's Universal Variables.
+ </DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCE:</STRONG>
+<DD>Everhart, E. &amp; Pitkin, E.T., Am.&nbsp;J.&nbsp;Phys.&nbsp;51, 712, 1983.
+</DL>
+<BR> <HR>
+<A NAME="tex2html2306" HREF="node189.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2304" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2298" HREF="node187.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2307" HREF="node189.html">SLA_UNPCD - Remove Radial Distortion</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2305" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2299" HREF="node187.html">SLA_UE2EL - Universal to Conventional Elements</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node189.html b/src/slalib/sun67.htx/node189.html
new file mode 100644
index 0000000..a19516f
--- /dev/null
+++ b/src/slalib/sun67.htx/node189.html
@@ -0,0 +1,160 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_UNPCD - Remove Radial Distortion</TITLE>
+<META NAME="description" CONTENT="SLA_UNPCD - Remove Radial Distortion">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node190.html">
+<LINK REL="previous" HREF="node188.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node190.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2316" HREF="node190.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2314" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2308" HREF="node188.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2317" HREF="node190.html">SLA_V2TP - Direction Cosines to Tangent Plane</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2315" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2309" HREF="node188.html">SLA_UE2PV - Pos/Vel from Universal Elements</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004176000000000000000">SLA_UNPCD - Remove Radial Distortion</A>
+<A NAME="xref_SLA_UNPCD">&#160;</A><A NAME="SLA_UNPCD">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Remove pincushion/barrel distortion from a distorted
+<IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$"> to give tangent-plane <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$">.<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_UNPCD (DISCO,X,Y)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DISCO</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>pincushion/barrel distortion coefficient</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>X,Y</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>distorted <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$"></TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>X,Y</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>tangent-plane <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$"></TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The distortion is of the form <IMG WIDTH="103" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
+ SRC="img128.gif"
+ ALT="$\rho = r (1 + c r^{2})$">, where <I>r</I> is
+the radial distance from the tangent point, <I>c</I> is the DISCO
+argument, and <IMG WIDTH="11" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img129.gif"
+ ALT="$\rho$"> is the radial distance in the presence of
+ the distortion.
+ <DT>2.
+<DD>For <I>pincushion</I> distortion, C is +ve; for
+ <I>barrel</I> distortion, C is -ve.
+ <DT>3.
+<DD>For X,Y in units of one projection radius (in the case of
+ a photographic plate, the focal length), the following
+ DISCO values apply:
+<P> <BR>
+<BR>
+<BR>
+<P> <TABLE CELLPADDING=3 BORDER="1">
+<TR VALIGN="TOP"><TD ALIGN="LEFT" NOWRAP>Geometry</TD>
+<TD ALIGN="CENTER" NOWRAP>DISCO</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT" NOWRAP>astrograph</TD>
+<TD ALIGN="CENTER" NOWRAP>0.0</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT" NOWRAP>Schmidt</TD>
+<TD ALIGN="CENTER" NOWRAP>-0.3333</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT" NOWRAP>AAT PF doublet</TD>
+<TD ALIGN="CENTER" NOWRAP>+147.069</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT" NOWRAP>AAT PF triplet</TD>
+<TD ALIGN="CENTER" NOWRAP>+178.585</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT" NOWRAP>AAT f/8</TD>
+<TD ALIGN="CENTER" NOWRAP>+21.20</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT" NOWRAP>JKT f/8</TD>
+<TD ALIGN="CENTER" NOWRAP>+14.6</TD>
+</TR>
+</TABLE>
+<P> <BR>
+<BR>
+<BR>
+<P> <DT>4.
+<DD>The present routine is an approximate inverse to the
+ companion routine sla_PCD, obtained from two iterations
+ of Newton's method. The mismatch between the sla_PCD
+ and sla_UNPCD is negligible for astrometric applications;
+ to reach 1&nbsp;milliarcsec at the edge of the AAT triplet or
+ Schmidt field would require field diameters of <IMG WIDTH="25" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img232.gif"
+ ALT="$2^{\circ}
+ \hspace{-0.37em}.\hspace{0.02em}4$"> and <IMG WIDTH="26" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img233.gif"
+ ALT="$42^{\circ}$"> respectively.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html2316" HREF="node190.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2314" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2308" HREF="node188.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2317" HREF="node190.html">SLA_V2TP - Direction Cosines to Tangent Plane</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2315" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2309" HREF="node188.html">SLA_UE2PV - Pos/Vel from Universal Elements</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node19.html b/src/slalib/sun67.htx/node19.html
new file mode 100644
index 0000000..3a52cd9
--- /dev/null
+++ b/src/slalib/sun67.htx/node19.html
@@ -0,0 +1,160 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_AMPQK - Quick Apparent to Mean</TITLE>
+<META NAME="description" CONTENT="SLA_AMPQK - Quick Apparent to Mean">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node20.html">
+<LINK REL="previous" HREF="node18.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node20.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html616" HREF="node20.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html614" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html608" HREF="node18.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html617" HREF="node20.html">SLA_AOP - Apparent to Observed</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html615" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html609" HREF="node18.html">SLA_AMP - Apparent to Mean</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION00046000000000000000">SLA_AMPQK - Quick Apparent to Mean</A>
+<A NAME="xref_SLA_AMPQK">&#160;</A><A NAME="SLA_AMPQK">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Convert star <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> from geocentric apparent to mean place
+(post IAU 1976). Use of this routine is appropriate when
+ efficiency is important and where many star positions are
+ all to be transformed for one epoch and equinox. The
+ star-independent parameters can be obtained by calling
+ the sla_MAPPA routine.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_AMPQK (RA, DA, AMPRMS, RM, DM)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RA,DA</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>apparent <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>AMPRMS</EM></TD>
+<TD ALIGN="LEFT"><B>D(21)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>star-independent mean-to-apparent parameters:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(1)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>time interval for proper motion (Julian years)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(2-4)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>barycentric position of the Earth (AU)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(5-7)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>heliocentric direction of the Earth (unit vector)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(8)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>(gravitational radius of
+Sun)<IMG WIDTH="31" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img16.gif"
+ ALT="$\times 2 / $">(Sun-Earth distance)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(9-11)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP><B>v</B>: barycentric Earth velocity in units of c</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(12)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="72" HEIGHT="45" ALIGN="MIDDLE" BORDER="0"
+ SRC="img17.gif"
+ ALT="$\sqrt{1-\left\vert\mbox{\bf v}\right\vert^2}$"></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(13-21)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>precession/nutation <IMG WIDTH="39" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img18.gif"
+ ALT="$3\times3$"> matrix</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RM,DM</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>mean <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The accuracy is limited by the routine sla_EVP, called
+by sla_MAPPA, which computes the Earth position and
+velocity using the methods of Stumpff. The maximum
+ error is about 0.3&nbsp;milliarcsecond.
+ <DT>2.
+<DD>Iterative techniques are used for the aberration and
+ light deflection corrections so that the routines
+ sla_AMP (or sla_AMPQK) and sla_MAP (or sla_MAPQK) are
+ accurate inverses; even at the edge of the Sun's disc
+ the discrepancy is only about 1&nbsp;nanoarcsecond.
+ </DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>1984 <I>Astronomical Almanac</I>, pp B39-B41.
+<DT>2.
+<DD>Lederle &amp; Schwan, 1984. <I>Astr.Astrophys.</I> <B>134</B>, 1-6.
+</DL></DL>
+<BR> <HR>
+<A NAME="tex2html616" HREF="node20.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html614" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html608" HREF="node18.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html617" HREF="node20.html">SLA_AOP - Apparent to Observed</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html615" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html609" HREF="node18.html">SLA_AMP - Apparent to Mean</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node190.html b/src/slalib/sun67.htx/node190.html
new file mode 100644
index 0000000..09def53
--- /dev/null
+++ b/src/slalib/sun67.htx/node190.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_V2TP - Direction Cosines to Tangent Plane</TITLE>
+<META NAME="description" CONTENT="SLA_V2TP - Direction Cosines to Tangent Plane">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node191.html">
+<LINK REL="previous" HREF="node189.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node191.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2326" HREF="node191.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2324" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2318" HREF="node189.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2327" HREF="node191.html">SLA_VDV - Scalar Product</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2325" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2319" HREF="node189.html">SLA_UNPCD - Remove Radial Distortion</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004177000000000000000">SLA_V2TP - Direction Cosines to Tangent Plane</A>
+<A NAME="xref_SLA_V2TP">&#160;</A><A NAME="SLA_V2TP">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Given the direction cosines of a star and of the tangent point,
+determine the star's tangent-plane coordinates
+ (single precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_V2TP (V, V0, XI, ETA, J)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>V</EM></TD>
+<TH ALIGN="LEFT"><B>R(3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>direction cosines of star</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>V0</EM></TD>
+<TD ALIGN="LEFT"><B>R(3)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>direction cosines of tangent point</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>XI,ETA</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>tangent plane coordinates (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>J</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>status:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 0 = OK, star on tangent plane</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 1 = error, star too far from axis</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 2 = error, antistar on tangent plane</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 3 = error, antistar too far from axis</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>If vector V0 is not of unit length, or if vector V is of zero
+length, the results will be wrong.
+<DT>2.
+<DD>If V0 points at a pole, the returned <IMG WIDTH="26" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img90.gif"
+ ALT="$\xi,\eta$"> will be based on the
+ arbitrary assumption that <IMG WIDTH="43" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img89.gif"
+ ALT="$\alpha=0$"> at the tangent point.
+ <DT>3.
+<DD>The projection is called the <I>gnomonic</I> projection; the
+ Cartesian coordinates <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img85.gif"
+ ALT="$[\,\xi,\eta\,]$"> are called
+ <I>standard coordinates.</I> The latter
+ are in units of the distance from the tangent plane to the projection
+ point, <I>i.e.</I> radians near the origin.
+ <DT>4.
+<DD>This routine is the Cartesian equivalent of the routine sla_S2TP.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html2326" HREF="node191.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2324" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2318" HREF="node189.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2327" HREF="node191.html">SLA_VDV - Scalar Product</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2325" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2319" HREF="node189.html">SLA_UNPCD - Remove Radial Distortion</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node191.html b/src/slalib/sun67.htx/node191.html
new file mode 100644
index 0000000..427bf46
--- /dev/null
+++ b/src/slalib/sun67.htx/node191.html
@@ -0,0 +1,91 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_VDV - Scalar Product</TITLE>
+<META NAME="description" CONTENT="SLA_VDV - Scalar Product">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node192.html">
+<LINK REL="previous" HREF="node190.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node192.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2336" HREF="node192.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2334" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2328" HREF="node190.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2337" HREF="node192.html">SLA_VN - Normalize Vector</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2335" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2329" HREF="node190.html">SLA_V2TP - Direction Cosines to Tangent Plane</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004178000000000000000">SLA_VDV - Scalar Product</A>
+<A NAME="xref_SLA_VDV">&#160;</A><A NAME="SLA_VDV">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Scalar product of two 3-vectors (single precision).
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>R&nbsp;=&nbsp;sla_VDV (VA, VB)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>VA</EM></TD>
+<TH ALIGN="LEFT"><B>R(3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>first vector</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>VB</EM></TD>
+<TD ALIGN="LEFT"><B>R(3)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>second vector</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>sla_VDV</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>scalar product VA.VB</TD>
+</TR>
+</TABLE></DL>
+<BR> <HR>
+<A NAME="tex2html2336" HREF="node192.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2334" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2328" HREF="node190.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2337" HREF="node192.html">SLA_VN - Normalize Vector</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2335" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2329" HREF="node190.html">SLA_V2TP - Direction Cosines to Tangent Plane</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node192.html b/src/slalib/sun67.htx/node192.html
new file mode 100644
index 0000000..dd4d9b6
--- /dev/null
+++ b/src/slalib/sun67.htx/node192.html
@@ -0,0 +1,95 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_VN - Normalize Vector</TITLE>
+<META NAME="description" CONTENT="SLA_VN - Normalize Vector">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node193.html">
+<LINK REL="previous" HREF="node191.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node193.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2346" HREF="node193.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2344" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2338" HREF="node191.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2347" HREF="node193.html">SLA_VXV - Vector Product</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2345" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2339" HREF="node191.html">SLA_VDV - Scalar Product</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004179000000000000000">SLA_VN - Normalize Vector</A>
+<A NAME="xref_SLA_VN">&#160;</A><A NAME="SLA_VN">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Normalize a 3-vector, also giving the modulus (single precision).
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_VN (V, UV, VM)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>V</EM></TD>
+<TH ALIGN="LEFT"><B>R(3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>vector</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>UV</EM></TD>
+<TH ALIGN="LEFT"><B>R(3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>unit vector in direction of V</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>VM</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>modulus of V</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTE:</STRONG>
+<DD>If the modulus of V is zero, UV is set to zero as well.
+</DL>
+<BR> <HR>
+<A NAME="tex2html2346" HREF="node193.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2344" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2338" HREF="node191.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2347" HREF="node193.html">SLA_VXV - Vector Product</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2345" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2339" HREF="node191.html">SLA_VDV - Scalar Product</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node193.html b/src/slalib/sun67.htx/node193.html
new file mode 100644
index 0000000..8f27978
--- /dev/null
+++ b/src/slalib/sun67.htx/node193.html
@@ -0,0 +1,93 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_VXV - Vector Product</TITLE>
+<META NAME="description" CONTENT="SLA_VXV - Vector Product">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node194.html">
+<LINK REL="previous" HREF="node192.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node194.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2356" HREF="node194.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2354" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2348" HREF="node192.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2357" HREF="node194.html">SLA_WAIT - Time Delay</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2355" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2349" HREF="node192.html">SLA_VN - Normalize Vector</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004180000000000000000">SLA_VXV - Vector Product</A>
+<A NAME="xref_SLA_VXV">&#160;</A><A NAME="SLA_VXV">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Vector product of two 3-vectors (single precision).
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_VXV (VA, VB, VC)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>VA</EM></TD>
+<TH ALIGN="LEFT"><B>R(3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>first vector</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>VB</EM></TD>
+<TD ALIGN="LEFT"><B>R(3)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>second vector</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>VC</EM></TD>
+<TH ALIGN="LEFT"><B>R(3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>vector product VA<IMG WIDTH="15" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img84.gif"
+ ALT="$\times$">VB</TD>
+</TR>
+</TABLE></DL>
+<BR> <HR>
+<A NAME="tex2html2356" HREF="node194.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2354" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2348" HREF="node192.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2357" HREF="node194.html">SLA_WAIT - Time Delay</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2355" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2349" HREF="node192.html">SLA_VN - Normalize Vector</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node194.html b/src/slalib/sun67.htx/node194.html
new file mode 100644
index 0000000..55a0ed7
--- /dev/null
+++ b/src/slalib/sun67.htx/node194.html
@@ -0,0 +1,91 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_WAIT - Time Delay</TITLE>
+<META NAME="description" CONTENT="SLA_WAIT - Time Delay">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node195.html">
+<LINK REL="previous" HREF="node193.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node195.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2366" HREF="node195.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2364" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2358" HREF="node193.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2367" HREF="node195.html">SLA_XY2XY - Apply Linear Model to an</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2365" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2359" HREF="node193.html">SLA_VXV - Vector Product</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004181000000000000000">SLA_WAIT - Time Delay</A>
+<A NAME="xref_SLA_WAIT">&#160;</A><A NAME="SLA_WAIT">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Wait for a specified interval.
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_WAIT (DELAY)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DELAY</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>delay in seconds</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The implementation is machine-specific.
+<DT>2.
+<DD>The delay actually requested is restricted to the range
+100ns-200s in the present implementation.
+ <DT>3.
+<DD>There is no guarantee of accuracy, though on almost all
+ types of computer the program will certainly not
+ resume execution <I>before</I> the stated interval has
+ elapsed.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html2366" HREF="node195.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2364" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2358" HREF="node193.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2367" HREF="node195.html">SLA_XY2XY - Apply Linear Model to an</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2365" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2359" HREF="node193.html">SLA_VXV - Vector Product</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node195.html b/src/slalib/sun67.htx/node195.html
new file mode 100644
index 0000000..2b33ece
--- /dev/null
+++ b/src/slalib/sun67.htx/node195.html
@@ -0,0 +1,114 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_XY2XY - Apply Linear Model to an </TITLE>
+<META NAME="description" CONTENT="SLA_XY2XY - Apply Linear Model to an ">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node196.html">
+<LINK REL="previous" HREF="node194.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node196.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2376" HREF="node196.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2374" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2368" HREF="node194.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2377" HREF="node196.html">SLA_ZD - to Zenith Distance</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2375" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2369" HREF="node194.html">SLA_WAIT - Time Delay</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004182000000000000000">&#160;</A><A NAME="xref_SLA_XY2XY">&#160;</A><A NAME="SLA_XY2XY">&#160;</A>
+<BR>
+SLA_XY2XY - Apply Linear Model to an <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$"></H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Transform one <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$"> into another using a linear model of the type
+produced by the sla_FITXY routine.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_XY2XY (X1,Y1,COEFFS,X2,Y2)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>X1,Y1</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$"> before transformation</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>COEFFS</EM></TD>
+<TD ALIGN="LEFT"><B>D(6)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>transformation coefficients (see note)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>X2,Y2</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$"> after transformation</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The model relates two sets of <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$"> coordinates as follows.
+Naming the six elements of COEFFS <I>a</I>,<I>b</I>,<I>c</I>,<I>d</I>,<I>e</I> &amp; <I>f</I>,
+the present routine performs the transformation:
+ <BLOCKQUOTE><I>x<SUB>2</SUB></I> = <I>a</I> + <I>bx<SUB>1</SUB></I> + <I>cy<SUB>1</SUB></I> <BR>
+ <I>y<SUB>2</SUB></I> = <I>d</I> + <I>ex<SUB>1</SUB></I> + <I>fy<SUB>1</SUB></I></BLOCKQUOTE>
+ <DT>2.
+<DD>See also sla_FITXY, sla_PXY, sla_INVF, sla_DCMPF.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html2376" HREF="node196.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2374" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2368" HREF="node194.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2377" HREF="node196.html">SLA_ZD - to Zenith Distance</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2375" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2369" HREF="node194.html">SLA_WAIT - Time Delay</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node196.html b/src/slalib/sun67.htx/node196.html
new file mode 100644
index 0000000..0dc168b
--- /dev/null
+++ b/src/slalib/sun67.htx/node196.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_ZD - to Zenith Distance</TITLE>
+<META NAME="description" CONTENT="SLA_ZD - to Zenith Distance">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="previous" HREF="node195.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node197.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2384" HREF="node197.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2382" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2378" HREF="node195.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2385" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2383" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2379" HREF="node195.html">SLA_XY2XY - Apply Linear Model to an</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION0004183000000000000000">&#160;</A><A NAME="xref_SLA_ZD">&#160;</A><A NAME="SLA_ZD">&#160;</A>
+<BR>
+SLA_ZD - <IMG WIDTH="27" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img65.gif"
+ ALT="$h,\delta$"> to Zenith Distance
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Hour angle and declination to zenith distance
+(double precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>D&nbsp;=&nbsp;sla_ZD (HA, DEC, PHI)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>HA</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>hour angle in radians</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DEC</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>declination in radians</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PHI</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>latitude in radians</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>sla_ZD</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>zenith distance (radians, <IMG WIDTH="35" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img234.gif"
+ ALT="$0\!-\!\pi$">)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The latitude must be geodetic. In critical applications,
+corrections for polar motion should be applied (see sla_POLMO).
+<DT>2.
+<DD>In some applications it will be important to specify the
+ correct type of hour angle and declination in order to
+ produce the required type
+ of zenith distance. In particular, it may be
+ important to distinguish between the zenith distance
+ as affected by refraction, which would require the
+ <I>observed</I> <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$">, and the zenith distance <I>in vacuo</I>,
+ which would require the <I>topocentric</I> <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$">. If
+ the effects of diurnal aberration can be neglected, the
+ <I>apparent</I> <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$"> may be used instead of the
+ <I>topocentric</I> <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$">. <DT>3.
+<DD>No range checking of arguments is done.
+ <DT>4.
+<DD>In applications which involve many zenith distance calculations,
+ rather than calling the present routine it will be more
+ efficient to use inline code, having previously computed fixed
+ terms such as sine and cosine of latitude, and perhaps sine and
+ cosine of declination.
+ </DL></DL>
+<P>
+<BR>
+<P>
+<BR> <HR>
+<A NAME="tex2html2384" HREF="node197.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2382" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2378" HREF="node195.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2385" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2383" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2379" HREF="node195.html">SLA_XY2XY - Apply Linear Model to an</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node197.html b/src/slalib/sun67.htx/node197.html
new file mode 100644
index 0000000..ae8cd55
--- /dev/null
+++ b/src/slalib/sun67.htx/node197.html
@@ -0,0 +1,171 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>EXPLANATION AND EXAMPLES</TITLE>
+<META NAME="description" CONTENT="EXPLANATION AND EXAMPLES">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node228.html">
+<LINK REL="previous" HREF="node13.html">
+<LINK REL="up" HREF="sun67.html">
+<LINK REL="next" HREF="node198.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2394" HREF="node198.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2392" HREF="sun67.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2386" HREF="node196.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2395" HREF="node198.html">Spherical Trigonometry</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2393" HREF="sun67.html">SLALIB Positional Astronomy Library</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2387" HREF="node196.html">SLA_ZD - to Zenith Distance</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H1><A NAME="SECTION00050000000000000000">
+EXPLANATION AND EXAMPLES</A>
+</H1>
+To guide the writer of positional-astronomy applications software,
+this final chapter puts the SLALIB routines into the context of
+astronomical phenomena and techniques, and presents a few
+``cookbook'' examples
+of the SLALIB calls in action. The astronomical content of the chapter
+is not, of course, intended to be a substitute for specialist text-books on
+positional astronomy, but may help bridge the gap between
+such books and the SLALIB routines. For further reading, the following
+cover a wide range of material and styles:
+<UL>
+<LI> <I>Explanatory Supplement to the Astronomical Almanac</I>,
+ ed. P.Kenneth&nbsp;Seidelmann (1992), University Science Books.
+<LI> <I>Vectorial Astrometry</I>, C.A.Murray (1983), Adam Hilger.
+<LI> <I>Spherical Astronomy</I>, Robin&nbsp;M.Green (1985), Cambridge
+ University Press.
+<LI> <I>Spacecraft Attitude Determination and Control</I>,
+ ed. James&nbsp;R.Wertz (1986), Reidel.
+<LI> <I>Practical Astronomy with your Calculator</I>,
+ Peter&nbsp;Duffett-Smith (1981), Cambridge University Press.
+</UL>
+Also of considerable value, though out of date in places, are:
+<UL>
+<LI> <I>Explanatory Supplement to the Astronomical Ephemeris
+ and the American Ephemeris and Nautical Almanac</I>, RGO/USNO (1974),
+ HMSO.
+<LI> <I>Textbook on Spherical Astronomy</I>, W.M.Smart (1977),
+ Cambridge University Press.
+</UL>
+Only brief details of individual SLALIB routines are given here, and
+readers will find it useful to refer to the subprogram specifications
+elsewhere in this document. The source code for the SLALIB routines
+(available in both Fortran and C) is also intended to be used as
+documentation.
+<P>
+<BR><HR>
+<!--Table of Child-Links-->
+<A NAME="CHILD_LINKS">&#160;</A>
+<UL>
+<LI><A NAME="tex2html2396" HREF="node198.html#SECTION00051000000000000000">
+Spherical Trigonometry</A>
+<UL>
+<LI><A NAME="tex2html2397" HREF="node199.html#SECTION00051100000000000000">
+Formatting angles</A>
+</UL>
+<LI><A NAME="tex2html2398" HREF="node200.html#SECTION00052000000000000000">
+Vectors and Matrices</A>
+<UL>
+<LI><A NAME="tex2html2399" HREF="node201.html#SECTION00052100000000000000">
+Using vectors</A>
+</UL>
+<LI><A NAME="tex2html2400" HREF="node202.html#SECTION00053000000000000000">
+Celestial Coordinate Systems</A>
+<LI><A NAME="tex2html2401" HREF="node203.html#SECTION00054000000000000000">
+Precession and Nutation</A>
+<UL>
+<LI><A NAME="tex2html2402" HREF="node204.html#SECTION00054100000000000000">
+SLALIB support for precession and nutation</A>
+</UL>
+<LI><A NAME="tex2html2403" HREF="node205.html#SECTION00055000000000000000">
+Mean Places</A>
+<LI><A NAME="tex2html2404" HREF="node206.html#SECTION00056000000000000000">
+Epoch</A>
+<LI><A NAME="tex2html2405" HREF="node207.html#SECTION00057000000000000000">
+Proper Motion</A>
+<LI><A NAME="tex2html2406" HREF="node208.html#SECTION00058000000000000000">
+Parallax and Radial Velocity</A>
+<LI><A NAME="tex2html2407" HREF="node209.html#SECTION00059000000000000000">
+Aberration</A>
+<LI><A NAME="tex2html2408" HREF="node210.html#SECTION000510000000000000000">
+Different Sorts of Mean Place</A>
+<LI><A NAME="tex2html2409" HREF="node211.html#SECTION000511000000000000000">
+Mean Place Transformations</A>
+<LI><A NAME="tex2html2410" HREF="node212.html#SECTION000512000000000000000">
+Mean Place to Apparent Place</A>
+<LI><A NAME="tex2html2411" HREF="node213.html#SECTION000513000000000000000">
+Apparent Place to Observed Place</A>
+<UL>
+<LI><A NAME="tex2html2412" HREF="node214.html#SECTION000513100000000000000">
+Refraction</A>
+<LI><A NAME="tex2html2413" HREF="node215.html#SECTION000513200000000000000">
+Efficiency considerations</A>
+</UL>
+<LI><A NAME="tex2html2414" HREF="node216.html#SECTION000514000000000000000">
+The Hipparcos Catalogue and the ICRS</A>
+<LI><A NAME="tex2html2415" HREF="node217.html#SECTION000515000000000000000">
+Timescales</A>
+<UL>
+<LI><A NAME="tex2html2416" HREF="node218.html#SECTION000515100000000000000">
+Atomic Time: TAI</A>
+<LI><A NAME="tex2html2417" HREF="node219.html#SECTION000515200000000000000">
+Universal Time: UTC, UT1</A>
+<LI><A NAME="tex2html2418" HREF="node220.html#SECTION000515300000000000000">
+Sidereal Time: GMST, LAST</A>
+<LI><A NAME="tex2html2419" HREF="node221.html#SECTION000515400000000000000">
+Dynamical Time: TT, TDB</A>
+</UL>
+<LI><A NAME="tex2html2420" HREF="node222.html#SECTION000516000000000000000">
+Calendars</A>
+<LI><A NAME="tex2html2421" HREF="node223.html#SECTION000517000000000000000">
+Geocentric Coordinates</A>
+<LI><A NAME="tex2html2422" HREF="node224.html#SECTION000518000000000000000">
+Ephemerides</A>
+<LI><A NAME="tex2html2423" HREF="node225.html#SECTION000519000000000000000">
+Radial Velocity and Light-Time Corrections</A>
+<LI><A NAME="tex2html2424" HREF="node226.html#SECTION000520000000000000000">
+Focal-Plane Astrometry</A>
+<LI><A NAME="tex2html2425" HREF="node227.html#SECTION000521000000000000000">
+Numerical Methods</A>
+</UL>
+<!--End of Table of Child-Links-->
+<BR> <HR>
+<A NAME="tex2html2394" HREF="node198.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2392" HREF="sun67.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2386" HREF="node196.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2395" HREF="node198.html">Spherical Trigonometry</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2393" HREF="sun67.html">SLALIB Positional Astronomy Library</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2387" HREF="node196.html">SLA_ZD - to Zenith Distance</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node198.html b/src/slalib/sun67.htx/node198.html
new file mode 100644
index 0000000..30aa3e8
--- /dev/null
+++ b/src/slalib/sun67.htx/node198.html
@@ -0,0 +1,167 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Spherical Trigonometry</TITLE>
+<META NAME="description" CONTENT="Spherical Trigonometry">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node200.html">
+<LINK REL="previous" HREF="node197.html">
+<LINK REL="up" HREF="node197.html">
+<LINK REL="next" HREF="node199.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2434" HREF="node199.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2432" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2426" HREF="node197.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2435" HREF="node199.html">Formatting angles</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2433" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2427" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION00051000000000000000">
+Spherical Trigonometry</A>
+</H2>
+Celestial phenomena occur at such vast distances from the
+observer that for most practical purposes there is no need to
+work in 3D; only the direction
+of a source matters, not how far away it is. Things can
+therefore be viewed as if they were happening
+on the inside of sphere with the observer at the centre -
+the <I>celestial sphere</I>. Problems involving
+positions and orientations in the sky can then be solved by
+using the formulae of <I>spherical trigonometry</I>, which
+apply to <I>spherical triangles</I>, the sides of which are
+<I>great circles</I>.
+<P>
+Positions on the celestial sphere may be specified by using
+a spherical polar coordinate system, defined in terms of
+some fundamental plane and a line in that plane chosen to
+represent zero longitude. Mathematicians usually work with the
+co-latitude, with zero at the principal pole, whereas most
+astronomical coordinate systems use latitude, reckoned plus and
+minus from the equator.
+Astronomical coordinate systems may be either right-handed
+(<I>e.g.</I> right ascension and declination <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$">,Galactic longitude and latitude <IMG WIDTH="59" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
+ SRC="img98.gif"
+ ALT="$[\,l^{I\!I},b^{I\!I}\,]$">)or left-handed (<I>e.g.</I> hour angle and
+declination <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$">). In some cases
+different conventions have been used in the past, a fruitful source of
+mistakes. Azimuth and geographical longitude are examples; azimuth
+is now generally reckoned north through east
+(making a left-handed system); geographical longitude is now usually
+taken to increase eastwards (a right-handed system) but astronomers
+used to employ a west-positive convention. In reports
+and program comments it is wise to spell out what convention
+is being used, if there is any possibility of confusion.
+<P>
+When applying spherical trigonometry formulae, attention must be
+paid to
+rounding errors (for example it is a bad idea to find a
+small angle through its cosine) and to the possibility of
+problems close to poles.
+Also, if a formulation relies on inspection to establish
+the quadrant of the result, it is an indication that a vector-related
+method might be preferable.
+<P>
+As well as providing many routines which work in terms of specific
+spherical coordinates such as <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$">, SLALIB provides
+two routines which operate directly on generic spherical
+coordinates:
+sla_SEP
+computes the separation between
+two points (the distance along a great circle) and
+sla_BEAR
+computes the bearing (or <I>position angle</I>)
+of one point seen from the other. The routines
+sla_DSEP
+and
+sla_DBEAR
+are double precision equivalents. As a simple demonstration
+of SLALIB, we will use these facilities to estimate the distance from
+London to Sydney and the initial compass heading:
+<P><PRE>
+ IMPLICIT NONE
+
+ * Degrees to radians
+ REAL D2R
+ PARAMETER (D2R=0.01745329252)
+
+ * Longitudes and latitudes (radians) for London and Sydney
+ REAL AL,BL,AS,BS
+ PARAMETER (AL=-0.2*D2R,BL=51.5*D2R,AS=151.2*D2R,BS=-33.9*D2R)
+
+ * Earth radius in km (spherical approximation)
+ REAL RKM
+ PARAMETER (RKM=6375.0)
+
+ REAL sla_SEP,sla_BEAR
+
+
+ * Distance and initial heading (N=0, E=90)
+ WRITE (*,'(1X,I5,'' km,'',I4,'' deg'')')
+ : NINT(sla_SEP(AL,BL,AS,BS)*RKM),NINT(sla_BEAR(AL,BL,AS,BS)/D2R)
+
+ END
+</PRE>
+<P>(The result is 17011&nbsp;km, <IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img235.gif"
+ ALT="$61^\circ$">.)
+<P>
+The routines
+sla_PAV and
+sla_DPAV
+are equivalents of sla_BEAR and sla_DBEAR but starting from
+direction-cosines instead of spherical coordinates.
+<P>
+<BR><HR>
+<!--Table of Child-Links-->
+<A NAME="CHILD_LINKS">&#160;</A>
+<UL>
+<LI><A NAME="tex2html2436" HREF="node199.html#SECTION00051100000000000000">
+Formatting angles</A>
+</UL>
+<!--End of Table of Child-Links-->
+<BR> <HR>
+<A NAME="tex2html2434" HREF="node199.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2432" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2426" HREF="node197.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2435" HREF="node199.html">Formatting angles</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2433" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2427" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node199.html b/src/slalib/sun67.htx/node199.html
new file mode 100644
index 0000000..93a4839
--- /dev/null
+++ b/src/slalib/sun67.htx/node199.html
@@ -0,0 +1,174 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Formatting angles</TITLE>
+<META NAME="description" CONTENT="Formatting angles">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="previous" HREF="node198.html">
+<LINK REL="up" HREF="node198.html">
+<LINK REL="next" HREF="node200.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2443" HREF="node200.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2441" HREF="node198.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2437" HREF="node198.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2444" HREF="node200.html">Vectors and Matrices</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2442" HREF="node198.html">Spherical Trigonometry</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2438" HREF="node198.html">Spherical Trigonometry</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H3><A NAME="SECTION00051100000000000000">
+Formatting angles</A>
+</H3>
+SLALIB has routines for decoding decimal numbers
+from character form and for converting angles to and from
+sexagesimal form (hours, minutes, seconds or degrees,
+arcminutes, arcseconds). These apparently straightforward
+operations contain hidden traps which the SLALIB routines
+avoid.
+<P>
+There are five routines for decoding numbers from a character
+string, such as might be entered using a keyboard.
+They all work in the same style, and successive calls
+can work their way along a single string decoding
+a sequence of numbers of assorted types. Number
+fields can be separated by spaces or commas, and can be defaulted
+to previous values or to preset defaults.
+<P>
+Three of the routines decode single numbers:
+sla_INTIN
+(integer),
+sla_FLOTIN
+(single precision floating point) and
+sla_DFLTIN
+(double precision). A minus sign can be
+detected even when the number is zero; this avoids
+the frequently-encountered ``minus zero'' bug, where
+declinations <I>etc.</I> in
+the range <IMG WIDTH="18" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img1.gif"
+ ALT="$0^{\circ}$"> to <IMG WIDTH="30" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img2.gif"
+ ALT="$-1^{\circ}$"> mysteriously migrate to
+the range <IMG WIDTH="18" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img1.gif"
+ ALT="$0^{\circ}$"> to <IMG WIDTH="30" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img236.gif"
+ ALT="$+1^{\circ}$">.Here is an example (in Fortran) where we wish to
+read two numbers, and integer <TT>IX</TT> and a real, <TT>Y</TT>,
+with <TT>X</TT> defaulting to zero and <TT>Y</TT> defaulting to
+<TT>X</TT>:
+<P><PRE>
+ DOUBLE PRECISION Y
+ CHARACTER*80 A
+ INTEGER IX,I,J
+
+ * Input the string to be decoded
+ READ (*,'(A)') A
+
+ * Preset IX to its default value
+ IX = 0
+
+ * Point to the start of the string
+ I = 1
+
+ * Decode an integer
+ CALL sla_INTIN(A,I,IX,J)
+ IF (J.GT.1) GO TO ... (bad IX)
+
+ * Preset Y to its default value
+ Y = DBLE(IX)
+
+ * Decode a double precision number
+ CALL sla_DFLTIN(A,I,Y,J)
+ IF (J.GT.1) GO TO ... (bad Y)
+</PRE>
+<P>
+Two additional routines decode a 3-field sexagesimal number:
+sla_AFIN
+(degrees, arcminutes, arcseconds to single
+precision radians) and
+sla_DAFIN
+(the same but double precision). They also
+work using other units such as hours <I>etc</I>. if
+you multiply the result by the appropriate factor. An example
+Fortran program which uses
+sla_DAFIN
+was given earlier, in section 1.2.
+<P>
+SLALIB provides four routines for expressing an angle in radians
+in a preferred range. The function
+sla_RANGE
+expresses an angle
+in the range <IMG WIDTH="25" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img47.gif"
+ ALT="$\pm \pi$">;sla_RANORM
+expresses an angle in the range
+<IMG WIDTH="48" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img143.gif"
+ ALT="$0-2\pi$">. The functions
+sla_DRANGE
+and
+sla_DRANRM
+are double precision versions.
+<P>
+Several routines
+(sla_CTF2D,
+sla_CR2AF
+<I>etc.</I>) are provided to convert
+angles to and from
+sexagesimal form (hours, minute, seconds or degrees,
+arcminutes and arcseconds).
+They avoid the common
+``converting from integer to real at the wrong time''
+bug, which produces angles like <IMG WIDTH="113" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img237.gif"
+ ALT="$24^{h}\,59^{m}\,59^{s}.999$">.Here is a program which displays an hour angle
+stored in radians:
+<P><PRE>
+ DOUBLE PRECISION HA
+ CHARACTER SIGN
+ INTEGER IHMSF(4)
+ :
+ CALL sla_DR2TF(3,HA,SIGN,IHMSF)
+ WRITE (*,'(1X,A,3I3.2,''.'',I3.3)') SIGN,IHMSF
+</PRE>
+<P>
+<BR> <HR>
+<A NAME="tex2html2443" HREF="node200.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2441" HREF="node198.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2437" HREF="node198.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2444" HREF="node200.html">Vectors and Matrices</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2442" HREF="node198.html">Spherical Trigonometry</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2438" HREF="node198.html">Spherical Trigonometry</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node2.html b/src/slalib/sun67.htx/node2.html
new file mode 100644
index 0000000..2e1859d
--- /dev/null
+++ b/src/slalib/sun67.htx/node2.html
@@ -0,0 +1,85 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>INTRODUCTION</TITLE>
+<META NAME="description" CONTENT="INTRODUCTION">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node12.html">
+<LINK REL="previous" HREF="node1.html">
+<LINK REL="up" HREF="sun67.html">
+<LINK REL="next" HREF="node3.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html256" HREF="node3.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html254" HREF="sun67.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html248" HREF="node1.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html257" HREF="node3.html">Purpose</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html255" HREF="sun67.html">SLALIB Positional Astronomy Library</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html249" HREF="node1.html">Abstract</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H1><A NAME="SECTION00020000000000000000">
+INTRODUCTION</A>
+</H1>
+<BR><HR>
+<!--Table of Child-Links-->
+<A NAME="CHILD_LINKS">&#160;</A>
+<UL>
+<LI><A NAME="tex2html258" HREF="node3.html#SECTION00021000000000000000">
+Purpose</A>
+<LI><A NAME="tex2html259" HREF="node4.html#SECTION00022000000000000000">
+Example Application</A>
+<LI><A NAME="tex2html260" HREF="node5.html#SECTION00023000000000000000">
+Scope</A>
+<LI><A NAME="tex2html261" HREF="node6.html#SECTION00024000000000000000">
+Objectives</A>
+<LI><A NAME="tex2html262" HREF="node7.html#SECTION00025000000000000000">
+Fortran Version</A>
+<LI><A NAME="tex2html263" HREF="node8.html#SECTION00026000000000000000">
+C Version</A>
+<LI><A NAME="tex2html264" HREF="node9.html#SECTION00027000000000000000">
+Future Versions</A>
+<LI><A NAME="tex2html265" HREF="node10.html#SECTION00028000000000000000">
+New Functions</A>
+<LI><A NAME="tex2html266" HREF="node11.html#SECTION00029000000000000000">
+Acknowledgements</A>
+</UL>
+<!--End of Table of Child-Links-->
+<BR> <HR>
+<A NAME="tex2html256" HREF="node3.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html254" HREF="sun67.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html248" HREF="node1.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html257" HREF="node3.html">Purpose</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html255" HREF="sun67.html">SLALIB Positional Astronomy Library</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html249" HREF="node1.html">Abstract</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node20.html b/src/slalib/sun67.htx/node20.html
new file mode 100644
index 0000000..e544154
--- /dev/null
+++ b/src/slalib/sun67.htx/node20.html
@@ -0,0 +1,320 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_AOP - Apparent to Observed</TITLE>
+<META NAME="description" CONTENT="SLA_AOP - Apparent to Observed">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node21.html">
+<LINK REL="previous" HREF="node19.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node21.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html626" HREF="node21.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html624" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html618" HREF="node19.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html627" HREF="node21.html">SLA_AOPPA - Appt-to-Obs Parameters</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html625" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html619" HREF="node19.html">SLA_AMPQK - Quick Apparent to Mean</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION00047000000000000000">SLA_AOP - Apparent to Observed</A>
+<A NAME="xref_SLA_AOP">&#160;</A><A NAME="SLA_AOP">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Apparent to observed place, for optical sources distant from
+the solar system.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_AOP (
+ RAP, DAP, DATE, DUT, ELONGM, PHIM, HM, XP, YP,
+ TDK, PMB, RH, WL, TLR, AOB, ZOB, HOB, DOB, ROB)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RAP,DAP</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>geocentric apparent <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DATE</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>UTC date/time (Modified Julian Date, JD-2400000.5)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DUT</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="16" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img19.gif"
+ ALT="$\Delta$">UT: UT1-UTC (UTC seconds)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ELONGM</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>observer's mean longitude (radians, east +ve)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PHIM</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>observer's mean geodetic latitude (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>HM</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>observer's height above sea level (metres)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>XP,YP</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>polar motion <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$"> coordinates (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>TDK</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>local ambient temperature (degrees K; std=273.155D0)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PMB</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>local atmospheric pressure (mB; std=1013.25D0)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RH</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>local relative humidity (in the range 0D0-1D0)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>WL</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>effective wavelength (<IMG WIDTH="26" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img21.gif"
+ ALT="$\mu{\rm m}$">, <I>e.g.</I> 0.55D0)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>TLR</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>tropospheric lapse rate (degrees K per metre,
+<I>e.g.</I> 0.0065D0)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>AOB</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>observed azimuth (radians: N=0, E=<IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img22.gif"
+ ALT="$90^{\circ}$">)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ZOB</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>observed zenith distance (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>HOB</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>observed Hour Angle (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DOB</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>observed <IMG WIDTH="10" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img23.gif"
+ ALT="$\delta$"> (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ROB</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>observed <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$"> (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>This routine returns zenith distance rather than elevation
+in order to reflect the fact that no allowance is made for
+depression of the horizon.
+ <DT>2.
+<DD>The accuracy of the result is limited by the corrections for
+ refraction. Providing the meteorological parameters are
+ known accurately and there are no gross local effects, the
+ predicted azimuth and elevation should be within about
+<P> <IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img25.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.1$"> for <IMG WIDTH="56" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img26.gif"
+ ALT="$\zeta<70^{\circ}$">. Even
+ at a topocentric zenith distance of
+ <IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img22.gif"
+ ALT="$90^{\circ}$">, the accuracy in elevation should be better than
+ 1&nbsp;arcminute; useful results are available for a further
+ <IMG WIDTH="18" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img27.gif"
+ ALT="$3^{\circ}$">, beyond which the sla_REFRO routine returns a
+ fixed value of the refraction. The complementary
+ routines sla_AOP (or sla_AOPQK) and sla_OAP (or sla_OAPQK)
+ are self-consistent to better than 1&nbsp;microarcsecond all over
+ the celestial sphere.
+ <DT>3.
+<DD>It is advisable to take great care with units, as even
+ unlikely values of the input parameters are accepted and
+ processed in accordance with the models used.
+ <DT>4.
+<DD><I>Apparent</I> <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> means the geocentric apparent right ascension
+ and declination, which is obtained from a catalogue mean place
+ by allowing for space motion, parallax, precession, nutation,
+ annual aberration, and the Sun's gravitational lens effect. For
+ star positions in the FK5 system (<I>i.e.</I> J2000), these effects can
+ be applied by means of the sla_MAP <I>etc.</I> routines. Starting from
+ other mean place systems, additional transformations will be
+ needed; for example, FK4 (<I>i.e.</I> B1950) mean places would first
+ have to be converted to FK5, which can be done with the
+ sla_FK425 <I>etc.</I> routines.
+ <DT>5.
+<DD><I>Observed</I> <IMG WIDTH="66" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img28.gif"
+ ALT="$[\,Az,El~]$"> means the position that would be seen by a
+ perfect theodolite located at the observer. This is obtained
+ from the geocentric apparent <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> by allowing for Earth
+ orientation and diurnal aberration, rotating from equator
+ to horizon coordinates, and then adjusting for refraction.
+ The <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$"> is obtained by rotating back into equatorial
+ coordinates, using the geodetic latitude corrected for polar
+ motion, and is the position that would be seen by a perfect
+ equatorial located at the observer and with its polar axis
+ aligned to the Earth's axis of rotation (<I>n.b.</I> not to the
+ refracted pole). Finally, the <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$"> is obtained by subtracting
+ the <I>h</I> from the local apparent ST.
+ <DT>6.
+<DD>To predict the required setting of a real telescope, the
+ observed place produced by this routine would have to be
+ adjusted for the tilt of the azimuth or polar axis of the
+ mounting (with appropriate corrections for mount flexures),
+ for non-perpendicularity between the mounting axes, for the
+ position of the rotator axis and the pointing axis relative
+ to it, for tube flexure, for gear and encoder errors, and
+ finally for encoder zero points. Some telescopes would, of
+ course, exhibit other properties which would need to be
+ accounted for at the appropriate point in the sequence.
+ <DT>7.
+<DD>This routine takes time to execute, due mainly to the
+ rigorous integration used to evaluate the refraction.
+ For processing multiple stars for one location and time,
+ call sla_AOPPA once followed by one call per star to sla_AOPQK.
+ Where a range of times within a limited period of a few hours
+ is involved, and the highest precision is not required, call
+ sla_AOPPA once, followed by a call to sla_AOPPAT each time the
+ time changes, followed by one call per star to sla_AOPQK.
+ <DT>8.
+<DD>The DATE argument is UTC expressed as an MJD. This is,
+ strictly speaking, wrong, because of leap seconds. However,
+ as long as the <IMG WIDTH="16" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img19.gif"
+ ALT="$\Delta$">UT and the UTC are consistent there
+ are no difficulties, except during a leap second. In this
+ case, the start of the 61st second of the final minute should
+ begin a new MJD day and the old pre-leap <IMG WIDTH="16" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img19.gif"
+ ALT="$\Delta$">UT should
+ continue to be used. As the 61st second completes, the MJD
+ should revert to the start of the day as, simultaneously,
+ the <IMG WIDTH="16" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img19.gif"
+ ALT="$\Delta$">UT changes by one second to its post-leap new value.
+ <DT>9.
+<DD>The <IMG WIDTH="16" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img19.gif"
+ ALT="$\Delta$">UT (UT1-UTC) is tabulated in IERS circulars and
+ elsewhere. It increases by exactly one second at the end of
+ each UTC leap second, introduced in order to keep <IMG WIDTH="16" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img19.gif"
+ ALT="$\Delta$">UT
+ within <IMG WIDTH="15" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img30.gif"
+ ALT="$\pm$"><IMG WIDTH="24" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img31.gif"
+ ALT="$0^{\rm s}\hspace{-0.3em}.9$">. <DT>10.
+<DD>IMPORTANT - TAKE CARE WITH THE LONGITUDE SIGN CONVENTION. The
+ longitude required by the present routine is <B>east-positive</B>,
+ in accordance with geographical convention (and right-handed).
+ In particular, note that the longitudes returned by the
+ sla_OBS routine are west-positive (as in the <I>Astronomical
+ Almanac</I> before 1984) and must be reversed in sign before use
+ in the present routine.
+ <DT>11.
+<DD>The polar coordinates XP,YP can be obtained from IERS
+ circulars and equivalent publications. The
+ maximum amplitude is about
+ <IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img32.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.3$"> . If XP,YP values
+ are unavailable, use XP=YP=0D0. See page B60 of the 1988
+ <I>Astronomical Almanac</I> for a definition of the two angles.
+ <DT>12.
+<DD>The height above sea level of the observing station, HM,
+ can be obtained from the <I>Astronomical Almanac</I> (Section J
+ in the 1988 edition), or via the routine sla_OBS. If P,
+ the pressure in mB, is available, an adequate
+ estimate of HM can be obtained from the following expression:
+ <BLOCKQUOTE><TT>HM=-29.3D0*TSL*LOG(P/1013.25D0)</TT>
+ </BLOCKQUOTE>
+ where TSL is the approximate sea-level air temperature in degrees K
+ (see <I>Astrophysical Quantities</I>, C.W.Allen, 3rd&nbsp;edition,
+ &#167;52). Similarly, if the pressure P is not known,
+ it can be estimated from the height of the observing
+ station, HM as follows:
+ <BLOCKQUOTE><TT>P=1013.25D0*EXP(-HM/(29.3D0*TSL))</TT>
+ </BLOCKQUOTE>
+ Note, however, that the refraction is proportional to the
+ pressure and that an accurate P value is important for
+ precise work.
+ <DT>13.
+<DD>The azimuths <I>etc.</I> used by the present routine are with
+ respect to the celestial pole. Corrections to the terrestrial pole
+ can be computed using sla_POLMO.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html626" HREF="node21.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html624" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html618" HREF="node19.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html627" HREF="node21.html">SLA_AOPPA - Appt-to-Obs Parameters</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html625" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html619" HREF="node19.html">SLA_AMPQK - Quick Apparent to Mean</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node200.html b/src/slalib/sun67.htx/node200.html
new file mode 100644
index 0000000..cbbad9d
--- /dev/null
+++ b/src/slalib/sun67.htx/node200.html
@@ -0,0 +1,168 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Vectors and Matrices</TITLE>
+<META NAME="description" CONTENT="Vectors and Matrices">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node202.html">
+<LINK REL="previous" HREF="node198.html">
+<LINK REL="up" HREF="node197.html">
+<LINK REL="next" HREF="node201.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2453" HREF="node201.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2451" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2445" HREF="node199.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2454" HREF="node201.html">Using vectors</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2452" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2446" HREF="node199.html">Formatting angles</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION00052000000000000000">
+Vectors and Matrices</A>
+</H2>
+As an alternative to employing a spherical polar coordinate system,
+the direction of an object can be defined in terms of the sum of any
+three vectors as long as they are different and
+not coplanar. In practice, three vectors at right angles are
+usually chosen, forming a system
+of <I>Cartesian coordinates</I>. The <I>x</I>- and <I>y</I>-axes
+lie in the fundamental plane (<I>e.g.</I> the equator in the
+case of <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$">), with the <I>x</I>-axis pointing to zero longitude.
+The <I>z</I>-axis is normal to the fundamental plane and points
+towards positive latitudes. The <I>y</I>-axis can lie in either
+of the two possible directions, depending on whether the
+coordinate system is right-handed or left-handed.
+The three axes are sometimes called
+a <I>triad</I>. For most applications involving arbitrarily
+distant objects such as stars, the vector which defines
+the direction concerned is constrained to have unit length.
+The <I>x</I>-, <I>y-</I> and <I>z-</I>components
+can be regarded as the scalar (dot) product of this vector
+onto the three axes of the triad in turn. Because the vector
+is a unit vector,
+each of the three dot-products is simply the cosine of the angle
+between the unit vector and the axis concerned, and the
+<I>x</I>-, <I>y-</I> and <I>z-</I>components are sometimes
+called <I>direction cosines</I>.
+<P>
+For some applications involving objects
+with the Solar System, unit vectors are inappropriate, and
+it is necessary to use vectors scaled in length-units such as
+AU, km <I>etc.</I>
+In these cases the origin of the coordinate system may not be
+the observer, but instead might be the Sun, the Solar-System
+barycentre, the centre of the Earth <I>etc.</I> But whatever the application,
+the final direction in which the observer sees the object can be
+expressed as direction cosines.
+<P>
+But where has this got us? Instead of two numbers - a longitude and
+a latitude - we now have three numbers to look after
+- the <I>x</I>-, <I>y-</I> and
+<I>z-</I>components - whose quadratic sum we have somehow to contrive to
+be unity. And, in addition to this apparent redundancy,
+most people find it harder to visualize
+problems in terms of <IMG WIDTH="58" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img50.gif"
+ ALT="$[\,x,y,z\,]$"> than in <IMG WIDTH="45" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img238.gif"
+ ALT="$[\,\theta,\phi~]$">.Despite these objections, the vector approach turns out to have
+significant advantages over the spherical trigonometry approach:
+<UL>
+<LI> Vector formulae tend to be much more succinct; one vector
+ operation is the equivalent of strings of sines and cosines.
+<LI> The formulae are as a rule rigorous, even at the poles.
+<LI> Accuracy is maintained all over the celestial sphere.
+ When one Cartesian component is nearly unity and
+ therefore insensitive to direction, the others become small
+ and therefore more precise.
+<LI> Formulations usually deliver the quadrant of the result
+ without the need for any inspection (except within the
+ library function ATAN2).
+</UL>
+A number of important transformations in positional
+astronomy turn out to be nothing more than changes of coordinate
+system, something which is especially convenient if
+the vector approach is used. A direction with respect
+to one triad can be expressed relative to another triad simply
+by multiplying the <IMG WIDTH="58" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img50.gif"
+ ALT="$[\,x,y,z\,]$"> column vector by the appropriate
+<IMG WIDTH="39" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img18.gif"
+ ALT="$3\times3$"> orthogonal matrix
+(a tensor of Rank&nbsp;2, or <I>dyadic</I>). The three rows of this
+<I>rotation matrix</I>
+are the vectors in the old coordinate system of the three
+new axes, and the transformation amounts to obtaining the
+dot-product of the direction-vector with each of the three
+new axes. Precession, nutation, <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$"> to <IMG WIDTH="66" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img28.gif"
+ ALT="$[\,Az,El~]$">,<IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> to <IMG WIDTH="59" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
+ SRC="img98.gif"
+ ALT="$[\,l^{I\!I},b^{I\!I}\,]$"> and so on are typical examples of the
+technique. A useful property of the rotation matrices
+is that they can be inverted simply by taking the transpose.
+<P>
+The elements of these vectors and matrices are assorted combinations of
+the sines and cosines of the various angles involved (hour angle,
+declination and so on, depending on which transformation is
+being applied). If you write out the matrix multiplications
+in full you get expressions which are essentially the same as the
+equivalent spherical trigonometry formulae. Indeed, many of the
+standard formulae of spherical trigonometry are most easily
+derived by expressing the problem initially in
+terms of vectors.
+<P>
+<BR><HR>
+<!--Table of Child-Links-->
+<A NAME="CHILD_LINKS">&#160;</A>
+<UL>
+<LI><A NAME="tex2html2455" HREF="node201.html#SECTION00052100000000000000">
+Using vectors</A>
+</UL>
+<!--End of Table of Child-Links-->
+<BR> <HR>
+<A NAME="tex2html2453" HREF="node201.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2451" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2445" HREF="node199.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2454" HREF="node201.html">Using vectors</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2452" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2446" HREF="node199.html">Formatting angles</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node201.html b/src/slalib/sun67.htx/node201.html
new file mode 100644
index 0000000..4613125
--- /dev/null
+++ b/src/slalib/sun67.htx/node201.html
@@ -0,0 +1,215 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Using vectors</TITLE>
+<META NAME="description" CONTENT="Using vectors">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="previous" HREF="node200.html">
+<LINK REL="up" HREF="node200.html">
+<LINK REL="next" HREF="node202.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2462" HREF="node202.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2460" HREF="node200.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2456" HREF="node200.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2463" HREF="node202.html">Celestial Coordinate Systems</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2461" HREF="node200.html">Vectors and Matrices</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2457" HREF="node200.html">Vectors and Matrices</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H3><A NAME="SECTION00052100000000000000">
+Using vectors</A>
+</H3>
+SLALIB provides conversions between spherical and vector
+form
+(sla_CS2C,
+sla_CC2S
+<I>etc.</I>), plus an assortment
+of standard vector and matrix operations
+(sla_VDV,
+sla_MXV
+<I>etc.</I>).
+There are also routines
+(sla_EULER
+<I>etc.</I>) for creating a rotation matrix
+from three <I>Euler angles</I> (successive rotations about
+specified Cartesian axes). Instead of Euler angles, a rotation
+matrix can be expressed as an <I>axial vector</I> (the pole of the rotation,
+and the amount of rotation), and routines are provided for this
+(sla_AV2M,
+sla_M2AV
+<I>etc.</I>).
+<P>
+Here is an example where spherical coordinates <TT>P1</TT> and <TT>Q1</TT>
+undergo a coordinate transformation and become <TT>P2</TT> and <TT>Q2</TT>;
+the transformation consists of a rotation of the coordinate system
+through angles <TT>A</TT>, <TT>B</TT> and <TT>C</TT> about the
+<I>z</I>, new <I>y</I> and new <I>z</I> axes respectively:
+<P><PRE>
+ REAL A,B,C,R(3,3),P1,Q1,V1(3),V2(3),P2,Q2
+ :
+ * Create rotation matrix
+ CALL sla_EULER('ZYZ',A,B,C,R)
+
+ * Transform position (P,Q) from spherical to Cartesian
+ CALL sla_CS2C(P1,Q1,V1)
+
+ * Multiply by rotation matrix
+ CALL sla_MXV(R,V1,V2)
+
+ * Back to spherical
+ CALL sla_CC2S(V2,P2,Q2)
+</PRE>
+<P>
+Small adjustments to the direction of a position
+vector are often most conveniently described in terms of
+<IMG WIDTH="99" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img239.gif"
+ ALT="$[\,\Delta x,\Delta y, \Delta z\,]$">. Adding the correction
+vector needs careful handling if the position
+vector is to remain of length unity, an advisable precaution which
+ensures that
+the <IMG WIDTH="58" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img50.gif"
+ ALT="$[\,x,y,z\,]$"> components are always available to mean the cosines of
+the angles between the vector and the axis concerned. Two types
+of shifts are commonly used,
+the first where a small vector of arbitrary direction is
+added to the unit vector, and the second where there is a displacement
+in the latitude coordinate (declination, elevation <I>etc.</I>) alone.
+<P>
+For a shift produced by adding a small <IMG WIDTH="58" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img50.gif"
+ ALT="$[\,x,y,z\,]$"> vector <IMG WIDTH="17" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img240.gif"
+ ALT="${\bf D}$"> to a
+unit vector <IMG WIDTH="26" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img241.gif"
+ ALT="${\bf V1}$">, the resulting vector <IMG WIDTH="26" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img242.gif"
+ ALT="${\bf V2}$"> has direction
+<IMG WIDTH="95" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img243.gif"
+ ALT="$<{\bf V1}+{\bf D}\gt$"> but is no longer of unit length. A better approximation
+is available if the result is multiplied by a scaling factor of
+<IMG WIDTH="93" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img244.gif"
+ ALT="$(1-{\bf D}\cdot{\bf V1})$">, where the dot
+means scalar product. In Fortran:
+<P><PRE>
+ F = (1D0-(DX*V1X+DY*V1Y+DZ*V1Z))
+ V2X = F*(V1X+DX)
+ V2Y = F*(V1Y+DY)
+ V2Z = F*(V1Z+DZ)
+</PRE>
+<P>
+The correction for diurnal aberration (discussed later) is
+an example of this form of shift.
+<P>
+As an example of the second kind of displacement
+we will apply a small change in elevation <IMG WIDTH="23" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img245.gif"
+ ALT="$\delta E$"> to an
+<IMG WIDTH="66" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img28.gif"
+ ALT="$[\,Az,El~]$"> direction vector. The direction of the
+result can be obtained by making the allowable approximation
+<IMG WIDTH="92" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img246.gif"
+ ALT="${\tan \delta E\approx\delta E}$"> and adding a adjustment
+vector of length <IMG WIDTH="23" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img245.gif"
+ ALT="$\delta E$"> normal
+to the direction vector in the vertical plane containing the direction
+vector. The <I>z</I>-component of the adjustment vector is
+<IMG WIDTH="64" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img247.gif"
+ ALT="$\delta E \cos E$">,and the horizontal component is
+<IMG WIDTH="62" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img248.gif"
+ ALT="$\delta E \sin E$"> which has then to be
+resolved into <I>x</I> and <I>y</I> in proportion to their current sizes. To
+approximate a unit vector more closely, a correction factor of
+<IMG WIDTH="48" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img249.gif"
+ ALT="$\cos \delta E$"> can then be applied, which is nearly
+<IMG WIDTH="88" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
+ SRC="img250.gif"
+ ALT="$(1-\delta E^2 /2)$"> for
+small <IMG WIDTH="23" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img245.gif"
+ ALT="$\delta E$">. Expressed in Fortran, for initial vector
+<TT>V1X,V1Y,V1Z</TT>, change in elevation <TT>DEL</TT>
+(+ve <IMG WIDTH="15" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img251.gif"
+ ALT="$\equiv$"> upwards), and result
+vector <TT>V2X,V2Y,V2Z</TT>:
+<P><PRE>
+ COSDEL = 1D0-DEL*DEL/2D0
+ R1 = SQRT(V1X*V1X+V1Y*V1Y)
+ F = COSDEL*(R1-DEL*V1Z)/R1
+ V2X = F*V1X
+ V2Y = F*V1Y
+ V2Z = COSDEL*(V1Z+DEL*R1)
+</PRE>
+<P>
+An example of this type of shift is the correction for atmospheric
+refraction (see later).
+Depending on the relationship between <IMG WIDTH="23" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img245.gif"
+ ALT="$\delta E$"> and <I>E</I>, special
+handling at the pole (the zenith for our example) may be required.
+<P>
+SLALIB includes routines for the case where both a position
+and a velocity are involved. The routines
+sla_CS2C6
+and
+sla_CC62S
+convert from <IMG WIDTH="69" HEIGHT="35" ALIGN="MIDDLE" BORDER="0"
+ SRC="img252.gif"
+ ALT="$[\theta,\phi,\dot{\theta},\dot{\phi}]$">to <IMG WIDTH="106" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img51.gif"
+ ALT="$[\,x,y,z,\dot{x},\dot{y},\dot{z}\,]$"> and back;
+sla_DCS26
+and
+sla_DC62S
+are double precision equivalents.
+<P>
+<BR> <HR>
+<A NAME="tex2html2462" HREF="node202.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2460" HREF="node200.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2456" HREF="node200.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2463" HREF="node202.html">Celestial Coordinate Systems</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2461" HREF="node200.html">Vectors and Matrices</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2457" HREF="node200.html">Vectors and Matrices</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node202.html b/src/slalib/sun67.htx/node202.html
new file mode 100644
index 0000000..a161c65
--- /dev/null
+++ b/src/slalib/sun67.htx/node202.html
@@ -0,0 +1,254 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Celestial Coordinate Systems</TITLE>
+<META NAME="description" CONTENT="Celestial Coordinate Systems">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node203.html">
+<LINK REL="previous" HREF="node200.html">
+<LINK REL="up" HREF="node197.html">
+<LINK REL="next" HREF="node203.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2472" HREF="node203.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2470" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2464" HREF="node201.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2473" HREF="node203.html">Precession and Nutation</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2471" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2465" HREF="node201.html">Using vectors</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION00053000000000000000">
+Celestial Coordinate Systems</A>
+</H2>
+SLALIB has routines to perform transformations
+of celestial positions between different spherical
+coordinate systems, including those shown in the following table:
+<P>
+<DIV ALIGN="CENTER">
+<TABLE CELLPADDING=3 BORDER="1">
+<TR VALIGN="TOP"><TH ALIGN="LEFT" NOWRAP><I>system</I></TH>
+<TH ALIGN="CENTER" NOWRAP><I>symbols</I></TH>
+<TH ALIGN="CENTER" NOWRAP><I>longitude</I></TH>
+<TH ALIGN="CENTER" NOWRAP><I>latitude</I></TH>
+<TH ALIGN="CENTER" NOWRAP><I>x-y plane</I></TH>
+<TH ALIGN="CENTER" NOWRAP><I>long. zero</I></TH>
+<TH ALIGN="CENTER" NOWRAP><I>RH/LH</I></TH>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT" NOWRAP>horizon</TD>
+<TD ALIGN="CENTER" NOWRAP>-</TD>
+<TD ALIGN="CENTER" NOWRAP>azimuth</TD>
+<TD ALIGN="CENTER" NOWRAP>elevation</TD>
+<TD ALIGN="CENTER" NOWRAP>horizontal</TD>
+<TD ALIGN="CENTER" NOWRAP>north</TD>
+<TD ALIGN="CENTER" NOWRAP>L</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT" NOWRAP>equatorial</TD>
+<TD ALIGN="CENTER" NOWRAP><IMG WIDTH="28" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img91.gif"
+ ALT="$\alpha,\delta$"></TD>
+<TD ALIGN="CENTER" NOWRAP>R.A.</TD>
+<TD ALIGN="CENTER" NOWRAP>Dec.</TD>
+<TD ALIGN="CENTER" NOWRAP>equator</TD>
+<TD ALIGN="CENTER" NOWRAP>equinox</TD>
+<TD ALIGN="CENTER" NOWRAP>R</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT" NOWRAP>local equ.</TD>
+<TD ALIGN="CENTER" NOWRAP><IMG WIDTH="27" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img65.gif"
+ ALT="$h,\delta$"></TD>
+<TD ALIGN="CENTER" NOWRAP>H.A.</TD>
+<TD ALIGN="CENTER" NOWRAP>Dec.</TD>
+<TD ALIGN="CENTER" NOWRAP>equator</TD>
+<TD ALIGN="CENTER" NOWRAP>meridian</TD>
+<TD ALIGN="CENTER" NOWRAP>L</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT" NOWRAP>ecliptic</TD>
+<TD ALIGN="CENTER" NOWRAP><IMG WIDTH="29" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img253.gif"
+ ALT="$\lambda,\beta$"></TD>
+<TD ALIGN="CENTER" NOWRAP>ecl. long.</TD>
+<TD ALIGN="CENTER" NOWRAP>ecl. lat.</TD>
+<TD ALIGN="CENTER" NOWRAP>ecliptic</TD>
+<TD ALIGN="CENTER" NOWRAP>equinox</TD>
+<TD ALIGN="CENTER" NOWRAP>R</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT" NOWRAP>galactic</TD>
+<TD ALIGN="CENTER" NOWRAP><IMG WIDTH="45" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
+ SRC="img254.gif"
+ ALT="$l^{I\!I},b^{I\!I}$"></TD>
+<TD ALIGN="CENTER" NOWRAP>gal. long.</TD>
+<TD ALIGN="CENTER" NOWRAP>gal. lat.</TD>
+<TD ALIGN="CENTER" NOWRAP>gal. equator</TD>
+<TD ALIGN="CENTER" NOWRAP>gal. centre</TD>
+<TD ALIGN="CENTER" NOWRAP>R</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT" NOWRAP>supergalactic</TD>
+<TD ALIGN="CENTER" NOWRAP>SGL,SGB</TD>
+<TD ALIGN="CENTER" NOWRAP>SG long.</TD>
+<TD ALIGN="CENTER" NOWRAP>SG lat.</TD>
+<TD ALIGN="CENTER" NOWRAP>SG equator</TD>
+<TD ALIGN="CENTER" NOWRAP>node w. gal. equ.</TD>
+<TD ALIGN="CENTER" NOWRAP>R</TD>
+</TR>
+</TABLE></DIV>
+Transformations between <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$"> and <IMG WIDTH="66" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img28.gif"
+ ALT="$[\,Az,El~]$"> can be performed by
+calling
+sla_E2H
+and
+sla_H2E,
+or, in double precision,
+sla_DE2H
+and
+sla_DH2E.
+There is also a routine for obtaining
+zenith distance alone for a given <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$">,sla_ZD,
+and one for determining the parallactic angle,
+sla_PA.
+Three routines are included which relate to altazimuth telescope
+mountings. For a given <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$"> and latitude,
+sla_ALTAZ
+returns the azimuth, elevation and parallactic angle, plus
+velocities and accelerations for sidereal tracking.
+The routines
+sla_PDA2H
+and
+sla_PDQ2H
+predict at what hour angle a given azimuth or
+parallactic angle will be reached.
+<P>
+The routines
+sla_EQECL
+and
+sla_ECLEQ
+transform between ecliptic
+coordinates and <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$">; there is also a routine for generating the
+equatorial to ecliptic rotation matrix for a given date:
+sla_ECMAT.
+<P>
+For conversion between Galactic coordinates and <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> there are
+two sets of routines, depending on whether the <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> is
+old-style, B1950, or new-style, J2000;
+sla_EG50
+and
+sla_GE50
+are <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> to <IMG WIDTH="59" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
+ SRC="img98.gif"
+ ALT="$[\,l^{I\!I},b^{I\!I}\,]$"> and <I>vice versa</I> for the B1950 case, while
+sla_EQGAL
+and
+sla_GALEQ
+are the J2000 equivalents.
+<P>
+Finally, the routines
+sla_GALSUP
+and
+sla_SUPGAL
+transform <IMG WIDTH="59" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
+ SRC="img98.gif"
+ ALT="$[\,l^{I\!I},b^{I\!I}\,]$"> to de&nbsp;Vaucouleurs supergalactic longitude and latitude
+and <I>vice versa.</I>
+<P>
+It should be appreciated that the table, above, constitutes
+a gross oversimplification. Apparently
+simple concepts such as equator, equinox <I>etc.</I> are apt to be very hard to
+pin down precisely (polar motion, orbital perturbations ...) and
+some have several interpretations, all subtly different. The various
+frames move in complicated ways with respect to one another or to
+the stars (themselves in motion). And in some instances the
+coordinate system is slightly distorted, so that the
+ordinary rules of spherical trigonometry no longer strictly apply.
+<P>
+These <I>caveats</I>
+apply particularly to the bewildering variety of different
+<IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> systems that are in use. Figure&nbsp;1 shows how
+some of these systems are related, to one another and
+to the direction in which a celestial source actually
+appears in the sky. At the top of the diagram are
+the various sorts of <I>mean place</I>
+found in star catalogues and papers;<A NAME="tex2html3" HREF="footnode.html#27724"><SUP><IMG ALIGN="BOTTOM" BORDER="1" ALT="[*]" SRC="foot_motif.gif"></SUP></A> at the bottom is the
+<I>observed</I> <IMG WIDTH="66" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img28.gif"
+ ALT="$[\,Az,El~]$">, where a perfect theodolite would
+be pointed to see the source; and in the body of
+the diagram are
+the intermediate processing steps and coordinate
+systems. To help
+understand this diagram, and the SLALIB routines that can
+be used to carry out the various calculations, we will look at the coordinate
+systems involved, and the astronomical phenomena that
+affect them.
+<P>
+<BR>
+<DIV ALIGN="CENTER"><A NAME="27722">&#160;</A>
+<TABLE>
+<CAPTION><STRONG>Figure 1:</STRONG>
+Relationship Between Celestial Coordinates</CAPTION>
+<TR><TD><IMG WIDTH="450" HEIGHT="642"
+ SRC="img255.gif"
+ ALT="\begin{figure}
+\begin{center}
+\begin{tabular}
+{\vert cccccc\vert} \hline
+& & & &...
+ ...2000, all of the precession and E-terms corrections
+are superfluous.\end{figure}"></TD></TR>
+</TABLE>
+</DIV>
+<BR>
+<BR> <HR>
+<A NAME="tex2html2472" HREF="node203.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2470" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2464" HREF="node201.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2473" HREF="node203.html">Precession and Nutation</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2471" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2465" HREF="node201.html">Using vectors</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node203.html b/src/slalib/sun67.htx/node203.html
new file mode 100644
index 0000000..fd18b48
--- /dev/null
+++ b/src/slalib/sun67.htx/node203.html
@@ -0,0 +1,187 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Precession and Nutation</TITLE>
+<META NAME="description" CONTENT="Precession and Nutation">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node205.html">
+<LINK REL="previous" HREF="node202.html">
+<LINK REL="up" HREF="node197.html">
+<LINK REL="next" HREF="node204.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2482" HREF="node204.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2480" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2474" HREF="node202.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2483" HREF="node204.html">SLALIB support for precession and nutation</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2481" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2475" HREF="node202.html">Celestial Coordinate Systems</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION00054000000000000000">
+Precession and Nutation</A>
+</H2>
+<I>Right ascension and declination</I>, (<IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$">), are the names
+of the longitude and latitude in a spherical
+polar coordinate system based on the Earth's axis of rotation.
+The zero point of <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$"> is the point of intersection of
+the <I>celestial
+equator</I> and the <I>ecliptic</I> (the apparent path of the Sun
+through the year) where the Sun moves into the northern
+hemisphere. This point is called the
+<I>first point of Aries</I>,
+the <I>vernal equinox</I> (with apologies to
+southern-hemisphere readers) or simply the <I>equinox</I>.<A NAME="tex2html4" HREF="footnode.html#27833"><SUP><IMG ALIGN="BOTTOM" BORDER="1" ALT="[*]" SRC="foot_motif.gif"></SUP></A>
+<P>
+This simple picture is unfortunately
+complicated by the difficulty of defining
+a suitable equator and equinox. One problem is that the
+Sun's apparent motion is not completely regular, due to the
+ellipticity of the Earth's orbit and its continuous disturbance
+by the Moon and planets. This is dealt with by
+separating the motion into (i)&nbsp;a smooth and steady <I>mean Sun</I>
+and (ii)&nbsp;a set of periodic corrections and perturbations; only the former
+is involved in establishing reference frames and timescales.
+A second, far larger problem, is that
+the celestial equator and the ecliptic
+are both moving with respect to the stars.
+These motions arise because of the gravitational
+interactions between the Earth and the other solar-system bodies.
+<P>
+By far the largest effect is the
+so-called ``precession of the equinoxes'', where the Earth's
+rotation axis sweeps out a cone centred on the ecliptic
+pole, completing one revolution in about 26,000 years. The
+cause of the motion is the torque exerted on the distorted and
+spinning Earth by the Sun and the Moon. Consider the effect of the
+Sun alone, at or near the northern summer solstice. The Sun
+`sees' the top (north pole) of the Earth tilted towards it
+(by about <IMG WIDTH="33" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img256.gif"
+ ALT="$23^{\circ}
+ \hspace{-0.37em}.\hspace{0.02em}5$">, the <I>obliquity of the
+ecliptic</I>),
+and sees the nearer part of the Earth's equatorial bulge
+below centre and the further part above centre.
+Although the Earth is in free fall,
+the gravitational force on the nearer part of the
+equatorial bulge is greater than that on the further part, and
+so there is a net torque acting
+as if to eliminate the tilt. Six months later the same thing
+is happening in reverse, except that the torque is still
+trying to eliminate the tilt. In between (at the equinoxes) the
+torque shrinks to zero. A torque acting on a spinning body
+is gyroscopically translated
+into a precessional motion of the spin axis at right-angles to the torque,
+and this happens to the Earth.
+The motion varies during the
+year, going through two maxima, but always acts in the
+same direction. The Moon produces the same effect,
+adding a contribution to the precession which peaks twice
+per month. The Moon's proximity to the Earth more than compensates
+for its smaller mass and gravitational attraction, so that it
+in fact contributes most of the precessional effect.
+<P>
+The complex interactions between the three bodies produce a
+precessional motion that is wobbly rather than completely smooth.
+However, the main 26,000-year component is on such a grand scale that
+it dwarfs the remaining terms, the biggest of
+which has an amplitude of only <IMG WIDTH="25" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img133.gif"
+ ALT="$17\hspace{-0.05em}^{'\hspace{-0.1em}'}$"> and a period of
+about 18.6&nbsp;years. This difference of scale makes it convenient to treat
+these two components of the motion separately. The main 26,000-year
+effect is called <I>luni-solar precession</I>; the smaller,
+faster, periodic terms are called the <I>nutation</I>.
+<P>
+Note that precession and nutation are simply
+different frequency components of the same physical effect. It is
+a common misconception that precession is caused
+by the Sun and nutation is caused by the Moon. In fact
+the Moon is responsible for two-thirds of the precession, and,
+while it is true that much of the complex detail of the nutation is
+a reflection of the intricacies of the lunar orbit, there are
+nonetheless important solar terms in the nutation.
+<P>
+In addition to and quite separate
+from the precession/nutation effect, the orbit of the Earth-Moon system
+is not fixed in orientation, a result of the attractions of the
+planets. This slow (about
+ <IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img83.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.5$"> &nbsp;per&nbsp;year)
+secular rotation of the ecliptic about a slowly-moving diameter is called,
+confusingly, <I>planetary
+precession</I> and, along with the luni-solar precession is
+included in the <I>general precession</I>. The equator and
+ecliptic as affected by general precession
+are what define the various ``mean'' <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> reference frames.
+<P>
+The models for precession and nutation come from a combination
+of observation and theory, and are subject to continuous
+refinement. Nutation models in particular have reached a high
+degree of sophistication, taking into account such things as
+the non-rigidity of the Earth and the effects of
+the planets; SLALIB's nutation
+model (IAU&nbsp;1980) involves 106 terms in each of <IMG WIDTH="14" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img105.gif"
+ ALT="$\psi$"> (longitude)
+and <IMG WIDTH="9" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img257.gif"
+ ALT="$\epsilon$"> (obliquity), some as small as
+ <IMG WIDTH="47" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img258.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.0001$"> .
+<P>
+<BR><HR>
+<!--Table of Child-Links-->
+<A NAME="CHILD_LINKS">&#160;</A>
+<UL>
+<LI><A NAME="tex2html2484" HREF="node204.html#SECTION00054100000000000000">
+SLALIB support for precession and nutation</A>
+</UL>
+<!--End of Table of Child-Links-->
+<BR> <HR>
+<A NAME="tex2html2482" HREF="node204.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2480" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2474" HREF="node202.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2483" HREF="node204.html">SLALIB support for precession and nutation</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2481" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2475" HREF="node202.html">Celestial Coordinate Systems</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node204.html b/src/slalib/sun67.htx/node204.html
new file mode 100644
index 0000000..cc880e2
--- /dev/null
+++ b/src/slalib/sun67.htx/node204.html
@@ -0,0 +1,127 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLALIB support for precession and nutation</TITLE>
+<META NAME="description" CONTENT="SLALIB support for precession and nutation">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="previous" HREF="node203.html">
+<LINK REL="up" HREF="node203.html">
+<LINK REL="next" HREF="node205.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2491" HREF="node205.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2489" HREF="node203.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2485" HREF="node203.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2492" HREF="node205.html">Mean Places</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2490" HREF="node203.html">Precession and Nutation</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2486" HREF="node203.html">Precession and Nutation</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H3><A NAME="SECTION00054100000000000000">
+SLALIB support for precession and nutation</A>
+</H3>
+SLALIB offers a choice of three precession models:
+<UL>
+<LI> The old Bessel-Newcomb, pre IAU&nbsp;1976, ``FK4'' model, used for B1950
+ star positions and other pre-1984.0 purposes
+(sla_PREBN).
+<LI> The new Fricke, IAU&nbsp;1976, ``FK5'' model, used for J2000 star
+ positions and other post-1984.0 purposes
+(sla_PREC).
+<LI> A model published by Simon <I>et al.</I> which is more accurate than
+ the IAU&nbsp;1976 model and which is suitable for long
+ periods of time
+(sla_PRECL).
+</UL>
+In each case, the named SLALIB routine generates the <IMG WIDTH="51" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img259.gif"
+ ALT="$(3\times3)$"><I>precession
+matrix</I> for a given start and finish time. For example,
+here is the Fortran code for generating the rotation
+matrix which describes the precession between the epochs
+J2000 and J1985.372 (IAU 1976 model):
+<P><PRE>
+ DOUBLE PRECISION PMAT(3,3)
+ :
+ CALL sla_PREC(2000D0,1985.372D0,PMAT)
+</PRE>
+<P>
+It is instructive to examine the resulting matrix:
+<P><PRE>
+ +0.9999936402 +0.0032709208 +0.0014214694
+ -0.0032709208 +0.9999946505 -0.0000023247
+ -0.0014214694 -0.0000023248 +0.9999989897
+</PRE>
+<P>
+Note that the diagonal elements are close to unity, and the
+other elements are small. This shows that over an interval as
+short as 15&nbsp;years the precession isn't going to move a
+position vector very far (in this case about <IMG WIDTH="25" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img260.gif"
+ ALT="$0^{\circ}
+ \hspace{-0.37em}.\hspace{0.02em}2$">).
+<P>
+For convenience, a direct <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> to <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> precession routine is
+also provided
+(sla_PRECES),
+suitable for either the old or the new system (but not a
+mixture of the two).
+<P>
+SLALIB provides only one nutation model, the new, IAU&nbsp;1980 model,
+implemented in the routine
+sla_NUTC.
+This returns the components of nutation
+in longitude and latitude (and also provides the obliquity) from
+which a nutation matrix can be generated by calling
+sla_DEULER
+(and from which the <I>equation of the equinoxes</I>, described
+later, can be found). Alternatively,
+the nutation matrix can be generated in a single call by using
+sla_NUT.
+<P>
+A rotation matrix for applying the entire precession/nutation
+transformation in one go can be generated by calling
+sla_PRENUT.
+<P>
+<BR> <HR>
+<A NAME="tex2html2491" HREF="node205.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2489" HREF="node203.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2485" HREF="node203.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2492" HREF="node205.html">Mean Places</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2490" HREF="node203.html">Precession and Nutation</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2486" HREF="node203.html">Precession and Nutation</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node205.html b/src/slalib/sun67.htx/node205.html
new file mode 100644
index 0000000..6da5021
--- /dev/null
+++ b/src/slalib/sun67.htx/node205.html
@@ -0,0 +1,92 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Mean Places</TITLE>
+<META NAME="description" CONTENT="Mean Places">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node206.html">
+<LINK REL="previous" HREF="node203.html">
+<LINK REL="up" HREF="node197.html">
+<LINK REL="next" HREF="node206.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2501" HREF="node206.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2499" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2493" HREF="node204.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2502" HREF="node206.html">Epoch</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2500" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2494" HREF="node204.html">SLALIB support for precession and nutation</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION00055000000000000000">
+Mean Places</A>
+</H2>
+The main effect of the precession/nutation is a steady increase of about
+<IMG WIDTH="25" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img261.gif"
+ ALT="$50\hspace{-0.05em}^{'\hspace{-0.1em}'}$">/year in the ecliptic longitudes of the stars. It is therefore
+essential, when reporting the position of an astronomical target, to
+qualify the coordinates with a date, or <I>epoch</I>.
+Specifying the epoch ties down the equator and
+equinox which define the <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> coordinate system that is
+being used.
+<A NAME="tex2html5" HREF="footnode.html#27903"><SUP><IMG ALIGN="BOTTOM" BORDER="1" ALT="[*]" SRC="foot_motif.gif"></SUP></A> For simplicity, only
+the smooth and steady ``general
+precession'' part of the complete precession/nutation effect is
+included, thereby defining what is called the <I>mean</I>
+equator and equinox for the epoch concerned. We say a star
+has a mean place of (for example)
+<IMG WIDTH="104" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img262.gif"
+ ALT="$12^{h}\,07^{m}\,58^{s}.09$">&nbsp;<IMG WIDTH="102" HEIGHT="35" ALIGN="MIDDLE" BORDER="0"
+ SRC="img263.gif"
+ ALT="$-19^{\circ}\,44^{'}\,37^{''}.1$"> ``with respect to the mean equator
+and equinox of epoch J2000''. The short way of saying
+this is ``<IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> equinox J2000'' (<B>not</B> ``<IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> epoch J2000'',
+which means something different to do with
+proper motion).
+<P>
+<BR> <HR>
+<A NAME="tex2html2501" HREF="node206.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2499" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2493" HREF="node204.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2502" HREF="node206.html">Epoch</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2500" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2494" HREF="node204.html">SLALIB support for precession and nutation</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node206.html b/src/slalib/sun67.htx/node206.html
new file mode 100644
index 0000000..9a94a3d
--- /dev/null
+++ b/src/slalib/sun67.htx/node206.html
@@ -0,0 +1,125 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Epoch</TITLE>
+<META NAME="description" CONTENT="Epoch">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node207.html">
+<LINK REL="previous" HREF="node205.html">
+<LINK REL="up" HREF="node197.html">
+<LINK REL="next" HREF="node207.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2511" HREF="node207.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2509" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2503" HREF="node205.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2512" HREF="node207.html">Proper Motion</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2510" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2504" HREF="node205.html">Mean Places</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION00056000000000000000">
+Epoch</A>
+</H2>
+The word ``epoch'' just means a moment in time, and can be supplied
+in a variety of forms, using different calendar systems and timescales.
+<P>
+For the purpose of specifying the epochs associated with the
+mean place of a star, two conventions exist. Both sorts of epoch
+superficially resemble years AD but are not tied to the civil
+(Gregorian) calendar; to distinguish them from ordinary calendar-years
+there is often
+a ``.0'' suffix (as in ``1950.0''), although any other fractional
+part is perfectly legal (<I>e.g.</I> 1987.5).
+<P>
+The older system,
+<I>Besselian epoch</I>, is defined in such a way that its units are
+tropical years of about 365.2422&nbsp;days and its timescale is the
+obsolete <I>Ephemeris Time</I>.
+The start of the Besselian year is the moment
+when the ecliptic longitude of the mean Sun is
+<IMG WIDTH="34" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img167.gif"
+ ALT="$280^\circ$">; this happens near the start of the
+calendar year (which is why <IMG WIDTH="34" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img167.gif"
+ ALT="$280^\circ$"> was chosen).
+<P>
+The new system, <I>Julian epoch</I>, was adopted as
+part of the IAU&nbsp;1976 revisions (about which more will be said
+in due course) and came formally into use at the
+beginning of 1984. It uses the Julian year of exactly
+365.25&nbsp;days; Julian epoch 2000 is defined to be 2000&nbsp;January&nbsp;1.5 in the
+TT timescale.
+<P>
+For specifying mean places, various standard epochs are in use, the
+most common ones being Besselian epoch 1950.0 and Julian epoch 2000.0.
+To distinguish the two systems, Besselian epochs
+are now prefixed ``B'' and Julian epochs are prefixed ``J''.
+Epochs without an initial letter can be assumed to be Besselian
+if before 1984.0, otherwise Julian. These details are supported by
+the SLALIB routines
+sla_DBJIN
+(decodes numbers from a
+character string, accepting an optional leading B or J),
+sla_KBJ
+(decides whether B or J depending on prefix or range) and
+sla_EPCO
+(converts one epoch to match another).
+<P>
+SLALIB has four routines for converting
+Besselian and Julian epochs into other forms.
+The functions
+sla_EPB2D
+and
+sla_EPJ2D
+convert Besselian and Julian epochs into MJD; the functions
+sla_EPB
+and
+sla_EPJ
+do the reverse. For example, to express B1950 as a Julian epoch:
+<P><PRE>
+ DOUBLE PRECISION sla_EPJ,sla_EPB2D
+ :
+ WRITE (*,'(1X,''J'',F10.5)') sla_EPJ(sla_EPB2D(1950D0))
+</PRE>
+<P>(The answer is J1949.99979.)
+<P>
+<BR> <HR>
+<A NAME="tex2html2511" HREF="node207.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2509" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2503" HREF="node205.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2512" HREF="node207.html">Proper Motion</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2510" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2504" HREF="node205.html">Mean Places</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node207.html b/src/slalib/sun67.htx/node207.html
new file mode 100644
index 0000000..6c74c4e
--- /dev/null
+++ b/src/slalib/sun67.htx/node207.html
@@ -0,0 +1,119 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Proper Motion</TITLE>
+<META NAME="description" CONTENT="Proper Motion">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node208.html">
+<LINK REL="previous" HREF="node206.html">
+<LINK REL="up" HREF="node197.html">
+<LINK REL="next" HREF="node208.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2521" HREF="node208.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2519" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2513" HREF="node206.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2522" HREF="node208.html">Parallax and Radial Velocity</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2520" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2514" HREF="node206.html">Epoch</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION00057000000000000000">
+Proper Motion</A>
+</H2>
+Stars in catalogues usually have, in addition to the
+<IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> coordinates, a <I>proper motion</I> <IMG WIDTH="54" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img264.gif"
+ ALT="$[\mu_\alpha,\mu_\delta]$">.This is an intrinsic motion
+of the star across the background. Very few stars have a
+proper motion which exceeds <IMG WIDTH="17" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img140.gif"
+ ALT="$1\hspace{-0.05em}^{'\hspace{-0.1em}'}$">/year, and most are
+far below this level. A star observed as part of normal
+astronomy research will, as a rule, have a proper motion
+which is unknown.
+<P>
+Mean <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> and rate of change are not sufficient to pin
+down a star; the epoch at which the <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> was or will
+be correct is also needed. Note the distinction
+between the epoch which specifies the
+coordinate system and the epoch at which the star passed
+through the given <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$">. The full specification for a star
+is <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$">, proper motions, equinox and epoch (plus something to
+identify which set of models for the precession <I>etc.</I> is
+being used - see the next section).
+For convenience, coordinates given in star catalogues are almost
+always adjusted to make the equinox and epoch the same - for
+example B1950 in the case of the SAO&nbsp;catalogue.
+<P>
+SLALIB provides one routine to handle proper motion on its own,
+sla_PM.
+Proper motion is also allowed for in various other
+routines as appropriate, for example
+sla_MAP
+and
+sla_FK425.
+Note that in all SLALIB routines which involve proper motion
+the units are radians per year and the
+<IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$"> component is in the form <IMG WIDTH="13" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img115.gif"
+ ALT="$\dot{\alpha}$"> (<I>i.e.</I> big
+numbers near the poles).
+Some star catalogues have proper motion per century, and
+in some catalogues the <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$"> component is in the form
+<IMG WIDTH="48" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img116.gif"
+ ALT="$\dot{\alpha}\cos\delta$"> (<I>i.e.</I> angle on the sky).
+<P>
+<BR> <HR>
+<A NAME="tex2html2521" HREF="node208.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2519" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2513" HREF="node206.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2522" HREF="node208.html">Parallax and Radial Velocity</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2520" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2514" HREF="node206.html">Epoch</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node208.html b/src/slalib/sun67.htx/node208.html
new file mode 100644
index 0000000..cc2b337
--- /dev/null
+++ b/src/slalib/sun67.htx/node208.html
@@ -0,0 +1,92 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Parallax and Radial Velocity</TITLE>
+<META NAME="description" CONTENT="Parallax and Radial Velocity">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node209.html">
+<LINK REL="previous" HREF="node207.html">
+<LINK REL="up" HREF="node197.html">
+<LINK REL="next" HREF="node209.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2531" HREF="node209.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2529" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2523" HREF="node207.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2532" HREF="node209.html">Aberration</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2530" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2524" HREF="node207.html">Proper Motion</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION00058000000000000000">
+Parallax and Radial Velocity</A>
+</H2>
+For the utmost accuracy and the nearest stars, allowance can
+be made for <I>annual parallax</I> and for the effects of perspective
+on the proper motion.
+<P>
+Parallax is appreciable only for nearby stars; even
+the nearest, Proxima Centauri, is displaced from its average
+position by less than
+an arcsecond as the Earth revolves in its orbit.
+<P>
+For stars with a known parallax, knowledge of the radial velocity
+allows the proper motion to be expressed as an actual space
+motion in 3&nbsp;dimensions. The proper motion is,
+in fact, a snapshot of the transverse component of the
+space motion, and in the case of nearby stars will
+change with time due to perspective.
+<P>
+SLALIB does not provide facilities for handling parallax
+and radial-velocity on their own, but their contribution is
+allowed for in such routines as
+sla_PM,
+sla_MAP
+and
+sla_FK425.
+Catalogue mean
+places do not include the effects of parallax and are therefore
+<I>barycentric</I>; when pointing telescopes <I>etc.</I> it is
+usually most efficient to apply the slowly-changing
+parallax correction to the mean place of the target early on
+and to work with the <I>geocentric</I> mean place. This latter
+approach is implied in Figure&nbsp;1.
+<P>
+<BR> <HR>
+<A NAME="tex2html2531" HREF="node209.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2529" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2523" HREF="node207.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2532" HREF="node209.html">Aberration</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2530" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2524" HREF="node207.html">Proper Motion</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node209.html b/src/slalib/sun67.htx/node209.html
new file mode 100644
index 0000000..4790dda
--- /dev/null
+++ b/src/slalib/sun67.htx/node209.html
@@ -0,0 +1,147 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Aberration</TITLE>
+<META NAME="description" CONTENT="Aberration">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node210.html">
+<LINK REL="previous" HREF="node208.html">
+<LINK REL="up" HREF="node197.html">
+<LINK REL="next" HREF="node210.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2541" HREF="node210.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2539" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2533" HREF="node208.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2542" HREF="node210.html">Different Sorts of Mean Place</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2540" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2534" HREF="node208.html">Parallax and Radial Velocity</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION00059000000000000000">
+Aberration</A>
+</H2>
+The finite speed of light combined with the motion of the observer
+around the Sun during the year causes apparent displacements of
+the positions of the stars. The effect is called
+the <I>annual aberration</I> (or ``stellar''
+aberration). Its maximum size, about
+ <IMG WIDTH="31" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img265.gif"
+ ALT="$20\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.5$"> ,
+occurs for stars <IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img22.gif"
+ ALT="$90^{\circ}$"> from the point towards which
+the Earth is headed as it orbits the Sun; a star exactly in line with
+the Earth's motion is not displaced. To receive the light of
+a star, the telescope has to be offset slightly in the direction of
+the Earth's motion. A familiar analogy is the need to tilt your
+umbrella forward when on the move, to avoid getting wet. This
+Newtonian model is,
+in fact, highly misleading in the context of light as opposed
+to rain, but happens to give the same answer as a relativistic
+treatment to first order (better than 1&nbsp;milliarcsecond).
+<P>
+Before the IAU 1976 resolutions, different
+values for the approximately
+<P> <IMG WIDTH="31" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img265.gif"
+ ALT="$20\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.5$"> <I>aberration constant</I> were employed
+at different times, and this can complicate comparisons
+between different catalogues. Another complication comes from
+the so-called <I>E-terms of aberration</I>,
+that small part of the annual aberration correction that is a
+function of the eccentricity of the Earth's orbit. The E-terms,
+maximum amplitude about
+ <IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img32.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.3$"> ,
+happen to be approximately constant for a given star, and so they
+used to be incorporated in the catalogue <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$">to reduce the labour of converting to and from apparent place.
+The E-terms can be removed from a catalogue <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> by
+calling
+sla_SUBET
+or applied (for example to allow a pulsar
+timing-position to be plotted on a B1950 finding chart)
+by calling
+sla_ADDET;
+the E-terms vector itself can be obtained by calling
+sla_ETRMS.
+Star positions post IAU 1976 are free of these distortions, and to
+apply corrections for annual aberration involves the actual
+barycentric velocity of the Earth rather than the use of
+canonical circular-orbit models.
+<P>
+The annual aberration is the aberration correction for
+an imaginary observer at the Earth's centre.
+The motion of a real observer around the Earth's rotation axis in
+the course of the day makes a small extra contribution to the total
+aberration effect called the <I>diurnal aberration</I>. Its
+maximum amplitude is about
+ <IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img76.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.2$"> .
+<P>
+No SLALIB routine is provided for calculating the aberration on
+its own, though the required velocity vectors can be
+generated using
+sla_EVP
+and
+sla_GEOC.
+Annual and diurnal aberration are allowed for where required, for example in
+sla_MAP
+<I>etc</I>. and
+sla_AOP
+<I>etc</I>. Note that this sort
+of aberration is different from the <I>planetary
+aberration</I>, which is the apparent displacement of a solar-system
+body, with respect to the ephemeris position, as a consequence
+of the motion of <I>both</I> the Earth and the source. The
+planetary aberration can be computed either by correcting the
+position of the solar-system body for light-time, followed by
+the ordinary stellar aberration correction, or more
+directly by expressing the position and velocity of the source
+in the observer's frame and correcting for light-time alone.
+<P>
+<BR> <HR>
+<A NAME="tex2html2541" HREF="node210.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2539" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2533" HREF="node208.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2542" HREF="node210.html">Different Sorts of Mean Place</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2540" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2534" HREF="node208.html">Parallax and Radial Velocity</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node21.html b/src/slalib/sun67.htx/node21.html
new file mode 100644
index 0000000..13ef3e2
--- /dev/null
+++ b/src/slalib/sun67.htx/node21.html
@@ -0,0 +1,264 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_AOPPA - Appt-to-Obs Parameters</TITLE>
+<META NAME="description" CONTENT="SLA_AOPPA - Appt-to-Obs Parameters">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node22.html">
+<LINK REL="previous" HREF="node20.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node22.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html636" HREF="node22.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html634" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html628" HREF="node20.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html637" HREF="node22.html">SLA_AOPPAT - Update Appt-to-Obs Parameters</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html635" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html629" HREF="node20.html">SLA_AOP - Apparent to Observed</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION00048000000000000000">SLA_AOPPA - Appt-to-Obs Parameters</A>
+<A NAME="xref_SLA_AOPPA">&#160;</A><A NAME="SLA_AOPPA">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Pre-compute the set of apparent to observed place parameters
+required by the ``quick'' routines sla_AOPQK and sla_OAPQK.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_AOPPA (
+ DATE, DUT, ELONGM, PHIM, HM, XP, YP,
+ TDK, PMB, RH, WL, TLR, AOPRMS)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DATE</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>UTC date/time (Modified Julian Date, JD-2400000.5)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DUT</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="16" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img19.gif"
+ ALT="$\Delta$">UT: UT1-UTC (UTC seconds)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ELONGM</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>observer's mean longitude (radians, east +ve)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PHIM</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>observer's mean geodetic latitude (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>HM</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>observer's height above sea level (metres)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>XP,YP</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>polar motion <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$"> coordinates (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>TDK</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>local ambient temperature (degrees K; std=273.155D0)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PMB</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>local atmospheric pressure (mB; std=1013.25D0)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RH</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>local relative humidity (in the range 0D0-1D0)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>WL</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>effective wavelength (<IMG WIDTH="26" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img21.gif"
+ ALT="$\mu{\rm m}$">, <I>e.g.</I> 0.55D0)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>TLR</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>tropospheric lapse rate (degrees K per metre,
+<I>e.g.</I> 0.0065D0)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>AOPRMS</EM></TD>
+<TH ALIGN="LEFT"><B>D(14)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>star-independent apparent-to-observed parameters:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(1)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>geodetic latitude (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(2,3)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>sine and cosine of geodetic latitude</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(4)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>magnitude of diurnal aberration vector</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(5)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>height (HM)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(6)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>ambient temperature (TDK)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(7)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>pressure (PMB)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(8)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>relative humidity (RH)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(9)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>wavelength (WL)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(10)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>lapse rate (TLR)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(11,12)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>refraction constants A and B (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(13)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>longitude + eqn of equinoxes +
+``sidereal <IMG WIDTH="16" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img19.gif"
+ ALT="$\Delta$">UT'' (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(14)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>local apparent sidereal time (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>It is advisable to take great care with units, as even
+unlikely values of the input parameters are accepted and
+processed in accordance with the models used.
+ <DT>2.
+<DD>The DATE argument is UTC expressed as an MJD. This is,
+ strictly speaking, wrong, because of leap seconds. However,
+ as long as the <IMG WIDTH="16" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img19.gif"
+ ALT="$\Delta$">UT and the UTC are consistent there
+ are no difficulties, except during a leap second. In this
+ case, the start of the 61st second of the final minute should
+ begin a new MJD day and the old pre-leap <IMG WIDTH="16" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img19.gif"
+ ALT="$\Delta$">UT should
+ continue to be used. As the 61st second completes, the MJD
+ should revert to the start of the day as, simultaneously,
+ the <IMG WIDTH="16" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img19.gif"
+ ALT="$\Delta$">UT changes by one second to its post-leap new value.
+ <DT>3.
+<DD>The <IMG WIDTH="16" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img19.gif"
+ ALT="$\Delta$">UT (UT1-UTC) is tabulated in IERS circulars and
+ elsewhere. It increases by exactly one second at the end of
+ each UTC leap second, introduced in order to keep <IMG WIDTH="16" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img19.gif"
+ ALT="$\Delta$">UT
+ within <IMG WIDTH="15" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img30.gif"
+ ALT="$\pm$"><IMG WIDTH="24" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img31.gif"
+ ALT="$0^{\rm s}\hspace{-0.3em}.9$">. The ``sidereal <IMG WIDTH="16" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img19.gif"
+ ALT="$\Delta$">UT'' which forms
+ part of AOPRMS(13) is the same quantity, but converted from solar
+ to sidereal seconds and expressed in radians.
+ <DT>4.
+<DD>IMPORTANT - TAKE CARE WITH THE LONGITUDE SIGN CONVENTION. The
+ longitude required by the present routine is <B>east-positive</B>,
+ in accordance with geographical convention (and right-handed).
+ In particular, note that the longitudes returned by the
+ sla_OBS routine are west-positive (as in the <I>Astronomical
+ Almanac</I> before 1984) and must be reversed in sign before use in
+ the present routine.
+ <DT>5.
+<DD>The polar coordinates XP,YP can be obtained from IERS
+ circulars and equivalent publications. The
+ maximum amplitude is about
+ <IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img32.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.3$"> . If XP,YP values
+ are unavailable, use XP=YP=0D0. See page B60 of the 1988
+ <I>Astronomical Almanac</I> for a definition of the two angles.
+ <DT>6.
+<DD>The height above sea level of the observing station, HM,
+ can be obtained from the <I>Astronomical Almanac</I> (Section J
+ in the 1988 edition), or via the routine sla_OBS. If P,
+ the pressure in mB, is available, an adequate
+ estimate of HM can be obtained from the following expression:
+ <BLOCKQUOTE><TT>HM=-29.3D0*TSL*LOG(P/1013.25D0)</TT>
+ </BLOCKQUOTE>
+ where TSL is the approximate sea-level air temperature in degrees K
+ (see <I>Astrophysical Quantities</I>, C.W.Allen, 3rd&nbsp;edition,
+ &#167;52). Similarly, if the pressure P is not known,
+ it can be estimated from the height of the observing
+ station, HM as follows:
+ <BLOCKQUOTE><TT>P=1013.25D0*EXP(-HM/(29.3D0*TSL))</TT>
+ </BLOCKQUOTE>
+ Note, however, that the refraction is proportional to the
+ pressure and that an accurate P value is important for
+ precise work.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html636" HREF="node22.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html634" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html628" HREF="node20.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html637" HREF="node22.html">SLA_AOPPAT - Update Appt-to-Obs Parameters</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html635" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html629" HREF="node20.html">SLA_AOP - Apparent to Observed</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node210.html b/src/slalib/sun67.htx/node210.html
new file mode 100644
index 0000000..1a8e19e
--- /dev/null
+++ b/src/slalib/sun67.htx/node210.html
@@ -0,0 +1,177 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Different Sorts of Mean Place</TITLE>
+<META NAME="description" CONTENT="Different Sorts of Mean Place">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node211.html">
+<LINK REL="previous" HREF="node209.html">
+<LINK REL="up" HREF="node197.html">
+<LINK REL="next" HREF="node211.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2551" HREF="node211.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2549" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2543" HREF="node209.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2552" HREF="node211.html">Mean Place Transformations</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2550" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2544" HREF="node209.html">Aberration</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000510000000000000000">
+Different Sorts of Mean Place</A>
+</H2>
+A particularly confusing aspect of published mean places is that they
+are sensitive to the precise way they were determined. A mean
+place is not directly observable, even with fundamental
+instruments such as transit circles, and to produce a mean
+place will involve relying on some existing star catalogue,
+for example the fundamental catalogues FK4 and FK5,
+and applying given mathematical models of precession, nutation,
+aberration and so on.
+Note in particular that no star catalogue,
+even a fundamental catalogue such as FK4 or
+FK5, defines a coordinate system, strictly speaking;
+it is merely a list of star positions and proper motions.
+However, once the stars from a given catalogue
+are used as position calibrators, <I>e.g.</I> for
+transit-circle observations or for plate reductions, then a
+broader sense of there being a coordinate grid naturally
+arises, and such phrases as ``in the system of
+the FK4'' can legitimately be employed. However,
+there is no formal link between the
+two concepts - no ``standard least squares fit'' between
+reality and the inevitably flawed catalogues.<A NAME="tex2html6" HREF="footnode.html#28038"><SUP><IMG ALIGN="BOTTOM" BORDER="1" ALT="[*]" SRC="foot_motif.gif"></SUP></A> All such
+catalogues suffer at some level from systematic, zonal distortions
+of both the star positions and of the proper motions,
+and include measurement errors peculiar to individual
+stars.
+<P>
+Many of these complications are of little significance except to
+specialists. However, observational astronomers cannot
+escape exposure to at least the two main varieties of
+mean place, loosely called
+FK4 and FK5, and should be aware of
+certain pitfalls. For most practical purposes the more recent
+system, FK5, is free of surprises and tolerates naive
+use well. FK4, in contrast, contains two important traps:
+<UL>
+<LI> The FK4 system rotates at about
+<P> <IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img83.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.5$"> per century relative to distant galaxies.
+ This is manifested as a systematic distortion in the
+ proper motions of all FK4-derived catalogues, which will
+ in turn pollute any astrometry done using those catalogues.
+ For example, FK4-based astrometry of a QSO using plates
+ taken decades apart will reveal a non-zero <I>fictitious proper
+ motion</I>, and any FK4 star which happens to have zero proper
+ motion is, in fact, slowly moving against the distant
+ background. The FK4 frame rotates because it was
+ established before the nature of the Milky Way, and hence the
+ existence of systematic motions of nearby stars, had been
+ recognized.
+<LI> Star positions in the FK4 system are part-corrected for
+ annual aberration (see above) and embody the so-called
+ E-terms of aberration.
+</UL>
+The change from the old FK4-based system to FK5
+occurred at the beginning
+of 1984 as part of a package of resolutions made by the IAU in 1976,
+along with the adoption of J2000 as the reference epoch. Star
+positions in the newer, FK5, system are free from the E-terms, and
+the system is a much better approximation to an
+inertial frame (about five times better).
+<P>
+It may occasionally be convenient to specify the FK4 fictitious proper
+motion directly. In FK4, the centennial proper motion of (for example)
+a QSO is:
+<P><IMG WIDTH="56" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img266.gif"
+ ALT="$\mu_\alpha=-$"><IMG WIDTH="65" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img267.gif"
+ ALT="$0^{\rm s}\hspace{-0.3em}.015869$">+((<IMG WIDTH="65" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img268.gif"
+ ALT="$0^{\rm s}\hspace{-0.3em}.029032$"><IMG WIDTH="56" HEIGHT="26" ALIGN="MIDDLE" BORDER="0"
+ SRC="img269.gif"
+ ALT="$~\sin \alpha
+ +$"><IMG WIDTH="65" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img270.gif"
+ ALT="$0^{\rm s}\hspace{-0.3em}.000340$"><IMG WIDTH="98" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img271.gif"
+ ALT="$~\cos \alpha ) \sin \delta
+ -$"><IMG WIDTH="65" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img272.gif"
+ ALT="$0^{\rm s}\hspace{-0.3em}.000105$"><IMG WIDTH="58" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img273.gif"
+ ALT="$~\cos \alpha
+ -$"><IMG WIDTH="65" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img274.gif"
+ ALT="$0^{\rm s}\hspace{-0.3em}.000083$"><IMG WIDTH="84" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img275.gif"
+ ALT="$~\sin \alpha ) \sec \delta $"> <BR>
+<IMG WIDTH="56" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img276.gif"
+ ALT="$\mu_\delta\,=+$"> <IMG WIDTH="56" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img277.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.43549$"> <IMG WIDTH="58" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img273.gif"
+ ALT="$~\cos \alpha
+ -$"> <IMG WIDTH="56" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img278.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.00510$"> <IMG WIDTH="70" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img279.gif"
+ ALT="$~\sin \alpha +
+ ($"> <IMG WIDTH="56" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img280.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.00158$"> <IMG WIDTH="56" HEIGHT="26" ALIGN="MIDDLE" BORDER="0"
+ SRC="img281.gif"
+ ALT="$~\sin \alpha
+ -$"> <IMG WIDTH="56" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img282.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.00125$"> <IMG WIDTH="98" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img271.gif"
+ ALT="$~\cos \alpha ) \sin \delta
+ -$"> <IMG WIDTH="56" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img283.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.00066$"> <IMG WIDTH="43" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img284.gif"
+ ALT="$~\cos \delta $">
+<BR> <HR>
+<A NAME="tex2html2551" HREF="node211.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2549" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2543" HREF="node209.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2552" HREF="node211.html">Mean Place Transformations</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2550" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2544" HREF="node209.html">Aberration</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node211.html b/src/slalib/sun67.htx/node211.html
new file mode 100644
index 0000000..2a8cbee
--- /dev/null
+++ b/src/slalib/sun67.htx/node211.html
@@ -0,0 +1,232 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Mean Place Transformations</TITLE>
+<META NAME="description" CONTENT="Mean Place Transformations">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node212.html">
+<LINK REL="previous" HREF="node210.html">
+<LINK REL="up" HREF="node197.html">
+<LINK REL="next" HREF="node212.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2561" HREF="node212.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2559" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2553" HREF="node210.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2562" HREF="node212.html">Mean Place to Apparent Place</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2560" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2554" HREF="node210.html">Different Sorts of Mean Place</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000511000000000000000">
+Mean Place Transformations</A>
+</H2>
+Figure&nbsp;1 is based upon three varieties of mean <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> all of which are
+of practical significance to observing astronomers in the present era:
+<UL>
+<LI> Old style (FK4) with known proper motion in the FK4
+ system, and with parallax and radial velocity either
+ known or assumed zero.
+<LI> Old style (FK4) with zero proper motion in FK5,
+ and with parallax and radial velocity assumed zero.
+<LI> New style (FK5) with proper motion, parallax and
+ radial velocity either known or assumed zero.
+</UL>
+The figure outlines the steps required to convert positions in
+any of these systems to a J2000 <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> for the current
+epoch, as might be required in a telescope-control
+program for example.
+Most of the steps can be carried out by calling a single
+SLALIB routines; there are other SLALIB routines which
+offer set-piece end-to-end transformation routines for common cases.
+Note, however, that SLALIB does not set out to provide the capability
+for arbitrary transformations of star-catalogue data
+between all possible systems of mean <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$">.Only in the (common) cases of FK4, equinox and epoch B1950,
+to FK5, equinox and epoch J2000, and <I>vice versa</I> are
+proper motion, parallax and radial velocity transformed
+along with the star position itself, the
+focus of SLALIB support.
+<P>
+As an example of using SLALIB to transform mean places, here is
+a program which implements the top-left path of Figure&nbsp;1.
+An FK4 <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> of arbitrary equinox and epoch and with
+known proper motion and
+parallax is transformed into an FK5 J2000 <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> for the current
+epoch. As a test star we will use <IMG WIDTH="30" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img285.gif"
+ ALT="$\alpha=$"><IMG WIDTH="104" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img286.gif"
+ ALT="$16^{h}\,09^{m}\,55^{s}.13$">,<IMG WIDTH="28" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img287.gif"
+ ALT="$\delta=$"><IMG WIDTH="102" HEIGHT="35" ALIGN="MIDDLE" BORDER="0"
+ SRC="img288.gif"
+ ALT="$-75^{\circ}\,59^{'}\,27^{''}.2$">, equinox 1900, epoch 1963.087,
+<IMG WIDTH="38" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img289.gif"
+ ALT="$\mu_\alpha=$"><IMG WIDTH="61" HEIGHT="26" ALIGN="MIDDLE" BORDER="0"
+ SRC="img290.gif"
+ ALT="$-0^{\rm s}\hspace{-0.3em}.0312$">/<I>y</I>, <IMG WIDTH="36" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img291.gif"
+ ALT="$\mu_\delta=$"> <IMG WIDTH="52" HEIGHT="35" ALIGN="MIDDLE" BORDER="0"
+ SRC="img292.gif"
+ ALT="$+0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.103$"> /<I>y</I>,
+parallax =
+ <IMG WIDTH="39" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img293.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.062$"> , radial velocity = -34.22&nbsp;km/s. The
+epoch of observation is 1994.35.
+<P><PRE>
+ IMPLICIT NONE
+ DOUBLE PRECISION AS2R,S2R
+ PARAMETER (AS2R=4.8481368110953599D-6,S2R=7.2722052166430399D-5)
+ INTEGER J,I
+ DOUBLE PRECISION R0,D0,EQ0,EP0,PR,PD,PX,RV,EP1,R1,D1,R2,D2,R3,D3,
+ : R4,D4,R5,D5,R6,D6,EP1D,EP1B,W(3),EB(3),PXR,V(3)
+ DOUBLE PRECISION sla_EPB,sla_EPJ2D
+
+ * RA, Dec etc of example star
+ CALL sla_DTF2R(16,09,55.13D0,R0,J)
+ CALL sla_DAF2R(75,59,27.2D0,D0,J)
+ D0=-D0
+ EQ0=1900D0
+ EP0=1963.087D0
+ PR=-0.0312D0*S2R
+ PD=+0.103D0*AS2R
+ PX=0.062D0
+ RV=-34.22D0
+ EP1=1994.35D0
+
+ * Epoch of observation as MJD and Besselian epoch
+ EP1D=sla_EPJ2D(EP1)
+ EP1B=sla_EPB(EP1D)
+
+ * Space motion to the current epoch
+ CALL sla_PM(R0,D0,PR,PD,PX,RV,EP0,EP1B,R1,D1)
+
+ * Remove E-terms of aberration for the original equinox
+ CALL sla_SUBET(R1,D1,EQ0,R2,D2)
+
+ * Precess to B1950
+ R3=R2
+ D3=D2
+ CALL sla_PRECES('FK4',EQ0,1950D0,R3,D3)
+
+ * Add E-terms for the standard equinox B1950
+ CALL sla_ADDET(R3,D3,1950D0,R4,D4)
+
+ * Transform to J2000, no proper motion
+ CALL sla_FK45Z(R4,D4,EP1B,R5,D5)
+
+ * Parallax
+ CALL sla_EVP(sla_EPJ2D(EP1),2000D0,W,EB,W,W)
+ PXR=PX*AS2R
+ CALL sla_DCS2C(R5,D5,V)
+ DO I=1,3
+ V(I)=V(I)-PXR*EB(I)
+ END DO
+ CALL sla_DCC2S(V,R6,D6)
+ :
+</PRE>
+<P>
+It is interesting to look at how the <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> changes during the
+course of the calculation:
+<PRE><TT>
+ <TT>16 09 55.130 -75 59 27.20</TT> <I>original equinox and epoch</I>
+ <TT>16 09 54.155 -75 59 23.98</TT> <I>with space motion</I>
+ <TT>16 09 54.229 -75 59 24.18</TT> <I>with old E-terms removed</I>
+ <TT>16 16 28.213 -76 06 54.57</TT> <I>precessed to 1950.0</I>
+ <TT>16 16 28.138 -76 06 54.37</TT> <I>with new E-terms</I>
+ <TT>16 23 07.901 -76 13 58.87</TT> <I>J2000, current epoch</I>
+ <TT>16 23 07.907 -76 13 58.92</TT> <I>including parallax</I>
+</TT></PRE>
+<P>
+Other remarks about the above (unusually complicated) example:
+<UL>
+<LI> If the original equinox and epoch were B1950, as is quite
+ likely, then it would be unnecessary to treat space motions
+ and E-terms explicitly. Transformation to FK5 J2000 could
+ be accomplished simply by calling
+sla_FK425, after which
+ a call to
+sla_PM and the parallax code would complete the
+ work.
+<LI> The rigorous treatment of the E-terms
+ has only a small effect on the result. Such refinements
+ are, nevertheless, worthwhile in order to facilitate comparisons and
+ to increase the chances that star positions from different
+ suppliers are compatible.
+<LI> The FK4 to FK5 transformations,
+sla_FK425
+ and
+sla_FK45Z,
+ are not as is sometimes assumed simply 50 years of precession,
+ though this indeed accounts for most of the change. The
+ transformations also include adjustments
+ to the equinox, a revised precession model, elimination of the
+ E-terms, a change to the proper-motion time unit and so on.
+ The reason there are two routines rather than just one
+ is that the FK4 frame rotates relative to the background, whereas
+ the FK5 frame is a much better approximation to an
+ inertial frame, and zero proper
+ motion in FK4 does not, therefore, mean zero proper motion in FK5.
+ SLALIB also provides two routines,
+sla_FK524
+ and
+sla_FK54Z,
+ to perform the inverse transformations.
+<LI> Some star catalogues (FK4 itself is one) were constructed using slightly
+ different procedures for the polar regions compared with
+ elsewhere. SLALIB ignores this inhomogeneity and always
+ applies the standard
+ transformations irrespective of location on the celestial sphere.
+</UL>
+<BR> <HR>
+<A NAME="tex2html2561" HREF="node212.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2559" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2553" HREF="node210.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2562" HREF="node212.html">Mean Place to Apparent Place</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2560" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2554" HREF="node210.html">Different Sorts of Mean Place</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node212.html b/src/slalib/sun67.htx/node212.html
new file mode 100644
index 0000000..35a5044
--- /dev/null
+++ b/src/slalib/sun67.htx/node212.html
@@ -0,0 +1,171 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Mean Place to Apparent Place</TITLE>
+<META NAME="description" CONTENT="Mean Place to Apparent Place">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node213.html">
+<LINK REL="previous" HREF="node211.html">
+<LINK REL="up" HREF="node197.html">
+<LINK REL="next" HREF="node213.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2571" HREF="node213.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2569" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2563" HREF="node211.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2572" HREF="node213.html">Apparent Place to Observed Place</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2570" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2564" HREF="node211.html">Mean Place Transformations</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000512000000000000000">
+Mean Place to Apparent Place</A>
+</H2>
+The <I>geocentric apparent place</I> of a source, or <I>apparent place</I>
+for short,
+is the <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> if viewed from the centre of the Earth,
+with respect to the true equator and equinox of date.
+Transformation of an FK5 mean <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$">, equinox J2000,
+current epoch, to apparent place involves the following effects:
+<P><UL>
+<LI> Light deflection - the gravitational lens effect of
+ the sun.
+<LI> Annual aberration.
+<LI> Precession/nutation.
+</UL>
+The <I>light deflection</I> is seldom significant. Its value
+at the limb of the Sun is about
+<P> <IMG WIDTH="31" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img294.gif"
+ ALT="$1\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.74$"> ; it falls off rapidly with distance from the
+Sun and has shrunk to about
+<P> <IMG WIDTH="31" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img295.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.02$"> at an elongation of <IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img296.gif"
+ ALT="$20^\circ$">.<P>
+As already described, the <I>annual aberration</I>
+is a function of the Earth's velocity
+relative to the solar system barycentre (available through the
+SLALIB routine
+sla_EVP)
+and produces shifts of up to about
+ <IMG WIDTH="31" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img265.gif"
+ ALT="$20\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.5$"> .
+<P>
+The <I>precession/nutation</I>, from J2000 to the current epoch, is
+expressed by a rotation matrix which is available through the
+SLALIB routine
+sla_PRENUT.
+<P>
+The whole mean-to-apparent transformation can be done using the SLALIB
+routine
+sla_MAP. As a demonstration, here is a program which lists the
+<I>North Polar Distance</I> (<IMG WIDTH="54" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img297.gif"
+ ALT="$90^\circ-\delta$">) of Polaris for
+the decade of closest approach to the Pole:
+<P><PRE>
+ IMPLICIT NONE
+ DOUBLE PRECISION PI,PIBY2,D2R,S2R,AS2R
+ PARAMETER (PI=3.141592653589793238462643D0)
+ PARAMETER (D2R=PI/180D0,
+ : PIBY2=PI/2D0,
+ : S2R=PI/(12D0*3600D0),
+ : AS2R=PI/(180D0*3600D0))
+ DOUBLE PRECISION RM,DM,PR,PD,DATE,RA,DA
+ INTEGER J,IDS,IDE,ID,IYMDF(4),I
+ DOUBLE PRECISION sla_EPJ2D
+
+ CALL sla_DTF2R(02,31,49.8131D0,RM,J)
+ CALL sla_DAF2R(89,15,50.661D0,DM,J)
+ PR=+21.7272D0*S2R/100D0
+ PD=-1.571D0*AS2R/100D0
+ WRITE (*,'(1X,'//
+ : '''Polaris north polar distance (deg) 2096-2105''/)')
+ WRITE (*,'(4X,''Date'',7X''NPD''/)')
+ CALL sla_CLDJ(2096,1,1,DATE,J)
+ IDS=NINT(DATE)
+ CALL sla_CLDJ(2105,12,31,DATE,J)
+ IDE=NINT(DATE)
+ DO ID=IDS,IDE,10
+ DATE=DBLE(ID)
+ CALL sla_DJCAL(0,DATE,IYMDF,J)
+ CALL sla_MAP(RM,DM,PR,PD,0D0,0D0,2000D0,DATE,RA,DA)
+ WRITE (*,'(1X,I4,2I3.2,F9.5)') (IYMDF(I),I=1,3),(PIBY2-DA)/D2R
+ END DO
+
+ END
+</PRE>
+<P>
+For cases where the transformation has to be repeated for different
+times or for more than one star, the straightforward
+sla_MAP
+approach is apt to be
+wasteful as both the Earth velocity and the
+precession/nutation matrix can be re-calculated relatively
+infrequently without ill effect. A more efficient method is to
+perform the target-independent calculations only when necessary,
+by calling
+sla_MAPPA,
+and then to use either
+sla_MAPQKZ,
+when only the <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> is known, or
+sla_MAPQK,
+when full catalogue positions, including proper motion, parallax and
+radial velocity, are available. How frequently to call
+sla_MAPPA
+depends on the accuracy objectives; once per
+night will deliver sub-arcsecond accuracy for example.
+<P>
+The routines
+sla_AMP
+and
+sla_AMPQK
+allow the reverse transformation, from apparent to mean place.
+<P>
+<BR> <HR>
+<A NAME="tex2html2571" HREF="node213.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2569" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2563" HREF="node211.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2572" HREF="node213.html">Apparent Place to Observed Place</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2570" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2564" HREF="node211.html">Mean Place Transformations</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node213.html b/src/slalib/sun67.htx/node213.html
new file mode 100644
index 0000000..4d2a0e1
--- /dev/null
+++ b/src/slalib/sun67.htx/node213.html
@@ -0,0 +1,181 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Apparent Place to Observed Place</TITLE>
+<META NAME="description" CONTENT="Apparent Place to Observed Place">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node216.html">
+<LINK REL="previous" HREF="node212.html">
+<LINK REL="up" HREF="node197.html">
+<LINK REL="next" HREF="node214.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2581" HREF="node214.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2579" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2573" HREF="node212.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2582" HREF="node214.html">Refraction</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2580" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2574" HREF="node212.html">Mean Place to Apparent Place</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000513000000000000000">
+Apparent Place to Observed Place</A>
+</H2>
+The <I>observed place</I> of a source is its position as
+seen by a perfect theodolite at the location of the
+observer. Transformation of an apparent <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> to observed
+place involves the following effects:
+<P><UL>
+<LI> <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> to <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$">.<LI> Diurnal aberration.
+<LI> <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$"> to <IMG WIDTH="66" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img28.gif"
+ ALT="$[\,Az,El~]$">.<LI> Refraction.
+</UL>
+The transformation from apparent <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> to
+apparent <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$"> is made by allowing for
+<I>Earth rotation</I> through the <I>sidereal time</I>, <IMG WIDTH="10" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img298.gif"
+ ALT="$\theta$">:
+<P ALIGN="CENTER"><IMG WIDTH="70" HEIGHT="25"
+ SRC="img299.gif"
+ ALT="\begin{displaymath}
+h = \theta - \alpha \end{displaymath}"></P>
+For this equation to work, <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$"> must be the apparent right
+ascension for the time of observation, and <IMG WIDTH="10" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img298.gif"
+ ALT="$\theta$"> must be
+the <I>local apparent sidereal time</I>. The latter is obtained
+as follows:
+<DL COMPACT>
+<DT>1.
+<DD>from civil time obtain the coordinated universal time, UTC
+(more later on this);
+<DT>2.
+<DD>add the UT1-UTC (typically a few tenths of a second) to
+ give the UT;
+<DT>3.
+<DD>from the UT compute the Greenwich mean sidereal time (using
+sla_GMST);
+<DT>4.
+<DD>add the observer's (east) longitude, giving the local mean
+ sidereal time;
+<DT>5.
+<DD>add the equation of the equinoxes (using
+sla_EQEQX).
+</DL>
+The <I>equation of the equinoxes</I>&nbsp;(<IMG WIDTH="78" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img300.gif"
+ ALT="$=\Delta\psi\cos\epsilon$"> plus
+small terms)
+is the effect of nutation on the sidereal time.
+Its value is typically a second or less. It is
+interesting to note that if the object of the exercise is to
+transform a mean place all the way into an observed place (very
+often the case),
+then the equation of the
+equinoxes and the longitude component of nutation can both be
+omitted, removing a great deal of computation. However, SLALIB
+follows the normal convention and works <I>via</I> the apparent place.
+<P>
+Note that for very precise work the observer's longitude should
+be corrected for <I>polar motion</I>. This can be done with
+sla_POLMO.
+The corrections are always less than about
+ <IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img32.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.3$"> , and
+are futile unless the position of the observer's telescope is known
+to better than a few metres.
+<P>
+Tables of observed and
+predicted UT1-UTC corrections and polar motion data
+are published every few weeks by the International Earth Rotation Service.
+<P>
+The transformation from apparent <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$"> to <I>topocentric</I>
+<IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$"> consists of allowing for
+<I>diurnal aberration</I>. This effect, maximum amplitude
+ <IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img76.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.2$"> ,
+was described earlier. There is no specific SLALIB routine
+for computing the diurnal aberration,
+though the routines
+sla_AOP <I>etc.</I> include it, and the required velocity vector can be
+determined by calling
+sla_GEOC.
+<P>
+The next stage is the major coordinate rotation from local equatorial
+coordinates <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$"> into horizon coordinates. The SLALIB routines
+sla_E2H
+<I>etc.</I> can be used for this. For high-precision
+applications the mean geodetic latitude should be corrected for polar
+motion.
+<P>
+<BR><HR>
+<!--Table of Child-Links-->
+<A NAME="CHILD_LINKS">&#160;</A>
+<UL>
+<LI><A NAME="tex2html2583" HREF="node214.html#SECTION000513100000000000000">
+Refraction</A>
+<LI><A NAME="tex2html2584" HREF="node215.html#SECTION000513200000000000000">
+Efficiency considerations</A>
+</UL>
+<!--End of Table of Child-Links-->
+<BR> <HR>
+<A NAME="tex2html2581" HREF="node214.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2579" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2573" HREF="node212.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2582" HREF="node214.html">Refraction</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2580" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2574" HREF="node212.html">Mean Place to Apparent Place</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node214.html b/src/slalib/sun67.htx/node214.html
new file mode 100644
index 0000000..41b8d99
--- /dev/null
+++ b/src/slalib/sun67.htx/node214.html
@@ -0,0 +1,189 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Refraction</TITLE>
+<META NAME="description" CONTENT="Refraction">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node215.html">
+<LINK REL="previous" HREF="node213.html">
+<LINK REL="up" HREF="node213.html">
+<LINK REL="next" HREF="node215.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2593" HREF="node215.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2591" HREF="node213.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2585" HREF="node213.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2594" HREF="node215.html">Efficiency considerations</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2592" HREF="node213.html">Apparent Place to Observed Place</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2586" HREF="node213.html">Apparent Place to Observed Place</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H3><A NAME="SECTION000513100000000000000">
+Refraction</A>
+</H3>
+The final correction is for atmospheric refraction.
+This effect, which depends on local meteorological conditions and
+the effective colour of the source/detector combination,
+increases the observed elevation of the source by a
+significant effect even at moderate zenith distances, and near the
+horizon by over <IMG WIDTH="25" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img301.gif"
+ ALT="$0^{\circ}
+ \hspace{-0.37em}.\hspace{0.02em}5$">. The amount of refraction can by
+computed by calling the SLALIB routine
+sla_REFRO;
+however,
+this requires as input the observed zenith distance, which is what
+we are trying to predict. For high precision it is
+therefore necessary to iterate, using the topocentric
+zenith distance as the initial estimate of the
+observed zenith distance.
+<P>
+The full
+sla_REFRO refraction calculation is onerous, and for
+zenith distances of less than, say, <IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img164.gif"
+ ALT="$75^\circ$"> the following
+model can be used instead:
+<P>
+<P ALIGN="CENTER"><IMG WIDTH="255" HEIGHT="27"
+ SRC="img302.gif"
+ ALT="\begin{displaymath}
+\zeta _{vac} \approx \zeta _{obs}
+ + A \tan \zeta _{obs}
+ + B \tan ^{3}\zeta _{obs} \end{displaymath}"></P>
+where <IMG WIDTH="29" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img303.gif"
+ ALT="$\zeta _{vac}$"> is the topocentric
+zenith distance (i.e. <I>in vacuo</I>),
+<IMG WIDTH="28" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img184.gif"
+ ALT="$\zeta_{obs}$"> is the observed
+zenith distance (i.e. affected by refraction), and <I>A</I> and <I>B</I> are
+constants, about <IMG WIDTH="25" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img304.gif"
+ ALT="$60\hspace{-0.05em}^{'\hspace{-0.1em}'}$">and
+ <IMG WIDTH="44" HEIGHT="35" ALIGN="MIDDLE" BORDER="0"
+ SRC="img305.gif"
+ ALT="$-0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.06$"> respectively for a sea-level site.
+The two constants can be calculated for a given set of conditions
+by calling either
+sla_REFCO or
+sla_REFCOQ.
+<P>
+sla_REFCO works by calling
+sla_REFRO for two zenith distances and fitting <I>A</I> and <I>B</I>
+to match. The calculation is onerous, but delivers accurate
+results whatever the conditions.
+sla_REFCOQ uses a direct formulation of <I>A</I> and <I>B</I> and
+is much faster; it is slightly less accurate than
+sla_REFCO but more than adequate for most practical purposes.
+<P>
+Like the full refraction model, the two-term formulation works in the wrong
+direction for our purposes, predicting
+the <I>in vacuo</I> (topocentric) zenith distance
+given the refracted (observed) zenith distance,
+rather than <I>vice versa</I>. The obvious approach of
+interchanging <IMG WIDTH="29" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img303.gif"
+ ALT="$\zeta _{vac}$"> and <IMG WIDTH="28" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img184.gif"
+ ALT="$\zeta_{obs}$"> and
+reversing the signs, though approximately
+correct, gives avoidable errors which are just significant in
+some applications; for
+example about
+ <IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img76.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.2$"> at <IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img174.gif"
+ ALT="$70^\circ$"> zenith distance. A
+much better result can easily be obtained, by using one Newton-Raphson
+iteration as follows:
+<P>
+<P ALIGN="CENTER"><IMG WIDTH="313" HEIGHT="45"
+ SRC="img306.gif"
+ ALT="\begin{displaymath}
+\zeta _{obs} \approx \zeta _{vac}
+ - \frac{A \tan \zeta _{va...
+ ...
+ {1 + ( A + 3 B \tan ^{2}\zeta _{vac} ) \sec ^{2}\zeta _{vac}}\end{displaymath}"></P>
+<P>
+The effect of refraction can be applied to an unrefracted
+zenith distance by calling
+sla_REFZ or to an unrefracted
+<IMG WIDTH="58" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img50.gif"
+ ALT="$[\,x,y,z\,]$"> by calling
+sla_REFV.
+Over most of the sky these two routines deliver almost identical
+results, but beyond <IMG WIDTH="56" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img209.gif"
+ ALT="$\zeta=83^\circ$">sla_REFV
+becomes unacceptably inaccurate while
+sla_REFZ
+remains usable. (However
+sla_REFV
+is significantly faster, which may be important in some applications.)
+SLALIB also provides a routine for computing the airmass, the function
+sla_AIRMAS.
+<P>
+The refraction ``constants'' returned by
+sla_REFCO and
+sla_REFCOQ
+are slightly affected by colour, especially at the blue end
+of the spectrum. Where values for more than one
+wavelength are needed, rather than calling
+sla_REFCO
+several times it is more efficient to call
+sla_REFCO
+just once, for a selected ``base'' wavelength, and then to call
+sla_ATMDSP
+once for each wavelength of interest.
+<P>
+All the SLALIB refraction routines work for radio wavelengths as well
+as the optical/IR band. The radio refraction is very dependent on
+humidity, and an accurate value must be supplied. There is no
+wavelength dependence, however. The choice of optical/IR or
+radio is made by specifying a wavelength greater than <IMG WIDTH="51" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img307.gif"
+ ALT="$100\mu m$">for the radio case.
+<P>
+<BR> <HR>
+<A NAME="tex2html2593" HREF="node215.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2591" HREF="node213.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2585" HREF="node213.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2594" HREF="node215.html">Efficiency considerations</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2592" HREF="node213.html">Apparent Place to Observed Place</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2586" HREF="node213.html">Apparent Place to Observed Place</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node215.html b/src/slalib/sun67.htx/node215.html
new file mode 100644
index 0000000..020487b
--- /dev/null
+++ b/src/slalib/sun67.htx/node215.html
@@ -0,0 +1,87 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Efficiency considerations</TITLE>
+<META NAME="description" CONTENT="Efficiency considerations">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="previous" HREF="node214.html">
+<LINK REL="up" HREF="node213.html">
+<LINK REL="next" HREF="node216.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2601" HREF="node216.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2599" HREF="node213.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2595" HREF="node214.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2602" HREF="node216.html">The Hipparcos Catalogue and the ICRS</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2600" HREF="node213.html">Apparent Place to Observed Place</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2596" HREF="node214.html">Refraction</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H3><A NAME="SECTION000513200000000000000">
+Efficiency considerations</A>
+</H3>
+The complete apparent place to observed place transformation
+can be carried out by calling
+sla_AOP.
+For improved efficiency
+in cases of more than one star or a sequence of times, the
+target-independent calculations can be done once by
+calling
+sla_AOPPA,
+the time can be updated by calling
+sla_AOPPAT,
+and
+sla_AOPQK
+can then be used to perform the
+apparent-to-observed transformation. The reverse transformation
+is available through
+sla_OAP
+and
+sla_OAPQK.
+(<I>n.b.</I> These routines use accurate but computationally-expensive
+refraction algorithms for zenith distances beyond about <IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img33.gif"
+ ALT="$76^\circ$">.For many purposes, in-line code tailored to the accuracy requirements
+of the application will be preferable, for example ignoring UT1-UTC,
+omitting diurnal aberration and using
+sla_REFZ
+to apply the refraction.)
+<P>
+<BR> <HR>
+<A NAME="tex2html2601" HREF="node216.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2599" HREF="node213.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2595" HREF="node214.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2602" HREF="node216.html">The Hipparcos Catalogue and the ICRS</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2600" HREF="node213.html">Apparent Place to Observed Place</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2596" HREF="node214.html">Refraction</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node216.html b/src/slalib/sun67.htx/node216.html
new file mode 100644
index 0000000..ab75104
--- /dev/null
+++ b/src/slalib/sun67.htx/node216.html
@@ -0,0 +1,110 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>The Hipparcos Catalogue and the ICRS</TITLE>
+<META NAME="description" CONTENT="The Hipparcos Catalogue and the ICRS">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node217.html">
+<LINK REL="previous" HREF="node213.html">
+<LINK REL="up" HREF="node197.html">
+<LINK REL="next" HREF="node217.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2611" HREF="node217.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2609" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2603" HREF="node215.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2612" HREF="node217.html">Timescales</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2610" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2604" HREF="node215.html">Efficiency considerations</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000514000000000000000">
+The Hipparcos Catalogue and the ICRS</A>
+</H2>
+With effect from the beginning of 1998, the IAU adopted a new
+reference system to replace FK5 J2000. The new system, called the
+International Celestial Reference System (ICRS), differs profoundly
+from all predecessors in that the link with solar-system dynamics
+was broken; the ICRS axes are defined in terms of the directions
+of a set of extragalactic sources, not in terms of the mean equator and
+equinox at a given reference epoch. Although the ICRS and FK5 coordinates
+of any given object are almost the same, the orientation of the new frame
+was essentially arbitrary, and the close match to FK5 J2000 was contrived
+purely for reasons of continuity and convenience.
+<P>
+A distinction is made between the reference <I>system</I> (the ICRS)
+and <I>frame</I> (ICRF). The ICRS is the set of prescriptions and
+conventions together with the modelling required to define, at any
+time, a triad of axes. The ICRF is a practical realization, and
+currently consists of a catalogue of equatorial coordinates for 608
+extragalactic radio sources observed by VLBI.
+<P>
+The best optical realization of the ICRF currently available is the
+Hipparcos catalogue. The extragalactic sources were not directly
+observable by the Hipparcos satellite and so the link from Hipparcos
+to ICRF was established through a variety of indirect techniques: VLBI and
+conventional interferometry of radio stars, photographic astrometry
+and so on. The Hipparcos frame is aligned to the ICRF to within about
+0.5&nbsp;mas and 0.5&nbsp;mas/year (at epoch 1991.25).
+<P>
+The Hipparcos catalogue includes all of the FK5 stars, which has enabled
+the orientation and spin of the latter to be studied. At epoch J2000,
+the misalignment of the FK5 frame with respect to Hipparcos
+(and hence ICRS) are about 32&nbsp;mas and 1&nbsp;mas/year respectively.
+Consequently, for many practical purposes, including pointing
+telescopes, the IAU 1976-1982 conventions on reference frames and
+Earth orientation remain adequate and there is no need to change to
+Hipparcos coordinates, new precession/nutation models and so on.
+However, for the most exacting astrometric applications, SLALIB
+provides some support for Hipparcos coordinates in the form of
+four new routines:
+sla_FK52H and
+sla_H2FK5,
+which transform FK5 positions and proper motions to the Hipparcos frame
+and <I>vice versa,</I> and
+sla_FK5HZ and
+sla_HFK5Z,
+where the transformations are for stars whose Hipparcos proper motion is
+zero.
+<P>
+Further information on the ICRS can be found in the paper by M.Feissel
+and F.Mignard, Astron.Astrophys. 331, L33-L36 (1988).
+<P>
+<BR> <HR>
+<A NAME="tex2html2611" HREF="node217.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2609" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2603" HREF="node215.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2612" HREF="node217.html">Timescales</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2610" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2604" HREF="node215.html">Efficiency considerations</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node217.html b/src/slalib/sun67.htx/node217.html
new file mode 100644
index 0000000..b6fbe6c
--- /dev/null
+++ b/src/slalib/sun67.htx/node217.html
@@ -0,0 +1,92 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Timescales</TITLE>
+<META NAME="description" CONTENT="Timescales">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node222.html">
+<LINK REL="previous" HREF="node216.html">
+<LINK REL="up" HREF="node197.html">
+<LINK REL="next" HREF="node218.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2621" HREF="node218.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2619" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2613" HREF="node216.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2622" HREF="node218.html">Atomic Time: TAI</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2620" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2614" HREF="node216.html">The Hipparcos Catalogue and the ICRS</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000515000000000000000">
+Timescales</A>
+</H2>
+SLALIB provides for conversion between several timescales, and involves
+use of one or two others. The full list is as follows:
+<UL>
+<LI> TAI: International Atomic Time
+<LI> UTC: Coordinated Universal Time
+<LI> UT: Universal Time
+<LI> GMST: Greenwich Mean Sidereal Time
+<LI> LAST: Local Apparent Sidereal Time
+<LI> TT: Terrestrial Time
+<LI> TDB: Barycentric Dynamical Time.
+</UL>
+Three obsolete timescales should be mentioned here to avoid confusion.
+<UL>
+<LI> GMT: Greenwich Mean Time - can mean either UTC or UT.
+<LI> ET: Ephemeris Time - more or less the same as either TT or TDB.
+<LI> TDT: Terrestrial Dynamical Time - former name of TT.
+</UL>
+<BR><HR>
+<!--Table of Child-Links-->
+<A NAME="CHILD_LINKS">&#160;</A>
+<UL>
+<LI><A NAME="tex2html2623" HREF="node218.html#SECTION000515100000000000000">
+Atomic Time: TAI</A>
+<LI><A NAME="tex2html2624" HREF="node219.html#SECTION000515200000000000000">
+Universal Time: UTC, UT1</A>
+<LI><A NAME="tex2html2625" HREF="node220.html#SECTION000515300000000000000">
+Sidereal Time: GMST, LAST</A>
+<LI><A NAME="tex2html2626" HREF="node221.html#SECTION000515400000000000000">
+Dynamical Time: TT, TDB</A>
+</UL>
+<!--End of Table of Child-Links-->
+<BR> <HR>
+<A NAME="tex2html2621" HREF="node218.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2619" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2613" HREF="node216.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2622" HREF="node218.html">Atomic Time: TAI</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2620" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2614" HREF="node216.html">The Hipparcos Catalogue and the ICRS</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node218.html b/src/slalib/sun67.htx/node218.html
new file mode 100644
index 0000000..106412e
--- /dev/null
+++ b/src/slalib/sun67.htx/node218.html
@@ -0,0 +1,91 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Atomic Time: TAI</TITLE>
+<META NAME="description" CONTENT="Atomic Time: TAI">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node219.html">
+<LINK REL="previous" HREF="node217.html">
+<LINK REL="up" HREF="node217.html">
+<LINK REL="next" HREF="node219.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2635" HREF="node219.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2633" HREF="node217.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2627" HREF="node217.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2636" HREF="node219.html">Universal Time: UTC, UT1</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2634" HREF="node217.html">Timescales</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2628" HREF="node217.html">Timescales</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H3><A NAME="SECTION000515100000000000000">
+Atomic Time: TAI</A>
+</H3>
+<I>International Atomic Time</I> TAI is a laboratory timescale. Its
+unit is the SI second, which is defined in terms of a
+defined number
+of wavelengths of the radiation produced by a certain electronic
+transition in the caesium 133 atom. It
+is realized through a changing
+population of high-precision atomic clocks held
+at standards institutes in various countries. There is an
+elaborate process of continuous intercomparison, leading to
+a weighted average of all the clocks involved.
+<P>
+Though TAI shares the same second as the more familiar UTC, the
+two timescales are noticeably separated in epoch because of the
+build-up of leap seconds. At the time of writing, UTC
+lags about half a minute behind TAI.
+<P>
+For any given date, the difference TAI-UTC
+can be obtained by calling the SLALIB routine
+sla_DAT.
+Note, however, that an up-to-date copy of the routine must be used if
+the most recent leap seconds are required. For applications
+where this is critical, mechanisms independent of SLALIB
+and under local control must
+be set up; in such cases
+sla_DAT
+can be useful as an
+independent check, for test dates within the range of the
+available version. Up-to-date information on TAI-UTC is available
+from <TT>ftp://maia.usno.navy.mil/ser7/tai-utc.dat</TT>.
+<P>
+<BR> <HR>
+<A NAME="tex2html2635" HREF="node219.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2633" HREF="node217.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2627" HREF="node217.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2636" HREF="node219.html">Universal Time: UTC, UT1</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2634" HREF="node217.html">Timescales</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2628" HREF="node217.html">Timescales</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node219.html b/src/slalib/sun67.htx/node219.html
new file mode 100644
index 0000000..4214aaa
--- /dev/null
+++ b/src/slalib/sun67.htx/node219.html
@@ -0,0 +1,184 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Universal Time: UTC, UT1</TITLE>
+<META NAME="description" CONTENT="Universal Time: UTC, UT1">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node220.html">
+<LINK REL="previous" HREF="node218.html">
+<LINK REL="up" HREF="node217.html">
+<LINK REL="next" HREF="node220.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2645" HREF="node220.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2643" HREF="node217.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2637" HREF="node218.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2646" HREF="node220.html">Sidereal Time: GMST, LAST</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2644" HREF="node217.html">Timescales</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2638" HREF="node218.html">Atomic Time: TAI</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H3><A NAME="SECTION000515200000000000000">
+Universal Time: UTC, UT1</A>
+</H3>
+<I>Coordinated Universal Time</I> UTC is the basis of civil timekeeping.
+Most time zones differ from UTC by an integer number
+of hours, though a few (<I>e.g.</I> parts of Canada and Australia) differ
+by <I>n</I>+0.5&nbsp;hours. The UTC second is the same as the SI second,
+as for TAI. In the long term, UTC keeps in step with the
+Sun. It does so even though the Earth's rotation is slightly
+variable (due to large scale movements of water and atmosphere
+among other things) by occasionally introducing a <I>leap
+second</I>.
+<P><I>Universal Time</I> UT, or more specifically UT1,
+is in effect the mean solar time. It is continuous
+(<I>i.e.</I> there are no leap seconds) but has a variable
+rate because of the Earth's non-uniform rotation period. It is
+needed for computing the sidereal time, an essential part of
+pointing a telescope at a celestial source. To obtain UT1, you
+have to look up the value of UT1-UTC for the date concerned
+in tables published by the International Earth Rotation
+Service; this quantity, kept in the range
+<IMG WIDTH="15" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img30.gif"
+ ALT="$\pm$"><IMG WIDTH="24" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img31.gif"
+ ALT="$0^{\rm s}\hspace{-0.3em}.9$"> by means of UTC leap
+seconds, is then added to the UTC. The quantity UT1-UTC,
+which typically changes by 1 or 2&nbsp;ms per day,
+can only be obtained by observation, though seasonal trends
+are known and the IERS listings are able to predict some way into
+the future with adequate accuracy for pointing telescopes.
+<P>
+UTC leap seconds are introduced as necessary,
+usually at the end of December or June.
+On the average the solar day is slightly longer
+than the nominal 86,400&nbsp;SI&nbsp;seconds and so leap seconds are always positive;
+however, provision exists for negative leap seconds if needed.
+The form of a leap second can be seen from the
+following description of the end of June&nbsp;1994:
+<P><A NAME="27722">&#160;</A>
+<TABLE CELLPADDING=3>
+<CAPTION><STRONG>Figure 1:</STRONG>
+Relationship Between Celestial Coordinates</CAPTION>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP>&nbsp;</TD>
+<TD ALIGN="LEFT" NOWRAP>&nbsp;</TD>
+<TD ALIGN="RIGHT" NOWRAP>&nbsp;</TD>
+<TD ALIGN="CENTER" NOWRAP>&nbsp;</TD>
+<TD ALIGN="CENTER" NOWRAP>&nbsp;</TD>
+<TD ALIGN="CENTER" NOWRAP>&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP>&nbsp;</TD>
+<TD ALIGN="LEFT" NOWRAP>&nbsp;</TD>
+<TD ALIGN="RIGHT" NOWRAP>&nbsp;</TD>
+<TD ALIGN="CENTER" NOWRAP>UTC</TD>
+<TD ALIGN="CENTER" NOWRAP>UT1-UTC</TD>
+<TD ALIGN="CENTER" NOWRAP>UT1</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP>&nbsp;</TD>
+<TD ALIGN="LEFT" NOWRAP>&nbsp;</TD>
+<TD ALIGN="RIGHT" NOWRAP>&nbsp;</TD>
+<TD ALIGN="CENTER" NOWRAP>&nbsp;</TD>
+<TD ALIGN="CENTER" NOWRAP>&nbsp;</TD>
+<TD ALIGN="CENTER" NOWRAP>&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP>1994</TD>
+<TD ALIGN="LEFT" NOWRAP>June</TD>
+<TD ALIGN="RIGHT" NOWRAP>30</TD>
+<TD ALIGN="CENTER" NOWRAP>23 59 58</TD>
+<TD ALIGN="CENTER" NOWRAP>-0.218</TD>
+<TD ALIGN="CENTER" NOWRAP>23 59 57.782</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP>&nbsp;</TD>
+<TD ALIGN="LEFT" NOWRAP>&nbsp;</TD>
+<TD ALIGN="RIGHT" NOWRAP>&nbsp;</TD>
+<TD ALIGN="CENTER" NOWRAP>23 59 59</TD>
+<TD ALIGN="CENTER" NOWRAP>-0.218</TD>
+<TD ALIGN="CENTER" NOWRAP>23 59 58.782</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP>&nbsp;</TD>
+<TD ALIGN="LEFT" NOWRAP>&nbsp;</TD>
+<TD ALIGN="RIGHT" NOWRAP>&nbsp;</TD>
+<TD ALIGN="CENTER" NOWRAP>23 59 60</TD>
+<TD ALIGN="CENTER" NOWRAP>-0.218</TD>
+<TD ALIGN="CENTER" NOWRAP>23 59 59.782</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP>&nbsp;</TD>
+<TD ALIGN="LEFT" NOWRAP>July</TD>
+<TD ALIGN="RIGHT" NOWRAP>1</TD>
+<TD ALIGN="CENTER" NOWRAP>00 00 00</TD>
+<TD ALIGN="CENTER" NOWRAP>+0.782</TD>
+<TD ALIGN="CENTER" NOWRAP>00 00 00.782</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP>&nbsp;</TD>
+<TD ALIGN="LEFT" NOWRAP>&nbsp;</TD>
+<TD ALIGN="RIGHT" NOWRAP>&nbsp;</TD>
+<TD ALIGN="CENTER" NOWRAP>00 00 01</TD>
+<TD ALIGN="CENTER" NOWRAP>+0.782</TD>
+<TD ALIGN="CENTER" NOWRAP>00 00 01.782</TD>
+</TR>
+</TABLE>
+<P>
+Note that UTC has to be expressed as hours, minutes and
+seconds (or at least in seconds for a given date) if leap seconds
+are to be taken into account. It is improper to express a UTC as a
+Julian Date, for example, because there will be an ambiguity
+during a leap second (in the above example,
+1994&nbsp;June&nbsp;30 <IMG WIDTH="96" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img308.gif"
+ ALT="$23^{h}\,59^{m}\,60^{s}.0$"> and
+1994&nbsp;July&nbsp;1 <IMG WIDTH="96" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img309.gif"
+ ALT="$00^{h}\,00^{m}\,00^{s}.0$"> would <I>both</I> come out as
+MJD&nbsp;49534.00000). Although in the vast majority of
+cases this won't matter, there are potential problems in
+on-line data acquisition systems and in applications involving
+taking the difference between two times. Note that although the routines
+sla_DAT
+and
+sla_DTT
+expect UTC in the form of an MJD, the meaning here is really a
+whole-number <I>date</I> rather than a time. Though the routines will accept
+a fractional part and will almost always function correctly, on a day
+which ends with a leap
+second incorrect results would be obtained during the leap second
+itself because by then the MJD would have moved into the next day.
+<P>
+<BR> <HR>
+<A NAME="tex2html2645" HREF="node220.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2643" HREF="node217.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2637" HREF="node218.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2646" HREF="node220.html">Sidereal Time: GMST, LAST</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2644" HREF="node217.html">Timescales</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2638" HREF="node218.html">Atomic Time: TAI</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node22.html b/src/slalib/sun67.htx/node22.html
new file mode 100644
index 0000000..4e96061
--- /dev/null
+++ b/src/slalib/sun67.htx/node22.html
@@ -0,0 +1,119 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_AOPPAT - Update Appt-to-Obs Parameters</TITLE>
+<META NAME="description" CONTENT="SLA_AOPPAT - Update Appt-to-Obs Parameters">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node23.html">
+<LINK REL="previous" HREF="node21.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node23.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html646" HREF="node23.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html644" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html638" HREF="node21.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html647" HREF="node23.html">SLA_AOPQK - Quick Appt-to-Observed</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html645" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html639" HREF="node21.html">SLA_AOPPA - Appt-to-Obs Parameters</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION00049000000000000000">SLA_AOPPAT - Update Appt-to-Obs Parameters</A>
+<A NAME="xref_SLA_AOPPAT">&#160;</A><A NAME="SLA_AOPPAT">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Recompute the sidereal time in the apparent to observed place
+star-independent parameter block.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_AOPPAT (DATE, AOPRMS)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DATE</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>UTC date/time (Modified Julian Date, JD-2400000.5)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>AOPRMS</EM></TD>
+<TD ALIGN="LEFT"><B>D(14)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>star-independent apparent-to-observed parameters:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(1-12)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>not required</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(13)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>longitude + eqn of equinoxes +
+``sidereal <IMG WIDTH="16" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img19.gif"
+ ALT="$\Delta$">UT'' (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(14)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>not required</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>AOPRMS</EM></TD>
+<TH ALIGN="LEFT"><B>D(14)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>star-independent apparent-to-observed parameters:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(1-13)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>not changed</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(14)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>local apparent sidereal time (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTE:</STRONG>
+<DD>For more information, see sla_AOPPA.
+</DL>
+<BR> <HR>
+<A NAME="tex2html646" HREF="node23.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html644" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html638" HREF="node21.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html647" HREF="node23.html">SLA_AOPQK - Quick Appt-to-Observed</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html645" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html639" HREF="node21.html">SLA_AOPPA - Appt-to-Obs Parameters</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node220.html b/src/slalib/sun67.htx/node220.html
new file mode 100644
index 0000000..84db99f
--- /dev/null
+++ b/src/slalib/sun67.htx/node220.html
@@ -0,0 +1,96 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Sidereal Time: GMST, LAST</TITLE>
+<META NAME="description" CONTENT="Sidereal Time: GMST, LAST">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node221.html">
+<LINK REL="previous" HREF="node219.html">
+<LINK REL="up" HREF="node217.html">
+<LINK REL="next" HREF="node221.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2655" HREF="node221.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2653" HREF="node217.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2647" HREF="node219.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2656" HREF="node221.html">Dynamical Time: TT, TDB</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2654" HREF="node217.html">Timescales</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2648" HREF="node219.html">Universal Time: UTC, UT1</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H3><A NAME="SECTION000515300000000000000">
+Sidereal Time: GMST, LAST</A>
+</H3>
+Sidereal Time is the ``time of day'' relative to the
+stars rather than to the Sun. After
+one sidereal day the stars come back to the same place in the
+sky, apart from sub-arcsecond precession effects. Because the Earth
+rotates faster relative to the stars than to the Sun by one day
+per year, the sidereal second is shorter than the solar
+second; the ratio is about 0.9973.
+<P>
+The <I>Greenwich Mean Sidereal Time</I> GMST is
+linked to UT1 by a numerical formula which
+is implemented in the SLALIB routines
+sla_GMST
+and
+sla_GMSTA.
+There are, of course, no leap seconds in GMST, but the second
+changes in length along with the UT1 second, and also varies
+over long periods of time because of slow changes in the Earth's
+orbit. This makes the timescale unsuitable for everything except
+predicting the apparent directions of celestial sources.
+<P>
+The <I>Local Apparent Sidereal Time</I> LAST is the apparent right
+ascension of the local meridian, from which the hour angle of any
+star can be determined knowing its <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$">. It can be obtained from the
+GMST by adding the east longitude (corrected for polar motion
+in precise work) and the <I>equation of the equinoxes</I>. The
+latter, already described, is an aspect of the nutation effect
+and can be predicted by calling the SLALIB routine
+sla_EQEQX
+or, neglecting certain very small terms, by calling
+sla_NUTC
+and using the expression <IMG WIDTH="61" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img310.gif"
+ ALT="$\Delta\psi\cos\epsilon$">.<P>
+<BR> <HR>
+<A NAME="tex2html2655" HREF="node221.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2653" HREF="node217.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2647" HREF="node219.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2656" HREF="node221.html">Dynamical Time: TT, TDB</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2654" HREF="node217.html">Timescales</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2648" HREF="node219.html">Universal Time: UTC, UT1</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node221.html b/src/slalib/sun67.htx/node221.html
new file mode 100644
index 0000000..926f2ce
--- /dev/null
+++ b/src/slalib/sun67.htx/node221.html
@@ -0,0 +1,158 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Dynamical Time: TT, TDB</TITLE>
+<META NAME="description" CONTENT="Dynamical Time: TT, TDB">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="previous" HREF="node220.html">
+<LINK REL="up" HREF="node217.html">
+<LINK REL="next" HREF="node222.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2663" HREF="node222.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2661" HREF="node217.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2657" HREF="node220.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2664" HREF="node222.html">Calendars</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2662" HREF="node217.html">Timescales</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2658" HREF="node220.html">Sidereal Time: GMST, LAST</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H3><A NAME="SECTION000515400000000000000">
+Dynamical Time: TT, TDB</A>
+</H3>
+Dynamical time is the independent variable in the theories
+which describe the motions of bodies in the solar system. When
+you use published formulae which model the position of the
+Earth in its orbit, for example, or look up
+the Moon's position in a precomputed ephemeris, the date and time
+you use must be in terms of one of the dynamical timescales. It
+is a common but understandable mistake to use UT directly, in which
+case the results will be about 1&nbsp;minute out (in the present
+era).
+<P>
+It is not hard to see why such timescales are necessary.
+UTC would clearly be unsuitable as the argument of an
+ephemeris because of leap seconds.
+A solar-system ephemeris based on UT1 or sidereal time would somehow
+have to include the unpredictable variations of the Earth's rotation.
+TAI would work, but eventually
+the ephemeris and the ensemble of atomic clocks would drift apart.
+In effect, the ephemeris <I>is</I> a clock, with the bodies of
+the solar system the hands.
+<P>
+Only two of the dynamical timescales are of any great importance to
+observational astronomers, TT and TDB. (The obsolete
+timescale ET, ephemeris time, was more or less the same as TT.)
+<P><I>Terrestrial Time</I> TT is
+the theoretical timescale of apparent geocentric ephemerides of solar
+system bodies. It applies, in principle,
+to an Earthbound clock, at sea-level, and for practical purposes
+it is tied to
+Atomic Time TAI through the formula TT&nbsp;=&nbsp;TAI&nbsp;+&nbsp;<IMG WIDTH="48" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img311.gif"
+ ALT="$32^{\rm s}\hspace{-0.3em}.184$">.In practice, therefore, the units of TT are ordinary SI seconds, and
+the offset of <IMG WIDTH="48" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img311.gif"
+ ALT="$32^{\rm s}\hspace{-0.3em}.184$"> with respect to TAI is fixed.
+The SLALIB routine
+sla_DTT
+returns TT-UTC for a given UTC
+(<I>n.b.</I> sla_DTT
+calls
+sla_DAT,
+and the latter must be an up-to-date version if recent leap seconds are
+to be taken into account).
+<P><I>Barycentric Dynamical Time</I> TDB differs from TT by an amount which
+cycles back and forth by a millisecond or two due to
+relativistic effects. The variation is
+negligible for most purposes, but unless taken into
+account would swamp
+long-term analysis of pulse arrival times from the
+millisecond pulsars. It is a consequence of
+the TT clock being on the Earth rather than in empty
+space: the ellipticity of
+the Earth's orbit means that the TT clock's speed and
+gravitational potential vary slightly
+during the course of the year, and as a consequence
+its rate as seen from an outside observer
+varies due to transverse Doppler effect and gravitational
+redshift. By definition, TDB and TT differ only
+by periodic terms, and the main effect
+is a sinusoidal variation of amplitude <IMG WIDTH="48" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img312.gif"
+ ALT="$0^{\rm s}\hspace{-0.3em}.0016$">; the
+largest planetary terms are nearly two orders of magnitude
+smaller. The SLALIB routine
+sla_RCC
+provides a model of
+TDB-TT accurate to a few nanoseconds.
+There are other dynamical timescales, not supported by
+SLALIB routines, which include allowance also for the secular terms.
+These timescales gain on TT and TDB by about <IMG WIDTH="48" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img313.gif"
+ ALT="$0^{\rm s}\hspace{-0.3em}.0013$">/day.
+<P>
+For most purposes the more accessible TT is the timescale to use,
+for example when calling
+sla_PRENUT
+to generate a precession/nutation matrix or when calling
+sla_EVP
+to predict the
+Earth's position and velocity. For some purposes TDB is the
+correct timescale, for example when interrogating the JPL planetary
+ephemeris (see <I>Starlink User Note&nbsp;87</I>), though in most cases
+TT will be near enough and will involve less computation.
+<P>
+Investigations of topocentric solar-system phenomena such as
+occultations and eclipses require solar time as well as dynamical
+time. TT/TDB/ET is all that is required in order to compute the geocentric
+circumstances, but if horizon coordinates or geocentric parallax
+are to be tackled UT is also needed. A rough estimate
+of <IMG WIDTH="117" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img314.gif"
+ ALT="$\Delta {\rm T} = {\rm ET} - {\rm UT}$"> is
+available via the routine
+sla_DT.
+For a given epoch (<I>e.g.</I> 1650) this returns an approximation
+to <IMG WIDTH="28" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img315.gif"
+ ALT="$\Delta {\rm T}$"> in seconds.
+<P>
+<BR> <HR>
+<A NAME="tex2html2663" HREF="node222.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2661" HREF="node217.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2657" HREF="node220.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2664" HREF="node222.html">Calendars</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2662" HREF="node217.html">Timescales</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2658" HREF="node220.html">Sidereal Time: GMST, LAST</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node222.html b/src/slalib/sun67.htx/node222.html
new file mode 100644
index 0000000..7cc8f58
--- /dev/null
+++ b/src/slalib/sun67.htx/node222.html
@@ -0,0 +1,113 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Calendars</TITLE>
+<META NAME="description" CONTENT="Calendars">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node223.html">
+<LINK REL="previous" HREF="node217.html">
+<LINK REL="up" HREF="node197.html">
+<LINK REL="next" HREF="node223.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2673" HREF="node223.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2671" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2665" HREF="node221.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2674" HREF="node223.html">Geocentric Coordinates</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2672" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2666" HREF="node221.html">Dynamical Time: TT, TDB</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000516000000000000000">
+Calendars</A>
+</H2>
+The ordinary <I>Gregorian Calendar Date</I>,
+together with a time of day, can be
+used to express an epoch in any desired timescale. For many purposes,
+however, a continuous count of days is more convenient, and for
+this purpose the system of <I>Julian Day Number</I> can be used.
+JD zero is located about 7000&nbsp;years ago, well before the
+historical era, and is formally defined in terms of Greenwich noon;
+Julian Day Number 2449444 began at noon on 1994 April&nbsp;1. <I>Julian Date</I>
+is the same system but with a fractional part appended;
+Julian Date 2449443.5 was the midnight on which 1994 April&nbsp;1
+commenced. Because of the unwieldy size of Julian Dates
+and the awkwardness of the half-day offset, it is
+accepted practice to remove the leading `24' and the trailing `.5',
+producing what is called the <I>Modified Julian Date</I>:
+MJD&nbsp;=&nbsp;JD-2400000.5. SLALIB routines use MJD, as opposed to
+JD, throughout, largely to avoid loss of precision.
+1994 April&nbsp;1 commenced at MJD&nbsp;49443.0.
+<P>
+Despite JD (and hence MJD) being defined in terms of (in effect)
+UT, the system can be used in conjunction with other timescales
+such as TAI, TT and TDB (and even sidereal time through the
+concept of <I>Greenwich Sidereal Date</I>). However, it is improper
+to express a UTC as a JD or MJD because of leap seconds.
+<P>
+SLALIB has six routines for converting to and from dates in
+the Gregorian calendar. The routines
+sla_CLDJ
+and
+sla_CALDJ
+both convert a calendar date into an MJD, the former interpreting
+years between 0 and 99 as 1st century and the latter as late 20th or
+early 21st century. The routines sla_DJCL
+and
+sla_DJCAL
+both convert an MJD into calendar year, month, day and fraction of a day;
+the latter performs rounding to a specified precision, important
+to avoid dates like `<TT>94 04 01.***</TT>' appearing in messages.
+Some of SLALIB's low-precision ephemeris routines
+(sla_EARTH,
+sla_MOON
+and
+sla_ECOR)
+work in terms of year plus day-in-year (where
+day&nbsp;1&nbsp;=&nbsp;January&nbsp;1st, at least for the modern era).
+This form of date can be generated by
+calling
+sla_CALYD
+(which defaults years 0-99 into 1950-2049)
+or
+sla_CLYD
+(which covers the full range from prehistoric times).
+<P>
+<BR> <HR>
+<A NAME="tex2html2673" HREF="node223.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2671" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2665" HREF="node221.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2674" HREF="node223.html">Geocentric Coordinates</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2672" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2666" HREF="node221.html">Dynamical Time: TT, TDB</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node223.html b/src/slalib/sun67.htx/node223.html
new file mode 100644
index 0000000..497a385
--- /dev/null
+++ b/src/slalib/sun67.htx/node223.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Geocentric Coordinates</TITLE>
+<META NAME="description" CONTENT="Geocentric Coordinates">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node224.html">
+<LINK REL="previous" HREF="node222.html">
+<LINK REL="up" HREF="node197.html">
+<LINK REL="next" HREF="node224.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2683" HREF="node224.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2681" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2675" HREF="node222.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2684" HREF="node224.html">Ephemerides</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2682" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2676" HREF="node222.html">Calendars</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000517000000000000000">
+Geocentric Coordinates</A>
+</H2>
+The location of the observer on the Earth is significant in a
+number of ways. The most obvious, of course, is the effect of latitude
+on the observed <IMG WIDTH="66" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img28.gif"
+ ALT="$[\,Az,El~]$"> of a star. Less obvious is the need to
+allow for geocentric parallax when finding the Moon with a
+telescope (and when doing high-precision work involving the
+Sun or planets), and the need to correct observed radial
+velocities and apparent pulsar periods for the effects
+of the Earth's rotation.
+<P>
+The SLALIB routine
+sla_OBS
+supplies details of groundbased observatories from an internal
+list. This is useful when writing applications that apply to
+more than one observatory; the user can enter a brief name,
+or browse through a list, and be spared the trouble of typing
+in the full latitude, longitude <I>etc</I>. The following
+Fortran code returns the full name, longitude and latitude
+of a specified observatory:
+<P><PRE>
+ CHARACTER IDENT*10,NAME*40
+ DOUBLE PRECISION W,P,H
+ :
+ CALL sla_OBS(0,IDENT,NAME,W,P,H)
+ IF (NAME.EQ.'?') ... (not recognized)
+</PRE>
+<P>(Beware of the longitude sign convention, which is west +ve
+for historical reasons.) The following lists all
+the supported observatories:
+<P><PRE>
+ :
+ INTEGER N
+ :
+ N=1
+ NAME=' '
+ DO WHILE (NAME.NE.'?')
+ CALL sla_OBS(N,IDENT,NAME,W,P,H)
+ IF (NAME.NE.'?') THEN
+ WRITE (*,'(1X,I3,4X,A,4X,A)') N,IDENT,NAME
+ N=N+1
+ END IF
+ END DO
+</PRE>
+<P>
+The routine
+sla_GEOC
+converts a <I>geodetic latitude</I>
+(one referred to the local horizon) to a geocentric position,
+taking into account the Earth's oblateness and also the height
+above sea level of the observer. The results are expressed in
+vector form, namely as the distance of the observer from
+the spin axis and equator respectively. The <I>geocentric
+latitude</I> can be found be evaluating ATAN2 of the
+two numbers. A full 3-D vector description of the position
+and velocity of the observer is available through the routine
+sla_PVOBS.
+For a specified geodetic latitude, height above
+sea level, and local sidereal time,
+sla_PVOBS
+generates a 6-element vector containing the position and
+velocity with respect to the true equator and equinox of
+date (<I>i.e.</I> compatible with apparent <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$">). For
+some applications it will be necessary to convert to a
+mean <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> frame (notably FK5, J2000) by multiplying
+elements 1-3 and 4-6 respectively with the appropriate
+precession matrix. (In theory an additional correction to the
+velocity vector is needed to allow for differential precession,
+but this correction is always negligible.)
+<P>
+See also the discussion of the routine
+sla_RVEROT,
+later.
+<P>
+<BR> <HR>
+<A NAME="tex2html2683" HREF="node224.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2681" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2675" HREF="node222.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2684" HREF="node224.html">Ephemerides</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2682" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2676" HREF="node222.html">Calendars</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node224.html b/src/slalib/sun67.htx/node224.html
new file mode 100644
index 0000000..4cb8678
--- /dev/null
+++ b/src/slalib/sun67.htx/node224.html
@@ -0,0 +1,617 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Ephemerides</TITLE>
+<META NAME="description" CONTENT="Ephemerides">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node225.html">
+<LINK REL="previous" HREF="node223.html">
+<LINK REL="up" HREF="node197.html">
+<LINK REL="next" HREF="node225.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2693" HREF="node225.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2691" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2685" HREF="node223.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2694" HREF="node225.html">Radial Velocity and Light-Time Corrections</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2692" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2686" HREF="node223.html">Geocentric Coordinates</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000518000000000000000">
+Ephemerides</A>
+</H2>
+SLALIB includes routines for generating positions and
+velocities of Solar-System bodies. The accuracy objectives are
+modest, and the SLALIB facilities do not attempt
+to compete with precomputed ephemerides such as
+those provided by JPL, or with models containing
+thousands of terms. It is also worth noting
+that SLALIB's very accurate star coordinate conversion
+routines are not strictly applicable to solar-system cases,
+though they are adequate for most practical purposes.
+<P>
+Earth/Sun ephemerides can be generated using the routine
+sla_EVP,
+which predicts Earth position and velocity with respect to both the
+solar-system barycentre and the
+Sun. Maximum velocity error is 0.42&nbsp;metres per second; maximum
+heliocentric position error is 1600&nbsp;km (about <IMG WIDTH="17" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img316.gif"
+ ALT="$2\hspace{-0.05em}^{'\hspace{-0.1em}'}$">), with
+barycentric position errors about 4 times worse.
+(The Sun's position as
+seen from the Earth can, of course, be obtained simply by
+reversing the signs of the Cartesian components of the
+Earth:Sun vector.)
+<P>
+Geocentric Moon ephemerides are available from
+sla_DMOON,
+which predicts the Moon's position and velocity with respect to
+the Earth's centre. Direction accuracy is usually better than
+10&nbsp;km (<IMG WIDTH="17" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img131.gif"
+ ALT="$5\hspace{-0.05em}^{'\hspace{-0.1em}'}$">) and distance accuracy a little worse.
+<P>
+Lower-precision but faster predictions for the Sun and Moon
+can be made by calling
+sla_EARTH
+and
+sla_MOON.
+Both are single precision and accept dates in the form of
+year, day-in-year and fraction of day
+(starting from a calendar date you need to call
+sla_CLYD
+or
+sla_CALYD
+to get the required year and day).
+The
+sla_EARTH
+routine returns the heliocentric position and velocity
+of the Earth's centre for the mean equator and
+equinox of date. The accuracy is better than 20,000&nbsp;km in position
+and 10&nbsp;metres per second in speed.
+The
+position and velocity of the Moon with respect to the
+Earth's centre for the mean equator and ecliptic of date
+can be obtained by calling
+sla_MOON.
+The positional accuracy is better than <IMG WIDTH="25" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img82.gif"
+ ALT="$30\hspace{-0.05em}^{'\hspace{-0.1em}'}$"> in direction
+and 1000&nbsp;km in distance.
+<P>
+Approximate ephemerides for all the major planets
+can be generated by calling
+sla_PLANET
+or
+sla_RDPLAN. These routines offer arcminute accuracy (much
+better for the inner planets and for Pluto) over a span of several
+millennia (but only <IMG WIDTH="39" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img317.gif"
+ ALT="$\pm100$"> years for Pluto).
+The routine
+sla_PLANET produces heliocentric position and
+velocity in the form of equatorial <IMG WIDTH="106" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img51.gif"
+ ALT="$[\,x,y,z,\dot{x},\dot{y},\dot{z}\,]$"> for the
+mean equator and equinox of J2000. The vectors
+produced by
+sla_PLANET
+can be used in a variety of ways according to the
+requirements of the application concerned. The routine
+sla_RDPLAN
+uses
+sla_PLANET
+and
+sla_DMOON
+to deal with the common case of predicting
+a planet's apparent <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> and angular size as seen by a
+terrestrial observer.
+<P>
+Note that in predicting the position in the sky of a solar-system body
+it is necessary to allow for geocentric parallax. This correction
+is <I>essential</I> in the case of the Moon, where the observer's
+position on the Earth can affect the Moon's <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> by up to
+<IMG WIDTH="18" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img318.gif"
+ ALT="$1^\circ$">. The calculation can most conveniently be done by calling
+sla_PVOBS and subtracting the resulting 6-vector from the
+one produced by
+sla_DMOON, as is demonstrated by the following example:
+<P><PRE>
+ * Demonstrate the size of the geocentric parallax correction
+ * in the case of the Moon. The test example is for the AAT,
+ * before midnight, in summer, near first quarter.
+
+ IMPLICIT NONE
+ CHARACTER NAME*40,SH,SD
+ INTEGER J,I,IHMSF(4),IDMSF(4)
+ DOUBLE PRECISION SLONGW,SLAT,H,DJUTC,FDUTC,DJUT1,DJTT,STL,
+ : RMATN(3,3),PMM(6),PMT(6),RM,DM,PVO(6),TL
+ DOUBLE PRECISION sla_DTT,sla_GMST,sla_EQEQX,sla_DRANRM
+
+ * Get AAT longitude and latitude in radians and height in metres
+ CALL sla_OBS(0,'AAT',NAME,SLONGW,SLAT,H)
+
+ * UTC (1992 January 13, 11 13 59) to MJD
+ CALL sla_CLDJ(1992,1,13,DJUTC,J)
+ CALL sla_DTF2D(11,13,59.0D0,FDUTC,J)
+ DJUTC=DJUTC+FDUTC
+
+ * UT1 (UT1-UTC value of -0.152 sec is from IERS Bulletin B)
+ DJUT1=DJUTC+(-0.152D0)/86400D0
+
+ * TT
+ DJTT=DJUTC+sla_DTT(DJUTC)/86400D0
+
+ * Local apparent sidereal time
+ STL=sla_GMST(DJUT1)-SLONGW+sla_EQEQX(DJTT)
+
+ * Geocentric position/velocity of Moon (mean of date)
+ CALL sla_DMOON(DJTT,PMM)
+
+ * Nutation to true equinox of date
+ CALL sla_NUT(DJTT,RMATN)
+ CALL sla_DMXV(RMATN,PMM,PMT)
+ CALL sla_DMXV(RMATN,PMM(4),PMT(4))
+
+ * Report geocentric HA,Dec
+ CALL sla_DCC2S(PMT,RM,DM)
+ CALL sla_DR2TF(2,sla_DRANRM(STL-RM),SH,IHMSF)
+ CALL sla_DR2AF(1,DM,SD,IDMSF)
+ WRITE (*,'(1X,'' geocentric:'',2X,A,I2.2,2I3.2,''.'',I2.2,'//
+ : '1X,A,I2.2,2I3.2,''.'',I1)')
+ : SH,IHMSF,SD,IDMSF
+
+ * Geocentric position of observer (true equator and equinox of date)
+ CALL sla_PVOBS(SLAT,H,STL,PVO)
+
+ * Place origin at observer
+ DO I=1,6
+ PMT(I)=PMT(I)-PVO(I)
+ END DO
+
+ * Allow for planetary aberration
+ TL=499.004782D0*SQRT(PMT(1)**2+PMT(2)**2+PMT(3)**2)
+ DO I=1,3
+ PMT(I)=PMT(I)-TL*PMT(I+3)
+ END DO
+
+ * Report topocentric HA,Dec
+ CALL sla_DCC2S(PMT,RM,DM)
+ CALL sla_DR2TF(2,sla_DRANRM(STL-RM),SH,IHMSF)
+ CALL sla_DR2AF(1,DM,SD,IDMSF)
+ WRITE (*,'(1X,''topocentric:'',2X,A,I2.2,2I3.2,''.'',I2.2,'//
+ : '1X,A,I2.2,2I3.2,''.'',I1)')
+ : SH,IHMSF,SD,IDMSF
+ END
+</PRE>
+<P>
+The output produced is as follows:
+<P><PRE>
+ geocentric: +03 06 55.59 +15 03 39.0
+ topocentric: +03 09 23.79 +15 40 51.5
+</PRE>
+<P>(An easier but
+less instructive method of estimating the topocentric apparent place of the
+Moon is to call the routine
+sla_RDPLAN.)
+<P>
+As an example of using
+sla_PLANET,
+the following program estimates the geocentric separation
+between Venus and Jupiter during a close conjunction
+in 2BC, which is a star-of-Bethlehem candidate:
+<P><PRE>
+ * Compute time and minimum geocentric apparent separation
+ * between Venus and Jupiter during the close conjunction of 2 BC.
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION SEPMIN,DJD0,FD,DJD,DJDM,DF,PV(6),RMATP(3,3),
+ : PVM(6),PVE(6),TL,RV,DV,RJ,DJ,SEP
+ INTEGER IHOUR,IMIN,J,I,IHMIN,IMMIN
+ DOUBLE PRECISION sla_EPJ,sla_DSEP
+
+
+ * Search for closest approach on the given day
+ DJD0=1720859.5D0
+ SEPMIN=1D10
+ DO IHOUR=20,22
+ DO IMIN=0,59
+ CALL sla_DTF2D(IHOUR,IMIN,0D0,FD,J)
+
+ * Julian date and MJD
+ DJD=DJD0+FD
+ DJDM=DJD-2400000.5D0
+
+ * Earth to Moon (mean of date)
+ CALL sla_DMOON(DJDM,PV)
+
+ * Precess Moon position to J2000
+ CALL sla_PRECL(sla_EPJ(DJDM),2000D0,RMATP)
+ CALL sla_DMXV(RMATP,PV,PVM)
+
+ * Sun to Earth-Moon Barycentre (mean J2000)
+ CALL sla_PLANET(DJDM,3,PVE,J)
+
+ * Correct from EMB to Earth
+ DO I=1,3
+ PV(I)=PVE(I)-0.012150581D0*PVM(I)
+ END DO
+
+ * Sun to Venus
+ CALL sla_PLANET(DJDM,2,PV,J)
+
+ * Earth to Venus
+ DO I=1,6
+ PV(I)=PV(I)-PVE(I)
+ END DO
+
+ * Light time to Venus (sec)
+ TL=499.004782D0*SQRT((PV(1)-PVE(1))**2+
+ : (PV(2)-PVE(2))**2+
+ : (PV(3)-PVE(3))**2)
+
+ * Extrapolate backwards in time by that much
+ DO I=1,3
+ PV(I)=PV(I)-TL*PV(I+3)
+ END DO
+
+ * To RA,Dec
+ CALL sla_DCC2S(PV,RV,DV)
+
+ * Same for Jupiter
+ CALL sla_PLANET(DJDM,5,PV,J)
+ DO I=1,6
+ PV(I)=PV(I)-PVE(I)
+ END DO
+ TL=499.004782D0*SQRT((PV(1)-PVE(1))**2+
+ : (PV(2)-PVE(2))**2+
+ : (PV(3)-PVE(3))**2)
+ DO I=1,3
+ PV(I)=PV(I)-TL*PV(I+3)
+ END DO
+ CALL sla_DCC2S(PV,RJ,DJ)
+
+ * Separation (arcsec)
+ SEP=sla_DSEP(RV,DV,RJ,DJ)
+
+ * Keep if smallest so far
+ IF (SEP.LT.SEPMIN) THEN
+ IHMIN=IHOUR
+ IMMIN=IMIN
+ SEPMIN=SEP
+ END IF
+ END DO
+ END DO
+
+ * Report
+ WRITE (*,'(1X,I2.2,'':'',I2.2,F6.1)') IHMIN,IMMIN,
+ : 206264.8062D0*SEPMIN
+
+ END
+</PRE>
+<P>
+The output produced (the Ephemeris Time on the day in question, and
+the closest approach in arcseconds) is as follows:
+<P><PRE>
+ 21:19 33.7
+</PRE>
+<P>
+For comparison, accurate predictions based on the JPL DE102 ephemeris
+give a separation about <IMG WIDTH="17" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img319.gif"
+ ALT="$8\hspace{-0.05em}^{'\hspace{-0.1em}'}$"> less than
+the above estimate, occurring about half an hour earlier
+(see <I>Sky and Telescope,</I> April&nbsp;1987, p357).
+<P>
+The following program demonstrates
+sla_RDPLAN.
+<PRE>
+ * For a given date, time and geographical location, output
+ * a table of planetary positions and diameters.
+
+ IMPLICIT NONE
+ CHARACTER PNAMES(0:9)*7,B*80,S
+ INTEGER I,NP,IY,J,IM,ID,IHMSF(4),IDMSF(4)
+ DOUBLE PRECISION R2AS,FD,DJM,ELONG,PHI,RA,DEC,DIAM
+ PARAMETER (R2AS=206264.80625D0)
+ DATA PNAMES / 'Sun','Mercury','Venus','Moon','Mars','Jupiter',
+ : 'Saturn','Uranus','Neptune', 'Pluto' /
+
+
+ * Loop until 'end' typed
+ B=' '
+ DO WHILE (B.NE.'END'.AND.B.NE.'end')
+
+ * Get date, time and observer's location
+ PRINT *,'Date? (Y,M,D, Gregorian)'
+ READ (*,'(A)') B
+ IF (B.NE.'END'.AND.B.NE.'end') THEN
+ I=1
+ CALL sla_INTIN(B,I,IY,J)
+ CALL sla_INTIN(B,I,IM,J)
+ CALL sla_INTIN(B,I,ID,J)
+ PRINT *,'Time? (H,M,S, dynamical)'
+ READ (*,'(A)') B
+ I=1
+ CALL sla_DAFIN(B,I,FD,J)
+ FD=FD*2.3873241463784300365D0
+ CALL sla_CLDJ(IY,IM,ID,DJM,J)
+ DJM=DJM+FD
+ PRINT *,'Longitude? (D,M,S, east +ve)'
+ READ (*,'(A)') B
+ I=1
+ CALL sla_DAFIN(B,I,ELONG,J)
+ PRINT *,'Latitude? (D,M,S, (geodetic)'
+ READ (*,'(A)') B
+ I=1
+ CALL sla_DAFIN(B,I,PHI,J)
+
+ * Loop planet by planet
+ DO NP=0,8
+
+ * Get RA,Dec and diameter
+ CALL sla_RDPLAN(DJM,NP,ELONG,PHI,RA,DEC,DIAM)
+
+ * One line of report
+ CALL sla_DR2TF(2,RA,S,IHMSF)
+ CALL sla_DR2AF(1,DEC,S,IDMSF)
+ WRITE (*,
+ : '(1X,A,2X,3I3.2,''.'',I2.2,2X,A,I2.2,2I3.2,''.'',I1,F8.1)')
+ : PNAMES(NP),IHMSF,S,IDMSF,R2AS*DIAM
+
+ * Next planet
+ END DO
+ PRINT *,' '
+ END IF
+
+ * Next case
+ END DO
+
+ END
+</PRE>
+Entering the following data (for 1927&nbsp;June&nbsp;29 at <IMG WIDTH="49" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img320.gif"
+ ALT="$5^{\rm h}\,25^{\rm m}$">&nbsp;ET
+and the position of Preston, UK.):
+<PRE>
+ 1927 6 29
+ 5 25
+ -2 42
+ 53 46
+</PRE>
+produces the following report:
+<PRE>
+ Sun 06 28 14.03 +23 17 17.5 1887.8
+ Mercury 08 08 58.62 +19 20 57.3 9.3
+ Venus 09 38 53.64 +15 35 32.9 22.8
+ Moon 06 28 18.30 +23 18 37.3 1903.9
+ Mars 09 06 49.34 +17 52 26.7 4.0
+ Jupiter 00 11 12.06 -00 10 57.5 41.1
+ Saturn 16 01 43.34 -18 36 55.9 18.2
+ Uranus 00 13 33.53 +00 39 36.0 3.5
+ Neptune 09 49 35.75 +13 38 40.8 2.2
+ Pluto 07 05 29.50 +21 25 04.2 .1
+</PRE>
+Inspection of the Sun and Moon data reveals that
+a total solar eclipse is in progress.
+<P>
+SLALIB also provides for the case where orbital elements (with respect
+to the J2000 equinox and ecliptic)
+are available. This allows predictions to be made for minor-planets and
+(if you ignore non-gravitational effects)
+comets. Furthermore, if major-planet elements for an epoch close to the date
+in question are available, more accurate predictions can be made than
+are offered by
+sla_RDPLAN and
+sla_PLANET.
+<P>
+The SLALIB planetary-prediction
+routines that work with orbital elements are
+sla_PLANTE (the orbital-elements equivalent of
+sla_RDPLAN), which predicts the topocentric <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$">, and
+sla_PLANEL (the orbital-elements equivalent of
+sla_PLANET), which predicts the heliocentric <IMG WIDTH="106" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img51.gif"
+ ALT="$[\,x,y,z,\dot{x},\dot{y},\dot{z}\,]$"> with respect to the
+J2000 equinox and equator. In addition, the routine
+sla_PV2EL does the inverse of
+sla_PLANEL, transforming <IMG WIDTH="106" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img51.gif"
+ ALT="$[\,x,y,z,\dot{x},\dot{y},\dot{z}\,]$"> into <I>osculating elements.</I>
+<P>
+Osculating elements describe the unperturbed 2-body orbit. This is
+a good approximation to the actual orbit for a few weeks either
+side of the specified epoch, outside which perturbations due to
+the other bodies of the Solar System lead to
+increasing errors. Given a minor planet's osculating elements for
+a particular date, predictions for a date even just
+100 days earlier or later
+are likely to be in error by several arcseconds.
+These errors can
+be reduced if new elements are generated which take account of
+the perturbations of the major planets, and this is what the routine
+sla_PERTEL does. Once
+sla_PERTEL has been called, to provide osculating elements
+close to the required date, the elements can be passed to
+sla_PLANEL or
+sla_PLANTE in the normal way. Predictions of arcsecond accuracy
+over a span of a decade or more are available using this
+technique.
+<P>
+Three different combinations of orbital elements are
+provided for, matching the usual conventions
+for major planets, minor planets and
+comets respectively. The choice is made through the
+argument <TT>JFORM</TT>:
+<BR>
+<P><TABLE CELLPADDING=3 BORDER="1">
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP><TT>JFORM=1</TT></TD>
+<TD ALIGN="CENTER" NOWRAP><TT>JFORM=2</TT></TD>
+<TD ALIGN="CENTER" NOWRAP><TT>JFORM=3</TT></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP><I>t<SUB>0</SUB></I></TD>
+<TD ALIGN="CENTER" NOWRAP><I>t<SUB>0</SUB></I></TD>
+<TD ALIGN="CENTER" NOWRAP><I>T</I></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP><I>i</I></TD>
+<TD ALIGN="CENTER" NOWRAP><I>i</I></TD>
+<TD ALIGN="CENTER" NOWRAP><I>i</I></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP><IMG WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img99.gif"
+ ALT="$\Omega$"></TD>
+<TD ALIGN="CENTER" NOWRAP><IMG WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img99.gif"
+ ALT="$\Omega$"></TD>
+<TD ALIGN="CENTER" NOWRAP><IMG WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img99.gif"
+ ALT="$\Omega$"></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP><IMG WIDTH="16" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img100.gif"
+ ALT="$\varpi$"></TD>
+<TD ALIGN="CENTER" NOWRAP><IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img101.gif"
+ ALT="$\omega$"></TD>
+<TD ALIGN="CENTER" NOWRAP><IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img101.gif"
+ ALT="$\omega$"></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP><I>a</I></TD>
+<TD ALIGN="CENTER" NOWRAP><I>a</I></TD>
+<TD ALIGN="CENTER" NOWRAP><I>q</I></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP><I>e</I></TD>
+<TD ALIGN="CENTER" NOWRAP><I>e</I></TD>
+<TD ALIGN="CENTER" NOWRAP><I>e</I></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP><I>L</I></TD>
+<TD ALIGN="CENTER" NOWRAP><I>M</I></TD>
+<TD ALIGN="CENTER" NOWRAP>&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP><I>n</I></TD>
+<TD ALIGN="CENTER" NOWRAP>&nbsp;</TD>
+<TD ALIGN="CENTER" NOWRAP>&nbsp;</TD>
+</TR>
+</TABLE>
+<BR>
+<BR>
+<BR>
+<BR>
+<BR>
+<BR>
+The symbols have the following meanings:
+<PRE><TT>
+ <I>t<SUB>0</SUB></I> epoch at which the elements were correct
+ <I>T</I> epoch of perihelion passage
+ <I>i</I> inclination of the orbit
+ <IMG WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img99.gif"
+ ALT="$\Omega$"> longitude of the ascending node
+ <IMG WIDTH="16" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img100.gif"
+ ALT="$\varpi$"> longitude of perihelion (<IMG WIDTH="81" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img321.gif"
+ ALT="$\varpi = \Omega + \omega$">) <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img101.gif"
+ ALT="$\omega$"> argument of perihelion
+ <I>a</I> semi-major axis of the orbital ellipse
+ <I>q</I> perihelion distance
+ <I>e</I> orbital eccentricity
+ <I>L</I> mean longitude (<IMG WIDTH="87" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img322.gif"
+ ALT="$L = \varpi + M$">) <I>M</I> mean anomaly
+ <I>n</I> mean motion
+</TT></PRE>
+<P>
+The mean motion, <I>n</I>, tells sla_PLANEL the mass of the planet.
+If it is not available, it should be claculated
+from <I>n<SUP>2</SUP></I> <I>a<SUP>3</SUP></I> = <I>k<SUP>2</SUP></I> (1+<I>m</I>), where <I>k</I> = 0.01720209895 and
+m is the mass of the planet (<IMG WIDTH="59" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img323.gif"
+ ALT="$M_\odot = 1$">); <I>a</I> is in AU.
+<P>
+Conventional elements are not the only way of specifying an orbit.
+The <IMG WIDTH="106" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img51.gif"
+ ALT="$[\,x,y,z,\dot{x},\dot{y},\dot{z}\,]$"> state vector is an equally valid specification,
+and the so-called <I>method of universal variables</I> allows
+orbital calculations to be made directly, bypassing angular
+quantities and avoiding Kepler's Equation. The universal-variables
+approach has various advantages, including better handling of
+near-parabolic cases and greater efficiency.
+SLALIB uses universal variables for its internal
+calculations and also offers a number of routines which
+applications can call.
+<P>
+The universal elements are the <IMG WIDTH="106" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img51.gif"
+ ALT="$[\,x,y,z,\dot{x},\dot{y},\dot{z}\,]$"> and its epoch, plus the mass
+of the body. The SLALIB routines supplement these elements with
+certain redundant values in order to
+avoid unnecessary recomputation when the elements are next used.
+<P>
+The routines
+sla_EL2UE and
+sla_UE2EL transform conventional elements into the
+universal form and <I>vice versa.</I>
+The routine
+sla_PV2UE takes an <IMG WIDTH="106" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img51.gif"
+ ALT="$[\,x,y,z,\dot{x},\dot{y},\dot{z}\,]$"> and forms the set of universal
+elements;
+sla_UE2PV takes a set of universal elements and predicts the <IMG WIDTH="106" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img51.gif"
+ ALT="$[\,x,y,z,\dot{x},\dot{y},\dot{z}\,]$"> for a specified epoch.
+The routine
+sla_PERTUE provides updated universal elements,
+taking into account perturbations from the major planets.
+<P>
+<BR> <HR>
+<A NAME="tex2html2693" HREF="node225.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2691" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2685" HREF="node223.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2694" HREF="node225.html">Radial Velocity and Light-Time Corrections</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2692" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2686" HREF="node223.html">Geocentric Coordinates</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node225.html b/src/slalib/sun67.htx/node225.html
new file mode 100644
index 0000000..ce716c7
--- /dev/null
+++ b/src/slalib/sun67.htx/node225.html
@@ -0,0 +1,143 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Radial Velocity and Light-Time Corrections</TITLE>
+<META NAME="description" CONTENT="Radial Velocity and Light-Time Corrections">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node226.html">
+<LINK REL="previous" HREF="node224.html">
+<LINK REL="up" HREF="node197.html">
+<LINK REL="next" HREF="node226.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2703" HREF="node226.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2701" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2695" HREF="node224.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2704" HREF="node226.html">Focal-Plane Astrometry</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2702" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2696" HREF="node224.html">Ephemerides</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000519000000000000000">
+Radial Velocity and Light-Time Corrections</A>
+</H2>
+When publishing high-resolution spectral observations
+it is necessary to refer them to a specified standard of rest.
+This involves knowing the component in the direction of the
+source of the velocity of the observer. SLALIB provides a number
+of routines for this purpose, allowing observations to be
+referred to the Earth's centre, the Sun, a Local Standard of Rest
+(either dynamical or kinematical), the centre of the Galaxy, and
+the mean motion of the Local Group.
+<P>
+The routine
+sla_RVEROT
+corrects for the diurnal rotation of
+the observer around the Earth's axis. This is always less than 0.5&nbsp;km/s.
+<P>
+No specific routine is provided to correct a radial velocity
+from geocentric to heliocentric, but this can easily be done by calling
+sla_EVP
+as follows (array declarations <I>etc</I>. omitted):
+<P><PRE>
+ :
+ * Star vector, J2000
+ CALL sla_DCS2C(RM,DM,V)
+
+ * Earth/Sun velocity and position, J2000
+ CALL sla_EVP(TDB,2000D0,DVB,DPB,DVH,DPH)
+
+ * Radial velocity correction due to Earth orbit (km/s)
+ VCORB = -sla_DVDV(V,DVH)*149.597870D6
+ :
+</PRE>
+<P>
+The maximum value of this correction is the Earth's orbital speed
+of about 30&nbsp;km/s. A related routine,
+sla_ECOR,
+computes the light-time correction with respect to the Sun. It
+would be used when reducing observations of a rapid variable-star
+for instance.
+Note, however, that the accuracy objectives for pulsar work are
+beyond the scope of these SLALIB routines, and even the superior
+sla_EVP
+routine is unsuitable for arrival-time calculations of better
+than 25&nbsp;millisecond accuracy.
+<P>
+To remove the intrinsic <IMG WIDTH="36" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img324.gif"
+ ALT="$\sim20$">&nbsp;km/s motion of the Sun relative
+to other stars in the solar neighbourhood,
+a velocity correction to a
+<I>local standard of rest</I> (LSR) is required. There are
+opportunities for mistakes here. There are two sorts of LSR,
+<I>dynamical</I> and <I>kinematical</I>, and
+multiple definitions exist for the latter. The
+dynamical LSR is a point near the Sun which is in a circular
+orbit around the Galactic centre; the Sun has a ``peculiar''
+motion relative to the dynamical LSR. A kinematical LSR is
+the mean standard of rest of specified star catalogues or stellar
+populations, and its precise definition depends on which
+catalogues or populations were used and how the analysis was
+carried out. The Sun's motion with respect to a kinematical
+LSR is called the ``standard'' solar motion. Radial
+velocity corrections to the dynamical LSR are produced by the routine
+sla_RVLSRD
+and to the adopted kinematical LSR by
+sla_RVLSRK.
+See the individual specifications for these routines for the
+precise definition of the LSR in each case.
+<P>
+For extragalactic sources, the centre of the Galaxy can be used as
+a standard of rest. The radial velocity correction from the
+dynamical LSR to the Galactic centre can be obtained by calling
+sla_RVGALC.
+Its maximum value is 220&nbsp;km/s.
+<P>
+For very distant sources it is appropriate to work relative
+to the mean motion of the Local Group. The routine for
+computing the radial velocity correction in this case is
+sla_RVLG.
+Note that in this case the correction is with respect to the
+dynamical LSR, not the Galactic centre as might be expected.
+This conforms to the IAU definition, and confers immunity from
+revisions of the Galactic rotation speed.
+<P>
+<BR> <HR>
+<A NAME="tex2html2703" HREF="node226.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2701" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2695" HREF="node224.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2704" HREF="node226.html">Focal-Plane Astrometry</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2702" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2696" HREF="node224.html">Ephemerides</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node226.html b/src/slalib/sun67.htx/node226.html
new file mode 100644
index 0000000..41baa89
--- /dev/null
+++ b/src/slalib/sun67.htx/node226.html
@@ -0,0 +1,212 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Focal-Plane Astrometry</TITLE>
+<META NAME="description" CONTENT="Focal-Plane Astrometry">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node227.html">
+<LINK REL="previous" HREF="node225.html">
+<LINK REL="up" HREF="node197.html">
+<LINK REL="next" HREF="node227.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2713" HREF="node227.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2711" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2705" HREF="node225.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2714" HREF="node227.html">Numerical Methods</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2712" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2706" HREF="node225.html">Radial Velocity and Light-Time Corrections</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000520000000000000000">
+Focal-Plane Astrometry</A>
+</H2>
+The relationship between the position of a star image in
+the focal plane of a telescope and the star's celestial
+coordinates is usually described in terms of the <I>tangent plane</I>
+or <I>gnomonic</I> projection. This is the projection produced
+by a pin-hole camera and is a good approximation to the projection
+geometry of a traditional large <I>f</I>-ratio astrographic refractor.
+SLALIB includes a group of routines which transform
+star positions between their observed places on the celestial
+sphere and their <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$"> coordinates in the tangent plane. The
+spherical coordinate system does not have to be <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> but
+usually is. The so-called <I>standard coordinates</I> of a star
+are the tangent plane <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$">, in radians, with respect to an origin
+at the tangent point, with the <I>y</I>-axis pointing north and
+the <I>x</I>-axis pointing east (in the direction of increasing <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$">).
+The factor relating the standard coordinates to
+the actual <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$"> coordinates in, say, millimetres is simply
+the focal length of the telescope.
+<P>
+Given the <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> of the <I>plate centre</I> (the tangent point)
+and the <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> of a star within the field, the standard
+coordinates can be determined by calling
+sla_S2TP
+(single precision) or
+sla_DS2TP
+(double precision). The reverse transformation, where the
+<IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$"> is known and we wish to find the <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$">, is carried out by calling
+sla_TP2S
+or
+sla_DTP2S.
+Occasionally we know the both the <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$"> and the <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> of a
+star and need to deduce the <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> of the tangent point;
+this can be done by calling
+sla_TPS2C
+or
+sla_DTPS2C.
+(All of these transformations apply not just to <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> but to
+other spherical coordinate systems, of course.)
+Equivalent (and faster)
+routines are provided which work directly in <IMG WIDTH="58" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img50.gif"
+ ALT="$[\,x,y,z\,]$"> instead of
+spherical coordinates:
+sla_V2TP and
+sla_DV2TP,
+sla_TP2V and
+sla_DTP2V,
+sla_TPV2C and
+sla_DTPV2C.
+<P>
+Even at the best of times, the tangent plane projection is merely an
+approximation. Some telescopes and cameras exhibit considerable pincushion
+or barrel distortion and some have a curved focal surface.
+For example, neither Schmidt cameras nor (especially)
+large reflecting telescopes with wide-field corrector lenses
+are adequately modelled by tangent-plane geometry. In such
+cases, however, it is still possible to do most of the work
+using the (mathematically convenient) tangent-plane
+projection by inserting an extra step which applies or
+removes the distortion peculiar to the system concerned.
+A simple <I>r<SUB>1</SUB></I>=<I>r<SUB>0</SUB></I>(1+<I>Kr<SUB>0</SUB></I><SUP>2</SUP>) law works well in the
+majority of cases; <I>r<SUB>0</SUB></I> is the radial distance in the
+tangent plane, <I>r<SUB>1</SUB></I> is the radial distance after adding
+the distortion, and <I>K</I> is a constant which depends on the
+telescope (<IMG WIDTH="10" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img298.gif"
+ ALT="$\theta$"> is unaffected). The routine
+sla_PCD
+applies the distortion to an <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$"> and
+sla_UNPCD
+removes it. For <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$"> in radians, <I>K</I> values range from -1/3 for the
+tiny amount of barrel distortion in Schmidt geometry to several
+hundred for the serious pincushion distortion
+produced by wide-field correctors in big reflecting telescopes
+(the AAT prime focus triplet corrector is about <I>K</I>=+178.6).
+<P>
+SLALIB includes a group of routines which can be put together
+to build a simple plate-reduction program. The heart of the group is
+sla_FITXY,
+which fits a linear model to relate two sets of <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$"> coordinates,
+in the case of a plate reduction the measured positions of the
+images of a set of
+reference stars and the standard
+coordinates derived from their catalogue positions. The
+model is of the form:
+
+<P ALIGN="CENTER">
+<I>x</I><SUB><I>p</I></SUB> = <I>a</I> + <I>bx</I><SUB><I>m</I></SUB> + <I>cy</I><SUB><I>m</I></SUB>
+</P>
+
+<P ALIGN="CENTER">
+<I>y</I><SUB><I>p</I></SUB> = <I>d</I> + <I>ex</I><SUB><I>m</I></SUB> + <I>fy</I><SUB><I>m</I></SUB>
+</P>
+<P>
+where the <I>p</I> subscript indicates ``predicted'' coordinates
+(the model's approximation to the ideal ``expected'' coordinates) and the
+<I>m</I> subscript indicates ``measured coordinates''. The
+six coefficients <I>a-f</I> can optionally be
+constrained to represent a ``solid body rotation'' free of
+any squash or shear distortions. Without this constraint
+the model can, to some extent, accommodate effects like refraction,
+allowing mean places to be used directly and
+avoiding the extra complications of a
+full mean-apparent-observed transformation for each star.
+Having obtained the linear model,
+sla_PXY
+can be used to process the set of measured and expected
+coordinates, giving the predicted coordinates and determining
+the RMS residuals in <I>x</I> and <I>y</I>.
+The routine
+sla_XY2XY
+transforms one <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$"> into another using the linear model. A model
+can be inverted by calling
+sla_INVF,
+and decomposed into zero points, scales, <I>x</I>/<I>y</I> nonperpendicularity
+and orientation by calling
+sla_DCMPF.
+<P>
+<BR> <HR>
+<A NAME="tex2html2713" HREF="node227.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2711" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2705" HREF="node225.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2714" HREF="node227.html">Numerical Methods</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2712" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2706" HREF="node225.html">Radial Velocity and Light-Time Corrections</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node227.html b/src/slalib/sun67.htx/node227.html
new file mode 100644
index 0000000..9ed563a
--- /dev/null
+++ b/src/slalib/sun67.htx/node227.html
@@ -0,0 +1,230 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Numerical Methods</TITLE>
+<META NAME="description" CONTENT="Numerical Methods">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="previous" HREF="node226.html">
+<LINK REL="up" HREF="node197.html">
+<LINK REL="next" HREF="node228.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2721" HREF="node228.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2719" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2715" HREF="node226.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2722" HREF="node228.html">SUMMARY OF CALLS</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2720" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2716" HREF="node226.html">Focal-Plane Astrometry</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000521000000000000000">
+Numerical Methods</A>
+</H2>
+SLALIB contains a small number of simple, general-purpose
+numerical-methods routines. They have no specific
+connection with positional astronomy but have proved useful in
+applications to do with simulation and fitting.
+<P>
+At the heart of many simulation programs is the generation of
+pseudo-random numbers, evenly distributed in a given range:
+sla_RANDOM
+does this. Pseudo-random normal deviates, or ``Gaussian
+residuals'', are often required to simulate noise and
+can be generated by means of the function
+sla_GRESID.
+Neither routine will pass super-sophisticated
+statistical tests, but they work adequately for most
+practical purposes and avoid the need to call non-standard
+library routines peculiar to one sort of computer.
+<P>
+Applications which perform a least-squares fit using a traditional
+normal-equations methods can accomplish the required matrix-inversion
+by calling either
+sla_SMAT
+(single precision) or
+sla_DMAT
+(double). A generally better way to perform such fits is
+to use singular value decomposition. SLALIB provides a routine
+to do the decomposition itself,
+sla_SVD,
+and two routines to use the results:
+sla_SVDSOL
+generates the solution, and
+sla_SVDCOV
+produces the covariance matrix.
+A simple demonstration of the use of the SLALIB SVD
+routines is given below. It generates 500 simulated data
+points and fits them to a model which has 4 unknown coefficients.
+(The arrays in the example are sized to accept up to 1000
+points and 20 unknowns.) The model is:
+
+<P ALIGN="CENTER">
+<I>y</I> = <I>C<SUB>1</SUB></I> +<I>C<SUB>2</SUB>x</I> +<I>C<SUB>3</SUB>sin</I><I>x</I> +<I>C<SUB>4</SUB>cos</I><I>x</I>
+</P>
+The test values for the four coefficients are
+<IMG WIDTH="79" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img325.gif"
+ ALT="$C_1\!=\!+50.0$">,<IMG WIDTH="71" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img326.gif"
+ ALT="$C_2\!=\!-2.0$">,<IMG WIDTH="79" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img327.gif"
+ ALT="$C_3\!=\!-10.0$"> and
+<IMG WIDTH="79" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img328.gif"
+ ALT="$C_4\!=\!+25.0$">.Gaussian noise, <IMG WIDTH="55" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img329.gif"
+ ALT="$\sigma=5.0$">, is added to each ``observation''.
+<P><PRE>
+ IMPLICIT NONE
+
+ * Sizes of arrays, physical and logical
+ INTEGER MP,NP,NC,M,N
+ PARAMETER (MP=1000,NP=10,NC=20,M=500,N=4)
+
+ * The unknowns we are going to solve for
+ DOUBLE PRECISION C1,C2,C3,C4
+ PARAMETER (C1=50D0,C2=-2D0,C3=-10D0,C4=25D0)
+
+ * Arrays
+ DOUBLE PRECISION A(MP,NP),W(NP),V(NP,NP),
+ : WORK(NP),B(MP),X(NP),CVM(NC,NC)
+
+ DOUBLE PRECISION VAL,BF1,BF2,BF3,BF4,SD2,D,VAR
+ REAL sla_GRESID
+ INTEGER I,J
+
+ * Fill the design matrix
+ DO I=1,M
+
+ * Dummy independent variable
+ VAL=DBLE(I)/10D0
+
+ * The basis functions
+ BF1=1D0
+ BF2=VAL
+ BF3=SIN(VAL)
+ BF4=COS(VAL)
+
+ * The observed value, including deliberate Gaussian noise
+ B(I)=C1*BF1+C2*BF2+C3*BF3+C4*BF4+DBLE(sla_GRESID(5.0))
+
+ * Fill one row of the design matrix
+ A(I,1)=BF1
+ A(I,2)=BF2
+ A(I,3)=BF3
+ A(I,4)=BF4
+ END DO
+
+ * Factorize the design matrix, solve and generate covariance matrix
+ CALL sla_SVD(M,N,MP,NP,A,W,V,WORK,J)
+ CALL sla_SVDSOL(M,N,MP,NP,B,A,W,V,WORK,X)
+ CALL sla_SVDCOV(N,NP,NC,W,V,WORK,CVM)
+
+ * Compute the variance
+ SD2=0D0
+ DO I=1,M
+ VAL=DBLE(I)/10D0
+ BF1=1D0
+ BF2=VAL
+ BF3=SIN(VAL)
+ BF4=COS(VAL)
+ D=B(I)-(X(1)*BF1+X(2)*BF2+X(3)*BF3+X(4)*BF4)
+ SD2=SD2+D*D
+ END DO
+ VAR=SD2/DBLE(M)
+
+ * Report the RMS and the solution
+ WRITE (*,'(1X,''RMS ='',F5.2/)') SQRT(VAR)
+ DO I=1,N
+ WRITE (*,'(1X,''C'',I1,'' ='',F7.3,'' +/-'',F6.3)')
+ : I,X(I),SQRT(VAR*CVM(I,I))
+ END DO
+ END
+</PRE>
+<P>
+The program produces the following output:
+<P><PRE>
+ RMS = 4.88
+
+ C1 = 50.192 +/- 0.439
+ C2 = -2.002 +/- 0.015
+ C3 = -9.771 +/- 0.310
+ C4 = 25.275 +/- 0.310
+</PRE>
+<P>
+In this above example, essentially
+identical results would be obtained if the more
+commonplace normal-equations method had been used, and the large
+<IMG WIDTH="72" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img330.gif"
+ ALT="$1000\times20$"> array would have been avoided. However, the SVD method
+comes into its own when the opportunity is taken to edit the W-matrix
+(the so-called ``singular values'') in order to control
+possible ill-conditioning. The procedure involves replacing with
+zeroes any W-elements smaller than a nominated value, for example
+0.001 times the largest W-element. Small W-elements indicate
+ill-conditioning, which in the case of the normal-equations
+method would produce spurious large coefficient values and
+possible arithmetic overflows. Using SVD, the effect on the solution
+of setting suspiciously small W-elements to zero is to restrain
+the offending coefficients from moving very far. The
+fact that action was taken can be reported to show the program user that
+something is amiss. Furthermore, if element W(J) was set to zero,
+the row numbers of the two biggest elements in the Jth column of the
+V-matrix identify the pair of solution coefficients that are
+dependent.
+<P>
+A more detailed description of SVD and its use in least-squares
+problems would be out of place here, and the reader is urged
+to refer to the relevant sections of the book <I>Numerical Recipes</I>
+(Press <I>et al.</I>, Cambridge University Press, 1987).
+<P>
+The routines
+sla_COMBN
+and
+sla_PERMUT
+are useful for problems which involve combinations (different subsets)
+and permutations (different orders).
+Both return the next in a sequence of results, cycling through all the
+possible results as the routine is called repeatedly.
+<P>
+<BR>
+<P>
+<BR> <HR>
+<A NAME="tex2html2721" HREF="node228.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2719" HREF="node197.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2715" HREF="node226.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2722" HREF="node228.html">SUMMARY OF CALLS</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2720" HREF="node197.html">EXPLANATION AND EXAMPLES</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2716" HREF="node226.html">Focal-Plane Astrometry</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node228.html b/src/slalib/sun67.htx/node228.html
new file mode 100644
index 0000000..f21ae0e
--- /dev/null
+++ b/src/slalib/sun67.htx/node228.html
@@ -0,0 +1,696 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SUMMARY OF CALLS</TITLE>
+<META NAME="description" CONTENT="SUMMARY OF CALLS">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node229.html">
+<LINK REL="previous" HREF="node197.html">
+<LINK REL="up" HREF="sun67.html">
+<LINK REL="next" HREF="node229.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html2731" HREF="node229.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2729" HREF="sun67.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2723" HREF="node227.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2732" HREF="node229.html">About this document ...</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2730" HREF="sun67.html">SLALIB Positional Astronomy Library</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2724" HREF="node227.html">Numerical Methods</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H1><A NAME="SECTION00060000000000000000">
+SUMMARY OF CALLS</A>
+</H1>
+The basic trigonometrical and numerical facilities are supplied in both single
+and double precision versions.
+Most of the more esoteric position and time routines use double precision
+arguments only, even in cases where single precision would normally be adequate
+in practice.
+Certain routines with modest accuracy objectives are supplied in
+single precision versions only.
+In the calling sequences which follow, no attempt has been made
+to distinguish between single and double precision argument names,
+and frequently the same name is used on different occasions to
+mean different things.
+However, none of the routines uses a mixture of single and
+double precision arguments; each routine is either wholly
+single precision or wholly double precision.
+<P>
+In the classified list, below,
+<I>subroutine</I> subprograms are those whose names and argument lists
+are preceded by `CALL', whereas <I>function</I> subprograms are
+those beginning `R=' (when the result is REAL) or `D=' (when
+the result is DOUBLE&nbsp;PRECISION).
+<P>
+The list is, of course, merely for quick reference; inexperienced
+users <B>must</B> refer to the detailed specifications given later.
+In particular, <B>don't guess</B> whether arguments are single or
+double precision; the result could be a program that happens to
+works on one sort of machine but not on another.
+<P>
+<BR><BIG><B>String Decoding</BIG></B><UL>
+<LI> CALL sla_INTIN (STRING, NSTRT, IRESLT, JFLAG)
+<BR>
+Convert free-format string into integer
+<LI> CALL sla_FLOTIN (STRING, NSTRT, RESLT, JFLAG)
+<BR>
+CALL sla_DFLTIN (STRING, NSTRT, DRESLT, JFLAG)
+<BR>
+Convert free-format string into floating-point number
+<LI> CALL sla_AFIN (STRING, NSTRT, RESLT, JFLAG)
+<BR>
+CALL sla_DAFIN (STRING, NSTRT, DRESLT, JFLAG)
+<BR>
+Convert free-format string from deg,arcmin,arcsec to radians</UL>
+<BR><BIG><B>Sexagesimal Conversions</BIG></B><UL>
+<LI> CALL sla_CTF2D (IHOUR, IMIN, SEC, DAYS, J)
+<BR>
+CALL sla_DTF2D (IHOUR, IMIN, SEC, DAYS, J)
+<BR>
+Hours, minutes, seconds to days
+<LI> CALL sla_CD2TF (NDP, DAYS, SIGN, IHMSF)
+<BR>
+CALL sla_DD2TF (NDP, DAYS, SIGN, IHMSF)
+<BR>
+Days to hours, minutes, seconds
+<LI> CALL sla_CTF2R (IHOUR, IMIN, SEC, RAD, J)
+<BR>
+CALL sla_DTF2R (IHOUR, IMIN, SEC, RAD, J)
+<BR>
+Hours, minutes, seconds to radians
+<LI> CALL sla_CR2TF (NDP, ANGLE, SIGN, IHMSF)
+<BR>
+CALL sla_DR2TF (NDP, ANGLE, SIGN, IHMSF)
+<BR>
+Radians to hours, minutes, seconds
+<LI> CALL sla_CAF2R (IDEG, IAMIN, ASEC, RAD, J)
+<BR>
+CALL sla_DAF2R (IDEG, IAMIN, ASEC, RAD, J)
+<BR>
+Degrees, arcminutes, arcseconds to radians
+<LI> CALL sla_CR2AF (NDP, ANGLE, SIGN, IDMSF)
+<BR>
+CALL sla_DR2AF (NDP, ANGLE, SIGN, IDMSF)
+<BR>
+Radians to degrees, arcminutes, arcseconds</UL>
+<BR><BIG><B>Angles, Vectors and Rotation Matrices</BIG></B><UL>
+<LI> R&nbsp;=&nbsp;sla_RANGE (ANGLE)
+<BR>
+D&nbsp;=&nbsp;sla_DRANGE (ANGLE)
+<BR>
+Normalize angle into range <IMG WIDTH="25" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img47.gif"
+ ALT="$\pm \pi$"><LI> R&nbsp;=&nbsp;sla_RANORM (ANGLE)
+<BR>
+D&nbsp;=&nbsp;sla_DRANRM (ANGLE)
+<BR>
+Normalize angle into range <IMG WIDTH="43" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img66.gif"
+ ALT="$0\!-\!2\pi$"><LI> CALL sla_CS2C (A, B, V)
+<BR>
+CALL sla_DCS2C (A, B, V)
+<BR>
+Spherical coordinates to <IMG WIDTH="58" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img50.gif"
+ ALT="$[\,x,y,z\,]$"><LI> CALL sla_CC2S (V, A, B)
+<BR>
+CALL sla_DCC2S (V, A, B)
+<BR>
+ <IMG WIDTH="58" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img50.gif"
+ ALT="$[\,x,y,z\,]$"> to spherical coordinates
+<LI> R&nbsp;=&nbsp;sla_VDV (VA, VB)
+<BR>
+D&nbsp;=&nbsp;sla_DVDV (VA, VB)
+<BR>
+Scalar product of two 3-vectors
+<LI> CALL sla_VXV (VA, VB, VC)
+<BR>
+CALL sla_DVXV (VA, VB, VC)
+<BR>
+Vector product of two 3-vectors
+<LI> CALL sla_VN (V, UV, VM)
+<BR>
+CALL sla_DVN (V, UV, VM)
+<BR>
+Normalize a 3-vector also giving the modulus
+<LI> R&nbsp;=&nbsp;sla_SEP (A1, B1, A2, B2)
+<BR>
+D&nbsp;=&nbsp;sla_DSEP (A1, B1, A2, B2)
+<BR>
+Angle between two points on a sphere
+<LI> R&nbsp;=&nbsp;sla_BEAR (A1, B1, A2, B2)
+<BR>
+D&nbsp;=&nbsp;sla_DBEAR (A1, B1, A2, B2)
+<BR>
+Direction of one point on a sphere seen from another
+<LI> R&nbsp;=&nbsp;sla_PAV (V1, V2)
+<BR>
+D&nbsp;=&nbsp;sla_DPAV (V1, V2)
+<BR>
+Position-angle of one <IMG WIDTH="58" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img50.gif"
+ ALT="$[\,x,y,z\,]$"> with respect to another
+<LI> CALL sla_EULER (ORDER, PHI, THETA, PSI, RMAT)
+<BR>
+CALL sla_DEULER (ORDER, PHI, THETA, PSI, RMAT)
+<BR>
+Form rotation matrix from three Euler angles
+<LI> CALL sla_AV2M (AXVEC, RMAT)
+<BR>
+CALL sla_DAV2M (AXVEC, RMAT)
+<BR>
+Form rotation matrix from axial vector
+<LI> CALL sla_M2AV (RMAT, AXVEC)
+<BR>
+CALL sla_DM2AV (RMAT, AXVEC)
+<BR>
+Determine axial vector from rotation matrix
+<LI> CALL sla_MXV (RM, VA, VB)
+<BR>
+CALL sla_DMXV (DM, VA, VB)
+<BR>
+Rotate vector forwards
+<LI> CALL sla_IMXV (RM, VA, VB)
+<BR>
+CALL sla_DIMXV (DM, VA, VB)
+<BR>
+Rotate vector backwards
+<LI> CALL sla_MXM (A, B, C)
+<BR>
+CALL sla_DMXM (A, B, C)
+<BR>
+Product of two 3x3 matrices
+<LI> CALL sla_CS2C6 (A, B, R, AD, BD, RD, V)
+<BR>
+CALL sla_DS2C6 (A, B, R, AD, BD, RD, V)
+<BR>
+Conversion of position and velocity in spherical
+ coordinates to Cartesian coordinates
+<LI> CALL sla_CC62S (V, A, B, R, AD, BD, RD)
+<BR>
+CALL sla_DC62S (V, A, B, R, AD, BD, RD)
+<BR>
+Conversion of position and velocity in Cartesian
+ coordinates to spherical coordinates</UL>
+<BR><BIG><B>Calendars</BIG></B><UL>
+<LI> CALL sla_CLDJ (IY, IM, ID, DJM, J)
+<BR>
+Gregorian Calendar to Modified Julian Date
+<LI> CALL sla_CALDJ (IY, IM, ID, DJM, J)
+<BR>
+Gregorian Calendar to Modified Julian Date,
+ permitting century default
+<LI> CALL sla_DJCAL (NDP, DJM, IYMDF, J)
+<BR>
+Modified Julian Date to Gregorian Calendar,
+ in a form convenient for formatted output
+<LI> CALL sla_DJCL (DJM, IY, IM, ID, FD, J)
+<BR>
+Modified Julian Date to Gregorian Year, Month, Day, Fraction
+<LI> CALL sla_CALYD (IY, IM, ID, NY, ND, J)
+<BR>
+Calendar to year and day in year, permitting century default
+<LI> CALL sla_CLYD (IY, IM, ID, NY, ND, J)
+<BR>
+Calendar to year and day in year
+<LI> D&nbsp;=&nbsp;sla_EPB (DATE)
+<BR>
+Modified Julian Date to Besselian Epoch
+<LI> D&nbsp;=&nbsp;sla_EPB2D (EPB)
+<BR>
+Besselian Epoch to Modified Julian Date
+<LI> D&nbsp;=&nbsp;sla_EPJ (DATE)
+<BR>
+Modified Julian Date to Julian Epoch
+<LI> D&nbsp;=&nbsp;sla_EPJ2D (EPJ)
+<BR>
+Julian Epoch to Modified Julian Date</UL>
+<BR><BIG><B>Timescales</BIG></B><UL>
+<LI> D&nbsp;=&nbsp;sla_GMST (UT1)
+<BR>
+Conversion from Universal Time to sidereal time
+<LI> D&nbsp;=&nbsp;sla_GMSTA (DATE, UT1)
+<BR>
+Conversion from Universal Time to sidereal time, rounding errors minimized
+<LI> D&nbsp;=&nbsp;sla_EQEQX (DATE)
+<BR>
+Equation of the equinoxes
+<LI> D&nbsp;=&nbsp;sla_DAT (DJU)
+<BR>
+Offset of Atomic Time from Coordinated Universal Time: TAI-UTC
+<LI> D&nbsp;=&nbsp;sla_DT (EPOCH)
+<BR>
+Approximate offset between dynamical time and universal time
+<LI> D&nbsp;=&nbsp;sla_DTT (DJU)
+<BR>
+Offset of Terrestrial Time from Coordinated Universal Time: TT-UTC
+<LI> D&nbsp;=&nbsp;sla_RCC (TDB, UT1, WL, U, V)
+<BR>
+Relativistic clock correction: TDB-TT</UL>
+<BR><BIG><B>Precession and Nutation</BIG></B><UL>
+<LI> CALL sla_NUT (DATE, RMATN)
+<BR>
+Nutation matrix
+<LI> CALL sla_NUTC (DATE, DPSI, DEPS, EPS0)
+<BR>
+Longitude and obliquity components of nutation, and
+ mean obliquity
+<LI> CALL sla_PREC (EP0, EP1, RMATP)
+<BR>
+Precession matrix (IAU)
+<LI> CALL sla_PRECL (EP0, EP1, RMATP)
+<BR>
+Precession matrix (suitable for long periods)
+<LI> CALL sla_PRENUT (EPOCH, DATE, RMATPN)
+<BR>
+Combined precession/nutation matrix
+<LI> CALL sla_PREBN (BEP0, BEP1, RMATP)
+<BR>
+Precession matrix, old system
+<LI> CALL sla_PRECES (SYSTEM, EP0, EP1, RA, DC)
+<BR>
+Precession, in either the old or the new system</UL>
+<BR><BIG><B>Proper Motion</BIG></B><UL>
+<LI> CALL sla_PM (R0, D0, PR, PD, PX, RV, EP0, EP1, R1, D1)
+<BR>
+Adjust for proper motion</UL>
+<BR><BIG><B>FK4/FK5/Hipparcos Conversions</BIG></B><UL>
+<LI> CALL sla_FK425 (
+ R1950, D1950, DR1950, DD1950, P1950, V1950,
+ R2000, D2000, DR2000, DD2000, P2000, V2000)
+<BR>
+Convert B1950.0 FK4 star data to J2000.0 FK5
+<LI> CALL sla_FK45Z (R1950, D1950, EPOCH, R2000, D2000)
+<BR>
+Convert B1950.0 FK4 position to J2000.0 FK5 assuming zero
+ FK5 proper motion and no parallax
+<LI> CALL sla_FK524 (
+ R2000, D2000, DR2000, DD2000, P2000, V2000,
+ R1950, D1950, DR1950, DD1950, P1950, V1950)
+<BR>
+Convert J2000.0 FK5 star data to B1950.0 FK4
+<LI> CALL sla_FK54Z (R2000, D2000, BEPOCH,
+ R1950, D1950, DR1950, DD1950)
+<BR>
+Convert J2000.0 FK5 position to B1950.0 FK4 assuming zero
+ FK5 proper motion and no parallax
+<LI> CALL sla_FK52H (R5, D5, DR5, DD5, RH, DH, DRH, DDH)
+<BR>
+Convert J2000.0 FK5 star data to Hipparcos
+<LI> CALL sla_FK5HZ (R5, D5, EPOCH, RH, DH )
+<BR>
+Convert J2000.0 FK5 position to Hipparcos assuming zero Hipparcos
+ proper motion
+<LI> CALL sla_H2FK5 (RH, DH, DRH, DDH, R5, D5, DR5, DD5)
+<BR>
+Convert Hipparcos star data to J2000.0 FK5
+<LI> CALL sla_HFK5Z (RH, DH, EPOCH, R5, D5, DR5, DD5)
+<BR>
+Convert Hipparcos position to J2000.0 FK5 assuming zero Hipparcos
+ proper motion
+<LI> CALL sla_DBJIN (STRING, NSTRT, DRESLT, J1, J2)
+<BR>
+Like sla_DFLTIN but with extensions to accept leading `B' and `J'
+<LI> CALL sla_KBJ (JB, E, K, J)
+<BR>
+Select epoch prefix `B' or `J'
+<LI> D&nbsp;=&nbsp;sla_EPCO (K0, K, E)
+<BR>
+Convert an epoch into the appropriate form - `B' or `J'</UL>
+<BR><BIG><B>Elliptic Aberration</BIG></B><UL>
+<LI> CALL sla_ETRMS (EP, EV)
+<BR>
+E-terms
+<LI> CALL sla_SUBET (RC, DC, EQ, RM, DM)
+<BR>
+Remove the E-terms
+<LI> CALL sla_ADDET (RM, DM, EQ, RC, DC)
+<BR>
+Add the E-terms</UL>
+<BR><BIG><B>Geographical and Geocentric Coordinates</BIG></B><UL>
+<LI> CALL sla_OBS (NUMBER, ID, NAME, WLONG, PHI, HEIGHT)
+<BR>
+Interrogate list of observatory parameters
+<LI> CALL sla_GEOC (P, H, R, Z)
+<BR>
+Convert geodetic position to geocentric
+<LI> CALL sla_POLMO (ELONGM, PHIM, XP, YP, ELONG, PHI, DAZ)
+<BR>
+Polar motion
+<LI> CALL sla_PVOBS (P, H, STL, PV)
+<BR>
+Position and velocity of observatory</UL>
+<BR><BIG><B>Apparent and Observed Place</BIG></B><UL>
+<LI> CALL sla_MAP (RM, DM, PR, PD, PX, RV, EQ, DATE, RA, DA)
+<BR>
+Mean place to geocentric apparent place
+<LI> CALL sla_MAPPA (EQ, DATE, AMPRMS)
+<BR>
+Precompute mean to apparent parameters
+<LI> CALL sla_MAPQK (RM, DM, PR, PD, PX, RV, AMPRMS, RA, DA)
+<BR>
+Mean to apparent using precomputed parameters
+<LI> CALL sla_MAPQKZ (RM, DM, AMPRMS, RA, DA)
+<BR>
+Mean to apparent using precomputed parameters, for zero proper
+ motion, parallax and radial velocity
+<LI> CALL sla_AMP (RA, DA, DATE, EQ, RM, DM)
+<BR>
+Geocentric apparent place to mean place
+<LI> CALL sla_AMPQK (RA, DA, AOPRMS, RM, DM)
+<BR>
+Apparent to mean using precomputed parameters
+<LI> CALL sla_AOP (
+ RAP, DAP, UTC, DUT, ELONGM, PHIM, HM, XP, YP,
+ TDK, PMB, RH, WL, TLR, AOB, ZOB, HOB, DOB, ROB)
+<BR>
+Apparent place to observed place
+<LI> CALL sla_AOPPA (
+ UTC, DUT, ELONGM, PHIM, HM, XP, YP,
+ TDK, PMB, RH, WL, TLR, AOPRMS)
+<BR>
+Precompute apparent to observed parameters
+<LI> CALL sla_AOPPAT (UTC, AOPRMS)
+<BR>
+Update sidereal time in apparent to observed parameters
+<LI> CALL sla_AOPQK (RAP, DAP, AOPRMS, AOB, ZOB, HOB, DOB, ROB)
+<BR>
+Apparent to observed using precomputed parameters
+<LI> CALL sla_OAP (
+ TYPE, OB1, OB2, UTC, DUT, ELONGM, PHIM, HM, XP, YP,
+ TDK, PMB, RH, WL, TLR, RAP, DAP)
+<BR>
+Observed to apparent
+<LI> CALL sla_OAPQK (TYPE, OB1, OB2, AOPRMS, RA, DA)
+<BR>
+Observed to apparent using precomputed parameters</UL>
+<BR><BIG><B>Azimuth and Elevation</BIG></B><UL>
+<LI> CALL sla_ALTAZ (
+ HA, DEC, PHI,
+ AZ, AZD, AZDD, EL, ELD, ELDD, PA, PAD, PADD)
+<BR>
+Positions, velocities <I>etc.</I> for an altazimuth mount
+<LI> CALL sla_E2H (HA, DEC, PHI, AZ, EL)
+<BR>
+CALL sla_DE2H (HA, DEC, PHI, AZ, EL)
+<BR>
+ <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$"> to <IMG WIDTH="66" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img28.gif"
+ ALT="$[\,Az,El~]$"><LI> CALL sla_H2E (AZ, EL, PHI, HA, DEC)
+<BR>
+CALL sla_DH2E (AZ, EL, PHI, HA, DEC)
+<BR>
+ <IMG WIDTH="66" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img28.gif"
+ ALT="$[\,Az,El~]$"> to <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$"><LI> CALL sla_PDA2H (P, D, A, H1, J1, H2, J2)
+<BR>
+Hour Angle corresponding to a given azimuth
+<LI> CALL sla_PDQ2H (P, D, Q, H1, J1, H2, J2)
+<BR>
+Hour Angle corresponding to a given parallactic angle
+<LI> D&nbsp;=&nbsp;sla_PA (HA, DEC, PHI)
+<BR>
+ <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$"> to parallactic angle
+<LI> D&nbsp;=&nbsp;sla_ZD (HA, DEC, PHI)
+<BR>
+ <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$"> to zenith distance</UL>
+<BR><BIG><B>Refraction and Air Mass</BIG></B><UL>
+<LI> CALL sla_REFRO (ZOBS, HM, TDK, PMB, RH, WL, PHI, TLR, EPS, REF)
+<BR>
+Change in zenith distance due to refraction
+<LI> CALL sla_REFCO (HM, TDK, PMB, RH, WL, PHI, TLR, EPS, REFA, REFB)
+<BR>
+Constants for simple refraction model (accurate)
+<LI> CALL sla_REFCOQ (TDK, PMB, RH, WL, REFA, REFB)
+<BR>
+Constants for simple refraction model (fast)
+<LI> CALL sla_ATMDSP ( TDK, PMB, RH, WL1, REFA1, REFB1, WL2, REFA2, REFB2 )
+<BR>
+Adjust refraction constants for colour
+<LI> CALL sla_REFZ (ZU, REFA, REFB, ZR)
+<BR>
+Unrefracted to refracted ZD, simple model
+<LI> CALL sla_REFV (VU, REFA, REFB, VR)
+<BR>
+Unrefracted to refracted <IMG WIDTH="66" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img28.gif"
+ ALT="$[\,Az,El~]$"> vector, simple model
+<LI> D&nbsp;=&nbsp;sla_AIRMAS (ZD)
+<BR>
+Air mass</UL>
+<BR><BIG><B>Ecliptic Coordinates</BIG></B><UL>
+<LI> CALL sla_ECMAT (DATE, RMAT)
+<BR>
+Equatorial to ecliptic rotation matrix
+<LI> CALL sla_EQECL (DR, DD, DATE, DL, DB)
+<BR>
+J2000.0 `FK5' to ecliptic coordinates
+<LI> CALL sla_ECLEQ (DL, DB, DATE, DR, DD)
+<BR>
+Ecliptic coordinates to J2000.0 `FK5'</UL>
+<BR><BIG><B>Galactic Coordinates</BIG></B><UL>
+<LI> CALL sla_EG50 (DR, DD, DL, DB)
+<BR>
+B1950.0 `FK4' to galactic
+<LI> CALL sla_GE50 (DL, DB, DR, DD)
+<BR>
+Galactic to B1950.0 `FK4'
+<LI> CALL sla_EQGAL (DR, DD, DL, DB)
+<BR>
+J2000.0 `FK5' to galactic
+<LI> CALL sla_GALEQ (DL, DB, DR, DD)
+<BR>
+Galactic to J2000.0 `FK5'</UL>
+<BR><BIG><B>Supergalactic Coordinates</BIG></B><UL>
+<LI> CALL sla_GALSUP (DL, DB, DSL, DSB)
+<BR>
+Galactic to supergalactic
+<LI> CALL sla_SUPGAL (DSL, DSB, DL, DB)
+<BR>
+Supergalactic to galactic</UL>
+<BR><BIG><B>Ephemerides</BIG></B><UL>
+<LI> CALL sla_DMOON (DATE, PV)
+<BR>
+Approximate geocentric position and velocity of the Moon
+<LI> CALL sla_EARTH (IY, ID, FD, PV)
+<BR>
+Approximate heliocentric position and velocity of the Earth
+<LI> CALL sla_EVP (DATE, DEQX, DVB, DPB, DVH, DPH)
+<BR>
+Barycentric and heliocentric velocity and position of the Earth
+<LI> CALL sla_MOON (IY, ID, FD, PV)
+<BR>
+Approximate geocentric position and velocity of the Moon
+<LI> CALL sla_PLANET (DATE, NP, PV, JSTAT)
+<BR>
+Approximate heliocentric position and velocity of a planet
+<LI> CALL sla_RDPLAN (DATE, NP, ELONG, PHI, RA, DEC, DIAM)
+<BR>
+Approximate topocentric apparent place of a planet
+<LI> CALL sla_PLANEL (
+ DATE, JFORM, EPOCH, ORBINC, ANODE, PERIH,
+ AORQ, E, AORL, DM, PV, JSTAT)
+<BR>
+Heliocentric position and velocity of a planet, asteroid or
+ comet, starting from orbital elements
+<LI> CALL sla_PLANTE (
+ DATE, ELONG, PHI, JFORM, EPOCH, ORBINC, ANODE,
+ PERIH, AORQ, E, AORL, DM, RA, DEC, R, JSTAT)
+<BR>
+Topocentric apparent place of a Solar-System object whose
+ heliocentric orbital elements are known
+<LI> CALL sla_PV2EL (
+ PV, DATE, PMASS, JFORMR, JFORM, EPOCH, ORBINC,
+ ANODE, PERIH, AORQ, E, AORL, DM, JSTAT)
+<BR>
+Orbital elements of a planet from instantaneous position and velocity
+<LI> CALL sla_PERTEL (
+ JFORM, DATE0, DATE1,
+ EPOCH0, ORBI0, ANODE0, PERIH0, AORQ0, E0, AM0,
+ EPOCH1, ORBI1, ANODE1, PERIH1, AORQ1, E1, AM1,
+ JSTAT)
+<BR>
+Update elements by applying perturbations
+<LI> CALL sla_EL2UE (
+ DATE, JFORM, EPOCH, ORBINC, ANODE,
+ PERIH, AORQ, E, AORL, DM,
+ U, JSTAT)
+<BR>
+Transform conventional elements to universal elements
+<LI> CALL sla_UE2EL (
+ U, JFORMR,
+ JFORM, EPOCH, ORBINC, ANODE, PERIH,
+ AORQ, E, AORL, DM, JSTAT)
+<BR>
+Transform universal elements to conventional elements
+<LI> CALL sla_PV2UE (PV, DATE, PMASS, U, JSTAT)
+<BR>
+Package a position and velocity for use as universal elements
+<LI> CALL sla_UE2PV (DATE, U, PV, JSTAT)
+<BR>
+Extract the position and velocity from universal elements
+<LI> CALL sla_PERTUE (DATE, U, JSTAT)
+<BR>
+Update universal elements by applying perturbations
+<LI> R&nbsp;=&nbsp;sla_RVEROT (PHI, RA, DA, ST)
+<BR>
+Velocity component due to rotation of the Earth
+<LI> CALL sla_ECOR (RM, DM, IY, ID, FD, RV, TL)
+<BR>
+Components of velocity and light time due to Earth orbital motion
+<LI> R&nbsp;=&nbsp;sla_RVLSRD (R2000, D2000)
+<BR>
+Velocity component due to solar motion wrt dynamical LSR
+<LI> R&nbsp;=&nbsp;sla_RVLSRK (R2000, D2000)
+<BR>
+Velocity component due to solar motion wrt kinematical LSR
+<LI> R&nbsp;=&nbsp;sla_RVGALC (R2000, D2000)
+<BR>
+Velocity component due to rotation of the Galaxy
+<LI> R&nbsp;=&nbsp;sla_RVLG (R2000, D2000)
+<BR>
+Velocity component due to rotation and translation of the
+ Galaxy, relative to the mean motion of the local group</UL>
+<BR><BIG><B>Astrometry</BIG></B><UL>
+<LI> CALL sla_S2TP (RA, DEC, RAZ, DECZ, XI, ETA, J)
+<BR>
+CALL sla_DS2TP (RA, DEC, RAZ, DECZ, XI, ETA, J)
+<BR>
+Transform spherical coordinates into tangent plane
+<LI> CALL sla_V2TP (V, V0, XI, ETA, J)
+<BR>
+CALL sla_DV2TP (V, V0, XI, ETA, J)
+<BR>
+Transform <IMG WIDTH="58" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img50.gif"
+ ALT="$[\,x,y,z\,]$"> into tangent plane coordinates
+<LI> CALL sla_DTP2S (XI, ETA, RAZ, DECZ, RA, DEC)
+<BR>
+CALL sla_TP2S (XI, ETA, RAZ, DECZ, RA, DEC)
+<BR>
+Transform tangent plane coordinates into spherical coordinates
+<LI> CALL sla_DTP2V (XI, ETA, V0, V)
+<BR>
+CALL sla_TP2V (XI, ETA, V0, V)
+<BR>
+Transform tangent plane coordinates into <IMG WIDTH="58" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img50.gif"
+ ALT="$[\,x,y,z\,]$"><LI> CALL sla_DTPS2C (XI, ETA, RA, DEC, RAZ1, DECZ1, RAZ2, DECZ2, N)
+<BR>
+CALL sla_TPS2C (XI, ETA, RA, DEC, RAZ1, DECZ1, RAZ2, DECZ2, N)
+<BR>
+Get plate centre from star <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> and tangent plane coordinates
+<LI> CALL sla_DTPV2C (XI, ETA, V, V01, V02, N)
+<BR>
+CALL sla_TPV2C (XI, ETA, V, V01, V02, N)
+<BR>
+Get plate centre from star <IMG WIDTH="58" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img50.gif"
+ ALT="$[\,x,y,z\,]$"> and tangent plane coordinates
+<LI> CALL sla_PCD (DISCO, X, Y)
+<BR>
+Apply pincushion/barrel distortion
+<LI> CALL sla_UNPCD (DISCO, X, Y)
+<BR>
+Remove pincushion/barrel distortion
+<LI> CALL sla_FITXY (ITYPE, NP, XYE, XYM, COEFFS, J)
+<BR>
+Fit a linear model to relate two sets of <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$"> coordinates
+<LI> CALL sla_PXY (NP, XYE, XYM, COEFFS, XYP, XRMS, YRMS, RRMS)
+<BR>
+Compute predicted coordinates and residuals
+<LI> CALL sla_INVF (FWDS, BKWDS, J)
+<BR>
+Invert a linear model
+<LI> CALL sla_XY2XY (X1, Y1, COEFFS, X2, Y2)
+<BR>
+Transform one <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$"><LI> CALL sla_DCMPF (COEFFS, XZ, YZ, XS, YS, PERP, ORIENT)
+<BR>
+Decompose a linear fit into scales <I>etc.</I></UL>
+<BR><BIG><B>Numerical Methods</BIG></B><UL>
+<LI> CALL sla_COMBN (NSEL, NCAND, LIST, J)
+<BR>
+Next combination (subset from a specified number of items)
+<LI> CALL sla_PERMUT (N, ISTATE, IORDER, J)
+<BR>
+Next permutation of a specified number of items
+<LI> CALL sla_SMAT (N, A, Y, D, JF, IW)
+<BR>
+CALL sla_DMAT (N, A, Y, D, JF, IW)
+<BR>
+Matrix inversion and solution of simultaneous equations
+<LI> CALL sla_SVD (M, N, MP, NP, A, W, V, WORK, JSTAT)
+<BR>
+Singular value decomposition of a matrix
+<LI> CALL sla_SVDSOL (M, N, MP, NP, B, U, W, V, WORK, X)
+<BR>
+Solution from given vector plus SVD
+<LI> CALL sla_SVDCOV (N, NP, NC, W, V, WORK, CVM)
+<BR>
+Covariance matrix from SVD
+<LI> R&nbsp;=&nbsp;sla_RANDOM (SEED)
+<BR>
+Generate pseudo-random real number in the range <IMG WIDTH="72" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img145.gif"
+ ALT="$0 \leq x < 1$"><LI> R&nbsp;=&nbsp;sla_GRESID (S)
+<BR>
+Generate pseudo-random normal deviate (<IMG WIDTH="15" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img251.gif"
+ ALT="$\equiv$"> `Gaussian residual')</UL>
+<BR><BIG><B>Real-time</BIG></B><UL>
+<LI> CALL sla_WAIT (DELAY)
+<BR>
+Interval wait</UL>
+<BR> <HR>
+<A NAME="tex2html2731" HREF="node229.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html2729" HREF="sun67.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2723" HREF="node227.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html2732" HREF="node229.html">About this document ...</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2730" HREF="sun67.html">SLALIB Positional Astronomy Library</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2724" HREF="node227.html">Numerical Methods</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node229.html b/src/slalib/sun67.htx/node229.html
new file mode 100644
index 0000000..ac949b4
--- /dev/null
+++ b/src/slalib/sun67.htx/node229.html
@@ -0,0 +1,65 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>About this document ... </TITLE>
+<META NAME="description" CONTENT="About this document ... ">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="previous" HREF="node228.html">
+<LINK REL="up" HREF="sun67.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif_gr.gif">
+<A NAME="tex2html2737" HREF="sun67.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2733" HREF="node228.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2738" HREF="sun67.html">SLALIB Positional Astronomy Library</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2734" HREF="node228.html">SUMMARY OF CALLS</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H1><A NAME="SECTION00070000000000000000">
+About this document ... </A>
+</H1>
+ <STRONG></STRONG><P>
+This document was generated using the
+<A HREF="http://www-dsed.llnl.gov/files/programs/unix/latex2html/manual/"><STRONG>LaTeX</STRONG>2<tt>HTML</tt></A> translator Version 97.1 (release) (July 13th, 1997)
+<P>
+Copyright &#169; 1993, 1994, 1995, 1996, 1997,
+<A HREF="http://cbl.leeds.ac.uk/nikos/personal.html">Nikos Drakos</A>,
+Computer Based Learning Unit, University of Leeds.
+<P>
+The command line arguments were: <BR>
+ <STRONG>latex2html</STRONG> <tt>-init_file .star2html-init -no_subdir -no_auto_link /home/user1/dec/ptw/hypertext/sun67_htx//sun67.tex</tt>.
+<P>
+The translation was initiated by Pat Wallace on 10/12/1999
+<BR> <HR>
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif_gr.gif">
+<A NAME="tex2html2737" HREF="sun67.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html2733" HREF="node228.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B>Up:</B> <A NAME="tex2html2738" HREF="sun67.html">SLALIB Positional Astronomy Library</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html2734" HREF="node228.html">SUMMARY OF CALLS</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node23.html b/src/slalib/sun67.htx/node23.html
new file mode 100644
index 0000000..dfb0e24
--- /dev/null
+++ b/src/slalib/sun67.htx/node23.html
@@ -0,0 +1,278 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_AOPQK - Quick Appt-to-Observed</TITLE>
+<META NAME="description" CONTENT="SLA_AOPQK - Quick Appt-to-Observed">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node24.html">
+<LINK REL="previous" HREF="node22.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node24.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html656" HREF="node24.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html654" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html648" HREF="node22.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html657" HREF="node24.html">SLA_ATMDSP - Atmospheric Dispersion</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html655" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html649" HREF="node22.html">SLA_AOPPAT - Update Appt-to-Obs Parameters</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000410000000000000000">SLA_AOPQK - Quick Appt-to-Observed</A>
+<A NAME="xref_SLA_AOPQK">&#160;</A><A NAME="SLA_AOPQK">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Quick apparent to observed place (but see Note&nbsp;8, below).
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_AOPQK (RAP, DAP, AOPRMS, AOB, ZOB, HOB, DOB, ROB)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RAP,DAP</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>geocentric apparent <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>AOPRMS</EM></TD>
+<TD ALIGN="LEFT"><B>D(14)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>star-independent apparent-to-observed parameters:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(1)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>geodetic latitude (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(2,3)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>sine and cosine of geodetic latitude</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(4)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>magnitude of diurnal aberration vector</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(5)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>height (metres)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(6)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>ambient temperature (degrees K)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(7)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>pressure (mB)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(8)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>relative humidity (0-1)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(9)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>wavelength (<IMG WIDTH="26" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img21.gif"
+ ALT="$\mu{\rm m}$">)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(10)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>lapse rate (degrees K per metre)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(11,12)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>refraction constants A and B (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(13)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>longitude + eqn of equinoxes +
+``sidereal <IMG WIDTH="16" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img19.gif"
+ ALT="$\Delta$">UT'' (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(14)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>local apparent sidereal time (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>AOB</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>observed azimuth (radians: N=0, E=<IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img22.gif"
+ ALT="$90^{\circ}$">)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ZOB</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>observed zenith distance (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>HOB</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>observed Hour Angle (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DOB</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>observed Declination (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ROB</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>observed Right Ascension (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>This routine returns zenith distance rather than elevation
+in order to reflect the fact that no allowance is made for
+depression of the horizon.
+ <DT>2.
+<DD>The accuracy of the result is limited by the corrections for
+ refraction. Providing the meteorological parameters are
+ known accurately and there are no gross local effects, the
+ predicted azimuth and elevation should be within about
+<P> <IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img25.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.1$"> for <IMG WIDTH="56" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img26.gif"
+ ALT="$\zeta<70^{\circ}$">. Even
+ at a topocentric zenith distance of
+ <IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img22.gif"
+ ALT="$90^{\circ}$">, the accuracy in elevation should be better than
+ 1&nbsp;arcminute; useful results are available for a further
+ <IMG WIDTH="18" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img27.gif"
+ ALT="$3^{\circ}$">, beyond which the sla_REFRO routine returns a
+ fixed value of the refraction. The complementary
+ routines sla_AOP (or sla_AOPQK) and sla_OAP (or sla_OAPQK)
+ are self-consistent to better than 1&nbsp;microarcsecond all over
+ the celestial sphere.
+ <DT>3.
+<DD>It is advisable to take great care with units, as even
+ unlikely values of the input parameters are accepted and
+ processed in accordance with the models used.
+ <DT>4.
+<DD><I>Apparent</I> <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> means the geocentric apparent right ascension
+ and declination, which is obtained from a catalogue mean place
+ by allowing for space motion, parallax, precession, nutation,
+ annual aberration, and the Sun's gravitational lens effect. For
+ star positions in the FK5 system (<I>i.e.</I> J2000), these effects can
+ be applied by means of the sla_MAP <I>etc.</I> routines. Starting from
+ other mean place systems, additional transformations will be
+ needed; for example, FK4 (<I>i.e.</I> B1950) mean places would first
+ have to be converted to FK5, which can be done with the
+ sla_FK425 <I>etc.</I> routines.
+ <DT>5.
+<DD><I>Observed</I> <IMG WIDTH="66" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img28.gif"
+ ALT="$[\,Az,El~]$"> means the position that would be seen by a
+ perfect theodolite located at the observer. This is obtained
+ from the geocentric apparent <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> by allowing for Earth
+ orientation and diurnal aberration, rotating from equator
+ to horizon coordinates, and then adjusting for refraction.
+ The <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$"> is obtained by rotating back into equatorial
+ coordinates, using the geodetic latitude corrected for polar
+ motion, and is the position that would be seen by a perfect
+ equatorial located at the observer and with its polar axis
+ aligned to the Earth's axis of rotation (<I>n.b.</I> not to the
+ refracted pole). Finally, the <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$"> is obtained by subtracting
+ the <I>h</I> from the local apparent ST.
+ <DT>6.
+<DD>To predict the required setting of a real telescope, the
+ observed place produced by this routine would have to be
+ adjusted for the tilt of the azimuth or polar axis of the
+ mounting (with appropriate corrections for mount flexures),
+ for non-perpendicularity between the mounting axes, for the
+ position of the rotator axis and the pointing axis relative
+ to it, for tube flexure, for gear and encoder errors, and
+ finally for encoder zero points. Some telescopes would, of
+ course, exhibit other properties which would need to be
+ accounted for at the appropriate point in the sequence.
+ <DT>7.
+<DD>The star-independent apparent-to-observed-place parameters
+ in AOPRMS may be computed by means of the sla_AOPPA routine.
+ If nothing has changed significantly except the time, the
+ sla_AOPPAT routine may be used to perform the requisite
+ partial recomputation of AOPRMS.
+ <DT>8.
+<DD>The ``sidereal <IMG WIDTH="16" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img19.gif"
+ ALT="$\Delta$">UT'' which forms part of AOPRMS(13)
+ is UT1-UTC converted from solar to
+ sidereal seconds and expressed in radians.
+ <DT>9.
+<DD>At zenith distances beyond about <IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img33.gif"
+ ALT="$76^\circ$">, the need for
+ special care with the corrections for refraction causes a
+ marked increase in execution time. Moreover, the effect
+ gets worse with increasing zenith distance. Adroit
+ programming in the calling application may allow the
+ problem to be reduced. Prepare an alternative AOPRMS array,
+ computed for zero air-pressure; this will disable the
+ refraction corrections and cause rapid execution. Using
+ this AOPRMS array, a preliminary call to the present routine
+ will, depending on the application, produce a rough position
+ which may be enough to establish whether the full, slow
+ calculation (using the real AOPRMS array) is worthwhile.
+ For example, there would be no need for the full calculation
+ if the preliminary call had already established that the
+ source was well below the elevation limits for a particular
+ telescope.
+ <DT>10.
+<DD>The azimuths <I>etc.</I> used by the present routine are with
+ respect to the celestial pole. Corrections to the terrestrial pole
+ can be computed using sla_POLMO.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html656" HREF="node24.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html654" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html648" HREF="node22.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html657" HREF="node24.html">SLA_ATMDSP - Atmospheric Dispersion</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html655" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html649" HREF="node22.html">SLA_AOPPAT - Update Appt-to-Obs Parameters</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node24.html b/src/slalib/sun67.htx/node24.html
new file mode 100644
index 0000000..aecbb98
--- /dev/null
+++ b/src/slalib/sun67.htx/node24.html
@@ -0,0 +1,213 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_ATMDSP - Atmospheric Dispersion</TITLE>
+<META NAME="description" CONTENT="SLA_ATMDSP - Atmospheric Dispersion">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node25.html">
+<LINK REL="previous" HREF="node23.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node25.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html666" HREF="node25.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html664" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html658" HREF="node23.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html667" HREF="node25.html">SLA_AV2M - Rotation Matrix from Axial Vector</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html665" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html659" HREF="node23.html">SLA_AOPQK - Quick Appt-to-Observed</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000411000000000000000">SLA_ATMDSP - Atmospheric Dispersion</A>
+<A NAME="xref_SLA_ATMDSP">&#160;</A><A NAME="SLA_ATMDSP">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Apply atmospheric-dispersion adjustments to refraction coefficients.
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_ATMDSP (TDK, PMB, RH, WL1, A1, B1, WL2, A2, B2)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>TDK</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>ambient temperature at the observer (degrees K)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PMB</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>pressure at the observer (mB)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RH</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>relative humidity at the observer (range 0-1)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>WL1</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>base wavelength (<IMG WIDTH="26" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img21.gif"
+ ALT="$\mu{\rm m}$">)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>A1</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>refraction coefficient A for wavelength WL1 (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>B1</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>refraction coefficient B for wavelength WL1 (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>WL2</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>wavelength for which adjusted A,B required (<IMG WIDTH="26" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img21.gif"
+ ALT="$\mu{\rm m}$">)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>A2</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>refraction coefficient A for wavelength WL2 (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>B2</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>refraction coefficient B for wavelength WL2 (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>To use this routine, first call sla_REFCO specifying WL1 as the
+wavelength. This yields refraction coefficients A1, B1, correct
+for that wavelength. Subsequently, calls to sla_ATMDSP specifying
+ different wavelengths will produce new, slightly adjusted
+ refraction coefficients A2, B2, which apply to the specified wavelength.
+ <DT>2.
+<DD>Most of the atmospheric dispersion happens between <IMG WIDTH="50" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img34.gif"
+ ALT="$0.7\,\mu{\rm m}$"> and the UV atmospheric cutoff, and the effect increases strongly
+ towards the UV end. For this reason a blue reference wavelength
+ is recommended, for example <IMG WIDTH="50" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img35.gif"
+ ALT="$0.4\,\mu{\rm m}$">. <DT>3.
+<DD>The accuracy, for this set of conditions: <BR>
+<BR>
+ <TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP>height above sea level</TD>
+<TD ALIGN="CENTER" NOWRAP>&nbsp;</TD>
+<TD ALIGN="LEFT" NOWRAP>2000m</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP>latitude</TD>
+<TD ALIGN="CENTER" NOWRAP>&nbsp;</TD>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img36.gif"
+ ALT="$29^\circ$"></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP>pressure</TD>
+<TD ALIGN="CENTER" NOWRAP>&nbsp;</TD>
+<TD ALIGN="LEFT" NOWRAP>793mB</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP>temperature</TD>
+<TD ALIGN="CENTER" NOWRAP>&nbsp;</TD>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="34" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img37.gif"
+ ALT="$290^\circ$">K</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP>humidity</TD>
+<TD ALIGN="CENTER" NOWRAP>&nbsp;</TD>
+<TD ALIGN="LEFT" NOWRAP>0.5 (50%)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP>lapse rate</TD>
+<TD ALIGN="CENTER" NOWRAP>&nbsp;</TD>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="86" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img38.gif"
+ ALT="$0.0065^\circ m^{-1}$"></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP>reference wavelength</TD>
+<TD ALIGN="CENTER" NOWRAP>&nbsp;</TD>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="50" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img35.gif"
+ ALT="$0.4\,\mu{\rm m}$"></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="RIGHT" NOWRAP>star elevation</TD>
+<TD ALIGN="CENTER" NOWRAP>&nbsp;</TD>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img39.gif"
+ ALT="$15^\circ$"></TD>
+</TR>
+</TABLE>
+<BR>
+<BR>
+is about 2.5mas RMS between 0.3 and <IMG WIDTH="50" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img40.gif"
+ ALT="$1.0\,\mu{\rm m}$">, and stays
+ within 4mas for the whole range longward of <IMG WIDTH="50" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img41.gif"
+ ALT="$0.3\,\mu{\rm m}$"> (compared with a total dispersion from 0.3 to <IMG WIDTH="45" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img42.gif"
+ ALT="$20\,\mu{\rm m}$"> of about <IMG WIDTH="25" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img43.gif"
+ ALT="$11\hspace{-0.05em}^{'\hspace{-0.1em}'}$">). These errors are typical for ordinary
+ conditions; in extreme conditions values a few times this size
+ may occur.
+ <DT>4.
+<DD>If either wavelength exceeds <IMG WIDTH="53" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img44.gif"
+ ALT="$100\,\mu{\rm m}$">, the radio case
+ is assumed and the returned refraction coefficients are the
+ same as the given ones.
+ <DT>5.
+<DD>The algorithm consists of calculation of the refractivity of the
+ air at the observer for the two wavelengths, using the methods
+ of the sla_REFRO routine, and then scaling of the two refraction
+ coefficients according to classical refraction theory. This
+ amounts to scaling the A coefficient in proportion to <IMG WIDTH="53" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img45.gif"
+ ALT="$(\mu-1)$"> and
+ the B coefficient almost in the same ratio (see R.M.Green,
+ <I>Spherical Astronomy,</I> Cambridge University Press, 1985).
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html666" HREF="node25.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html664" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html658" HREF="node23.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html667" HREF="node25.html">SLA_AV2M - Rotation Matrix from Axial Vector</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html665" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html659" HREF="node23.html">SLA_AOPQK - Quick Appt-to-Observed</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node25.html b/src/slalib/sun67.htx/node25.html
new file mode 100644
index 0000000..f557394
--- /dev/null
+++ b/src/slalib/sun67.htx/node25.html
@@ -0,0 +1,103 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_AV2M - Rotation Matrix from Axial Vector</TITLE>
+<META NAME="description" CONTENT="SLA_AV2M - Rotation Matrix from Axial Vector">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node26.html">
+<LINK REL="previous" HREF="node24.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node26.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html676" HREF="node26.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html674" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html668" HREF="node24.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html677" HREF="node26.html">SLA_BEAR - Direction Between Points on a Sphere</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html675" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html669" HREF="node24.html">SLA_ATMDSP - Atmospheric Dispersion</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000412000000000000000">SLA_AV2M - Rotation Matrix from Axial Vector</A>
+<A NAME="xref_SLA_AV2M">&#160;</A><A NAME="SLA_AV2M">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Form the rotation matrix corresponding to a given axial vector
+(single precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_AV2M (AXVEC, RMAT)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>AXVEC</EM></TD>
+<TH ALIGN="LEFT"><B>R(3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>axial vector (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RMAT</EM></TD>
+<TH ALIGN="LEFT"><B>R(3,3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>rotation matrix</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>A rotation matrix describes a rotation about some arbitrary axis.
+The axis is called the <I>Euler axis</I>, and the angle through which the
+reference frame rotates is called the Euler angle. The axial
+ vector supplied to this routine has the same direction as the
+ Euler axis, and its magnitude is the Euler angle in radians.
+ <DT>2.
+<DD>If AXVEC is null, the unit matrix is returned.
+ <DT>3.
+<DD>The reference frame rotates clockwise as seen looking along
+ the axial vector from the origin.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html676" HREF="node26.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html674" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html668" HREF="node24.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html677" HREF="node26.html">SLA_BEAR - Direction Between Points on a Sphere</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html675" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html669" HREF="node24.html">SLA_ATMDSP - Atmospheric Dispersion</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node26.html b/src/slalib/sun67.htx/node26.html
new file mode 100644
index 0000000..8296b32
--- /dev/null
+++ b/src/slalib/sun67.htx/node26.html
@@ -0,0 +1,123 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_BEAR - Direction Between Points on a Sphere</TITLE>
+<META NAME="description" CONTENT="SLA_BEAR - Direction Between Points on a Sphere">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node27.html">
+<LINK REL="previous" HREF="node25.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node27.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html686" HREF="node27.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html684" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html678" HREF="node25.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html687" HREF="node27.html">SLA_CAF2R - Deg,Arcmin,Arcsec to Radians</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html685" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html679" HREF="node25.html">SLA_AV2M - Rotation Matrix from Axial Vector</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000413000000000000000">SLA_BEAR - Direction Between Points on a Sphere</A>
+<A NAME="xref_SLA_BEAR">&#160;</A><A NAME="SLA_BEAR">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Returns the bearing (position angle) of one point on a
+sphere seen from another (single precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>R&nbsp;=&nbsp;sla_BEAR (A1, B1, A2, B2)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>A1,B1</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>spherical coordinates of one point</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>A2,B2</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>spherical coordinates of the other point</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>sla_BEAR</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>bearing from first point to second</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The spherical coordinates are <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$">,<IMG WIDTH="38" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img46.gif"
+ ALT="$[\lambda,\phi]$"> <I>etc.</I>, in radians.
+<DT>2.
+<DD>The result is the bearing (position angle), in radians,
+ of point [A2,B2] as seen
+ from point [A1,B1]. It is in the range <IMG WIDTH="25" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img47.gif"
+ ALT="$\pm \pi$">. The sense
+ is such that if [A2,B2]
+ is a small distance due east of [A1,B1] the result
+ is about <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img14.gif"
+ ALT="$+\pi/2$">. Zero is returned
+ if the two points are coincident.
+ <DT>3.
+<DD>If either B-coordinate is outside the range <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img15.gif"
+ ALT="$\pm\pi/2$">, the
+ result may correspond to ``the long way round''.
+ <DT>4.
+<DD>The routine sla_PAV performs an equivalent function except
+ that the points are specified in the form of Cartesian unit
+ vectors.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html686" HREF="node27.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html684" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html678" HREF="node25.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html687" HREF="node27.html">SLA_CAF2R - Deg,Arcmin,Arcsec to Radians</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html685" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html679" HREF="node25.html">SLA_AV2M - Rotation Matrix from Axial Vector</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node27.html b/src/slalib/sun67.htx/node27.html
new file mode 100644
index 0000000..6c176b5
--- /dev/null
+++ b/src/slalib/sun67.htx/node27.html
@@ -0,0 +1,122 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_CAF2R - Deg,Arcmin,Arcsec to Radians</TITLE>
+<META NAME="description" CONTENT="SLA_CAF2R - Deg,Arcmin,Arcsec to Radians">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node28.html">
+<LINK REL="previous" HREF="node26.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node28.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html696" HREF="node28.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html694" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html688" HREF="node26.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html697" HREF="node28.html">SLA_CALDJ - Calendar Date to MJD</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html695" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html689" HREF="node26.html">SLA_BEAR - Direction Between Points on a Sphere</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000414000000000000000">SLA_CAF2R - Deg,Arcmin,Arcsec to Radians</A>
+<A NAME="xref_SLA_CAF2R">&#160;</A><A NAME="SLA_CAF2R">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Convert degrees, arcminutes, arcseconds to radians
+(single precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_CAF2R (IDEG, IAMIN, ASEC, RAD, J)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>IDEG</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>degrees</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>IAMIN</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>arcminutes</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ASEC</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>arcseconds</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RAD</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>angle in radians</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>J</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>status:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 1 = IDEG outside range 0-359</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 2 = IAMIN outside range 0-59</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 3 = ASEC outside range 0-59.999<IMG WIDTH="21" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img48.gif"
+ ALT="$\cdots$"></TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The result is computed even if any of the range checks fail.
+<DT>2.
+<DD>The sign must be dealt with outside this routine.
+</DL></DL>
+<BR> <HR>
+<A NAME="tex2html696" HREF="node28.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html694" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html688" HREF="node26.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html697" HREF="node28.html">SLA_CALDJ - Calendar Date to MJD</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html695" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html689" HREF="node26.html">SLA_BEAR - Direction Between Points on a Sphere</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node28.html b/src/slalib/sun67.htx/node28.html
new file mode 100644
index 0000000..33bc93d
--- /dev/null
+++ b/src/slalib/sun67.htx/node28.html
@@ -0,0 +1,128 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_CALDJ - Calendar Date to MJD</TITLE>
+<META NAME="description" CONTENT="SLA_CALDJ - Calendar Date to MJD">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node29.html">
+<LINK REL="previous" HREF="node27.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node29.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html706" HREF="node29.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html704" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html698" HREF="node27.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html707" HREF="node29.html">SLA_CALYD - Calendar to Year, Day</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html705" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html699" HREF="node27.html">SLA_CAF2R - Deg,Arcmin,Arcsec to Radians</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000415000000000000000">SLA_CALDJ - Calendar Date to MJD</A>
+<A NAME="xref_SLA_CALDJ">&#160;</A><A NAME="SLA_CALDJ">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Gregorian Calendar to Modified Julian Date, with century default.
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_CALDJ (IY, IM, ID, DJM, J)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>IY,IM,ID</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>year, month, day in Gregorian calendar</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DJM</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>modified Julian Date (JD-2400000.5) for <IMG WIDTH="18" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img49.gif"
+ ALT="$0^{\rm h}$"></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>J</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>status:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 0 = OK</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 1 = bad year (MJD not computed)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 2 = bad month (MJD not computed)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 3 = bad day (MJD computed)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>This routine supports the <I>century default</I> feature.
+Acceptable years are:
+<UL>
+<LI> 00-49, interpreted as 2000-2049,
+<LI> 50-99, interpreted as 1950-1999, and
+<LI> 100 upwards, interpreted literally.
+ </UL>
+ For 1-100AD use the routine sla_CLDJ instead.
+ <DT>2.
+<DD>For year <I>n</I>BC use IY = -(<I>n</I>-1).
+ <DT>3.
+<DD>When an invalid year or month is supplied (status J&nbsp;=&nbsp;1&nbsp;or&nbsp;2)
+ the MJD is <B>not</B> computed. When an invalid day is supplied
+ (status J&nbsp;=&nbsp;3) the MJD <B>is</B> computed.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html706" HREF="node29.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html704" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html698" HREF="node27.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html707" HREF="node29.html">SLA_CALYD - Calendar to Year, Day</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html705" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html699" HREF="node27.html">SLA_CAF2R - Deg,Arcmin,Arcsec to Radians</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node29.html b/src/slalib/sun67.htx/node29.html
new file mode 100644
index 0000000..f831e5a
--- /dev/null
+++ b/src/slalib/sun67.htx/node29.html
@@ -0,0 +1,140 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_CALYD - Calendar to Year, Day</TITLE>
+<META NAME="description" CONTENT="SLA_CALYD - Calendar to Year, Day">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node30.html">
+<LINK REL="previous" HREF="node28.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node30.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html716" HREF="node30.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html714" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html708" HREF="node28.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html717" HREF="node30.html">SLA_CC2S - Cartesian to Spherical</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html715" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html709" HREF="node28.html">SLA_CALDJ - Calendar Date to MJD</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000416000000000000000">SLA_CALYD - Calendar to Year, Day</A>
+<A NAME="xref_SLA_CALYD">&#160;</A><A NAME="SLA_CALYD">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Gregorian calendar date to year and day in year, in a Julian
+calendar aligned to the 20th/21st century Gregorian calendar,
+ with century default.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_CALYD (IY, IM, ID, NY, ND, J)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>IY,IM,ID</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>year, month, day in Gregorian calendar:
+year may optionally omit the century</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>NY</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>year (re-aligned Julian calendar)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ND</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>day in year (1 = January 1st)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>J</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>status:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 0 = OK</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 1 = bad year (before -4711)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 2 = bad month</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 3 = bad day</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>This routine supports the <I>century default</I> feature.
+Acceptable years are:
+<UL>
+<LI> 00-49, interpreted as 2000-2049,
+<LI> 50-99, interpreted as 1950-1999, and
+<LI> other years after -4712 , interpreted literally.
+ </UL>
+ Use sla_CLYD for years before 100AD.
+ <DT>2.
+<DD>The purpose of sla_CALDJ is to support
+ sla_EARTH, sla_MOON and sla_ECOR.
+ <DT>3.
+<DD>Between 1900&nbsp;March&nbsp;1 and 2100&nbsp;February&nbsp;28 it returns answers
+ which are consistent with the ordinary Gregorian calendar.
+ Outside this range there will be a discrepancy which increases
+ by one day for every non-leap century year.
+ <DT>4.
+<DD>When an invalid year or month is supplied (status J&nbsp;=&nbsp;1 or J&nbsp;=&nbsp;2)
+ the results are <B>not</B> computed. When a day is
+ supplied which is outside the conventional range (status J&nbsp;=&nbsp;3)
+ the results <B>are</B> computed.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html716" HREF="node30.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html714" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html708" HREF="node28.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html717" HREF="node30.html">SLA_CC2S - Cartesian to Spherical</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html715" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html709" HREF="node28.html">SLA_CALDJ - Calendar Date to MJD</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node3.html b/src/slalib/sun67.htx/node3.html
new file mode 100644
index 0000000..886a149
--- /dev/null
+++ b/src/slalib/sun67.htx/node3.html
@@ -0,0 +1,76 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Purpose</TITLE>
+<META NAME="description" CONTENT="Purpose">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node4.html">
+<LINK REL="previous" HREF="node2.html">
+<LINK REL="up" HREF="node2.html">
+<LINK REL="next" HREF="node4.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html275" HREF="node4.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html273" HREF="node2.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html267" HREF="node2.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html276" HREF="node4.html">Example Application</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html274" HREF="node2.html">INTRODUCTION</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html268" HREF="node2.html">INTRODUCTION</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION00021000000000000000">
+Purpose</A>
+</H2>
+SLALIB<A NAME="tex2html1" HREF="footnode.html#412"><SUP><IMG ALIGN="BOTTOM" BORDER="1" ALT="[*]" SRC="foot_motif.gif"></SUP></A>
+is a library of routines
+intended to make accurate and reliable positional-astronomy
+applications easier to write.
+Most SLALIB routines are concerned with astronomical position and time, but a
+number have wider trigonometrical, numerical or general applications.
+The applications ASTROM, COCO, RV and TPOINT
+all make extensive use of the SLALIB
+routines, as do a number of telescope control systems around the world.
+The SLALIB versions currently in service are written in
+Fortran&nbsp;77 and run on VAX/VMS, several Unix platforms and PC.
+A generic ANSI&nbsp;C version is also available from the author; it is
+functionally similar to the Fortran version upon which the present
+document concentrates.
+<P>
+<BR> <HR>
+<A NAME="tex2html275" HREF="node4.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html273" HREF="node2.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html267" HREF="node2.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html276" HREF="node4.html">Example Application</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html274" HREF="node2.html">INTRODUCTION</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html268" HREF="node2.html">INTRODUCTION</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node30.html b/src/slalib/sun67.htx/node30.html
new file mode 100644
index 0000000..21b121e
--- /dev/null
+++ b/src/slalib/sun67.htx/node30.html
@@ -0,0 +1,103 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_CC2S - Cartesian to Spherical</TITLE>
+<META NAME="description" CONTENT="SLA_CC2S - Cartesian to Spherical">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node31.html">
+<LINK REL="previous" HREF="node29.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node31.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html726" HREF="node31.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html724" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html718" HREF="node29.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html727" HREF="node31.html">SLA_CC62S - Cartesian 6-Vector to Spherical</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html725" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html719" HREF="node29.html">SLA_CALYD - Calendar to Year, Day</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000417000000000000000">SLA_CC2S - Cartesian to Spherical</A>
+<A NAME="xref_SLA_CC2S">&#160;</A><A NAME="SLA_CC2S">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Cartesian coordinates to spherical coordinates (single precision).
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_CC2S (V, A, B)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>V</EM></TD>
+<TH ALIGN="LEFT"><B>R(3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="58" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img50.gif"
+ ALT="$[\,x,y,z\,]$"> vector</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>A,B</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>spherical coordinates in radians</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The spherical coordinates are longitude (+ve anticlockwise
+looking from the +ve latitude pole) and latitude. The
+Cartesian coordinates are right handed, with the <I>x</I>-axis
+ at zero longitude and latitude, and the <I>z</I>-axis at the
+ +ve latitude pole.
+ <DT>2.
+<DD>If V is null, zero A and B are returned.
+ <DT>3.
+<DD>At either pole, zero A is returned.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html726" HREF="node31.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html724" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html718" HREF="node29.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html727" HREF="node31.html">SLA_CC62S - Cartesian 6-Vector to Spherical</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html725" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html719" HREF="node29.html">SLA_CALYD - Calendar to Year, Day</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node31.html b/src/slalib/sun67.htx/node31.html
new file mode 100644
index 0000000..1877958
--- /dev/null
+++ b/src/slalib/sun67.htx/node31.html
@@ -0,0 +1,114 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_CC62S - Cartesian 6-Vector to Spherical</TITLE>
+<META NAME="description" CONTENT="SLA_CC62S - Cartesian 6-Vector to Spherical">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node32.html">
+<LINK REL="previous" HREF="node30.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node32.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html736" HREF="node32.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html734" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html728" HREF="node30.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html737" HREF="node32.html">SLA_CD2TF - Days to Hour,Min,Sec</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html735" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html729" HREF="node30.html">SLA_CC2S - Cartesian to Spherical</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000418000000000000000">SLA_CC62S - Cartesian 6-Vector to Spherical</A>
+<A NAME="xref_SLA_CC62S">&#160;</A><A NAME="SLA_CC62S">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Conversion of position &amp; velocity in Cartesian coordinates
+to spherical coordinates (single precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_CC62S (V, A, B, R, AD, BD, RD)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>V</EM></TD>
+<TH ALIGN="LEFT"><B>R(6)</B></TH>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="106" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img51.gif"
+ ALT="$[\,x,y,z,\dot{x},\dot{y},\dot{z}\,]$"></TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>A</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>longitude (radians) - for example <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$"></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>B</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>latitude (radians) - for example <IMG WIDTH="10" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img23.gif"
+ ALT="$\delta$"></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>R</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>radial coordinate</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>AD</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>longitude derivative (radians per unit time)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>BD</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>latitude derivative (radians per unit time)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RD</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>radial derivative</TD>
+</TR>
+</TABLE></DL>
+<BR> <HR>
+<A NAME="tex2html736" HREF="node32.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html734" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html728" HREF="node30.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html737" HREF="node32.html">SLA_CD2TF - Days to Hour,Min,Sec</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html735" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html729" HREF="node30.html">SLA_CC2S - Cartesian to Spherical</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node32.html b/src/slalib/sun67.htx/node32.html
new file mode 100644
index 0000000..9d7f8ab
--- /dev/null
+++ b/src/slalib/sun67.htx/node32.html
@@ -0,0 +1,115 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_CD2TF - Days to Hour,Min,Sec</TITLE>
+<META NAME="description" CONTENT="SLA_CD2TF - Days to Hour,Min,Sec">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node33.html">
+<LINK REL="previous" HREF="node31.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node33.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html746" HREF="node33.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html744" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html738" HREF="node31.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html747" HREF="node33.html">SLA_CLDJ - Calendar to MJD</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html745" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html739" HREF="node31.html">SLA_CC62S - Cartesian 6-Vector to Spherical</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000419000000000000000">SLA_CD2TF - Days to Hour,Min,Sec</A>
+<A NAME="xref_SLA_CD2TF">&#160;</A><A NAME="SLA_CD2TF">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Convert an interval in days to hours, minutes, seconds
+(single precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_CD2TF (NDP, DAYS, SIGN, IHMSF)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>NDP</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>number of decimal places of seconds</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DAYS</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>interval in days</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>SIGN</EM></TD>
+<TH ALIGN="LEFT"><B>C</B></TH>
+<TD ALIGN="LEFT" NOWRAP>`+' or `-'</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>IHMSF</EM></TD>
+<TD ALIGN="LEFT"><B>I(4)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>hours, minutes, seconds, fraction</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>NDP less than zero is interpreted as zero.
+<DT>2.
+<DD>The largest useful value for NDP is determined by the size of
+DAYS, the format of REAL floating-point numbers on the target
+ machine, and the risk of overflowing IHMSF(4). For example,
+ on a VAX computer, for DAYS up to 1.0, the available floating-point
+ precision corresponds roughly to NDP=3. This is well below
+ the ultimate limit of NDP=9 set by the capacity of the 32-bit
+ integer IHMSF(4).
+ <DT>3.
+<DD>The absolute value of DAYS may exceed 1.0. In cases where it
+ does not, it is up to the caller to test for and handle the
+ case where DAYS is very nearly 1.0 and rounds up to 24&nbsp;hours,
+ by testing for IHMSF(1)=24 and setting IHMSF(1-4) to zero.
+</DL></DL>
+<BR> <HR>
+<A NAME="tex2html746" HREF="node33.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html744" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html738" HREF="node31.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html747" HREF="node33.html">SLA_CLDJ - Calendar to MJD</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html745" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html739" HREF="node31.html">SLA_CC62S - Cartesian 6-Vector to Spherical</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node33.html b/src/slalib/sun67.htx/node33.html
new file mode 100644
index 0000000..556eb23
--- /dev/null
+++ b/src/slalib/sun67.htx/node33.html
@@ -0,0 +1,128 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_CLDJ - Calendar to MJD</TITLE>
+<META NAME="description" CONTENT="SLA_CLDJ - Calendar to MJD">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node34.html">
+<LINK REL="previous" HREF="node32.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node34.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html756" HREF="node34.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html754" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html748" HREF="node32.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html757" HREF="node34.html">SLA_CLYD - Calendar to Year, Day</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html755" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html749" HREF="node32.html">SLA_CD2TF - Days to Hour,Min,Sec</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000420000000000000000">SLA_CLDJ - Calendar to MJD</A>
+<A NAME="xref_SLA_CLDJ">&#160;</A><A NAME="SLA_CLDJ">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Gregorian Calendar to Modified Julian Date.
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_CLDJ (IY, IM, ID, DJM, J)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>IY,IM,ID</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>year, month, day in Gregorian calendar</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DJM</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>modified Julian Date (JD-2400000.5) for <IMG WIDTH="18" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img49.gif"
+ ALT="$0^{\rm h}$"></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>J</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>status:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 0 = OK</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 1 = bad year</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 2 = bad month</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 3 = bad day</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>When an invalid year or month is supplied (status J&nbsp;=&nbsp;1&nbsp;or&nbsp;2)
+the MJD is <B>not</B> computed. When an invalid day is supplied
+(status J&nbsp;=&nbsp;3) the MJD <B>is</B> computed.
+ <DT>2.
+<DD>The year must be -4699 (<I>i.e.</I> 4700BC) or later.
+ For year <I>n</I>BC use IY = -(<I>n</I>-1).
+ <DT>3.
+<DD>An alternative to the present routine is sla_CALDJ, which
+ accepts a year with the century missing.
+ </DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCE:</STRONG>
+<DD>The algorithm is derived from that of Hatcher,
+<I>Q.Jl.R.astr.Soc.</I> (1984) <B>25</B>, 53-55.
+ </DL>
+<BR> <HR>
+<A NAME="tex2html756" HREF="node34.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html754" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html748" HREF="node32.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html757" HREF="node34.html">SLA_CLYD - Calendar to Year, Day</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html755" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html749" HREF="node32.html">SLA_CD2TF - Days to Hour,Min,Sec</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node34.html b/src/slalib/sun67.htx/node34.html
new file mode 100644
index 0000000..266f38a
--- /dev/null
+++ b/src/slalib/sun67.htx/node34.html
@@ -0,0 +1,129 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_CLYD - Calendar to Year, Day</TITLE>
+<META NAME="description" CONTENT="SLA_CLYD - Calendar to Year, Day">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node35.html">
+<LINK REL="previous" HREF="node33.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node35.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html766" HREF="node35.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html764" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html758" HREF="node33.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html767" HREF="node35.html">SLA_COMBN - Next Combination</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html765" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html759" HREF="node33.html">SLA_CLDJ - Calendar to MJD</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000421000000000000000">SLA_CLYD - Calendar to Year, Day</A>
+<A NAME="xref_SLA_CLYD">&#160;</A><A NAME="SLA_CLYD">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Gregorian calendar date to year and day in year, in a Julian
+calendar aligned to the 20th/21st century Gregorian calendar.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_CLYD (IY, IM, ID, NY, ND, J)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>IY,IM,ID</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>year, month, day in Gregorian calendar</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>NY</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>year (re-aligned Julian calendar)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ND</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>day in year (1 = January 1st)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>J</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>status:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 0 = OK</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 1 = bad year (before -4711)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 2 = bad month</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 3 = bad day</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The purpose of sla_CLYD is to support sla_EARTH,
+sla_MOON and sla_ECOR.
+<DT>2.
+<DD>Between 1900&nbsp;March&nbsp;1 and 2100&nbsp;February&nbsp;28 it returns answers
+ which are consistent with the ordinary Gregorian calendar.
+ Outside this range there will be a discrepancy which increases
+ by one day for every non-leap century year.
+ <DT>3.
+<DD>When an invalid year or month is supplied (status J&nbsp;=&nbsp;1 or J&nbsp;=&nbsp;2)
+ the results are <B>not</B> computed. When a day is
+ supplied which is outside the conventional range (status J&nbsp;=&nbsp;3)
+ the results <B>are</B> computed.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html766" HREF="node35.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html764" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html758" HREF="node33.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html767" HREF="node35.html">SLA_COMBN - Next Combination</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html765" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html759" HREF="node33.html">SLA_CLDJ - Calendar to MJD</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node35.html b/src/slalib/sun67.htx/node35.html
new file mode 100644
index 0000000..8723385
--- /dev/null
+++ b/src/slalib/sun67.htx/node35.html
@@ -0,0 +1,142 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_COMBN - Next Combination</TITLE>
+<META NAME="description" CONTENT="SLA_COMBN - Next Combination">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node36.html">
+<LINK REL="previous" HREF="node34.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node36.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html776" HREF="node36.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html774" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html768" HREF="node34.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html777" HREF="node36.html">SLA_CR2AF - Radians to Deg,Arcmin,Arcsec</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html775" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html769" HREF="node34.html">SLA_CLYD - Calendar to Year, Day</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000422000000000000000">SLA_COMBN - Next Combination</A>
+<A NAME="xref_SLA_COMBN">&#160;</A><A NAME="SLA_COMBN">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Generate the next combination, a subset of a specified size chosen
+from a specified number of items.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_COMBN (NSEL, NCAND, LIST, J)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>NSEL</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>number of items (subset size)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>NCAND</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>number of candidates (set size)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>GIVEN and RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>LIST</EM></TD>
+<TH ALIGN="LEFT"><B>I(NSEL)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>latest combination, LIST(1)=0 to initialize</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>J</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>status:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -1 = illegal NSEL or NCAND</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 0 = OK</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> +1 = no more combinations available</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>NSEL and NCAND must both be at least 1, and NSEL must be less
+than or equal to NCAND.
+<DT>2.
+<DD>This routine returns, in the LIST array, a subset of NSEL integers
+ chosen from the range 1 to NCAND inclusive, in ascending order.
+ Before calling the routine for the first time, the caller must set
+ the first element of the LIST array to zero (any value less than 1
+ will do) to cause initialization.
+ <DT>3.
+<DD>The first combination to be generated is:
+ <BLOCKQUOTE>LIST(1)=1, LIST(2)=2, ..., LIST(NSEL)=NSEL
+ </BLOCKQUOTE>
+ This is also the combination returned for the ``finished'' (J=1) case.
+ The final permutation to be generated is:
+ <BLOCKQUOTE>LIST(1)=NCAND, LIST(2)=NCAND-1, ..., <BR>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LIST(NSEL)=NCAND-NSEL+1
+ </BLOCKQUOTE>
+ <DT>4.
+<DD>If the ``finished'' (J=1) status is ignored, the routine
+ continues to deliver combinations, the pattern repeating
+ every NCAND!/(NSEL!(NCAND-NSEL)!) calls.
+ <DT>5.
+<DD>The algorithm is by R.F.Warren-Smith (private communication).
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html776" HREF="node36.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html774" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html768" HREF="node34.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html777" HREF="node36.html">SLA_CR2AF - Radians to Deg,Arcmin,Arcsec</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html775" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html769" HREF="node34.html">SLA_CLYD - Calendar to Year, Day</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node36.html b/src/slalib/sun67.htx/node36.html
new file mode 100644
index 0000000..0932642
--- /dev/null
+++ b/src/slalib/sun67.htx/node36.html
@@ -0,0 +1,122 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_CR2AF - Radians to Deg,Arcmin,Arcsec</TITLE>
+<META NAME="description" CONTENT="SLA_CR2AF - Radians to Deg,Arcmin,Arcsec">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node37.html">
+<LINK REL="previous" HREF="node35.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node37.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html786" HREF="node37.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html784" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html778" HREF="node35.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html787" HREF="node37.html">SLA_CR2TF - Radians to Hour,Min,Sec</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html785" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html779" HREF="node35.html">SLA_COMBN - Next Combination</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000423000000000000000">SLA_CR2AF - Radians to Deg,Arcmin,Arcsec</A>
+<A NAME="xref_SLA_CR2AF">&#160;</A><A NAME="SLA_CR2AF">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Convert an angle in radians to degrees, arcminutes,
+arcseconds (single precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_CR2AF (NDP, ANGLE, SIGN, IDMSF)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>NDP</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>number of decimal places of arcseconds</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ANGLE</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>angle in radians</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>SIGN</EM></TD>
+<TH ALIGN="LEFT"><B>C</B></TH>
+<TD ALIGN="LEFT" NOWRAP>`+' or `-'</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>IDMSF</EM></TD>
+<TD ALIGN="LEFT"><B>I(4)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>degrees, arcminutes, arcseconds, fraction</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>NDP less than zero is interpreted as zero.
+<DT>2.
+<DD>The largest useful value for NDP is determined by the size of
+ANGLE, the format of REAL floating-point numbers on the target
+ machine, and the risk of overflowing IDMSF(4). For example,
+ on a VAX computer, for ANGLE up to <IMG WIDTH="20" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img52.gif"
+ ALT="$2\pi$">, the available floating-point
+ precision corresponds roughly to NDP=3. This is well below
+ the ultimate limit of NDP=9 set by the capacity of the 32-bit
+ integer IHMSF(4).
+ <DT>3.
+<DD>The absolute value of ANGLE may exceed <IMG WIDTH="20" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img52.gif"
+ ALT="$2\pi$">. In cases where it
+ does not, it is up to the caller to test for and handle the
+ case where ANGLE is very nearly <IMG WIDTH="20" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img52.gif"
+ ALT="$2\pi$"> and rounds up to <IMG WIDTH="34" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img53.gif"
+ ALT="$360^{\circ}$">, by testing for IDMSF(1)=360 and setting IDMSF(1-4) to zero.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html786" HREF="node37.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html784" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html778" HREF="node35.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html787" HREF="node37.html">SLA_CR2TF - Radians to Hour,Min,Sec</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html785" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html779" HREF="node35.html">SLA_COMBN - Next Combination</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node37.html b/src/slalib/sun67.htx/node37.html
new file mode 100644
index 0000000..cd25af4
--- /dev/null
+++ b/src/slalib/sun67.htx/node37.html
@@ -0,0 +1,121 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_CR2TF - Radians to Hour,Min,Sec</TITLE>
+<META NAME="description" CONTENT="SLA_CR2TF - Radians to Hour,Min,Sec">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node38.html">
+<LINK REL="previous" HREF="node36.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node38.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html796" HREF="node38.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html794" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html788" HREF="node36.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html797" HREF="node38.html">SLA_CS2C - Spherical to Cartesian</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html795" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html789" HREF="node36.html">SLA_CR2AF - Radians to Deg,Arcmin,Arcsec</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000424000000000000000">SLA_CR2TF - Radians to Hour,Min,Sec</A>
+<A NAME="xref_SLA_CR2TF">&#160;</A><A NAME="SLA_CR2TF">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Convert an angle in radians to hours, minutes, seconds
+(single precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_CR2TF (NDP, ANGLE, SIGN, IHMSF)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>NDP</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>number of decimal places of seconds</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ANGLE</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>angle in radians</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>SIGN</EM></TD>
+<TH ALIGN="LEFT"><B>C</B></TH>
+<TD ALIGN="LEFT" NOWRAP>`+' or `-'</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>IHMSF</EM></TD>
+<TD ALIGN="LEFT"><B>I(4)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>hours, minutes, seconds, fraction</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>NDP less than zero is interpreted as zero.
+<DT>2.
+<DD>The largest useful value for NDP is determined by the size of
+ANGLE, the format of REAL floating-point numbers on the target
+ machine, and the risk of overflowing IHMSF(4). For example,
+ on a VAX computer, for ANGLE up to <IMG WIDTH="20" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img52.gif"
+ ALT="$2\pi$">, the available floating-point
+ precision corresponds roughly to NDP=3. This is well below
+ the ultimate limit of NDP=9 set by the capacity of the 32-bit
+ integer IHMSF(4).
+ <DT>3.
+<DD>The absolute value of ANGLE may exceed <IMG WIDTH="20" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img52.gif"
+ ALT="$2\pi$">. In cases where it
+ does not, it is up to the caller to test for and handle the
+ case where ANGLE is very nearly <IMG WIDTH="20" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img52.gif"
+ ALT="$2\pi$"> and rounds up to 24&nbsp;hours,
+ by testing for IHMSF(1)=24 and setting IHMSF(1-4) to zero.
+</DL></DL>
+<BR> <HR>
+<A NAME="tex2html796" HREF="node38.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html794" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html788" HREF="node36.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html797" HREF="node38.html">SLA_CS2C - Spherical to Cartesian</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html795" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html789" HREF="node36.html">SLA_CR2AF - Radians to Deg,Arcmin,Arcsec</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node38.html b/src/slalib/sun67.htx/node38.html
new file mode 100644
index 0000000..93d4f63
--- /dev/null
+++ b/src/slalib/sun67.htx/node38.html
@@ -0,0 +1,99 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_CS2C - Spherical to Cartesian</TITLE>
+<META NAME="description" CONTENT="SLA_CS2C - Spherical to Cartesian">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node39.html">
+<LINK REL="previous" HREF="node37.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node39.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html806" HREF="node39.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html804" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html798" HREF="node37.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html807" HREF="node39.html">SLA_CS2C6 - Spherical Pos/Vel to Cartesian</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html805" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html799" HREF="node37.html">SLA_CR2TF - Radians to Hour,Min,Sec</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000425000000000000000">SLA_CS2C - Spherical to Cartesian</A>
+<A NAME="xref_SLA_CS2C">&#160;</A><A NAME="SLA_CS2C">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Spherical coordinates to Cartesian coordinates (single precision).
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_CS2C (A, B, V)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>A,B</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TH ALIGN="LEFT" NOWRAP>spherical coordinates in radians: <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> <I>etc.</I></TH>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>V</EM></TD>
+<TH ALIGN="LEFT"><B>R(3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="58" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img50.gif"
+ ALT="$[\,x,y,z\,]$"> unit vector</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTE:</STRONG>
+<DD>The spherical coordinates are longitude (+ve anticlockwise
+looking from the +ve latitude pole) and latitude. The
+ Cartesian coordinates are right handed, with the <I>x</I>-axis
+ at zero longitude and latitude, and the <I>z</I>-axis at the
+ +ve latitude pole.
+ </DL>
+<BR> <HR>
+<A NAME="tex2html806" HREF="node39.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html804" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html798" HREF="node37.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html807" HREF="node39.html">SLA_CS2C6 - Spherical Pos/Vel to Cartesian</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html805" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html799" HREF="node37.html">SLA_CR2TF - Radians to Hour,Min,Sec</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node39.html b/src/slalib/sun67.htx/node39.html
new file mode 100644
index 0000000..51bbf4f
--- /dev/null
+++ b/src/slalib/sun67.htx/node39.html
@@ -0,0 +1,114 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_CS2C6 - Spherical Pos/Vel to Cartesian</TITLE>
+<META NAME="description" CONTENT="SLA_CS2C6 - Spherical Pos/Vel to Cartesian">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node40.html">
+<LINK REL="previous" HREF="node38.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node40.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html816" HREF="node40.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html814" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html808" HREF="node38.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html817" HREF="node40.html">SLA_CTF2D - Hour,Min,Sec to Days</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html815" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html809" HREF="node38.html">SLA_CS2C - Spherical to Cartesian</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000426000000000000000">SLA_CS2C6 - Spherical Pos/Vel to Cartesian</A>
+<A NAME="xref_SLA_CS2C6">&#160;</A><A NAME="SLA_CS2C6">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Conversion of position &amp; velocity in spherical coordinates
+to Cartesian coordinates (single precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_CS2C6 (A, B, R, AD, BD, RD, V)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>A</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>longitude (radians) - for example <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$"></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>B</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>latitude (radians) - for example <IMG WIDTH="10" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img23.gif"
+ ALT="$\delta$"></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>R</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>radial coordinate</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>AD</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>longitude derivative (radians per unit time)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>BD</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>latitude derivative (radians per unit time)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RD</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>radial derivative</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>V</EM></TD>
+<TH ALIGN="LEFT"><B>R(6)</B></TH>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="106" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img51.gif"
+ ALT="$[\,x,y,z,\dot{x},\dot{y},\dot{z}\,]$"></TD>
+</TR>
+</TABLE></DL>
+<BR> <HR>
+<A NAME="tex2html816" HREF="node40.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html814" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html808" HREF="node38.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html817" HREF="node40.html">SLA_CTF2D - Hour,Min,Sec to Days</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html815" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html809" HREF="node38.html">SLA_CS2C - Spherical to Cartesian</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node4.html b/src/slalib/sun67.htx/node4.html
new file mode 100644
index 0000000..81c9586
--- /dev/null
+++ b/src/slalib/sun67.htx/node4.html
@@ -0,0 +1,131 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Example Application</TITLE>
+<META NAME="description" CONTENT="Example Application">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node5.html">
+<LINK REL="previous" HREF="node3.html">
+<LINK REL="up" HREF="node2.html">
+<LINK REL="next" HREF="node5.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html285" HREF="node5.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html283" HREF="node2.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html277" HREF="node3.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html286" HREF="node5.html">Scope</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html284" HREF="node2.html">INTRODUCTION</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html278" HREF="node3.html">Purpose</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION00022000000000000000">
+Example Application</A>
+</H2>
+Here is a simple example of an application program written
+using SLALIB calls:
+<P><PRE>
+ PROGRAM FK4FK5
+ *
+ * Read a B1950 position from I/O unit 5 and reply on I/O unit 6
+ * with the J2000 equivalent. Enter a period to quit.
+ *
+ IMPLICIT NONE
+ CHARACTER C*80,S
+ INTEGER I,J,IHMSF(4),IDMSF(4)
+ DOUBLE PRECISION R4,D4,R5,D5
+ LOGICAL BAD
+
+ * Loop until a period is entered
+ C = ' '
+ DO WHILE (C(:1).NE.'.')
+
+ * Read h m s d ' &quot;
+ READ (5,'(A)') C
+ IF (C(:1).NE.'.') THEN
+ BAD = .TRUE.
+
+ * Decode the RA
+ I = 1
+ CALL sla_DAFIN(C,I,R4,J)
+ IF (J.EQ.0) THEN
+ R4 = 15D0*R4
+
+ * Decode the Dec
+ CALL sla_DAFIN(C,I,D4,J)
+ IF (J.EQ.0) THEN
+
+ * FK4 to FK5
+ CALL sla_FK45Z(R4,D4,1950D0,R5,D5)
+
+ * Format and output the result
+ CALL sla_DR2TF(2,R5,S,IHMSF)
+ CALL sla_DR2AF(1,D5,S,IDMSF)
+ WRITE (6,
+ : '(1X,I2.2,2I3.2,''.'',I2.2,2X,A,I2.2,2I3.2,''.'',I1)')
+ : IHMSF,S,IDMSF
+ BAD = .FALSE.
+ END IF
+ END IF
+ IF (BAD) WRITE (6,'(1X,''?'')')
+ END IF
+ END DO
+
+ END
+</PRE>
+In this example, SLALIB not only provides the complicated FK4 to
+FK5 transformation but also
+simplifies the tedious and error-prone tasks
+of decoding and formatting angles
+expressed as hours, minutes <I>etc</I>. The
+example incorporates range checking, and avoids the
+notorious ``minus zero'' problem (an often-perpetrated bug where
+declinations between <IMG WIDTH="18" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img1.gif"
+ ALT="$0^{\circ}$"> and <IMG WIDTH="30" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img2.gif"
+ ALT="$-1^{\circ}$"> lose their minus
+sign).
+With a little extra elaboration and a few more calls to SLALIB,
+defaulting can be provided (enabling unused fields to
+be replaced with commas to avoid retyping), proper motions
+can be handled, different epochs can be specified, and
+so on. See the program COCO (SUN/56) for further ideas.
+<P>
+<BR> <HR>
+<A NAME="tex2html285" HREF="node5.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html283" HREF="node2.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html277" HREF="node3.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html286" HREF="node5.html">Scope</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html284" HREF="node2.html">INTRODUCTION</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html278" HREF="node3.html">Purpose</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node40.html b/src/slalib/sun67.htx/node40.html
new file mode 100644
index 0000000..438541e
--- /dev/null
+++ b/src/slalib/sun67.htx/node40.html
@@ -0,0 +1,125 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_CTF2D - Hour,Min,Sec to Days</TITLE>
+<META NAME="description" CONTENT="SLA_CTF2D - Hour,Min,Sec to Days">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node41.html">
+<LINK REL="previous" HREF="node39.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node41.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html826" HREF="node41.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html824" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html818" HREF="node39.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html827" HREF="node41.html">SLA_CTF2R - Hour,Min,Sec to Radians</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html825" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html819" HREF="node39.html">SLA_CS2C6 - Spherical Pos/Vel to Cartesian</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000427000000000000000">SLA_CTF2D - Hour,Min,Sec to Days</A>
+<A NAME="xref_SLA_CTF2D">&#160;</A><A NAME="SLA_CTF2D">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Convert hours, minutes, seconds to days (single precision).
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_CTF2D (IHOUR, IMIN, SEC, DAYS, J)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>IHOUR</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>hours</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>IMIN</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>minutes</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>SEC</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>seconds</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DAYS</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>interval in days</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>J</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>status:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 0 = OK</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 1 = IHOUR outside range 0-23</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 2 = IMIN outside range 0-59</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 3 = SEC outside range 0-59.999<IMG WIDTH="21" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img48.gif"
+ ALT="$\cdots$"></TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The result is computed even if any of the range checks fail.
+<DT>2.
+<DD>The sign must be dealt with outside this routine.
+</DL></DL>
+<BR> <HR>
+<A NAME="tex2html826" HREF="node41.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html824" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html818" HREF="node39.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html827" HREF="node41.html">SLA_CTF2R - Hour,Min,Sec to Radians</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html825" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html819" HREF="node39.html">SLA_CS2C6 - Spherical Pos/Vel to Cartesian</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node41.html b/src/slalib/sun67.htx/node41.html
new file mode 100644
index 0000000..bf3cf62
--- /dev/null
+++ b/src/slalib/sun67.htx/node41.html
@@ -0,0 +1,125 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_CTF2R - Hour,Min,Sec to Radians</TITLE>
+<META NAME="description" CONTENT="SLA_CTF2R - Hour,Min,Sec to Radians">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node42.html">
+<LINK REL="previous" HREF="node40.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node42.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html836" HREF="node42.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html834" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html828" HREF="node40.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html837" HREF="node42.html">SLA_DAF2R - Deg,Arcmin,Arcsec to Radians</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html835" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html829" HREF="node40.html">SLA_CTF2D - Hour,Min,Sec to Days</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000428000000000000000">SLA_CTF2R - Hour,Min,Sec to Radians</A>
+<A NAME="xref_SLA_CTF2R">&#160;</A><A NAME="SLA_CTF2R">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Convert hours, minutes, seconds to radians (single precision).
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_CTF2R (IHOUR, IMIN, SEC, RAD, J)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>IHOUR</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>hours</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>IMIN</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>minutes</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>SEC</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>seconds</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RAD</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>angle in radians</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>J</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>status:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 0 = OK</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 1 = IHOUR outside range 0-23</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 2 = IMIN outside range 0-59</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 3 = SEC outside range 0-59.999<IMG WIDTH="21" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img48.gif"
+ ALT="$\cdots$"></TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The result is computed even if any of the range checks fail.
+<DT>2.
+<DD>The sign must be dealt with outside this routine.
+</DL></DL>
+<BR> <HR>
+<A NAME="tex2html836" HREF="node42.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html834" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html828" HREF="node40.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html837" HREF="node42.html">SLA_DAF2R - Deg,Arcmin,Arcsec to Radians</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html835" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html829" HREF="node40.html">SLA_CTF2D - Hour,Min,Sec to Days</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node42.html b/src/slalib/sun67.htx/node42.html
new file mode 100644
index 0000000..faed2a4
--- /dev/null
+++ b/src/slalib/sun67.htx/node42.html
@@ -0,0 +1,122 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DAF2R - Deg,Arcmin,Arcsec to Radians</TITLE>
+<META NAME="description" CONTENT="SLA_DAF2R - Deg,Arcmin,Arcsec to Radians">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node43.html">
+<LINK REL="previous" HREF="node41.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node43.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html846" HREF="node43.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html844" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html838" HREF="node41.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html847" HREF="node43.html">SLA_DAFIN - Sexagesimal character string to angle</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html845" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html839" HREF="node41.html">SLA_CTF2R - Hour,Min,Sec to Radians</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000429000000000000000">SLA_DAF2R - Deg,Arcmin,Arcsec to Radians</A>
+<A NAME="xref_SLA_DAF2R">&#160;</A><A NAME="SLA_DAF2R">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Convert degrees, arcminutes, arcseconds to radians
+(double precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_DAF2R (IDEG, IAMIN, ASEC, RAD, J)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>IDEG</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>degrees</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>IAMIN</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>arcminutes</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ASEC</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>arcseconds</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RAD</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>angle in radians</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>J</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>status:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 1 = IDEG outside range 0-359</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 2 = IAMIN outside range 0-59</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 3 = ASEC outside range 0-59.999<IMG WIDTH="21" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img48.gif"
+ ALT="$\cdots$"></TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The result is computed even if any of the range checks fail.
+<DT>2.
+<DD>The sign must be dealt with outside this routine.
+</DL></DL>
+<BR> <HR>
+<A NAME="tex2html846" HREF="node43.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html844" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html838" HREF="node41.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html847" HREF="node43.html">SLA_DAFIN - Sexagesimal character string to angle</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html845" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html839" HREF="node41.html">SLA_CTF2R - Hour,Min,Sec to Radians</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node43.html b/src/slalib/sun67.htx/node43.html
new file mode 100644
index 0000000..8559153
--- /dev/null
+++ b/src/slalib/sun67.htx/node43.html
@@ -0,0 +1,229 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DAFIN - Sexagesimal character string to angle</TITLE>
+<META NAME="description" CONTENT="SLA_DAFIN - Sexagesimal character string to angle">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node44.html">
+<LINK REL="previous" HREF="node42.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node44.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html856" HREF="node44.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html854" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html848" HREF="node42.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html857" HREF="node44.html">SLA_DAT - TAI-UTC</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html855" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html849" HREF="node42.html">SLA_DAF2R - Deg,Arcmin,Arcsec to Radians</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000430000000000000000">SLA_DAFIN - Sexagesimal character string to angle</A>
+<A NAME="xref_SLA_DAFIN">&#160;</A><A NAME="SLA_DAFIN">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Decode a free-format sexagesimal string (degrees, arcminutes,
+arcseconds) into a double precision floating point
+ number (radians).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_DAFIN (STRING, NSTRT, DRESLT, JF)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>STRING</EM></TD>
+<TH ALIGN="LEFT"><B>C*(*)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>string containing deg, arcmin, arcsec fields</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>NSTRT</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>pointer to start of decode (beginning of STRING = 1)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>NSTRT</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>advanced past the decoded angle</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DRESLT</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>angle in radians</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>JF</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>status:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 0 = OK</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> +1 = default, DRESLT unchanged (note 2)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -1 = bad degrees (note 3)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -2 = bad arcminutes (note 3)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -3 = bad arcseconds (note 3)</TD>
+</TR>
+</TABLE></DL>
+<P><DL>
+<DT><STRONG>EXAMPLE</STRONG>
+<DD>: <BR>
+<BR>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TH ALIGN="LEFT"><I>argument</I></TH>
+<TH ALIGN="LEFT"><I>before</I></TH>
+<TH ALIGN="LEFT"><I>after</I></TH>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT">&nbsp;</TD>
+<TD ALIGN="LEFT">&nbsp;</TD>
+<TD ALIGN="LEFT">&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT">STRING</TD>
+<TD ALIGN="LEFT">'<code>-57 17 44.806 12 34 56.7</code>'</TD>
+<TD ALIGN="LEFT">unchanged</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT">NSTRT</TD>
+<TD ALIGN="LEFT">1</TD>
+<TD ALIGN="LEFT">16 (<I>i.e.</I> pointing to 12...)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT">RESLT</TD>
+<TD ALIGN="LEFT">-</TD>
+<TD ALIGN="LEFT">-1.00000<TT>D0</TT></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT">JF</TD>
+<TD ALIGN="LEFT">-</TD>
+<TD ALIGN="LEFT">&nbsp;</TD>
+</TR>
+</TABLE>
+ <DT><DD> A further call to sla_DAFIN, without adjustment of NSTRT, will
+ decode the second angle, <IMG WIDTH="90" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img4.gif"
+ ALT="$12^{\circ}\,34^{'}\,56^{''}.7$">.</DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The first three ``fields'' in STRING are degrees, arcminutes,
+arcseconds, separated by spaces or commas. The degrees field
+may be signed, but not the others. The decoding is carried
+ out by the sla_DFLTIN routine and is free-format.
+ <DT>2.
+<DD>Successive fields may be absent, defaulting to zero. For
+ zero status, the only combinations allowed are degrees alone,
+ degrees and arcminutes, and all three fields present. If all
+ three fields are omitted, a status of +1 is returned and DRESLT is
+ unchanged. In all other cases DRESLT is changed.
+ <DT>3.
+<DD>Range checking:
+ <UL>
+<LI> The degrees field is not range checked. However, it is
+ expected to be integral unless the other two fields are absent.
+<LI> The arcminutes field is expected to be 0-59, and integral if
+ the arcseconds field is present. If the arcseconds field
+ is absent, the arcminutes is expected to be 0-59.9999...
+<LI> The arcseconds field is expected to be 0-59.9999...
+<LI> Decoding continues even when a check has failed. Under these
+ circumstances the field takes the supplied value, defaulting to
+ zero, and the result DRESLT is computed and returned.
+ </UL>
+ <DT>4.
+<DD>Further fields after the three expected ones are not treated as
+ an error. The pointer NSTRT is left in the correct state for
+ further decoding with the present routine or with sla_DFLTIN
+ <I>etc</I>. See the example, above.
+ <DT>5.
+<DD>If STRING contains hours, minutes, seconds instead of
+ degrees <I>etc</I>,
+ or if the required units are turns (or days) instead of radians,
+ the result DRESLT should be multiplied as follows: <BR>
+<BR>
+<BR>
+ <TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TH ALIGN="LEFT"><I>for STRING</I></TH>
+<TH ALIGN="LEFT"><I>to obtain</I></TH>
+<TH ALIGN="LEFT"><I>multiply DRESLT by</I></TH>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT">&nbsp;</TD>
+<TD ALIGN="LEFT">&nbsp;</TD>
+<TD ALIGN="LEFT">&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><IMG WIDTH="10" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img5.gif"
+ ALT="${\circ}$">&nbsp;&nbsp;'&nbsp;&nbsp;''</TD>
+<TD ALIGN="LEFT">radians</TD>
+<TD ALIGN="LEFT">1.0<TT>D0</TT></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><IMG WIDTH="10" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img5.gif"
+ ALT="${\circ}$">&nbsp;&nbsp;'&nbsp;&nbsp;''</TD>
+<TD ALIGN="LEFT">turns</TD>
+<TD ALIGN="LEFT"><IMG WIDTH="227" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img6.gif"
+ ALT="$1/{2 \pi} = 0.1591549430918953358$"><TT>D0</TT></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT">h m s</TD>
+<TD ALIGN="LEFT">radians</TD>
+<TD ALIGN="LEFT">15.0<TT>D0</TT></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT">h m s</TD>
+<TD ALIGN="LEFT">days</TD>
+<TD ALIGN="LEFT"><IMG WIDTH="235" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img7.gif"
+ ALT="$15/{2\pi} = 2.3873241463784300365$"><TT>D0</TT></TD>
+</TR>
+</TABLE></DL></DL>
+<BR> <HR>
+<A NAME="tex2html856" HREF="node44.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html854" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html848" HREF="node42.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html857" HREF="node44.html">SLA_DAT - TAI-UTC</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html855" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html849" HREF="node42.html">SLA_DAF2R - Deg,Arcmin,Arcsec to Radians</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node44.html b/src/slalib/sun67.htx/node44.html
new file mode 100644
index 0000000..791aba6
--- /dev/null
+++ b/src/slalib/sun67.htx/node44.html
@@ -0,0 +1,109 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DAT - TAI-UTC</TITLE>
+<META NAME="description" CONTENT="SLA_DAT - TAI-UTC">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node45.html">
+<LINK REL="previous" HREF="node43.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node45.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html866" HREF="node45.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html864" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html858" HREF="node43.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html867" HREF="node45.html">SLA_DAV2M - Rotation Matrix from Axial Vector</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html865" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html859" HREF="node43.html">SLA_DAFIN - Sexagesimal character string to angle</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000431000000000000000">SLA_DAT - TAI-UTC</A>
+<A NAME="xref_SLA_DAT">&#160;</A><A NAME="SLA_DAT">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Increment to be applied to Coordinated Universal Time UTC to give
+International Atomic Time TAI.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>D&nbsp;=&nbsp;sla_DAT (UTC)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>UTC</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>UTC date as a modified JD (JD-2400000.5)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>sla_DAT</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>TAI-UTC in seconds</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The UTC is specified to be a date rather than a time to indicate
+that care needs to be taken not to specify an instant which lies
+within a leap second. Though in most cases UTC can include the
+ fractional part, correct behaviour on the day of a leap second
+ can be guaranteed only up to the end of the second
+ <IMG WIDTH="82" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img54.gif"
+ ALT="$23^{\rm h}\,59^{\rm m}\,59^{\rm s}$">. <DT>2.
+<DD>UTC began at 1960 January 1. To specify a UTC prior to this
+ date would be meaningless; in such cases the parameters
+ for the year 1960 are used by default.
+ <DT>3.
+<DD>This routine has to be updated on each occasion that a
+ leap second is announced, and programs using it relinked.
+ Refer to the program source code for information on when the
+ most recent leap second was added.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html866" HREF="node45.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html864" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html858" HREF="node43.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html867" HREF="node45.html">SLA_DAV2M - Rotation Matrix from Axial Vector</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html865" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html859" HREF="node43.html">SLA_DAFIN - Sexagesimal character string to angle</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node45.html b/src/slalib/sun67.htx/node45.html
new file mode 100644
index 0000000..4e11c46
--- /dev/null
+++ b/src/slalib/sun67.htx/node45.html
@@ -0,0 +1,103 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DAV2M - Rotation Matrix from Axial Vector</TITLE>
+<META NAME="description" CONTENT="SLA_DAV2M - Rotation Matrix from Axial Vector">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node46.html">
+<LINK REL="previous" HREF="node44.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node46.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html876" HREF="node46.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html874" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html868" HREF="node44.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html877" HREF="node46.html">SLA_DBEAR - Direction Between Points on a Sphere</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html875" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html869" HREF="node44.html">SLA_DAT - TAI-UTC</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000432000000000000000">SLA_DAV2M - Rotation Matrix from Axial Vector</A>
+<A NAME="xref_SLA_DAV2M">&#160;</A><A NAME="SLA_DAV2M">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Form the rotation matrix corresponding to a given axial vector
+(double precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_DAV2M (AXVEC, RMAT)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>AXVEC</EM></TD>
+<TH ALIGN="LEFT"><B>D(3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>axial vector (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RMAT</EM></TD>
+<TH ALIGN="LEFT"><B>D(3,3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>rotation matrix</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>A rotation matrix describes a rotation about some arbitrary axis.
+The axis is called the <I>Euler axis</I>, and the angle through which the
+reference frame rotates is called the <I>Euler angle</I>. The axial
+ vector supplied to this routine has the same direction as the
+ Euler axis, and its magnitude is the Euler angle in radians.
+ <DT>2.
+<DD>If AXVEC is null, the unit matrix is returned.
+ <DT>3.
+<DD>The reference frame rotates clockwise as seen looking along
+ the axial vector from the origin.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html876" HREF="node46.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html874" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html868" HREF="node44.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html877" HREF="node46.html">SLA_DBEAR - Direction Between Points on a Sphere</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html875" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html869" HREF="node44.html">SLA_DAT - TAI-UTC</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node46.html b/src/slalib/sun67.htx/node46.html
new file mode 100644
index 0000000..39a1ffd
--- /dev/null
+++ b/src/slalib/sun67.htx/node46.html
@@ -0,0 +1,123 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DBEAR - Direction Between Points on a Sphere</TITLE>
+<META NAME="description" CONTENT="SLA_DBEAR - Direction Between Points on a Sphere">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node47.html">
+<LINK REL="previous" HREF="node45.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node47.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html886" HREF="node47.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html884" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html878" HREF="node45.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html887" HREF="node47.html">SLA_DBJIN - Decode String to B/J Epoch (DP)</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html885" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html879" HREF="node45.html">SLA_DAV2M - Rotation Matrix from Axial Vector</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000433000000000000000">SLA_DBEAR - Direction Between Points on a Sphere</A>
+<A NAME="xref_SLA_DBEAR">&#160;</A><A NAME="SLA_DBEAR">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Returns the bearing (position angle) of one point on a
+sphere relative to another (double precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>D&nbsp;=&nbsp;sla_DBEAR (A1, B1, A2, B2)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>A1,B1</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>spherical coordinates of one point</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>A2,B2</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>spherical coordinates of the other point</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>sla_DBEAR</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>bearing from first point to second</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The spherical coordinates are <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$">,<IMG WIDTH="38" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img46.gif"
+ ALT="$[\lambda,\phi]$"> <I>etc.</I>, in radians.
+<DT>2.
+<DD>The result is the bearing (position angle), in radians,
+ of point [A2,B2] as seen
+ from point [A1,B1]. It is in the range <IMG WIDTH="25" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img47.gif"
+ ALT="$\pm \pi$">. The sense
+ is such that if [A2,B2]
+ is a small distance due east of [A1,B1] the result
+ is about <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img14.gif"
+ ALT="$+\pi/2$">. Zero is returned
+ if the two points are coincident.
+ <DT>3.
+<DD>If either B-coordinate is outside the range <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img15.gif"
+ ALT="$\pm\pi/2$">, the
+ result may correspond to ``the long way round''.
+ <DT>4.
+<DD>The routine sla_DPAV performs an equivalent function except
+ that the points are specified in the form of Cartesian unit
+ vectors.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html886" HREF="node47.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html884" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html878" HREF="node45.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html887" HREF="node47.html">SLA_DBJIN - Decode String to B/J Epoch (DP)</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html885" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html879" HREF="node45.html">SLA_DAV2M - Rotation Matrix from Axial Vector</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node47.html b/src/slalib/sun67.htx/node47.html
new file mode 100644
index 0000000..5d8e877
--- /dev/null
+++ b/src/slalib/sun67.htx/node47.html
@@ -0,0 +1,157 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DBJIN - Decode String to B/J Epoch (DP)</TITLE>
+<META NAME="description" CONTENT="SLA_DBJIN - Decode String to B/J Epoch (DP)">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node48.html">
+<LINK REL="previous" HREF="node46.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node48.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html896" HREF="node48.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html894" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html888" HREF="node46.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html897" HREF="node48.html">SLA_DC62S - Cartesian 6-Vector to Spherical</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html895" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html889" HREF="node46.html">SLA_DBEAR - Direction Between Points on a Sphere</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000434000000000000000">SLA_DBJIN - Decode String to B/J Epoch (DP)</A>
+<A NAME="xref_SLA_DBJIN">&#160;</A><A NAME="SLA_DBJIN">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Decode a character string into a DOUBLE PRECISION number,
+with special provision for Besselian and Julian epochs.
+ The string syntax is as for sla_DFLTIN, prefixed by
+ an optional `B' or `J'.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_DBJIN (STRING, NSTRT, DRESLT, J1, J2)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>STRING</EM></TD>
+<TH ALIGN="LEFT"><B>C</B></TH>
+<TD ALIGN="LEFT" NOWRAP>string containing field to be decoded</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>NSTRT</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>pointer to first character of field in string</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>NSTRT</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>incremented past the decoded field</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DRESLT</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>result</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>J1</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>DFLTIN status:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -1 = -OK</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 0 = +OK</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 1 = null field</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 2 = error</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>J2</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>syntax flag:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 0 = normal DFLTIN syntax</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 1 = `B' or `b'</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 2 = `J' or `j'</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The purpose of the syntax extensions is to help cope with mixed
+FK4 and FK5 data, allowing fields such as `B1950' or `J2000'
+to be decoded.
+ <DT>2.
+<DD>In addition to the syntax accepted by sla_DFLTIN,
+ the following two extensions are recognized by sla_DBJIN:
+ <DL COMPACT>
+<DT>(a)
+<DD>A valid non-null field preceded by the character `B'
+(or `b') is accepted.
+ <DT>(b)
+<DD>A valid non-null field preceded by the character `J'
+ (or `j') is accepted.
+ </DL>
+ <DT>3.
+<DD>The calling program is told of the `B' or `J' through an
+ supplementary status argument. The rest of
+ the arguments are as for sla_DFLTIN.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html896" HREF="node48.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html894" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html888" HREF="node46.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html897" HREF="node48.html">SLA_DC62S - Cartesian 6-Vector to Spherical</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html895" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html889" HREF="node46.html">SLA_DBEAR - Direction Between Points on a Sphere</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node48.html b/src/slalib/sun67.htx/node48.html
new file mode 100644
index 0000000..95057e4
--- /dev/null
+++ b/src/slalib/sun67.htx/node48.html
@@ -0,0 +1,110 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DC62S - Cartesian 6-Vector to Spherical</TITLE>
+<META NAME="description" CONTENT="SLA_DC62S - Cartesian 6-Vector to Spherical">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node49.html">
+<LINK REL="previous" HREF="node47.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node49.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html906" HREF="node49.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html904" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html898" HREF="node47.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html907" HREF="node49.html">SLA_DCC2S - Cartesian to Spherical</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html905" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html899" HREF="node47.html">SLA_DBJIN - Decode String to B/J Epoch (DP)</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000435000000000000000">SLA_DC62S - Cartesian 6-Vector to Spherical</A>
+<A NAME="xref_SLA_DC62S">&#160;</A><A NAME="SLA_DC62S">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Conversion of position &amp; velocity in Cartesian coordinates
+to spherical coordinates (double precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_DC62S (V, A, B, R, AD, BD, RD)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>V</EM></TD>
+<TH ALIGN="LEFT"><B>D(6)</B></TH>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="106" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img51.gif"
+ ALT="$[\,x,y,z,\dot{x},\dot{y},\dot{z}\,]$"></TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>A</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>longitude (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>B</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>latitude (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>R</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>radial coordinate</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>AD</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>longitude derivative (radians per unit time)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>BD</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>latitude derivative (radians per unit time)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RD</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>radial derivative</TD>
+</TR>
+</TABLE></DL>
+<BR> <HR>
+<A NAME="tex2html906" HREF="node49.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html904" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html898" HREF="node47.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html907" HREF="node49.html">SLA_DCC2S - Cartesian to Spherical</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html905" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html899" HREF="node47.html">SLA_DBJIN - Decode String to B/J Epoch (DP)</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node49.html b/src/slalib/sun67.htx/node49.html
new file mode 100644
index 0000000..86f582e
--- /dev/null
+++ b/src/slalib/sun67.htx/node49.html
@@ -0,0 +1,103 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DCC2S - Cartesian to Spherical</TITLE>
+<META NAME="description" CONTENT="SLA_DCC2S - Cartesian to Spherical">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node50.html">
+<LINK REL="previous" HREF="node48.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node50.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html916" HREF="node50.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html914" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html908" HREF="node48.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html917" HREF="node50.html">SLA_DCMPF - Interpret Linear Fit</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html915" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html909" HREF="node48.html">SLA_DC62S - Cartesian 6-Vector to Spherical</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000436000000000000000">SLA_DCC2S - Cartesian to Spherical</A>
+<A NAME="xref_SLA_DCC2S">&#160;</A><A NAME="SLA_DCC2S">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Cartesian coordinates to spherical coordinates (double precision).
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_DCC2S (V, A, B)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>V</EM></TD>
+<TH ALIGN="LEFT"><B>D(3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="58" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img50.gif"
+ ALT="$[\,x,y,z\,]$"> vector</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>A,B</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>spherical coordinates in radians</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The spherical coordinates are longitude (+ve anticlockwise
+looking from the +ve latitude pole) and latitude. The
+Cartesian coordinates are right handed, with the <I>x</I>-axis
+ at zero longitude and latitude, and the <I>z</I>-axis at the
+ +ve latitude pole.
+ <DT>2.
+<DD>If V is null, zero A and B are returned.
+ <DT>3.
+<DD>At either pole, zero A is returned.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html916" HREF="node50.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html914" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html908" HREF="node48.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html917" HREF="node50.html">SLA_DCMPF - Interpret Linear Fit</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html915" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html909" HREF="node48.html">SLA_DC62S - Cartesian 6-Vector to Spherical</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node5.html b/src/slalib/sun67.htx/node5.html
new file mode 100644
index 0000000..3920866
--- /dev/null
+++ b/src/slalib/sun67.htx/node5.html
@@ -0,0 +1,83 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Scope</TITLE>
+<META NAME="description" CONTENT="Scope">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node6.html">
+<LINK REL="previous" HREF="node4.html">
+<LINK REL="up" HREF="node2.html">
+<LINK REL="next" HREF="node6.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html295" HREF="node6.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html293" HREF="node2.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html287" HREF="node4.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html296" HREF="node6.html">Objectives</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html294" HREF="node2.html">INTRODUCTION</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html288" HREF="node4.html">Example Application</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION00023000000000000000">
+Scope</A>
+</H2>
+SLALIB contains 183 routines covering the following topics:
+<UL>
+<LI> String Decoding,
+ Sexagesimal Conversions
+<LI> Angles, Vectors &amp; Rotation Matrices
+<LI> Calendars,
+ Timescales
+<LI> Precession &amp; Nutation
+<LI> Proper Motion
+<LI> FK4/FK5/Hipparcos,
+ Elliptic Aberration
+<LI> Geocentric Coordinates
+<LI> Apparent &amp; Observed Place
+<LI> Azimuth &amp; Elevation
+<LI> Refraction &amp; Air Mass
+<LI> Ecliptic,
+ Galactic,
+ Supergalactic Coordinates
+<LI> Ephemerides
+<LI> Astrometry
+<LI> Numerical Methods
+</UL>
+<BR> <HR>
+<A NAME="tex2html295" HREF="node6.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html293" HREF="node2.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html287" HREF="node4.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html296" HREF="node6.html">Objectives</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html294" HREF="node2.html">INTRODUCTION</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html288" HREF="node4.html">Example Application</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node50.html b/src/slalib/sun67.htx/node50.html
new file mode 100644
index 0000000..555de30
--- /dev/null
+++ b/src/slalib/sun67.htx/node50.html
@@ -0,0 +1,166 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DCMPF - Interpret Linear Fit</TITLE>
+<META NAME="description" CONTENT="SLA_DCMPF - Interpret Linear Fit">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node51.html">
+<LINK REL="previous" HREF="node49.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node51.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html926" HREF="node51.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html924" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html918" HREF="node49.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html927" HREF="node51.html">SLA_DCS2C - Spherical to Cartesian</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html925" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html919" HREF="node49.html">SLA_DCC2S - Cartesian to Spherical</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000437000000000000000">SLA_DCMPF - Interpret Linear Fit</A>
+<A NAME="xref_SLA_DCMPF">&#160;</A><A NAME="SLA_DCMPF">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Decompose an <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$"> linear fit into its constituent parameters:
+zero points, scales, nonperpendicularity and orientation.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_DCMPF (COEFFS,XZ,YZ,XS,YS,PERP,ORIENT)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>COEFFS</EM></TD>
+<TH ALIGN="LEFT"><B>D(6)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>transformation coefficients (see note)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>XZ</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TH ALIGN="LEFT" NOWRAP><I>x</I> zero point</TH>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>YZ</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP><I>y</I> zero point</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>XS</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP><I>x</I> scale</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>YS</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP><I>y</I> scale</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PERP</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>nonperpendicularity (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ORIENT</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>orientation (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The model relates two sets of <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$"> coordinates as follows.
+Naming the six elements of COEFFS <I>a</I>,<I>b</I>,<I>c</I>,<I>d</I>,<I>e</I> &amp; <I>f</I>,
+the model transforms coordinates <IMG WIDTH="53" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img55.gif"
+ ALT="$[x_{1},y_{1}\,]$"> into coordinates
+ <IMG WIDTH="53" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img56.gif"
+ ALT="$[x_{2},y_{2}\,]$"> as follows:
+ <BLOCKQUOTE><I>x<SUB>2</SUB></I> = <I>a</I> + <I>bx<SUB>1</SUB></I> + <I>cy<SUB>1</SUB></I> <BR>
+ <I>y<SUB>2</SUB></I> = <I>d</I> + <I>ex<SUB>1</SUB></I> + <I>fy<SUB>1</SUB></I></BLOCKQUOTE>
+ The sla_DCMPF routine decomposes this transformation
+ into four steps:
+ <DL COMPACT>
+<DT>(a)
+<DD>Zero points:
+<BLOCKQUOTE><IMG WIDTH="96" HEIGHT="30" ALIGN="MIDDLE" BORDER="0"
+ SRC="img57.gif"
+ ALT="$x' = x_{1} + {\rm XZ}$"> <BR>
+ <IMG WIDTH="94" HEIGHT="30" ALIGN="MIDDLE" BORDER="0"
+ SRC="img58.gif"
+ ALT="$y' = y_{1} + {\rm YZ}$"></BLOCKQUOTE>
+ <DT>(b)
+<DD>Scales:
+ <BLOCKQUOTE><IMG WIDTH="76" HEIGHT="16" ALIGN="BOTTOM" BORDER="0"
+ SRC="img59.gif"
+ ALT="$x'' = x' {\rm XS}$"> <BR>
+ <IMG WIDTH="74" HEIGHT="30" ALIGN="MIDDLE" BORDER="0"
+ SRC="img60.gif"
+ ALT="$y'' = y' {\rm YS}$"></BLOCKQUOTE>
+ <DT>(c)
+<DD>Nonperpendicularity:
+ <BLOCKQUOTE><IMG WIDTH="287" HEIGHT="30" ALIGN="MIDDLE" BORDER="0"
+ SRC="img61.gif"
+ ALT="$x''' = + x'' \cos {\rm PERP}/2 + y'' \sin {\rm PERP}/2$"> <BR>
+ <IMG WIDTH="286" HEIGHT="30" ALIGN="MIDDLE" BORDER="0"
+ SRC="img62.gif"
+ ALT="$y''' = + x'' \sin {\rm PERP}/2 + y'' \cos {\rm PERP}/2$"></BLOCKQUOTE>
+ <DT>(d)
+<DD>Orientation:
+ <BLOCKQUOTE><IMG WIDTH="298" HEIGHT="30" ALIGN="MIDDLE" BORDER="0"
+ SRC="img63.gif"
+ ALT="$x_{2} = + x''' \cos {\rm ORIENT} +
+ y''' \sin {\rm ORIENT}$"> <BR>
+ <IMG WIDTH="297" HEIGHT="30" ALIGN="MIDDLE" BORDER="0"
+ SRC="img64.gif"
+ ALT="$y_{2} = - x''' \sin {\rm ORIENT} +
+ y''' \cos {\rm ORIENT}$"></BLOCKQUOTE></DL>
+ <DT>2.
+<DD>See also sla_FITXY, sla_PXY, sla_INVF, sla_XY2XY.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html926" HREF="node51.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html924" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html918" HREF="node49.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html927" HREF="node51.html">SLA_DCS2C - Spherical to Cartesian</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html925" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html919" HREF="node49.html">SLA_DCC2S - Cartesian to Spherical</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node51.html b/src/slalib/sun67.htx/node51.html
new file mode 100644
index 0000000..1a8cb1b
--- /dev/null
+++ b/src/slalib/sun67.htx/node51.html
@@ -0,0 +1,99 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DCS2C - Spherical to Cartesian</TITLE>
+<META NAME="description" CONTENT="SLA_DCS2C - Spherical to Cartesian">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node52.html">
+<LINK REL="previous" HREF="node50.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node52.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html936" HREF="node52.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html934" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html928" HREF="node50.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html937" HREF="node52.html">SLA_DD2TF - Days to Hour,Min,Sec</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html935" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html929" HREF="node50.html">SLA_DCMPF - Interpret Linear Fit</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000438000000000000000">SLA_DCS2C - Spherical to Cartesian</A>
+<A NAME="xref_SLA_DCS2C">&#160;</A><A NAME="SLA_DCS2C">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Spherical coordinates to Cartesian coordinates (double precision).
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_DCS2C (A, B, V)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>A,B</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TH ALIGN="LEFT" NOWRAP>spherical coordinates in radians: <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> <I>etc.</I></TH>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>V</EM></TD>
+<TH ALIGN="LEFT"><B>D(3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="58" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img50.gif"
+ ALT="$[\,x,y,z\,]$"> unit vector</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTE:</STRONG>
+<DD>The spherical coordinates are longitude (+ve anticlockwise
+looking from the +ve latitude pole) and latitude. The
+ Cartesian coordinates are right handed, with the <I>x</I>-axis
+ at zero longitude and latitude, and the <I>z</I>-axis at the
+ +ve latitude pole.
+ </DL>
+<BR> <HR>
+<A NAME="tex2html936" HREF="node52.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html934" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html928" HREF="node50.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html937" HREF="node52.html">SLA_DD2TF - Days to Hour,Min,Sec</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html935" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html929" HREF="node50.html">SLA_DCMPF - Interpret Linear Fit</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node52.html b/src/slalib/sun67.htx/node52.html
new file mode 100644
index 0000000..52cca63
--- /dev/null
+++ b/src/slalib/sun67.htx/node52.html
@@ -0,0 +1,115 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DD2TF - Days to Hour,Min,Sec</TITLE>
+<META NAME="description" CONTENT="SLA_DD2TF - Days to Hour,Min,Sec">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node53.html">
+<LINK REL="previous" HREF="node51.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node53.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html946" HREF="node53.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html944" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html938" HREF="node51.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html947" HREF="node53.html">SLA_DE2H - to Az,El</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html945" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html939" HREF="node51.html">SLA_DCS2C - Spherical to Cartesian</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000439000000000000000">SLA_DD2TF - Days to Hour,Min,Sec</A>
+<A NAME="xref_SLA_DD2TF">&#160;</A><A NAME="SLA_DD2TF">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Convert an interval in days into hours, minutes, seconds
+(double precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_DD2TF (NDP, DAYS, SIGN, IHMSF)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>NDP</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>number of decimal places of seconds</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DAYS</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>interval in days</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>SIGN</EM></TD>
+<TH ALIGN="LEFT"><B>C</B></TH>
+<TD ALIGN="LEFT" NOWRAP>`+' or `-'</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>IHMSF</EM></TD>
+<TD ALIGN="LEFT"><B>I(4)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>hours, minutes, seconds, fraction</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>NDP less than zero is interpreted as zero.
+<DT>2.
+<DD>The largest useful value for NDP is determined by the size
+of DAYS, the format of DOUBLE PRECISION floating-point numbers
+ on the target machine, and the risk of overflowing IHMSF(4).
+ For example, on a VAX computer, for DAYS up to 1D0, the available
+ floating-point precision corresponds roughly to NDP=12. However,
+ the practical limit is NDP=9, set by the capacity of the 32-bit
+ integer IHMSF(4).
+ <DT>3.
+<DD>The absolute value of DAYS may exceed 1D0. In cases where it
+ does not, it is up to the caller to test for and handle the
+ case where DAYS is very nearly 1D0 and rounds up to 24&nbsp;hours,
+ by testing for IHMSF(1)=24 and setting IHMSF(1-4) to zero.
+</DL></DL>
+<BR> <HR>
+<A NAME="tex2html946" HREF="node53.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html944" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html938" HREF="node51.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html947" HREF="node53.html">SLA_DE2H - to Az,El</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html945" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html939" HREF="node51.html">SLA_DCS2C - Spherical to Cartesian</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node53.html b/src/slalib/sun67.htx/node53.html
new file mode 100644
index 0000000..05a6c56
--- /dev/null
+++ b/src/slalib/sun67.htx/node53.html
@@ -0,0 +1,145 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DE2H - to Az,El</TITLE>
+<META NAME="description" CONTENT="SLA_DE2H - to Az,El">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node54.html">
+<LINK REL="previous" HREF="node52.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node54.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html956" HREF="node54.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html954" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html948" HREF="node52.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html957" HREF="node54.html">SLA_DEULER - Euler Angles to Rotation Matrix</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html955" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html949" HREF="node52.html">SLA_DD2TF - Days to Hour,Min,Sec</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000440000000000000000">&#160;</A><A NAME="xref_SLA_DE2H">&#160;</A><A NAME="SLA_DE2H">&#160;</A>
+<BR>
+SLA_DE2H - <IMG WIDTH="27" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img65.gif"
+ ALT="$h,\delta$"> to Az,El
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Equatorial to horizon coordinates
+(double precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_DE2H (HA, DEC, PHI, AZ, EL)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>HA</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>hour angle (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DEC</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>declination (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PHI</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>latitude (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>AZ</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>azimuth (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>EL</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>elevation (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>Azimuth is returned in the range <IMG WIDTH="43" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img66.gif"
+ ALT="$0\!-\!2\pi$">; north is zero,
+and east is <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img14.gif"
+ ALT="$+\pi/2$">. Elevation is returned in the range
+<IMG WIDTH="25" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img47.gif"
+ ALT="$\pm \pi$">. <DT>2.
+<DD>The latitude must be geodetic. In critical applications,
+ corrections for polar motion should be applied.
+ <DT>3.
+<DD>In some applications it will be important to specify the
+ correct type of hour angle and declination in order to
+ produce the required type of azimuth and elevation. In
+ particular, it may be important to distinguish between
+ elevation as affected by refraction, which would
+ require the <I>observed</I> <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$">, and the elevation
+ <I>in vacuo</I>, which would require the <I>topocentric</I>
+ <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$">. If the effects of diurnal aberration can be neglected, the
+ <I>apparent</I> <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$"> may be used instead of the topocentric
+ <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$">. <DT>4.
+<DD>No range checking of arguments is carried out.
+ <DT>5.
+<DD>In applications which involve many such calculations, rather
+ than calling the present routine it will be more efficient to
+ use inline code, having previously computed fixed terms such
+ as sine and cosine of latitude, and (for tracking a star)
+ sine and cosine of declination.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html956" HREF="node54.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html954" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html948" HREF="node52.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html957" HREF="node54.html">SLA_DEULER - Euler Angles to Rotation Matrix</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html955" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html949" HREF="node52.html">SLA_DD2TF - Days to Hour,Min,Sec</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node54.html b/src/slalib/sun67.htx/node54.html
new file mode 100644
index 0000000..1fc9a2a
--- /dev/null
+++ b/src/slalib/sun67.htx/node54.html
@@ -0,0 +1,127 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DEULER - Euler Angles to Rotation Matrix</TITLE>
+<META NAME="description" CONTENT="SLA_DEULER - Euler Angles to Rotation Matrix">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node55.html">
+<LINK REL="previous" HREF="node53.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node55.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html966" HREF="node55.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html964" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html958" HREF="node53.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html967" HREF="node55.html">SLA_DFLTIN - Decode a Double Precision Number</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html965" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html959" HREF="node53.html">SLA_DE2H - to Az,El</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000441000000000000000">SLA_DEULER - Euler Angles to Rotation Matrix</A>
+<A NAME="xref_SLA_DEULER">&#160;</A><A NAME="SLA_DEULER">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Form a rotation matrix from the Euler angles - three
+successive rotations about specified Cartesian axes
+ (double precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_DEULER (ORDER, PHI, THETA, PSI, RMAT)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ORDER</EM></TD>
+<TH ALIGN="LEFT"><B>C</B></TH>
+<TD ALIGN="LEFT" NOWRAP>specifies about which axes the rotations occur</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PHI</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>1st rotation (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>THETA</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>2nd rotation (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PSI</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>3rd rotation (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RMAT</EM></TD>
+<TH ALIGN="LEFT"><B>D(3,3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>rotation matrix</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>A rotation is positive when the reference frame rotates
+anticlockwise as seen looking towards the origin from the
+positive region of the specified axis.
+ <DT>2.
+<DD>The characters of ORDER define which axes the three successive
+ rotations are about. A typical value is `ZXZ', indicating that
+ RMAT is to become the direction cosine matrix corresponding to
+ rotations of the reference frame through PHI radians about the
+ old <I>z</I>-axis, followed by THETA radians about the resulting
+ <I>x</I>-axis,
+ then PSI radians about the resulting <I>z</I>-axis.
+ <DT>3.
+<DD>The axis names can be any of the following, in any order or
+ combination: X, Y, Z, uppercase or lowercase, 1, 2, 3. Normal
+ axis labelling/numbering conventions apply; the <I>xyz</I> (<IMG WIDTH="44" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img67.gif"
+ ALT="$\equiv123$">) triad is right-handed. Thus, the `ZXZ' example given above
+ could be written `zxz' or `313' (or even `ZxZ' or `3xZ'). ORDER
+ is terminated by length or by the first unrecognized character.
+ Fewer than three rotations are acceptable, in which case the later
+ angle arguments are ignored. Zero rotations produces a unit RMAT.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html966" HREF="node55.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html964" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html958" HREF="node53.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html967" HREF="node55.html">SLA_DFLTIN - Decode a Double Precision Number</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html965" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html959" HREF="node53.html">SLA_DE2H - to Az,El</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node55.html b/src/slalib/sun67.htx/node55.html
new file mode 100644
index 0000000..390f876
--- /dev/null
+++ b/src/slalib/sun67.htx/node55.html
@@ -0,0 +1,200 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DFLTIN - Decode a Double Precision Number</TITLE>
+<META NAME="description" CONTENT="SLA_DFLTIN - Decode a Double Precision Number">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node56.html">
+<LINK REL="previous" HREF="node54.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node56.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html976" HREF="node56.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html974" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html968" HREF="node54.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html977" HREF="node56.html">SLA_DH2E - Az,El to</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html975" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html969" HREF="node54.html">SLA_DEULER - Euler Angles to Rotation Matrix</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000442000000000000000">SLA_DFLTIN - Decode a Double Precision Number</A>
+<A NAME="xref_SLA_DFLTIN">&#160;</A><A NAME="SLA_DFLTIN">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Convert free-format input into double precision floating point.
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_DFLTIN (STRING, NSTRT, DRESLT, JFLAG)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>STRING</EM></TD>
+<TH ALIGN="LEFT"><B>C</B></TH>
+<TD ALIGN="LEFT" NOWRAP>string containing number to be decoded</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>NSTRT</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>pointer to where decoding is to commence</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DRESLT</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>current value of result</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>NSTRT</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>advanced to next number</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DRESLT</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>result</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>JFLAG</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>status: -1&nbsp;=&nbsp;-OK, 0&nbsp;=&nbsp;+OK, 1&nbsp;=&nbsp;null result, 2&nbsp;=&nbsp;error</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The reason sla_DFLTIN has separate `OK' status values
+for + and - is to enable minus zero to be detected.
+This is of crucial importance
+ when decoding mixed-radix numbers. For example, an angle
+ expressed as degrees, arcminutes and arcseconds may have a
+ leading minus sign but a zero degrees field.
+ <DT>2.
+<DD>A TAB is interpreted as a space, and lowercase characters are
+ interpreted as uppercase. <I>n.b.</I> The test for TAB is
+ ASCII-specific.
+ <DT>3.
+<DD>The basic format is the sequence of fields <IMG WIDTH="78" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img68.gif"
+ ALT="$\pm n.n x \pm n$">, where <IMG WIDTH="15" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img30.gif"
+ ALT="$\pm$"> is a sign
+ character `+' or `-', <I>n</I> means a string of decimal digits,
+ `.' is a decimal point, and <I>x</I>, which indicates an exponent,
+ means `D' or `E'. Various combinations of these fields can be
+ omitted, and embedded blanks are permissible in certain places.
+ <DT>4.
+<DD>Spaces:
+ <UL>
+<LI> Leading spaces are ignored.
+<LI> Embedded spaces are allowed only after +, -, D or E,
+ and after the decimal point if the first sequence of
+ digits is absent.
+<LI> Trailing spaces are ignored; the first signifies
+ end of decoding and subsequent ones are skipped.
+ </UL>
+ <DT>5.
+<DD>Delimiters:
+ <UL>
+<LI> Any character other than +,-,0-9,.,D,E or space may be
+ used to signal the end of the number and terminate decoding.
+<LI> Comma is recognized by sla_DFLTIN as a special case; it
+ is skipped, leaving the pointer on the next character. See
+ 13, below.
+<LI> Decoding will in all cases terminate if end of string
+ is reached.
+ </UL>
+ <DT>6.
+<DD>Both signs are optional. The default is +.
+ <DT>7.
+<DD>The mantissa <I>n</I>.<I>n</I> defaults to unity.
+ <DT>8.
+<DD>The exponent <IMG WIDTH="36" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img69.gif"
+ ALT="$x\!\pm\!n$"> defaults to `D0'.
+ <DT>9.
+<DD>The strings of decimal digits may be of any length.
+ <DT>10.
+<DD>The decimal point is optional for whole numbers.
+ <DT>11.
+<DD>A <I>null result</I> occurs when the string of characters
+ being decoded does not begin with +,-,0-9,.,D or E, or
+ consists entirely of spaces. When this condition is
+ detected, JFLAG is set to 1 and DRESLT is left untouched.
+ <DT>12.
+<DD>NSTRT = 1 for the first character in the string.
+ <DT>13.
+<DD>On return from sla_DFLTIN, NSTRT is set ready for the next
+ decode - following trailing blanks and any comma. If a
+ delimiter other than comma is being used, NSTRT must be
+ incremented before the next call to sla_DFLTIN, otherwise
+ all subsequent calls will return a null result.
+ <DT>14.
+<DD>Errors (JFLAG=2) occur when:
+ <UL>
+<LI> a +, -, D or E is left unsatisfied; or
+<LI> the decimal point is present without at least
+ one decimal digit before or after it; or
+<LI> an exponent more than 100 has been presented.
+ </UL>
+ <DT>15.
+<DD>When an error has been detected, NSTRT is left
+ pointing to the character following the last
+ one used before the error came to light. This
+ may be after the point at which a more sophisticated
+ program could have detected the error. For example,
+ sla_DFLTIN does not detect that `1D999' is unacceptable
+ (on a computer where this is so) until the entire number
+ has been decoded.
+ <DT>16.
+<DD>Certain highly unlikely combinations of mantissa and
+ exponent can cause arithmetic faults during the
+ decode, in some cases despite the fact that they
+ together could be construed as a valid number.
+ <DT>17.
+<DD>Decoding is left to right, one pass.
+ <DT>18.
+<DD>See also sla_FLOTIN and sla_INTIN.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html976" HREF="node56.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html974" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html968" HREF="node54.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html977" HREF="node56.html">SLA_DH2E - Az,El to</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html975" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html969" HREF="node54.html">SLA_DEULER - Euler Angles to Rotation Matrix</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node56.html b/src/slalib/sun67.htx/node56.html
new file mode 100644
index 0000000..e71b073
--- /dev/null
+++ b/src/slalib/sun67.htx/node56.html
@@ -0,0 +1,146 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DH2E - Az,El to </TITLE>
+<META NAME="description" CONTENT="SLA_DH2E - Az,El to ">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node57.html">
+<LINK REL="previous" HREF="node55.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node57.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html986" HREF="node57.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html984" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html978" HREF="node55.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html987" HREF="node57.html">SLA_DIMXV - Apply 3D Reverse Rotation</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html985" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html979" HREF="node55.html">SLA_DFLTIN - Decode a Double Precision Number</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000443000000000000000">&#160;</A><A NAME="xref_SLA_DH2E">&#160;</A><A NAME="SLA_DH2E">&#160;</A>
+<BR>
+SLA_DH2E - Az,El to <IMG WIDTH="27" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img65.gif"
+ ALT="$h,\delta$"></H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Horizon to equatorial coordinates
+(double precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_DH2E (AZ, EL, PHI, HA, DEC)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>AZ</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>azimuth (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>EL</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>elevation (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PHI</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>latitude (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>HA</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>hour angle (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DEC</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>declination (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The sign convention for azimuth is north zero, east <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img14.gif"
+ ALT="$+\pi/2$">.<DT>2.
+<DD>HA is returned in the range <IMG WIDTH="25" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img47.gif"
+ ALT="$\pm \pi$">. Declination is returned
+in the range <IMG WIDTH="25" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img47.gif"
+ ALT="$\pm \pi$">. <DT>3.
+<DD>The latitude is (in principle) geodetic. In critical
+ applications, corrections for polar motion should be applied
+ (see sla_POLMO).
+ <DT>4.
+<DD>In some applications it will be important to specify the
+ correct type of elevation in order to produce the required
+ type of <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$">. In particular, it may be important to
+ distinguish between the elevation as affected by refraction,
+ which will yield the <I>observed</I> <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$">, and the elevation
+ <I>in vacuo</I>, which will yield the <I>topocentric</I>
+ <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$">. If the
+ effects of diurnal aberration can be neglected, the
+ topocentric <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$"> may be used as an approximation to the
+ <I>apparent</I> <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$">. <DT>5.
+<DD>No range checking of arguments is carried out.
+ <DT>6.
+<DD>In applications which involve many such calculations, rather
+ than calling the present routine it will be more efficient to
+ use inline code, having previously computed fixed terms such
+ as sine and cosine of latitude.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html986" HREF="node57.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html984" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html978" HREF="node55.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html987" HREF="node57.html">SLA_DIMXV - Apply 3D Reverse Rotation</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html985" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html979" HREF="node55.html">SLA_DFLTIN - Decode a Double Precision Number</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node57.html b/src/slalib/sun67.htx/node57.html
new file mode 100644
index 0000000..df5870d
--- /dev/null
+++ b/src/slalib/sun67.htx/node57.html
@@ -0,0 +1,118 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DIMXV - Apply 3D Reverse Rotation</TITLE>
+<META NAME="description" CONTENT="SLA_DIMXV - Apply 3D Reverse Rotation">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node58.html">
+<LINK REL="previous" HREF="node56.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node58.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html996" HREF="node58.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html994" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html988" HREF="node56.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html997" HREF="node58.html">SLA_DJCAL - MJD to Gregorian for Output</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html995" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html989" HREF="node56.html">SLA_DH2E - Az,El to</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000444000000000000000">SLA_DIMXV - Apply 3D Reverse Rotation</A>
+<A NAME="xref_SLA_DIMXV">&#160;</A><A NAME="SLA_DIMXV">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Multiply a 3-vector by the inverse of a rotation
+matrix (double precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_DIMXV (DM, VA, VB)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DM</EM></TD>
+<TH ALIGN="LEFT"><B>D(3,3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>rotation matrix</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>VA</EM></TD>
+<TD ALIGN="LEFT"><B>D(3)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>vector to be rotated</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>VB</EM></TD>
+<TH ALIGN="LEFT"><B>D(3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>result vector</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>This routine performs the operation:
+<BLOCKQUOTE><B>b</B> = <B>M</B><IMG WIDTH="17" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img70.gif"
+ ALT="$^{T}\cdot$"><B>a</B>
+</BLOCKQUOTE>
+ where <B>a</B> and <B>b</B> are the 3-vectors VA and VB
+ respectively, and <B>M</B> is the <IMG WIDTH="39" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img18.gif"
+ ALT="$3\times3$"> matrix DM.
+ <DT>2.
+<DD>The main function of this routine is apply an inverse
+ rotation; under these circumstances, <IMG WIDTH="17" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img71.gif"
+ ALT="${\bf \rm M}$"> is
+ <I>orthogonal</I>, with its inverse the same as its transpose.
+ <DT>3.
+<DD>To comply with the ANSI Fortran 77 standard, VA and VB must
+ <B>not</B> be the same array. The routine is, in fact, coded
+ so as to work properly on the VAX and many other systems even
+ if this rule is violated, something that is <B>not</B>, however,
+ recommended.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html996" HREF="node58.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html994" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html988" HREF="node56.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html997" HREF="node58.html">SLA_DJCAL - MJD to Gregorian for Output</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html995" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html989" HREF="node56.html">SLA_DH2E - Az,El to</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node58.html b/src/slalib/sun67.htx/node58.html
new file mode 100644
index 0000000..78f70fa
--- /dev/null
+++ b/src/slalib/sun67.htx/node58.html
@@ -0,0 +1,112 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DJCAL - MJD to Gregorian for Output</TITLE>
+<META NAME="description" CONTENT="SLA_DJCAL - MJD to Gregorian for Output">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node59.html">
+<LINK REL="previous" HREF="node57.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node59.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1006" HREF="node59.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1004" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html998" HREF="node57.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1007" HREF="node59.html">SLA_DJCL - MJD to Year,Month,Day,Frac</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1005" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html999" HREF="node57.html">SLA_DIMXV - Apply 3D Reverse Rotation</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000445000000000000000">SLA_DJCAL - MJD to Gregorian for Output</A>
+<A NAME="xref_SLA_DJCAL">&#160;</A><A NAME="SLA_DJCAL">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Modified Julian Date to Gregorian Calendar Date, expressed
+in a form convenient for formatting messages (namely
+ rounded to a specified precision, and with the fields
+ stored in a single array).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_DJCAL (NDP, DJM, IYMDF, J)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>NDP</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>number of decimal places of days in fraction</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DJM</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>modified Julian Date (JD-2400000.5)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>IYMDF</EM></TD>
+<TH ALIGN="LEFT"><B>I(4)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>year, month, day, fraction in Gregorian calendar</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>J</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>status: nonzero = out of range</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>Any date after 4701BC March 1 is accepted.
+<DT>2.
+<DD>NDP should be 4 or less to avoid overflow on machines which
+use 32-bit integers.
+ </DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCE:</STRONG>
+<DD>The algorithm is derived from that of Hatcher,
+<I>Q.Jl.R.astr.Soc.</I> (1984) <B>25</B>, 53-55.
+ </DL>
+<BR> <HR>
+<A NAME="tex2html1006" HREF="node59.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1004" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html998" HREF="node57.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1007" HREF="node59.html">SLA_DJCL - MJD to Year,Month,Day,Frac</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1005" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html999" HREF="node57.html">SLA_DIMXV - Apply 3D Reverse Rotation</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node59.html b/src/slalib/sun67.htx/node59.html
new file mode 100644
index 0000000..1d0b789
--- /dev/null
+++ b/src/slalib/sun67.htx/node59.html
@@ -0,0 +1,117 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DJCL - MJD to Year,Month,Day,Frac</TITLE>
+<META NAME="description" CONTENT="SLA_DJCL - MJD to Year,Month,Day,Frac">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node60.html">
+<LINK REL="previous" HREF="node58.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node60.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1016" HREF="node60.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1014" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1008" HREF="node58.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1017" HREF="node60.html">SLA_DM2AV - Rotation Matrix to Axial Vector</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1015" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1009" HREF="node58.html">SLA_DJCAL - MJD to Gregorian for Output</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000446000000000000000">SLA_DJCL - MJD to Year,Month,Day,Frac</A>
+<A NAME="xref_SLA_DJCL">&#160;</A><A NAME="SLA_DJCL">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Modified Julian Date to Gregorian year, month, day,
+and fraction of a day.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_DJCL (DJM, IY, IM, ID, FD, J)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DJM</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>modified Julian Date (JD-2400000.5)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>IY</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>year</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>IM</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>month</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ID</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>day</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>FD</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>fraction of day</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>J</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>status:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 0 = OK</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -1 = unacceptable date (before 4701BC March 1)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>REFERENCE:</STRONG>
+<DD>The algorithm is derived from that of Hatcher,
+<I>Q.Jl.R.astr.Soc.</I> (1984) <B>25</B>, 53-55.
+ </DL>
+<BR> <HR>
+<A NAME="tex2html1016" HREF="node60.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1014" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1008" HREF="node58.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1017" HREF="node60.html">SLA_DM2AV - Rotation Matrix to Axial Vector</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1015" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1009" HREF="node58.html">SLA_DJCAL - MJD to Gregorian for Output</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node6.html b/src/slalib/sun67.htx/node6.html
new file mode 100644
index 0000000..c90fd51
--- /dev/null
+++ b/src/slalib/sun67.htx/node6.html
@@ -0,0 +1,116 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Objectives</TITLE>
+<META NAME="description" CONTENT="Objectives">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node7.html">
+<LINK REL="previous" HREF="node5.html">
+<LINK REL="up" HREF="node2.html">
+<LINK REL="next" HREF="node7.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html305" HREF="node7.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html303" HREF="node2.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html297" HREF="node5.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html306" HREF="node7.html">Fortran Version</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html304" HREF="node2.html">INTRODUCTION</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html298" HREF="node5.html">Scope</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION00024000000000000000">
+Objectives</A>
+</H2>
+SLALIB was designed to give application programmers
+a basic set of positional-astronomy tools which were
+accurate and easy to use. To this end, the library is:
+<UL>
+<LI> Readily available, including source code and documentation.
+<LI> Supported and maintained.
+<LI> Portable - coded in standard languages and available for
+multiple computers and operating systems.
+<LI> Thoroughly commented, both for maintainability and to
+assist those wishing to cannibalize the code.
+<LI> Stable.
+<LI> Trustworthy - some care has gone into
+testing SLALIB, both by comparison with published data and
+by checks for internal consistency.
+<LI> Rigorous - corners are not cut,
+even where the practical consequences would, as a rule, be
+negligible.
+<LI> Comprehensive, without including too many esoteric features
+required only by specialists.
+<LI> Practical - almost all the routines have been written to
+satisfy real needs encountered during the development of
+real-life applications.
+<LI> Environment-independent - the package is
+completely free of pauses, stops, I/O <I>etc</I>.
+<LI> Self-contained - SLALIB calls no other libraries.
+</UL>
+A few <I>caveats</I>:
+<UL>
+<LI> SLALIB does not pretend to be canonical. It is in essence
+an anthology, and the adopted algorithms are liable
+to change as more up-to-date ones become available.
+<LI> The functions aren't orthogonal - there are several
+cases of different
+routines doing similar things, and many examples where
+sequences of SLALIB calls have simply been packaged, all to
+make applications less trouble to write.
+<LI> There are omissions - for example there are no
+routines for calculating physical ephemerides of
+Solar-System bodies.
+<LI> SLALIB is not homogeneous, though important subsets
+(for example the FK4/FK5 routines) are.
+<LI> The library is not foolproof. You have to know what
+you are trying to do (<I>e.g.</I> by reading textbooks on positional
+astronomy), and it is the caller's responsibility to supply
+sensible arguments (although enough internal validation is done to
+avoid arithmetic errors).
+<LI> Without being written in a wasteful
+manner, SLALIB is nonetheless optimized for maintainability
+rather than speed. In addition, there are many places
+where considerable simplification would be possible if some
+specified amount of accuracy could be sacrificed; such
+compromises are left to the individual programmer and
+are not allowed to limit SLALIB's value as a source
+of comparison results.
+</UL>
+<BR> <HR>
+<A NAME="tex2html305" HREF="node7.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html303" HREF="node2.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html297" HREF="node5.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html306" HREF="node7.html">Fortran Version</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html304" HREF="node2.html">INTRODUCTION</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html298" HREF="node5.html">Scope</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node60.html b/src/slalib/sun67.htx/node60.html
new file mode 100644
index 0000000..db12402
--- /dev/null
+++ b/src/slalib/sun67.htx/node60.html
@@ -0,0 +1,107 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DM2AV - Rotation Matrix to Axial Vector</TITLE>
+<META NAME="description" CONTENT="SLA_DM2AV - Rotation Matrix to Axial Vector">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node61.html">
+<LINK REL="previous" HREF="node59.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node61.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1026" HREF="node61.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1024" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1018" HREF="node59.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1027" HREF="node61.html">SLA_DMAT - Solve Simultaneous Equations</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1025" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1019" HREF="node59.html">SLA_DJCL - MJD to Year,Month,Day,Frac</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000447000000000000000">SLA_DM2AV - Rotation Matrix to Axial Vector</A>
+<A NAME="xref_SLA_DM2AV">&#160;</A><A NAME="SLA_DM2AV">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>From a rotation matrix, determine the corresponding axial vector
+(double precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_DM2AV (RMAT, AXVEC)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RMAT</EM></TD>
+<TH ALIGN="LEFT"><B>D(3,3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>rotation matrix</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>AXVEC</EM></TD>
+<TH ALIGN="LEFT"><B>D(3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>axial vector (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>A rotation matrix describes a rotation about some arbitrary axis.
+The axis is called the <I>Euler axis</I>, and the angle through
+which the reference frame rotates is called the <I>Euler angle</I>.
+ The <I>axial vector</I> returned by this routine has the same
+ direction as the Euler axis, and its magnitude is the Euler angle
+ in radians.
+ <DT>2.
+<DD>The magnitude and direction of the axial vector can be separated
+ by means of the routine sla_DVN.
+ <DT>3.
+<DD>The reference frame rotates clockwise as seen looking along
+ the axial vector from the origin.
+ <DT>4.
+<DD>If RMAT is null, so is the result.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1026" HREF="node61.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1024" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1018" HREF="node59.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1027" HREF="node61.html">SLA_DMAT - Solve Simultaneous Equations</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1025" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1019" HREF="node59.html">SLA_DJCL - MJD to Year,Month,Day,Frac</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node61.html b/src/slalib/sun67.htx/node61.html
new file mode 100644
index 0000000..b72e3ac
--- /dev/null
+++ b/src/slalib/sun67.htx/node61.html
@@ -0,0 +1,152 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DMAT - Solve Simultaneous Equations</TITLE>
+<META NAME="description" CONTENT="SLA_DMAT - Solve Simultaneous Equations">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node62.html">
+<LINK REL="previous" HREF="node60.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node62.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1036" HREF="node62.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1034" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1028" HREF="node60.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1037" HREF="node62.html">SLA_DMOON - Approx Moon Pos/Vel</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1035" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1029" HREF="node60.html">SLA_DM2AV - Rotation Matrix to Axial Vector</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000448000000000000000">SLA_DMAT - Solve Simultaneous Equations</A>
+<A NAME="xref_SLA_DMAT">&#160;</A><A NAME="SLA_DMAT">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Matrix inversion and solution of simultaneous equations
+(double precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_DMAT (N, A, Y, D, JF, IW)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>N</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>number of unknowns</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>A</EM></TD>
+<TD ALIGN="LEFT"><B>D(N,N)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>matrix</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>Y</EM></TD>
+<TD ALIGN="LEFT"><B>D(N)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>vector</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>A</EM></TD>
+<TH ALIGN="LEFT"><B>D(N,N)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>matrix inverse</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>Y</EM></TD>
+<TD ALIGN="LEFT"><B>D(N)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>solution</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>D</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>determinant</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>JF</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>singularity flag: 0=OK</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>IW</EM></TD>
+<TD ALIGN="LEFT"><B>I(N)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>workspace</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>For the set of <I>n</I> simultaneous linear equations in <I>n</I> unknowns:
+<BLOCKQUOTE><B>A</B><IMG WIDTH="7" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img72.gif"
+ ALT="$\cdot$"><B>y</B> = <B>x</B>
+</BLOCKQUOTE>
+ where:
+ <UL>
+<LI> <B>A</B> is a non-singular <IMG WIDTH="42" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img73.gif"
+ ALT="$n \times n$"> matrix,
+<LI> <B>y</B> is the vector of <I>n</I> unknowns, and
+<LI> <B>x</B> is the known vector,
+ </UL>
+ sla_DMAT computes:
+ <UL>
+<LI> the inverse of matrix <B>A</B>,
+<LI> the determinant of matrix <B>A</B>, and
+<LI> the vector of <I>n</I> unknowns <B>y</B>.
+ </UL>
+ Argument N is the order <I>n</I>, A (given) is the matrix <B>A</B>,
+ Y (given) is the vector <B>x</B> and Y (returned)
+ is the vector <B>y</B>.
+ The argument A (returned) is the inverse matrix <B>A</B><SUP>-1</SUP>,
+ and D is <I>det</I>(<B>A</B>).
+ <DT>2.
+<DD>JF is the singularity flag. If the matrix is non-singular,
+ JF=0 is returned. If the matrix is singular, JF=-1
+ and D=0D0 are returned. In the latter case, the contents
+ of array A on return are undefined.
+ <DT>3.
+<DD>The algorithm is Gaussian elimination with partial pivoting.
+ This method is very fast; some much slower algorithms can give
+ better accuracy, but only by a small factor.
+ <DT>4.
+<DD>This routine replaces the obsolete sla_DMATRX.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1036" HREF="node62.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1034" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1028" HREF="node60.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1037" HREF="node62.html">SLA_DMOON - Approx Moon Pos/Vel</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1035" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1029" HREF="node60.html">SLA_DM2AV - Rotation Matrix to Axial Vector</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node62.html b/src/slalib/sun67.htx/node62.html
new file mode 100644
index 0000000..dedceda
--- /dev/null
+++ b/src/slalib/sun67.htx/node62.html
@@ -0,0 +1,154 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DMOON - Approx Moon Pos/Vel</TITLE>
+<META NAME="description" CONTENT="SLA_DMOON - Approx Moon Pos/Vel">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node63.html">
+<LINK REL="previous" HREF="node61.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node63.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1046" HREF="node63.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1044" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1038" HREF="node61.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1047" HREF="node63.html">SLA_DMXM - Multiply Matrices</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1045" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1039" HREF="node61.html">SLA_DMAT - Solve Simultaneous Equations</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000449000000000000000">SLA_DMOON - Approx Moon Pos/Vel</A>
+<A NAME="xref_SLA_DMOON">&#160;</A><A NAME="SLA_DMOON">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Approximate geocentric position and velocity of the Moon
+(double precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_DMOON (DATE, PV)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DATE</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>TDB (loosely ET) as a Modified Julian Date (JD-2400000.5)
+</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PV</EM></TD>
+<TH ALIGN="LEFT"><B>D(6)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>Moon <IMG WIDTH="106" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img51.gif"
+ ALT="$[\,x,y,z,\dot{x},\dot{y},\dot{z}\,]$">, mean equator and equinox
+of date (AU, AU&nbsp;s<SUP>-1</SUP>)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>This routine is a full implementation of the algorithm
+published by Meeus (see reference).
+<DT>2.
+<DD>Meeus quotes accuracies of <IMG WIDTH="25" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img74.gif"
+ ALT="$10\hspace{-0.05em}^{'\hspace{-0.1em}'}$"> in longitude,
+ <IMG WIDTH="17" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img75.gif"
+ ALT="$3\hspace{-0.05em}^{'\hspace{-0.1em}'}$"> in latitude and
+ <IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img76.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.2$"> arcsec in HP
+ (equivalent to about 20&nbsp;km in distance). Comparison with
+ JPL&nbsp;DE200 over the interval 1960-2025 gives RMS errors of
+<P> <IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img77.gif"
+ ALT="$3\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.7$"> and 83&nbsp;mas/hour in longitude,
+<P> <IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img78.gif"
+ ALT="$2\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.3$"> arcsec and 48&nbsp;mas/hour in latitude,
+ 11&nbsp;km and 81&nbsp;mm/s in distance.
+ The maximum errors over the same interval are
+ <IMG WIDTH="25" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img79.gif"
+ ALT="$18\hspace{-0.05em}^{'\hspace{-0.1em}'}$"> and
+ <IMG WIDTH="31" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img80.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.50$"> /hour in longitude,
+ <IMG WIDTH="25" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img43.gif"
+ ALT="$11\hspace{-0.05em}^{'\hspace{-0.1em}'}$"> and
+ <IMG WIDTH="31" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img81.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.24$"> /hour in latitude,
+ 40&nbsp;km and 0.29&nbsp;m/s in distance.
+ <DT>3.
+<DD>The original algorithm is expressed in terms of the obsolete
+ timescale <I>Ephemeris Time</I>. Either TDB or TT can be used,
+ but not UT without incurring significant errors (<IMG WIDTH="25" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img82.gif"
+ ALT="$30\hspace{-0.05em}^{'\hspace{-0.1em}'}$"> at
+ the present time) due to the Moon's
+ <IMG WIDTH="23" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
+ SRC="img83.gif"
+ ALT="$0\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.5$"> /s movement.
+ <DT>4.
+<DD>The algorithm is based on pre IAU 1976 standards. However,
+ the result has been moved onto the new (FK5) equinox, an
+ adjustment which is in any case much smaller than the
+ intrinsic accuracy of the procedure.
+ <DT>5.
+<DD>Velocity is obtained by a complete analytical differentiation
+ of the Meeus model.
+ </DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCE:</STRONG>
+<DD>Meeus, <I>l'Astronomie</I>, June 1984, p348.
+</DL>
+<BR> <HR>
+<A NAME="tex2html1046" HREF="node63.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1044" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1038" HREF="node61.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1047" HREF="node63.html">SLA_DMXM - Multiply Matrices</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1045" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1039" HREF="node61.html">SLA_DMAT - Solve Simultaneous Equations</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node63.html b/src/slalib/sun67.htx/node63.html
new file mode 100644
index 0000000..9d19b4d
--- /dev/null
+++ b/src/slalib/sun67.htx/node63.html
@@ -0,0 +1,106 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DMXM - Multiply Matrices</TITLE>
+<META NAME="description" CONTENT="SLA_DMXM - Multiply Matrices">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node64.html">
+<LINK REL="previous" HREF="node62.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node64.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1056" HREF="node64.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1054" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1048" HREF="node62.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1057" HREF="node64.html">SLA_DMXV - Apply 3D Rotation</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1055" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1049" HREF="node62.html">SLA_DMOON - Approx Moon Pos/Vel</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000450000000000000000">&#160;</A><A NAME="xref_SLA_DMXM">&#160;</A><A NAME="SLA_DMXM">&#160;</A>
+<BR>
+SLA_DMXM - Multiply <IMG WIDTH="39" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img18.gif"
+ ALT="$3\times3$"> Matrices
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Product of two <IMG WIDTH="39" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img18.gif"
+ ALT="$3\times3$"> matrices (double precision).
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_DMXM (A, B, C)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>A</EM></TD>
+<TH ALIGN="LEFT"><B>D(3,3)</B></TH>
+<TH ALIGN="LEFT" NOWRAP>matrix <B>A</B></TH>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>B</EM></TD>
+<TD ALIGN="LEFT"><B>D(3,3)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>matrix <B>B</B></TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>C</EM></TD>
+<TH ALIGN="LEFT"><B>D(3,3)</B></TH>
+<TH ALIGN="LEFT" NOWRAP>matrix result: <B>A</B><IMG WIDTH="15" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img84.gif"
+ ALT="$\times$"><B>B</B></TH>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTE:</STRONG>
+<DD>To comply with the ANSI Fortran 77 standard, A, B and C must
+be different arrays. The routine is, in fact, coded
+ so as to work properly on the VAX and many other systems even
+ if this rule is violated, something that is <B>not</B>, however,
+ recommended.
+ </DL>
+<BR> <HR>
+<A NAME="tex2html1056" HREF="node64.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1054" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1048" HREF="node62.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1057" HREF="node64.html">SLA_DMXV - Apply 3D Rotation</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1055" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1049" HREF="node62.html">SLA_DMOON - Approx Moon Pos/Vel</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node64.html b/src/slalib/sun67.htx/node64.html
new file mode 100644
index 0000000..b6a0e15
--- /dev/null
+++ b/src/slalib/sun67.htx/node64.html
@@ -0,0 +1,115 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DMXV - Apply 3D Rotation</TITLE>
+<META NAME="description" CONTENT="SLA_DMXV - Apply 3D Rotation">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node65.html">
+<LINK REL="previous" HREF="node63.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node65.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1066" HREF="node65.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1064" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1058" HREF="node63.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1067" HREF="node65.html">SLA_DPAV - Position-Angle Between Two Directions</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1065" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1059" HREF="node63.html">SLA_DMXM - Multiply Matrices</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000451000000000000000">SLA_DMXV - Apply 3D Rotation</A>
+<A NAME="xref_SLA_DMXV">&#160;</A><A NAME="SLA_DMXV">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Multiply a 3-vector by a rotation matrix (double precision).
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_DMXV (DM, VA, VB)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DM</EM></TD>
+<TH ALIGN="LEFT"><B>D(3,3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>rotation matrix</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>VA</EM></TD>
+<TD ALIGN="LEFT"><B>D(3)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>vector to be rotated</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>VB</EM></TD>
+<TH ALIGN="LEFT"><B>D(3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>result vector</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>This routine performs the operation:
+<BLOCKQUOTE><B>b</B> = <B>M</B><IMG WIDTH="7" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img72.gif"
+ ALT="$\cdot$"><B>a</B>
+</BLOCKQUOTE>
+ where <B>a</B> and <B>b</B> are the 3-vectors VA and VB
+ respectively, and <B>M</B> is the <IMG WIDTH="39" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img18.gif"
+ ALT="$3\times3$"> matrix DM.
+ <DT>2.
+<DD>The main function of this routine is apply a
+ rotation; under these circumstances, <B>M</B> is a
+ <I>proper real orthogonal</I> matrix.
+ <DT>3.
+<DD>To comply with the ANSI Fortran 77 standard, VA and VB must
+ <B>not</B> be the same array. The routine is, in fact, coded
+ so as to work properly on the VAX and many other systems even
+ if this rule is violated, something that is <B>not</B>, however,
+ recommended.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1066" HREF="node65.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1064" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1058" HREF="node63.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1067" HREF="node65.html">SLA_DPAV - Position-Angle Between Two Directions</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1065" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1059" HREF="node63.html">SLA_DMXM - Multiply Matrices</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node65.html b/src/slalib/sun67.htx/node65.html
new file mode 100644
index 0000000..de89921
--- /dev/null
+++ b/src/slalib/sun67.htx/node65.html
@@ -0,0 +1,117 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DPAV - Position-Angle Between Two Directions</TITLE>
+<META NAME="description" CONTENT="SLA_DPAV - Position-Angle Between Two Directions">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node66.html">
+<LINK REL="previous" HREF="node64.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node66.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1076" HREF="node66.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1074" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1068" HREF="node64.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1077" HREF="node66.html">SLA_DR2AF - Radians to Deg,Min,Sec,Frac</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1075" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1069" HREF="node64.html">SLA_DMXV - Apply 3D Rotation</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000452000000000000000">SLA_DPAV - Position-Angle Between Two Directions</A>
+<A NAME="xref_SLA_DPAV">&#160;</A><A NAME="SLA_DPAV">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Returns the bearing (position angle) of one celestial
+direction with respect to another (double precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>D&nbsp;=&nbsp;sla_DPAV (V1, V2)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>V1</EM></TD>
+<TH ALIGN="LEFT"><B>D(3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>direction cosines of one point</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>V2</EM></TD>
+<TD ALIGN="LEFT"><B>D(3)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>directions cosines of the other point</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>sla_DPAV</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>position-angle of 2nd point with respect to 1st</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The coordinate frames correspond to <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$">,<IMG WIDTH="38" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img46.gif"
+ ALT="$[\lambda,\phi]$"> <I>etc.</I>.
+<DT>2.
+<DD>The result is the bearing (position angle), in radians,
+ of point V2 as seen
+ from point V1. It is in the range <IMG WIDTH="25" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img47.gif"
+ ALT="$\pm \pi$">. The sense
+ is such that if V2
+ is a small distance due east of V1 the result
+ is about <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img14.gif"
+ ALT="$+\pi/2$">. Zero is returned
+ if the two points are coincident.
+ <DT>3.
+<DD>The routine sla_DBEAR performs an equivalent function except
+ that the points are specified in the form of spherical coordinates.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1076" HREF="node66.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1074" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1068" HREF="node64.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1077" HREF="node66.html">SLA_DR2AF - Radians to Deg,Min,Sec,Frac</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1075" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1069" HREF="node64.html">SLA_DMXV - Apply 3D Rotation</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node66.html b/src/slalib/sun67.htx/node66.html
new file mode 100644
index 0000000..c4b2639
--- /dev/null
+++ b/src/slalib/sun67.htx/node66.html
@@ -0,0 +1,122 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DR2AF - Radians to Deg,Min,Sec,Frac</TITLE>
+<META NAME="description" CONTENT="SLA_DR2AF - Radians to Deg,Min,Sec,Frac">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node67.html">
+<LINK REL="previous" HREF="node65.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node67.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1086" HREF="node67.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1084" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1078" HREF="node65.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1087" HREF="node67.html">SLA_DR2TF - Radians to Hour,Min,Sec,Frac</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1085" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1079" HREF="node65.html">SLA_DPAV - Position-Angle Between Two Directions</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000453000000000000000">SLA_DR2AF - Radians to Deg,Min,Sec,Frac</A>
+<A NAME="xref_SLA_DR2AF">&#160;</A><A NAME="SLA_DR2AF">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Convert an angle in radians to degrees, arcminutes, arcseconds,
+fraction (double precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_DR2AF (NDP, ANGLE, SIGN, IDMSF)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>NDP</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>number of decimal places of arcseconds</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ANGLE</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>angle in radians</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>SIGN</EM></TD>
+<TH ALIGN="LEFT"><B>C</B></TH>
+<TD ALIGN="LEFT" NOWRAP>`+' or `-'</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>IDMSF</EM></TD>
+<TD ALIGN="LEFT"><B>I(4)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>degrees, arcminutes, arcseconds, fraction</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>NDP less than zero is interpreted as zero.
+<DT>2.
+<DD>The largest useful value for NDP is determined by the size
+of ANGLE, the format of DOUBLE&nbsp;PRECISION floating-point numbers
+ on the target machine, and the risk of overflowing IDMSF(4).
+ For example, on a VAX computer, for ANGLE up to <IMG WIDTH="20" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img52.gif"
+ ALT="$2\pi$">, the available
+ floating-point precision corresponds roughly to NDP=12. However,
+ the practical limit is NDP=9, set by the capacity of the 32-bit
+ integer IDMSF(4).
+ <DT>3.
+<DD>The absolute value of ANGLE may exceed <IMG WIDTH="20" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img52.gif"
+ ALT="$2\pi$">. In cases where it
+ does not, it is up to the caller to test for and handle the
+ case where ANGLE is very nearly <IMG WIDTH="20" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img52.gif"
+ ALT="$2\pi$"> and rounds up to <IMG WIDTH="34" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img53.gif"
+ ALT="$360^{\circ}$">, by testing for IDMSF(1)=360 and setting IDMSF(1-4) to zero.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1086" HREF="node67.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1084" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1078" HREF="node65.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1087" HREF="node67.html">SLA_DR2TF - Radians to Hour,Min,Sec,Frac</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1085" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1079" HREF="node65.html">SLA_DPAV - Position-Angle Between Two Directions</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node67.html b/src/slalib/sun67.htx/node67.html
new file mode 100644
index 0000000..f5e0648
--- /dev/null
+++ b/src/slalib/sun67.htx/node67.html
@@ -0,0 +1,121 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DR2TF - Radians to Hour,Min,Sec,Frac</TITLE>
+<META NAME="description" CONTENT="SLA_DR2TF - Radians to Hour,Min,Sec,Frac">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node68.html">
+<LINK REL="previous" HREF="node66.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node68.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1096" HREF="node68.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1094" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1088" HREF="node66.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1097" HREF="node68.html">SLA_DRANGE - Put Angle into Range</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1095" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1089" HREF="node66.html">SLA_DR2AF - Radians to Deg,Min,Sec,Frac</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000454000000000000000">SLA_DR2TF - Radians to Hour,Min,Sec,Frac</A>
+<A NAME="xref_SLA_DR2TF">&#160;</A><A NAME="SLA_DR2TF">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Convert an angle in radians to hours, minutes, seconds,
+fraction (double precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_DR2TF (NDP, ANGLE, SIGN, IHMSF)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>NDP</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>number of decimal places of seconds</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ANGLE</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>angle in radians</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>SIGN</EM></TD>
+<TH ALIGN="LEFT"><B>C</B></TH>
+<TD ALIGN="LEFT" NOWRAP>`+' or `-'</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>IHMSF</EM></TD>
+<TD ALIGN="LEFT"><B>I(4)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>hours, minutes, seconds, fraction</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>NDP less than zero is interpreted as zero.
+<DT>2.
+<DD>The largest useful value for NDP is determined by the size
+of ANGLE, the format of DOUBLE PRECISION floating-point numbers
+ on the target machine, and the risk of overflowing IHMSF(4).
+ For example, on a VAX computer, for ANGLE up to <IMG WIDTH="20" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img52.gif"
+ ALT="$2\pi$">, the available
+ floating-point precision corresponds roughly to NDP=12. However,
+ the practical limit is NDP=9, set by the capacity of the 32-bit
+ integer IHMSF(4).
+ <DT>3.
+<DD>The absolute value of ANGLE may exceed <IMG WIDTH="20" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img52.gif"
+ ALT="$2\pi$">. In cases where it
+ does not, it is up to the caller to test for and handle the
+ case where ANGLE is very nearly <IMG WIDTH="20" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img52.gif"
+ ALT="$2\pi$"> and rounds up to 24&nbsp;hours,
+ by testing for IHMSF(1)=24 and setting IHMSF(1-4) to zero.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1096" HREF="node68.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1094" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1088" HREF="node66.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1097" HREF="node68.html">SLA_DRANGE - Put Angle into Range</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1095" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1089" HREF="node66.html">SLA_DR2AF - Radians to Deg,Min,Sec,Frac</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node68.html b/src/slalib/sun67.htx/node68.html
new file mode 100644
index 0000000..477164f
--- /dev/null
+++ b/src/slalib/sun67.htx/node68.html
@@ -0,0 +1,93 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DRANGE - Put Angle into Range </TITLE>
+<META NAME="description" CONTENT="SLA_DRANGE - Put Angle into Range ">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node69.html">
+<LINK REL="previous" HREF="node67.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node69.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1106" HREF="node69.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1104" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1098" HREF="node67.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1107" HREF="node69.html">SLA_DRANRM - Put Angle into Range</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1105" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1099" HREF="node67.html">SLA_DR2TF - Radians to Hour,Min,Sec,Frac</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000455000000000000000">&#160;</A><A NAME="xref_SLA_DRANGE">&#160;</A><A NAME="SLA_DRANGE">&#160;</A>
+<BR>
+SLA_DRANGE - Put Angle into Range <IMG WIDTH="25" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img47.gif"
+ ALT="$\pm \pi$"></H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Normalize an angle into the range <IMG WIDTH="25" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img47.gif"
+ ALT="$\pm \pi$"> (double precision).
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>D&nbsp;=&nbsp;sla_DRANGE (ANGLE)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ANGLE</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>angle in radians</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>sla_DRANGE</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>ANGLE expressed in the range <IMG WIDTH="25" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img47.gif"
+ ALT="$\pm \pi$">.</TD>
+</TR>
+</TABLE></DL>
+<BR> <HR>
+<A NAME="tex2html1106" HREF="node69.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1104" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1098" HREF="node67.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1107" HREF="node69.html">SLA_DRANRM - Put Angle into Range</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1105" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1099" HREF="node67.html">SLA_DR2TF - Radians to Hour,Min,Sec,Frac</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node69.html b/src/slalib/sun67.htx/node69.html
new file mode 100644
index 0000000..02f5415
--- /dev/null
+++ b/src/slalib/sun67.htx/node69.html
@@ -0,0 +1,93 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DRANRM - Put Angle into Range </TITLE>
+<META NAME="description" CONTENT="SLA_DRANRM - Put Angle into Range ">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node70.html">
+<LINK REL="previous" HREF="node68.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node70.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1116" HREF="node70.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1114" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1108" HREF="node68.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1117" HREF="node70.html">SLA_DS2C6 - Spherical Pos/Vel to Cartesian</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1115" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1109" HREF="node68.html">SLA_DRANGE - Put Angle into Range</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000456000000000000000">&#160;</A><A NAME="xref_SLA_DRANRM">&#160;</A><A NAME="SLA_DRANRM">&#160;</A>
+<BR>
+SLA_DRANRM - Put Angle into Range <IMG WIDTH="43" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img66.gif"
+ ALT="$0\!-\!2\pi$"></H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Normalize an angle into the range <IMG WIDTH="43" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img66.gif"
+ ALT="$0\!-\!2\pi$">(double precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>D&nbsp;=&nbsp;sla_DRANRM (ANGLE)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ANGLE</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>angle in radians</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>sla_DRANRM</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>ANGLE expressed in the range <IMG WIDTH="43" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img66.gif"
+ ALT="$0\!-\!2\pi$"></TD>
+</TR>
+</TABLE></DL>
+<BR> <HR>
+<A NAME="tex2html1116" HREF="node70.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1114" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1108" HREF="node68.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1117" HREF="node70.html">SLA_DS2C6 - Spherical Pos/Vel to Cartesian</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1115" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1109" HREF="node68.html">SLA_DRANGE - Put Angle into Range</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node7.html b/src/slalib/sun67.htx/node7.html
new file mode 100644
index 0000000..e75fbed
--- /dev/null
+++ b/src/slalib/sun67.htx/node7.html
@@ -0,0 +1,76 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Fortran Version</TITLE>
+<META NAME="description" CONTENT="Fortran Version">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node8.html">
+<LINK REL="previous" HREF="node6.html">
+<LINK REL="up" HREF="node2.html">
+<LINK REL="next" HREF="node8.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html315" HREF="node8.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html313" HREF="node2.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html307" HREF="node6.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html316" HREF="node8.html">C Version</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html314" HREF="node2.html">INTRODUCTION</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html308" HREF="node6.html">Objectives</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION00025000000000000000">
+Fortran Version</A>
+</H2>
+The Fortran versions of SLALIB use ANSI Fortran&nbsp;77 with a few
+commonplace extensions. Just three out of the 183 routines require
+platform-specific techniques and accordingly are supplied
+in different forms.
+SLALIB has been implemented on the following platforms:
+VAX/VMS,
+PC (Microsoft Fortran, Linux),
+DECstation (Ultrix),
+DEC Alpha (DEC Unix),
+Sun (SunOS, Solaris),
+Hewlett Packard (HP-UX),
+CONVEX,
+Perkin-Elmer and
+Fujitsu.
+<P>
+<BR> <HR>
+<A NAME="tex2html315" HREF="node8.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html313" HREF="node2.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html307" HREF="node6.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html316" HREF="node8.html">C Version</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html314" HREF="node2.html">INTRODUCTION</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html308" HREF="node6.html">Objectives</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node70.html b/src/slalib/sun67.htx/node70.html
new file mode 100644
index 0000000..b1ebf8a
--- /dev/null
+++ b/src/slalib/sun67.htx/node70.html
@@ -0,0 +1,114 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DS2C6 - Spherical Pos/Vel to Cartesian</TITLE>
+<META NAME="description" CONTENT="SLA_DS2C6 - Spherical Pos/Vel to Cartesian">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node71.html">
+<LINK REL="previous" HREF="node69.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node71.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1126" HREF="node71.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1124" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1118" HREF="node69.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1127" HREF="node71.html">SLA_DS2TP - Spherical to Tangent Plane</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1125" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1119" HREF="node69.html">SLA_DRANRM - Put Angle into Range</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000457000000000000000">SLA_DS2C6 - Spherical Pos/Vel to Cartesian</A>
+<A NAME="xref_SLA_DS2C6">&#160;</A><A NAME="SLA_DS2C6">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Conversion of position &amp; velocity in spherical coordinates
+to Cartesian coordinates (double precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_DS2C6 (A, B, R, AD, BD, RD, V)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>A</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>longitude (radians) - for example <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$"></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>B</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>latitude (radians) - for example <IMG WIDTH="10" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img23.gif"
+ ALT="$\delta$"></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>R</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>radial coordinate</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>AD</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>longitude derivative (radians per unit time)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>BD</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>latitude derivative (radians per unit time)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RD</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>radial derivative</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>V</EM></TD>
+<TH ALIGN="LEFT"><B>D(6)</B></TH>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="106" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img51.gif"
+ ALT="$[\,x,y,z,\dot{x},\dot{y},\dot{z}\,]$"></TD>
+</TR>
+</TABLE></DL>
+<BR> <HR>
+<A NAME="tex2html1126" HREF="node71.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1124" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1118" HREF="node69.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1127" HREF="node71.html">SLA_DS2TP - Spherical to Tangent Plane</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1125" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1119" HREF="node69.html">SLA_DRANRM - Put Angle into Range</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node71.html b/src/slalib/sun67.htx/node71.html
new file mode 100644
index 0000000..8703383
--- /dev/null
+++ b/src/slalib/sun67.htx/node71.html
@@ -0,0 +1,129 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DS2TP - Spherical to Tangent Plane</TITLE>
+<META NAME="description" CONTENT="SLA_DS2TP - Spherical to Tangent Plane">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node72.html">
+<LINK REL="previous" HREF="node70.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node72.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1136" HREF="node72.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1134" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1128" HREF="node70.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1137" HREF="node72.html">SLA_DSEP - Angle Between 2 Points on Sphere</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1135" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1129" HREF="node70.html">SLA_DS2C6 - Spherical Pos/Vel to Cartesian</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000458000000000000000">SLA_DS2TP - Spherical to Tangent Plane</A>
+<A NAME="xref_SLA_DS2TP">&#160;</A><A NAME="SLA_DS2TP">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Projection of spherical coordinates onto the tangent plane
+(double precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_DS2TP (RA, DEC, RAZ, DECZ, XI, ETA, J)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RA,DEC</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>spherical coordinates of star (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RAZ,DECZ</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>spherical coordinates of tangent point (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>XI,ETA</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>tangent plane coordinates (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>J</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>status:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 0 = OK, star on tangent plane</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 1 = error, star too far from axis</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 2 = error, antistar on tangent plane</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 3 = error, antistar too far from axis</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The projection is called the <I>gnomonic</I> projection; the
+Cartesian coordinates <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img85.gif"
+ ALT="$[\,\xi,\eta\,]$"> are called
+<I>standard coordinates.</I> The latter
+ are in units of the distance from the tangent plane to the projection
+ point, <I>i.e.</I> radians near the origin.
+ <DT>2.
+<DD>When working in <IMG WIDTH="58" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img50.gif"
+ ALT="$[\,x,y,z\,]$"> rather than spherical coordinates, the
+ equivalent Cartesian routine sla_DV2TP is available.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1136" HREF="node72.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1134" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1128" HREF="node70.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1137" HREF="node72.html">SLA_DSEP - Angle Between 2 Points on Sphere</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1135" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1129" HREF="node70.html">SLA_DS2C6 - Spherical Pos/Vel to Cartesian</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node72.html b/src/slalib/sun67.htx/node72.html
new file mode 100644
index 0000000..b127b82
--- /dev/null
+++ b/src/slalib/sun67.htx/node72.html
@@ -0,0 +1,100 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DSEP - Angle Between 2 Points on Sphere</TITLE>
+<META NAME="description" CONTENT="SLA_DSEP - Angle Between 2 Points on Sphere">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node73.html">
+<LINK REL="previous" HREF="node71.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node73.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1146" HREF="node73.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1144" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1138" HREF="node71.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1147" HREF="node73.html">SLA_DT - Approximate ET minus UT</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1145" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1139" HREF="node71.html">SLA_DS2TP - Spherical to Tangent Plane</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000459000000000000000">SLA_DSEP - Angle Between 2 Points on Sphere</A>
+<A NAME="xref_SLA_DSEP">&#160;</A><A NAME="SLA_DSEP">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Angle between two points on a sphere (double precision).
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>D&nbsp;=&nbsp;sla_DSEP (A1, B1, A2, B2)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>A1,B1</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>spherical coordinates of one point (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>A2,B2</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>spherical coordinates of the other point (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>sla_DSEP</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>angle between [A1,B1] and [A2,B2] in radians</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The spherical coordinates are right ascension and declination,
+longitude and latitude, <I>etc.</I>, in radians.
+<DT>2.
+<DD>The result is always positive.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1146" HREF="node73.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1144" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1138" HREF="node71.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1147" HREF="node73.html">SLA_DT - Approximate ET minus UT</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1145" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1139" HREF="node71.html">SLA_DS2TP - Spherical to Tangent Plane</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node73.html b/src/slalib/sun67.htx/node73.html
new file mode 100644
index 0000000..fca730c
--- /dev/null
+++ b/src/slalib/sun67.htx/node73.html
@@ -0,0 +1,131 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DT - Approximate ET minus UT</TITLE>
+<META NAME="description" CONTENT="SLA_DT - Approximate ET minus UT">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node74.html">
+<LINK REL="previous" HREF="node72.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node74.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1156" HREF="node74.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1154" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1148" HREF="node72.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1157" HREF="node74.html">SLA_DTF2D - Hour,Min,Sec to Days</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1155" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1149" HREF="node72.html">SLA_DSEP - Angle Between 2 Points on Sphere</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000460000000000000000">SLA_DT - Approximate ET minus UT</A>
+<A NAME="xref_SLA_DT">&#160;</A><A NAME="SLA_DT">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Estimate <IMG WIDTH="16" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img19.gif"
+ ALT="$\Delta$">T, the offset between dynamical time
+and Universal Time, for a given historical epoch.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>D&nbsp;=&nbsp;sla_DT (EPOCH)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>EPOCH</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TH ALIGN="LEFT" NOWRAP>(Julian) epoch (<I>e.g.</I> 1850D0)</TH>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>sla_DT</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>approximate ET-UT (after 1984, TT-UT1) in seconds</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>Depending on the epoch, one of three parabolic approximations
+is used:
+<PRE><TT>
+before AD 979 Stephenson &amp; Morrison's 390 BC to AD 948 model
+ AD 979 to AD 1708 Stephenson &amp; Morrison's AD 948 to AD 1600 model
+ after AD 1708 McCarthy &amp; Babcock's post-1650 model
+</TT></PRE>
+ The breakpoints are chosen to ensure continuity: they occur
+ at places where the adjacent models give the same answer as
+ each other.
+ <DT>2.
+<DD>The accuracy is modest, with errors of up to <IMG WIDTH="24" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img86.gif"
+ ALT="$20^{\rm s}$"> during
+ the interval since 1650, rising to perhaps <IMG WIDTH="30" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img87.gif"
+ ALT="$30^{\rm m}$"> by 1000&nbsp;BC. Comparatively accurate values from AD&nbsp;1600
+ are tabulated in
+ the <I>Astronomical Almanac</I> (see section K8 of the 1995
+ edition).
+ <DT>3.
+<DD>The use of <TT>DOUBLE PRECISION</TT> for both argument and result is
+ simply for compatibility with other SLALIB time routines.
+ <DT>4.
+<DD>The models used are based on a lunar tidal acceleration value
+ of
+ <IMG WIDTH="52" HEIGHT="35" ALIGN="MIDDLE" BORDER="0"
+ SRC="img88.gif"
+ ALT="$-26\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.00$"> per century.
+ </DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCE:</STRONG>
+<DD>Seidelmann, P.K. (ed), 1992. <I>Explanatory
+Supplement to the Astronomical Almanac,</I> ISBN&nbsp;0-935702-68-7.
+ This contains references to the papers by Stephenson &amp; Morrison
+ and by McCarthy &amp; Babcock which describe the models used here.
+ </DL>
+<BR> <HR>
+<A NAME="tex2html1156" HREF="node74.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1154" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1148" HREF="node72.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1157" HREF="node74.html">SLA_DTF2D - Hour,Min,Sec to Days</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1155" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1149" HREF="node72.html">SLA_DSEP - Angle Between 2 Points on Sphere</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node74.html b/src/slalib/sun67.htx/node74.html
new file mode 100644
index 0000000..88700cd
--- /dev/null
+++ b/src/slalib/sun67.htx/node74.html
@@ -0,0 +1,125 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DTF2D - Hour,Min,Sec to Days</TITLE>
+<META NAME="description" CONTENT="SLA_DTF2D - Hour,Min,Sec to Days">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node75.html">
+<LINK REL="previous" HREF="node73.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node75.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1166" HREF="node75.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1164" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1158" HREF="node73.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1167" HREF="node75.html">SLA_DTF2R - Hour,Min,Sec to Radians</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1165" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1159" HREF="node73.html">SLA_DT - Approximate ET minus UT</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000461000000000000000">SLA_DTF2D - Hour,Min,Sec to Days</A>
+<A NAME="xref_SLA_DTF2D">&#160;</A><A NAME="SLA_DTF2D">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Convert hours, minutes, seconds to days (double precision).
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_DTF2D (IHOUR, IMIN, SEC, DAYS, J)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>IHOUR</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>hours</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>IMIN</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>minutes</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>SEC</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>seconds</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DAYS</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>interval in days</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>J</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>status:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 0 = OK</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 1 = IHOUR outside range 0-23</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 2 = IMIN outside range 0-59</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 3 = SEC outside range 0-59.999<IMG WIDTH="21" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img48.gif"
+ ALT="$\cdots$"></TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The result is computed even if any of the range checks fail.
+<DT>2.
+<DD>The sign must be dealt with outside this routine.
+</DL></DL>
+<BR> <HR>
+<A NAME="tex2html1166" HREF="node75.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1164" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1158" HREF="node73.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1167" HREF="node75.html">SLA_DTF2R - Hour,Min,Sec to Radians</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1165" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1159" HREF="node73.html">SLA_DT - Approximate ET minus UT</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node75.html b/src/slalib/sun67.htx/node75.html
new file mode 100644
index 0000000..535d444
--- /dev/null
+++ b/src/slalib/sun67.htx/node75.html
@@ -0,0 +1,125 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DTF2R - Hour,Min,Sec to Radians</TITLE>
+<META NAME="description" CONTENT="SLA_DTF2R - Hour,Min,Sec to Radians">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node76.html">
+<LINK REL="previous" HREF="node74.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node76.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1176" HREF="node76.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1174" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1168" HREF="node74.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1177" HREF="node76.html">SLA_DTP2S - Tangent Plane to Spherical</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1175" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1169" HREF="node74.html">SLA_DTF2D - Hour,Min,Sec to Days</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000462000000000000000">SLA_DTF2R - Hour,Min,Sec to Radians</A>
+<A NAME="xref_SLA_DTF2R">&#160;</A><A NAME="SLA_DTF2R">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Convert hours, minutes, seconds to radians (double precision).
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_DTF2R (IHOUR, IMIN, SEC, RAD, J)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>IHOUR</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>hours</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>IMIN</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>minutes</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>SEC</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>seconds</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RAD</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>angle in radians</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>J</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>status:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 0 = OK</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 1 = IHOUR outside range 0-23</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 2 = IMIN outside range 0-59</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 3 = SEC outside range 0-59.999<IMG WIDTH="21" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img48.gif"
+ ALT="$\cdots$"></TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The result is computed even if any of the range checks fail.
+<DT>2.
+<DD>The sign must be dealt with outside this routine.
+</DL></DL>
+<BR> <HR>
+<A NAME="tex2html1176" HREF="node76.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1174" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1168" HREF="node74.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1177" HREF="node76.html">SLA_DTP2S - Tangent Plane to Spherical</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1175" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1169" HREF="node74.html">SLA_DTF2D - Hour,Min,Sec to Days</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node76.html b/src/slalib/sun67.htx/node76.html
new file mode 100644
index 0000000..46c4f7a
--- /dev/null
+++ b/src/slalib/sun67.htx/node76.html
@@ -0,0 +1,109 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DTP2S - Tangent Plane to Spherical</TITLE>
+<META NAME="description" CONTENT="SLA_DTP2S - Tangent Plane to Spherical">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node77.html">
+<LINK REL="previous" HREF="node75.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node77.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1186" HREF="node77.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1184" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1178" HREF="node75.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1187" HREF="node77.html">SLA_DTP2V - Tangent Plane to Direction Cosines</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1185" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1179" HREF="node75.html">SLA_DTF2R - Hour,Min,Sec to Radians</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000463000000000000000">SLA_DTP2S - Tangent Plane to Spherical</A>
+<A NAME="xref_SLA_DTP2S">&#160;</A><A NAME="SLA_DTP2S">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Transform tangent plane coordinates into spherical
+coordinates (double precision)
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_DTP2S (XI, ETA, RAZ, DECZ, RA, DEC)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>XI,ETA</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>tangent plane rectangular coordinates (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RAZ,DECZ</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>spherical coordinates of tangent point (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RA,DEC</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>spherical coordinates (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The projection is called the <I>gnomonic</I> projection; the
+Cartesian coordinates <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img85.gif"
+ ALT="$[\,\xi,\eta\,]$"> are called
+<I>standard coordinates.</I> The latter
+ are in units of the distance from the tangent plane to the projection
+ point, <I>i.e.</I> radians near the origin.
+ <DT>2.
+<DD>When working in <IMG WIDTH="58" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img50.gif"
+ ALT="$[\,x,y,z\,]$"> rather than spherical coordinates, the
+ equivalent Cartesian routine sla_DTP2V is available.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1186" HREF="node77.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1184" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1178" HREF="node75.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1187" HREF="node77.html">SLA_DTP2V - Tangent Plane to Direction Cosines</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1185" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1179" HREF="node75.html">SLA_DTF2R - Hour,Min,Sec to Radians</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node77.html b/src/slalib/sun67.htx/node77.html
new file mode 100644
index 0000000..522e009
--- /dev/null
+++ b/src/slalib/sun67.htx/node77.html
@@ -0,0 +1,117 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DTP2V - Tangent Plane to Direction Cosines</TITLE>
+<META NAME="description" CONTENT="SLA_DTP2V - Tangent Plane to Direction Cosines">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node78.html">
+<LINK REL="previous" HREF="node76.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node78.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1196" HREF="node78.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1194" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1188" HREF="node76.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1197" HREF="node78.html">SLA_DTPS2C - Plate centre from and</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1195" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1189" HREF="node76.html">SLA_DTP2S - Tangent Plane to Spherical</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000464000000000000000">SLA_DTP2V - Tangent Plane to Direction Cosines</A>
+<A NAME="xref_SLA_DTP2V">&#160;</A><A NAME="SLA_DTP2V">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Given the tangent-plane coordinates of a star and the direction
+cosines of the tangent point, determine the direction cosines
+ of the star
+ (double precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_DTP2V (XI, ETA, V0, V)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>XI,ETA</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>tangent plane coordinates of star (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>V0</EM></TD>
+<TD ALIGN="LEFT"><B>D(3)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>direction cosines of tangent point</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>V</EM></TD>
+<TH ALIGN="LEFT"><B>D(3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>direction cosines of star</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>If vector V0 is not of unit length, the returned vector V will
+be wrong.
+<DT>2.
+<DD>If vector V0 points at a pole, the returned vector V will be
+ based on the arbitrary assumption that <IMG WIDTH="43" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img89.gif"
+ ALT="$\alpha=0$"> at
+ the tangent point.
+ <DT>3.
+<DD>The projection is called the <I>gnomonic</I> projection; the
+ Cartesian coordinates <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img85.gif"
+ ALT="$[\,\xi,\eta\,]$"> are called
+ <I>standard coordinates.</I> The latter
+ are in units of the distance from the tangent plane to the projection
+ point, <I>i.e.</I> radians near the origin.
+ <DT>4.
+<DD>This routine is the Cartesian equivalent of the routine sla_DTP2S.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1196" HREF="node78.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1194" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1188" HREF="node76.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1197" HREF="node78.html">SLA_DTPS2C - Plate centre from and</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1195" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1189" HREF="node76.html">SLA_DTP2S - Tangent Plane to Spherical</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node78.html b/src/slalib/sun67.htx/node78.html
new file mode 100644
index 0000000..61458ac
--- /dev/null
+++ b/src/slalib/sun67.htx/node78.html
@@ -0,0 +1,168 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DTPS2C - Plate centre from and </TITLE>
+<META NAME="description" CONTENT="SLA_DTPS2C - Plate centre from and ">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node79.html">
+<LINK REL="previous" HREF="node77.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node79.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1206" HREF="node79.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1204" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1198" HREF="node77.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1207" HREF="node79.html">SLA_DTPV2C - Plate centre from and x,y,z</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1205" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1199" HREF="node77.html">SLA_DTP2V - Tangent Plane to Direction Cosines</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000465000000000000000">&#160;</A><A NAME="xref_SLA_DTPS2C">&#160;</A><A NAME="SLA_DTPS2C">&#160;</A>
+<BR>
+SLA_DTPS2C - Plate centre from <IMG WIDTH="26" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img90.gif"
+ ALT="$\xi,\eta$"> and <IMG WIDTH="28" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img91.gif"
+ ALT="$\alpha,\delta$"></H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>From the tangent plane coordinates of a star of known <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$">,determine the <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> of the tangent point (double precision)
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_DTPS2C (XI, ETA, RA, DEC, RAZ1, DECZ1, RAZ2, DECZ2, N)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>XI,ETA</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>tangent plane rectangular coordinates (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RA,DEC</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>spherical coordinates (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RAZ1,DECZ1</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>spherical coordinates of tangent point,
+solution 1</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RAZ2,DECZ2</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>spherical coordinates of tangent point,
+solution 2</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>N</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>number of solutions:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 0 = no solutions returned (note 2)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 1 = only the first solution is useful (note 3)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 2 = there are two useful solutions (note 3)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The RAZ1 and RAZ2 values returned are in the range <IMG WIDTH="43" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img66.gif"
+ ALT="$0\!-\!2\pi$">.<DT>2.
+<DD>Cases where there is no solution can only arise near the poles.
+For example, it is clearly impossible for a star at the pole
+ itself to have a non-zero <IMG WIDTH="10" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img92.gif"
+ ALT="$\xi$"> value, and hence it is
+ meaningless to ask where the tangent point would have to be
+ to bring about this combination of <IMG WIDTH="10" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img92.gif"
+ ALT="$\xi$"> and <IMG WIDTH="10" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img23.gif"
+ ALT="$\delta$">. <DT>3.
+<DD>Also near the poles, cases can arise where there are two useful
+ solutions. The argument N indicates whether the second of the
+ two solutions returned is useful. N=1
+ indicates only one useful solution, the usual case; under
+ these circumstances, the second solution corresponds to the
+ ``over-the-pole'' case, and this is reflected in the values
+ of RAZ2 and DECZ2 which are returned.
+ <DT>4.
+<DD>The DECZ1 and DECZ2 values returned are in the range <IMG WIDTH="25" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img47.gif"
+ ALT="$\pm \pi$">, but in the ordinary, non-pole-crossing, case, the range is
+ <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img15.gif"
+ ALT="$\pm\pi/2$">. <DT>5.
+<DD>RA, DEC, RAZ1, DECZ1, RAZ2, DECZ2 are all in radians.
+ <DT>6.
+<DD>The projection is called the <I>gnomonic</I> projection; the
+ Cartesian coordinates <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img85.gif"
+ ALT="$[\,\xi,\eta\,]$"> are called
+ <I>standard coordinates.</I> The latter
+ are in units of the distance from the tangent plane to the projection
+ point, <I>i.e.</I> radians near the origin.
+ <DT>7.
+<DD>When working in <IMG WIDTH="58" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img50.gif"
+ ALT="$[\,x,y,z\,]$"> rather than spherical coordinates, the
+ equivalent Cartesian routine sla_DTPV2C is available.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1206" HREF="node79.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1204" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1198" HREF="node77.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1207" HREF="node79.html">SLA_DTPV2C - Plate centre from and x,y,z</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1205" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1199" HREF="node77.html">SLA_DTP2V - Tangent Plane to Direction Cosines</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node79.html b/src/slalib/sun67.htx/node79.html
new file mode 100644
index 0000000..de0194d
--- /dev/null
+++ b/src/slalib/sun67.htx/node79.html
@@ -0,0 +1,144 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DTPV2C - Plate centre from and x,y,z</TITLE>
+<META NAME="description" CONTENT="SLA_DTPV2C - Plate centre from and x,y,z">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node80.html">
+<LINK REL="previous" HREF="node78.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node80.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1216" HREF="node80.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1214" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1208" HREF="node78.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1217" HREF="node80.html">SLA_DTT - TT minus UTC</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1215" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1209" HREF="node78.html">SLA_DTPS2C - Plate centre from and</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000466000000000000000">&#160;</A><A NAME="xref_SLA_DTPV2C">&#160;</A><A NAME="SLA_DTPV2C">&#160;</A>
+<BR>
+SLA_DTPV2C - Plate centre from <IMG WIDTH="26" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img90.gif"
+ ALT="$\xi,\eta$"> and <I>x</I>,<I>y</I>,<I>z</I>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>From the tangent plane coordinates of a star of known
+direction cosines, determine the direction cosines
+ of the tangent point (double precision)
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_DTPV2C (XI, ETA, V, V01, V02, N)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>XI,ETA</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>tangent plane coordinates of star (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>V</EM></TD>
+<TD ALIGN="LEFT"><B>D(3)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>direction cosines of star</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>V01</EM></TD>
+<TH ALIGN="LEFT"><B>D(3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>direction cosines of tangent point, solution 1</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>V01</EM></TD>
+<TD ALIGN="LEFT"><B>D(3)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>direction cosines of tangent point, solution 2</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>N</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>number of solutions:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 0 = no solutions returned (note 2)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 1 = only the first solution is useful (note 3)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 2 = there are two useful solutions (note 3)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The vector V must be of unit length or the result will be wrong.
+<DT>2.
+<DD>Cases where there is no solution can only arise near the poles.
+For example, it is clearly impossible for a star at the pole
+ itself to have a non-zero XI value.
+ <DT>3.
+<DD>Also near the poles, cases can arise where there are two useful
+ solutions. The argument N indicates whether the second of the
+ two solutions returned is useful.
+ N=1
+ indicates only one useful solution, the usual case; under these
+ circumstances, the second solution can be regarded as valid if
+ the vector V02 is interpreted as the ``over-the-pole'' case.
+ <DT>4.
+<DD>The projection is called the <I>gnomonic</I> projection; the
+ Cartesian coordinates <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img85.gif"
+ ALT="$[\,\xi,\eta\,]$"> are called
+ <I>standard coordinates.</I> The latter
+ are in units of the distance from the tangent plane to the projection
+ point, <I>i.e.</I> radians near the origin.
+ <DT>5.
+<DD>This routine is the Cartesian equivalent of the routine sla_DTPS2C.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1216" HREF="node80.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1214" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1208" HREF="node78.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1217" HREF="node80.html">SLA_DTT - TT minus UTC</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1215" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1209" HREF="node78.html">SLA_DTPS2C - Plate centre from and</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node8.html b/src/slalib/sun67.htx/node8.html
new file mode 100644
index 0000000..81261d2
--- /dev/null
+++ b/src/slalib/sun67.htx/node8.html
@@ -0,0 +1,85 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>C Version</TITLE>
+<META NAME="description" CONTENT="C Version">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node9.html">
+<LINK REL="previous" HREF="node7.html">
+<LINK REL="up" HREF="node2.html">
+<LINK REL="next" HREF="node9.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html325" HREF="node9.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html323" HREF="node2.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html317" HREF="node7.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html326" HREF="node9.html">Future Versions</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html324" HREF="node2.html">INTRODUCTION</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html318" HREF="node7.html">Fortran Version</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION00026000000000000000">
+C Version</A>
+</H2>
+An ANSI C version of SLALIB is available from the author
+but is not part of the Starlink release.
+The functionality of this (proprietary) C version closely matches
+that of the Starlink Fortran SLALIB, partly for the convenience of
+existing users of the Fortran version, some of whom have in the past
+implemented C ``wrappers''. The function names
+cannot be the same as the Fortran versions because of potential
+linking problems when
+both forms of the library are present; the C routine which
+is the equivalent of (for example) <TT>SLA_REFRO</TT> is <TT>slaRefro</TT>.
+The types of arguments follow the Fortran version, except
+that integers are <TT>int</TT> rather than <TT>long</TT>.
+Argument passing is by value
+(except for arrays and strings of course)
+for given arguments and by pointer for returned arguments.
+All the C functions are re-entrant.
+<P>
+The Fortran routines <TT>sla_GRESID</TT>, <TT>sla_RANDOM</TT> and
+<TT>sla_WAIT</TT> have no C counterparts.
+<P>
+Further details of the C version of SLALIB are available
+from the author. The definitive guide to
+the calling sequences is the file <TT>slalib.h</TT>.
+<P>
+<BR> <HR>
+<A NAME="tex2html325" HREF="node9.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html323" HREF="node2.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html317" HREF="node7.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html326" HREF="node9.html">Future Versions</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html324" HREF="node2.html">INTRODUCTION</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html318" HREF="node7.html">Fortran Version</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node80.html b/src/slalib/sun67.htx/node80.html
new file mode 100644
index 0000000..e7704f5
--- /dev/null
+++ b/src/slalib/sun67.htx/node80.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DTT - TT minus UTC</TITLE>
+<META NAME="description" CONTENT="SLA_DTT - TT minus UTC">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node81.html">
+<LINK REL="previous" HREF="node79.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node81.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1226" HREF="node81.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1224" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1218" HREF="node79.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1227" HREF="node81.html">SLA_DV2TP - Direction Cosines to Tangent Plane</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1225" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1219" HREF="node79.html">SLA_DTPV2C - Plate centre from and x,y,z</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000467000000000000000">SLA_DTT - TT minus UTC</A>
+<A NAME="xref_SLA_DTT">&#160;</A><A NAME="SLA_DTT">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Compute <IMG WIDTH="16" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img19.gif"
+ ALT="$\Delta$">TT, the increment to be applied to
+Coordinated Universal Time UTC to give
+ Terrestrial Time TT.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>D&nbsp;=&nbsp;sla_DTT (DJU)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DJU</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>UTC date as a modified JD (JD-2400000.5)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>sla_DTT</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>TT-UTC in seconds</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The UTC is specified to be a date rather than a time to indicate
+that care needs to be taken not to specify an instant which lies
+within a leap second. Though in most cases UTC can include the
+ fractional part, correct behaviour on the day of a leap second
+ can be guaranteed only up to the end of the second
+ <IMG WIDTH="82" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
+ SRC="img54.gif"
+ ALT="$23^{\rm h}\,59^{\rm m}\,59^{\rm s}$">. <DT>2.
+<DD>Pre 1972 January 1 a fixed value of 10 + ET-TAI is returned.
+ <DT>3.
+<DD>TT is one interpretation of the defunct timescale
+ <I>Ephemeris Time</I>, ET.
+ <DT>4.
+<DD>See also the routine sla_DT, which roughly estimates ET-UT for
+ historical epochs.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1226" HREF="node81.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1224" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1218" HREF="node79.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1227" HREF="node81.html">SLA_DV2TP - Direction Cosines to Tangent Plane</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1225" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1219" HREF="node79.html">SLA_DTPV2C - Plate centre from and x,y,z</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node81.html b/src/slalib/sun67.htx/node81.html
new file mode 100644
index 0000000..eba8ed9
--- /dev/null
+++ b/src/slalib/sun67.htx/node81.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DV2TP - Direction Cosines to Tangent Plane</TITLE>
+<META NAME="description" CONTENT="SLA_DV2TP - Direction Cosines to Tangent Plane">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node82.html">
+<LINK REL="previous" HREF="node80.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node82.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1236" HREF="node82.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1234" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1228" HREF="node80.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1237" HREF="node82.html">SLA_DVDV - Scalar Product</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1235" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1229" HREF="node80.html">SLA_DTT - TT minus UTC</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000468000000000000000">SLA_DV2TP - Direction Cosines to Tangent Plane</A>
+<A NAME="xref_SLA_DV2TP">&#160;</A><A NAME="SLA_DV2TP">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Given the direction cosines of a star and of the tangent point,
+determine the star's tangent-plane coordinates
+ (double precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_DV2TP (V, V0, XI, ETA, J)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>V</EM></TD>
+<TH ALIGN="LEFT"><B>D(3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>direction cosines of star</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>V0</EM></TD>
+<TD ALIGN="LEFT"><B>D(3)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>direction cosines of tangent point</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>XI,ETA</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>tangent plane coordinates (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>J</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>status:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 0 = OK, star on tangent plane</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 1 = error, star too far from axis</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 2 = error, antistar on tangent plane</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 3 = error, antistar too far from axis</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>If vector V0 is not of unit length, or if vector V is of zero
+length, the results will be wrong.
+<DT>2.
+<DD>If V0 points at a pole, the returned <IMG WIDTH="26" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img90.gif"
+ ALT="$\xi,\eta$"> will be based on the
+ arbitrary assumption that <IMG WIDTH="43" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img89.gif"
+ ALT="$\alpha=0$"> at the tangent point.
+ <DT>3.
+<DD>The projection is called the <I>gnomonic</I> projection; the
+ Cartesian coordinates <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img85.gif"
+ ALT="$[\,\xi,\eta\,]$"> are called
+ <I>standard coordinates.</I> The latter
+ are in units of the distance from the tangent plane to the projection
+ point, <I>i.e.</I> radians near the origin.
+ <DT>4.
+<DD>This routine is the Cartesian equivalent of the routine sla_DS2TP.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1236" HREF="node82.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1234" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1228" HREF="node80.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1237" HREF="node82.html">SLA_DVDV - Scalar Product</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1235" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1229" HREF="node80.html">SLA_DTT - TT minus UTC</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node82.html b/src/slalib/sun67.htx/node82.html
new file mode 100644
index 0000000..024100b
--- /dev/null
+++ b/src/slalib/sun67.htx/node82.html
@@ -0,0 +1,91 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DVDV - Scalar Product</TITLE>
+<META NAME="description" CONTENT="SLA_DVDV - Scalar Product">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node83.html">
+<LINK REL="previous" HREF="node81.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node83.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1246" HREF="node83.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1244" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1238" HREF="node81.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1247" HREF="node83.html">SLA_DVN - Normalize Vector</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1245" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1239" HREF="node81.html">SLA_DV2TP - Direction Cosines to Tangent Plane</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000469000000000000000">SLA_DVDV - Scalar Product</A>
+<A NAME="xref_SLA_DVDV">&#160;</A><A NAME="SLA_DVDV">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Scalar product of two 3-vectors (double precision).
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>D&nbsp;=&nbsp;sla_DVDV (VA, VB)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>VA</EM></TD>
+<TH ALIGN="LEFT"><B>D(3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>first vector</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>VB</EM></TD>
+<TD ALIGN="LEFT"><B>D(3)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>second vector</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>sla_DVDV</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>scalar product VA.VB</TD>
+</TR>
+</TABLE></DL>
+<BR> <HR>
+<A NAME="tex2html1246" HREF="node83.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1244" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1238" HREF="node81.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1247" HREF="node83.html">SLA_DVN - Normalize Vector</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1245" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1239" HREF="node81.html">SLA_DV2TP - Direction Cosines to Tangent Plane</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node83.html b/src/slalib/sun67.htx/node83.html
new file mode 100644
index 0000000..073d4ef
--- /dev/null
+++ b/src/slalib/sun67.htx/node83.html
@@ -0,0 +1,95 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DVN - Normalize Vector</TITLE>
+<META NAME="description" CONTENT="SLA_DVN - Normalize Vector">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node84.html">
+<LINK REL="previous" HREF="node82.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node84.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1256" HREF="node84.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1254" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1248" HREF="node82.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1257" HREF="node84.html">SLA_DVXV - Vector Product</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1255" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1249" HREF="node82.html">SLA_DVDV - Scalar Product</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000470000000000000000">SLA_DVN - Normalize Vector</A>
+<A NAME="xref_SLA_DVN">&#160;</A><A NAME="SLA_DVN">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Normalize a 3-vector, also giving the modulus (double precision).
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_DVN (V, UV, VM)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>V</EM></TD>
+<TH ALIGN="LEFT"><B>D(3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>vector</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>UV</EM></TD>
+<TH ALIGN="LEFT"><B>D(3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>unit vector in direction of V</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>VM</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>modulus of V</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTE:</STRONG>
+<DD>If the modulus of V is zero, UV is set to zero as well.
+</DL>
+<BR> <HR>
+<A NAME="tex2html1256" HREF="node84.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1254" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1248" HREF="node82.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1257" HREF="node84.html">SLA_DVXV - Vector Product</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1255" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1249" HREF="node82.html">SLA_DVDV - Scalar Product</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node84.html b/src/slalib/sun67.htx/node84.html
new file mode 100644
index 0000000..745d1f0
--- /dev/null
+++ b/src/slalib/sun67.htx/node84.html
@@ -0,0 +1,93 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_DVXV - Vector Product</TITLE>
+<META NAME="description" CONTENT="SLA_DVXV - Vector Product">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node85.html">
+<LINK REL="previous" HREF="node83.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node85.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1266" HREF="node85.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1264" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1258" HREF="node83.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1267" HREF="node85.html">SLA_E2H - to Az,El</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1265" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1259" HREF="node83.html">SLA_DVN - Normalize Vector</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000471000000000000000">SLA_DVXV - Vector Product</A>
+<A NAME="xref_SLA_DVXV">&#160;</A><A NAME="SLA_DVXV">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Vector product of two 3-vectors (double precision).
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_DVXV (VA, VB, VC)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>VA</EM></TD>
+<TH ALIGN="LEFT"><B>D(3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>first vector</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>VB</EM></TD>
+<TD ALIGN="LEFT"><B>D(3)</B></TD>
+<TD ALIGN="LEFT" NOWRAP>second vector</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>VC</EM></TD>
+<TH ALIGN="LEFT"><B>D(3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>vector product VA<IMG WIDTH="15" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img84.gif"
+ ALT="$\times$">VB</TD>
+</TR>
+</TABLE></DL>
+<BR> <HR>
+<A NAME="tex2html1266" HREF="node85.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1264" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1258" HREF="node83.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1267" HREF="node85.html">SLA_E2H - to Az,El</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1265" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1259" HREF="node83.html">SLA_DVN - Normalize Vector</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node85.html b/src/slalib/sun67.htx/node85.html
new file mode 100644
index 0000000..3c589df
--- /dev/null
+++ b/src/slalib/sun67.htx/node85.html
@@ -0,0 +1,145 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_E2H - to Az,El</TITLE>
+<META NAME="description" CONTENT="SLA_E2H - to Az,El">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node86.html">
+<LINK REL="previous" HREF="node84.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node86.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1276" HREF="node86.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1274" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1268" HREF="node84.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1277" HREF="node86.html">SLA_EARTH - Approx Earth Pos/Vel</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1275" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1269" HREF="node84.html">SLA_DVXV - Vector Product</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000472000000000000000">&#160;</A><A NAME="xref_SLA_E2H">&#160;</A><A NAME="SLA_E2H">&#160;</A>
+<BR>
+SLA_E2H - <IMG WIDTH="27" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img65.gif"
+ ALT="$h,\delta$"> to Az,El
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Equatorial to horizon coordinates
+(single precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_DE2H (HA, DEC, PHI, AZ, EL)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>HA</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>hour angle (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DEC</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>declination (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PHI</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>latitude (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>AZ</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>azimuth (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>EL</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>elevation (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>Azimuth is returned in the range <IMG WIDTH="43" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img66.gif"
+ ALT="$0\!-\!2\pi$">; north is zero,
+and east is <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img14.gif"
+ ALT="$+\pi/2$">. Elevation is returned in the range
+<IMG WIDTH="25" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img47.gif"
+ ALT="$\pm \pi$">. <DT>2.
+<DD>The latitude must be geodetic. In critical applications,
+ corrections for polar motion should be applied.
+ <DT>3.
+<DD>In some applications it will be important to specify the
+ correct type of hour angle and declination in order to
+ produce the required type of azimuth and elevation. In
+ particular, it may be important to distinguish between
+ elevation as affected by refraction, which would
+ require the <I>observed</I> <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$">, and the elevation
+ <I>in vacuo</I>, which would require the <I>topocentric</I>
+ <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$">. If the effects of diurnal aberration can be neglected, the
+ <I>apparent</I> <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$"> may be used instead of the topocentric
+ <IMG WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img29.gif"
+ ALT="$[\,h,\delta\,]$">. <DT>4.
+<DD>No range checking of arguments is carried out.
+ <DT>5.
+<DD>In applications which involve many such calculations, rather
+ than calling the present routine it will be more efficient to
+ use inline code, having previously computed fixed terms such
+ as sine and cosine of latitude, and (for tracking a star)
+ sine and cosine of declination.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1276" HREF="node86.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1274" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1268" HREF="node84.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1277" HREF="node86.html">SLA_EARTH - Approx Earth Pos/Vel</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1275" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1269" HREF="node84.html">SLA_DVXV - Vector Product</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node86.html b/src/slalib/sun67.htx/node86.html
new file mode 100644
index 0000000..6507524
--- /dev/null
+++ b/src/slalib/sun67.htx/node86.html
@@ -0,0 +1,124 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_EARTH - Approx Earth Pos/Vel</TITLE>
+<META NAME="description" CONTENT="SLA_EARTH - Approx Earth Pos/Vel">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node87.html">
+<LINK REL="previous" HREF="node85.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node87.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1286" HREF="node87.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1284" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1278" HREF="node85.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1287" HREF="node87.html">SLA_ECLEQ - Ecliptic to Equatorial</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1285" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1279" HREF="node85.html">SLA_E2H - to Az,El</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000473000000000000000">SLA_EARTH - Approx Earth Pos/Vel</A>
+<A NAME="xref_SLA_EARTH">&#160;</A><A NAME="SLA_EARTH">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Approximate heliocentric position and velocity of the Earth
+(single precision).
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_EARTH (IY, ID, FD, PV)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>IY</EM></TD>
+<TH ALIGN="LEFT"><B>I</B></TH>
+<TD ALIGN="LEFT" NOWRAP>year</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ID</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>day in year (1 = Jan 1st)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>FD</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>fraction of day</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PV</EM></TD>
+<TH ALIGN="LEFT"><B>R(6)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>Earth <IMG WIDTH="106" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img51.gif"
+ ALT="$[\,x,y,z,\dot{x},\dot{y},\dot{z}\,]$"> (AU, AU&nbsp;s<SUP>-1</SUP>)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The date and time is TDB (loosely ET) in a Julian calendar
+which has been aligned to the ordinary Gregorian
+calendar for the interval 1900&nbsp;March&nbsp;1 to 2100&nbsp;February&nbsp;28.
+ The year and day can be obtained by calling sla_CALYD or
+ sla_CLYD.
+ <DT>2.
+<DD>The Earth heliocentric 6-vector is referred to the
+ FK4 mean equator and equinox of date.
+ <DT>3.
+<DD>Maximum/RMS errors 1950-2050:
+ <UL>
+<LI> 13/5&nbsp;<IMG WIDTH="48" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
+ SRC="img93.gif"
+ ALT="$\times10^{-5}$">&nbsp;AU = 19200/7600&nbsp;km in position
+<LI> 47/26&nbsp;<IMG WIDTH="55" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
+ SRC="img94.gif"
+ ALT="$\times10^{-10}$">&nbsp;AU&nbsp;s<SUP>-1</SUP> =
+ 0.0070/0.0039&nbsp;km&nbsp;s<SUP>-1</SUP> in speed
+ </UL>
+ <DT>4.
+<DD>More accurate results are obtainable with the routine sla_EVP.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1286" HREF="node87.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1284" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1278" HREF="node85.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1287" HREF="node87.html">SLA_ECLEQ - Ecliptic to Equatorial</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1285" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1279" HREF="node85.html">SLA_E2H - to Az,El</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node87.html b/src/slalib/sun67.htx/node87.html
new file mode 100644
index 0000000..5935487
--- /dev/null
+++ b/src/slalib/sun67.htx/node87.html
@@ -0,0 +1,97 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_ECLEQ - Ecliptic to Equatorial</TITLE>
+<META NAME="description" CONTENT="SLA_ECLEQ - Ecliptic to Equatorial">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node88.html">
+<LINK REL="previous" HREF="node86.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node88.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1296" HREF="node88.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1294" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1288" HREF="node86.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1297" HREF="node88.html">SLA_ECMAT - Form Matrix</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1295" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1289" HREF="node86.html">SLA_EARTH - Approx Earth Pos/Vel</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000474000000000000000">SLA_ECLEQ - Ecliptic to Equatorial</A>
+<A NAME="xref_SLA_ECLEQ">&#160;</A><A NAME="SLA_ECLEQ">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Transformation from ecliptic longitude and latitude to
+J2000.0 <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$">.<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_ECLEQ (DL, DB, DATE, DR, DD)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DL,DB</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>ecliptic longitude and latitude
+(mean of date, IAU 1980 theory, radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DATE</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>TDB (formerly ET) as Modified Julian Date
+(JD-2400000.5)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DR,DD</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>J2000.0 mean <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> (radians)</TD>
+</TR>
+</TABLE></DL>
+<BR> <HR>
+<A NAME="tex2html1296" HREF="node88.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1294" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1288" HREF="node86.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1297" HREF="node88.html">SLA_ECMAT - Form Matrix</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1295" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1289" HREF="node86.html">SLA_EARTH - Approx Earth Pos/Vel</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node88.html b/src/slalib/sun67.htx/node88.html
new file mode 100644
index 0000000..895c629
--- /dev/null
+++ b/src/slalib/sun67.htx/node88.html
@@ -0,0 +1,106 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_ECMAT - Form Matrix</TITLE>
+<META NAME="description" CONTENT="SLA_ECMAT - Form Matrix">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node89.html">
+<LINK REL="previous" HREF="node87.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node89.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1306" HREF="node89.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1304" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1298" HREF="node87.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1307" HREF="node89.html">SLA_ECOR - RV &amp; Time Corrns to Sun</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1305" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1299" HREF="node87.html">SLA_ECLEQ - Ecliptic to Equatorial</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000475000000000000000">&#160;</A><A NAME="xref_SLA_ECMAT">&#160;</A><A NAME="SLA_ECMAT">&#160;</A>
+<BR>
+SLA_ECMAT - Form <IMG WIDTH="81" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img95.gif"
+ ALT="$\alpha,\delta\rightarrow\lambda,\beta$"> Matrix
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Form the equatorial to ecliptic rotation matrix (IAU 1980 theory).
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_ECMAT (DATE, RMAT)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DATE</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>TDB (formerly ET) as Modified Julian Date
+(JD-2400000.5)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RMAT</EM></TD>
+<TH ALIGN="LEFT"><B>D(3,3)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>rotation matrix</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>RMAT is matrix <B>M</B> in the expression
+<B>v</B><SUB><I>ecl</I></SUB>&nbsp;=&nbsp;<B>M</B><IMG WIDTH="7" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img72.gif"
+ ALT="$\cdot$"><B>v</B><SUB><I>equ</I></SUB>.
+<DT>2.
+<DD>The equator, equinox and ecliptic are mean of date.
+ </DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCE:</STRONG>
+<DD>Murray, C.A., <I>Vectorial Astrometry</I>, section 4.3.
+</DL>
+<BR> <HR>
+<A NAME="tex2html1306" HREF="node89.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1304" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1298" HREF="node87.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1307" HREF="node89.html">SLA_ECOR - RV &amp; Time Corrns to Sun</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1305" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1299" HREF="node87.html">SLA_ECLEQ - Ecliptic to Equatorial</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node89.html b/src/slalib/sun67.htx/node89.html
new file mode 100644
index 0000000..990df2a
--- /dev/null
+++ b/src/slalib/sun67.htx/node89.html
@@ -0,0 +1,140 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_ECOR - RV &amp; Time Corrns to Sun</TITLE>
+<META NAME="description" CONTENT="SLA_ECOR - RV &amp; Time Corrns to Sun">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node90.html">
+<LINK REL="previous" HREF="node88.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node90.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1316" HREF="node90.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1314" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1308" HREF="node88.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1317" HREF="node90.html">SLA_EG50 - B1950 to Galactic</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1315" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1309" HREF="node88.html">SLA_ECMAT - Form Matrix</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000476000000000000000">SLA_ECOR - RV &amp; Time Corrns to Sun</A>
+<A NAME="xref_SLA_ECOR">&#160;</A><A NAME="SLA_ECOR">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Component of Earth orbit velocity and heliocentric
+light time in a given direction.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_ECOR (RM, DM, IY, ID, FD, RV, TL)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RM,DM</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>mean <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> of date (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>IY</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>year</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ID</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>day in year (1 = Jan 1st)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>FD</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>fraction of day</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>RV</EM></TD>
+<TH ALIGN="LEFT"><B>R</B></TH>
+<TD ALIGN="LEFT" NOWRAP>component of Earth orbital velocity (km&nbsp;s<SUP>-1</SUP>)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>TL</EM></TD>
+<TD ALIGN="LEFT"><B>R</B></TD>
+<TD ALIGN="LEFT" NOWRAP>component of heliocentric light time (s)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The date and time is TDB (loosely ET) in a Julian calendar
+which has been aligned to the ordinary Gregorian
+calendar for the interval 1900 March 1 to 2100 February 28.
+ The year and day can be obtained by calling sla_CALYD or
+ sla_CLYD.
+ <DT>2.
+<DD>Sign convention:
+ <UL>
+<LI> The velocity component is +ve when the
+ Earth is receding from
+ the given point on the sky.
+<LI> The light time component is +ve
+ when the Earth lies between the Sun and
+ the given point on the sky.
+ </UL>
+ <DT>3.
+<DD>Accuracy:
+ <UL>
+<LI> The velocity component is usually within 0.004&nbsp;km&nbsp;s<SUP>-1</SUP>
+ of the correct value and is never in error by more than
+ 0.007&nbsp;km&nbsp;s<SUP>-1</SUP>.
+<LI> The error in light time correction is about
+ <IMG WIDTH="32" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img96.gif"
+ ALT="$0^{\rm s}\hspace{-0.3em}.03$"> at worst,
+ but is usually better than <IMG WIDTH="32" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img97.gif"
+ ALT="$0^{\rm s}\hspace{-0.3em}.01$">. </UL>
+ For applications requiring higher accuracy, see the sla_EVP routine.
+ </DL></DL>
+<BR> <HR>
+<A NAME="tex2html1316" HREF="node90.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1314" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1308" HREF="node88.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1317" HREF="node90.html">SLA_EG50 - B1950 to Galactic</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1315" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1309" HREF="node88.html">SLA_ECMAT - Form Matrix</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node9.html b/src/slalib/sun67.htx/node9.html
new file mode 100644
index 0000000..a9d8058
--- /dev/null
+++ b/src/slalib/sun67.htx/node9.html
@@ -0,0 +1,75 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Future Versions</TITLE>
+<META NAME="description" CONTENT="Future Versions">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node10.html">
+<LINK REL="previous" HREF="node8.html">
+<LINK REL="up" HREF="node2.html">
+<LINK REL="next" HREF="node10.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html335" HREF="node10.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html333" HREF="node2.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html327" HREF="node8.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html336" HREF="node10.html">New Functions</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html334" HREF="node2.html">INTRODUCTION</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html328" HREF="node8.html">C Version</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION00027000000000000000">
+Future Versions</A>
+</H2>
+The homogeneity and ease of use of SLALIB could perhaps be improved
+in the future
+by turning to C++ and object-oriented techniques. For example ``celestial
+position'' could be a class and many of the transformations
+could happen automatically. This requires further study and
+would almost certainly result in a complete redesign.
+Similarly,
+the impact of Fortran&nbsp;90 has yet to be assessed. Once compilers
+become widely available, some internal recoding may be worthwhile
+in order to simplify parts of the code. However, as with C++,
+a redesign of the
+application interfaces will be needed if the capabilities of the
+new language are to be exploited to the full.
+<P>
+<BR> <HR>
+<A NAME="tex2html335" HREF="node10.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html333" HREF="node2.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html327" HREF="node8.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html336" HREF="node10.html">New Functions</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html334" HREF="node2.html">INTRODUCTION</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html328" HREF="node8.html">C Version</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node90.html b/src/slalib/sun67.htx/node90.html
new file mode 100644
index 0000000..1deba43
--- /dev/null
+++ b/src/slalib/sun67.htx/node90.html
@@ -0,0 +1,106 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_EG50 - B1950 to Galactic</TITLE>
+<META NAME="description" CONTENT="SLA_EG50 - B1950 to Galactic">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node91.html">
+<LINK REL="previous" HREF="node89.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node91.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1326" HREF="node91.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1324" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1318" HREF="node89.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1327" HREF="node91.html">SLA_EL2UE - Conventional to Universal Elements</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1325" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1319" HREF="node89.html">SLA_ECOR - RV &amp; Time Corrns to Sun</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000477000000000000000">&#160;</A><A NAME="xref_SLA_EG50">&#160;</A><A NAME="SLA_EG50">&#160;</A>
+<BR>
+SLA_EG50 - B1950 <IMG WIDTH="28" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img91.gif"
+ ALT="$\alpha,\delta$"> to Galactic
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Transformation from B1950.0 FK4 equatorial coordinates to
+IAU 1958 galactic coordinates.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_EG50 (DR, DD, DL, DB)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DR,DD</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>B1950.0 <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DL,DB</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>galactic longitude and latitude <IMG WIDTH="59" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
+ SRC="img98.gif"
+ ALT="$[\,l^{I\!I},b^{I\!I}\,]$"> (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTE:</STRONG>
+<DD>The equatorial coordinates are B1950.0 FK4. Use the
+routine sla_EQGAL if conversion from J2000.0 FK5 coordinates
+ is required.
+ </DL>
+<P> <DL>
+<DT><STRONG>REFERENCE:</STRONG>
+<DD>Blaauw <I>et al.</I>, 1960, <I>Mon.Not.R.astr.Soc.</I>,
+<B>121</B>, 123.
+ </DL>
+<BR> <HR>
+<A NAME="tex2html1326" HREF="node91.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1324" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1318" HREF="node89.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1327" HREF="node91.html">SLA_EL2UE - Conventional to Universal Elements</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1325" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1319" HREF="node89.html">SLA_ECOR - RV &amp; Time Corrns to Sun</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node91.html b/src/slalib/sun67.htx/node91.html
new file mode 100644
index 0000000..2beedff
--- /dev/null
+++ b/src/slalib/sun67.htx/node91.html
@@ -0,0 +1,330 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_EL2UE - Conventional to Universal Elements</TITLE>
+<META NAME="description" CONTENT="SLA_EL2UE - Conventional to Universal Elements">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node92.html">
+<LINK REL="previous" HREF="node90.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node92.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1336" HREF="node92.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1334" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1328" HREF="node90.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1337" HREF="node92.html">SLA_EPB - MJD to Besselian Epoch</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1335" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1329" HREF="node90.html">SLA_EG50 - B1950 to Galactic</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000478000000000000000">SLA_EL2UE - Conventional to Universal Elements</A>
+<A NAME="xref_SLA_EL2UE">&#160;</A><A NAME="SLA_EL2UE">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Transform conventional osculating orbital elements
+into ``universal'' form.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_EL2UE (
+ DATE, JFORM, EPOCH, ORBINC, ANODE,
+ PERIH, AORQ, E, AORL, DM,
+ U, JSTAT)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DATE</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>epoch (TT MJD) of osculation (Note&nbsp;3)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>JFORM</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>choice of element set (1-3; Note&nbsp;6)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>EPOCH</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>epoch of elements (<I>t<SUB>0</SUB></I> or <I>T</I>, TT MJD)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ORBINC</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>inclination (<I>i</I>, radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>ANODE</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>longitude of the ascending node (<IMG WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img99.gif"
+ ALT="$\Omega$">, radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>PERIH</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>longitude or argument of perihelion
+(<IMG WIDTH="16" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img100.gif"
+ ALT="$\varpi$"> or <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img101.gif"
+ ALT="$\omega$">,</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>AORQ</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>mean distance or perihelion distance (<I>a</I> or <I>q</I>, AU)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>E</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>eccentricity (<I>e</I>)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>AORL</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>mean anomaly or longitude
+(<I>M</I> or <I>L</I>, radians,</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> JFORM=1,2 only)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DM</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>daily motion (<I>n</I>, radians, JFORM=1 only)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>U</EM></TD>
+<TH ALIGN="LEFT"><B>D(13)</B></TH>
+<TD ALIGN="LEFT" NOWRAP>universal orbital elements (Note&nbsp;1)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(1)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>combined mass (<I>M</I>+<I>m</I>)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(2)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>total energy of the orbit (<IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$">)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(3)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>reference (osculating) epoch (<I>t<SUB>0</SUB></I>)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(4-6)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>position at reference epoch (<IMG WIDTH="17" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img102.gif"
+ ALT="${\rm \bf r}_0$">)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(7-9)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>velocity at reference epoch (<IMG WIDTH="19" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img103.gif"
+ ALT="${\rm \bf v}_0$">)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(10)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>heliocentric distance at reference epoch</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(11)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="39" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img104.gif"
+ ALT="${\rm \bf r}_0.{\rm \bf v}_0$"></TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(12)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>date (<I>t</I>)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="CENTER" NOWRAP COLSPAN=1>(13)</TD>
+<TD></TD>
+<TD ALIGN="LEFT" NOWRAP>universal eccentric anomaly (<IMG WIDTH="14" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img105.gif"
+ ALT="$\psi$">) of date,
+approx</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT">&nbsp;</TD>
+<TD ALIGN="LEFT">&nbsp;</TD>
+<TD ALIGN="LEFT" NOWRAP>&nbsp;</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>JSTAT</EM></TD>
+<TD ALIGN="LEFT"><B>I</B></TD>
+<TD ALIGN="LEFT" NOWRAP>status:</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> 0 = OK</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -1 = illegal JFORM</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -2 = illegal E</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -3 = illegal AORQ</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -4 = illegal DM</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM></EM></TD>
+<TD ALIGN="LEFT"><B></B></TD>
+<TD ALIGN="LEFT" NOWRAP> -5 = numerical error</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The ``universal'' elements are those which define the orbit for
+the purposes of the method of universal variables (see reference).
+They consist of the combined mass of the two bodies, an epoch,
+ and the position and velocity vectors (arbitrary reference frame)
+ at that epoch. The parameter set used here includes also various
+ quantities that can, in fact, be derived from the other
+ information. This approach is taken to avoiding unnecessary
+ computation and loss of accuracy. The supplementary quantities
+ are (i)&nbsp;<IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img24.gif"
+ ALT="$\alpha$">, which is proportional to the total energy of the
+ orbit, (ii)&nbsp;the heliocentric distance at epoch,
+ (iii)&nbsp;the outwards component of the velocity at the given epoch,
+ (iv)&nbsp;an estimate of <IMG WIDTH="14" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img105.gif"
+ ALT="$\psi$">, the ``universal eccentric anomaly'' at a
+ given date and (v)&nbsp;that date.
+ <DT>2.
+<DD>The companion routine is sla_UE2PV. This takes the set of numbers
+ that the present routine outputs and uses them to derive the
+ object's position and velocity. A single prediction requires one
+ call to the present routine followed by one call to sla_UE2PV;
+ for convenience, the two calls are packaged as the routine
+ sla_PLANEL. Multiple predictions may be made by again calling the
+ present routine once, but then calling sla_UE2PV multiple times,
+ which is faster than multiple calls to sla_PLANEL.
+ <DT>3.
+<DD>DATE is the epoch of osculation. It is in the TT timescale
+ (formerly Ephemeris Time, ET) and is a Modified Julian Date
+ (JD-2400000.5).
+ <DT>4.
+<DD>The supplied orbital elements are with respect to the J2000
+ ecliptic and equinox. The position and velocity parameters
+ returned in the array U are with respect to the mean equator and
+ equinox of epoch J2000, and are for the perihelion prior to the
+ specified epoch.
+ <DT>5.
+<DD>The universal elements returned in the array U are in canonical
+ units (solar masses, AU and canonical days).
+ <DT>6.
+<DD>Three different element-format options are supported, as
+ follows. <BR>
+<P>
+JFORM=1, suitable for the major planets:
+<P> <PRE><TT>
+ EPOCH = epoch of elements <I>t<SUB>0</SUB></I> (TT MJD)
+ ORBINC = inclination <I>i</I> (radians)
+ ANODE = longitude of the ascending node <IMG WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img99.gif"
+ ALT="$\Omega$"> (radians)
+ PERIH = longitude of perihelion <IMG WIDTH="16" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img100.gif"
+ ALT="$\varpi$"> (radians)
+ AORQ = mean distance <I>a</I> (AU)
+ E = eccentricity <I>e</I> <IMG WIDTH="83" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img106.gif"
+ ALT="$( 0 \leq e < 1 )$">
+ AORL = mean longitude <I>L</I> (radians)
+ DM = daily motion <I>n</I> (radians)
+</TT></PRE>
+<P>
+JFORM=2, suitable for minor planets:
+<P> <PRE><TT>
+ EPOCH = epoch of elements <I>t<SUB>0</SUB></I> (TT MJD)
+ ORBINC = inclination <I>i</I> (radians)
+ ANODE = longitude of the ascending node <IMG WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img99.gif"
+ ALT="$\Omega$"> (radians)
+ PERIH = argument of perihelion <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img101.gif"
+ ALT="$\omega$"> (radians)
+ AORQ = mean distance <I>a</I> (AU)
+ E = eccentricity <I>e</I> <IMG WIDTH="83" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img106.gif"
+ ALT="$( 0 \leq e < 1 )$">
+ AORL = mean anomaly <I>M</I> (radians)
+</TT></PRE>
+<P>
+JFORM=3, suitable for comets:
+<P> <PRE><TT>
+ EPOCH = epoch of perihelion <I>T</I> (TT MJD)
+ ORBINC = inclination <I>i</I> (radians)
+ ANODE = longitude of the ascending node <IMG WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
+ SRC="img99.gif"
+ ALT="$\Omega$"> (radians)
+ PERIH = argument of perihelion <IMG WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
+ SRC="img101.gif"
+ ALT="$\omega$"> (radians)
+ AORQ = perihelion distance <I>q</I> (AU)
+ E = eccentricity <I>e</I> <IMG WIDTH="91" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img107.gif"
+ ALT="$( 0 \leq e \leq 10 )$"></TT></PRE>
+ <DT>7.
+<DD>Unused elements (DM for JFORM=2, AORL and DM for JFORM=3) are
+ not accessed.
+ <DT>8.
+<DD>The algorithm was originally adapted from the EPHSLA program of
+ D.H.P.Jones (private communication, 1996). The method
+ is based on Stumpff's Universal Variables.
+ </DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCE:</STRONG>
+<DD>Everhart, E. &amp; Pitkin, E.T., Am.&nbsp;J.&nbsp;Phys.&nbsp;51, 712, 1983.
+</DL>
+<BR> <HR>
+<A NAME="tex2html1336" HREF="node92.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1334" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1328" HREF="node90.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1337" HREF="node92.html">SLA_EPB - MJD to Besselian Epoch</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1335" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1329" HREF="node90.html">SLA_EG50 - B1950 to Galactic</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node92.html b/src/slalib/sun67.htx/node92.html
new file mode 100644
index 0000000..854488f
--- /dev/null
+++ b/src/slalib/sun67.htx/node92.html
@@ -0,0 +1,91 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_EPB - MJD to Besselian Epoch</TITLE>
+<META NAME="description" CONTENT="SLA_EPB - MJD to Besselian Epoch">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node93.html">
+<LINK REL="previous" HREF="node91.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node93.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1346" HREF="node93.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1344" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1338" HREF="node91.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1347" HREF="node93.html">SLA_EPB2D - Besselian Epoch to MJD</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1345" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1339" HREF="node91.html">SLA_EL2UE - Conventional to Universal Elements</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000479000000000000000">SLA_EPB - MJD to Besselian Epoch</A>
+<A NAME="xref_SLA_EPB">&#160;</A><A NAME="SLA_EPB">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Conversion of Modified Julian Date to Besselian Epoch.
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>D&nbsp;=&nbsp;sla_EPB (DATE)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DATE</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>Modified Julian Date (JD-2400000.5)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>sla_EPB</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>Besselian Epoch</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>REFERENCE:</STRONG>
+<DD>Lieske, J.H., 1979, <I>Astr.Astrophys.</I> <B>73</B>, 282.
+</DL>
+<BR> <HR>
+<A NAME="tex2html1346" HREF="node93.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1344" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1338" HREF="node91.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1347" HREF="node93.html">SLA_EPB2D - Besselian Epoch to MJD</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1345" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1339" HREF="node91.html">SLA_EL2UE - Conventional to Universal Elements</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node93.html b/src/slalib/sun67.htx/node93.html
new file mode 100644
index 0000000..c142fe7
--- /dev/null
+++ b/src/slalib/sun67.htx/node93.html
@@ -0,0 +1,91 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_EPB2D - Besselian Epoch to MJD</TITLE>
+<META NAME="description" CONTENT="SLA_EPB2D - Besselian Epoch to MJD">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node94.html">
+<LINK REL="previous" HREF="node92.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node94.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1356" HREF="node94.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1354" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1348" HREF="node92.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1357" HREF="node94.html">SLA_EPCO - Convert Epoch to B or J</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1355" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1349" HREF="node92.html">SLA_EPB - MJD to Besselian Epoch</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000480000000000000000">SLA_EPB2D - Besselian Epoch to MJD</A>
+<A NAME="xref_SLA_EPB2D">&#160;</A><A NAME="SLA_EPB2D">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Conversion of Besselian Epoch to Modified Julian Date.
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>D&nbsp;=&nbsp;sla_EPB2D (EPB)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>EPB</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>Besselian Epoch</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>sla_EPB2D</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>Modified Julian Date (JD-2400000.5)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>REFERENCE:</STRONG>
+<DD>Lieske, J.H., 1979. <I>Astr.Astrophys.</I> <B>73</B>, 282.
+</DL>
+<BR> <HR>
+<A NAME="tex2html1356" HREF="node94.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1354" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1348" HREF="node92.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1357" HREF="node94.html">SLA_EPCO - Convert Epoch to B or J</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1355" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1349" HREF="node92.html">SLA_EPB - MJD to Besselian Epoch</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node94.html b/src/slalib/sun67.htx/node94.html
new file mode 100644
index 0000000..e71fda8
--- /dev/null
+++ b/src/slalib/sun67.htx/node94.html
@@ -0,0 +1,110 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_EPCO - Convert Epoch to B or J</TITLE>
+<META NAME="description" CONTENT="SLA_EPCO - Convert Epoch to B or J">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node95.html">
+<LINK REL="previous" HREF="node93.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node95.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1366" HREF="node95.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1364" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1358" HREF="node93.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1367" HREF="node95.html">SLA_EPJ - MJD to Julian Epoch</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1365" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1359" HREF="node93.html">SLA_EPB2D - Besselian Epoch to MJD</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000481000000000000000">SLA_EPCO - Convert Epoch to B or J</A>
+<A NAME="xref_SLA_EPCO">&#160;</A><A NAME="SLA_EPCO">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Convert an epoch to Besselian or Julian to match another one.
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>D&nbsp;=&nbsp;sla_EPCO (K0, K, E)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>K0</EM></TD>
+<TH ALIGN="LEFT"><B>C</B></TH>
+<TD ALIGN="LEFT" NOWRAP>form of result: `B'=Besselian, `J'=Julian</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>K</EM></TD>
+<TD ALIGN="LEFT"><B>C</B></TD>
+<TD ALIGN="LEFT" NOWRAP>form of given epoch: `B' or `J'</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>E</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>epoch</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>sla_EPCO</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>the given epoch converted as necessary</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The result is always either equal to or very close to
+the given epoch E. The routine is required only in
+applications where punctilious treatment of heterogeneous
+ mixtures of star positions is necessary.
+ <DT>2.
+<DD>K0 and K are not validated. They are interpreted as follows:
+ <UL>
+<LI> If K0 and K are the same, the result is E.
+<LI> If K0 is `B' and K isn't, the conversion is J to B.
+<LI> In all other cases, the conversion is B to J.
+ </UL></DL></DL>
+<BR> <HR>
+<A NAME="tex2html1366" HREF="node95.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1364" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1358" HREF="node93.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1367" HREF="node95.html">SLA_EPJ - MJD to Julian Epoch</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1365" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1359" HREF="node93.html">SLA_EPB2D - Besselian Epoch to MJD</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node95.html b/src/slalib/sun67.htx/node95.html
new file mode 100644
index 0000000..aefb9d6
--- /dev/null
+++ b/src/slalib/sun67.htx/node95.html
@@ -0,0 +1,91 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_EPJ - MJD to Julian Epoch</TITLE>
+<META NAME="description" CONTENT="SLA_EPJ - MJD to Julian Epoch">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node96.html">
+<LINK REL="previous" HREF="node94.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node96.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1376" HREF="node96.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1374" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1368" HREF="node94.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1377" HREF="node96.html">SLA_EPJ2D - Julian Epoch to MJD</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1375" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1369" HREF="node94.html">SLA_EPCO - Convert Epoch to B or J</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000482000000000000000">SLA_EPJ - MJD to Julian Epoch</A>
+<A NAME="xref_SLA_EPJ">&#160;</A><A NAME="SLA_EPJ">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Convert Modified Julian Date to Julian Epoch.
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>D&nbsp;=&nbsp;sla_EPJ (DATE)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DATE</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>Modified Julian Date (JD-2400000.5)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>sla_EPJ</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>Julian Epoch</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>REFERENCE:</STRONG>
+<DD>Lieske, J.H., 1979. <I>Astr.Astrophys.</I>, <B>73</B>, 282.
+</DL>
+<BR> <HR>
+<A NAME="tex2html1376" HREF="node96.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1374" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1368" HREF="node94.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1377" HREF="node96.html">SLA_EPJ2D - Julian Epoch to MJD</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1375" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1369" HREF="node94.html">SLA_EPCO - Convert Epoch to B or J</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node96.html b/src/slalib/sun67.htx/node96.html
new file mode 100644
index 0000000..c0f38a9
--- /dev/null
+++ b/src/slalib/sun67.htx/node96.html
@@ -0,0 +1,91 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_EPJ2D - Julian Epoch to MJD</TITLE>
+<META NAME="description" CONTENT="SLA_EPJ2D - Julian Epoch to MJD">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node97.html">
+<LINK REL="previous" HREF="node95.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node97.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1386" HREF="node97.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1384" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1378" HREF="node95.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1387" HREF="node97.html">SLA_EQECL - J2000 to Ecliptic</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1385" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1379" HREF="node95.html">SLA_EPJ - MJD to Julian Epoch</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000483000000000000000">SLA_EPJ2D - Julian Epoch to MJD</A>
+<A NAME="xref_SLA_EPJ2D">&#160;</A><A NAME="SLA_EPJ2D">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Convert Julian Epoch to Modified Julian Date.
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>D&nbsp;=&nbsp;sla_EPJ2D (EPJ)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>EPJ</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>Julian Epoch</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>sla_EPJ2D</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>Modified Julian Date (JD-2400000.5)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>REFERENCE:</STRONG>
+<DD>Lieske, J.H., 1979. <I>Astr.Astrophys.</I>, <B>73</B>, 282.
+</DL>
+<BR> <HR>
+<A NAME="tex2html1386" HREF="node97.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1384" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1378" HREF="node95.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1387" HREF="node97.html">SLA_EQECL - J2000 to Ecliptic</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1385" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1379" HREF="node95.html">SLA_EPJ - MJD to Julian Epoch</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node97.html b/src/slalib/sun67.htx/node97.html
new file mode 100644
index 0000000..a386ad5
--- /dev/null
+++ b/src/slalib/sun67.htx/node97.html
@@ -0,0 +1,98 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_EQECL - J2000 to Ecliptic</TITLE>
+<META NAME="description" CONTENT="SLA_EQECL - J2000 to Ecliptic">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node98.html">
+<LINK REL="previous" HREF="node96.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node98.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1396" HREF="node98.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1394" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1388" HREF="node96.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1397" HREF="node98.html">SLA_EQEQX - Equation of the Equinoxes</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1395" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1389" HREF="node96.html">SLA_EPJ2D - Julian Epoch to MJD</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000484000000000000000">&#160;</A><A NAME="xref_SLA_EQECL">&#160;</A><A NAME="SLA_EQECL">&#160;</A>
+<BR>
+SLA_EQECL - J2000 <IMG WIDTH="28" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img91.gif"
+ ALT="$\alpha,\delta$"> to Ecliptic
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Transformation from J2000.0 equatorial coordinates to
+ecliptic longitude and latitude.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_EQECL (DR, DD, DATE, DL, DB)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DR,DD</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>J2000.0 mean <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> (radians)</TD>
+</TR>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DATE</EM></TD>
+<TD ALIGN="LEFT"><B>D</B></TD>
+<TD ALIGN="LEFT" NOWRAP>TDB (formerly ET) as Modified Julian Date (JD-2400000.5)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DL,DB</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>ecliptic longitude and latitude
+(mean of date, IAU 1980 theory, radians)</TD>
+</TR>
+</TABLE></DL>
+<BR> <HR>
+<A NAME="tex2html1396" HREF="node98.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1394" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1388" HREF="node96.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1397" HREF="node98.html">SLA_EQEQX - Equation of the Equinoxes</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1395" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1389" HREF="node96.html">SLA_EPJ2D - Julian Epoch to MJD</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node98.html b/src/slalib/sun67.htx/node98.html
new file mode 100644
index 0000000..e5a2cc7
--- /dev/null
+++ b/src/slalib/sun67.htx/node98.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_EQEQX - Equation of the Equinoxes</TITLE>
+<META NAME="description" CONTENT="SLA_EQEQX - Equation of the Equinoxes">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node99.html">
+<LINK REL="previous" HREF="node97.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node99.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1406" HREF="node99.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1404" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1398" HREF="node97.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1407" HREF="node99.html">SLA_EQGAL - J2000 to Galactic</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1405" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1399" HREF="node97.html">SLA_EQECL - J2000 to Ecliptic</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000485000000000000000">SLA_EQEQX - Equation of the Equinoxes</A>
+<A NAME="xref_SLA_EQEQX">&#160;</A><A NAME="SLA_EQEQX">&#160;</A>
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Equation of the equinoxes (IAU 1994).
+<DT><STRONG>CALL:</STRONG>
+<DD><TT>D&nbsp;=&nbsp;sla_EQEQX (DATE)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DATE</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>TDB (formerly ET) as Modified Julian Date (JD-2400000.5)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>sla_EQEQX</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>The equation of the equinoxes (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTES:</STRONG>
+<DD><DL COMPACT>
+<DT>1.
+<DD>The equation of the equinoxes is defined here as GAST&nbsp;-&nbsp;GMST:
+it is added to a <I>mean</I> sidereal time to give the
+<I>apparent</I> sidereal time.
+ <DT>2.
+<DD>The change from the classic ``textbook'' expression
+ <IMG WIDTH="62" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img108.gif"
+ ALT="$\Delta\psi\,cos\,\epsilon$"> occurred with IAU Resolution C7,
+ Recommendation&nbsp;3 (1994). The new formulation takes into
+ account cross-terms between the various precession and
+ nutation quantities, amounting to about 3&nbsp;milliarcsec.
+ The transition from the old to the new model officially
+ takes place on 1997 February&nbsp;27.
+ </DL></DL>
+<P> <DL>
+<DT><STRONG>REFERENCE:</STRONG>
+<DD>Capitaine, N. &amp; Gontier, A.-M. (1993),
+<I>Astron. Astrophys.</I>,
+ <B>275</B>, 645-650.
+ </DL>
+<BR> <HR>
+<A NAME="tex2html1406" HREF="node99.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1404" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1398" HREF="node97.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1407" HREF="node99.html">SLA_EQGAL - J2000 to Galactic</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1405" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1399" HREF="node97.html">SLA_EQECL - J2000 to Ecliptic</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/node99.html b/src/slalib/sun67.htx/node99.html
new file mode 100644
index 0000000..1e4582a
--- /dev/null
+++ b/src/slalib/sun67.htx/node99.html
@@ -0,0 +1,105 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLA_EQGAL - J2000 to Galactic</TITLE>
+<META NAME="description" CONTENT="SLA_EQGAL - J2000 to Galactic">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node100.html">
+<LINK REL="previous" HREF="node98.html">
+<LINK REL="up" HREF="node13.html">
+<LINK REL="next" HREF="node100.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html1416" HREF="node100.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1414" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1408" HREF="node98.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1417" HREF="node100.html">SLA_ETRMS - E-terms of Aberration</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1415" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1409" HREF="node98.html">SLA_EQEQX - Equation of the Equinoxes</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<H2><A NAME="SECTION000486000000000000000">&#160;</A><A NAME="xref_SLA_EQGAL">&#160;</A><A NAME="SLA_EQGAL">&#160;</A>
+<BR>
+SLA_EQGAL - J2000 <IMG WIDTH="28" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img91.gif"
+ ALT="$\alpha,\delta$"> to Galactic
+</H2>
+ <DL>
+<DT><STRONG>ACTION:</STRONG>
+<DD>Transformation from J2000.0 FK5 equatorial coordinates to
+IAU 1958 galactic coordinates.
+<P> <DT><STRONG>CALL:</STRONG>
+<DD><TT>CALL sla_EQGAL (DR, DD, DL, DB)</TT>
+<P> </DL>
+<P> <DL>
+<DT><STRONG>GIVEN:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DR,DD</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>J2000.0 <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>RETURNED:</STRONG>
+<DD>
+<BR>
+<TABLE CELLPADDING=3>
+<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>DL,DB</EM></TD>
+<TH ALIGN="LEFT"><B>D</B></TH>
+<TD ALIGN="LEFT" NOWRAP>galactic longitude and latitude <IMG WIDTH="59" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
+ SRC="img98.gif"
+ ALT="$[\,l^{I\!I},b^{I\!I}\,]$"> (radians)</TD>
+</TR>
+</TABLE></DL>
+<P> <DL>
+<DT><STRONG>NOTE:</STRONG>
+<DD>The equatorial coordinates are J2000.0 FK5. Use the routine
+sla_EG50 if conversion from B1950.0 FK4 coordinates is required.
+ </DL>
+<P> <DL>
+<DT><STRONG>REFERENCE:</STRONG>
+<DD>Blaauw <I>et al.</I>, 1960, <I>Mon.Not.R.astr.Soc.</I>,
+<B>121</B>, 123.
+ </DL>
+<BR> <HR>
+<A NAME="tex2html1416" HREF="node100.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<A NAME="tex2html1414" HREF="node13.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
+<A NAME="tex2html1408" HREF="node98.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html1417" HREF="node100.html">SLA_ETRMS - E-terms of Aberration</A>
+<BR>
+<B>Up:</B> <A NAME="tex2html1415" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
+<BR>
+<B> Previous:</B> <A NAME="tex2html1409" HREF="node98.html">SLA_EQEQX - Equation of the Equinoxes</A>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/orangeball.gif b/src/slalib/sun67.htx/orangeball.gif
new file mode 100644
index 0000000..e757cd0
--- /dev/null
+++ b/src/slalib/sun67.htx/orangeball.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/pinkball.gif b/src/slalib/sun67.htx/pinkball.gif
new file mode 100644
index 0000000..43e843b
--- /dev/null
+++ b/src/slalib/sun67.htx/pinkball.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/previous_group_motif.gif b/src/slalib/sun67.htx/previous_group_motif.gif
new file mode 100644
index 0000000..03ea0dc
--- /dev/null
+++ b/src/slalib/sun67.htx/previous_group_motif.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/previous_group_motif_gr.gif b/src/slalib/sun67.htx/previous_group_motif_gr.gif
new file mode 100644
index 0000000..c7a1e2b
--- /dev/null
+++ b/src/slalib/sun67.htx/previous_group_motif_gr.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/previous_motif.gif b/src/slalib/sun67.htx/previous_motif.gif
new file mode 100644
index 0000000..aef90f1
--- /dev/null
+++ b/src/slalib/sun67.htx/previous_motif.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/previous_motif_gr.gif b/src/slalib/sun67.htx/previous_motif_gr.gif
new file mode 100644
index 0000000..c6acaab
--- /dev/null
+++ b/src/slalib/sun67.htx/previous_motif_gr.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/purpleball.gif b/src/slalib/sun67.htx/purpleball.gif
new file mode 100644
index 0000000..4836265
--- /dev/null
+++ b/src/slalib/sun67.htx/purpleball.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/redball.gif b/src/slalib/sun67.htx/redball.gif
new file mode 100644
index 0000000..b1a9580
--- /dev/null
+++ b/src/slalib/sun67.htx/redball.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/source.gif b/src/slalib/sun67.htx/source.gif
new file mode 100755
index 0000000..c8dea79
--- /dev/null
+++ b/src/slalib/sun67.htx/source.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/sun67.css b/src/slalib/sun67.htx/sun67.css
new file mode 100644
index 0000000..3970428
--- /dev/null
+++ b/src/slalib/sun67.htx/sun67.css
@@ -0,0 +1,10 @@
+
+SMALL.TINY { font-size : xx-small }
+SMALL.SCRIPTSIZE { font-size : xx-small }
+SMALL.FOOTNOTESIZE { font-size : x-small }
+SMALL.SMALL { font-size : small }
+BIG.LARGE { font-size : large }
+BIG.XLARGE { font-size : x-large }
+BIG.XXLARGE { font-size : xx-large }
+BIG.HUGE { font-size : xx-large }
+BIG.XHUGE { font-size : xx-large }
diff --git a/src/slalib/sun67.htx/sun67.html b/src/slalib/sun67.htx/sun67.html
new file mode 100644
index 0000000..1836213
--- /dev/null
+++ b/src/slalib/sun67.htx/sun67.html
@@ -0,0 +1,610 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
+ by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+ Jens Lippman, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>SLALIB -- Positional Astronomy Library</TITLE>
+<META NAME="description" CONTENT="SLALIB -- Positional Astronomy Library">
+<META NAME="keywords" CONTENT="sun67">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
+<LINK REL="STYLESHEET" HREF="sun67.css">
+<LINK REL="next" HREF="node1.html">
+</HEAD>
+<BODY >
+<BR> <HR>
+<A NAME="tex2html7" HREF="node1.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif_gr.gif">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif_gr.gif"> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html8" HREF="node1.html">Abstract</A>
+<BR>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<P><A NAME="xref_">&#160;</A>
+ <H1>
+ SLALIB -- Positional Astronomy Library
+<BR>
+2.4-0
+<BR>
+Programmer's Manual
+ </H1>
+<P> <P> <I>
+ Starlink User Note67.45
+<BR>
+P.T.Wallace
+<BR>
+12 October 1999
+ </I> </P> <H3>
+ <A NAME="tex2html1" HREF="http://www.cclrc.ac.uk">CCLRC</A>
+/
+ <A NAME="tex2html1" HREF="http://www.cclrc.ac.uk/ral">Rutherford Appleton Laboratory</A>
+<BR>
+ <A NAME="tex2html1" HREF="http://www.pparc.ac.uk">Particle Physics &amp; Astronomy Research Council</A>
+<BR>
+ </H3> <H2>
+ <A NAME="tex2html1" HREF="http://star-www.rl.ac.uk/">Starlink Project</A>
+ </H2>
+ <A NAME="tex2html1" HREF="http://star-www.rl.ac.uk/cgi-bin/hcserver?sun67.45"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="source.gif"> Retrieve hardcopy</A>
+<BR>
+<A NAME="stardoccontents">&#160;</A> <HR>
+ <H2>Contents</H2>
+<P> <BR><HR>
+<!--Table of Child-Links-->
+<A NAME="CHILD_LINKS">&#160;</A>
+<UL>
+<LI><A NAME="tex2html9" HREF="node1.html#SECTION00010000000000000000">
+Abstract</A>
+<LI><A NAME="tex2html10" HREF="node2.html#SECTION00020000000000000000">
+INTRODUCTION</A>
+<UL>
+<LI><A NAME="tex2html11" HREF="node3.html#SECTION00021000000000000000">
+Purpose</A>
+<LI><A NAME="tex2html12" HREF="node4.html#SECTION00022000000000000000">
+Example Application</A>
+<LI><A NAME="tex2html13" HREF="node5.html#SECTION00023000000000000000">
+Scope</A>
+<LI><A NAME="tex2html14" HREF="node6.html#SECTION00024000000000000000">
+Objectives</A>
+<LI><A NAME="tex2html15" HREF="node7.html#SECTION00025000000000000000">
+Fortran Version</A>
+<LI><A NAME="tex2html16" HREF="node8.html#SECTION00026000000000000000">
+C Version</A>
+<LI><A NAME="tex2html17" HREF="node9.html#SECTION00027000000000000000">
+Future Versions</A>
+<LI><A NAME="tex2html18" HREF="node10.html#SECTION00028000000000000000">
+New Functions</A>
+<LI><A NAME="tex2html19" HREF="node11.html#SECTION00029000000000000000">
+Acknowledgements</A>
+</UL>
+<LI><A NAME="tex2html20" HREF="node12.html#SECTION00030000000000000000">
+LINKING</A>
+<LI><A NAME="tex2html21" HREF="node13.html#SECTION00040000000000000000">
+SUBPROGRAM SPECIFICATIONS</A>
+<UL>
+<LI><A NAME="tex2html22" HREF="node14.html#SECTION00041000000000000000">
+SLA_ADDET - Add E-terms of Aberration</A>
+<LI><A NAME="tex2html23" HREF="node15.html#SECTION00042000000000000000">
+SLA_AFIN - Sexagesimal character string to angle</A>
+<LI><A NAME="tex2html24" HREF="node16.html#SECTION00043000000000000000">
+SLA_AIRMAS - Air Mass</A>
+<LI><A NAME="tex2html25" HREF="node17.html#SECTION00044000000000000000">
+SLA_ALTAZ - Velocities <I>etc.</I> for Altazimuth Mount</A>
+<LI><A NAME="tex2html26" HREF="node18.html#SECTION00045000000000000000">
+SLA_AMP - Apparent to Mean</A>
+<LI><A NAME="tex2html27" HREF="node19.html#SECTION00046000000000000000">
+SLA_AMPQK - Quick Apparent to Mean</A>
+<LI><A NAME="tex2html28" HREF="node20.html#SECTION00047000000000000000">
+SLA_AOP - Apparent to Observed</A>
+<LI><A NAME="tex2html29" HREF="node21.html#SECTION00048000000000000000">
+SLA_AOPPA - Appt-to-Obs Parameters</A>
+<LI><A NAME="tex2html30" HREF="node22.html#SECTION00049000000000000000">
+SLA_AOPPAT - Update Appt-to-Obs Parameters</A>
+<LI><A NAME="tex2html31" HREF="node23.html#SECTION000410000000000000000">
+SLA_AOPQK - Quick Appt-to-Observed</A>
+<LI><A NAME="tex2html32" HREF="node24.html#SECTION000411000000000000000">
+SLA_ATMDSP - Atmospheric Dispersion</A>
+<LI><A NAME="tex2html33" HREF="node25.html#SECTION000412000000000000000">
+SLA_AV2M - Rotation Matrix from Axial Vector</A>
+<LI><A NAME="tex2html34" HREF="node26.html#SECTION000413000000000000000">
+SLA_BEAR - Direction Between Points on a Sphere</A>
+<LI><A NAME="tex2html35" HREF="node27.html#SECTION000414000000000000000">
+SLA_CAF2R - Deg,Arcmin,Arcsec to Radians</A>
+<LI><A NAME="tex2html36" HREF="node28.html#SECTION000415000000000000000">
+SLA_CALDJ - Calendar Date to MJD</A>
+<LI><A NAME="tex2html37" HREF="node29.html#SECTION000416000000000000000">
+SLA_CALYD - Calendar to Year, Day</A>
+<LI><A NAME="tex2html38" HREF="node30.html#SECTION000417000000000000000">
+SLA_CC2S - Cartesian to Spherical</A>
+<LI><A NAME="tex2html39" HREF="node31.html#SECTION000418000000000000000">
+SLA_CC62S - Cartesian 6-Vector to Spherical</A>
+<LI><A NAME="tex2html40" HREF="node32.html#SECTION000419000000000000000">
+SLA_CD2TF - Days to Hour,Min,Sec</A>
+<LI><A NAME="tex2html41" HREF="node33.html#SECTION000420000000000000000">
+SLA_CLDJ - Calendar to MJD</A>
+<LI><A NAME="tex2html42" HREF="node34.html#SECTION000421000000000000000">
+SLA_CLYD - Calendar to Year, Day</A>
+<LI><A NAME="tex2html43" HREF="node35.html#SECTION000422000000000000000">
+SLA_COMBN - Next Combination</A>
+<LI><A NAME="tex2html44" HREF="node36.html#SECTION000423000000000000000">
+SLA_CR2AF - Radians to Deg,Arcmin,Arcsec</A>
+<LI><A NAME="tex2html45" HREF="node37.html#SECTION000424000000000000000">
+SLA_CR2TF - Radians to Hour,Min,Sec</A>
+<LI><A NAME="tex2html46" HREF="node38.html#SECTION000425000000000000000">
+SLA_CS2C - Spherical to Cartesian</A>
+<LI><A NAME="tex2html47" HREF="node39.html#SECTION000426000000000000000">
+SLA_CS2C6 - Spherical Pos/Vel to Cartesian</A>
+<LI><A NAME="tex2html48" HREF="node40.html#SECTION000427000000000000000">
+SLA_CTF2D - Hour,Min,Sec to Days</A>
+<LI><A NAME="tex2html49" HREF="node41.html#SECTION000428000000000000000">
+SLA_CTF2R - Hour,Min,Sec to Radians</A>
+<LI><A NAME="tex2html50" HREF="node42.html#SECTION000429000000000000000">
+SLA_DAF2R - Deg,Arcmin,Arcsec to Radians</A>
+<LI><A NAME="tex2html51" HREF="node43.html#SECTION000430000000000000000">
+SLA_DAFIN - Sexagesimal character string to angle</A>
+<LI><A NAME="tex2html52" HREF="node44.html#SECTION000431000000000000000">
+SLA_DAT - TAI-UTC</A>
+<LI><A NAME="tex2html53" HREF="node45.html#SECTION000432000000000000000">
+SLA_DAV2M - Rotation Matrix from Axial Vector</A>
+<LI><A NAME="tex2html54" HREF="node46.html#SECTION000433000000000000000">
+SLA_DBEAR - Direction Between Points on a Sphere</A>
+<LI><A NAME="tex2html55" HREF="node47.html#SECTION000434000000000000000">
+SLA_DBJIN - Decode String to B/J Epoch (DP)</A>
+<LI><A NAME="tex2html56" HREF="node48.html#SECTION000435000000000000000">
+SLA_DC62S - Cartesian 6-Vector to Spherical</A>
+<LI><A NAME="tex2html57" HREF="node49.html#SECTION000436000000000000000">
+SLA_DCC2S - Cartesian to Spherical</A>
+<LI><A NAME="tex2html58" HREF="node50.html#SECTION000437000000000000000">
+SLA_DCMPF - Interpret Linear Fit</A>
+<LI><A NAME="tex2html59" HREF="node51.html#SECTION000438000000000000000">
+SLA_DCS2C - Spherical to Cartesian</A>
+<LI><A NAME="tex2html60" HREF="node52.html#SECTION000439000000000000000">
+SLA_DD2TF - Days to Hour,Min,Sec</A>
+<LI><A NAME="tex2html61" HREF="node53.html#SECTION000440000000000000000">
+SLA_DE2H - <IMG WIDTH="27" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img65.gif"
+ ALT="$h,\delta$"> to Az,El</A>
+<LI><A NAME="tex2html62" HREF="node54.html#SECTION000441000000000000000">
+SLA_DEULER - Euler Angles to Rotation Matrix</A>
+<LI><A NAME="tex2html63" HREF="node55.html#SECTION000442000000000000000">
+SLA_DFLTIN - Decode a Double Precision Number</A>
+<LI><A NAME="tex2html64" HREF="node56.html#SECTION000443000000000000000">
+SLA_DH2E - Az,El to <IMG WIDTH="27" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img65.gif"
+ ALT="$h,\delta$"></A>
+<LI><A NAME="tex2html65" HREF="node57.html#SECTION000444000000000000000">
+SLA_DIMXV - Apply 3D Reverse Rotation</A>
+<LI><A NAME="tex2html66" HREF="node58.html#SECTION000445000000000000000">
+SLA_DJCAL - MJD to Gregorian for Output</A>
+<LI><A NAME="tex2html67" HREF="node59.html#SECTION000446000000000000000">
+SLA_DJCL - MJD to Year,Month,Day,Frac</A>
+<LI><A NAME="tex2html68" HREF="node60.html#SECTION000447000000000000000">
+SLA_DM2AV - Rotation Matrix to Axial Vector</A>
+<LI><A NAME="tex2html69" HREF="node61.html#SECTION000448000000000000000">
+SLA_DMAT - Solve Simultaneous Equations</A>
+<LI><A NAME="tex2html70" HREF="node62.html#SECTION000449000000000000000">
+SLA_DMOON - Approx Moon Pos/Vel</A>
+<LI><A NAME="tex2html71" HREF="node63.html#SECTION000450000000000000000">
+SLA_DMXM - Multiply <IMG WIDTH="39" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img18.gif"
+ ALT="$3\times3$"> Matrices</A>
+<LI><A NAME="tex2html72" HREF="node64.html#SECTION000451000000000000000">
+SLA_DMXV - Apply 3D Rotation</A>
+<LI><A NAME="tex2html73" HREF="node65.html#SECTION000452000000000000000">
+SLA_DPAV - Position-Angle Between Two Directions</A>
+<LI><A NAME="tex2html74" HREF="node66.html#SECTION000453000000000000000">
+SLA_DR2AF - Radians to Deg,Min,Sec,Frac</A>
+<LI><A NAME="tex2html75" HREF="node67.html#SECTION000454000000000000000">
+SLA_DR2TF - Radians to Hour,Min,Sec,Frac</A>
+<LI><A NAME="tex2html76" HREF="node68.html#SECTION000455000000000000000">
+SLA_DRANGE - Put Angle into Range <IMG WIDTH="25" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img47.gif"
+ ALT="$\pm \pi$"></A>
+<LI><A NAME="tex2html77" HREF="node69.html#SECTION000456000000000000000">
+SLA_DRANRM - Put Angle into Range <IMG WIDTH="43" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img66.gif"
+ ALT="$0\!-\!2\pi$"></A>
+<LI><A NAME="tex2html78" HREF="node70.html#SECTION000457000000000000000">
+SLA_DS2C6 - Spherical Pos/Vel to Cartesian</A>
+<LI><A NAME="tex2html79" HREF="node71.html#SECTION000458000000000000000">
+SLA_DS2TP - Spherical to Tangent Plane</A>
+<LI><A NAME="tex2html80" HREF="node72.html#SECTION000459000000000000000">
+SLA_DSEP - Angle Between 2 Points on Sphere</A>
+<LI><A NAME="tex2html81" HREF="node73.html#SECTION000460000000000000000">
+SLA_DT - Approximate ET minus UT</A>
+<LI><A NAME="tex2html82" HREF="node74.html#SECTION000461000000000000000">
+SLA_DTF2D - Hour,Min,Sec to Days</A>
+<LI><A NAME="tex2html83" HREF="node75.html#SECTION000462000000000000000">
+SLA_DTF2R - Hour,Min,Sec to Radians</A>
+<LI><A NAME="tex2html84" HREF="node76.html#SECTION000463000000000000000">
+SLA_DTP2S - Tangent Plane to Spherical</A>
+<LI><A NAME="tex2html85" HREF="node77.html#SECTION000464000000000000000">
+SLA_DTP2V - Tangent Plane to Direction Cosines</A>
+<LI><A NAME="tex2html86" HREF="node78.html#SECTION000465000000000000000">
+SLA_DTPS2C - Plate centre from <IMG WIDTH="26" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img90.gif"
+ ALT="$\xi,\eta$"> and <IMG WIDTH="28" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img91.gif"
+ ALT="$\alpha,\delta$"></A>
+<LI><A NAME="tex2html87" HREF="node79.html#SECTION000466000000000000000">
+SLA_DTPV2C - Plate centre from <IMG WIDTH="26" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img90.gif"
+ ALT="$\xi,\eta$"> and <I>x</I>,<I>y</I>,<I>z</I></A>
+<LI><A NAME="tex2html88" HREF="node80.html#SECTION000467000000000000000">
+SLA_DTT - TT minus UTC</A>
+<LI><A NAME="tex2html89" HREF="node81.html#SECTION000468000000000000000">
+SLA_DV2TP - Direction Cosines to Tangent Plane</A>
+<LI><A NAME="tex2html90" HREF="node82.html#SECTION000469000000000000000">
+SLA_DVDV - Scalar Product</A>
+<LI><A NAME="tex2html91" HREF="node83.html#SECTION000470000000000000000">
+SLA_DVN - Normalize Vector</A>
+<LI><A NAME="tex2html92" HREF="node84.html#SECTION000471000000000000000">
+SLA_DVXV - Vector Product</A>
+<LI><A NAME="tex2html93" HREF="node85.html#SECTION000472000000000000000">
+SLA_E2H - <IMG WIDTH="27" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img65.gif"
+ ALT="$h,\delta$"> to Az,El</A>
+<LI><A NAME="tex2html94" HREF="node86.html#SECTION000473000000000000000">
+SLA_EARTH - Approx Earth Pos/Vel</A>
+<LI><A NAME="tex2html95" HREF="node87.html#SECTION000474000000000000000">
+SLA_ECLEQ - Ecliptic to Equatorial</A>
+<LI><A NAME="tex2html96" HREF="node88.html#SECTION000475000000000000000">
+SLA_ECMAT - Form <IMG WIDTH="81" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img95.gif"
+ ALT="$\alpha,\delta\rightarrow\lambda,\beta$"> Matrix</A>
+<LI><A NAME="tex2html97" HREF="node89.html#SECTION000476000000000000000">
+SLA_ECOR - RV &amp; Time Corrns to Sun</A>
+<LI><A NAME="tex2html98" HREF="node90.html#SECTION000477000000000000000">
+SLA_EG50 - B1950 <IMG WIDTH="28" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img91.gif"
+ ALT="$\alpha,\delta$"> to Galactic</A>
+<LI><A NAME="tex2html99" HREF="node91.html#SECTION000478000000000000000">
+SLA_EL2UE - Conventional to Universal Elements</A>
+<LI><A NAME="tex2html100" HREF="node92.html#SECTION000479000000000000000">
+SLA_EPB - MJD to Besselian Epoch</A>
+<LI><A NAME="tex2html101" HREF="node93.html#SECTION000480000000000000000">
+SLA_EPB2D - Besselian Epoch to MJD</A>
+<LI><A NAME="tex2html102" HREF="node94.html#SECTION000481000000000000000">
+SLA_EPCO - Convert Epoch to B or J</A>
+<LI><A NAME="tex2html103" HREF="node95.html#SECTION000482000000000000000">
+SLA_EPJ - MJD to Julian Epoch</A>
+<LI><A NAME="tex2html104" HREF="node96.html#SECTION000483000000000000000">
+SLA_EPJ2D - Julian Epoch to MJD</A>
+<LI><A NAME="tex2html105" HREF="node97.html#SECTION000484000000000000000">
+SLA_EQECL - J2000 <IMG WIDTH="28" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img91.gif"
+ ALT="$\alpha,\delta$"> to Ecliptic</A>
+<LI><A NAME="tex2html106" HREF="node98.html#SECTION000485000000000000000">
+SLA_EQEQX - Equation of the Equinoxes</A>
+<LI><A NAME="tex2html107" HREF="node99.html#SECTION000486000000000000000">
+SLA_EQGAL - J2000 <IMG WIDTH="28" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img91.gif"
+ ALT="$\alpha,\delta$"> to Galactic</A>
+<LI><A NAME="tex2html108" HREF="node100.html#SECTION000487000000000000000">
+SLA_ETRMS - E-terms of Aberration</A>
+<LI><A NAME="tex2html109" HREF="node101.html#SECTION000488000000000000000">
+SLA_EULER - Rotation Matrix from Euler Angles</A>
+<LI><A NAME="tex2html110" HREF="node102.html#SECTION000489000000000000000">
+SLA_EVP - Earth Position &amp; Velocity</A>
+<LI><A NAME="tex2html111" HREF="node103.html#SECTION000490000000000000000">
+SLA_FITXY - Fit Linear Model to Two <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$"> Sets</A>
+<LI><A NAME="tex2html112" HREF="node104.html#SECTION000491000000000000000">
+SLA_FK425 - FK4 to FK5</A>
+<LI><A NAME="tex2html113" HREF="node105.html#SECTION000492000000000000000">
+SLA_FK45Z - FK4 to FK5, no P.M. or Parallax</A>
+<LI><A NAME="tex2html114" HREF="node106.html#SECTION000493000000000000000">
+SLA_FK524 - FK5 to FK4</A>
+<LI><A NAME="tex2html115" HREF="node107.html#SECTION000494000000000000000">
+SLA_FK52H - FK5 to Hipparcos</A>
+<LI><A NAME="tex2html116" HREF="node108.html#SECTION000495000000000000000">
+SLA_FK54Z - FK5 to FK4, no P.M. or Parallax</A>
+<LI><A NAME="tex2html117" HREF="node109.html#SECTION000496000000000000000">
+SLA_FK5HZ - FK5 to Hipparcos, no P.M.</A>
+<LI><A NAME="tex2html118" HREF="node110.html#SECTION000497000000000000000">
+SLA_FLOTIN - Decode a Real Number</A>
+<LI><A NAME="tex2html119" HREF="node111.html#SECTION000498000000000000000">
+SLA_GALEQ - Galactic to J2000 <IMG WIDTH="28" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img91.gif"
+ ALT="$\alpha,\delta$"></A>
+<LI><A NAME="tex2html120" HREF="node112.html#SECTION000499000000000000000">
+SLA_GALSUP - Galactic to Supergalactic</A>
+<LI><A NAME="tex2html121" HREF="node113.html#SECTION0004100000000000000000">
+SLA_GE50 - Galactic to B1950 <IMG WIDTH="28" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img91.gif"
+ ALT="$\alpha,\delta$"></A>
+<LI><A NAME="tex2html122" HREF="node114.html#SECTION0004101000000000000000">
+SLA_GEOC - Geodetic to Geocentric</A>
+<LI><A NAME="tex2html123" HREF="node115.html#SECTION0004102000000000000000">
+SLA_GMST - UT to GMST</A>
+<LI><A NAME="tex2html124" HREF="node116.html#SECTION0004103000000000000000">
+SLA_GMSTA - UT to GMST (extra precision)</A>
+<LI><A NAME="tex2html125" HREF="node117.html#SECTION0004104000000000000000">
+SLA_GRESID - Gaussian Residual</A>
+<LI><A NAME="tex2html126" HREF="node118.html#SECTION0004105000000000000000">
+SLA_H2E - Az,El to <IMG WIDTH="27" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img65.gif"
+ ALT="$h,\delta$"></A>
+<LI><A NAME="tex2html127" HREF="node119.html#SECTION0004106000000000000000">
+SLA_H2FK5 - Hipparcos to FK5</A>
+<LI><A NAME="tex2html128" HREF="node120.html#SECTION0004107000000000000000">
+SLA_HFK5Z - Hipparcos to FK5, no P.M.</A>
+<LI><A NAME="tex2html129" HREF="node121.html#SECTION0004108000000000000000">
+SLA_IMXV - Apply 3D Reverse Rotation</A>
+<LI><A NAME="tex2html130" HREF="node122.html#SECTION0004109000000000000000">
+SLA_INTIN - Decode an Integer Number</A>
+<LI><A NAME="tex2html131" HREF="node123.html#SECTION0004110000000000000000">
+SLA_INVF - Invert Linear Model</A>
+<LI><A NAME="tex2html132" HREF="node124.html#SECTION0004111000000000000000">
+SLA_KBJ - Select Epoch Prefix</A>
+<LI><A NAME="tex2html133" HREF="node125.html#SECTION0004112000000000000000">
+SLA_M2AV - Rotation Matrix to Axial Vector</A>
+<LI><A NAME="tex2html134" HREF="node126.html#SECTION0004113000000000000000">
+SLA_MAP - Mean to Apparent</A>
+<LI><A NAME="tex2html135" HREF="node127.html#SECTION0004114000000000000000">
+SLA_MAPPA - Mean to Apparent Parameters</A>
+<LI><A NAME="tex2html136" HREF="node128.html#SECTION0004115000000000000000">
+SLA_MAPQK - Quick Mean to Apparent</A>
+<LI><A NAME="tex2html137" HREF="node129.html#SECTION0004116000000000000000">
+SLA_MAPQKZ - Quick Mean-Appt, no PM <I>etc.</I></A>
+<LI><A NAME="tex2html138" HREF="node130.html#SECTION0004117000000000000000">
+SLA_MOON - Approx Moon Pos/Vel</A>
+<LI><A NAME="tex2html139" HREF="node131.html#SECTION0004118000000000000000">
+SLA_MXM - Multiply <IMG WIDTH="39" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img18.gif"
+ ALT="$3\times3$"> Matrices</A>
+<LI><A NAME="tex2html140" HREF="node132.html#SECTION0004119000000000000000">
+SLA_MXV - Apply 3D Rotation</A>
+<LI><A NAME="tex2html141" HREF="node133.html#SECTION0004120000000000000000">
+SLA_NUT - Nutation Matrix</A>
+<LI><A NAME="tex2html142" HREF="node134.html#SECTION0004121000000000000000">
+SLA_NUTC - Nutation Components</A>
+<LI><A NAME="tex2html143" HREF="node135.html#SECTION0004122000000000000000">
+SLA_OAP - Observed to Apparent</A>
+<LI><A NAME="tex2html144" HREF="node136.html#SECTION0004123000000000000000">
+SLA_OAPQK - Quick Observed to Apparent</A>
+<LI><A NAME="tex2html145" HREF="node137.html#SECTION0004124000000000000000">
+SLA_OBS - Observatory Parameters</A>
+<LI><A NAME="tex2html146" HREF="node138.html#SECTION0004125000000000000000">
+SLA_PA - <IMG WIDTH="27" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img65.gif"
+ ALT="$h,\delta$"> to Parallactic Angle</A>
+<LI><A NAME="tex2html147" HREF="node139.html#SECTION0004126000000000000000">
+SLA_PAV - Position-Angle Between Two Directions</A>
+<LI><A NAME="tex2html148" HREF="node140.html#SECTION0004127000000000000000">
+SLA_PCD - Apply Radial Distortion</A>
+<LI><A NAME="tex2html149" HREF="node141.html#SECTION0004128000000000000000">
+SLA_PDA2H - H.A. for a Given Azimuth</A>
+<LI><A NAME="tex2html150" HREF="node142.html#SECTION0004129000000000000000">
+SLA_PDQ2H - H.A. for a Given P.A.</A>
+<LI><A NAME="tex2html151" HREF="node143.html#SECTION0004130000000000000000">
+SLA_PERMUT - Next Permutation</A>
+<LI><A NAME="tex2html152" HREF="node144.html#SECTION0004131000000000000000">
+SLA_PERTEL - Perturbed Orbital Elements</A>
+<LI><A NAME="tex2html153" HREF="node145.html#SECTION0004132000000000000000">
+SLA_PERTUE - Perturbed Universal Elements</A>
+<LI><A NAME="tex2html154" HREF="node146.html#SECTION0004133000000000000000">
+SLA_PLANEL - Planet Position from Elements</A>
+<LI><A NAME="tex2html155" HREF="node147.html#SECTION0004134000000000000000">
+SLA_PLANET - Planetary Ephemerides</A>
+<LI><A NAME="tex2html156" HREF="node148.html#SECTION0004135000000000000000">
+SLA_PLANTE - <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> of Planet from Elements</A>
+<LI><A NAME="tex2html157" HREF="node149.html#SECTION0004136000000000000000">
+SLA_PM - Proper Motion</A>
+<LI><A NAME="tex2html158" HREF="node150.html#SECTION0004137000000000000000">
+SLA_POLMO - Polar Motion</A>
+<LI><A NAME="tex2html159" HREF="node151.html#SECTION0004138000000000000000">
+SLA_PREBN - Precession Matrix (FK4)</A>
+<LI><A NAME="tex2html160" HREF="node152.html#SECTION0004139000000000000000">
+SLA_PREC - Precession Matrix (FK5)</A>
+<LI><A NAME="tex2html161" HREF="node153.html#SECTION0004140000000000000000">
+SLA_PRECES - Precession</A>
+<LI><A NAME="tex2html162" HREF="node154.html#SECTION0004141000000000000000">
+SLA_PRECL - Precession Matrix (latest)</A>
+<LI><A NAME="tex2html163" HREF="node155.html#SECTION0004142000000000000000">
+SLA_PRENUT - Precession/Nutation Matrix</A>
+<LI><A NAME="tex2html164" HREF="node156.html#SECTION0004143000000000000000">
+SLA_PV2EL - Orbital Elements from Position/Velocity</A>
+<LI><A NAME="tex2html165" HREF="node157.html#SECTION0004144000000000000000">
+SLA_PV2UE - Position/Velocity to Universal Elements</A>
+<LI><A NAME="tex2html166" HREF="node158.html#SECTION0004145000000000000000">
+SLA_PVOBS - Observatory Position &amp; Velocity</A>
+<LI><A NAME="tex2html167" HREF="node159.html#SECTION0004146000000000000000">
+SLA_PXY - Apply Linear Model</A>
+<LI><A NAME="tex2html168" HREF="node160.html#SECTION0004147000000000000000">
+SLA_RANDOM - Random Number</A>
+<LI><A NAME="tex2html169" HREF="node161.html#SECTION0004148000000000000000">
+SLA_RANGE - Put Angle into Range <IMG WIDTH="25" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img47.gif"
+ ALT="$\pm \pi$"></A>
+<LI><A NAME="tex2html170" HREF="node162.html#SECTION0004149000000000000000">
+SLA_RANORM - Put Angle into Range <IMG WIDTH="43" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
+ SRC="img66.gif"
+ ALT="$0\!-\!2\pi$"></A>
+<LI><A NAME="tex2html171" HREF="node163.html#SECTION0004150000000000000000">
+SLA_RCC - Barycentric Coordinate Time</A>
+<LI><A NAME="tex2html172" HREF="node164.html#SECTION0004151000000000000000">
+SLA_RDPLAN - Apparent <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img3.gif"
+ ALT="$[\,\alpha,\delta\,]$"> of Planet</A>
+<LI><A NAME="tex2html173" HREF="node165.html#SECTION0004152000000000000000">
+SLA_REFCO - Refraction Constants</A>
+<LI><A NAME="tex2html174" HREF="node166.html#SECTION0004153000000000000000">
+SLA_REFCOQ - Refraction Constants (fast)</A>
+<LI><A NAME="tex2html175" HREF="node167.html#SECTION0004154000000000000000">
+SLA_REFRO - Refraction</A>
+<LI><A NAME="tex2html176" HREF="node168.html#SECTION0004155000000000000000">
+SLA_REFV - Apply Refraction to Vector</A>
+<LI><A NAME="tex2html177" HREF="node169.html#SECTION0004156000000000000000">
+SLA_REFZ - Apply Refraction to ZD</A>
+<LI><A NAME="tex2html178" HREF="node170.html#SECTION0004157000000000000000">
+SLA_RVEROT - RV Corrn to Earth Centre</A>
+<LI><A NAME="tex2html179" HREF="node171.html#SECTION0004158000000000000000">
+SLA_RVGALC - RV Corrn to Galactic Centre</A>
+<LI><A NAME="tex2html180" HREF="node172.html#SECTION0004159000000000000000">
+SLA_RVLG - RV Corrn to Local Group</A>
+<LI><A NAME="tex2html181" HREF="node173.html#SECTION0004160000000000000000">
+SLA_RVLSRD - RV Corrn to Dynamical LSR</A>
+<LI><A NAME="tex2html182" HREF="node174.html#SECTION0004161000000000000000">
+SLA_RVLSRK - RV Corrn to Kinematical LSR</A>
+<LI><A NAME="tex2html183" HREF="node175.html#SECTION0004162000000000000000">
+SLA_S2TP - Spherical to Tangent Plane</A>
+<LI><A NAME="tex2html184" HREF="node176.html#SECTION0004163000000000000000">
+SLA_SEP - Angle Between 2 Points on Sphere</A>
+<LI><A NAME="tex2html185" HREF="node177.html#SECTION0004164000000000000000">
+SLA_SMAT - Solve Simultaneous Equations</A>
+<LI><A NAME="tex2html186" HREF="node178.html#SECTION0004165000000000000000">
+SLA_SUBET - Remove E-terms</A>
+<LI><A NAME="tex2html187" HREF="node179.html#SECTION0004166000000000000000">
+SLA_SUPGAL - Supergalactic to Galactic</A>
+<LI><A NAME="tex2html188" HREF="node180.html#SECTION0004167000000000000000">
+SLA_SVD - Singular Value Decomposition</A>
+<LI><A NAME="tex2html189" HREF="node181.html#SECTION0004168000000000000000">
+SLA_SVDCOV - Covariance Matrix from SVD</A>
+<LI><A NAME="tex2html190" HREF="node182.html#SECTION0004169000000000000000">
+SLA_SVDSOL - Solution Vector from SVD</A>
+<LI><A NAME="tex2html191" HREF="node183.html#SECTION0004170000000000000000">
+SLA_TP2S - Tangent Plane to Spherical</A>
+<LI><A NAME="tex2html192" HREF="node184.html#SECTION0004171000000000000000">
+SLA_TP2V - Tangent Plane to Direction Cosines</A>
+<LI><A NAME="tex2html193" HREF="node185.html#SECTION0004172000000000000000">
+SLA_TPS2C - Plate centre from <IMG WIDTH="26" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img90.gif"
+ ALT="$\xi,\eta$"> and <IMG WIDTH="28" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img91.gif"
+ ALT="$\alpha,\delta$"></A>
+<LI><A NAME="tex2html194" HREF="node186.html#SECTION0004173000000000000000">
+SLA_TPV2C - Plate centre from <IMG WIDTH="26" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img90.gif"
+ ALT="$\xi,\eta$"> and <I>x</I>,<I>y</I>,<I>z</I></A>
+<LI><A NAME="tex2html195" HREF="node187.html#SECTION0004174000000000000000">
+SLA_UE2EL - Universal to Conventional Elements</A>
+<LI><A NAME="tex2html196" HREF="node188.html#SECTION0004175000000000000000">
+SLA_UE2PV - Pos/Vel from Universal Elements</A>
+<LI><A NAME="tex2html197" HREF="node189.html#SECTION0004176000000000000000">
+SLA_UNPCD - Remove Radial Distortion</A>
+<LI><A NAME="tex2html198" HREF="node190.html#SECTION0004177000000000000000">
+SLA_V2TP - Direction Cosines to Tangent Plane</A>
+<LI><A NAME="tex2html199" HREF="node191.html#SECTION0004178000000000000000">
+SLA_VDV - Scalar Product</A>
+<LI><A NAME="tex2html200" HREF="node192.html#SECTION0004179000000000000000">
+SLA_VN - Normalize Vector</A>
+<LI><A NAME="tex2html201" HREF="node193.html#SECTION0004180000000000000000">
+SLA_VXV - Vector Product</A>
+<LI><A NAME="tex2html202" HREF="node194.html#SECTION0004181000000000000000">
+SLA_WAIT - Time Delay</A>
+<LI><A NAME="tex2html203" HREF="node195.html#SECTION0004182000000000000000">
+SLA_XY2XY - Apply Linear Model to an <IMG WIDTH="42" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
+ SRC="img20.gif"
+ ALT="$[\,x,y\,]$"></A>
+<LI><A NAME="tex2html204" HREF="node196.html#SECTION0004183000000000000000">
+SLA_ZD - <IMG WIDTH="27" HEIGHT="27" ALIGN="MIDDLE" BORDER="0"
+ SRC="img65.gif"
+ ALT="$h,\delta$"> to Zenith Distance</A>
+</UL>
+<LI><A NAME="tex2html205" HREF="node197.html#SECTION00050000000000000000">
+EXPLANATION AND EXAMPLES</A>
+<UL>
+<LI><A NAME="tex2html206" HREF="node198.html#SECTION00051000000000000000">
+Spherical Trigonometry</A>
+<UL>
+<LI><A NAME="tex2html207" HREF="node199.html#SECTION00051100000000000000">
+Formatting angles</A>
+</UL>
+<LI><A NAME="tex2html208" HREF="node200.html#SECTION00052000000000000000">
+Vectors and Matrices</A>
+<UL>
+<LI><A NAME="tex2html209" HREF="node201.html#SECTION00052100000000000000">
+Using vectors</A>
+</UL>
+<LI><A NAME="tex2html210" HREF="node202.html#SECTION00053000000000000000">
+Celestial Coordinate Systems</A>
+<LI><A NAME="tex2html211" HREF="node203.html#SECTION00054000000000000000">
+Precession and Nutation</A>
+<UL>
+<LI><A NAME="tex2html212" HREF="node204.html#SECTION00054100000000000000">
+SLALIB support for precession and nutation</A>
+</UL>
+<LI><A NAME="tex2html213" HREF="node205.html#SECTION00055000000000000000">
+Mean Places</A>
+<LI><A NAME="tex2html214" HREF="node206.html#SECTION00056000000000000000">
+Epoch</A>
+<LI><A NAME="tex2html215" HREF="node207.html#SECTION00057000000000000000">
+Proper Motion</A>
+<LI><A NAME="tex2html216" HREF="node208.html#SECTION00058000000000000000">
+Parallax and Radial Velocity</A>
+<LI><A NAME="tex2html217" HREF="node209.html#SECTION00059000000000000000">
+Aberration</A>
+<LI><A NAME="tex2html218" HREF="node210.html#SECTION000510000000000000000">
+Different Sorts of Mean Place</A>
+<LI><A NAME="tex2html219" HREF="node211.html#SECTION000511000000000000000">
+Mean Place Transformations</A>
+<LI><A NAME="tex2html220" HREF="node212.html#SECTION000512000000000000000">
+Mean Place to Apparent Place</A>
+<LI><A NAME="tex2html221" HREF="node213.html#SECTION000513000000000000000">
+Apparent Place to Observed Place</A>
+<UL>
+<LI><A NAME="tex2html222" HREF="node214.html#SECTION000513100000000000000">
+Refraction</A>
+<LI><A NAME="tex2html223" HREF="node215.html#SECTION000513200000000000000">
+Efficiency considerations</A>
+</UL>
+<LI><A NAME="tex2html224" HREF="node216.html#SECTION000514000000000000000">
+The Hipparcos Catalogue and the ICRS</A>
+<LI><A NAME="tex2html225" HREF="node217.html#SECTION000515000000000000000">
+Timescales</A>
+<UL>
+<LI><A NAME="tex2html226" HREF="node218.html#SECTION000515100000000000000">
+Atomic Time: TAI</A>
+<LI><A NAME="tex2html227" HREF="node219.html#SECTION000515200000000000000">
+Universal Time: UTC, UT1</A>
+<LI><A NAME="tex2html228" HREF="node220.html#SECTION000515300000000000000">
+Sidereal Time: GMST, LAST</A>
+<LI><A NAME="tex2html229" HREF="node221.html#SECTION000515400000000000000">
+Dynamical Time: TT, TDB</A>
+</UL>
+<LI><A NAME="tex2html230" HREF="node222.html#SECTION000516000000000000000">
+Calendars</A>
+<LI><A NAME="tex2html231" HREF="node223.html#SECTION000517000000000000000">
+Geocentric Coordinates</A>
+<LI><A NAME="tex2html232" HREF="node224.html#SECTION000518000000000000000">
+Ephemerides</A>
+<LI><A NAME="tex2html233" HREF="node225.html#SECTION000519000000000000000">
+Radial Velocity and Light-Time Corrections</A>
+<LI><A NAME="tex2html234" HREF="node226.html#SECTION000520000000000000000">
+Focal-Plane Astrometry</A>
+<LI><A NAME="tex2html235" HREF="node227.html#SECTION000521000000000000000">
+Numerical Methods</A>
+</UL>
+<LI><A NAME="tex2html236" HREF="node228.html#SECTION00060000000000000000">
+SUMMARY OF CALLS</A>
+<LI><A NAME="tex2html237" HREF="node229.html#SECTION00070000000000000000">
+About this document ... </A>
+</UL>
+<!--End of Table of Child-Links-->
+<BR> <HR>
+<A NAME="tex2html7" HREF="node1.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif_gr.gif">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif_gr.gif"> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
+ SRC="contents_motif.gif"></A>
+<BR>
+<B> Next:</B> <A NAME="tex2html8" HREF="node1.html">Abstract</A>
+<BR>
+<BR> <HR> <P>
+<P><!--End of Navigation Panel-->
+<ADDRESS>
+<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
+</ADDRESS>
+</BODY>
+</HTML>
diff --git a/src/slalib/sun67.htx/up_motif.gif b/src/slalib/sun67.htx/up_motif.gif
new file mode 100644
index 0000000..3d1aebf
--- /dev/null
+++ b/src/slalib/sun67.htx/up_motif.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/up_motif_gr.gif b/src/slalib/sun67.htx/up_motif_gr.gif
new file mode 100644
index 0000000..a8b463a
--- /dev/null
+++ b/src/slalib/sun67.htx/up_motif_gr.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/whiteball.gif b/src/slalib/sun67.htx/whiteball.gif
new file mode 100644
index 0000000..4a90ea1
--- /dev/null
+++ b/src/slalib/sun67.htx/whiteball.gif
Binary files differ
diff --git a/src/slalib/sun67.htx/yellowball.gif b/src/slalib/sun67.htx/yellowball.gif
new file mode 100644
index 0000000..c6ba6b1
--- /dev/null
+++ b/src/slalib/sun67.htx/yellowball.gif
Binary files differ
diff --git a/src/slalib/sun67.htx_tar b/src/slalib/sun67.htx_tar
new file mode 100644
index 0000000..5dabe52
--- /dev/null
+++ b/src/slalib/sun67.htx_tar
Binary files differ
diff --git a/src/slalib/sun67.tex b/src/slalib/sun67.tex
new file mode 100644
index 0000000..3047136
--- /dev/null
+++ b/src/slalib/sun67.tex
@@ -0,0 +1,12430 @@
+\documentclass[11pt,twoside]{article}
+\setcounter{tocdepth}{2}
+\pagestyle{myheadings}
+
+% -----------------------------------------------------------------------------
+% ? Document identification
+\newcommand{\stardoccategory} {Starlink User Note}
+\newcommand{\stardocinitials} {SUN}
+\newcommand{\stardocsource} {sun67.45}
+\newcommand{\stardocnumber} {67.45}
+\newcommand{\stardocauthors} {P.\,T.\,Wallace}
+\newcommand{\stardocdate} {12 October 1999}
+\newcommand{\stardoctitle} {SLALIB --- Positional Astronomy Library}
+\newcommand{\stardocversion} {2.4-0}
+\newcommand{\stardocmanual} {Programmer's Manual}
+% ? End of document identification
+
+%%% Also see \nroutines definition later %%%
+
+% -----------------------------------------------------------------------------
+
+\newcommand{\stardocname}{\stardocinitials /\stardocnumber}
+\markright{\stardocname}
+
+%----------------------------------------------------
+% Comment out unwanted definitions to suit stationery
+
+\setlength{\textwidth}{160mm} %
+\setlength{\textheight}{230mm} % European A4
+\setlength{\topmargin}{-5mm} %
+
+%\setlength{\textwidth}{167mm} %
+%\setlength{\textheight}{220mm} % US Letter
+%\setlength{\topmargin}{-10mm} %
+
+%
+%----------------------------------------------------
+
+\setlength{\textwidth}{160mm}
+\setlength{\textheight}{230mm}
+\setlength{\topmargin}{-2mm}
+\setlength{\oddsidemargin}{0mm}
+\setlength{\evensidemargin}{0mm}
+\setlength{\parindent}{0mm}
+\setlength{\parskip}{\medskipamount}
+\setlength{\unitlength}{1mm}
+
+% -----------------------------------------------------------------------------
+% Hypertext definitions.
+% ======================
+% These are used by the LaTeX2HTML translator in conjunction with star2html.
+
+% Comment.sty: version 2.0, 19 June 1992
+% Selectively in/exclude pieces of text.
+%
+% Author
+% Victor Eijkhout <eijkhout@cs.utk.edu>
+% Department of Computer Science
+% University Tennessee at Knoxville
+% 104 Ayres Hall
+% Knoxville, TN 37996
+% USA
+
+% Do not remove the %\begin{rawtex} and %\end{rawtex} lines (used by
+% star2html to signify raw TeX that latex2html cannot process).
+%\begin{rawtex}
+\makeatletter
+\def\makeinnocent#1{\catcode`#1=12 }
+\def\csarg#1#2{\expandafter#1\csname#2\endcsname}
+
+\def\ThrowAwayComment#1{\begingroup
+ \def\CurrentComment{#1}%
+ \let\do\makeinnocent \dospecials
+ \makeinnocent\^^L% and whatever other special cases
+ \endlinechar`\^^M \catcode`\^^M=12 \xComment}
+{\catcode`\^^M=12 \endlinechar=-1 %
+ \gdef\xComment#1^^M{\def\test{#1}
+ \csarg\ifx{PlainEnd\CurrentComment Test}\test
+ \let\html@next\endgroup
+ \else \csarg\ifx{LaLaEnd\CurrentComment Test}\test
+ \edef\html@next{\endgroup\noexpand\end{\CurrentComment}}
+ \else \let\html@next\xComment
+ \fi \fi \html@next}
+}
+\makeatother
+
+\def\includecomment
+ #1{\expandafter\def\csname#1\endcsname{}%
+ \expandafter\def\csname end#1\endcsname{}}
+\def\excludecomment
+ #1{\expandafter\def\csname#1\endcsname{\ThrowAwayComment{#1}}%
+ {\escapechar=-1\relax
+ \csarg\xdef{PlainEnd#1Test}{\string\\end#1}%
+ \csarg\xdef{LaLaEnd#1Test}{\string\\end\string\{#1\string\}}%
+ }}
+
+% Define environments that ignore their contents.
+\excludecomment{comment}
+\excludecomment{rawhtml}
+\excludecomment{htmlonly}
+%\end{rawtex}
+
+% Hypertext commands etc. This is a condensed version of the html.sty
+% file supplied with LaTeX2HTML by: Nikos Drakos <nikos@cbl.leeds.ac.uk> &
+% Jelle van Zeijl <jvzeijl@isou17.estec.esa.nl>. The LaTeX2HTML documentation
+% should be consulted about all commands (and the environments defined above)
+% except \xref and \xlabel which are Starlink specific.
+
+\newcommand{\htmladdnormallinkfoot}[2]{#1\footnote{#2}}
+\newcommand{\htmladdnormallink}[2]{#1}
+\newcommand{\htmladdimg}[1]{}
+\newenvironment{latexonly}{}{}
+\newcommand{\hyperref}[4]{#2\ref{#4}#3}
+\newcommand{\htmlref}[2]{#1}
+\newcommand{\htmlimage}[1]{}
+\newcommand{\htmladdtonavigation}[1]{}
+
+% Starlink cross-references and labels.
+\newcommand{\xref}[3]{#1}
+\newcommand{\xlabel}[1]{}
+
+% LaTeX2HTML symbol.
+\newcommand{\latextohtml}{{\bf LaTeX}{2}{\tt{HTML}}}
+
+% Define command to re-centre underscore for Latex and leave as normal
+% for HTML (severe problems with \_ in tabbing environments and \_\_
+% generally otherwise).
+\newcommand{\latex}[1]{#1}
+\newcommand{\setunderscore}{\renewcommand{\_}{{\tt\symbol{95}}}}
+\latex{\setunderscore}
+
+% Redefine the \tableofcontents command. This procrastination is necessary
+% to stop the automatic creation of a second table of contents page
+% by latex2html.
+\newcommand{\latexonlytoc}[0]{\tableofcontents}
+
+% -----------------------------------------------------------------------------
+% Debugging.
+% =========
+% Remove % on the following to debug links in the HTML version using Latex.
+
+% \newcommand{\hotlink}[2]{\fbox{\begin{tabular}[t]{@{}c@{}}#1\\\hline{\footnotesize #2}\end{tabular}}}
+% \renewcommand{\htmladdnormallinkfoot}[2]{\hotlink{#1}{#2}}
+% \renewcommand{\htmladdnormallink}[2]{\hotlink{#1}{#2}}
+% \renewcommand{\hyperref}[4]{\hotlink{#1}{\S\ref{#4}}}
+% \renewcommand{\htmlref}[2]{\hotlink{#1}{\S\ref{#2}}}
+% \renewcommand{\xref}[3]{\hotlink{#1}{#2 -- #3}}
+% -----------------------------------------------------------------------------
+% ? Document specific \newcommand or \newenvironment commands.
+%------------------------------------------------------------------------------
+
+\newcommand{\nroutines} {183}
+\newcommand{\radec} {$[\,\alpha,\delta\,]$}
+\newcommand{\hadec} {$[\,h,\delta\,]$}
+\newcommand{\xieta} {$[\,\xi,\eta\,]$}
+\newcommand{\azel} {$[\,Az,El~]$}
+\newcommand{\ecl} {$[\,\lambda,\beta~]$}
+\newcommand{\gal} {$[\,l^{I\!I},b^{I\!I}\,]$}
+\newcommand{\xy} {$[\,x,y\,]$}
+\newcommand{\xyz} {$[\,x,y,z\,]$}
+\newcommand{\xyzd} {$[\,\dot{x},\dot{y},\dot{z}\,]$}
+\newcommand{\xyzxyzd} {$[\,x,y,z,\dot{x},\dot{y},\dot{z}\,]$}
+\newcommand{\degree}[2] {$#1^{\circ}
+ \hspace{-0.37em}.\hspace{0.02em}#2$}
+
+\newcommand{\arcsec}[2] {\arcseci{#1}$\hspace{-0.4em}.#2$}
+\begin{htmlonly}
+ \newcommand{\arcsec}[2] {
+ {$#1\hspace{-0.05em}^{'\hspace{-0.1em}'}\hspace{-0.4em}.#2$}
+ }
+\end{htmlonly}
+
+\newcommand{\arcseci}[1] {$#1\hspace{-0.05em}$\raisebox{-0.5ex}
+ {$^{'\hspace{-0.1em}'}$}}
+\begin{htmlonly}
+ \renewcommand{\arcseci}[1] {$#1\hspace{-0.05em}^{'\hspace{-0.1em}'}$}
+\end{htmlonly}
+
+\newcommand{\dms}[4] {$#1^{\circ}\,#2\raisebox{-0.5ex}
+ {$^{'}$}\,$\arcsec{#3}{#4}}
+\begin{htmlonly}
+ \renewcommand{\dms}[4]{$#1^{\circ}\,#2^{'}\,#3^{''}.#4$}
+\end{htmlonly}
+
+\newcommand{\tseci}[1] {$#1$\mbox{$^{\rm s}$}}
+\newcommand{\tsec}[2] {\tseci{#1}$\hspace{-0.3em}.#2$}
+\begin{htmlonly}
+ \renewcommand{\tsec}[2] {$#1^{\rm s}\hspace{-0.3em}.#2$}
+\end{htmlonly}
+
+\newcommand{\hms}[4] {$#1^{\rm h}\,#2^{\rm m}\,$\tsec{#3}{#4}}
+\begin{htmlonly}
+ \renewcommand{\hms}[4] {$#1^{h}\,#2^{m}\,#3^{s}.#4$}
+\end{htmlonly}
+
+\newcommand{\callhead}[1]{\goodbreak\vspace{\bigskipamount}{\large\bf{#1}}}
+\newenvironment{callset}{\begin{list}{}{\setlength{\leftmargin}{2cm}
+ \setlength{\parsep}{\smallskipamount}}}{\end{list}}
+\newcommand{\subp}[1]{\item\hspace{-1cm}#1\\}
+\newcommand{\subq}[2]{\item\hspace{-1cm}#1\\\hspace*{-1cm}#2\\}
+\newcommand{\name}[1]{\mbox{#1}}
+\newcommand{\fortvar}[1]{\mbox{\em #1}}
+
+\newcommand{\routine}[3]
+{\hbadness=10000
+ \vbox
+ {
+ \rule{\textwidth}{0.3mm}\\
+ {\Large {\bf #1} \hfill #2 \hfill {\bf #1}}\\
+ \setlength{\oldspacing}{\topsep}
+ \setlength{\topsep}{0.3ex}
+ \begin{description}
+ #3
+ \end{description}
+ \setlength{\topsep}{\oldspacing}
+ }
+}
+
+% Replacement for HTML version (each routine in own subsection).
+\begin{htmlonly}
+ \renewcommand{\routine}[3]
+ {
+ \subsection{#1\xlabel{#1} - #2\label{#1}}
+ \begin{description}
+ #3
+ \end{description}
+ }
+\end{htmlonly}
+
+\newcommand{\action}[1]
+{\item[ACTION]: #1}
+
+\begin{htmlonly}
+ \newcommand{\action}[1]
+ {\item[ACTION:] #1}
+\end{htmlonly}
+
+\newcommand{\call}[1]
+{\item[CALL]: \hspace{0.4em}{\tt #1}}
+\newlength{\oldspacing}
+
+\begin{htmlonly}
+ \renewcommand{\call}[1]
+ {
+ \item[CALL:] {\tt #1}
+ }
+\end{htmlonly}
+
+\newcommand{\args}[2]
+{
+ \goodbreak
+ \setlength{\oldspacing}{\topsep}
+ \setlength{\topsep}{0.3ex}
+ \begin{description}
+ \item[#1]:\\[1.5ex]
+ \begin{tabular}{p{7em}p{6em}p{22em}}
+ #2
+ \end{tabular}
+ \end{description}
+ \setlength{\topsep}{\oldspacing}
+}
+\begin{htmlonly}
+ \renewcommand{\args}[2]
+ {
+ \begin{description}
+ \item[#1:]\\
+ \begin{tabular}{p{7em}p{6em}l}
+ #2
+ \end{tabular}
+ \end{description}
+ }
+\end{htmlonly}
+
+\newcommand{\spec}[3]
+{
+ {\em {#1}} & {\bf \mbox{#2}} & {#3}
+}
+
+\newcommand{\specel}[2]
+{
+ \multicolumn{1}{c}{#1} & {} & {#2}
+}
+
+\newcommand{\anote}[1]
+{
+ \goodbreak
+ \setlength{\oldspacing}{\topsep}
+ \setlength{\topsep}{0.3ex}
+ \begin{description}
+ \item[NOTE]:
+ #1
+ \end{description}
+ \setlength{\topsep}{\oldspacing}
+}
+
+\begin{htmlonly}
+ \renewcommand{\anote}[1]
+ {
+ \begin{description}
+ \item[NOTE:]
+ #1
+ \end{description}
+ }
+\end{htmlonly}
+
+\newcommand{\notes}[1]
+{
+ \goodbreak
+ \setlength{\oldspacing}{\topsep}
+ \setlength{\topsep}{0.3ex}
+ \begin{description}
+ \item[NOTES]:
+ #1
+ \end{description}
+ \setlength{\topsep}{\oldspacing}
+}
+
+\begin{htmlonly}
+ \renewcommand{\notes}[1]
+ {
+ \begin{description}
+ \item[NOTES:]
+ #1
+ \end{description}
+ }
+\end{htmlonly}
+
+\newcommand{\aref}[1]
+{
+ \goodbreak
+ \setlength{\oldspacing}{\topsep}
+ \setlength{\topsep}{0.3ex}
+ \begin{description}
+ \item[REFERENCE]:
+ #1
+ \end{description}
+ \setlength{\topsep}{\oldspacing}
+}
+
+\begin{htmlonly}
+ \newcommand{\aref}[1]
+ {
+ \begin{description}
+ \item[REFERENCE:]
+ #1
+ \end{description}
+ }
+\end{htmlonly}
+
+\newcommand{\refs}[1]
+{
+ \goodbreak
+ \setlength{\oldspacing}{\topsep}
+ \setlength{\topsep}{0.3ex}
+ \begin{description}
+ \item[REFERENCES]:
+ #1
+ \end{description}
+ \setlength{\topsep}{\oldspacing}
+}
+\begin{htmlonly}
+ \newcommand{\refs}[1]
+ {
+ \begin{description}
+ \item[REFERENCES:]
+ #1
+ \end{description}
+ }
+\end{htmlonly}
+
+\newcommand{\exampleitem}{\item [EXAMPLE]:}
+\begin{htmlonly}
+ \renewcommand{\exampleitem}{\item [EXAMPLE:]}
+\end{htmlonly}
+
+%------------------------------------------------------------------------------
+% ? End of document specific commands
+% -----------------------------------------------------------------------------
+% Title Page.
+% ===========
+\renewcommand{\thepage}{\roman{page}}
+\begin{document}
+\thispagestyle{empty}
+
+% Latex document header.
+% ======================
+\begin{latexonly}
+ CCLRC / {\sc Rutherford Appleton Laboratory} \hfill {\bf \stardocname}\\
+ {\large Particle Physics \& Astronomy Research Council}\\
+ {\large Starlink Project\\}
+ {\large \stardoccategory\ \stardocnumber}
+ \begin{flushright}
+ \stardocauthors\\
+ \stardocdate
+ \end{flushright}
+ \vspace{-4mm}
+ \rule{\textwidth}{0.5mm}
+ \vspace{5mm}
+ \begin{center}
+ {\Huge\bf \stardoctitle \\ [2.5ex]}
+ {\LARGE\bf \stardocversion \\ [4ex]}
+ {\Huge\bf \stardocmanual}
+ \end{center}
+ \vspace{5mm}
+
+% ? Heading for abstract if used.
+ \vspace{10mm}
+ \begin{center}
+ {\Large\bf Abstract}
+ \end{center}
+% ? End of heading for abstract.
+\end{latexonly}
+
+% HTML documentation header.
+% ==========================
+\begin{htmlonly}
+ \xlabel{}
+ \begin{rawhtml} <H1> \end{rawhtml}
+ \stardoctitle\\
+ \stardocversion\\
+ \stardocmanual
+ \begin{rawhtml} </H1> \end{rawhtml}
+
+% ? Add picture here if required.
+% ? End of picture
+
+ \begin{rawhtml} <P> <I> \end{rawhtml}
+ \stardoccategory \stardocnumber \\
+ \stardocauthors \\
+ \stardocdate
+ \begin{rawhtml} </I> </P> <H3> \end{rawhtml}
+ \htmladdnormallink{CCLRC}{http://www.cclrc.ac.uk} /
+ \htmladdnormallink{Rutherford Appleton Laboratory}
+ {http://www.cclrc.ac.uk/ral} \\
+ \htmladdnormallink{Particle Physics \& Astronomy Research Council}
+ {http://www.pparc.ac.uk} \\
+ \begin{rawhtml} </H3> <H2> \end{rawhtml}
+ \htmladdnormallink{Starlink Project}{http://star-www.rl.ac.uk/}
+ \begin{rawhtml} </H2> \end{rawhtml}
+ \htmladdnormallink{\htmladdimg{source.gif} Retrieve hardcopy}
+ {http://star-www.rl.ac.uk/cgi-bin/hcserver?\stardocsource}\\
+
+% HTML document table of contents.
+% ================================
+% Add table of contents header and a navigation button to return to this
+% point in the document (this should always go before the abstract \section).
+ \label{stardoccontents}
+ \begin{rawhtml}
+ <HR>
+ <H2>Contents</H2>
+ \end{rawhtml}
+ \renewcommand{\latexonlytoc}[0]{}
+ \htmladdtonavigation{\htmlref{\htmladdimg{contents_motif.gif}}
+ {stardoccontents}}
+
+% ? New section for abstract if used.
+ \section{\xlabel{abstract}Abstract}
+% ? End of new section for abstract
+\end{htmlonly}
+
+% -----------------------------------------------------------------------------
+% ? Document Abstract. (if used)
+% ==================
+SLALIB is a library used by writers of positional-astronomy applications.
+Most of the \nroutines\ routines are concerned with astronomical position and time,
+but a number have wider trigonometrical, numerical or general applications.
+% ? End of document abstract
+% -----------------------------------------------------------------------------
+% ? Latex document Table of Contents (if used).
+% ===========================================
+ \newpage
+ \begin{latexonly}
+ \setlength{\parskip}{0mm}
+ \latexonlytoc
+ \setlength{\parskip}{\medskipamount}
+ \markright{\stardocname}
+ \end{latexonly}
+% ? End of Latex document table of contents
+% -----------------------------------------------------------------------------
+\newpage
+\renewcommand{\thepage}{\arabic{page}}
+\setcounter{page}{1}
+
+\section{INTRODUCTION}
+\subsection{Purpose}
+SLALIB\footnote{The name isn't an acronym;
+it just stands for ``Subprogram Library~A''.}
+is a library of routines
+intended to make accurate and reliable positional-astronomy
+applications easier to write.
+Most SLALIB routines are concerned with astronomical position and time, but a
+number have wider trigonometrical, numerical or general applications.
+The applications ASTROM, COCO, RV and TPOINT
+all make extensive use of the SLALIB
+routines, as do a number of telescope control systems around the world.
+The SLALIB versions currently in service are written in
+Fortran~77 and run on VAX/VMS, several Unix platforms and PC.
+A generic ANSI~C version is also available from the author; it is
+functionally similar to the Fortran version upon which the present
+document concentrates.
+
+\subsection{Example Application}
+Here is a simple example of an application program written
+using SLALIB calls:
+
+\begin{verbatim}
+ PROGRAM FK4FK5
+ *
+ * Read a B1950 position from I/O unit 5 and reply on I/O unit 6
+ * with the J2000 equivalent. Enter a period to quit.
+ *
+ IMPLICIT NONE
+ CHARACTER C*80,S
+ INTEGER I,J,IHMSF(4),IDMSF(4)
+ DOUBLE PRECISION R4,D4,R5,D5
+ LOGICAL BAD
+
+ * Loop until a period is entered
+ C = ' '
+ DO WHILE (C(:1).NE.'.')
+
+ * Read h m s d ' "
+ READ (5,'(A)') C
+ IF (C(:1).NE.'.') THEN
+ BAD = .TRUE.
+
+ * Decode the RA
+ I = 1
+ CALL sla_DAFIN(C,I,R4,J)
+ IF (J.EQ.0) THEN
+ R4 = 15D0*R4
+
+ * Decode the Dec
+ CALL sla_DAFIN(C,I,D4,J)
+ IF (J.EQ.0) THEN
+
+ * FK4 to FK5
+ CALL sla_FK45Z(R4,D4,1950D0,R5,D5)
+
+ * Format and output the result
+ CALL sla_DR2TF(2,R5,S,IHMSF)
+ CALL sla_DR2AF(1,D5,S,IDMSF)
+ WRITE (6,
+ : '(1X,I2.2,2I3.2,''.'',I2.2,2X,A,I2.2,2I3.2,''.'',I1)')
+ : IHMSF,S,IDMSF
+ BAD = .FALSE.
+ END IF
+ END IF
+ IF (BAD) WRITE (6,'(1X,''?'')')
+ END IF
+ END DO
+
+ END
+\end{verbatim}
+In this example, SLALIB not only provides the complicated FK4 to
+FK5 transformation but also
+simplifies the tedious and error-prone tasks
+of decoding and formatting angles
+expressed as hours, minutes {\it etc}. The
+example incorporates range checking, and avoids the
+notorious ``minus zero'' problem (an often-perpetrated bug where
+declinations between $0^{\circ}$ and $-1^{\circ}$ lose their minus
+sign).
+With a little extra elaboration and a few more calls to SLALIB,
+defaulting can be provided (enabling unused fields to
+be replaced with commas to avoid retyping), proper motions
+can be handled, different epochs can be specified, and
+so on. See the program COCO (SUN/56) for further ideas.
+
+\subsection{Scope}
+SLALIB contains \nroutines\ routines covering the following topics:
+\begin{itemize}
+\item String Decoding,
+ Sexagesimal Conversions
+\item Angles, Vectors \& Rotation Matrices
+\item Calendars,
+ Timescales
+\item Precession \& Nutation
+\item Proper Motion
+\item FK4/FK5/Hipparcos,
+ Elliptic Aberration
+\item Geocentric Coordinates
+\item Apparent \& Observed Place
+\item Azimuth \& Elevation
+\item Refraction \& Air Mass
+\item Ecliptic,
+ Galactic,
+ Supergalactic Coordinates
+\item Ephemerides
+\item Astrometry
+\item Numerical Methods
+\end{itemize}
+
+\subsection{Objectives}
+SLALIB was designed to give application programmers
+a basic set of positional-astronomy tools which were
+accurate and easy to use. To this end, the library is:
+\begin{itemize}
+\item Readily available, including source code and documentation.
+\item Supported and maintained.
+\item Portable -- coded in standard languages and available for
+multiple computers and operating systems.
+\item Thoroughly commented, both for maintainability and to
+assist those wishing to cannibalize the code.
+\item Stable.
+\item Trustworthy -- some care has gone into
+testing SLALIB, both by comparison with published data and
+by checks for internal consistency.
+\item Rigorous -- corners are not cut,
+even where the practical consequences would, as a rule, be
+negligible.
+\item Comprehensive, without including too many esoteric features
+required only by specialists.
+\item Practical -- almost all the routines have been written to
+satisfy real needs encountered during the development of
+real-life applications.
+\item Environment-independent -- the package is
+completely free of pauses, stops, I/O {\it etc}.
+\item Self-contained -- SLALIB calls no other libraries.
+\end{itemize}
+A few {\it caveats}:
+\begin{itemize}
+\item SLALIB does not pretend to be canonical. It is in essence
+an anthology, and the adopted algorithms are liable
+to change as more up-to-date ones become available.
+\item The functions aren't orthogonal -- there are several
+cases of different
+routines doing similar things, and many examples where
+sequences of SLALIB calls have simply been packaged, all to
+make applications less trouble to write.
+\item There are omissions -- for example there are no
+routines for calculating physical ephemerides of
+Solar-System bodies.
+\item SLALIB is not homogeneous, though important subsets
+(for example the FK4/FK5 routines) are.
+\item The library is not foolproof. You have to know what
+you are trying to do ({\it e.g.}\ by reading textbooks on positional
+astronomy), and it is the caller's responsibility to supply
+sensible arguments (although enough internal validation is done to
+avoid arithmetic errors).
+\item Without being written in a wasteful
+manner, SLALIB is nonetheless optimized for maintainability
+rather than speed. In addition, there are many places
+where considerable simplification would be possible if some
+specified amount of accuracy could be sacrificed; such
+compromises are left to the individual programmer and
+are not allowed to limit SLALIB's value as a source
+of comparison results.
+\end{itemize}
+
+\subsection{Fortran Version}
+The Fortran versions of SLALIB use ANSI Fortran~77 with a few
+commonplace extensions. Just three out of the \nroutines\ routines require
+platform-specific techniques and accordingly are supplied
+in different forms.
+SLALIB has been implemented on the following platforms:
+VAX/VMS,
+PC (Microsoft Fortran, Linux),
+DECstation (Ultrix),
+DEC Alpha (DEC Unix),
+Sun (SunOS, Solaris),
+Hewlett Packard (HP-UX),
+CONVEX,
+Perkin-Elmer and
+Fujitsu.
+
+\subsection{C Version}
+An ANSI C version of SLALIB is available from the author
+but is not part of the Starlink release.
+The functionality of this (proprietary) C version closely matches
+that of the Starlink Fortran SLALIB, partly for the convenience of
+existing users of the Fortran version, some of whom have in the past
+implemented C ``wrappers''. The function names
+cannot be the same as the Fortran versions because of potential
+linking problems when
+both forms of the library are present; the C routine which
+is the equivalent of (for example) {\tt SLA\_REFRO} is {\tt slaRefro}.
+The types of arguments follow the Fortran version, except
+that integers are {\tt int} rather than {\tt long}.
+Argument passing is by value
+(except for arrays and strings of course)
+for given arguments and by pointer for returned arguments.
+All the C functions are re-entrant.
+
+The Fortran routines {\tt sla\_GRESID}, {\tt sla\_RANDOM} and
+{\tt sla\_WAIT} have no C counterparts.
+
+Further details of the C version of SLALIB are available
+from the author. The definitive guide to
+the calling sequences is the file {\tt slalib.h}.
+
+\subsection{Future Versions}
+The homogeneity and ease of use of SLALIB could perhaps be improved
+in the future
+by turning to C++ and object-oriented techniques. For example ``celestial
+position'' could be a class and many of the transformations
+could happen automatically. This requires further study and
+would almost certainly result in a complete redesign.
+Similarly,
+the impact of Fortran~90 has yet to be assessed. Once compilers
+become widely available, some internal recoding may be worthwhile
+in order to simplify parts of the code. However, as with C++,
+a redesign of the
+application interfaces will be needed if the capabilities of the
+new language are to be exploited to the full.
+
+\subsection{New Functions}
+In a package like SLALIB it is difficult to know how far to go. Is it
+enough to provide the primitive operations, or should more
+complicated functions be packaged? Is it worth encroaching on
+specialist areas, where individual experts have all written their
+own software already? To what extent should CPU efficiency be
+an issue? How much support of different numerical precisions is
+required? And so on.
+
+In practice, almost all the routines in SLALIB are there because they were
+needed for some specific application, and this is likely to remain the
+pattern for any enhancements in the future.
+Suggestions for additional SLALIB routines should be addressed to the
+author.
+
+\subsection{Acknowledgements}
+SLALIB is descended from a package of routines written
+for the AAO 16-bit minicomputers
+in the mid-1970s. The coming of the VAX
+allowed a much more comprehensive and thorough package
+to be designed for Starlink, especially important
+at a time when the adoption
+of the IAU 1976 resolutions meant that astronomers
+would have to cope with a mixture of reference frames,
+timescales and nomenclature.
+
+Much of the preparatory work on SLALIB was done by
+Althea~Wilkinson of Manchester University.
+During its development,
+Andrew~Murray,
+Catherine~Hohenkerk,
+Andrew~Sinclair,
+Bernard~Yallop
+and
+Brian~Emerson of Her Majesty's Nautical Almanac Office were consulted
+on many occasions; their advice was indispensable.
+I am especially grateful to
+Catherine~Hohenkerk
+for supplying preprints of papers, and test data. A number of
+enhancements to SLALIB were at the suggestion of
+Russell~Owen, University of Washington,
+the late Phil~Hill, St~Andrews University,
+Bill~Vacca, JILA, Boulder and
+Ron~Maddalena, NRAO.
+Mark~Calabretta, CSIRO Radiophysics, Sydney supplied changes to suit Convex.
+I am indebted to Derek~Jones (RGO) for introducing me to the
+``universal variables'' method of calculating orbits.
+
+The first C version of SLALIB was a hand-coded transcription
+of the Starlink Fortran version carried out by
+Steve~Eaton (University of Leeds) in the course of
+MSc work. This was later
+enhanced by John~Straede (AAO) and Martin~Shepherd (Caltech).
+The current C SLALIB is a complete rewrite by the present author and
+includes a comprehensive validation suite.
+Additional comments on the C version came from Bob~Payne (NRAO) and
+Jeremy~Bailey (AAO).
+
+\section{LINKING}
+
+On Unix systems (Sun, DEC Alpha {\it etc.}):
+\begin{verse}
+{\tt \%~~f77 progname.o -L/star/lib `sla\_link` -o progname}
+\end{verse}
+(The above assumes that all Starlink directories have been added to
+the {\tt LD\_LIBRARY\_PATH} and {\tt PATH} environment variables
+as described in SUN/202.)
+
+On VAX/VMS:
+\begin{verse}
+{\tt \$~~LINK progname,SLALIB\_DIR:SLALIB/LIB}
+\end{verse}
+
+\pagebreak
+
+\section{SUBPROGRAM SPECIFICATIONS}
+%-----------------------------------------------------------------------
+\routine{SLA\_ADDET}{Add E-terms of Aberration}
+{
+ \action{Add the E-terms (elliptic component of annual aberration) to a
+ pre IAU 1976 mean place to conform to the old catalogue convention.}
+ \call{CALL sla\_ADDET (RM, DM, EQ, RC, DC)}
+}
+\args{GIVEN}
+{
+ \spec{RM,DM}{D}{\radec\ without E-terms (radians)} \\
+ \spec{EQ}{D}{Besselian epoch of mean equator and equinox}
+}
+\args{RETURNED}
+{
+ \spec{RC,DC}{D}{\radec\ with E-terms included (radians)}
+}
+\anote{Most star positions from pre-1984 optical catalogues (or
+ obtained by astrometry with respect to such stars) have the
+ E-terms built-in. If it is necessary to convert a formal mean
+ place (for example a pulsar timing position) to one
+ consistent with such a star catalogue, then the
+ \radec\ should be adjusted using this routine.}
+\aref{{\it Explanatory Supplement to the Astronomical Ephemeris},
+ section 2D, page 48.}
+%-----------------------------------------------------------------------
+\routine{SLA\_AFIN}{Sexagesimal character string to angle}
+{
+ \action{Decode a free-format sexagesimal string (degrees, arcminutes,
+ arcseconds) into a single precision floating point
+ number (radians).}
+ \call{CALL sla\_AFIN (STRING, NSTRT, RESLT, JF)}
+}
+\args{GIVEN}
+{
+ \spec{STRING}{C*(*)}{string containing deg, arcmin, arcsec fields} \\
+ \spec{NSTRT}{I}{pointer to start of decode (beginning of STRING = 1)}
+}
+\args{RETURNED}
+{
+ \spec{NSTRT}{I}{advanced past the decoded angle} \\
+ \spec{RESLT}{R}{angle in radians} \\
+ \spec{JF}{I}{status:} \\
+ \spec{}{}{\hspace{1.5em} 0 = OK} \\
+ \spec{}{}{\hspace{0.7em} $+1$ = default, RESLT unchanged (note 2)} \\
+ \spec{}{}{\hspace{0.7em} $-1$ = bad degrees (note 3)} \\
+ \spec{}{}{\hspace{0.7em} $-2$ = bad arcminutes (note 3)} \\
+ \spec{}{}{\hspace{0.7em} $-3$ = bad arcseconds (note 3)} \\
+}
+\goodbreak
+\setlength{\oldspacing}{\topsep}
+\setlength{\topsep}{0.3ex}
+\begin{description}
+ \exampleitem \\ [1.5ex]
+ \begin{tabular}{p{7em}p{15em}p{12em}}
+ {\it argument} & {\it before} & {\it after} \\ \\
+ STRING & $'$\verb*}-57 17 44.806 12 34 56.7}$'$ & unchanged \\
+ NSTRT & 1 & 16 ({\it i.e.}\ pointing to 12...) \\
+ RESLT & - & $-1.00000$ \\
+ JF & - & 0
+ \end{tabular}
+ \item A further call to sla\_AFIN, without adjustment of NSTRT, will
+ decode the second angle, \dms{12}{34}{56}{7}.
+\end{description}
+\setlength{\topsep}{\oldspacing}
+\notes
+{
+ \begin{enumerate}
+ \item The first three ``fields'' in STRING are degrees, arcminutes,
+ arcseconds, separated by spaces or commas. The degrees field
+ may be signed, but not the others. The decoding is carried
+ out by the sla\_DFLTIN routine and is free-format.
+ \item Successive fields may be absent, defaulting to zero. For
+ zero status, the only combinations allowed are degrees alone,
+ degrees and arcminutes, and all three fields present. If all
+ three fields are omitted, a status of +1 is returned and RESLT is
+ unchanged. In all other cases RESLT is changed.
+ \item Range checking:
+ \begin{itemize}
+ \item The degrees field is not range checked. However, it is
+ expected to be integral unless the other two fields are absent.
+ \item The arcminutes field is expected to be 0-59, and integral if
+ the arcseconds field is present. If the arcseconds field
+ is absent, the arcminutes is expected to be 0-59.9999...
+ \item The arcseconds field is expected to be 0-59.9999...
+ \item Decoding continues even when a check has failed. Under these
+ circumstances the field takes the supplied value, defaulting to
+ zero, and the result RESLT is computed and returned.
+ \end{itemize}
+ \item Further fields after the three expected ones are not treated as
+ an error. The pointer NSTRT is left in the correct state for
+ further decoding with the present routine or with sla\_DFLTIN
+ {\it etc}. See the example, above.
+ \item If STRING contains hours, minutes, seconds instead of
+ degrees {\it etc},
+ or if the required units are turns (or days) instead of radians,
+ the result RESLT should be multiplied as follows: \\ [1.5ex]
+ \begin{tabular}{p{6em}p{5em}p{15em}}
+ {\it for STRING} & {\it to obtain} & {\it multiply RESLT by} \\ \\
+ ${\circ}$~~\raisebox{-0.7ex}{$'$}~~\raisebox{-0.7ex}{$''$}
+ & radians & $1.0$ \\
+ ${\circ}$~~\raisebox{-0.7ex}{$'$}~~\raisebox{-0.7ex}{$''$}
+ & turns & $1/{2 \pi} = 0.1591549430918953358$ \\
+ h m s & radians & $15.0$ \\
+ h m s & days & $15/{2\pi} = 2.3873241463784300365$ \\
+ \end{tabular}
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_AIRMAS}{Air Mass}
+{
+ \action{Air mass at given zenith distance (double precision).}
+ \call{D~=~sla\_AIRMAS (ZD)}
+}
+\args{GIVEN}
+{
+ \spec{ZD}{D}{observed zenith distance (radians)}
+}
+\args{RETURNED}
+{
+ \spec{sla\_AIRMAS}{D}{air mass (1 at zenith)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The {\it observed}\/ zenith distance referred to above means
+ ``as affected by refraction''.
+ \item The routine uses Hardie's (1962) polynomial fit to Bemporad's
+ data for the relative air mass, $X$, in units of thickness at the
+ zenith as tabulated by Schoenberg (1929). This is adequate for all
+ normal needs as it is accurate to better than
+ 0.1\% up to $X = 6.8$ and better than 1\% up to $X = 10$.
+ Bemporad's tabulated values are unlikely to be trustworthy
+ to such accuracy
+ because of variations in density, pressure and other
+ conditions in the atmosphere from those assumed in his work.
+ \item The sign of the ZD is ignored.
+ \item At zenith distances greater than about $\zeta = 87^{\circ}$ the
+ air mass is held constant to avoid arithmetic overflows.
+ \end{enumerate}
+}
+\refs
+{
+ \begin{enumerate}
+ \item Hardie, R.H., 1962, in {\it Astronomical Techniques}\,
+ ed. W.A.\ Hiltner, University of Chicago Press, p180.
+ \item Schoenberg, E., 1929, Hdb.\ d.\ Ap.,
+ Berlin, Julius Springer, 2, 268.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_ALTAZ}{Velocities {\it etc.}\ for Altazimuth Mount}
+{
+ \action{Positions, velocities and accelerations for an altazimuth
+ telescope mount tracking a star (double precision).}
+ \call{CALL sla\_ALTAZ (\vtop{
+ \hbox{HA, DEC, PHI,}
+ \hbox{AZ, AZD, AZDD, EL, ELD, ELDD, PA, PAD, PADD)}}}
+}
+\args{GIVEN}
+{
+ \spec{HA}{D}{hour angle} \\
+ \spec{DEC}{D}{declination} \\
+ \spec{PHI}{D}{observatory latitude}
+}
+\args{RETURNED}
+{
+ \spec{AZ}{D}{azimuth} \\
+ \spec{AZD}{D}{azimuth velocity} \\
+ \spec{AZDD}{D}{azimuth acceleration} \\
+ \spec{EL}{D}{elevation} \\
+ \spec{ELD}{D}{elevation velocity} \\
+ \spec{ELDD}{D}{elevation acceleration} \\
+ \spec{PA}{D}{parallactic angle} \\
+ \spec{PAD}{D}{parallactic angle velocity} \\
+ \spec{PADD}{D}{parallactic angle acceleration}
+}
+\notes
+{
+ \begin{enumerate}
+ \setlength{\parskip}{\medskipamount}
+ \item Natural units are used throughout. HA, DEC, PHI, AZ, EL
+ and ZD are in radians. The velocities and accelerations
+ assume constant declination and constant rate of change of
+ hour angle (as for tracking a star); the units of AZD, ELD
+ and PAD are radians per radian of HA, while the units of AZDD,
+ ELDD and PADD are radians per radian of HA squared. To
+ convert into practical degree- and second-based units:
+
+ \begin{center}
+ \begin{tabular}{rlcl}
+ angles & $\times 360/2\pi$ & $\rightarrow$ & degrees \\
+ velocities & $\times (2\pi/86400) \times (360/2\pi)$
+ & $\rightarrow$ & degree/sec \\
+ accelerations & $\times (2\pi/86400)^2 \times (360/2\pi)$
+ & $\rightarrow$ & degree/sec/sec \\
+ \end{tabular}
+ \end{center}
+
+ Note that the seconds here are sidereal rather than SI. One
+ sidereal second is about 0.99727 SI seconds.
+
+ The velocity and acceleration factors assume the sidereal
+ tracking case. Their respective numerical values are (exactly)
+ 1/240 and (approximately) 1/3300236.9.
+ \item Azimuth is returned in the range $[\,0,2\pi\,]$; north is zero,
+ and east is $+\pi/2$. Elevation and parallactic angle are
+ returned in the range $\pm\pi/2$. Position angle is +ve
+ for a star west of the meridian and is the angle NP--star--zenith.
+ \item The latitude is geodetic as opposed to geocentric. The
+ hour angle and declination are topocentric. Refraction and
+ deficiencies in the telescope mounting are ignored. The
+ purpose of the routine is to give the general form of the
+ quantities. The details of a real telescope could profoundly
+ change the results, especially close to the zenith.
+ \item No range checking of arguments is carried out.
+ \item In applications which involve many such calculations, rather
+ than calling the present routine it will be more efficient to
+ use inline code, having previously computed fixed terms such
+ as sine and cosine of latitude, and (for tracking a star)
+ sine and cosine of declination.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_AMP}{Apparent to Mean}
+{
+ \action{Convert star \radec\ from geocentric apparent to
+ mean place (post IAU 1976).}
+ \call{CALL sla\_AMP (RA, DA, DATE, EQ, RM, DM)}
+}
+\args{GIVEN}
+{
+ \spec{RA,DA}{D}{apparent \radec\ (radians)} \\
+ \spec{DATE}{D}{TDB for apparent place (JD$-$2400000.5)} \\
+ \spec{EQ}{D}{equinox: Julian epoch of mean place}
+}
+\args{RETURNED}
+{
+ \spec{RM,DM}{D}{mean \radec\ (radians)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The distinction between the required TDB and TT is
+ always negligible. Moreover, for all but the most
+ critical applications UTC is adequate.
+ \item The accuracy is limited by the routine sla\_EVP, called
+ by sla\_MAPPA, which computes the Earth position and
+ velocity using the methods of Stumpff. The maximum
+ error is about 0.3~milliarcsecond.
+ \item Iterative techniques are used for the aberration and
+ light deflection corrections so that the routines
+ sla\_AMP (or sla\_AMPQK) and sla\_MAP (or sla\_MAPQK) are
+ accurate inverses; even at the edge of the Sun's disc
+ the discrepancy is only about 1~nanoarcsecond.
+ \item Where multiple apparent places are to be converted to
+ mean places, for a fixed date and equinox, it is more
+ efficient to use the sla\_MAPPA routine to compute the
+ required parameters once, followed by one call to
+ sla\_AMPQK per star.
+ \end{enumerate}
+}
+\refs
+{
+ \begin{enumerate}
+ \item 1984 {\it Astronomical Almanac}, pp B39-B41.
+ \item Lederle \& Schwan, 1984.\ {\it Astr.Astrophys.}\ {\bf 134}, 1-6.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_AMPQK}{Quick Apparent to Mean}
+{
+ \action{Convert star \radec\ from geocentric apparent to mean place
+ (post IAU 1976). Use of this routine is appropriate when
+ efficiency is important and where many star positions are
+ all to be transformed for one epoch and equinox. The
+ star-independent parameters can be obtained by calling
+ the sla\_MAPPA routine.}
+ \call{CALL sla\_AMPQK (RA, DA, AMPRMS, RM, DM)}
+}
+\args{GIVEN}
+{
+ \spec{RA,DA}{D}{apparent \radec\ (radians)} \\
+ \spec{AMPRMS}{D(21)}{star-independent mean-to-apparent parameters:} \\
+ \specel {(1)} {time interval for proper motion (Julian years)} \\
+ \specel {(2-4)} {barycentric position of the Earth (AU)} \\
+ \specel {(5-7)} {heliocentric direction of the Earth (unit vector)} \\
+ \specel {(8)} {(gravitational radius of
+ Sun)$\times 2 / $(Sun-Earth distance)} \\
+ \specel {(9-11)} {{\bf v}: barycentric Earth velocity in units of c} \\
+ \specel {(12)} {$\sqrt{1-\left|\mbox{\bf v}\right|^2}$} \\
+ \specel {(13-21)} {precession/nutation $3\times3$ matrix}
+}
+\args{RETURNED}
+{
+ \spec{RM,DM}{D}{mean \radec\ (radians)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The accuracy is limited by the routine sla\_EVP, called
+ by sla\_MAPPA, which computes the Earth position and
+ velocity using the methods of Stumpff. The maximum
+ error is about 0.3~milliarcsecond.
+ \item Iterative techniques are used for the aberration and
+ light deflection corrections so that the routines
+ sla\_AMP (or sla\_AMPQK) and sla\_MAP (or sla\_MAPQK) are
+ accurate inverses; even at the edge of the Sun's disc
+ the discrepancy is only about 1~nanoarcsecond.
+ \end{enumerate}
+}
+\refs
+{
+ \begin{enumerate}
+ \item 1984 {\it Astronomical Almanac}, pp B39-B41.
+ \item Lederle \& Schwan, 1984.\ {\it Astr.Astrophys.}\ {\bf 134}, 1-6.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_AOP}{Apparent to Observed}
+{
+ \action{Apparent to observed place, for optical sources distant from
+ the solar system.}
+ \call{CALL sla\_AOP (\vtop{
+ \hbox{RAP, DAP, DATE, DUT, ELONGM, PHIM, HM, XP, YP,}
+ \hbox{TDK, PMB, RH, WL, TLR, AOB, ZOB, HOB, DOB, ROB)}}}
+}
+\args{GIVEN}
+{
+ \spec{RAP,DAP}{D}{geocentric apparent \radec\ (radians)} \\
+ \spec{DATE}{D}{UTC date/time (Modified Julian Date, JD$-$2400000.5)} \\
+ \spec{DUT}{D}{$\Delta$UT: UT1$-$UTC (UTC seconds)} \\
+ \spec{ELONGM}{D}{observer's mean longitude (radians, east +ve)} \\
+ \spec{PHIM}{D}{observer's mean geodetic latitude (radians)} \\
+ \spec{HM}{D}{observer's height above sea level (metres)} \\
+ \spec{XP,YP}{D}{polar motion \xy\ coordinates (radians)} \\
+ \spec{TDK}{D}{local ambient temperature (degrees K; std=273.155D0)} \\
+ \spec{PMB}{D}{local atmospheric pressure (mB; std=1013.25D0)} \\
+ \spec{RH}{D}{local relative humidity (in the range 0D0\,--\,1D0)} \\
+ \spec{WL}{D}{effective wavelength ($\mu{\rm m}$, {\it e.g.}\ 0.55D0)} \\
+ \spec{TLR}{D}{tropospheric lapse rate (degrees K per metre,
+ {\it e.g.}\ 0.0065D0)}
+}
+\args{RETURNED}
+{
+ \spec{AOB}{D}{observed azimuth (radians: N=0, E=$90^{\circ}$)} \\
+ \spec{ZOB}{D}{observed zenith distance (radians)} \\
+ \spec{HOB}{D}{observed Hour Angle (radians)} \\
+ \spec{DOB}{D}{observed $\delta$ (radians)} \\
+ \spec{ROB}{D}{observed $\alpha$ (radians)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item This routine returns zenith distance rather than elevation
+ in order to reflect the fact that no allowance is made for
+ depression of the horizon.
+ \item The accuracy of the result is limited by the corrections for
+ refraction. Providing the meteorological parameters are
+ known accurately and there are no gross local effects, the
+ predicted azimuth and elevation should be within about
+ \arcsec{0}{1} for $\zeta<70^{\circ}$. Even
+ at a topocentric zenith distance of
+ $90^{\circ}$, the accuracy in elevation should be better than
+ 1~arcminute; useful results are available for a further
+ $3^{\circ}$, beyond which the sla\_REFRO routine returns a
+ fixed value of the refraction. The complementary
+ routines sla\_AOP (or sla\_AOPQK) and sla\_OAP (or sla\_OAPQK)
+ are self-consistent to better than 1~microarcsecond all over
+ the celestial sphere.
+ \item It is advisable to take great care with units, as even
+ unlikely values of the input parameters are accepted and
+ processed in accordance with the models used.
+ \item {\it Apparent}\/ \radec\ means the geocentric apparent right ascension
+ and declination, which is obtained from a catalogue mean place
+ by allowing for space motion, parallax, precession, nutation,
+ annual aberration, and the Sun's gravitational lens effect. For
+ star positions in the FK5 system ({\it i.e.}\ J2000), these effects can
+ be applied by means of the sla\_MAP {\it etc.}\ routines. Starting from
+ other mean place systems, additional transformations will be
+ needed; for example, FK4 ({\it i.e.}\ B1950) mean places would first
+ have to be converted to FK5, which can be done with the
+ sla\_FK425 {\it etc.}\ routines.
+ \item {\it Observed}\/ \azel\ means the position that would be seen by a
+ perfect theodolite located at the observer. This is obtained
+ from the geocentric apparent \radec\ by allowing for Earth
+ orientation and diurnal aberration, rotating from equator
+ to horizon coordinates, and then adjusting for refraction.
+ The \hadec\ is obtained by rotating back into equatorial
+ coordinates, using the geodetic latitude corrected for polar
+ motion, and is the position that would be seen by a perfect
+ equatorial located at the observer and with its polar axis
+ aligned to the Earth's axis of rotation ({\it n.b.}\ not to the
+ refracted pole). Finally, the $\alpha$ is obtained by subtracting
+ the {\it h}\/ from the local apparent ST.
+ \item To predict the required setting of a real telescope, the
+ observed place produced by this routine would have to be
+ adjusted for the tilt of the azimuth or polar axis of the
+ mounting (with appropriate corrections for mount flexures),
+ for non-perpendicularity between the mounting axes, for the
+ position of the rotator axis and the pointing axis relative
+ to it, for tube flexure, for gear and encoder errors, and
+ finally for encoder zero points. Some telescopes would, of
+ course, exhibit other properties which would need to be
+ accounted for at the appropriate point in the sequence.
+ \item This routine takes time to execute, due mainly to the
+ rigorous integration used to evaluate the refraction.
+ For processing multiple stars for one location and time,
+ call sla\_AOPPA once followed by one call per star to sla\_AOPQK.
+ Where a range of times within a limited period of a few hours
+ is involved, and the highest precision is not required, call
+ sla\_AOPPA once, followed by a call to sla\_AOPPAT each time the
+ time changes, followed by one call per star to sla\_AOPQK.
+ \item The DATE argument is UTC expressed as an MJD. This is,
+ strictly speaking, wrong, because of leap seconds. However,
+ as long as the $\Delta$UT and the UTC are consistent there
+ are no difficulties, except during a leap second. In this
+ case, the start of the 61st second of the final minute should
+ begin a new MJD day and the old pre-leap $\Delta$UT should
+ continue to be used. As the 61st second completes, the MJD
+ should revert to the start of the day as, simultaneously,
+ the $\Delta$UT changes by one second to its post-leap new value.
+ \item The $\Delta$UT (UT1$-$UTC) is tabulated in IERS circulars and
+ elsewhere. It increases by exactly one second at the end of
+ each UTC leap second, introduced in order to keep $\Delta$UT
+ within $\pm$\tsec{0}{9}.
+ \item IMPORTANT -- TAKE CARE WITH THE LONGITUDE SIGN CONVENTION. The
+ longitude required by the present routine is {\bf east-positive},
+ in accordance with geographical convention (and right-handed).
+ In particular, note that the longitudes returned by the
+ sla\_OBS routine are west-positive (as in the {\it Astronomical
+ Almanac}\/ before 1984) and must be reversed in sign before use
+ in the present routine.
+ \item The polar coordinates XP,YP can be obtained from IERS
+ circulars and equivalent publications. The
+ maximum amplitude is about \arcsec{0}{3}. If XP,YP values
+ are unavailable, use XP=YP=0D0. See page B60 of the 1988
+ {\it Astronomical Almanac}\/ for a definition of the two angles.
+ \item The height above sea level of the observing station, HM,
+ can be obtained from the {\it Astronomical Almanac}\/ (Section J
+ in the 1988 edition), or via the routine sla\_OBS. If P,
+ the pressure in mB, is available, an adequate
+ estimate of HM can be obtained from the following expression:
+ \begin{quote}
+ {\tt HM=-29.3D0*TSL*LOG(P/1013.25D0)}
+ \end{quote}
+ where TSL is the approximate sea-level air temperature in degrees K
+ (see {\it Astrophysical Quantities}, C.W.Allen, 3rd~edition,
+ \S 52). Similarly, if the pressure P is not known,
+ it can be estimated from the height of the observing
+ station, HM as follows:
+ \begin{quote}
+ {\tt P=1013.25D0*EXP(-HM/(29.3D0*TSL))}
+ \end{quote}
+ Note, however, that the refraction is proportional to the
+ pressure and that an accurate P value is important for
+ precise work.
+ \item The azimuths {\it etc.}\ used by the present routine are with
+ respect to the celestial pole. Corrections to the terrestrial pole
+ can be computed using sla\_POLMO.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_AOPPA}{Appt-to-Obs Parameters}
+{
+ \action{Pre-compute the set of apparent to observed place parameters
+ required by the ``quick'' routines sla\_AOPQK and sla\_OAPQK.}
+ \call{CALL sla\_AOPPA (\vtop{
+ \hbox{DATE, DUT, ELONGM, PHIM, HM, XP, YP,}
+ \hbox{TDK, PMB, RH, WL, TLR, AOPRMS)}}}
+}
+\args{GIVEN}
+{
+ \spec{DATE}{D}{UTC date/time (Modified Julian Date, JD$-$2400000.5)} \\
+ \spec{DUT}{D}{$\Delta$UT: UT1$-$UTC (UTC seconds)} \\
+ \spec{ELONGM}{D}{observer's mean longitude (radians, east +ve)} \\
+ \spec{PHIM}{D}{observer's mean geodetic latitude (radians)} \\
+ \spec{HM}{D}{observer's height above sea level (metres)} \\
+ \spec{XP,YP}{D}{polar motion \xy\ coordinates (radians)} \\
+ \spec{TDK}{D}{local ambient temperature (degrees K; std=273.155D0)} \\
+ \spec{PMB}{D}{local atmospheric pressure (mB; std=1013.25D0)} \\
+ \spec{RH}{D}{local relative humidity (in the range 0D0\,--\,1D0)} \\
+ \spec{WL}{D}{effective wavelength ($\mu{\rm m}$, {\it e.g.}\ 0.55D0)} \\
+ \spec{TLR}{D}{tropospheric lapse rate (degrees K per metre,
+ {\it e.g.}\ 0.0065D0)}
+}
+\args{RETURNED}
+{
+ \spec{AOPRMS}{D(14)}{star-independent apparent-to-observed parameters:} \\
+ \specel {(1)} {geodetic latitude (radians)} \\
+ \specel {(2,3)} {sine and cosine of geodetic latitude} \\
+ \specel {(4)} {magnitude of diurnal aberration vector} \\
+ \specel {(5)} {height (HM)} \\
+ \specel {(6)} {ambient temperature (TDK)} \\
+ \specel {(7)} {pressure (PMB)} \\
+ \specel {(8)} {relative humidity (RH)} \\
+ \specel {(9)} {wavelength (WL)} \\
+ \specel {(10)} {lapse rate (TLR)} \\
+ \specel {(11,12)} {refraction constants A and B (radians)} \\
+ \specel {(13)} {longitude + eqn of equinoxes +
+ ``sidereal $\Delta$UT'' (radians)} \\
+ \specel {(14)} {local apparent sidereal time (radians)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item It is advisable to take great care with units, as even
+ unlikely values of the input parameters are accepted and
+ processed in accordance with the models used.
+ \item The DATE argument is UTC expressed as an MJD. This is,
+ strictly speaking, wrong, because of leap seconds. However,
+ as long as the $\Delta$UT and the UTC are consistent there
+ are no difficulties, except during a leap second. In this
+ case, the start of the 61st second of the final minute should
+ begin a new MJD day and the old pre-leap $\Delta$UT should
+ continue to be used. As the 61st second completes, the MJD
+ should revert to the start of the day as, simultaneously,
+ the $\Delta$UT changes by one second to its post-leap new value.
+ \item The $\Delta$UT (UT1$-$UTC) is tabulated in IERS circulars and
+ elsewhere. It increases by exactly one second at the end of
+ each UTC leap second, introduced in order to keep $\Delta$UT
+ within $\pm$\tsec{0}{9}. The ``sidereal $\Delta$UT'' which forms
+ part of AOPRMS(13) is the same quantity, but converted from solar
+ to sidereal seconds and expressed in radians.
+ \item IMPORTANT -- TAKE CARE WITH THE LONGITUDE SIGN CONVENTION. The
+ longitude required by the present routine is {\bf east-positive},
+ in accordance with geographical convention (and right-handed).
+ In particular, note that the longitudes returned by the
+ sla\_OBS routine are west-positive (as in the {\it Astronomical
+ Almanac}\/ before 1984) and must be reversed in sign before use in
+ the present routine.
+ \item The polar coordinates XP,YP can be obtained from IERS
+ circulars and equivalent publications. The
+ maximum amplitude is about \arcsec{0}{3}. If XP,YP values
+ are unavailable, use XP=YP=0D0. See page B60 of the 1988
+ {\it Astronomical Almanac}\/ for a definition of the two angles.
+ \item The height above sea level of the observing station, HM,
+ can be obtained from the {\it Astronomical Almanac}\/ (Section J
+ in the 1988 edition), or via the routine sla\_OBS. If P,
+ the pressure in mB, is available, an adequate
+ estimate of HM can be obtained from the following expression:
+ \begin{quote}
+ {\tt HM=-29.3D0*TSL*LOG(P/1013.25D0)}
+ \end{quote}
+ where TSL is the approximate sea-level air temperature in degrees K
+ (see {\it Astrophysical Quantities}, C.W.Allen, 3rd~edition,
+ \S 52). Similarly, if the pressure P is not known,
+ it can be estimated from the height of the observing
+ station, HM as follows:
+ \begin{quote}
+ {\tt P=1013.25D0*EXP(-HM/(29.3D0*TSL))}
+ \end{quote}
+ Note, however, that the refraction is proportional to the
+ pressure and that an accurate P value is important for
+ precise work.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_AOPPAT}{Update Appt-to-Obs Parameters}
+{
+ \action{Recompute the sidereal time in the apparent to observed place
+ star-independent parameter block.}
+ \call{CALL sla\_AOPPAT (DATE, AOPRMS)}
+}
+\args{GIVEN}
+{
+ \spec{DATE}{D}{UTC date/time (Modified Julian Date, JD$-$2400000.5)} \\
+ \spec{AOPRMS}{D(14)}{star-independent apparent-to-observed parameters:} \\
+ \specel{(1-12)}{not required} \\
+ \specel{(13)}{longitude + eqn of equinoxes +
+ ``sidereal $\Delta$UT'' (radians)} \\
+ \specel{(14)}{not required}
+}
+\args{RETURNED}
+{
+ \spec{AOPRMS}{D(14)}{star-independent apparent-to-observed parameters:} \\
+ \specel{(1-13)}{not changed} \\
+ \specel{(14)}{local apparent sidereal time (radians)}
+}
+\anote{For more information, see sla\_AOPPA.}
+%-----------------------------------------------------------------------
+\routine{SLA\_AOPQK}{Quick Appt-to-Observed}
+{
+ \action{Quick apparent to observed place (but see Note~8, below).}
+ \call{CALL sla\_AOPQK (RAP, DAP, AOPRMS, AOB, ZOB, HOB, DOB, ROB)}
+}
+\args{GIVEN}
+{
+ \spec{RAP,DAP}{D}{geocentric apparent \radec\ (radians)} \\
+ \spec{AOPRMS}{D(14)}{star-independent apparent-to-observed parameters:} \\
+ \specel{(1)}{geodetic latitude (radians)} \\
+ \specel{(2,3)}{sine and cosine of geodetic latitude} \\
+ \specel{(4)}{magnitude of diurnal aberration vector} \\
+ \specel{(5)}{height (metres)} \\
+ \specel{(6)}{ambient temperature (degrees K)} \\
+ \specel{(7)}{pressure (mB)} \\
+ \specel{(8)}{relative humidity (0\,--\,1)} \\
+ \specel{(9)}{wavelength ($\mu{\rm m}$)} \\
+ \specel{(10)}{lapse rate (degrees K per metre)} \\
+ \specel{(11,12)}{refraction constants A and B (radians)} \\
+ \specel{(13)}{longitude + eqn of equinoxes +
+ ``sidereal $\Delta$UT'' (radians)} \\
+ \specel{(14)}{local apparent sidereal time (radians)}
+}
+\args{RETURNED}
+{
+ \spec{AOB}{D}{observed azimuth (radians: N=0, E=$90^{\circ}$)} \\
+ \spec{ZOB}{D}{observed zenith distance (radians)} \\
+ \spec{HOB}{D}{observed Hour Angle (radians)} \\
+ \spec{DOB}{D}{observed Declination (radians)} \\
+ \spec{ROB}{D}{observed Right Ascension (radians)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item This routine returns zenith distance rather than elevation
+ in order to reflect the fact that no allowance is made for
+ depression of the horizon.
+ \item The accuracy of the result is limited by the corrections for
+ refraction. Providing the meteorological parameters are
+ known accurately and there are no gross local effects, the
+ predicted azimuth and elevation should be within about
+ \arcsec{0}{1} for $\zeta<70^{\circ}$. Even
+ at a topocentric zenith distance of
+ $90^{\circ}$, the accuracy in elevation should be better than
+ 1~arcminute; useful results are available for a further
+ $3^{\circ}$, beyond which the sla\_REFRO routine returns a
+ fixed value of the refraction. The complementary
+ routines sla\_AOP (or sla\_AOPQK) and sla\_OAP (or sla\_OAPQK)
+ are self-consistent to better than 1~microarcsecond all over
+ the celestial sphere.
+ \item It is advisable to take great care with units, as even
+ unlikely values of the input parameters are accepted and
+ processed in accordance with the models used.
+ \item {\it Apparent}\/ \radec\ means the geocentric apparent right ascension
+ and declination, which is obtained from a catalogue mean place
+ by allowing for space motion, parallax, precession, nutation,
+ annual aberration, and the Sun's gravitational lens effect. For
+ star positions in the FK5 system ({\it i.e.}\ J2000), these effects can
+ be applied by means of the sla\_MAP {\it etc.}\ routines. Starting from
+ other mean place systems, additional transformations will be
+ needed; for example, FK4 ({\it i.e.}\ B1950) mean places would first
+ have to be converted to FK5, which can be done with the
+ sla\_FK425 {\it etc.}\ routines.
+ \item {\it Observed}\/ \azel\ means the position that would be seen by a
+ perfect theodolite located at the observer. This is obtained
+ from the geocentric apparent \radec\ by allowing for Earth
+ orientation and diurnal aberration, rotating from equator
+ to horizon coordinates, and then adjusting for refraction.
+ The \hadec\ is obtained by rotating back into equatorial
+ coordinates, using the geodetic latitude corrected for polar
+ motion, and is the position that would be seen by a perfect
+ equatorial located at the observer and with its polar axis
+ aligned to the Earth's axis of rotation ({\it n.b.}\ not to the
+ refracted pole). Finally, the $\alpha$ is obtained by subtracting
+ the {\it h}\/ from the local apparent ST.
+ \item To predict the required setting of a real telescope, the
+ observed place produced by this routine would have to be
+ adjusted for the tilt of the azimuth or polar axis of the
+ mounting (with appropriate corrections for mount flexures),
+ for non-perpendicularity between the mounting axes, for the
+ position of the rotator axis and the pointing axis relative
+ to it, for tube flexure, for gear and encoder errors, and
+ finally for encoder zero points. Some telescopes would, of
+ course, exhibit other properties which would need to be
+ accounted for at the appropriate point in the sequence.
+ \item The star-independent apparent-to-observed-place parameters
+ in AOPRMS may be computed by means of the sla\_AOPPA routine.
+ If nothing has changed significantly except the time, the
+ sla\_AOPPAT routine may be used to perform the requisite
+ partial recomputation of AOPRMS.
+ \item The ``sidereal $\Delta$UT'' which forms part of AOPRMS(13)
+ is UT1$-$UTC converted from solar to
+ sidereal seconds and expressed in radians.
+ \item At zenith distances beyond about $76^\circ$, the need for
+ special care with the corrections for refraction causes a
+ marked increase in execution time. Moreover, the effect
+ gets worse with increasing zenith distance. Adroit
+ programming in the calling application may allow the
+ problem to be reduced. Prepare an alternative AOPRMS array,
+ computed for zero air-pressure; this will disable the
+ refraction corrections and cause rapid execution. Using
+ this AOPRMS array, a preliminary call to the present routine
+ will, depending on the application, produce a rough position
+ which may be enough to establish whether the full, slow
+ calculation (using the real AOPRMS array) is worthwhile.
+ For example, there would be no need for the full calculation
+ if the preliminary call had already established that the
+ source was well below the elevation limits for a particular
+ telescope.
+ \item The azimuths {\it etc.}\ used by the present routine are with
+ respect to the celestial pole. Corrections to the terrestrial pole
+ can be computed using sla\_POLMO.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_ATMDSP}{Atmospheric Dispersion}
+{
+ \action{Apply atmospheric-dispersion adjustments to refraction coefficients.}
+ \call{CALL sla\_ATMDSP (TDK, PMB, RH, WL1, A1, B1, WL2, A2, B2)}
+}
+\args{GIVEN}
+{
+ \spec{TDK}{D}{ambient temperature at the observer (degrees K)} \\
+ \spec{PMB}{D}{pressure at the observer (mB)} \\
+ \spec{RH}{D}{relative humidity at the observer (range 0\,--\,1)} \\
+ \spec{WL1}{D}{base wavelength ($\mu{\rm m}$)} \\
+ \spec{A1}{D}{refraction coefficient A for wavelength WL1 (radians)} \\
+ \spec{B1}{D}{refraction coefficient B for wavelength WL1 (radians)} \\
+ \spec{WL2}{D}{wavelength for which adjusted A,B required ($\mu{\rm m}$)}
+}
+\args{RETURNED}
+{
+ \spec{A2}{D}{refraction coefficient A for wavelength WL2 (radians)} \\
+ \spec{B2}{D}{refraction coefficient B for wavelength WL2 (radians)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item To use this routine, first call sla\_REFCO specifying WL1 as the
+ wavelength. This yields refraction coefficients A1, B1, correct
+ for that wavelength. Subsequently, calls to sla\_ATMDSP specifying
+ different wavelengths will produce new, slightly adjusted
+ refraction coefficients A2, B2, which apply to the specified wavelength.
+ \item Most of the atmospheric dispersion happens between $0.7\,\mu{\rm m}$
+ and the UV atmospheric cutoff, and the effect increases strongly
+ towards the UV end. For this reason a blue reference wavelength
+ is recommended, for example $0.4\,\mu{\rm m}$.
+ \item The accuracy, for this set of conditions: \\[1pc]
+ \hspace*{5ex} \begin{tabular}{rcl}
+ height above sea level & ~ & 2000\,m \\
+ latitude & ~ & $29^\circ$ \\
+ pressure & ~ & 793\,mB \\
+ temperature & ~ & $290^\circ$\,K \\
+ humidity & ~ & 0.5 (50\%) \\
+ lapse rate & ~ & $0.0065^\circ m^{-1}$ \\
+ reference wavelength & ~ & $0.4\,\mu{\rm m}$ \\
+ star elevation & ~ & $15^\circ$ \\
+ \end{tabular}\\[1pc]
+ is about 2.5\,mas RMS between 0.3 and $1.0\,\mu{\rm m}$, and stays
+ within 4\,mas for the whole range longward of $0.3\,\mu{\rm m}$
+ (compared with a total dispersion from 0.3 to $20\,\mu{\rm m}$
+ of about \arcseci{11}). These errors are typical for ordinary
+ conditions; in extreme conditions values a few times this size
+ may occur.
+ \item If either wavelength exceeds $100\,\mu{\rm m}$, the radio case
+ is assumed and the returned refraction coefficients are the
+ same as the given ones.
+ \item The algorithm consists of calculation of the refractivity of the
+ air at the observer for the two wavelengths, using the methods
+ of the sla\_REFRO routine, and then scaling of the two refraction
+ coefficients according to classical refraction theory. This
+ amounts to scaling the A coefficient in proportion to $(\mu-1)$ and
+ the B coefficient almost in the same ratio (see R.M.Green,
+ {\it Spherical Astronomy,}\/ Cambridge University Press, 1985).
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_AV2M}{Rotation Matrix from Axial Vector}
+{
+ \action{Form the rotation matrix corresponding to a given axial vector
+ (single precision).}
+ \call{CALL sla\_AV2M (AXVEC, RMAT)}
+}
+\args{GIVEN}
+{
+ \spec{AXVEC}{R(3)}{axial vector (radians)}
+}
+\args{RETURNED}
+{
+ \spec{RMAT}{R(3,3)}{rotation matrix}
+}
+\notes
+{
+ \begin{enumerate}
+ \item A rotation matrix describes a rotation about some arbitrary axis.
+ The axis is called the {\it Euler axis}, and the angle through which the
+ reference frame rotates is called the Euler angle. The axial
+ vector supplied to this routine has the same direction as the
+ Euler axis, and its magnitude is the Euler angle in radians.
+ \item If AXVEC is null, the unit matrix is returned.
+ \item The reference frame rotates clockwise as seen looking along
+ the axial vector from the origin.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_BEAR}{Direction Between Points on a Sphere}
+{
+ \action{Returns the bearing (position angle) of one point on a
+ sphere seen from another (single precision).}
+ \call{R~=~sla\_BEAR (A1, B1, A2, B2)}
+}
+\args{GIVEN}
+{
+ \spec{A1,B1}{R}{spherical coordinates of one point} \\
+ \spec{A2,B2}{R}{spherical coordinates of the other point}
+}
+\args{RETURNED}
+{
+ \spec{sla\_BEAR}{R}{bearing from first point to second}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The spherical coordinates are \radec,
+ $[\lambda,\phi]$ {\it etc.}, in radians.
+ \item The result is the bearing (position angle), in radians,
+ of point [A2,B2] as seen
+ from point [A1,B1]. It is in the range $\pm \pi$. The sense
+ is such that if [A2,B2]
+ is a small distance due east of [A1,B1] the result
+ is about $+\pi/2$. Zero is returned
+ if the two points are coincident.
+ \item If either B-coordinate is outside the range $\pm\pi/2$, the
+ result may correspond to ``the long way round''.
+ \item The routine sla\_PAV performs an equivalent function except
+ that the points are specified in the form of Cartesian unit
+ vectors.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_CAF2R}{Deg,Arcmin,Arcsec to Radians}
+{
+ \action{Convert degrees, arcminutes, arcseconds to radians
+ (single precision).}
+ \call{CALL sla\_CAF2R (IDEG, IAMIN, ASEC, RAD, J)}
+}
+\args{GIVEN}
+{
+ \spec{IDEG}{I}{degrees} \\
+ \spec{IAMIN}{I}{arcminutes} \\
+ \spec{ASEC}{R}{arcseconds}
+}
+\args{RETURNED}
+{
+ \spec{RAD}{R}{angle in radians} \\
+ \spec{J}{I}{status:} \\
+ \spec{}{}{\hspace{1.5em} 1 = IDEG outside range 0$-$359} \\
+ \spec{}{}{\hspace{1.5em} 2 = IAMIN outside range 0$-$59} \\
+ \spec{}{}{\hspace{1.5em} 3 = ASEC outside range 0$-$59.999$\cdots$}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The result is computed even if any of the range checks fail.
+ \item The sign must be dealt with outside this routine.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_CALDJ}{Calendar Date to MJD}
+{
+ \action{Gregorian Calendar to Modified Julian Date, with century default.}
+ \call{CALL sla\_CALDJ (IY, IM, ID, DJM, J)}
+}
+\args{GIVEN}
+{
+ \spec{IY,IM,ID}{I}{year, month, day in Gregorian calendar}
+}
+\args{RETURNED}
+{
+ \spec{DJM}{D}{modified Julian Date (JD$-$2400000.5) for $0^{\rm h}$} \\
+ \spec{J}{I}{status:} \\
+ \spec{}{}{\hspace{1.5em} 0 = OK} \\
+ \spec{}{}{\hspace{1.5em} 1 = bad year (MJD not computed)} \\
+ \spec{}{}{\hspace{1.5em} 2 = bad month (MJD not computed)} \\
+ \spec{}{}{\hspace{1.5em} 3 = bad day (MJD computed)} \\
+}
+\notes
+{
+ \begin{enumerate}
+ \item This routine supports the {\it century default}\/ feature.
+ Acceptable years are:
+ \begin{itemize}
+ \item 00-49, interpreted as 2000\,--\,2049,
+ \item 50-99, interpreted as 1950\,--\,1999, and
+ \item 100 upwards, interpreted literally.
+ \end{itemize}
+ For 1-100AD use the routine sla\_CLDJ instead.
+ \item For year $n$BC use IY = $-(n-1)$.
+ \item When an invalid year or month is supplied (status J~=~1~or~2)
+ the MJD is {\bf not} computed. When an invalid day is supplied
+ (status J~=~3) the MJD {\bf is} computed.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_CALYD}{Calendar to Year, Day}
+{
+ \action{Gregorian calendar date to year and day in year, in a Julian
+ calendar aligned to the 20th/21st century Gregorian calendar,
+ with century default.}
+ \call{CALL sla\_CALYD (IY, IM, ID, NY, ND, J)}
+}
+\args{GIVEN}
+{
+ \spec{IY,IM,ID}{I}{year, month, day in Gregorian calendar:
+ year may optionally omit the century}
+}
+\args{RETURNED}
+{
+ \spec{NY}{I}{year (re-aligned Julian calendar)} \\
+ \spec{ND}{I}{day in year (1 = January 1st)} \\
+ \spec{J}{I}{status:} \\
+ \spec{}{}{\hspace{1.5em} 0 = OK} \\
+ \spec{}{}{\hspace{1.5em} 1 = bad year (before $-4711$)} \\
+ \spec{}{}{\hspace{1.5em} 2 = bad month} \\
+ \spec{}{}{\hspace{1.5em} 3 = bad day}
+}
+\notes
+{
+ \begin{enumerate}
+ \item This routine supports the {\it century default}\/ feature.
+ Acceptable years are:
+ \begin{itemize}
+ \item 00-49, interpreted as 2000\,--\,2049,
+ \item 50-99, interpreted as 1950\,--\,1999, and
+ \item other years after -4712 , interpreted literally.
+ \end{itemize}
+ Use sla\_CLYD for years before 100AD.
+ \item The purpose of sla\_CALDJ is to support
+ sla\_EARTH, sla\_MOON and sla\_ECOR.
+ \item Between 1900~March~1 and 2100~February~28 it returns answers
+ which are consistent with the ordinary Gregorian calendar.
+ Outside this range there will be a discrepancy which increases
+ by one day for every non-leap century year.
+ \item When an invalid year or month is supplied (status J~=~1 or J~=~2)
+ the results are {\bf not} computed. When a day is
+ supplied which is outside the conventional range (status J~=~3)
+ the results {\bf are} computed.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_CC2S}{Cartesian to Spherical}
+{
+ \action{Cartesian coordinates to spherical coordinates (single precision).}
+ \call{CALL sla\_CC2S (V, A, B)}
+}
+\args{GIVEN}
+{
+ \spec{V}{R(3)}{\xyz\ vector}
+}
+\args{RETURNED}
+{
+ \spec{A,B}{R}{spherical coordinates in radians}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The spherical coordinates are longitude (+ve anticlockwise
+ looking from the +ve latitude pole) and latitude. The
+ Cartesian coordinates are right handed, with the {\it x}-axis
+ at zero longitude and latitude, and the {\it z}-axis at the
+ +ve latitude pole.
+ \item If V is null, zero A and B are returned.
+ \item At either pole, zero A is returned.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_CC62S}{Cartesian 6-Vector to Spherical}
+{
+ \action{Conversion of position \& velocity in Cartesian coordinates
+ to spherical coordinates (single precision).}
+ \call{CALL sla\_CC62S (V, A, B, R, AD, BD, RD)}
+}
+\args{GIVEN}
+{
+ \spec{V}{R(6)}{\xyzxyzd}
+}
+\args{RETURNED}
+{
+ \spec{A}{R}{longitude (radians) -- for example $\alpha$} \\
+ \spec{B}{R}{latitude (radians) -- for example $\delta$} \\
+ \spec{R}{R}{radial coordinate} \\
+ \spec{AD}{R}{longitude derivative (radians per unit time)} \\
+ \spec{BD}{R}{latitude derivative (radians per unit time)} \\
+ \spec{RD}{R}{radial derivative}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_CD2TF}{Days to Hour,Min,Sec}
+{
+ \action{Convert an interval in days to hours, minutes, seconds
+ (single precision).}
+ \call{CALL sla\_CD2TF (NDP, DAYS, SIGN, IHMSF)}
+}
+\args{GIVEN}
+{
+ \spec{NDP}{I}{number of decimal places of seconds} \\
+ \spec{DAYS}{R}{interval in days}
+}
+\args{RETURNED}
+{
+ \spec{SIGN}{C}{`+' or `$-$'} \\
+ \spec{IHMSF}{I(4)}{hours, minutes, seconds, fraction}
+}
+\notes
+{
+ \begin{enumerate}
+ \item NDP less than zero is interpreted as zero.
+ \item The largest useful value for NDP is determined by the size of
+ DAYS, the format of REAL floating-point numbers on the target
+ machine, and the risk of overflowing IHMSF(4). For example,
+ on a VAX computer, for DAYS up to 1.0, the available floating-point
+ precision corresponds roughly to NDP=3. This is well below
+ the ultimate limit of NDP=9 set by the capacity of the 32-bit
+ integer IHMSF(4).
+ \item The absolute value of DAYS may exceed 1.0. In cases where it
+ does not, it is up to the caller to test for and handle the
+ case where DAYS is very nearly 1.0 and rounds up to 24~hours,
+ by testing for IHMSF(1)=24 and setting IHMSF(1-4) to zero.
+\end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_CLDJ}{Calendar to MJD}
+{
+ \action{Gregorian Calendar to Modified Julian Date.}
+ \call{CALL sla\_CLDJ (IY, IM, ID, DJM, J)}
+}
+\args{GIVEN}
+{
+ \spec{IY,IM,ID}{I}{year, month, day in Gregorian calendar}
+}
+\args{RETURNED}
+{
+ \spec{DJM}{D}{modified Julian Date (JD$-$2400000.5) for $0^{\rm h}$} \\
+ \spec{J}{I}{status:} \\
+ \spec{}{}{\hspace{1.5em} 0 = OK} \\
+ \spec{}{}{\hspace{1.5em} 1 = bad year} \\
+ \spec{}{}{\hspace{1.5em} 2 = bad month} \\
+ \spec{}{}{\hspace{1.5em} 3 = bad day}
+}
+\notes
+{
+ \begin{enumerate}
+ \item When an invalid year or month is supplied (status J~=~1~or~2)
+ the MJD is {\bf not} computed. When an invalid day is supplied
+ (status J~=~3) the MJD {\bf is} computed.
+ \item The year must be $-$4699 ({\it i.e.}\ 4700BC) or later.
+ For year $n$BC use IY = $-(n-1)$.
+ \item An alternative to the present routine is sla\_CALDJ, which
+ accepts a year with the century missing.
+ \end{enumerate}
+}
+\aref{The algorithm is derived from that of Hatcher,
+ {\it Q.\,Jl.\,R.\,astr.\,Soc.}\ (1984) {\bf 25}, 53-55.}
+%-----------------------------------------------------------------------
+\routine{SLA\_CLYD}{Calendar to Year, Day}
+{
+ \action{Gregorian calendar date to year and day in year, in a Julian
+ calendar aligned to the 20th/21st century Gregorian calendar.}
+ \call{CALL sla\_CLYD (IY, IM, ID, NY, ND, J)}
+}
+\args{GIVEN}
+{
+ \spec{IY,IM,ID}{I}{year, month, day in Gregorian calendar}
+}
+\args{RETURNED}
+{
+ \spec{NY}{I}{year (re-aligned Julian calendar)} \\
+ \spec{ND}{I}{day in year (1 = January 1st)} \\
+ \spec{J}{I}{status:} \\
+ \spec{}{}{\hspace{1.5em} 0 = OK} \\
+ \spec{}{}{\hspace{1.5em} 1 = bad year (before $-4711$)} \\
+ \spec{}{}{\hspace{1.5em} 2 = bad month} \\
+ \spec{}{}{\hspace{1.5em} 3 = bad day}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The purpose of sla\_CLYD is to support sla\_EARTH,
+ sla\_MOON and sla\_ECOR.
+ \item Between 1900~March~1 and 2100~February~28 it returns answers
+ which are consistent with the ordinary Gregorian calendar.
+ Outside this range there will be a discrepancy which increases
+ by one day for every non-leap century year.
+ \item When an invalid year or month is supplied (status J~=~1 or J~=~2)
+ the results are {\bf not} computed. When a day is
+ supplied which is outside the conventional range (status J~=~3)
+ the results {\bf are} computed.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_COMBN}{Next Combination}
+{
+ \action{Generate the next combination, a subset of a specified size chosen
+ from a specified number of items.}
+ \call{CALL sla\_COMBN (NSEL, NCAND, LIST, J)}
+}
+\args{GIVEN}
+{
+ \spec{NSEL}{I}{number of items (subset size)} \\
+ \spec{NCAND}{I}{number of candidates (set size)}
+}
+\args{GIVEN and RETURNED}
+{
+ \spec{LIST}{I(NSEL)}{latest combination, LIST(1)=0 to initialize}
+}
+\args{RETURNED}
+{
+ \spec{J}{I}{status:} \\
+ \spec{}{}{\hspace{1.5em} $-$1 = illegal NSEL or NCAND} \\
+ \spec{}{}{\hspace{2.3em} 0 = OK} \\
+ \spec{}{}{\hspace{1.5em} $+$1 = no more combinations available}
+}
+\notes
+{
+ \begin{enumerate}
+ \item NSEL and NCAND must both be at least 1, and NSEL must be less
+ than or equal to NCAND.
+ \item This routine returns, in the LIST array, a subset of NSEL integers
+ chosen from the range 1 to NCAND inclusive, in ascending order.
+ Before calling the routine for the first time, the caller must set
+ the first element of the LIST array to zero (any value less than 1
+ will do) to cause initialization.
+ \item The first combination to be generated is:
+ \begin{verse}
+ LIST(1)=1, LIST(2)=2, \ldots, LIST(NSEL)=NSEL
+ \end{verse}
+ This is also the combination returned for the ``finished'' (J=1) case.
+ The final permutation to be generated is:
+ \begin{verse}
+ LIST(1)=NCAND, LIST(2)=NCAND$-$1, \ldots, \\
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~LIST(NSEL)=NCAND$-$NSEL+1
+ \end{verse}
+ \item If the ``finished'' (J=1) status is ignored, the routine
+ continues to deliver combinations, the pattern repeating
+ every NCAND!/(NSEL!(NCAND$-$NSEL)!) calls.
+ \item The algorithm is by R.\,F.\,Warren-Smith (private communication).
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_CR2AF}{Radians to Deg,Arcmin,Arcsec}
+{
+ \action{Convert an angle in radians to degrees, arcminutes,
+ arcseconds (single precision).}
+ \call{CALL sla\_CR2AF (NDP, ANGLE, SIGN, IDMSF)}
+}
+\args{GIVEN}
+{
+ \spec{NDP}{I}{number of decimal places of arcseconds} \\
+ \spec{ANGLE}{R}{angle in radians}
+}
+\args{RETURNED}
+{
+ \spec{SIGN}{C}{`+' or `$-$'} \\
+ \spec{IDMSF}{I(4)}{degrees, arcminutes, arcseconds, fraction}
+}
+\notes
+{
+ \begin{enumerate}
+ \item NDP less than zero is interpreted as zero.
+ \item The largest useful value for NDP is determined by the size of
+ ANGLE, the format of REAL floating-point numbers on the target
+ machine, and the risk of overflowing IDMSF(4). For example,
+ on a VAX computer, for ANGLE up to $2\pi$, the available floating-point
+ precision corresponds roughly to NDP=3. This is well below
+ the ultimate limit of NDP=9 set by the capacity of the 32-bit
+ integer IHMSF(4).
+ \item The absolute value of ANGLE may exceed $2\pi$. In cases where it
+ does not, it is up to the caller to test for and handle the
+ case where ANGLE is very nearly $2\pi$ and rounds up to $360^{\circ}$,
+ by testing for IDMSF(1)=360 and setting IDMSF(1-4) to zero.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_CR2TF}{Radians to Hour,Min,Sec}
+{
+ \action{Convert an angle in radians to hours, minutes, seconds
+ (single precision).}
+ \call{CALL sla\_CR2TF (NDP, ANGLE, SIGN, IHMSF)}
+}
+\args{GIVEN}
+{
+ \spec{NDP}{I}{number of decimal places of seconds} \\
+ \spec{ANGLE}{R}{angle in radians}
+}
+\args{RETURNED}
+{
+ \spec{SIGN}{C}{`+' or `$-$'} \\
+ \spec{IHMSF}{I(4)}{hours, minutes, seconds, fraction}
+}
+\notes
+{
+ \begin{enumerate}
+ \item NDP less than zero is interpreted as zero.
+ \item The largest useful value for NDP is determined by the size of
+ ANGLE, the format of REAL floating-point numbers on the target
+ machine, and the risk of overflowing IHMSF(4). For example,
+ on a VAX computer, for ANGLE up to $2\pi$, the available floating-point
+ precision corresponds roughly to NDP=3. This is well below
+ the ultimate limit of NDP=9 set by the capacity of the 32-bit
+ integer IHMSF(4).
+ \item The absolute value of ANGLE may exceed $2\pi$. In cases where it
+ does not, it is up to the caller to test for and handle the
+ case where ANGLE is very nearly $2\pi$ and rounds up to 24~hours,
+ by testing for IHMSF(1)=24 and setting IHMSF(1-4) to zero.
+\end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_CS2C}{Spherical to Cartesian}
+{
+ \action{Spherical coordinates to Cartesian coordinates (single precision).}
+ \call{CALL sla\_CS2C (A, B, V)}
+}
+\args{GIVEN}
+{
+ \spec{A,B}{R}{spherical coordinates in radians: \radec\ {\it etc.}}
+}
+\args{RETURNED}
+{
+ \spec{V}{R(3)}{\xyz\ unit vector}
+}
+\anote{The spherical coordinates are longitude (+ve anticlockwise
+ looking from the +ve latitude pole) and latitude. The
+ Cartesian coordinates are right handed, with the {\it x}-axis
+ at zero longitude and latitude, and the {\it z}-axis at the
+ +ve latitude pole.}
+%-----------------------------------------------------------------------
+\routine{SLA\_CS2C6}{Spherical Pos/Vel to Cartesian}
+{
+ \action{Conversion of position \& velocity in spherical coordinates
+ to Cartesian coordinates (single precision).}
+ \call{CALL sla\_CS2C6 (A, B, R, AD, BD, RD, V)}
+}
+\args{GIVEN}
+{
+ \spec{A}{R}{longitude (radians) -- for example $\alpha$} \\
+ \spec{B}{R}{latitude (radians) -- for example $\delta$} \\
+ \spec{R}{R}{radial coordinate} \\
+ \spec{AD}{R}{longitude derivative (radians per unit time)} \\
+ \spec{BD}{R}{latitude derivative (radians per unit time)} \\
+ \spec{RD}{R}{radial derivative}
+}
+\args{RETURNED}
+{
+ \spec{V}{R(6)}{\xyzxyzd}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_CTF2D}{Hour,Min,Sec to Days}
+{
+ \action{Convert hours, minutes, seconds to days (single precision).}
+ \call{CALL sla\_CTF2D (IHOUR, IMIN, SEC, DAYS, J)}
+}
+\args{GIVEN}
+{
+ \spec{IHOUR}{I}{hours} \\
+ \spec{IMIN}{I}{minutes} \\
+ \spec{SEC}{R}{seconds}
+}
+\args{RETURNED}
+{
+ \spec{DAYS}{R}{interval in days} \\
+ \spec{J}{I}{status:} \\
+ \spec{}{}{\hspace{1.5em} 0 = OK} \\
+ \spec{}{}{\hspace{1.5em} 1 = IHOUR outside range 0-23} \\
+ \spec{}{}{\hspace{1.5em} 2 = IMIN outside range 0-59} \\
+ \spec{}{}{\hspace{1.5em} 3 = SEC outside range 0-59.999$\cdots$}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The result is computed even if any of the range checks fail.
+ \item The sign must be dealt with outside this routine.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_CTF2R}{Hour,Min,Sec to Radians}
+{
+ \action{Convert hours, minutes, seconds to radians (single precision).}
+ \call{CALL sla\_CTF2R (IHOUR, IMIN, SEC, RAD, J)}
+}
+\args{GIVEN}
+{
+ \spec{IHOUR}{I}{hours} \\
+ \spec{IMIN}{I}{minutes} \\
+ \spec{SEC}{R}{seconds}
+}
+\args{RETURNED}
+{
+ \spec{RAD}{R}{angle in radians} \\
+ \spec{J}{I}{status:} \\
+ \spec{}{}{\hspace{1.5em} 0 = OK} \\
+ \spec{}{}{\hspace{1.5em} 1 = IHOUR outside range 0-23} \\
+ \spec{}{}{\hspace{1.5em} 2 = IMIN outside range 0-59} \\
+ \spec{}{}{\hspace{1.5em} 3 = SEC outside range 0-59.999$\cdots$}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The result is computed even if any of the range checks fail.
+ \item The sign must be dealt with outside this routine.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_DAF2R}{Deg,Arcmin,Arcsec to Radians}
+{
+ \action{Convert degrees, arcminutes, arcseconds to radians
+ (double precision).}
+ \call{CALL sla\_DAF2R (IDEG, IAMIN, ASEC, RAD, J)}
+}
+\args{GIVEN}
+{
+ \spec{IDEG}{I}{degrees} \\
+ \spec{IAMIN}{I}{arcminutes} \\
+ \spec{ASEC}{D}{arcseconds}
+}
+\args{RETURNED}
+{
+ \spec{RAD}{D}{angle in radians} \\
+ \spec{J}{I}{status:} \\
+ \spec{}{}{\hspace{1.5em} 1 = IDEG outside range 0$-$359} \\
+ \spec{}{}{\hspace{1.5em} 2 = IAMIN outside range 0$-$59} \\
+ \spec{}{}{\hspace{1.5em} 3 = ASEC outside range 0$-$59.999$\cdots$}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The result is computed even if any of the range checks fail.
+ \item The sign must be dealt with outside this routine.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_DAFIN}{Sexagesimal character string to angle}
+{
+ \action{Decode a free-format sexagesimal string (degrees, arcminutes,
+ arcseconds) into a double precision floating point
+ number (radians).}
+ \call{CALL sla\_DAFIN (STRING, NSTRT, DRESLT, JF)}
+}
+\args{GIVEN}
+{
+ \spec{STRING}{C*(*)}{string containing deg, arcmin, arcsec fields} \\
+ \spec{NSTRT}{I}{pointer to start of decode (beginning of STRING = 1)}
+}
+\args{RETURNED}
+{
+ \spec{NSTRT}{I}{advanced past the decoded angle} \\
+ \spec{DRESLT}{D}{angle in radians} \\
+ \spec{JF}{I}{status:} \\
+ \spec{}{}{\hspace{1.5em} 0 = OK} \\
+ \spec{}{}{\hspace{0.7em} $+1$ = default, DRESLT unchanged (note 2)} \\
+ \spec{}{}{\hspace{0.7em} $-1$ = bad degrees (note 3)} \\
+ \spec{}{}{\hspace{0.7em} $-2$ = bad arcminutes (note 3)} \\
+ \spec{}{}{\hspace{0.7em} $-3$ = bad arcseconds (note 3)} \\
+}
+\goodbreak
+\setlength{\oldspacing}{\topsep}
+\setlength{\topsep}{0.3ex}
+\begin{description}
+ \item [EXAMPLE]: \\ [1.5ex]
+ \begin{tabular}{p{7em}p{15em}p{12em}}
+ {\it argument} & {\it before} & {\it after} \\ \\
+ STRING & $'$\verb*}-57 17 44.806 12 34 56.7}$'$ & unchanged \\
+ NSTRT & 1 & 16 ({\it i.e.}\ pointing to 12...) \\
+ RESLT & - & $-1.00000${\tt D0} \\
+ JF & - & 0
+ \end{tabular}
+ \item A further call to sla\_DAFIN, without adjustment of NSTRT, will
+ decode the second angle, \dms{12}{34}{56}{7}.
+\end{description}
+\setlength{\topsep}{\oldspacing}
+\notes
+{
+ \begin{enumerate}
+ \item The first three ``fields'' in STRING are degrees, arcminutes,
+ arcseconds, separated by spaces or commas. The degrees field
+ may be signed, but not the others. The decoding is carried
+ out by the sla\_DFLTIN routine and is free-format.
+ \item Successive fields may be absent, defaulting to zero. For
+ zero status, the only combinations allowed are degrees alone,
+ degrees and arcminutes, and all three fields present. If all
+ three fields are omitted, a status of +1 is returned and DRESLT is
+ unchanged. In all other cases DRESLT is changed.
+ \item Range checking:
+ \begin{itemize}
+ \item The degrees field is not range checked. However, it is
+ expected to be integral unless the other two fields are absent.
+ \item The arcminutes field is expected to be 0-59, and integral if
+ the arcseconds field is present. If the arcseconds field
+ is absent, the arcminutes is expected to be 0-59.9999...
+ \item The arcseconds field is expected to be 0-59.9999...
+ \item Decoding continues even when a check has failed. Under these
+ circumstances the field takes the supplied value, defaulting to
+ zero, and the result DRESLT is computed and returned.
+ \end{itemize}
+ \item Further fields after the three expected ones are not treated as
+ an error. The pointer NSTRT is left in the correct state for
+ further decoding with the present routine or with sla\_DFLTIN
+ {\it etc}. See the example, above.
+ \item If STRING contains hours, minutes, seconds instead of
+ degrees {\it etc},
+ or if the required units are turns (or days) instead of radians,
+ the result DRESLT should be multiplied as follows: \\ [1.5ex]
+ \begin{tabular}{p{6em}p{5em}p{18em}}
+ {\it for STRING} & {\it to obtain} & {\it multiply DRESLT by} \\ \\
+ ${\circ}$~~\raisebox{-0.7ex}{$'$}~~\raisebox{-0.7ex}{$''$}
+ & radians & $1.0${\tt D0} \\
+ ${\circ}$~~\raisebox{-0.7ex}{$'$}~~\raisebox{-0.7ex}{$''$}
+ & turns & $1/{2 \pi} = 0.1591549430918953358${\tt D0} \\
+ h m s & radians & $15.0${\tt D0} \\
+ h m s & days & $15/{2\pi} = 2.3873241463784300365${\tt D0}
+ \end{tabular}
+ \end{enumerate}
+}
+%------------------------------------------------------------------------------
+\routine{SLA\_DAT}{TAI$-$UTC}
+{
+ \action{Increment to be applied to Coordinated Universal Time UTC to give
+ International Atomic Time TAI.}
+ \call{D~=~sla\_DAT (UTC)}
+}
+\args{GIVEN}
+{
+ \spec{UTC}{D}{UTC date as a modified JD (JD$-$2400000.5)}
+}
+\args{RETURNED}
+{
+ \spec{sla\_DAT}{D}{TAI$-$UTC in seconds}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The UTC is specified to be a date rather than a time to indicate
+ that care needs to be taken not to specify an instant which lies
+ within a leap second. Though in most cases UTC can include the
+ fractional part, correct behaviour on the day of a leap second
+ can be guaranteed only up to the end of the second
+ $23^{\rm h}\,59^{\rm m}\,59^{\rm s}$.
+ \item UTC began at 1960 January 1. To specify a UTC prior to this
+ date would be meaningless; in such cases the parameters
+ for the year 1960 are used by default.
+ \item This routine has to be updated on each occasion that a
+ leap second is announced, and programs using it relinked.
+ Refer to the program source code for information on when the
+ most recent leap second was added.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_DAV2M}{Rotation Matrix from Axial Vector}
+{
+ \action{Form the rotation matrix corresponding to a given axial vector
+ (double precision).}
+ \call{CALL sla\_DAV2M (AXVEC, RMAT)}
+}
+\args{GIVEN}
+{
+ \spec{AXVEC}{D(3)}{axial vector (radians)}
+}
+\args{RETURNED}
+{
+ \spec{RMAT}{D(3,3)}{rotation matrix}
+}
+\notes
+{
+ \begin{enumerate}
+ \item A rotation matrix describes a rotation about some arbitrary axis.
+ The axis is called the {\it Euler axis}, and the angle through which the
+ reference frame rotates is called the {\it Euler angle}. The axial
+ vector supplied to this routine has the same direction as the
+ Euler axis, and its magnitude is the Euler angle in radians.
+ \item If AXVEC is null, the unit matrix is returned.
+ \item The reference frame rotates clockwise as seen looking along
+ the axial vector from the origin.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_DBEAR}{Direction Between Points on a Sphere}
+{
+ \action{Returns the bearing (position angle) of one point on a
+ sphere relative to another (double precision).}
+ \call{D~=~sla\_DBEAR (A1, B1, A2, B2)}
+}
+\args{GIVEN}
+{
+ \spec{A1,B1}{D}{spherical coordinates of one point} \\
+ \spec{A2,B2}{D}{spherical coordinates of the other point}
+}
+\args{RETURNED}
+{
+ \spec{sla\_DBEAR}{D}{bearing from first point to second}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The spherical coordinates are \radec,
+ $[\lambda,\phi]$ {\it etc.}, in radians.
+ \item The result is the bearing (position angle), in radians,
+ of point [A2,B2] as seen
+ from point [A1,B1]. It is in the range $\pm \pi$. The sense
+ is such that if [A2,B2]
+ is a small distance due east of [A1,B1] the result
+ is about $+\pi/2$. Zero is returned
+ if the two points are coincident.
+ \item If either B-coordinate is outside the range $\pm\pi/2$, the
+ result may correspond to ``the long way round''.
+ \item The routine sla\_DPAV performs an equivalent function except
+ that the points are specified in the form of Cartesian unit
+ vectors.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_DBJIN}{Decode String to B/J Epoch (DP)}
+{
+ \action{Decode a character string into a DOUBLE PRECISION number,
+ with special provision for Besselian and Julian epochs.
+ The string syntax is as for sla\_DFLTIN, prefixed by
+ an optional `B' or `J'.}
+ \call{CALL sla\_DBJIN (STRING, NSTRT, DRESLT, J1, J2)}
+}
+\args{GIVEN}
+{
+ \spec{STRING}{C}{string containing field to be decoded} \\
+ \spec{NSTRT}{I}{pointer to first character of field in string}
+}
+\args{RETURNED}
+{
+ \spec{NSTRT}{I}{incremented past the decoded field} \\
+ \spec{DRESLT}{D}{result} \\
+ \spec{J1}{I}{DFLTIN status:} \\
+ \spec{}{}{\hspace{0.7em} $-$1 = $-$OK} \\
+ \spec{}{}{\hspace{1.5em} 0 = +OK} \\
+ \spec{}{}{\hspace{1.5em} 1 = null field} \\
+ \spec{}{}{\hspace{1.5em} 2 = error} \\
+ \spec{J2}{I}{syntax flag:} \\
+ \spec{}{}{\hspace{1.5em} 0 = normal DFLTIN syntax} \\
+ \spec{}{}{\hspace{1.5em} 1 = `B' or `b'} \\
+ \spec{}{}{\hspace{1.5em} 2 = `J' or `j'}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The purpose of the syntax extensions is to help cope with mixed
+ FK4 and FK5 data, allowing fields such as `B1950' or `J2000'
+ to be decoded.
+ \item In addition to the syntax accepted by sla\_DFLTIN,
+ the following two extensions are recognized by sla\_DBJIN:
+ \begin{enumerate}
+ \item A valid non-null field preceded by the character `B'
+ (or `b') is accepted.
+ \item A valid non-null field preceded by the character `J'
+ (or `j') is accepted.
+ \end{enumerate}
+ \item The calling program is told of the `B' or `J' through an
+ supplementary status argument. The rest of
+ the arguments are as for sla\_DFLTIN.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_DC62S}{Cartesian 6-Vector to Spherical}
+{
+ \action{Conversion of position \& velocity in Cartesian coordinates
+ to spherical coordinates (double precision).}
+ \call{CALL sla\_DC62S (V, A, B, R, AD, BD, RD)}
+}
+\args{GIVEN}
+{
+ \spec{V}{D(6)}{\xyzxyzd}
+}
+\args{RETURNED}
+{
+ \spec{A}{D}{longitude (radians)} \\
+ \spec{B}{D}{latitude (radians)} \\
+ \spec{R}{D}{radial coordinate} \\
+ \spec{AD}{D}{longitude derivative (radians per unit time)} \\
+ \spec{BD}{D}{latitude derivative (radians per unit time)} \\
+ \spec{RD}{D}{radial derivative}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_DCC2S}{Cartesian to Spherical}
+{
+ \action{Cartesian coordinates to spherical coordinates (double precision).}
+ \call{CALL sla\_DCC2S (V, A, B)}
+}
+\args{GIVEN}
+{
+ \spec{V}{D(3)}{\xyz\ vector}
+}
+\args{RETURNED}
+{
+ \spec{A,B}{D}{spherical coordinates in radians}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The spherical coordinates are longitude (+ve anticlockwise
+ looking from the +ve latitude pole) and latitude. The
+ Cartesian coordinates are right handed, with the {\it x}-axis
+ at zero longitude and latitude, and the {\it z}-axis at the
+ +ve latitude pole.
+ \item If V is null, zero A and B are returned.
+ \item At either pole, zero A is returned.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_DCMPF}{Interpret Linear Fit}
+{
+ \action{Decompose an \xy\ linear fit into its constituent parameters:
+ zero points, scales, nonperpendicularity and orientation.}
+ \call{CALL sla\_DCMPF (COEFFS,XZ,YZ,XS,YS,PERP,ORIENT)}
+}
+\args{GIVEN}
+{
+ \spec{COEFFS}{D(6)}{transformation coefficients (see note)}
+}
+\args{RETURNED}
+{
+ \spec{XZ}{D}{{\it x} zero point} \\
+ \spec{YZ}{D}{{\it y} zero point} \\
+ \spec{XS}{D}{{\it x} scale} \\
+ \spec{YS}{D}{{\it y} scale} \\
+ \spec{PERP}{D}{nonperpendicularity (radians)} \\
+ \spec{ORIENT}{D}{orientation (radians)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The model relates two sets of \xy\ coordinates as follows.
+ Naming the six elements of COEFFS $a,b,c,d,e$ \& $f$,
+ the model transforms coordinates $[x_{1},y_{1}\,]$ into coordinates
+ $[x_{2},y_{2}\,]$ as follows:
+ \begin{verse}
+ $x_{2} = a + bx_{1} + cy_{1}$ \\
+ $y_{2} = d + ex_{1} + fy_{1}$
+ \end{verse}
+ The sla\_DCMPF routine decomposes this transformation
+ into four steps:
+ \begin{enumerate}
+ \item Zero points:
+ \begin{verse}
+ $x' = x_{1} + {\rm XZ}$ \\
+ $y' = y_{1} + {\rm YZ}$
+ \end{verse}
+ \item Scales:
+ \begin{verse}
+ $x'' = x' {\rm XS}$ \\
+ $y'' = y' {\rm YS}$
+ \end{verse}
+ \item Nonperpendicularity:
+ \begin{verse}
+ $x''' = + x'' \cos {\rm PERP}/2 + y'' \sin {\rm PERP}/2$ \\
+ $y''' = + x'' \sin {\rm PERP}/2 + y'' \cos {\rm PERP}/2$
+ \end{verse}
+ \item Orientation:
+ \begin{verse}
+ $x_{2} = + x''' \cos {\rm ORIENT} +
+ y''' \sin {\rm ORIENT}$ \\
+ $y_{2} = - x''' \sin {\rm ORIENT} +
+ y''' \cos {\rm ORIENT}$
+ \end{verse}
+ \end{enumerate}
+ \item See also sla\_FITXY, sla\_PXY, sla\_INVF, sla\_XY2XY.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_DCS2C}{Spherical to Cartesian}
+{
+ \action{Spherical coordinates to Cartesian coordinates (double precision).}
+ \call{CALL sla\_DCS2C (A, B, V)}
+}
+\args{GIVEN}
+{
+ \spec{A,B}{D}{spherical coordinates in radians: \radec\ {\it etc.}}
+}
+\args{RETURNED}
+{
+ \spec{V}{D(3)}{\xyz\ unit vector}
+}
+\anote{The spherical coordinates are longitude (+ve anticlockwise
+ looking from the +ve latitude pole) and latitude. The
+ Cartesian coordinates are right handed, with the {\it x}-axis
+ at zero longitude and latitude, and the {\it z}-axis at the
+ +ve latitude pole.}
+%-----------------------------------------------------------------------
+\routine{SLA\_DD2TF}{Days to Hour,Min,Sec}
+{
+ \action{Convert an interval in days into hours, minutes, seconds
+ (double precision).}
+ \call{CALL sla\_DD2TF (NDP, DAYS, SIGN, IHMSF)}
+}
+\args{GIVEN}
+{
+ \spec{NDP}{I}{number of decimal places of seconds} \\
+ \spec{DAYS}{D}{interval in days}
+}
+\args{RETURNED}
+{
+ \spec{SIGN}{C}{`+' or `$-$'} \\
+ \spec{IHMSF}{I(4)}{hours, minutes, seconds, fraction}
+}
+\notes
+{
+ \begin{enumerate}
+ \item NDP less than zero is interpreted as zero.
+ \item The largest useful value for NDP is determined by the size
+ of DAYS, the format of DOUBLE PRECISION floating-point numbers
+ on the target machine, and the risk of overflowing IHMSF(4).
+ For example, on a VAX computer, for DAYS up to 1D0, the available
+ floating-point precision corresponds roughly to NDP=12. However,
+ the practical limit is NDP=9, set by the capacity of the 32-bit
+ integer IHMSF(4).
+ \item The absolute value of DAYS may exceed 1D0. In cases where it
+ does not, it is up to the caller to test for and handle the
+ case where DAYS is very nearly 1D0 and rounds up to 24~hours,
+ by testing for IHMSF(1)=24 and setting IHMSF(1-4) to zero.
+\end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_DE2H}{$h,\delta$ to Az,El}
+{
+ \action{Equatorial to horizon coordinates
+ (double precision).}
+ \call{CALL sla\_DE2H (HA, DEC, PHI, AZ, EL)}
+}
+\args{GIVEN}
+{
+ \spec{HA}{D}{hour angle (radians)} \\
+ \spec{DEC}{D}{declination (radians)} \\
+ \spec{PHI}{D}{latitude (radians)}
+}
+\args{RETURNED}
+{
+ \spec{AZ}{D}{azimuth (radians)} \\
+ \spec{EL}{D}{elevation (radians)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item Azimuth is returned in the range $0\!-\!2\pi$; north is zero,
+ and east is $+\pi/2$. Elevation is returned in the range
+ $\pm\pi$.
+ \item The latitude must be geodetic. In critical applications,
+ corrections for polar motion should be applied.
+ \item In some applications it will be important to specify the
+ correct type of hour angle and declination in order to
+ produce the required type of azimuth and elevation. In
+ particular, it may be important to distinguish between
+ elevation as affected by refraction, which would
+ require the {\it observed} \hadec, and the elevation
+ {\it in vacuo}, which would require the {\it topocentric}
+ \hadec.
+ If the effects of diurnal aberration can be neglected, the
+ {\it apparent} \hadec\ may be used instead of the topocentric
+ \hadec.
+ \item No range checking of arguments is carried out.
+ \item In applications which involve many such calculations, rather
+ than calling the present routine it will be more efficient to
+ use inline code, having previously computed fixed terms such
+ as sine and cosine of latitude, and (for tracking a star)
+ sine and cosine of declination.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_DEULER}{Euler Angles to Rotation Matrix}
+{
+ \action{Form a rotation matrix from the Euler angles -- three
+ successive rotations about specified Cartesian axes
+ (double precision).}
+ \call{CALL sla\_DEULER (ORDER, PHI, THETA, PSI, RMAT)}
+}
+\args{GIVEN}
+{
+ \spec{ORDER}{C}{specifies about which axes the rotations occur} \\
+ \spec{PHI}{D}{1st rotation (radians)} \\
+ \spec{THETA}{D}{2nd rotation (radians)} \\
+ \spec{PSI}{D}{3rd rotation (radians)}
+}
+\args{RETURNED}
+{
+ \spec{RMAT}{D(3,3)}{rotation matrix}
+}
+\notes
+{
+ \begin{enumerate}
+ \item A rotation is positive when the reference frame rotates
+ anticlockwise as seen looking towards the origin from the
+ positive region of the specified axis.
+ \item The characters of ORDER define which axes the three successive
+ rotations are about. A typical value is `ZXZ', indicating that
+ RMAT is to become the direction cosine matrix corresponding to
+ rotations of the reference frame through PHI radians about the
+ old {\it z}-axis, followed by THETA radians about the resulting
+ {\it x}-axis,
+ then PSI radians about the resulting {\it z}-axis.
+ \item The axis names can be any of the following, in any order or
+ combination: X, Y, Z, uppercase or lowercase, 1, 2, 3. Normal
+ axis labelling/numbering conventions apply; the {\it xyz} ($\equiv123$)
+ triad is right-handed. Thus, the `ZXZ' example given above
+ could be written `zxz' or `313' (or even `ZxZ' or `3xZ'). ORDER
+ is terminated by length or by the first unrecognized character.
+ Fewer than three rotations are acceptable, in which case the later
+ angle arguments are ignored. Zero rotations produces a unit RMAT.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_DFLTIN}{Decode a Double Precision Number}
+{
+ \action{Convert free-format input into double precision floating point.}
+ \call{CALL sla\_DFLTIN (STRING, NSTRT, DRESLT, JFLAG)}
+}
+\args{GIVEN}
+{
+ \spec{STRING}{C}{string containing number to be decoded} \\
+ \spec{NSTRT}{I}{pointer to where decoding is to commence} \\
+ \spec{DRESLT}{D}{current value of result}
+}
+\args{RETURNED}
+{
+ \spec{NSTRT}{I}{advanced to next number} \\
+ \spec{DRESLT}{D}{result} \\
+ \spec{JFLAG}{I}{status: $-$1~=~$-$OK, 0~=~+OK, 1~=~null result, 2~=~error}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The reason sla\_DFLTIN has separate `OK' status values
+ for + and $-$ is to enable minus zero to be detected.
+ This is of crucial importance
+ when decoding mixed-radix numbers. For example, an angle
+ expressed as degrees, arcminutes and arcseconds may have a
+ leading minus sign but a zero degrees field.
+ \item A TAB is interpreted as a space, and lowercase characters are
+ interpreted as uppercase. {\it n.b.}\ The test for TAB is
+ ASCII-specific.
+ \item The basic format is the sequence of fields $\pm n.n x \pm n$,
+ where $\pm$ is a sign
+ character `+' or `$-$', $n$ means a string of decimal digits,
+ `.' is a decimal point, and $x$, which indicates an exponent,
+ means `D' or `E'. Various combinations of these fields can be
+ omitted, and embedded blanks are permissible in certain places.
+ \item Spaces:
+ \begin{itemize}
+ \item Leading spaces are ignored.
+ \item Embedded spaces are allowed only after +, $-$, D or E,
+ and after the decimal point if the first sequence of
+ digits is absent.
+ \item Trailing spaces are ignored; the first signifies
+ end of decoding and subsequent ones are skipped.
+ \end{itemize}
+ \item Delimiters:
+ \begin{itemize}
+ \item Any character other than +,$-$,0-9,.,D,E or space may be
+ used to signal the end of the number and terminate decoding.
+ \item Comma is recognized by sla\_DFLTIN as a special case; it
+ is skipped, leaving the pointer on the next character. See
+ 13, below.
+ \item Decoding will in all cases terminate if end of string
+ is reached.
+ \end{itemize}
+ \item Both signs are optional. The default is +.
+ \item The mantissa $n.n$ defaults to unity.
+ \item The exponent $x\!\pm\!n$ defaults to `D0'.
+ \item The strings of decimal digits may be of any length.
+ \item The decimal point is optional for whole numbers.
+ \item A {\it null result}\/ occurs when the string of characters
+ being decoded does not begin with +,$-$,0-9,.,D or E, or
+ consists entirely of spaces. When this condition is
+ detected, JFLAG is set to 1 and DRESLT is left untouched.
+ \item NSTRT = 1 for the first character in the string.
+ \item On return from sla\_DFLTIN, NSTRT is set ready for the next
+ decode -- following trailing blanks and any comma. If a
+ delimiter other than comma is being used, NSTRT must be
+ incremented before the next call to sla\_DFLTIN, otherwise
+ all subsequent calls will return a null result.
+ \item Errors (JFLAG=2) occur when:
+ \begin{itemize}
+ \item a +, $-$, D or E is left unsatisfied; or
+ \item the decimal point is present without at least
+ one decimal digit before or after it; or
+ \item an exponent more than 100 has been presented.
+ \end{itemize}
+ \item When an error has been detected, NSTRT is left
+ pointing to the character following the last
+ one used before the error came to light. This
+ may be after the point at which a more sophisticated
+ program could have detected the error. For example,
+ sla\_DFLTIN does not detect that `1D999' is unacceptable
+ (on a computer where this is so) until the entire number
+ has been decoded.
+ \item Certain highly unlikely combinations of mantissa and
+ exponent can cause arithmetic faults during the
+ decode, in some cases despite the fact that they
+ together could be construed as a valid number.
+ \item Decoding is left to right, one pass.
+ \item See also sla\_FLOTIN and sla\_INTIN.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_DH2E}{Az,El to $h,\delta$}
+{
+ \action{Horizon to equatorial coordinates
+ (double precision).}
+ \call{CALL sla\_DH2E (AZ, EL, PHI, HA, DEC)}
+}
+\args{GIVEN}
+{
+ \spec{AZ}{D}{azimuth (radians)} \\
+ \spec{EL}{D}{elevation (radians)} \\
+ \spec{PHI}{D}{latitude (radians)}
+}
+\args{RETURNED}
+{
+ \spec{HA}{D}{hour angle (radians)} \\
+ \spec{DEC}{D}{declination (radians)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The sign convention for azimuth is north zero, east $+\pi/2$.
+ \item HA is returned in the range $\pm\pi$. Declination is returned
+ in the range $\pm\pi$.
+ \item The latitude is (in principle) geodetic. In critical
+ applications, corrections for polar motion should be applied
+ (see sla\_POLMO).
+ \item In some applications it will be important to specify the
+ correct type of elevation in order to produce the required
+ type of \hadec. In particular, it may be important to
+ distinguish between the elevation as affected by refraction,
+ which will yield the {\it observed} \hadec, and the elevation
+ {\it in vacuo}, which will yield the {\it topocentric}
+ \hadec. If the
+ effects of diurnal aberration can be neglected, the
+ topocentric \hadec\ may be used as an approximation to the
+ {\it apparent} \hadec.
+ \item No range checking of arguments is carried out.
+ \item In applications which involve many such calculations, rather
+ than calling the present routine it will be more efficient to
+ use inline code, having previously computed fixed terms such
+ as sine and cosine of latitude.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_DIMXV}{Apply 3D Reverse Rotation}
+{
+ \action{Multiply a 3-vector by the inverse of a rotation
+ matrix (double precision).}
+ \call{CALL sla\_DIMXV (DM, VA, VB)}
+}
+\args{GIVEN}
+{
+ \spec{DM}{D(3,3)}{rotation matrix} \\
+ \spec{VA}{D(3)}{vector to be rotated}
+}
+\args{RETURNED}
+{
+ \spec{VB}{D(3)}{result vector}
+}
+\notes
+{
+ \begin{enumerate}
+ \item This routine performs the operation:
+ \begin{verse}
+ {\bf b} = {\bf M}$^{T}\cdot${\bf a}
+ \end{verse}
+ where {\bf a} and {\bf b} are the 3-vectors VA and VB
+ respectively, and {\bf M} is the $3\times3$ matrix DM.
+ \item The main function of this routine is apply an inverse
+ rotation; under these circumstances, ${\bf \rm M}$ is
+ {\it orthogonal}, with its inverse the same as its transpose.
+ \item To comply with the ANSI Fortran 77 standard, VA and VB must
+ {\bf not} be the same array. The routine is, in fact, coded
+ so as to work properly on the VAX and many other systems even
+ if this rule is violated, something that is {\bf not}, however,
+ recommended.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_DJCAL}{MJD to Gregorian for Output}
+{
+ \action{Modified Julian Date to Gregorian Calendar Date, expressed
+ in a form convenient for formatting messages (namely
+ rounded to a specified precision, and with the fields
+ stored in a single array).}
+ \call{CALL sla\_DJCAL (NDP, DJM, IYMDF, J)}
+}
+\args{GIVEN}
+{
+ \spec{NDP}{I}{number of decimal places of days in fraction} \\
+ \spec{DJM}{D}{modified Julian Date (JD$-$2400000.5)}
+}
+\args{RETURNED}
+{
+ \spec{IYMDF}{I(4)}{year, month, day, fraction in Gregorian calendar} \\
+ \spec{J}{I}{status: nonzero = out of range}
+}
+\notes
+{
+ \begin{enumerate}
+ \item Any date after 4701BC March 1 is accepted.
+ \item NDP should be 4 or less to avoid overflow on machines which
+ use 32-bit integers.
+ \end{enumerate}
+}
+\aref{The algorithm is derived from that of Hatcher,
+ {\it Q.\,Jl.\,R.\,astr.\,Soc.}\ (1984) {\bf 25}, 53-55.}
+%-----------------------------------------------------------------------
+\routine{SLA\_DJCL}{MJD to Year,Month,Day,Frac}
+{
+ \action{Modified Julian Date to Gregorian year, month, day,
+ and fraction of a day.}
+ \call{CALL sla\_DJCL (DJM, IY, IM, ID, FD, J)}
+}
+\args{GIVEN}
+{
+ \spec{DJM}{D}{modified Julian Date (JD$-$2400000.5)}
+}
+\args{RETURNED}
+{
+ \spec{IY}{I}{year} \\
+ \spec{IM}{I}{month} \\
+ \spec{ID}{I}{day} \\
+ \spec{FD}{D}{fraction of day} \\
+ \spec{J}{I}{status:} \\
+ \spec{}{}{\hspace{1.5em} 0 = OK} \\
+ \spec{}{}{\hspace{0.7em} $-$1 = unacceptable date (before 4701BC March 1)}
+}
+\aref{The algorithm is derived from that of Hatcher,
+ {\it Q.\,Jl.\,R.\,astr.\,Soc.}\ (1984) {\bf 25}, 53-55.}
+%-----------------------------------------------------------------------
+\routine{SLA\_DM2AV}{Rotation Matrix to Axial Vector}
+{
+ \action{From a rotation matrix, determine the corresponding axial vector
+ (double precision).}
+ \call{CALL sla\_DM2AV (RMAT, AXVEC)}
+}
+\args{GIVEN}
+{
+ \spec{RMAT}{D(3,3)}{rotation matrix}
+}
+\args{RETURNED}
+{
+ \spec{AXVEC}{D(3)}{axial vector (radians)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item A rotation matrix describes a rotation about some arbitrary axis.
+ The axis is called the {\it Euler axis}, and the angle through
+ which the reference frame rotates is called the {\it Euler angle}.
+ The {\it axial vector}\/ returned by this routine has the same
+ direction as the Euler axis, and its magnitude is the Euler angle
+ in radians.
+ \item The magnitude and direction of the axial vector can be separated
+ by means of the routine sla\_DVN.
+ \item The reference frame rotates clockwise as seen looking along
+ the axial vector from the origin.
+ \item If RMAT is null, so is the result.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_DMAT}{Solve Simultaneous Equations}
+{
+ \action{Matrix inversion and solution of simultaneous equations
+ (double precision).}
+ \call{CALL sla\_DMAT (N, A, Y, D, JF, IW)}
+}
+\args{GIVEN}
+{
+ \spec{N}{I}{number of unknowns} \\
+ \spec{A}{D(N,N)}{matrix} \\
+ \spec{Y}{D(N)}{vector}
+}
+\args{RETURNED}
+{
+ \spec{A}{D(N,N)}{matrix inverse} \\
+ \spec{Y}{D(N)}{solution} \\
+ \spec{D}{D}{determinant} \\
+ \spec{JF}{I}{singularity flag: 0=OK} \\
+ \spec{IW}{I(N)}{workspace}
+}
+\notes
+{
+ \begin{enumerate}
+ \item For the set of $n$ simultaneous linear equations in $n$ unknowns:
+ \begin{verse}
+ {\bf A}$\cdot${\bf y} = {\bf x}
+ \end{verse}
+ where:
+ \begin{itemize}
+ \item {\bf A} is a non-singular $n \times n$ matrix,
+ \item {\bf y} is the vector of $n$ unknowns, and
+ \item {\bf x} is the known vector,
+ \end{itemize}
+ sla\_DMAT computes:
+ \begin{itemize}
+ \item the inverse of matrix {\bf A},
+ \item the determinant of matrix {\bf A}, and
+ \item the vector of $n$ unknowns {\bf y}.
+ \end{itemize}
+ Argument N is the order $n$, A (given) is the matrix {\bf A},
+ Y (given) is the vector {\bf x} and Y (returned)
+ is the vector {\bf y}.
+ The argument A (returned) is the inverse matrix {\bf A}$^{-1}$,
+ and D is {\it det}\/({\bf A}).
+ \item JF is the singularity flag. If the matrix is non-singular,
+ JF=0 is returned. If the matrix is singular, JF=$-$1
+ and D=0D0 are returned. In the latter case, the contents
+ of array A on return are undefined.
+ \item The algorithm is Gaussian elimination with partial pivoting.
+ This method is very fast; some much slower algorithms can give
+ better accuracy, but only by a small factor.
+ \item This routine replaces the obsolete sla\_DMATRX.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_DMOON}{Approx Moon Pos/Vel}
+{
+ \action{Approximate geocentric position and velocity of the Moon
+ (double precision).}
+ \call{CALL sla\_DMOON (DATE, PV)}
+}
+\args{GIVEN}
+{
+ \spec{DATE}{D}{TDB (loosely ET) as a Modified Julian Date (JD$-$2400000.5)
+}
+}
+\args{RETURNED}
+{
+ \spec{PV}{D(6)}{Moon \xyzxyzd, mean equator and equinox
+ of date (AU, AU~s$^{-1}$)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item This routine is a full implementation of the algorithm
+ published by Meeus (see reference).
+ \item Meeus quotes accuracies of \arcseci{10} in longitude,
+ \arcseci{3} in latitude and \arcsec{0}{2} arcsec in HP
+ (equivalent to about 20~km in distance). Comparison with
+ JPL~DE200 over the interval 1960-2025 gives RMS errors of
+ \arcsec{3}{7} and 83~mas/hour in longitude,
+ \arcsec{2}{3} arcsec and 48~mas/hour in latitude,
+ 11~km and 81~mm/s in distance.
+ The maximum errors over the same interval are
+ \arcseci{18} and \arcsec{0}{50}/hour in longitude,
+ \arcseci{11} and \arcsec{0}{24}/hour in latitude,
+ 40~km and 0.29~m/s in distance.
+ \item The original algorithm is expressed in terms of the obsolete
+ timescale {\it Ephemeris Time}. Either TDB or TT can be used,
+ but not UT without incurring significant errors (\arcseci{30} at
+ the present time) due to the Moon's \arcsec{0}{5}/s movement.
+ \item The algorithm is based on pre IAU 1976 standards. However,
+ the result has been moved onto the new (FK5) equinox, an
+ adjustment which is in any case much smaller than the
+ intrinsic accuracy of the procedure.
+ \item Velocity is obtained by a complete analytical differentiation
+ of the Meeus model.
+ \end{enumerate}
+}
+\aref{Meeus, {\it l'Astronomie}, June 1984, p348.}
+%-----------------------------------------------------------------------
+\routine{SLA\_DMXM}{Multiply $3\times3$ Matrices}
+{
+ \action{Product of two $3\times3$ matrices (double precision).}
+ \call{CALL sla\_DMXM (A, B, C)}
+}
+\args{GIVEN}
+{
+ \spec{A}{D(3,3)}{matrix {\bf A}} \\
+ \spec{B}{D(3,3)}{matrix {\bf B}}
+}
+\args{RETURNED}
+{
+ \spec{C}{D(3,3)}{matrix result: {\bf A}$\times${\bf B}}
+}
+\anote{To comply with the ANSI Fortran 77 standard, A, B and C must
+ be different arrays. The routine is, in fact, coded
+ so as to work properly on the VAX and many other systems even
+ if this rule is violated, something that is {\bf not}, however,
+ recommended.}
+%-----------------------------------------------------------------------
+\routine{SLA\_DMXV}{Apply 3D Rotation}
+{
+ \action{Multiply a 3-vector by a rotation matrix (double precision).}
+ \call{CALL sla\_DMXV (DM, VA, VB)}
+}
+\args{GIVEN}
+{
+ \spec{DM}{D(3,3)}{rotation matrix} \\
+ \spec{VA}{D(3)}{vector to be rotated}
+}
+\args{RETURNED}
+{
+ \spec{VB}{D(3)}{result vector}
+}
+\notes
+{
+ \begin{enumerate}
+ \item This routine performs the operation:
+ \begin{verse}
+ {\bf b} = {\bf M}$\cdot${\bf a}
+ \end{verse}
+ where {\bf a} and {\bf b} are the 3-vectors VA and VB
+ respectively, and {\bf M} is the $3\times3$ matrix DM.
+ \item The main function of this routine is apply a
+ rotation; under these circumstances, {\bf M} is a
+ {\it proper real orthogonal}\/ matrix.
+ \item To comply with the ANSI Fortran 77 standard, VA and VB must
+ {\bf not} be the same array. The routine is, in fact, coded
+ so as to work properly on the VAX and many other systems even
+ if this rule is violated, something that is {\bf not}, however,
+ recommended.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_DPAV}{Position-Angle Between Two Directions}
+{
+ \action{Returns the bearing (position angle) of one celestial
+ direction with respect to another (double precision).}
+ \call{D~=~sla\_DPAV (V1, V2)}
+}
+\args{GIVEN}
+{
+ \spec{V1}{D(3)}{direction cosines of one point} \\
+ \spec{V2}{D(3)}{directions cosines of the other point}
+}
+\args{RETURNED}
+{
+ \spec{sla\_DPAV}{D}{position-angle of 2nd point with respect to 1st}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The coordinate frames correspond to \radec,
+ $[\lambda,\phi]$ {\it etc.}.
+ \item The result is the bearing (position angle), in radians,
+ of point V2 as seen
+ from point V1. It is in the range $\pm \pi$. The sense
+ is such that if V2
+ is a small distance due east of V1 the result
+ is about $+\pi/2$. Zero is returned
+ if the two points are coincident.
+ \item The routine sla\_DBEAR performs an equivalent function except
+ that the points are specified in the form of spherical coordinates.
+ \end{enumerate}
+}
+%------------------------------------------------------------------------------
+\routine{SLA\_DR2AF}{Radians to Deg,Min,Sec,Frac}
+{
+ \action{Convert an angle in radians to degrees, arcminutes, arcseconds,
+ fraction (double precision).}
+ \call{CALL sla\_DR2AF (NDP, ANGLE, SIGN, IDMSF)}
+}
+\args{GIVEN}
+{
+ \spec{NDP}{I}{number of decimal places of arcseconds} \\
+ \spec{ANGLE}{D}{angle in radians}
+}
+\args{RETURNED}
+{
+ \spec{SIGN}{C}{`+' or `$-$'} \\
+ \spec{IDMSF}{I(4)}{degrees, arcminutes, arcseconds, fraction}
+}
+\notes
+{
+ \begin{enumerate}
+ \item NDP less than zero is interpreted as zero.
+ \item The largest useful value for NDP is determined by the size
+ of ANGLE, the format of DOUBLE~PRECISION floating-point numbers
+ on the target machine, and the risk of overflowing IDMSF(4).
+ For example, on a VAX computer, for ANGLE up to $2\pi$, the available
+ floating-point precision corresponds roughly to NDP=12. However,
+ the practical limit is NDP=9, set by the capacity of the 32-bit
+ integer IDMSF(4).
+ \item The absolute value of ANGLE may exceed $2\pi$. In cases where it
+ does not, it is up to the caller to test for and handle the
+ case where ANGLE is very nearly $2\pi$ and rounds up to $360^{\circ}$,
+ by testing for IDMSF(1)=360 and setting IDMSF(1-4) to zero.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_DR2TF}{Radians to Hour,Min,Sec,Frac}
+{
+ \action{Convert an angle in radians to hours, minutes, seconds,
+ fraction (double precision).}
+ \call{CALL sla\_DR2TF (NDP, ANGLE, SIGN, IHMSF)}
+}
+\args{GIVEN}
+{
+ \spec{NDP}{I}{number of decimal places of seconds} \\
+ \spec{ANGLE}{D}{angle in radians}
+}
+\args{RETURNED}
+{
+ \spec{SIGN}{C}{`+' or `$-$'} \\
+ \spec{IHMSF}{I(4)}{hours, minutes, seconds, fraction}
+}
+\notes
+{
+ \begin{enumerate}
+ \item NDP less than zero is interpreted as zero.
+ \item The largest useful value for NDP is determined by the size
+ of ANGLE, the format of DOUBLE PRECISION floating-point numbers
+ on the target machine, and the risk of overflowing IHMSF(4).
+ For example, on a VAX computer, for ANGLE up to $2\pi$, the available
+ floating-point precision corresponds roughly to NDP=12. However,
+ the practical limit is NDP=9, set by the capacity of the 32-bit
+ integer IHMSF(4).
+ \item The absolute value of ANGLE may exceed $2\pi$. In cases where it
+ does not, it is up to the caller to test for and handle the
+ case where ANGLE is very nearly $2\pi$ and rounds up to 24~hours,
+ by testing for IHMSF(1)=24 and setting IHMSF(1-4) to zero.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_DRANGE}{Put Angle into Range $\pm\pi$}
+{
+ \action{Normalize an angle into the range $\pm\pi$ (double precision).}
+ \call{D~=~sla\_DRANGE (ANGLE)}
+}
+\args{GIVEN}
+{
+ \spec{ANGLE}{D}{angle in radians}
+}
+\args{RETURNED}
+{
+ \spec{sla\_DRANGE}{D}{ANGLE expressed in the range $\pm\pi$.}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_DRANRM}{Put Angle into Range $0\!-\!2\pi$}
+{
+ \action{Normalize an angle into the range $0\!-\!2\pi$
+ (double precision).}
+ \call{D~=~sla\_DRANRM (ANGLE)}
+}
+\args{GIVEN}
+{
+ \spec{ANGLE}{D}{angle in radians}
+}
+\args{RETURNED}
+{
+ \spec{sla\_DRANRM}{D}{ANGLE expressed in the range $0\!-\!2\pi$}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_DS2C6}{Spherical Pos/Vel to Cartesian}
+{
+ \action{Conversion of position \& velocity in spherical coordinates
+ to Cartesian coordinates (double precision).}
+ \call{CALL sla\_DS2C6 (A, B, R, AD, BD, RD, V)}
+}
+\args{GIVEN}
+{
+ \spec{A}{D}{longitude (radians) -- for example $\alpha$} \\
+ \spec{B}{D}{latitude (radians) -- for example $\delta$} \\
+ \spec{R}{D}{radial coordinate} \\
+ \spec{AD}{D}{longitude derivative (radians per unit time)} \\
+ \spec{BD}{D}{latitude derivative (radians per unit time)} \\
+ \spec{RD}{D}{radial derivative}
+}
+\args{RETURNED}
+{
+ \spec{V}{D(6)}{\xyzxyzd}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_DS2TP}{Spherical to Tangent Plane}
+{
+ \action{Projection of spherical coordinates onto the tangent plane
+ (double precision).}
+ \call{CALL sla\_DS2TP (RA, DEC, RAZ, DECZ, XI, ETA, J)}
+}
+\args{GIVEN}
+{
+ \spec{RA,DEC}{D}{spherical coordinates of star (radians)} \\
+ \spec{RAZ,DECZ}{D}{spherical coordinates of tangent point (radians)}
+}
+\args{RETURNED}
+{
+ \spec{XI,ETA}{D}{tangent plane coordinates (radians)} \\
+ \spec{J}{I}{status:} \\
+ \spec{}{}{\hspace{1.5em} 0 = OK, star on tangent plane} \\
+ \spec{}{}{\hspace{1.5em} 1 = error, star too far from axis} \\
+ \spec{}{}{\hspace{1.5em} 2 = error, antistar on tangent plane} \\
+ \spec{}{}{\hspace{1.5em} 3 = error, antistar too far from axis}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The projection is called the {\it gnomonic}\/ projection; the
+ Cartesian coordinates \xieta\ are called
+ {\it standard coordinates.}\/ The latter
+ are in units of the distance from the tangent plane to the projection
+ point, {\it i.e.}\ radians near the origin.
+ \item When working in \xyz\ rather than spherical coordinates, the
+ equivalent Cartesian routine sla\_DV2TP is available.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_DSEP}{Angle Between 2 Points on Sphere}
+{
+ \action{Angle between two points on a sphere (double precision).}
+ \call{D~=~sla\_DSEP (A1, B1, A2, B2)}
+}
+\args{GIVEN}
+{
+ \spec{A1,B1}{D}{spherical coordinates of one point (radians)} \\
+ \spec{A2,B2}{D}{spherical coordinates of the other point (radians)}
+}
+\args{RETURNED}
+{
+ \spec{sla\_DSEP}{D}{angle between [A1,B1] and [A2,B2] in radians}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The spherical coordinates are right ascension and declination,
+ longitude and latitude, {\it etc.}, in radians.
+ \item The result is always positive.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_DT}{Approximate ET minus UT}
+{
+ \action{Estimate $\Delta$T, the offset between dynamical time
+ and Universal Time, for a given historical epoch.}
+ \call{D~=~sla\_DT (EPOCH)}
+}
+\args{GIVEN}
+{
+ \spec{EPOCH}{D}{(Julian) epoch ({\it e.g.}\ 1850D0)}
+}
+\args{RETURNED}
+{
+ \spec{sla\_DT}{D}{approximate ET$-$UT (after 1984, TT$-$UT1) in seconds}
+}
+\notes
+{
+ \begin{enumerate}
+ \item Depending on the epoch, one of three parabolic approximations
+ is used:
+\begin{tabbing}
+xx \= xxxxxxxxxxxxxxxxxx \= \kill
+\> before AD 979 \> Stephenson \& Morrison's 390 BC to AD 948 model \\
+\> AD 979 to AD 1708 \> Stephenson \& Morrison's AD 948 to AD 1600 model \\
+\> after AD 1708 \> McCarthy \& Babcock's post-1650 model
+\end{tabbing}
+ The breakpoints are chosen to ensure continuity: they occur
+ at places where the adjacent models give the same answer as
+ each other.
+ \item The accuracy is modest, with errors of up to $20^{\rm s}$ during
+ the interval since 1650, rising to perhaps $30^{\rm m}$
+ by 1000~BC. Comparatively accurate values from AD~1600
+ are tabulated in
+ the {\it Astronomical Almanac}\/ (see section K8 of the 1995
+ edition).
+ \item The use of {\tt DOUBLE PRECISION} for both argument and result is
+ simply for compatibility with other SLALIB time routines.
+ \item The models used are based on a lunar tidal acceleration value
+ of \arcsec{-26}{00} per century.
+ \end{enumerate}
+}
+\aref{Seidelmann, P.K.\ (ed), 1992. {\it Explanatory
+ Supplement to the Astronomical Almanac,}\/ ISBN~0-935702-68-7.
+ This contains references to the papers by Stephenson \& Morrison
+ and by McCarthy \& Babcock which describe the models used here.}
+%-----------------------------------------------------------------------
+\routine{SLA\_DTF2D}{Hour,Min,Sec to Days}
+{
+ \action{Convert hours, minutes, seconds to days (double precision).}
+ \call{CALL sla\_DTF2D (IHOUR, IMIN, SEC, DAYS, J)}
+}
+\args{GIVEN}
+{
+ \spec{IHOUR}{I}{hours} \\
+ \spec{IMIN}{I}{minutes} \\
+ \spec{SEC}{D}{seconds}
+}
+\args{RETURNED}
+{
+ \spec{DAYS}{D}{interval in days} \\
+ \spec{J}{I}{status:} \\
+ \spec{}{}{\hspace{1.5em} 0 = OK} \\
+ \spec{}{}{\hspace{1.5em} 1 = IHOUR outside range 0-23} \\
+ \spec{}{}{\hspace{1.5em} 2 = IMIN outside range 0-59} \\
+ \spec{}{}{\hspace{1.5em} 3 = SEC outside range 0-59.999$\cdots$}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The result is computed even if any of the range checks fail.
+ \item The sign must be dealt with outside this routine.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_DTF2R}{Hour,Min,Sec to Radians}
+{
+ \action{Convert hours, minutes, seconds to radians (double precision).}
+ \call{CALL sla\_DTF2R (IHOUR, IMIN, SEC, RAD, J)}
+}
+\args{GIVEN}
+{
+ \spec{IHOUR}{I}{hours} \\
+ \spec{IMIN}{I}{minutes} \\
+ \spec{SEC}{D}{seconds}
+}
+\args{RETURNED}
+{
+ \spec{RAD}{D}{angle in radians} \\
+ \spec{J}{I}{status:} \\
+ \spec{}{}{\hspace{1.5em} 0 = OK} \\
+ \spec{}{}{\hspace{1.5em} 1 = IHOUR outside range 0-23} \\
+ \spec{}{}{\hspace{1.5em} 2 = IMIN outside range 0-59} \\
+ \spec{}{}{\hspace{1.5em} 3 = SEC outside range 0-59.999$\cdots$}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The result is computed even if any of the range checks fail.
+ \item The sign must be dealt with outside this routine.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_DTP2S}{Tangent Plane to Spherical}
+{
+ \action{Transform tangent plane coordinates into spherical
+ coordinates (double precision)}
+ \call{CALL sla\_DTP2S (XI, ETA, RAZ, DECZ, RA, DEC)}
+}
+\args{GIVEN}
+{
+ \spec{XI,ETA}{D}{tangent plane rectangular coordinates (radians)} \\
+ \spec{RAZ,DECZ}{D}{spherical coordinates of tangent point (radians)}
+}
+\args{RETURNED}
+{
+ \spec{RA,DEC}{D}{spherical coordinates (radians)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The projection is called the {\it gnomonic}\/ projection; the
+ Cartesian coordinates \xieta\ are called
+ {\it standard coordinates.}\/ The latter
+ are in units of the distance from the tangent plane to the projection
+ point, {\it i.e.}\ radians near the origin.
+ \item When working in \xyz\ rather than spherical coordinates, the
+ equivalent Cartesian routine sla\_DTP2V is available.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_DTP2V}{Tangent Plane to Direction Cosines}
+{
+ \action{Given the tangent-plane coordinates of a star and the direction
+ cosines of the tangent point, determine the direction cosines
+ of the star
+ (double precision).}
+ \call{CALL sla\_DTP2V (XI, ETA, V0, V)}
+}
+\args{GIVEN}
+{
+ \spec{XI,ETA}{D}{tangent plane coordinates of star (radians)} \\
+ \spec{V0}{D(3)}{direction cosines of tangent point}
+}
+\args{RETURNED}
+{
+ \spec{V}{D(3)}{direction cosines of star}
+}
+\notes
+{
+ \begin{enumerate}
+ \item If vector V0 is not of unit length, the returned vector V will
+ be wrong.
+ \item If vector V0 points at a pole, the returned vector V will be
+ based on the arbitrary assumption that $\alpha=0$ at
+ the tangent point.
+ \item The projection is called the {\it gnomonic}\/ projection; the
+ Cartesian coordinates \xieta\ are called
+ {\it standard coordinates.}\/ The latter
+ are in units of the distance from the tangent plane to the projection
+ point, {\it i.e.}\ radians near the origin.
+ \item This routine is the Cartesian equivalent of the routine sla\_DTP2S.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_DTPS2C}{Plate centre from $\xi,\eta$ and $\alpha,\delta$}
+{
+ \action{From the tangent plane coordinates of a star of known \radec,
+ determine the \radec\ of the tangent point (double precision)}
+ \call{CALL sla\_DTPS2C (XI, ETA, RA, DEC, RAZ1, DECZ1, RAZ2, DECZ2, N)}
+}
+\args{GIVEN}
+{
+ \spec{XI,ETA}{D}{tangent plane rectangular coordinates (radians)} \\
+ \spec{RA,DEC}{D}{spherical coordinates (radians)}
+}
+\args{RETURNED}
+{
+ \spec{RAZ1,DECZ1}{D}{spherical coordinates of tangent point,
+ solution 1} \\
+ \spec{RAZ2,DECZ2}{D}{spherical coordinates of tangent point,
+ solution 2} \\
+ \spec{N}{I}{number of solutions:} \\
+ \spec{}{}{\hspace{1em} 0 = no solutions returned (note 2)} \\
+ \spec{}{}{\hspace{1em} 1 = only the first solution is useful (note 3)} \\
+ \spec{}{}{\hspace{1em} 2 = there are two useful solutions (note 3)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The RAZ1 and RAZ2 values returned are in the range $0\!-\!2\pi$.
+ \item Cases where there is no solution can only arise near the poles.
+ For example, it is clearly impossible for a star at the pole
+ itself to have a non-zero $\xi$ value, and hence it is
+ meaningless to ask where the tangent point would have to be
+ to bring about this combination of $\xi$ and $\delta$.
+ \item Also near the poles, cases can arise where there are two useful
+ solutions. The argument N indicates whether the second of the
+ two solutions returned is useful. N\,=\,1
+ indicates only one useful solution, the usual case; under
+ these circumstances, the second solution corresponds to the
+ ``over-the-pole'' case, and this is reflected in the values
+ of RAZ2 and DECZ2 which are returned.
+ \item The DECZ1 and DECZ2 values returned are in the range $\pm\pi$,
+ but in the ordinary, non-pole-crossing, case, the range is
+ $\pm\pi/2$.
+ \item RA, DEC, RAZ1, DECZ1, RAZ2, DECZ2 are all in radians.
+ \item The projection is called the {\it gnomonic}\/ projection; the
+ Cartesian coordinates \xieta\ are called
+ {\it standard coordinates.}\/ The latter
+ are in units of the distance from the tangent plane to the projection
+ point, {\it i.e.}\ radians near the origin.
+ \item When working in \xyz\ rather than spherical coordinates, the
+ equivalent Cartesian routine sla\_DTPV2C is available.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_DTPV2C}{Plate centre from $\xi,\eta$ and $x,y,z$}
+{
+ \action{From the tangent plane coordinates of a star of known
+ direction cosines, determine the direction cosines
+ of the tangent point (double precision)}
+ \call{CALL sla\_DTPV2C (XI, ETA, V, V01, V02, N)}
+}
+\args{GIVEN}
+{
+ \spec{XI,ETA}{D}{tangent plane coordinates of star (radians)} \\
+ \spec{V}{D(3)}{direction cosines of star}
+}
+\args{RETURNED}
+{
+ \spec{V01}{D(3)}{direction cosines of tangent point, solution 1} \\
+ \spec{V01}{D(3)}{direction cosines of tangent point, solution 2} \\
+ \spec{N}{I}{number of solutions:} \\
+ \spec{}{}{\hspace{1em} 0 = no solutions returned (note 2)} \\
+ \spec{}{}{\hspace{1em} 1 = only the first solution is useful (note 3)} \\
+ \spec{}{}{\hspace{1em} 2 = there are two useful solutions (note 3)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The vector V must be of unit length or the result will be wrong.
+ \item Cases where there is no solution can only arise near the poles.
+ For example, it is clearly impossible for a star at the pole
+ itself to have a non-zero XI value.
+ \item Also near the poles, cases can arise where there are two useful
+ solutions. The argument N indicates whether the second of the
+ two solutions returned is useful.
+ N\,=\,1
+ indicates only one useful solution, the usual case; under these
+ circumstances, the second solution can be regarded as valid if
+ the vector V02 is interpreted as the ``over-the-pole'' case.
+ \item The projection is called the {\it gnomonic}\/ projection; the
+ Cartesian coordinates \xieta\ are called
+ {\it standard coordinates.}\/ The latter
+ are in units of the distance from the tangent plane to the projection
+ point, {\it i.e.}\ radians near the origin.
+ \item This routine is the Cartesian equivalent of the routine sla\_DTPS2C.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_DTT}{TT minus UTC}
+{
+ \action{Compute $\Delta$TT, the increment to be applied to
+ Coordinated Universal Time UTC to give
+ Terrestrial Time TT.}
+ \call{D~=~sla\_DTT (DJU)}
+}
+\args{GIVEN}
+{
+ \spec{DJU}{D}{UTC date as a modified JD (JD$-$2400000.5)}
+}
+\args{RETURNED}
+{
+ \spec{sla\_DTT}{D}{TT$-$UTC in seconds}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The UTC is specified to be a date rather than a time to indicate
+ that care needs to be taken not to specify an instant which lies
+ within a leap second. Though in most cases UTC can include the
+ fractional part, correct behaviour on the day of a leap second
+ can be guaranteed only up to the end of the second
+ $23^{\rm h}\,59^{\rm m}\,59^{\rm s}$.
+ \item Pre 1972 January 1 a fixed value of 10 + ET$-$TAI is returned.
+ \item TT is one interpretation of the defunct timescale
+ {\it Ephemeris Time}, ET.
+ \item See also the routine sla\_DT, which roughly estimates ET$-$UT for
+ historical epochs.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_DV2TP}{Direction Cosines to Tangent Plane}
+{
+ \action{Given the direction cosines of a star and of the tangent point,
+ determine the star's tangent-plane coordinates
+ (double precision).}
+ \call{CALL sla\_DV2TP (V, V0, XI, ETA, J)}
+}
+\args{GIVEN}
+{
+ \spec{V}{D(3)}{direction cosines of star} \\
+ \spec{V0}{D(3)}{direction cosines of tangent point}
+}
+\args{RETURNED}
+{
+ \spec{XI,ETA}{D}{tangent plane coordinates (radians)} \\
+ \spec{J}{I}{status:} \\
+ \spec{}{}{\hspace{1.5em} 0 = OK, star on tangent plane} \\
+ \spec{}{}{\hspace{1.5em} 1 = error, star too far from axis} \\
+ \spec{}{}{\hspace{1.5em} 2 = error, antistar on tangent plane} \\
+ \spec{}{}{\hspace{1.5em} 3 = error, antistar too far from axis}
+}
+\notes
+{
+ \begin{enumerate}
+ \item If vector V0 is not of unit length, or if vector V is of zero
+ length, the results will be wrong.
+ \item If V0 points at a pole, the returned $\xi,\eta$
+ will be based on the
+ arbitrary assumption that $\alpha=0$ at the tangent point.
+ \item The projection is called the {\it gnomonic}\/ projection; the
+ Cartesian coordinates \xieta\ are called
+ {\it standard coordinates.}\/ The latter
+ are in units of the distance from the tangent plane to the projection
+ point, {\it i.e.}\ radians near the origin.
+ \item This routine is the Cartesian equivalent of the routine sla\_DS2TP.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_DVDV}{Scalar Product}
+{
+ \action{Scalar product of two 3-vectors (double precision).}
+ \call{D~=~sla\_DVDV (VA, VB)}
+}
+\args{GIVEN}
+{
+ \spec{VA}{D(3)}{first vector} \\
+ \spec{VB}{D(3)}{second vector}
+}
+\args{RETURNED}
+{
+ \spec{sla\_DVDV}{D}{scalar product VA.VB}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_DVN}{Normalize Vector}
+{
+ \action{Normalize a 3-vector, also giving the modulus (double precision).}
+ \call{CALL sla\_DVN (V, UV, VM)}
+}
+\args{GIVEN}
+{
+ \spec{V}{D(3)}{vector}
+}
+\args{RETURNED}
+{
+ \spec{UV}{D(3)}{unit vector in direction of V} \\
+ \spec{VM}{D}{modulus of V}
+}
+\anote{If the modulus of V is zero, UV is set to zero as well.}
+%-----------------------------------------------------------------------
+\routine{SLA\_DVXV}{Vector Product}
+{
+ \action{Vector product of two 3-vectors (double precision).}
+ \call{CALL sla\_DVXV (VA, VB, VC)}
+}
+\args{GIVEN}
+{
+ \spec{VA}{D(3)}{first vector} \\
+ \spec{VB}{D(3)}{second vector}
+}
+\args{RETURNED}
+{
+ \spec{VC}{D(3)}{vector product VA$\times$VB}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_E2H}{$h,\delta$ to Az,El}
+{
+ \action{Equatorial to horizon coordinates
+ (single precision).}
+ \call{CALL sla\_DE2H (HA, DEC, PHI, AZ, EL)}
+}
+\args{GIVEN}
+{
+ \spec{HA}{R}{hour angle (radians)} \\
+ \spec{DEC}{R}{declination (radians)} \\
+ \spec{PHI}{R}{latitude (radians)}
+}
+\args{RETURNED}
+{
+ \spec{AZ}{R}{azimuth (radians)} \\
+ \spec{EL}{R}{elevation (radians)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item Azimuth is returned in the range $0\!-\!2\pi$; north is zero,
+ and east is $+\pi/2$. Elevation is returned in the range
+ $\pm\pi$.
+ \item The latitude must be geodetic. In critical applications,
+ corrections for polar motion should be applied.
+ \item In some applications it will be important to specify the
+ correct type of hour angle and declination in order to
+ produce the required type of azimuth and elevation. In
+ particular, it may be important to distinguish between
+ elevation as affected by refraction, which would
+ require the {\it observed} \hadec, and the elevation
+ {\it in vacuo}, which would require the {\it topocentric}
+ \hadec.
+ If the effects of diurnal aberration can be neglected, the
+ {\it apparent} \hadec\ may be used instead of the topocentric
+ \hadec.
+ \item No range checking of arguments is carried out.
+ \item In applications which involve many such calculations, rather
+ than calling the present routine it will be more efficient to
+ use inline code, having previously computed fixed terms such
+ as sine and cosine of latitude, and (for tracking a star)
+ sine and cosine of declination.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_EARTH}{Approx Earth Pos/Vel}
+{
+ \action{Approximate heliocentric position and velocity of the Earth
+ (single precision).}
+ \call{CALL sla\_EARTH (IY, ID, FD, PV)}
+}
+\args{GIVEN}
+{
+ \spec{IY}{I}{year} \\
+ \spec{ID}{I}{day in year (1 = Jan 1st)} \\
+ \spec{FD}{R}{fraction of day}
+}
+\args{RETURNED}
+{
+ \spec{PV}{R(6)}{Earth \xyzxyzd\ (AU, AU~s$^{-1}$)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The date and time is TDB (loosely ET) in a Julian calendar
+ which has been aligned to the ordinary Gregorian
+ calendar for the interval 1900~March~1 to 2100~February~28.
+ The year and day can be obtained by calling sla\_CALYD or
+ sla\_CLYD.
+ \item The Earth heliocentric 6-vector is referred to the
+ FK4 mean equator and equinox of date.
+ \item Maximum/RMS errors 1950-2050:
+ \begin{itemize}
+ \item 13/5~$\times10^{-5}$~AU = 19200/7600~km in position
+ \item 47/26~$\times10^{-10}$~AU~s$^{-1}$ =
+ 0.0070/0.0039~km~s$^{-1}$ in speed
+ \end{itemize}
+ \item More accurate results are obtainable with the routine sla\_EVP.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_ECLEQ}{Ecliptic to Equatorial}
+{
+ \action{Transformation from ecliptic longitude and latitude to
+ J2000.0 \radec.}
+ \call{CALL sla\_ECLEQ (DL, DB, DATE, DR, DD)}
+}
+\args{GIVEN}
+{
+ \spec{DL,DB}{D}{ecliptic longitude and latitude
+ (mean of date, IAU 1980 theory, radians)} \\
+ \spec{DATE}{D}{TDB (formerly ET) as Modified Julian Date
+ (JD$-$2400000.5)}
+}
+\args{RETURNED}
+{
+ \spec{DR,DD}{D}{J2000.0 mean \radec\ (radians)}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_ECMAT}{Form $\alpha,\delta\rightarrow\lambda,\beta$ Matrix}
+{
+ \action{Form the equatorial to ecliptic rotation matrix (IAU 1980 theory).}
+ \call{CALL sla\_ECMAT (DATE, RMAT)}
+}
+\args{GIVEN}
+{
+ \spec{DATE}{D}{TDB (formerly ET) as Modified Julian Date
+ (JD$-$2400000.5)}
+}
+\args{RETURNED}
+{
+ \spec{RMAT}{D(3,3)}{rotation matrix}
+}
+\notes
+{
+ \begin{enumerate}
+ \item RMAT is matrix {\bf M} in the expression
+ {\bf v}$_{ecl}$~=~{\bf M}$\cdot${\bf v}$_{equ}$.
+ \item The equator, equinox and ecliptic are mean of date.
+ \end{enumerate}
+}
+\aref{Murray, C.A., {\it Vectorial Astrometry}, section 4.3.}
+%-----------------------------------------------------------------------
+\routine{SLA\_ECOR}{RV \& Time Corrns to Sun}
+{
+ \action{Component of Earth orbit velocity and heliocentric
+ light time in a given direction.}
+ \call{CALL sla\_ECOR (RM, DM, IY, ID, FD, RV, TL)}
+}
+\args{GIVEN}
+{
+ \spec{RM,DM}{R}{mean \radec\ of date (radians)} \\
+ \spec{IY}{I}{year} \\
+ \spec{ID}{I}{day in year (1 = Jan 1st)} \\
+ \spec{FD}{R}{fraction of day}
+}
+\args{RETURNED}
+{
+ \spec{RV}{R}{component of Earth orbital velocity (km~s$^{-1}$)} \\
+ \spec{TL}{R}{component of heliocentric light time (s)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The date and time is TDB (loosely ET) in a Julian calendar
+ which has been aligned to the ordinary Gregorian
+ calendar for the interval 1900 March 1 to 2100 February 28.
+ The year and day can be obtained by calling sla\_CALYD or
+ sla\_CLYD.
+ \item Sign convention:
+ \begin{itemize}
+ \item The velocity component is +ve when the
+ Earth is receding from
+ the given point on the sky.
+ \item The light time component is +ve
+ when the Earth lies between the Sun and
+ the given point on the sky.
+ \end{itemize}
+ \item Accuracy:
+ \begin{itemize}
+ \item The velocity component is usually within 0.004~km~s$^{-1}$
+ of the correct value and is never in error by more than
+ 0.007~km~s$^{-1}$.
+ \item The error in light time correction is about
+ \tsec{0}{03} at worst,
+ but is usually better than \tsec{0}{01}.
+ \end{itemize}
+ For applications requiring higher accuracy, see the sla\_EVP routine.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_EG50}{B1950 $\alpha,\delta$ to Galactic}
+{
+ \action{Transformation from B1950.0 FK4 equatorial coordinates to
+ IAU 1958 galactic coordinates.}
+ \call{CALL sla\_EG50 (DR, DD, DL, DB)}
+}
+\args{GIVEN}
+{
+ \spec{DR,DD}{D}{B1950.0 \radec\ (radians)}
+}
+\args{RETURNED}
+{
+ \spec{DL,DB}{D}{galactic longitude and latitude \gal\ (radians)}
+}
+\anote{The equatorial coordinates are B1950.0 FK4. Use the
+ routine sla\_EQGAL if conversion from J2000.0 FK5 coordinates
+ is required.}
+\aref{Blaauw {\it et al.}, 1960, {\it Mon.Not.R.astr.Soc.},
+ {\bf 121}, 123.}
+%-----------------------------------------------------------------------
+\routine{SLA\_EL2UE}{Conventional to Universal Elements}
+{
+ \action{Transform conventional osculating orbital elements
+ into ``universal'' form.}
+ \call{CALL sla\_EL2UE (\vtop{
+ \hbox{DATE, JFORM, EPOCH, ORBINC, ANODE,}
+ \hbox{PERIH, AORQ, E, AORL, DM,}
+ \hbox{U, JSTAT)}}}
+}
+\args{GIVEN}
+{
+ \spec{DATE}{D}{epoch (TT MJD) of osculation (Note~3)} \\
+ \spec{JFORM}{I}{choice of element set (1-3; Note~6)} \\
+ \spec{EPOCH}{D}{epoch of elements ($t_0$ or $T$, TT MJD)} \\
+ \spec{ORBINC}{D}{inclination ($i$, radians)} \\
+ \spec{ANODE}{D}{longitude of the ascending node ($\Omega$, radians)} \\
+ \spec{PERIH}{D}{longitude or argument of perihelion
+ ($\varpi$ or $\omega$,} \\
+ \spec{}{}{\hspace{1.5em} radians)} \\
+ \spec{AORQ}{D}{mean distance or perihelion distance ($a$ or $q$, AU)} \\
+ \spec{E}{D}{eccentricity ($e$)} \\
+ \spec{AORL}{D}{mean anomaly or longitude
+ ($M$ or $L$, radians,} \\
+ \spec{}{}{\hspace{1.5em} JFORM=1,2 only)} \\
+ \spec{DM}{D}{daily motion ($n$, radians, JFORM=1 only)}
+}
+\args{RETURNED}
+{
+ \spec{U}{D(13)}{universal orbital elements (Note~1)} \\
+ \specel {(1)} {combined mass ($M+m$)} \\
+ \specel {(2)} {total energy of the orbit ($\alpha$)} \\
+ \specel {(3)} {reference (osculating) epoch ($t_0$)} \\
+ \specel {(4-6)} {position at reference epoch (${\rm \bf r}_0$)} \\
+ \specel {(7-9)} {velocity at reference epoch (${\rm \bf v}_0$)} \\
+ \specel {(10)} {heliocentric distance at reference epoch} \\
+ \specel {(11)} {${\rm \bf r}_0.{\rm \bf v}_0$} \\
+ \specel {(12)} {date ($t$)} \\
+ \specel {(13)} {universal eccentric anomaly ($\psi$) of date,
+ approx} \\ \\
+ \spec{JSTAT}{I}{status:} \\
+ \spec{}{}{\hspace{1.95em} 0 = OK} \\
+ \spec{}{}{\hspace{1.2em} $-$1 = illegal JFORM} \\
+ \spec{}{}{\hspace{1.2em} $-$2 = illegal E} \\
+ \spec{}{}{\hspace{1.2em} $-$3 = illegal AORQ} \\
+ \spec{}{}{\hspace{1.2em} $-$4 = illegal DM} \\
+ \spec{}{}{\hspace{1.2em} $-$5 = numerical error}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The ``universal'' elements are those which define the orbit for
+ the purposes of the method of universal variables (see reference).
+ They consist of the combined mass of the two bodies, an epoch,
+ and the position and velocity vectors (arbitrary reference frame)
+ at that epoch. The parameter set used here includes also various
+ quantities that can, in fact, be derived from the other
+ information. This approach is taken to avoiding unnecessary
+ computation and loss of accuracy. The supplementary quantities
+ are (i)~$\alpha$, which is proportional to the total energy of the
+ orbit, (ii)~the heliocentric distance at epoch,
+ (iii)~the outwards component of the velocity at the given epoch,
+ (iv)~an estimate of $\psi$, the ``universal eccentric anomaly'' at a
+ given date and (v)~that date.
+ \item The companion routine is sla\_UE2PV. This takes the set of numbers
+ that the present routine outputs and uses them to derive the
+ object's position and velocity. A single prediction requires one
+ call to the present routine followed by one call to sla\_UE2PV;
+ for convenience, the two calls are packaged as the routine
+ sla\_PLANEL. Multiple predictions may be made by again calling the
+ present routine once, but then calling sla\_UE2PV multiple times,
+ which is faster than multiple calls to sla\_PLANEL.
+ \item DATE is the epoch of osculation. It is in the TT timescale
+ (formerly Ephemeris Time, ET) and is a Modified Julian Date
+ (JD$-$2400000.5).
+ \item The supplied orbital elements are with respect to the J2000
+ ecliptic and equinox. The position and velocity parameters
+ returned in the array U are with respect to the mean equator and
+ equinox of epoch J2000, and are for the perihelion prior to the
+ specified epoch.
+ \item The universal elements returned in the array U are in canonical
+ units (solar masses, AU and canonical days).
+ \item Three different element-format options are supported, as
+ follows. \\
+
+ JFORM=1, suitable for the major planets:
+
+ \begin{tabbing}
+ xxx \= xxxxxxxx \= xx \= \kill
+ \> EPOCH \> = \> epoch of elements $t_0$ (TT MJD) \\
+ \> ORBINC \> = \> inclination $i$ (radians) \\
+ \> ANODE \> = \> longitude of the ascending node $\Omega$ (radians) \\
+ \> PERIH \> = \> longitude of perihelion $\varpi$ (radians) \\
+ \> AORQ \> = \> mean distance $a$ (AU) \\
+ \> E \> = \> eccentricity $e$ $( 0 \leq e < 1 )$ \\
+ \> AORL \> = \> mean longitude $L$ (radians) \\
+ \> DM \> = \> daily motion $n$ (radians)
+ \end{tabbing}
+
+ JFORM=2, suitable for minor planets:
+
+ \begin{tabbing}
+ xxx \= xxxxxxxx \= xx \= \kill
+ \> EPOCH \> = \> epoch of elements $t_0$ (TT MJD) \\
+ \> ORBINC \> = \> inclination $i$ (radians) \\
+ \> ANODE \> = \> longitude of the ascending node $\Omega$ (radians) \\
+ \> PERIH \> = \> argument of perihelion $\omega$ (radians) \\
+ \> AORQ \> = \> mean distance $a$ (AU) \\
+ \> E \> = \> eccentricity $e$ $( 0 \leq e < 1 )$ \\
+ \> AORL \> = \> mean anomaly $M$ (radians)
+ \end{tabbing}
+
+ JFORM=3, suitable for comets:
+
+ \begin{tabbing}
+ xxx \= xxxxxxxx \= xx \= \kill
+ \> EPOCH \> = \> epoch of perihelion $T$ (TT MJD) \\
+ \> ORBINC \> = \> inclination $i$ (radians) \\
+ \> ANODE \> = \> longitude of the ascending node $\Omega$ (radians) \\
+ \> PERIH \> = \> argument of perihelion $\omega$ (radians) \\
+ \> AORQ \> = \> perihelion distance $q$ (AU) \\
+ \> E \> = \> eccentricity $e$ $( 0 \leq e \leq 10 )$
+ \end{tabbing}
+ \item Unused elements (DM for JFORM=2, AORL and DM for JFORM=3) are
+ not accessed.
+ \item The algorithm was originally adapted from the EPHSLA program of
+ D.\,H.\,P.\,Jones (private communication, 1996). The method
+ is based on Stumpff's Universal Variables.
+ \end{enumerate}
+}
+\aref{Everhart, E. \& Pitkin, E.T., Am.~J.~Phys.~51, 712, 1983.}
+%------------------------------------------------------------------------------
+\routine{SLA\_EPB}{MJD to Besselian Epoch}
+{
+ \action{Conversion of Modified Julian Date to Besselian Epoch.}
+ \call{D~=~sla\_EPB (DATE)}
+}
+\args{GIVEN}
+{
+ \spec{DATE}{D}{Modified Julian Date (JD$-$2400000.5)}
+}
+\args{RETURNED}
+{
+ \spec{sla\_EPB}{D}{Besselian Epoch}
+}
+\aref{Lieske, J.H., 1979, {\it Astr.Astrophys.}\ {\bf 73}, 282.}
+%-----------------------------------------------------------------------
+\routine{SLA\_EPB2D}{Besselian Epoch to MJD}
+{
+ \action{Conversion of Besselian Epoch to Modified Julian Date.}
+ \call{D~=~sla\_EPB2D (EPB)}
+}
+\args{GIVEN}
+{
+ \spec{EPB}{D}{Besselian Epoch}
+}
+\args{RETURNED}
+{
+ \spec{sla\_EPB2D}{D}{Modified Julian Date (JD$-$2400000.5)}
+}
+\aref{Lieske, J.H., 1979. {\it Astr.Astrophys.}\ {\bf 73}, 282.}
+%-----------------------------------------------------------------------
+\routine{SLA\_EPCO}{Convert Epoch to B or J}
+{
+ \action{Convert an epoch to Besselian or Julian to match another one.}
+ \call{D~=~sla\_EPCO (K0, K, E)}
+
+}
+\args{GIVEN}
+{
+ \spec{K0}{C}{form of result: `B'=Besselian, `J'=Julian} \\
+ \spec{K}{C}{form of given epoch: `B' or `J'} \\
+ \spec{E}{D}{epoch}
+}
+\args{RETURNED}
+{
+ \spec{sla\_EPCO}{D}{the given epoch converted as necessary}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The result is always either equal to or very close to
+ the given epoch E. The routine is required only in
+ applications where punctilious treatment of heterogeneous
+ mixtures of star positions is necessary.
+ \item K0 and K are not validated. They are interpreted as follows:
+ \begin{itemize}
+ \item If K0 and K are the same, the result is E.
+ \item If K0 is `B' and K isn't, the conversion is J to B.
+ \item In all other cases, the conversion is B to J.
+ \end{itemize}
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_EPJ}{MJD to Julian Epoch}
+{
+ \action{Convert Modified Julian Date to Julian Epoch.}
+ \call{D~=~sla\_EPJ (DATE)}
+}
+\args{GIVEN}
+{
+ \spec{DATE}{D}{Modified Julian Date (JD$-$2400000.5)}
+}
+\args{RETURNED}
+{
+ \spec{sla\_EPJ}{D}{Julian Epoch}
+}
+\aref{Lieske, J.H., 1979.\ {\it Astr.Astrophys.}, {\bf 73}, 282.}
+%-----------------------------------------------------------------------
+\routine{SLA\_EPJ2D}{Julian Epoch to MJD}
+{
+ \action{Convert Julian Epoch to Modified Julian Date.}
+ \call{D~=~sla\_EPJ2D (EPJ)}
+}
+\args{GIVEN}
+{
+ \spec{EPJ}{D}{Julian Epoch}
+}
+\args{RETURNED}
+{
+ \spec{sla\_EPJ2D}{D}{Modified Julian Date (JD$-$2400000.5)}
+}
+\aref{Lieske, J.H., 1979.\ {\it Astr.Astrophys.}, {\bf 73}, 282.}
+%-----------------------------------------------------------------------
+\routine{SLA\_EQECL}{J2000 $\alpha,\delta$ to Ecliptic}
+{
+ \action{Transformation from J2000.0 equatorial coordinates to
+ ecliptic longitude and latitude.}
+ \call{CALL sla\_EQECL (DR, DD, DATE, DL, DB)}
+}
+\args{GIVEN}
+{
+ \spec{DR,DD}{D}{J2000.0 mean \radec\ (radians)} \\
+ \spec{DATE}{D}{TDB (formerly ET) as Modified Julian Date (JD$-$2400000.5)}
+}
+\args{RETURNED}
+{
+ \spec{DL,DB}{D}{ecliptic longitude and latitude
+ (mean of date, IAU 1980 theory, radians)}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_EQEQX}{Equation of the Equinoxes}
+{
+ \action{Equation of the equinoxes (IAU 1994).}
+ \call{D~=~sla\_EQEQX (DATE)}
+}
+\args{GIVEN}
+{
+ \spec{DATE}{D}{TDB (formerly ET) as Modified Julian Date (JD$-$2400000.5)}
+}
+\args{RETURNED}
+{
+ \spec{sla\_EQEQX}{D}{The equation of the equinoxes (radians)}
+}
+\notes{
+ \begin{enumerate}
+ \item The equation of the equinoxes is defined here as GAST~$-$~GMST:
+ it is added to a {\it mean}\/ sidereal time to give the
+ {\it apparent}\/ sidereal time.
+ \item The change from the classic ``textbook'' expression
+ $\Delta\psi\,cos\,\epsilon$ occurred with IAU Resolution C7,
+ Recommendation~3 (1994). The new formulation takes into
+ account cross-terms between the various precession and
+ nutation quantities, amounting to about 3~milliarcsec.
+ The transition from the old to the new model officially
+ takes place on 1997 February~27.
+ \end{enumerate}
+}
+\aref{Capitaine, N.\ \& Gontier, A.-M.\ (1993),
+ {\it Astron. Astrophys.},
+ {\bf 275}, 645-650.}
+%-----------------------------------------------------------------------
+\routine{SLA\_EQGAL}{J2000 $\alpha,\delta$ to Galactic}
+{
+ \action{Transformation from J2000.0 FK5 equatorial coordinates to
+ IAU 1958 galactic coordinates.}
+ \call{CALL sla\_EQGAL (DR, DD, DL, DB)}
+}
+\args{GIVEN}
+{
+ \spec{DR,DD}{D}{J2000.0 \radec\ (radians)}
+}
+\args{RETURNED}
+{
+ \spec{DL,DB}{D}{galactic longitude and latitude \gal\ (radians)}
+}
+\anote{The equatorial coordinates are J2000.0 FK5. Use the routine
+ sla\_EG50 if conversion from B1950.0 FK4 coordinates is required.}
+\aref{Blaauw {\it et al.}, 1960, {\it Mon.Not.R.astr.Soc.},
+ {\bf 121}, 123.}
+%-----------------------------------------------------------------------
+\routine{SLA\_ETRMS}{E-terms of Aberration}
+{
+ \action{Compute the E-terms vector -- the part of the annual
+ aberration which arises from the eccentricity of the
+ Earth's orbit.}
+ \call{CALL sla\_ETRMS (EP, EV)}
+}
+\args{GIVEN}
+{
+ \spec{EP}{D}{Besselian epoch}
+}
+\args{RETURNED}
+{
+ \spec{EV}{D(3)}{E-terms as $[\Delta x, \Delta y, \Delta z\,]$}
+}
+\anote{Note the use of the J2000 aberration constant (\arcsec{20}{49552}).
+ This is a reflection of the fact that the E-terms embodied in
+ existing star catalogues were computed from a variety of
+ aberration constants. Rather than adopting one of the old
+ constants the latest value is used here.}
+\refs
+{
+ \begin{enumerate}
+ \item Smith, C.A.\ {\it et al.}, 1989. {\it Astr.J.}\ {\bf 97}, 265.
+ \item Yallop, B.D.\ {\it et al.}, 1989. {\it Astr.J.}\ {\bf 97}, 274.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_EULER}{Rotation Matrix from Euler Angles}
+{
+ \action{Form a rotation matrix from the Euler angles -- three
+ successive rotations about specified Cartesian axes
+ (single precision).}
+ \call{CALL sla\_EULER (ORDER, PHI, THETA, PSI, RMAT)}
+}
+\args{GIVEN}
+{
+ \spec{ORDER}{C*(*)}{specifies about which axes the rotations occur} \\
+ \spec{PHI}{R}{1st rotation (radians)} \\
+ \spec{THETA}{R}{2nd rotation (radians)} \\
+ \spec{PSI}{R}{3rd rotation (radians)}
+}
+\args{RETURNED}
+{
+ \spec{RMAT}{R(3,3)}{rotation matrix}
+}
+\notes
+{
+ \begin{enumerate}
+ \item A rotation is positive when the reference frame rotates
+ anticlockwise as seen looking towards the origin from the
+ positive region of the specified axis.
+ \item The characters of ORDER define which axes the three successive
+ rotations are about. A typical value is `ZXZ', indicating that
+ RMAT is to become the direction cosine matrix corresponding to
+ rotations of the reference frame through PHI radians about the
+ old {\it z}-axis, followed by THETA radians about the resulting
+ {\it x}-axis,
+ then PSI radians about the resulting {\it z}-axis. In detail:
+ \begin{itemize}
+ \item The axis names can be any of the following, in any order or
+ combination: X, Y, Z, uppercase or lowercase, 1, 2, 3. Normal
+ axis labelling/numbering conventions apply;
+ the {\it xyz} ($\equiv123$)
+ triad is right-handed. Thus, the `ZXZ' example given above
+ could be written `zxz' or `313' (or even `ZxZ' or `3xZ').
+ \item ORDER is terminated by length or by the first unrecognized
+ character.
+ \item Fewer than three rotations are acceptable, in which case
+ the later angle arguments are ignored.
+ \end{itemize}
+ \item Zero rotations produces a unit RMAT.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_EVP}{Earth Position \& Velocity}
+{
+ \action{Barycentric and heliocentric velocity and position of the Earth.}
+ \call{CALL sla\_EVP (DATE, DEQX, DVB, DPB, DVH, DPH)}
+}
+\args{GIVEN}
+{
+ \spec{DATE}{D}{TDB (formerly ET) as a Modified Julian Date
+ (JD$-$2400000.5)} \\
+ \spec{DEQX}{D}{Julian Epoch ({\it e.g.}\ 2000D0) of mean equator and
+ equinox of the vectors returned. If DEQX~$<0$,
+ all vectors are referred to the mean equator and
+ equinox (FK5) of date DATE.}
+}
+\args{RETURNED}
+{
+ \spec{DVB}{D(3)}{barycentric \xyzd, AU~s$^{-1}$} \\
+ \spec{DPB}{D(3)}{barycentric \xyz, AU} \\
+ \spec{DVH}{D(3)}{heliocentric \xyzd, AU~s$^{-1}$} \\
+ \spec{DPH}{D(3)}{heliocentric \xyz, AU}
+}
+\notes
+{
+ \begin{enumerate}
+ \item This routine is used when accuracy is more important
+ than CPU time, yet the extra complication of reading a
+ pre-computed ephemeris is not justified. The maximum
+ deviations from the JPL~DE96 ephemeris are as follows:
+ \begin{itemize}
+ \item velocity (barycentric or heliocentric): 420~mm~s$^{-1}$
+ \item position (barycentric): 6900~km
+ \item position (heliocentric): 1600~km
+ \end{itemize}
+ \item The routine is an adaption of the BARVEL and BARCOR
+ subroutines of P.Stumpff, which are described in
+ {\it Astr.Astrophys.Suppl.Ser.}\ {\bf 41}, 1-8 (1980).
+ Most of the changes are merely cosmetic and do not affect
+ the results at all. However, some adjustments have been
+ made so as to give results that refer to the new (IAU 1976
+ `FK5') equinox and precession, although the differences these
+ changes make relative to the results from Stumpff's original
+ `FK4' version are smaller than the inherent accuracy of the
+ algorithm. One minor shortcoming in the original routines
+ that has {\bf not} been corrected is that slightly better
+ numerical accuracy could be achieved if the various polynomial
+ evaluations were to be so arranged that the smallest terms were
+ computed first. Note also that one of Stumpff's precession
+ constants differs by \arcsec{0}{001} from the value given in the
+ {\it Explanatory Supplement}.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_FITXY}{Fit Linear Model to Two \xy\ Sets}
+{
+ \action{Fit a linear model to relate two sets of \xy\ coordinates.}
+ \call{CALL sla\_FITXY (ITYPE,NP,XYE,XYM,COEFFS,J)}
+}
+\args{GIVEN}
+{
+ \spec{ITYPE}{I}{type of model: 4 or 6 (note 1)} \\
+ \spec{NP}{I}{number of samples (note 2)} \\
+ \spec{XYE}{D(2,NP)}{expected \xy\ for each sample} \\
+ \spec{XYM}{D(2,NP)}{measured \xy\ for each sample}
+}
+\args{RETURNED}
+{
+ \spec{COEFFS}{D(6)}{coefficients of model (note 3)} \\
+ \spec{J}{I}{status:} \\
+ \spec{}{}{\hspace{1.5em} 0 = OK} \\
+ \spec{}{}{\hspace{0.7em} $-$1 = illegal ITYPE} \\
+ \spec{}{}{\hspace{0.7em} $-$2 = insufficient data} \\
+ \spec{}{}{\hspace{0.7em} $-$3 = singular solution}
+}
+\notes
+{
+ \begin{enumerate}
+ \item ITYPE, which must be either 4 or 6, selects the type of model
+ fitted. Both allowed ITYPE values produce a model COEFFS which
+ consists of six coefficients, namely the zero points and, for
+ each of XE and YE, the coefficient of XM and YM. For ITYPE=6,
+ all six coefficients are independent, modelling squash and shear
+ as well as origin, scale, and orientation. However, ITYPE=4
+ selects the {\it solid body rotation}\/ option; the model COEFFS
+ still consists of the same six coefficients, but now two of
+ them are used twice (appropriately signed). Origin, scale
+ and orientation are still modelled, but not squash or shear --
+ the units of X and Y have to be the same.
+ \item For NC=4, NP must be at least 2. For NC=6, NP must be at
+ least 3.
+ \item The model is returned in the array COEFFS. Naming the
+ six elements of COEFFS $a,b,c,d,e$ \& $f$,
+ the model transforms {\it measured}\/ coordinates
+ $[x_{m},y_{m}\,]$ into {\it expected}\/ coordinates
+ $[x_{e},y_{e}\,]$ as follows:
+ \begin{verse}
+ $x_{e} = a + bx_{m} + cy_{m}$ \\
+ $y_{e} = d + ex_{m} + fy_{m}$
+ \end{verse}
+ For the {\it solid body rotation}\/ option (ITYPE=4), the
+ magnitudes of $b$ and $f$, and of $c$ and $e$, are equal. The
+ signs of these coefficients depend on whether there is a
+ sign reversal between $[x_{e},y_{e}]$ and $[x_{m},y_{m}]$;
+ fits are performed
+ with and without a sign reversal and the best one chosen.
+ \item Error status values J=$-$1 and $-$2 leave COEFFS unchanged;
+ if J=$-$3 COEFFS may have been changed.
+ \item See also sla\_PXY, sla\_INVF, sla\_XY2XY, sla\_DCMPF.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_FK425}{FK4 to FK5}
+{
+ \action{Convert B1950.0 FK4 star data to J2000.0 FK5.
+ This routine converts stars from the old, Bessel-Newcomb, FK4
+ system to the new, IAU~1976, FK5, Fricke system. The precepts
+ of Smith~{\it et~al.}\ (see reference~1) are followed,
+ using the implementation
+ by Yallop~{\it et~al.}\ (reference~2) of a matrix method
+ due to Standish.
+ Kinoshita's development of Andoyer's post-Newcomb precession is
+ used. The numerical constants from
+ Seidelmann~{\it et~al.}\ (reference~3) are used canonically.}
+ \call{CALL sla\_FK425 (\vtop{
+ \hbox{R1950,D1950,DR1950,DD1950,P1950,V1950,}
+ \hbox{R2000,D2000,DR2000,DD2000,P2000,V2000)}}}
+}
+\args{GIVEN}
+{
+ \spec{R1950}{D}{B1950.0 $\alpha$ (radians)} \\
+ \spec{D1950}{D}{B1950.0 $\delta$ (radians)} \\
+ \spec{DR1950}{D}{B1950.0 proper motion in $\alpha$
+ (radians per tropical year)} \\
+ \spec{DD1950}{D}{B1950.0 proper motion in $\delta$
+ (radians per tropical year)} \\
+ \spec{P1950}{D}{B1950.0 parallax (arcsec)} \\
+ \spec{V1950}{D}{B1950.0 radial velocity (km~s$^{-1}$, +ve = moving away)}
+}
+\args{RETURNED}
+{
+ \spec{R2000}{D}{J2000.0 $\alpha$ (radians)} \\
+ \spec{D2000}{D}{J2000.0 $\delta$ (radians)} \\
+ \spec{DR2000}{D}{J2000.0 proper motion in $\alpha$
+ (radians per Julian year)} \\
+ \spec{DD2000}{D}{J2000.0 proper motion in $\delta$
+ (radians per Julian year)} \\
+ \spec{P2000}{D}{J2000.0 parallax (arcsec)} \\
+ \spec{V2000}{D}{J2000.0 radial velocity (km~s$^{-1}$, +ve = moving away)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The $\alpha$ proper motions are $\dot{\alpha}$ rather than
+ $\dot{\alpha}\cos\delta$, and are per year rather than per century.
+ \item Conversion from Besselian epoch 1950.0 to Julian epoch
+ 2000.0 only is provided for. Conversions involving other
+ epochs will require use of the appropriate precession,
+ proper motion, and E-terms routines before and/or after FK425
+ is called.
+ \item In the FK4 catalogue the proper motions of stars within
+ $10^{\circ}$ of the poles do not include the {\it differential
+ E-terms}\/ effect and should, strictly speaking, be handled
+ in a different manner from stars outside these regions.
+ However, given the general lack of homogeneity of the star
+ data available for routine astrometry, the difficulties of
+ handling positions that may have been determined from
+ astrometric fields spanning the polar and non-polar regions,
+ the likelihood that the differential E-terms effect was not
+ taken into account when allowing for proper motion in past
+ astrometry, and the undesirability of a discontinuity in
+ the algorithm, the decision has been made in this routine to
+ include the effect of differential E-terms on the proper
+ motions for all stars, whether polar or not. At epoch J2000,
+ and measuring on the sky rather than in terms of $\Delta\alpha$,
+ the errors resulting from this simplification are less than
+ 1~milliarcsecond in position and 1~milliarcsecond per
+ century in proper motion.
+ \item See also sla\_FK45Z, sla\_FK524, sla\_FK54Z.
+ \end{enumerate}
+}
+\refs
+{
+ \begin{enumerate}
+ \item Smith, C.A.\ {\it et al.}, 1989.\ {\it Astr.J.}\ {\bf 97}, 265.
+ \item Yallop, B.D.\ {\it et al.}, 1989.\ {\it Astr.J.}\ {\bf 97}, 274.
+ \item Seidelmann, P.K.\ (ed), 1992. {\it Explanatory
+ Supplement to the Astronomical Almanac,}\/ ISBN~0-935702-68-7.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_FK45Z}{FK4 to FK5, no P.M. or Parallax}
+{
+ \action{Convert B1950.0 FK4 star data to J2000.0 FK5 assuming zero
+ proper motion in the FK5 frame.
+ This routine converts stars from the old, Bessel-Newcomb, FK4
+ system to the new, IAU~1976, FK5, Fricke system, in such a
+ way that the FK5 proper motion is zero. Because such a star
+ has, in general, a non-zero proper motion in the FK4 system,
+ the routine requires the epoch at which the position in the
+ FK4 system was determined. The method is from appendix~2 of
+ reference~1, but using the constants of reference~4.}
+ \call{CALL sla\_FK45Z (R1950,D1950,BEPOCH,R2000,D2000)}
+}
+\args{GIVEN}
+{
+ \spec{R1950}{D}{B1950.0 FK4 $\alpha$ at epoch BEPOCH (radians)} \\
+ \spec{D1950}{D}{B1950.0 FK4 $\delta$ at epoch BEPOCH (radians)} \\
+ \spec{BEPOCH}{D}{Besselian epoch ({\it e.g.}\ 1979.3D0)}
+}
+\args{RETURNED}
+{
+ \spec{R2000}{D}{J2000.0 FK5 $\alpha$ (radians)} \\
+ \spec{D2000}{D}{J2000.0 FK5 $\delta$ (radians)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The epoch BEPOCH is strictly speaking Besselian, but
+ if a Julian epoch is supplied the result will be
+ affected only to a negligible extent.
+ \item Conversion from Besselian epoch 1950.0 to Julian epoch
+ 2000.0 only is provided for. Conversions involving other
+ epochs will require use of the appropriate precession,
+ proper motion, and E-terms routines before and/or
+ after FK45Z is called.
+ \item In the FK4 catalogue the proper motions of stars within
+ $10^{\circ}$ of the poles do not include the {\it differential
+ E-terms}\/ effect and should, strictly speaking, be handled
+ in a different manner from stars outside these regions.
+ However, given the general lack of homogeneity of the star
+ data available for routine astrometry, the difficulties of
+ handling positions that may have been determined from
+ astrometric fields spanning the polar and non-polar regions,
+ the likelihood that the differential E-terms effect was not
+ taken into account when allowing for proper motion in past
+ astrometry, and the undesirability of a discontinuity in
+ the algorithm, the decision has been made in this routine to
+ include the effect of differential E-terms on the proper
+ motions for all stars, whether polar or not. At epoch 2000,
+ and measuring on the sky rather than in terms of $\Delta\alpha$,
+ the errors resulting from this simplification are less than
+ 1~milliarcsecond in position and 1~milliarcsecond per
+ century in proper motion.
+ \item See also sla\_FK425, sla\_FK524, sla\_FK54Z.
+ \end{enumerate}
+}
+\refs
+{
+ \begin{enumerate}
+ \item Aoki, S., {\it et al.}, 1983.\ {\it Astr.Astrophys.}, {\bf 128}, 263.
+ \item Smith, C.A.\ {\it et al.}, 1989.\ {\it Astr.J.}\ {\bf 97}, 265.
+ \item Yallop, B.D.\ {\it et al.}, 1989.\ {\it Astr.J.}\ {\bf 97}, 274.
+ \item Seidelmann, P.K.\ (ed), 1992. {\it Explanatory
+ Supplement to the Astronomical Almanac,}\/ ISBN~0-935702-68-7.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_FK524}{FK5 to FK4}
+{
+ \action{Convert J2000.0 FK5 star data to B1950.0 FK4.
+ This routine converts stars from the new, IAU~1976, FK5, Fricke
+ system, to the old, Bessel-Newcomb, FK4 system.
+ The precepts of Smith~{\it et~al.}\ (reference~1) are followed,
+ using the implementation by Yallop~{\it et~al.}\ (reference~2)
+ of a matrix method due to Standish. Kinoshita's development of
+ Andoyer's post-Newcomb precession is used. The numerical
+ constants from Seidelmann~{\it et~al.}\ (reference~3) are
+ used canonically.}
+ \call{CALL sla\_FK524 (\vtop{
+ \hbox{R2000,D2000,DR2000,DD2000,P2000,V2000,}
+ \hbox{R1950,D1950,DR1950,DD1950,P1950,V1950)}}}
+}
+\args{GIVEN}
+{
+ \spec{R2000}{D}{J2000.0 $\alpha$ (radians)} \\
+ \spec{D2000}{D}{J2000.0 $\delta$ (radians)} \\
+ \spec{DR2000}{D}{J2000.0 proper motion in $\alpha$
+ (radians per Julian year)} \\
+ \spec{DD2000}{D}{J2000.0 proper motion in $\delta$
+ (radians per Julian year)} \\
+ \spec{P2000}{D}{J2000.0 parallax (arcsec)} \\
+ \spec{V2000}{D}{J2000 radial velocity (km~s$^{-1}$, +ve = moving away)}
+}
+\args{RETURNED}
+{
+ \spec{R1950}{D}{B1950.0 $\alpha$ (radians)} \\
+ \spec{D1950}{D}{B1950.0 $\delta$ (radians)} \\
+ \spec{DR1950}{D}{B1950.0 proper motion in $\alpha$
+ (radians per tropical year)} \\
+ \spec{DD1950}{D}{B1950.0 proper motion in $\delta$
+ (radians per tropical year)} \\
+ \spec{P1950}{D}{B1950.0 parallax (arcsec)} \\
+ \spec{V1950}{D}{radial velocity (km~s$^{-1}$, +ve = moving away)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The $\alpha$ proper motions are $\dot{\alpha}$ rather than
+ $\dot{\alpha}\cos\delta$, and are per year rather than per century.
+ \item Note that conversion from Julian epoch 2000.0 to Besselian
+ epoch 1950.0 only is provided for. Conversions involving
+ other epochs will require use of the appropriate precession,
+ proper motion, and E-terms routines before and/or after
+ FK524 is called.
+ \item In the FK4 catalogue the proper motions of stars within
+ $10^{\circ}$ of the poles do not include the {\it differential
+ E-terms}\/ effect and should, strictly speaking, be handled
+ in a different manner from stars outside these regions.
+ However, given the general lack of homogeneity of the star
+ data available for routine astrometry, the difficulties of
+ handling positions that may have been determined from
+ astrometric fields spanning the polar and non-polar regions,
+ the likelihood that the differential E-terms effect was not
+ taken into account when allowing for proper motion in past
+ astrometry, and the undesirability of a discontinuity in
+ the algorithm, the decision has been made in this routine to
+ include the effect of differential E-terms on the proper
+ motions for all stars, whether polar or not. At epoch 2000,
+ and measuring on the sky rather than in terms of $\Delta\alpha$,
+ the errors resulting from this simplification are less than
+ 1~milliarcsecond in position and 1~milliarcsecond per
+ century in proper motion.
+ \item See also sla\_FK425, sla\_FK45Z, sla\_FK54Z.
+ \end{enumerate}
+}
+\refs
+{
+ \begin{enumerate}
+ \item Smith, C.A.\ {\it et al.}, 1989.\ {\it Astr.J.}\ {\bf 97}, 265.
+ \item Yallop, B.D.\ {\it et al.}, 1989.\ {\it Astr.J.}\ {\bf 97}, 274.
+ \item Seidelmann, P.K.\ (ed), 1992. {\it Explanatory
+ Supplement to the Astronomical Almanac,}\/ ISBN~0-935702-68-7.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_FK52H}{FK5 to Hipparcos}
+{
+ \action{Transform an FK5 (J2000) position and proper motion
+ into the frame of the Hipparcos catalogue.}
+ \call{CALL sla\_FK52H (R5,D5,DR5,DD5,RH,DH,DRH,DDH)}
+}
+\args{GIVEN}
+{
+ \spec{R5}{D}{J2000.0 FK5 $\alpha$ (radians)} \\
+ \spec{D5}{D}{J2000.0 FK5 $\delta$ (radians)} \\
+ \spec{DR5}{D}{J2000.0 FK5 proper motion in $\alpha$
+ (radians per Julian year)} \\
+ \spec{DD5}{D}{J2000.0 FK5 proper motion in $\delta$
+ (radians per Julian year)}
+}
+\args{RETURNED}
+{
+ \spec{RH}{D}{Hipparcos $\alpha$ (radians)} \\
+ \spec{DH}{D}{Hipparcos $\delta$ (radians)} \\
+ \spec{DRH}{D}{Hipparcos proper motion in $\alpha$
+ (radians per Julian year)} \\
+ \spec{DDH}{D}{Hipparcos proper motion in $\delta$
+ (radians per Julian year)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The $\alpha$ proper motions are $\dot{\alpha}$ rather than
+ $\dot{\alpha}\cos\delta$, and are per year rather than per century.
+ \item The FK5 to Hipparcos
+ transformation consists of a pure rotation and spin;
+ zonal errors in the FK5 catalogue are not taken into account.
+ \item The adopted epoch J2000.0 FK5 to Hipparcos orientation and spin
+ values are as follows (see reference):
+
+ \vspace{2ex}
+
+ ~~~~~~~~~~~~
+ \begin{tabular}{|r|r|r|} \hline
+ &
+ \multicolumn{1}{|c}{\it orientation} &
+ \multicolumn{1}{|c|}{\it ~~~spin~~~} \\ \hline
+ $x$ & $-19.9$~~~~ & ~$-0.30$~~ \\
+ $y$ & $-9.1$~~~~ & ~$+0.60$~~ \\
+ $z$ & $+22.9$~~~~ & ~$+0.70$~~ \\ \hline
+ & {\it mas}~~~~~ & ~{\it mas/y}~ \\ \hline
+ \end{tabular}
+
+ \vspace{3ex}
+
+ These orientation and spin components are interpreted as
+ {\it axial vectors.} An axial vector points at the pole of
+ the rotation and its length is the amount of rotation in radians.
+ \item See also sla\_FK5HZ, sla\_H2FK5, sla\_HFK5Z.
+ \end{enumerate}
+}
+\aref {Feissel, M.\ \& Mignard, F., 1998., {\it Astron.Astrophys.}\
+ {\bf 331}, L33-L36.}
+%-----------------------------------------------------------------------
+\routine{SLA\_FK54Z}{FK5 to FK4, no P.M. or Parallax}
+{
+ \action{Convert a J2000.0 FK5 star position to B1950.0 FK4 assuming
+ FK5 zero proper motion and parallax.
+ This routine converts star positions from the new, IAU~1976,
+ FK5, Fricke system to the old, Bessel-Newcomb, FK4 system.}
+ \call{CALL sla\_FK54Z (R2000,D2000,BEPOCH,R1950,D1950,DR1950,DD1950)}
+}
+\args{GIVEN}
+{
+ \spec{R2000}{D}{J2000.0 FK5 $\alpha$ (radians)} \\
+ \spec{D2000}{D}{J2000.0 FK5 $\delta$ (radians)} \\
+ \spec{BEPOCH}{D}{Besselian epoch ({\it e.g.}\ 1950D0)}
+}
+\args{RETURNED}
+{
+ \spec{R1950}{D}{B1950.0 FK4 $\alpha$ at epoch BEPOCH (radians)} \\
+ \spec{D1950}{D}{B1950.0 FK4 $\delta$ at epoch BEPOCH (radians)} \\
+ \spec{DR1950}{D}{B1950.0 FK4 proper motion in $\alpha$
+ (radians per tropical year)} \\
+ \spec{DD1950}{D}{B1950.0 FK4 proper motion in $\delta$
+ (radians per tropical year)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The $\alpha$ proper motions are $\dot{\alpha}$ rather than
+ $\dot{\alpha}\cos\delta$, and are per year rather than per century.
+ \item Conversion from Julian epoch 2000.0 to Besselian epoch 1950.0
+ only is provided for. Conversions involving other epochs will
+ require use of the appropriate precession routines before and
+ after this routine is called.
+ \item Unlike in the sla\_FK524 routine, the FK5 proper motions, the
+ parallax and the radial velocity are presumed zero.
+ \item It was the intention that FK5 should be a close approximation
+ to an inertial frame, so that distant objects have zero proper
+ motion; such objects have (in general) non-zero proper motion
+ in FK4, and this routine returns those {\it fictitious proper
+ motions}.
+ \item The position returned by this routine is in the B1950
+ reference frame but at Besselian epoch BEPOCH. For
+ comparison with catalogues the BEPOCH argument will
+ frequently be 1950D0.
+ \item See also sla\_FK425, sla\_FK45Z, sla\_FK524.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_FK5HZ}{FK5 to Hipparcos, no P.M.}
+{
+ \action{Transform an FK5 (J2000) star position into the frame of the
+ Hipparcos catalogue, assuming zero Hipparcos proper motion.}
+ \call{CALL sla\_FK52H (R5,D5,EPOCH,RH,DH)}
+}
+\args{GIVEN}
+{
+ \spec{R5}{D}{J2000.0 FK5 $\alpha$ (radians)} \\
+ \spec{D5}{D}{J2000.0 FK5 $\delta$ (radians)} \\
+ \spec{EPOCH}{D}{Julian epoch (TDB)}
+}
+\args{RETURNED}
+{
+ \spec{RH}{D}{Hipparcos $\alpha$ (radians)} \\
+ \spec{DH}{D}{Hipparcos $\delta$ (radians)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The $\alpha$ proper motions are $\dot{\alpha}$ rather than
+ $\dot{\alpha}\cos\delta$, and are per year rather than per century.
+ \item The FK5 to Hipparcos
+ transformation consists of a pure rotation and spin;
+ zonal errors in the FK5 catalogue are not taken into account.
+ \item The adopted epoch J2000.0 FK5 to Hipparcos orientation and spin
+ values are as follows (see reference):
+
+ \vspace{2ex}
+
+ ~~~~~~~~~~~~
+ \begin{tabular}{|r|r|r|} \hline
+ &
+ \multicolumn{1}{|c}{\it orientation} &
+ \multicolumn{1}{|c|}{\it ~~~spin~~~} \\ \hline
+ $x$ & $-19.9$~~~~ & ~$-0.30$~~ \\
+ $y$ & $-9.1$~~~~ & ~$+0.60$~~ \\
+ $z$ & $+22.9$~~~~ & ~$+0.70$~~ \\ \hline
+ & {\it mas}~~~~~ & ~{\it mas/y}~ \\ \hline
+ \end{tabular}
+
+ \vspace{3ex}
+
+ These orientation and spin components are interpreted as
+ {\it axial vectors.} An axial vector points at the pole of
+ the rotation and its length is the amount of rotation in radians.
+ \item See also sla\_FK52H, sla\_H2FK5, sla\_HFK5Z.
+ \end{enumerate}
+}
+\aref {Feissel, M.\ \& Mignard, F., 1998., {\it Astron.Astrophys.}\
+ {\bf 331}, L33-L36.}
+%-----------------------------------------------------------------------
+\routine{SLA\_FLOTIN}{Decode a Real Number}
+{
+ \action{Convert free-format input into single precision floating point.}
+ \call{CALL sla\_FLOTIN (STRING, NSTRT, RESLT, JFLAG)}
+}
+\args{GIVEN}
+{
+ \spec{STRING}{C}{string containing number to be decoded} \\
+ \spec{NSTRT}{I}{pointer to where decoding is to commence} \\
+ \spec{RESLT}{R}{current value of result}
+}
+\args{RETURNED}
+{
+ \spec{NSTRT}{I}{advanced to next number} \\
+ \spec{RESLT}{R}{result} \\
+ \spec{JFLAG}{I}{status: $-$1~=~$-$OK, 0~=~+OK, 1~=~null result, 2~=~error}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The reason sla\_FLOTIN has separate `OK' status values
+ for + and $-$ is to enable minus zero to be detected.
+ This is of crucial importance
+ when decoding mixed-radix numbers. For example, an angle
+ expressed as degrees, arcminutes and arcseconds may have a
+ leading minus sign but a zero degrees field.
+ \item A TAB is interpreted as a space, and lowercase characters are
+ interpreted as uppercase. {\it n.b.}\ The test for TAB is
+ ASCII-specific.
+ \item The basic format is the sequence of fields $\pm n.n x \pm n$,
+ where $\pm$ is a sign
+ character `+' or `$-$', $n$ means a string of decimal digits,
+ `.' is a decimal point, and $x$, which indicates an exponent,
+ means `D' or `E'. Various combinations of these fields can be
+ omitted, and embedded blanks are permissible in certain places.
+ \item Spaces:
+ \begin{itemize}
+ \item Leading spaces are ignored.
+ \item Embedded spaces are allowed only after +, $-$, D or E,
+ and after the decimal point if the first sequence of
+ digits is absent.
+ \item Trailing spaces are ignored; the first signifies
+ end of decoding and subsequent ones are skipped.
+ \end{itemize}
+ \item Delimiters:
+ \begin{itemize}
+ \item Any character other than +,$-$,0-9,.,D,E or space may be
+ used to signal the end of the number and terminate decoding.
+ \item Comma is recognized by sla\_FLOTIN as a special case; it
+ is skipped, leaving the pointer on the next character. See
+ 13, below.
+ \item Decoding will in all cases terminate if end of string
+ is reached.
+ \end{itemize}
+ \item Both signs are optional. The default is +.
+ \item The mantissa $n.n$ defaults to unity.
+ \item The exponent $x\!\pm\!n$ defaults to `E0'.
+ \item The strings of decimal digits may be of any length.
+ \item The decimal point is optional for whole numbers.
+ \item A {\it null result}\/ occurs when the string of characters
+ being decoded does not begin with +,$-$,0-9,.,D or E, or
+ consists entirely of spaces. When this condition is
+ detected, JFLAG is set to 1 and RESLT is left untouched.
+ \item NSTRT = 1 for the first character in the string.
+ \item On return from sla\_FLOTIN, NSTRT is set ready for the next
+ decode -- following trailing blanks and any comma. If a
+ delimiter other than comma is being used, NSTRT must be
+ incremented before the next call to sla\_FLOTIN, otherwise
+ all subsequent calls will return a null result.
+ \item Errors (JFLAG=2) occur when:
+ \begin{itemize}
+ \item a +, $-$, D or E is left unsatisfied; or
+ \item the decimal point is present without at least
+ one decimal digit before or after it; or
+ \item an exponent more than 100 has been presented.
+ \end{itemize}
+ \item When an error has been detected, NSTRT is left
+ pointing to the character following the last
+ one used before the error came to light. This
+ may be after the point at which a more sophisticated
+ program could have detected the error. For example,
+ sla\_FLOTIN does not detect that `1E999' is unacceptable
+ (on a computer where this is so)
+ until the entire number has been decoded.
+ \item Certain highly unlikely combinations of mantissa and
+ exponent can cause arithmetic faults during the
+ decode, in some cases despite the fact that they
+ together could be construed as a valid number.
+ \item Decoding is left to right, one pass.
+ \item See also sla\_DFLTIN and sla\_INTIN.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_GALEQ}{Galactic to J2000 $\alpha,\delta$}
+{
+ \action{Transformation from IAU 1958 galactic coordinates
+ to J2000.0 FK5 equatorial coordinates.}
+ \call{CALL sla\_GALEQ (DL, DB, DR, DD)}
+}
+\args{GIVEN}
+{
+ \spec{DL,DB}{D}{galactic longitude and latitude \gal}
+}
+\args{RETURNED}
+{
+ \spec{DR,DD}{D}{J2000.0 \radec}
+}
+\notes
+{
+ \begin{enumerate}
+ \item All arguments are in radians.
+ \item The equatorial coordinates are J2000.0 FK5. Use the routine
+ sla\_GE50 if conversion to B1950.0 FK4 coordinates is
+ required.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_GALSUP}{Galactic to Supergalactic}
+{
+ \action{Transformation from IAU 1958 galactic coordinates to
+ de Vaucouleurs supergalactic coordinates.}
+ \call{CALL sla\_GALSUP (DL, DB, DSL, DSB)}
+}
+\args{GIVEN}
+{
+ \spec{DL,DB}{D}{galactic longitude and latitude \gal\ (radians)}
+}
+\args{RETURNED}
+{
+ \spec{DSL,DSB}{D}{supergalactic longitude and latitude (radians)}
+}
+\refs
+{
+ \begin{enumerate}
+ \item de Vaucouleurs, de Vaucouleurs, \& Corwin, {\it Second Reference
+ Catalogue of Bright Galaxies}, U.Texas, p8.
+ \item Systems \& Applied Sciences Corp., documentation for the
+ machine-readable version of the above catalogue,
+ Contract NAS 5-26490.
+ \end{enumerate}
+ (These two references give different values for the galactic
+ longitude of the supergalactic origin. Both are wrong; the
+ correct value is $l^{I\!I}=137.37$.)
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_GE50}{Galactic to B1950 $\alpha,\delta$}
+{
+ \action{Transformation from IAU 1958 galactic coordinates to
+ B1950.0 FK4 equatorial coordinates.}
+ \call{CALL sla\_GE50 (DL, DB, DR, DD)}
+}
+\args{GIVEN}
+{
+ \spec{DL,DB}{D}{galactic longitude and latitude \gal}
+}
+\args{RETURNED}
+{
+ \spec{DR,DD}{D}{B1950.0 \radec}
+}
+\notes
+{
+ \begin{enumerate}
+ \item All arguments are in radians.
+ \item The equatorial coordinates are B1950.0 FK4. Use the
+ routine sla\_GALEQ if conversion to J2000.0 FK5 coordinates
+ is required.
+ \end{enumerate}
+}
+\aref{Blaauw {\it et al.}, 1960, {\it Mon.Not.R.astr.Soc.},
+ {\bf 121}, 123.}
+%-----------------------------------------------------------------------
+\routine{SLA\_GEOC}{Geodetic to Geocentric}
+{
+ \action{Convert geodetic position to geocentric.}
+ \call{CALL sla\_GEOC (P, H, R, Z)}
+}
+\args{GIVEN}
+{
+ \spec{P}{D}{latitude (geodetic, radians)} \\
+ \spec{H}{D}{height above reference spheroid (geodetic, metres)}
+}
+\args{RETURNED}
+{
+ \spec{R}{D}{distance from Earth axis (AU)} \\
+ \spec{Z}{D}{distance from plane of Earth equator (AU)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item Geocentric latitude can be obtained by evaluating {\tt ATAN2(Z,R)}.
+ \item IAU 1976 constants are used.
+ \end{enumerate}
+}
+\aref{Green, R.M., 1985.\ {\it Spherical Astronomy}, Cambridge U.P., p98.}
+%-----------------------------------------------------------------------
+\routine{SLA\_GMST}{UT to GMST}
+{
+ \action{Conversion from universal time UT1 to Greenwich mean
+ sidereal time.}
+ \call{D~=~sla\_GMST (UT1)}
+}
+\args{GIVEN}
+{
+ \spec{UT1}{D}{universal time (strictly UT1) expressed as
+ modified Julian Date (JD$-$2400000.5)}
+}
+\args{RETURNED}
+{
+ \spec{sla\_GMST}{D}{Greenwich mean sidereal time (radians)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The IAU~1982 expression
+ (see page~S15 of the 1984 {\it Astronomical
+ Almanac})\/ is used, but rearranged to reduce rounding errors. This
+ expression is always described as giving the GMST at $0^{\rm h}$UT;
+ in fact, it gives the difference between the
+ GMST and the UT, which happens to equal the GMST (modulo
+ 24~hours) at $0^{\rm h}$UT each day. In sla\_GMST, the
+ entire UT is used directly as the argument for the
+ canonical formula, and the fractional part of the UT is
+ added separately; note that the factor $1.0027379\cdots$ does
+ not appear.
+ \item See also the routine sla\_GMSTA, which
+ delivers better numerical
+ precision by accepting the UT date and time as separate arguments.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_GMSTA}{UT to GMST (extra precision)}
+{
+ \action{Conversion from universal time UT1 to Greenwich Mean
+ sidereal time, with rounding errors minimized.}
+ \call{D~=~sla\_GMSTA (DATE, UT1)}
+}
+\args{GIVEN}
+{
+ \spec{DATE}{D}{UT1 date as Modified Julian Date (integer part
+ of JD$-$2400000.5)} \\
+ \spec{UT1}{D}{UT1 time (fraction of a day)}
+}
+\args{RETURNED}
+{
+ \spec{sla\_GMST}{D}{Greenwich mean sidereal time (radians)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The algorithm is derived from the IAU 1982 expression
+ (see page~S15 of the 1984 Astronomical Almanac).
+ \item There is no restriction on how the UT is apportioned between the
+ DATE and UT1 arguments. Either of the two arguments could, for
+ example, be zero and the entire date\,+\,time supplied in the other.
+ However, the routine is designed to deliver maximum accuracy when
+ the DATE argument is a whole number and the UT1 argument
+ lies in the range $[\,0,\,1\,]$, or {\it vice versa}.
+ \item See also the routine sla\_GMST, which accepts the UT1 as a single
+ argument. Compared with sla\_GMST, the extra numerical precision
+ delivered by the present routine is unlikely to be important in
+ an absolute sense, but may be useful when critically comparing
+ algorithms and in applications where two sidereal times close
+ together are differenced.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_GRESID}{Gaussian Residual}
+{
+ \action{Generate pseudo-random normal deviate or {\it Gaussian residual}.}
+ \call{R~=~sla\_GRESID (S)}
+}
+\args{GIVEN}
+{
+ \spec{S}{R}{standard deviation}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The results of many calls to this routine will be
+ normally distributed with mean zero and standard deviation S.
+ \item The Box-Muller algorithm is used.
+ \item The implementation is machine-dependent.
+ \end{enumerate}
+}
+\aref{Ahrens \& Dieter, 1972.\ {\it Comm.A.C.M.}\ {\bf 15}, 873.}
+%-----------------------------------------------------------------------
+\routine{SLA\_H2E}{Az,El to $h,\delta$}
+{
+ \action{Horizon to equatorial coordinates
+ (single precision).}
+ \call{CALL sla\_H2E (AZ, EL, PHI, HA, DEC)}
+}
+\args{GIVEN}
+{
+ \spec{AZ}{R}{azimuth (radians)} \\
+ \spec{EL}{R}{elevation (radians)} \\
+ \spec{PHI}{R}{latitude (radians)}
+}
+\args{RETURNED}
+{
+ \spec{HA}{R}{hour angle (radians)} \\
+ \spec{DEC}{R}{declination (radians)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The sign convention for azimuth is north zero, east $+\pi/2$.
+ \item HA is returned in the range $\pm\pi$. Declination is returned
+ in the range $\pm\pi$.
+ \item The latitude is (in principle) geodetic. In critical
+ applications, corrections for polar motion should be applied
+ (see sla\_POLMO).
+ \item In some applications it will be important to specify the
+ correct type of elevation in order to produce the required
+ type of \hadec. In particular, it may be important to
+ distinguish between the elevation as affected by refraction,
+ which will yield the {\it observed} \hadec, and the elevation
+ {\it in vacuo}, which will yield the {\it topocentric}
+ \hadec. If the
+ effects of diurnal aberration can be neglected, the
+ topocentric \hadec\ may be used as an approximation to the
+ {\it apparent} \hadec.
+ \item No range checking of arguments is carried out.
+ \item In applications which involve many such calculations, rather
+ than calling the present routine it will be more efficient to
+ use inline code, having previously computed fixed terms such
+ as sine and cosine of latitude.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_H2FK5}{Hipparcos to FK5}
+{
+ \action{Transform a Hipparcos star position and proper motion
+ into the FK5 (J2000) frame.}
+ \call{CALL sla\_H2FK5 (RH,DH,DRH,DDH,R5,D5,DR5,DD5)}
+}
+\args{GIVEN}
+{
+ \spec{RH}{D}{Hipparcos $\alpha$ (radians)} \\
+ \spec{DH}{D}{Hipparcos $\delta$ (radians)} \\
+ \spec{DRH}{D}{Hipparcos proper motion in $\alpha$
+ (radians per Julian year)} \\
+ \spec{DDH}{D}{Hipparcos proper motion in $\delta$
+ (radians per Julian year)}
+}
+\args{RETURNED}
+{
+ \spec{R5}{D}{J2000.0 FK5 $\alpha$ (radians)} \\
+ \spec{D5}{D}{J2000.0 FK5 $\delta$ (radians)} \\
+ \spec{DR5}{D}{J2000.0 FK5 proper motion in $\alpha$
+ (radians per Julian year)} \\
+ \spec{DD5}{D}{FK5 J2000.0 proper motion in $\delta$
+ (radians per Julian year)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The $\alpha$ proper motions are $\dot{\alpha}$ rather than
+ $\dot{\alpha}\cos\delta$, and are per year rather than per century.
+ \item The FK5 to Hipparcos
+ transformation consists of a pure rotation and spin;
+ zonal errors in the FK5 catalogue are not taken into account.
+ \item The adopted epoch J2000.0 FK5 to Hipparcos orientation and spin
+ values are as follows (see reference):
+
+ \vspace{2ex}
+
+ ~~~~~~~~~~~~
+ \begin{tabular}{|r|r|r|} \hline
+ &
+ \multicolumn{1}{|c}{\it orientation} &
+ \multicolumn{1}{|c|}{\it ~~~spin~~~} \\ \hline
+ $x$ & $-19.9$~~~~ & ~$-0.30$~~ \\
+ $y$ & $-9.1$~~~~ & ~$+0.60$~~ \\
+ $z$ & $+22.9$~~~~ & ~$+0.70$~~ \\ \hline
+ & {\it mas}~~~~~ & ~{\it mas/y}~ \\ \hline
+ \end{tabular}
+
+ \vspace{3ex}
+
+ These orientation and spin components are interpreted as
+ {\it axial vectors.} An axial vector points at the pole of
+ the rotation and its length is the amount of rotation in radians.
+ \item See also sla\_FK52H, sla\_FK5HZ, sla\_HFK5Z.
+ \end{enumerate}
+}
+\aref {Feissel, M.\ \& Mignard, F., 1998., {\it Astron.Astrophys.}\
+ {\bf 331}, L33-L36.}
+%-----------------------------------------------------------------------
+\routine{SLA\_HFK5Z}{Hipparcos to FK5, no P.M.}
+{
+ \action{Transform a Hipparcos star position
+ into the FK5 (J2000) frame assuming zero Hipparcos proper motion.}
+ \call{CALL sla\_HFK5Z (RH,DH,EPOCH,R5,D5,DR5,DD5)}
+}
+\args{GIVEN}
+{
+ \spec{RH}{D}{Hipparcos $\alpha$ (radians)} \\
+ \spec{DH}{D}{Hipparcos $\delta$ (radians)} \\
+ \spec{EPOCH}{D}{Julian epoch (TDB)}
+}
+\args{RETURNED}
+{
+ \spec{R5}{D}{J2000.0 FK5 $\alpha$ (radians)} \\
+ \spec{D5}{D}{J2000.0 FK5 $\delta$ (radians)} \\
+ \spec{DR5}{D}{J2000.0 FK5 proper motion in $\alpha$
+ (radians per Julian year)} \\
+ \spec{DD5}{D}{FK5 J2000.0 proper motion in $\delta$
+ (radians per Julian year)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The $\alpha$ proper motions are $\dot{\alpha}$ rather than
+ $\dot{\alpha}\cos\delta$, and are per year rather than per century.
+ \item The FK5 to Hipparcos
+ transformation consists of a pure rotation and spin;
+ zonal errors in the FK5 catalogue are not taken into account.
+ \item The adopted epoch J2000.0 FK5 to Hipparcos orientation and spin
+ values are as follows (see reference):
+
+ \vspace{2ex}
+
+ ~~~~~~~~~~~~
+ \begin{tabular}{|r|r|r|} \hline
+ &
+ \multicolumn{1}{|c}{\it orientation} &
+ \multicolumn{1}{|c|}{\it ~~~spin~~~} \\ \hline
+ $x$ & $-19.9$~~~~ & ~$-0.30$~~ \\
+ $y$ & $-9.1$~~~~ & ~$+0.60$~~ \\
+ $z$ & $+22.9$~~~~ & ~$+0.70$~~ \\ \hline
+ & {\it mas}~~~~~ & ~{\it mas/y}~ \\ \hline
+ \end{tabular}
+
+ \vspace{3ex}
+
+ These orientation and spin components are interpreted as
+ {\it axial vectors.} An axial vector points at the pole of
+ the rotation and its length is the amount of rotation in radians.
+ The order of the rotations, which are very small,
+ \item It was the intention that Hipparcos should be a close
+ approximation to an inertial frame, so that distant objects
+ have zero proper motion; such objects have (in general)
+ non-zero proper motion in FK5, and this routine returns those
+ {\it fictitious proper motions.}
+ \item The position returned by this routine is in the FK5 J2000
+ reference frame but at Julian epoch EPOCH.
+ \item See also sla\_FK52H, sla\_FK5HZ, sla\_H2FK5.
+ \end{enumerate}
+}
+\aref {Feissel, M.\ \& Mignard, F., 1998., {\it Astron.Astrophys.}\
+ {\bf 331}, L33-L36.}
+%-----------------------------------------------------------------------
+\routine{SLA\_IMXV}{Apply 3D Reverse Rotation}
+{
+ \action{Multiply a 3-vector by the inverse of a rotation
+ matrix (single precision).}
+ \call{CALL sla\_IMXV (RM, VA, VB)}
+}
+\args{GIVEN}
+{
+ \spec{RM}{R(3,3)}{rotation matrix} \\
+ \spec{VA}{R(3)}{vector to be rotated}
+}
+\args{RETURNED}
+{
+ \spec{VB}{R(3)}{result vector}
+}
+\notes
+{
+ \begin{enumerate}
+ \item This routine performs the operation:
+ \begin{verse}
+ {\bf b} = {\bf M}$^{T}\cdot${\bf a}
+ \end{verse}
+ where {\bf a} and {\bf b} are the 3-vectors VA and VB
+ respectively, and {\bf M} is the $3\times3$ matrix RM.
+ \item The main function of this routine is apply an inverse
+ rotation; under these circumstances, ${\bf M}$ is
+ {\it orthogonal}, with its inverse the same as its transpose.
+ \item To comply with the ANSI Fortran 77 standard, VA and VB must
+ {\bf not} be the same array. The routine is, in fact, coded
+ so as to work properly on the VAX and many other systems even
+ if this rule is violated, something that is {\bf not}, however,
+ recommended.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_INTIN}{Decode an Integer Number}
+{
+ \action{Convert free-format input into an integer.}
+ \call{CALL sla\_INTIN (STRING, NSTRT, IRESLT, JFLAG)}
+}
+\args{GIVEN}
+{
+ \spec{STRING}{C}{string containing number to be decoded} \\
+ \spec{NSTRT}{I}{pointer to where decoding is to commence} \\
+ \spec{IRESLT}{I}{current value of result}
+}
+\args{RETURNED}
+{
+ \spec{NSTRT}{I}{advanced to next number} \\
+ \spec{IRESLT}{I}{result} \\
+ \spec{JFLAG}{I}{status: $-$1 = $-$OK, 0~=~+OK, 1~=~null result, 2~=~error}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The reason sla\_INTIN has separate `OK' status values
+ for + and $-$ is to enable minus zero to be detected.
+ This is of crucial importance
+ when decoding mixed-radix numbers. For example, an angle
+ expressed as degrees, arcminutes and arcseconds may have a
+ leading minus sign but a zero degrees field.
+ \item A TAB is interpreted as a space. {\it n.b.}\ The test for TAB is
+ ASCII-specific.
+ \item The basic format is the sequence of fields $\pm n$,
+ where $\pm$ is a sign
+ character `+' or `$-$', and $n$ means a string of decimal digits.
+ \item Spaces:
+ \begin{itemize}
+ \item Leading spaces are ignored.
+ \item Spaces between the sign and the number are allowed.
+ \item Trailing spaces are ignored; the first signifies
+ end of decoding and subsequent ones are skipped.
+ \end{itemize}
+ \item Delimiters:
+ \begin{itemize}
+ \item Any character other than +,$-$,0-9 or space may be
+ used to signal the end of the number and terminate decoding.
+ \item Comma is recognized by sla\_INTIN as a special case; it
+ is skipped, leaving the pointer on the next character. See
+ 9, below.
+ \item Decoding will in all cases terminate if end of string
+ is reached.
+ \end{itemize}
+ \item The sign is optional. The default is +.
+ \item A {\it null result}\/ occurs when the string of characters
+ being decoded does not begin with +,$-$ or 0-9, or
+ consists entirely of spaces. When this condition is
+ detected, JFLAG is set to 1 and IRESLT is left untouched.
+ \item NSTRT = 1 for the first character in the string.
+ \item On return from sla\_INTIN, NSTRT is set ready for the next
+ decode -- following trailing blanks and any comma. If a
+ delimiter other than comma is being used, NSTRT must be
+ incremented before the next call to sla\_INTIN, otherwise
+ all subsequent calls will return a null result.
+ \item Errors (JFLAG=2) occur when:
+ \begin{itemize}
+ \item there is a + or $-$ but no number; or
+ \item the number is greater than $2^{31}-1$.
+ \end{itemize}
+ \item When an error has been detected, NSTRT is left
+ pointing to the character following the last
+ one used before the error came to light.
+ \item See also sla\_FLOTIN and sla\_DFLTIN.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_INVF}{Invert Linear Model}
+{
+ \action{Invert a linear model of the type produced by the
+ sla\_FITXY routine.}
+ \call{CALL sla\_INVF (FWDS,BKWDS,J)}
+}
+\args{GIVEN}
+{
+ \spec{FWDS}{D(6)}{model coefficients}
+}
+\args{RETURNED}
+{
+ \spec{BKWDS}{D(6)}{inverse model} \\
+ \spec{J}{I}{status: 0 = OK, $-$1 = no inverse}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The models relate two sets of \xy\ coordinates as follows.
+ Naming the six elements of FWDS $a,b,c,d,e$ \& $f$,
+ where two sets of coordinates $[x_{1},y_{1}]$ and
+ $[x_{2},y_{2}\,]$ are related thus:
+ \begin{verse}
+ $x_{2} = a + bx_{1} + cy_{1}$ \\
+ $y_{2} = d + ex_{1} + fy_{1}$
+ \end{verse}
+ The present routine generates a new set of coefficients
+ $p,q,r,s,t$ \& $u$ (the array BKWDS) such that:
+ \begin{verse}
+ $x_{1} = p + qx_{2} + ry_{2}$ \\
+ $y_{1} = s + tx_{2} + uy_{2}$
+ \end{verse}
+ \item Two successive calls to this routine will deliver a set
+ of coefficients equal to the starting values.
+ \item To comply with the ANSI Fortran 77 standard, FWDS and BKWDS must
+ {\bf not} be the same array. The routine is, in fact, coded
+ so as to work properly on the VAX and many other systems even
+ if this rule is violated, something that is {\bf not}, however,
+ recommended.
+ \item See also sla\_FITXY, sla\_PXY, sla\_XY2XY, sla\_DCMPF.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_KBJ}{Select Epoch Prefix}
+{
+ \action{Select epoch prefix `B' or `J'.}
+ \call{CALL sla\_KBJ (JB, E, K, J)}
+}
+\args{GIVEN}
+{
+ \spec{JB}{I}{sla\_DBJIN prefix status: 0=none, 1=`B', 2=`J'} \\
+ \spec{E}{D}{epoch -- Besselian or Julian}
+}
+\args{RETURNED}
+{
+ \spec{K}{C}{`B' or `J'} \\
+ \spec{J}{I}{status: 0=OK}
+}
+\anote{The routine is mainly intended for use in conjunction with the
+ sla\_DBJIN routine. If the value of JB indicates that an explicit
+ B or J prefix was detected by sla\_DBJIN, a `B' or `J'
+ is returned to match. If JB indicates that no explicit B or J
+ was supplied, the choice is made on the basis of the epoch
+ itself; B is assumed for E $<1984$, otherwise J.}
+%-----------------------------------------------------------------------
+\routine{SLA\_M2AV}{Rotation Matrix to Axial Vector}
+{
+ \action{From a rotation matrix, determine the corresponding axial vector
+ (single precision).}
+ \call{CALL sla\_M2AV (RMAT, AXVEC)}
+}
+\args{GIVEN}
+{
+ \spec{RMAT}{R(3,3)}{rotation matrix}
+}
+\args{RETURNED}
+{
+ \spec{AXVEC}{R(3)}{axial vector (radians)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item A rotation matrix describes a rotation about some arbitrary axis.
+ The axis is called the {\it Euler axis}, and the angle through
+ which the reference frame rotates is called the {\it Euler angle}.
+ The {\it axial vector}\/ returned by this routine has the same
+ direction as the Euler axis, and its magnitude is the Euler angle
+ in radians.
+ \item The magnitude and direction of the axial vector can be separated
+ by means of the routine sla\_VN.
+ \item The reference frame rotates clockwise as seen looking along
+ the axial vector from the origin.
+ \item If RMAT is null, so is the result.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_MAP}{Mean to Apparent}
+{
+ \action{Transform star \radec\ from mean place to geocentric apparent.
+ The reference frames and timescales used are post IAU~1976.}
+ \call{CALL sla\_MAP (RM, DM, PR, PD, PX, RV, EQ, DATE, RA, DA)}
+}
+\args{GIVEN}
+{
+ \spec{RM,DM}{D}{mean \radec\ (radians)} \\
+ \spec{PR,PD}{D}{proper motions: \radec\ changes per Julian year} \\
+ \spec{PX}{D}{parallax (arcsec)} \\
+ \spec{RV}{D}{radial velocity (km~s$^{-1}$, +ve if receding)} \\
+ \spec{EQ}{D}{epoch and equinox of star data (Julian)} \\
+ \spec{DATE}{D}{TDB for apparent place (JD$-$2400000.5)}
+}
+\args{RETURNED}
+{
+ \spec{RA,DA}{D}{apparent \radec\ (radians)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item EQ is the Julian epoch specifying both the reference
+ frame and the epoch of the position -- usually 2000.
+ For positions where the epoch and equinox are
+ different, use the routine sla\_PM to apply proper
+ motion corrections before using this routine.
+ \item The distinction between the required TDB and TT is
+ always negligible. Moreover, for all but the most
+ critical applications UTC is adequate.
+ \item The $\alpha$ proper motions are $\dot{\alpha}$ rather than
+ $\dot{\alpha}\cos\delta$, and are per year rather than per century.
+ \item This routine may be wasteful for some applications
+ because it recomputes the Earth position/velocity and
+ the precession/nutation matrix each time, and because
+ it allows for parallax and proper motion. Where
+ multiple transformations are to be carried out for one
+ epoch, a faster method is to call the sla\_MAPPA routine
+ once and then either the sla\_MAPQK routine (which includes
+ parallax and proper motion) or sla\_MAPQKZ (which assumes
+ zero parallax and FK5 proper motion).
+ \end{enumerate}
+}
+\refs
+{
+ \begin{enumerate}
+ \item 1984 {\it Astronomical Almanac}, pp B39-B41.
+ \item Lederle \& Schwan, 1984.\ {\it Astr.Astrophys.}\ {\bf 134}, 1-6.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_MAPPA}{Mean to Apparent Parameters}
+{
+ \action{Compute star-independent parameters in preparation for
+ conversions between mean place and geocentric apparent place.
+ The parameters produced by this routine are required in the
+ parallax, light deflection, aberration, and precession/nutation
+ parts of the mean/apparent transformations.
+ The reference frames and timescales used are post IAU~1976.}
+ \call{CALL sla\_MAPPA (EQ, DATE, AMPRMS)}
+}
+\args{GIVEN}
+{
+ \spec{EQ}{D}{epoch of mean equinox to be used (Julian)} \\
+ \spec{DATE}{D}{TDB (JD$-$2400000.5)}
+}
+\args{RETURNED}
+{
+ \spec{AMPRMS}{D(21)}{star-independent mean-to-apparent parameters:} \\
+ \specel {(1)} {time interval for proper motion (Julian years)} \\
+ \specel {(2-4)} {barycentric position of the Earth (AU)} \\
+ \specel {(5-7)} {heliocentric direction of the Earth (unit vector)} \\
+ \specel {(8)} {(gravitational radius of
+ Sun)$\times 2 / $(Sun-Earth distance)} \\
+ \specel {(9-11)} {{\bf v}: barycentric Earth velocity in units of c} \\
+ \specel {(12)} {$\sqrt{1-\left|\mbox{\bf v}\right|^2}$} \\
+ \specel {(13-21)} {precession/nutation $3\times3$ matrix}
+}
+\notes
+{
+ \begin{enumerate}
+ \item For DATE, the distinction between the required TDB and TT
+ is always negligible. Moreover, for all but the most
+ critical applications UTC is adequate.
+ \item The accuracy of the routines using the parameters AMPRMS is
+ limited by the routine sla\_EVP, used here to compute the
+ Earth position and velocity by the methods of Stumpff.
+ The maximum error in the resulting aberration corrections is
+ about 0.3 milliarcsecond.
+ \item The vectors AMPRMS(2-4) and AMPRMS(5-7) are referred to
+ the mean equinox and equator of epoch EQ.
+ \item The parameters produced by this routine are used by
+ sla\_MAPQK and sla\_MAPQKZ.
+ \end{enumerate}
+}
+\refs
+{
+ \begin{enumerate}
+ \item 1984 {\it Astronomical Almanac}, pp B39-B41.
+ \item Lederle \& Schwan, 1984.\ {\it Astr.Astrophys.}\ {\bf 134}, 1-6.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_MAPQK}{Quick Mean to Apparent}
+{
+ \action{Quick mean to apparent place: transform a star \radec\ from
+ mean place to geocentric apparent place, given the
+ star-independent parameters. The reference frames and
+ timescales used are post IAU 1976.}
+ \call{CALL sla\_MAPQK (RM, DM, PR, PD, PX, RV, AMPRMS, RA, DA)}
+}
+\args{GIVEN}
+{
+ \spec{RM,DM}{D}{mean \radec\ (radians)} \\
+ \spec{PR,PD}{D}{proper motions: \radec\ changes per Julian year} \\
+ \spec{PX}{D}{parallax (arcsec)} \\
+ \spec{RV}{D}{radial velocity (km~s$^{-1}$, +ve if receding)} \\
+ \spec{AMPRMS}{D(21)}{star-independent mean-to-apparent parameters:} \\
+ \specel {(1)} {time interval for proper motion (Julian years)} \\
+ \specel {(2-4)} {barycentric position of the Earth (AU)} \\
+ \specel {(5-7)} {heliocentric direction of the Earth (unit vector)} \\
+ \specel {(8)} {(gravitational radius of
+ Sun)$\times 2 / $(Sun-Earth distance)} \\
+ \specel {(9-11)} {{\bf v}: barycentric Earth velocity in units of c} \\
+ \specel {(12)} {$\sqrt{1-\left|\mbox{\bf v}\right|^2}$} \\
+ \specel {(13-21)} {precession/nutation $3\times3$ matrix}
+}
+\args{RETURNED}
+{
+ \spec{RA,DA}{D }{apparent \radec\ (radians)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item Use of this routine is appropriate when efficiency is important
+ and where many star positions, all referred to the same equator
+ and equinox, are to be transformed for one epoch. The
+ star-independent parameters can be obtained by calling the
+ sla\_MAPPA routine.
+ \item If the parallax and proper motions are zero the sla\_MAPQKZ
+ routine can be used instead.
+ \item The vectors AMPRMS(2-4) and AMPRMS(5-7) are referred to
+ the mean equinox and equator of epoch EQ.
+ \item Strictly speaking, the routine is not valid for solar-system
+ sources, though the error will usually be extremely small.
+ However, to prevent gross errors in the case where the
+ position of the Sun is specified, the gravitational
+ deflection term is restrained within about \arcseci{920} of the
+ centre of the Sun's disc. The term has a maximum value of
+ about \arcsec{1}{85} at this radius, and decreases to zero as
+ the centre of the disc is approached.
+ \end{enumerate}
+}
+\refs
+{
+ \begin{enumerate}
+ \item 1984 {\it Astronomical Almanac}, pp B39-B41.
+ \item Lederle \& Schwan, 1984.\ {\it Astr.Astrophys.}\ {\bf 134}, 1-6.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_MAPQKZ}{Quick Mean-Appt, no PM {\it etc.}}
+{
+ \action{Quick mean to apparent place: transform a star \radec\ from
+ mean place to geocentric apparent place, given the
+ star-independent parameters, and assuming zero parallax
+ and FK5 proper motion.
+ The reference frames and timescales used are post IAU~1976.}
+ \call{CALL sla\_MAPQKZ (RM, DM, AMPRMS, RA, DA)}
+}
+\args{GIVEN}
+{
+ \spec{RM,DM}{D}{mean \radec\ (radians)} \\
+ \spec{AMPRMS}{D(21)}{star-independent mean-to-apparent parameters:} \\
+ \specel {(1)} {time interval for proper motion (Julian years)} \\
+ \specel {(2-4)} {barycentric position of the Earth (AU)} \\
+ \specel {(5-7)} {heliocentric direction of the Earth (unit vector)} \\
+ \specel {(8)} {(gravitational radius of
+ Sun)$\times 2 / $(Sun-Earth distance)} \\
+ \specel {(9-11)} {{\bf v}: barycentric Earth velocity in units of c} \\
+ \specel {(12)} {$\sqrt{1-\left|\mbox{\bf v}\right|^2}$} \\
+ \specel {(13-21)} {precession/nutation $3\times3$ matrix}
+}
+\args{RETURNED}
+{
+ \spec{RA,DA}{D}{apparent \radec\ (radians)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item Use of this routine is appropriate when efficiency is important
+ and where many star positions, all with parallax and proper
+ motion either zero or already allowed for, and all referred to
+ the same equator and equinox, are to be transformed for one
+ epoch. The star-independent parameters can be obtained by
+ calling the sla\_MAPPA routine.
+ \item The corresponding routine for the case of non-zero parallax
+ and FK5 proper motion is sla\_MAPQK.
+ \item The vectors AMPRMS(2-4) and AMPRMS(5-7) are referred to the
+ mean equinox and equator of epoch EQ.
+ \item Strictly speaking, the routine is not valid for solar-system
+ sources, though the error will usually be extremely small.
+ However, to prevent gross errors in the case where the
+ position of the Sun is specified, the gravitational
+ deflection term is restrained within about \arcseci{920} of the
+ centre of the Sun's disc. The term has a maximum value of
+ about \arcsec{1}{85} at this radius, and decreases to zero as
+ the centre of the disc is approached.
+ \end{enumerate}
+}
+\refs
+{
+ \begin{enumerate}
+ \item 1984 {\it Astronomical Almanac}, pp B39-B41.
+ \item Lederle \& Schwan, 1984.\ {\it Astr.Astrophys.}\ {\bf 134}, 1-6.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_MOON}{Approx Moon Pos/Vel}
+{
+ \action{Approximate geocentric position and velocity of the Moon
+ (single precision).}
+ \call{CALL sla\_MOON (IY, ID, FD, PV)}
+}
+\args{GIVEN}
+{
+ \spec{IY}{I}{year} \\
+ \spec{ID}{I}{day in year (1 = Jan 1st)} \\
+ \spec{FD}{R }{fraction of day}
+}
+\args{RETURNED}
+{
+ \spec{PV}{R(6)}{Moon \xyzxyzd, mean equator and equinox of
+ date (AU, AU~s$^{-1}$)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The date and time is TDB (loosely ET) in a Julian calendar
+ which has been aligned to the ordinary Gregorian
+ calendar for the interval 1900 March 1 to 2100 February 28.
+ The year and day can be obtained by calling sla\_CALYD or
+ sla\_CLYD.
+ \item The position is accurate to better than 0.5~arcminute
+ in direction and 1000~km in distance. The velocity
+ is accurate to better than \arcsec{0}{5} per hour in direction
+ and 4~metres per socond in distance. (RMS figures with respect
+ to JPL DE200 for the interval 1960-2025 are \arcseci{14} and
+ \arcsec{0}{2} per hour in longitude, \arcseci{9} and \arcsec{0}{2}
+ per hour in latitude, 350~km and 2~metres per second in distance.)
+ Note that the distance accuracy is comparatively poor because this
+ routine is principally intended for computing topocentric direction.
+ \item This routine is only a partial implementation of the original
+ Meeus algorithm (reference below), which offers 4 times the
+ accuracy in direction and 20 times the accuracy in distance
+ when fully implemented (as it is in sla\_DMOON).
+ \end{enumerate}
+}
+\aref{Meeus, {\it l'Astronomie}, June 1984, p348.}
+%-----------------------------------------------------------------------
+\routine{SLA\_MXM}{Multiply $3\times3$ Matrices}
+{
+ \action{Product of two $3\times3$ matrices (single precision).}
+ \call{CALL sla\_MXM (A, B, C)}
+}
+\args{GIVEN}
+{
+ \spec{A}{R(3,3)}{matrix {\bf A}} \\
+ \spec{B}{R(3,3)}{matrix {\bf B}}
+}
+\args{RETURNED}
+{
+ \spec{C}{R(3,3)}{matrix result: {\bf A}$\times${\bf B}}
+}
+\anote{To comply with the ANSI Fortran 77 standard, A, B and C must
+ be different arrays. The routine is, in fact, coded
+ so as to work properly on the VAX and many other systems even
+ if this rule is violated, something that is {\bf not}, however,
+ recommended.}
+%-----------------------------------------------------------------------
+\routine{SLA\_MXV}{Apply 3D Rotation}
+{
+ \action{Multiply a 3-vector by a rotation matrix (single precision).}
+ \call{CALL sla\_MXV (RM, VA, VB)}
+}
+\args{GIVEN}
+{
+ \spec{RM}{R(3,3)}{rotation matrix} \\
+ \spec{VA}{R(3)}{vector to be rotated}
+}
+\args{RETURNED}
+{
+ \spec{VB}{R(3)}{result vector}
+}
+\notes
+{
+ \begin{enumerate}
+ \item This routine performs the operation:
+ \begin{verse}
+ {\bf b} = {\bf M}$\cdot${\bf a}
+ \end{verse}
+ where {\bf a} and {\bf b} are the 3-vectors VA and VB
+ respectively, and {\bf M} is the $3\times3$ matrix RM.
+ \item The main function of this routine is apply a
+ rotation; under these circumstances, ${\bf M}$ is a
+ {\it proper real orthogonal}\/ matrix.
+ \item To comply with the ANSI Fortran 77 standard, VA and VB must
+ {\bf not} be the same array. The routine is, in fact, coded
+ so as to work properly on the VAX and many other systems even
+ if this rule is violated, something that is {\bf not}, however,
+ recommended.
+ \end{enumerate}
+}
+%------------------------------------------------------------------------------
+\routine{SLA\_NUT}{Nutation Matrix}
+{
+ \action{Form the matrix of nutation (IAU 1980 theory) for a given date.}
+ \call{CALL sla\_NUT (DATE, RMATN)}
+}
+\args{GIVEN}
+{
+ \spec{DATE}{D}{TDB (formerly ET) as Modified Julian Date
+ (JD$-$2400000.5)}
+}
+\args{RETURNED}
+{
+ \spec{RMATN}{D(3,3)}{nutation matrix}
+}
+\anote{The matrix is in the sense:
+ \begin{verse}
+ {\bf v}$_{true}$ = {\bf M}$\cdot${\bf v}$_{mean}$
+ \end{verse}
+ where {\bf v}$_{true}$ is the star vector relative to the
+ true equator and equinox of date, {\bf M} is the
+ $3\times3$ matrix RMATN and
+ {\bf v}$_{mean}$ is the star vector relative to the
+ mean equator and equinox of date.}
+\refs
+{
+ \begin{enumerate}
+ \item Final report of the IAU Working Group on Nutation,
+ chairman P.K.Seidelmann, 1980.
+ \item Kaplan, G.H., 1981.\ {\it USNO circular No.\ 163}, pA3-6.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_NUTC}{Nutation Components}
+{
+ \action{Nutation (IAU 1980 theory): longitude \& obliquity
+ components, and mean obliquity.}
+ \call{CALL sla\_NUTC (DATE, DPSI, DEPS, EPS0)}
+}
+\args{GIVEN}
+{
+ \spec{DATE}{D}{TDB (formerly ET) as Modified Julian Date
+ (JD$-$2400000.5)}
+}
+\args{RETURNED}
+{
+ \spec{DPSI,DEPS}{D}{nutation in longitude and obliquity (radians)} \\
+ \spec{EPS0}{D}{mean obliquity (radians)}
+}
+\refs
+{
+ \begin{enumerate}
+ \item Final report of the IAU Working Group on Nutation,
+ chairman P.K.Seidelmann, 1980.
+ \item Kaplan, G.H., 1981.\ {\it USNO circular no.\ 163}, pA3-6.
+ \end{enumerate}
+}
+%------------------------------------------------------------------------------
+\routine{SLA\_OAP}{Observed to Apparent}
+{
+ \action{Observed to apparent place.}
+ \call{CALL sla\_OAP (\vtop{
+ \hbox{TYPE, OB1, OB2, DATE, DUT, ELONGM, PHIM,}
+ \hbox{HM, XP, YP, TDK, PMB, RH, WL, TLR, RAP, DAP)}}}
+}
+\args{GIVEN}
+{
+ \spec{TYPE}{C*(*)}{type of coordinates -- `R', `H' or `A' (see below)} \\
+ \spec{OB1}{D}{observed Az, HA or RA (radians; Az is N=0, E=$90^{\circ}$)} \\
+ \spec{OB2}{D}{observed zenith distance or $\delta$ (radians)} \\
+ \spec{DATE}{D }{UTC date/time (Modified Julian Date, JD$-$2400000.5)} \\
+ \spec{DUT}{D}{$\Delta$UT: UT1$-$UTC (UTC seconds)} \\
+ \spec{ELONGM}{D}{observer's mean longitude (radians, east +ve)} \\
+ \spec{PHIM}{D}{observer's mean geodetic latitude (radians)} \\
+ \spec{HM}{D}{observer's height above sea level (metres)} \\
+ \spec{XP,YP}{D}{polar motion \xy\ coordinates (radians)} \\
+ \spec{TDK}{D}{local ambient temperature (degrees K; std=273.155D0)} \\
+ \spec{PMB}{D}{local atmospheric pressure (mB; std=1013.25D0)} \\
+ \spec{RH}{D}{local relative humidity (in the range 0D0\,--\,1D0)} \\
+ \spec{WL}{D}{effective wavelength ($\mu{\rm m}$, {\it e.g.}\ 0.55D0)} \\
+ \spec{TLR}{D}{tropospheric lapse rate (degrees K per metre,
+ {\it e.g.}\ 0.0065D0)}
+}
+\args{RETURNED}
+{
+ \spec{RAP,DAP}{D}{geocentric apparent \radec}
+}
+\notes
+{
+ \begin{enumerate}
+ \item Only the first character of the TYPE argument is significant.
+ `R' or `r' indicates that OBS1 and OBS2 are the observed Right
+ Ascension and Declination; `H' or `h' indicates that they are
+ Hour Angle (west +ve) and Declination; anything else (`A' or
+ `a' is recommended) indicates that OBS1 and OBS2 are Azimuth
+ (north zero, east is $90^{\circ}$) and Zenith Distance. (Zenith
+ distance is used rather than elevation in order to reflect the
+ fact that no allowance is made for depression of the horizon.)
+ \item The accuracy of the result is limited by the corrections for
+ refraction. Providing the meteorological parameters are
+ known accurately and there are no gross local effects, the
+ predicted azimuth and elevation should be within about
+ \arcsec{0}{1} for $\zeta<70^{\circ}$. Even
+ at a topocentric zenith distance of
+ $90^{\circ}$, the accuracy in elevation should be better than
+ 1~arcminute; useful results are available for a further
+ $3^{\circ}$, beyond which the sla\_REFRO routine returns a
+ fixed value of the refraction. The complementary
+ routines sla\_AOP (or sla\_AOPQK) and sla\_OAP (or sla\_OAPQK)
+ are self-consistent to better than 1~microarcsecond all over
+ the celestial sphere.
+ \item It is advisable to take great care with units, as even
+ unlikely values of the input parameters are accepted and
+ processed in accordance with the models used.
+ \item {\it Observed}\/ \azel\ means the position that would be seen by a
+ perfect theodolite located at the observer. This is
+ related to the observed \hadec\ via the standard rotation, using
+ the geodetic latitude (corrected for polar motion), while the
+ observed HA and RA are related simply through the local
+ apparent ST. {\it Observed}\/ \radec\ or \hadec\ thus means the
+ position that would be seen by a perfect equatorial located
+ at the observer and with its polar axis aligned to the
+ Earth's axis of rotation ({\it n.b.}\ not to the refracted pole).
+ By removing from the observed place the effects of
+ atmospheric refraction and diurnal aberration, the
+ geocentric apparent \radec\ is obtained.
+ \item Frequently, {\it mean}\/ rather than {\it apparent}\,
+ \radec\ will be required,
+ in which case further transformations will be necessary. The
+ sla\_AMP {\it etc.}\ routines will convert
+ the apparent \radec\ produced
+ by the present routine into an FK5 J2000 mean place, by
+ allowing for the Sun's gravitational lens effect, annual
+ aberration, nutation and precession. Should FK4 B1950
+ coordinates be needed, the routines sla\_FK524 {\it etc.}\ will also
+ need to be applied.
+ \item To convert to apparent \radec\ the coordinates read from a
+ real telescope, corrections would have to be applied for
+ encoder zero points, gear and encoder errors, tube flexure,
+ the position of the rotator axis and the pointing axis
+ relative to it, non-perpendicularity between the mounting
+ axes, and finally for the tilt of the azimuth or polar axis
+ of the mounting (with appropriate corrections for mount
+ flexures). Some telescopes would, of course, exhibit other
+ properties which would need to be accounted for at the
+ appropriate point in the sequence.
+ \item The star-independent apparent-to-observed-place parameters
+ in AOPRMS may be computed by means of the sla\_AOPPA routine.
+ If nothing has changed significantly except the time, the
+ sla\_AOPPAT routine may be used to perform the requisite
+ partial recomputation of AOPRMS.
+ \item The DATE argument is UTC expressed as an MJD. This is,
+ strictly speaking, wrong, because of leap seconds. However,
+ as long as the $\Delta$UT and the UTC are consistent there
+ are no difficulties, except during a leap second. In this
+ case, the start of the 61st second of the final minute should
+ begin a new MJD day and the old pre-leap $\Delta$UT should
+ continue to be used. As the 61st second completes, the MJD
+ should revert to the start of the day as, simultaneously,
+ the $\Delta$UT changes by one second to its post-leap new value.
+ \item The $\Delta$UT (UT1$-$UTC) is tabulated in IERS circulars and
+ elsewhere. It increases by exactly one second at the end of
+ each UTC leap second, introduced in order to keep $\Delta$UT
+ within $\pm$\tsec{0}{9}.
+ \item IMPORTANT -- TAKE CARE WITH THE LONGITUDE SIGN CONVENTION. The
+ longitude required by the present routine is {\bf east-positive},
+ in accordance with geographical convention (and right-handed).
+ In particular, note that the longitudes returned by the
+ sla\_OBS routine are west-positive (as in the {\it Astronomical
+ Almanac}\/ before 1984) and must be reversed in sign before use
+ in the present routine.
+ \item The polar coordinates XP,YP can be obtained from IERS
+ circulars and equivalent publications. The
+ maximum amplitude is about \arcsec{0}{3}. If XP,YP values
+ are unavailable, use XP=YP=0D0. See page B60 of the 1988
+ {\it Astronomical Almanac}\/ for a definition of the two angles.
+ \item The height above sea level of the observing station, HM,
+ can be obtained from the {\it Astronomical Almanac}\/ (Section J
+ in the 1988 edition), or via the routine sla\_OBS. If P,
+ the pressure in mB, is available, an adequate
+ estimate of HM can be obtained from the following expression:
+ \begin{quote}
+ {\tt HM=-29.3D0*TSL*LOG(P/1013.25D0)}
+ \end{quote}
+ where TSL is the approximate sea-level air temperature in degrees K
+ (see {\it Astrophysical Quantities}, C.W.Allen, 3rd~edition,
+ \S 52). Similarly, if the pressure P is not known,
+ it can be estimated from the height of the observing
+ station, HM as follows:
+ \begin{quote}
+ {\tt P=1013.25D0*EXP(-HM/(29.3D0*TSL))}
+ \end{quote}
+ Note, however, that the refraction is proportional to the
+ pressure and that an accurate P value is important for
+ precise work.
+ \item The azimuths {\it etc.}\ used by the present routine are with
+ respect to the celestial pole. Corrections from the terrestrial pole
+ can be computed using sla\_POLMO.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_OAPQK}{Quick Observed to Apparent}
+{
+ \action{Quick observed to apparent place.}
+ \call{CALL sla\_OAPQK (TYPE, OB1, OB2, AOPRMS, RAP, DAP)}
+}
+\args{GIVEN}
+{
+ \spec{TYPE}{C*(*)}{type of coordinates -- `R', `H' or `A' (see below)} \\
+ \spec{OB1}{D}{observed Az, HA or RA (radians; Az is N=0, E=$90^{\circ}$)} \\
+ \spec{OB2}{D}{observed zenith distance or $\delta$ (radians)} \\
+ \spec{AOPRMS}{D(14)}{star-independent apparent-to-observed parameters:} \\
+ \specel {(1)} {geodetic latitude (radians)} \\
+ \specel {(2,3)} {sine and cosine of geodetic latitude} \\
+ \specel {(4)} {magnitude of diurnal aberration vector} \\
+ \specel {(5)} {height (HM)} \\
+ \specel {(6)} {ambient temperature (TDK)} \\
+ \specel {(7)} {pressure (PMB)} \\
+ \specel {(8)} {relative humidity (RH)} \\
+ \specel {(9)} {wavelength (WL)} \\
+ \specel {(10)} {lapse rate (TLR)} \\
+ \specel {(11,12)} {refraction constants A and B (radians)} \\
+ \specel {(13)} {longitude + eqn of equinoxes +
+ ``sidereal $\Delta$UT'' (radians)} \\
+ \specel {(14)} {local apparent sidereal time (radians)}
+}
+\args{RETURNED}
+{
+ \spec{RAP,DAP}{D}{geocentric apparent \radec}
+}
+\notes
+{
+ \begin{enumerate}
+ \item Only the first character of the TYPE argument is significant.
+ `R' or `r' indicates that OBS1 and OBS2 are the observed Right
+ Ascension and Declination; `H' or `h' indicates that they are
+ Hour Angle (west +ve) and Declination; anything else (`A' or
+ `a' is recommended) indicates that OBS1 and OBS2 are Azimuth
+ (north zero, east is $90^{\circ}$) and Zenith Distance. (Zenith
+ distance is used rather than elevation in order to reflect the
+ fact that no allowance is made for depression of the horizon.)
+ \item The accuracy of the result is limited by the corrections for
+ refraction. Providing the meteorological parameters are
+ known accurately and there are no gross local effects, the
+ predicted azimuth and elevation should be within about
+ \arcsec{0}{1} for $\zeta<70^{\circ}$. Even
+ at a topocentric zenith distance of
+ $90^{\circ}$, the accuracy in elevation should be better than
+ 1~arcminute; useful results are available for a further
+ $3^{\circ}$, beyond which the sla\_REFRO routine returns a
+ fixed value of the refraction. The complementary
+ routines sla\_AOP (or sla\_AOPQK) and sla\_OAP (or sla\_OAPQK)
+ are self-consistent to better than 1~microarcsecond all over
+ the celestial sphere.
+ \item It is advisable to take great care with units, as even
+ unlikely values of the input parameters are accepted and
+ processed in accordance with the models used.
+ \item {\it Observed}\/ \azel\ means the position that would be seen by a
+ perfect theodolite located at the observer. This is
+ related to the observed \hadec\ via the standard rotation, using
+ the geodetic latitude (corrected for polar motion), while the
+ observed HA and RA are related simply through the local
+ apparent ST. {\it Observed}\/ \radec\ or \hadec\ thus means the
+ position that would be seen by a perfect equatorial located
+ at the observer and with its polar axis aligned to the
+ Earth's axis of rotation ({\it n.b.}\ not to the refracted pole).
+ By removing from the observed place the effects of
+ atmospheric refraction and diurnal aberration, the
+ geocentric apparent \radec\ is obtained.
+ \item Frequently, {\it mean}\/ rather than {\it apparent}\,
+ \radec\ will be required,
+ in which case further transformations will be necessary. The
+ sla\_AMP {\it etc.}\ routines will convert
+ the apparent \radec\ produced
+ by the present routine into an FK5 J2000 mean place, by
+ allowing for the Sun's gravitational lens effect, annual
+ aberration, nutation and precession. Should FK4 B1950
+ coordinates be needed, the routines sla\_FK524 {\it etc.}\ will also
+ need to be applied.
+ \item To convert to apparent \radec\ the coordinates read from a
+ real telescope, corrections would have to be applied for
+ encoder zero points, gear and encoder errors, tube flexure,
+ the position of the rotator axis and the pointing axis
+ relative to it, non-perpendicularity between the mounting
+ axes, and finally for the tilt of the azimuth or polar axis
+ of the mounting (with appropriate corrections for mount
+ flexures). Some telescopes would, of course, exhibit other
+ properties which would need to be accounted for at the
+ appropriate point in the sequence.
+ \item The star-independent apparent-to-observed-place parameters
+ in AOPRMS may be computed by means of the sla\_AOPPA routine.
+ If nothing has changed significantly except the time, the
+ sla\_AOPPAT routine may be used to perform the requisite
+ partial recomputation of AOPRMS.
+ \item The azimuths {\it etc.}\ used by the present routine are with
+ respect to the celestial pole. Corrections from the terrestrial pole
+ can be computed using sla\_POLMO.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_OBS}{Observatory Parameters}
+{
+ \action{Look up an entry in a standard list of
+ groundbased observing stations parameters.}
+ \call{CALL sla\_OBS (N, C, NAME, W, P, H)}
+}
+\args{GIVEN}
+{
+ \spec{N}{I}{number specifying observing station}
+}
+\args{GIVEN or RETURNED}
+{
+ \spec{C}{C*(*)}{identifier specifying observing station}
+}
+\args{RETURNED}
+{
+ \spec{NAME}{C*(*)}{name of specified observing station} \\
+ \spec{W}{D}{longitude (radians, west +ve)} \\
+ \spec{P}{D}{geodetic latitude (radians, north +ve)} \\
+ \spec{H}{D}{height above sea level (metres)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item Station identifiers C may be up to 10 characters long,
+ and station names NAME may be up to 40 characters long.
+ \item C and N are {\it alternative}\/ ways of specifying the observing
+ station. The C option, which is the most generally useful,
+ may be selected by specifying an N value of zero or less.
+ If N is 1 or more, the parameters of the Nth station
+ in the currently supported list are interrogated, and
+ the station identifier C is returned as well as NAME, W,
+ P and H.
+ \item If the station parameters are not available, either because
+ the station identifier C is not recognized, or because an
+ N value greater than the number of stations supported is
+ given, a name of `?' is returned and W, P and H are left in
+ their current states.
+ \item Programs can obtain a list of all currently supported
+ stations by calling the routine repeatedly, with N=1,2,3...
+ When NAME=`?' is seen, the list of stations has been
+ exhausted. The stations at the time of writing are listed
+ below.
+ \item Station numbers, identifiers, names and other details are
+ subject to change and should not be hardwired into
+ application programs.
+ \item All station identifiers C are uppercase only; lower case
+ characters must be converted to uppercase by the calling
+ program. The station names returned may contain both upper-
+ and lowercase. All characters up to the first space are
+ checked; thus an abbreviated ID will return the parameters
+ for the first station in the list which matches the
+ abbreviation supplied, and no station in the list will ever
+ contain embedded spaces. C must not have leading spaces.
+ \item IMPORTANT -- BEWARE OF THE LONGITUDE SIGN CONVENTION. The
+ longitude returned by sla\_OBS is
+ {\bf west-positive}, following the pre-1984 {\it Astronomical
+ Almanac}. However, this sign convention is left-handed and is
+ the opposite of the one now used; elsewhere in
+ SLALIB the preferable east-positive convention is used. In
+ particular, note that for use in sla\_AOP, sla\_AOPPA and
+ sla\_OAP the sign of the longitude must be reversed.
+ \item Users are urged to inform the author of any improvements
+ they would like to see made. For example:
+ \begin{itemize}
+ \item typographical corrections
+ \item more accurate parameters
+ \item better station identifiers or names
+ \item additional stations
+ \end{itemize}
+ \end{enumerate}
+Stations supported by sla\_OBS at the time of writing:
+\begin{tabbing}
+xxxxxxxxxxxxxxxxx \= \kill
+{\it ID} \> {\it NAME} \\ \\
+AAT \> Anglo-Australian 3.9m Telescope \\
+ANU2.3 \> Siding Spring 2.3 metre \\
+APO3.5 \> Apache Point 3.5m \\
+ARECIBO \> Arecibo 1000 foot \\
+ATCA \> Australia Telescope Compact Array \\
+BLOEMF \> Bloemfontein 1.52 metre \\
+BOSQALEGRE \> Bosque Alegre 1.54 metre \\
+CAMB1MILE \> Cambridge 1 mile \\
+CAMB5KM \> Cambridge 5km \\
+CATALINA61 \> Catalina 61 inch \\
+CFHT \> Canada-France-Hawaii 3.6m Telescope \\
+CSO \> Caltech Sub-mm Observatory, Mauna Kea \\
+DAO72 \> DAO Victoria BC 1.85 metre \\
+DUNLAP74 \> David Dunlap 74 inch \\
+DUPONT \> Du Pont 2.5m Telescope, Las Campanas \\
+EFFELSBERG \> Effelsberg 100 metre \\
+ESO3.6 \> ESO 3.6 metre \\
+ESONTT \> ESO 3.5 metre NTT \\
+ESOSCHM \> ESO 1 metre Schmidt, La Silla \\
+FCRAO \> Five College Radio Astronomy Obs \\
+FLAGSTF61 \> USNO 61 inch astrograph, Flagstaff \\
+GBVA140 \> Greenbank 140 foot \\
+GBVA300 \> Greenbank 300 foot \\
+GEMININ \> Gemini North 8-m telescope \\
+HARVARD \> Harvard College Observatory 1.55m \\
+HPROV1.52 \> Haute Provence 1.52 metre \\
+HPROV1.93 \> Haute Provence 1.93 metre \\
+IRTF \> NASA IR Telescope Facility, Mauna Kea \\
+JCMT \> JCMT 15 metre \\
+JODRELL1 \> Jodrell Bank 250 foot \\
+KECK1 \> Keck 10m Telescope 1 \\
+KECK2 \> Keck 10m Telescope 2 \\
+KISO \> Kiso 1.05 metre Schmidt, Japan \\
+KOTTAMIA \> Kottamia 74 inch \\
+KPNO158 \> Kitt Peak 158 inch \\
+KPNO36FT \> Kitt Peak 36 foot \\
+KPNO84 \> Kitt Peak 84 inch \\
+KPNO90 \> Kitt Peak 90 inch \\
+LICK120 \> Lick 120 inch \\
+LOWELL72 \> Perkins 72 inch, Lowell \\
+LPO1 \> Jacobus Kapteyn 1m Telescope \\
+LPO2.5 \> Isaac Newton 2.5m Telescope \\
+LPO4.2 \> William Herschel 4.2m Telescope \\
+MAUNAK88 \> Mauna Kea 88 inch \\
+MCDONLD2.1 \> McDonald 2.1 metre \\
+MCDONLD2.7 \> McDonald 2.7 metre \\
+MMT \> MMT, Mt Hopkins \\
+MOPRA \> ATNF Mopra Observatory \\
+MTEKAR \> Mt Ekar 1.82 metre \\
+MTHOP1.5 \> Mt Hopkins 1.5 metre \\
+MTLEMMON60 \> Mt Lemmon 60 inch \\
+NOBEYAMA \> Nobeyama 45 metre \\
+OKAYAMA \> Okayama 1.88 metre \\
+PALOMAR200 \> Palomar 200 inch \\
+PALOMAR48 \> Palomar 48-inch Schmidt \\
+PALOMAR60 \> Palomar 60 inch \\
+PARKES \> Parkes 64 metre \\
+QUEBEC1.6 \> Quebec 1.6 metre \\
+SAAO74 \> Sutherland 74 inch \\
+SANPM83 \> San Pedro Martir 83 inch \\
+ST.ANDREWS \> St Andrews University Observatory \\
+STEWARD90 \> Steward 90 inch \\
+STROMLO74 \> Mount Stromlo 74 inch \\
+SUBARU \> Subaru 8 metre \\
+SUGARGROVE \> Sugar Grove 150 foot \\
+TAUTNBG \> Tautenburg 2 metre \\
+TAUTSCHM \> Tautenberg 1.34 metre Schmidt \\
+TIDBINBLA \> Tidbinbilla 64 metre \\
+TOLOLO1.5M \> Cerro Tololo 1.5 metre \\
+TOLOLO4M \> Cerro Tololo 4 metre \\
+UKIRT \> UK Infra Red Telescope \\
+UKST \> UK 1.2 metre Schmidt, Siding Spring \\
+USSR6 \> USSR 6 metre \\
+USSR600 \> USSR 600 foot \\
+VLA \> Very Large Array
+\end{tabbing}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_PA}{$h,\delta$ to Parallactic Angle}
+{
+ \action{Hour angle and declination to parallactic angle
+ (double precision).}
+ \call{D~=~sla\_PA (HA, DEC, PHI)}
+}
+\args{GIVEN}
+{
+ \spec{HA}{D}{hour angle in radians (geocentric apparent)} \\
+ \spec{DEC}{D}{declination in radians (geocentric apparent)} \\
+ \spec{PHI}{D}{latitude in radians (geodetic)}
+}
+\args{RETURNED}
+{
+ \spec{sla\_PA}{D}{parallactic angle (radians, in the range $\pm \pi$)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The parallactic angle at a point in the sky is the position
+ angle of the vertical, {\it i.e.}\ the angle between the direction to
+ the pole and to the zenith. In precise applications care must
+ be taken only to use geocentric apparent \hadec\ and to consider
+ separately the effects of atmospheric refraction and telescope
+ mount errors.
+ \item At the pole a zero result is returned.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_PAV}{Position-Angle Between Two Directions}
+{
+ \action{Returns the bearing (position angle) of one celestial
+ direction with respect to another (single precision).}
+ \call{R~=~sla\_PAV (V1, V2)}
+}
+\args{GIVEN}
+{
+ \spec{V1}{R(3)}{direction cosines of one point} \\
+ \spec{V2}{R(3)}{directions cosines of the other point}
+}
+\args{RETURNED}
+{
+ \spec{sla\_PAV}{R}{position-angle of 2nd point with respect to 1st}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The coordinate frames correspond to \radec,
+ $[\lambda,\phi]$ {\it etc.}.
+ \item The result is the bearing (position angle), in radians,
+ of point V2 as seen
+ from point V1. It is in the range $\pm \pi$. The sense
+ is such that if V2
+ is a small distance due east of V1 the result
+ is about $+\pi/2$. Zero is returned
+ if the two points are coincident.
+ \item The routine sla\_BEAR performs an equivalent function except
+ that the points are specified in the form of spherical coordinates.
+ \end{enumerate}
+}
+%------------------------------------------------------------------------------
+\routine{SLA\_PCD}{Apply Radial Distortion}
+{
+ \action{Apply pincushion/barrel distortion to a tangent-plane \xy.}
+ \call{CALL sla\_PCD (DISCO,X,Y)}
+}
+\args{GIVEN}
+{
+ \spec{DISCO}{D}{pincushion/barrel distortion coefficient} \\
+ \spec{X,Y}{D}{tangent-plane \xy}
+}
+\args{RETURNED}
+{
+ \spec{X,Y}{D}{distorted \xy}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The distortion is of the form $\rho = r (1 + c r^{2})$, where $r$ is
+ the radial distance from the tangent point, $c$ is the DISCO
+ argument, and $\rho$ is the radial distance in the presence of
+ the distortion.
+ \item For {\it pincushion}\/ distortion, C is +ve; for
+ {\it barrel}\/ distortion, C is $-$ve.
+ \item For X,Y in units of one projection radius (in the case of
+ a photographic plate, the focal length), the following
+ DISCO values apply:
+
+ \vspace{2ex}
+
+ \hspace{5em}
+ \begin{tabular}{|l|c|} \hline
+ Geometry & DISCO \\ \hline \hline
+ astrograph & 0.0 \\ \hline
+ Schmidt & $-$0.3333 \\ \hline
+ AAT PF doublet & +147.069 \\ \hline
+ AAT PF triplet & +178.585 \\ \hline
+ AAT f/8 & +21.20 \\ \hline
+ JKT f/8 & +14.6 \\ \hline
+ \end{tabular}
+
+ \vspace{2ex}
+
+ \item There is a companion routine, sla\_UNPCD, which performs
+ an approximately inverse operation.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_PDA2H}{H.A.\ for a Given Azimuth}
+{
+ \action{Hour Angle corresponding to a given azimuth (double precision).}
+ \call{CALL sla\_PDA2H (P, D, A, H1, J1, H2, J2)}
+}
+\args{GIVEN}
+{
+ \spec{P}{D}{latitude} \\
+ \spec{D}{D}{declination} \\
+ \spec{A}{D}{azimuth}
+}
+\args{RETURNED}
+{
+ \spec{H1}{D}{hour angle: first solution if any} \\
+ \spec{J1}{I}{flag: 0 = solution 1 is valid} \\
+ \spec{H2}{D}{hour angle: second solution if any} \\
+ \spec{J2}{I}{flag: 0 = solution 2 is valid}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_PDQ2H}{H.A.\ for a Given P.A.}
+{
+ \action{Hour Angle corresponding to a given parallactic angle
+ (double precision).}
+ \call{CALL sla\_PDQ2H (P, D, Q, H1, J1, H2, J2)}
+}
+\args{GIVEN}
+{
+ \spec{P}{D}{latitude} \\
+ \spec{D}{D}{declination} \\
+ \spec{Q}{D}{azimuth}
+}
+\args{RETURNED}
+{
+ \spec{H1}{D}{hour angle: first solution if any} \\
+ \spec{J1}{I}{flag: 0 = solution 1 is valid} \\
+ \spec{H2}{D}{hour angle: second solution if any} \\
+ \spec{J2}{I}{flag: 0 = solution 2 is valid}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_PERMUT}{Next Permutation}
+{
+ \action{Generate the next permutation of a specified number of items.}
+ \call{CALL sla\_PERMUT (N, ISTATE, IORDER, J)}
+}
+\args{GIVEN}
+{
+ \spec{N}{I}{number of items: there will be N! permutations} \\
+ \spec{ISTATE}{I(N)}{state, ISTATE(1)$=-1$ to initialize}
+}
+\args{RETURNED}
+{
+ \spec{ISTATE}{I(N)}{state, updated ready for next time} \\
+ \spec{IORDER}{I(N)}{next permutation of numbers 1,2,\ldots,N} \\
+ \spec{J}{I}{status:} \\
+ \spec{}{}{\hspace{1.5em} $-$1 = illegal N (zero or less is illegal)} \\
+ \spec{}{}{\hspace{2.3em} 0 = OK} \\
+ \spec{}{}{\hspace{1.5em} $+$1 = no more permutations available}
+}
+\notes
+{
+ \begin{enumerate}
+ \item This routine returns, in the IORDER array, the integers 1 to N
+ inclusive, in an order that depends on the current contents of
+ the ISTATE array. Before calling the routine for the first
+ time, the caller must set the first element of the ISTATE array
+ to $-1$ (any negative number will do) to cause the ISTATE array
+ to be fully initialized.
+ \item The first permutation to be generated is:
+ \begin{verse}
+ IORDER(1)=N, IORDER(2)=N-1, ..., IORDER(N)=1
+ \end{verse}
+ This is also the permutation returned for the ``finished'' (J=1) case.
+ The final permutation to be generated is:
+ \begin{verse}
+ IORDER(1)=1, IORDER(2)=2, ..., IORDER(N)=N
+ \end{verse}
+ \item If the ``finished'' (J=1) status is ignored, the routine continues
+ to deliver permutations, the pattern repeating every~N!\,~calls.
+ \end{enumerate}
+}
+%------------------------------------------------------------------------------
+\routine{SLA\_PERTEL}{Perturbed Orbital Elements}
+{
+ \action{Update the osculating elements of an asteroid or comet by
+ applying planetary perturbations.}
+ \call{CALL sla\_PERTEL (\vtop{
+ \hbox{JFORM, DATE0, DATE1,}
+ \hbox{EPOCH0, ORBI0, ANODE0, PERIH0, AORQ0, E0, AM0,}
+ \hbox{EPOCH1, ORBI1, ANODE1, PERIH1, AORQ1, E1, AM1,}
+ \hbox{JSTAT)}}}
+}
+\args{GIVEN (format and dates)}
+{
+ \spec{JFORM}{I}{choice of element set (2 or 3; Note~1)} \\
+ \spec{DATE0}{D}{date of osculation (TT MJD) for the given} \\
+ \spec{}{}{\hspace{1.5em} elements} \\
+ \spec{DATE1}{D}{date of osculation (TT MJD) for the updated} \\
+ \spec{}{}{\hspace{1.5em} elements}
+}
+\args{GIVEN (the unperturbed elements)}
+{
+ \spec{EPOCH0}{D}{epoch of the given element set
+ ($t_0$ or $T$, TT MJD;} \\
+ \spec{}{}{\hspace{1.5em} Note~2)} \\
+ \spec{ORBI0}{D}{inclination ($i$, radians)} \\
+ \spec{ANODE0}{D}{longitude of the ascending node ($\Omega$, radians)} \\
+ \spec{PERIH0}{D}{argument of perihelion
+ ($\omega$, radians)} \\
+ \spec{AORQ0}{D}{mean distance or perihelion distance ($a$ or $q$, AU)} \\
+ \spec{E0}{D}{eccentricity ($e$)} \\
+ \spec{AM0}{D}{mean anomaly ($M$, radians, JFORM=2 only)}
+}
+\args{RETURNED (the updated elements)}
+{
+ \spec{EPOCH1}{D}{epoch of the updated element set
+ ($t_0$ or $T$,} \\
+ \spec{}{}{\hspace{1.5em} TT MJD; Note~2)} \\
+ \spec{ORBI1}{D}{inclination ($i$, radians)} \\
+ \spec{ANODE1}{D}{longitude of the ascending node ($\Omega$, radians)} \\
+ \spec{PERIH1}{D}{argument of perihelion
+ ($\omega$, radians)} \\
+ \spec{AORQ1}{D}{mean distance or perihelion distance ($a$ or $q$, AU)} \\
+ \spec{E1}{D}{eccentricity ($e$)} \\
+ \spec{AM1}{D}{mean anomaly ($M$, radians, JFORM=2 only)}
+}
+\args{RETURNED (status flag)}
+{
+ \spec{JSTAT}{I}{status:} \\
+ \spec{}{}{\hspace{0.5em}+102 = warning, distant epoch} \\
+ \spec{}{}{\hspace{0.5em}+101 = warning, large timespan
+ ($>100$ years)} \\
+ \spec{}{}{\hspace{-1.3em}+1 to +8 = coincident with major planet
+ (Note~6)} \\
+ \spec{}{}{\hspace{1.95em} 0 = OK} \\
+ \spec{}{}{\hspace{1.2em} $-$1 = illegal JFORM} \\
+ \spec{}{}{\hspace{1.2em} $-$2 = illegal E0} \\
+ \spec{}{}{\hspace{1.2em} $-$3 = illegal AORQ0} \\
+ \spec{}{}{\hspace{1.2em} $-$4 = internal error} \\
+ \spec{}{}{\hspace{1.2em} $-$5 = numerical error}
+}
+\notes
+{
+ \begin{enumerate}
+ \item Two different element-format options are supported, as follows. \\
+
+ JFORM=2, suitable for minor planets:
+
+ \begin{tabbing}
+ xxx \= xxxxxxxx \= xx \= \kill
+ \> EPOCH \> = \> epoch of elements $t_0$ (TT MJD) \\
+ \> ORBINC \> = \> inclination $i$ (radians) \\
+ \> ANODE \> = \> longitude of the ascending node $\Omega$ (radians) \\
+ \> PERIH \> = \> argument of perihelion $\omega$ (radians) \\
+ \> AORQ \> = \> mean distance $a$ (AU) \\
+ \> E \> = \> eccentricity $e$ $( 0 \leq e < 1 )$ \\
+ \> AORL \> = \> mean anomaly $M$ (radians)
+ \end{tabbing}
+
+ JFORM=3, suitable for comets:
+
+ \begin{tabbing}
+ xxx \= xxxxxxxx \= xx \= \kill
+ \> EPOCH \> = \> epoch of perihelion $T$ (TT MJD) \\
+ \> ORBINC \> = \> inclination $i$ (radians) \\
+ \> ANODE \> = \> longitude of the ascending node $\Omega$ (radians) \\
+ \> PERIH \> = \> argument of perihelion $\omega$ (radians) \\
+ \> AORQ \> = \> perihelion distance $q$ (AU) \\
+ \> E \> = \> eccentricity $e$ $( 0 \leq e \leq 10 )$
+ \end{tabbing}
+ \item DATE0, DATE1, EPOCH0 and EPOCH1 are all instants of time in
+ the TT timescale (formerly Ephemeris Time, ET), expressed
+ as Modified Julian Dates (JD$-$2400000.5).
+ \begin{itemize}
+ \item DATE0 is the instant at which the given
+ ({\it i.e.}\ unperturbed) osculating elements are correct.
+ \item DATE1 is the specified instant at which the updated osculating
+ elements are correct.
+ \item EPOCH0 and EPOCH1 will be the same as DATE0 and DATE1
+ (respectively) for the JFORM=2 case, normally used for minor
+ planets. For the JFORM=3 case, the two epochs will refer to
+ perihelion passage and so will not, in general, be the same as
+ DATE0 and/or DATE1 though they may be similar to one another.
+ \end{itemize}
+ \item The elements are with respect to the J2000 ecliptic and mean equinox.
+ \item Unused elements (AM0 and AM1 for JFORM=3) are not accessed.
+ \item See the sla\_PERTUE routine for details of the algorithm used.
+ \item This routine is not intended to be used for major planets, which
+ is why JFORM=1 is not available and why there is no opportunity
+ to specify either the longitude of perihelion or the daily
+ motion. However, if JFORM=2 elements are somehow obtained for a
+ major planet and supplied to the routine, sensible results will,
+ in fact, be produced. This happens because the sla\_PERTUE routine
+ that is called to perform the calculations checks the separation
+ between the body and each of the planets and interprets a
+ suspiciously small value (0.001~AU) as an attempt to apply it to
+ the planet concerned. If this condition is detected, the
+ contribution from that planet is ignored, and the status is set to
+ the planet number (Mercury=1,\ldots,Neptune=8) as a warning.
+ \end{enumerate}
+}
+\aref{Sterne, Theodore E., {\it An Introduction to Celestial Mechanics,}\/
+ Interscience Publishers, 1960. Section 6.7, p199.}
+%------------------------------------------------------------------------------
+\routine{SLA\_PERTUE}{Perturbed Universal Elements}
+{
+ \action{Update the universal elements of an asteroid or comet by
+ applying planetary perturbations.}
+ \call{CALL sla\_PERTUE (DATE, U, JSTAT)}
+}
+\args{GIVEN}
+{
+ \spec{DATE1}{D}{final epoch (TT MJD) for the updated elements}
+}
+\args{GIVEN and RETURNED}
+{
+ \spec{U}{D(13)}{universal elements (updated in place)} \\
+ \specel {(1)} {combined mass ($M+m$)} \\
+ \specel {(2)} {total energy of the orbit ($\alpha$)} \\
+ \specel {(3)} {reference (osculating) epoch ($t_0$)} \\
+ \specel {(4-6)} {position at reference epoch (${\rm \bf r}_0$)} \\
+ \specel {(7-9)} {velocity at reference epoch (${\rm \bf v}_0$)} \\
+ \specel {(10)} {heliocentric distance at reference epoch} \\
+ \specel {(11)} {${\rm \bf r}_0.{\rm \bf v_0}$} \\
+ \specel {(12)} {date ($t$)} \\
+ \specel {(13)} {universal eccentric anomaly ($\psi$) of date, approx}
+}
+\args{RETURNED}
+{
+ \spec{JSTAT}{I}{status:} \\
+ \spec{}{}{\hspace{0.5em}+102 = warning, distant epoch} \\
+ \spec{}{}{\hspace{0.5em}+101 = warning, large timespan
+ ($>100$ years)} \\
+ \spec{}{}{\hspace{-1.3em}+1 to +8 = coincident with major planet
+ (Note~5)} \\
+ \spec{}{}{\hspace{1.95em} 0 = OK} \\
+ \spec{}{}{\hspace{1.2em} $-$1 = numerical error}
+}
+\notes
+{
+ \begin{enumerate}
+ \setlength{\parskip}{\medskipamount}
+ \item The ``universal'' elements are those which define the orbit for the
+ purposes of the method of universal variables (see reference 2).
+ They consist of the combined mass of the two bodies, an epoch,
+ and the position and velocity vectors (arbitrary reference frame)
+ at that epoch. The parameter set used here includes also various
+ quantities that can, in fact, be derived from the other
+ information. This approach is taken to avoiding unnecessary
+ computation and loss of accuracy. The supplementary quantities
+ are (i)~$\alpha$, which is proportional to the total energy of the
+ orbit, (ii)~the heliocentric distance at epoch,
+ (iii)~the outwards component of the velocity at the given epoch,
+ (iv)~an estimate of $\psi$, the ``universal eccentric anomaly'' at a
+ given date and (v)~that date.
+ \item The universal elements are with respect to the J2000 equator and
+ equinox.
+ \item The epochs DATE, U(3) and U(12) are all Modified Julian Dates
+ (JD$-$2400000.5).
+ \item The algorithm is a simplified form of Encke's method. It takes as
+ a basis the unperturbed motion of the body, and numerically
+ integrates the perturbing accelerations from the major planets.
+ The expression used is essentially Sterne's 6.7-2 (reference 1).
+ Everhart and Pitkin (reference 2) suggest rectifying the orbit at
+ each integration step by propagating the new perturbed position
+ and velocity as the new universal variables. In the present
+ routine the orbit is rectified less frequently than this, in order
+ to gain a slight speed advantage. However, the rectification is
+ done directly in terms of position and velocity, as suggested by
+ Everhart and Pitkin, bypassing the use of conventional orbital
+ elements.
+
+ The $f(q)$ part of the full Encke method is not used. The purpose
+ of this part is to avoid subtracting two nearly equal quantities
+ when calculating the ``indirect member'', which takes account of the
+ small change in the Sun's attraction due to the slightly displaced
+ position of the perturbed body. A simpler, direct calculation in
+ double precision proves to be faster and not significantly less
+ accurate.
+
+ Apart from employing a variable timestep, and occasionally
+ ``rectifying the orbit'' to keep the indirect member small, the
+ integration is done in a fairly straightforward way. The
+ acceleration estimated for the middle of the timestep is assumed
+ to apply throughout that timestep; it is also used in the
+ extrapolation of the perturbations to the middle of the next
+ timestep, to predict the new disturbed position. There is no
+ iteration within a timestep.
+
+ Measures are taken to reach a compromise between execution time
+ and accuracy. The starting-point is the goal of achieving
+ arcsecond accuracy for ordinary minor planets over a ten-year
+ timespan. This goal dictates how large the timesteps can be,
+ which in turn dictates how frequently the unperturbed motion has
+ to be recalculated from the osculating elements.
+
+ Within predetermined limits, the timestep for the numerical
+ integration is varied in length in inverse proportion to the
+ magnitude of the net acceleration on the body from the major
+ planets.
+
+ The numerical integration requires estimates of the major-planet
+ motions. Approximate positions for the major planets (Pluto
+ alone is omitted) are obtained from the routine sla\_PLANET. Two
+ levels of interpolation are used, to enhance speed without
+ significantly degrading accuracy. At a low frequency, the routine
+ sla\_PLANET is called to generate updated position+velocity ``state
+ vectors''. The only task remaining to be carried out at the full
+ frequency ({\it i.e.}\ at each integration step) is to use the state
+ vectors to extrapolate the planetary positions. In place of a
+ strictly linear extrapolation, some allowance is made for the
+ curvature of the orbit by scaling back the radius vector as the
+ linear extrapolation goes off at a tangent.
+
+ Various other approximations are made. For example, perturbations
+ by Pluto and the minor planets are neglected, relativistic effects
+ are not taken into account and the Earth-Moon system is treated as
+ a single body.
+
+ In the interests of simplicity, the background calculations for
+ the major planets are carried out {\it en masse.}
+ The mean elements and
+ state vectors for all the planets are refreshed at the same time,
+ without regard for orbit curvature, mass or proximity.
+
+ \item This routine is not intended to be used for major planets.
+ However, if major-planet elements are supplied, sensible results
+ will, in fact, be produced. This happens because the routine
+ checks the separation between the body and each of the planets and
+ interprets a suspiciously small value (0.001~AU) as an attempt to
+ apply the routine to the planet concerned. If this condition
+ is detected, the
+ contribution from that planet is ignored, and the status is set to
+ the planet number (Mercury=1,\ldots,Neptune=8) as a warning.
+ \end{enumerate}
+}
+\refs{
+ \begin{enumerate}
+ \item Sterne, Theodore E., {\it An Introduction to Celestial Mechanics,}\/
+ Interscience Publishers, 1960. Section 6.7, p199.
+ \item Everhart, E. \& Pitkin, E.T., Am.~J.~Phys.~51, 712, 1983.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_PLANEL}{Planet Position from Elements}
+{
+ \action{Heliocentric position and velocity of a planet,
+ asteroid or comet, starting from orbital elements.}
+ \call{CALL sla\_PLANEL (\vtop{
+ \hbox{DATE, JFORM, EPOCH, ORBINC, ANODE, PERIH,}
+ \hbox{AORQ, E, AORL, DM, PV, JSTAT)}}}
+}
+\args{GIVEN}
+{
+ \spec{DATE}{D}{Modified Julian Date (JD$-$2400000.5)} \\
+ \spec{JFORM}{I}{choice of element set (1-3, see Note~3, below)} \\
+ \spec{EPOCH}{D}{epoch of elements ($t_0$ or $T$, TT MJD)} \\
+ \spec{ORBINC}{D}{inclination ($i$, radians)} \\
+ \spec{ANODE}{D}{longitude of the ascending node ($\Omega$, radians)} \\
+ \spec{PERIH}{D}{longitude or argument of perihelion
+ ($\varpi$ or $\omega$,} \\
+ \spec{}{}{\hspace{1.5em} radians)} \\
+ \spec{AORQ}{D}{mean distance or perihelion distance ($a$ or $q$, AU)} \\
+ \spec{E}{D}{eccentricity ($e$)} \\
+ \spec{AORL}{D}{mean anomaly or longitude
+ ($M$ or $L$, radians,} \\
+ \spec{}{}{\hspace{1.5em} JFORM=1,2 only)} \\
+ \spec{DM}{D}{daily motion ($n$, radians, JFORM=1 only)}
+}
+\args{RETURNED}
+{
+ \spec{PV}{D(6)}{heliocentric \xyzxyzd, equatorial, J2000} \\
+ \spec{}{}{\hspace{1.5em} (AU, AU/s)} \\
+ \spec{JSTAT}{I}{status:} \\
+ \spec{}{}{\hspace{2.3em} 0 = OK} \\
+ \spec{}{}{\hspace{1.5em} $-$1 = illegal JFORM} \\
+ \spec{}{}{\hspace{1.5em} $-$2 = illegal E} \\
+ \spec{}{}{\hspace{1.5em} $-$3 = illegal AORQ} \\
+ \spec{}{}{\hspace{1.5em} $-$4 = illegal DM} \\
+ \spec{}{}{\hspace{1.5em} $-$5 = numerical error}
+}
+\notes
+{
+ \begin{enumerate}
+ \item DATE is the instant for which the prediction is
+ required. It is in the TT timescale (formerly
+ Ephemeris Time, ET) and is a
+ Modified Julian Date (JD$-$2400000.5).
+ \item The elements are with respect to
+ the J2000 ecliptic and equinox.
+ \item Three different element-format options are available, as
+ follows. \\
+
+ JFORM=1, suitable for the major planets:
+
+ \begin{tabbing}
+ xxx \= xxxxxxxx \= xx \= \kill
+ \> EPOCH \> = \> epoch of elements $t_0$ (TT MJD) \\
+ \> ORBINC \> = \> inclination $i$ (radians) \\
+ \> ANODE \> = \> longitude of the ascending node $\Omega$ (radians) \\
+ \> PERIH \> = \> longitude of perihelion $\varpi$ (radians) \\
+ \> AORQ \> = \> mean distance $a$ (AU) \\
+ \> E \> = \> eccentricity $e$ $( 0 \leq e < 1 )$ \\
+ \> AORL \> = \> mean longitude $L$ (radians) \\
+ \> DM \> = \> daily motion $n$ (radians)
+ \end{tabbing}
+
+ JFORM=2, suitable for minor planets:
+
+ \begin{tabbing}
+ xxx \= xxxxxxxx \= xx \= \kill
+ \> EPOCH \> = \> epoch of elements $t_0$ (TT MJD) \\
+ \> ORBINC \> = \> inclination $i$ (radians) \\
+ \> ANODE \> = \> longitude of the ascending node $\Omega$ (radians) \\
+ \> PERIH \> = \> argument of perihelion $\omega$ (radians) \\
+ \> AORQ \> = \> mean distance $a$ (AU) \\
+ \> E \> = \> eccentricity $e$ $( 0 \leq e < 1 )$ \\
+ \> AORL \> = \> mean anomaly $M$ (radians)
+ \end{tabbing}
+
+ JFORM=3, suitable for comets:
+
+ \begin{tabbing}
+ xxx \= xxxxxxxx \= xx \= \kill
+ \> EPOCH \> = \> epoch of perihelion $T$ (TT MJD) \\
+ \> ORBINC \> = \> inclination $i$ (radians) \\
+ \> ANODE \> = \> longitude of the ascending node $\Omega$ (radians) \\
+ \> PERIH \> = \> argument of perihelion $\omega$ (radians) \\
+ \> AORQ \> = \> perihelion distance $q$ (AU) \\
+ \> E \> = \> eccentricity $e$ $( 0 \leq e \leq 10 )$
+ \end{tabbing}
+ \item Unused elements (DM for JFORM=2, AORL and DM for JFORM=3) are
+ not accessed.
+ \item The reference frame for the result is equatorial and is with
+ respect to the mean equinox and ecliptic of epoch J2000.
+ \item The algorithm was originally adapted from the EPHSLA program of
+ D.\,H.\,P.\,Jones (private communication, 1996). The method
+ is based on Stumpff's Universal Variables.
+ \end{enumerate}
+}
+\aref{Everhart, E. \& Pitkin, E.T., Am.~J.~Phys.~51, 712, 1983.}
+%------------------------------------------------------------------------------
+\routine{SLA\_PLANET}{Planetary Ephemerides}
+{
+ \action{Approximate heliocentric position and velocity of a planet.}
+ \call{CALL sla\_PLANET (DATE, NP, PV, JSTAT)}
+}
+\args{GIVEN}
+{
+ \spec{DATE}{D}{Modified Julian Date (JD$-$2400000.5)} \\
+ \spec{NP}{I}{planet:} \\
+ \spec{}{}{\hspace{1.5em} 1\,=\,Mercury} \\
+ \spec{}{}{\hspace{1.5em} 2\,=\,Venus} \\
+ \spec{}{}{\hspace{1.5em} 3\,=\,Earth-Moon Barycentre} \\
+ \spec{}{}{\hspace{1.5em} 4\,=\,Mars} \\
+ \spec{}{}{\hspace{1.5em} 5\,=\,Jupiter} \\
+ \spec{}{}{\hspace{1.5em} 6\,=\,Saturn} \\
+ \spec{}{}{\hspace{1.5em} 7\,=\,Uranus} \\
+ \spec{}{}{\hspace{1.5em} 8\,=\,Neptune} \\
+ \spec{}{}{\hspace{1.5em} 9\,=\,Pluto}
+}
+\args{RETURNED}
+{
+ \spec{PV}{D(6)}{heliocentric \xyzxyzd, equatorial, J2000} \\
+ \spec{}{}{\hspace{1.5em} (AU, AU/s)} \\
+ \spec{JSTAT}{I}{status:} \\
+ \spec{}{}{\hspace{1.5em} $+$1 = warning: date outside of range} \\
+ \spec{}{}{\hspace{2.3em} 0 = OK} \\
+ \spec{}{}{\hspace{1.5em} $-$1 = illegal NP (outside 1-9)} \\
+ \spec{}{}{\hspace{1.5em} $-$2 = solution didn't converge}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The epoch, DATE, is in the TDB timescale and is in the form
+ of a Modified Julian Date (JD$-$2400000.5).
+ \item The reference frame is equatorial and is with respect to
+ the mean equinox and ecliptic of epoch J2000.
+ \item If a planet number, NP, outside the range 1-9 is supplied, an error
+ status is returned (JSTAT~=~$-1$) and the PV vector
+ is set to zeroes.
+ \item The algorithm for obtaining the mean elements of the
+ planets from Mercury to Neptune is due to
+ J.\,L.\,Simon, P.\,Bretagnon, J.\,Chapront,
+ M.\,Chapront-Touze, G.\,Francou and J.\,Laskar (Bureau des
+ Longitudes, Paris, France). The (completely different)
+ algorithm for calculating the ecliptic coordinates of
+ Pluto is by Meeus.
+ \item Comparisons of the present routine with the JPL DE200 ephemeris
+ give the following RMS errors over the interval 1960-2025:
+ \begin{tabbing}
+ xxxxx \= xxxxxxxxxxxxxxxxx \= xxxxxxxxxxxxxx \= \kill
+ \> \> {\it position (km)} \> {\it speed (metre/sec)} \\ \\
+ \> Mercury \> \hspace{2em}334 \> \hspace{2.5em}0.437 \\
+ \> Venus \> \hspace{1.5em}1060 \> \hspace{2.5em}0.855 \\
+ \> EMB \> \hspace{1.5em}2010 \> \hspace{2.5em}0.815 \\
+ \> Mars \> \hspace{1.5em}7690 \> \hspace{2.5em}1.98 \\
+ \> Jupiter \> \hspace{1em}71700 \> \hspace{2.5em}7.70 \\
+ \> Saturn \> \hspace{0.5em}199000 \> \hspace{2em}19.4 \\
+ \> Uranus \> \hspace{0.5em}564000 \> \hspace{2em}16.4 \\
+ \> Neptune \> \hspace{0.5em}158000 \> \hspace{2em}14.4 \\
+ \> Pluto \> \hspace{1em}36400 \> \hspace{2.5em}0.137
+ \end{tabbing}
+ From comparisons with DE102, Simon {\it et al.}\/ quote the following
+ longitude accuracies over the interval 1800-2200:
+ \begin{tabbing}
+ xxxxx \= xxxxxxxxxxxxxxxxxxxx \= \kill
+ \> Mercury \> \hspace{0.5em}\arcseci{4} \\
+ \> Venus \> \hspace{0.5em}\arcseci{5} \\
+ \> EMB \> \hspace{0.5em}\arcseci{6} \\
+ \> Mars \> \arcseci{17} \\
+ \> Jupiter \> \arcseci{71} \\
+ \> Saturn \> \arcseci{81} \\
+ \> Uranus \> \arcseci{86} \\
+ \> Neptune \> \arcseci{11}
+ \end{tabbing}
+ In the case of Pluto, Meeus quotes an accuracy of \arcsec{0}{6}
+ in longitude and \arcsec{0}{2} in latitude for the period
+ 1885-2099.
+
+ For all except Pluto, over the period 1000-3000,
+ the accuracy is better than 1.5
+ times that over 1800-2200. Outside the interval 1000-3000 the
+ accuracy declines. For Pluto the accuracy declines rapidly
+ outside the period 1885-2099. Outside these ranges
+ (1885-2099 for Pluto, 1000-3000 for the rest) a ``date out
+ of range'' warning status ({\tt JSTAT=+1}) is returned.
+ \item The algorithms for (i)~Mercury through Neptune and
+ (ii)~Pluto are completely independent. In the Mercury
+ through Neptune case, the present SLALIB
+ implementation differs from the original
+ Simon {\it et al.}\/ Fortran code in the following respects:
+ \begin{itemize}
+ \item The date is supplied as a Modified Julian Date rather
+ a Julian Date (${\rm MJD} = ({\rm JD} - 2400000.5$).
+ \item The result is returned only in equatorial
+ Cartesian form; the ecliptic
+ longitude, latitude and radius vector are not returned.
+ \item The velocity is in AU per second, not AU per day.
+ \item Different error/warning status values are used.
+ \item Kepler's Equation is not solved inline.
+ \item Polynomials in T are nested to minimize rounding errors.
+ \item Explicit double-precision constants are used to avoid
+ mixed-mode expressions.
+ \item There are other, cosmetic, changes to comply with
+ Starlink/SLALIB style guidelines.
+ \end{itemize}
+ None of the above changes affects the result significantly.
+ \item NP\,=\,3 the result is for the Earth-Moon Barycentre. To
+ obtain the heliocentric position and velocity of the Earth,
+ either use the SLALIB routine sla\_EVP or call sla\_DMOON and
+ subtract 0.012150581 times the geocentric Moon vector from
+ the EMB vector produced by the present routine. (The Moon
+ vector should be precessed to J2000 first, but this can
+ be omitted for modern epochs without introducing significant
+ inaccuracy.)
+ \end{enumerate}
+\refs
+{
+ \begin{enumerate}
+ \item Simon {\it et al.,}\/
+ Astron.\ Astrophys.\ {\bf 282}, 663 (1994).
+ \item Meeus, J.,
+ {\it Astronomical Algorithms,}\/ Willmann-Bell (1991).
+ \end{enumerate}
+}
+}
+%------------------------------------------------------------------------------
+\routine{SLA\_PLANTE}{\radec\ of Planet from Elements}
+{
+ \action{Topocentric apparent \radec\ of a Solar-System object whose
+ heliocentric orbital elements are known.}
+ \call{CALL sla\_PLANTE (\vtop{
+ \hbox{DATE, ELONG, PHI, JFORM, EPOCH, ORBINC, ANODE, PERIH,}
+ \hbox{AORQ, E, AORL, DM, RA, DEC, R, JSTAT)}}}
+}
+\args{GIVEN}
+{
+ \spec{DATE}{D}{MJD of observation (JD$-$2400000.5)} \\
+ \spec{ELONG,PHI}{D}{observer's longitude (east +ve) and latitude} \\
+ \spec{}{}{\hspace{1.5em} radians)} \\
+ \spec{JFORM}{I}{choice of element set (1-3, see Note~4, below)} \\
+ \spec{EPOCH}{D}{epoch of elements ($t_0$ or $T$, TT MJD)} \\
+ \spec{ORBINC}{D}{inclination ($i$, radians)} \\
+ \spec{ANODE}{D}{longitude of the ascending node ($\Omega$, radians)} \\
+ \spec{PERIH}{D}{longitude or argument of perihelion
+ ($\varpi$ or $\omega$,} \\
+ \spec{}{}{\hspace{1.5em} radians)} \\
+ \spec{AORQ}{D}{mean distance or perihelion distance ($a$ or $q$, AU)} \\
+ \spec{E}{D}{eccentricity ($e$)} \\
+ \spec{AORL}{D}{mean anomaly or longitude ($M$ or $L$,} \\
+ \spec{}{}{\hspace{1.5em} radians, JFORM=1,2 only)} \\
+ \spec{DM}{D}{daily motion ($n$, radians, JFORM=1 only)}
+}
+\args{RETURNED}
+{
+ \spec{RA,DEC}{D}{topocentric apparent \radec\ (radians)} \\
+ \spec{R}{D}{distance from observer (AU)} \\
+ \spec{JSTAT}{I}{status:} \\
+ \spec{}{}{\hspace{2.3em} 0 = OK} \\
+ \spec{}{}{\hspace{1.5em} $-$1 = illegal JFORM} \\
+ \spec{}{}{\hspace{1.5em} $-$2 = illegal E} \\
+ \spec{}{}{\hspace{1.5em} $-$3 = illegal AORQ} \\
+ \spec{}{}{\hspace{1.5em} $-$4 = illegal DM} \\
+ \spec{}{}{\hspace{1.5em} $-$5 = numerical error}
+}
+\notes
+{
+ \begin{enumerate}
+ \item DATE is the instant for which the prediction is
+ required. It is in the TT timescale (formerly
+ Ephemeris Time, ET) and is a
+ Modified Julian Date (JD$-$2400000.5).
+ \item The longitude and latitude allow correction for geocentric
+ parallax. This is usually a small effect, but can become
+ important for Earth-crossing asteroids. Geocentric positions
+ can be generated by appropriate use of the routines
+ sla\_EVP and sla\_PLANEL.
+ \item The elements are with respect to the J2000 ecliptic and equinox.
+ \item Three different element-format options are available, as
+ follows. \\
+
+ JFORM=1, suitable for the major planets:
+
+ \begin{tabbing}
+ xxx \= xxxxxxx \= xx \= \kill
+ \> EPOCH \> = \> epoch of elements $t_0$ (TT MJD) \\
+ \> ORBINC \> = \> inclination $i$ (radians) \\
+ \> ANODE \> = \> longitude of the ascending node $\Omega$ (radians) \\
+ \> PERIH \> = \> longitude of perihelion $\varpi$ (radians) \\
+ \> AORQ \> = \> mean distance $a$ (AU) \\
+ \> E \> = \> eccentricity $e$ \\
+ \> AORL \> = \> mean longitude $L$ (radians) \\
+ \> DM \> = \> daily motion $n$ (radians)
+ \end{tabbing}
+
+ JFORM=2, suitable for minor planets:
+
+ \begin{tabbing}
+ xxx \= xxxxxxx \= xx \= \kill
+ \> EPOCH \> = \> epoch of elements $t_0$ (TT MJD) \\
+ \> ORBINC \> = \> inclination $i$ (radians) \\
+ \> ANODE \> = \> longitude of the ascending node $\Omega$ (radians) \\
+ \> PERIH \> = \> argument of perihelion $\omega$ (radians) \\
+ \> AORQ \> = \> mean distance $a$ (AU) \\
+ \> E \> = \> eccentricity $e$ \\
+ \> AORL \> = \> mean anomaly $M$ (radians)
+ \end{tabbing}
+
+ JFORM=3, suitable for comets:
+
+ \begin{tabbing}
+ xxx \= xxxxxxx \= xx \= \kill
+ \> EPOCH \> = \> epoch of perihelion $T$ (TT MJD) \\
+ \> ORBINC \> = \> inclination $i$ (radians) \\
+ \> ANODE \> = \> longitude of the ascending node $\Omega$ (radians) \\
+ \> PERIH \> = \> argument of perihelion $\omega$ (radians) \\
+ \> AORQ \> = \> perihelion distance $q$ (AU) \\
+ \> E \> = \> eccentricity $e$
+ \end{tabbing}
+ \item Unused elements (DM for JFORM=2, AORL and DM for JFORM=3) are
+ not accessed.
+ \end{enumerate}
+}
+%------------------------------------------------------------------------------
+\routine{SLA\_PM}{Proper Motion}
+{
+ \action{Apply corrections for proper motion to a star \radec.}
+ \call{CALL sla\_PM (R0, D0, PR, PD, PX, RV, EP0, EP1, R1, D1)}
+}
+\args{GIVEN}
+{
+ \spec{R0,D0}{D}{\radec\ at epoch EP0 (radians)} \\
+ \spec{PR,PD}{D}{proper motions: rate of change of
+ \radec\ (radians per year)} \\
+ \spec{PX}{D}{parallax (arcsec)} \\
+ \spec{RV}{D}{radial velocity (km~s$^{-1}$, +ve if receding)} \\
+ \spec{EP0}{D}{start epoch in years ({\it e.g.}\ Julian epoch)} \\
+ \spec{EP1}{D}{end epoch in years (same system as EP0)}
+}
+\args{RETURNED}
+{
+ \spec{R1,D1}{D}{\radec\ at epoch EP1 (radians)}
+}
+\anote{The $\alpha$ proper motions are $\dot{\alpha}$ rather than
+ $\dot{\alpha}\cos\delta$, and are in the same coordinate
+ system as R0,D0.}
+\refs
+{
+ \begin{enumerate}
+ \item 1984 {\it Astronomical Almanac}, pp B39-B41.
+ \item Lederle \& Schwan, 1984.\ {\it Astr. Astrophys.}\ {\bf 134}, 1-6.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_POLMO}{Polar Motion}
+{
+ \action{Polar motion: correct site longitude and latitude for polar
+ motion and calculate azimuth difference between celestial and
+ terrestrial poles.}
+ \call{CALL sla\_POLMO (ELONGM, PHIM, XP, YP, ELONG, PHI, DAZ)}
+}
+\args{GIVEN}
+{
+ \spec{ELONGM}{D}{mean longitude of the site (radians, east +ve)} \\
+ \spec{PHIM}{D}{mean geodetic latitude of the site (radians)} \\
+ \spec{XP}{D}{polar motion $x$-coordinate (radians)} \\
+ \spec{YP}{D}{polar motion $y$-coordinate (radians)}
+}
+\args{RETURNED}
+{
+ \spec{ELONG}{D}{true longitude of the site (radians, east +ve)} \\
+ \spec{PHI}{D}{true geodetic latitude of the site (radians)} \\
+ \spec{DAZ}{D}{azimuth correction (terrestrial$-$celestial, radians)}
+}
+\notes
+{
+\begin{enumerate}
+\item ``Mean'' longitude and latitude are the (fixed) values for the
+ site's location with respect to the IERS terrestrial reference
+ frame; the latitude is geodetic. TAKE CARE WITH THE LONGITUDE
+ SIGN CONVENTION. The longitudes used by the present routine
+ are east-positive, in accordance with geographical convention
+ (and right-handed). In particular, note that the longitudes
+ returned by the sla\_OBS routine are west-positive, following
+ astronomical usage, and must be reversed in sign before use in
+ the present routine.
+\item XP and YP are the (changing) coordinates of the Celestial
+ Ephemeris Pole with respect to the IERS Reference Pole.
+ XP is positive along the meridian at longitude $0^\circ$,
+ and YP is positive along the meridian at longitude
+ $270^\circ$ ({\it i.e.}\ $90^\circ$ west). Values for XP,YP can
+ be obtained from IERS circulars and equivalent publications;
+ the maximum amplitude observed so far is about \arcsec{0}{3}.
+\item ``True'' longitude and latitude are the (moving) values for
+ the site's location with respect to the celestial ephemeris
+ pole and the meridian which corresponds to the Greenwich
+ apparent sidereal time. The true longitude and latitude
+ link the terrestrial coordinates with the standard celestial
+ models (for precession, nutation, sidereal time {\it etc}).
+\item The azimuths produced by sla\_AOP and sla\_AOPQK are with
+ respect to due north as defined by the Celestial Ephemeris
+ Pole, and can therefore be called ``celestial azimuths''.
+ However, a telescope fixed to the Earth measures azimuth
+ essentially with respect to due north as defined by the
+ IERS Reference Pole, and can therefore be called ``terrestrial
+ azimuth''. Uncorrected, this would manifest itself as a
+ changing ``azimuth zero-point error''. The value DAZ is the
+ correction to be added to a celestial azimuth to produce
+ a terrestrial azimuth.
+\item The present routine is rigorous. For most practical
+ purposes, the following simplified formulae provide an
+ adequate approximation: \\[2ex]
+ \hspace*{1em}\begin{tabular}{lll}
+ {\tt ELONG} & {\tt =} &
+ {\tt ELONGM+XP*COS(ELONGM)-YP*SIN(ELONGM)} \\
+ {\tt PHI } & {\tt =} &
+ {\tt PHIM+(XP*SIN(ELONGM)+YP*COS(ELONGM))*TAN(PHIM)} \\
+ {\tt DAZ } & {\tt =} &
+ {\tt -SQRT(XP*XP+YP*YP)*COS(ELONGM-ATAN2(XP,YP))/COS(PHIM)} \\
+ \end{tabular} \\[2ex]
+ An alternative formulation for DAZ is:\\[2ex]
+ \hspace*{1em}\begin{tabular}{lll}
+ {\tt X } & {\tt =} & {\tt COS(ELONGM)*COS(PHIM)} \\
+ {\tt Y } & {\tt =} & {\tt SIN(ELONGM)*COS(PHIM)} \\
+ {\tt DAZ} & {\tt =} & {\tt ATAN2(-X*YP-Y*XP,X*X+Y*Y)} \\
+ \end{tabular}
+\end{enumerate}
+}
+\aref{Seidelmann, P.K.\ (ed), 1992. {\it Explanatory
+ Supplement to the Astronomical Almanac,}\/ ISBN~0-935702-68-7,
+ sections 3.27, 4.25, 4.52.}
+%-----------------------------------------------------------------------
+\routine{SLA\_PREBN}{Precession Matrix (FK4)}
+{
+ \action{Generate the matrix of precession between two epochs,
+ using the old, pre IAU~1976, Bessel-Newcomb model, in
+ Andoyer's formulation.}
+ \call{CALL sla\_PREBN (BEP0, BEP1, RMATP)}
+}
+\args{GIVEN}
+{
+ \spec{BEP0}{D}{beginning Besselian epoch} \\
+ \spec{BEP1}{D}{ending Besselian epoch}
+}
+\args{RETURNED}
+{
+ \spec{RMATP}{D(3,3)}{precession matrix}
+}
+\anote{The matrix is in the sense:
+ \begin{verse}
+ {\bf v}$_{1}$ = {\bf M}$\cdot${\bf v}$_{0}$
+ \end{verse}
+ where {\bf v}$_{1}$ is the star vector relative to the
+ mean equator and equinox of epoch BEP1, {\bf M} is the
+ $3\times3$ matrix RMATP and
+ {\bf v}$_{0}$ is the star vector relative to the
+ mean equator and equinox of epoch BEP0.}
+\aref{Smith {\it et al.}, 1989.\ {\it Astr.J.}\ {\bf 97}, 269.}
+%-----------------------------------------------------------------------
+\routine{SLA\_PREC}{Precession Matrix (FK5)}
+{
+ \action{Form the matrix of precession between two epochs (IAU 1976, FK5).}
+ \call{CALL sla\_PREC (EP0, EP1, RMATP)}
+}
+\args{GIVEN}
+{
+ \spec{EP0}{D}{beginning epoch} \\
+ \spec{EP1}{D}{ending epoch}
+}
+\args{RETURNED}
+{
+ \spec{RMATP}{D(3,3)}{precession matrix}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The epochs are TDB Julian epochs.
+ \item The matrix is in the sense:
+ \begin{verse}
+ {\bf v}$_{1}$ = {\bf M}$\cdot${\bf v}$_{0}$
+ \end{verse}
+ where {\bf v}$_{1}$ is the star vector relative to the
+ mean equator and equinox of epoch EP1, {\bf M} is the
+ $3\times3$ matrix RMATP and
+ {\bf v}$_{0}$ is the star vector relative to the
+ mean equator and equinox of epoch EP0.
+ \item Though the matrix method itself is rigorous, the precession
+ angles are expressed through canonical polynomials which are
+ valid only for a limited time span. There are also known
+ errors in the IAU precession rate. The absolute accuracy
+ of the present formulation is better than \arcsec{0}{1} from
+ 1960\,AD to 2040\,AD, better than \arcseci{1} from 1640\,AD to 2360\,AD,
+ and remains below \arcseci{3} for the whole of the period
+ 500\,BC to 3000\,AD. The errors exceed \arcseci{10} outside the
+ range 1200\,BC to 3900\,AD, exceed \arcseci{100} outside 4200\,BC to
+ 5600\,AD and exceed \arcseci{1000} outside 6800\,BC to 8200\,AD.
+ The SLALIB routine sla\_PRECL implements a more elaborate
+ model which is suitable for problems spanning several
+ thousand years.
+ \end{enumerate}
+}
+\refs
+{
+ \begin{enumerate}
+ \item Lieske, J.H., 1979.\ {\it Astr.Astrophys.}\ {\bf 73}, 282;
+ equations 6 \& 7, p283.
+ \item Kaplan, G.H., 1981.\ {\it USNO circular no.\ 163}, pA2.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_PRECES}{Precession}
+{
+ \action{Precession -- either the old ``FK4'' (Bessel-Newcomb, pre~IAU~1976)
+ or new ``FK5'' (Fricke, post~IAU~1976) as required.}
+ \call{CALL sla\_PRECES (SYSTEM, EP0, EP1, RA, DC)}
+}
+\args{GIVEN}
+{
+ \spec{SYSTEM}{C}{precession to be applied: `FK4' or `FK5'} \\
+ \spec{EP0,EP1}{D}{starting and ending epoch} \\
+ \spec{RA,DC}{D}{\radec, mean equator \& equinox of epoch EP0}
+}
+\args{RETURNED}
+{
+ \spec{RA,DC}{D}{\radec, mean equator \& equinox of epoch EP1}
+}
+\notes
+{
+ \begin{enumerate}
+ \item Lowercase characters in SYSTEM are acceptable.
+ \item The epochs are Besselian if SYSTEM=`FK4' and Julian if `FK5'.
+ For example, to precess coordinates in the old system from
+ equinox 1900.0 to 1950.0 the call would be:
+ \begin{quote}
+ {\tt CALL sla\_PRECES ('FK4', 1900D0, 1950D0, RA, DC)}
+ \end{quote}
+ \item This routine will {\bf NOT} correctly convert between the old and
+ the new systems -- for example conversion from B1950 to J2000.
+ For these purposes see sla\_FK425, sla\_FK524, sla\_FK45Z and
+ sla\_FK54Z.
+ \item If an invalid SYSTEM is supplied, values of $-$99D0,$-$99D0 are
+ returned for both RA and DC.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_PRECL}{Precession Matrix (latest)}
+{
+ \action{Form the matrix of precession between two epochs, using the
+ model of Simon {\it et al}.\ (1994), which is suitable for long
+ periods of time.}
+ \call{CALL sla\_PRECL (EP0, EP1, RMATP)}
+}
+\args{GIVEN}
+{
+ \spec{EP0}{D}{beginning epoch} \\
+ \spec{EP1}{D}{ending epoch}
+}
+\args{RETURNED}
+{
+ \spec{RMATP}{D(3,3)}{precession matrix}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The epochs are TDB Julian epochs.
+ \item The matrix is in the sense:
+ \begin{verse}
+ {\bf v}$_{1}$ = {\bf M}$\cdot${\bf v}$_{0}$
+ \end{verse}
+ where {\bf v}$_{1}$ is the star vector relative to the
+ mean equator and equinox of epoch EP1, {\bf M} is the
+ $3\times3$ matrix RMATP and
+ {\bf v}$_{0}$ is the star vector relative to the
+ mean equator and equinox of epoch EP0.
+ \item The absolute accuracy of the model is limited by the
+ uncertainty in the general precession, about \arcsec{0}{3} per
+ 1000~years. The remainder of the formulation provides a
+ precision of 1~milliarcsecond over the interval from 1000\,AD
+ to 3000\,AD, \arcsec{0}{1} from 1000\,BC to 5000\,AD and
+ \arcseci{1} from 4000\,BC to 8000\,AD.
+ \end{enumerate}
+}
+\aref{Simon, J.L.\ {\it et al}., 1994.\ {\it Astr.Astrophys.}\ {\bf 282},
+ 663.}
+%-----------------------------------------------------------------------
+\routine{SLA\_PRENUT}{Precession/Nutation Matrix}
+{
+ \action{Form the matrix of precession and nutation (IAU~1976, FK5).}
+ \call{CALL sla\_PRENUT (EPOCH, DATE, RMATPN)}
+}
+\args{GIVEN}
+{
+ \spec{EPOCH}{D}{Julian Epoch for mean coordinates} \\
+ \spec{DATE}{D}{Modified Julian Date (JD$-$2400000.5)
+ for true coordinates}
+}
+\args{RETURNED}
+{
+ \spec{RMATPN}{D(3,3)}{combined precession/nutation matrix}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The epoch and date are TDB.
+ \item The matrix is in the sense:
+ \begin{verse}
+ {\bf v}$_{true}$ = {\bf M}$\cdot${\bf v}$_{mean}$
+ \end{verse}
+ where {\bf v}$_{true}$ is the star vector relative to the
+ true equator and equinox of epoch DATE, {\bf M} is the
+ $3\times3$ matrix RMATPN and
+ {\bf v}$_{mean}$ is the star vector relative to the
+ mean equator and equinox of epoch EPOCH.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_PV2EL}{Orbital Elements from Position/Velocity}
+{
+ \action{Heliocentric osculating elements obtained from instantaneous
+ position and velocity.}
+ \call{CALL sla\_PV2EL (\vtop{
+ \hbox{PV, DATE, PMASS, JFORMR, JFORM, EPOCH, ORBINC,}
+ \hbox{ANODE, PERIH, AORQ, E, AORL, DM, JSTAT)}}}
+}
+\args{GIVEN}
+{
+ \spec{PV}{D(6)}{heliocentric \xyzxyzd, equatorial, J2000} \\
+ \spec{}{}{\hspace{1.5em} (AU, AU/s; Note~1)} \\
+ \spec{DATE}{D}{date (TT Modified Julian Date = JD$-$2400000.5)} \\
+ \spec{PMASS}{D}{mass of the planet (Sun = 1; Note~2)} \\
+ \spec{JFORMR}{I}{requested element set (1-3; Note~3)}
+}
+\args{RETURNED}
+{
+ \spec{JFORM}{I}{element set actually returned (1-3; Note~4)} \\
+ \spec{EPOCH}{D}{epoch of elements ($t_0$ or $T$, TT MJD)} \\
+ \spec{ORBINC}{D}{inclination ($i$, radians)} \\
+ \spec{ANODE}{D}{longitude of the ascending node ($\Omega$, radians)} \\
+ \spec{PERIH}{D}{longitude or argument of perihelion
+ ($\varpi$ or $\omega$,} \\
+ \spec{}{}{\hspace{1.5em} radians)} \\
+ \spec{AORQ}{D}{mean distance or perihelion distance ($a$ or $q$, AU)} \\
+ \spec{E}{D}{eccentricity ($e$)} \\
+ \spec{AORL}{D}{mean anomaly or longitude
+ ($M$ or $L$, radians,} \\
+ \spec{}{}{\hspace{1.5em} JFORM=1,2 only)} \\
+ \spec{DM}{D}{daily motion ($n$, radians, JFORM=1 only)} \\
+ \spec{JSTAT}{I}{status:} \\
+ \spec{}{}{\hspace{2.3em} 0 = OK} \\
+ \spec{}{}{\hspace{1.5em} $-$1 = illegal PMASS} \\
+ \spec{}{}{\hspace{1.5em} $-$2 = illegal JFORMR} \\
+ \spec{}{}{\hspace{1.5em} $-$3 = position/velocity out of allowed range}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The PV 6-vector is with respect to the mean equator and equinox of
+ epoch J2000. The orbital elements produced are with respect to
+ the J2000 ecliptic and mean equinox.
+ \item The mass, PMASS, is important only for the larger planets. For
+ most purposes ({\it e.g.}~asteroids) use 0D0. Values less than zero
+ are illegal.
+ \item Three different element-format options are supported, as
+ follows. \\
+
+ JFORM=1, suitable for the major planets:
+
+ \begin{tabbing}
+ xxx \= xxxxxxxx \= xx \= \kill
+ \> EPOCH \> = \> epoch of elements $t_0$ (TT MJD) \\
+ \> ORBINC \> = \> inclination $i$ (radians) \\
+ \> ANODE \> = \> longitude of the ascending node $\Omega$ (radians) \\
+ \> PERIH \> = \> longitude of perihelion $\varpi$ (radians) \\
+ \> AORQ \> = \> mean distance $a$ (AU) \\
+ \> E \> = \> eccentricity $e$ $( 0 \leq e < 1 )$ \\
+ \> AORL \> = \> mean longitude $L$ (radians) \\
+ \> DM \> = \> daily motion $n$ (radians)
+ \end{tabbing}
+
+ JFORM=2, suitable for minor planets:
+
+ \begin{tabbing}
+ xxx \= xxxxxxxx \= xx \= \kill
+ \> EPOCH \> = \> epoch of elements $t_0$ (TT MJD) \\
+ \> ORBINC \> = \> inclination $i$ (radians) \\
+ \> ANODE \> = \> longitude of the ascending node $\Omega$ (radians) \\
+ \> PERIH \> = \> argument of perihelion $\omega$ (radians) \\
+ \> AORQ \> = \> mean distance $a$ (AU) \\
+ \> E \> = \> eccentricity $e$ $( 0 \leq e < 1 )$ \\
+ \> AORL \> = \> mean anomaly $M$ (radians)
+ \end{tabbing}
+
+ JFORM=3, suitable for comets:
+
+ \begin{tabbing}
+ xxx \= xxxxxxxx \= xx \= \kill
+ \> EPOCH \> = \> epoch of perihelion $T$ (TT MJD) \\
+ \> ORBINC \> = \> inclination $i$ (radians) \\
+ \> ANODE \> = \> longitude of the ascending node $\Omega$ (radians) \\
+ \> PERIH \> = \> argument of perihelion $\omega$ (radians) \\
+ \> AORQ \> = \> perihelion distance $q$ (AU) \\
+ \> E \> = \> eccentricity $e$ $( 0 \leq e \leq 10 )$
+ \end{tabbing}
+ \item It may not be possible to generate elements in the form
+ requested through JFORMR. The caller is notified of the form
+ of elements actually returned by means of the JFORM argument:
+
+ \begin{tabbing}
+ xx \= xxxxxxxxxx \= xxxxxxxxxxx \= \kill
+ \> JFORMR \> JFORM \> meaning \\ \\
+ \> ~~~~~1 \> ~~~~~1 \> OK: elements are in the requested format \\
+ \> ~~~~~1 \> ~~~~~2 \> never happens \\
+ \> ~~~~~1 \> ~~~~~3 \> orbit not elliptical \\
+ \> ~~~~~2 \> ~~~~~1 \> never happens \\
+ \> ~~~~~2 \> ~~~~~2 \> OK: elements are in the requested format \\
+ \> ~~~~~2 \> ~~~~~3 \> orbit not elliptical \\
+ \> ~~~~~3 \> ~~~~~1 \> never happens \\
+ \> ~~~~~3 \> ~~~~~2 \> never happens \\
+ \> ~~~~~3 \> ~~~~~3 \> OK: elements are in the requested format
+ \end{tabbing}
+ \item The arguments returned for each value of JFORM ({\it cf}\/ Note~5:
+ JFORM may not be the same as JFORMR) are as follows:
+
+ \begin{tabbing}
+ xxx \= xxxxxxxxxxxx \= xxxxxx \= xxxxxx \= \kill
+ \> JFORM \> 1 \> 2 \> 3 \\ \\
+ \> EPOCH \> $t_0$ \> $t_0$ \> $T$ \\
+ \> ORBINC \> $i$ \> $i$ \> $i$ \\
+ \> ANODE \> $\Omega$ \> $\Omega$ \> $\Omega$ \\
+ \> PERIH \> $\varpi$ \> $\omega$ \> $\omega$ \\
+ \> AORQ \> $a$ \> $a$ \> $q$ \\
+ \> E \> $e$ \> $e$ \> $e$ \\
+ \> AORL \> $L$ \> $M$ \> - \\
+ \> DM \> $n$ \> - \> -
+ \end{tabbing}
+
+ where:
+ \begin{tabbing}
+ xxx \= xxxxxxxx \= xxx \= \kill
+ \> $t_0$ \> is the epoch of the elements (MJD, TT) \\
+ \> $T$ \> is the epoch of perihelion (MJD, TT) \\
+ \> $i$ \> is the inclination (radians) \\
+ \> $\Omega$ \> is the longitude of the ascending node (radians) \\
+ \> $\varpi$ \> is the longitude of perihelion (radians) \\
+ \> $\omega$ \> is the argument of perihelion (radians) \\
+ \> $a$ \> is the mean distance (AU) \\
+ \> $q$ \> is the perihelion distance (AU) \\
+ \> $e$ \> is the eccentricity \\
+ \> $L$ \> is the longitude (radians, $0-2\pi$) \\
+ \> $M$ \> is the mean anomaly (radians, $0-2\pi$) \\
+ \> $n$ \> is the daily motion (radians) \\
+ \> - \> means no value is set
+ \end{tabbing}
+ \item At very small inclinations, the longitude of the ascending node
+ ANODE becomes indeterminate and under some circumstances may be
+ set arbitrarily to zero. Similarly, if the orbit is close to
+ circular, the true anomaly becomes indeterminate and under some
+ circumstances may be set arbitrarily to zero. In such cases,
+ the other elements are automatically adjusted to compensate,
+ and so the elements remain a valid description of the orbit.
+ \end{enumerate}
+}
+\aref{Sterne, Theodore E., {\it An Introduction to Celestial Mechanics,}\/
+ Interscience Publishers, 1960.}
+%-----------------------------------------------------------------------
+\routine{SLA\_PV2UE}{Position/Velocity to Universal Elements}
+{
+ \action{Construct a universal element set based on an instantaneous
+ position and velocity.}
+ \call{CALL sla\_PV2UE (PV, DATE, PMASS, U, JSTAT)}
+}
+\args{GIVEN}
+{
+ \spec{PV}{D(6)}{heliocentric \xyzxyzd, equatorial, J2000} \\
+ \spec{}{}{\hspace{1.5em} (AU, AU/s; Note~1)} \\
+ \spec{DATE}{D}{date (TT Modified Julian Date = JD$-$2400000.5)} \\
+ \spec{PMASS}{D}{mass of the planet (Sun = 1; Note~2)}
+}
+\args{RETURNED}
+{
+ \spec{U}{D(13)}{universal orbital elements (Note~3)} \\
+ \specel {(1)} {combined mass ($M+m$)} \\
+ \specel {(2)} {total energy of the orbit ($\alpha$)} \\
+ \specel {(3)} {reference (osculating) epoch ($t_0$)} \\
+ \specel {(4-6)} {position at reference epoch (${\rm \bf r}_0$)} \\
+ \specel {(7-9)} {velocity at reference epoch (${\rm \bf v}_0$)} \\
+ \specel {(10)} {heliocentric distance at reference epoch} \\
+ \specel {(11)} {${\rm \bf r}_0.{\rm \bf v}_0$} \\
+ \specel {(12)} {date ($t$)} \\
+ \specel {(13)} {universal eccentric anomaly ($\psi$) of date, approx} \\
+ \spec{JSTAT}{I}{status:} \\
+ \spec{}{}{\hspace{1.95em} 0 = OK} \\
+ \spec{}{}{\hspace{1.2em} $-$1 = illegal PMASS} \\
+ \spec{}{}{\hspace{1.2em} $-$2 = too close to Sun} \\
+ \spec{}{}{\hspace{1.2em} $-$3 = too slow}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The PV 6-vector can be with respect to any chosen inertial frame,
+ and the resulting universal-element set will be with respect to
+ the same frame. A common choice will be mean equator and ecliptic
+ of epoch J2000.
+ \item The mass, PMASS, is important only for the larger planets. For
+ most purposes ({\it e.g.}~asteroids) use 0D0. Values less than zero
+ are illegal.
+ \item The ``universal'' elements are those which define the orbit for the
+ purposes of the method of universal variables (see reference).
+ They consist of the combined mass of the two bodies, an epoch,
+ and the position and velocity vectors (arbitrary reference frame)
+ at that epoch. The parameter set used here includes also various
+ quantities that can, in fact, be derived from the other
+ information. This approach is taken to avoiding unnecessary
+ computation and loss of accuracy. The supplementary quantities
+ are (i)~$\alpha$, which is proportional to the total energy of the
+ orbit, (ii)~the heliocentric distance at epoch,
+ (iii)~the outwards component of the velocity at the given epoch,
+ (iv)~an estimate of $\psi$, the ``universal eccentric anomaly'' at a
+ given date and (v)~that date.
+ \end{enumerate}
+}
+\aref{Everhart, E. \& Pitkin, E.T., Am.~J.~Phys.~51, 712, 1983.}
+%-----------------------------------------------------------------------
+\routine{SLA\_PVOBS}{Observatory Position \& Velocity}
+{
+ \action{Position and velocity of an observing station.}
+ \call{CALL sla\_PVOBS (P, H, STL, PV)}
+}
+\args{GIVEN}
+{
+ \spec{P}{D}{latitude (geodetic, radians)} \\
+ \spec{H}{D}{height above reference spheroid (geodetic, metres)} \\
+ \spec{STL}{D}{local apparent sidereal time (radians)}
+}
+\args{RETURNED}
+{
+ \spec{PV}{D(6)}{\xyzxyzd\ (AU, AU~s$^{-1}$, true equator and equinox
+ of date)}
+}
+\anote{IAU 1976 constants are used.}
+%-----------------------------------------------------------------------
+\routine{SLA\_PXY}{Apply Linear Model}
+{
+ \action{Given arrays of {\it expected}\/ and {\it measured}\,
+ \xy\ coordinates, and a
+ linear model relating them (as produced by sla\_FITXY), compute
+ the array of {\it predicted}\/ coordinates and the RMS residuals.}
+ \call{CALL sla\_PXY (NP,XYE,XYM,COEFFS,XYP,XRMS,YRMS,RRMS)}
+}
+\args{GIVEN}
+{
+ \spec{NP}{I}{number of samples} \\
+ \spec{XYE}{D(2,NP)}{expected \xy\ for each sample} \\
+ \spec{XYM}{D(2,NP)}{measured \xy\ for each sample} \\
+ \spec{COEFFS}{D(6)}{coefficients of model (see below)}
+}
+\args{RETURNED}
+{
+ \spec{XYP}{D(2,NP)}{predicted \xy\ for each sample} \\
+ \spec{XRMS}{D}{RMS in X} \\
+ \spec{YRMS}{D}{RMS in Y} \\
+ \spec{RRMS}{D }{total RMS (vector sum of XRMS and YRMS)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The model is supplied in the array COEFFS. Naming the
+ six elements of COEFFS $a,b,c,d,e$ \& $f$,
+ the model transforms {\it measured}\/ coordinates
+ $[x_{m},y_{m}\,]$ into {\it predicted}\/ coordinates
+ $[x_{p},y_{p}\,]$ as follows:
+ \begin{verse}
+ $x_{p} = a + bx_{m} + cy_{m}$ \\
+ $y_{p} = d + ex_{m} + fy_{m}$
+ \end{verse}
+ \item The residuals are $(x_{p}-x_{e})$ and $(y_{p}-y_{e})$.
+ \item If NP is less than or equal to zero, no coordinates are
+ transformed, and the RMS residuals are all zero.
+ \item See also sla\_FITXY, sla\_INVF, sla\_XY2XY, sla\_DCMPF
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_RANDOM}{Random Number}
+{
+ \action{Generate pseudo-random real number in the range $0 \leq x < 1$.}
+ \call{R~=~sla\_RANDOM (SEED)}
+}
+\args{GIVEN}
+{
+ \spec{SEED}{R}{an arbitrary real number}
+}
+\args{RETURNED}
+{
+ \spec{SEED}{R}{a new arbitrary value} \\
+ \spec{sla\_RANDOM}{R}{Pseudo-random real number $0 \leq x < 1$.}
+}
+\anote{The implementation is machine-dependent.}
+%-----------------------------------------------------------------------
+\routine{SLA\_RANGE}{Put Angle into Range $\pm\pi$}
+{
+ \action{Normalize an angle into the range $\pm\pi$ (single precision).}
+ \call{R~=~sla\_RANGE (ANGLE)}
+}
+\args{GIVEN}
+{
+ \spec{ANGLE}{R}{angle in radians}
+}
+\args{RETURNED}
+{
+ \spec{sla\_RANGE}{R}{ANGLE expressed in the range $\pm\pi$.}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_RANORM}{Put Angle into Range $0\!-\!2\pi$}
+{
+ \action{Normalize an angle into the range $0\!-\!2\pi$ (single precision).}
+ \call{R~=~sla\_RANORM (ANGLE)}
+}
+\args{GIVEN}
+{
+ \spec{ANGLE}{R}{angle in radians}
+}
+\args{RETURNED}
+{
+ \spec{sla\_RANORM}{R}{ANGLE expressed in the range $0\!-\!2\pi$}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_RCC}{Barycentric Coordinate Time}
+{
+ \call{D~=~sla\_RCC (TDB, UT1, WL, U, V)}
+ \action{The relativistic clock correction TDB$-$TT, the
+ difference between {\it proper time}\,
+ on Earth and {\it coordinate time}\/ in the solar system barycentric
+ space-time frame of reference. The proper time is TT; the
+ coordinate time is {\it an implementation}\/ of TDB.}
+}
+\args{GIVEN}
+{
+ \spec{TDB}{D}{coordinate time (MJD: JD$-$2400000.5)} \\
+ \spec{UT1}{D}{universal time (fraction of one day)} \\
+ \spec{WL}{D}{clock longitude (radians west)} \\
+ \spec{U}{D}{clock distance from Earth spin axis (km)} \\
+ \spec{V}{D}{clock distance north of Earth equatorial plane (km)}
+}
+\args{RETURNED}
+{
+ \spec{sla\_RCC}{D}{TDB$-$TT (sec)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item TDB may be considered to
+ be the coordinate time in the solar system barycentre frame of
+ reference, and TT is the proper time given by clocks at mean sea
+ level on the Earth.
+ \item The result has a main (annual) sinusoidal term of amplitude
+ approximately 1.66ms, plus planetary terms up to about
+ 20$\mu$s, and lunar and diurnal terms up to 2$\mu$s. The
+ variation arises from the transverse Doppler effect and the
+ gravitational red-shift as the observer varies in speed and
+ moves through different gravitational potentials.
+ \item The argument TDB is, strictly, the barycentric coordinate time;
+ however, the terrestrial proper time (TT) can in practice be used.
+ \item The geocentric model is that of Fairhead \& Bretagnon (1990),
+ in its full
+ form. It was supplied by Fairhead (private communication)
+ as a Fortran subroutine. A number of coding changes were made to
+ this subroutine in order
+ match the calling sequence of previous versions of the present
+ routine, to comply with Starlink programming standards and to
+ avoid compilation problems on certain machines. On the supported
+ computer types,
+ the numerical results are essentially unaffected by the
+ changes. The topocentric model is from Moyer (1981) and Murray (1983).
+ During the interval 1950-2050, the absolute accuracy of the
+ geocentric model is better than $\pm3$~nanoseconds
+ relative to direct numerical integrations using the JPL DE200/LE200
+ solar system ephemeris.
+ \item The IAU definition of TDB is that it must differ from TT only by
+ periodic terms. Though practical, this is an imprecise definition
+ which ignores the existence of very long-period and secular effects
+ in the dynamics of the solar system. As a consequence, different
+ implementations of TDB will, in general, differ in zero-point and
+ will drift linearly relative to one other.
+ \end{enumerate}
+}
+\refs
+{
+ \begin{enumerate}
+ \item Fairhead, L.\ \&
+ Bretagnon, P., 1990.\ {\it Astr.Astrophys.}\ {\bf 229}, 240-247.
+ \item Moyer, T.D., 1981.\ {\it Cel.Mech.}\ {\bf 23}, 33.
+ \item Murray, C.A., 1983,\ {\it Vectorial Astrometry}, Adam Hilger.
+ \end{enumerate}
+}
+%------------------------------------------------------------------------------
+\routine{SLA\_RDPLAN}{Apparent \radec\ of Planet}
+{
+ \action{Approximate topocentric apparent \radec\ and angular
+ size of a planet.}
+ \call{CALL sla\_RDPLAN (DATE, NP, ELONG, PHI, RA, DEC, DIAM)}
+}
+\args{GIVEN}
+{
+ \spec{DATE}{D}{MJD of observation (JD$-$2400000.5)} \\
+ \spec{NP}{I}{planet:} \\
+ \spec{}{}{\hspace{1.5em} 1\,=\,Mercury} \\
+ \spec{}{}{\hspace{1.5em} 2\,=\,Venus} \\
+ \spec{}{}{\hspace{1.5em} 3\,=\,Moon} \\
+ \spec{}{}{\hspace{1.5em} 4\,=\,Mars} \\
+ \spec{}{}{\hspace{1.5em} 5\,=\,Jupiter} \\
+ \spec{}{}{\hspace{1.5em} 6\,=\,Saturn} \\
+ \spec{}{}{\hspace{1.5em} 7\,=\,Uranus} \\
+ \spec{}{}{\hspace{1.5em} 8\,=\,Neptune} \\
+ \spec{}{}{\hspace{1.5em} 9\,=\,Pluto} \\
+ \spec{}{}{\hspace{0.44em} else\,=\,Sun} \\
+ \spec{ELONG,PHI}{D}{observer's longitude (east +ve) and latitude
+ (radians)}
+}
+\args{RETURNED}
+{
+ \spec{RA,DEC}{D}{topocentric apparent \radec\ (radians)} \\
+ \spec{DIAM}{D}{angular diameter (equatorial, radians)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The date is in a dynamical timescale (TDB, formerly ET)
+ and is in the form of a Modified
+ Julian Date (JD$-$2400000.5). For all practical purposes, TT can
+ be used instead of TDB, and for many applications UT will do
+ (except for the Moon).
+ \item The longitude and latitude allow correction for geocentric
+ parallax. This is a major effect for the Moon, but in the
+ context of the limited accuracy of the present routine its
+ effect on planetary positions is small (negligible for the
+ outer planets). Geocentric positions can be generated by
+ appropriate use of the routines sla\_DMOON and sla\_PLANET.
+ \item The direction accuracy (arcsec, 1000-3000\,AD) is of order:
+ \begin{tabbing}
+ xxxxxxx \= xxxxxxxxxxxxxxxxxx \= \kill
+ \> Sun \> \hspace{0.5em}5 \\
+ \> Mercury \> \hspace{0.5em}2 \\
+ \> Venus \> 10 \\
+ \> Moon \> 30 \\
+ \> Mars \> 50 \\
+ \> Jupiter \> 90 \\
+ \> Saturn \> 90 \\
+ \> Uranus \> 90 \\
+ \> Neptune \> 10 \\
+ \> Pluto \> \hspace{0.5em}1~~~(1885-2099\,AD only)
+ \end{tabbing}
+ The angular diameter accuracy is about 0.4\% for the Moon,
+ and 0.01\% or better for the Sun and planets.
+ For more information on accuracy,
+ refer to the routines sla\_PLANET and sla\_DMOON,
+ which the present routine uses.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_REFCO}{Refraction Constants}
+{
+ \action{Determine the constants $a$ and $b$ in the
+ atmospheric refraction model
+ $\Delta \zeta = a \tan \zeta + b \tan^{3} \zeta$,
+ where $\zeta$ is the {\it observed}\/ zenith distance
+ ({\it i.e.}\ affected by refraction) and $\Delta \zeta$ is
+ what to add to $\zeta$ to give the {\it topocentric}\,
+ ({\it i.e.\ in vacuo}) zenith distance.}
+ \call{CALL sla\_REFCO (HM, TDK, PMB, RH, WL, PHI, TLR, EPS, REFA, REFB)}
+}
+\args{GIVEN}
+{
+ \spec{HM}{D}{height of the observer above sea level (metre)} \\
+ \spec{TDK}{D}{ambient temperature at the observer (degrees K)} \\
+ \spec{PMB}{D}{pressure at the observer (mB)} \\
+ \spec{RH}{D}{relative humidity at the observer (range 0\,--\,1)} \\
+ \spec{WL}{D}{effective wavelength of the source ($\mu{\rm m}$)} \\
+ \spec{PHI}{D}{latitude of the observer (radian, astronomical)} \\
+ \spec{TLR}{D}{temperature lapse rate in the troposphere
+ (degrees K per metre)} \\
+ \spec{EPS}{D}{precision required to terminate iteration (radian)}
+}
+\args{RETURNED}
+{
+ \spec{REFA}{D}{$\tan \zeta$ coefficient (radians)} \\
+ \spec{REFB}{D}{$\tan^{3} \zeta$ coefficient (radians)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item Suggested values for the TLR and EPS arguments are 0.0065D0 and
+ 1D$-$8 respectively.
+ \item The radio refraction is chosen by specifying WL $>100$~$\mu{\rm m}$.
+ \item The routine is a slower but more accurate alternative to the
+ sla\_REFCOQ routine. The constants it produces give perfect
+ agreement with sla\_REFRO at zenith distances
+ $\tan^{-1} 1$ ($45^\circ$) and $\tan^{-1} 4$ ($\sim 76^\circ$).
+ At other zenith distances, the model achieves:
+ \arcsec{0}{5} accuracy for $\zeta<80^{\circ}$,
+ \arcsec{0}{01} accuracy for $\zeta<60^{\circ}$, and
+ \arcsec{0}{001} accuracy for $\zeta<45^{\circ}$.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_REFCOQ}{Refraction Constants (fast)}
+{
+ \action{Determine the constants $a$ and $b$ in the
+ atmospheric refraction model
+ $\Delta \zeta = a \tan \zeta + b \tan^{3} \zeta$,
+ where $\zeta$ is the {\it observed}\/ zenith distance
+ ({\it i.e.}\ affected by refraction) and $\Delta \zeta$ is
+ what to add to $\zeta$ to give the {\it topocentric}\,
+ ({\it i.e.\ in vacuo}) zenith distance. (This is a fast
+ alternative to the sla\_REFCO routine -- see notes.)}
+ \call{CALL sla\_REFCOQ (TDK, PMB, RH, WL, REFA, REFB)}
+}
+\args{GIVEN}
+{
+ \spec{TDK}{D}{ambient temperature at the observer (degrees K)} \\
+ \spec{PMB}{D}{pressure at the observer (mB)} \\
+ \spec{RH}{D}{relative humidity at the observer (range 0\,--\,1)} \\
+ \spec{WL}{D}{effective wavelength of the source ($\mu{\rm m}$)}
+}
+\args{RETURNED}
+{
+ \spec{REFA}{D}{$\tan \zeta$ coefficient (radians)} \\
+ \spec{REFB}{D}{$\tan^{3} \zeta$ coefficient (radians)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The radio refraction is chosen by specifying WL $>100$~$\mu{\rm m}$.
+ \item The model is an approximation, for moderate zenith distances,
+ to the predictions of the sla\_REFRO routine. The approximation
+ is maintained across a range of conditions, and applies to
+ both optical/IR and radio.
+ \item The algorithm is a fast alternative to the sla\_REFCO routine.
+ The latter calls the sla\_REFRO routine itself: this involves
+ integrations through a model atmosphere, and is costly in
+ processor time. However, the model which is produced is precisely
+ correct for two zenith distances ($45^\circ$ and $\sim\!76^\circ$)
+ and at other zenith distances is limited in accuracy only by the
+ $\Delta \zeta = a \tan \zeta + b \tan^{3} \zeta$ formulation
+ itself. The present routine is not as accurate, though it
+ satisfies most practical requirements.
+ \item The model omits the effects of (i)~height above sea level (apart
+ from the reduced pressure itself), (ii)~latitude ({\it i.e.}\ the
+ flattening of the Earth) and (iii)~variations in tropospheric
+ lapse rate.
+ \item The model has been tested using the following range of conditions:
+ \begin{itemize}
+ \item [$\cdot$] lapse rates 0.0055, 0.0065, 0.0075~degrees K per metre
+ \item [$\cdot$] latitudes $0^\circ$, $25^\circ$, $50^\circ$, $75^\circ$
+ \item [$\cdot$] heights 0, 2500, 5000 metres above sea level
+ \item [$\cdot$] pressures mean for height $-10$\% to $+5$\% in steps of $5$\%
+ \item [$\cdot$] temperatures $-10^\circ$ to $+20^\circ$ with respect to
+ $280^\circ$K at sea level
+ \item [$\cdot$] relative humidity 0, 0.5, 1
+ \item [$\cdot$] wavelength 0.4, 0.6, \ldots\ $2\mu{\rm m}$, + radio
+ \item [$\cdot$] zenith distances $15^\circ$, $45^\circ$, $75^\circ$
+ \end{itemize}
+ For the above conditions, the comparison with sla\_REFRO
+ was as follows:
+
+ \vspace{2ex}
+
+ ~~~~~~~~~~
+ \begin{tabular}{|r|r|r|} \hline
+ & {\it worst} & {\it RMS} \\ \hline
+ optical/IR & 62 & 8 \\
+ radio & 319 & 49 \\ \hline
+ & mas & mas \\ \hline
+ \end{tabular}
+
+ \vspace{3ex}
+
+ For this particular set of conditions:
+ \begin{itemize}
+ \item [$\cdot$] lapse rate $6.5^\circ K km^{-1}$
+ \item [$\cdot$] latitude $50^\circ$
+ \item [$\cdot$] sea level
+ \item [$\cdot$] pressure 1005\,mB
+ \item [$\cdot$] temperature $7^\circ$C
+ \item [$\cdot$] humidity 80\%
+ \item [$\cdot$] wavelength 5740\,\.{A}
+ \end{itemize}
+ the results were as follows:
+
+ \vspace{2ex}
+
+ ~~~~~~~~~~
+ \begin{tabular}{|r|r|r|r|} \hline
+ \multicolumn{1}{|c}{$\zeta$} &
+ \multicolumn{1}{|c}{sla\_REFRO} &
+ \multicolumn{1}{|c}{sla\_REFCOQ} &
+ \multicolumn{1}{|c|}{Saastamoinen} \\ \hline
+ 10 & 10.27 & 10.27 & 10.27 \\
+ 20 & 21.19 & 21.20 & 21.19 \\
+ 30 & 33.61 & 33.61 & 33.60 \\
+ 40 & 48.82 & 48.83 & 48.81 \\
+ 45 & 58.16 & 58.18 & 58.16 \\
+ 50 & 69.28 & 69.30 & 69.27 \\
+ 55 & 82.97 & 82.99 & 82.95 \\
+ 60 & 100.51 & 100.54 & 100.50 \\
+ 65 & 124.23 & 124.26 & 124.20 \\
+ 70 & 158.63 & 158.68 & 158.61 \\
+ 72 & 177.32 & 177.37 & 177.31 \\
+ 74 & 200.35 & 200.38 & 200.32 \\
+ 76 & 229.45 & 229.43 & 229.42 \\
+ 78 & 267.44 & 267.29 & 267.41 \\
+ 80 & 319.13 & 318.55 & 319.10 \\ \hline
+ deg & arcsec & arcsec & arcsec \\ \hline
+ \end{tabular}
+
+ \vspace{3ex}
+
+ The values for Saastamoinen's formula (which includes terms
+ up to $\tan^5$) are taken from Hohenkerk and Sinclair (1985).
+
+ The results from the much slower but more accurate sla\_REFCO
+ routine have not been included in the tabulation as they are
+ identical to those in the sla\_REFRO column to the \arcsec{0}{01}
+ resolution used.
+ \item Outlandish input parameters are silently limited
+ to mathematically safe values. Zero pressure is permissible,
+ and causes zeroes to be returned.
+ \item The algorithm draws on several sources, as follows:
+ \begin{itemize}
+ \item The formula for the saturation vapour pressure of water as
+ a function of temperature and temperature is taken from
+ expressions A4.5-A4.7 of Gill (1982).
+ \item The formula for the water vapour pressure, given the
+ saturation pressure and the relative humidity is from
+ Crane (1976), expression 2.5.5.
+ \item The refractivity of air is a function of temperature,
+ total pressure, water-vapour pressure and, in the case
+ of optical/IR but not radio, wavelength. The formulae
+ for the two cases are developed from the Essen and Froome
+ expressions adopted in Resolution 1 of the 12th International
+ Geodesy Association General Assembly (1963).
+ \end{itemize}
+ The above three items are as used in the sla\_REFRO routine.
+ \begin{itemize}
+ \item The formula for $\beta~(=H_0/r_0)$ is
+ an adaption of expression 9 from Stone (1996). The
+ adaptations, arrived at empirically, consist of (i)~a
+ small adjustment to the coefficient and (ii)~a humidity
+ term for the radio case only.
+ \item The formulae for the refraction constants as a function of
+ $n-1$ and $\beta$ are from Green (1987), expression 4.31.
+ \end{itemize}
+ \end{enumerate}
+}
+\refs
+{
+ \begin{enumerate}
+ \item Crane, R.K., Meeks, M.L.\ (ed), ``Refraction Effects in
+ the Neutral Atmosphere'',
+ {\it Methods of Experimental Physics: Astrophysics 12B,}\/
+ Academic Press, 1976.
+ \item Gill, Adrian E., {\it Atmosphere-Ocean Dynamics,}\/
+ Academic Press, 1982.
+ \item Hohenkerk, C.Y., \& Sinclair, A.T., NAO Technical Note
+ No.~63, 1985.
+ \item International Geodesy Association General Assembly, Bulletin
+ G\'{e}od\'{e}sique {\bf 70} p390, 1963.
+ \item Stone, Ronald C., P.A.S.P.~{\bf 108} 1051-1058, 1996.
+ \item Green, R.M., {\it Spherical Astronomy,}\/ Cambridge
+ University Press, 1987.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_REFRO}{Refraction}
+{
+ \action{Atmospheric refraction, for radio or optical/IR wavelengths.}
+ \call{CALL sla\_REFRO (ZOBS, HM, TDK, PMB, RH, WL, PHI, TLR, EPS, REF)}
+}
+\args{GIVEN}
+{
+ \spec{ZOBS}{D}{observed zenith distance of the source (radians)} \\
+ \spec{HM}{D}{height of the observer above sea level (metre)} \\
+ \spec{TDK}{D}{ambient temperature at the observer (degrees K)} \\
+ \spec{PMB}{D}{pressure at the observer (mB)} \\
+ \spec{RH}{D}{relative humidity at the observer (range 0\,--\,1)} \\
+ \spec{WL}{D}{effective wavelength of the source ($\mu{\rm m}$)} \\
+ \spec{PHI}{D}{latitude of the observer (radian, astronomical)} \\
+ \spec{TLR}{D}{temperature lapse rate in the troposphere
+ (degrees K per metre)} \\
+ \spec{EPS}{D}{precision required to terminate iteration (radian)}
+}
+\args{RETURNED}
+{
+ \spec{REF}{D}{refraction: {\it in vacuo}\/ ZD minus observed ZD (radians)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item A suggested value for the TLR argument is 0.0065D0. The
+ refraction is significantly affected by TLR, and if studies
+ of the local atmosphere have been carried out a better TLR
+ value may be available.
+ \item A suggested value for the EPS argument is 1D$-$8. The result is
+ usually at least two orders of magnitude more computationally
+ precise than the supplied EPS value.
+ \item The routine computes the refraction for zenith distances up
+ to and a little beyond $90^\circ$ using the method of Hohenkerk
+ \& Sinclair (NAO Technical Notes 59 and 63, subsequently adopted
+ in the {\it Explanatory Supplement to the Astronomical Almanac,}\/
+ 1992 -- see section 3.281).
+ \item The code is based on the AREF optical/IR refraction subroutine
+ of C.\,Hohenkerk (HMNAO, September 1984), with extensions to
+ support the radio case. The modifications to the original HMNAO
+ optical/IR refraction code which affect the results are:
+ \begin{itemize}
+ \item Murray's values for the gas constants have been used
+ ({\it Vectorial Astrometry,}\/ Adam Hilger, 1983).
+ \item A better model for $P_s(T)$ has been adopted (taken from
+ Gill, {\it Atmosphere-Ocean Dynamics,}\/ Academic Press, 1982).
+ \item More accurate expressions for $Pw_o$ have been adopted
+ (again from Gill 1982).
+ \item Provision for radio wavelengths has been added using
+ expressions devised by A.\,T.\,Sinclair, RGO (private
+ communication 1989), based on the Essen \& Froome
+ refractivity formula adopted in Resolution~1 of the
+ 12th International Geodesy Association General Assembly
+ (Bulletin G\'{e}od\'{e}sique {\bf 70} p390, 1963).
+ \end{itemize}
+ None of the changes significantly affects the optical/IR results
+ with respect to the algorithm given in the 1992 {\it Explanatory
+ Supplement.}\/ For example, at $70^\circ$ zenith distance the present
+ routine agrees with the ES algorithm to better than \arcsec{0}{05}
+ for any reasonable combination of parameters. However, the
+ improved water-vapour expressions do make a significant difference
+ in the radio band, at $70^\circ$ zenith distance reaching almost
+ \arcseci{4} for a hot, humid, low-altitude site during a period of
+ low pressure.
+ \item The radio refraction is chosen by specifying WL $>100$~$\mu{\rm m}$.
+ Because the algorithm takes no account of the ionosphere, the
+ accuracy deteriorates at low frequencies, below about 30\,MHz.
+ \item Before use, the value of ZOBS is expressed in the range $\pm\pi$.
+ If this ranged ZOBS is negative, the result REF is computed from its
+ absolute value before being made negative to match. In addition, if
+ it has an absolute value greater than $93^\circ$, a fixed REF value
+ equal to the result for ZOBS~$=93^\circ$ is returned, appropriately
+ signed.
+ \item As in the original Hohenkerk and Sinclair algorithm, fixed values
+ of the water vapour polytrope exponent, the height of the
+ tropopause, and the height at which refraction is negligible are
+ used.
+ \item The radio refraction has been tested against work done by
+ Iain~Coulson, JACH, (private communication 1995) for the
+ James Clerk Maxwell Telescope, Mauna Kea. For typical conditions,
+ agreement at the \arcsec{0}{1} level is achieved for moderate ZD,
+ worsening to perhaps \arcsec{0}{5}\,--\,\arcsec{1}{0} at ZD $80^\circ$.
+ At hot and humid sea-level sites the accuracy will not be as good.
+ \item It should be noted that the relative humidity RH is formally
+ defined in terms of ``mixing ratio'' rather than pressures or
+ densities as is often stated. It is the mass of water per unit
+ mass of dry air divided by that for saturated air at the same
+ temperature and pressure (see Gill 1982). The familiar
+ $\nu=p_w/p_s$ or $\nu=\rho_w/\rho_s$ expressions can differ from
+ the formal definition by several percent, significant in the
+ radio case.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_REFV}{Apply Refraction to Vector}
+{
+ \action{Adjust an unrefracted Cartesian vector to include the effect of
+ atmospheric refraction, using the simple
+ $\Delta \zeta = a \tan \zeta + b \tan^{3} \zeta$ model.}
+ \call{CALL sla\_REFV (VU, REFA, REFB, VR)}
+}
+\args{GIVEN}
+{
+ \spec{VU}{D}{unrefracted position of the source (\azel\ 3-vector)} \\
+ \spec{REFA}{D}{$\tan \zeta$ coefficient (radians)} \\
+ \spec{REFB}{D}{$\tan^{3} \zeta$ coefficient (radians)}
+}
+\args{RETURNED}
+{
+ \spec{VR}{D}{refracted position of the source (\azel\ 3-vector)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item This routine applies the adjustment for refraction in the
+ opposite sense to the usual one -- it takes an unrefracted
+ ({\it in vacuo}\/) position and produces an observed (refracted)
+ position, whereas the
+ $\Delta \zeta = a \tan \zeta + b \tan^{3} \zeta$
+ model strictly
+ applies to the case where an observed position is to have the
+ refraction removed. The unrefracted to refracted case is
+ harder, and requires an inverted form of the text-book
+ refraction models; the algorithm used here is equivalent to
+ one iteration of the Newton-Raphson method applied to the
+ above formula.
+ \item Though optimized for speed rather than precision, the present
+ routine achieves consistency with the refracted-to-unrefracted
+ $\Delta \zeta = a \tan \zeta + b \tan^{3} \zeta$
+ model at better than 1~microarcsecond within
+ $30^\circ$ of the zenith and remains within 1~milliarcsecond to
+ $\zeta=70^\circ$. The inherent accuracy of the model is, of
+ course, far worse than this -- see the documentation for sla\_REFCO
+ for more information.
+ \item At low elevations (below about $3^\circ$) the refraction
+ correction is held back to prevent arithmetic problems and
+ wildly wrong results. Over a wide range of observer heights
+ and corresponding temperatures and pressures, the following
+ levels of accuracy are achieved, relative to numerical
+ integration through a model atmosphere:
+
+ \begin{center}
+ \begin{tabular}{ccl}
+ $\zeta_{obs}$ & {\it error} \\ \\
+ $80^\circ$ & \arcsec{0}{4} \\
+ $81^\circ$ & \arcsec{0}{8} \\
+ $82^\circ$ & \arcsec{1}{6} \\
+ $83^\circ$ & \arcseci{3} \\
+ $84^\circ$ & \arcseci{7} \\
+ $85^\circ$ & \arcseci{17} \\
+ $86^\circ$ & \arcseci{45} \\
+ $87^\circ$ & \arcseci{150} \\
+ $88^\circ$ & \arcseci{340} \\
+ $89^\circ$ & \arcseci{620} \\
+ $90^\circ$ & \arcseci{1100} \\
+ $91^\circ$ & \arcseci{1900} & $<$ high-altitude \\
+ $92^\circ$ & \arcseci{3200} & $<$ sites only \\
+ \end{tabular}
+ \end{center}
+ \item See also the routine sla\_REFZ, which performs the adjustment to
+ the zenith distance rather than in \xyz .
+ The present routine is faster than sla\_REFZ and,
+ except very low down,
+ is equally accurate for all practical purposes. However, beyond
+ about $\zeta=84^\circ$ sla\_REFZ should be used, and for the utmost
+ accuracy iterative use of sla\_REFRO should be considered.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_REFZ}{Apply Refraction to ZD}
+{
+ \action{Adjust an unrefracted zenith distance to include the effect of
+ atmospheric refraction, using the simple
+ $\Delta \zeta = a \tan \zeta + b \tan^{3} \zeta$ model.}
+ \call{CALL sla\_REFZ (ZU, REFA, REFB, ZR)}
+}
+\args{GIVEN}
+{
+ \spec{ZU}{D}{unrefracted zenith distance of the source (radians)} \\
+ \spec{REFA}{D}{$\tan \zeta$ coefficient (radians)} \\
+ \spec{REFB}{D}{$\tan^{3} \zeta$ coefficient (radians)}
+}
+\args{RETURNED}
+{
+ \spec{ZR}{D}{refracted zenith distance (radians)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item This routine applies the adjustment for refraction in the
+ opposite sense to the usual one -- it takes an unrefracted
+ ({\it in vacuo}\/) position and produces an observed (refracted)
+ position, whereas the
+ $\Delta \zeta = a \tan \zeta + b \tan^{3} \zeta$
+ model strictly
+ applies to the case where an observed position is to have the
+ refraction removed. The unrefracted to refracted case is
+ harder, and requires an inverted form of the text-book
+ refraction models; the formula used here is based on the
+ Newton-Raphson method. For the utmost numerical consistency
+ with the refracted to unrefracted model, two iterations are
+ carried out, achieving agreement at the $10^{-11}$~arcsecond level
+ for $\zeta=80^\circ$. The inherent accuracy of the model
+ is, of course, far worse than this -- see the documentation for
+ sla\_REFCO for more information.
+ \item At $\zeta=83^\circ$, the rapidly-worsening
+ $\Delta \zeta = a \tan \zeta + b \tan^{3} \zeta$
+ model is abandoned and an empirical formula takes over:
+
+ \[\Delta \zeta = F \left(
+ \frac{0^\circ\hspace{-0.37em}.\hspace{0.02em}55445
+ - 0^\circ\hspace{-0.37em}.\hspace{0.02em}01133 E
+ + 0^\circ\hspace{-0.37em}.\hspace{0.02em}00202 E^2}
+ {1 + 0.28385 E +0.02390 E^2} \right) \]
+ where $E=90^\circ-\zeta_{true}$
+ and $F$ is a factor chosen to meet the
+ $\Delta \zeta = a \tan \zeta + b \tan^{3} \zeta$
+ formula at $\zeta=83^\circ$. Over a
+ wide range of observer heights and corresponding temperatures and
+ pressures, the following levels of accuracy are achieved,
+ relative to numerical integration through a model atmosphere:
+
+ \begin{center}
+ \begin{tabular}{ccl}
+ $\zeta_{obs}$ & {\it error} \\ \\
+ $80^\circ$ & \arcsec{0}{4} \\
+ $81^\circ$ & \arcsec{0}{8} \\
+ $82^\circ$ & \arcsec{1}{5} \\
+ $83^\circ$ & \arcsec{3}{2} \\
+ $84^\circ$ & \arcsec{4}{9} \\
+ $85^\circ$ & \arcsec{5}{8} \\
+ $86^\circ$ & \arcsec{6}{1} \\
+ $87^\circ$ & \arcsec{7}{1} \\
+ $88^\circ$ & \arcseci{11} \\
+ $89^\circ$ & \arcseci{21} \\
+ $90^\circ$ & \arcseci{43} \\
+ $91^\circ$ & \arcseci{92} & $<$ high-altitude \\
+ $92^\circ$ & \arcseci{220} & $<$ sites only \\
+ \end{tabular}
+ \end{center}
+ \item See also the routine sla\_REFV, which performs the adjustment in
+ \xyz , and with the emphasis on speed rather than numerical accuracy.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_RVEROT}{RV Corrn to Earth Centre}
+{
+ \action{Velocity component in a given direction due to Earth rotation.}
+ \call{R~=~sla\_RVEROT (PHI, RA, DA, ST)}
+}
+\args{GIVEN}
+{
+ \spec{PHI}{R}{geodetic latitude of observing station (radians)} \\
+ \spec{RA,DA}{R}{apparent \radec\ (radians)} \\
+ \spec{ST}{R}{local apparent sidereal time (radians)}
+}
+\args{RETURNED}
+{
+ \spec{sla\_RVEROT}{R}{Component of Earth rotation in
+ direction RA,DA (km~s$^{-1}$)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item Sign convention: the result is positive when the observatory
+ is receding from the given point on the sky.
+ \item Accuracy: the simple algorithm used assumes a spherical Earth and
+ an observing station at sea level; for actual observing
+ sites, the error is unlikely to be greater than 0.0005~km~s$^{-1}$.
+ For applications requiring greater precision, use the routine
+ sla\_PVOBS.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_RVGALC}{RV Corrn to Galactic Centre}
+{
+ \action{Velocity component in a given direction due to the rotation
+ of the Galaxy.}
+ \call{R~=~sla\_RVGALC (R2000, D2000)}
+}
+\args{GIVEN}
+{
+ \spec{R2000,D2000}{R}{J2000.0 mean \radec\ (radians)}
+}
+\args{RETURNED}
+{
+ \spec{sla\_RVGALC}{R}{Component of dynamical LSR motion in direction
+ R2000,D2000 (km~s$^{-1}$)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item Sign convention: the result is positive when the LSR
+ is receding from the given point on the sky.
+ \item The Local Standard of Rest used here is a point in the
+ vicinity of the Sun which is in a circular orbit around
+ the Galactic centre. Sometimes called the {\it dynamical}\/ LSR,
+ it is not to be confused with a {\it kinematical}\/ LSR, which
+ is the mean standard of rest of star catalogues or stellar
+ populations.
+ \item The dynamical LSR velocity due to Galactic rotation is assumed to
+ be 220~km~s$^{-1}$ towards $l^{I\!I}=90^{\circ}$,
+ $b^{I\!I}=0$.
+ \end{enumerate}
+}
+\aref{Kerr \& Lynden-Bell (1986), MNRAS, 221, p1023.}
+%-----------------------------------------------------------------------
+\routine{SLA\_RVLG}{RV Corrn to Local Group}
+{
+ \action{Velocity component in a given direction due to the combination
+ of the rotation of the Galaxy and the motion of the Galaxy
+ relative to the mean motion of the local group.}
+ \call{R~=~sla\_RVLG (R2000, D2000)}
+}
+\args{GIVEN}
+{
+ \spec{R2000,D2000}{R}{J2000.0 mean \radec\ (radians)}
+}
+\args{RETURNED}
+{
+ \spec{sla\_RVLG}{R}{Component of {\bf solar} ({\it n.b.})
+ motion in direction R2000,D2000 (km~s$^{-1}$)}
+}
+\anote{Sign convention: the result is positive when
+ the Sun is receding from the given point on the sky.}
+\aref{{\it IAU Trans.}\ 1976.\ {\bf 16B}, p201.}
+%-----------------------------------------------------------------------
+\routine{SLA\_RVLSRD}{RV Corrn to Dynamical LSR}
+{
+ \action{Velocity component in a given direction due to the Sun's
+ motion with respect to the ``dynamical'' Local Standard of Rest.}
+ \call{R~=~sla\_RVLSRD (R2000, D2000)}
+}
+\args{GIVEN}
+{
+ \spec{R2000,D2000}{R}{J2000.0 mean \radec\ (radians)}
+}
+\args{RETURNED}
+{
+ \spec{sla\_RVLSRD}{R}{Component of {\it peculiar}\/ solar motion
+ in direction R2000,D2000 (km~s$^{-1}$)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item Sign convention: the result is positive when
+ the Sun is receding from the given point on the sky.
+ \item The Local Standard of Rest used here is the {\it dynamical}\/ LSR,
+ a point in the vicinity of the Sun which is in a circular
+ orbit around the Galactic centre. The Sun's motion with
+ respect to the dynamical LSR is called the {\it peculiar}\/ solar
+ motion.
+ \item There is another type of LSR, called a {\it kinematical}\/ LSR. A
+ kinematical LSR is the mean standard of rest of specified star
+ catalogues or stellar populations, and several slightly
+ different kinematical LSRs are in use. The Sun's motion with
+ respect to an agreed kinematical LSR is known as the
+ {\it standard}\/ solar motion.
+ The dynamical LSR is seldom used by observational astronomers,
+ who conventionally use a kinematical LSR such as the one implemented
+ in the routine sla\_RVLSRK.
+ \item The peculiar solar motion is from Delhaye (1965), in {\it Stars
+ and Stellar Systems}, vol~5, p73: in Galactic Cartesian
+ coordinates (+9,+12,+7)~km~s$^{-1}$.
+ This corresponds to about 16.6~km~s$^{-1}$
+ towards Galactic coordinates $l^{I\!I}=53^{\circ},b^{I\!I}=+25^{\circ}$.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_RVLSRK}{RV Corrn to Kinematical LSR}
+{
+ \action{Velocity component in a given direction due to the Sun's
+ motion with respect to a kinematical Local Standard of Rest.}
+ \call{R~=~sla\_RVLSRK (R2000, D2000)}
+}
+\args{GIVEN}
+{
+ \spec{R2000,D2000}{R}{J2000.0 mean \radec\ (radians)}
+}
+\args{RETURNED}
+{
+ \spec{sla\_RVLSRK}{R}{Component of {\it standard}\/ solar motion
+ in direction R2000,D2000 (km~s$^{-1}$)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item Sign convention: the result is positive when
+ the Sun is receding from the given point on the sky.
+ \item The Local Standard of Rest used here is one of several
+ {\it kinematical}\/ LSRs in common use. A kinematical LSR is the
+ mean standard of rest of specified star catalogues or stellar
+ populations. The Sun's motion with respect to a kinematical
+ LSR is known as the {\it standard}\/ solar motion.
+ \item There is another sort of LSR, seldom used by observational
+ astronomers, called the {\it dynamical}\/ LSR. This is a
+ point in the vicinity of the Sun which is in a circular orbit
+ around the Galactic centre. The Sun's motion with respect to
+ the dynamical LSR is called the {\it peculiar}\/ solar motion. To
+ obtain a radial velocity correction with respect to the
+ dynamical LSR use the routine sla\_RVLSRD.
+ \item The adopted standard solar motion is 20~km~s$^{-1}$
+ towards $\alpha=18^{\rm h},\delta=+30^{\circ}$ (1900).
+ \end{enumerate}
+}
+\refs
+{
+ \begin{enumerate}
+ \item Delhaye (1965), in {\it Stars and Stellar Systems}, vol~5, p73.
+ \item {\it Methods of Experimental Physics}\/ (ed Meeks), vol~12,
+ part~C, sec~6.1.5.2, p281.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_S2TP}{Spherical to Tangent Plane}
+{
+ \action{Projection of spherical coordinates onto the tangent plane
+ (single precision).}
+ \call{CALL sla\_S2TP (RA, DEC, RAZ, DECZ, XI, ETA, J)}
+}
+\args{GIVEN}
+{
+ \spec{RA,DEC}{R}{spherical coordinates of star (radians)} \\
+ \spec{RAZ,DECZ}{R}{spherical coordinates of tangent point (radians)}
+}
+\args{RETURNED}
+{
+ \spec{XI,ETA}{R}{tangent plane coordinates (radians)} \\
+ \spec{J}{I}{status:} \\
+ \spec{}{}{\hspace{1.5em} 0 = OK, star on tangent plane} \\
+ \spec{}{}{\hspace{1.5em} 1 = error, star too far from axis} \\
+ \spec{}{}{\hspace{1.5em} 2 = error, antistar on tangent plane} \\
+ \spec{}{}{\hspace{1.5em} 3 = error, antistar too far from axis}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The projection is called the {\it gnomonic}\/ projection; the
+ Cartesian coordinates \xieta\ are called
+ {\it standard coordinates.}\/ The latter
+ are in units of the distance from the tangent plane to the projection
+ point, {\it i.e.}\ radians near the origin.
+ \item When working in \xyz\ rather than spherical coordinates, the
+ equivalent Cartesian routine sla\_V2TP is available.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_SEP}{Angle Between 2 Points on Sphere}
+{
+ \action{Angle between two points on a sphere (single precision).}
+ \call{R~=~sla\_SEP (A1, B1, A2, B2)}
+}
+\args{GIVEN}
+{
+ \spec{A1,B1}{R}{spherical coordinates of one point (radians)} \\
+ \spec{A2,B2}{R}{spherical coordinates of the other point (radians)}
+}
+\args{RETURNED}
+{
+ \spec{sla\_SEP}{R}{angle between [A1,B1] and [A2,B2] in radians}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The spherical coordinates are right ascension and declination,
+ longitude and latitude, {\it etc.}\ in radians.
+ \item The result is always positive.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_SMAT}{Solve Simultaneous Equations}
+{
+ \action{Matrix inversion and solution of simultaneous equations
+ (single precision).}
+ \call{CALL sla\_SMAT (N, A, Y, D, JF, IW)}
+}
+\args{GIVEN}
+{
+ \spec{N}{I}{number of unknowns} \\
+ \spec{A}{R(N,N)}{matrix} \\
+ \spec{Y}{R(N)}{vector}
+}
+\args{RETURNED}
+{
+ \spec{A}{R(N,N)}{matrix inverse} \\
+ \spec{Y}{R(N)}{solution} \\
+ \spec{D}{R}{determinant} \\
+ \spec{JF}{I}{singularity flag: 0=OK} \\
+ \spec{IW}{I(N)}{workspace}
+}
+\notes
+{
+ \begin{enumerate}
+ \item For the set of $n$ simultaneous linear equations in $n$ unknowns:
+ \begin{verse}
+ {\bf A}$\cdot${\bf y} = {\bf x}
+ \end{verse}
+ where:
+ \begin{itemize}
+ \item {\bf A} is a non-singular $n \times n$ matrix,
+ \item {\bf y} is the vector of $n$ unknowns, and
+ \item {\bf x} is the known vector,
+ \end{itemize}
+ sla\_SMAT computes:
+ \begin{itemize}
+ \item the inverse of matrix {\bf A},
+ \item the determinant of matrix {\bf A}, and
+ \item the vector of $n$ unknowns {\bf y}.
+ \end{itemize}
+ Argument N is the order $n$, A (given) is the matrix {\bf A},
+ Y (given) is the vector {\bf x} and Y (returned)
+ is the vector {\bf y}.
+ The argument A (returned) is the inverse matrix {\bf A}$^{-1}$,
+ and D is {\it det}\/({\bf A}).
+ \item JF is the singularity flag. If the matrix is non-singular,
+ JF=0 is returned. If the matrix is singular, JF=$-$1
+ and D=0.0 are returned. In the latter case, the contents
+ of array A on return are undefined.
+ \item The algorithm is Gaussian elimination with partial pivoting.
+ This method is very fast; some much slower algorithms can give
+ better accuracy, but only by a small factor.
+ \item This routine replaces the obsolete sla\_SMATRX.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_SUBET}{Remove E-terms}
+{
+ \action{Remove the E-terms (elliptic component of annual aberration)
+ from a pre IAU~1976 catalogue \radec\ to give a mean place.}
+ \call{CALL sla\_SUBET (RC, DC, EQ, RM, DM)}
+}
+\args{GIVEN}
+{
+ \spec{RC,DC}{D}{\radec\ with E-terms included (radians)} \\
+ \spec{EQ}{D}{Besselian epoch of mean equator and equinox}
+}
+\args{RETURNED}
+{
+ \spec{RM,DM}{D}{\radec\ without E-terms (radians)}
+}
+\anote{Most star positions from pre-1984 optical catalogues (or
+ obtained by astrometry with respect to such stars) have the
+ E-terms built-in. This routine converts such a position to a
+ formal mean place (allowing, for example, comparison with a
+ pulsar timing position).}
+\aref{{\it Explanatory Supplement to the Astronomical Ephemeris},
+ section 2D, page 48.}
+%-----------------------------------------------------------------------
+\routine{SLA\_SUPGAL}{Supergalactic to Galactic}
+{
+ \action{Transformation from de Vaucouleurs supergalactic coordinates
+ to IAU 1958 galactic coordinates.}
+ \call{CALL sla\_GALSUP (DL, DB, DSL, DSB)}
+}
+\args{GIVEN}
+{
+ \spec{DSL,DSB}{D}{supergalactic longitude and latitude (radians)}
+}
+\args{RETURNED}
+{
+ \spec{DL,DB}{D}{galactic longitude and latitude \gal\ (radians)}
+}
+\refs
+{
+ \begin{enumerate}
+ \item de Vaucouleurs, de Vaucouleurs, \& Corwin, {\it Second Reference
+ Catalogue of Bright Galaxies}, U.Texas, p8.
+ \item Systems \& Applied Sciences Corp., documentation for the
+ machine-readable version of the above catalogue,
+ Contract NAS 5-26490.
+ \end{enumerate}
+ (These two references give different values for the galactic
+ longitude of the supergalactic origin. Both are wrong; the
+ correct value is $l^{I\!I}=137.37$.)
+}
+%------------------------------------------------------------------------------
+\routine{SLA\_SVD}{Singular Value Decomposition}
+{
+ \action{Singular value decomposition.
+ This routine expresses a given matrix {\bf A} as the product of
+ three matrices {\bf U}, {\bf W}, {\bf V}$^{T}$:
+ \begin{tabbing}
+ XXXXXX \= \kill
+ \> {\bf A} = {\bf U} $\cdot$ {\bf W} $\cdot$ {\bf V}$^{T}$
+ \end{tabbing}
+ where:
+ \begin{tabbing}
+ XXXXXX \= XXXX \= \kill
+ \> {\bf A} \> is any $m$ (rows) $\times n$ (columns) matrix,
+ where $m \geq n$ \\
+ \> {\bf U} \> is an $m \times n$ column-orthogonal matrix \\
+ \> {\bf W} \> is an $n \times n$ diagonal matrix with
+ $w_{ii} \geq 0$ \\
+ \> {\bf V}$^{T}$ \> is the transpose of an $n \times n$
+ orthogonal matrix
+\end{tabbing}
+}
+ \call{CALL sla\_SVD (M, N, MP, NP, A, W, V, WORK, JSTAT)}
+}
+\args{GIVEN}
+{
+ \spec{M,N}{I}{$m$, $n$, the numbers of rows and columns in matrix {\bf A}} \\
+ \spec{MP,NP}{I}{physical dimensions of array containing matrix {\bf A}} \\
+ \spec{A}{D(MP,NP)}{array containing $m \times n$ matrix {\bf A}}
+}
+\args{RETURNED}
+{
+ \spec{A}{D(MP,NP)}{array containing $m \times n$ column-orthogonal
+ matrix {\bf U}} \\
+ \spec{W}{D(N)}{$n \times n$ diagonal matrix {\bf W}
+ (diagonal elements only)} \\
+ \spec{V}{D(NP,NP)}{array containing $n \times n$ orthogonal
+ matrix {\bf V} ({\it n.b.}\ not {\bf V}$^{T}$)} \\
+ \spec{WORK}{D(N)}{workspace} \\
+ \spec{JSTAT}{I}{0~=~OK, $-$1~=~array A wrong shape, $>$0~=~index of W
+ for which convergence failed (see note~3, below)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item M and N are the {\it logical}\/ dimensions of the
+ matrices and vectors concerned, which can be located in
+ arrays of larger {\it physical}\/ dimensions, given by MP and NP.
+ \item V contains matrix V, not the transpose of matrix V.
+ \item If the status JSTAT is greater than zero, this need not
+ necessarily be treated as a failure. It means that, due to
+ chance properties of the matrix A, the QR transformation
+ phase of the routine did not fully converge in a predefined
+ number of iterations, something that very seldom occurs.
+ When this condition does arise, it is possible that the
+ elements of the diagonal matrix W have not been correctly
+ found. However, in practice the results are likely to
+ be trustworthy. Applications should report the condition
+ as a warning, but then proceed normally.
+ \end{enumerate}
+}
+\refs{The algorithm is an adaptation of the routine SVD in the {\it EISPACK}\,
+ library (Garbow~{\it et~al.}\ 1977, {\it EISPACK Guide Extension},
+ Springer Verlag), which is a FORTRAN~66 implementation of the Algol
+ routine SVD of Wilkinson \& Reinsch 1971 ({\it Handbook for Automatic
+ Computation}, vol~2, ed Bauer~{\it et~al.}, Springer Verlag). These
+ references give full details of the algorithm used here.
+ A good account of the use of SVD in least squares problems is given
+ in {\it Numerical Recipes}\/ (Press~{\it et~al.}\ 1987, Cambridge
+ University Press), which includes another variant of the EISPACK code.}
+%-----------------------------------------------------------------------
+\routine{SLA\_SVDCOV}{Covariance Matrix from SVD}
+{
+ \action{From the {\bf W} and {\bf V} matrices from the SVD
+ factorization of a matrix
+ (as obtained from the sla\_SVD routine), obtain
+ the covariance matrix.}
+ \call{CALL sla\_SVDCOV (N, NP, NC, W, V, WORK, CVM)}
+}
+\args{GIVEN}
+{
+ \spec{N}{I}{$n$, the number of rows and columns in
+ matrices {\bf W} and {\bf V}} \\
+ \spec{NP}{I}{first dimension of array containing $n \times n$
+ matrix {\bf V}} \\
+ \spec{NC}{I}{first dimension of array CVM} \\
+ \spec{W}{D(N)}{$n \times n$ diagonal matrix {\bf W}
+ (diagonal elements only)} \\
+ \spec{V}{D(NP,NP)}{array containing $n \times n$ orthogonal matrix {\bf V}}
+}
+\args{RETURNED}
+{
+ \spec{WORK}{D(N)}{workspace} \\
+ \spec{CVM}{D(NC,NC)}{array to receive covariance matrix}
+}
+\aref{{\it Numerical Recipes}, section 14.3.}
+%-----------------------------------------------------------------------
+\routine{SLA\_SVDSOL}{Solution Vector from SVD}
+{
+ \action{From a given vector and the SVD of a matrix (as obtained from
+ the sla\_SVD routine), obtain the solution vector.
+ This routine solves the equation:
+ \begin{tabbing}
+ XXXXXX \= \kill
+ \> {\bf A} $\cdot$ {\bf x} = {\bf b}
+ \end{tabbing}
+ where:
+ \begin{tabbing}
+ XXXXXX \= XXXX \= \kill
+ \> {\bf A} \> is a given $m$ (rows) $\times n$ (columns)
+ matrix, where $m \geq n$ \\
+ \> {\bf x} \> is the $n$-vector we wish to find, and \\
+ \> {\bf b} \> is a given $m$-vector
+ \end{tabbing}
+ by means of the {\it Singular Value Decomposition}\/ method (SVD).}
+ \call{CALL sla\_SVDSOL (M, N, MP, NP, B, U, W, V, WORK, X)}
+}
+\args{GIVEN}
+{
+ \spec{M,N}{I}{$m$, $n$, the numbers of rows and columns in matrix {\bf A}} \\
+ \spec{MP,NP}{I}{physical dimensions of array containing matrix {\bf A}} \\
+ \spec{B}{D(M)}{known vector {\bf b}} \\
+ \spec{U}{D(MP,NP)}{array containing $m \times n$ matrix {\bf U}} \\
+ \spec{W}{D(N)}{$n \times n$ diagonal matrix {\bf W}
+ (diagonal elements only)} \\
+ \spec{V}{D(NP,NP)}{array containing $n \times n$ orthogonal matrix {\bf V}}
+}
+\args{RETURNED}
+{
+ \spec{WORK}{D(N)}{workspace} \\
+ \spec{X}{D(N)}{unknown vector {\bf x}}
+}
+\notes
+{
+ \begin{enumerate}
+ \item In the Singular Value Decomposition method (SVD),
+ the matrix {\bf A} is first factorized (for example by
+ the routine sla\_SVD) into the following components:
+ \begin{tabbing}
+ XXXXXX \= \kill
+ \> {\bf A} = {\bf U} $\cdot$ {\bf W} $\cdot$ {\bf V}$^{T}$
+ \end{tabbing}
+ where:
+ \begin{tabbing}
+ XXXXXX \= XXXX \= \kill
+ \> {\bf A} \> is any $m$ (rows) $\times n$ (columns) matrix,
+ where $m > n$ \\
+ \> {\bf U} \> is an $m \times n$ column-orthogonal matrix \\
+ \> {\bf W} \> is an $n \times n$ diagonal matrix with
+ $w_{ii} \geq 0$ \\
+ \> {\bf V}$^{T}$ \> is the transpose of an $n \times n$
+ orthogonal matrix
+ \end{tabbing}
+ Note that $m$ and $n$ are the {\it logical}\/ dimensions of the
+ matrices and vectors concerned, which can be located in
+ arrays of larger {\it physical}\/ dimensions MP and NP.
+ The solution is then found from the expression:
+ \begin{tabbing}
+ XXXXXX \= \kill
+ \> {\bf x} = {\bf V} $\cdot~[diag(1/${\bf W}$_{j})]
+ \cdot (${\bf U}$^{T} \cdot${\bf b})
+ \end{tabbing}
+ \item If matrix {\bf A} is square, and if the diagonal matrix {\bf W} is not
+ altered, the method is equivalent to conventional solution
+ of simultaneous equations.
+ \item If $m > n$, the result is a least-squares fit.
+ \item If the solution is poorly determined, this shows up in the
+ SVD factorization as very small or zero {\bf W}$_{j}$ values. Where
+ a {\bf W}$_{j}$ value is small but non-zero it can be set to zero to
+ avoid ill effects. The present routine detects such zero
+ {\bf W}$_{j}$ values and produces a sensible solution, with highly
+ correlated terms kept under control rather than being allowed
+ to elope to infinity, and with meaningful values for the
+ other terms.
+ \end{enumerate}
+}
+\aref{{\it Numerical Recipes}, section 2.9.}
+%-----------------------------------------------------------------------
+\routine{SLA\_TP2S}{Tangent Plane to Spherical}
+{
+ \action{Transform tangent plane coordinates into spherical
+ coordinates (single precision)}
+ \call{CALL sla\_TP2S (XI, ETA, RAZ, DECZ, RA, DEC)}
+}
+\args{GIVEN}
+{
+ \spec{XI,ETA}{R}{tangent plane rectangular coordinates (radians)} \\
+ \spec{RAZ,DECZ}{R}{spherical coordinates of tangent point (radians)}
+}
+\args{RETURNED}
+{
+ \spec{RA,DEC}{R}{spherical coordinates (radians)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The projection is called the {\it gnomonic}\/ projection; the
+ Cartesian coordinates \xieta\ are called
+ {\it standard coordinates.}\/ The latter
+ are in units of the distance from the tangent plane to the projection
+ point, {\it i.e.}\ radians near the origin.
+ \item When working in \xyz\ rather than spherical coordinates, the
+ equivalent Cartesian routine sla\_TP2V is available.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_TP2V}{Tangent Plane to Direction Cosines}
+{
+ \action{Given the tangent-plane coordinates of a star and the direction
+ cosines of the tangent point, determine the direction cosines
+ of the star
+ (single precision).}
+ \call{CALL sla\_TP2V (XI, ETA, V0, V)}
+}
+\args{GIVEN}
+{
+ \spec{XI,ETA}{R}{tangent plane coordinates of star (radians)} \\
+ \spec{V0}{R(3)}{direction cosines of tangent point}
+}
+\args{RETURNED}
+{
+ \spec{V}{R(3)}{direction cosines of star}
+}
+\notes
+{
+ \begin{enumerate}
+ \item If vector V0 is not of unit length, the returned vector V will
+ be wrong.
+ \item If vector V0 points at a pole, the returned vector V will be
+ based on the arbitrary assumption that $\alpha=0$ at
+ the tangent point.
+ \item The projection is called the {\it gnomonic}\/ projection; the
+ Cartesian coordinates \xieta\ are called
+ {\it standard coordinates.}\/ The latter
+ are in units of the distance from the tangent plane to the projection
+ point, {\it i.e.}\ radians near the origin.
+ \item This routine is the Cartesian equivalent of the routine sla\_TP2S.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_TPS2C}{Plate centre from $\xi,\eta$ and $\alpha,\delta$}
+{
+ \action{From the tangent plane coordinates of a star of known \radec,
+ determine the \radec\ of the tangent point (single precision)}
+ \call{CALL sla\_TPS2C (XI, ETA, RA, DEC, RAZ1, DECZ1, RAZ2, DECZ2, N)}
+}
+\args{GIVEN}
+{
+ \spec{XI,ETA}{R}{tangent plane rectangular coordinates (radians)} \\
+ \spec{RA,DEC}{R}{spherical coordinates (radians)}
+}
+\args{RETURNED}
+{
+ \spec{RAZ1,DECZ1}{R}{spherical coordinates of tangent point,
+ solution 1} \\
+ \spec{RAZ2,DECZ2}{R}{spherical coordinates of tangent point,
+ solution 2} \\
+ \spec{N}{I}{number of solutions:} \\
+ \spec{}{}{\hspace{1em} 0 = no solutions returned (note 2)} \\
+ \spec{}{}{\hspace{1em} 1 = only the first solution is useful (note 3)} \\
+ \spec{}{}{\hspace{1em} 2 = there are two useful solutions (note 3)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The RAZ1 and RAZ2 values returned are in the range $0\!-\!2\pi$.
+ \item Cases where there is no solution can only arise near the poles.
+ For example, it is clearly impossible for a star at the pole
+ itself to have a non-zero $\xi$ value, and hence it is
+ meaningless to ask where the tangent point would have to be
+ to bring about this combination of $\xi$ and $\delta$.
+ \item Also near the poles, cases can arise where there are two useful
+ solutions. The argument N indicates whether the second of the
+ two solutions returned is useful. N\,=\,1
+ indicates only one useful solution, the usual case; under
+ these circumstances, the second solution corresponds to the
+ ``over-the-pole'' case, and this is reflected in the values
+ of RAZ2 and DECZ2 which are returned.
+ \item The DECZ1 and DECZ2 values returned are in the range $\pm\pi$,
+ but in the ordinary, non-pole-crossing, case, the range is
+ $\pm\pi/2$.
+ \item RA, DEC, RAZ1, DECZ1, RAZ2, DECZ2 are all in radians.
+ \item The projection is called the {\it gnomonic}\/ projection; the
+ Cartesian coordinates \xieta\ are called
+ {\it standard coordinates.}\/ The latter
+ are in units of the distance from the tangent plane to the projection
+ point, {\it i.e.}\ radians near the origin.
+ \item When working in \xyz\ rather than spherical coordinates, the
+ equivalent Cartesian routine sla\_TPV2C is available.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_TPV2C}{Plate centre from $\xi,\eta$ and $x,y,z$}
+{
+ \action{From the tangent plane coordinates of a star of known
+ direction cosines, determine the direction cosines
+ of the tangent point (single precision)}
+ \call{CALL sla\_TPV2C (XI, ETA, V, V01, V02, N)}
+}
+\args{GIVEN}
+{
+ \spec{XI,ETA}{R}{tangent plane coordinates of star (radians)} \\
+ \spec{V}{R(3)}{direction cosines of star}
+}
+\args{RETURNED}
+{
+ \spec{V01}{R(3)}{direction cosines of tangent point, solution 1} \\
+ \spec{V01}{R(3)}{direction cosines of tangent point, solution 2} \\
+ \spec{N}{I}{number of solutions:} \\
+ \spec{}{}{\hspace{1em} 0 = no solutions returned (note 2)} \\
+ \spec{}{}{\hspace{1em} 1 = only the first solution is useful (note 3)} \\
+ \spec{}{}{\hspace{1em} 2 = there are two useful solutions (note 3)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The vector V must be of unit length or the result will be wrong.
+ \item Cases where there is no solution can only arise near the poles.
+ For example, it is clearly impossible for a star at the pole
+ itself to have a non-zero XI value.
+ \item Also near the poles, cases can arise where there are two useful
+ solutions. The argument N indicates whether the second of the
+ two solutions returned is useful.
+ N\,=\,1
+ indicates only one useful solution, the usual case; under these
+ circumstances, the second solution can be regarded as valid if
+ the vector V02 is interpreted as the ``over-the-pole'' case.
+ \item The projection is called the {\it gnomonic}\/ projection; the
+ Cartesian coordinates \xieta\ are called
+ {\it standard coordinates.}\/ The latter
+ are in units of the distance from the tangent plane to the projection
+ point, {\it i.e.}\ radians near the origin.
+ \item This routine is the Cartesian equivalent of the routine sla\_TPS2C.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_UE2EL}{Universal to Conventional Elements}
+{
+ \action{Transform universal elements into conventional heliocentric
+ osculating elements.}
+ \call{CALL sla\_UE2EL (\vtop{
+ \hbox{U, JFORMR,}
+ \hbox{JFORM, EPOCH, ORBINC, ANODE, PERIH,}
+ \hbox{AORQ, E, AORL, DM, JSTAT)}}}
+}
+\args{GIVEN}
+{
+ \spec{U}{D(13)}{universal orbital elements (updated; Note~1)} \\
+ \specel {(1)} {combined mass ($M+m$)} \\
+ \specel {(2)} {total energy of the orbit ($\alpha$)} \\
+ \specel {(3)} {reference (osculating) epoch ($t_0$)} \\
+ \specel {(4-6)} {position at reference epoch (${\rm \bf r}_0$)} \\
+ \specel {(7-9)} {velocity at reference epoch (${\rm \bf v}_0$)} \\
+ \specel {(10)} {heliocentric distance at reference epoch} \\
+ \specel {(11)} {${\rm \bf r}_0.{\rm \bf v}_0$} \\
+ \specel {(12)} {date ($t$)} \\
+ \specel {(13)} {universal eccentric anomaly ($\psi$) of date, approx} \\ \\
+ \spec{JFORMR}{I}{requested element set (1-3; Note~3)}
+}
+\args{RETURNED}
+{
+ \spec{JFORM}{I}{element set actually returned (1-3; Note~4)} \\
+ \spec{EPOCH}{D}{epoch of elements ($t_0$ or $T$, TT MJD)} \\
+ \spec{ORBINC}{D}{inclination ($i$, radians)} \\
+ \spec{ANODE}{D}{longitude of the ascending node ($\Omega$, radians)} \\
+ \spec{PERIH}{D}{longitude or argument of perihelion
+ ($\varpi$ or $\omega$,} \\
+ \spec{}{}{\hspace{1.5em} radians)} \\
+ \spec{AORQ}{D}{mean distance or perihelion distance ($a$ or $q$, AU)} \\
+ \spec{E}{D}{eccentricity ($e$)} \\
+ \spec{AORL}{D}{mean anomaly or longitude
+ ($M$ or $L$, radians,} \\
+ \spec{}{}{\hspace{1.5em} JFORM=1,2 only)} \\
+ \spec{DM}{D}{daily motion ($n$, radians, JFORM=1 only)} \\
+ \spec{JSTAT}{I}{status:} \\
+ \spec{}{}{\hspace{2.3em} 0 = OK} \\
+ \spec{}{}{\hspace{1.5em} $-$1 = illegal PMASS} \\
+ \spec{}{}{\hspace{1.5em} $-$2 = illegal JFORMR} \\
+ \spec{}{}{\hspace{1.5em} $-$3 = position/velocity out of allowed range}
+}
+\notes
+{
+ \begin{enumerate}
+ \setlength{\parskip}{\medskipamount}
+ \item The ``universal'' elements are those which define the orbit for the
+ purposes of the method of universal variables (see reference 2).
+ They consist of the combined mass of the two bodies, an epoch,
+ and the position and velocity vectors (arbitrary reference frame)
+ at that epoch. The parameter set used here includes also various
+ quantities that can, in fact, be derived from the other
+ information. This approach is taken to avoiding unnecessary
+ computation and loss of accuracy. The supplementary quantities
+ are (i)~$\alpha$, which is proportional to the total energy of the
+ orbit, (ii)~the heliocentric distance at epoch,
+ (iii)~the outwards component of the velocity at the given epoch,
+ (iv)~an estimate of $\psi$, the ``universal eccentric anomaly'' at a
+ given date and (v)~that date.
+ \item The universal elements are with respect to the mean equator and
+ equinox of epoch J2000. The orbital elements produced are with
+ respect to the J2000 ecliptic and mean equinox.
+ \item Three different element-format options are supported, as
+ follows. \\
+
+ JFORM=1, suitable for the major planets:
+
+ \begin{tabbing}
+ xxx \= xxxxxxxx \= xx \= \kill
+ \> EPOCH \> = \> epoch of elements $t_0$ (TT MJD) \\
+ \> ORBINC \> = \> inclination $i$ (radians) \\
+ \> ANODE \> = \> longitude of the ascending node $\Omega$ (radians) \\
+ \> PERIH \> = \> longitude of perihelion $\varpi$ (radians) \\
+ \> AORQ \> = \> mean distance $a$ (AU) \\
+ \> E \> = \> eccentricity $e$ $( 0 \leq e < 1 )$ \\
+ \> AORL \> = \> mean longitude $L$ (radians) \\
+ \> DM \> = \> daily motion $n$ (radians)
+ \end{tabbing}
+
+ JFORM=2, suitable for minor planets:
+
+ \begin{tabbing}
+ xxx \= xxxxxxxx \= xx \= \kill
+ \> EPOCH \> = \> epoch of elements $t_0$ (TT MJD) \\
+ \> ORBINC \> = \> inclination $i$ (radians) \\
+ \> ANODE \> = \> longitude of the ascending node $\Omega$ (radians) \\
+ \> PERIH \> = \> argument of perihelion $\omega$ (radians) \\
+ \> AORQ \> = \> mean distance $a$ (AU) \\
+ \> E \> = \> eccentricity $e$ $( 0 \leq e < 1 )$ \\
+ \> AORL \> = \> mean anomaly $M$ (radians)
+ \end{tabbing}
+
+ JFORM=3, suitable for comets:
+
+ \begin{tabbing}
+ xxx \= xxxxxxxx \= xx \= \kill
+ \> EPOCH \> = \> epoch of perihelion $T$ (TT MJD) \\
+ \> ORBINC \> = \> inclination $i$ (radians) \\
+ \> ANODE \> = \> longitude of the ascending node $\Omega$ (radians) \\
+ \> PERIH \> = \> argument of perihelion $\omega$ (radians) \\
+ \> AORQ \> = \> perihelion distance $q$ (AU) \\
+ \> E \> = \> eccentricity $e$ $( 0 \leq e \leq 10 )$
+ \end{tabbing}
+ \item It may not be possible to generate elements in the form
+ requested through JFORMR. The caller is notified of the form
+ of elements actually returned by means of the JFORM argument:
+
+ \begin{tabbing}
+ xx \= xxxxxxxxxx \= xxxxxxxxxxx \= \kill
+ \> JFORMR \> JFORM \> meaning \\ \\
+ \> ~~~~~1 \> ~~~~~1 \> OK: elements are in the requested format \\
+ \> ~~~~~1 \> ~~~~~2 \> never happens \\
+ \> ~~~~~1 \> ~~~~~3 \> orbit not elliptical \\
+ \> ~~~~~2 \> ~~~~~1 \> never happens \\
+ \> ~~~~~2 \> ~~~~~2 \> OK: elements are in the requested format \\
+ \> ~~~~~2 \> ~~~~~3 \> orbit not elliptical \\
+ \> ~~~~~3 \> ~~~~~1 \> never happens \\
+ \> ~~~~~3 \> ~~~~~2 \> never happens \\
+ \> ~~~~~3 \> ~~~~~3 \> OK: elements are in the requested format
+ \end{tabbing}
+ \item The arguments returned for each value of JFORM ({\it cf}\/ Note~5:
+ JFORM may not be the same as JFORMR) are as follows:
+
+ \begin{tabbing}
+ xxx \= xxxxxxxxxxxx \= xxxxxx \= xxxxxx \= \kill
+ \> JFORM \> 1 \> 2 \> 3 \\ \\
+ \> EPOCH \> $t_0$ \> $t_0$ \> $T$ \\
+ \> ORBINC \> $i$ \> $i$ \> $i$ \\
+ \> ANODE \> $\Omega$ \> $\Omega$ \> $\Omega$ \\
+ \> PERIH \> $\varpi$ \> $\omega$ \> $\omega$ \\
+ \> AORQ \> $a$ \> $a$ \> $q$ \\
+ \> E \> $e$ \> $e$ \> $e$ \\
+ \> AORL \> $L$ \> $M$ \> - \\
+ \> DM \> $n$ \> - \> -
+ \end{tabbing}
+
+ where:
+ \begin{tabbing}
+ xxx \= xxxxxxxx \= xxx \= \kill
+ \> $t_0$ \> is the epoch of the elements (MJD, TT) \\
+ \> $T$ \> is the epoch of perihelion (MJD, TT) \\
+ \> $i$ \> is the inclination (radians) \\
+ \> $\Omega$ \> is the longitude of the ascending node (radians) \\
+ \> $\varpi$ \> is the longitude of perihelion (radians) \\
+ \> $\omega$ \> is the argument of perihelion (radians) \\
+ \> $a$ \> is the mean distance (AU) \\
+ \> $q$ \> is the perihelion distance (AU) \\
+ \> $e$ \> is the eccentricity \\
+ \> $L$ \> is the longitude (radians, $0-2\pi$) \\
+ \> $M$ \> is the mean anomaly (radians, $0-2\pi$) \\
+ \> $n$ \> is the daily motion (radians) \\
+ \> - \> means no value is set
+ \end{tabbing}
+ \item At very small inclinations, the longitude of the ascending node
+ ANODE becomes indeterminate and under some circumstances may be
+ set arbitrarily to zero. Similarly, if the orbit is close to
+ circular, the true anomaly becomes indeterminate and under some
+ circumstances may be set arbitrarily to zero. In such cases,
+ the other elements are automatically adjusted to compensate,
+ and so the elements remain a valid description of the orbit.
+ \end{enumerate}
+}
+\refs{
+ \begin{enumerate}
+ \item Sterne, Theodore E., {\it An Introduction to Celestial Mechanics,}\/
+ Interscience Publishers, 1960. Section 6.7, p199.
+ \item Everhart, E. \& Pitkin, E.T., Am.~J.~Phys.~51, 712, 1983.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_UE2PV}{Pos/Vel from Universal Elements}
+{
+ \action{Heliocentric position and velocity of a planet, asteroid or comet,
+ starting from orbital elements in the ``universal variables'' form.}
+ \call{CALL sla\_UE2PV (DATE, U, PV, JSTAT)}
+}
+\args{GIVEN}
+{
+ \spec{DATE}{D}{date (TT Modified Julian Date = JD$-$2400000.5)}
+}
+\args{GIVEN and RETURNED}
+{
+ \spec{U}{D(13)}{universal orbital elements (updated; Note~1)} \\
+ \specel {(1)} {combined mass ($M+m$)} \\
+ \specel {(2)} {total energy of the orbit ($\alpha$)} \\
+ \specel {(3)} {reference (osculating) epoch ($t_0$)} \\
+ \specel {(4-6)} {position at reference epoch (${\rm \bf r}_0$)} \\
+ \specel {(7-9)} {velocity at reference epoch (${\rm \bf v}_0$)} \\
+ \specel {(10)} {heliocentric distance at reference epoch} \\
+ \specel {(11)} {${\rm \bf r}_0.{\rm \bf v}_0$} \\
+ \specel {(12)} {date ($t$)} \\
+ \specel {(13)} {universal eccentric anomaly ($\psi$) of date, approx}
+}
+\args{RETURNED}
+{
+ \spec{PV}{D(6)}{heliocentric \xyzxyzd, equatorial, J2000} \\
+ \spec{}{}{\hspace{1.5em} (AU, AU/s; Note~1)} \\
+ \spec{JSTAT}{I}{status:} \\
+ \spec{}{}{\hspace{1.95em} 0 = OK} \\
+ \spec{}{}{\hspace{1.2em} $-$1 = radius vector zero} \\
+ \spec{}{}{\hspace{1.2em} $-2$ = failed to converge}
+}
+\notes
+{
+ \begin{enumerate}
+ \setlength{\parskip}{\medskipamount}
+ \item The ``universal'' elements are those which define the orbit for the
+ purposes of the method of universal variables (see reference).
+ They consist of the combined mass of the two bodies, an epoch,
+ and the position and velocity vectors (arbitrary reference frame)
+ at that epoch. The parameter set used here includes also various
+ quantities that can, in fact, be derived from the other
+ information. This approach is taken to avoiding unnecessary
+ computation and loss of accuracy. The supplementary quantities
+ are (i)~$\alpha$, which is proportional to the total energy of the
+ orbit, (ii)~the heliocentric distance at epoch,
+ (iii)~the outwards component of the velocity at the given epoch,
+ (iv)~an estimate of $\psi$, the ``universal eccentric anomaly'' at a
+ given date and (v)~that date.
+ \item The companion routine is sla\_EL2UE. This takes the conventional
+ orbital elements and transforms them into the set of numbers
+ needed by the present routine. A single prediction requires one
+ one call to sla\_EL2UE followed by one call to the present routine;
+ for convenience, the two calls are packaged as the routine
+ sla\_PLANEL. Multiple predictions may be made by again
+ calling sla\_EL2UE once, but then calling the present routine
+ multiple times, which is faster than multiple calls to sla\_PLANEL.
+
+ It is not obligatory to use sla\_EL2UE to obtain the parameters.
+ However, it should be noted that because sla\_EL2UE performs its
+ own validation, no checks on the contents of the array U are made
+ by the present routine.
+ \item DATE is the instant for which the prediction is required. It is
+ in the TT timescale (formerly Ephemeris Time, ET) and is a
+ Modified Julian Date (JD$-$2400000.5).
+ \item The universal elements supplied in the array U are in canonical
+ units (solar masses, AU and canonical days). The position and
+ velocity are not sensitive to the choice of reference frame. The
+ sla\_EL2UE routine in fact produces coordinates with respect to the
+ J2000 equator and equinox.
+ \item The algorithm was originally adapted from the EPHSLA program of
+ D.\,H.\,P.\,Jones (private communication, 1996). The method
+ is based on Stumpff's Universal Variables.
+ \end{enumerate}
+}
+\aref{Everhart, E. \& Pitkin, E.T., Am.~J.~Phys.~51, 712, 1983.}
+%-----------------------------------------------------------------------
+\routine{SLA\_UNPCD}{Remove Radial Distortion}
+{
+ \action{Remove pincushion/barrel distortion from a distorted
+ \xy\ to give tangent-plane \xy.}
+ \call{CALL sla\_UNPCD (DISCO,X,Y)}
+}
+\args{GIVEN}
+{
+ \spec{DISCO}{D}{pincushion/barrel distortion coefficient} \\
+ \spec{X,Y}{D}{distorted \xy}
+}
+\args{RETURNED}
+{
+ \spec{X,Y}{D}{tangent-plane \xy}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The distortion is of the form $\rho = r (1 + c r^{2})$, where $r$ is
+ the radial distance from the tangent point, $c$ is the DISCO
+ argument, and $\rho$ is the radial distance in the presence of
+ the distortion.
+ \item For {\it pincushion}\/ distortion, C is +ve; for
+ {\it barrel}\/ distortion, C is $-$ve.
+ \item For X,Y in units of one projection radius (in the case of
+ a photographic plate, the focal length), the following
+ DISCO values apply:
+
+ \vspace{2ex}
+
+ \hspace{5em}
+ \begin{tabular}{|l|c|} \hline
+ Geometry & DISCO \\ \hline \hline
+ astrograph & 0.0 \\ \hline
+ Schmidt & $-$0.3333 \\ \hline
+ AAT PF doublet & +147.069 \\ \hline
+ AAT PF triplet & +178.585 \\ \hline
+ AAT f/8 & +21.20 \\ \hline
+ JKT f/8 & +14.6 \\ \hline
+ \end{tabular}
+
+ \vspace{2ex}
+
+ \item The present routine is an approximate inverse to the
+ companion routine sla\_PCD, obtained from two iterations
+ of Newton's method. The mismatch between the sla\_PCD
+ and sla\_UNPCD is negligible for astrometric applications;
+ to reach 1~milliarcsec at the edge of the AAT triplet or
+ Schmidt field would require field diameters of \degree{2}{4}
+ and $42^{\circ}$ respectively.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_V2TP}{Direction Cosines to Tangent Plane}
+{
+ \action{Given the direction cosines of a star and of the tangent point,
+ determine the star's tangent-plane coordinates
+ (single precision).}
+ \call{CALL sla\_V2TP (V, V0, XI, ETA, J)}
+}
+\args{GIVEN}
+{
+ \spec{V}{R(3)}{direction cosines of star} \\
+ \spec{V0}{R(3)}{direction cosines of tangent point}
+}
+\args{RETURNED}
+{
+ \spec{XI,ETA}{R}{tangent plane coordinates (radians)} \\
+ \spec{J}{I}{status:} \\
+ \spec{}{}{\hspace{1.5em} 0 = OK, star on tangent plane} \\
+ \spec{}{}{\hspace{1.5em} 1 = error, star too far from axis} \\
+ \spec{}{}{\hspace{1.5em} 2 = error, antistar on tangent plane} \\
+ \spec{}{}{\hspace{1.5em} 3 = error, antistar too far from axis}
+}
+\notes
+{
+ \begin{enumerate}
+ \item If vector V0 is not of unit length, or if vector V is of zero
+ length, the results will be wrong.
+ \item If V0 points at a pole, the returned $\xi,\eta$
+ will be based on the
+ arbitrary assumption that $\alpha=0$ at the tangent point.
+ \item The projection is called the {\it gnomonic}\/ projection; the
+ Cartesian coordinates \xieta\ are called
+ {\it standard coordinates.}\/ The latter
+ are in units of the distance from the tangent plane to the projection
+ point, {\it i.e.}\ radians near the origin.
+ \item This routine is the Cartesian equivalent of the routine sla\_S2TP.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_VDV}{Scalar Product}
+{
+ \action{Scalar product of two 3-vectors (single precision).}
+ \call{R~=~sla\_VDV (VA, VB)}
+}
+\args{GIVEN}
+{
+ \spec{VA}{R(3)}{first vector} \\
+ \spec{VB}{R(3)}{second vector}
+}
+\args{RETURNED}
+{
+ \spec{sla\_VDV}{R}{scalar product VA.VB}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_VN}{Normalize Vector}
+{
+ \action{Normalize a 3-vector, also giving the modulus (single precision).}
+ \call{CALL sla\_VN (V, UV, VM)}
+}
+\args{GIVEN}
+{
+ \spec{V}{R(3)}{vector}
+}
+\args{RETURNED}
+{
+ \spec{UV}{R(3)}{unit vector in direction of V} \\
+ \spec{VM}{R}{modulus of V}
+}
+\anote{If the modulus of V is zero, UV is set to zero as well.}
+%-----------------------------------------------------------------------
+\routine{SLA\_VXV}{Vector Product}
+{
+ \action{Vector product of two 3-vectors (single precision).}
+ \call{CALL sla\_VXV (VA, VB, VC)}
+}
+\args{GIVEN}
+{
+ \spec{VA}{R(3)}{first vector} \\
+ \spec{VB}{R(3)}{second vector}
+}
+\args{RETURNED}
+{
+ \spec{VC}{R(3)}{vector product VA$\times$VB}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_WAIT}{Time Delay}
+{
+ \action{Wait for a specified interval.}
+ \call{CALL sla\_WAIT (DELAY)}
+}
+\args{GIVEN}
+{
+ \spec{DELAY}{R}{delay in seconds}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The implementation is machine-specific.
+ \item The delay actually requested is restricted to the range
+ 100ns-200s in the present implementation.
+ \item There is no guarantee of accuracy, though on almost all
+ types of computer the program will certainly not
+ resume execution {\it before}\/ the stated interval has
+ elapsed.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_XY2XY}{Apply Linear Model to an \xy}
+{
+ \action{Transform one \xy\ into another using a linear model of the type
+ produced by the sla\_FITXY routine.}
+ \call{CALL sla\_XY2XY (X1,Y1,COEFFS,X2,Y2)}
+}
+\args{GIVEN}
+{
+ \spec{X1,Y1}{D}{\xy\ before transformation} \\
+ \spec{COEFFS}{D(6)}{transformation coefficients (see note)}
+}
+\args{RETURNED}
+{
+ \spec{X2,Y2}{D}{\xy\ after transformation}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The model relates two sets of \xy\ coordinates as follows.
+ Naming the six elements of COEFFS $a,b,c,d,e$ \& $f$,
+ the present routine performs the transformation:
+ \begin{verse}
+ $x_{2} = a + bx_{1} + cy_{1}$ \\
+ $y_{2} = d + ex_{1} + fy_{1}$
+ \end{verse}
+ \item See also sla\_FITXY, sla\_PXY, sla\_INVF, sla\_DCMPF.
+ \end{enumerate}
+}
+%-----------------------------------------------------------------------
+\routine{SLA\_ZD}{$h,\delta$ to Zenith Distance}
+{
+ \action{Hour angle and declination to zenith distance
+ (double precision).}
+ \call{D~=~sla\_ZD (HA, DEC, PHI)}
+}
+\args{GIVEN}
+{
+ \spec{HA}{D}{hour angle in radians} \\
+ \spec{DEC}{D}{declination in radians} \\
+ \spec{PHI}{D}{latitude in radians}
+}
+\args{RETURNED}
+{
+ \spec{sla\_ZD}{D}{zenith distance (radians, $0\!-\!\pi$)}
+}
+\notes
+{
+ \begin{enumerate}
+ \item The latitude must be geodetic. In critical applications,
+ corrections for polar motion should be applied (see sla\_POLMO).
+ \item In some applications it will be important to specify the
+ correct type of hour angle and declination in order to
+ produce the required type
+ of zenith distance. In particular, it may be
+ important to distinguish between the zenith distance
+ as affected by refraction, which would require the
+ {\it observed}\/ \hadec, and the zenith distance {\it in vacuo},
+ which would require the {\it topocentric}\/ \hadec. If
+ the effects of diurnal aberration can be neglected, the
+ {\it apparent}\/ \hadec\ may be used instead of the
+ {\it topocentric}\/ \hadec.
+ \item No range checking of arguments is done.
+ \item In applications which involve many zenith distance calculations,
+ rather than calling the present routine it will be more
+ efficient to use inline code, having previously computed fixed
+ terms such as sine and cosine of latitude, and perhaps sine and
+ cosine of declination.
+ \end{enumerate}
+}
+
+\pagebreak
+
+\section{EXPLANATION AND EXAMPLES}
+To guide the writer of positional-astronomy applications software,
+this final chapter puts the SLALIB routines into the context of
+astronomical phenomena and techniques, and presents a few
+``cookbook'' examples
+of the SLALIB calls in action. The astronomical content of the chapter
+is not, of course, intended to be a substitute for specialist text-books on
+positional astronomy, but may help bridge the gap between
+such books and the SLALIB routines. For further reading, the following
+cover a wide range of material and styles:
+\begin{itemize}
+\item {\it Explanatory Supplement to the Astronomical Almanac},
+ ed.\ P.\,Kenneth~Seidelmann (1992), University Science Books.
+\item {\it Vectorial Astrometry}, C.\,A.\,Murray (1983), Adam Hilger.
+\item {\it Spherical Astronomy}, Robin~M.\,Green (1985), Cambridge
+ University Press.
+\item {\it Spacecraft Attitude Determination and Control},
+ ed.\ James~R.\,Wertz (1986), Reidel.
+\item {\it Practical Astronomy with your Calculator},
+ Peter~Duffett-Smith (1981), Cambridge University Press.
+\end{itemize}
+Also of considerable value, though out of date in places, are:
+\begin{itemize}
+\item {\it Explanatory Supplement to the Astronomical Ephemeris
+ and the American Ephemeris and Nautical Almanac}, RGO/USNO (1974),
+ HMSO.
+\item {\it Textbook on Spherical Astronomy}, W.\,M.\,Smart (1977),
+ Cambridge University Press.
+\end{itemize}
+Only brief details of individual SLALIB routines are given here, and
+readers will find it useful to refer to the subprogram specifications
+elsewhere in this document. The source code for the SLALIB routines
+(available in both Fortran and C) is also intended to be used as
+documentation.
+
+\subsection {Spherical Trigonometry}
+Celestial phenomena occur at such vast distances from the
+observer that for most practical purposes there is no need to
+work in 3D; only the direction
+of a source matters, not how far away it is. Things can
+therefore be viewed as if they were happening
+on the inside of sphere with the observer at the centre --
+the {\it celestial sphere}. Problems involving
+positions and orientations in the sky can then be solved by
+using the formulae of {\it spherical trigonometry}, which
+apply to {\it spherical triangles}, the sides of which are
+{\it great circles}.
+
+Positions on the celestial sphere may be specified by using
+a spherical polar coordinate system, defined in terms of
+some fundamental plane and a line in that plane chosen to
+represent zero longitude. Mathematicians usually work with the
+co-latitude, with zero at the principal pole, whereas most
+astronomical coordinate systems use latitude, reckoned plus and
+minus from the equator.
+Astronomical coordinate systems may be either right-handed
+({\it e.g.}\ right ascension and declination \radec,
+Galactic longitude and latitude \gal)
+or left-handed ({\it e.g.}\ hour angle and
+declination \hadec). In some cases
+different conventions have been used in the past, a fruitful source of
+mistakes. Azimuth and geographical longitude are examples; azimuth
+is now generally reckoned north through east
+(making a left-handed system); geographical longitude is now usually
+taken to increase eastwards (a right-handed system) but astronomers
+used to employ a west-positive convention. In reports
+and program comments it is wise to spell out what convention
+is being used, if there is any possibility of confusion.
+
+When applying spherical trigonometry formulae, attention must be
+paid to
+rounding errors (for example it is a bad idea to find a
+small angle through its cosine) and to the possibility of
+problems close to poles.
+Also, if a formulation relies on inspection to establish
+the quadrant of the result, it is an indication that a vector-related
+method might be preferable.
+
+As well as providing many routines which work in terms of specific
+spherical coordinates such as \radec, SLALIB provides
+two routines which operate directly on generic spherical
+coordinates:
+sla\_SEP
+computes the separation between
+two points (the distance along a great circle) and
+sla\_BEAR
+computes the bearing (or {\it position angle})
+of one point seen from the other. The routines
+sla\_DSEP
+and
+sla\_DBEAR
+are double precision equivalents. As a simple demonstration
+of SLALIB, we will use these facilities to estimate the distance from
+London to Sydney and the initial compass heading:
+\goodbreak
+\begin{verbatim}
+ IMPLICIT NONE
+
+ * Degrees to radians
+ REAL D2R
+ PARAMETER (D2R=0.01745329252)
+
+ * Longitudes and latitudes (radians) for London and Sydney
+ REAL AL,BL,AS,BS
+ PARAMETER (AL=-0.2*D2R,BL=51.5*D2R,AS=151.2*D2R,BS=-33.9*D2R)
+
+ * Earth radius in km (spherical approximation)
+ REAL RKM
+ PARAMETER (RKM=6375.0)
+
+ REAL sla_SEP,sla_BEAR
+
+
+ * Distance and initial heading (N=0, E=90)
+ WRITE (*,'(1X,I5,'' km,'',I4,'' deg'')')
+ : NINT(sla_SEP(AL,BL,AS,BS)*RKM),NINT(sla_BEAR(AL,BL,AS,BS)/D2R)
+
+ END
+\end{verbatim}
+\goodbreak
+(The result is 17011~km, $61^\circ$.)
+
+The routines
+sla\_PAV and
+sla\_DPAV
+are equivalents of sla\_BEAR and sla\_DBEAR but starting from
+direction-cosines instead of spherical coordinates.
+
+\subsubsection{Formatting angles}
+SLALIB has routines for decoding decimal numbers
+from character form and for converting angles to and from
+sexagesimal form (hours, minutes, seconds or degrees,
+arcminutes, arcseconds). These apparently straightforward
+operations contain hidden traps which the SLALIB routines
+avoid.
+
+There are five routines for decoding numbers from a character
+string, such as might be entered using a keyboard.
+They all work in the same style, and successive calls
+can work their way along a single string decoding
+a sequence of numbers of assorted types. Number
+fields can be separated by spaces or commas, and can be defaulted
+to previous values or to preset defaults.
+
+Three of the routines decode single numbers:
+sla\_INTIN
+(integer),
+sla\_FLOTIN
+(single precision floating point) and
+sla\_DFLTIN
+(double precision). A minus sign can be
+detected even when the number is zero; this avoids
+the frequently-encountered ``minus zero'' bug, where
+declinations {\it etc.}\ in
+the range $0^{\circ}$ to $-1^{\circ}$ mysteriously migrate to
+the range $0^{\circ}$ to $+1^{\circ}$.
+Here is an example (in Fortran) where we wish to
+read two numbers, and integer {\tt IX} and a real, {\tt Y},
+with {\tt X} defaulting to zero and {\tt Y} defaulting to
+{\tt X}:
+\goodbreak
+\begin{verbatim}
+ DOUBLE PRECISION Y
+ CHARACTER*80 A
+ INTEGER IX,I,J
+
+ * Input the string to be decoded
+ READ (*,'(A)') A
+
+ * Preset IX to its default value
+ IX = 0
+
+ * Point to the start of the string
+ I = 1
+
+ * Decode an integer
+ CALL sla_INTIN(A,I,IX,J)
+ IF (J.GT.1) GO TO ... (bad IX)
+
+ * Preset Y to its default value
+ Y = DBLE(IX)
+
+ * Decode a double precision number
+ CALL sla_DFLTIN(A,I,Y,J)
+ IF (J.GT.1) GO TO ... (bad Y)
+\end{verbatim}
+\goodbreak
+Two additional routines decode a 3-field sexagesimal number:
+sla\_AFIN
+(degrees, arcminutes, arcseconds to single
+precision radians) and
+sla\_DAFIN
+(the same but double precision). They also
+work using other units such as hours {\it etc}.\ if
+you multiply the result by the appropriate factor. An example
+Fortran program which uses
+sla\_DAFIN
+was given earlier, in section 1.2.
+
+SLALIB provides four routines for expressing an angle in radians
+in a preferred range. The function
+sla\_RANGE
+expresses an angle
+in the range $\pm\pi$;
+sla\_RANORM
+expresses an angle in the range
+$0-2\pi$. The functions
+sla\_DRANGE
+and
+sla\_DRANRM
+are double precision versions.
+
+Several routines
+(sla\_CTF2D,
+sla\_CR2AF
+{\it etc.}) are provided to convert
+angles to and from
+sexagesimal form (hours, minute, seconds or degrees,
+arcminutes and arcseconds).
+They avoid the common
+``converting from integer to real at the wrong time''
+bug, which produces angles like \hms{24}{59}{59}{999}.
+Here is a program which displays an hour angle
+stored in radians:
+\goodbreak
+\begin{verbatim}
+ DOUBLE PRECISION HA
+ CHARACTER SIGN
+ INTEGER IHMSF(4)
+ :
+ CALL sla_DR2TF(3,HA,SIGN,IHMSF)
+ WRITE (*,'(1X,A,3I3.2,''.'',I3.3)') SIGN,IHMSF
+\end{verbatim}
+\goodbreak
+
+\subsection {Vectors and Matrices}
+As an alternative to employing a spherical polar coordinate system,
+the direction of an object can be defined in terms of the sum of any
+three vectors as long as they are different and
+not coplanar. In practice, three vectors at right angles are
+usually chosen, forming a system
+of {\it Cartesian coordinates}. The {\it x}- and {\it y}-axes
+lie in the fundamental plane ({\it e.g.}\ the equator in the
+case of \radec), with the {\it x}-axis pointing to zero longitude.
+The {\it z}-axis is normal to the fundamental plane and points
+towards positive latitudes. The {\it y}-axis can lie in either
+of the two possible directions, depending on whether the
+coordinate system is right-handed or left-handed.
+The three axes are sometimes called
+a {\it triad}. For most applications involving arbitrarily
+distant objects such as stars, the vector which defines
+the direction concerned is constrained to have unit length.
+The {\it x}-, {\it y-} and {\it z-}components
+can be regarded as the scalar (dot) product of this vector
+onto the three axes of the triad in turn. Because the vector
+is a unit vector,
+each of the three dot-products is simply the cosine of the angle
+between the unit vector and the axis concerned, and the
+{\it x}-, {\it y-} and {\it z-}components are sometimes
+called {\it direction cosines}.
+
+For some applications involving objects
+with the Solar System, unit vectors are inappropriate, and
+it is necessary to use vectors scaled in length-units such as
+AU, km {\it etc.}
+In these cases the origin of the coordinate system may not be
+the observer, but instead might be the Sun, the Solar-System
+barycentre, the centre of the Earth {\it etc.} But whatever the application,
+the final direction in which the observer sees the object can be
+expressed as direction cosines.
+
+But where has this got us? Instead of two numbers -- a longitude and
+a latitude -- we now have three numbers to look after
+-- the {\it x}-, {\it y-} and
+{\it z-}components -- whose quadratic sum we have somehow to contrive to
+be unity. And, in addition to this apparent redundancy,
+most people find it harder to visualize
+problems in terms of \xyz\ than in $[\,\theta,\phi~]$.
+Despite these objections, the vector approach turns out to have
+significant advantages over the spherical trigonometry approach:
+\begin{itemize}
+\item Vector formulae tend to be much more succinct; one vector
+ operation is the equivalent of strings of sines and cosines.
+\item The formulae are as a rule rigorous, even at the poles.
+\item Accuracy is maintained all over the celestial sphere.
+ When one Cartesian component is nearly unity and
+ therefore insensitive to direction, the others become small
+ and therefore more precise.
+\item Formulations usually deliver the quadrant of the result
+ without the need for any inspection (except within the
+ library function ATAN2).
+\end{itemize}
+A number of important transformations in positional
+astronomy turn out to be nothing more than changes of coordinate
+system, something which is especially convenient if
+the vector approach is used. A direction with respect
+to one triad can be expressed relative to another triad simply
+by multiplying the \xyz\ column vector by the appropriate
+$3\times3$ orthogonal matrix
+(a tensor of Rank~2, or {\it dyadic}). The three rows of this
+{\it rotation matrix}\/
+are the vectors in the old coordinate system of the three
+new axes, and the transformation amounts to obtaining the
+dot-product of the direction-vector with each of the three
+new axes. Precession, nutation, \hadec\ to \azel,
+\radec\ to \gal\ and so on are typical examples of the
+technique. A useful property of the rotation matrices
+is that they can be inverted simply by taking the transpose.
+
+The elements of these vectors and matrices are assorted combinations of
+the sines and cosines of the various angles involved (hour angle,
+declination and so on, depending on which transformation is
+being applied). If you write out the matrix multiplications
+in full you get expressions which are essentially the same as the
+equivalent spherical trigonometry formulae. Indeed, many of the
+standard formulae of spherical trigonometry are most easily
+derived by expressing the problem initially in
+terms of vectors.
+
+\subsubsection{Using vectors}
+SLALIB provides conversions between spherical and vector
+form
+(sla\_CS2C,
+sla\_CC2S
+{\it etc.}), plus an assortment
+of standard vector and matrix operations
+(sla\_VDV,
+sla\_MXV
+{\it etc.}).
+There are also routines
+(sla\_EULER
+{\it etc.}) for creating a rotation matrix
+from three {\it Euler angles}\/ (successive rotations about
+specified Cartesian axes). Instead of Euler angles, a rotation
+matrix can be expressed as an {\it axial vector}\/ (the pole of the rotation,
+and the amount of rotation), and routines are provided for this
+(sla\_AV2M,
+sla\_M2AV
+{\it etc.}).
+
+Here is an example where spherical coordinates {\tt P1} and {\tt Q1}
+undergo a coordinate transformation and become {\tt P2} and {\tt Q2};
+the transformation consists of a rotation of the coordinate system
+through angles {\tt A}, {\tt B} and {\tt C} about the
+{\it z}, new {\it y}\/ and new {\it z}\/ axes respectively:
+\goodbreak
+\begin{verbatim}
+ REAL A,B,C,R(3,3),P1,Q1,V1(3),V2(3),P2,Q2
+ :
+ * Create rotation matrix
+ CALL sla_EULER('ZYZ',A,B,C,R)
+
+ * Transform position (P,Q) from spherical to Cartesian
+ CALL sla_CS2C(P1,Q1,V1)
+
+ * Multiply by rotation matrix
+ CALL sla_MXV(R,V1,V2)
+
+ * Back to spherical
+ CALL sla_CC2S(V2,P2,Q2)
+\end{verbatim}
+\goodbreak
+Small adjustments to the direction of a position
+vector are often most conveniently described in terms of
+$[\,\Delta x,\Delta y, \Delta z\,]$. Adding the correction
+vector needs careful handling if the position
+vector is to remain of length unity, an advisable precaution which
+ensures that
+the \xyz\ components are always available to mean the cosines of
+the angles between the vector and the axis concerned. Two types
+of shifts are commonly used,
+the first where a small vector of arbitrary direction is
+added to the unit vector, and the second where there is a displacement
+in the latitude coordinate (declination, elevation {\it etc.}) alone.
+
+For a shift produced by adding a small \xyz\ vector ${\bf D}$ to a
+unit vector ${\bf V1}$, the resulting vector ${\bf V2}$ has direction
+$<{\bf V1}+{\bf D}>$ but is no longer of unit length. A better approximation
+is available if the result is multiplied by a scaling factor of
+$(1-{\bf D}\cdot{\bf V1})$, where the dot
+means scalar product. In Fortran:
+\goodbreak
+\begin{verbatim}
+ F = (1D0-(DX*V1X+DY*V1Y+DZ*V1Z))
+ V2X = F*(V1X+DX)
+ V2Y = F*(V1Y+DY)
+ V2Z = F*(V1Z+DZ)
+\end{verbatim}
+\goodbreak
+\noindent
+The correction for diurnal aberration (discussed later) is
+an example of this form of shift.
+
+As an example of the second kind of displacement
+we will apply a small change in elevation $\delta E$ to an
+\azel\ direction vector. The direction of the
+result can be obtained by making the allowable approximation
+${\tan \delta E\approx\delta E}$ and adding a adjustment
+vector of length $\delta E$ normal
+to the direction vector in the vertical plane containing the direction
+vector. The $z$-component of the adjustment vector is
+$\delta E \cos E$,
+and the horizontal component is
+$\delta E \sin E$ which has then to be
+resolved into $x$ and $y$ in proportion to their current sizes. To
+approximate a unit vector more closely, a correction factor of
+$\cos \delta E$ can then be applied, which is nearly
+$(1-\delta E^2 /2)$ for
+small $\delta E$. Expressed in Fortran, for initial vector
+{\tt V1X,V1Y,V1Z}, change in elevation {\tt DEL}
+(+ve $\equiv$ upwards), and result
+vector {\tt V2X,V2Y,V2Z}:
+\goodbreak
+\begin{verbatim}
+ COSDEL = 1D0-DEL*DEL/2D0
+ R1 = SQRT(V1X*V1X+V1Y*V1Y)
+ F = COSDEL*(R1-DEL*V1Z)/R1
+ V2X = F*V1X
+ V2Y = F*V1Y
+ V2Z = COSDEL*(V1Z+DEL*R1)
+\end{verbatim}
+\goodbreak
+An example of this type of shift is the correction for atmospheric
+refraction (see later).
+Depending on the relationship between $\delta E$ and $E$, special
+handling at the pole (the zenith for our example) may be required.
+
+SLALIB includes routines for the case where both a position
+and a velocity are involved. The routines
+sla\_CS2C6
+and
+sla\_CC62S
+convert from $[\theta,\phi,\dot{\theta},\dot{\phi}]$
+to \xyzxyzd\ and back;
+sla\_DCS26
+and
+sla\_DC62S
+are double precision equivalents.
+
+\subsection {Celestial Coordinate Systems}
+SLALIB has routines to perform transformations
+of celestial positions between different spherical
+coordinate systems, including those shown in the following table:
+
+\begin{center}
+\begin{tabular}{|l|c|c|c|c|c|c|} \hline
+{\it system} & {\it symbols} & {\it longitude} & {\it latitude} &
+ {\it x-y plane} & {\it long.\ zero} & {\it RH/LH}
+\\ \hline \hline
+horizon & -- & azimuth & elevation & horizontal & north & L
+\\ \hline
+equatorial & $\alpha,\delta$ & R.A.\ & Dec.\ & equator & equinox & R
+\\ \hline
+local equ.\ & $h,\delta$ & H.A.\ & Dec.\ & equator & meridian & L
+\\ \hline
+ecliptic & $\lambda,\beta$ & ecl.\ long.\ & ecl.\ lat.\ &
+ ecliptic & equinox & R
+\\ \hline
+galactic & $l^{I\!I},b^{I\!I}$ & gal.\ long.\ & gal.\ lat.\ &
+ gal.\ equator & gal.\ centre & R
+\\ \hline
+supergalactic & SGL,SGB & SG long.\ & SG lat.\ &
+ SG equator & node w.\ gal.\ equ.\ & R
+\\ \hline
+\end{tabular}
+\end{center}
+Transformations between \hadec\ and \azel\ can be performed by
+calling
+sla\_E2H
+and
+sla\_H2E,
+or, in double precision,
+sla\_DE2H
+and
+sla\_DH2E.
+There is also a routine for obtaining
+zenith distance alone for a given \hadec,
+sla\_ZD,
+and one for determining the parallactic angle,
+sla\_PA.
+Three routines are included which relate to altazimuth telescope
+mountings. For a given \hadec\ and latitude,
+sla\_ALTAZ
+returns the azimuth, elevation and parallactic angle, plus
+velocities and accelerations for sidereal tracking.
+The routines
+sla\_PDA2H
+and
+sla\_PDQ2H
+predict at what hour angle a given azimuth or
+parallactic angle will be reached.
+
+The routines
+sla\_EQECL
+and
+sla\_ECLEQ
+transform between ecliptic
+coordinates and \radec\/; there is also a routine for generating the
+equatorial to ecliptic rotation matrix for a given date:
+sla\_ECMAT.
+
+For conversion between Galactic coordinates and \radec\ there are
+two sets of routines, depending on whether the \radec\ is
+old-style, B1950, or new-style, J2000;
+sla\_EG50
+and
+sla\_GE50
+are \radec\ to \gal\ and {\it vice versa}\/ for the B1950 case, while
+sla\_EQGAL
+and
+sla\_GALEQ
+are the J2000 equivalents.
+
+Finally, the routines
+sla\_GALSUP
+and
+sla\_SUPGAL
+transform \gal\ to de~Vaucouleurs supergalactic longitude and latitude
+and {\it vice versa.}
+
+It should be appreciated that the table, above, constitutes
+a gross oversimplification. Apparently
+simple concepts such as equator, equinox {\it etc.}\ are apt to be very hard to
+pin down precisely (polar motion, orbital perturbations \ldots) and
+some have several interpretations, all subtly different. The various
+frames move in complicated ways with respect to one another or to
+the stars (themselves in motion). And in some instances the
+coordinate system is slightly distorted, so that the
+ordinary rules of spherical trigonometry no longer strictly apply.
+
+These {\it caveats}\/
+apply particularly to the bewildering variety of different
+\radec\ systems that are in use. Figure~1 shows how
+some of these systems are related, to one another and
+to the direction in which a celestial source actually
+appears in the sky. At the top of the diagram are
+the various sorts of {\it mean place}\/
+found in star catalogues and papers;\footnote{One frame not included in
+Figure~1 is that of the Hipparcos catalogue. This is currently the
+best available implementation in the optical of the {\it International
+Celestial Reference System}\/ (ICRS), which is based on extragalactic
+radio sources observed by VLBI. The distinction between FK5 J2000
+and Hipparcos coordinates only becomes important when accuracies of
+50~mas or better are required. More details are given in
+Section~4.14.} at the bottom is the
+{\it observed}\/ \azel, where a perfect theodolite would
+be pointed to see the source; and in the body of
+the diagram are
+the intermediate processing steps and coordinate
+systems. To help
+understand this diagram, and the SLALIB routines that can
+be used to carry out the various calculations, we will look at the coordinate
+systems involved, and the astronomical phenomena that
+affect them.
+
+\begin{figure}
+\begin{center}
+\begin{tabular}{|cccccc|} \hline
+& & & & & \\
+\hspace{5em} & \hspace{5em} & \hspace{5em} &
+ \hspace{5em} & \hspace{5em} & \hspace{5em} \\
+\multicolumn{2}{|c}{\hspace{0em}\fbox{\parbox{8.5em}{\center \vspace{-2ex}
+ mean \radec, FK4, \\
+ any equinox
+ \vspace{0.5ex}}}} &
+ \multicolumn{2}{c}{\hspace{0em}\fbox{\parbox{8.5em}{\center \vspace{-2ex}
+ mean \radec, FK4,
+ no $\mu$, any equinox
+ \vspace{0.5ex}}}} &
+\multicolumn{2}{c|}{\hspace{0em}\fbox{\parbox{8.5em}{\center \vspace{-2ex}
+ mean \radec, FK5, \\
+ any equinox
+ \vspace{0.5ex}}}} \\
+& \multicolumn{2}{|c|}{} & \multicolumn{2}{c|}{} & \\
+\multicolumn{2}{|c}{space motion} & \multicolumn{1}{c|}{} & &
+ \multicolumn{2}{c|}{space motion} \\
+\multicolumn{2}{|c}{-- E-terms} &
+ \multicolumn{2}{c}{-- E-terms} & \multicolumn{1}{c|}{} & \\
+\multicolumn{2}{|c}{precess to B1950} & \multicolumn{2}{c}{precess to B1950} &
+ \multicolumn{2}{c|}{precess to J2000} \\
+\multicolumn{2}{|c}{+ E-terms} &
+ \multicolumn{2}{c}{+ E-terms} & \multicolumn{1}{c|}{} & \\
+\multicolumn{2}{|c}{FK4 to FK5, no $\mu$} &
+ \multicolumn{2}{c}{FK4 to FK5, no $\mu$} & \multicolumn{1}{c|}{} & \\
+\multicolumn{2}{|c}{parallax} & \multicolumn{1}{c|}{} & &
+ \multicolumn{2}{c|}{parallax} \\
+& \multicolumn{2}{|c|}{} & \multicolumn{2}{c|}{} & \\ \cline{2-5}
+\multicolumn{3}{|c|}{} & & & \\
+& \multicolumn{4}{c}{\fbox{\parbox{18em}{\center \vspace{-2ex}
+ FK5, J2000, current epoch, geocentric
+ \vspace{0.5ex}}}} & \\
+\multicolumn{3}{|c|}{} & & & \\
+& \multicolumn{4}{c}{light deflection} & \\
+& \multicolumn{4}{c}{annual aberration} & \\
+& \multicolumn{4}{c}{precession/nutation} & \\
+\multicolumn{3}{|c|}{} & & & \\
+& \multicolumn{4}{c}{\fbox{Apparent \radec}} & \\
+\multicolumn{3}{|c|}{} & & & \\
+& \multicolumn{4}{c}{Earth rotation} & \\
+\multicolumn{3}{|c|}{} & & & \\
+& \multicolumn{4}{c}{\fbox{Apparent \hadec}} & \\
+\multicolumn{3}{|c|}{} & & & \\
+& \multicolumn{4}{c}{diurnal aberration} & \\
+\multicolumn{3}{|c|}{} & & & \\
+& \multicolumn{4}{c}{\fbox{Topocentric \hadec}} & \\
+\multicolumn{3}{|c|}{} & & & \\
+& \multicolumn{4}{c}{\hadec\ to \azel} & \\
+\multicolumn{3}{|c|}{} & & & \\
+& \multicolumn{4}{c}{\fbox{Topocentric \azel}} & \\
+\multicolumn{3}{|c|}{} & & & \\
+& \multicolumn{4}{c}{refraction} & \\
+\multicolumn{3}{|c|}{} & & & \\
+& \multicolumn{4}{c}{\fbox{Observed \azel}} & \\
+& & & & & \\
+& & & & & \\ \hline
+\end{tabular}
+\end{center}
+\vspace{-0.5ex}
+\caption{Relationship Between Celestial Coordinates}
+
+Star positions are published or catalogued using
+one of the mean \radec\ systems shown at
+the top. The ``FK4'' systems
+were used before about 1980 and are usually
+equinox B1950. The ``FK5'' system, equinox J2000, is now preferred,
+or rather its modern equivalent, the International Celestial Reference
+Frame (in the optical, the Hipparcos catalogue).
+The figure relates a star's mean \radec\ to the actual
+line-of-sight to the star.
+Note that for the conventional choices of equinox, namely
+B1950 or J2000, all of the precession and E-terms corrections
+are superfluous.
+\end{figure}
+
+\subsection{Precession and Nutation}
+{\it Right ascension and declination}, (\radec), are the names
+of the longitude and latitude in a spherical
+polar coordinate system based on the Earth's axis of rotation.
+The zero point of $\alpha$ is the point of intersection of
+the {\it celestial
+equator}\/ and the {\it ecliptic}\/ (the apparent path of the Sun
+through the year) where the Sun moves into the northern
+hemisphere. This point is called the
+{\it first point of Aries},
+the {\it vernal equinox}\/ (with apologies to
+southern-hemisphere readers) or simply the {\it equinox}.\footnote{With
+the introduction of the International Celestial Reference System (ICRS), the
+connection between (i)~star coordinates and (ii)~the Earth's orientation
+and orbit has been broken. However, the orientation of the
+International Celestial Reference Frame (ICRF) axes was, for convenience,
+chosen to match J2000 FK5, and for most practical purposes ICRF coordinates
+(for example entries in the Hipparcos catalogue) can be regarded as
+synonymous with J2000 FK5. See Section 4.14 for further details.}
+
+This simple picture is unfortunately
+complicated by the difficulty of defining
+a suitable equator and equinox. One problem is that the
+Sun's apparent motion is not completely regular, due to the
+ellipticity of the Earth's orbit and its continuous disturbance
+by the Moon and planets. This is dealt with by
+separating the motion into (i)~a smooth and steady {\it mean Sun}\/
+and (ii)~a set of periodic corrections and perturbations; only the former
+is involved in establishing reference frames and timescales.
+A second, far larger problem, is that
+the celestial equator and the ecliptic
+are both moving with respect to the stars.
+These motions arise because of the gravitational
+interactions between the Earth and the other solar-system bodies.
+
+By far the largest effect is the
+so-called ``precession of the equinoxes'', where the Earth's
+rotation axis sweeps out a cone centred on the ecliptic
+pole, completing one revolution in about 26,000 years. The
+cause of the motion is the torque exerted on the distorted and
+spinning Earth by the Sun and the Moon. Consider the effect of the
+Sun alone, at or near the northern summer solstice. The Sun
+`sees' the top (north pole) of the Earth tilted towards it
+(by about \degree{23}{5}, the {\it obliquity of the
+ecliptic}\/),
+and sees the nearer part of the Earth's equatorial bulge
+below centre and the further part above centre.
+Although the Earth is in free fall,
+the gravitational force on the nearer part of the
+equatorial bulge is greater than that on the further part, and
+so there is a net torque acting
+as if to eliminate the tilt. Six months later the same thing
+is happening in reverse, except that the torque is still
+trying to eliminate the tilt. In between (at the equinoxes) the
+torque shrinks to zero. A torque acting on a spinning body
+is gyroscopically translated
+into a precessional motion of the spin axis at right-angles to the torque,
+and this happens to the Earth.
+The motion varies during the
+year, going through two maxima, but always acts in the
+same direction. The Moon produces the same effect,
+adding a contribution to the precession which peaks twice
+per month. The Moon's proximity to the Earth more than compensates
+for its smaller mass and gravitational attraction, so that it
+in fact contributes most of the precessional effect.
+
+The complex interactions between the three bodies produce a
+precessional motion that is wobbly rather than completely smooth.
+However, the main 26,000-year component is on such a grand scale that
+it dwarfs the remaining terms, the biggest of
+which has an amplitude of only \arcseci{17} and a period of
+about 18.6~years. This difference of scale makes it convenient to treat
+these two components of the motion separately. The main 26,000-year
+effect is called {\it luni-solar precession}; the smaller,
+faster, periodic terms are called the {\it nutation}.
+
+Note that precession and nutation are simply
+different frequency components of the same physical effect. It is
+a common misconception that precession is caused
+by the Sun and nutation is caused by the Moon. In fact
+the Moon is responsible for two-thirds of the precession, and,
+while it is true that much of the complex detail of the nutation is
+a reflection of the intricacies of the lunar orbit, there are
+nonetheless important solar terms in the nutation.
+
+In addition to and quite separate
+from the precession/nutation effect, the orbit of the Earth-Moon system
+is not fixed in orientation, a result of the attractions of the
+planets. This slow (about \arcsec{0}{5}~per~year)
+secular rotation of the ecliptic about a slowly-moving diameter is called,
+confusingly, {\it planetary
+precession}\/ and, along with the luni-solar precession is
+included in the {\it general precession}. The equator and
+ecliptic as affected by general precession
+are what define the various ``mean'' \radec\ reference frames.
+
+The models for precession and nutation come from a combination
+of observation and theory, and are subject to continuous
+refinement. Nutation models in particular have reached a high
+degree of sophistication, taking into account such things as
+the non-rigidity of the Earth and the effects of
+the planets; SLALIB's nutation
+model (IAU~1980) involves 106 terms in each of $\psi$ (longitude)
+and $\epsilon$ (obliquity), some as small as \arcsec{0}{0001}.
+
+\subsubsection{SLALIB support for precession and nutation}
+SLALIB offers a choice of three precession models:
+\begin{itemize}
+\item The old Bessel-Newcomb, pre IAU~1976, ``FK4'' model, used for B1950
+ star positions and other pre-1984.0 purposes
+(sla\_PREBN).
+\item The new Fricke, IAU~1976, ``FK5'' model, used for J2000 star
+ positions and other post-1984.0 purposes
+(sla\_PREC).
+\item A model published by Simon {\it et al.}\ which is more accurate than
+ the IAU~1976 model and which is suitable for long
+ periods of time
+(sla\_PRECL).
+\end{itemize}
+In each case, the named SLALIB routine generates the $(3\times3)$
+{\it precession
+matrix}\/ for a given start and finish time. For example,
+here is the Fortran code for generating the rotation
+matrix which describes the precession between the epochs
+J2000 and J1985.372 (IAU 1976 model):
+\goodbreak
+\begin{verbatim}
+ DOUBLE PRECISION PMAT(3,3)
+ :
+ CALL sla_PREC(2000D0,1985.372D0,PMAT)
+\end{verbatim}
+\goodbreak
+It is instructive to examine the resulting matrix:
+\goodbreak
+\begin{verbatim}
+ +0.9999936402 +0.0032709208 +0.0014214694
+ -0.0032709208 +0.9999946505 -0.0000023247
+ -0.0014214694 -0.0000023248 +0.9999989897
+\end{verbatim}
+\goodbreak
+Note that the diagonal elements are close to unity, and the
+other elements are small. This shows that over an interval as
+short as 15~years the precession isn't going to move a
+position vector very far (in this case about \degree{0}{2}).
+
+For convenience, a direct \radec\ to \radec\ precession routine is
+also provided
+(sla\_PRECES),
+suitable for either the old or the new system (but not a
+mixture of the two).
+
+SLALIB provides only one nutation model, the new, IAU~1980 model,
+implemented in the routine
+sla\_NUTC.
+This returns the components of nutation
+in longitude and latitude (and also provides the obliquity) from
+which a nutation matrix can be generated by calling
+sla\_DEULER
+(and from which the {\it equation of the equinoxes}, described
+later, can be found). Alternatively,
+the nutation matrix can be generated in a single call by using
+sla\_NUT.
+
+A rotation matrix for applying the entire precession/nutation
+transformation in one go can be generated by calling
+sla\_PRENUT.
+
+\subsection{Mean Places}
+The main effect of the precession/nutation is a steady increase of about
+\arcseci{50}/year in the ecliptic longitudes of the stars. It is therefore
+essential, when reporting the position of an astronomical target, to
+qualify the coordinates with a date, or {\it epoch}.
+Specifying the epoch ties down the equator and
+equinox which define the \radec\ coordinate system that is
+being used.
+\footnote{An equinox is, however, not required for coordinates
+in the International Celestial Reference System. Such coordinates must
+be labelled simply ``ICRS'', or the specific catalogue can be mentioned,
+such as ``Hipparcos''; constructions such as ``Hipparcos, J2000'' are
+redundant and misleading.} For simplicity, only
+the smooth and steady ``general
+precession'' part of the complete precession/nutation effect is
+included, thereby defining what is called the {\it mean}\/
+equator and equinox for the epoch concerned. We say a star
+has a mean place of (for example)
+\hms{12}{07}{58}{09}~\dms{-19}{44}{37}{1} ``with respect to the mean equator
+and equinox of epoch J2000''. The short way of saying
+this is ``\radec\ equinox J2000'' ({\bf not} ``\radec\ epoch J2000'',
+which means something different to do with
+proper motion).
+
+\subsection{Epoch}
+The word ``epoch'' just means a moment in time, and can be supplied
+in a variety of forms, using different calendar systems and timescales.
+
+For the purpose of specifying the epochs associated with the
+mean place of a star, two conventions exist. Both sorts of epoch
+superficially resemble years AD but are not tied to the civil
+(Gregorian) calendar; to distinguish them from ordinary calendar-years
+there is often
+a ``.0'' suffix (as in ``1950.0''), although any other fractional
+part is perfectly legal ({\it e.g.}\ 1987.5).
+
+The older system,
+{\it Besselian epoch}, is defined in such a way that its units are
+tropical years of about 365.2422~days and its timescale is the
+obsolete {\it Ephemeris Time}.
+The start of the Besselian year is the moment
+when the ecliptic longitude of the mean Sun is
+$280^{\circ}$; this happens near the start of the
+calendar year (which is why $280^{\circ}$ was chosen).
+
+The new system, {\it Julian epoch}, was adopted as
+part of the IAU~1976 revisions (about which more will be said
+in due course) and came formally into use at the
+beginning of 1984. It uses the Julian year of exactly
+365.25~days; Julian epoch 2000 is defined to be 2000~January~1.5 in the
+TT timescale.
+
+For specifying mean places, various standard epochs are in use, the
+most common ones being Besselian epoch 1950.0 and Julian epoch 2000.0.
+To distinguish the two systems, Besselian epochs
+are now prefixed ``B'' and Julian epochs are prefixed ``J''.
+Epochs without an initial letter can be assumed to be Besselian
+if before 1984.0, otherwise Julian. These details are supported by
+the SLALIB routines
+sla\_DBJIN
+(decodes numbers from a
+character string, accepting an optional leading B or J),
+sla\_KBJ
+(decides whether B or J depending on prefix or range) and
+sla\_EPCO
+(converts one epoch to match another).
+
+SLALIB has four routines for converting
+Besselian and Julian epochs into other forms.
+The functions
+sla\_EPB2D
+and
+sla\_EPJ2D
+convert Besselian and Julian epochs into MJD; the functions
+sla\_EPB
+and
+sla\_EPJ
+do the reverse. For example, to express B1950 as a Julian epoch:
+\goodbreak
+\begin{verbatim}
+ DOUBLE PRECISION sla_EPJ,sla_EPB2D
+ :
+ WRITE (*,'(1X,''J'',F10.5)') sla_EPJ(sla_EPB2D(1950D0))
+\end{verbatim}
+\goodbreak
+(The answer is J1949.99979.)
+
+\subsection{Proper Motion}
+Stars in catalogues usually have, in addition to the
+\radec\ coordinates, a {\it proper motion} $[\mu_\alpha,\mu_\delta]$.
+This is an intrinsic motion
+of the star across the background. Very few stars have a
+proper motion which exceeds \arcseci{1}/year, and most are
+far below this level. A star observed as part of normal
+astronomy research will, as a rule, have a proper motion
+which is unknown.
+
+Mean \radec\ and rate of change are not sufficient to pin
+down a star; the epoch at which the \radec\ was or will
+be correct is also needed. Note the distinction
+between the epoch which specifies the
+coordinate system and the epoch at which the star passed
+through the given \radec. The full specification for a star
+is \radec, proper motions, equinox and epoch (plus something to
+identify which set of models for the precession {\it etc.}\ is
+being used -- see the next section).
+For convenience, coordinates given in star catalogues are almost
+always adjusted to make the equinox and epoch the same -- for
+example B1950 in the case of the SAO~catalogue.
+
+SLALIB provides one routine to handle proper motion on its own,
+sla\_PM.
+Proper motion is also allowed for in various other
+routines as appropriate, for example
+sla\_MAP
+and
+sla\_FK425.
+Note that in all SLALIB routines which involve proper motion
+the units are radians per year and the
+$\alpha$ component is in the form $\dot{\alpha}$ ({\it i.e.}\ big
+numbers near the poles).
+Some star catalogues have proper motion per century, and
+in some catalogues the $\alpha$ component is in the form
+$\dot{\alpha}\cos\delta$ ({\it i.e.}\ angle on the sky).
+
+\subsection{Parallax and Radial Velocity}
+For the utmost accuracy and the nearest stars, allowance can
+be made for {\it annual parallax}\/ and for the effects of perspective
+on the proper motion.
+
+Parallax is appreciable only for nearby stars; even
+the nearest, Proxima Centauri, is displaced from its average
+position by less than
+an arcsecond as the Earth revolves in its orbit.
+
+For stars with a known parallax, knowledge of the radial velocity
+allows the proper motion to be expressed as an actual space
+motion in 3~dimensions. The proper motion is,
+in fact, a snapshot of the transverse component of the
+space motion, and in the case of nearby stars will
+change with time due to perspective.
+
+SLALIB does not provide facilities for handling parallax
+and radial-velocity on their own, but their contribution is
+allowed for in such routines as
+sla\_PM,
+sla\_MAP
+and
+sla\_FK425.
+Catalogue mean
+places do not include the effects of parallax and are therefore
+{\it barycentric}; when pointing telescopes {\it etc.}\ it is
+usually most efficient to apply the slowly-changing
+parallax correction to the mean place of the target early on
+and to work with the {\it geocentric}\/ mean place. This latter
+approach is implied in Figure~1.
+
+\subsection{Aberration}
+The finite speed of light combined with the motion of the observer
+around the Sun during the year causes apparent displacements of
+the positions of the stars. The effect is called
+the {\it annual aberration} (or ``stellar''
+aberration). Its maximum size, about \arcsec{20}{5},
+occurs for stars $90^{\circ}$ from the point towards which
+the Earth is headed as it orbits the Sun; a star exactly in line with
+the Earth's motion is not displaced. To receive the light of
+a star, the telescope has to be offset slightly in the direction of
+the Earth's motion. A familiar analogy is the need to tilt your
+umbrella forward when on the move, to avoid getting wet. This
+Newtonian model is,
+in fact, highly misleading in the context of light as opposed
+to rain, but happens to give the same answer as a relativistic
+treatment to first order (better than 1~milliarcsecond).
+
+Before the IAU 1976 resolutions, different
+values for the approximately
+\arcsec{20}{5} {\it aberration constant}\/ were employed
+at different times, and this can complicate comparisons
+between different catalogues. Another complication comes from
+the so-called {\it E-terms of aberration},
+that small part of the annual aberration correction that is a
+function of the eccentricity of the Earth's orbit. The E-terms,
+maximum amplitude about \arcsec{0}{3},
+happen to be approximately constant for a given star, and so they
+used to be incorporated in the catalogue \radec\/
+to reduce the labour of converting to and from apparent place.
+The E-terms can be removed from a catalogue \radec\/ by
+calling
+sla\_SUBET
+or applied (for example to allow a pulsar
+timing-position to be plotted on a B1950 finding chart)
+by calling
+sla\_ADDET;
+the E-terms vector itself can be obtained by calling
+sla\_ETRMS.
+Star positions post IAU 1976 are free of these distortions, and to
+apply corrections for annual aberration involves the actual
+barycentric velocity of the Earth rather than the use of
+canonical circular-orbit models.
+
+The annual aberration is the aberration correction for
+an imaginary observer at the Earth's centre.
+The motion of a real observer around the Earth's rotation axis in
+the course of the day makes a small extra contribution to the total
+aberration effect called the {\it diurnal aberration}. Its
+maximum amplitude is about \arcsec{0}{2}.
+
+No SLALIB routine is provided for calculating the aberration on
+its own, though the required velocity vectors can be
+generated using
+sla\_EVP
+and
+sla\_GEOC.
+Annual and diurnal aberration are allowed for where required, for example in
+sla\_MAP
+{\it etc}.\ and
+sla\_AOP
+{\it etc}. Note that this sort
+of aberration is different from the {\it planetary
+aberration}, which is the apparent displacement of a solar-system
+body, with respect to the ephemeris position, as a consequence
+of the motion of {\it both}\/ the Earth and the source. The
+planetary aberration can be computed either by correcting the
+position of the solar-system body for light-time, followed by
+the ordinary stellar aberration correction, or more
+directly by expressing the position and velocity of the source
+in the observer's frame and correcting for light-time alone.
+
+\subsection{Different Sorts of Mean Place}
+A particularly confusing aspect of published mean places is that they
+are sensitive to the precise way they were determined. A mean
+place is not directly observable, even with fundamental
+instruments such as transit circles, and to produce a mean
+place will involve relying on some existing star catalogue,
+for example the fundamental catalogues FK4 and FK5,
+and applying given mathematical models of precession, nutation,
+aberration and so on.
+Note in particular that no star catalogue,
+even a fundamental catalogue such as FK4 or
+FK5, defines a coordinate system, strictly speaking;
+it is merely a list of star positions and proper motions.
+However, once the stars from a given catalogue
+are used as position calibrators, {\it e.g.}\ for
+transit-circle observations or for plate reductions, then a
+broader sense of there being a coordinate grid naturally
+arises, and such phrases as ``in the system of
+the FK4'' can legitimately be employed. However,
+there is no formal link between the
+two concepts -- no ``standard least squares fit'' between
+reality and the inevitably flawed catalogues.\footnote{This was
+true until the inception of the International Celestial Reference
+System, which is based on the idea of axes locked into the
+distant background. The coordinates
+of the extragalactic sources which realize these
+axes have no individual significance; there is a ``no net rotation''
+condition which has to be satisfied each time any revisions take
+place.} All such
+catalogues suffer at some level from systematic, zonal distortions
+of both the star positions and of the proper motions,
+and include measurement errors peculiar to individual
+stars.
+
+Many of these complications are of little significance except to
+specialists. However, observational astronomers cannot
+escape exposure to at least the two main varieties of
+mean place, loosely called
+FK4 and FK5, and should be aware of
+certain pitfalls. For most practical purposes the more recent
+system, FK5, is free of surprises and tolerates naive
+use well. FK4, in contrast, contains two important traps:
+\begin{itemize}
+\item The FK4 system rotates at about
+ \arcsec{0}{5} per century relative to distant galaxies.
+ This is manifested as a systematic distortion in the
+ proper motions of all FK4-derived catalogues, which will
+ in turn pollute any astrometry done using those catalogues.
+ For example, FK4-based astrometry of a QSO using plates
+ taken decades apart will reveal a non-zero {\it fictitious proper
+ motion}, and any FK4 star which happens to have zero proper
+ motion is, in fact, slowly moving against the distant
+ background. The FK4 frame rotates because it was
+ established before the nature of the Milky Way, and hence the
+ existence of systematic motions of nearby stars, had been
+ recognized.
+\item Star positions in the FK4 system are part-corrected for
+ annual aberration (see above) and embody the so-called
+ E-terms of aberration.
+\end{itemize}
+The change from the old FK4-based system to FK5
+occurred at the beginning
+of 1984 as part of a package of resolutions made by the IAU in 1976,
+along with the adoption of J2000 as the reference epoch. Star
+positions in the newer, FK5, system are free from the E-terms, and
+the system is a much better approximation to an
+inertial frame (about five times better).
+
+It may occasionally be convenient to specify the FK4 fictitious proper
+motion directly. In FK4, the centennial proper motion of (for example)
+a QSO is:
+
+$\mu_\alpha=-$\tsec{0}{015869}$
+ +(($\tsec{0}{029032}$~\sin \alpha
+ +$\tsec{0}{000340}$~\cos \alpha ) \sin \delta
+ -$\tsec{0}{000105}$~\cos \alpha
+ -$\tsec{0}{000083}$~\sin \alpha ) \sec \delta $ \\
+$\mu_\delta\,=+$\arcsec{0}{43549}$~\cos \alpha
+ -$\arcsec{0}{00510}$~\sin \alpha +
+ ($\arcsec{0}{00158}$~\sin \alpha
+ -$\arcsec{0}{00125}$~\cos \alpha ) \sin \delta
+ -$\arcsec{0}{00066}$~\cos \delta $
+
+\subsection{Mean Place Transformations}
+Figure~1 is based upon three varieties of mean \radec\ all of which are
+of practical significance to observing astronomers in the present era:
+\begin{itemize}
+ \item Old style (FK4) with known proper motion in the FK4
+ system, and with parallax and radial velocity either
+ known or assumed zero.
+ \item Old style (FK4) with zero proper motion in FK5,
+ and with parallax and radial velocity assumed zero.
+ \item New style (FK5) with proper motion, parallax and
+ radial velocity either known or assumed zero.
+\end{itemize}
+The figure outlines the steps required to convert positions in
+any of these systems to a J2000 \radec\ for the current
+epoch, as might be required in a telescope-control
+program for example.
+Most of the steps can be carried out by calling a single
+SLALIB routines; there are other SLALIB routines which
+offer set-piece end-to-end transformation routines for common cases.
+Note, however, that SLALIB does not set out to provide the capability
+for arbitrary transformations of star-catalogue data
+between all possible systems of mean \radec.
+Only in the (common) cases of FK4, equinox and epoch B1950,
+to FK5, equinox and epoch J2000, and {\it vice versa}\/ are
+proper motion, parallax and radial velocity transformed
+along with the star position itself, the
+focus of SLALIB support.
+
+As an example of using SLALIB to transform mean places, here is
+a program which implements the top-left path of Figure~1.
+An FK4 \radec\ of arbitrary equinox and epoch and with
+known proper motion and
+parallax is transformed into an FK5 J2000 \radec\ for the current
+epoch. As a test star we will use $\alpha=$\hms{16}{09}{55}{13},
+$\delta=$\dms{-75}{59}{27}{2}, equinox 1900, epoch 1963.087,
+$\mu_\alpha=$\tsec{-0}{0312}$/y$, $\mu_\delta=$\arcsec{+0}{103}$/y$,
+parallax = \arcsec{0}{062}, radial velocity = $-34.22$~km/s. The
+epoch of observation is 1994.35.
+\goodbreak
+\begin{verbatim}
+ IMPLICIT NONE
+ DOUBLE PRECISION AS2R,S2R
+ PARAMETER (AS2R=4.8481368110953599D-6,S2R=7.2722052166430399D-5)
+ INTEGER J,I
+ DOUBLE PRECISION R0,D0,EQ0,EP0,PR,PD,PX,RV,EP1,R1,D1,R2,D2,R3,D3,
+ : R4,D4,R5,D5,R6,D6,EP1D,EP1B,W(3),EB(3),PXR,V(3)
+ DOUBLE PRECISION sla_EPB,sla_EPJ2D
+
+ * RA, Dec etc of example star
+ CALL sla_DTF2R(16,09,55.13D0,R0,J)
+ CALL sla_DAF2R(75,59,27.2D0,D0,J)
+ D0=-D0
+ EQ0=1900D0
+ EP0=1963.087D0
+ PR=-0.0312D0*S2R
+ PD=+0.103D0*AS2R
+ PX=0.062D0
+ RV=-34.22D0
+ EP1=1994.35D0
+
+ * Epoch of observation as MJD and Besselian epoch
+ EP1D=sla_EPJ2D(EP1)
+ EP1B=sla_EPB(EP1D)
+
+ * Space motion to the current epoch
+ CALL sla_PM(R0,D0,PR,PD,PX,RV,EP0,EP1B,R1,D1)
+
+ * Remove E-terms of aberration for the original equinox
+ CALL sla_SUBET(R1,D1,EQ0,R2,D2)
+
+ * Precess to B1950
+ R3=R2
+ D3=D2
+ CALL sla_PRECES('FK4',EQ0,1950D0,R3,D3)
+
+ * Add E-terms for the standard equinox B1950
+ CALL sla_ADDET(R3,D3,1950D0,R4,D4)
+
+ * Transform to J2000, no proper motion
+ CALL sla_FK45Z(R4,D4,EP1B,R5,D5)
+
+ * Parallax
+ CALL sla_EVP(sla_EPJ2D(EP1),2000D0,W,EB,W,W)
+ PXR=PX*AS2R
+ CALL sla_DCS2C(R5,D5,V)
+ DO I=1,3
+ V(I)=V(I)-PXR*EB(I)
+ END DO
+ CALL sla_DCC2S(V,R6,D6)
+ :
+\end{verbatim}
+\goodbreak
+It is interesting to look at how the \radec\ changes during the
+course of the calculation:
+\begin{tabbing}
+xxxxxxxxxxxxxx \= xxxxxxxxxxxxxxxxxxxxxxxxx \= x \= \kill
+\> {\tt 16 09 55.130 -75 59 27.20} \> \> {\it original equinox and epoch} \\
+\> {\tt 16 09 54.155 -75 59 23.98} \> \> {\it with space motion} \\
+\> {\tt 16 09 54.229 -75 59 24.18} \> \> {\it with old E-terms removed} \\
+\> {\tt 16 16 28.213 -76 06 54.57} \> \> {\it precessed to 1950.0} \\
+\> {\tt 16 16 28.138 -76 06 54.37} \> \> {\it with new E-terms} \\
+\> {\tt 16 23 07.901 -76 13 58.87} \> \> {\it J2000, current epoch} \\
+\> {\tt 16 23 07.907 -76 13 58.92} \> \> {\it including parallax}
+\end{tabbing}
+
+Other remarks about the above (unusually complicated) example:
+\begin{itemize}
+\item If the original equinox and epoch were B1950, as is quite
+ likely, then it would be unnecessary to treat space motions
+ and E-terms explicitly. Transformation to FK5 J2000 could
+ be accomplished simply by calling
+sla\_FK425, after which
+ a call to
+sla\_PM and the parallax code would complete the
+ work.
+\item The rigorous treatment of the E-terms
+ has only a small effect on the result. Such refinements
+ are, nevertheless, worthwhile in order to facilitate comparisons and
+ to increase the chances that star positions from different
+ suppliers are compatible.
+\item The FK4 to FK5 transformations,
+sla\_FK425
+ and
+sla\_FK45Z,
+ are not as is sometimes assumed simply 50 years of precession,
+ though this indeed accounts for most of the change. The
+ transformations also include adjustments
+ to the equinox, a revised precession model, elimination of the
+ E-terms, a change to the proper-motion time unit and so on.
+ The reason there are two routines rather than just one
+ is that the FK4 frame rotates relative to the background, whereas
+ the FK5 frame is a much better approximation to an
+ inertial frame, and zero proper
+ motion in FK4 does not, therefore, mean zero proper motion in FK5.
+ SLALIB also provides two routines,
+sla\_FK524
+ and
+sla\_FK54Z,
+ to perform the inverse transformations.
+\item Some star catalogues (FK4 itself is one) were constructed using slightly
+ different procedures for the polar regions compared with
+ elsewhere. SLALIB ignores this inhomogeneity and always
+ applies the standard
+ transformations irrespective of location on the celestial sphere.
+\end{itemize}
+
+\subsection {Mean Place to Apparent Place}
+The {\it geocentric apparent place}\/ of a source, or {\it apparent place}\/
+for short,
+is the \radec\ if viewed from the centre of the Earth,
+with respect to the true equator and equinox of date.
+Transformation of an FK5 mean \radec, equinox J2000,
+current epoch, to apparent place involves the following effects:
+\goodbreak
+\begin{itemize}
+ \item Light deflection -- the gravitational lens effect of
+ the sun.
+ \item Annual aberration.
+ \item Precession/nutation.
+\end{itemize}
+The {\it light deflection}\/ is seldom significant. Its value
+at the limb of the Sun is about
+\arcsec{1}{74}; it falls off rapidly with distance from the
+Sun and has shrunk to about
+\arcsec{0}{02} at an elongation of $20^\circ$.
+
+As already described, the {\it annual aberration}\/
+is a function of the Earth's velocity
+relative to the solar system barycentre (available through the
+SLALIB routine
+sla\_EVP)
+and produces shifts of up to about \arcsec{20}{5}.
+
+The {\it precession/nutation}, from J2000 to the current epoch, is
+expressed by a rotation matrix which is available through the
+SLALIB routine
+sla\_PRENUT.
+
+The whole mean-to-apparent transformation can be done using the SLALIB
+routine
+sla\_MAP. As a demonstration, here is a program which lists the
+{\it North Polar Distance}\/ ($90^\circ-\delta$) of Polaris for
+the decade of closest approach to the Pole:
+\goodbreak
+\begin{verbatim}
+ IMPLICIT NONE
+ DOUBLE PRECISION PI,PIBY2,D2R,S2R,AS2R
+ PARAMETER (PI=3.141592653589793238462643D0)
+ PARAMETER (D2R=PI/180D0,
+ : PIBY2=PI/2D0,
+ : S2R=PI/(12D0*3600D0),
+ : AS2R=PI/(180D0*3600D0))
+ DOUBLE PRECISION RM,DM,PR,PD,DATE,RA,DA
+ INTEGER J,IDS,IDE,ID,IYMDF(4),I
+ DOUBLE PRECISION sla_EPJ2D
+
+ CALL sla_DTF2R(02,31,49.8131D0,RM,J)
+ CALL sla_DAF2R(89,15,50.661D0,DM,J)
+ PR=+21.7272D0*S2R/100D0
+ PD=-1.571D0*AS2R/100D0
+ WRITE (*,'(1X,'//
+ : '''Polaris north polar distance (deg) 2096-2105''/)')
+ WRITE (*,'(4X,''Date'',7X''NPD''/)')
+ CALL sla_CLDJ(2096,1,1,DATE,J)
+ IDS=NINT(DATE)
+ CALL sla_CLDJ(2105,12,31,DATE,J)
+ IDE=NINT(DATE)
+ DO ID=IDS,IDE,10
+ DATE=DBLE(ID)
+ CALL sla_DJCAL(0,DATE,IYMDF,J)
+ CALL sla_MAP(RM,DM,PR,PD,0D0,0D0,2000D0,DATE,RA,DA)
+ WRITE (*,'(1X,I4,2I3.2,F9.5)') (IYMDF(I),I=1,3),(PIBY2-DA)/D2R
+ END DO
+
+ END
+\end{verbatim}
+\goodbreak
+For cases where the transformation has to be repeated for different
+times or for more than one star, the straightforward
+sla\_MAP
+approach is apt to be
+wasteful as both the Earth velocity and the
+precession/nutation matrix can be re-calculated relatively
+infrequently without ill effect. A more efficient method is to
+perform the target-independent calculations only when necessary,
+by calling
+sla\_MAPPA,
+and then to use either
+sla\_MAPQKZ,
+when only the \radec\/ is known, or
+sla\_MAPQK,
+when full catalogue positions, including proper motion, parallax and
+radial velocity, are available. How frequently to call
+sla\_MAPPA
+depends on the accuracy objectives; once per
+night will deliver sub-arcsecond accuracy for example.
+
+The routines
+sla\_AMP
+and
+sla\_AMPQK
+allow the reverse transformation, from apparent to mean place.
+
+\subsection{Apparent Place to Observed Place}
+The {\it observed place}\/ of a source is its position as
+seen by a perfect theodolite at the location of the
+observer. Transformation of an apparent \radec\ to observed
+place involves the following effects:
+\goodbreak
+\begin{itemize}
+ \item \radec\ to \hadec.
+ \item Diurnal aberration.
+ \item \hadec\ to \azel.
+ \item Refraction.
+\end{itemize}
+The transformation from apparent \radec\ to
+apparent \hadec\ is made by allowing for
+{\it Earth rotation}\/ through the {\it sidereal time}, $\theta$:
+\[ h = \theta - \alpha \]
+For this equation to work, $\alpha$ must be the apparent right
+ascension for the time of observation, and $\theta$ must be
+the {\it local apparent sidereal time}. The latter is obtained
+as follows:
+\begin{enumerate}
+\item from civil time obtain the coordinated universal time, UTC
+ (more later on this);
+\item add the UT1$-$UTC (typically a few tenths of a second) to
+ give the UT;
+\item from the UT compute the Greenwich mean sidereal time (using
+sla\_GMST);
+\item add the observer's (east) longitude, giving the local mean
+ sidereal time;
+\item add the equation of the equinoxes (using
+sla\_EQEQX).
+\end{enumerate}
+The {\it equation of the equinoxes}\/~($=\Delta\psi\cos\epsilon$ plus
+small terms)
+is the effect of nutation on the sidereal time.
+Its value is typically a second or less. It is
+interesting to note that if the object of the exercise is to
+transform a mean place all the way into an observed place (very
+often the case),
+then the equation of the
+equinoxes and the longitude component of nutation can both be
+omitted, removing a great deal of computation. However, SLALIB
+follows the normal convention and works {\it via}\/ the apparent place.
+
+Note that for very precise work the observer's longitude should
+be corrected for {\it polar motion}. This can be done with
+sla\_POLMO.
+The corrections are always less than about \arcsec{0}{3}, and
+are futile unless the position of the observer's telescope is known
+to better than a few metres.
+
+Tables of observed and
+predicted UT1$-$UTC corrections and polar motion data
+are published every few weeks by the International Earth Rotation Service.
+
+The transformation from apparent \hadec\ to {\it topocentric}\/
+\hadec\ consists of allowing for
+{\it diurnal aberration}. This effect, maximum amplitude \arcsec{0}{2},
+was described earlier. There is no specific SLALIB routine
+for computing the diurnal aberration,
+though the routines
+sla\_AOP {\it etc.}\
+include it, and the required velocity vector can be
+determined by calling
+sla\_GEOC.
+
+The next stage is the major coordinate rotation from local equatorial
+coordinates \hadec\ into horizon coordinates. The SLALIB routines
+sla\_E2H
+{\it etc.}\ can be used for this. For high-precision
+applications the mean geodetic latitude should be corrected for polar
+motion.
+
+\subsubsection{Refraction}
+The final correction is for atmospheric refraction.
+This effect, which depends on local meteorological conditions and
+the effective colour of the source/detector combination,
+increases the observed elevation of the source by a
+significant effect even at moderate zenith distances, and near the
+horizon by over \degree{0}{5}. The amount of refraction can by
+computed by calling the SLALIB routine
+sla\_REFRO;
+however,
+this requires as input the observed zenith distance, which is what
+we are trying to predict. For high precision it is
+therefore necessary to iterate, using the topocentric
+zenith distance as the initial estimate of the
+observed zenith distance.
+
+The full
+sla\_REFRO refraction calculation is onerous, and for
+zenith distances of less than, say, $75^{\circ}$ the following
+model can be used instead:
+
+\[ \zeta _{vac} \approx \zeta _{obs}
+ + A \tan \zeta _{obs}
+ + B \tan ^{3}\zeta _{obs} \]
+where $\zeta _{vac}$ is the topocentric
+zenith distance (i.e.\ {\it in vacuo}),
+$\zeta _{obs}$ is the observed
+zenith distance (i.e.\ affected by refraction), and $A$ and $B$ are
+constants, about \arcseci{60}
+and \arcsec{-0}{06} respectively for a sea-level site.
+The two constants can be calculated for a given set of conditions
+by calling either
+sla\_REFCO or
+sla\_REFCOQ.
+
+sla\_REFCO works by calling
+sla\_REFRO for two zenith distances and fitting $A$ and $B$
+to match. The calculation is onerous, but delivers accurate
+results whatever the conditions.
+sla\_REFCOQ uses a direct formulation of $A$ and $B$ and
+is much faster; it is slightly less accurate than
+sla\_REFCO but more than adequate for most practical purposes.
+
+Like the full refraction model, the two-term formulation works in the wrong
+direction for our purposes, predicting
+the {\it in vacuo}\/ (topocentric) zenith distance
+given the refracted (observed) zenith distance,
+rather than {\it vice versa}. The obvious approach of
+interchanging $\zeta _{vac}$ and $\zeta _{obs}$ and
+reversing the signs, though approximately
+correct, gives avoidable errors which are just significant in
+some applications; for
+example about \arcsec{0}{2} at $70^\circ$ zenith distance. A
+much better result can easily be obtained, by using one Newton-Raphson
+iteration as follows:
+
+\[ \zeta _{obs} \approx \zeta _{vac}
+ - \frac{A \tan \zeta _{vac} + B \tan ^{3}\zeta _{vac}}
+ {1 + ( A + 3 B \tan ^{2}\zeta _{vac} ) \sec ^{2}\zeta _{vac}}\]
+
+The effect of refraction can be applied to an unrefracted
+zenith distance by calling
+sla\_REFZ or to an unrefracted
+\xyz\ by calling
+sla\_REFV.
+Over most of the sky these two routines deliver almost identical
+results, but beyond $\zeta=83^\circ$
+sla\_REFV
+becomes unacceptably inaccurate while
+sla\_REFZ
+remains usable. (However
+sla\_REFV
+is significantly faster, which may be important in some applications.)
+SLALIB also provides a routine for computing the airmass, the function
+sla\_AIRMAS.
+
+The refraction ``constants'' returned by
+sla\_REFCO and
+sla\_REFCOQ
+are slightly affected by colour, especially at the blue end
+of the spectrum. Where values for more than one
+wavelength are needed, rather than calling
+sla\_REFCO
+several times it is more efficient to call
+sla\_REFCO
+just once, for a selected ``base'' wavelength, and then to call
+sla\_ATMDSP
+once for each wavelength of interest.
+
+All the SLALIB refraction routines work for radio wavelengths as well
+as the optical/IR band. The radio refraction is very dependent on
+humidity, and an accurate value must be supplied. There is no
+wavelength dependence, however. The choice of optical/IR or
+radio is made by specifying a wavelength greater than $100\mu m$
+for the radio case.
+
+\subsubsection{Efficiency considerations}
+The complete apparent place to observed place transformation
+can be carried out by calling
+sla\_AOP.
+For improved efficiency
+in cases of more than one star or a sequence of times, the
+target-independent calculations can be done once by
+calling
+sla\_AOPPA,
+the time can be updated by calling
+sla\_AOPPAT,
+and
+sla\_AOPQK
+can then be used to perform the
+apparent-to-observed transformation. The reverse transformation
+is available through
+sla\_OAP
+and
+sla\_OAPQK.
+({\it n.b.}\ These routines use accurate but computationally-expensive
+refraction algorithms for zenith distances beyond about $76^\circ$.
+For many purposes, in-line code tailored to the accuracy requirements
+of the application will be preferable, for example ignoring UT1$-$UTC,
+omitting diurnal aberration and using
+sla\_REFZ
+to apply the refraction.)
+
+\subsection{The Hipparcos Catalogue and the ICRS}
+With effect from the beginning of 1998, the IAU adopted a new
+reference system to replace FK5 J2000. The new system, called the
+International Celestial Reference System (ICRS), differs profoundly
+from all predecessors in that the link with solar-system dynamics
+was broken; the ICRS axes are defined in terms of the directions
+of a set of extragalactic sources, not in terms of the mean equator and
+equinox at a given reference epoch. Although the ICRS and FK5 coordinates
+of any given object are almost the same, the orientation of the new frame
+was essentially arbitrary, and the close match to FK5 J2000 was contrived
+purely for reasons of continuity and convenience.
+
+A distinction is made between the reference {\it system}\/ (the ICRS)
+and {\it frame}\/ (ICRF). The ICRS is the set of prescriptions and
+conventions together with the modelling required to define, at any
+time, a triad of axes. The ICRF is a practical realization, and
+currently consists of a catalogue of equatorial coordinates for 608
+extragalactic radio sources observed by VLBI.
+
+The best optical realization of the ICRF currently available is the
+Hipparcos catalogue. The extragalactic sources were not directly
+observable by the Hipparcos satellite and so the link from Hipparcos
+to ICRF was established through a variety of indirect techniques: VLBI and
+conventional interferometry of radio stars, photographic astrometry
+and so on. The Hipparcos frame is aligned to the ICRF to within about
+0.5~mas and 0.5~mas/year (at epoch 1991.25).
+
+The Hipparcos catalogue includes all of the FK5 stars, which has enabled
+the orientation and spin of the latter to be studied. At epoch J2000,
+the misalignment of the FK5 frame with respect to Hipparcos
+(and hence ICRS) are about 32~mas and 1~mas/year respectively.
+Consequently, for many practical purposes, including pointing
+telescopes, the IAU 1976-1982 conventions on reference frames and
+Earth orientation remain adequate and there is no need to change to
+Hipparcos coordinates, new precession/nutation models and so on.
+However, for the most exacting astrometric applications, SLALIB
+provides some support for Hipparcos coordinates in the form of
+four new routines:
+sla\_FK52H and
+sla\_H2FK5,
+which transform FK5 positions and proper motions to the Hipparcos frame
+and {\it vice versa,}\/ and
+sla\_FK5HZ and
+sla\_HFK5Z,
+where the transformations are for stars whose Hipparcos proper motion is
+zero.
+
+Further information on the ICRS can be found in the paper by M.\,Feissel
+and F.\,Mignard, Astron.\,Astrophys. 331, L33-L36 (1988).
+
+\subsection{Timescales}
+SLALIB provides for conversion between several timescales, and involves
+use of one or two others. The full list is as follows:
+\begin{itemize}
+\item TAI: International Atomic Time
+\item UTC: Coordinated Universal Time
+\item UT: Universal Time
+\item GMST: Greenwich Mean Sidereal Time
+\item LAST: Local Apparent Sidereal Time
+\item TT: Terrestrial Time
+\item TDB: Barycentric Dynamical Time.
+\end{itemize}
+Three obsolete timescales should be mentioned here to avoid confusion.
+\begin{itemize}
+\item GMT: Greenwich Mean Time -- can mean either UTC or UT.
+\item ET: Ephemeris Time -- more or less the same as either TT or TDB.
+\item TDT: Terrestrial Dynamical Time -- former name of TT.
+\end{itemize}
+
+\subsubsection{Atomic Time: TAI}
+{\it International Atomic Time}\/ TAI is a laboratory timescale. Its
+unit is the SI second, which is defined in terms of a
+defined number
+of wavelengths of the radiation produced by a certain electronic
+transition in the caesium 133 atom. It
+is realized through a changing
+population of high-precision atomic clocks held
+at standards institutes in various countries. There is an
+elaborate process of continuous intercomparison, leading to
+a weighted average of all the clocks involved.
+
+Though TAI shares the same second as the more familiar UTC, the
+two timescales are noticeably separated in epoch because of the
+build-up of leap seconds. At the time of writing, UTC
+lags about half a minute behind TAI.
+
+For any given date, the difference TAI$-$UTC
+can be obtained by calling the SLALIB routine
+sla\_DAT.
+Note, however, that an up-to-date copy of the routine must be used if
+the most recent leap seconds are required. For applications
+where this is critical, mechanisms independent of SLALIB
+and under local control must
+be set up; in such cases
+sla\_DAT
+can be useful as an
+independent check, for test dates within the range of the
+available version. Up-to-date information on TAI$-$UTC is available
+from {\tt ftp://maia.usno.navy.mil/ser7/tai-utc.dat}.
+
+\subsubsection{Universal Time: UTC, UT1}
+{\it Coordinated Universal Time}\/ UTC is the basis of civil timekeeping.
+Most time zones differ from UTC by an integer number
+of hours, though a few ({\it e.g.}\ parts of Canada and Australia) differ
+by $n+0.5$~hours. The UTC second is the same as the SI second,
+as for TAI. In the long term, UTC keeps in step with the
+Sun. It does so even though the Earth's rotation is slightly
+variable (due to large scale movements of water and atmosphere
+among other things) by occasionally introducing a {\it leap
+second}.
+
+{\it Universal Time}\/ UT, or more specifically UT1,
+is in effect the mean solar time. It is continuous
+({\it i.e.}\ there are no leap seconds) but has a variable
+rate because of the Earth's non-uniform rotation period. It is
+needed for computing the sidereal time, an essential part of
+pointing a telescope at a celestial source. To obtain UT1, you
+have to look up the value of UT1$-$UTC for the date concerned
+in tables published by the International Earth Rotation
+Service; this quantity, kept in the range
+$\pm$\tsec{0}{9} by means of UTC leap
+seconds, is then added to the UTC. The quantity UT1$-$UTC,
+which typically changes by 1 or 2~ms per day,
+can only be obtained by observation, though seasonal trends
+are known and the IERS listings are able to predict some way into
+the future with adequate accuracy for pointing telescopes.
+
+UTC leap seconds are introduced as necessary,
+usually at the end of December or June.
+On the average the solar day is slightly longer
+than the nominal 86,400~SI~seconds and so leap seconds are always positive;
+however, provision exists for negative leap seconds if needed.
+The form of a leap second can be seen from the
+following description of the end of June~1994:
+
+\hspace{3em}
+\begin{tabular}{clrccc} \\
+ & & & UTC & UT1$-$UTC & UT1 \\ \\
+1994 & June & 30 & 23 59 58 & $-0.218$ & 23 59 57.782 \\
+ & & & 23 59 59 & $-0.218$ & 23 59 58.782 \\
+ & & & 23 59 60 & $-0.218$ & 23 59 59.782 \\
+ & July & 1 & 00 00 00 & $+0.782$ & 00 00 00.782 \\
+ & & & 00 00 01 & $+0.782$ & 00 00 01.782 \\
+\end{tabular}
+
+Note that UTC has to be expressed as hours, minutes and
+seconds (or at least in seconds for a given date) if leap seconds
+are to be taken into account. It is improper to express a UTC as a
+Julian Date, for example, because there will be an ambiguity
+during a leap second (in the above example,
+1994~June~30 \hms{23}{59}{60}{0} and
+1994~July~1 \hms{00}{00}{00}{0} would {\it both}\/ come out as
+MJD~49534.00000). Although in the vast majority of
+cases this won't matter, there are potential problems in
+on-line data acquisition systems and in applications involving
+taking the difference between two times. Note that although the routines
+sla\_DAT
+and
+sla\_DTT
+expect UTC in the form of an MJD, the meaning here is really a
+whole-number {\it date}\/ rather than a time. Though the routines will accept
+a fractional part and will almost always function correctly, on a day
+which ends with a leap
+second incorrect results would be obtained during the leap second
+itself because by then the MJD would have moved into the next day.
+
+\subsubsection{Sidereal Time: GMST, LAST}
+Sidereal Time is the ``time of day'' relative to the
+stars rather than to the Sun. After
+one sidereal day the stars come back to the same place in the
+sky, apart from sub-arcsecond precession effects. Because the Earth
+rotates faster relative to the stars than to the Sun by one day
+per year, the sidereal second is shorter than the solar
+second; the ratio is about 0.9973.
+
+The {\it Greenwich Mean Sidereal Time}\/ GMST is
+linked to UT1 by a numerical formula which
+is implemented in the SLALIB routines
+sla\_GMST
+and
+sla\_GMSTA.
+There are, of course, no leap seconds in GMST, but the second
+changes in length along with the UT1 second, and also varies
+over long periods of time because of slow changes in the Earth's
+orbit. This makes the timescale unsuitable for everything except
+predicting the apparent directions of celestial sources.
+
+The {\it Local Apparent Sidereal Time}\/ LAST is the apparent right
+ascension of the local meridian, from which the hour angle of any
+star can be determined knowing its $\alpha$. It can be obtained from the
+GMST by adding the east longitude (corrected for polar motion
+in precise work) and the {\it equation of the equinoxes}. The
+latter, already described, is an aspect of the nutation effect
+and can be predicted by calling the SLALIB routine
+sla\_EQEQX
+or, neglecting certain very small terms, by calling
+sla\_NUTC
+and using the expression $\Delta\psi\cos\epsilon$.
+
+\subsubsection{Dynamical Time: TT, TDB}
+Dynamical time is the independent variable in the theories
+which describe the motions of bodies in the solar system. When
+you use published formulae which model the position of the
+Earth in its orbit, for example, or look up
+the Moon's position in a precomputed ephemeris, the date and time
+you use must be in terms of one of the dynamical timescales. It
+is a common but understandable mistake to use UT directly, in which
+case the results will be about 1~minute out (in the present
+era).
+
+It is not hard to see why such timescales are necessary.
+UTC would clearly be unsuitable as the argument of an
+ephemeris because of leap seconds.
+A solar-system ephemeris based on UT1 or sidereal time would somehow
+have to include the unpredictable variations of the Earth's rotation.
+TAI would work, but eventually
+the ephemeris and the ensemble of atomic clocks would drift apart.
+In effect, the ephemeris {\it is}\/ a clock, with the bodies of
+the solar system the hands.
+
+Only two of the dynamical timescales are of any great importance to
+observational astronomers, TT and TDB. (The obsolete
+timescale ET, ephemeris time, was more or less the same as TT.)
+
+{\it Terrestrial Time}\/ TT is
+the theoretical timescale of apparent geocentric ephemerides of solar
+system bodies. It applies, in principle,
+to an Earthbound clock, at sea-level, and for practical purposes
+it is tied to
+Atomic Time TAI through the formula TT~$=$~TAI~$+$~\tsec{32}{184}.
+In practice, therefore, the units of TT are ordinary SI seconds, and
+the offset of \tsec{32}{184} with respect to TAI is fixed.
+The SLALIB routine
+sla\_DTT
+returns TT$-$UTC for a given UTC
+({\it n.b.}\ sla\_DTT
+calls
+sla\_DAT,
+and the latter must be an up-to-date version if recent leap seconds are
+to be taken into account).
+
+{\it Barycentric Dynamical Time}\/ TDB differs from TT by an amount which
+cycles back and forth by a millisecond or two due to
+relativistic effects. The variation is
+negligible for most purposes, but unless taken into
+account would swamp
+long-term analysis of pulse arrival times from the
+millisecond pulsars. It is a consequence of
+the TT clock being on the Earth rather than in empty
+space: the ellipticity of
+the Earth's orbit means that the TT clock's speed and
+gravitational potential vary slightly
+during the course of the year, and as a consequence
+its rate as seen from an outside observer
+varies due to transverse Doppler effect and gravitational
+redshift. By definition, TDB and TT differ only
+by periodic terms, and the main effect
+is a sinusoidal variation of amplitude \tsec{0}{0016}; the
+largest planetary terms are nearly two orders of magnitude
+smaller. The SLALIB routine
+sla\_RCC
+provides a model of
+TDB-TT accurate to a few nanoseconds.
+There are other dynamical timescales, not supported by
+SLALIB routines, which include allowance also for the secular terms.
+These timescales gain on TT and TDB by about \tsec{0}{0013}/day.
+
+For most purposes the more accessible TT is the timescale to use,
+for example when calling
+sla\_PRENUT
+to generate a precession/nutation matrix or when calling
+sla\_EVP
+to predict the
+Earth's position and velocity. For some purposes TDB is the
+correct timescale, for example when interrogating the JPL planetary
+ephemeris (see {\it Starlink User Note~87}\/), though in most cases
+TT will be near enough and will involve less computation.
+
+Investigations of topocentric solar-system phenomena such as
+occultations and eclipses require solar time as well as dynamical
+time. TT/TDB/ET is all that is required in order to compute the geocentric
+circumstances, but if horizon coordinates or geocentric parallax
+are to be tackled UT is also needed. A rough estimate
+of $\Delta {\rm T} = {\rm ET} - {\rm UT}$ is
+available via the routine
+sla\_DT.
+For a given epoch ({\it e.g.}\ 1650) this returns an approximation
+to $\Delta {\rm T}$ in seconds.
+
+\subsection{Calendars}
+The ordinary {\it Gregorian Calendar Date},
+together with a time of day, can be
+used to express an epoch in any desired timescale. For many purposes,
+however, a continuous count of days is more convenient, and for
+this purpose the system of {\it Julian Day Number}\/ can be used.
+JD zero is located about 7000~years ago, well before the
+historical era, and is formally defined in terms of Greenwich noon;
+Julian Day Number 2449444 began at noon on 1994 April~1. {\it Julian Date}\/
+is the same system but with a fractional part appended;
+Julian Date 2449443.5 was the midnight on which 1994 April~1
+commenced. Because of the unwieldy size of Julian Dates
+and the awkwardness of the half-day offset, it is
+accepted practice to remove the leading `24' and the trailing `.5',
+producing what is called the {\it Modified Julian Date}:
+MJD~=~JD$-2400000.5$. SLALIB routines use MJD, as opposed to
+JD, throughout, largely to avoid loss of precision.
+1994 April~1 commenced at MJD~49443.0.
+
+Despite JD (and hence MJD) being defined in terms of (in effect)
+UT, the system can be used in conjunction with other timescales
+such as TAI, TT and TDB (and even sidereal time through the
+concept of {\it Greenwich Sidereal Date}). However, it is improper
+to express a UTC as a JD or MJD because of leap seconds.
+
+SLALIB has six routines for converting to and from dates in
+the Gregorian calendar. The routines
+sla\_CLDJ
+and
+sla\_CALDJ
+both convert a calendar date into an MJD, the former interpreting
+years between 0 and 99 as 1st century and the latter as late 20th or
+early 21st century. The routines sla\_DJCL
+and
+sla\_DJCAL
+both convert an MJD into calendar year, month, day and fraction of a day;
+the latter performs rounding to a specified precision, important
+to avoid dates like `{\tt 94 04 01.***}' appearing in messages.
+Some of SLALIB's low-precision ephemeris routines
+(sla\_EARTH,
+sla\_MOON
+and
+sla\_ECOR)
+work in terms of year plus day-in-year (where
+day~1~=~January~1st, at least for the modern era).
+This form of date can be generated by
+calling
+sla\_CALYD
+(which defaults years 0-99 into 1950-2049)
+or
+sla\_CLYD
+(which covers the full range from prehistoric times).
+
+\subsection{Geocentric Coordinates}
+The location of the observer on the Earth is significant in a
+number of ways. The most obvious, of course, is the effect of latitude
+on the observed \azel\ of a star. Less obvious is the need to
+allow for geocentric parallax when finding the Moon with a
+telescope (and when doing high-precision work involving the
+Sun or planets), and the need to correct observed radial
+velocities and apparent pulsar periods for the effects
+of the Earth's rotation.
+
+The SLALIB routine
+sla\_OBS
+supplies details of groundbased observatories from an internal
+list. This is useful when writing applications that apply to
+more than one observatory; the user can enter a brief name,
+or browse through a list, and be spared the trouble of typing
+in the full latitude, longitude {\it etc}. The following
+Fortran code returns the full name, longitude and latitude
+of a specified observatory:
+\goodbreak
+\begin{verbatim}
+ CHARACTER IDENT*10,NAME*40
+ DOUBLE PRECISION W,P,H
+ :
+ CALL sla_OBS(0,IDENT,NAME,W,P,H)
+ IF (NAME.EQ.'?') ... (not recognized)
+\end{verbatim}
+\goodbreak
+(Beware of the longitude sign convention, which is west +ve
+for historical reasons.) The following lists all
+the supported observatories:
+\goodbreak
+\begin{verbatim}
+ :
+ INTEGER N
+ :
+ N=1
+ NAME=' '
+ DO WHILE (NAME.NE.'?')
+ CALL sla_OBS(N,IDENT,NAME,W,P,H)
+ IF (NAME.NE.'?') THEN
+ WRITE (*,'(1X,I3,4X,A,4X,A)') N,IDENT,NAME
+ N=N+1
+ END IF
+ END DO
+\end{verbatim}
+\goodbreak
+The routine
+sla\_GEOC
+converts a {\it geodetic latitude}\/
+(one referred to the local horizon) to a geocentric position,
+taking into account the Earth's oblateness and also the height
+above sea level of the observer. The results are expressed in
+vector form, namely as the distance of the observer from
+the spin axis and equator respectively. The {\it geocentric
+latitude}\/ can be found be evaluating ATAN2 of the
+two numbers. A full 3-D vector description of the position
+and velocity of the observer is available through the routine
+sla\_PVOBS.
+For a specified geodetic latitude, height above
+sea level, and local sidereal time,
+sla\_PVOBS
+generates a 6-element vector containing the position and
+velocity with respect to the true equator and equinox of
+date ({\it i.e.}\ compatible with apparent \radec). For
+some applications it will be necessary to convert to a
+mean \radec\ frame (notably FK5, J2000) by multiplying
+elements 1-3 and 4-6 respectively with the appropriate
+precession matrix. (In theory an additional correction to the
+velocity vector is needed to allow for differential precession,
+but this correction is always negligible.)
+
+See also the discussion of the routine
+sla\_RVEROT,
+later.
+
+\subsection{Ephemerides}
+SLALIB includes routines for generating positions and
+velocities of Solar-System bodies. The accuracy objectives are
+modest, and the SLALIB facilities do not attempt
+to compete with precomputed ephemerides such as
+those provided by JPL, or with models containing
+thousands of terms. It is also worth noting
+that SLALIB's very accurate star coordinate conversion
+routines are not strictly applicable to solar-system cases,
+though they are adequate for most practical purposes.
+
+Earth/Sun ephemerides can be generated using the routine
+sla\_EVP,
+which predicts Earth position and velocity with respect to both the
+solar-system barycentre and the
+Sun. Maximum velocity error is 0.42~metres per second; maximum
+heliocentric position error is 1600~km (about \arcseci{2}), with
+barycentric position errors about 4 times worse.
+(The Sun's position as
+seen from the Earth can, of course, be obtained simply by
+reversing the signs of the Cartesian components of the
+Earth\,:\,Sun vector.)
+
+Geocentric Moon ephemerides are available from
+sla\_DMOON,
+which predicts the Moon's position and velocity with respect to
+the Earth's centre. Direction accuracy is usually better than
+10~km (\arcseci{5}) and distance accuracy a little worse.
+
+Lower-precision but faster predictions for the Sun and Moon
+can be made by calling
+sla\_EARTH
+and
+sla\_MOON.
+Both are single precision and accept dates in the form of
+year, day-in-year and fraction of day
+(starting from a calendar date you need to call
+sla\_CLYD
+or
+sla\_CALYD
+to get the required year and day).
+The
+sla\_EARTH
+routine returns the heliocentric position and velocity
+of the Earth's centre for the mean equator and
+equinox of date. The accuracy is better than 20,000~km in position
+and 10~metres per second in speed.
+The
+position and velocity of the Moon with respect to the
+Earth's centre for the mean equator and ecliptic of date
+can be obtained by calling
+sla\_MOON.
+The positional accuracy is better than \arcseci{30} in direction
+and 1000~km in distance.
+
+Approximate ephemerides for all the major planets
+can be generated by calling
+sla\_PLANET
+or
+sla\_RDPLAN. These routines offer arcminute accuracy (much
+better for the inner planets and for Pluto) over a span of several
+millennia (but only $\pm100$ years for Pluto).
+The routine
+sla\_PLANET produces heliocentric position and
+velocity in the form of equatorial \xyzxyzd\ for the
+mean equator and equinox of J2000. The vectors
+produced by
+sla\_PLANET
+can be used in a variety of ways according to the
+requirements of the application concerned. The routine
+sla\_RDPLAN
+uses
+sla\_PLANET
+and
+sla\_DMOON
+to deal with the common case of predicting
+a planet's apparent \radec\ and angular size as seen by a
+terrestrial observer.
+
+Note that in predicting the position in the sky of a solar-system body
+it is necessary to allow for geocentric parallax. This correction
+is {\it essential}\/ in the case of the Moon, where the observer's
+position on the Earth can affect the Moon's \radec\ by up to
+$1^\circ$. The calculation can most conveniently be done by calling
+sla\_PVOBS and subtracting the resulting 6-vector from the
+one produced by
+sla\_DMOON, as is demonstrated by the following example:
+\goodbreak
+\begin{verbatim}
+ * Demonstrate the size of the geocentric parallax correction
+ * in the case of the Moon. The test example is for the AAT,
+ * before midnight, in summer, near first quarter.
+
+ IMPLICIT NONE
+ CHARACTER NAME*40,SH,SD
+ INTEGER J,I,IHMSF(4),IDMSF(4)
+ DOUBLE PRECISION SLONGW,SLAT,H,DJUTC,FDUTC,DJUT1,DJTT,STL,
+ : RMATN(3,3),PMM(6),PMT(6),RM,DM,PVO(6),TL
+ DOUBLE PRECISION sla_DTT,sla_GMST,sla_EQEQX,sla_DRANRM
+
+ * Get AAT longitude and latitude in radians and height in metres
+ CALL sla_OBS(0,'AAT',NAME,SLONGW,SLAT,H)
+
+ * UTC (1992 January 13, 11 13 59) to MJD
+ CALL sla_CLDJ(1992,1,13,DJUTC,J)
+ CALL sla_DTF2D(11,13,59.0D0,FDUTC,J)
+ DJUTC=DJUTC+FDUTC
+
+ * UT1 (UT1-UTC value of -0.152 sec is from IERS Bulletin B)
+ DJUT1=DJUTC+(-0.152D0)/86400D0
+
+ * TT
+ DJTT=DJUTC+sla_DTT(DJUTC)/86400D0
+
+ * Local apparent sidereal time
+ STL=sla_GMST(DJUT1)-SLONGW+sla_EQEQX(DJTT)
+
+ * Geocentric position/velocity of Moon (mean of date)
+ CALL sla_DMOON(DJTT,PMM)
+
+ * Nutation to true equinox of date
+ CALL sla_NUT(DJTT,RMATN)
+ CALL sla_DMXV(RMATN,PMM,PMT)
+ CALL sla_DMXV(RMATN,PMM(4),PMT(4))
+
+ * Report geocentric HA,Dec
+ CALL sla_DCC2S(PMT,RM,DM)
+ CALL sla_DR2TF(2,sla_DRANRM(STL-RM),SH,IHMSF)
+ CALL sla_DR2AF(1,DM,SD,IDMSF)
+ WRITE (*,'(1X,'' geocentric:'',2X,A,I2.2,2I3.2,''.'',I2.2,'//
+ : '1X,A,I2.2,2I3.2,''.'',I1)')
+ : SH,IHMSF,SD,IDMSF
+
+ * Geocentric position of observer (true equator and equinox of date)
+ CALL sla_PVOBS(SLAT,H,STL,PVO)
+
+ * Place origin at observer
+ DO I=1,6
+ PMT(I)=PMT(I)-PVO(I)
+ END DO
+
+ * Allow for planetary aberration
+ TL=499.004782D0*SQRT(PMT(1)**2+PMT(2)**2+PMT(3)**2)
+ DO I=1,3
+ PMT(I)=PMT(I)-TL*PMT(I+3)
+ END DO
+
+ * Report topocentric HA,Dec
+ CALL sla_DCC2S(PMT,RM,DM)
+ CALL sla_DR2TF(2,sla_DRANRM(STL-RM),SH,IHMSF)
+ CALL sla_DR2AF(1,DM,SD,IDMSF)
+ WRITE (*,'(1X,''topocentric:'',2X,A,I2.2,2I3.2,''.'',I2.2,'//
+ : '1X,A,I2.2,2I3.2,''.'',I1)')
+ : SH,IHMSF,SD,IDMSF
+ END
+\end{verbatim}
+\goodbreak
+The output produced is as follows:
+\goodbreak
+\begin{verbatim}
+ geocentric: +03 06 55.59 +15 03 39.0
+ topocentric: +03 09 23.79 +15 40 51.5
+\end{verbatim}
+\goodbreak
+(An easier but
+less instructive method of estimating the topocentric apparent place of the
+Moon is to call the routine
+sla\_RDPLAN.)
+
+As an example of using
+sla\_PLANET,
+the following program estimates the geocentric separation
+between Venus and Jupiter during a close conjunction
+in 2\,BC, which is a star-of-Bethlehem candidate:
+\goodbreak
+\begin{verbatim}
+ * Compute time and minimum geocentric apparent separation
+ * between Venus and Jupiter during the close conjunction of 2 BC.
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION SEPMIN,DJD0,FD,DJD,DJDM,DF,PV(6),RMATP(3,3),
+ : PVM(6),PVE(6),TL,RV,DV,RJ,DJ,SEP
+ INTEGER IHOUR,IMIN,J,I,IHMIN,IMMIN
+ DOUBLE PRECISION sla_EPJ,sla_DSEP
+
+
+ * Search for closest approach on the given day
+ DJD0=1720859.5D0
+ SEPMIN=1D10
+ DO IHOUR=20,22
+ DO IMIN=0,59
+ CALL sla_DTF2D(IHOUR,IMIN,0D0,FD,J)
+
+ * Julian date and MJD
+ DJD=DJD0+FD
+ DJDM=DJD-2400000.5D0
+
+ * Earth to Moon (mean of date)
+ CALL sla_DMOON(DJDM,PV)
+
+ * Precess Moon position to J2000
+ CALL sla_PRECL(sla_EPJ(DJDM),2000D0,RMATP)
+ CALL sla_DMXV(RMATP,PV,PVM)
+
+ * Sun to Earth-Moon Barycentre (mean J2000)
+ CALL sla_PLANET(DJDM,3,PVE,J)
+
+ * Correct from EMB to Earth
+ DO I=1,3
+ PV(I)=PVE(I)-0.012150581D0*PVM(I)
+ END DO
+
+ * Sun to Venus
+ CALL sla_PLANET(DJDM,2,PV,J)
+
+ * Earth to Venus
+ DO I=1,6
+ PV(I)=PV(I)-PVE(I)
+ END DO
+
+ * Light time to Venus (sec)
+ TL=499.004782D0*SQRT((PV(1)-PVE(1))**2+
+ : (PV(2)-PVE(2))**2+
+ : (PV(3)-PVE(3))**2)
+
+ * Extrapolate backwards in time by that much
+ DO I=1,3
+ PV(I)=PV(I)-TL*PV(I+3)
+ END DO
+
+ * To RA,Dec
+ CALL sla_DCC2S(PV,RV,DV)
+
+ * Same for Jupiter
+ CALL sla_PLANET(DJDM,5,PV,J)
+ DO I=1,6
+ PV(I)=PV(I)-PVE(I)
+ END DO
+ TL=499.004782D0*SQRT((PV(1)-PVE(1))**2+
+ : (PV(2)-PVE(2))**2+
+ : (PV(3)-PVE(3))**2)
+ DO I=1,3
+ PV(I)=PV(I)-TL*PV(I+3)
+ END DO
+ CALL sla_DCC2S(PV,RJ,DJ)
+
+ * Separation (arcsec)
+ SEP=sla_DSEP(RV,DV,RJ,DJ)
+
+ * Keep if smallest so far
+ IF (SEP.LT.SEPMIN) THEN
+ IHMIN=IHOUR
+ IMMIN=IMIN
+ SEPMIN=SEP
+ END IF
+ END DO
+ END DO
+
+ * Report
+ WRITE (*,'(1X,I2.2,'':'',I2.2,F6.1)') IHMIN,IMMIN,
+ : 206264.8062D0*SEPMIN
+
+ END
+\end{verbatim}
+\goodbreak
+The output produced (the Ephemeris Time on the day in question, and
+the closest approach in arcseconds) is as follows:
+\goodbreak
+\begin{verbatim}
+ 21:19 33.7
+\end{verbatim}
+\goodbreak
+For comparison, accurate predictions based on the JPL DE\,102 ephemeris
+give a separation about \arcseci{8} less than
+the above estimate, occurring about half an hour earlier
+(see {\it Sky and Telescope,}\/ April~1987, p\,357).
+
+The following program demonstrates
+sla\_RDPLAN.
+\begin{verbatim}
+ * For a given date, time and geographical location, output
+ * a table of planetary positions and diameters.
+
+ IMPLICIT NONE
+ CHARACTER PNAMES(0:9)*7,B*80,S
+ INTEGER I,NP,IY,J,IM,ID,IHMSF(4),IDMSF(4)
+ DOUBLE PRECISION R2AS,FD,DJM,ELONG,PHI,RA,DEC,DIAM
+ PARAMETER (R2AS=206264.80625D0)
+ DATA PNAMES / 'Sun','Mercury','Venus','Moon','Mars','Jupiter',
+ : 'Saturn','Uranus','Neptune', 'Pluto' /
+
+
+ * Loop until 'end' typed
+ B=' '
+ DO WHILE (B.NE.'END'.AND.B.NE.'end')
+
+ * Get date, time and observer's location
+ PRINT *,'Date? (Y,M,D, Gregorian)'
+ READ (*,'(A)') B
+ IF (B.NE.'END'.AND.B.NE.'end') THEN
+ I=1
+ CALL sla_INTIN(B,I,IY,J)
+ CALL sla_INTIN(B,I,IM,J)
+ CALL sla_INTIN(B,I,ID,J)
+ PRINT *,'Time? (H,M,S, dynamical)'
+ READ (*,'(A)') B
+ I=1
+ CALL sla_DAFIN(B,I,FD,J)
+ FD=FD*2.3873241463784300365D0
+ CALL sla_CLDJ(IY,IM,ID,DJM,J)
+ DJM=DJM+FD
+ PRINT *,'Longitude? (D,M,S, east +ve)'
+ READ (*,'(A)') B
+ I=1
+ CALL sla_DAFIN(B,I,ELONG,J)
+ PRINT *,'Latitude? (D,M,S, (geodetic)'
+ READ (*,'(A)') B
+ I=1
+ CALL sla_DAFIN(B,I,PHI,J)
+
+ * Loop planet by planet
+ DO NP=0,8
+
+ * Get RA,Dec and diameter
+ CALL sla_RDPLAN(DJM,NP,ELONG,PHI,RA,DEC,DIAM)
+
+ * One line of report
+ CALL sla_DR2TF(2,RA,S,IHMSF)
+ CALL sla_DR2AF(1,DEC,S,IDMSF)
+ WRITE (*,
+ : '(1X,A,2X,3I3.2,''.'',I2.2,2X,A,I2.2,2I3.2,''.'',I1,F8.1)')
+ : PNAMES(NP),IHMSF,S,IDMSF,R2AS*DIAM
+
+ * Next planet
+ END DO
+ PRINT *,' '
+ END IF
+
+ * Next case
+ END DO
+
+ END
+\end{verbatim}
+Entering the following data (for 1927~June~29 at $5^{\rm h}\,25^{\rm m}$~ET
+and the position of Preston, UK.):
+\begin{verbatim}
+ 1927 6 29
+ 5 25
+ -2 42
+ 53 46
+\end{verbatim}
+produces the following report:
+\begin{verbatim}
+ Sun 06 28 14.03 +23 17 17.5 1887.8
+ Mercury 08 08 58.62 +19 20 57.3 9.3
+ Venus 09 38 53.64 +15 35 32.9 22.8
+ Moon 06 28 18.30 +23 18 37.3 1903.9
+ Mars 09 06 49.34 +17 52 26.7 4.0
+ Jupiter 00 11 12.06 -00 10 57.5 41.1
+ Saturn 16 01 43.34 -18 36 55.9 18.2
+ Uranus 00 13 33.53 +00 39 36.0 3.5
+ Neptune 09 49 35.75 +13 38 40.8 2.2
+ Pluto 07 05 29.50 +21 25 04.2 .1
+\end{verbatim}
+Inspection of the Sun and Moon data reveals that
+a total solar eclipse is in progress.
+
+SLALIB also provides for the case where orbital elements (with respect
+to the J2000 equinox and ecliptic)
+are available. This allows predictions to be made for minor-planets and
+(if you ignore non-gravitational effects)
+comets. Furthermore, if major-planet elements for an epoch close to the date
+in question are available, more accurate predictions can be made than
+are offered by
+sla\_RDPLAN and
+sla\_PLANET.
+
+The SLALIB planetary-prediction
+routines that work with orbital elements are
+sla\_PLANTE (the orbital-elements equivalent of
+sla\_RDPLAN), which predicts the topocentric \radec, and
+sla\_PLANEL (the orbital-elements equivalent of
+sla\_PLANET), which predicts the heliocentric \xyzxyzd\ with respect to the
+J2000 equinox and equator. In addition, the routine
+sla\_PV2EL does the inverse of
+sla\_PLANEL, transforming \xyzxyzd\ into {\it osculating elements.}
+
+Osculating elements describe the unperturbed 2-body orbit. This is
+a good approximation to the actual orbit for a few weeks either
+side of the specified epoch, outside which perturbations due to
+the other bodies of the Solar System lead to
+increasing errors. Given a minor planet's osculating elements for
+a particular date, predictions for a date even just
+100 days earlier or later
+are likely to be in error by several arcseconds.
+These errors can
+be reduced if new elements are generated which take account of
+the perturbations of the major planets, and this is what the routine
+sla\_PERTEL does. Once
+sla\_PERTEL has been called, to provide osculating elements
+close to the required date, the elements can be passed to
+sla\_PLANEL or
+sla\_PLANTE in the normal way. Predictions of arcsecond accuracy
+over a span of a decade or more are available using this
+technique.
+
+Three different combinations of orbital elements are
+provided for, matching the usual conventions
+for major planets, minor planets and
+comets respectively. The choice is made through the
+argument {\tt JFORM}:\\
+
+\hspace{4em}
+\begin{tabular}{|c|c|c|} \hline
+{\tt JFORM=1} & {\tt JFORM=2} & {\tt JFORM=3} \\
+\hline \hline
+$t_0$ & $t_0$ & $T$ \\
+\hline
+$i$ & $i$ & $i$ \\
+\hline
+$\Omega$ & $\Omega$ & $\Omega$ \\
+\hline
+$\varpi$ & $\omega$ & $\omega$ \\
+\hline
+$a$ & $a$ & $q$ \\
+\hline
+$e$ & $e$ & $e$ \\
+\hline
+$L$ & $M$ & \\
+\hline
+$n$ & & \\
+\hline
+\end{tabular}\\[5ex]
+The symbols have the following meanings:
+\begin{tabbing}
+xxxxxxx \= xxxx \= \kill
+\> $t_0$ \> epoch at which the elements were correct \\
+\> $T$ \> epoch of perihelion passage \\
+\> $i$ \> inclination of the orbit \\
+\> $\Omega$ \> longitude of the ascending node \\
+\> $\varpi$ \> longitude of perihelion ($\varpi = \Omega + \omega$) \\
+\> $\omega$ \> argument of perihelion \\
+\> $a$ \> semi-major axis of the orbital ellipse \\
+\> $q$ \> perihelion distance \\
+\> $e$ \> orbital eccentricity \\
+\> $L$ \> mean longitude ($L = \varpi + M$) \\
+\> $M$ \> mean anomaly \\
+\> $n$ \> mean motion \\
+\end{tabbing}
+
+The mean motion, $n$, tells sla\_PLANEL the mass of the planet.
+If it is not available, it should be claculated
+from $n^2 a^3 = k^2 (1+m)$, where $k = 0.01720209895$ and
+m is the mass of the planet ($M_\odot = 1$); $a$ is in AU.
+
+Conventional elements are not the only way of specifying an orbit.
+The \xyzxyzd\ state vector is an equally valid specification,
+and the so-called {\it method of universal variables}\/ allows
+orbital calculations to be made directly, bypassing angular
+quantities and avoiding Kepler's Equation. The universal-variables
+approach has various advantages, including better handling of
+near-parabolic cases and greater efficiency.
+SLALIB uses universal variables for its internal
+calculations and also offers a number of routines which
+applications can call.
+
+The universal elements are the \xyzxyzd\ and its epoch, plus the mass
+of the body. The SLALIB routines supplement these elements with
+certain redundant values in order to
+avoid unnecessary recomputation when the elements are next used.
+
+The routines
+sla\_EL2UE and
+sla\_UE2EL transform conventional elements into the
+universal form and {\it vice versa.}
+The routine
+sla\_PV2UE takes an \xyzxyzd\ and forms the set of universal
+elements;
+sla\_UE2PV takes a set of universal elements and predicts the \xyzxyzd\
+for a specified epoch.
+The routine
+sla\_PERTUE provides updated universal elements,
+taking into account perturbations from the major planets.
+
+\subsection{Radial Velocity and Light-Time Corrections}
+When publishing high-resolution spectral observations
+it is necessary to refer them to a specified standard of rest.
+This involves knowing the component in the direction of the
+source of the velocity of the observer. SLALIB provides a number
+of routines for this purpose, allowing observations to be
+referred to the Earth's centre, the Sun, a Local Standard of Rest
+(either dynamical or kinematical), the centre of the Galaxy, and
+the mean motion of the Local Group.
+
+The routine
+sla\_RVEROT
+corrects for the diurnal rotation of
+the observer around the Earth's axis. This is always less than 0.5~km/s.
+
+No specific routine is provided to correct a radial velocity
+from geocentric to heliocentric, but this can easily be done by calling
+sla\_EVP
+as follows (array declarations {\it etc}.\ omitted):
+\goodbreak
+\begin{verbatim}
+ :
+ * Star vector, J2000
+ CALL sla_DCS2C(RM,DM,V)
+
+ * Earth/Sun velocity and position, J2000
+ CALL sla_EVP(TDB,2000D0,DVB,DPB,DVH,DPH)
+
+ * Radial velocity correction due to Earth orbit (km/s)
+ VCORB = -sla_DVDV(V,DVH)*149.597870D6
+ :
+\end{verbatim}
+\goodbreak
+The maximum value of this correction is the Earth's orbital speed
+of about 30~km/s. A related routine,
+sla\_ECOR,
+computes the light-time correction with respect to the Sun. It
+would be used when reducing observations of a rapid variable-star
+for instance.
+Note, however, that the accuracy objectives for pulsar work are
+beyond the scope of these SLALIB routines, and even the superior
+sla\_EVP
+routine is unsuitable for arrival-time calculations of better
+than 25~millisecond accuracy.
+
+To remove the intrinsic $\sim20$~km/s motion of the Sun relative
+to other stars in the solar neighbourhood,
+a velocity correction to a
+{\it local standard of rest}\/ (LSR) is required. There are
+opportunities for mistakes here. There are two sorts of LSR,
+{\it dynamical}\/ and {\it kinematical}, and
+multiple definitions exist for the latter. The
+dynamical LSR is a point near the Sun which is in a circular
+orbit around the Galactic centre; the Sun has a ``peculiar''
+motion relative to the dynamical LSR. A kinematical LSR is
+the mean standard of rest of specified star catalogues or stellar
+populations, and its precise definition depends on which
+catalogues or populations were used and how the analysis was
+carried out. The Sun's motion with respect to a kinematical
+LSR is called the ``standard'' solar motion. Radial
+velocity corrections to the dynamical LSR are produced by the routine
+sla\_RVLSRD
+and to the adopted kinematical LSR by
+sla\_RVLSRK.
+See the individual specifications for these routines for the
+precise definition of the LSR in each case.
+
+For extragalactic sources, the centre of the Galaxy can be used as
+a standard of rest. The radial velocity correction from the
+dynamical LSR to the Galactic centre can be obtained by calling
+sla\_RVGALC.
+Its maximum value is 220~km/s.
+
+For very distant sources it is appropriate to work relative
+to the mean motion of the Local Group. The routine for
+computing the radial velocity correction in this case is
+sla\_RVLG.
+Note that in this case the correction is with respect to the
+dynamical LSR, not the Galactic centre as might be expected.
+This conforms to the IAU definition, and confers immunity from
+revisions of the Galactic rotation speed.
+
+\subsection{Focal-Plane Astrometry}
+The relationship between the position of a star image in
+the focal plane of a telescope and the star's celestial
+coordinates is usually described in terms of the {\it tangent plane}\/
+or {\it gnomonic}\/ projection. This is the projection produced
+by a pin-hole camera and is a good approximation to the projection
+geometry of a traditional large {\it f}\/-ratio astrographic refractor.
+SLALIB includes a group of routines which transform
+star positions between their observed places on the celestial
+sphere and their \xy\ coordinates in the tangent plane. The
+spherical coordinate system does not have to be \radec\ but
+usually is. The so-called {\it standard coordinates}\/ of a star
+are the tangent plane \xy, in radians, with respect to an origin
+at the tangent point, with the $y$-axis pointing north and
+the $x$-axis pointing east (in the direction of increasing $\alpha$).
+The factor relating the standard coordinates to
+the actual \xy\ coordinates in, say, millimetres is simply
+the focal length of the telescope.
+
+Given the \radec\ of the {\it plate centre}\/ (the tangent point)
+and the \radec\ of a star within the field, the standard
+coordinates can be determined by calling
+sla\_S2TP
+(single precision) or
+sla\_DS2TP
+(double precision). The reverse transformation, where the
+\xy\ is known and we wish to find the \radec, is carried out by calling
+sla\_TP2S
+or
+sla\_DTP2S.
+Occasionally we know the both the \xy\ and the \radec\ of a
+star and need to deduce the \radec\ of the tangent point;
+this can be done by calling
+sla\_TPS2C
+or
+sla\_DTPS2C.
+(All of these transformations apply not just to \radec\ but to
+other spherical coordinate systems, of course.)
+Equivalent (and faster)
+routines are provided which work directly in \xyz\ instead of
+spherical coordinates:
+sla\_V2TP and
+sla\_DV2TP,
+sla\_TP2V and
+sla\_DTP2V,
+sla\_TPV2C and
+sla\_DTPV2C.
+
+Even at the best of times, the tangent plane projection is merely an
+approximation. Some telescopes and cameras exhibit considerable pincushion
+or barrel distortion and some have a curved focal surface.
+For example, neither Schmidt cameras nor (especially)
+large reflecting telescopes with wide-field corrector lenses
+are adequately modelled by tangent-plane geometry. In such
+cases, however, it is still possible to do most of the work
+using the (mathematically convenient) tangent-plane
+projection by inserting an extra step which applies or
+removes the distortion peculiar to the system concerned.
+A simple $r_1=r_0(1+Kr_0^2)$ law works well in the
+majority of cases; $r_0$ is the radial distance in the
+tangent plane, $r_1$ is the radial distance after adding
+the distortion, and $K$ is a constant which depends on the
+telescope ($\theta$ is unaffected). The routine
+sla\_PCD
+applies the distortion to an \xy\ and
+sla\_UNPCD
+removes it. For \xy\ in radians, $K$ values range from $-1/3$ for the
+tiny amount of barrel distortion in Schmidt geometry to several
+hundred for the serious pincushion distortion
+produced by wide-field correctors in big reflecting telescopes
+(the AAT prime focus triplet corrector is about $K=+178.6$).
+
+SLALIB includes a group of routines which can be put together
+to build a simple plate-reduction program. The heart of the group is
+sla\_FITXY,
+which fits a linear model to relate two sets of \xy\ coordinates,
+in the case of a plate reduction the measured positions of the
+images of a set of
+reference stars and the standard
+coordinates derived from their catalogue positions. The
+model is of the form:
+\[x_{p} = a + bx_{m} + cy_{m}\]
+\[y_{p} = d + ex_{m} + fy_{m}\]
+
+where the {\it p}\/ subscript indicates ``predicted'' coordinates
+(the model's approximation to the ideal ``expected'' coordinates) and the
+{\it m}\/ subscript indicates ``measured coordinates''. The
+six coefficients {\it a--f}\/ can optionally be
+constrained to represent a ``solid body rotation'' free of
+any squash or shear distortions. Without this constraint
+the model can, to some extent, accommodate effects like refraction,
+allowing mean places to be used directly and
+avoiding the extra complications of a
+full mean-apparent-observed transformation for each star.
+Having obtained the linear model,
+sla\_PXY
+can be used to process the set of measured and expected
+coordinates, giving the predicted coordinates and determining
+the RMS residuals in {\it x}\/ and {\it y}.
+The routine
+sla\_XY2XY
+transforms one \xy\ into another using the linear model. A model
+can be inverted by calling
+sla\_INVF,
+and decomposed into zero points, scales, $x/y$ nonperpendicularity
+and orientation by calling
+sla\_DCMPF.
+
+\subsection{Numerical Methods}
+SLALIB contains a small number of simple, general-purpose
+numerical-methods routines. They have no specific
+connection with positional astronomy but have proved useful in
+applications to do with simulation and fitting.
+
+At the heart of many simulation programs is the generation of
+pseudo-random numbers, evenly distributed in a given range:
+sla\_RANDOM
+does this. Pseudo-random normal deviates, or ``Gaussian
+residuals'', are often required to simulate noise and
+can be generated by means of the function
+sla\_GRESID.
+Neither routine will pass super-sophisticated
+statistical tests, but they work adequately for most
+practical purposes and avoid the need to call non-standard
+library routines peculiar to one sort of computer.
+
+Applications which perform a least-squares fit using a traditional
+normal-equations methods can accomplish the required matrix-inversion
+by calling either
+sla\_SMAT
+(single precision) or
+sla\_DMAT
+(double). A generally better way to perform such fits is
+to use singular value decomposition. SLALIB provides a routine
+to do the decomposition itself,
+sla\_SVD,
+and two routines to use the results:
+sla\_SVDSOL
+generates the solution, and
+sla\_SVDCOV
+produces the covariance matrix.
+A simple demonstration of the use of the SLALIB SVD
+routines is given below. It generates 500 simulated data
+points and fits them to a model which has 4 unknown coefficients.
+(The arrays in the example are sized to accept up to 1000
+points and 20 unknowns.) The model is:
+\[ y = C_{1} +C_{2}x +C_{3}sin{x} +C_{4}cos{x} \]
+The test values for the four coefficients are
+$C_1\!=\!+50.0$,
+$C_2\!=\!-2.0$,
+$C_3\!=\!-10.0$ and
+$C_4\!=\!+25.0$.
+Gaussian noise, $\sigma=5.0$, is added to each ``observation''.
+\goodbreak
+\begin{verbatim}
+ IMPLICIT NONE
+
+ * Sizes of arrays, physical and logical
+ INTEGER MP,NP,NC,M,N
+ PARAMETER (MP=1000,NP=10,NC=20,M=500,N=4)
+
+ * The unknowns we are going to solve for
+ DOUBLE PRECISION C1,C2,C3,C4
+ PARAMETER (C1=50D0,C2=-2D0,C3=-10D0,C4=25D0)
+
+ * Arrays
+ DOUBLE PRECISION A(MP,NP),W(NP),V(NP,NP),
+ : WORK(NP),B(MP),X(NP),CVM(NC,NC)
+
+ DOUBLE PRECISION VAL,BF1,BF2,BF3,BF4,SD2,D,VAR
+ REAL sla_GRESID
+ INTEGER I,J
+
+ * Fill the design matrix
+ DO I=1,M
+
+ * Dummy independent variable
+ VAL=DBLE(I)/10D0
+
+ * The basis functions
+ BF1=1D0
+ BF2=VAL
+ BF3=SIN(VAL)
+ BF4=COS(VAL)
+
+ * The observed value, including deliberate Gaussian noise
+ B(I)=C1*BF1+C2*BF2+C3*BF3+C4*BF4+DBLE(sla_GRESID(5.0))
+
+ * Fill one row of the design matrix
+ A(I,1)=BF1
+ A(I,2)=BF2
+ A(I,3)=BF3
+ A(I,4)=BF4
+ END DO
+
+ * Factorize the design matrix, solve and generate covariance matrix
+ CALL sla_SVD(M,N,MP,NP,A,W,V,WORK,J)
+ CALL sla_SVDSOL(M,N,MP,NP,B,A,W,V,WORK,X)
+ CALL sla_SVDCOV(N,NP,NC,W,V,WORK,CVM)
+
+ * Compute the variance
+ SD2=0D0
+ DO I=1,M
+ VAL=DBLE(I)/10D0
+ BF1=1D0
+ BF2=VAL
+ BF3=SIN(VAL)
+ BF4=COS(VAL)
+ D=B(I)-(X(1)*BF1+X(2)*BF2+X(3)*BF3+X(4)*BF4)
+ SD2=SD2+D*D
+ END DO
+ VAR=SD2/DBLE(M)
+
+ * Report the RMS and the solution
+ WRITE (*,'(1X,''RMS ='',F5.2/)') SQRT(VAR)
+ DO I=1,N
+ WRITE (*,'(1X,''C'',I1,'' ='',F7.3,'' +/-'',F6.3)')
+ : I,X(I),SQRT(VAR*CVM(I,I))
+ END DO
+ END
+\end{verbatim}
+\goodbreak
+The program produces the following output:
+\goodbreak
+\begin{verbatim}
+ RMS = 4.88
+
+ C1 = 50.192 +/- 0.439
+ C2 = -2.002 +/- 0.015
+ C3 = -9.771 +/- 0.310
+ C4 = 25.275 +/- 0.310
+\end{verbatim}
+\goodbreak
+In this above example, essentially
+identical results would be obtained if the more
+commonplace normal-equations method had been used, and the large
+$1000\times20$ array would have been avoided. However, the SVD method
+comes into its own when the opportunity is taken to edit the W-matrix
+(the so-called ``singular values'') in order to control
+possible ill-conditioning. The procedure involves replacing with
+zeroes any W-elements smaller than a nominated value, for example
+0.001 times the largest W-element. Small W-elements indicate
+ill-conditioning, which in the case of the normal-equations
+method would produce spurious large coefficient values and
+possible arithmetic overflows. Using SVD, the effect on the solution
+of setting suspiciously small W-elements to zero is to restrain
+the offending coefficients from moving very far. The
+fact that action was taken can be reported to show the program user that
+something is amiss. Furthermore, if element W(J) was set to zero,
+the row numbers of the two biggest elements in the Jth column of the
+V-matrix identify the pair of solution coefficients that are
+dependent.
+
+A more detailed description of SVD and its use in least-squares
+problems would be out of place here, and the reader is urged
+to refer to the relevant sections of the book {\it Numerical Recipes}
+(Press {\it et al.}, Cambridge University Press, 1987).
+
+The routines
+sla\_COMBN
+and
+sla\_PERMUT
+are useful for problems which involve combinations (different subsets)
+and permutations (different orders).
+Both return the next in a sequence of results, cycling through all the
+possible results as the routine is called repeatedly.
+
+\pagebreak
+
+\section{SUMMARY OF CALLS}
+The basic trigonometrical and numerical facilities are supplied in both single
+and double precision versions.
+Most of the more esoteric position and time routines use double precision
+arguments only, even in cases where single precision would normally be adequate
+in practice.
+Certain routines with modest accuracy objectives are supplied in
+single precision versions only.
+In the calling sequences which follow, no attempt has been made
+to distinguish between single and double precision argument names,
+and frequently the same name is used on different occasions to
+mean different things.
+However, none of the routines uses a mixture of single and
+double precision arguments; each routine is either wholly
+single precision or wholly double precision.
+
+In the classified list, below,
+{\it subroutine}\/ subprograms are those whose names and argument lists
+are preceded by `CALL', whereas {\it function}\/ subprograms are
+those beginning `R=' (when the result is REAL) or `D=' (when
+the result is DOUBLE~PRECISION).
+
+The list is, of course, merely for quick reference; inexperienced
+users {\bf must} refer to the detailed specifications given later.
+In particular, {\bf don't guess} whether arguments are single or
+double precision; the result could be a program that happens to
+works on one sort of machine but not on another.
+
+\callhead{String Decoding}
+\begin{callset}
+\subp{CALL sla\_INTIN (STRING, NSTRT, IRESLT, JFLAG)}
+ Convert free-format string into integer
+\subq{CALL sla\_FLOTIN (STRING, NSTRT, RESLT, JFLAG)}
+ {CALL sla\_DFLTIN (STRING, NSTRT, DRESLT, JFLAG)}
+ Convert free-format string into floating-point number
+\subq{CALL sla\_AFIN (STRING, NSTRT, RESLT, JFLAG)}
+ {CALL sla\_DAFIN (STRING, NSTRT, DRESLT, JFLAG)}
+ Convert free-format string from deg,arcmin,arcsec to radians
+\end{callset}
+
+\callhead{Sexagesimal Conversions}
+\begin{callset}
+\subq{CALL sla\_CTF2D (IHOUR, IMIN, SEC, DAYS, J)}
+ {CALL sla\_DTF2D (IHOUR, IMIN, SEC, DAYS, J)}
+ Hours, minutes, seconds to days
+\subq{CALL sla\_CD2TF (NDP, DAYS, SIGN, IHMSF)}
+ {CALL sla\_DD2TF (NDP, DAYS, SIGN, IHMSF)}
+ Days to hours, minutes, seconds
+\subq{CALL sla\_CTF2R (IHOUR, IMIN, SEC, RAD, J)}
+ {CALL sla\_DTF2R (IHOUR, IMIN, SEC, RAD, J)}
+ Hours, minutes, seconds to radians
+\subq{CALL sla\_CR2TF (NDP, ANGLE, SIGN, IHMSF)}
+ {CALL sla\_DR2TF (NDP, ANGLE, SIGN, IHMSF)}
+ Radians to hours, minutes, seconds
+\subq{CALL sla\_CAF2R (IDEG, IAMIN, ASEC, RAD, J)}
+ {CALL sla\_DAF2R (IDEG, IAMIN, ASEC, RAD, J)}
+ Degrees, arcminutes, arcseconds to radians
+\subq{CALL sla\_CR2AF (NDP, ANGLE, SIGN, IDMSF)}
+ {CALL sla\_DR2AF (NDP, ANGLE, SIGN, IDMSF)}
+ Radians to degrees, arcminutes, arcseconds
+\end{callset}
+
+\callhead{Angles, Vectors and Rotation Matrices}
+\begin{callset}
+\subq{R~=~sla\_RANGE (ANGLE)}
+ {D~=~sla\_DRANGE (ANGLE)}
+ Normalize angle into range $\pm\pi$
+\subq{R~=~sla\_RANORM (ANGLE)}
+ {D~=~sla\_DRANRM (ANGLE)}
+ Normalize angle into range $0\!-\!2\pi$
+\subq{CALL sla\_CS2C (A, B, V)}
+ {CALL sla\_DCS2C (A, B, V)}
+ Spherical coordinates to \xyz
+\subq{CALL sla\_CC2S (V, A, B)}
+ {CALL sla\_DCC2S (V, A, B)}
+ \xyz\ to spherical coordinates
+\subq{R~=~sla\_VDV (VA, VB)}
+ {D~=~sla\_DVDV (VA, VB)}
+ Scalar product of two 3-vectors
+\subq{CALL sla\_VXV (VA, VB, VC)}
+ {CALL sla\_DVXV (VA, VB, VC)}
+ Vector product of two 3-vectors
+\subq{CALL sla\_VN (V, UV, VM)}
+ {CALL sla\_DVN (V, UV, VM)}
+ Normalize a 3-vector also giving the modulus
+\subq{R~=~sla\_SEP (A1, B1, A2, B2)}
+ {D~=~sla\_DSEP (A1, B1, A2, B2)}
+ Angle between two points on a sphere
+\subq{R~=~sla\_BEAR (A1, B1, A2, B2)}
+ {D~=~sla\_DBEAR (A1, B1, A2, B2)}
+ Direction of one point on a sphere seen from another
+\subq{R~=~sla\_PAV (V1, V2)}
+ {D~=~sla\_DPAV (V1, V2)}
+ Position-angle of one \xyz\ with respect to another
+\subq{CALL sla\_EULER (ORDER, PHI, THETA, PSI, RMAT)}
+ {CALL sla\_DEULER (ORDER, PHI, THETA, PSI, RMAT)}
+ Form rotation matrix from three Euler angles
+\subq{CALL sla\_AV2M (AXVEC, RMAT)}
+ {CALL sla\_DAV2M (AXVEC, RMAT)}
+ Form rotation matrix from axial vector
+\subq{CALL sla\_M2AV (RMAT, AXVEC)}
+ {CALL sla\_DM2AV (RMAT, AXVEC)}
+ Determine axial vector from rotation matrix
+\subq{CALL sla\_MXV (RM, VA, VB)}
+ {CALL sla\_DMXV (DM, VA, VB)}
+ Rotate vector forwards
+\subq{CALL sla\_IMXV (RM, VA, VB)}
+ {CALL sla\_DIMXV (DM, VA, VB)}
+ Rotate vector backwards
+\subq{CALL sla\_MXM (A, B, C)}
+ {CALL sla\_DMXM (A, B, C)}
+ Product of two 3x3 matrices
+\subq{CALL sla\_CS2C6 (A, B, R, AD, BD, RD, V)}
+ {CALL sla\_DS2C6 (A, B, R, AD, BD, RD, V)}
+ Conversion of position and velocity in spherical
+ coordinates to Cartesian coordinates
+\subq{CALL sla\_CC62S (V, A, B, R, AD, BD, RD)}
+ {CALL sla\_DC62S (V, A, B, R, AD, BD, RD)}
+ Conversion of position and velocity in Cartesian
+ coordinates to spherical coordinates
+\end{callset}
+
+\callhead{Calendars}
+\begin{callset}
+\subp{CALL sla\_CLDJ (IY, IM, ID, DJM, J)}
+ Gregorian Calendar to Modified Julian Date
+\subp{CALL sla\_CALDJ (IY, IM, ID, DJM, J)}
+ Gregorian Calendar to Modified Julian Date,
+ permitting century default
+\subp{CALL sla\_DJCAL (NDP, DJM, IYMDF, J)}
+ Modified Julian Date to Gregorian Calendar,
+ in a form convenient for formatted output
+\subp{CALL sla\_DJCL (DJM, IY, IM, ID, FD, J)}
+ Modified Julian Date to Gregorian Year, Month, Day, Fraction
+\subp{CALL sla\_CALYD (IY, IM, ID, NY, ND, J)}
+ Calendar to year and day in year, permitting century default
+\subp{CALL sla\_CLYD (IY, IM, ID, NY, ND, J)}
+ Calendar to year and day in year
+\subp{D~=~sla\_EPB (DATE)}
+ Modified Julian Date to Besselian Epoch
+\subp{D~=~sla\_EPB2D (EPB)}
+ Besselian Epoch to Modified Julian Date
+\subp{D~=~sla\_EPJ (DATE)}
+ Modified Julian Date to Julian Epoch
+\subp{D~=~sla\_EPJ2D (EPJ)}
+ Julian Epoch to Modified Julian Date
+\end{callset}
+
+\callhead{Timescales}
+\begin{callset}
+\subp{D~=~sla\_GMST (UT1)}
+ Conversion from Universal Time to sidereal time
+\subp{D~=~sla\_GMSTA (DATE, UT1)}
+ Conversion from Universal Time to sidereal time, rounding errors minimized
+\subp{D~=~sla\_EQEQX (DATE)}
+ Equation of the equinoxes
+\subp{D~=~sla\_DAT (DJU)}
+ Offset of Atomic Time from Coordinated Universal Time: TAI$-$UTC
+\subp{D~=~sla\_DT (EPOCH)}
+ Approximate offset between dynamical time and universal time
+\subp{D~=~sla\_DTT (DJU)}
+ Offset of Terrestrial Time from Coordinated Universal Time: TT$-$UTC
+\subp{D~=~sla\_RCC (TDB, UT1, WL, U, V)}
+ Relativistic clock correction: TDB$-$TT
+\end{callset}
+
+\callhead{Precession and Nutation}
+\begin{callset}
+\subp{CALL sla\_NUT (DATE, RMATN)}
+ Nutation matrix
+\subp{CALL sla\_NUTC (DATE, DPSI, DEPS, EPS0)}
+ Longitude and obliquity components of nutation, and
+ mean obliquity
+\subp{CALL sla\_PREC (EP0, EP1, RMATP)}
+ Precession matrix (IAU)
+\subp{CALL sla\_PRECL (EP0, EP1, RMATP)}
+ Precession matrix (suitable for long periods)
+\subp{CALL sla\_PRENUT (EPOCH, DATE, RMATPN)}
+ Combined precession/nutation matrix
+\subp{CALL sla\_PREBN (BEP0, BEP1, RMATP)}
+ Precession matrix, old system
+\subp{CALL sla\_PRECES (SYSTEM, EP0, EP1, RA, DC)}
+ Precession, in either the old or the new system
+\end{callset}
+
+\callhead{Proper Motion}
+\begin{callset}
+\subp{CALL sla\_PM (R0, D0, PR, PD, PX, RV, EP0, EP1, R1, D1)}
+ Adjust for proper motion
+\end{callset}
+
+\callhead{FK4/FK5/Hipparcos Conversions}
+\begin{callset}
+\subp{CALL sla\_FK425 (\vtop
+ {\hbox{R1950, D1950, DR1950, DD1950, P1950, V1950,}
+ \hbox{R2000, D2000, DR2000, DD2000, P2000, V2000)}}}
+ Convert B1950.0 FK4 star data to J2000.0 FK5
+\subp{CALL sla\_FK45Z (R1950, D1950, EPOCH, R2000, D2000)}
+ Convert B1950.0 FK4 position to J2000.0 FK5 assuming zero
+ FK5 proper motion and no parallax
+\subp{CALL sla\_FK524 (\vtop
+ {\hbox{R2000, D2000, DR2000, DD2000, P2000, V2000,}
+ \hbox{R1950, D1950, DR1950, DD1950, P1950, V1950)}}}
+ Convert J2000.0 FK5 star data to B1950.0 FK4
+\subp{CALL sla\_FK54Z (R2000, D2000, BEPOCH,
+ R1950, D1950, DR1950, DD1950)}
+ Convert J2000.0 FK5 position to B1950.0 FK4 assuming zero
+ FK5 proper motion and no parallax
+\subp{CALL sla\_FK52H (R5, D5, DR5, DD5, RH, DH, DRH, DDH)}
+ Convert J2000.0 FK5 star data to Hipparcos
+\subp{CALL sla\_FK5HZ (R5, D5, EPOCH, RH, DH )}
+ Convert J2000.0 FK5 position to Hipparcos assuming zero Hipparcos
+ proper motion
+\subp{CALL sla\_H2FK5 (RH, DH, DRH, DDH, R5, D5, DR5, DD5)}
+ Convert Hipparcos star data to J2000.0 FK5
+\subp{CALL sla\_HFK5Z (RH, DH, EPOCH, R5, D5, DR5, DD5)}
+ Convert Hipparcos position to J2000.0 FK5 assuming zero Hipparcos
+ proper motion
+\subp{CALL sla\_DBJIN (STRING, NSTRT, DRESLT, J1, J2)}
+ Like sla\_DFLTIN but with extensions to accept leading `B' and `J'
+\subp{CALL sla\_KBJ (JB, E, K, J)}
+ Select epoch prefix `B' or `J'
+\subp{D~=~sla\_EPCO (K0, K, E)}
+ Convert an epoch into the appropriate form -- `B' or `J'
+\end{callset}
+
+\callhead{Elliptic Aberration}
+\begin{callset}
+\subp{CALL sla\_ETRMS (EP, EV)}
+ E-terms
+\subp{CALL sla\_SUBET (RC, DC, EQ, RM, DM)}
+ Remove the E-terms
+\subp{CALL sla\_ADDET (RM, DM, EQ, RC, DC)}
+ Add the E-terms
+\end{callset}
+
+\callhead{Geographical and Geocentric Coordinates}
+\begin{callset}
+\subp{CALL sla\_OBS (NUMBER, ID, NAME, WLONG, PHI, HEIGHT)}
+ Interrogate list of observatory parameters
+\subp{CALL sla\_GEOC (P, H, R, Z)}
+ Convert geodetic position to geocentric
+\subp{CALL sla\_POLMO (ELONGM, PHIM, XP, YP, ELONG, PHI, DAZ)}
+ Polar motion
+\subp{CALL sla\_PVOBS (P, H, STL, PV)}
+ Position and velocity of observatory
+\end{callset}
+
+\callhead{Apparent and Observed Place}
+\begin{callset}
+\subp{CALL sla\_MAP (RM, DM, PR, PD, PX, RV, EQ, DATE, RA, DA)}
+ Mean place to geocentric apparent place
+\subp{CALL sla\_MAPPA (EQ, DATE, AMPRMS)}
+ Precompute mean to apparent parameters
+\subp{CALL sla\_MAPQK (RM, DM, PR, PD, PX, RV, AMPRMS, RA, DA)}
+ Mean to apparent using precomputed parameters
+\subp{CALL sla\_MAPQKZ (RM, DM, AMPRMS, RA, DA)}
+ Mean to apparent using precomputed parameters, for zero proper
+ motion, parallax and radial velocity
+\subp{CALL sla\_AMP (RA, DA, DATE, EQ, RM, DM)}
+ Geocentric apparent place to mean place
+\subp{CALL sla\_AMPQK (RA, DA, AOPRMS, RM, DM)}
+ Apparent to mean using precomputed parameters
+\subp{CALL sla\_AOP (\vtop
+ {\hbox{RAP, DAP, UTC, DUT, ELONGM, PHIM, HM, XP, YP,}
+ \hbox{TDK, PMB, RH, WL, TLR, AOB, ZOB, HOB, DOB, ROB)}}}
+ Apparent place to observed place
+\subp{CALL sla\_AOPPA (\vtop
+ {\hbox{UTC, DUT, ELONGM, PHIM, HM, XP, YP,}
+ \hbox{TDK, PMB, RH, WL, TLR, AOPRMS)}}}
+ Precompute apparent to observed parameters
+\subp{CALL sla\_AOPPAT (UTC, AOPRMS)}
+ Update sidereal time in apparent to observed parameters
+\subp{CALL sla\_AOPQK (RAP, DAP, AOPRMS, AOB, ZOB, HOB, DOB, ROB)}
+ Apparent to observed using precomputed parameters
+\subp{CALL sla\_OAP (\vtop
+ {\hbox{TYPE, OB1, OB2, UTC, DUT, ELONGM, PHIM, HM, XP, YP,}
+ \hbox{TDK, PMB, RH, WL, TLR, RAP, DAP)}}}
+ Observed to apparent
+\subp{CALL sla\_OAPQK (TYPE, OB1, OB2, AOPRMS, RA, DA)}
+ Observed to apparent using precomputed parameters
+\end{callset}
+
+\callhead{Azimuth and Elevation}
+\begin{callset}
+\subp{CALL sla\_ALTAZ (\vtop
+ {\hbox{HA, DEC, PHI,}
+ \hbox{AZ, AZD, AZDD, EL, ELD, ELDD, PA, PAD, PADD)}}}
+ Positions, velocities {\it etc.}\ for an altazimuth mount
+\subq{CALL sla\_E2H (HA, DEC, PHI, AZ, EL)}
+ {CALL sla\_DE2H (HA, DEC, PHI, AZ, EL)}
+ \hadec\ to \azel
+\subq{CALL sla\_H2E (AZ, EL, PHI, HA, DEC)}
+ {CALL sla\_DH2E (AZ, EL, PHI, HA, DEC)}
+ \azel\ to \hadec
+\subp{CALL sla\_PDA2H (P, D, A, H1, J1, H2, J2)}
+ Hour Angle corresponding to a given azimuth
+\subp{CALL sla\_PDQ2H (P, D, Q, H1, J1, H2, J2)}
+ Hour Angle corresponding to a given parallactic angle
+\subp{D~=~sla\_PA (HA, DEC, PHI)}
+ \hadec\ to parallactic angle
+\subp{D~=~sla\_ZD (HA, DEC, PHI)}
+ \hadec\ to zenith distance
+\end{callset}
+
+\callhead{Refraction and Air Mass}
+\begin{callset}
+\subp{CALL sla\_REFRO (ZOBS, HM, TDK, PMB, RH, WL, PHI, TLR, EPS, REF)}
+ Change in zenith distance due to refraction
+\subp{CALL sla\_REFCO (HM, TDK, PMB, RH, WL, PHI, TLR, EPS, REFA, REFB)}
+ Constants for simple refraction model (accurate)
+\subp{CALL sla\_REFCOQ (TDK, PMB, RH, WL, REFA, REFB)}
+ Constants for simple refraction model (fast)
+\subp{CALL sla\_ATMDSP ( TDK, PMB, RH, WL1, REFA1, REFB1, WL2, REFA2, REFB2 )}
+ Adjust refraction constants for colour
+\subp{CALL sla\_REFZ (ZU, REFA, REFB, ZR)}
+ Unrefracted to refracted ZD, simple model
+\subp{CALL sla\_REFV (VU, REFA, REFB, VR)}
+ Unrefracted to refracted \azel\ vector, simple model
+\subp{D~=~sla\_AIRMAS (ZD)}
+ Air mass
+\end{callset}
+
+\callhead{Ecliptic Coordinates}
+\begin{callset}
+\subp{CALL sla\_ECMAT (DATE, RMAT)}
+ Equatorial to ecliptic rotation matrix
+\subp{CALL sla\_EQECL (DR, DD, DATE, DL, DB)}
+ J2000.0 `FK5' to ecliptic coordinates
+\subp{CALL sla\_ECLEQ (DL, DB, DATE, DR, DD)}
+ Ecliptic coordinates to J2000.0 `FK5'
+\end{callset}
+
+\callhead{Galactic Coordinates}
+\begin{callset}
+\subp{CALL sla\_EG50 (DR, DD, DL, DB)}
+ B1950.0 `FK4' to galactic
+\subp{CALL sla\_GE50 (DL, DB, DR, DD)}
+ Galactic to B1950.0 `FK4'
+\subp{CALL sla\_EQGAL (DR, DD, DL, DB)}
+ J2000.0 `FK5' to galactic
+\subp{CALL sla\_GALEQ (DL, DB, DR, DD)}
+ Galactic to J2000.0 `FK5'
+\end{callset}
+
+\callhead{Supergalactic Coordinates}
+\begin{callset}
+\subp{CALL sla\_GALSUP (DL, DB, DSL, DSB)}
+ Galactic to supergalactic
+\subp{CALL sla\_SUPGAL (DSL, DSB, DL, DB)}
+ Supergalactic to galactic
+\end{callset}
+
+\callhead{Ephemerides}
+\begin{callset}
+\subp{CALL sla\_DMOON (DATE, PV)}
+ Approximate geocentric position and velocity of the Moon
+\subp{CALL sla\_EARTH (IY, ID, FD, PV)}
+ Approximate heliocentric position and velocity of the Earth
+\subp{CALL sla\_EVP (DATE, DEQX, DVB, DPB, DVH, DPH)}
+ Barycentric and heliocentric velocity and position of the Earth
+\subp{CALL sla\_MOON (IY, ID, FD, PV)}
+ Approximate geocentric position and velocity of the Moon
+\subp{CALL sla\_PLANET (DATE, NP, PV, JSTAT)}
+ Approximate heliocentric position and velocity of a planet
+\subp{CALL sla\_RDPLAN (DATE, NP, ELONG, PHI, RA, DEC, DIAM)}
+ Approximate topocentric apparent place of a planet
+\subp{CALL sla\_PLANEL (\vtop
+ {\hbox{DATE, JFORM, EPOCH, ORBINC, ANODE, PERIH,}
+ \hbox{AORQ, E, AORL, DM, PV, JSTAT)}}}
+ Heliocentric position and velocity of a planet, asteroid or
+ comet, starting from orbital elements
+\subp{CALL sla\_PLANTE (\vtop
+ {\hbox{DATE, ELONG, PHI, JFORM, EPOCH, ORBINC, ANODE,}
+ \hbox{PERIH, AORQ, E, AORL, DM, RA, DEC, R, JSTAT)}}}
+ Topocentric apparent place of a Solar-System object whose
+ heliocentric orbital elements are known
+\subp{CALL sla\_PV2EL (\vtop
+ {\hbox{PV, DATE, PMASS, JFORMR, JFORM, EPOCH, ORBINC,}
+ \hbox{ANODE, PERIH, AORQ, E, AORL, DM, JSTAT)}}}
+ Orbital elements of a planet from instantaneous position and velocity
+\subp{CALL sla\_PERTEL (\vtop
+ {\hbox{JFORM, DATE0, DATE1,}
+ \hbox{EPOCH0, ORBI0, ANODE0, PERIH0, AORQ0, E0, AM0,}
+ \hbox{EPOCH1, ORBI1, ANODE1, PERIH1, AORQ1, E1, AM1,}
+ \hbox{JSTAT)}}}
+ Update elements by applying perturbations
+\subp{CALL sla\_EL2UE (\vtop
+ {\hbox{DATE, JFORM, EPOCH, ORBINC, ANODE,}
+ \hbox{PERIH, AORQ, E, AORL, DM,}
+ \hbox{U, JSTAT)}}}
+ Transform conventional elements to universal elements
+\subp{CALL sla\_UE2EL (\vtop
+ {\hbox{U, JFORMR,}
+ \hbox{JFORM, EPOCH, ORBINC, ANODE, PERIH,}
+ \hbox{AORQ, E, AORL, DM, JSTAT)}}}
+ Transform universal elements to conventional elements
+\subp{CALL sla\_PV2UE (PV, DATE, PMASS, U, JSTAT)}
+ Package a position and velocity for use as universal elements
+\subp{CALL sla\_UE2PV (DATE, U, PV, JSTAT)}
+ Extract the position and velocity from universal elements
+\subp{CALL sla\_PERTUE (DATE, U, JSTAT)}
+ Update universal elements by applying perturbations
+\subp{R~=~sla\_RVEROT (PHI, RA, DA, ST)}
+ Velocity component due to rotation of the Earth
+\subp{CALL sla\_ECOR (RM, DM, IY, ID, FD, RV, TL)}
+ Components of velocity and light time due to Earth orbital motion
+\subp{R~=~sla\_RVLSRD (R2000, D2000)}
+ Velocity component due to solar motion wrt dynamical LSR
+\subp{R~=~sla\_RVLSRK (R2000, D2000)}
+ Velocity component due to solar motion wrt kinematical LSR
+\subp{R~=~sla\_RVGALC (R2000, D2000)}
+ Velocity component due to rotation of the Galaxy
+\subp{R~=~sla\_RVLG (R2000, D2000)}
+ Velocity component due to rotation and translation of the
+ Galaxy, relative to the mean motion of the local group
+\end{callset}
+
+\callhead{Astrometry}
+\begin{callset}
+\subq{CALL sla\_S2TP (RA, DEC, RAZ, DECZ, XI, ETA, J)}
+ {CALL sla\_DS2TP (RA, DEC, RAZ, DECZ, XI, ETA, J)}
+ Transform spherical coordinates into tangent plane
+\subq{CALL sla\_V2TP (V, V0, XI, ETA, J)}
+ {CALL sla\_DV2TP (V, V0, XI, ETA, J)}
+ Transform \xyz\ into tangent plane coordinates
+\subq{CALL sla\_DTP2S (XI, ETA, RAZ, DECZ, RA, DEC)}
+ {CALL sla\_TP2S (XI, ETA, RAZ, DECZ, RA, DEC)}
+ Transform tangent plane coordinates into spherical coordinates
+\subq{CALL sla\_DTP2V (XI, ETA, V0, V)}
+ {CALL sla\_TP2V (XI, ETA, V0, V)}
+ Transform tangent plane coordinates into \xyz
+\subq{CALL sla\_DTPS2C (XI, ETA, RA, DEC, RAZ1, DECZ1, RAZ2, DECZ2, N)}
+ {CALL sla\_TPS2C (XI, ETA, RA, DEC, RAZ1, DECZ1, RAZ2, DECZ2, N)}
+ Get plate centre from star \radec\ and tangent plane coordinates
+\subq{CALL sla\_DTPV2C (XI, ETA, V, V01, V02, N)}
+ {CALL sla\_TPV2C (XI, ETA, V, V01, V02, N)}
+ Get plate centre from star \xyz\ and tangent plane coordinates
+\subp{CALL sla\_PCD (DISCO, X, Y)}
+ Apply pincushion/barrel distortion
+\subp{CALL sla\_UNPCD (DISCO, X, Y)}
+ Remove pincushion/barrel distortion
+\subp{CALL sla\_FITXY (ITYPE, NP, XYE, XYM, COEFFS, J)}
+ Fit a linear model to relate two sets of \xy\ coordinates
+\subp{CALL sla\_PXY (NP, XYE, XYM, COEFFS, XYP, XRMS, YRMS, RRMS)}
+ Compute predicted coordinates and residuals
+\subp{CALL sla\_INVF (FWDS, BKWDS, J)}
+ Invert a linear model
+\subp{CALL sla\_XY2XY (X1, Y1, COEFFS, X2, Y2)}
+ Transform one \xy
+\subp{CALL sla\_DCMPF (COEFFS, XZ, YZ, XS, YS, PERP, ORIENT)}
+ Decompose a linear fit into scales {\it etc.}
+\end{callset}
+
+\callhead{Numerical Methods}
+\begin{callset}
+\subp{CALL sla\_COMBN (NSEL, NCAND, LIST, J)}
+ Next combination (subset from a specified number of items)
+\subp{CALL sla\_PERMUT (N, ISTATE, IORDER, J)}
+ Next permutation of a specified number of items
+\subq{CALL sla\_SMAT (N, A, Y, D, JF, IW)}
+ {CALL sla\_DMAT (N, A, Y, D, JF, IW)}
+ Matrix inversion and solution of simultaneous equations
+\subp{CALL sla\_SVD (M, N, MP, NP, A, W, V, WORK, JSTAT)}
+ Singular value decomposition of a matrix
+\subp{CALL sla\_SVDSOL (M, N, MP, NP, B, U, W, V, WORK, X)}
+ Solution from given vector plus SVD
+\subp{CALL sla\_SVDCOV (N, NP, NC, W, V, WORK, CVM)}
+ Covariance matrix from SVD
+\subp{R~=~sla\_RANDOM (SEED)}
+ Generate pseudo-random real number in the range {$0 \leq x < 1$}
+\subp{R~=~sla\_GRESID (S)}
+ Generate pseudo-random normal deviate ($\equiv$ `Gaussian residual')
+\end{callset}
+
+\callhead{Real-time}
+\begin{callset}
+\subp{CALL sla\_WAIT (DELAY)}
+ Interval wait
+\end{callset}
+
+\end{document}
diff --git a/src/slalib/supgal.f b/src/slalib/supgal.f
new file mode 100644
index 0000000..4658c8a
--- /dev/null
+++ b/src/slalib/supgal.f
@@ -0,0 +1,79 @@
+ SUBROUTINE sla_SUPGAL (DSL, DSB, DL, DB)
+*+
+* - - - - - - -
+* S U P G A L
+* - - - - - - -
+*
+* Transformation from de Vaucouleurs supergalactic coordinates
+* to IAU 1958 galactic coordinates (double precision)
+*
+* Given:
+* DSL,DSB dp supergalactic longitude and latitude
+*
+* Returned:
+* DL,DB dp galactic longitude and latitude L2,B2
+*
+* (all arguments are radians)
+*
+* Called:
+* sla_DCS2C, sla_DIMXV, sla_DCC2S, sla_DRANRM, sla_DRANGE
+*
+* References:
+*
+* de Vaucouleurs, de Vaucouleurs, & Corwin, Second Reference
+* Catalogue of Bright Galaxies, U. Texas, page 8.
+*
+* Systems & Applied Sciences Corp., Documentation for the
+* machine-readable version of the above catalogue,
+* Contract NAS 5-26490.
+*
+* (These two references give different values for the galactic
+* longitude of the supergalactic origin. Both are wrong; the
+* correct value is L2=137.37.)
+*
+* P.T.Wallace Starlink March 1986
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION DSL,DSB,DL,DB
+
+ DOUBLE PRECISION sla_DRANRM,sla_DRANGE
+
+ DOUBLE PRECISION V1(3),V2(3)
+
+*
+* System of supergalactic coordinates:
+*
+* SGL SGB L2 B2 (deg)
+* - +90 47.37 +6.32
+* 0 0 - 0
+*
+* Galactic to supergalactic rotation matrix:
+*
+ DOUBLE PRECISION RMAT(3,3)
+ DATA RMAT(1,1),RMAT(1,2),RMAT(1,3),
+ : RMAT(2,1),RMAT(2,2),RMAT(2,3),
+ : RMAT(3,1),RMAT(3,2),RMAT(3,3)/
+ : -0.735742574804D0,+0.677261296414D0,+0.000000000000D0,
+ : -0.074553778365D0,-0.080991471307D0,+0.993922590400D0,
+ : +0.673145302109D0,+0.731271165817D0,+0.110081262225D0/
+
+
+
+* Spherical to Cartesian
+ CALL sla_DCS2C(DSL,DSB,V1)
+
+* Supergalactic to galactic
+ CALL sla_DIMXV(RMAT,V1,V2)
+
+* Cartesian to spherical
+ CALL sla_DCC2S(V2,DL,DB)
+
+* Express in conventional ranges
+ DL=sla_DRANRM(DL)
+ DB=sla_DRANGE(DB)
+
+ END
diff --git a/src/slalib/svd.f b/src/slalib/svd.f
new file mode 100644
index 0000000..8498333
--- /dev/null
+++ b/src/slalib/svd.f
@@ -0,0 +1,379 @@
+ SUBROUTINE sla_SVD (M, N, MP, NP, A, W, V, WORK, JSTAT)
+*+
+* - - - -
+* S V D
+* - - - -
+*
+* Singular value decomposition (double precision)
+*
+* This routine expresses a given matrix A as the product of
+* three matrices U, W, V:
+*
+* A = U x W x VT
+*
+* Where:
+*
+* A is any M (rows) x N (columns) matrix, where M.GE.N
+* U is an M x N column-orthogonal matrix
+* W is an N x N diagonal matrix with W(I,I).GE.0
+* VT is the transpose of an N x N orthogonal matrix
+*
+* Note that M and N, above, are the LOGICAL dimensions of the
+* matrices and vectors concerned, which can be located in
+* arrays of larger PHYSICAL dimensions, given by MP and NP.
+*
+* Given:
+* M,N i numbers of rows and columns in matrix A
+* MP,NP i physical dimensions of array containing matrix A
+* A d(MP,NP) array containing MxN matrix A
+*
+* Returned:
+* A d(MP,NP) array containing MxN column-orthogonal matrix U
+* W d(N) NxN diagonal matrix W (diagonal elements only)
+* V d(NP,NP) array containing NxN orthogonal matrix V
+* WORK d(N) workspace
+* JSTAT i 0 = OK, -1 = A wrong shape, >0 = index of W
+* for which convergence failed. See note 2, below.
+*
+* Notes:
+*
+* 1) V contains matrix V, not the transpose of matrix V.
+*
+* 2) If the status JSTAT is greater than zero, this need not
+* necessarily be treated as a failure. It means that, due to
+* chance properties of the matrix A, the QR transformation
+* phase of the routine did not fully converge in a predefined
+* number of iterations, something that very seldom occurs.
+* When this condition does arise, it is possible that the
+* elements of the diagonal matrix W have not been correctly
+* found. However, in practice the results are likely to
+* be trustworthy. Applications should report the condition
+* as a warning, but then proceed normally.
+*
+* References:
+* The algorithm is an adaptation of the routine SVD in the EISPACK
+* library (Garbow et al 1977, EISPACK Guide Extension, Springer
+* Verlag), which is a FORTRAN 66 implementation of the Algol
+* routine SVD of Wilkinson & Reinsch 1971 (Handbook for Automatic
+* Computation, vol 2, ed Bauer et al, Springer Verlag). These
+* references give full details of the algorithm used here. A good
+* account of the use of SVD in least squares problems is given in
+* Numerical Recipes (Press et al 1986, Cambridge University Press),
+* which includes another variant of the EISPACK code.
+*
+* P.T.Wallace Starlink 22 December 1993
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ INTEGER M,N,MP,NP
+ DOUBLE PRECISION A(MP,NP),W(N),V(NP,NP),WORK(N)
+ INTEGER JSTAT
+
+* Maximum number of iterations in QR phase
+ INTEGER ITMAX
+ PARAMETER (ITMAX=30)
+
+ INTEGER I,K,L,J,K1,ITS,L1,I1
+ LOGICAL CANCEL
+ DOUBLE PRECISION G,SCALE,AN,S,X,F,H,C,Y,Z
+
+
+
+* Check that the matrix is the right shape
+ IF (M.LT.N) THEN
+
+* No: error status
+ JSTAT = -1
+
+ ELSE
+
+* Yes: preset the status to OK
+ JSTAT = 0
+
+*
+* Householder reduction to bidiagonal form
+* ----------------------------------------
+
+ G = 0D0
+ SCALE = 0D0
+ AN = 0D0
+ DO I=1,N
+ L = I+1
+ WORK(I) = SCALE*G
+ G = 0D0
+ S = 0D0
+ SCALE = 0D0
+ IF (I.LE.M) THEN
+ DO K=I,M
+ SCALE = SCALE+ABS(A(K,I))
+ END DO
+ IF (SCALE.NE.0D0) THEN
+ DO K=I,M
+ X = A(K,I)/SCALE
+ A(K,I) = X
+ S = S+X*X
+ END DO
+ F = A(I,I)
+ G = -SIGN(SQRT(S),F)
+ H = F*G-S
+ A(I,I) = F-G
+ IF (I.NE.N) THEN
+ DO J=L,N
+ S = 0D0
+ DO K=I,M
+ S = S+A(K,I)*A(K,J)
+ END DO
+ F = S/H
+ DO K=I,M
+ A(K,J) = A(K,J)+F*A(K,I)
+ END DO
+ END DO
+ END IF
+ DO K=I,M
+ A(K,I) = SCALE*A(K,I)
+ END DO
+ END IF
+ END IF
+ W(I) = SCALE*G
+ G = 0D0
+ S = 0D0
+ SCALE = 0D0
+ IF (I.LE.M .AND. I.NE.N) THEN
+ DO K=L,N
+ SCALE = SCALE+ABS(A(I,K))
+ END DO
+ IF (SCALE.NE.0D0) THEN
+ DO K=L,N
+ X = A(I,K)/SCALE
+ A(I,K) = X
+ S = S+X*X
+ END DO
+ F = A(I,L)
+ G = -SIGN(SQRT(S),F)
+ H = F*G-S
+ A(I,L) = F-G
+ DO K=L,N
+ WORK(K) = A(I,K)/H
+ END DO
+ IF (I.NE.M) THEN
+ DO J=L,M
+ S = 0D0
+ DO K=L,N
+ S = S+A(J,K)*A(I,K)
+ END DO
+ DO K=L,N
+ A(J,K) = A(J,K)+S*WORK(K)
+ END DO
+ END DO
+ END IF
+ DO K=L,N
+ A(I,K) = SCALE*A(I,K)
+ END DO
+ END IF
+ END IF
+
+* Overestimate of largest column norm for convergence test
+ AN = MAX(AN,ABS(W(I))+ABS(WORK(I)))
+
+ END DO
+
+*
+* Accumulation of right-hand transformations
+* ------------------------------------------
+
+ DO I=N,1,-1
+ IF (I.NE.N) THEN
+ IF (G.NE.0D0) THEN
+ DO J=L,N
+ V(J,I) = (A(I,J)/A(I,L))/G
+ END DO
+ DO J=L,N
+ S = 0D0
+ DO K=L,N
+ S = S+A(I,K)*V(K,J)
+ END DO
+ DO K=L,N
+ V(K,J) = V(K,J)+S*V(K,I)
+ END DO
+ END DO
+ END IF
+ DO J=L,N
+ V(I,J) = 0D0
+ V(J,I) = 0D0
+ END DO
+ END IF
+ V(I,I) = 1D0
+ G = WORK(I)
+ L = I
+ END DO
+
+*
+* Accumulation of left-hand transformations
+* -----------------------------------------
+
+ DO I=N,1,-1
+ L = I+1
+ G = W(I)
+ IF (I.NE.N) THEN
+ DO J=L,N
+ A(I,J) = 0D0
+ END DO
+ END IF
+ IF (G.NE.0D0) THEN
+ IF (I.NE.N) THEN
+ DO J=L,N
+ S = 0D0
+ DO K=L,M
+ S = S+A(K,I)*A(K,J)
+ END DO
+ F = (S/A(I,I))/G
+ DO K=I,M
+ A(K,J) = A(K,J)+F*A(K,I)
+ END DO
+ END DO
+ END IF
+ DO J=I,M
+ A(J,I) = A(J,I)/G
+ END DO
+ ELSE
+ DO J=I,M
+ A(J,I) = 0D0
+ END DO
+ END IF
+ A(I,I) = A(I,I)+1D0
+ END DO
+
+*
+* Diagonalisation of the bidiagonal form
+* --------------------------------------
+
+ DO K=N,1,-1
+ K1 = K-1
+
+* Iterate until converged
+ ITS = 0
+ DO WHILE (ITS.LT.ITMAX)
+ ITS = ITS+1
+
+* Test for splitting into submatrices
+ CANCEL = .TRUE.
+ DO L=K,1,-1
+ L1 = L-1
+ IF (AN+ABS(WORK(L)).EQ.AN) THEN
+ CANCEL = .FALSE.
+ GO TO 10
+ END IF
+* (Following never attempted for L=1 because WORK(1) is zero)
+ IF (AN+ABS(W(L1)).EQ.AN) GO TO 10
+ END DO
+ 10 CONTINUE
+
+* Cancellation of WORK(L) if L>1
+ IF (CANCEL) THEN
+ C = 0D0
+ S = 1D0
+ DO I=L,K
+ F = S*WORK(I)
+ IF (AN+ABS(F).EQ.AN) GO TO 20
+ G = W(I)
+ H = SQRT(F*F+G*G)
+ W(I) = H
+ C = G/H
+ S = -F/H
+ DO J=1,M
+ Y = A(J,L1)
+ Z = A(J,I)
+ A(J,L1) = Y*C+Z*S
+ A(J,I) = -Y*S+Z*C
+ END DO
+ END DO
+ 20 CONTINUE
+ END IF
+
+* Converged?
+ Z = W(K)
+ IF (L.EQ.K) THEN
+
+* Yes: stop iterating
+ ITS = ITMAX
+
+* Ensure singular values non-negative
+ IF (Z.LT.0D0) THEN
+ W(K) = -Z
+ DO J=1,N
+ V(J,K) = -V(J,K)
+ END DO
+ END IF
+ ELSE
+
+* Not converged yet: set status if iteration limit reached
+ IF (ITS.EQ.ITMAX) JSTAT = K
+
+* Shift from bottom 2x2 minor
+ X = W(L)
+ Y = W(K1)
+ G = WORK(K1)
+ H = WORK(K)
+ F = ((Y-Z)*(Y+Z)+(G-H)*(G+H))/(2D0*H*Y)
+ IF (ABS(F).LE.1D15) THEN
+ G = SQRT(F*F+1D0)
+ ELSE
+ G = ABS(F)
+ END IF
+ F = ((X-Z)*(X+Z)+H*(Y/(F+SIGN(G,F))-H))/X
+
+* Next QR transformation
+ C = 1D0
+ S = 1D0
+ DO I1=L,K1
+ I = I1+1
+ G = WORK(I)
+ Y = W(I)
+ H = S*G
+ G = C*G
+ Z = SQRT(F*F+H*H)
+ WORK(I1) = Z
+ IF (Z.NE.0D0) THEN
+ C = F/Z
+ S = H/Z
+ ELSE
+ C = 1D0
+ S = 0D0
+ END IF
+ F = X*C+G*S
+ G = -X*S+G*C
+ H = Y*S
+ Y = Y*C
+ DO J=1,N
+ X = V(J,I1)
+ Z = V(J,I)
+ V(J,I1) = X*C+Z*S
+ V(J,I) = -X*S+Z*C
+ END DO
+ Z = SQRT(F*F+H*H)
+ W(I1) = Z
+ IF (Z.NE.0D0) THEN
+ C = F/Z
+ S = H/Z
+ END IF
+ F = C*G+S*Y
+ X = -S*G+C*Y
+ DO J=1,M
+ Y = A(J,I1)
+ Z = A(J,I)
+ A(J,I1) = Y*C+Z*S
+ A(J,I) = -Y*S+Z*C
+ END DO
+ END DO
+ WORK(L) = 0D0
+ WORK(K) = F
+ W(K) = X
+ END IF
+ END DO
+ END DO
+ END IF
+
+ END
diff --git a/src/slalib/svdcov.f b/src/slalib/svdcov.f
new file mode 100644
index 0000000..86d882c
--- /dev/null
+++ b/src/slalib/svdcov.f
@@ -0,0 +1,60 @@
+ SUBROUTINE sla_SVDCOV (N, NP, NC, W, V, WORK, CVM)
+*+
+* - - - - - - -
+* S V D C O V
+* - - - - - - -
+*
+* From the W and V matrices from the SVD factorisation of a matrix
+* (as obtained from the sla_SVD routine), obtain the covariance matrix.
+*
+* (double precision)
+*
+* Given:
+* N i number of rows and columns in matrices W and V
+* NP i first dimension of array containing matrix V
+* NC i first dimension of array to receive CVM
+* W d(N) NxN diagonal matrix W (diagonal elements only)
+* V d(NP,NP) array containing NxN orthogonal matrix V
+*
+* Returned:
+* WORK d(N) workspace
+* CVM d(NC,NC) array to receive covariance matrix
+*
+* Reference:
+* Numerical Recipes, section 14.3.
+*
+* P.T.Wallace Starlink December 1988
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ INTEGER N,NP,NC
+ DOUBLE PRECISION W(N),V(NP,NP),WORK(N),CVM(NC,NC)
+
+ INTEGER I,J,K
+ DOUBLE PRECISION S
+
+
+
+ DO I=1,N
+ S=W(I)
+ IF (S.NE.0D0) THEN
+ WORK(I)=1D0/(S*S)
+ ELSE
+ WORK(I)=0D0
+ END IF
+ END DO
+ DO I=1,N
+ DO J=1,I
+ S=0D0
+ DO K=1,N
+ S=S+V(I,K)*V(J,K)*WORK(K)
+ END DO
+ CVM(I,J)=S
+ CVM(J,I)=S
+ END DO
+ END DO
+
+ END
diff --git a/src/slalib/svdsol.f b/src/slalib/svdsol.f
new file mode 100644
index 0000000..46ef6bb
--- /dev/null
+++ b/src/slalib/svdsol.f
@@ -0,0 +1,109 @@
+ SUBROUTINE sla_SVDSOL (M, N, MP, NP, B, U, W, V, WORK, X)
+*+
+* - - - - - - -
+* S V D S O L
+* - - - - - - -
+*
+* From a given vector and the SVD of a matrix (as obtained from
+* the SVD routine), obtain the solution vector (double precision)
+*
+* This routine solves the equation:
+*
+* A . x = b
+*
+* where:
+*
+* A is a given M (rows) x N (columns) matrix, where M.GE.N
+* x is the N-vector we wish to find
+* b is a given M-vector
+*
+* by means of the Singular Value Decomposition method (SVD). In
+* this method, the matrix A is first factorised (for example by
+* the routine sla_SVD) into the following components:
+*
+* A = U x W x VT
+*
+* where:
+*
+* A is the M (rows) x N (columns) matrix
+* U is an M x N column-orthogonal matrix
+* W is an N x N diagonal matrix with W(I,I).GE.0
+* VT is the transpose of an NxN orthogonal matrix
+*
+* Note that M and N, above, are the LOGICAL dimensions of the
+* matrices and vectors concerned, which can be located in
+* arrays of larger PHYSICAL dimensions MP and NP.
+*
+* The solution is found from the expression:
+*
+* x = V . [diag(1/Wj)] . (transpose(U) . b)
+*
+* Notes:
+*
+* 1) If matrix A is square, and if the diagonal matrix W is not
+* adjusted, the method is equivalent to conventional solution
+* of simultaneous equations.
+*
+* 2) If M>N, the result is a least-squares fit.
+*
+* 3) If the solution is poorly determined, this shows up in the
+* SVD factorisation as very small or zero Wj values. Where
+* a Wj value is small but non-zero it can be set to zero to
+* avoid ill effects. The present routine detects such zero
+* Wj values and produces a sensible solution, with highly
+* correlated terms kept under control rather than being allowed
+* to elope to infinity, and with meaningful values for the
+* other terms.
+*
+* Given:
+* M,N i numbers of rows and columns in matrix A
+* MP,NP i physical dimensions of array containing matrix A
+* B d(M) known vector b
+* U d(MP,NP) array containing MxN matrix U
+* W d(N) NxN diagonal matrix W (diagonal elements only)
+* V d(NP,NP) array containing NxN orthogonal matrix V
+*
+* Returned:
+* WORK d(N) workspace
+* X d(N) unknown vector x
+*
+* Reference:
+* Numerical Recipes, section 2.9.
+*
+* P.T.Wallace Starlink 29 October 1993
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ INTEGER M,N,MP,NP
+ DOUBLE PRECISION B(M),U(MP,NP),W(N),V(NP,NP),WORK(N),X(N)
+
+ INTEGER J,I,JJ
+ DOUBLE PRECISION S
+
+
+
+* Calculate [diag(1/Wj)] . transpose(U) . b (or zero for zero Wj)
+ DO J=1,N
+ S=0D0
+ IF (W(J).NE.0D0) THEN
+ DO I=1,M
+ S=S+U(I,J)*B(I)
+ END DO
+ S=S/W(J)
+ END IF
+ WORK(J)=S
+ END DO
+
+* Multiply by matrix V to get result
+ DO J=1,N
+ S=0D0
+ DO JJ=1,N
+ S=S+V(J,JJ)*WORK(JJ)
+ END DO
+ X(J)=S
+ END DO
+
+ END
diff --git a/src/slalib/tp2s.f b/src/slalib/tp2s.f
new file mode 100644
index 0000000..11be54a
--- /dev/null
+++ b/src/slalib/tp2s.f
@@ -0,0 +1,42 @@
+ SUBROUTINE sla_TP2S (XI, ETA, RAZ, DECZ, RA, DEC)
+*+
+* - - - - -
+* T P 2 S
+* - - - - -
+*
+* Transform tangent plane coordinates into spherical
+* (single precision)
+*
+* Given:
+* XI,ETA real tangent plane rectangular coordinates
+* RAZ,DECZ real spherical coordinates of tangent point
+*
+* Returned:
+* RA,DEC real spherical coordinates (0-2pi,+/-pi/2)
+*
+* Called: sla_RANORM
+*
+* P.T.Wallace Starlink 24 July 1995
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL XI,ETA,RAZ,DECZ,RA,DEC
+
+ REAL sla_RANORM
+
+ REAL SDECZ,CDECZ,DENOM
+
+
+
+ SDECZ=SIN(DECZ)
+ CDECZ=COS(DECZ)
+
+ DENOM=CDECZ-ETA*SDECZ
+
+ RA=sla_RANORM(ATAN2(XI,DENOM)+RAZ)
+ DEC=ATAN2(SDECZ+ETA*CDECZ,SQRT(XI*XI+DENOM*DENOM))
+
+ END
diff --git a/src/slalib/tp2v.f b/src/slalib/tp2v.f
new file mode 100644
index 0000000..cd8db96
--- /dev/null
+++ b/src/slalib/tp2v.f
@@ -0,0 +1,56 @@
+ SUBROUTINE sla_TP2V (XI, ETA, V0, V)
+*+
+* - - - - -
+* T P 2 V
+* - - - - -
+*
+* Given the tangent-plane coordinates of a star and the direction
+* cosines of the tangent point, determine the direction cosines
+* of the star.
+*
+* (single precision)
+*
+* Given:
+* XI,ETA r tangent plane coordinates of star
+* V0 r(3) direction cosines of tangent point
+*
+* Returned:
+* V r(3) direction cosines of star
+*
+* Notes:
+*
+* 1 If vector V0 is not of unit length, the returned vector V will
+* be wrong.
+*
+* 2 If vector V0 points at a pole, the returned vector V will be
+* based on the arbitrary assumption that the RA of the tangent
+* point is zero.
+*
+* 3 This routine is the Cartesian equivalent of the routine sla_TP2S.
+*
+* P.T.Wallace Starlink 11 February 1995
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL XI,ETA,V0(3),V(3)
+
+ REAL X,Y,Z,F,R
+
+
+ X=V0(1)
+ Y=V0(2)
+ Z=V0(3)
+ F=SQRT(1.0+XI*XI+ETA*ETA)
+ R=SQRT(X*X+Y*Y)
+ IF (R.EQ.0.0) THEN
+ R=1E-20
+ X=R
+ END IF
+ V(1)=(X-(XI*Y+ETA*X*Z)/R)/F
+ V(2)=(Y+(XI*X-ETA*Y*Z)/R)/F
+ V(3)=(Z+ETA*R)/F
+
+ END
diff --git a/src/slalib/tps2c.f b/src/slalib/tps2c.f
new file mode 100644
index 0000000..d7a7a52
--- /dev/null
+++ b/src/slalib/tps2c.f
@@ -0,0 +1,91 @@
+ SUBROUTINE sla_TPS2C (XI, ETA, RA, DEC, RAZ1, DECZ1,
+ : RAZ2, DECZ2, N)
+*+
+* - - - - - -
+* T P S 2 C
+* - - - - - -
+*
+* From the tangent plane coordinates of a star of known RA,Dec,
+* determine the RA,Dec of the tangent point.
+*
+* (single precision)
+*
+* Given:
+* XI,ETA r tangent plane rectangular coordinates
+* RA,DEC r spherical coordinates
+*
+* Returned:
+* RAZ1,DECZ1 r spherical coordinates of tangent point, solution 1
+* RAZ2,DECZ2 r spherical coordinates of tangent point, solution 2
+* N i number of solutions:
+* 0 = no solutions returned (note 2)
+* 1 = only the first solution is useful (note 3)
+* 2 = both solutions are useful (note 3)
+*
+* Notes:
+*
+* 1 The RAZ1 and RAZ2 values are returned in the range 0-2pi.
+*
+* 2 Cases where there is no solution can only arise near the poles.
+* For example, it is clearly impossible for a star at the pole
+* itself to have a non-zero XI value, and hence it is
+* meaningless to ask where the tangent point would have to be
+* to bring about this combination of XI and DEC.
+*
+* 3 Also near the poles, cases can arise where there are two useful
+* solutions. The argument N indicates whether the second of the
+* two solutions returned is useful. N=1 indicates only one useful
+* solution, the usual case; under these circumstances, the second
+* solution corresponds to the "over-the-pole" case, and this is
+* reflected in the values of RAZ2 and DECZ2 which are returned.
+*
+* 4 The DECZ1 and DECZ2 values are returned in the range +/-pi, but
+* in the usual, non-pole-crossing, case, the range is +/-pi/2.
+*
+* 5 This routine is the spherical equivalent of the routine sla_DTPV2C.
+*
+* Called: sla_RANORM
+*
+* P.T.Wallace Starlink 5 June 1995
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL XI,ETA,RA,DEC,RAZ1,DECZ1,RAZ2,DECZ2
+ INTEGER N
+
+ REAL X2,Y2,SD,CD,SDF,R2,R,S,C
+
+ REAL sla_RANORM
+
+
+ X2=XI*XI
+ Y2=ETA*ETA
+ SD=SIN(DEC)
+ CD=COS(DEC)
+ SDF=SD*SQRT(1.0+X2+Y2)
+ R2=CD*CD*(1.0+Y2)-SD*SD*X2
+ IF (R2.GE.0.0) THEN
+ R=SQRT(R2)
+ S=SDF-ETA*R
+ C=SDF*ETA+R
+ IF (XI.EQ.0.0.AND.R.EQ.0.0) R=1.0
+ RAZ1=sla_RANORM(RA-ATAN2(XI,R))
+ DECZ1=ATAN2(S,C)
+ R=-R
+ S=SDF-ETA*R
+ C=SDF*ETA+R
+ RAZ2=sla_RANORM(RA-ATAN2(XI,R))
+ DECZ2=ATAN2(S,C)
+ IF (ABS(SDF).LT.1.0) THEN
+ N=1
+ ELSE
+ N=2
+ END IF
+ ELSE
+ N=0
+ END IF
+
+ END
diff --git a/src/slalib/tpv2c.f b/src/slalib/tpv2c.f
new file mode 100644
index 0000000..7afe25d
--- /dev/null
+++ b/src/slalib/tpv2c.f
@@ -0,0 +1,83 @@
+ SUBROUTINE sla_TPV2C (XI, ETA, V, V01, V02, N)
+*+
+* - - - - - -
+* T P V 2 C
+* - - - - - -
+*
+* Given the tangent-plane coordinates of a star and its direction
+* cosines, determine the direction cosines of the tangent-point.
+*
+* (single precision)
+*
+* Given:
+* XI,ETA r tangent plane coordinates of star
+* V r(3) direction cosines of star
+*
+* Returned:
+* V01 r(3) direction cosines of tangent point, solution 1
+* V02 r(3) direction cosines of tangent point, solution 2
+* N i number of solutions:
+* 0 = no solutions returned (note 2)
+* 1 = only the first solution is useful (note 3)
+* 2 = both solutions are useful (note 3)
+*
+* Notes:
+*
+* 1 The vector V must be of unit length or the result will be wrong.
+*
+* 2 Cases where there is no solution can only arise near the poles.
+* For example, it is clearly impossible for a star at the pole
+* itself to have a non-zero XI value, and hence it is meaningless
+* to ask where the tangent point would have to be.
+*
+* 3 Also near the poles, cases can arise where there are two useful
+* solutions. The argument N indicates whether the second of the
+* two solutions returned is useful. N=1 indicates only one useful
+* solution, the usual case; under these circumstances, the second
+* solution can be regarded as valid if the vector V02 is interpreted
+* as the "over-the-pole" case.
+*
+* 4 This routine is the Cartesian equivalent of the routine sla_TPS2C.
+*
+* P.T.Wallace Starlink 5 June 1995
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL XI,ETA,V(3),V01(3),V02(3)
+ INTEGER N
+
+ REAL X,Y,Z,RXY2,XI2,ETA2P1,SDF,R2,R,C
+
+
+ X=V(1)
+ Y=V(2)
+ Z=V(3)
+ RXY2=X*X+Y*Y
+ XI2=XI*XI
+ ETA2P1=ETA*ETA+1.0
+ SDF=Z*SQRT(XI2+ETA2P1)
+ R2=RXY2*ETA2P1-Z*Z*XI2
+ IF (R2.GT.0.0) THEN
+ R=SQRT(R2)
+ C=(SDF*ETA+R)/(ETA2P1*SQRT(RXY2*(R2+XI2)))
+ V01(1)=C*(X*R+Y*XI)
+ V01(2)=C*(Y*R-X*XI)
+ V01(3)=(SDF-ETA*R)/ETA2P1
+ R=-R
+ C=(SDF*ETA+R)/(ETA2P1*SQRT(RXY2*(R2+XI2)))
+ V02(1)=C*(X*R+Y*XI)
+ V02(2)=C*(Y*R-X*XI)
+ V02(3)=(SDF-ETA*R)/ETA2P1
+ IF (ABS(SDF).LT.1.0) THEN
+ N=1
+ ELSE
+ N=2
+ END IF
+ ELSE
+ N=0
+ END IF
+
+ END
diff --git a/src/slalib/ue2el.f b/src/slalib/ue2el.f
new file mode 100644
index 0000000..d7187d9
--- /dev/null
+++ b/src/slalib/ue2el.f
@@ -0,0 +1,194 @@
+ SUBROUTINE sla_UE2EL (U, JFORMR,
+ : JFORM, EPOCH, ORBINC, ANODE, PERIH,
+ : AORQ, E, AORL, DM, JSTAT)
+*+
+* - - - - - -
+* U E 2 E L
+* - - - - - -
+*
+* Transform universal elements into conventional heliocentric
+* osculating elements.
+*
+* Given:
+* U d(13) universal orbital elements (Note 1)
+*
+* (1) combined mass (M+m)
+* (2) total energy of the orbit (alpha)
+* (3) reference (osculating) epoch (t0)
+* (4-6) position at reference epoch (r0)
+* (7-9) velocity at reference epoch (v0)
+* (10) heliocentric distance at reference epoch
+* (11) r0.v0
+* (12) date (t)
+* (13) universal eccentric anomaly (psi) of date, approx
+*
+* JFORMR i requested element set (1-3; Note 3)
+*
+* Returned:
+* JFORM d element set actually returned (1-3; Note 4)
+* EPOCH d epoch of elements (TT MJD)
+* ORBINC d inclination (radians)
+* ANODE d longitude of the ascending node (radians)
+* PERIH d longitude or argument of perihelion (radians)
+* AORQ d mean distance or perihelion distance (AU)
+* E d eccentricity
+* AORL d mean anomaly or longitude (radians, JFORM=1,2 only)
+* DM d daily motion (radians, JFORM=1 only)
+* JSTAT i status: 0 = OK
+* -1 = illegal combined mass
+* -2 = illegal JFORMR
+* -3 = position/velocity out of range
+*
+* Notes
+*
+* 1 The "universal" elements are those which define the orbit for the
+* purposes of the method of universal variables (see reference 2).
+* They consist of the combined mass of the two bodies, an epoch,
+* and the position and velocity vectors (arbitrary reference frame)
+* at that epoch. The parameter set used here includes also various
+* quantities that can, in fact, be derived from the other
+* information. This approach is taken to avoiding unnecessary
+* computation and loss of accuracy. The supplementary quantities
+* are (i) alpha, which is proportional to the total energy of the
+* orbit, (ii) the heliocentric distance at epoch, (iii) the
+* outwards component of the velocity at the given epoch, (iv) an
+* estimate of psi, the "universal eccentric anomaly" at a given
+* date and (v) that date.
+*
+* 2 The universal elements are with respect to the mean equator and
+* equinox of epoch J2000. The orbital elements produced are with
+* respect to the J2000 ecliptic and mean equinox.
+*
+* 3 Three different element-format options are supported:
+*
+* Option JFORM=1, suitable for the major planets:
+*
+* EPOCH = epoch of elements (TT MJD)
+* ORBINC = inclination i (radians)
+* ANODE = longitude of the ascending node, big omega (radians)
+* PERIH = longitude of perihelion, curly pi (radians)
+* AORQ = mean distance, a (AU)
+* E = eccentricity, e
+* AORL = mean longitude L (radians)
+* DM = daily motion (radians)
+*
+* Option JFORM=2, suitable for minor planets:
+*
+* EPOCH = epoch of elements (TT MJD)
+* ORBINC = inclination i (radians)
+* ANODE = longitude of the ascending node, big omega (radians)
+* PERIH = argument of perihelion, little omega (radians)
+* AORQ = mean distance, a (AU)
+* E = eccentricity, e
+* AORL = mean anomaly M (radians)
+*
+* Option JFORM=3, suitable for comets:
+*
+* EPOCH = epoch of perihelion (TT MJD)
+* ORBINC = inclination i (radians)
+* ANODE = longitude of the ascending node, big omega (radians)
+* PERIH = argument of perihelion, little omega (radians)
+* AORQ = perihelion distance, q (AU)
+* E = eccentricity, e
+*
+* 4 It may not be possible to generate elements in the form
+* requested through JFORMR. The caller is notified of the form
+* of elements actually returned by means of the JFORM argument:
+*
+* JFORMR JFORM meaning
+*
+* 1 1 OK - elements are in the requested format
+* 1 2 never happens
+* 1 3 orbit not elliptical
+*
+* 2 1 never happens
+* 2 2 OK - elements are in the requested format
+* 2 3 orbit not elliptical
+*
+* 3 1 never happens
+* 3 2 never happens
+* 3 3 OK - elements are in the requested format
+*
+* 5 The arguments returned for each value of JFORM (cf Note 6: JFORM
+* may not be the same as JFORMR) are as follows:
+*
+* JFORM 1 2 3
+* EPOCH t0 t0 T
+* ORBINC i i i
+* ANODE Omega Omega Omega
+* PERIH curly pi omega omega
+* AORQ a a q
+* E e e e
+* AORL L M -
+* DM n - -
+*
+* where:
+*
+* t0 is the epoch of the elements (MJD, TT)
+* T " epoch of perihelion (MJD, TT)
+* i " inclination (radians)
+* Omega " longitude of the ascending node (radians)
+* curly pi " longitude of perihelion (radians)
+* omega " argument of perihelion (radians)
+* a " mean distance (AU)
+* q " perihelion distance (AU)
+* e " eccentricity
+* L " longitude (radians, 0-2pi)
+* M " mean anomaly (radians, 0-2pi)
+* n " daily motion (radians)
+* - means no value is set
+*
+* 6 At very small inclinations, the longitude of the ascending node
+* ANODE becomes indeterminate and under some circumstances may be
+* set arbitrarily to zero. Similarly, if the orbit is close to
+* circular, the true anomaly becomes indeterminate and under some
+* circumstances may be set arbitrarily to zero. In such cases,
+* the other elements are automatically adjusted to compensate,
+* and so the elements remain a valid description of the orbit.
+*
+* References:
+*
+* 1 Sterne, Theodore E., "An Introduction to Celestial Mechanics",
+* Interscience Publishers Inc., 1960. Section 6.7, p199.
+*
+* 2 Everhart, E. & Pitkin, E.T., Am.J.Phys. 51, 712, 1983.
+*
+* Called: sla_PV2EL
+*
+* P.T.Wallace Starlink 18 March 1999
+*
+* Copyright (C) 1999 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION U(13)
+ INTEGER JFORMR,JFORM
+ DOUBLE PRECISION EPOCH,ORBINC,ANODE,PERIH,AORQ,E,AORL,DM
+ INTEGER JSTAT
+
+* Gaussian gravitational constant (exact)
+ DOUBLE PRECISION GCON
+ PARAMETER (GCON=0.01720209895D0)
+
+* Canonical days to seconds
+ DOUBLE PRECISION CD2S
+ PARAMETER (CD2S=GCON/86400D0)
+
+ INTEGER I
+ DOUBLE PRECISION PMASS,DATE,PV(6)
+
+
+* Unpack the universal elements.
+ PMASS = U(1)-1D0
+ DATE = U(3)
+ DO I=1,3
+ PV(I) = U(I+3)
+ PV(I+3) = U(I+6)*CD2S
+ END DO
+
+* Convert the position and velocity etc into conventional elements.
+ CALL sla_PV2EL(PV,DATE,PMASS,JFORMR,JFORM,EPOCH,ORBINC,ANODE,
+ : PERIH,AORQ,E,AORL,DM,JSTAT)
+
+ END
diff --git a/src/slalib/ue2pv.f b/src/slalib/ue2pv.f
new file mode 100644
index 0000000..be7b59f
--- /dev/null
+++ b/src/slalib/ue2pv.f
@@ -0,0 +1,215 @@
+ SUBROUTINE sla_UE2PV (DATE, U, PV, JSTAT)
+*+
+* - - - - - -
+* U E 2 P V
+* - - - - - -
+*
+* Heliocentric position and velocity of a planet, asteroid or comet,
+* starting from orbital elements in the "universal variables" form.
+*
+* Given:
+* DATE d date, Modified Julian Date (JD-2400000.5)
+*
+* Given and returned:
+* U d(13) universal orbital elements (updated; Note 1)
+*
+* given (1) combined mass (M+m)
+* " (2) total energy of the orbit (alpha)
+* " (3) reference (osculating) epoch (t0)
+* " (4-6) position at reference epoch (r0)
+* " (7-9) velocity at reference epoch (v0)
+* " (10) heliocentric distance at reference epoch
+* " (11) r0.v0
+* returned (12) date (t)
+* " (13) universal eccentric anomaly (psi) of date
+*
+* Returned:
+* PV d(6) position (AU) and velocity (AU/s)
+* JSTAT i status: 0 = OK
+* -1 = radius vector zero
+* -2 = failed to converge
+*
+* Notes
+*
+* 1 The "universal" elements are those which define the orbit for the
+* purposes of the method of universal variables (see reference).
+* They consist of the combined mass of the two bodies, an epoch,
+* and the position and velocity vectors (arbitrary reference frame)
+* at that epoch. The parameter set used here includes also various
+* quantities that can, in fact, be derived from the other
+* information. This approach is taken to avoiding unnecessary
+* computation and loss of accuracy. The supplementary quantities
+* are (i) alpha, which is proportional to the total energy of the
+* orbit, (ii) the heliocentric distance at epoch, (iii) the
+* outwards component of the velocity at the given epoch, (iv) an
+* estimate of psi, the "universal eccentric anomaly" at a given
+* date and (v) that date.
+*
+* 2 The companion routine is sla_EL2UE. This takes the conventional
+* orbital elements and transforms them into the set of numbers
+* needed by the present routine. A single prediction requires one
+* one call to sla_EL2UE followed by one call to the present routine;
+* for convenience, the two calls are packaged as the routine
+* sla_PLANEL. Multiple predictions may be made by again
+* calling sla_EL2UE once, but then calling the present routine
+* multiple times, which is faster than multiple calls to sla_PLANEL.
+*
+* It is not obligatory to use sla_EL2UE to obtain the parameters.
+* However, it should be noted that because sla_EL2UE performs its
+* own validation, no checks on the contents of the array U are made
+* by the present routine.
+*
+* 3 DATE is the instant for which the prediction is required. It is
+* in the TT timescale (formerly Ephemeris Time, ET) and is a
+* Modified Julian Date (JD-2400000.5).
+*
+* 4 The universal elements supplied in the array U are in canonical
+* units (solar masses, AU and canonical days). The position and
+* velocity are not sensitive to the choice of reference frame. The
+* sla_EL2UE routine in fact produces coordinates with respect to the
+* J2000 equator and equinox.
+*
+* 5 The algorithm was originally adapted from the EPHSLA program of
+* D.H.P.Jones (private communication, 1996). The method is based
+* on Stumpff's Universal Variables.
+*
+* Reference: Everhart, E. & Pitkin, E.T., Am.J.Phys. 51, 712, 1983.
+*
+* P.T.Wallace Starlink 19 March 1999
+*
+* Copyright (C) 1999 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION DATE,U(13),PV(6)
+ INTEGER JSTAT
+
+* Gaussian gravitational constant (exact)
+ DOUBLE PRECISION GCON
+ PARAMETER (GCON=0.01720209895D0)
+
+* Canonical days to seconds
+ DOUBLE PRECISION CD2S
+ PARAMETER (CD2S=GCON/86400D0)
+
+* Test value for solution and maximum number of iterations
+ DOUBLE PRECISION TEST
+ INTEGER NITMAX
+ PARAMETER (TEST=1D-13,NITMAX=20)
+
+ INTEGER I,NIT,N
+
+ DOUBLE PRECISION CM,ALPHA,T0,P0(3),V0(3),R0,SIGMA0,T,PSI,DT,W,
+ : TOL,PSJ,PSJ2,BETA,S0,S1,S2,S3,FF,R,F,G,FD,GD
+
+
+
+* Unpack the parameters.
+ CM = U(1)
+ ALPHA = U(2)
+ T0 = U(3)
+ DO I=1,3
+ P0(I) = U(I+3)
+ V0(I) = U(I+6)
+ END DO
+ R0 = U(10)
+ SIGMA0 = U(11)
+ T = U(12)
+ PSI = U(13)
+
+* Approximately update the universal eccentric anomaly.
+ PSI = PSI+(DATE-T)*GCON/R0
+
+* Time from reference epoch to date (in Canonical Days: a canonical
+* day is 58.1324409... days, defined as 1/GCON).
+ DT = (DATE-T0)*GCON
+
+* Refine the universal eccentric anomaly.
+ NIT = 1
+ W = 1D0
+ TOL = 0D0
+ DO WHILE (ABS(W).GE.TOL)
+
+* Form half angles until BETA small enough.
+ N = 0
+ PSJ = PSI
+ PSJ2 = PSJ*PSJ
+ BETA = ALPHA*PSJ2
+ DO WHILE (ABS(BETA).GT.0.7D0)
+ N = N+1
+ BETA = BETA/4D0
+ PSJ = PSJ/2D0
+ PSJ2 = PSJ2/4D0
+ END DO
+
+* Calculate Universal Variables S0,S1,S2,S3 by nested series.
+ S3 = PSJ*PSJ2*((((((BETA/210D0+1D0)
+ : *BETA/156D0+1D0)
+ : *BETA/110D0+1D0)
+ : *BETA/72D0+1D0)
+ : *BETA/42D0+1D0)
+ : *BETA/20D0+1D0)/6D0
+ S2 = PSJ2*((((((BETA/182D0+1D0)
+ : *BETA/132D0+1D0)
+ : *BETA/90D0+1D0)
+ : *BETA/56D0+1D0)
+ : *BETA/30D0+1D0)
+ : *BETA/12D0+1D0)/2D0
+ S1 = PSJ+ALPHA*S3
+ S0 = 1D0+ALPHA*S2
+
+* Undo the angle-halving.
+ TOL = TEST
+ DO WHILE (N.GT.0)
+ S3 = 2D0*(S0*S3+PSJ*S2)
+ S2 = 2D0*S1*S1
+ S1 = 2D0*S0*S1
+ S0 = 2D0*S0*S0-1D0
+ PSJ = PSJ+PSJ
+ TOL = TOL+TOL
+ N = N-1
+ END DO
+
+* Improve the approximation to PSI.
+ FF = R0*S1+SIGMA0*S2+CM*S3-DT
+ R = R0*S0+SIGMA0*S1+CM*S2
+ IF (R.EQ.0D0) GO TO 9010
+ W = FF/R
+ PSI = PSI-W
+
+* Next iteration, unless too many already.
+ IF (NIT.GE.NITMAX) GO TO 9020
+ NIT = NIT+1
+ END DO
+
+* Project the position and velocity vectors (scaling velocity to AU/s).
+ W = CM*S2
+ F = 1D0-W/R0
+ G = DT-CM*S3
+ FD = -CM*S1/(R0*R)
+ GD = 1D0-W/R
+ DO I=1,3
+ PV(I) = P0(I)*F+V0(I)*G
+ PV(I+3) = CD2S*(P0(I)*FD+V0(I)*GD)
+ END DO
+
+* Update the parameters to allow speedy prediction of PSI next time.
+ U(12) = DATE
+ U(13) = PSI
+
+* OK exit.
+ JSTAT = 0
+ GO TO 9999
+
+* Null radius vector.
+ 9010 CONTINUE
+ JSTAT = -1
+ GO TO 9999
+
+* Failed to converge.
+ 9020 CONTINUE
+ JSTAT = -2
+
+ 9999 CONTINUE
+ END
diff --git a/src/slalib/unpcd.f b/src/slalib/unpcd.f
new file mode 100644
index 0000000..9502671
--- /dev/null
+++ b/src/slalib/unpcd.f
@@ -0,0 +1,68 @@
+ SUBROUTINE sla_UNPCD (DISCO,X,Y)
+*+
+* - - - - - -
+* U N P C D
+* - - - - - -
+*
+* Remove pincushion/barrel distortion from a distorted [x,y]
+* to give tangent-plane [x,y].
+*
+* Given:
+* DISCO d pincushion/barrel distortion coefficient
+* X,Y d distorted coordinates
+*
+* Returned:
+* X,Y d tangent-plane coordinates
+*
+* Notes:
+*
+* 1) The distortion is of the form RP = R*(1 + C*R**2), where R is
+* the radial distance from the tangent point, C is the DISCO
+* argument, and RP is the radial distance in the presence of
+* the distortion.
+*
+* 2) For pincushion distortion, C is +ve; for barrel distortion,
+* C is -ve.
+*
+* 3) For X,Y in "radians" - units of one projection radius,
+* which in the case of a photograph is the focal length of
+* the camera - the following DISCO values apply:
+*
+* Geometry DISCO
+*
+* astrograph 0.0
+* Schmidt -0.3333
+* AAT PF doublet +147.069
+* AAT PF triplet +178.585
+* AAT f/8 +21.20
+* JKT f/8 +13.32
+*
+* 4) The present routine is an approximate inverse to the
+* companion routine sla_PCD, obtained from two iterations
+* of Newton's method. The mismatch between the sla_PCD and
+* sla_UNPCD routines is negligible for astrometric applications;
+* to reach 1 milliarcsec at the edge of the AAT triplet or
+* Schmidt field would require field diameters of 2.4 degrees
+* and 42 degrees respectively.
+*
+* P.T.Wallace Starlink 1 August 1994
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION DISCO,X,Y
+
+ DOUBLE PRECISION CR2,A,CR2A2,F
+
+
+
+ CR2=DISCO*(X*X+Y*Y)
+ A=(2D0*CR2+1D0)/(3D0*CR2+1D0)
+ CR2A2=CR2*A*A
+ F=(2D0*CR2A2*A+1D0)/(3D0*CR2A2+1D0)
+ X=X*F
+ Y=Y*F
+
+ END
diff --git a/src/slalib/v2tp.f b/src/slalib/v2tp.f
new file mode 100644
index 0000000..c072bc8
--- /dev/null
+++ b/src/slalib/v2tp.f
@@ -0,0 +1,78 @@
+ SUBROUTINE sla_V2TP (V, V0, XI, ETA, J)
+*+
+* - - - - -
+* V 2 T P
+* - - - - -
+*
+* Given the direction cosines of a star and of the tangent point,
+* determine the star's tangent-plane coordinates.
+*
+* (single precision)
+*
+* Given:
+* V r(3) direction cosines of star
+* V0 r(3) direction cosines of tangent point
+*
+* Returned:
+* XI,ETA r tangent plane coordinates of star
+* J i status: 0 = OK
+* 1 = error, star too far from axis
+* 2 = error, antistar on tangent plane
+* 3 = error, antistar too far from axis
+*
+* Notes:
+*
+* 1 If vector V0 is not of unit length, or if vector V is of zero
+* length, the results will be wrong.
+*
+* 2 If V0 points at a pole, the returned XI,ETA will be based on the
+* arbitrary assumption that the RA of the tangent point is zero.
+*
+* 3 This routine is the Cartesian equivalent of the routine sla_S2TP.
+*
+* P.T.Wallace Starlink 27 November 1996
+*
+* Copyright (C) 1996 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL V(3),V0(3),XI,ETA
+ INTEGER J
+
+ REAL X,Y,Z,X0,Y0,Z0,R2,R,W,D
+
+ REAL TINY
+ PARAMETER (TINY=1E-6)
+
+
+ X=V(1)
+ Y=V(2)
+ Z=V(3)
+ X0=V0(1)
+ Y0=V0(2)
+ Z0=V0(3)
+ R2=X0*X0+Y0*Y0
+ R=SQRT(R2)
+ IF (R.EQ.0.0) THEN
+ R=1E-20
+ X0=R
+ END IF
+ W=X*X0+Y*Y0
+ D=W+Z*Z0
+ IF (D.GT.TINY) THEN
+ J=0
+ ELSE IF (D.GE.0.0) THEN
+ J=1
+ D=TINY
+ ELSE IF (D.GT.-TINY) THEN
+ J=2
+ D=-TINY
+ ELSE
+ J=3
+ END IF
+ D=D*R
+ XI=(Y*X0-X*Y0)/D
+ ETA=(Z*R2-Z0*W)/D
+
+ END
diff --git a/src/slalib/vdv.f b/src/slalib/vdv.f
new file mode 100644
index 0000000..eddeac2
--- /dev/null
+++ b/src/slalib/vdv.f
@@ -0,0 +1,27 @@
+ REAL FUNCTION sla_VDV (VA, VB)
+*+
+* - - - -
+* V D V
+* - - - -
+*
+* Scalar product of two 3-vectors (single precision)
+*
+* Given:
+* VA real(3) first vector
+* VB real(3) second vector
+*
+* The result is the scalar product VA.VB (single precision)
+*
+* P.T.Wallace Starlink November 1984
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL VA(3),VB(3)
+
+
+ sla_VDV=VA(1)*VB(1)+VA(2)*VB(2)+VA(3)*VB(3)
+
+ END
diff --git a/src/slalib/vn.f b/src/slalib/vn.f
new file mode 100644
index 0000000..e252867
--- /dev/null
+++ b/src/slalib/vn.f
@@ -0,0 +1,46 @@
+ SUBROUTINE sla_VN (V, UV, VM)
+*+
+* - - -
+* V N
+* - - -
+*
+* Normalizes a 3-vector also giving the modulus (single precision)
+*
+* Given:
+* V real(3) vector
+*
+* Returned:
+* UV real(3) unit vector in direction of V
+* VM real modulus of V
+*
+* If the modulus of V is zero, UV is set to zero as well
+*
+* P.T.Wallace Starlink 23 November 1995
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL V(3),UV(3),VM
+
+ INTEGER I
+ REAL W1,W2
+
+
+* Modulus
+ W1=0.0
+ DO I=1,3
+ W2=V(I)
+ W1=W1+W2*W2
+ END DO
+ W1=SQRT(W1)
+ VM=W1
+
+* Normalize the vector
+ IF (W1.LE.0.0) W1=1.0
+ DO I=1,3
+ UV(I)=V(I)/W1
+ END DO
+
+ END
diff --git a/src/slalib/vxv.f b/src/slalib/vxv.f
new file mode 100644
index 0000000..e0b9d93
--- /dev/null
+++ b/src/slalib/vxv.f
@@ -0,0 +1,39 @@
+ SUBROUTINE sla_VXV (VA, VB, VC)
+*+
+* - - - -
+* V X V
+* - - - -
+*
+* Vector product of two 3-vectors (single precision)
+*
+* Given:
+* VA real(3) first vector
+* VB real(3) second vector
+*
+* Returned:
+* VC real(3) vector result
+*
+* P.T.Wallace Starlink March 1986
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL VA(3),VB(3),VC(3)
+
+ REAL VW(3)
+ INTEGER I
+
+
+* Form the vector product VA cross VB
+ VW(1)=VA(2)*VB(3)-VA(3)*VB(2)
+ VW(2)=VA(3)*VB(1)-VA(1)*VB(3)
+ VW(3)=VA(1)*VB(2)-VA(2)*VB(1)
+
+* Return the result
+ DO I=1,3
+ VC(I)=VW(I)
+ END DO
+
+ END
diff --git a/src/slalib/wait.f_alpha_OSF1 b/src/slalib/wait.f_alpha_OSF1
new file mode 100644
index 0000000..8eb80e1
--- /dev/null
+++ b/src/slalib/wait.f_alpha_OSF1
@@ -0,0 +1,32 @@
+ SUBROUTINE sla_WAIT (DELAY)
+*+
+* - - - - -
+* W A I T
+* - - - - -
+*
+* Interval wait
+*
+* !!! Version for: SPARC/SunOS4,
+* SPARC/Solaris2,
+* DEC Mips/Ultrix
+* DEC AXP/Digital Unix
+* Intel/Linux
+* Convex
+*
+* Given:
+* DELAY real delay in seconds
+*
+* Called: SLEEP (a Fortran Intrinsic on all obove platforms)
+*
+* P.T.Wallace Starlink 22 January 1998
+*
+* Copyright (C) 1998 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL DELAY
+
+ CALL SLEEP(NINT(DELAY))
+
+ END
diff --git a/src/slalib/wait.f_convex b/src/slalib/wait.f_convex
new file mode 100644
index 0000000..8eb80e1
--- /dev/null
+++ b/src/slalib/wait.f_convex
@@ -0,0 +1,32 @@
+ SUBROUTINE sla_WAIT (DELAY)
+*+
+* - - - - -
+* W A I T
+* - - - - -
+*
+* Interval wait
+*
+* !!! Version for: SPARC/SunOS4,
+* SPARC/Solaris2,
+* DEC Mips/Ultrix
+* DEC AXP/Digital Unix
+* Intel/Linux
+* Convex
+*
+* Given:
+* DELAY real delay in seconds
+*
+* Called: SLEEP (a Fortran Intrinsic on all obove platforms)
+*
+* P.T.Wallace Starlink 22 January 1998
+*
+* Copyright (C) 1998 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL DELAY
+
+ CALL SLEEP(NINT(DELAY))
+
+ END
diff --git a/src/slalib/wait.f_ix86_Linux b/src/slalib/wait.f_ix86_Linux
new file mode 100644
index 0000000..8eb80e1
--- /dev/null
+++ b/src/slalib/wait.f_ix86_Linux
@@ -0,0 +1,32 @@
+ SUBROUTINE sla_WAIT (DELAY)
+*+
+* - - - - -
+* W A I T
+* - - - - -
+*
+* Interval wait
+*
+* !!! Version for: SPARC/SunOS4,
+* SPARC/Solaris2,
+* DEC Mips/Ultrix
+* DEC AXP/Digital Unix
+* Intel/Linux
+* Convex
+*
+* Given:
+* DELAY real delay in seconds
+*
+* Called: SLEEP (a Fortran Intrinsic on all obove platforms)
+*
+* P.T.Wallace Starlink 22 January 1998
+*
+* Copyright (C) 1998 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL DELAY
+
+ CALL SLEEP(NINT(DELAY))
+
+ END
diff --git a/src/slalib/wait.f_mips b/src/slalib/wait.f_mips
new file mode 100644
index 0000000..8eb80e1
--- /dev/null
+++ b/src/slalib/wait.f_mips
@@ -0,0 +1,32 @@
+ SUBROUTINE sla_WAIT (DELAY)
+*+
+* - - - - -
+* W A I T
+* - - - - -
+*
+* Interval wait
+*
+* !!! Version for: SPARC/SunOS4,
+* SPARC/Solaris2,
+* DEC Mips/Ultrix
+* DEC AXP/Digital Unix
+* Intel/Linux
+* Convex
+*
+* Given:
+* DELAY real delay in seconds
+*
+* Called: SLEEP (a Fortran Intrinsic on all obove platforms)
+*
+* P.T.Wallace Starlink 22 January 1998
+*
+* Copyright (C) 1998 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL DELAY
+
+ CALL SLEEP(NINT(DELAY))
+
+ END
diff --git a/src/slalib/wait.f_pcm b/src/slalib/wait.f_pcm
new file mode 100644
index 0000000..d79e78a
--- /dev/null
+++ b/src/slalib/wait.f_pcm
@@ -0,0 +1,66 @@
+ SUBROUTINE sla_WAIT (DELAY)
+*+
+* - - - - -
+* W A I T
+* - - - - -
+*
+* Interval wait
+*
+* !!! PC only - Microsoft Fortran specific !!!
+*
+* Given:
+* DELAY real delay in seconds
+*
+* A delay of up to 10000 seconds occurs.
+*
+* Called: GETTIM (Microsoft Fortran run-time library)
+*
+* P.T.Wallace Starlink 14 October 1991
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL DELAY
+
+ INTEGER IDELAY,IH,IM,IS,I,IT,IT0,IDT
+ LOGICAL FIRST,LOOP
+
+
+
+
+* Convert requested delay to 0.01 second ticks
+ IDELAY=NINT(MAX(MIN(DELAY,1E4),0.0)*1E2)
+
+* Set "note start time" flag
+ FIRST=.TRUE.
+
+* Set "wait in progress" flag
+ LOOP=.TRUE.
+
+* Main loop
+ DO WHILE (LOOP)
+
+* Get the current time and convert to 0.01 second ticks
+ CALL GETTIM(IH,IM,IS,I)
+ IT=((IH*60+IM)*60+IS)*100+I
+
+* First time through the loop?
+ IF (FIRST) THEN
+
+* Yes: note the time and reset the flag
+ IT0=IT
+ FIRST=.FALSE.
+ ELSE
+
+* No: subtract the start time, handling 0 hours wrap
+ IDT=IT-IT0
+ IF (IDT.LT.0) IDT=IDT+8640000
+
+* If the requested delay has elapsed, stop looping
+ LOOP=IDT.LT.IDELAY
+ END IF
+ END DO
+
+ END
diff --git a/src/slalib/wait.f_sun4 b/src/slalib/wait.f_sun4
new file mode 100644
index 0000000..8eb80e1
--- /dev/null
+++ b/src/slalib/wait.f_sun4
@@ -0,0 +1,32 @@
+ SUBROUTINE sla_WAIT (DELAY)
+*+
+* - - - - -
+* W A I T
+* - - - - -
+*
+* Interval wait
+*
+* !!! Version for: SPARC/SunOS4,
+* SPARC/Solaris2,
+* DEC Mips/Ultrix
+* DEC AXP/Digital Unix
+* Intel/Linux
+* Convex
+*
+* Given:
+* DELAY real delay in seconds
+*
+* Called: SLEEP (a Fortran Intrinsic on all obove platforms)
+*
+* P.T.Wallace Starlink 22 January 1998
+*
+* Copyright (C) 1998 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL DELAY
+
+ CALL SLEEP(NINT(DELAY))
+
+ END
diff --git a/src/slalib/wait.f_sun4_Solaris b/src/slalib/wait.f_sun4_Solaris
new file mode 100644
index 0000000..8eb80e1
--- /dev/null
+++ b/src/slalib/wait.f_sun4_Solaris
@@ -0,0 +1,32 @@
+ SUBROUTINE sla_WAIT (DELAY)
+*+
+* - - - - -
+* W A I T
+* - - - - -
+*
+* Interval wait
+*
+* !!! Version for: SPARC/SunOS4,
+* SPARC/Solaris2,
+* DEC Mips/Ultrix
+* DEC AXP/Digital Unix
+* Intel/Linux
+* Convex
+*
+* Given:
+* DELAY real delay in seconds
+*
+* Called: SLEEP (a Fortran Intrinsic on all obove platforms)
+*
+* P.T.Wallace Starlink 22 January 1998
+*
+* Copyright (C) 1998 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL DELAY
+
+ CALL SLEEP(NINT(DELAY))
+
+ END
diff --git a/src/slalib/wait.f_vax b/src/slalib/wait.f_vax
new file mode 100644
index 0000000..1fd2e94
--- /dev/null
+++ b/src/slalib/wait.f_vax
@@ -0,0 +1,43 @@
+ SUBROUTINE sla_WAIT (DELAY)
+*+
+* - - - - -
+* W A I T
+* - - - - -
+*
+* Interval wait
+*
+* !!! VAX/VMS specific !!!
+*
+* Given:
+* DELAY real delay in seconds
+*
+* A delay 100ns < DELAY < 200s is requested.
+*
+* P.T.Wallace Starlink 14 October 1991
+*-
+
+ IMPLICIT NONE
+
+ REAL DELAY
+
+ INTEGER JSTAT
+ INTEGER SYS$SCHDWK,SYS$HIBER
+
+ INTEGER IDT(2)
+ DATA IDT(2)/-1/
+
+
+
+* Encode delta time
+ IDT(1)=-NINT(MAX(1.0,1E7*MIN(200.0,DELAY)))
+
+
+* Schedule a wakeup
+ JSTAT=SYS$SCHDWK(,,IDT,)
+ IF (.NOT.JSTAT) CALL LIB$STOP(%VAL(JSTAT))
+
+* Hibernate
+ JSTAT=SYS$HIBER()
+ IF (.NOT.JSTAT) CALL LIB$STOP(%VAL(JSTAT))
+
+ END
diff --git a/src/slalib/wait.f_x86_64 b/src/slalib/wait.f_x86_64
new file mode 100644
index 0000000..8eb80e1
--- /dev/null
+++ b/src/slalib/wait.f_x86_64
@@ -0,0 +1,32 @@
+ SUBROUTINE sla_WAIT (DELAY)
+*+
+* - - - - -
+* W A I T
+* - - - - -
+*
+* Interval wait
+*
+* !!! Version for: SPARC/SunOS4,
+* SPARC/Solaris2,
+* DEC Mips/Ultrix
+* DEC AXP/Digital Unix
+* Intel/Linux
+* Convex
+*
+* Given:
+* DELAY real delay in seconds
+*
+* Called: SLEEP (a Fortran Intrinsic on all obove platforms)
+*
+* P.T.Wallace Starlink 22 January 1998
+*
+* Copyright (C) 1998 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ REAL DELAY
+
+ CALL SLEEP(NINT(DELAY))
+
+ END
diff --git a/src/slalib/xy2xy.f b/src/slalib/xy2xy.f
new file mode 100644
index 0000000..d830f44
--- /dev/null
+++ b/src/slalib/xy2xy.f
@@ -0,0 +1,49 @@
+ SUBROUTINE sla_XY2XY (X1,Y1,COEFFS,X2,Y2)
+*+
+* - - - - - -
+* X Y 2 X Y
+* - - - - - -
+*
+* Transform one [X,Y] into another using a linear model of the type
+* produced by the sla_FITXY routine.
+*
+* Given:
+* X1 d x-coordinate
+* Y1 d y-coordinate
+* COEFFS d(6) transformation coefficients (see note)
+*
+* Returned:
+* X2 d x-coordinate
+* Y2 d y-coordinate
+*
+* The model relates two sets of [X,Y] coordinates as follows.
+* Naming the elements of COEFFS:
+*
+* COEFFS(1) = A
+* COEFFS(2) = B
+* COEFFS(3) = C
+* COEFFS(4) = D
+* COEFFS(5) = E
+* COEFFS(6) = F
+*
+* the present routine performs the transformation:
+*
+* X2 = A + B*X1 + C*Y1
+* Y2 = D + E*X1 + F*Y1
+*
+* See also sla_FITXY, sla_PXY, sla_INVF, sla_DCMPF
+*
+* P.T.Wallace Starlink 5 December 1994
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION X1,Y1,COEFFS(6),X2,Y2
+
+
+ X2=COEFFS(1)+COEFFS(2)*X1+COEFFS(3)*Y1
+ Y2=COEFFS(4)+COEFFS(5)*X1+COEFFS(6)*Y1
+
+ END
diff --git a/src/slalib/zd.f b/src/slalib/zd.f
new file mode 100644
index 0000000..f3dd34f
--- /dev/null
+++ b/src/slalib/zd.f
@@ -0,0 +1,62 @@
+ DOUBLE PRECISION FUNCTION sla_ZD (HA, DEC, PHI)
+*+
+* - - -
+* Z D
+* - - -
+*
+* HA, Dec to Zenith Distance (double precision)
+*
+* Given:
+* HA d Hour Angle in radians
+* DEC d declination in radians
+* PHI d observatory latitude in radians
+*
+* The result is in the range 0 to pi.
+*
+* Notes:
+*
+* 1) The latitude must be geodetic. In critical applications,
+* corrections for polar motion should be applied.
+*
+* 2) In some applications it will be important to specify the
+* correct type of hour angle and declination in order to
+* produce the required type of zenith distance. In particular,
+* it may be important to distinguish between the zenith distance
+* as affected by refraction, which would require the "observed"
+* HA,Dec, and the zenith distance in vacuo, which would require
+* the "topocentric" HA,Dec. If the effects of diurnal aberration
+* can be neglected, the "apparent" HA,Dec may be used instead of
+* the topocentric HA,Dec.
+*
+* 3) No range checking of arguments is done.
+*
+* 4) In applications which involve many zenith distance calculations,
+* rather than calling the present routine it will be more efficient
+* to use inline code, having previously computed fixed terms such
+* as sine and cosine of latitude, and perhaps sine and cosine of
+* declination.
+*
+* P.T.Wallace Starlink 3 April 1994
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION HA,DEC,PHI
+
+ DOUBLE PRECISION SH,CH,SD,CD,SP,CP,X,Y,Z
+
+
+ SH=SIN(HA)
+ CH=COS(HA)
+ SD=SIN(DEC)
+ CD=COS(DEC)
+ SP=SIN(PHI)
+ CP=COS(PHI)
+ X=CH*CD*SP-SD*CP
+ Y=SH*CD
+ Z=CH*CD*CP+SD*SP
+ sla_ZD=ATAN2(SQRT(X*X+Y*Y),Z)
+
+ END