乙未除夜有懷

除夜難防思萬千,

依稀別夢得團圓。

他鄕漂泊無人識,

獨對寒燈又一年。

Advertisements
乙未除夜有懷

Install OrbFit on My Mac

So far I have not yet fully successful with the software. But the problem may well be intrinsic in the codes, rather than mistakes during my installation. I have reported a bug to the OrbFit consortium. But anyway I think I need to record my steps of installing it, which may benefit me in the future if I want to reinstall the software.

Step 1: Download the software from the website and unzip it.

Step 2: Change the terminal to tcsh.

Step 3: Type config -O gfortran, Since I’m using gfortran. Other modes will flag -static which leads to errors of ld: library not found for -lcrt0.o.

Step 4: Type make. It should take seconds to finish.

Step 5: Download ASCII formatted of JPL DExxx to directory src/jpleph. I downloaded DE431. Edit makefile if necessary.

Step 6: Type make ephemerides. It is then converting the DExxx from ASCII to binary, which takes about 20 sec on my computer. After it completes a file called jpleph will appear.

Step 7: Copy that file to lib under the main directory of OrbFit, or goto that directory by cd ../../lib, and then type ln -s ../src/jpleph/jpleph jpleph to create an alias.

Step 8: Goto the main directory and test the installation:
make tests
where I am confronted with errors about segmentation, with the latest version OrbFit5.0.

Install OrbFit on My Mac

乙未仲冬既朔觀星

斗轉參橫已五更,

飛星寂寂動欃槍。

夜闌天市無時歇,

萬里平沙太白生。

 

 

IMG_0185

Zodiacal light and me at Joshua Tree National Park. I was observing C/2013 US10. 2015 Dec 13, Canon 5D2, 16-35 mm f2.8 @ 16mm f2.8, ISO 3200, 15-sec exposure.

乙未仲冬既朔觀星

Weird Function TRIANGULATE in IDL

Time to update my blog again. It’s been more than a year since my last update after all. Today I encountered with a weird error in IDL when trying to improve computation precision of own polar transform image routines. The source was traced back to function TRIANGULATE. So far I really have no idea about why it occurs. The example is as follows:

IDL> theta=dindgen(360L)
IDL> rad=dindgen(500L)
IDL> xpol=rad#cos(theta/1.8d2*!dpi)
IDL> ypol=rad#sin(theta/1.8d2*!dpi)
IDL> triangulate,xpol,ypol,tri
% TRIANGULATE: Points are co-linear, no solution.
% Execution halted at: $MAIN$

However, if I type the following TRIANGULATE works flawlessly:

IDL> xpol=rad#cos(float(theta/1.8d2*!dpi))
IDL> ypol=rad#sin(float(theta/1.8d2*!dpi))
IDL> triangulate,xpol,ypol,tri
IDL> help,tri
TRI             LONG      = Array[3, 358920]

This is really annoying, as I can’t figure out how come co-linearity can be related to float or double precision whatsoever. Not sure if anyone could help this for me, but I just throw this problem here and see if there’s anyone else faced with the same encounter so that we can potentially sigh together…

Weird Function TRIANGULATE in IDL

My Record of Installing IDL, SSW and SSWDB on My New Mac OS X

I got a new laptop Mac OS X from Dave and needed to install IDL, SSW and SSWDB on it. The following are the main steps how I installed it successfully.

 

Basic Steps of installation of IDL 8.3 on my Mac OS X

1. Download the installation package from the EXELIS.

2. Click on the icon and follow the instructions of the installation wizard.

3. Put the license into the following directory: Applications/exelis/license.

4. The license wizard pops out automatically after the installation completes. Now select the license file in the panel.

5. Now IDL should be successfully launched by double clicking on the workbench icon, however, if you type idl in the terminal, you will be informed that idl: Command not found. Environment has to be set.

6. Type the following commands in the terminal:

vi .tcshrc

7. See if there is the following lines within the file, insert them otherwise.

setenv IDL_DIR /Applications/exelis/idl83
setenv OS darwin.

In Tshell command line, typing idl will now successfully run IDL.

 

Steps of installation of SSW

1. Fill out and submit the form at http://www.mssl.ucl.ac.uk/surf/sswdoc/solarsoft/ssw_install.html.

2. Follow the instructions in that website and the links therein.

3. Type sswidl in the terminal, but fails, so insert the following lines into the .tcshrc file:

set path=(/usr/local/bin /sw/bin /sw/sbin /usr/local /usr/local/ssw/gen/mirror /usr/X11R6/bin /Applications/exelis/idl83/bin $path .)
setenv SSW_INSTR "lasco secchi"
setenv SSW ssw
setenv SSWDB sswdb
setenv ssw_quiet 1
source $SSW/gen/setup/setup.ssw
source $SSW/soho/lasco/setup/setup.lasco_envsetenv SSWDB /usr/local/ssw/sswdb

Installation of SSWDB

1. Anyway I am not able to generate a configuration file from http://www.lmsal.com/solarsoft/sswdb_configure.html, but there is a file called setup.sswdb_upgrade_template in directory of ssw/site/setup. Add lines indicating the packages in need, or, if there are packages already listed in the template, remove the corresponding “#” at the beginning. Root is required:

sudo vi setup.sswdb_upgrade

2. Follow the steps listed at http://www.mssl.ucl.ac.uk/surf/sswdoc/solarsoft/sswdb_install.html.

3. If Perl is installed in a non-default directory, type
ln -s /usr/bin/perl /usr/local/bin/perl
in the terminal.

4.IDL> sswdb_upgrade, /spawn, /passive_ftp

5. Be patient about Step 4, and it took me rather long.

6. Done!

My Record of Installing IDL, SSW and SSWDB on My New Mac OS X

詩數首

春日葳蕤百越東,棹歌聲裏木棉紅。

回看無數詩和畫,盡在一谿煙雨中。

*********************************************************************************

風斜雲淡月幽冥,耿耿銀河點點星。

夜色惹人眠不得,憑軒醉臥數流螢。

*********************************************************************************

學書廿年有感

佳致何曾經歲失?長臨南帖北碑文。

及今池水還無染,更以孜孜學右軍。

*********************************************************************************

夜來弄墨足風騷,神入中山紫兎毫。

沉醉不知天欲曙,忽驚窗外啓明高。

*********************************************************************************

玉魄西欹藏海波,星槎飛急渡天河。

夜深露重行人絕,織女牽牛相盪摩。

*********************************************************************************

愁思縈懷細雨天,北邙一帶草芊芊。

想來往事還如昨,物換星移又十年。

詩數首