Comments (8)
Matt - that is correct... when we put in the CPHD bindings, at the time we only needed reading support. Do you have a current need for writing support? If so, let me know the urgency and timeframe and we'll try to prioritize it appropriately on our end.
from six-library.
Hi,
I was wanting to write a simple simulator to test the processing chain of our new LF SAR system. So it would be really good if it could be done in the next 6 weeks or so.
Thanks,
Matt
from six-library.
Thanks for the timeframe Matt. We'll see what we can do and will keep you posted...
from six-library.
@darkstar007 - see @JonathanMeans's updates in #153. This has been merged into master... let us know if it meets your needs.
from six-library.
OK, cool. I'll pull and check over the weekend.
from six-library.
Hi.
I've spent some time on this in the last week or so, and have to say its been a hugely frustrating experience. This is mainly due to the lowlevel nature of the API, the lack of documentation and the poor error reporting.
I've yet to actually write out a CPHD file. My current issue is:
Traceback (most recent call last):
File "./sim.py", line 255, in <module>
writer.writeCPHD(sys.argv[1], vdata, coda_types.RowColSizeT(vdata.shape[0], vdata.shape[1]), vbm.toBuffer(0))
File "/usr/local/lib/python2.7/dist-packages/pysix/cphd.py", line 2047, in write
self.write(pathname)
File "/usr/local/lib/python2.7/dist-packages/pysix/cphd.py", line 2009, in write
return _cphd.CPHDWriter_write(self, *args)
RuntimeError: Attempted use of uninitialized double value
Which suggests I'm missing a variable in a metadata class, but no hints as to which one. So I now need to go through the spec and see what I've missed off.
Can I suggest changing the CPHDWriter.writeCPHD function to be something along the lines of:
def write(self, pathname, vph_data, vbm, channel):
"""
Function to write out video phase history data to a given filename.
pathname - the filename (a string) to write the data to
vph_data - a 2D numpy array (numpy.complex64 type) of size [npulse, nsamps]
vbm - a pysix.cphd.VBM() like object that describes this data
channel - the channel number this VPH data is associated with
Nothing is returned by this function.
The following exceptions are raised:
???
"""
vphPointer, _ = vph_data.__array_interface__['data']
vbm_raw = vbm.toBuffer(channel)
vbmPointer, _ = vbm_raw.__array_interface__['data']
if data.dtype != numpy.dtype('complex64'):
raise TypeError('Python CPHDWriter only supports complex float data')
# Should we now check that the VPH data we have supplied is the same size that
# we said it was going to be when we created the CPHDWriter? Similarly for
# vbm - does it match the metadata and vph_data?
self.addImageImpl(vphPointer,
coda_types.RowColSizeT(vph_data.shape[0], vph_data.shape[1]),
vbmPointer)
self.write(pathname)
Obviously I don't know if that's correct, as I've not managed to write a file out yet!
(Also, why does the API talk about addImage - the data isn't an image).
Thanks,
Matt
from six-library.
@darkstar007 With #160, you should better be able to tell which fields the writer is complaining about.
from six-library.
Yep, the error message is much more helpful now. Thanks.
from six-library.
Related Issues (20)
- Expose nitf::BandInfo to python
- CSM3.0.3 version is out of date HOT 2
- Build fails if tests are disabled
- Numpyutils-c++ unit test fails build on Centos 7
- Slow performance reading and writing AMP8I_PHS8I HOT 7
- Embedding xsd schemas HOT 1
- Compilation Error six-library 3.1.2
- CSM project not included in CMake build system
- Enums.cpp does not compile under C++11 HOT 2
- Incorrect partial derivatives from ProjectionModel::slantToImagePartials
- build with shared libs broken
- Unable to configure build on Windows
- The configuration failed (complete log in C:\source-engine-master\build\config.log)
- SIDD 2.0.0 reading fails if no LUT present HOT 1
- Broken Sample SICD Links
- Issue with trying to build six 3.2.4, "numpyutils/AutoPtr.h" not found HOT 1
- CPHD Reader for build HOT 1
- python cphd module has broken SWIG bindings
- Where can one acquire sample CPHD?
- Building, installing and linking with six-library
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 six-library.