Äîêóìåíò âçÿò èç êýøà ïîèñêîâîé ìàøèíû. Àäðåñ îðèãèíàëüíîãî äîêóìåíòà : http://www.astro.spbu.ru/staff/ilin2/EDU/Pages_1-109.pdf
Äàòà èçìåíåíèÿ: Fri Nov 19 16:15:13 2010
Äàòà èíäåêñèðîâàíèÿ: Tue Oct 2 00:23:01 2012
Êîäèðîâêà: Windows-1251

Ïîèñêîâûå ñëîâà: cygnus
Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,

ëíêìäíìêõ ÑÄççõï à èêéÉêÄååàêéÇÄçàÖ Ç MIDAS
ì~žÌÓ ÔÓÒӞˠÎfl ÒÚÛÂÌÚÓ, ÒÚðÓÌÓÏË~ÂÒÍËi ÓÚÂÎÂÌËÈ ÛÌË,ÂðÒËÚÂÚÓ,

ëÌÍÚ-èÂÚÂðžÛð,, ÇÇå 2006


46 - - : . . . , . . .

46

. ., . . MIDAS: . -- .: , 2006. -- 000 . ISBN 5-9651-0241-?

MIDAS (Munich Image Data Analysis System), (ESO), . MIDAS. -- () , . , . MIDAS, , , , /, / . , - 4- ( , 4 ) . MIDAS Linux, MIDAS, Python- MIDAS -. , MIDAS .

( 2.1.1.2852). .. -8542.2005.2.

ISBN 5-9651-0241-?

¿ . . , . . , 2006 ¿ '', 2006


ëéÑÖêÜÄçàÖ
. . . . . . . . . . . . . . . . . . . . . . . . . . I. MIDAS . . . . . II. MIDAS . . . . . III. MIDAS . . . IV. MIDAS . . . . V. MIDAS. . . . . VI. MIDAS . . VII. / MIDAS VIII. IX. MIDAS . : . Linux . . . MIDAS . . . . . . . . . PyMIDAS -- Python- . - MIDAS . . . . . . . . . . . .. .. MI .. ... ... DAS ... . . . . . . . . . . . . . . . . 000 000 000 000 .. .. .. .. .. .. .. MI .. ... ... ... ... ... ... ... DAS ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 11 21 33 40 57 67 84 95 110


èêÖÑàëãéÇàÖ . , . , , . , . , , . : , , , . . , , , . , , . MIDAS, IRAF, AIPS STARLINK IDL.


èðÂËÒÎÓ,ËÂ

5

1. ëËÒÚÂÏ MIDAS -- Munich Image Data Analysis System

(European Southern Observatory, SO). MIDAS 1979 , , , . 1982 MIDAS ESO. 300 -. , MIDAS. 400 ( 300 ). MIDAS : ; ( ); : , , , , , fit; / ; ; . MIDAS : ; (/, . .); (, , , - . .); ; (, , , ); , ; , , , . .


6

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

(. ): : / , , , , , , MIDAS-, , , . .; ; () . MIDAS . , / , . . . 77 MIDAS. http://www.eso.org/projects/esomidas/.
2. ëËÒÚÂÏ IRAF -- Image Reduction and Analysis Facility

(National Optical Astronomy Observatory, NOAO, , ). , . / FITS (Flexible Image Transport System) , , , , , , . . , , : FTOOLS -- , FITS-;


èðÂËÒÎÓ,ËÂ

7

CRUTIL -- , ; FINDER -- Guide Star Catalogue; FOCAS -- , , ; DIGIPHOTX -- DAOPHOT; COLOR -- RGB-; ESOWFI -- ; MSCRED -- -; IMMATCHX -- ; ICE -- - IRAF; GMISC -- , Gemini; STSDAS -- , Hubble Space Telescope; EUV -- , Extreme Ultraviolet Explorer; XRAY -- . , , , - . IRAF UNIX, Solaris. . http://iraf.noao.edu .
3. ëËÒÚÂÏ AIPS -- Astronomical Image Processing System

1978 (National Radio Astronomy Observatory, NRAO, ). , . 400 000


8

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

(on-line) , 2300 , 350 . - , , VLA (Very Large Array) NRAO. . http://www.aoc.nrao.edu/aips/ .
4. ëËÒÚÂÏ STARLINK

STARLINK -- , , . . : , , , , , , , . . STARLINK , , , , . . -- http://star-www.rl.ac.uk/ .
5. ëËÒÚÂÏ IDL -- Interactive Data Language

IDL -- . , , . , , . , IDL , , , , . -


èðÂËÒÎÓ,ËÂ

9

( ) . ( -- -- -- ) IDL. http://www.ittvis.com/idl/ . , , , : , . , , , . , . , . , , FITS-, ds9, skycat, Aladin. , TOPCAT. - -- , . - . : , -- . , , MIDAS IRAF MIDAS STARLINK, ds9, skycat --


10

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

Aladin -- . . , , , . MIDAS. , MIDAS, , , , . Linux, MIDAS, , Python- MIDAS. . .., . .. . .. , , . .. - , , .


0. áÄèìëä à êÄÅéíÄ ë MIDAS

1. áÔÛÒÍ ÒËÒÚÂÏœ

MIDAS 4 inmidas, gomidas, helpmidas, drs. Linux (Unix) man (. ).
1.1.äÓÏÌ inmidas

MIDAS , inmidas. MIDAS- MIDAS. , , /midwork. MIDAS, . inmidas . , man inmidas, , inmidas -help. :
Usage: inmidas [unit] [-h midashome] [-r midvers] [-d display] [-p/-P/-nop] [-m mid_work] [-noh] [-j "midas-command-line"] [-help]

: unit . 00 99, MIDAS .


12

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

unit -- xa zz, , . . ASCII-. 00; -p/-P/-nop MIDAS . MIDAS ( ). -p -P, . -nop . , inmidas inmidas 00 /midwork, , , MIDAS-. -p -P, , MIDAS- (, , ). :
inmidas 00 00 (, , 00, , FORGR00.CTX, FORGR00.KEY, FORGR00.LOG); inmidas 10 -p 10 ; inmidas xx MIDAS .

, (, 10) MIDAS :
Unit 10 is locked by another MIDAS session. To unlock just continue. Do you want to continue [yn]? (n): -r midvers MIDAS. , inmidas . , . , MIDAS 03SEP :


0. áÔÛÒÍ Ë ðžÓÚ Ò MIDAS

13

inmidas -r 03SEP -h midashome , MIDAS, . midashome MIDAS- MIDASHOME. 03SEP, /users/my/proba, inmidas -r 03SEP -h /users/my/proba -m mid_work . /midwork , MIDAS. , 03SEP, /users/my/proba, /users/my/proba/my_observations inmidas -r 03SEP -h /users/my/proba -m /users/my/proba/my_observations -d display X- . , X Windows , MIDAS . , 0.0 gong.astro.spbu.ru inmidas 00 -d gong.astro.spbu.ru:0.0 -j "midas_command" MIDAS- MIDAS, . -noh MIDAS. -help inmidas.
1.2. äÓÏÌ gomidas

gomidas . inmidas , /midwork. gomidas : -d display -m midwork


14

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

, inmidas. inmidas . gomidas , , . , .
1.3. äÓÏÌ helpmidas

helpmidas MIDAS. : -d display -m midwork -r midvers -h midashome , inmidas.
1.4. äÓÏÌ drs

MIDAS Linux.
drs [-d(ebug)] [-u(pdate)] [-f(its output)] Midas_command

: -d Midas_command; -u FITS-, , , ; -f , , FITS-; -h . , Midas_command, drs, FITS- -


0. áÔÛÒÍ Ë ðžÓÚ Ò MIDAS

15

, , MIDAS (.bdf, .tbl), . , drs MIDAS, . , - Linux * ) \, \* \), . , FITS , qq FITS- : drs read/descr ima0001.fits qq\* drs read/descr ima0001.fits "qq*" FITS- , ESO, : drs -u delete/descr ima0001.fits ESO.\* , FITS- MIDAS. , , , ESO, , FITS-. -u. , ima0001.fits .
2. ç~ÎÓ Ë ÓÍÓÌ~ÌË ðžÓÚœ , MIDAS

, MIDAS Linux inmidas , . , , MIDAS, Midas 001> , 001 -- , . MIDAS. , MIDAS BYE


16

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

MIDAS gomidas, .
3. èÍÂÚÌœÈ Ë ËÌÚÂðÍÚË,ÌœÈ ðÂÊËÏœ ðžÓÚœ

, MIDAS . MIDAS . , MIDAS, (), MIDAS , . . , . , , .
4. áÏÂ~ÌËfl Óž ËÌÚÂðÍÚË,ÌÓÏ ðÂÊËÏÂ

MIDAS , , . MIDAS-. : MIDAS- , . . . (, , , , . Linux , , , test.bdf, MIDAS-. READ/DESCRIPTOR TEST, TEST.bdf .) 256 . -- ().


0. áÔÛÒÍ Ë ðžÓÚ Ò MIDAS

17

EXTRACT/IMA pice = testima[100,120:200,220]


EXTRACT/IMA pice = testima[100,120:200,220]

, ;. ! . , . MIDAS, . P1, P2, ..., P8, , . . (, P1-P8 ) STAT/IMA testima [<,<:>,>] ? ? ? test P STAT/IMA testima P6=test P7=P STAT/IMA FRAME=testima OUTTAB=test PLOT=P , Ctrl C. , MIDAS , , MIDAS- . 15 . SET/BUFFER. , Enter. , , , . , MIDAS 3;4 3 4. , : . , , WRITE : :WRITE


18

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

, MIDAS- ! , . 10- 10. , :. . , WRITE, :.WRITE ! ( .:WRITE) , / . , , \ Enter. , \ Enter. MIDAS , $ . , $ ls MIDAS . , , , : SHOW/TABLE mytable -- mytable.tbl EDIT/TABLE . -- EDIT/TABLE mytable . yourtable -- EDIT/TABLE yourtable MIDAS , . . -- -DIR $ls -COPY $cp -@ $sh


0. áÔÛÒÍ Ë ðžÓÚ Ò MIDAS

19

-DELCNF -DELETE -RENAME -TYPE -MORE -PRINT

$rm -i $rm -f $mv $cat $page $lpr

, -COPY MID_WORK:tmp.tbl ./ MIDAS MIDAS , . MIDAS inmidas gomidas login.prg, , MID_WORK ( midwork ). MIDAS . login.prg : !+ ! !+ CREATE/COMMAND RK READ/KEYWORD ! CREATE/COMMAND WK WRITE/KEYWORD CREATE/COMMAND RD READ/DESCR CREATE/COMMAND WD WRITE/DESCR CREATE/COMMAND XH CREATE/GUI HELP CREATE/COMMAND SMOOTH/SPECIAL @@ mysmooth ! ! CREATE/DEFAULT CREATE/GRAPH ? 400,800 ! CREATE/DEFAULT CREATE/DISP ? 600,600,400,400 !


