Coder Social home page Coder Social logo

cpymad in win7 about cpymad HOT 3 CLOSED

Landau1908 avatar Landau1908 commented on July 29, 2024
cpymad in win7

from cpymad.

Comments (3)

coldfix avatar coldfix commented on July 29, 2024

I'm now back into win7 and get rid of scientific linux because it cracked again.

I didn't try scientific linux so far, but I had no problems on other distributions (ubuntu, mint, debian, arch). I think, I'd recommend mint for beginners.

I have succeeded installing cpymad on my thinkpad with 64bits win7. The process is very successful and no problem has been happened.

Great.

First, I can't modify the assignment to command_log. I want to store command history to my desired place.
`madx=Madx(command_log='E:\cython_madx\test\log.madx')

The backslash \ is an escape character inside strings, e.g. '\t' stands for <Tab> and '\\' stands for a literal backslash. The error message ([...] or filename: 'E:\\cython_madx\test\\log.madx', you can see that only the first and last backslash got recognized as path separators. If you don't want to use double '\\' inside your strings, prefix the first quote by an 'r'. E.g.:

madx = Madx(command_log=r'E:\cython_madx\test\log.madx')

Second, I can't find any MadX file in my disk. I remeber, that there exist amount of MadX examples in linux. What happened to this?

Are you talking about the models which were previously distributed inside cpymad or about log files? As for the models: I cut them out, their license is difficult, I don't want to maintain them, I'm not affiliated with CERN ;). And, as they are data files, they do not belong in a code repository.

Third, could you give me a complete example to begin cpymad?

You can ask me any specific question. The example in the README is examplatory for most of what cpymad can be used for.

Did you read python tutorials and MAD-X manual so far? Without knowledge about MAD-X and python, cpymad will not be useful. cpymad is a python-binding of MAD-X, i.e. it makes the MAD-X library accessible from python. If you don't plan to program in python or make use of data-analysis via scipy/numpy/matplotlib, it doesn't really make sense to use cpymad instead of plain MAD-X.

from cpymad.

Landau1908 avatar Landau1908 commented on July 29, 2024

Are you talking about the models which were previously distributed inside cpymad or about log files? As for the models: I cut them out, their license is difficult, I don't want to maintain them, I'm not affiliated >with CERN ;). And, as they are data files, they do not belong in a code repository.

I mean, .madx file can't be found in my disk anyway. For linux, many examples such as .madx file can be found in some folder. I think this is due to installing libmadx in linux but not for windows, right?

Did you read python tutorials and MAD-X manual so far? Without knowledge about MAD-X and python, cpymad will not be useful. cpymad is a python-binding of MAD-X, i.e. it makes the MAD-X library accessible from python. If you don't plan to program in python or make use of data-analysis via >scipy/numpy/matplotlib, it doesn't really make sense to use cpymad instead of plain MAD-X.

Yes, I have read python tutorials and programmed few pieces of codes via function_based program and object- oriented program is the next plan.
I am reading MAD-X manual and have even not used it.
My goal is to call madx via python and Visualise scientific data.

Currently, I want to make a match for optimizing beam spot at a fixed position by adjusting only few magnets.

from cpymad.

coldfix avatar coldfix commented on July 29, 2024

Hey, I hope you are fine with the solution I gave you and hence closing this for now as I don't see an open question. Reopen if needed.

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.