Closed Yong2Sheng closed 8 months ago
Hi Yong, Can you be a bit more specific? What are you running and what is the error?
Hi Chris, here is the error I got (see the attachment)
I thinks it might be caused by the lines at the start of the tra file.
Ok, thanks. It looks like I just need to account for the possibility of empty lines. I'm about to make a PR with a number of updates to the DataIO. I'll make sure this is fixed.
Thanks Chris!
I have one more question here: are tmin and tmax necessary parameters in inputs.yaml
?
For example, I simulated a random GRB for 2s without orientation. I just need to extract and convert the whole dataset to a .h5 file. But in this case I don't know the tmin and tmax unless I load and check the tra file mimrec, which requires extra steps using MEGAlib.
Ok I think I fixed it. For now, can you try the following in your branch to see if it works for you:
line 143 in https://github.com/cositools/cosipy/blob/main/cosipy/data_io/UnBinnedData.py
add the following:
if len(this_line) == 0: continue
make sure continue is properly indented.
For now you need to specify all the parameters in the inputs.yaml file. If you don't use them then just put in arbitrary values. This is another thing I need to fix, and I'll be doing it soon. The parameters tmin and tmax are actually only used if you're making a time cut.
Thanks! The reading issue caused by the empty line is fixed now!
Great. It will be included in the next dataIO PR. I will keep this issue open until then.
The simulated tra file is attached.
The issue comes from the tra file with extra headers:
GRB100100010_3.inc1.id1.tra.gz