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

Sensor list saving in seperate util function #4

Open
aviadlevis opened this issue Jun 8, 2021 · 2 comments
Open

Sensor list saving in seperate util function #4

aviadlevis opened this issue Jun 8, 2021 · 2 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@aviadlevis
Copy link
Contributor

https://github.com/CloudTomography/pyshdom/blob/6215c180ad2e55ed3193511cdf02b53c73e6d398/pyshdom/util.py#L615

Enhancement:
Currently when working on real data it would be useful to have a function just to save the sensor list without needing to create the solver list.

Bug:
I don't follow the logic here - there is an if/else condition with the identical consequences.

@aviadlevis aviadlevis added bug Something isn't working enhancement New feature or request labels Jun 8, 2021
@JRLoveridge
Copy link
Member

Re: Bug
Ah, previously I was opening the file when saving the first sensor so the 'write' ('w') flag was used in the call .to_netcdf() rather than the append flag ('a'). Since I'm no longer doing that the if/else condition can be removed.

Re: Enhancement
We could just make sensors / solvers keyword arguments defaulted to None and just not use them if they are None?

@aviadlevis
Copy link
Contributor Author

I think its cleaner to have two separate methods: save_sensors, save_solvers.
The save_forward_model will call both sequentially but you could call each separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants