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.
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.