I have code that processes large amounts of data through the JBT to track backgrounds over time, and when I ended up with an MJD that translated to day of year = 366, the line of code here: doy_ind = np.argwhere( bg.bkg_data[‘calendar’]==doy ).flatten()[0] crashed because the bkg.data['calendar']==366 produced an array of all False values. I had to add in an if statement to my code to catch that specific case and set it to 365 instead to get my code to run to completion. It sounds like the JBT doesn't know about leap years.
I have code that processes large amounts of data through the JBT to track backgrounds over time, and when I ended up with an MJD that translated to day of year = 366, the line of code here: doy_ind = np.argwhere( bg.bkg_data[‘calendar’]==doy ).flatten()[0] crashed because the bkg.data['calendar']==366 produced an array of all False values. I had to add in an if statement to my code to catch that specific case and set it to 365 instead to get my code to run to completion. It sounds like the JBT doesn't know about leap years.