examples file for two population 

wx=3
wy=1
!p.multi=[0,wx,wy]

; Figure 5 from Gibson et al 2016 Frontiers FORWARD paper (plus EIS):  
;
;Cavity with cool dense prominence (two populations)
; created with model CAVMORPH, by filling up a "nougat" with cold dense material
; (otherwise the nougat is usually used to fill with hot dense material, to
;  create SXR "chewy nougats")

for_drive,'cavmorph',/nougat,thcs=45,cdens=1e10,cff_noug=[.2,8.,0,0,0,0],nougwidth=.025,nougtop_r=.9,pop2t=2,xxmin=0.4,yymin=0.4,yymax=1.1,xxmax=1.1,nwinx=wx*512,nwiny=wy*512,winnum=1,charsize=2.
for_drive,'cavmorph',/nougat,thcs=45,cdens=1e10,cff_noug=[.2,8.,0,0,0,0],nougwidth=.025,nougtop_r=.9,pop2t=2,xxmin=0.4,yymin=0.4,yymax=1.1,xxmax=1.1,nwinx=wx*512,nwiny=wy*512,winnum=1,/aia,charsize=2.,/noerase
for_drive,'cavmorph',/nougat,thcs=45,cdens=1e10,cff_noug=[.2,8.,0,0,0,0],nougwidth=.025,nougtop_r=.9,pop2t=2,xxmin=0.4,yymin=0.4,yymax=1.1,xxmax=1.1,nwinx=wx*512,nwiny=wy*512,winnum=1,/eis,charsize=2.,/noerase

wx=2
wy=1
!p.multi=[0,wx,wy]

; filling factor for two populations of this example

for_drive,'cavmorph',line='fillfact',/nougat,thcs=45,pop2T=2,cdens=1e10,cff_noug=[.2,8.,0,0,0,0],nougtop_r=.9,nougwidth=.025,xxmin=.4,yymin=.4,xxmax=1.1,yymax=1.1,winnum=2,/sunedge,nwinx=wx*512,nwiny=wy*512,docont=0,plotlog=0,imin=0,imax=1
for_drive,'cavmorph',line='pop2fillfact',/nougat,thcs=45,pop2T=2,cdens=1e10,cff_noug=[.2,8.,0,0,0,0],nougtop_r=.9,nougwidth=.025,xxmin=.4,yymin=.4,xxmax=1.1,yymax=1.1,winnum=2,/sunedge,nwinx=wx*512,nwiny=wy*512,/noerase,docont=0,plotlog=0,imin=0,imax=1

; column density and losem for two populations of this example

for_drive,'cavmorph',/losem,/nougat,thcs=45,pop2T=2,cdens=1e10,cff_noug=[.2,8.,0,0,0,0],nougtop_r=.9,nougwidth=.025,xxmin=.4,yymin=.4,xxmax=1.1,yymax=1.1,winnum=3,/sunedge,nwinx=wx*512,nwiny=wy*512
for_drive,'cavmorph',/pop2losem,/nougat,thcs=45,pop2T=2,cdens=1e10,cff_noug=[.2,8.,0,0,0,0],nougtop_r=.9,nougwidth=.025,xxmin=.4,yymin=.4,xxmax=1.1,yymax=1.1,winnum=3,/sunedge,nwinx=wx*512,nwiny=wy*512,/noerase
; filling factor for two populations of this example

for_drive,'cavmorph',line='fillfact',/nougat,thcs=45,pop2T=2,cdens=1e10,cff_noug=[.2,8.,0,0,0,0],nougtop_r=.9,nougwidth=.025,xxmin=.4,yymin=.4,xxmax=1.1,yymax=1.1,winnum=4,/sunedge,nwinx=wx*512,nwiny=wy*512,docont=0,plotlog=0,imin=0,imax=1
for_drive,'cavmorph',line='pop2fillfact',/nougat,thcs=45,pop2T=2,cdens=1e10,cff_noug=[.2,8.,0,0,0,0],nougtop_r=.9,nougwidth=.025,xxmin=.4,yymin=.4,xxmax=1.1,yymax=1.1,winnum=4,/sunedge,nwinx=wx*512,nwiny=wy*512,/noerase,docont=0,plotlog=0,imin=0,imax=1

; column density and losem for two populations of this example

for_drive,'cavmorph',/losem,/nougat,thcs=45,pop2T=2,cdens=1e10,cff_noug=[.2,8.,0,0,0,0],nougtop_r=.9,nougwidth=.025,xxmin=.4,yymin=.4,xxmax=1.1,yymax=1.1,winnum=5,/sunedge,nwinx=wx*512,nwiny=wy*512
for_drive,'cavmorph',/pop2losem,/nougat,thcs=45,pop2T=2,cdens=1e10,cff_noug=[.2,8.,0,0,0,0],nougtop_r=.9,nougwidth=.025,xxmin=.4,yymin=.4,xxmax=1.1,yymax=1.1,winnum=5,/sunedge,nwinx=wx*512,nwiny=wy*512,/noerase

