An issue with negative declinations.
  1. What is the problem?
  2. A specific failure case.
  3. Initial failures on mcs.
  4. Does the same failure occur on scohome?
  5. Is it really the negative DEC?



What is the problem?

In Nov2015 I found some problems with running gstar on sky with negative declinations. I fixed this issue, but last night (Jan03,2016) I found the problem had cropped up again. I think the problem arises when I use a BIG_INSTALL to replace code on mcs without doing a recompile of the OTW and bash script codes.. I cann't keep "discovering" this issue at the telescope in the middle of a working night. Hence, I am going to go through a failure case on mcs and scohome and find the source of this problem.




A specific failure case.

Below is a specific failure case I experienced from the astronomer account on mcs on Jan04,2016 (UT date):

 
$ gstar 07:29:58.44 -02:06:37.5  202.0  gc1

New ra,dec = 07:30:09:01 -02:16:08.70 

$ gstar 07:30:09.01 -02:16:08.70 202.0 gc1



Initial failures on mcs.

On the day after my initial gstar failures with negative DEC values, I went to the HET and reproduced the failures. I progressively re-installed the bash scripts and my OTW codes and continued to see failure. Here are the notes from that exercise.

 
Starting this work on mcs as astronomer:
/home/mcs/astronomer/sco/ACAM/20160104/gstar_fail/run1

On 20160104 I have gstar failing again with negative dec values. 

[astronomer@mcs run1]$ ls
probe.pos
[astronomer@mcs run1]$ gstar 07:29:58.44 -02:06:37.5  202.0  gc1

NOTE:
Here I see a failure even BEFORE I get the grid section. I 
see the error: 
usage: psex.py [-h] [-v] arg1 arg2
psex.py: error: too few arguments
At line 64 of file hcards_wcs1.f (unit = 1, file = 'WCS1_Info.Center')
Fortran runtime error: End of file
WCSINIT: No image scale in file acam_empty.fits
At line 56 of file xy_tranrot_res.f (unit = 2, file = 'xy.cal')
Fortran runtime error: Bad real number in item 1 of list input
Error: Could not read xyfile = 
Goodbye.

-------------------------------
Now in run2, I will re-install my bash scripts and then do the same 
procedure as in run1. 

What I do:
As sco on mcs.
[sco@mcs bash]$ pwd
/home/mcs/sco/codes/bash
[sco@mcs bash]$ ls -1 >list.all
[sco@mcs bash]$ vi list.all
**** to remove a few bullshit lines 
[sco@mcs bash]$ iput_list_run list.all

[astronomer@mcs run2]$ ls
probe.pos
[astronomer@mcs run2]$ gstar 07:29:58.44 -02:06:37.5  202.0  gc1
I am cleaning files.
usage: psex.py [-h] [-v] arg1 arg2
psex.py: error: too few arguments
At line 64 of file hcards_wcs1.f (unit = 1, file = 'WCS1_Info.Center')
Fortran runtime error: End of file
WCSINIT: No image scale in file acam_empty.fits
At line 56 of file xy_tranrot_res.f (unit = 2, file = 'xy.cal')
Fortran runtime error: Bad real number in item 1 of list input
Error: Could not read xyfile = 
Goodbye.
SO >>>> still a problem

-------------------------------
Now in run3, I recompile all OTW codes. 
[sco@mcs bash]$ lopo
[sco@mcs otwlib]$ ls *make
OTWLIB.make*
[sco@mcs otwlib]$ OTWLIB.make
Number of lines in Errors file = 0 Errors

[sco@mcs otwlib]$ mopo
[sco@mcs otwlib]$ cd Big_Compile
[sco@mcs Big_Compile]$ Make_new_list
**** I edit the file list.Programs
[sco@mcs Big_Compile]$ botw_bigrun list.Programs >& my_record
**** I browse through "my_record" to insure that things have 
compiled as expected. 
---> may be a problem with "profpars" on mcs

[astronomer@mcs run3]$ ls
probe.pos
[astronomer@mcs run3]$ gstar 07:29:58.44 -02:06:37.5  202.0  gc1

Once again:
I am cleaning files.
usage: psex.py [-h] [-v] arg1 arg2
psex.py: error: too few arguments
At line 64 of file hcards_wcs1.f (unit = 1, file = 'WCS1_Info.Center')
Fortran runtime error: End of file
WCSINIT: No image scale in file acam_empty.fits
At line 56 of file xy_tranrot_res.f (unit = 2, file = 'xy.cal')
Fortran runtime error: Bad real number in item 1 of list input
Error: Could not read xyfile = 
Goodbye.

