final version for the script to get the station instrument response function