-
Notifications
You must be signed in to change notification settings - Fork 21
QPhotTest.test_qphot_run() failing on 32-bit IRAF #57
Comments
It seems to be related to the fact that the test expects 6266626 which is an integer and qphot returns 6266626.0 which is a float. Should be checked but I don't think that impacts the usage at all. |
I did notice that, but the results on flux were much different, 3750371.0 != 3749740. Perhaps the two are related? |
Sorry... My bad. What version of pyraf do you have? python -c 'import pyraf; print pyraf.version' Did you tried the tests on the latest version from the github repository? On Sun, May 17, 2015 at 2:12 AM TGroner [email protected] wrote:
|
We have pyraf 2.1.8. I did fetch the latest version of that particular test from github, it produced the exact same output. Thanks for your replies! |
This is a strange error indeed. I'm out of office this week, but we will fix this as soon as I'm back next Monday. Thanks for the helping hand, William! |
First thing that comes to mind: what IRAF version do you have installed? |
We are using Thanks! |
Any chance you could try upgrading to v2.16? |
I am referring that question to our Iraf maintainer, I will let you know. |
Most interesting, it still fails like so with iraf V2.16:
Very interesting how different the flux values are in my two posts! |
Can you send the output of this command on your computer? On Thu, May 21, 2015 at 11:13 PM TGroner [email protected] wrote:
|
Sure, here you go: |
Did you run |
I did run that
At that point I commented out the call to mkiraf and manually did |
That explains the difference: if the IRAF configuration file is not the exact same, I assume that even the slightest difference in a single parameter could result in If you replace the symbolic link with this login.cl file, does the test pass? |
With that |
We probably also need to remove the symbolic link to your
|
Did that, same results:
|
Could it be due to the fact that the OS is 32bits? On Sat, May 23, 2015 at 11:20 PM TGroner [email protected] wrote:
|
It could be, but in principle I would say that's unlikely to be the case: we have successfully run the unit tests on a couple of 32-bit machines in the past. I still suspect the reason most probably lies with PyRAF seeing a different IRAF version or maybe a Ted, could you please tell me what the output of the following commands is?
|
I produced the last line manually, yours was invalid for tcsh. It is not clear why this post blows up fonts either! |
There is a more recent version available: IRAF 2.16.1 — would it be possible that you upgrade to it?
The weird formatting was caused because Markdown interpreted the |
I installed Iraf 2.16.1 this morning. Current results-
Also this was from a fresh account, created today, that had zero files in the home directory. |
At this point it really looks like a bug in IRAF — somehow, for an arcane reason, the value of the flux is different, but the magnitude, total number of counts and even the standard deviation are the same. It feels like if only that number were being affected by... who knows. What I wonder now is whether this is the value computed by your IRAF installation or, instead, it could be PyRAF's fault. In order to find this out, could you please run this CL script and paste the output here?
Then, fire up IRAF and do:
This will allow us to see the exact output produced by IRAF, without any involvement of PyRAF. |
Did you try that script? It has multiple problems. In order: |
Yes, I tried the script before uploading it!
Just to make double sure I have tested it on three different Linux machines running IRAF 2.16.1. The code worked in every case and produced the same results. May I see your output when you follow these steps? |
Ok, somehow I must have messed that up. It does work and produces this:
|
William was right: this has everything to do with you running a 32-bit version of IRAF. I have configured LEMON on a couple of 32-bit machines (including a virtual one) this weekend and I can reproduce your error. The reason why we had not yet noticed this is that, although we had used the pipeline on 32-bit machines in the past, it was before these unit tests —that examine the exact output of This is a very strange and confusing behavior of IRAF. A coworker has mentioned that the difference in the I have submitted this to the IRAF developers as a possible bug. In the meantime (because, even if this is indeed a bug and gets fixed, it may easily take years until a new version is released), the solution is to modify the unit tests so that they take into account that some values, mostly the Fret not: the magnitude is apparently always the same, so this difference between 32 and 64-bit IRAF versions should only affect (almost negligibly) the signal-to-noise estimation of the differential photometry measurements. That being said — this is but another reason to abandon IRAF and switch to Astropy's photutils, as William suggested in #59. That's what we intend to do as soon as possible, and expect to have completed in a few months at most. |
As reported by Ted Groner in #57, qphot sometimes returns different values for some parameters (mostly 'flux') depending on the IRAF version (32 vs 64-bit). This may be explained by the limitations of floating-point arithmetic, but if that were the sole reason we would also expect other parameters (for example, 'sum') to be different. I have submitted this to the IRAF developers as a possible bug. In the meantime (because, even if this is indeed a bug and gets fixed, it may easily take years until a new version is released), the solution is to modify the unit tests so that they take into account that some values, mostly the flux, may be different on 32-bit architectures. Thanks to William Schoenell for the help figuring this out. This merges branch 'issue-57'
Fixed in 8772356. |
Thanks for sticking with this to the end. Perhaps it is time to peek at the iraf source and see if the problem can be found. I'd have to guess it is some problem in the calculation of the sky value, which is odd indeed! |
When trying to verify my recent installation of Lemon it will go nearly to the end but then it fails with a mismatch on the flux value. The output looks like this:
Any pointers or ideas on why the test fails in this fashion?
Thanks!
The text was updated successfully, but these errors were encountered: