#All test cases using k93models fail the spectrum ratio tests because of 
#absorption lines in these spectra that come out with different interpolations 
#between syn/pysyn. So keeping just a few of these is sufficient.
#
#This subset tests a range of IR filters (spanning wavelength and filter width):
calcphotCase7   wfc3,ir,f098m  rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)
calcphotCase47  wfc3,ir,f167n  rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)

#This subset tests all of the extinction models and a range of stellar 
#temperatures:
calcphotCase48  wfc3,ir,f110w  rn(icat(k93models,30000,0.0,4.0)*ebmvx(0.04,gal1),band(johnson,b),28.0,vegamag)
calcphotCase68  wfc3,ir,f110w  rn(icat(k93models,3500,0.0,4.6)*ebmvx(0.12,gal3),band(johnson,b),28.0,vegamag)

#All test cases using the sky emission lines fail the spectrum ratio tests,
#because of differences in the interpolation of the very narrow lines. So keeping
#just a few of these is sufficient.

#This subset tests a range of IR filters (spanning wavelength and filter width) 
#and a range of renormalization magnitudes:
calcphotCase163  wfc3,ir,f105w  spec(earthshine.fits)*2.0+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))
calcphotCase174  wfc3,ir,f153m  spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)

#The following test cases always fail because of fine-scale features in their 
#spectra, where once again the difference in interpolation produces large ratios
#near the centers of the features. So only keep a couple.

calcphotCase144  wfc3,ir,f140w  rn(z(spec(/grp/hst/cdbs//calspec/gd71_mod_005.fits),0.1),band(johnson,b),28.0,vegamag)
calcphotCase149  wfc3,ir,f140w  rn(z(spec(qso_template.fits),3.0),band(johnson,b),28.0,vegamag)

#All test cases using 'bb' models always pass, because the spectra are so simple.
#Keep 'em all, because they use a good range of renormalization bands.

calcphotCase152  wfc3,ir,f125w  rn(bb(10000),band(johnson,u),28.0,vegamag)
calcphotCase154  wfc3,ir,f125w  rn(bb(10000),band(johnson,r),28.0,vegamag)
calcphotCase156  wfc3,ir,f125w  rn(bb(10000),band(johnson,i),28.0,vegamag)
calcphotCase158  wfc3,ir,f125w  rn(bb(10000),band(johnson,j),28.0,vegamag)
calcphotCase160  wfc3,ir,f125w  rn(bb(10000),band(johnson,k),28.0,vegamag)
calcphotCase162  wfc3,ir,f125w  rn(bb(10000),band(cousins,r),28.0,vegamag)

#All test cases using 'pl' models always pass, because the spectra are so simple.
#Keep 'em all, because they use a good range of renormalization bands.

calcphotCase164  wfc3,ir,f105w  rn(pl(4000.0,-2.0,flam),band(bessell,h),28.0,vegamag)
calcphotCase166  wfc3,ir,f105w  rn(pl(4000.0,-2.0,flam),band(Bessell,j),28.0,vegamag)
calcphotCase168  wfc3,ir,f105w  rn(pl(4000.0,-2.0,flam),band(bessell,k),28.0,vegamag)

#These cases always pass, because of the simple spectra, except for the one
#that includes the emission-line on top of the unit spectrum, which is to be
#expected. Keep all but the emission line.

calcphotCase170  wfc3,ir,f153m  rn(unit(1.0,flam),band(sdss,g),28.0,vegamag)
calcphotCase173  wfc3,ir,f153m  rn(unit(1.0,flam),band(sdss,i),28.0,vegamag)
calcphotCase175  wfc3,ir,f153m  rn(unit(1.0,fnu),band(sdss,z),28.0,vegamag)
calcphotCase176  wfc3,ir,f153m  rn(unit(1.0,flam),box(5000.0,1.0),1.0e-18,flam)

#Almost all of the cases involving BZ library spectra always fail, because of
#their extremely sparse sampling in the near-IR, which is interpolated 
#differently by syn and pysyn, of course. Keep a representative subset that spans
#the stellar types and extinction laws, which will then get migrated over to 
#Pickles library spectra.

calcphotCase72   wfc3,ir,f160w  rn(spec(/grp/hst/cdbs//grid/bz77/bz_1.fits), band(cousins,i),28.0,vegamag)*ebmvx(0.04,gal1)
calcphotCase88   wfc3,ir,f160w  rn(spec(/grp/hst/cdbs//grid/bz77/bz_17.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.2,lmc)
calcphotCase98   wfc3,ir,f160w  rn(spec(/grp/hst/cdbs//grid/bz77/bz_27.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.12,gal3)
calcphotCase101  wfc3,ir,f160w  rn(spec(/grp/hst/cdbs//grid/bz77/bz_30.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.24,xgal)
calcphotCase108  wfc3,ir,f160w  rn(spec(/grp/hst/cdbs//grid/bz77/bz_37.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.04,gal1)
calcphotCase112  wfc3,ir,f160w  rn(spec(/grp/hst/cdbs//grid/bz77/bz_42.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.2,lmc)
calcphotCase117  wfc3,ir,f160w  rn(spec(/grp/hst/cdbs//grid/bz77/bz_48.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.16,smc)
calcphotCase121  wfc3,ir,f160w  rn(spec(/grp/hst/cdbs//grid/bz77/bz_52.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.08,gal1)
calcphotCase125  wfc3,ir,f160w  rn(spec(/grp/hst/cdbs//grid/bz77/bz_56.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.24,xgal)
calcphotCase135  wfc3,ir,f160w  rn(spec(/grp/hst/cdbs//grid/bz77/bz_68.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.16,smc)
calcphotCase138  wfc3,ir,f160w  rn(spec(/grp/hst/cdbs//grid/bz77/bz_71.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.04,gal1)
calcphotCase141  wfc3,ir,f160w  rn(spec(/grp/hst/cdbs//grid/bz77/bz_74.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.16,smc)

#All cases using the k93models always fail because of sharp absorption
#line features in the spectra that are interpolated differently between
#syn and pysyn. Keep a couple that span stellar params.

calcspecCase561  None  icat(k93models,3500,0.0,4.6)
calcspecCase562  None  icat(k93models,44500,0.0,5.0)

#These 2 always pass because of their simple spectra. Keep 'em.
calcspecCase565  None  bb(10000)
calcspecCase571  None  pl(4000.0,-2.0,flam)

#All test cases using k93models fail the spectrum ratio tests, because of
#absorption lines in these spectra that come out with different interpolations
#between syn/pysyn. So keeping just a couple of these is sufficient.

#This subset tests a range of IR filters (spanning wavlelength and filter width)
#and uses a different set of filters than the equivalent set of calcphot cases:

countrateCase12  wfc3,ir,f110w  rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)
countrateCase43  wfc3,ir,f164n  rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)

#This subset tests all of the extinction models and a range of stellar
#temperatures (and is again different than the equivalent calcphot set):

countrateCase48  wfc3,ir,f110w  rn(icat(k93models,25400,0.0,3.9)*ebmvx(0.08,gal1),band(johnson,b),28.0,vegamag)
countrateCase64  wfc3,ir,f110w  rn(icat(k93models,5250,0.0,4.5)*ebmvx(0.24,xgal), band(johnson,b),28.0,vegamag)

#All test cases using the sky emission lines fail the spectrum ratio tests,
#because of differences in the interpolation of the very narrow lines. So keeping
#just a few of these is sufficient.

#This subset tests a range of IR filters (spanning wavelength and filter width)
#and a range of renormalization magnitudes. It also uses a different set of
#filters than the same type of tests in the calcphot subset:

countrateCase11   wfc3,ir,f110w  spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))
countrateCase171  wfc3,ir,f153m  spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)*0.2+spec(el1302a.fits)*0.01333333333+spec(el1356a.fits)*0.012+spec(el2471a.fits)*0.01)

#The following test cases always pass the countrate test, but always fail the
#spectrum ratio tests because of fine-scale features in their spectra.
#I am going to keep just a couple of them.

countrateCase145  wfc3,ir,f140w  rn(z(spec(/grp/hst/cdbs//calspec/g191b2b_mod_004.fits),0.3),band(johnson,b),28.0,vegamag)
countrateCase147  wfc3,ir,f140w  rn(z(spec(spiral.fits),2.0),band(johnson,b),28.0,vegamag)

#All test cases using 'bb' models always pass, because of their simple spectra.
#Keep 'em.
countrateCase151  wfc3,ir,f125w  rn(bb(10000),band(johnson,u),28.0,vegamag)
countrateCase153  wfc3,ir,f125w  rn(bb(10000),band(johnson,r),28.0,vegamag)
countrateCase155  wfc3,ir,f125w  rn(bb(10000),band(johnson,i),28.0,vegamag)
countrateCase157  wfc3,ir,f125w  rn(bb(10000),band(johnson,j),28.0,vegamag)
countrateCase159  wfc3,ir,f125w  rn(bb(10000),band(johnson,k),28.0,vegamag)
countrateCase161  wfc3,ir,f125w  rn(bb(10000),band(cousins,r),28.0,vegamag)

#All test case using 'pl' models always pass, because of their simple spectra.
#Keep 'em.
countrateCase163  wfc3,ir,f105w  rn(pl(4000.0,-2.0,flam),band(bessell,h),28.0,vegamag)
countrateCase165  wfc3,ir,f105w  rn(pl(4000.0,-2.0,flam),band(Bessell,j),28.0,vegamag)
countrateCase167  wfc3,ir,f105w  rn(pl(4000.0,-2.0,flam),band(bessell,k),28.0,vegamag)

#These cases always pass, because of the simple spectra, except for the one
#that includes the emission-line on top of the unit spectrum, which is to be
#expected. Keep them all except for the emission line case.
countrateCase169  wfc3,ir,f153m  rn(unit(1.0,flam),band(sdss,g),28.0,vegamag)
countrateCase172  wfc3,ir,f153m  rn(unit(1.0,flam),band(sdss,i),28.0,vegamag)
countrateCase174  wfc3,ir,f153m  rn(unit(1.0,fnu),band(sdss,z),28.0,vegamag)
countrateCase175  wfc3,ir,f153m  rn(unit(1.0,flam),box(5000.0,1.0),1.0e-18,flam)

#Almost all of the cases involving BZ library spectra always fail, because of
#their extremely sparse sampling in the near-IR, which is interpolated
#differently by syn and pysyn, of course. Keep a representative subset that spans
#the stellar types and extinction laws (and is disjoint from the equivalent
#set of calcphot cases), which will then get migrated over to Pickles spectra.

countrateCase72   wfc3,ir,f160w  rn(spec(/grp/hst/cdbs//grid/bz77/bz_2.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.08,gal1)
countrateCase86   wfc3,ir,f160w  rn(spec(/grp/hst/cdbs//grid/bz77/bz_16.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.16,smc)
countrateCase99   wfc3,ir,f160w  rn(spec(/grp/hst/cdbs//grid/bz77/bz_29.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.2,lmc)
countrateCase106  wfc3,ir,f160w  rn(spec(/grp/hst/cdbs//grid/bz77/bz_36.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.24,xgal)
countrateCase110  wfc3,ir,f160w  rn(spec(/grp/hst/cdbs//grid/bz77/bz_41.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.16,smc)
countrateCase115  wfc3,ir,f160w  rn(spec(/grp/hst/cdbs//grid/bz77/bz_47.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.12,gal3)
countrateCase123  wfc3,ir,f160w  rn(spec(/grp/hst/cdbs//grid/bz77/bz_55.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.2,lmc)
countrateCase133  wfc3,ir,f160w  rn(spec(/grp/hst/cdbs//grid/bz77/bz_66.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.12,gal3)
countrateCase136  wfc3,ir,f160w  rn(spec(/grp/hst/cdbs//grid/bz77/bz_70.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.24,xgal)

