# rebinned to whatever wvlBinEdges we provided. # Uncomment the following to see a plot of the filter curve and its rebinned shape. ''' plt.plot(obs.rawFilterWvls, obs.rawFilterTrans, marker='o', markersize = 2, linestyle='-', color='black', label = "Original filter from MKIDStd") plt.step(obs.filterWvlBinEdges[:-1], obs.filterTrans, where='post', color='blue', label = "Rebinned to wvlBinEdges") plt.legend() plt.xlabel('Angstroms') plt.ylabel('Transmission') plt.show() ''' # By default loadFilter() will also turn on the application of the filter. You can set # switchOnFilter to False when calling loadFilter to not activate the filter immediately, # and also toggle the filters on and off with switchOffFilter() and switchOnFilter(). obs.switchOffFilter() # With the filter off let's get the full spectrum of the selected pixel. specDict = obs.getPixelSpectrum(row, col, firstSec=0, integrationTime= -1, weighted=True, fluxWeighted=True) specWvlBinEdges = specDict['wvlBinEdges'] fullSpectrum = specDict['spectrum'] # Now let's switch the filter back on and overplot the filtered spectrum with the full # spectrum. obs.switchOnFilter() filteredSpecDict = obs.getPixelSpectrum(row, col, firstSec=0, integrationTime= -1, weighted=True, fluxWeighted=True) filteredSpecWvlBinEdges = filteredSpecDict['wvlBinEdges'] filteredSpectrum = filteredSpecDict['spectrum'] plt.step(specWvlBinEdges[:-1], fullSpectrum, where = 'post', label = 'Full ARCONS spectrum of single pixel')