Skip to content

Move lalapps/src/hwinjection/ to lalpulsar/bin/HWInjection/

Karl Wette requested to merge ANU-CGA/lalsuite:move-psinject-to-lalpulsar into master

Description

This MR moves the last CW related code in LALApps to LALPulsar; the hardware injection code psinject.

Changelog

  1. Added test script, informed by looking at scripts in the hardware injection SVN repository (linked from the CW InvestigationsPage wiki page). Indeed I copied 3 of the hardware injection pulsar configuration files and the pre-O3 H1 actuation function file for use in the test script. (I assume none of these are considered proprietary data.) Test script compares the standard output of psinject (in text format) to a reference output generated from before any modifications are made to psinject. (Obviously the test script can't test the actual injection of pulsar signals into the detectors, so that will still need to be vetted as usual prior to starting new observing runs.)
  2. Extended test script to check psinject output of Frame files. This was apparently written to support hardware injections at Virgo, and I'm not sure this is currently in production use. Nevertheless I wanted to make sure this feature is preserved.
  3. Modification to psinject: port the Frame file output code from FrameL to the LALFrame wrapper library, so that either FrameL or FrameCPP can be used as backends. Because LALFrame appears to be a more simple interface than FrameL, this code is now somewhat simpler; the code used to be able to write multiple frames to the one file, but now it just writes one frame per file, outputting its entire stored buffer at once. By default this will output 1-second frames at 16384 samples per second. These changes pass the test script. If this feature is ever put back into production this will need re-testing anyway.
  4. Modification to psinject: automatically pass the right --fmin and --Band arguments to lalpulsar_Makefakedata_v4. --fmin should always be zero to get non-heterodyned timeseries, which --Band should be half the sampling rate set by psinject, so it makes sense for psinject to handle those arguments. By default psinject samples at 16384 Hz and passes --fmin=0 --Band=8192 to lalpulsar_Makefakedata_v4, consistent with current production usage.
  5. Modification to psinject: removed an unused variable iarg.
  6. Move lalapps/src/hwinjection/ to lalpulsar/bin/. The hardware injection code is now named lalpulsar_hwinject. It will be always be compiled (in order to run the test script), but will only be installed if LALPulsar is compiled with GDS support (as it's not useful otherwise).
  7. Build the LALPulsar RPM packages with GDS support. This requires the cds-crtools[-deve] RPM packages, which supply the SIStr library used by lalpulsar_hwinject to stream the injections to the GDS arbitrary waveform generator. The local copies of SIStr.[ch] are deleted. This should allow the packaged version of LALPulsar to be used on the hardware injection servers at the sites.
  8. Documentation: I moved the contents of README.s3inject into psinject.c as a Doxygen header, reformatted, and tried to at least remove sections which were clearly outdated, but otherwise made minimal changes. Added a summary of these changes to the internal changelog.

Notes for Users

  1. Code renamed from online_psinject to lalpulsar_hwinject.
  2. No longer need to set --fmin and --Band arguments to lalpulsar_Makefakedata_v4 in in.? input files.
  3. Should be able to use RPM-packaged LALPulsar for hardware injection servers.

API Changes and Justification

Backwards Compatible Changes

  • This change does not modify any class/function/struct/type definitions in a public C header file or any Python class/function definitions
  • This change adds new classes/functions/structs/types to a public C header file or Python module

Backwards Incompatible Changes

  • This change modifies an existing class/function/struct/type definition in a public C header file or Python module
  • This change removes an existing class/function/struct/type from a public C header file or Python module

Review Status

FYI @keith-riles @evan-goetz @david-keitel. This is still a draft as !1904 (merged) needs to be merged first. The diff will also include changes from !1904 (merged) relative to master, so probably no point looking at the detailed changes just yet.

Closes #438 (closed) #500 (closed)

Hopefully my last major CW code reorganisation MR for the foreseeable future 😅

Edited by Karl Wette

Merge request reports

Loading