20

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

äÓÌÚðÓÎå̜ ,ÓÔðÓÒœ

1. MIDAS ? 2. inmidas? 3. MIDAS? 4. MIDAS, ? 5. MIDAS, ? 6. MIDAS ? 7. MIDAS (MIDAS-) '' ? 8. MIDAS ?. 9. ? 10. MIDAS ? 11. MIDAS login.prg? 12. MID_WORK?


I. üáõä èêéñ ÖÑìê MIDAS

1. èðÓ^ÂÛðœ MIDAS

, MIDAS . , -- , , . . , . MIDAS, MIDAS Command Language MCL. , MCL, .
2. éÔÂðÚÓðœ ÔðÓ^ÂÛð

MIDAS , . , , , , , . MIDAS, , , MCL.
3. èÂðÂÏÂÌ̜ -- ÍÎ~Â,œÂ ÒÎÓ,

MIDAS -- . , , .


22

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

15 . real, integer, character double precision. .
4. ãÓÍÎå̜ ÍÎ~Â,œÂ ÒÎÓ,

, . . . , , . . , . : DEFINE/LOCAL kx/D/1/1 0.1000000000000001 DEFINE/LOCAL werter/I/1/4 2,0,1 DEFINE/LOCAL kxa/R/2/4 2.0,3.0 DEFINE/LOCAL aw/C/1/5 abba DEFINE/LOCAL kxb/I/1/20 5 all DEFINE/LOCAL awa/C*5/1/4 abcde all , . I, R, D C integer, real, double precision character; , ; , , () , , -- . all . :
àÏfl íËÔ ÑÎËÌ ç~Îå̜ ÁÌ~ÂÌËfl

kx werter kxa aw kxb awa

double prec. integer real character integer character

1 4 3(4) 5 20 20

kx(1) = 0.1000000000000001 werter(1) = 2; werter(2) = 0; werter(3) = 1 kxa(2) = 2.0; kxa(3) = 3.0 aw = abba kxb(1) = 5; ...; kxb(20) = 5 awa(1) = awa(2) = awa(3) = awa(4) = abcde;


I. üÁœÍ ÔðÓ^ÂÛð MIDAS

23

: 1) MIDAS , , (, werter(4)), . . , , MIDAS. ; 2) , MCL , , kxa(1) () ; 3) '' '' ( (., , werter), -- (. aw), , " " ( awa 4- 5 ). , , . . werter werter(1) MIDAS. , . .
5. àÏfl Ë ÁÌ~ÂÌË ÔÂðÂÏÂÌÌÓÈ

( ). . {kxa}, ; kxa, . .


24

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

6. Ç,Ó Ë ,œ,Ó ÁÌ~ÂÌËÈ ÔÂðÂÏÂÌÌœi

- , : WRITE/OUT <_> <_> . , WRITE/OUT kx = {kx} kx = 1.00000E+00 , kx {} , {kx} -- . , , SET/FORMAT (. . 17). : -- I4 ( , ), -- E15.8, : -- I4 ( ), -- E12.5.
7. äÍ ÔðËÒ,ÓËÚå ÁÌ~ÂÌË ÔÂðÂÏÂÌÌÓÈ

, WRITE/KEYWORD. , WRITE/KEYWORD kxa/R/3/2 2.7,3.2 2.7 kxa, 3.2 -- . , , : kxa(4) = 2 ( ). , , MCL DEFINE/LOCAL


I. üÁœÍ ÔðÓ^ÂÛð MIDAS

25

MIDAS WRITE/KEYWORD, . . kxa. . , -- ( ) , MIDAS kxa(4) = 2 + 10 * {kxa(2)} INQUIRE/KEYWORD IN_A "Enter name of image:" , MIDAS , Enter. , new_word INQUIRE/KEYWORD new_word/c/1/5 "Give a name:"
8. ÉÎÓžÎå̜ ÍÎ~Â,œÂ ÒÎÓ,

WRITE/KEYWORD -- , . WRITE/KEYWORD kk/I/1/3 1,4,9 kk(1)= 1, kk(2)= 4, kk(3)= 9. DEFINE/LOCAL .
9. ÄÎ,,žðË~ÂÒÍË ,œðÊÂÌËfl

MIDAS : + - * / (), . kxa = (5.6 * ({kxa} + 4) -- 1) / 3.1


26

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

10. åÚÂÏÚË~ÂÒÍËÂ ÙÛÌÍ^ËË

. M$LN (arg1) real/double arg1 M$LOG10 (arg1) real/double arg1 M$EXP (arg1) real/double arg1 M$SIN (arg1) real/double arg1 M$COS (arg1) real/double arg1 M$TAN (arg1) real/double arg1 M$ASIN (arg1) real/double arg1 M$ACOS (arg1) real/double arg1 M$ATAN (arg1) real/double arg1 M$SQRT (arg1) real/double arg1 M$ABS (arg1) integer/real/double arg1 M$NINT (arg1) integer real/ double arg1 , ! . , .
11. ñËÍÎœ

DO <> = <> <> <> <> ENDDO DO ENDDO -- , <> -- (integer) , <>, <>, <> -- , <> -- MIDAS. , a = 5.0:
DEFINE/LOCAL n/I/1/1 0 DEFINE/LOCAL end/i/1 2 DEFINE/LOCAL a/R/1/1 0.0


I. üÁœÍ ÔðÓ^ÂÛð MIDAS

27

DO n = 1 {end} 2 a = {a} + 2.5 ENDDO

, n =, = 1 , - . , MIDAS 1 , <> <>!
12. ìÒÎÓ,̜ ÓÔÂðÚÓðœ

: ) IF <> <> ) IF <> THEN <> ... ENDIF ) IF <> THEN ... ELSEIF <> THEN ... ELSE ... ENDIF 8 IF. ELSEIF. <>
.EQ. () .NE. ( ) .LT. () .LE. ( ) .GT. () .GE. ( )

, i 5, b = 7. IF i .EQ. 5 THEN b=7


28

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

ENDIF

, .EQ. . . .
13. äÓÏÏÂÌÚðËË

! MIDAS. : ! this is a comment WRITE/OUT kxa ! this is a comment too (. . kxa ) ! .
14. ë,flÁå Ò ÓÔÂð^ËÓÌÌÓÈ ÒËÒÚÂÏÓÈ

MIDAS UNIX, Linux, Windows XP ( cygwin, UNIX/Linux X Windows). Linux . MIDAS, , , , . $ MIDAS-. , MIDAS inmidas , . . , , , $cd . MIDAS CHANGE/DIRECTORY.
15. èðÏÂÚðœ ÔðÓ^ÂÛðœ

, : DEFINE/PARAMETER P1 <_> <> <> <_>,<_>


I. üÁœÍ ÔðÓ^ÂÛð MIDAS

29

<> N (number), C (character), T (table), I (image) F (fit file), , , ( )! MIDAS, DEFINE/MAXPAR 2 , . . MIDAS , , . + <_>. DEFINE/PARAMETER . MIDAS . , middumm. & . -- DEFINE/PARAM pl ? ima "Enter input frame: " DEFINE/LOCAL lc/c/1/60 {p1} FILTER/DIGIT {lc} &qq laplace ! middummqq.bdf , , DELETE/TEMP.
16. ÇœÁÓ, ÔðÓ^ÂÛðœ

, @@, ( ) (. ).


30

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

17. èðËÏÂð ÔðÓ^ÂÛðœ

, , . z = x**y x y. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! exm1.prg -- procedure to calculate z = x**y ! CROSSREF x y ECHO/FULL ! SET/FORMAT I4 ! SET/FORMAT F12.8,E24.16 DEFINE/PARAMETER p1 + NUMBER "Enter x: " DEFINE/PARAMETER p2 + NUMBER "Enter y: " DEFINE/MAXPAR 2 DEFINE/LOCAL x/i/1/1 DEFINE/LOCAL y/r/1/1 DEFINE/LOCAL z/d/1/1 WRITE/KEYWORD z1/d/1/1 WRITE/KEYWORD x {p1} WRITE/KEYWORD y {p2} WRITE/OUT x = {x} y = {y} IF x .EQ. 0d0 THEN z = 0.0 ELSE z = M$EXP ({y} * M$LN ({x})) ENDIF WRITE/OUT z = {z} z1 = {z} !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! MIDAS @@ exm1.prg 2 2.0 : x = 2 y = 2.00000000 z = 4.0000000000000000E+00


I. üÁœÍ ÔðÓ^ÂÛð MIDAS

31

CROSSREF SET/FORMAT, , , MIDAS, .
18. ëÔËÒÓÍ ÍÓÏÌ MCL

MIDAS. BRANCH var comparisons labels
CONTINUE CROSSREF label1 ... label8 DEFINE/LOCAL keyword data all_flag level_flag DEFINE/PARAMETER par def type prompt limits DEFINE/MAXPAR no_par DO loopvar = begin end step ... command body ... ENDDO ENTRY proc GOTO label IF par1 op par2 command IF par1 op par2 THEN ... if-sequence ... ELSEIF par3 op par4 THEN ... else if-sequence ... ELSE ... else-sequence ... ENDIF label: PAUSE RETURN par1 ... par3 ECHO/FULL levela,levelb ECHO/OFF levela,levelb ECHO/ON levela,levelb WRITE/ERROR ! comment


32

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

MIDAS, COMPUTE/KEYWORD reskeyword = expression SET/FORMAT format_specs WRITE/OUT text
INQUIRE/KEYWORD key [prompt_string] [flush_opt]
ìÔðÊÌÂÌËfl

1) , ax2 + bx + c = 0, a, b c -- , x1 = 2 2 = (-b + (b - 4ac) ) / (2a); x2 = (-b - (b - 4ac) ) /(2a). , 2 b - 4ac < 0 . 2) , b c ( ) a, : a1, da an (, a, 16 0.5 24). ( ) , . . . - -- x11 x21.


II. ëèêÄÇäÄ à éíãÄÑäÄ Ç MIDAS

MIDAS . , on-line ( -- . . 8 ), . MIDAS, .
1. ëÔð,Í , ÚÂÍÒÚÓ,ÓÈ ÏÓÂ

MIDAS (. . 0 ), : HELP . MIDAS COMMAND/QUALIFIER par1 par2 ... par8 COMMAND -- , QUALIFIER -- , par1 -- . . , -- , , . , command, : HELP command ,


34

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

HELP command/qualifier

