Comments (1)
Hi, thanks for your message. Just to be clear, how old was the previous version that you were using? I refactored almost everything before about Mar 2020, to make it all more robust. I tried to do it in a way that was transparent to "standard" usage, but there are substantial differences.
To directly answer your question - the various components for the sicd object use the descriptor pattern for all the attributes. Descriptors are sort of indirect properties, and they preclude a few things. You definitely can't use the copy module to make a copy (there is a copy() method of the sicd object). It wouldn't surprise me that pickling doesn't work, and that may be the reason why.
I would suggest that you don't use pickle, which is kind of fragile anyways - you can't use it across different Python versions, for instance. I'd suggest serializing to either json (using the to_dict() method of the sicd object) or xml (using the to_xml_bytes() method of the sicd object).
To reconstruct from json, you use the from_dict class method. Reconstructing from xml is a bit more annoying, because of xml junk - see here https://github.com/ngageoint/sarpy/blob/master/sarpy/io/complex/sicd.py#L158. You parse the xml to etree structure using a method, then pass the etree node info to a from_node class method.
There is documentation on readthedocs - see here for the main sicd object.
Using xml is probably generally preferable - it includes the urn/version information and is generally used, whereas the json is a sarpy only serialization of the SICD structure. The SICD standard uses xml particular structures (like xml attributes), so it's not really xml/json agnostic.
I'll verify that pickling doesn't work, although your code fairly clearly shows that it doesn't. After I verify this, I'll insert a warning in the README - about copy not working either. Please let me know if you need anything else. For questions, feel free to email me at [email protected] or [email protected].
from sarpy.
Related Issues (20)
- reading remote SICDs pulls wrong data when row stride > 1 HOT 1
- Attribute Error with populate_nitf_information_into_sicd() HOT 2
- Stale Links HOT 6
- SICD v1.3.0 Mag-Phase NITF HOT 1
- SentinelReader - Encountered an error estimating noise for RNIIRS HOT 4
- CPHD SRP/IAC Verification has incorrect cross product for right-looking scans HOT 2
- Unclosed file object HOT 3
- Consistency checker verbose output is inconsistent with the actual tolerances evaluated HOT 2
- Default AmpTable for AMP8I_PHS8I
- Processing SICD files from G-EGD HOT 2
- register_arrays typo
- Support reading CF8 CPHDs with an AmpSF PVP HOT 1
- Request for support of Sandia's `FARAD SAR DATA COLLECTION` `Complex SAR Data` format HOT 1
- Request for Sarpy to support CPHD from Gotcha Volumetric SAR Data Set Overview: https://www.sdms.afrl.af.mil/index.php?collection=gotcha HOT 1
- silence missing DEM tiles during geolocation HOT 1
- How to apply image formation to CPHD HOT 2
- CMETA Reader Typo
- CMETAA AF_TYPE
- _ric_ecf_mat bug
- For ccd HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sarpy.