for_drive,'cavmorph',/colden,/nougat,thcs=45,pop2T=2,cdens=1e10,cff_noug=[.2,8.,0,0,0,0],nougtop_r=.9,nougwidth=.025,xxmin=.4,yymin=.4,xxmax=1.1,yymax=1.1,winnum=6,/sunedge,nwinx=wx*512,nwiny=wy*512
for_drive,'cavmorph',/pop2colden,/nougat,thcs=45,pop2T=2,cdens=1e10,cff_noug=[.2,8.,0,0,0,0],nougtop_r=.9,nougwidth=.025,xxmin=.4,yymin=.4,xxmax=1.1,yymax=1.1,winnum=6,/sunedge,/noerase,nwinx=wx*512,nwiny=wy*512

;
; now impose a second coronal population
; (note will only have impact on emission observations
;
; first with one population, but now nougat is filled with dens coronal material 

for_drive,'cavmorph',/nougat,thcs=45,nougwidth=.025,nougtop_r=.9,nougmult=10.,xxmin=0.4,yymin=0.4,yymax=1.1,xxmax=1.1,nwinx=wx*512,nwiny=wy*512,winnum=7,/aia

;
; now switch nougat to photospheric abundance
;

for_drive,'cavmorph',/nougat,thcs=45,nougwidth=.025,nougtop_r=.9,nougmult=10.,xxmin=0.4,yymin=0.4,yymax=1.1,xxmax=1.1,nwinx=wx*512,nwiny=wy*512,winnum=7,/aia,pop2T=1,pop2abundance='sun_photospheric_2011_caffau',pop2noug=1,/noerase


; now try imposing chromospheric population on existing numerical datacube
;	(Fan synthetic testbed)

wx=3
wy=1
!p.multi=[0,wx,wy]

;
; first make plots of numerical cube as is
;

for_drive,'numcube',cubename='$FORWARD_DB/TESTBEDS/fullthermodynamic_erupting_qp_mhd_Fan',xxmin=0.8,xxmax=1.4,yymin=-.5,yymax=.5,units='PPM',nwinx=wx*512,nwiny=wy*512,winnum=8,cuberot=-25.,colortable=0,charsize=2.
for_drive,'numcube',cubename='$FORWARD_DB/TESTBEDS/fullthermodynamic_erupting_qp_mhd_Fan',xxmin=0.8,xxmax=1.4,yymin=-.5,yymax=.5,/aia,/occult,imin=-.41,imax=3.5,cuberot=-25,nwinx=wx*512,nwiny=wy*512,winnum=8,/noerase,colortable=0,charsize=2.
for_drive,'numcube',cubename='$FORWARD_DB/TESTBEDS/fullthermodynamic_erupting_qp_mhd_Fan',xxmin=0.8,xxmax=1.4,yymin=-.5,yymax=.5,/eis,/occult,imin=-.41,imax=3.5,cuberot=-25,nwinx=wx*512,nwiny=wy*512,winnum=8,/noerase,colortable=0,charsize=2.

;
; now use temperature threshold to identify material < 3d4 K
; as population 2 chromospheric. Note this won't affect density/emission measure,
; but will add Lyman absorption to e.g. AIA observable
;

wx=2
wy=2
!p.multi=[0,wx,wy]

for_drive,'numcube',cubename='$FORWARD_DB/TESTBEDS/fullthermodynamic_erupting_qp_mhd_Fan',pop2TRegime=2,coldpts=3d4,xxmin=0.8,xxmax=1.4,yymin=-.5,yymax=.5,/aia,/occult,imin=-.41,imax=3.5,cuberot=-25,nwinx=wx*512,nwiny=wy*512,winnum=9,colortable=0

;
; similarly, a threshold can be set on density, e.g. gt 1d9

for_drive,'numcube',cubename='$FORWARD_DB/TESTBEDS/fullthermodynamic_erupting_qp_mhd_Fan',pop2TRegime=2,dthres=1d9,xxmin=0.8,xxmax=1.4,yymin=-.5,yymax=.5,/aia,/occult,imin=-.41,imax=3.5,cuberot=-25,nwinx=wx*512,nwiny=wy*512,winnum=9,/noerase,colortable=0

;
; here it is for EIS
;

for_drive,'numcube',cubename='$FORWARD_DB/TESTBEDS/fullthermodynamic_erupting_qp_mhd_Fan',pop2TRegime=2,dthres=1d9,xxmin=0.8,xxmax=1.4,yymin=-.5,yymax=.5,/eis,/occult,imin=-.41,imax=3.5,cuberot=-25,nwinx=wx*512,nwiny=wy*512,winnum=9,/noerase,colortable=0

;
; and now population 1 (photospheric abundance)

for_drive,'numcube',cubename='$FORWARD_DB/TESTBEDS/fullthermodynamic_erupting_qp_mhd_Fan',pop2TRegime=1,dthres=1d9,xxmin=0.8,xxmax=1.4,yymin=-.5,yymax=.5,/eis,/occult,imin=-.41,imax=3.5,cuberot=-25,nwinx=wx*512,nwiny=wy*512,winnum=9,/noerase,colortable=0,pop2abundance='sun_photospheric_2011_caffau'
end