SeismicData / pyasdf

Python Interface to ASDF based on ObsPy
http://seismicdata.github.io/pyasdf/
BSD 3-Clause "New" or "Revised" License
53 stars 30 forks source link

Add I/O for masked Traces #49

Open malcolmw opened 6 years ago

malcolmw commented 6 years ago

This pull request is for a branch that I use to work with masked Traces. Masked values are filled with a fill value automatically determined based on the data array's dtype at write-time, which is stored in the Dataset's attributes and later used to reconstruct the mask at read-time.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.1%) to 89.162% when pulling c6db4d23f098fc6324d0d4fc675508525c989721 on malcolmw:dev/masked_trace_IO into fb88b353414ba05d00b0b73784a30361cc40fc8f on SeismicData:master.

krischer commented 5 years ago

Hi @malcolmw

Is there still an interest in following up this?

malcolmw commented 5 years ago

Hi, @krischer,

This is not a priority for me anymore, so feel free to close this PR if it isn't a significant value-adding feature for pyASDF. However, if you think it is a useful feature you would like to merge to facilitate work with long segments of potentially-gappy continuous data, I am happy to help out.

krischer commented 5 years ago

I do actually think that this would be a very nice addition to the data format. As pointed out in a comment above I'd prefer the data model of actually carrying along a second mask data set (could be name the same as the actual dataset, just prefixed with __MASK__ or so).

This would mirror to a certain extend how numpy's masked arrays work and it could also be properly integrated into the format. I could take care of adding it to the format definition and the validator if there is still interest in implementing this.

malcolmw commented 5 years ago

Sounds good. I'm happy to implement, though it will be a while before I get to this.