# 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') plt.step(filteredSpecWvlBinEdges[:-1], filteredSpectrum, where = 'post', label = 'Filtered spectrum') plt.xlabel('Angstroms') plt.ylabel('Total counts (not counts/s/Angstrom)') plt.ylim(0,1200000) plt.legend() plt.show() # Synthetic filters also apply seamlessly to images. Let's create an image cube that's # had a synthetic filter applied and step through the bins to show the filters are # cutting the cube to appropriate levels.