![]() ![]()
:%s/ / -dsseso size 60 60 arcmin -save output//g This is only one way of doing it.Įscape the edit mode with ‘esc’ and save your file by typing :wqĭuplicate the column of objects with awk and store it in a file ‘dum.sh’ awk '' listobj.txt > dum.shĪnd enter the following sed commands and hit return after each line. Basically, we are just batch writing a bunch of individual DS9 scripts. Note: we use vi here but you can use a different text editor to perform the same tasks. You are now in the vi editor where you can add one object per line, after hitting ‘i’, such as M31 # First, create a list of objects (vi listobj.txt) This is to show you # Batch scripting easy First, we setup the environment by creating new directories. Note that the first file (file1.fits) doesn’t need a ‘-frame new’ because ds9 creates a frame as it opens. Opening two or more files is just as easy: # Open two images in DS9ĭs9 img/file1.fits -frame new img/file2.fits -tile yes Type or copy/paste the following bit in the Terminal: # Download image in DS9ĭs9 -dsseso M31 -dsseso size 60 60 arcmin -save img/test.fits -exitĬongratulations! You’ve just downloaded a FITS file image centred on the Andromeda galaxy with dimensions of 60×60 square-arcminutes in area, and you have just written your first DS9 script! How wonderful is that! DS9 Scripting – easy If you do not have any FITS file at hand, do not worry! DS9 will provide you some! (you will need to be connected to the internet). Let’s fire this up by opening a FITS file: # Open image in DS9 This should work and give you the path to your installation. Test your installation by doing which ds9 Refresh the terminal by doing source ~/.bashrc bashrc file): #DS9ver8.0.1Įxport PATH = /Applications/ds9ver8:$PATH Saoimage ds9 tutorial how to#profile file where you would put the following lines (I assume you are using bash and you know how to change your. ![]() Create the folder ‘ds9ver8’ and move the two files there. You should now place these two files in the folder of your choice. Which will produce the files ‘ds9’ and ‘ds9.zip’. Unpack it from the Terminal: gunzip ds9.darwinmojave.8.0.1.tar.gzĪnd then untar it tar -xvzf ds9.darwinmojave8.0.1.tar The installation procedure is always the same.Ĭhoose the version that suits you and download it. but it is recommended that you download the most recent version. ![]() Saoimage ds9 tutorial install#We install here, as an example, a more antiquated version v7.5.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |