Increasing apphot magnitude output precision
Christopher J. Burke wrote on Jan 22, 2008
Recently, I needed more precision output from the apphot phot task.
I didn't see this posted anywhere yet, so I thought I would add it in case anyone needs it. The default precision for mag is 7.3f and merr is 6.3f. I have increased this to 8.4f and 7.4f for mag and merr. The source file
/iraf/iraf/noao/digiphot/apphot/aplib/apwres2.x
controls the output for the phot task.
Change the original lines in apwres2.x:
To the followings lines
The 'define MAG2_WSTR' is the actual output format descriptor, but the other lines need changing for pdump to work correctly. I also changed the keyword RAPERT to RAD. I don't know if it is a problem, but changing RAPERT may cause other tasks that expect it to be defined may fail. So be careful with that. You will need to recompile the noao package and reinstall it in order for these changes to take effect. The binary noaobin$x_apphot.e is affected by these changes. I applied these changes to IRAF v2.12.2 on macosx irafarch. Hope that is helpful.
I didn't see this posted anywhere yet, so I thought I would add it in case anyone needs it. The default precision for mag is 7.3f and merr is 6.3f. I have increased this to 8.4f and 7.4f for mag and merr. The source file
/iraf/iraf/noao/digiphot/apphot/aplib/apwres2.x
controls the output for the phot task.
Change the original lines in apwres2.x:
define MAG2_NSTR "#N%4tRAPERT%13tSUM%27tAREA%38tFLUX%52tMAG%59tMERR%66t\
PIER%71tPERROR%80t\\\n"
define MAG2_USTR "#U%4tscale%13tcounts%27tpixels%38tcounts%52tmag%59t\
mag%66t##%71tperrors%80t\\\n"
define MAG2_FSTR "#F%4t%%-12.2f%13t%%-14.7g%27t%%-11.7g%38t%%-14.7g%52t\
%%-7.3f%59t%%-6.3f%66t%%-5d%71t%%-9s%80t \n"
define MAG2_WSTR "%4t%-9.2f%-14.7g%-11.7g%-14.7g%-7.3f%-6.3f%-5d%-9.9s\
%79t%2s\n"
To the followings lines
define MAG2_NSTR "#N%4tRAD%12tSUM%26tAREA%37tFLUX%51tMAG%59tMERR%66t\
PIER%71tPERROR%80t\\\n"
define MAG2_USTR "#U%4tscale%12tcounts%26tpixels%37tcounts%51tmag%59t\
mag%66t##%71tperrors%80t\\\n"
define MAG2_FSTR "#F%4t%%-11.2f%12t%%-14.7g%26t%%-11.7g%37t%%-14.7g%51t\
%%-8.4f%59t%%-7.4f%66t%%-5d%71t%%-9s%80t \n"
define MAG2_WSTR "%4t%-8.2f%-14.7g%-11.7g%-14.7g%-8.4f%-7.4f%-5d%-9.9s\
%79t%2s\n"
The 'define MAG2_WSTR' is the actual output format descriptor, but the other lines need changing for pdump to work correctly. I also changed the keyword RAPERT to RAD. I don't know if it is a problem, but changing RAPERT may cause other tasks that expect it to be defined may fail. So be careful with that. You will need to recompile the noao package and reinstall it in order for these changes to take effect. The binary noaobin$x_apphot.e is affected by these changes. I applied these changes to IRAF v2.12.2 on macosx irafarch. Hope that is helpful.
Matilde Fernandez wrote on Jan 22, 2008
cjburke
Recently, I needed more precision output from the apphot phot task.
[...]
Change the original lines in apwres2.x:
[...]
I applied these changes to IRAF v2.12.2 on macosx irafarch. Hope that is helpful.
Hi,
we have tried to make the same changes (also to get more precision output from the apphot phot task) in a MacBook Pro with IRAFNET PC-IRAF Revision 2.13-BETA2, but we do not find the apwres2.x file. Has anyone tried (and managed) to do this?
Thanks!
Matilde
Mike Fitzpatrick wrote on Jan 22, 2008
The file should be accessible from the CL using:
Be sure that after you make the change you reconfigure the NOAO package for development before compiling, i.e. as the 'iraf' user (or with the proper environment):
-Mike
cl> cd noao$digiphot/apphot/aplibBe sure that after you make the change you reconfigure the NOAO package for development before compiling, i.e. as the 'iraf' user (or with the proper environment):
% cd $iraf/noao
% mkpkg -p noao macintel # or 'macosx' for PPC
% mkpkg -p noao -p tables update
-Mike
Matilde Fernandez wrote on Jan 22, 2008
Hi,
thanks for your answer Mike,
but we have done
cl> cd noao$digiphot/apphot/aplib
and we go to:
/iraf/iraf/noao/digiphot/apphot/aplib
but there are no files there.
We do not find the apwres2.x file in the computer. We also do not know where the other *.x files related to PHOT are.
Do you know where could they be?
Thanks!
Matilde
thanks for your answer Mike,
but we have done
cl> cd noao$digiphot/apphot/aplib
and we go to:
/iraf/iraf/noao/digiphot/apphot/aplib
but there are no files there.
We do not find the apwres2.x file in the computer. We also do not know where the other *.x files related to PHOT are.
Do you know where could they be?
Thanks!
Matilde
Mike Fitzpatrick wrote on Jan 22, 2008
It sounds like your system has been stripped of sources. I can't remember whether e.g. the SciSoft distribution does this by default, in most cases it is something done by the site admin after installing the system.
For v2.13-beta2 you can get the source tarball from
http://iraf.net/ftp/iraf/V2.13-BETA/as.pcix.gen.gz
You would download this and unpack it in the /iraf/iraf directory, however remember that this will overwrite things you may have customized like the hlib$extern.pkg or dev$graphcap file, so back these up before unpacking. If you did use SciSoft, a new version including v2.14 is now out so you might consider upgrading.
-Mike
For v2.13-beta2 you can get the source tarball from
http://iraf.net/ftp/iraf/V2.13-BETA/as.pcix.gen.gz
You would download this and unpack it in the /iraf/iraf directory, however remember that this will overwrite things you may have customized like the hlib$extern.pkg or dev$graphcap file, so back these up before unpacking. If you did use SciSoft, a new version including v2.14 is now out so you might consider upgrading.
-Mike
Matilde Fernandez wrote on Jan 22, 2008
Hi MIke,
> It sounds like your system has been stripped of sources.
Now I understand it.
Thanks a lot for your help and for the address!!
Matilde
> It sounds like your system has been stripped of sources.
Now I understand it.
Thanks a lot for your help and for the address!!
Matilde
Last post on Jan 22, 2008