-
Notifications
You must be signed in to change notification settings - Fork 5
A nearly complete rewrite of both scripts #3
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
base: master
Are you sure you want to change the base?
Conversation
Replaced all values written in the plot settings with variables. Defined all variables in a settings-section at the beginning of the code. Makes the script easier customizable.
The data has now to be put in by an external file, like in chi2fitXYErr. This included also the way how the name of the output is specified. There is still the old code included but as comment. The way how to reactivate the old input is documented in the code.
Changed the heart of that script: The fit calculation. This way of calculation was given by Dr. Thomas Erben and is also tested by myself. It works the same way, just a bit more efficient.
Replaced all settings in the plot section with variables, defined those at the top of the script. makes the script simpler to use and more customizable
The 'original' version of the script I used with contained engish comments, I added those back in
Moved the check for a given filename down to the end of the script. Added an error message when no filename was given.
The file contains a rough explanation about formatting the data. There are totally made up values that generate a linear grpah when fitted. This is meant as an example and for short testing if the commands.
Wrote a readme that should help everybody to install and use python correctly on his/her system. I also included some common misstakes and advices for istallation and usage.
…ce a parameter for changable rounding precession
… also changed some more string formatting
… rounding parameters
…ce a parameter for changable rounding precession
… also changed some more string formatting
… rounding parameters
@nonchris Leider gibt es hier seit zwei Jahren eine nicht zielführende Endlosdiskussion, welche Software in Zukunft im Praktikum verwendet werden soll - so zumindest mein Eindruck. DIe kurze Antwort auf Deine Frage: Den PR hat momentan wohl niemand im Blick. Liebe Grüße Thomas |
Hi @terben, danke für die schnelle Antwort! VG Chris |
Hi zusammen, mein letzter Stand zu dem PR war (aus einer Mail an die beteiligte Runde), dass sich @terben darum kümmern wollte. Ich sehe es generell auch so, dass eine Code-Verbesserung orthogonal zu der Entscheidung steht, wie man mit der Software weiter verfährt. Mir ist unklar, ob die Zieldiskussion hierhin gehört — ich kann nur dazu sagen, dass ich im FP keinerlei Grundkenntnisse mehr voraussetze und bei den Studenten vor meinem Versuch mit einer EDV-Grundeinführung (wie man auf dem eigenen PC auswertet) beginne, damit die Auswertung funktioniert. VG, Oliver |
I rewrote / modified big chunks of the code to make the usage easier and the data input more consistent between both scripts.
Both scripts now take a file with data as input and all relevant variables are moved to a top section to make a change of settings easier for beginners.
There are also some updates / simplifications in the way strings are formatted by using later formatting methods.
I also added a new
requirements.txt
file and a readme, explaining how to use the scripts and how to install python and the needed libraries.There is also a short test file
values.txt
to show how the input file should look and offer a way to try the scripts without writing your own data first.