View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

Installing GIM2D on Mac OS X

Nick Devereux wrote on Jan 25, 2008

I have a binary for a custom IRAF package called GIM2D. How do I install this new IRAF package on my Mac?

I’m running IRAF 2.13 BETA2 (downloaded from MacSingularity) on a G4 and the operating system is MAC OS X 10.4.10

The folders I have to support the IRAF package GIM2D (sent to me by Luc Simard) include bin, lib, gim2d and fuzzy.cl

Some instructions are provided on Luc's web-site

http://www.hia-iha.nrc-cnrc.gc.ca/STAFF/lsd/gim2d/

but not for my specific installation.

Can anyone help please? I'm a total novice when it comes to system admin.

Thanks in anticipation

Nick

Mike Fitzpatrick wrote on Jan 25, 2008

The GIM2D package is actually called FUZZY. Assuming you've got a directory with the various files, say /home/nick/fuzzy, you declare the package with the lines:


reset fuzzy  = /home/nick/fuzzy/              # trailing '/' required!
task $fuzzy = fuzzy$fuzzy.cl


For personal use you can do this in your login.cl (or loginuser.cl) file before the final 'keep' statement. To install it in the system you would edit the file hlib$extern.pkg in the iraf tree with the same lines. Depending on where you defined it in the login.cl it will show up in another package (like NOAO), but if you install it in the hlib$extern.pkg file you should see it when you login to the CL. In either case, typing 'fuzzy' should load the package.

IRAF will look for binaries in a directory based on the architecture name (e.g. 'bin.macosx' for PPC and 'bin.macintel' for Intel on a Mac). If you really have a directory named 'bin' you should rename it to one of these so the binaries will be found.

Write back if you still have problems.

-Mike

Nick Devereux wrote on Jan 25, 2008

Hi Mike,

Thanks for your help. I've made some progress.

I put the binaries contained in the Bin folder that Luc sent me into
a folder on my Mac called bin.macosx (since I have a PPC).

My existing login.cl is in /Users/Nick/iraf

So, I created a folder in Users/Nick/iraf called fuzzy which contained
the other folders Luc sent me (lib, gim2d,bin and fuzzy.cl)

then I edited my login.cl as you suggested, but my path is

/ Users/Nick/iraf/fuzzy/

i then started iraf

I could see the fuzzy package name

I typed fuzzy and I could see and epar all the good stuff!!

So, I think I have it.

Thank you so much for your help.

Much obliged

Sincerely

Nick Devereux

Nick Devereux wrote on Jan 25, 2008

Six months have passed and I'm still chipping away on this GIM2D project!

gim2d is installed on my MAC and I'm now trying to use it.

I got this error

ERROR: Cannot open connected subprocess (./x_mgimfit2d.e)

Any ideas on what's causing this error?

I'm doing a simple task, I'm using mgimfit2d on an image of M81, it's a big galaxy, so psf = delta.

Here's the param file for mgimfit2d;

in_list = m81_mosaic_k.fits List of input image(s)
out_list= m81out.fits List of output image(s)
(sym_lis= ) List of symmetrized image(s)
(res_lis= m81res.fits) List of residual image(s)
(msk_lis= m81minus1.fits) List of pixel mask image(s)
(sig_lis= none) List of sigma image(s)
(logfile= m81log) Name of log file
(mdparfi= /Nick/Desktop/m81.mdpar) Name of parameter value file
(initpar= yes) Determine parameters from input image moments (yes/no)?
(dosym = no) Symmetrize input image (yes/no)?
(dobkg = no) Recompute background parameters (yes/no)?
(deepref= no) Is the reference image a deeper image (yes/no) ?
(offreca= yes) Will MGIMFIT2D recalculate image offsets (yes/no) ?
(imscale= 1.) Image scale (arcsecond/pixel)
(psftype= delta) PSF type (delta|gaussian|tiny_wfpc|tiny_nic|tiny_3nic|tiny
(psf_lis= ) List of tinytim/user PSF image(s)
(c_abs = 0.) Disk internal absorption coefficient (0-1)
(seeing = ) Seeing FWHM (arcseconds)
(bkgsig = 1.) Background sigma (ADU)
(nsamp = 300) Number of parameter space samples
(ccdgain= 1.) CCD Gain (electrons/DU)
(metseed= -24781) Metropolis seed
(osamp = 2) Core oversampling factor
(mode = q)

Thanks

Nick

Mike Fitzpatrick wrote on Jan 25, 2008

A 'cannot open connected subprocess' basically means the binary cannot be found, or executed. Depending on any changes you made, the mkpkg file file be creating e.g. an xx_mgimfit2d.e until you do a 'mkpkg install'. Or, the binary has the right name, but isn't in the proper bin directory: A package 'bin' is usually a symlink to (in this case) 'bin.macosx' directory for Mac PPC or 'bin.macintel' for Mac Intel. It is okay if 'bin' is actually a directory, but the executable should be there.

If the binary has the right name and is in the right place, make sure it is executable (e.g. try running it outside of IRAF, type 'bye' at the '>' prompt to quite if it successfully starts, otherwise repost the error). Did you get the source code or did Luc produce a mac binary?

-Mike

Nick Devereux wrote on Jan 25, 2008

Mike,

Thanks very much for getting back to me, to answer your questions;

The binary has the right name and is in the right place; bin.macosx

I do not think I did a mkpkg install, can you talk me through that please.
Actually, what I did do exactly is documented in our previous e-mail exchanges.

I don't know how to make sure it is executable (e.g. try running it outside of IRAF - how?, type 'bye' at the '>' prompt to quite if it successfully starts, otherwise repost the error).

Luc produced a mac binary for me.

Apologies for being such a novice with this admin stuff!

Sincerely

Nick

mmozena wrote on Jan 25, 2008

was this issue ever resolved? I am getting the same error msg about ./x_galimage.e and the file is in the correct folder (bin.macos) and is an executable.

thanks for any insight.

Nick Devereux wrote on Jan 25, 2008

No, this issue has not been resolved.

Mike, can you help us with this please?

Thanks

Nick

Mike Fitzpatrick wrote on Jan 25, 2008

Hi Guys,

Sorry for dropping the thread, I've been travelling. The first thing to do is to do is to locate the binary outside of IRAF, it'll be in the 'bin' directory under the fuzzy directory someplace. If the binary won't run, it might be because this is a Intel binary and you're on a PPC system, or it might be built under 10.5 and you're on 10.4. In any case, once you find the executable, try running it as

% ./x_mgimfit2d.e


If it works you'll see a '>' prompt (type 'bye' to quit) and the problem may be that it is in the wrong directory. Otherwise, the error message may be more useful (please post it). To make sure it is executable, issue the command

% chmod 755 x_mgimfit2d.e


And try again.

I'll be in limited email contact this weekend but will check in when I can.

Cheers,
-Mike

Nick Devereux wrote on Jan 25, 2008

Hi Mike,

I'm glad your back!!

OK, I did what you asked and concluded that the file is executable because I saw the '>' prompt after typing

% ./x_mgimfit2d.e

I did the chmod;

% chmod 755 x_mgimfit2d.e

logged back into IRAF, tried to run 'mgimfit2d ' and got exactly the same error;

ERROR: Cannot open connected subprocess (./x_mgimfit2d.e)

Have we proven now that the executable is in the wrong directory?

It's in bin.macosx, cause I'm running Mac OSX 10.4.10.

My directory structure is as follows.

I have an /irafbin directory with 3 sub directories;

/bin

/bin.macosx

and

/noao.bin.macosx

The gim2d stuff is in bin.macosx. Here's a listing;

x_images.e
x_gimfit2d.e
x_imdkern.e
x_galimage.e
libnlfit.a
libsgi.a
libncar.a
libmemdbg.a
libinterp.a
libiminterp.a
libmain.o
libbev.a
ecl.e
x_sgikern.e
x_proto.e
libvops.a
x_mgimfit2d.e
x_lists.e
libgsurfit.a
libgks.a
x_utilities.e
x_tv.e
libslalib.a
x_dataio.e
x_c2gimfit2d.e
x_plot.e
x_mkttydata.e
x_obsolete.e
x_ncar.e
libxtools.a
libimfort.a
libimd.a
libllsq.a
irafks.e
libdeboor.a
libcurfit.a
cl.e
libcur.a
libex.a
x_system.e
libsys.a
libsurfit.a
x_stdgraph.e
x_softools.e
libds.a
libc.a
libstg.a

But, I also see alot of iraf executables in /noao.bin.macosx

Here's a listing;

x_artdata.e
x_vtel.e
x_scombine.e
x_rv.e
x_quadred.e
x_quad.e
x_ptools.e
x_photcal.e
x_onedspec.e
x_astcat.e
x_bias.e
x_ccdred.e
x_mtlocal.e
x_longslit.e
x_irred.e
x_nproto.e
x_nobsolete.e
x_daophot.e
x_apphot.e
x_generic.e
x_dtoi.e
x_crutil.e
x_obsutil.e
libasttools.a
x_apextract.e
libsmw.a
x_astutil.e

Does this help you at all?

Please let me know!!

Thanks

Nick

Mike Fitzpatrick wrote on Jan 25, 2008

Hi Nick,

The bin.macosx and noao.bin.macosx directories belong in /iraf/irafbin and should contain the contents of the IB and NB distribution files respectively. It appears you've put the GIM2D binaries in the 'bin.macosx' directory as well, and so they're not being found because the system is expecting them to be in the package directory tree.

Typically you would install the FUZZY package someplace like /iraf/extern/fuzzy which would contain a 'bin.macosx' directory of its own (and a 'bin' symlink that point to it). The binaries you got from Luc belong in this directory, i.e. /iraf/extern/fuzz/bin.macosx

Cheers,
-Mike

Nick Devereux wrote on Jan 25, 2008

Hi Mike,

OK, well I'm glad that you think that the directories are the problem.

Now the new problem I am facing is that I am unable to create a new
directory in \iraf called \extern because I get an error message from
the operating system telling me that \iraf 'cannot be modified'.

So do you know the trick for creating a new directory in \iraf ?

Thanks in anticipation

Nick

Mike Fitzpatrick wrote on Jan 25, 2008

Since it is a Mac system, try:

% cd /iraf
% sudo mkdir extern                     # create /iraf/extern
% sudo chmod 777 /iraf/extern      # let everyone write to it


Then make a /iraf/extern/fuzzy directory, install the package per Lic Simard's instructions, but use the macosx binaries.

-Mike

Nick Devereux wrote on Jan 25, 2008

Mike,

I'm sorry, but I'm totally confused by all this. I tried to do it carefully
the first time around, but failed, so there are some basic concepts
I'm just not getting.

It would be easier for me if I could talk to you on the phone

Please e-mail me devereux@erau.edu

Thanks

Nick

Last post on Jan 25, 2008