Commit 0e1b2ad8 authored by Vesa Oikonen's avatar Vesa Oikonen
Browse files

frame start and end times guessed, when necessary

parent 453555a3
......@@ -459,7 +459,7 @@ int main(int argc, char **argv)
strcpy(sif.c[2].name, "Trues"); // computed, not saved
/* Set basic header information */
sif.format=TAC_FORMAT_SIF;
sif.isframe=1; // SIF always contains frame start and end times
sif.isframe=tac.isframe; // For now, but SIF always contains frame start and end times
sif.tunit=tac.tunit;
sif.cunit=tac.cunit;
tacSetIsotope(&sif, isot);
......@@ -475,6 +475,12 @@ int main(int argc, char **argv)
fprintf(stderr, "Error: %s\n", errorMsg(status.error));
tacFree(&tac); tacFree(&sif); return(6);
}
/* Guess frame start and end times, if not present in data */
if(tacSetX(&sif, &status)!=TPCERROR_OK) {
fprintf(stderr, "Error: %s\n", errorMsg(status.error));
tacFree(&tac); tacFree(&sif); return(6);
}
sif.isframe=1; // SIF always contains frame start and end times
/* Estimate SIF counts */
if(headIndex>=0) {
/* If 'head' region name was given, then copy it to sif */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment