# Load spectra @load_spectra # Load model @const_phabs_pow # Abundances and APEC_TRACE_ABUND are in the model, # but we can override here #abund aspl #xset APEC_TRACE_ABUND Fe # Refit the model fit 1000 save model tmpmodel # Set plot parameters setplot energy setplot command lwidth 2 setplot command lwidth 2 on 0..20 setplot device const_phabs_pow.ps/cps plot ldata delchi # Print the number of counts show rates # Flux determination the new way # freeze all the parameters for {set i 1} {$i < 100} {incr i} { freeze $i } # edit model adding cflux() editmod constant*phabs*cflux(powerlaw) 3.5 78 # fit the model to compute the unabsorbed flux fit 1000 # restore the original model editmod constant*phabs*powerlaw # compute the absorbed flux editmod cflux(constant*phabs*powerlaw) 3.5 78 fit 1000 # restore the original model editmod constant*phabs*powerlaw # Flux determination the old way # Absorved flux over the NuSTAR band flux 3.5 78.0 # Absorbed flux over a wide band energies extend low 0.1 energies extend high 500 flux 0.3 78.0 # Unabsorbed flux over the NuSTAR band newpar 2 0.0 flux 3.5 78.0 # Unabsorbed flux over a wide band flux 0.3 78.0 exit