quinta-feira, 16 de setembro de 2010

"Improved 3D Fabry-Perot Data Reduction Techniques" Solved

In this post, we followed the steps described in this site to install a package that reduce 3D data obtained with Fabry-Pérot. We ended with an error regarding to the step number 7, where the 'build_baryc' procedure failed to run.

The solution to this problem envolves basically two steps. The first one, no matter where you start your IDL, it will look for the 'baryc.c' file at your home directory. At least, that happened to me. So, to be sure where you are, once you start IDL, type '$pwd' to know the directory that you are or '$ls baryc.c' to be sure that you have this file in the current folder. If you realize that you are in the wrong place, just type 'cd, "/my/path/to/the/FPreduc"' and, then, try to run 'build_baryc' again.

The second problem that may raise is related to the compiler gcc in Ubuntu. It is a particular problem that seems to happen only in this plattaform (we don't know about the other Unix distributions). According to the author, the error is raised by a stack smash protection that could be enabled by default on Ubuntu. This can be solved by modifying the 'build_baryc.pro' by adding the following line:

cflags='-fno-stack-protector -fno-stack-protector-all'

just before the 'MAKE_DLL' procedure is called. In my case, gcc did not recognized the second flag, so I kept only the first one.

After all of this, just follow the rest of the guideline in the instalation procedures and it will run perfectly.

terça-feira, 14 de setembro de 2010

"Improved 3D Fabry-Perot Data Reduction Techniques" Instalation problems

Ok. From a long time I have been trying to install this package used to do data reduction in astronomical cubes of data. Today, I will follow every step with a lot of attention so I can be sure that I am not doing anything wrong.

------------------------------------------------------------------
1. Install the IDL astrolib library

From the other times that I tried to install FPDRT on my machine, I got a folder from a friend which has the astrolib. This time, I downloaded it from the website. Since my machine is a Ubuntu 10.04 (Unix System), I downloaded the astron.dir.tar.gz. This file seems to be more organized that the other one available for Unix, that's why I choosed it.

Since I have a lot of trash in my lib folder already from other attemps, I created a astrolib folder in my idl folder and unzipped the astro file inside it. After that I added this folder to my IDL PATH variable at the idl_startup.pro. Then, I runned IDL and typed AIRTOVAC to check.

------------------------------------------------------------------
2. Make sure the IDL astrolib library is into your IDL path.

Well... it is. I did this already in the last step.

------------------------------------------------------------------
3. Download the package 3d data reduction package (latest version: 5.03).

Nothing special here.

-----------------------------------------------------------------
4. Uncompress the 3d reduction package into your favorite directory.

Here, I did it into the idl folder. I created a FPreduc directory inside it and uncompressed the files inside it. Only to prevent any error, I gave all premissions to this folder and to the astrolib folder.

------------------------------------------------------------------
5. Add this directory to your !path variable (can be done through the IDL_STARTUP script)

Ok.

------------------------------------------------------------------
6. Go into this directory and start idl.

Ok. Only to be sure...

% pwd
> /home/myhome/.idl/idl/fpreduc
% ls
> FPreduc

------------------------------------------------------------------
7. At the idl prompt, type « build_baryc ». This will compile and install the baryc C submodule.

Then... the error:

IDL> build_baryc
% Compiled module: BUILD_BARYC.
% MAKE_DLL: Writing build script: /home/bquint/.idl/itt/compile_dir-118-
-linux-x86-m32-f64/baryc_10121_salamander.sh
% MAKE_DLL: Writing linker export file: /home/bquint/.idl/itt/compile_dir-118-idl_7_0-linux-x86-m32-f64/baryc_10121_salamander.export
% MAKE_DLL: Running build script: /home/bquint/.idl/itt/compile_dir-118-idl_7_0-linux-x86-m32-f64/baryc_10121_salamander.sh
% gcc -fPIC -I"/home/bquint/.idl/idl70/external/include" -c -m32 -D_REENTRANT "/home/bquint/.idl/idl70/fpreduc/baryc.c" -o "baryc_10121_salamander.o"
gcc: /home/bquint/.idl/idl70/fpreduc/baryc.c: Arquivo ou diretório não encontrado
gcc: no input files
% FILE_COPY: Unable to obtain file status. File: baryc.dlm.orig
No such file or directory
% Execution halted at: BUILD_BARYC 17
/home/bquint/.idl/idl70/fpreduc/FPreduc/build_baryc.pro
% $MAIN$

Trying again inside FPreduc folder... 

~/.idl/idl/fpreduc/FPreduc$ idl
Version 7.0 (linux x86 m32). (c) 2007, ITT Visual Information Solutions
loadable module definition file lacks a MODULE directive:
/bquint/.idl/idl70/fpreduc/FPreduc/._baryc.dlm.
... in the end. #fail




















sexta-feira, 3 de setembro de 2010

IDL Startup Pro

I want to run a .pro file when opening my IDL. To do that, first I have to create a file name idl_startup.pro. I can write any IDL script thing there. Like:

print, "Hello!"

Then, one has to append the folowing lines in .bashrc.

IDL_STARTUP="/my/path/to/idlstartup.pro"
export IDL_STARTUP

After that, simply run IDL.

Problem: Installing QFitsView

When I try to run QFitsView by simply downloading it from its website, it looks for a lib called libstdc++.so.5 and it does not find it. Newer Ubuntu versions (since 10.04 or 9.10) use libstdc++.so.6 instead.

I tried to create a soft link from one to the other but it did not work. So?

Well.. I had to install it from somewhere. The problem is that this lib is not available in the repositories of Ubuntu 10.04 (my case). My solution was simply to add the Jaunty Jackalope repositories to my /ext/apt/sources.list.