, , (, [par3]), . ( ) , - , , WRITE/KEYWORD ?? WRITE/KEYWORD. , (, CO), CO? , CO.
2. ëÔð,Í , ,,ðÙË~ÂÒÍÓÈ ÏÓÂ

, . , MIDAS . , , UNIX/Linux, , X Windows. , . , X Windows, : CREATE/GUIDE HELP MIDAS. , . . , , , , . History , . helpmidas (. 0).


II. ëÔð,Í Ë ÓÚÎÍ , MIDAS

35

3. ëÔð,Í Ó MCL

MIDAS (MCL) : HELP/CL , HELP/CL command command.
4. ÇÒÚðÓÂÌÌœÈ Û~žÌËÍ

MIDAS (tutorial), MIDAS. , , TUTORIAL/HELP MIDAS (. . ). , , , TUTORIAL, PC.
5. éÚÎÍ Ò ECHO

MIDAS . , ECHO FULL, ON OFF , : ECHO/ON ( ); ECHO/FULL , , {} MIDAS; ECHO/OFF .


36

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

, : ECHO/ON DEFINE/LOCAL a/d/1/1 0d0 a = {a} + 1d0 ( ). ECHO/ON ECHO/FULL, a = 0.00000E+00 + 1d0
6. éÚÎÍ Ò DEBUG

DEBUG/PROCEDURE level_min,level_max switch level_min level_max -- , 1 1 , switch -- ON|OF. , -- () . Mdb> Enter, . . Mdb> () , . h Mdb> h .
èÓÍÓÏÌ áÌ~ÂÌËÂ

go quit r keyword pause

keyword MIDAS [ , MIDAS CONTINUE]


II. ëÔð,Í Ë ÓÚÎÍ , MIDAS

37

, MIDAS, , . . GO Go ! , - -- MIDAS DEBUG/PROCEDURE 1,3 ON . : Mdb> r my_keyw my_keyw -- , . (), DEBUG/PROCEDURE level_min,level_max OFF .
7. íÂÒÚÓ,fl ÚðÌÒÎfl^Ëfl

MIDAS ( . .). TRANSLATE/SHOW proc X proc -- , MIDAS-.
8. éžÁÓð ,ÓÁÏÓÊÌÓÒÚÂÈ ÍÓÏÌœ HELP

, , HELP, MIDAS.
äÓÏÌ çÁÌ~ÂÌË èðËÏÂð

HELP pattern? HELP com HELP command/qualif

MIDAS , pattern CO? , com, HELP READ HELP command/qualif READ/KEY


38

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

äÓÏÌ

çÁÌ~ÂÌËÂ

èðËÏÂð

command/quali f ?? HELP/QUALIF qualif HELP/SUBJECT HELP/SUBJECT subject HELP/CL HELP/CL command HELP/KEY keyword HELP [topic]

HELP/APPLIC HELP/APPLIC applic

HELP/KEY INPUTI - HELP [News] topic. : DataInput -- MIDAS; ImageDisplay -- MIDAS- ; Printers -- MIDAS; TapeDevices -- , ; News -- . ( , .) - HELP/APPLIC applic AUTOCUTS

command/qualif , qualif subject MCL -- MIDAS MCL command keyword

READ/KEY ?? HELP/QUALIF TABLE

HELP/SUBJECT TABLE

HELP/CL IF

ìÔðÊÌÂÌËfl

: - -- MIDAS. 1) (qualifiers) MIDAS- WRITE? 2) OPEN/FILE?


II. ëÔð,Í Ë ÓÚÎÍ , MIDAS

39

3) IF- help' MCL- IF? 4) TUTORIAL PLOT Mercury ( PC, )? 5) TASK4.PRG: ECHO/FULL DEFINE/PARAMETER p1 + number DEFINE/LOCAL a/d/1/1 0 IF {p1} .LT. 0d0 THEN a = {p1} * (-1) WRITE/OUT abs(p1) = {a} ELSE IF {p1} .EQ. 0d0 THEN WRITE/OUT abs(p1) = 0 ELSE WRITE/OUT abs(p1) = {a} ENDIF @@ TASK4.PRG 1 6) ( Mdb>) TASK4.PRG, @@ TASK4.PRG -2 DEBUG/PROCEDURE 1,3 ON ? 7) Mdb> pause ( ): CON, con, cont CONT ?


III. ëàëíÖåÄ íÄÅãàñ Ç MIDAS

0. Ç,ÂÂÌËÂ

. . , MIDAS . , , , . . , MIDAS . MIDAS : , / . , MIDAS .
1. ëÚðÛÍÚÛð ÚžÎË^

MIDAS , (columns) (rows). : (integer), (real), (character), .


III. ëËÒÚÂÏ ÚžÎË^ , MIDAS

41

