Skip to content

Instantly share code, notes, and snippets.

@ziotom78
Created May 22, 2019 15:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ziotom78/8273216dfcc4f18c3e8e82140d06a872 to your computer and use it in GitHub Desktop.
Save ziotom78/8273216dfcc4f18c3e8e82140d06a872 to your computer and use it in GitHub Desktop.
Save Strip bandpasses using Stripeline
import Stripeline
import DelimitedFiles
db = Stripeline.InstrumentDB()
for horn in keys(db.focalplane) |> collect |> sort
curdet = db.detectors[db.focalplane[horn].polid]
curdet.band == "W" && continue
response = curdet.bandshape
freqs = range(response.lowest_frequency_hz, response.highest_frequency_hz, length=response.num_of_frequencies) ./ 1e9
filename = "$(horn).txt"
open(filename, "w") do io
DelimitedFiles.writedlm(io, [freqs response.bandshape])
end
println("$horn bandpass saved to $filename")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment