No, I didn't, but...

>>>>> steve  writes:

 > I have been reading through all the list archives to see if anyone has
 > travelled this road, before I embark on "reinventing the wheel".

 > I have data from cosmological simulations I have done with a public code
 > version of "GADGET".

 > This program produces output in snapshot files in a binary format, with
 > particle positional, velocity and mass data, plus more info.

This sounds like a field with position-dependent data and no
connections in dx speak. You can have all the data you want with your
positions. What is easiest depends on the way the data is stored in
your snapshot:

 * either employ separate arrays (one array of the same shape as the
   positions array per datum, use the Mark module to select one for
   further operations) or

 * a single array of data vectors (one "data" array of the same shape
   as the positions array, use the Compute module to select a datum
   (component of the vector) for further operations).

The data model of dx is very flexible and powerful. It's easiest to
just use the same data layout as in your binary file.

 [...]

 > Has anyone created a filter or module for gadget data import ?
 > Help greatly appreciated if available.

 > If not, I guess I will have to start trying to code own import....

Writing a module is quite a bit of work. Maybe it would be easier to
write a little tool to generate a native dx file describing what is in
your binary file and just Import that. Dx files can reference your
binary file for the actual data, so there's no need to copy or
re-arrange them.

I have no clue of GADGET, but I used this approach for an atmospheric
model writing binary data.

Hope this helps
-Frank Schimmel

Reply via email to