Coder Social home page Coder Social logo

mwax_db2fits's Introduction

mwax-db2fits

MWA Correlator (mwax): PSRDADA ringbuffer to FITS file converter

Dependencies

CFITSIO

psrdada prerequisites

  • pkg-config
  • libhwloc-dev (this is to enable the use of NUMA awareness in psrdada)
  • csh
  • autoconf
  • libtool

Building Release version

./build.sh

Running / Command line Arguments

Example from mwax_db2fits --help

mwax_db2fits v0.10.3

Usage: mwax_db2fits [OPTION]...

This code will open the dada ringbuffer containing raw
visibility data from the MWAX Correlator.
It will then write out a fits file to be picked up by the
archiver process.

  -k --key=KEY                      Hexadecimal shared memory key
  -d --destination-path=PATH        Destination path for gpubox files
  -n --health-netiface=INTERFACE    Health UDP network interface to send with
  -i --health-ip=IP                 Health UDP Multicast destination ip address
  -p --health-port=PORT             Health UDP Multicast destination port
  -l --file-size-limit=BYTES        FITS file size limit before splitting into a new file. Default=10737418240 bytes. 0=no splitting
  -v --version                      Display version number
  -? --help                         This help text

Testing an Debugging

Build the Debug Binary

./build_debug.sh

Run all tests

./run_tests.sh

Health Packet format

Every 1 second, a UDP health packet is sent to the health_ip and health_port via the health-netiface interface.

The payload is a packed C struct with the following format:

Type Name Example Notes
int16 version_major 1 mwax_db2fits major version number
int16 version_minor 2 mwax_db2fits minor version number
int16 version_revision 3 mwax_db2fits revision number
char[64] hostname mwax01 hostanme of the server
time_t start_time 1683779031 UNIX Time when program was started
time_t health_time 1683780123 UNIX Time when health packet was assembled
float64 up_time 1092 Number of seconds alive
int16 status 1 0 = Offline, 1= Running, 2= shutting down
int32 obs_id 1234567890 obs_id GPS time or 0 if no current observation
int32 subobs_id 1234567890 sub_obs_id GPS time or 0 if no current observation
float32[256] weights_per_tile_x 1.0,0.9,0.92,1.0... Each element is tile 0..255 X pol weight. If ntiles is <256, unused tiles will have NaN. If no weights can be reported then the array will have 256 NaN elements. Tile order is MWAX order.
float32[256] weights_per_tile_y 1.0,0.9,0.92,1.0... Each element is tile 0..255 Y pol weight. If ntiles is <256, unused tiles will have NaN. If no weights can be reported then the array will have 256 NaN elements. Tile order is MWAX oder.

mwax_db2fits's People

Contributors

gsleap avatar

Stargazers

Liam Ryan avatar Xu, Zhijun avatar  avatar  avatar

Watchers

 avatar Sam McSweeney avatar Xu, Zhijun avatar

mwax_db2fits's Issues

Detect low disk space

Instead of leaving a partial fits file, do not write a file unless there is enough disk space available

Handle interrupted observations better

For each new 8 sec sub obs, compare the PSRDADA header durtation with the metafits duration. If a trigger has interrupted this obs, then the metafits will have either

  1. a different (shorter) duration. Use that instead of the PSRDADA header and thus, finish and close off the current FITS file so we can start the new one.
    OR
  2. it will be a totally different obsid than what I was expecting (and subobsid will == obsid) in which case, just close off the FITS file I currently had and start this new FITS file.

mwax auto correlation stats filenames

Generate 1 file per sub obs as currently do, but the filename should be based on the last 2 digits of the gps second, and just continuously overwrite.

Shape of data should be based on ninputs, not ninputs_xgpu

The correlator works in 16 rfinput chunks, so if we have a 129 tile observation, there will be 258 rfinputs. xgpu will produce data out of the correlator of shape 288 rfinputs (with the extra ones just padded with 0s). The correlator, however already trims these extraneous rfinputs, so mwax_db2fits only needs to care about the ninputs value not the ninputs_xgpu value.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.