GithubHelp home page GithubHelp logo

twiss with coupled latice about ocelot HOT 5 CLOSED

iagapov avatar iagapov commented on July 25, 2024
twiss with coupled latice

from ocelot.

Comments (5)

sergey-tomin avatar sergey-tomin commented on July 25, 2024

this is warning and it works on my laptop. anyway here must be checking to avoid divided by zero.
figure_1

from ocelot.

iagapov avatar iagapov commented on July 25, 2024

divide by zero is not a 'warning'. The code works incorrectly, so this needs to be fixed.

from ocelot.

sergey-tomin avatar sergey-tomin commented on July 25, 2024

divided by zero is error which crushs the code. Here is not this case see below

print M[2, 3]/M[2, 2]_m.beta_y - M[2, 3]_m.alpha_y, arctan(M[2, 3]/(M[2, 2]_m.beta_y - M[2, 3]_m.alpha_y))

5.45502412182 0.00111206462467
6.07237322199 0.00123637344116
/home/sergey/Dropbox/DESY/repository/ocelot/cpbd/optics.py:170: RuntimeWarning: divide by zero encountered in double_scalars
d_mux = arctan(M[0, 1]/(M[0, 0]_m.beta_x - M[0, 1]_m.alpha_x))
6.69011365804 0.00136045838756
7.30828567367 0.00148433007011

from ocelot.

iagapov avatar iagapov commented on July 25, 2024

stranhe. Why does devide by zero not cause code to crash. Anyway it has nothing to do with coupliong

from ocelot.

sergey-tomin avatar sergey-tomin commented on July 25, 2024

done

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.