So, still fucked up. 


-------------------------------
Now in run4, I modify input dec format (?) 
[astronomer@mcs run4]$ gstar 07:29:58.44 -2:06:37.5  202.0  gc1
*** No, this still fails. 




Does the same failure occur on scohome?

The next logical question is "Does this gstar run fail on scohome in the same way?". To answer this, I am setting up a TDATA example (see Test_Data_for_Codes/T_runs/gstar/ex2_negdec). The short answer is: NO, gstar no longer works on scohome.

 
First, I did have to correct a problem with "get_probexy.sh"

Then, I found that I still get a failure: 
I am cleaning files.
usage: psex.py [-h] [-v] arg1 arg2
psex.py: error: too few arguments
At line 64 of file hcards_wcs1.f (unit = 1, file = 'WCS1_Info.Center')
Fortran runtime error: End of file
At line 56 of file xy_tranrot_res.f (unit = 2, file = 'xy.cal')
Fortran runtime error: Bad real number in item 1 of list input
Error: Could not read xyfile = 
Goodbye.

When I look at the local directory, I see that there is 
no "WCS1_Info.Center" present. Why not? 




Is it really the negative DEC?

Yes! I put my scohome versions of all codes onto mcs and recompiled. Next I ran the TDATA gstar test (ex2_negdec) except I changed the -DEC to a +DEC:

[sco@mcs S]$  gstar 07:29:58.44 +02:06:37.5  202.0  gc1
The result was that everything ran perfectly!. Now the job is to find where the negative dec problem has crept back into my life.

1) I traced a problem in gcpic.a, but it was just a typo, The 
   "skygrab" routine is where the image is overplotted with 
   ds9 regions with numbers from the USNO catalog file. 

2) It seem the problem occurs in gcpic_draw, but well inside this
   code I saw: 
Contents of gcpic_draw.probe_info:
0.095957 -0.138959 1170.493 1604.499 07:29:47.706 -01:56:41.64 J2000
   The negative dec is still handleled alright. 
   The file gcpic_draw.probe_info is built correctly. 

3) Next, the acam_fake routine is started. THIS IS WHERE IT SEEMS TO FAIL
   with a call to psex.py:

Here is the code:
# Build WCS1_Info.Center
printf "Ra_hrs,Dec_deg,X_pixel,Y_pixel,           \n" > WCS1_Info.Center
psex.py $rsex $dsex > rd.data_acam
read rss dss radeg rahours decdeg > WCS1_Info.Center

Here is my manual run that show ths fails;
[sco@mcs ex2_negdec]$ psex.py 07:29:47.706 -01:56:41.64
usage: psex.py [-h] [-v] arg1 arg2
psex.py: error: too few arguments

  ***** Could it be that I need to re-install psex.py????? 

Apparently I need to call psex.py with a "--". I revise my scocode psex.py documentation for this.

I have numerouse cases of scripts that call psex.py without this feature:

[sco@mcs bash]$ grep -n 'psex.py' *
grep: 1_Dir_Only: Is a directory
acam_fake:98:psex.py -- $rsex $dsex > rd.data_acam
estimate_azhet_hetq:42:psex.py $rsex $dsex >junk.1
install_rough_wcs:83:psex.py $rsex $dsex > rd.data_acam
lrsfix:49:psex.py $ra $dec > ptools.1
newtarg:23:psex.py -- $1 $2 > junk.1
skygrab:56:psex.py "--" $1 " $2" > ptools.1
test_proj:26:psex.py $1 $2 > ptools.0
usno_grab:33:psex.py "--" $1 $2 > ptools.1
usno_look:47:psex.py $1 $2 > ptools.1
usno_look_2:47:psex.py $1 $2 > ptools.1
I will correct these after I confirm that the new psex.py call in acam_fake really works:
Yeah!!!!! It works! 

Here is the call in acam_fake:
# Build WCS1_Info.Center
printf "Ra_hrs,Dec_deg,X_pixel,Y_pixel,           \n" > WCS1_Info.Center
psex.py -- $rsex $dsex > rd.data_acam
read rss dss radeg rahours decdeg > WCS1_Info.Center




Back to SCO CODES page