Город МОСКОВСКИЙ
00:09:56

NITARP: starting ds9 from the command line in Windows

Аватар
Строительные Решения
Просмотры:
28
Дата загрузки:
26.08.2023 19:26
Длительность:
00:09:56
Категория:
Обучение

Описание

By Milton Johnson, part of the NITARP 2016 class. Notes from Milton:

Overview:
Create a batch file that adds aliases to your command prompt window. The batch file is a text file (notepad) that uses the ‘doskey’ command to define shortcut commands. A shortcut icon will be added to your desktop which appends the alias info to the Cmd.exe file in your Windows System32 folder.
Commands:
doskey llamma=cd \Users\johns\Desktop\llamma
(llama would be folder where images are stored. Can be named whatever you want. I set up a temporary ‘FinderChartFiles’ folder to use.)

doskey fc=cd \Users\johns\Documents\FinderChartFiles
(changes folder directory to FCF- where FITS images are found.)

doskey ds9=start \ds9\ds9.exe -scale mode zscale fc_1*
(This commands DS9 to start and load all FITS files beginning with ‘fc_1..’)

Instructions:
Command Prompt Box:
The command prompt box can be found by pressing the Windows (symbol- bottom left) + X button together. A menu pops up. Select Command Prompt. A black window appears. This is where you will type in your alias commands. Close it for now so when you open it again it loads the aliases.
Alaises: (so much easier with a Mac)
Create Batch file:
Open up Notepad on your computer. You can copy/paste this code: (explanations above)

doskey fc=cd \Users\johns\Documents\FinderChartFiles
doskey ds9=start \ds9\ds9.exe -scale mode zscale fc_1*
[The underline segment above should be specific to you image folder.]
Save file as ‘aliases.bat’ (on your desktop)
Next you need to attach this file to your Command startup application (cmd.exe)
Go to your C drive (\C:). Find Windows folder and then System32 folder. Inside there (a long way down) you will find your Cmd (cmd.exe) application. Right click it to make a shortcut on your desktop.
Go to Cmd shortcup on desktop and right click. Select properties. In target window add
/K C:\desktop\aliases.bat to the existing value. Click ‘okay’.
You can now click on desktop Cmd shortcut and it should open your command box. You should see your aliases listed at the top of box. To test it type ‘fc’ (or whatever your alias is) to see if prompt changes.
At this point, typing ‘ds9’ should open DS9 with the images you have set to open. (Make sure it is set to your correct image folder.)

This is the site I used to learn how to create the alias.bat file and how to append it to the command file. I had to make some adjustments, so it looks a bit different. But a useful site.
https://windowsoptimized.wordpress.com/2011/04/25/creating-aliases-in-doscommand-prompt/

Рекомендуемые видео