malonzo47 / pynita_GUI

pynita_GUI is python GUI based implementation of Noise Insensitive Trajectory Algorithm (NITA)
4 stars 3 forks source link

back convert distDate image values to better date values #75

Closed malonzo47 closed 4 years ago

malonzo47 commented 4 years ago

Currently the pixel values in the distDate (disturbance date) image output are in the format of 'yyyyddd' which might be fine but the ddd part is from 0-999. This is like it is to accommodate easier math and plotting (a legacy decision that may not have been great).

I would like the final pixel values to be back-converted to a better date format that is amenable to analysis after download by user. Perhaps this is just ddd between 1 and 366 but i'm open to alternative storage formats.

I believe this change would be made in metric_funs.py around line 249 def MI_distDate(metrics_dics, option='middle'):

This back-conversion is already happening for distDuration in same file (line 256).

FreelanceDev217 commented 4 years ago

Not clear in which step this issue is for.

malonzo47 commented 4 years ago

Step 4 when plotting disturbance date. I think the pixel value in that image should be yyyyddd but ddd should be between 001 and 366 (instead of 001-999). See code lines referenced above for how we've previously done the back-conversion.

FreelanceDev217 commented 4 years ago

The follows are what I see when plotting disturbance date and disturbance duration. Frankly, I don't know the exact meanings of these plots but from the source code part you mentioned the second plot seems to show duration in days while the first one shows specific dates (like 2014156). Please let me know your thoughts. screenshot_12

FreelanceDev217 commented 4 years ago

Please check the latest revision.

malonzo47 commented 4 years ago

Still a little weird. How are we getting that top value (201691)? If "91" is the day part it always needs to be ddd (091). Every number needs to be either just yyyy or all of yyyyddd.

image

FreelanceDev217 commented 4 years ago

Fixed. Please check again.