merlin.formats¶
-
merlin.formats.
pyccd
(x, y, locations, dates_fn, specmap, chipmap)[source]¶ Builds inputs for the pyccd algorithm.
Parameters: - x – x projection coordinate of chip
- y – y projection coordinate of chip
- locations – chip shaped 2d array of projection coordinates
- dates_fn (fn) – returns dates that should be included in time series
- specmap (dict) – mapping of keys to specs
- chipmap (dict) – mapping of keys to chips
Returns: A tuple of tuples.
The pyccd format key is
`(chip_x, chip_y, x, y)`
with a dictionary of sorted numpy arrays representing each spectra plus an additional sorted dates array.>>> pyccd_format(*args) (((chip_x, chip_y, x1, y1), {"dates": [], "reds": [], "greens": [], "blues": [], "nirs1": [], "swir1s": [], "swir2s": [], "thermals": [], "qas": []}), ((chip_x, chip_y, x1, y2), {"dates": [], "reds": [], "greens": [], "blues": [], "nirs1": [], "swir1s": [], "swir2s": [], "thermals": [], "qas": []})) ...