Open msthomps opened 9 months ago
Hi Mercedes,
All the plot limits are calculated in this function, lines 49-51: https://github.com/v-morello/clfd/blob/cf3dd7f058eca038672cea62fc77a397d05feeff/clfd/report_plots.py#L49
med[name]
and iqr[name]
refer to the median and inter-quartile range of one of the data features (e.g. peak-to-peak, stddev, etc.), and some of these must be Inf or Nan. In turn, it means the input data in your folded cube contain some Infs or Nans, and I would be almost positive it's NaNs, because the numpy functions used to compute the median and the inter-quartile range of an array of values are fairly robust to Inf values. Here's an illustration:
In [3]: percentile([1,2,3,4,5, nan], 50)
Out[3]: nan
In [7]: percentile([-inf, 1,2,3,4,5, +inf], 50)
Out[7]: 3.0
I think the most practical option at this stage is that you find out whether you have NaNs in your input data. One way (up to you) would be to install clfd
in editable mode in its own python environment (how to do this described in the README), and strategically insert some debug print statements to try an confirm whether indeed you've got NaNs in the original input data. If so, I would argue that this is the actual problem. If not, then there's a more subtle issue within clfd
and we can try to fix that.
Hi @msthomps, have you been able to check your input data and/or make some progress on this ?
Hello,
I am working with CHIME timing data and running clfd. I want to produce the two diagnostic plots shown in your readme e.g. corner plot and profile mask. However, I run into the error in Code Block 1 below. It doesn't occur for all my files but when it does, from what I can tell, clfd does successfully run on the file, and looking at the .h5 report the */block#_values seem to have a span of data (see code block 2). I'm not sure where it's looking to find an inf/nan value producing my error and not allowing the plots to be generated. Apologies, if this is a misunderstanding on my end, but I've exhausted options and can't seem to find what's causing the error. Any clarification would be appreciated.
The contents of the *.h5 report saved from the clfd output