Giter Site home page Giter Site logo

nicoeinsidler / pigor Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 12.62 MB

Quick analysis tool for the beam lines at Atominstitut of TU Wien in Vienna, Austria.

Home Page: http://www.pigor.org/

License: MIT License

Python 22.22% CSS 13.11% Jupyter Notebook 64.67%

pigor's Introduction

PIGOR

Pigor is a lightweight analysis tool for the polarimeter instrument NEPTUN at the tangential beam port of the 250kW research reactor hosted at Atominstitut of TU Wien, Austria. For more information visit our homepage.

Documentation has moved: The documentation has moved to PIGOR.org. (Alternatively you can find it in doc/_build/html)

pigor's People

Contributors

nicoeinsidler avatar

Stargazers

Vito Fabian Pecile avatar  avatar

Watchers

James Cloos avatar  avatar

pigor's Issues

Choose order of poly fit

Hy, it would be nice to choose the order of the polynomial fit (<=5), as sometimes we know that the theoretical curve of the measurement should be e.g. of order 2 (as for the DCZ sweeps, which are currently using poly5 and therefore falsify the actual minima.

path to links not valid in index_pigor.html

the links in the index_pigor.html cannot be opened

in my case the testfiles folder appears two times in the path

file:///D:/Users/richard/pigor/testfiles/testfiles/polarimeter/2019_02_20_1340_dc2z_scan.dat

Negative Contrast

In e.g. the testfile 2018-11-23-1545-scan-dc2x.html
there is a negative contrast for the sine_lin fit
Contrast for fit #0: -0.9358090416273662
-> has to be positive

ps: and the number should be truncated to 2 or three digits after the comma
(see issue #8)

fit improvement

Dear Nico,

as discussed, I am sending you an example of a bad sinusoidal fit which nonetheless has about the right frequency.
Thanks a lot that you are still open to work on your code.

I am not sure what files you need. I renamed the .dat file as .txt so I can attach it. Please let know in case this didn't work or you need something else.

Armin

PS: how do I add a bug label or do only you do that?

Edit: Initially, I accidentally attached a fit which worked quite good ;)

2020_06_18_1017_100s_comp_tilt9_DC4_scan_sine
2020_06_18_1017_100s_comp_tilt9_DC4_scan_sine_fit_functions.txt
2020_06_18_1017_100s_comp_tilt9_DC4_scan_sine - Copy.txt

html - index file

it would be nice if in the root testfile directory a html index file would be created,
that lists and links to all html output files.

html/md - output of covariance matrix

give the output in nice matrix arrangement.

currently all is in one row without line breaks (see below):

Covariance:

['[[ 1.16085301e-04, \n 5.77137574e+01, \n-2.16962168e+02],\n [ 5.77137574e+01, \n 4.12751257e+08, \n-1.73398906e+08],\n [-2.16962168e+02, \n-1.73398906e+08, \n 9.14644609e+08]]']
</EXAMPLE>

error when processing position scan

Problem finding Position File

Note: This issue was originally posted from Armin Danner on Bitbucket and has been migrated to Github.

Terminal output:

 C:\Users\admin\ownCloud! Exp Data\3 Output POVM Uncertainty\Experiment\Raw D ata\2019-03-28-pigor tests\2019_03_08_1200_axis8_pos.dat: Detected measurement t ype POS. The following exception occured during runtime:

Each lower bound must be strictly less than each upper bound. \Continuing operation.

Here is 2019_03_08_1200_axis8_pos.dat


Start Motor Scan on 08/03/2019@12:06 | Measure Time (sec):100| Bg detector (cnts/sec):0.000000| Bg monitor (cnts/sec):0.000000100| Mon.lim.  (cnts/sec):  0
Ioff (cnts/sec): 0.096569   ErrIoff: 0.004037  Pp.d.Pa:  0.000000  ErrPp.d.Pal:  0.000000	Pol: 0.000000	ErrPol: 0.000000
Power Supply 1 (mA): 0| Power Supply 2 (mA): 0| Power Supply 3 (mA): 0| Power Supply 4 (mA): 0| Power Supply 5 (mA): OFF| Power Supply 6 (mA): OFF   
Position (Steps)Detector (cnts):   Monitor_Max,Min (cnts/sec):   Norm(1/s):   err(1/s) :     FlippRatio:     ErrFlippRatio        
-1900000.00000000	498.00000000	6.00000000	0.00000000	1.93774319	0.14882931	0.04983565	0.00435779
-1850000.00000000	941.00000000	8.00000000	0.00000000	3.61923077	0.25357492	0.02668211	0.00217686
-1800000.00000000	1303.00000000	8.00000000	0.00000000	5.40663900	0.37911441	0.01786113	0.00145807
-1750000.00000000	1437.00000000	7.00000000	0.00000000	5.67984190	0.38724958	0.01700200	0.00135970
-1700000.00000000	1375.00000000	7.00000000	0.00000000	5.39215686	0.36765026	0.01790910	0.00143229
-1650000.00000000	1010.00000000	7.00000000	0.00000000	3.92996109	0.27456761	0.02457243	0.00200056
-1600000.00000000	604.00000000	7.00000000	0.00000000	2.60344828	0.20108961	0.03709261	0.00325765

[i] init functionality - image format (file extension)

same problem as with the [y/n]

If I skip the question for the image format with enter - the next time round the option is [.png]
<e.g>
What image format should the plots have? (.png,.svg,.eps,.pdf) [.svg]
ENTER
What image format should the plots have? (.png,.svg,.eps,.pdf) [.png]
ENTER
</e.g>
remark
same with the
Which file extention should PIGOR look for? (string) [.dat]

export_meta() not working with multiprocessing

Multiprocessing not working

Note: This issue was migrated over from Bitbucket.

I ran into this problem when I introduced export_meta() in the Measurement class. When performance becomes an issue, this should be fixed again, but for now the sequential analysis works quite fast.

Terminal output on this one:

โœ…  testfiles\2019_02_20_1340_dc2z_scan.dat: Detected measurement type DC.
๐Ÿ“  testfiles\subdirectory_test\2018-11-23-0900-degree-of-polarisation.pos: Position file read: testfiles\2018-11-23-1325-degree-of-pol.dat
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
  File "C:\Users\Nico Einsidler\AppData\Local\Programs\Python\Python37-32\lib\multiprocessing\pool.py", line 121, in worker
    result = (True, func(*args, **kwds))
  File "C:\Users\Nico Einsidler\AppData\Local\Programs\Python\Python37-32\lib\multiprocessing\pool.py", line 44, in mapstar
    return list(map(*args))
  File "C:\Users\Nico Einsidler\Documents\pigor\measurement.py", line 707, in export_meta
    if self.popt:
AttributeError: 'Measurement' object has no attribute 'popt'
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "pigor.py", line 121, in <module>
    main()
  File "pigor.py", line 117, in main
    analyse_files(all_files)
  File "pigor.py", line 72, in analyse_files
    pool.map(measurement.Measurement.export_meta, m)
  File "C:\Users\Nico Einsidler\AppData\Local\Programs\Python\Python37-32\lib\multiprocessing\pool.py", line 268, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "C:\Users\Nico Einsidler\AppData\Local\Programs\Python\Python37-32\lib\multiprocessing\pool.py", line 657, in get
    raise self._value
AttributeError: 'Measurement' object has no attribute 'popt'

SVG, PDF and EPS support

Vector Graphics Support for PIGOR

Note: This issue was originally posted from Armin Danner on Bitbucket and has been migrated to Github.

Option to choose from different file formats for the standard plot output of PIGOR. => pigor.config

Nested Config Files

Subfolders can have their own config files which overrule parent config files.

Min/Max of Fit Functions

It is highly relevant for the "Extreme Values"-Section of the analyzed files that the min/max of the FIT FUNCTION is added --> If possible also give information about local minimas (e.g. the typical sine-shaped function of the DC X fields has two local minimas, both are relevant).
Please give x and y coordinates of ALL local/global minimas of the fit function (local is just needed for DC X, as stated).

[i] init functionality - default option not taken (y/n)

in the init option y/n selection has a problem
e.g.
OUT: Should PIGOR look for files recursively? (y/n) [y]
OUT: boo
IN: -> type Enter
next time it will read
OUT: Should PIGOR look for files recursively? (y/n) [n]
OUT: nool
side remark why the bool output above?

find_boundaries() for poly5 not implemented yet

Analysis for a DC#Z fails

The analysis of the compensation field (z component of DC coils) fails with the error:


๐Ÿ”ด  C:\Users\Nico Einsidler\Documents\pigor\testfiles\polarimeter\2019_02_2
0_1340_dc2z_scan.dat: Error writing boundaries into file: zip argument #2 must support iteration

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.