Welcome to iraf.net Friday, May 17 2024 @ 02:06 PM GMT
sarah.sweet |
10/04/2010 12:14AM (Read 5141 times)
|
|
|
Status: offline
Registered: 01/24/2010
Posts: 11
|
Hello,I am having an issue with msctvmark (which had previously been working):
ERROR on line 186: Attempt to access undefined local variable `str1'. msctvmark (mode=h)
I have tried unlearning parameters and we have reinstalled and recompiled the source code but to no avail. Can you please suggest a solution?Thanks!
Sarahd_trace output is as follows:
ms> msctvmark
----- task cl -----
340+5: call msctvmark
345+2: exec
----- exec script msctvmark (mscsrc$msctvmark.cl) -----
----- task msctvmark -----
349+4: pushparam coords
List of coordinates (N1653ucd.cat):
353+3: assign crd
356+4: pushparam frame
Display frame (1):
360+3: assign frm
363+5: call mscztvmark
368+3: pushparam crd
371+3: posargset 0
374+3: pushparam frm
377+3: posargset 1
380+9: pushconst `uparm$mscdisp'
389+3: pushparam frm
392+2: concat
394+3: posargset 2
397+4: pushparam output
401+4: absargset output
405+4: pushparam fields
409+4: absargset fields
413+3: pushparam wcs
416+3: absargset wcs
419+4: pushparam mark
423+4: absargset mark
427+4: pushparam radii
431+4: absargset radii
435+4: pushparam lengths
439+4: absargset lengths
443+4: pushparam font
447+4: absargset font
451+4: pushparam color
455+4: absargset color
459+4: pushparam label
463+4: absargset label
467+5: pushparam nxoffset
472+5: absargset nxoffset
477+5: pushparam nyoffset
482+5: absargset nyoffset
487+5: pushparam pointsize
492+5: absargset pointsize
497+4: pushparam txsize
501+4: absargset txsize
505+2: exec
----- exec script mscztvmark (mscsrc$mscztvmark.cl) -----
----- task mscztvmark -----
509+8: pushconst `tmp$iraf'
517+5: pushconst 1
522+4: intrinsic mktemp
526+4: assign pix1
530+8: pushconst `tmp$iraf'
538+5: pushconst 1
543+4: intrinsic mktemp
547+4: assign pix2
551+8: pushconst `tmp$iraf'
559+5: pushconst 1
564+4: intrinsic mktemp
568+4: assign pix3
572+4: pushparam coords
576+3: assign crd
579+4: pushparam frame
583+3: assign frm
586+4: pushparam mscdisp
590+4: assign mscd
594+4: call fields
598+3: pushparam crd
601+3: posargset 0
604+4: pushparam fields
608+3: posargset 1
611+6: pushconst `'
617+4: absargset lines
621+5: pushconst no
626+6: absargset quit_if_miss
632+5: pushconst no
637+6: absargset print_file_n
643+4: pushparam pix3
647+2: redir
649+2: exec
----- exec external task fields -----
fields > $\nfiles="N1653ucd.cat"\nfields="2,3,1"\nlines=""\n
quit_if_missing=no\nprint_file_names=no\nmode="ql"\n$nargs=2\n
--------------------------------
----- task fields -----
2948+3: call bye
2951+2: exec
----- exec builtin bye -----
651+4: pushparam pix3
655+3: assign fd1
658+5: pushconst 0
663+4: assign lineno
667+7: pushconst `str3'
674+7: pushconst `str2'
681+7: pushconst `str1'
688+6: pushconst `fd1'
694+5: pushconst 4
699+2: fscan
701+5: pushconst -2
706+2: ne
708+3: biff +128
711+4: pushparam lineno
715+5: pushconst 1
720+2: add
722+4: assign lineno
726+5: pushconst 0
731+4: intrinsic nscan
735+5: pushconst 3
740+2: lt
742+3: biff +47
745+4: call printf
749+8: pushconst `%s %s %d\n'
757+3: posargset 0
760+4: pushparam str1
ERROR on line 186: Attempt to access undefined local variable `str1'. msctvmark ()
ms>
|
|
|
|
fitz |
10/04/2010 12:14AM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
Is there a blank line or column in the .dat file ????
|
|
|
|
sarah.sweet |
10/04/2010 12:14AM
|
|
|
Status: offline
Registered: 01/24/2010
Posts: 11
|
Thanks Fitz, there was indeed a blank row.However, the task is still not overlaying the catalogue file on my image. I have checked that the coordinates are correct and that the fields are specified in msctvmark in the correct order in which they appear. It looks like mscdisplay might not be loading the WCS (the WCS is not displayed in ds9). Do you have any thoughts?Thanks,Sarah
|
|
|
|
fitz |
10/04/2010 12:14AM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
The WCS not showing up in DS9 is a long-standing DS9 problem and is normal. The task (actually is a script) will convert the WCS values to (x,y) positions for marking automatically and doesn't directly mark the (ra,dec) position.Briefly scanning the code though the column order is used in several places and I'm not entirely sure the value in the 'fields' parameter is always honored (i.e. you specify "2,3,1"). One way to test this is to take your input file and use the FIELDS and JOIN tasks to reorder the columns to the default to see if it works any better, e.g.[code:1:bfe7364801]
cl> fields coords.txt "2,3" > pos.txt
cl> fields coords.txt "1" > id.txt
cl> join id.txt pos.txt output=newcoords,txtcl> unlearn msctvmark
[/code:1:bfe7364801]If that seems to fix it, I'll ask Frank to look at the script more closely.-Mike
|
|
|
|
sarah.sweet |
10/04/2010 12:14AM
|
|
|
Status: offline
Registered: 01/24/2010
Posts: 11
|
Ok thanks Mike,
I tried that but it now returnsBad value in file tmp$iraf4032c line 1 column 1etc. up to the length of the catalog file. The id names are N1653UCD1 and similar.
I think I can get by with loading the image and catalog from within ds9 at least for now.Thanks,
Sarah
|
|
|
|
| |
|
Content generated in: 0.16 seconds |
|