ascl_id
stringclasses
752 values
repo_url
stringclasses
737 values
file_path
stringlengths
4
194
content
large_stringlengths
1
1M
language
stringclasses
29 values
license_type
stringclasses
24 values
size
int64
1
1M
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/permute.pro
pro PERMUTE, a, CLOCKWISE=clockwise sz = size(a) ndim = sz[0] & n1 = sz[1] & n2 = sz[2] & n3 = sz[3] IF (keyword_set(CLOCKWISE)) THEN BEGIN a = reform(a, n1*n2, n3) a = reform(transpose(a), n3, n1, n2) ENDIF ELSE begin a = reform(a, n1, n2*n3) a = reform(transpose(a), n2, n3, n1) ENDEL...
IDL
null
327
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/hydrogen.pro
FUNCTION Gaunt_bf, E, quantumNo COMMON const, ERydb, hPlanck, cLight, qElect, mElect, epsil0 x = (ERydb - E) / ERydb x3 = x^0.33333333 nsqx = 1.0 / (quantumNo^2 * x) return, 1.0 + 0.1728*x3 * (1.0 - 2.0*nsqx) - $ 0.0496*x3^2 * (1.0 - (1.0 - nsqx)*0.66666667*nsqx) END PRO hydrogen, fil...
IDL
null
3,026
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/psopen.pro
PRO psopen, FILENAME=filename, $ LANDSCAPE=landscape, $ COLOR=color, $ FONT=font, $ ENCAPSULATED=encapsulated, $ BITS_PER_PIXEL=bits_per_pixel, $ ADOBEDEFAULT=AdobeDefault, $ XSIZE=xsize, YSIZE=ysize, XOFFSET=xoffset, YOFFSET=yoffset ...
IDL
null
1,808
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/misc_func.pro
; -------- begin -------------------------- OrientationUpdate.pro ---- ; PRO OrientationUpdate, state, SET=set IF (keyword_set(SET)) THEN BEGIN ax = 30 az = 30 WIDGET_CONTROL, state.xSlider, SET_VALUE=ax WIDGET_CONTROL, state.zSlider, SET_VALUE=az ENDIF ELSE BEGIN WIDGET_CONTROL, state.xSlide...
IDL
null
2,038
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/plot_pf.pro
PRO plot_pf, atom, T, PF=pf ;+ ; NAME: ; PLOT_PF ; ; PURPOSE: ; This procedure plots the partition function of the different ; ionization stages of atom as a funcion of temperature T. ; ; CATEGORY: ; Data analysis ; ; CALLING SEQUENCE: ; PLOT_pf, Atom, T ; ; INPUTS: ; Atom -- Structure containing atomic model....
IDL
null
1,335
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/KPNOatlas.pro
PRO KPNOatlas, lambdaMin, lambdaMax, SAMPLE=sample, $ Iatlas, latlas, LIMB=limb ; Reads selected wavelength range from the Kitt Peak Solar Atlas ; ; Parameters: ; Input: lambdaMin -- Minimum wavelength [nm] ; lambdaMax -- Maximum wavelength [nm] ; Output: Iatlas -...
IDL
null
2,992
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/readstructure.pro
PRO readstructure, s, unit, N_MAX_TAGS=N_max_tags, N_START=N_start ;+ ; NAME: ; READSTRUCTURE ; ; PURPOSE: ; This procedure reads a structure from logical file unit. ; ; CATEGORY: ; I/O ; ; CALLING SEQUENCE: ; READSTRUCTURE, S, Unit, N_START=N_start, N_MAX_TAGS=N_max_tags ; ; INPUTS: ; S: The structure to be fill...
IDL
null
952
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/help_template.pro
;+ ; NAME: ; ROUTINE_NAME ; ; PURPOSE: ; Tell what your routine does here. I like to start with the words: ; "This function (or procedure) ..." ; Try to use the active, present tense. ; ; CATEGORY: ; Put a category (or categories) here. For example: ; Widgets. ; ; CALLING SEQUENCE: ; Write the calling sequence here. ...
IDL
null
2,687
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/raytrace.pro
FUNCTION raytrace, geometry, mu, x_index, SHOW=show, XRAY=xray, ZRAY=zray mux = geometry.xmu[mu] muz = sqrt(1.0 - (geometry.xmu[mu]^2 + geometry.ymu[mu]^2)) dztotal = geometry.z[0] - geometry.z[geometry.Nz-1] dxtotal = geometry.x[geometry.Nx-1] - geometry.x[0] xbottom = geometry.x[x_index] - (dztotal/muz) *...
IDL
null
4,298
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/create_html.pro
PRO create_html procedures = ['analyze.pro', 'panel.pro', 'rawatom.pro', 'readatom.pro', $ 'readstructure.pro', $ 'viewalpha.pro', 'viewatom.pro', 'viewmolecules.pro', $ 'viewpops.pro', 'viewtermdiag.pro', 'viewtrans.pro'] mk_html_help, procedures, 'analyze_help.html...
IDL
null
327
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/writeb.pro
Ndep = 82 openw, 1, '~/src/rh/Atmos/FALC_82_1G_hor.B', /XDR B = dblarr(Ndep) + 1.0E-4 gamma = dblarr(Ndep)-90.0/!radeg chi = dblarr(Ndep) + 90.0/!radeg writeu, 1, B, gamma, chi close, 1 b= 0.1 + (0.3-0.1) * (alog(geometry.tau500)- alog(geometry.tau500[0])) / $ (alog(geometry.tau500[81]) - alog(geometry.tau500[0])) o...
IDL
null
420
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/viewcontrib.pro
; ----------------------------------------- viewcontrib.pro ---------- ; ; -------- begin -------------------------- XViewContrib_Event.pro --- ; PRO XViewContrib_Event, Event @files.common @geometry.common COMMON contrib_conserve, contrib, Nlamb, x COMMON screen_common, screenSize, scaleFactor ;; --- Main e...
IDL
null
12,176
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/eqwwidth.pro
FUNCTION eqwwidth, lambda, I Nlambda = n_elements(lambda) continuum = 0.5 * (I(0) + I(Nlambda-1)) ref_width = continuum * (lambda(Nlambda-1) - lambda(0)) return, (ref_width - int_tabulated(lambda, I, /SORT)) / continuum END
IDL
null
235
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/rrh.pro
PRO rrh restore, getenv('RH_IDL_PATH') + '/rh.sav' END
IDL
null
57
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/viewangles.pro
; -------- file: -------------------------- viewangles.pro ----------- ; ; -------- begin -------------------------- XViewAngles_Event.pro ---- ; PRO XViewAngles_Event, Event @files.common Line = 0 & Cont = 1 ;; --- Main event handler -- -------------- ; stash = widget_info( Event...
IDL
null
7,635
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/viewflux.pro
; -------- file: -------------------------- viewflux.pro ------------- ; ; -------- begin -------------------------- XViewFluxEvent.pro ------- ; PRO XViewFluxEvent, Event @spectrum.common @geometry.common Off = 0 & On = 1 ;; --- Main event handler -- -------------- ; widget_contr...
IDL
null
10,805
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/viewatmos.pro
; ----------------------------------------- viewatmos.pro ------------ ; ; -------- begin -------------------------- setDisplayType.pro ------- ; FUNCTION setDisplayType, stash, type widget_control, stash, GET_UVALUE=state state.displayType = type widget_control, stash, SET_UVALUE=state return, state END ; ...
IDL
null
11,298
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/readflow.pro
; -------- file: -------------------------- readflow.pro ------------- ; ; -------- begin -------------------------- readFlow.pro ------------- ; FUNCTION readFlow, fileName @geometry.common @spectrum.common WHILE (NOT existFile(fileName, UNIT=flowUnit, /XDR)) DO BEGIN answer = dialog_message(/QUESTION, "Find ...
IDL
null
939
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/xdisplaytext.pro
PRO xdisplaytext, text xdisplayfile, TEXT=text, FONT='7x13bold' END
IDL
null
71
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/tag_present.pro
FUNCTION tag_present, s, tag, POSITION=position ;; --- Determine if tag is present in structure s -- ---------;; IF (n_tags(s) LE 0) THEN BEGIN print, "Expression must be structure: S" stop return, 0; ENDIF n = where(tag_names(s) EQ tag, count) IF (count GT 0) THEN BEGIN position = n[0] re...
IDL
null
361
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/readflux.pro
; -------- file: -------------------------- readflux.pro ------------- ; ; -------- begin -------------------------- readFlux.pro ------------- ; FUNCTION readFlux, fileName @geometry.common @spectrum.common WHILE (NOT existFile(fileName, UNIT=fluxUnit, /XDR)) DO BEGIN answer = dialog_message(/QUESTION, "Find ...
IDL
null
1,515
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/multimol.pro
FUNCTION eqcCO, temp EV = 1.60219E-19 KBOLTZMANN = 1.380662E-23 CM_TO_M = 1.0E-2 Ediss = 11.091 * EV kT = KBOLTZMANN * temp a = reverse([-49.0414, 14.0306, -26.6341, 35.3827, -26.5424, 8.32385]) t = temp*1.0E-4 eqc = a(0) FOR n=1, n_elements(a)-1 DO eqc = eqc*t + a(n) return, exp(Ediss/kT + eqc ...
IDL
null
4,638
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/tauone.pro
FUNCTION tauone, z, chi, TAUVALUE=tauvalue IF (n_params() LT 2) THEN BEGIN print, "Usage: result = tauone(z, chi, TAUVALUE=tauvalue)" return, 0 ENDIF IF (NOT keyword_set(TAUVALUE)) THEN tauvalue = 1.0 Nz = n_elements(z) s = size(chi) IF (s[0] EQ 2) THEN BEGIN Nx = s[1] IF (s[2] NE Nz) TH...
IDL
null
1,022
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/viewtrans.pro
; ----------------------------------------- viewatom.pro ------------- ; ; -------- begin -------------------------- displayTrans.pro --------- ; PRO displayTrans, state theatom = state.atom_ptr fmtbb = '(I2, " - ", I2, 4X, F9.3, 5X, E8.2, 2X, A5)' fmtbf = '(I2, " - ", I2, 2X, F9.3, 5X, E8.2, X)' fmtfx = '(...
IDL
null
10,195
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/viewavg.pro
; -------- file: -------------------------- viewavg.pro -------------- ; ; -------- begin -------------------------- XViewAvg_Event.pro ------- ; PRO XViewAvg_Event, Event @spectrum.common Off = 0 & On = 1 ;; --- Main event handler -- -------------- ; stash = widget_info(Event.han...
IDL
null
16,811
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/viewpops.pro
; ----------------------------------------- viewpops.pro ------------- ; FUNCTION levelMenu_Event_Func, event widget_control, event.id, GET_UVALUE=uvalue return, {ID:event.handler, TOP:event.top, HANDLER:0L, VALUE:uvalue} END ; -------- begin -------------------------- setOplot.pro ------------- ; FUNCTION set...
IDL
null
11,882
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/pstv.pro
pro PSTV, image, x, y, order=order common SCREEN_COMMON, ScreenSize, ScaleFactor if (n_elements(x)) eq 0 then xpos = 0 if (n_elements(y)) eq 0 then ypos = 0 if(keyword_set(order)) then order = 1 else order = 0 if (!D.NAME eq 'PS') then begin xps = float(x)/ScreenSize[0]*!D.X_SIZE yps = float(y)/S...
IDL
null
588
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/labsneckatlas.pro
PRO labsneckatlas, Fatlas, latlas ;; Returns selected wavelength range from the Labs & Neckel ;; absolute flux atlas. ;; ;; Parameters: ;; Input: lambdaMin -- Minimum wavelength [nm] ;; lambdaMax -- Maximum wavelength [nm] ;; Output: Fatlas -- Float array of flux values [J s^-...
IDL
null
1,068
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/cmprss.pro
function CMPRSS, array ;+ ; NAME: ; CMPRSS ; PURPOSE: ; Remove trivial dimensions from input array ; CATEGORY: ; CALLING SEQUENCE: ; cmparr = CMPRSS(array) ; INPUTS: ; array -- Array to be compressed ; KEYWORD PARAMETERS: ; OUTPUTS: ; cmparr -- Array with trivial dimensions removed ; CO...
IDL
null
540
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/readmolecules.pro
; -------- begin -------------------------- readMolPops.pro ---------- ; FUNCTION readMolPops, molecule, fileName @geometry.common @files.common IF (n_tags(molecule) LE 0) THEN return, 0 CASE geometryType OF "ONE_D_PLANE": nv = dblarr(geometry.Ndep, molecule.Nv) "SPHERICAL_SYMMETRIC": nv = dblar...
IDL
null
3,890
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/replic_atmos_3d.pro
PRO replic_atmos_3d, multiAtmos, $ OUTPUT_BASE=output_base, $ NX=Nx, DX=dx, VX=vx, $ Ny=Ny, DY=dy, VY=vy, $ NZ1=Nz1 a1D = read1datmos(multiAtmos) IRRADIATED = 0L & ZERO = 1L & PLANCK = 2L WGHT_PER_H = 1.4350D0 AMU ...
IDL
null
3,301
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/read_rlk_pf_table.pro
FUNCTION read_rlk_pf_table, pf_input, TPF=Tpf pf_struct = {pti: 0L, Nstage: 0L, pf: ptr_new(), ionpot: ptr_new()} Nelem = 99 pf_elem = replicate(pf_struct, Nelem) Npf = 0L openr, lun, /XDR, /GET_LUN, pf_input readu, lun, Npf Tpf = dblarr(Npf) readu, lun, Tpf pti = 0L Nstage = 0L FOR n=0,...
IDL
null
645
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/viewmolterm.pro
; ----------------------------------------- viewmolterm.pro ---------- ; ; -------- begin -------------------------- XViewMolTerm_Event.pro --- ; PRO XViewMolTerm_Event, Event ;; --- Main event handler -- -------------- ; widget_control, Event.id, GET_UVALUE=Action stash = widget_info...
IDL
null
4,336
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/readaake.pro
;======================================================= ; ; Read the XDR formatted granulation cube (Nordlund 1989) ; datadir = '~/src/rh/Atmos' ; openr, unit, datadir + '/aake.xdr', /XDR, /GET_LUN nx = 0L ny = 0L nz = 0L readu, unit, nx, ny, nz x = fltarr(nx) y = fltarr(ny) h = fltarr(nz) readu, unit, x, y, h ; te ...
IDL
null
460
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/rotbroad.pro
; -------- file: -------------------------- rotbroad.pro ------------- ; ; -------- begin -------------------------- rotbroad.pro ------------- ; FUNCTION rotbroad, lambda, intensity, xmu, v_rot, NPHI=Nphi ;; --- Computes rotationally broadened line profile for specific mu value. ;; Inputs: lambda: W...
IDL
null
2,543
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/timestamp.pro
FUNCTION timestamp spawn, /NOSHELL, 'date', result return, strmid(result[0], strpos(result[0], ':') - 2, 8) END
IDL
null
117
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/planck.pro
FUNCTION PLANCK, T, lambda, HZ=hz ;; --- lambda in [nm] -- -------------- ; CLIGHT = 2.99792458E+08 HPLANCK = 6.626176E-34 KBOLTZMANN = 1.380662E-23 CM_TO_M = 1.0E-02 NM_TO_M = 1.0E-09 ERG_TO_JOULE = 1.0E-07 ;; --- Convert lambda to [m] -- ...
IDL
null
876
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/linear.pro
function DSUP, r,i,j ; ni= n_elements(i) nj= n_elements(j) sr= size(r) & type= sr(sr(0)+1) ; IF (nj eq 1) THEN return, r(i,scalar(j)) rij= make_array(dimension=[ni,nj],type=type) FOR n=0,nj-1 DO rij(*,n)= r(i,j(n)) ; return, rij end function LINEAR, rr,ix,jy ;+ ; NAME: ; LINEAR ; PURPOSE: ; (Bi)linear int...
IDL
null
1,256
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/scaleimg_idl.pro
FUNCTION scaleimg_idl, img, Ncol, Nrow, CUBIC=cubic imgSz = size(img) d1 = float(imgSz(1)) & d2 = float(imgSz(2)) IF (keyword_set(CUBIC)) THEN $ return, poly_2d(img, [0, 0, (d1 - 1.0)/(Ncol-1), 0], $ [0, (d2 - 1.0)/(Nrow-1), 0, 0], 2, Ncol, Nrow, /CUBIC) $ ELSE $ return, poly_2d(img...
IDL
null
425
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/make3datmos.pro
PRO make3datmos, file, HGRID=hgrid, MICRO=micro, DEBUG=debug ;; ;; Create 3D atmospheric input file from granulation cube of Nordlund ;; ;; For the microturbulence there are two possibilities. ;; 1. Standard option: zero microturbulence. Note that Nordlund uses this. ;; It is very easy to introduce another CONS...
IDL
null
4,267
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/airtovacuum.pro
FUNCTION airtovacuum, wave, TO_VACUUM_LIMIT=to_vacuum_limit ;+ ; NAME: ; AIRTOVACUUM ; PURPOSE: ; Convert air wavelengths to vacuum wavelengths, i.e. correct ; for the index of refraction of air under standard conditions. ; Wavelength values below 200.0 nm will not be altered. Uses the IAU ; sta...
IDL
null
1,508
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/isarray.pro
;------------------------------------------------------------- ;+ ; NAME: ; ISARRAY ; PURPOSE: ; Tests if the argument is an array. ; CATEGORY: ; CALLING SEQUENCE: ; flag = isarray(a) ; INPUTS: ; a = variable to test. in ; KEYWORD PARAMETERS: ; OUTPUTS: ; fla...
IDL
null
1,405
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/solve2d.pro
angleSet = 4L Nx = 50L & Nz = 50L zmin = 0.0 & zmax = 600 & H = 60.0 Nlambda = 15L NmaxIter = 25L & iterLimit = 1.0D-4 Ngdelay = 4L & Ngorder = 3L & Ngperiod = 4L FIXED = 0L & PERIODIC = 1L boundCond = FIXED IRRADIATED = 0L & ZERO = 1L & PLANCK = 2L boundVal = [ZERO, ZER...
IDL
null
2,094
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/rh_make_fits.pro
pro rh_make_fits,quantity,rayfile,input_dir,bifrost_dir,bifrost_snapname,runname,runid=runid,$ obstitle=obstitle,debug=debug,cp_to_rep=cp_to_rep ; ;+ ; NAME: ; RH_MAKE_FITS ; ; PURPOSE: ; make FITS file version of rh15d output ; ; CATEGORY: ; Bifrost, rh ; ; CALLING SEQUENCE: ; RH_MAKE_FIT...
IDL
null
15,821
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/viewatom.pro
; ----------------------------------------- viewatom.pro ------------- ; ; -------- begin -------------------------- setAtom.pro -------------- ; FUNCTION setAtom, stash, atom widget_control, stash, GET_UVALUE=state IF (ptr_valid(state.atom_ptr)) THEN free_atom, state.atom_ptr state.atom_ptr = ptr_new(atom) ...
IDL
null
9,335
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/panel.pro
PRO panel, image, x, y, XPOS=xpos, YPOS=ypos, $ LEFT=left, SCALETEXT=ScaleText, NOSCALE=noscale, $ XTITLE=xtitle, YTITLE=ytitle, TITLE=title, NOIMAGE=noimage, $ TOP_BAR=top_bar, ORDER=order, ORTHOSCOPIC=orthoscopic, $ REVERSE_X=reverse_x, REVERSE_Y=reverse_y, $ TAB...
IDL
null
9,321
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/set_decomposed.pro
PRO set_decomposed, COLOR_TABLE=color_table IF (!D.NAME EQ 'X') THEN BEGIN device, GET_VISUAL_DEPTH=depth IF (depth GT 8) THEN device, DECOMPOSED=0 ENDIF ELSE $ device, DECOMPOSED=1 IF (keyword_set(COLOR_TABLE)) THEN loadct, color_table END
IDL
null
261
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/viewstokes.pro
; ----------------------------------------- viewstokes.pro ----------- ; ; -------- begin -------------------------- XViewStokes_Event.pro ---- ; PRO XViewStokes_Event, Event @files.common @spectrum.common Off = 0 & On = 1 ;; --- Main event handler -- -------------- ; widget_contr...
IDL
null
15,157
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/angstrom.pro
FUNCTION angstrom ;; Define the Angstrom symbol (for people who do NOT want to use nm). IF (!D.NAME EQ 'PS') THEN BEGIN help, /DEVICE, OUTPUT=help_text index = where(strpos(help_text, 'ISOLatin1', 0) ge 0, count) IF (count EQ 0) THEN BEGIN message, "Setting font encoding to ISOLatin1", /INFORMAT...
IDL
null
663
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/vacuumtoair.pro
FUNCTION vacuumtoair, wave, TO_AIR_LIMIT=to_air_limit ;+ ; NAME: ; VACUUMTOAIR ; PURPOSE: ; Convert vacuum wavelengths to air wavelengths, i.e. correct ; for the index of refraction of air under standard conditions. ; Wavelength values below 200 nm will not be altered. Accurate to ; about 0.005 A ; ; CALLING SEQUE...
IDL
null
1,463
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/zero_array.pro
FUNCTION zero_array, a, INDEFINITE=indefinite IF (keyword_set(INDEFINITE)) THEN BEGIN s = size(a) Na = n_elements(s) return, reform(make_array(s[Na-1], VALUE=0.0, TYPE=s[Na-2]), $ s[1:s[0]], /OVERWRITE) ENDIF ELSE $ return, a - a END
IDL
null
274
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/opacandsource.pro
PRO opacandsource, WAVENO=waveNo, RAY=ray, chi, S, JNU=Jnu @files.common @geometry.common @atmos.common @opacity.common @spectrum.common IF (n_params() LT 2) THEN BEGIN print, "Usage: OPACANDSOURCE, WAVENO=waveNo, RAY=ray, chi, S, JNU=Jnu" return ENDIF metalFile = "metals.out" moleculeFile = ...
IDL
null
830
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/rhwritepng.pro
PRO rhwritepng, WindowNo, baseName COMMON colors, r_orig, g_orig, b_orig, r_curr, g_curr, b_curr wset, WindowNo filename = baseName + timeStamp() + '.png' write_png, filename, tvrd(/ORDER), r_curr, g_curr, b_curr r = dialog_message(/INFORMATION, "Wrote graph to file: " + filename) END
IDL
null
298
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/strsplit.pro
FUNCTION strsplit, string, pattern, _ref_extra=extra release = float(strmid(!VERSION.RELEASE, 0, 3)) IF (release LT 5.3) THEN BEGIN IF (n_params() EQ 1) THEN pattern = ' ' items = str_sep(string, pattern) nonempty = where(items NE '', count) IF (count GT 0) THEN items = items(nonempty) return, ...
IDL
null
512
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/viewtermdiag.pro
; -------- file: -------------------------- viewtermdiag.pro --------- ; ; -------- begin -------------------------- setBox.pro --------------- ; PRO setBox, stash, x, y widget_control, stash, GET_UVALUE=state state.box_x = x state.box_y = y widget_control, stash, SET_UVALUE=state END ; -------- end --------...
IDL
null
17,863
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/viewgrid.pro
; ----------------------------------------- viewgrid.pro ------------- ; ; -------- begin -------------------------- XViewGrid_Event.pro ------ ; PRO XViewGrid_Event, Event Off = 0 & On = 1 ;; --- Main event handler -- -------------- ; stash = widget_info(Event.handler, /CHILD) w...
IDL
null
5,072
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/psclose.pro
pro PSCLOSE, pname=pn, $ transparency=trnsp, $ print=print @ps.common device, /CLOSE if (not keyword_set(pn)) then pn = 'lw' if (keyword_set(print)) then begin if (ColorPrint) then begin if (keyword_set(trnsp)) then $ spawn, ['xprint', '-transparency', FileName], /N...
IDL
null
553
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/viewsource.pro
; -------- file: -------------------------- viewsource.pro ----------- ; ; -------- begin -------------------------- setRatio.pro ------------- ; FUNCTION setRatio, stash, ratio widget_control, stash, GET_UVALUE=state state.ratio = ratio widget_control, stash, SET_UVALUE=state return, state END ; -------- en...
IDL
null
18,270
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/anim_plot.pro
PRO EHANDLER, ev widget_control, /DESTROY, ev.TOP END PRO anim_plot, x, movie, $ TRACK=track, CYCLE=cycle, DISPLAY_MEAN=display_mean, $ PNG_NAME=png_name, _EXTRA=extra_keywords COMMON colors, r_orig, g_orig, b_orig, r_curr, g_curr, b_curr movieSize = size(movie) IF (movieSize[0]...
IDL
null
1,647
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/zgrid.pro
FUNCTION zgrid, Nz, zbottom, ztop, alpha IF (alpha LT 1.0) THEN BEGIN print, "Scaling parameter alpha has to be larger than 1.0, not ", alpha return, 0 ENDIF IF (alpha EQ 1.0) THEN $ return, zbottom + dindgen(Nz) * (ztop - zbottom) / float(Nz - 1) z1 = (ztop - zbottom) / (alpha^(Nz-1) - 1.0) z0 ...
IDL
null
382
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/readopacity.pro
; -------- file: -------------------------- readopacity.pro ---------- ; ; -------- begin -------------------------- openOpacity.pro ---------- ; FUNCTION openOpacity, fileName @geometry.common @atmos.common @opacity.common @files.common @input.common ;; --- Open opacity file for active transitions -- ---------...
IDL
null
5,902
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/cube_test.pro
FUNCTION cc_kernel, s s2 = s * s s3 = s2 * s u = [-0.5*(s3 + s) + s2, 1.5*s3 - 2.5*s2 + 1.0, $ -1.5*s3 + 2.0*s2 + 0.5*s, 0.5*(s3 - s2) ] return, u END FUNCTION modulo, n, Np m = n index = where(n GE 0, count) IF (count GT 0) THEN m(index) = n(index) MOD Np index = where(n LT 0, co...
IDL
null
2,356
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/rh_idl2fits_varrep.pro
pro rh_idl2fits_varrep,varrep varrep=[$ ['atmos_file','atmos_f'],$ ['abund_file','abund_f'],$ ['15d_rerun','15d_reru'],$ ['15d_depth_refine','15d_dere'],$ ['15d_depth_zcut','15d_dezc'],$ ['15d_write_extra','15d_wrex'],$ ['15d_write_spectrum','15d_wrsp'],$ ['15d_tmax_cut','15d_tmcu'],$ ['vturb_add','vturbadd'],$ ['n_pe...
IDL
null
1,514
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/rh_idl2fits.pro
function starts_with_numeral,st fc=strmid(strtrim(st,2),0,1) iw=where(fc eq ['1','2','3','4','5','6','7','8','9','0'],count) if count eq 1 then return, 1 else return,0 end pro rh_idl2fits,inputfile,hdr ,debug=debug ; ;+ ; NAME: ; RH_IDL2FITS ; ; PURPOSE: ; add RH input file variables to hdr ; ; CATEGOR...
IDL
null
3,540
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/read2datmos.pro
FUNCTION read2datmos, fileName, BFILE=Bfile ;+ ; NAME: ; READ2DATMOS ; ; PURPOSE: ; This routine reads 2-dimensional model atmospheres in RHSC2D format. ; (see rhsc2d/readatmos.c for format definition). ; ; CATEGORY: ; Data reduction ; ; CALLING SEQUENCE: ; atmos = READ2DATMOS(fileName) ; ; INPUTS: ; fileNa...
IDL
null
1,494
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/testspline.pro
FUNCTION cc_kernel, s s2 = s * s s3 = s2 * s u = [-0.5*(s3 + s) + s2, 1.5*s3 - 2.5*s2 + 1.0, $ -1.5*s3 + 2.0*s2 + 0.5*s, 0.5*(s3 - s2) ] return, u END FUNCTION MOD_B_spline, x, y, xx, DY=dy, NY=ny, MONOTONIC=monotonic, $ CUBIC_CONVOLUTION=cubic_convolution Nx = n_e...
IDL
null
2,538
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/rawatom.pro
FUNCTION rawAtom, fileName, VACUUM_TO_AIR=vacuum_to_air ;+ ; NAME: ; RAWATOM ; ; PURPOSE: ; This function reads an atomic data input file from the RH distribution. ; ; CATEGORY: ; I/O ; ; CALLING SEQUENCE: ; Result = RAWATOM(Filename) ; ; INPUTS: ; Filename: File name containing atomic input data. ; ; KEYWORD PA...
IDL
null
6,323
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/KPIRatlas.pro
PRO KPIRatlas, lambdamin, lambdamax, Iatlas, latlas atlasdir = getenv('RH_ATLAS_PATH') + '/KPIR/' file = 'KP_IR.atlas' openr, lun, atlasdir + file, /GET_LUN, /XDR Nwave = 0L readu, lun, Nwave Iatlas = fltarr(Nwave, /NOZERO) latlas = fltarr(Nwave, /NOZERO) readu, lun, latlas, Iatlas free_lun, lun ...
IDL
null
499
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/make2datmos.pro
PRO make2datmos, file, XCUT=xcut, YCUT=ycut, HGRID=hgrid, MICRO=micro, $ DEBUG=debug ;; ;; Create 2D cut through granulation cube of Nordlund ;; ;; For the microturbulence there are two possibilities. ;; 1. Standard option: zero microturbulence. Note that Nordlund uses this. ;; It is very easy to introduce...
IDL
null
5,349
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/readfullj.pro
FUNCTION readfullJ, L0=l0, LN=lN, J20 DEFAULT_J_FILE = "J.dat" DEFAULT_J20_FILE = "J20.out" @geometry.common @spectrum.common IF (NOT keyword_set(L0)) THEN l0 = 0 IF (NOT keyword_set(LN)) THEN lN = spectrum.Nspect-1 Nspect = lN - l0 + 1 CASE geometryType OF "ONE_D_PLANE": BEGIN Jnu = dblarr(...
IDL
null
1,105
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/readbrs.pro
PRO readBRS ;+ ; NAME: ; READBRS ; ; PURPOSE: ; This routine reads the record structure for the background ; opacities. For each wavelength index this structure specifies ; the record number of the backgound opacities (all spatial locations) ; for that wavelength. ; ; CATEGORY: ; Data reduction ; ; CA...
IDL
null
1,835
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/split3datmos.pro
PRO split3datmos, atmos_in, ROW=row, COLUMN=column, MAGNETIC=magnetic IF (n_params() LT 1 OR $ ((NOT keyword_set(ROW)) AND (NOT keyword_set(COLUMN))) OR $ (keyword_set(ROW) AND keyword_set(COLUMN))) THEN BEGIN print, "Usage: split3datmos, atmos_in, atmos_out [, ROW=row] " print, " [, COLUM...
IDL
null
2,985
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/monoint.pro
FUNCTION monoint, x, y, xp i = where(x GT xp, count) IF (count LT 1) THEN BEGIN print, "Interpolation point outside domain" return, 0.0 ENDIF Nx = n_elements(x) IF (i[0] GT 1 AND i[0] LT Nx-1) THEN BEGIN i1 = i[0] i0 = i1 - 1 h1 = x[i1] - x[i0] h0 = x[i0] - x[i0-1] s1 = (y[i1] ...
IDL
null
1,056
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/rhfft3d.pro
;; Nx = 256L & Ny = 256L Nx = 16L & Ny = 16L xoffset = double(56.7639) yoffset = double(27.5679) x = findgen(Nx)/(Nx-1) y = findgen(Ny)/(Ny-1) data = double((1.0 - 4*(x-0.5)^2) # (1.0 - 4*(y-0.5)^2)) data_s = dblarr(Nx, Ny) spawn, /NOSHELL, UNIT=pipe, './rhfft3d_test' writeu, pipe, Nx, Ny, x...
IDL
null
417
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/orient.pro
PRO Orient_Event, Event stash = widget_info( Event.top, /CHILD ) widget_control, stash, GET_UVALUE=state widget_control, Event.id, GET_UVALUE=Action CASE Action OF 'ORIENT_DISMISS': BEGIN widget_control, state.baseWidget, /SENSITIVE widget_control, Event.top, /DESTROY END 'ORIENT_UPDA...
IDL
null
2,603
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/read3datmos.pro
FUNCTION read3datmos, fileName, BFILE=Bfile ;+ ; NAME: ; READ3DATMOS ; ; PURPOSE: ; This routine reads 3-dimensional model atmospheres in RHCC3D format. ; (see rhcc2d/readatmos.c for format definition). ; ; CATEGORY: ; Data reduction ; ; CALLING SEQUENCE: ; atmos = READ3DATMOS(fileName) ; ; INPUTS: ; fileNa...
IDL
null
1,615
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/viewbopac.pro
; -------- begin -------------------------- readContrib.pro ---------- ; FUNCTION readContrib, fileName, LAMBDA=lambda @geometry.common CASE geometryType OF "ONE_D_PLANE": $ contr_str = {label: "", type: 0L, opac: dblarr(geometry.Ndep)} "TWO_D_PLANE": $ contr_str = {label: "", type: 0L, $ ...
IDL
null
7,782
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/ATMOSatlas.pro
PRO ATMOSatlas, lambdaMin, lambdaMax, Iatlas, latlas ;+ Reads selected wavelength range from the ATMOS infrared Solar Atlas ; ; Parameters: ; Input: lambdaMin -- Minimum wavelength [nm] ; lambdaMax -- Maximum wavelength [nm] ; ; Output: Iatlas -- Integer array of intensities no...
IDL
null
1,590
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/viewatlas.pro
; ----------------------------------------- viewatlas.pro ------------ ; ; -------- begin -------------------------- setAtlas.pro ------------- ; FUNCTION setAtlas, state, KPNO=kpno, HAWAII=hawaii, KPK=kpk, $ SUMER=sumer, ATMOS=atmos, SOLFLUX=SolFlux ;; --- Just to be on the safe side with memo...
IDL
null
12,726
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/tabinv.pro
PRO TABINV,XARR,X,IEFF ;+ ; NAME: ; TABINV ; PURPOSE: ; To find the effective index of a function value in ; an ordered vector. ; CALLING SEQUENCE: ; TABINV,XARR,X,IEFF ; INPUTS: ; XARR - the vector array to be searched, must be monotonic ; increasing or decreasing ; X - th...
IDL
null
3,287
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/rayinterpolate.pro
FUNCTION rayinterpolate, f, vis s = size(f) IF (s[0] NE 2) THEN BEGIN print, "RAYINTERPOLATE: f should be a 2-D function" return, 0 ENDIF Nvalid = n_elements(vis) fray = dblarr(Nvalid) FOR n=0, Nvalid-1 DO BEGIN CASE (vis[n].type) OF "vertical": BEGIN fray[n] = vis[n].coeff[0]*f...
IDL
null
610
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/makelogo.pro
; -------- begin -------------------------- makeLogo_1D.pro ---------- ; PRO makeLogo_1D, fileName IF (n_elements(fileName) LE 0) THEN fileName = '~/idl/lib/rh/logo_1D.gif' window, 2, XSIZE=450, YSIZE=100 plot, [0,1], XMARGIN=[2,2], YMARGIN=[2,2], CHARSIZE=0.3 backgroundColor = 225B & textColor = 75B & r...
IDL
null
2,296
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/vector.pro
;------------------------------------------------------------- ;+ ; NAME: ; VECTOR ; PURPOSE: ; Force given argument to be an vector. ; CATEGORY: ; CALLING SEQUENCE: ; y = vector(x) ; INPUTS: ; x = input which may be an vector or scalar. in ; KEYWORD PARAMETERS: ; OUTPUTS: ; y = out w...
IDL
null
1,288
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/getline.pro
FUNCTION getLine, unit, COMMENT_CHAR=comment_char, EXIT_ON_EOF=exit_on_EOF IF (NOT keyword_set(COMMENT_CHAR)) THEN comment_char = '#' line = '' WHILE (NOT eof(unit)) DO BEGIN readf, unit, line line = strtrim(line, 2) IF ((strmid(line, 0, 1) NE '') AND $ (strmid(line, 0, 1) NE comment_char)) ...
IDL
null
475
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/getincludes.pro
PRO getincludes, LIBRARY=library, OUTPUT_FILE=output_file, $ TEMPLATE=template, INCLUDE_DIR=include_dir ;;+ ;; List .h include files in c-source code files to define ;; explicit dependencies in Makefile. ;;- IF (NOT keyword_set(TEMPLATE)) THEN template = '*.c' files = file_search(templ...
IDL
null
2,143
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/pswindow.pro
pro PSWINDOW, WindowNumber, xsize=xsize, ysize=ysize, nopop=nopop, $ title=title, free=free common SCREEN_COMMON, ScreenSize, ScaleFactor if (n_params(0) lt 1) then WindowNumber = 0 if (not keyword_set(xsize)) then xsize = 640 if (not keyword_set(ysize)) then ysize = 512 if (not keyword_set(...
IDL
null
796
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/viewray.pro
FUNCTION setQuantity, stash, qstring @geometry.common @atmos.common @spectrum.common @opacity.common widget_control, stash, GET_UVALUE=state IF (qstring EQ 'Source function') THEN $ widget_control, state.waveslider, SENSITIVE=1 $ ELSE $ widget_control, state.waveslider, SENSITIVE=0 state.qstring = qstr...
IDL
null
11,722
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/xyann.pro
; ----------------------------------------- xyann.pro ---------------- ; ; -------- begin -------------------------- xann.pro ----------------- ; FUNCTION xann, fraction xann = !X.CRANGE(0) + fraction*(!X.CRANGE(1) - !X.CRANGE(0)) IF (!X.TYPE) THEN xann = 10^xann return, xann END ; -------- end --------------...
IDL
null
676
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/solve1d.pro
;PRO solve1d ;; IDL driver for one-dimensional two-level atom solver with given ;; Planck function Bp and collisional destruction parameter epsil. ;; ;; Han Uitenbroek ;; Quantities: ;; NmaxIter - Maximim number OF iterations ;; NgOrder - Order of Ng convergence acceleration ;...
IDL
null
2,684
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/viewdisk.pro
; ----------------------------------------- viewdisk.pro ------------- ; ; -------- begin -------------------------- XViewDisk_Event.pro ------ ; PRO XViewDisk_Event, Event @files.common Off = 0 & On = 1 ;; --- Main event handler -- -------------- ; widget_control, Event.id, GET...
IDL
null
4,798
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/cospectrum.pro
FUNCTION getWavelengthTable, files, waveRange ;; Reads line transitions from files specified in files parameter ;; and returns lines only in specified wavenumber region. ;; Input parameters: ;; files -- String array of filenames ;; waveRange -- Range of wavenumbers [cm^-1] molecular_rt = {wavenum...
IDL
null
4,711
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/readatmos.pro
; -------- file: -------------------------- readatmos.pro ------------ ; ; -------- begin -------------------------- readAtmos.pro ------------ ; FUNCTION readAtmos, fileName ;+ ; NAME: ; READDATMOS ; ; PURPOSE: ; This routine reads atmosphere output files from the RH radiative ; transfer programs (RHF1D, RHSC...
IDL
null
4,189
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/combine_ns_fal.pro
function combine_ns_fal, ns_model, fal_model, OUTPUT_NAME=output_name, $ H0=h0, H1=h1 IF (n_params() LT 2) THEN BEGIN print, "Usage:" print, " output = COMBINE_NS_FAL(ns_model, fal_model, $" print, " OUTPUT_NAME=output_name, H0=h0, H1=h1)" return, 0 ...
IDL
null
3,416
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/dump1datmos.pro
PRO dump1datmos, geometry, atmos, filename, $ MODELNAME=modelname, COMMENT=comment, GRAVITY=gravity CM_TO_M = 1.0E-02 G_TO_KG = 1.0E-03 IF (n_params() LT 3) THEN BEGIN message, "Usage: DUMP1DATMOS, geometry, atmos, filename", /INFORMATIONAL return ENDIF openw, atmos_unit, /GET_LUN,...
IDL
null
1,705
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/viewmolpops.pro
; ----------------------------------------- viewmolpops.pro ---------- ; ; -------- begin -------------------------- XViewMolPops_Event.pro --- ; PRO XViewMolPops_Event, Event ;; --- Main event handler -- -------------- ; widget_control, Event.id, GET_UVALUE=Action stash = widget_info...
IDL
null
5,795
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/showmol.pro
nHtot = total(atmos.nh, 2) CASE geometryType OF "ONE_D_PLANE": BEGIN hkm = geometry.height / 1.0E+03 nrel = dblarr(geometry.Ndep, n_elements(molecules)) END "SPHERICAL_SYMMETRIC": BEGIN hkm = geometry.r / 1.0E+03 nrel = dblarr(geometry.Nradius, n_elements(molecules)) END ...
IDL
null
1,247
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/readray.pro
; -------- file: -------------------------- readray.pro -------------- ; ; -------- begin -------------------------- readRay.pro -------------- ; FUNCTION readRay, fileName, FORCE_STOKES=force_stokes @input.common @atmos.common @geometry.common @spectrum.common WHILE (NOT existFile(fileName, UNIT=rayUnit, /XDR)) ...
IDL
null
3,773
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/piecewise1d.pro
FUNCTION w2, dtau w = dblarr(2) if (dtau < 5.0E-4) THEN BEGIN w[0] = dtau*(1.0 - 0.5*dtau) w[1] = dtau^2 * (0.5 - 0.33333333*dtau) return, w ENDIF IF (dtau > 50.0) THEN BEGIN w[1] = 1.0 w[0] = 1.0 ENDIF ELSE BEGIN expdt = exp(-dtau) w[0] = 1.0 - expdt w[1] = w[0] - dtau*ex...
IDL
null
2,817
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/psxyouts.pro
pro PSXYOUTS, xpos, ypos, string, alignment=alignment, charsize=charsize common SCREEN_COMMON, ScreenSize, ScaleFactor if (not keyword_set(alignment)) then alignment = 0.0 if (not keyword_set(charsize)) then charsize = 1.0 xd = xpos*ScaleFactor(0) yd = ypos*ScaleFactor(1) xyouts, xd, yd, /DEVICE, stri...
IDL
null
368
[ascl:1502.001]
https://github.com/ITA-Solar/rh
idl/viewmolecules.pro
; ----------------------------------------- viewmolecules.pro -------- ; ; -------- begin -------------------------- XViewMolecule_Event.pro -- ; PRO XViewMolecule_Event, Event @geometry.common @files.common COMMON screen_common, screenSize, scaleFactor Off = 0 & On = 1 ;; --- Main event handler -- ...
IDL
null
10,631