(label) , (format) , , (physical units) . , Fortran. : -- Wavelength, -- E10.6 -- cm. , () SELECT SEQUENCE ( . ). (, #2 ) (, :Flux); -- :SEQUENCE ( :SEQ) SELECT ( SEL, !). (, @3 ). @ #. , NULL * , , . , (character) -- . : (records), . . , (transposedly) . . .tbl. MIDAS, Unix/Linux (more, less .) (joe, jed, vi . .). MIDAS- .
2. ëÓÁÌË ڞÎË^œ

, , CREATE/TABLE table ncol nrow table -- , ncol nrow -- . , ,


42

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

. , -- ( ) , , , t6 t6.tbl. . . CREATE/COLUMN table column unit format type table -- , column -- (label) , unit -- , (, 'sec'), format -- , ( , An, Fn.m, En.m), type -- (, R*4 R*8 (real) ; I*1, I*2, I*4 (integer); C*n (character) n . .). , CREATE/TABLE t6 8 8 CREATE/COLUMN t6 lambda "micron" F8.3 R*4 CREATE/COLUMN t6 flux "Jy" E16.8 R*8 MIDAS- t6 ( t6.tbl), ( :SEQUENCE SELECT) :lambda :flux. . , DELETE/COLUMN table column table column , CREATE/COLUMN, .
3. äÍ ÔÓÏÂÒÚËÚå Ì̜ , MIDAS-ÚžÎË^Û

: ASCII-, MIDAS.


III. ëËÒÚÂÏ ÚžÎË^ , MIDAS

43

3.1. àÁ ASCII-ÙÈÎ , MIDAS-ÚžÎË^Û

(ASCII) , , (. . ), MIDAS-
CREATE/TABLE table ncol nrow file

table -- , , ncol nrow -- , file -- ( ) , . , ASCII- TNK.dat 1 1.0 9 3 4.0 50 257 05 6 23 470 ( ),
CREATE/TABL t6 2 4 TNK.dat

-- t6.tbl, :
Table : t6 Sequence LAB001 LAB002 -------- --------------- --------------1 1.000000E+00 1.000000E+00 2 3.000000E+00 4.000000E+00 3 2.000000E+00 5.000000E+00 4 5.000000E+00 6.000000E+00 5 4.000000E+00 7.000000E+00 -------- --------------- ---------------

, , (LAB00*), .. . -- 5 , 4, CREATE/TABL.


44

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

, (. . MIDAS) MIDAS- ASCII-. MIDAS-. , ASSIGN/PRINT FILE file PRINT/TABLE table table -- MIDAS-, file -- ASCII-, . : PRINT/TABLE table >file
3.2. àÌÚÂðÍÚË,ÌœÈ ðÂÍÚÓð ÚžÎË^

EDIT/TABLE table MIDAS- table , . , t6.tbl, .3.1, :
Sequence?LAB001 ?LAB002 ? ????????????????????????????????????????? 1? 1.000000E+00? 1.000000E+00? 2? 3.000000E+00? 4.000000E+00? 3? 2.000000E+00? 5.000000E+00? 4? 5.000000E+00? 6.000000E+00? 5? 4.000000E+00? 7.000000E+00?

, , . TAB. -- . , , Ctrl Z. ??????????????????????????????????????????????????? ?? ? Command: ? ???????????????????????????????????????????????????


III. ëËÒÚÂÏ ÚžÎË^ , MIDAS

45

:
quit -- ; exit -- ; help -- .
3.3. äÓÏÌ Îfl ÏÓËÙËÍ^ËË ÎÂÏÂÌÚÓ, ÚžÎË^œ

MIDAS
WRITE/TABLE table col row-sel value

, value, MIDAS- table col row-sel. ,
WRITE/TABLE t6 #2 @3 44

44.0 (3,2) MIDAS t6. , , (label), , # ( -- @). (LAB002) t6, :
WRITE/TABLE t6 :LAB002 @3 44
4. èðÓÒÏÓÚð MIDAS-ÚžÎË^

MIDAS , MIDAS- -- .
SHOW/TABLE table

MIDAS- table. .
READ/TABLE table


46

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

table ( ). , () :SEQUENCE '' ( ) . , , ( MIDAS , CREATE/GRAPHICS , , , X Windows Linux -- . ). :
PLOT/TABLE table plane1 plane2

plane1 plane2 -- ( ) , .
OVERPLOT/TABLE table plane1 plane2

, '' ( , , ). , . , . p5 , ( ), p6 , . .
p5 ëËÏ,ÓÎ p5 ãËÌËfl

0 1 2 3 4 5 6 7 8



0 1 2 3 4 5 6

- --


III. ëËÒÚÂÏ ÚžÎË^ , MIDAS

47

, , PLOT/TABLE t6 #2 #1 p5=4 p6=2 #1 ( y, x #2) , .
5. èðÂÓžðÁÓ,ÌËfl ÚžÎË^

'' MIDAS- ASCII .3.1. '' MIDAS- (keywords), (images) . . : COPY/TK table col row keyword (row,col) table keyword; COPY/KT keyword table col row . keyword table; COPY/TI table image image table; COPY/IT image table table image.
6. ÇœÂÎÂÌË ~ÒÚË ÚžÎË^œ

( ) MIDAS. SELECT/TABLE table logical-expression logical-expression , . : + - * / **


48

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

: .LE. .LT. .GE. .GT. .EQ. .NE. : .AND. .OR. .NOT. : SQRT(:a) LN(:a) LOG10(:a) EXP(:a) SIN(:a) COS(:a) TAN(:a) ASIN(:a) ACOS(:a) ATAN(:a) ABS(:a) INT(:a) MIN(:a,:b) MAX(:a,:b) MOD(:a,:b) . , . , SELECT/TABLE COMPUTE/TABLE , MIDAS MCL, m$ ! (), : SELECT/TABLE t6 SQRT(:LAB001) .LT. 2 .AND. :LAB002 .GT. 3 SELECT (0 -- , 1 -- ). , SELECT , , , . , , . . , , READ/TABLE t6 ( ) . , , , . . . : PRINT, PLOT, OVERPLOT, STATISTIC, COPY (input), MERGE (input), PROJECT, READ, REGRESSION. , . SELECT/TABLE table ALL . , , . , COMPUTE/TABLE, , ,


III. ëËÒÚÂÏ ÚžÎË^ , MIDAS

49

SELECT/TABLE.
7. äÓÔËðÓ,ÌË ڞÎË^

UNIX/Linux / ($cp/$mv) ( MIDAS-) (), MIDAS MIDAS- . MIDAS COPY/TT in-table column1 [out-table] column2 column1 in-table colunm2 ( , , out-table). . COPY/TABLE in-table out-table in-table out-table -- . SELECT, , ( ). MERGE/TABLE table1 [table2 ...] out-table ( ) out-table. , , table1, table2, ... PROJECTION/TABLE in-table out-table columnselection , columnselection, . : PROJECTION/TABLE bigtable smalltable #2 smalltable , bigtable.


50

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

8. éÔÂð^ËË ÒÓ ÒÚÓΞ^ÏË

COMPUTE/TABLE table column = expression table -- , column ( , , , ), , expression -- , . , .6. , , -- (character). , SELECT , MIDAS . ( ):
SELECT/TABLE cfa :mag .LT. 15 .AND. :vel .GT. 1000 cfa.tbl, , 15- 1000 /; COMPUTE/TABLE cfa :z = min(:mag,:r) + (1 -- SEL) * :vel , (:mag :r) , ( ) ; COMPUTE/TABLE cfa :surf_bright = 2.5 * log10(10**((0.4 * :mag) / (:d**2))) ( !).


III. ëËÒÚÂÏ ÚžÎË^ , MIDAS

51

9. ëÔÂ^ËÎå̜ ÓÔÂð^ËË Ò ÚžÎË^ÏË

MIDAS , . STATISTICS/TABLE table column table column . , ( ), . OUTPUTR, . HISTOGRAM , PLOT/HISTOGRAM table column READ/HISTOGRAM table column . REGRESSION LINEAR POLYNOMIAL . , REGRESSION/POLYNOMIAL table y x1[,x2] degree1[,degree2] y ( ), x1 x2 -- (), degree1 degree2 -- x1 x2 . OUTPUTD, OUTPUTR ( , STATISTICS/TABLE !), OUTPUTI OUTPUTC ( . HELP ). (, , ). :


52

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

REGRESSION/POLYNOMAIL table :z :x,:y 2,3 SAVE/REGRESSION table test COMPUTE/REGRESSION table :my_fit = test

z(x,y), table, x, 2, y, 3; . . p (x, y) = ax2y3 + bx2y2 + cxy3 + ... SORT/TABLE table column table , column . MIDAS (., , REBIN, INTERPOLATE . .).
10. îÓðÏÚËðÛË ÙÈÎœ

, CREATE/TABLE MIDAS- (table format file). .fmt : DEFINE/FIELD pos1 pos2 type [format] label [unit] pos1 pos2 -- a ( ); type -- R, D, I C; format, label unit , CREATE/COLUMN (. . 2 ). , TNK.dat, 1 1.0 9 3 4.0 50 257 05 6 23 470 TK.fmt, 2 : DEFINE/FIELD 1 3 I I3 :TIME "sec" DEFINE/FIELD 4 9 R F5.2 :FLUX "Jy"


III. ëËÒÚÂÏ ÚžÎË^ , MIDAS

53

CREATE/TABL t6a 2 4 TNK.dat TK.fmt

t6a ( t6a.tbl), : Table : t6a
Sequence TIM FLUX -------- --- ----1 1 1.00 2 3 4.00 3 2 5.00 4 5 6.00 5 4 7.00 -------- --- -----

.3.1 ( ) , - .
11. ëÔËÒÓÍ ÍÓÏÌ Îfl ðžÓÚœ Ò ÚžÎË^ÏË

. , HELP command/qualifier . COMPUTE/TABLE table column = expression COMPUTE/REGRESSION table column = name[(ind-vars)] COMPUTE/HISTOGRAM image = table column COMPUTE/HISTOGRAM table/TABLE = table column CONVERT/TABLE image = table indv[,indv] depv refima method [par] COPY/KT keyword table column row COPY/TK table column row keyword COPY/TI in-table out-table COPY/IT in-image out-table COPY/TT in-table column [out-table] column


54

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

COPY/TABLE in-table out-table CREATE/COLUMN table column [unit] [format] [type] CREATE/TABLE table ncol nrow filename [formatfile] DELETE/COLUMN table column [...] EDIT/TABLE table [ncol nrow] IDENTIFY/CURSOR table identifier x [y] [tolerance] IDENTIFY/GCURSOR table identifier x [y] [tolerance] INTERPOLATE/IT out-table i,d in-image [s] [degree] INTERPOLATE/TI out-image in-table refima [s] [degree] INTERPOLATE/TT out-table i,d in-table i,d [s] [degree] JOIN/TABLE tab1 col1,col2 tab2 col1,col2 outtab tol1,tol2 LOAD/TABLE table col1 col2 [ident] [symbol] [size] [color] [flag] MERGE/TABLE table1 [table2 ...] out-table NAME/COLUMN table column [column] [unit] [format] OVERPLOT/HISTOGRAM tab col [offset] [log] [opt] [bin[,min[,max]]] [exc] [log] [opt] OVERPLOT/TABLE tab col1 col2 [x_sc,y_sc[,x_off,y_off]] [symbols] [lines] [flag_dir] PLOT/HISTOGRAM tab col [x_sc,y_sc[,x_off,y_off]] [bin[,min[,max]]] [exc] [log] [opt] PLOT/TABLE table column1 column2 [sc-x,sc-y] PRINT/HISTOGRAM table column [bin [min [max]]] PRINT/TABLE table [column1 ...] [row1 [row2]] [file [format]] PROJECTION/TABLE in-table out-table column [column ...]


III. ëËÒÚÂÏ ÚžÎË^ , MIDAS

55

READ/HISTOGRAM table column [bin [min [max]]] READ/TABLE table [column1 ...] [row1 [row2]] [format] REBIN/IT out-table i,d[,b] in-image [func] [parm] [intop] REBIN/TI out-image in-table i,d[,b] refima [func] [parm] [intop] REBIN/TT out-table i,d[,b] in-table i,d[,b] [func] [parm] [intop] REGRESSION/LINEAR table dep-var ind-var1[,ind-var2] REGRESSION/POLYNOMIAL table dep-var ind-var1[,indvar2] degree1[,degree2] RETRO/TABLE table SAVE/REGRESSION table name SELECT/TABLE table logical-expression SET/REFCOLUMN table column SHOW/TABLE table SORT/TABLE table column STATISTICS/TABLE table column WRITE/TABLE table column row value
ìÔðÊÌÂÌËfl

, 5 (p1, p2, p3, p4, p5) : 0) TAB1.dat MIDAS- TAB1.tbl, TAB1.fmt. TAB1.dat TAB1.fmt : -- 00 3.14159265 3.14159265 , , MIDAS-.


56

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

1) 2) 3) 4) 5) 6) 7) 8) 9) 10) 11)

, TAB1.tbl TAB2.tbl (. ) ; TAB2.tbl c : TIME ( ) FLUX ( //2); TIME p1 ( 0.5) p2 (9.5) p3 (0.5); FLUX , TIME + sin(TIME*pi/180*p4), p4 -- ( 3.0); FLUX = -p5, p5 -- ( 5.0); TAB1.tbl TAB2.tbl TAB.tbl; TAB.tbl , TIME ; 2 : TAB.tbl, -- FLUX ( SELECT); , , FIT1 FIT2; , ( -- , -- ), , FLUX; FIT2; TAB.tbl.


IV. ÄèèêéäëàåÄñàü Ç MIDAS

0. Ç,ÂÂÌËÂ

/ -- , , , , . . , y = f (x), ( x y), fa (x, a, b, ...), (a, b, ...) x. , . , . . , , , REGRESSION/POLYNOMIAL. MIDAS , MIDAS- (image), .
1. ÄÔÔðÓÍÒËÏËðÛËÂ ÙÛÌÍ^ËË

MIDAS . , '' MIDAS, , .


58

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

1.1. ëÚÌðÚ̜ ÔÔðÓÍÒËÏËðÛË ÙÛÌÍ^ËË

POLY(X;A,B,C,...) = a + bx + cx2 + POLY(X,Y;A,B,...) = a + bx + cy + LOG(X;A,B,C) = a ln (b + cx) EXP(X;A,B,C) = a exp (b + cx) SIN(X;A,B,C) = a sin (b + cx) TAN(X;A,B,C) = a tan (b + cx) GAUSS(X;A,B,C) = a exp {-ln 2 [2 (x - LORENTZ(X;A,B,C,D) = a {1 + [2 (x -

... ...

b)/c]2} b)/c]2}

-d

.
1.2. ÄÔÔðÓÍÒËÏËðÛË ÙÛÌÍ^ËË, ÓÔðÂÂÎflÂϜ ÔÓÎåÁÓ,ÚÂÎÂÏ

, . , , .2).
===================================================================

C+ C.NAME C USER00 C C.DESCRIPTION C One dimensional polynomial of NPAR degree. C C.INPUT ARGUMENTS: C NIND INTEGER Number of independent variables C X (NIND) REAL Array with values of these variables C NPAR INTEGER Number of parameters C PARAM (NPAR) DOUBLE PRECISION Array with values of the parameters C C.OUTPUT ARGUMENTS: C Y DOUBLE PRECISION Value of the function


IV. ÄÔÔðÓÍÒËÏ^Ëfl , MIDAS

59

C DERIV (NPAR) DOUBLE PRECISION Array with values of derivatives CSUBROUTINE USER00 (NIND,X,NPAR,PARAM,Y,DERIV) IMPLICIT NONE C INTEGER NIND,NPAR,I DOUBLE PRECISION Y C REAL X(NIND) DOUBLE PRECISION PARAM(NPAR),DERIV(NPAR) C Y = 0.0d0 DO I = 1, NPAR Y = Y + PARAM(I) * X(1)**(I-1) DERIV(I) = X(1)**(I-1) ENDDO C RETURN END
===================================================================

: 1) : USER00, USER01, ..., USER09; 2) , : user00.for, user01.for, ..., user09.for; 3) , / ; 4) IMPLICIT, DO--ENDDO . CREATE/FUNCTION func func -- user00, user01, ... user09, , func.for, MIDAS (. . 1.1).


60

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

2. ÇœžÓð ÔÔðÓÍÒËÏËðÛÂÈ ÙÛÌÍ^ËË

EDIT/FIT name fit name ( .fit). name.fit , . : EDIT/FIT 12-APR-1984 JDP
name_fit Sequence?FUNCTIONS ? ????????????????????????????????????????????....... 1?_ ? 2? ? 3? ? 4? ? 5? ? 6? ? 7? ? 8? ? 9? ? 10? ? ...

