# RAW binary files

**URL:** <https://vapor.discourse.group/t/raw-binary-files/287>\
**Category:** Uncategorized\
**Created:** [March 9, 2023, 9:41am UTC](https://vapor.discourse.group/t/raw-binary-files/287 "2023-03-09T09:41:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![arjun0103](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@arjun0103](https://vapor.discourse.group/u/arjun0103)\
**Post date:** [March 9, 2023, 9:41am UTC](https://vapor.discourse.group/t/raw-binary-files/287/1 "2023-03-09T09:41:13Z")

</div>

I have a dataset that I created from python using numpy.save() on a large array with dimensions 1200x1200x400 (It is a contour type of array where the value of the array at each spatial point represents Vortex strength). I stored it as a .npy file, and then I tried using the following commands to visualise it using Vapor:  
vdccreate -dimension 1200x1200x400 -vars3d sw1 swirl.vdc  
raw2vdc -varname sw1 swirl.vdc \path\swirl1.npy

But when I used the Volume renderer, the values of the array are completely wrong as indicated by the opacity and data values in the ‘Appearance’ tab. I think the issue is with the loading of the binary file itself. Any help regarding this would be great.  
I have attached the file in this [google drive link](https://drive.google.com/file/d/1aWxkO4Uy4wENcD8sFnUQEuXF91-j3af0/view?usp=share_link).

---

<div class="post-metadata">

**Author:** ![pearse](https://yyz2.discourse-cdn.com/free1/user_avatar/vapor.discourse.group/pearse/32/177_2.png) [@pearse](https://vapor.discourse.group/u/pearse)\
**Post date:** [March 9, 2023, 5:33pm UTC](https://vapor.discourse.group/t/raw-binary-files/287/2 "2023-03-09T17:33:17Z")

</div>

That’s correct, Vapor is looking for raw binary files with raw2vdc. That means file that only contain a series of floating point values, for example.

Using something like _array.astype(numpy.float32).tofile(filename)_ would achieve this, but the ordering of your array may need to be modified beforehand. Vapor expects XYZ ordering from its raw files (fastest to slowest dimension).

---

<div class="post-metadata">

**Author:** ![arjun0103](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@arjun0103](https://vapor.discourse.group/u/arjun0103)\
**Post date:** [March 9, 2023, 6:36pm UTC](https://vapor.discourse.group/t/raw-binary-files/287/3 "2023-03-09T18:36:27Z")

</div>

That worked correctly, thank you!
