Thread: Problems with funcgen, evalresp

Started: 2013-07-19 23:28:02
Last activity: 2013-07-20 09:00:57
Topics: SAC Help
Andrea Gallegos
2013-07-19 23:28:02
Hi,

I am using the following macro to start calculating the complex instrument response:

funcgen impulse npts 16584 delta 0.001 begin 0
ch KSTNM $1
ch KCMPNM $2
transfer to evalresp station $1 channel $2 network $3
fft
writesp am file

This macro works fine with some files but with others it says there is no response file, even though I checked and the response files are in fact there and appear to be correct. When I ran each command from the macro manually in SAC for files that worked and didn't work I found that the problem seemed to be the funcgen command. When I ran the transfer command without the funcgen command, it would work for any file.

I tried to change the funcgen command options, i.e. increase the number of points, change the shape, to see if I could make it work on all of the files but nothing I did worked.

I am relatively new to using these commands so I wanted to ask why and how funcgen affects the transfer to evalresp function and why does this macro work for some files and not for others?

Thanks,
Andrea

  • Chad Trabant
    2013-07-20 09:00:57

    Hi Andrea,

    Two suggestions: make sure you are matching a) the date-time and b) the location ID in addition to the network, station and channel.

    The embedded evalresp software will search any RESP files found for an appropriate time range (RESP files can contain one or many time ranges). Since your macro does not set the time and the funcgen results do not have KZDATE and KZTIME set, the search will be done for the current time. You can specify the DATE and TIME in the "transfer" command just like the network, station, locid and channel.

    Normally evalresp will search for any location IDs that match the other parameters. For completeness you might also want to specify a location ID, if you have many RESP files the search might find one or more files but maybe not match a proper response.

    You can try adding LOCID to match certain RESP files:

    transfer to evalresp station "$1" channel "$2" network "$3" locid "$4"

    Also, I would add quotes to the values as above, during testing I found what looks like a subtle bug when specifying a location ID of "00".

    regards,
    Chad

    On Jul 19, 2013, at 9:28 AM, Andrea Gallegos <agall<at>nmsu.edu> wrote:

    Hi,

    I am using the following macro to start calculating the complex instrument response:

    funcgen impulse npts 16584 delta 0.001 begin 0
    ch KSTNM $1
    ch KCMPNM $2
    transfer to evalresp station $1 channel $2 network $3
    fft
    writesp am file

    This macro works fine with some files but with others it says there is no response file, even though I checked and the response files are in fact there and appear to be correct. When I ran each command from the macro manually in SAC for files that worked and didn't work I found that the problem seemed to be the funcgen command. When I ran the transfer command without the funcgen command, it would work for any file.

    I tried to change the funcgen command options, i.e. increase the number of points, change the shape, to see if I could make it work on all of the files but nothing I did worked.

    I am relatively new to using these commands so I wanted to ask why and how funcgen affects the transfer to evalresp function and why does this macro work for some files and not for others?

    Thanks,
    Andrea
    _______________________________________________
    sac-help mailing list
    sac-help<at>iris.washington.edu
    http://www.iris.washington.edu/mailman/listinfo/sac-help


05:51:13 v.b3198453