Coder Social home page Coder Social logo

Comments (11)

coldfix avatar coldfix commented on July 29, 2024

OK. Better. There is a small bug in cpymad which causes this particular error message. I have fixed it and uploaded a patch. You can either:

  • check out the new master branch and go through the installation process.
  • specify the sequence name explicitly when matching (which you should probably do anyway), i.e. match('FODO', ...)

There is some additional problem with your code that will happen once you get rid of the current error. I believe you will be able to figure it out on your own (look at the command log file).

from cpymad.

Landau1908 avatar Landau1908 commented on July 29, 2024

Yes, there indeed exists an error with my code. Sorry, I can find the error you mentioned.
Maybe pattern='full' in the command log file?

from cpymad.

coldfix avatar coldfix commented on July 29, 2024

Try to run the command log directly from madx, the same error will occur. Why?

from cpymad.

Landau1908 avatar Landau1908 commented on July 29, 2024

Aha, MUY should be a numeric not a string.OK?

from cpymad.

Landau1908 avatar Landau1908 commented on July 29, 2024

Hi, how to control the precision of match process of a step, i.e. 1e-6?

from cpymad.

Landau1908 avatar Landau1908 commented on July 29, 2024

Sorry, this must a madx error not cpymad.

from cpymad.

coldfix avatar coldfix commented on July 29, 2024

Correct: Numbers are not strings.

About controlling vary step:

I could give you the answer, but I think you will learn much more from trying to figure it out on your own. This is a good opportunity for you to just start reading the cpymad source code. cpymad is not a lot of code and mostly just simple python. And you don't even need to look at everything. Most of the time its sufficient to look at small code sections. In particular, the Madx.match function is quite small and it won't take you much time to see what it can and can't do currently.

You will see, that for small code bases such as cpymad, you will in general be faster reading the corresponding source on your own than asking other persons (and it won't take their time too!). And the best part about it: you will be able to fix what you need fixed or add what you need added on your own.

Also, remember my last post on this matter.

May I ask, how old are you?

from cpymad.

Landau1908 avatar Landau1908 commented on July 29, 2024

27
I am a first year PHD, and worked on accelerator beam diagnostics at Institute of Modern Physics(IMP).

What about you?

from cpymad.

Landau1908 avatar Landau1908 commented on July 29, 2024

In fact, I have read Cpymad source code once, but, never understood it completely.

from cpymad.

coldfix avatar coldfix commented on July 29, 2024

I'm 27 too;), but still doing my master thesis in information theory (did lots of extra courses + working part time thats why I'm a bit late).

Well, its always hard to dive into new things, and trying to understand all of it at once is probably too much. But just keep on trying to understand the gist, and you will probably pick up a thing or two about python on the way too. And being able to modify the source according to your needs will be worth the effort! (cpymad is not a finished software - I'm just adding things when I need them for my work at HIT - and so can you)

from cpymad.

Landau1908 avatar Landau1908 commented on July 29, 2024

Yes, that's all right.
Indeed, to dive into a new thing is a pain way especially into a quite different fields.
Thans a lot for your kind help.
If having problem I will still ask help from you, but with a minimal example.
Best regards!

from cpymad.

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.