pro create_hydro_model_cs ;IDL procedure for creating a hydro CS model ;and then convolving it with the STIS PSF for comparison with observations. ;Here's the raw output from the model. read_file,'hydro_borrelly_cs_raw.dat',rho,ncs2,ncs,bcs,skip=17 ;Create a denser grid. delta = 1.478 ;geocentric distance pixel = 0.0244 * 725. * delta ;km/pixel nrho = findgen(550) * pixel xpix = findgen(550) nrho[0] = 0.298 * pixel nbcs = interpol(bcs,rho,nrho) file_xyz,ofile='hydro_borrelly_interpol_cs.dat',nrho,nbcs,/nonint ;Create 2-dim version of the CS profile. haser_image,xpix,nbcs,csimage writefits,'hydro_borrelly_csimage.fits',csimage ;Get the STIS PSF. ;psf = readfits('/data2/encke/psf/stis/strong_psf.fits') psf = readfits('/data2/encke/psf/stis/robinson_nuv.fits') ccsimage = convol(csimage,psf) writefits,'hydro_borrelly_ccsimage.fits',ccsimage ;After experimenting, I found that just using a single row cutting through ;the brightest pixel should be a good enough. Since running the annuli ;routine is such a cpu-hog, this saves a lot of time in running this routine. ;annuli,ccsimage,549,549,1,r,i i = ccsimage[549:*,549] r = findgen(n_elements(i)) r[0] = 0.298 r = r * pixel file_xyz,ofile='hydro_borrelly_ccs.dat',r,i,/nonint ni = interpol(i,r,nrho) file_xyz,ofile='hydro_borrelly_ccs_interpol.dat',nrho,ni,/nonint return end