Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

format of binary data for writerayfile #15

Open
tamirlance opened this issue Nov 8, 2018 · 1 comment
Open

format of binary data for writerayfile #15

tamirlance opened this issue Nov 8, 2018 · 1 comment

Comments

@tamirlance
Copy link

Hi,
Is there any documentation for how to read the binary file created from writerayfile()? What is the encoding method?
Thanks,
Tamir

@solarjoe
Copy link

solarjoe commented Dec 14, 2018

I figured that out a while ago for SolTrace 2012.7.9 using wxHexEditor :

  • all entries double values (8 bytes = 64 bit)
  • the first four entries are the size of the bounding box (see interface "over box of dimensions" in Intersections after raytracing. The order is [x_min, x_max, y_min, y_max]
  • the next entry is "sun ray count", this is the number of rays that were started from the sun. It is used to calculate the power per ray

The doc states:

The first input box is the number of rays to be traced. Recall from previous discussions that this many rays will actually interact with elements of Stage 1. The code continues to generate rays until the number of requested rays have fallen on elements of Stage 1. The code tallies the total number of rays generated within the rectangle, both those that fell on an element and those that did not, divides this number into the area of the rectangle and multiplies the result by the Direct Normal Insolation value (described in the Visualization section). This results in a unit power/ray value subsequently used to calculate power and flux values.

  • the next number is the number of entries (rows) in the ray table.
  • then data (9 * number of entries) float64 values
  • a single row consists of 9 values, order is [X,Y,Z,CosX,CosY,CosZ,Stage,Element,RayNum]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants