Personal tools
You are here: Home / COSMOS2 / Frequently Asked Questions

Frequently Asked Questions

Back to Table of Contents

Frequently Asked Questions

Compiling COSMOS
Running COSMOS
Within IRAF
Other Tips

Compiling COSMOS

  1. When I try to compile Tk Perl module, it fails and gives the error "make: *** No rule to make target '/System/Library/Perl/5.8.6/darwin-thread-multi-2level/CORE/config.h', needed by `Makefile'. Stop."

    You probably do not have Xcode developer tools. You can get them from your OS X Install Disc or download them from the Apple Developer website.

  2. When I try to compile COSMOS, it fails and libpgplot.so gives an error "undefined reference to 'png_...'"

    In this occurrence COSMOS is not finding libpng. You need to locate libpng and add its location to the Makefile for all the programs that give this error. It should resemble something similar to the following:

    f77 -o $@ -L$(BASE)/lib -L$(PGLIB) -L$(XLIB) -L$(FITSLIB) $@.o -lcfitsio\
        -lX11 -lspline -lpgplot -lcpgplot -lcosmos /usr/lib/libpng.so.3
    

  3. When I try to compile COSMOS, it fails and libcpgplot.a gives an error "undefined reference to `pg..._'"

    In this case it was reported that by switching the linker order of -lpgplot and -lcpgplot in the Makefile will solve this problem.

  4. When I try to compile COSMOS, it fails and gives an error "/usr/bin/ld: can't find file for: -limacs" (or -lspline)

    In this case the library libimacs.a or libspline.a already exist. The libraries can be found within Cosmos2/source/clardy or Cosmos2/source/dierckx. Simply deleting them and recompiling should solve the problem.

  5. When I try to compile COSMOS on Mac OS X 10.6.x (Snow Leopard), it fails and gives the warning "ld: warning: in /.../.../Cosmos2-15/lib/libspline.a, file is not of required architecture"

    Make sure you are using 64-bit C and FORTRAN compilers, which you can find and download at http://hpc.sourceforge.net. You also need to make sure that the correct compilers will be used, by making sure its path is found in the PATH environmental variable before any other location where previous versions may be installed.


Running COSMOS

  1. When I try to run defineobs, it fails and gives an error "Can't locate Tk.pm in @INC"

    You need to set the PERLLIB environmental variable to the location of Perl Modules.

  2. When I try to run align-mask, it fails and gives an error "dyld: Library not loaded: lib..."

    You probably need to add the path to the missing library to the environmental variables LD_LIBRARY_PATH and DYLD_LIBRARY_PATH.

  3. When I try to run align-mask, it says "Average rotation angle = nan Reset angle?", when I type yes, it fails

    align-mask is not finding the rotation of the dewar. Try decreasing the searchbox, run align-mask again and type no for the response to this question. Repeat this a few times and it should eventually find a rotation. If it does not, refer to Creating and Modifying Dewoff Files to ensure your dewar orientation is correct. If the dewar orientation is off by a large amount, align-mask may not converge and fail in this way.

  4. When I try to run align-mask, it says "insufficient matches to do a fit" and it fails

    It is possible that all the features are getting clipped out, so you may need to increase the siglimit. Another possibility for this failure is that you may be using a feature that does not exist, or the distance is very large outside of the searchbox. If all fails, one can manually tweak the offset, scale and rotation. Refer to Creating and Modifying Dewoff Files on how to do this.

  5. When I try to run spectral-lines, it creates an empty file

    If you are using the IMACS Long Camera, be sure to specify an order and grating angle in defineobs.
  6. When I try to run adjust-map, it says "numerical error" and fails

    Things to try when this occurs:

    • Change the search_height or search_width to a larger or smaller value. Typically these parameters should be no less than 2 pixels and no greater than 14 pixels.
    • Increase the siglimit, it is possible that many features are getting clipped out.
    • Turn histogram mode off, sometimes there is so much confusion for an object that all the features get clipped out.
    • Turn outlier-wt mode off, the weighting can work unusually on some objects.


Within IRAF

  1. When I try to run the task display8, it fails and gives an error "ERROR: Cannot open device (node!imtool..."

    You need to first open DS9 within IRAF by typing !ds9 &.

  2. When I try to run the task display8, it fails and gives an error "ERROR: Attempt to access undefined local variable `scale'."

    You need to uncomment the line #set stdimage = imt800 in your login.cl file, and change its value from "imt800" to something larger like "imt8192" to accommodate larger image files. For example, if you make the aforementioned changes, that line in your login.cl file should look like this:

    set    stdimage       = imt8192


Other Tips

  • If you have scisoft installed on your Mac computer, then it most likely will interfere with the installation and/or running of COSMOS. You would need to do the following in order to get it running properly:
    1. Disable the setup of scisoft in your startup file (e.g. ~/.cshrc, .profile), by commenting it out.
    2. Install PGPLOT and CFITSIO yourself and make sure the locations of those are being included in the Makefile.
    3. Compile COSMOS in a new window with a clean shell to insure that your environment is scisoft-free.
  • If you're installing COSMOS on Mac OS X 10.6.x (Snow Leopard), then you need to make sure you're using 64-bit C and Fortran compilers BEFORE installing dependencies, to insure that the library files are compatible with your system. See #5 above in "Compiling COSMOS" for more information on how to do this.

Back to Table of Contents