-- , . , , , , EDIT/TABLE (. III.3.2). Ctrl z. , .III.3.2. , . . , F(x;a,b,c) = a*sin(-b*x) + 3*exp(x/c+b)


IV. ÄÔÔðÓÍÒËÏ^Ëfl , MIDAS

61

fit- my_fit
1?SIN(X;A1,B1,C1) 2?EXP(X;A2,B2,C2)

, A1 = a, B1 = 0, C1 = -b, A2 = 3, B2 = b, C2 = 1/c ( A1 A2). , ( 0), , ( . ). , . , . , , : i) FUNCTIONS PARAMETERS; ii) , , , . , F(...):
1?A1=a B1=0.@ C1=-b 2?A2=3.@ B2=C1 C2=d

a, b, c -- , d = 1/c. : 1. A2=C1 , A2 C1 (. F(x;a,b,c), , b ). 2. @ , . , . ,
1?USER00(X;A,B,C)

. , USER00, , -


62

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

NIND=1 NPAR=3 , , : USER00(X;A,B,C) = a + b*x + c*x*x
3. éÔ^ËË ÔÔðÓÍÒËÏ^ËË

( ) , , , MIDAS. SET/FIT METHOD=method PRINT=n WEIGHT=w FUNCT=f FCTDEF=u / , = ( -- . , MIDAS ). .
éÔ^Ëfl áÌ~ÂÌË ãÓÏÏÂÌÚðËË

METHOD () PRINT n WEIGHT (. HELP ) FUNCT FCTDEF ,

method=NR -- -- ( ) n -- w=S -- w=C -- . . f -- fit-, u=USER, ; u=SYST,

, fit- my_fit, (. . 2), SET/FIT METHOD=NR PRINT=1 WEIGHT=C FUNCT=my_fit . SHOW/FIT


IV. ÄÔÔðÓÍÒËÏ^Ëfl , MIDAS

63

4. èðÓ^ÂÒÒ ÔÓ,,ÓÌÍË

, , , FIT/TABLE nfeval[,prec[,metpar]] table depcol indcol nfeval -- ( , method=NR), prec -- , , metpar -- (, NR -- -- 1, -- 0.3-0.9), table -- MIDAS-, depcol indcol -- () (), . , FIT/TABLE 30,0.001 my_table :flux :lambda , :flux, 0.001 ( 30 ). , . , , ( !) 10% . .
5. áÌ~ÂÌËfl ÔÔðÓÍÒËÏËðÛÂÈ ÙÛÌÍ^ËË

, . , . , COMPUTE/FIT table outcol = f(indcol) table -- MIDAS-, f -- fit ( ), indcol -- (), output -- () . , f ( .


64

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

, fit- () , . , fit- my_fit SELECT/FUNCTION my_fit 2 COMPUTE/FIT my_table :approx = my_fit(:x1) my_fit.fit (. . EXP(X;A2,B2,C2)) (A2, B2, C2), ( FIT/TABLE).
6. Tutorial Îfl FIT

(tutorial), ( Linux)
TUTORIAL/FIT

. , . Tutorial , (), , . , (image) MIDAS- (table) . tutorial : TEST -- FUNCTION -- . . REF, . COMPUTE/FUNCTION (image) , . , , ( ). PROFILE . PROFILE FUNCTION. fit- . , fit- EDIT/FIT FUNCTION


IV. ÄÔÔðÓÍÒËÏ^Ëfl , MIDAS

65

: 1 GAUSS(X;A1,A2,A3) A1=50. A2=95. A3=45. 2 GAUSS(X;A4,A5,A6) A4=A1 A5=135. A6=A3 3 POLY(X;A,B,C) A=0. B=0. C=0. ( FWHM) . SET/FIT. , NR, MIDAS, , . . , . ( + ) .
7. ëÔËÒÓÍ ÍÓÏÌ, Ò,flÁÌÌœi Ò ÔÔðÓÍÒËÏ^ËÂÈ

, . ( ) . HELP . COMPUTE/FIT outima [= funct[(refima)]] COMPUTE/FIT table :out[,:error] [= funct[(:col1,...)]] COMPUTE/FUNCTION outima = funct(refima) COMPUTE/FUNCTION table :out = funct(:col1,...) CREATE/FUNCTION userfunct1[,...] EDIT/FIT [funct] FIT/IMAGE [nfeval[,prec[,metpar]]] [image[,wgt]] [funct] FIT/TABLE [nfeval[,prec[,metpar]]] table dep[,wgt] ind [funct] MODIFY/FIT table seqno [funct] REPLACE/FUNCTION userfunct1[,...]


66

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

SAVE/FIT table seqno [funct] SELECT/FUNCTION funct number[,...] SELECT/FUNCTION funct ALL SET/FIT [METHOD=mname] [PRINT=iter] [WEIGHT=wgttype] [FUNCT=fname] [FCTDEF=where] SHOW/FIT
ìÔðÊÌÂÌËfl

1) , MIDAS-, 2 100 . (x) 1 100; -- : y (x) = 40 [exp (-ln 2 (2 (x - p1)/p2)2) + exp (- ln 2 (2 (x - p3)/p2)**2)] + p4*x + p5*x2 + p6* sin (60x) p1, ..., p6 -- . : p1 = 60.01, p2 = 5.01, p3 = 80.01, p4 = 1.01, p5 = 0.01, p6 = 0. : y(x) , . 2) fit-, ( GAUSS) 2- (POLY), , .1, . 3) ( .1), MIDAS, , , .1, () (). -- . 4) (p1, p2, ..., p5), p6: 0 0.1 ( .1).


V. ëíêìäíìêõ ÑÄççõï Ç MIDAS

0. Ç,ÂÂÌËÂ

, MIDAS, : (images, frames) (tables) fit- (fit-files) (catalogs) (descriptors) (keywords) ( , , fit-) , . , , , - (. ).
Ä. àáéÅêÄÜÖçàü 1. ëÔÂÍÚðœ Ë ÏÌÓ,,ÓÏÂð̜ ËÁÓžðÊÂÌËfl

-, . MIDAS , .


68

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

2. ëÚðÛÍÚÛð ËÁÓžðÊÂÌËÈ

( ) MIDAS -, - . ( . ), . MIDAS- .bdf ( ).
3. ÑÓÒÚÛÔ Í ÎÂÏÂÌÚÏ

, , my_frame my_frame[x1,y1,z1] x1, y1 z1 -- (), ( , . ., , -- . .4). , , : my_frame[x1,y1,z1:x2,y2,z2] x1, y1, z1 x2, y2, z2 -- , . .. my_frame[x1,y1,z1..x2,y2,z2] < > . , my_frame[<,2,1:2,>,<] my_frame (x, y, z ) : x 1 2; y 2 , z 1 1.


V. ëÚðÛÍÚÛðœ ÌÌœi , MIDAS

69

4. íËÔœ ÍÓÓðËÌÚ

MIDAS- : 1) , () ( , ) , . . 2) , , MIDAS '' (world) . '' , @ , my_frame2[@1:@5] 5 my_frame2. , ( @) . MIDAS , START STEP . world = START + STEP * (@i -- 1) @i -- . , (). , my_frame2 START = 120 (, ) STEP = 0.5 () my_frame2[120:122.5] 5 . @ .
5. éÒÌÓ,̜ ÍÓÏÌœ ÔðË ðžÓÚÂ Ò ËÁÓžðÊÂÌËflÏË 5.1. ëÓÁÌËÂ Ë ÏÓËÙËÍ^Ëfl ËÁÓžðÊÂÌËÈ

, frame[x,y,z] = expression x, y, z -- . expression ( MIDAS- -- . III.6).


70

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

tt[@10,@10] = 5.0

.
WRITE/IMAGE frame [pix_specs] data

frame -- , pix_specs -- , , data -- , . ,
WRITE/IMAGE m_f [<,@3:@2,4] 1.,3.,2.,33.

: m_f[1,3] = 1.0; m_f[2,3] = 3.0; m_f[1,4] = 2.0; m_f[2,4] = 33.0 . , , HELP WRITE/IMAGE.
COMPUTE/IMAGE frame = expression

expression frame. 21 , , / . ,
COMPUTE/IMAGE r = sqrt(c+5.-log10(b))+abs(aa)

r.bdf , c.bdf, b.bdf aa.bdf.
COMPUTE/IMA EXP(20./3.4)+SIN(1.2)

, OUTPUTR(1). , , , ( 0.0001) ( 0.05 ). () !


V. ëÚðÛÍÚÛðœ ÌÌœi , MIDAS

71

5.2. êžÓÚ Ò ~ÒÚå ËÁÓžðÊÂÌËfl

EXTRACT/IMAGE out = in intval out in -- , intval ( , .3) . : EXTRACT/IMAGE aa = dd [23:43:30,18:21:20..23:43:40,18:21:50] dd aa. , : (, , , ) . , MIDAS, , . , COMPUTE/IMAGE my_frame = 0 my_frame, COMPUTE/IMAGE my_frame[@2,@3:@50,@4] = 0 .
5.3. èðÓÒÏÓÚð ËÁÓžðÊÂÌËÈ

READ/IMAGE frame frame . READ/IMAGE gal @200,<,20 READ/IMAGE gal [@200,<:@219,<] 20 gal.bdf, 200- x y. .


72

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

READ/IMAGE CURSOR , . , . LOAD/IMAGE frame -- , , , frame. , () CREATE/DISPLAY LOAD/IMAGE. PLOT/COLUMN frame [x_coord] [y_start,y_end] PLOT/ROW frame [y_coord] [x_start,x_end] frame ( , -- ) , MIDAS-. , CREATE/ GRAPHICS. , x_coord y_coord -- ( /); y_start,y_end x_start,x_end -- , .
5.4. äÓÔËðÓ,ÌËÂ/ÛÎÂÌË ËÁÓžðÊÂÌËÈ

// Linux MIDAS $cp/$mv/$rm. MIDAS. COPY/II source_frame dest_frame dest_format flags source_frame dest_frame -- , dest_format -- , . : I1 (), I2 (16- ), UI2 (16- ), I4 (32-


V. ëÚðÛÍÚÛðœ ÌÌœi , MIDAS

73

), R4 (32- ), R8 D (64- -- ); -- R4. , flags -- . COPY/II gal galr R8 d gal galr, (64-). d gal . DELETE/IMAGE frame , .
5.5. ëÓÁÌË ËÁÓžðÊÂÌËfl

