pro for_pop_phot_all,filein=filein,quiet=quiet,outdir=outdir ;+ ; Project : ISSI - Cavities ; ; Name : for_pop_phot_all ; ; Purpose: ; Calculated level populations for the whole CHIANTI database, with the ; SolarSoft version. Includes photoexcitation. ; ; Inputs ; filein - File containing list of ions to calculate. ; Default is $SSW/packages/chianti/dbase/masterlist/masterlist.ions ; quiet - don't print progress messages. ; ; Calls: for_pop_photo_calc ; ; History: Based on a program by Enrico Landi. ; 12-Nov-2013 Adapted by T. Kucera ; 4-Jan-2016 Changing to fix errors associated with LIST function introduced in IDL 8. Added OUTDIR keyword. ; TAK ;- start=systime(/sec) elem=['h','he','li','be','b','c','n','o','f','ne','na','mg','al',$ 'si','p','s','cl','ar','k','ca','sc','ti','v','cr','mn','fe','co','ni','cu','zn'] ;Elements I want: ;element=['c','o','ne','mg','al','si','s','ar','fe','ni'] if not keyword_set(filein) then filein=concat_dir(!xuvtop,'/masterlist/masterlist.ions') read_masterlist,filein,list nions=n_elements(list) levami=100. ;d=dielectronic lines, we can get rid of these. for i=0,nions-1 do begin meo=strpos(list[i],'d') if meo ge 2 then levami=[levami,i] endfor if n_elements(levami) gt 1 then begin levami=levami[1:*] remove,levami,list nions=n_elements(list) endif ; Start the main loop to calculate everything for i=0,nions-1 do begin pos=strpos(list[i],'_') element=strmid(list[i],0,pos) zelem=where(elem eq element)+1 zelem=zelem[0] ion=list[i] zion=float(strmid(ion,pos+1,strlen(ion))) for_pop_photo_calc,zelem,zion,outdir=outdir if not keyword_set(quiet) then print,'Finished ion ',list[i] endfor finish=systime(/sec) print,'run time =',(finish-start)/3600.,' hours.' end