MazamaScience / MazamaSatelliteUtils

Satellite Data Download and Utility Functions
http://mazamascience.github.io/MazamaSatelliteUtils
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Refactor 3: Behavior #79

Closed tabrasel closed 3 years ago

tabrasel commented 3 years ago

During the harmonization refactor, I noticed a few functions could use some minor fixes/improvements that will (or could potentially) change their behavior or how they are used:

FUNCTION REFACTORS:

getDaylightHours

goesaodc_areaPlot

goesaodc_createNativeGrid

goesaodc_createRasterStack

goesaodc_createSpatialPoints

goesaodc_downloaddaytimeAOD

goesaodc_listDaytimeFiles

goesaodc_listFiles

goesaodc_plotSpatialPoints

raster_createLocationTimeseries

raster_createStackAverage

utils_goesaodc.R

GENERAL REFACTORS:

Validation of datetime types

Verbose display

tabrasel commented 3 years ago

Refactors for existing functions are now complete. Their surface level behavior is mostly the same, but now includes a few additional features & niceties like param validation, proper param passing, verbose printing, standardized bboxes, etc.

The main refactor I made that did change behavior though was editing the endtime param in goesaodc_listFiles() to be exclusive. Previously, this function would use a time range specified by: datetime <= x <= endtime. My refactor changes this so the time range is: datetime <= x < endtime, which makes endtime act like a more traditional end boundary. Maybe in the future we could include a ceilingEnd=TRUE/FALSE param like MazamaCoreUtils:timeRange(), but for now that's probably not necessary.