Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reordering of monthly nightlights data required #43

Open
meghapatnaik opened this issue Sep 26, 2023 · 3 comments
Open

Reordering of monthly nightlights data required #43

meghapatnaik opened this issue Sep 26, 2023 · 3 comments

Comments

@meghapatnaik
Copy link

meghapatnaik commented Sep 26, 2023

To construct a radiance datacube, we may wish to use readdir() on a folder containing a series of consecutive monthly files. If readdir() produces chronologically ordered files, this will construct the correctly sequenced datacube. However, it is better to replace readdir() with readdir_nl(), which can extract the timestamp from the filename directly. Since night light files from EOG are sequenced as "sensor_satellitename_timestamp_ ...", in any instance a different satellite source is used for a monthly image, there will be no disruption in chronological ordering. Function that can be used to extract the date:

get_date_from_filename(filename) = Date(parse(Int, match(r"\d{8}", filename).match))

A similar solution has been proposed in pull request #41

@ayushpatnaikgit
Copy link
Member

ayushpatnaikgit commented Sep 26, 2023

Can you point to the lines that need to be changed? GitHub allows you to hyperlink a line, for example:

using Makie

@meghapatnaik
Copy link
Author

meghapatnaik commented Sep 26, 2023

I cannot seem to hyperlink lines from pull requests that have not been approved (can you do the above for any line of read_nl.jl?).

I suggest we approve pull request #41 in entirety. lines 1-7 and line 20 in read_nl.jl and the corresponding change suggested in line 41 Karmana.jl to include read_nl.jl will solve the issue described.

@ayushpatnaikgit
Copy link
Member

rad_files, sorted_dates = sort_files_by_date(rad_path, start_date, end_date)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants