Closed jessecusack closed 1 year ago
@mousebrains, I have been working off this branch to try and process the MR data locally. I just made a commit changing the flag "omitmissing" to "omitnan" in various min/median functions. The "omitmissing" flag requires matlab 2023a, which I do not have. I think that we should be careful to be inclusive of older matlab versions where possible, so long as it doesn't introduce dramatic changes. I assume that we will not encounter any missing values that are not just NaN?
For non-sparse double arrays, omitnan and omitmissing are equivalent. I've run across issues when using sparse arrays and omitnan. omitmissing solved my sparse array issues. I've switched to omitmissing since it "always" works, while omitnan mostly works.
We'll also have to pay attention to means of times. I may have simplified the code by using omitmissing instead testing the data type and using omitnan or omitnat.
I just submitted a commit reworking the CF attributes, addressing #8.
On you point about averaging over time I think that we should add a check to ensure there are no NaT values and drop any that exist. Why would they occur, is it possible?
Also, this code works fine for me:
>> mean([datetime("2023-01-01") NaT], "omitnan")
ans =
datetime
01-Jan-2023
So maybe this isn't a problem?
Collapse the branch so I can start the refactorization effort.
I am starting the pull request so that we can review this code update.