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

[New Feature]: default arguments for load_bursts #74

Open
scottstanie opened this issue Oct 11, 2022 · 0 comments
Open

[New Feature]: default arguments for load_bursts #74

scottstanie opened this issue Oct 11, 2022 · 0 comments
Labels
enhancement New feature or request needs triage Issue requires triage to proceed

Comments

@scottstanie
Copy link
Contributor

Checked for duplicates

Yes - I've already checked

Alternatives considered

Yes - and alternatives don't suffice

Related problems

I've been playing around with changing the defaults and acceptable parameters of load_bursts. I wanted to check if others found this useful or not before I decided to open a PR or scrap it.

https://github.com/opera-adt/s1-reader/compare/main...scottstanie:load-burst-defaults?expand=1

Describe the feature request

I wanted to be able to get all the burst metadata with as few lines as possible. Right now that looks like

In [1]: import s1reader
In [2]: zip_path = "data/S1A_IW_SLC__1SDV_20220226T124745_20220226T124812_042084_050378_F69A.zip"
In [3]: orbit_dir = "orbits"
In [4]: s1reader.load_bursts(zip_path, orbit_dir)

[[Sentinel1BurstSlc(burst_id=t012_24518_iw1),
  Sentinel1BurstSlc(burst_id=t012_24519_iw1),
  Sentinel1BurstSlc(burst_id=t012_24520_iw1),
  Sentinel1BurstSlc(burst_id=t012_24521_iw1),
  Sentinel1BurstSlc(burst_id=t012_24522_iw1),
  Sentinel1BurstSlc(burst_id=t012_24523_iw1),
  Sentinel1BurstSlc(burst_id=t012_24524_iw1),
  Sentinel1BurstSlc(burst_id=t012_24525_iw1),
  Sentinel1BurstSlc(burst_id=t012_24526_iw1)],
 [Sentinel1BurstSlc(burst_id=t012_24518_iw2),
  Sentinel1BurstSlc(burst_id=t012_24519_iw2),
  Sentinel1BurstSlc(burst_id=t012_24520_iw2),
  Sentinel1BurstSlc(burst_id=t012_24521_iw2),
  Sentinel1BurstSlc(burst_id=t012_24522_iw2),
  Sentinel1BurstSlc(burst_id=t012_24523_iw2),
  Sentinel1BurstSlc(burst_id=t012_24524_iw2),
  Sentinel1BurstSlc(burst_id=t012_24525_iw2),
  Sentinel1BurstSlc(burst_id=t012_24526_iw2)],
 [Sentinel1BurstSlc(burst_id=t012_24519_iw3),
  Sentinel1BurstSlc(burst_id=t012_24520_iw3),
  Sentinel1BurstSlc(burst_id=t012_24521_iw3),
  Sentinel1BurstSlc(burst_id=t012_24522_iw3),
  Sentinel1BurstSlc(burst_id=t012_24523_iw3),
  Sentinel1BurstSlc(burst_id=t012_24524_iw3),
  Sentinel1BurstSlc(burst_id=t012_24525_iw3),
  Sentinel1BurstSlc(burst_id=t012_24526_iw3),
  Sentinel1BurstSlc(burst_id=t012_24527_iw3)]]

The differences are

  1. The default is to load all subswaths instead of requiring the user to pass one. When you ask for multiple, you get a list of lists.
  2. add the ability to just pass the directory holding orbits instead of needing to get the full orbit path in advance (this just takes the example call of get_orbit_file_from_dir and moves it into load_bursts)
  • relatedly, auto_download=True seems like a nice default to me

I believe this wouldn't break anyone's calls to how their currently using load_bursts, but would just expand what you're allowed to pass in.
If this seems useful to orders, i'll make a PR; otherwise I can close this

@scottstanie scottstanie added enhancement New feature or request needs triage Issue requires triage to proceed labels Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs triage Issue requires triage to proceed
Projects
None yet
Development

No branches or pull requests

1 participant