GithubHelp home page GithubHelp logo

Issue regarding the reading of Output files when the rmax0 is set for a GENESIS simulation (wrong size of the grid) about ocelot HOT 1 CLOSED

Hector-Mauricio-Castaneda-Cortes avatar Hector-Mauricio-Castaneda-Cortes commented on August 29, 2024
Issue regarding the reading of Output files when the rmax0 is set for a GENESIS simulation (wrong size of the grid)

from ocelot.

Comments (1)

sserkez avatar sserkez commented on August 29, 2024

Dear Hector,

Thank you very much for helping us to make ocelot great! (again) =)
At the moment the development of the Ocelot adaptor is focused in iagapov/ocelot/dev_gen branch.
The code discussed looks like this:

    if out('dgrid') == 0:
        rbeam = sqrt(out('rxbeam')**2 + out('rybeam')**2)
        ray = sqrt(out('zrayl') * out('xlamds') / np.pi * (1 + (out('zwaist') / out('zrayl')))**2)
        out.leng = out('rmax0') * (rbeam + ray)
    else:
        out.leng = 2 * out('dgrid')
    out.ncar = int(out('ncar'))  # number of mesh points
    
    #universal solution?
    out.leng=out('meshsize')*(out.ncar-1)

We have also found this bug only recently (I always use dgrid!=0) and decided to go for the most universal solution possible, that is to use the explicit mesh size value, provided in genesis *.out:

flags for output parameter
1 1 1 1 1 0 1 1 1 1 1 0 0 1 0 0 0 0 0
342 entries per record
762 history records
0.1831E-08 wavelength
0.1831E-07 seperation of output slices
101 number of gridpoints
0.1000E-04 meshsize
8192 number of particles
0 particle: records in z
0 particle: records in t

so that out.leng=out('meshsize')*(out.ncar-1)

Thanks again for letting us know, I'll fix the Rayleigh length calculation for the future!

Svitozar

from ocelot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.