seafloor-geodesy / gnatss

Community Seafloor Global Navigation Satellite Systems - Acoustic (GNSS-A) Transponder Surveying Software
https://gnatss.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
10 stars 14 forks source link

Ticks for plots need to be hourly #185

Closed lsetiawan closed 10 months ago

lsetiawan commented 11 months ago

Overview

Currently the ticks are very precise, let's make this hourly so that it's easier for user to see. No more that 15 number of ticks!

lsetiawan commented 11 months ago

Proposed Solution

The function _compute_tick_labels currently determine the tick marks for the qc plot pointed out in https://github.com/uw-ssec/offshore-geodesy/issues/175#issuecomment-1777992065

https://github.com/uw-ssec/offshore-geodesy/blob/d0f2bd01e387c287aa2b78eaaab007a82337a013/src/gnatss/ops/qc.py#L47-L75

Currently this implementation get's the minimum and maximum of the data timestamp, then the step for each tick is determined by dividing the difference by n_ticks. This makes the ticks too fine grained!

This issue propose a change to have the tick steps by hourly if the difference b/w min and max is more than 1 hour, or be minutes if the difference is less than an hour with n_ticks no more than the specified n_ticks.