. , , CREATE/IMAGE frame [dim_specs] [frame_specs] [func_type] [coefs] frame -- MIDAS-. dim_specs -- , NAXIS, NPIX(1), ..., NPIX(NAXIS), ( 1 3) . , frame_specs -- , START(1), ..., START(NAXIS), STEP(1), ..., STEP(NAXIS), (START) (STEP) . , func_type -- MIDAS , , coefs -- ( , , . HELP CREATE/IMAGE).


74

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

CREATE/IMAGE new 2,200,300 0.,1.25,1.1,0.3 ELLIPS 50,70,20,7 200x300 (200 300 ). ( x y) : x = 1.1 * (@i -- 1), y = 1.25 + 0.3 * (@j -- 1) i j -- . ( , . . ) 50 70 ; 20 -- 7.
6. èðÂÓžðÁÓ,ÌË , ÚžÎË^œ

MIDAS- ( ) COPY/IT inframe outable inframe outable -- . COPY/TI intable outimage intable outframe -- .
7. éÔÂð^ËË Ì ËÁÓžðÊÂÌËflÏË

, MIDAS. . , .
7.1. êžÓÚ Ò ÍÓÓðËÌÚÏË

: CENTER/GAUSS CENTER/MOMENT GET/CURSOR GET/GCURSOR


V. ëÚðÛÍÚÛðœ ÌÌœi , MIDAS

75

7.2. äÓÓðËÌÚ̜ ÔðÂÓžðÁÓ,ÌËfl

: , , . . -- ALIGN/IMAGE EXTRACT/IMAGE FLIP/IMAGE TRANSPOSE/ IMAGE GROW/IMAGE INSERT/IMAGE REBIN/II REBIN/LINEAR REBIN/ROTATE REBIN/SPLINE REBIN/IT ROTATE/CLOCK ROTATE/COUNTER_CLOCK ROTATE/1DIM XCORR/IMAGE
7.3. ÄðËÙÏÂÚËÍ

, ( ): AVERAGE/AVERA AVERAGE/COLUMN AVERAGE/ROW AVERAGE/ IMAGES AVERAGE/KAPPA AVERAGE/WEIGHT COMPUTE/ROW COMPUTE/COLUMN COMPUTE/IMAGE COMPUTE/ PIXEL
7.4. îËÎåÚð^Ëfl

: CONVOLVE/IMAGE DECONVOLVE/IMAGE CREATE/FILTER FFT/IMAGE FFT/INVERSE FFT/POWER FFT/FREQ FILTER/COSMIC FILTER/DIGITAL FILTER/GAUSS FILTER/ MAX FILTER/MIN FILTER/MEDIAN FILTER/SMOOTH FILTER/ ADAPTIV
7.5. ëÓÁÌË ËÁÓžðÊÂÌËÈ

( ):


76

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

CREATE/IMAGE CREATE/RANDOM EXTRACT/IMAGE EXTRACT/ CURSOR EXTRACT/SLIT EXTRACT/CTRACE EXTRACT/RTRACE EXTRACT/ LINE EXTRACT/TRACE EXTRACT/REFERENCE_IMAGE EXTRACT/ ROTATED_IMAGE
7.6. èðÂÓžðÁÓ,ÌË ÔËÍÒÂÎåÌœi ÁÌ~ÂÌËÈ

, ( , ): FIT/FLAT_SKY ITF/IMAGE MODIFY/CURSOR MODIFY/GCURSOR MODIFY/PIXEL MODIFY/AREA REPLACE/IMAGE REPLACE/ POLYGON
7.7. éÔðÂÂÎÂÌË iðÍÚÂðËÒÚËÍ

: FIND/MINMAX INTEGR/APERTURE INTEGR/LINE STATIST/ IMAGE MAGNITUDE/CIRCLE MAGNITUDE/RECTANGLE
7.8. ÄÔÔðÓÍÒËÏ^Ëfl

: COMPUTE/FIT COMPUTE/FUNCTION EDIT/FIT FIT/IMAGE FIT/TABLE READ/FIT SET/FIT SHOW/FIT SELECT/FIT REGRESSION/POLYNOMIAL SAVE/REGRESSION , HELP.


V. ëÚðÛÍÚÛðœ ÌÌœi , MIDAS

77

Å. MIDAS-íÄÅãàñõ 8. ížÎË^œ Ë ËÁÓžðÊÂÌËfl

MIDAS , , (. III). , MIDAS- MIDAS- (, , . .). MIDAS .
Ç. FIT-îÄâãõ 9. Fit-ÙÈÎœ Ë ËÁÓžðÊÂÌËfl

Fit-, (. IV). , fit- '' , - . fit- ( , ), , .
É. äÄíÄãéÉà 10. çÁÌ~ÂÌËÂ Ë ÒÚðÛÍÚÛð

(, - , , . .). MIDAS- / . MIDAS ASCII-, (, fit-) .cat. , , : (No), (Name), (Ident), (Naxis) (Npix).


78

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

11. ëÓÁÌËÂ ÍÚÎÓ,,

CREATE/ICAT catname [dir_spec] [descr] CREATE/TCAT catname [dir_spec] [descr] CREATE/FCAT catname [dir_spec] [descr] catname, //fit-, . .bdf/.tbl/.fit . dir_spec, LINUX- $ls (. Linux, MIDAS $man ls .5 ), , . , CREATE/TCAT my_cat ss*.tbl my_cat MIDAS- , ss, CREATE/ICAT galaxies log060906,:files galaxies.cat, :files log060906.tbl. , xCAT ( x = I, T F) ICAT, TCAT FCAT.
12. àÁÏÂÌÂÌË ÍÚÎÓ,,

ADD/xCAT catname framelist catname -- , framelist -- , . , SUBTRACT/xCAT catname framelist catname -- , framelist -- , .


V. ëÚðÛÍÚÛðœ ÌÌœi , MIDAS

79

DELETE/xCAT catname (, ) () catname, ! , ( ) SET/xCAT catname catname -- . CLEAR/xCAT catname , Ident, (. .10) SORT/xCAT catname ( ), search_string, Ident, SEARCH/xCAT catname search_string OUT_A.
13. èðÓÒÏÓÚð ÍÚÎÓ,,

MIDAS- SHOW/xCAT catname catname, READ/xCAT catname .
14. éÔÂð^ËË Ò ÍÚÎÓ,,ÏË

MIDAS MIDAS- .


80

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

EXECUTE/CATALOG proc p1 p2 ... p7

proc -- MIDAS- ( .prg) MIDAS-, p1 ... p7 -- ( 7). , , (, CATLI CATLC). , , INFO/SETUP CATALOG , WRITE/SETUP CATALOG par1 par2 ... par1, par2 . . . online-. , my_cat, , (, ), EXECUT/CATALOG COMPUTE/TABLE my_cat.cat :z = :x * 2 :x :z -- .
Ñ. ÑÖëäêàèíéêõ 15. ÄÌÎÓ,,Ëfl Ò ÍÎ~Â,œÏË ÒÎÓ,ÏË

, (. I.4-8). , , , , . : .
16. ÑÂÒÍðËÔÚÓðœ ÔÓÎåÁÓ,ÚÂÎÂÈ

72 . integer (I), real (R), double precision (D) character (C). 32767 .


V. ëÚðÛÍÚÛðœ ÌÌœi , MIDAS

81

16.1. äÍ ÒÓÁÚå ÂÒÍðËÔÚÓð

WRITE/DESCRIPTOR frame descr data frame -- () //fit-, descr -- () //_/_ ( ), data -- , . , fit- ! , WRITE/DESCRIPTOR my_table.tbl DATE/I/1/4 03,04,2000 DATE ( integer c 4 DATE(1),DATE(2),...,DATE(4)) MIDAS- my_table . , , , DATE .
16.2. äÍ ÔðÓÒÏÓÚðÂÚå ÂÒÍðËÔÚÓð

SHOW/DESCRIPTOR frame [descr_list] READ/DESCRIPTOR frame [descr_list] , descr_list ( , ) ( ), frame.
16.3. äÍ ÛÎËÚå ÂÒÍðËÔÚÓð

DELETE/DESCRIPTOR frame descr frame descr.


82

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

17. ÑÂÒÍðËÔÚÓðœ ÒËÒÚÂÏœ

HELP [Descr] , , . 8 , , , .
Ö. äãûóÖÇõÖ ëãéÇÄ 18. äÎ~Â,œÂ ÒÎÓ,, ÓÔðÂÂÎflÂϜ ÔÓÎåÁÓ,ÚÂÎÂÏ

(. I.4-8). MIDAS , MIDAS.
19. ëËÒÚÂÏ̜ ÍÎ~Â,œÂ ÒÎÓ,

HELP [Key] , .
20. ÑÂÒÍðËÔÚÓðœ Ë ÍÎ~Â,œÂ ÒÎÓ,

MIDAS , . , , ( ). , . , , , ( ) MIDAS ( -


V. ëÚðÛÍÚÛðœ ÌÌœi , MIDAS

83

). , - MIDAS-, -- . , MIDAS-, , , , .
ìÔðÊÌÂÌËfl

MIDAS-, : 1. MIDAS- 30 30 ( 0001, 0002, 0003 . .) F (i, j) = 2 + + 3i + i*j + i2/10 + j, i j ; 2. MIDAS-; 3. ( ); 4. ; 5. 2 ; 6. 36 ( [1,1] [6,6]) 400.0, [1,1] 1000.0; 7. ( ), ( PLOT/ROW); 8. () ; 9. ; 10. ; 11. MY_DATE ( 3 , - : , ) , ; 12. , ; 13. . (30) F (i, j).


VI. îéêåÄíõ ÇÇéÑÄ/ÇõÇéÑÄ Ç MIDAS

0. Ç,ÂÂÌËÂ

MIDAS . , , . , . MIDAS . , : NAXIS ( ), NPIX ( ), STEP ( ) . . MIDAS , . MIDAS, , . FITS (Flexible Image Transport System), IAU (International Astronomical Union) . FITS, , / MIDAS: PostScript (PS), ASCII . . .
1. FITS-ÙÓðÏÚ

FITS- , ,


VI. îÓðÏÚœ ,,Ó/,œ,Ó , MIDAS

85

. . FITS- (basic FITS) , . . . . FITS-. : FITS random groups ( ), , ( ); FITS tables () -- ASCII-; FITS binary tables ( ) -- , . , MIDAS FITS-: basic FITS MIDAS-image FITS-tables MIDAS-table BINTABLE (binary table) MIDAS-table random groups MIDAS-image + MIDAS-table
1.1 ëÚðÛÍÚÛð FITS-ÙÈÎÓ,

FITS- , , HDU (Header and Data Unit). , MIDAS-. 2880 . HDU . , . HDU , ( ). FITS- . 36 80- ASCII-. : = /. 1 8 . : , ,


86

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

, . -- 9-10 , / 11-80 . : SIMPLE, BITPIX, NAXIS, NAXIS1, ..., NAXISn, END -- . SIMPLE T F (, , F ). BITPIX. : 8 ( ), 16 (), 32 (), 32 (), 64 ( ). NBITS = |BITPIX|*(NAXIS1*NAXIS2*....*NAXISm), NAXIS- , 0 -- 999, ( 0, , ) NAXIS1 -- . ., END -- ). 2880 , . XTENSION. -- , , , XTENSION = BINTABLE ( ). , , . , , LINUX $less $more. FITS MIDAS User Guide (volume A) , . , (HDU) , less more LINUX.
1.2. ,Ó ËÁ FITS-ÙÈÎÓ,

, FITS, MIDAS


VI. îÓðÏÚœ ,,Ó/,œ,Ó , MIDAS

87

INDISK/FITS in_files [out_spec]

in_files FITS-, out_spec -- MIDAS. : INDISK/FITS xyz.fits FITS- xyz.fits toto0001.bdf, toto0001.tbl, toto0001.fit , xyz.fits. , , , toto . , :
INDISK/FITS in.cat out.cat

FITS- in.cat MIDAS out.cat. :
INDISK/FITS galaxy* ROOT=ngc

FITS-, galaxy, ngc0001.bdf, ngc0002.bdf . . FITS-, , INTAPE/FITS file_list id device file_list -- , , id -- ( 4 ) FITS-, device -- ( .bdf). - , . , INTAPE/FITS 2,5-7 st im FITS- im0002.mt, im0005.mt, im0006.mt, im0007.mt, MIDAS- st0002.bdf, st0005.bdf, st0006.bdf, st0007.bdf;


88

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

INTAPE/FITS 1-2 st image

image0001.mt, image0002.mt st0001.bdf st0002.bdf (, FITS- ). , ( fit) FITS MIDAS (. . INDISK/FITS . .). . , , , AVERAGE/IMAGE, , .
1.3. Çœ,Ó , FITS-ÙÈÎœ

MIDAS- FITS-
OUTTAPE/FITS cat device [flag] [dens,block] [type]

cat -- , MIDAS-, , device FITS.
OUTDISK/FITS in_files [out_spec] [option] [out_type]

in_files , FITS, out_spec -- FITS-. ,
OUTDISK/FITS xyz

Midas- xyz.bdf FITS toto0001.mt, , .bdf toto0001.mt . MIDAS-, :
OUTDISK/FITS in.cat out.cat

in.cat FITS- .


VI. îÓðÏÚœ ,,Ó/,œ,Ó , MIDAS

89

2. êžÓÚ Ò ASCII-ÙÈÎÏË

ASCII- MIDAS: , , . . ( ) . .
2.1. Ç,Ó ËÁ ASCII-ÙÈÎÓ,

ASCII- Midas INDISK/ASCII in_file [out_file] [npix_string] in_file -- ASCII-, out_file -- Midas ( 3D, toto.bdf), npix_string -- ( -- ). : INDISK/ASCII spectr.asc ima spectr.asc ima.bdf. ASCII- CREATE/IMAGE frame [dim_specs] [frame_specs] ASCII_FILE [coefs] frame -- , dim_specs -- , frame_specs -- , coefs -- , . , MIDAS (. V .5.1). ASCII-: CREATE/TABLE table ncol nrow file [format_file] [organization] table file -- MIDAS- , MIDAS (. III .2).


90

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

OPEN/FILE filename READ file_control_key READ/FILE file_id cbuf_key [maxrd] (character) MIDAS ASCII-. , HELP . , , READ/FILE, ASCII- OPEN/FILE, : OPEN/FILE outputc ..READ/FILE output {fctr(1)} 20 20 outputc fctr(1).
2.2. Çœ,Ó , ASCII-ÙÈÎœ

MIDAS- III.3.1. . -- ASSIGN/PRINT FILE file file -- ASCII-; : PRINT/IMAGE frame_specs [pixel_specs] PRINT/TABLE table [column...] PRINT/KEYWORD [key_list] frame_specs -- , pixel_specs , ; table -- MIDAS-, column -- ; key_list -- , ( !). ASCII- OUTDISK/ASCII in_file out_file in_file -- , out_file -- ASCII-. ASCII-, OPEN/FILE,


VI. îÓðÏÚœ ,,Ó/,œ,Ó , MIDAS

91

WRITE/FILE file_id charbuf WRITE/FILE file_id,KEY charkey

,
WRITE/FILE 7 Picture of NGC 1022

ASCII- 'Picture of NGC 1022' , 80 .
3. Çœ,Ó Ì ÍðÌ (terminal)Ë ,,Ó Ò ÍÎ,ËÚÛðœ

ASSIGN/PRINT TERMINAL WRITE/OUT "text_string" text_string. INQUIRE/KEYWORD key [prompt_string] [flush_opt] key -- , prompt_string -- , flush_opt -- . : INQUIRE/KEY petrita/c/6/5 "Give me a name:" flush petrita , .
4. PostScript-ÙÓðÏÚ

, PostScript. MIDAS . PostScript-.


92

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

4.1. Çœ,Ó ,,ðÙËÍ , PS-ÙÈÎ

. , PostScript- ( GRAPH, PRINT) ASSIGN/GRAPH POSTSCRIPT , , , PLOT/COLUMN frame PostScript postscript.ps. , , Linux $mv postscript.ps my_plot.ps my_plot.ps , .ps . , , PS-. , , PostScript- , (GRAPH). ASSIGN/GRAPH g,0
4.2. Çœ,Ó ËÁÓžðÊÂÌËfl , PS-ÙÈÎ

MIDAS, , LOAD/IMAGE frame COPY/DISPLAY p5=noprint PostScript- screen00.ps. , MIDAS, . ., MIDAS inmidas 01, screen01.ps. , , Linux, . , MIDAS- ,


VI. îÓðÏÚœ ,,Ó/,œ,Ó , MIDAS

93

! , Linux (X Windows). Linux, Windows PostScript- Ghostview (Ghostscript). Linux .
5. èÂðÂÌÔð,ÎÂÌË ,,Ó/,œ,Ó

MIDAS , Linux (. ), , , . ,
ASSIGN/PRINT file startable.dat PRINT/TABLE startable

, -- . , /, :
WRITE/TABLE startable >startable.dat

startable.dat.
WRITE/TABLE startable >>startable.dat

. , / Linux, MIDAS > < , , , ! . ,
WRITE/TABLE mytable >mytable.dat+terminal


94

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

, (-) WRITE/TABLE mytable >Null . MIDAS (pipe). , MIDAS- UNIX-, . : READ/DESCRIPTOR mama | $grep CUNIT mama.bdf, Linux grep, CUNIT. $pwd | WRITE/KEYWORD INPUTC INPUTC. , Linux $ , : $ls | grep gal , gal.
ìÔðÊÌÂÌËÂ

1) 2) 3) 4) 5) 6)

MIDAS-, : MIDAS- ( , , V) MIDAS-; , FITS; MIDAS , ; ASCII-; PostScript-; (, ) PostScript-.

/ .


VII. èêéÉêÄååõ çÄ îéêíêÄçÖ à ëà Ç MIDAS

0. Ç,ÂÂÌËÂ

MIDAS , , . , MIDAS , . MIDAS , - , MIDAS ( , . .). , , . . , -- .
Ä. èêéëíõÖ èêéÉêÄååõ çÄ îéêíêÄçÖ àãà ëà

MIDAS, Linux, : f77 myprog.f -o myprog.exe ( ) g77 myprog.f -o myprog.exe cc myprog.c -o myprog.exe ( ) . .


96

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

(myprog.exe), MIDAS RUN myprog.exe
Å. ëãéÜçõÖ èêéÉêÄååõ





MIDAS, , , . . , MIDAS ( ), , .
1. èð,ËÎ ÌÔËÒÌËfl ÔðÓ,,ðÏÏ

, , , MIDAS. : ) MIDAS , . , , . . (. , ); ) IMPLICIT . IMPLICIT NONE ; ) (include-). MIDAS include-, . : INCLUDE 'MID_INCLUDE:ST_DEF.INC'


VII. èðÓ,,ðÏÏœ Ì îÓðÚðÌÂ Ë ëË , MIDAS

97

INCLUDE 'MID_INCLUDE:ST_DAT.INC'

) COMMON VMR, / ( ); ) READ . .; ) . , IF, ELSE ENDIF, DO ENDDO CONTINUE, (. ); ) . 80000-81000, MIDAS; , . , , . , include- () : #include (, .). , , , , . , !, MIDAS.
2. àÌÚÂðÙÂÈÒ̜ ÔÓÔðÓ,,ðÏÏœ MIDAS

MIDAS -- , MIDAS. MIDAS, STSPRO ('progname') progname -- (. ). MIDAS STSEPI


98

Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

. SCSPRO SCSEPI. ( ST SC ) .
2.1. äÎ~Â,œÂ ÒÎÓ,

, MIDAS- real (R), () STKRDR (key, felm, maxs, acts, vals, kun, knul, stat) : key ( character) -- (. 8 ) , felm maxs ( integer) -- . : acts (integer) -- , vals (real) -- , , kun knul ( integer) , stat (integer) . , double precision (D), integer (I) character (C), : STKRDD, STKRDI STKRDC. () , STKRDR. vals, : integer STKRDI . . , STKRDR, STKRDD, STKRDI STKRDC, STKRDx, , x = R, D, I, C. -- STKWRx (key, vals, felm, maxs, kun, stat) , , STKRDx.


VII. èðÓ,,ðÏÏœ Ì îÓðÚðÌÂ Ë ëË , MIDAS

99

2.2. àÁÓžðÊÂÌËfl

( ) : STIGET (name, dattyp, iomode, filtyp, maxdim, naxis, npix, start, step, ident, cunit, pntr, no, stat) : name ( character) -- , STKRDC (. !); dattyp, iomode filtyp ( integer) -- , , , include-, D_R4_FORMAT, F_I_MODE, F_IMA_TYPE (. ); maxdim (integer) -- (1, 2 3). : naxis (integer) -- ( ); npix (integer) -- , ; start step ( double precision) -- , ; ident cunit ( character) -- ; pntr (integer) -- , ; no (integer) -- ; stat (integer) -- , . , ident cunit DATA ident/' '/ DATA cunit/' '/ MIDAS- STIPUT (name, dattyp, iomode, filtyp, naxis, npix, start, step, ident, cunit, pntr, no, stat) , STIGET . , . -


100 Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

, - character , , : STKRDC (key, felm, maxs, acts, vals, kun, knul, stat) key -- , , vals -- character, name STIGET STIPUT (. ).
2.3. ÑÂÒÍðËÔÚÓðœ

() STDRDx (no, dsc, felm, maxs, acts, vals, kun, knul, stat) : no ( integer) -- , , STIGET STIPUT; dsc (character) -- (. 15 ); felm maxs, , STKRDx . STDWRx (no, dsc, vals, felm, maxs, kun, stat) ( stat) , .
2.4. èðÓ~ÂÂ

STETER (errno, text) errno ( integer) text (character) MIDAS ( ) errno text.


VII. èðÓ,,ðÏÏœ Ì îÓðÚðÌÂ Ë ëË , MIDAS

101

3. äÓÏÔËÎfl^Ëfl ÒÎÓÊÌœi ÔðÓ,,ðÏÏ

MIDAS (), MIDAS. . Linux MIDAS : /$midas/$98NOV/system/exec/esoext.exe -I/$midas/$98NOV/incl -f myprog.for $midas -- , MIDAS (, 95NOV), $98NOV -- MIDAS (95NOV, 98NOV . .), , myprog.for -- . -- , .f ( myprog.f). g77 -c myprog.f -- , .o ( myprog.o). -- MIDAS g77 myprog.o -L/$midas/$98NOV/lib -lmidas -o myprog.exe -- (myprog.exe), MIDAS RUN (. ). , , : cc -I$midas/$98NOV/incl -c myprog.c cc myprog.o -L$midas/$98NOV/lib -lmidas -o myprog.exe , . , -lm .


102 Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

4. ÇœÁœ,fl ÔðÓ^ÂÛð

RUN (. ). MIDAS, :
!==================================== ECHO/ON DEFINE/PARAMETER P1 ? I DEFINE/PARAMETER P2 ? I DEFINE/PARAMETER P3 10 N DEFINE/PARAMETER P4 H C WRITE/KEYWORD IN_A {P1} WRITE/KEYWORD OUT_A {P2} WRITE/KEYWORD MY_KEYW1/R/1/3 {P3} WRITE/DESCR {IN_A} MY_DATE/I/1/3 22,04,2000 READ/KEYWORD MY_KEYW1 READ/DESCR {IN_A} MY_DATE LOAD {IN_A} RUN myprog.exe READ/KEYWORD MY_KEYW1 READ/DESCR {OUT_A} MY_DATE LOAD {OUT_A} !====================================

: . , (myprog.exe), , myprog.exe, . , DATE , .


VII. èðÓ,,ðÏÏœ Ì îÓðÚðÌÂ Ë ëË , MIDAS

103

Ç. èêàåÖê èêéÉêÄååõ çÄ îéêíêÄçÖ

, . 1, MIDAS, . 2. myprog.for . 3. myprog , include-, MIDAS. , ; ; inverse, ( ); ; .
C @(#)myprog.for ------------------------------ C.IDENTIFICATION C C.KEYWORDS C C.PURPOSE C C.ALGORITHM C C.INPUT/OUTPUT C the following keywords are used: C IN_A/R/1/60 input frame C OUT_A/R/1/60 output frame C ... C----------------------------------------------C c PROGRAM myprog.for IMPLICIT NONE


104 Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

INTEGER NAXISA, NPIXA(2), IAV, STAT, IRAD, IMNOA, IMNOC, PNTRA INTEGER KNULL, KUNIT(1), DUN, DNUL, IDISCR(4), MADRID(1), PNTRC CHARACTER*60 FRAMEA, FRAMEC CHARACTER CUNITA*64, IDENTA*72, DEFAUL*1 DOUBLE PRECISION STEPA(2), STARTA(2) REAL INPUTR(3) COMMON /VMR/ MADRID INCLUDE 'MID_INCLUDE:ST_DEF.INC' INCLUDE 'MID_INCLUDE:ST_DAT.INC' DATA IDENTA/' '/ DATA CUNITA/' '/ C---- initialization CALL STSPRO ('myprog') c---- get, change, and pass a keyword value CALL STKRDR ('MY_KEYW1', 1, 3, IAV, INPUTR, KUNIT, KNULL, STAT) inputr(1) = 13. inputr(2) = 100. CALL STKWRR ('MY_KEYW1', INPUTR, 1, 2, KUN, STAT) c---- define input image CALL STKRDC ('IN_A', 1, 1, 60, IAV, FRAMEA, KUNIT, KNULL, STAT) CALL STIGET (FRAMEA, D_R4_FORMAT, F_I_MODE, F_IMA_TYPE, 2, & NAXISA, NPIXA, STARTA, STEPA, IDENTA, CUNITA, PNTRA, IMNOA, & STAT) c---- define output image CALL STKRDC ('OUT_A', 1, 1, 60, IAV, FRAMEC, KUNIT, KNULL, STAT) CALL STIPUT (FRAMEC, D_R4_FORMAT, F_O_MODE, F_IMA_TYPE,


VII. èðÓ,,ðÏÏœ Ì îÓðÚðÌÂ Ë ëË , MIDAS

105

& NAXISA, NPIXA, STARTA, STEPA, IDENTA, CUNITA, PNTRC, IMNOC, & STAT) c---- change image in a Fortran procudure call inverse (MADRID(PNTRA), MADRID(PNTRC), NPIXA(1), NPIXA(2)) c---- get, change and pass a descriptor value call STDRDI (IMNOA, 'MY_DATE', 1, 3, IAV, IDISCR, DUN, DNUL, STAT) IDISCR(1) = 12 call STDWRI (IMNOC, 'MY_DATE', IDISCR, 1, 3, DUN, STAT) c---- leaving the program CALL STSEPI END c---subroutine inverse (a, b, n, m) implicit none real a(1), b(1), s integer n, m s=0 do 1000 j = 1, m*n if (a(j).gt.s) s = a (j) 1000 continue do 2000 j = 1, m*n b(j) = s -- a (j) 2000 continue return end c--------------------------------------------------------------É. èêàåÖê èêéÉêÄååõ çÄ ëà

, . . . /* ---------------------------------------------------.COPYRIGHT (c) 2000 St.Petersburg University


106 Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

.IDENT demo.c .AUTHOR Galay Oleg, Barsunova Olga .KEYWORD MIDAS. .LANGUAGE C. .PURPOSE Demo program for practice .VERSION 1.0 September 2000 . .RETURNS Output a sum of images. .ENVIROMENT .COMMENT Run by demo.prg. --------------------------------------------- */ #include #include #include #include int { int int char main()

i, nval, null; onpix[2]; text[84], ima1[84], ima2[84], imaout[84], ident[85], cunit[84]; int unit; double ostart[2], ostep[2]; double *outdata; double *ima1data; double *ima2data; int ima1id, ima2id, outid; double DescVal[2]; double DescVal2[2]; double DescVal1; SCSPRO("Demo program"); sprintf(text,"********************************** ******************"); SCTPUT(text); sprintf(text, "This program creates two images and sums them."); SCTPUT(text);


VII. èðÓ,,ðÏÏœ Ì îÓðÚðÌÂ Ë ëË , MIDAS

107

sprintf(text,"********************************** ******************"); SCTPUT(text); sprintf(text, "Reading variables."); SCTPUT(text); SCKGETC("INA", 1L, 60L, SCKGETC("INB",1L, 60L, SCKGETC("OUT",1L, 60L, MIDAS-keywords in C-

&nval, ima1); &nval, ima2); &nval, imaout);

sprintf(text,"Image parameters."); SCTPUT(text); onpix[0] = 500; onpix[1] = 500; ostart[0] = 1.32; ostart[1] = 1.32; ostep[0] = 1.0; ostep[1] = 1.0; /* Create two images */ sprintf(text,"Open two images !"); SCTPUT(text); SCIPUT( ima1, D_R8_FORMAT, F_O_MODE, F_IMA_TYPE, 2, onpix, ostart, ostep, "First image", "DATA: UNIT; AXIS: PIXEL", &ima1data, &ima1id ); SCIPUT( ima2, D_R8_FORMAT, F_O_MODE, F_IMA_TYPE, 2, onpix, ostart, ostep, "Second image", "DATA: UNIT; AXIS: PIXEL", &ima2data, &ima2id ); sprintf(text,"Put data in two images."); SCTPUT(text); for (i=0; i < onpix[0]*onpix[1]; i++) { ima1data[i] = sin(3.14*i/72); ima2data[i] = cos(3.14*i/100);


108 Ç. Å. àÎåËÌ, é. è. ÜÂÎÂÌÍÓ,. ëÚðÛÍÚÛðœ ÌÌœi Ë ÔðÓ,,ðÏÏËðÓ,ÌË , MIDAS

} /* Read and sum the images */ /* SCIGET( ima1, D_R8_FORMAT, F_IO_MODE, F_IMA_TYPE,2, 2, onpix, ostart, ostep, ident, cunit, &ima1data, &ima1id ); */ /* SCIGET( ima2, D_R8_FORMAT, F_IO_MODE, F_IMA_TYPE,2, 2, onpix, ostart, ostep, ident, cunit, &ima1data, &ima2id ); */ sprintf(text,"Open output image."); SCTPUT(text); SCIPUT( imaout, D_R8_FORMAT, F_O_MODE, F_IMA_TYPE, 2, onpix, ostart, ostep, "Output image", "DATA: UNIT; AXIS: PIXEL", &outdata, &outid ); sprintf(text,"Sum two images."); SCTPUT(text); for (i=0; i < onpix[0]*onpix[1]; i++) { outdata[i] = (ima1data[i] + ima2data[i]); } sprintf(text,"Change descriptors."); SCTPUT(text); DescVal[0] = 145.756; DescVal[1] = -145.756; SCDWRD(ima1id, "START", &DescVal, 1, 2, &unit); DescVal1 = 555.756; SCDWRD(ima2id, "DENSITY", &DescVal1, 1, 1, &unit); SCDRDD(ima2id, "START", 1, 2, &nval, DescVal2, &unit, &null); sprintf(text,"Read START = %8.3f,%8.3f \n", DescVal2[0], DescVal2[1]); SCTPUT(text); DescVal2[1] = 300; SCDWRD(outid, "START", &DescVal2, 1, 2, &unit); SCFCLO(ima1id);


VII. èðÓ,,ðÏÏœ Ì îÓðÚðÌÂ Ë ëË , MIDAS

109

SCFCLO(ima2id); SCFCLO(outid); SCSEPI(); }

, , . !=============================================== define/parametr P1 ? ? "Enter first image :> " define/parametr P2 ? ? "Enter second image :> " define/parametr P3 ? ? "Enter output image :> " def/local INA/C/1/20 "{P1}" def/local INB/C/1/20 "{P2}" def/local OUT/C/1/20 "{P3}" RUN demo.exe !===================================================
ìÔðÊÌÂÌËÂ

MIDAS- ( ), : 1) MIDAS- ( , , V); 2) - ; 3) ; 4) /- ; 5) /- ; 6) MIDAS , .