Skip to content
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

Pycorn does not recognize injection points properly #12

Closed
misterlf opened this issue Oct 10, 2016 · 12 comments
Closed

Pycorn does not recognize injection points properly #12

misterlf opened this issue Oct 10, 2016 · 12 comments

Comments

@misterlf
Copy link

misterlf commented Oct 10, 2016

Hi,

I have a unicorn file with multiple injections points. However Pycorn is not able to properly recognize the injection points. In fact, it does recognize two injection points. However, these are not at the correct volume position and there are actually more than just two injection points. Any ideas on how to fix that?

I'm happy to provide the .res where the injections are not properly recognized.

@misterlf
Copy link
Author

The injections points are getting correctly written in the .csv that I can generate via PyCorn but the -t option does not properly recognize them!

@pyahmed
Copy link
Owner

pyahmed commented Oct 10, 2016

I'm happy to provide the .res where the injections are not properly recognised.

Yes, please provide the res file, that will make it easier to debug.

@misterlf
Copy link
Author

The file is zipped because GitHub does not allow the direct upload of .res files.
I tried the module mode and I got the correct data.
The pycorn-bin.py seems to create the problem.

Thank you, Ahmed!

161009_GF_Runs.res.zip

@misterlf
Copy link
Author

misterlf commented Oct 10, 2016

The correct positions should be: 0.0, 0.0, 2.39, 5.22, 8.2, 8.2, and 11.16.
Pycorn-bin.py with -t option recognizes 0 and 2.46.

@pyahmed
Copy link
Owner

pyahmed commented Oct 10, 2016

OK - I will take a look.. once I have time ;-)

@misterlf
Copy link
Author

Cool! This would make things a lot easier.

Thank you.

@pyahmed
Copy link
Owner

pyahmed commented Oct 10, 2016

I had a look with a HEX-viewer. Injection points are at (absolute mL):
2.46
2.46
4.85
7.68
10.66
10.66
13.62

The module mode gets it wrong as well if you do:

from pycorn import pc_res3
myres = pc_res3("d:/161009_GF_Runs.res")
myres.load()
print(myres.injection_points)

gives:

[0.0, 2.46]

But they are correctly read out from the file by the pycorn class:
print(myres['Inject']['data'])

which returns:
[(0.0, '3'), (0.0, '3'), (2.39, '3'), (5.22, '3'), (8.2, '3'), (8.2, '3'), (11.16, '3')]

So when doing full-extraction meta1_read is only called twice (for 0.0 and 2.46).. need to investigate further..

@misterlf
Copy link
Author

Okay. Sounds good. I looked in your source but couldn't really find the problem. I also barely know how to run scripts...

@misterlf
Copy link
Author

In def inject_det in the pycorn.py you only call two variables (for x,y) could that be a problem?

@pyahmed
Copy link
Owner

pyahmed commented Oct 11, 2016

This should be fixed with the latest dev-version. If you don't want to wait for me updating the PyPI package then just replace current pycorn.py with the one from dev-branch ( dcb350c ).

Thanks for reporting :-)

@misterlf
Copy link
Author

Works like a charm. Thank you very much for your hyper fast fix!

@pyahmed
Copy link
Owner

pyahmed commented Nov 17, 2017

Merged & Uploaded to PyPI.

@pyahmed pyahmed closed this as completed Nov 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants