[SAC-HELP] Having problems creating ALPHA input files

Robert Casey rob at iris.washington.edu
Fri Nov 4 10:12:29 PST 2005


	Hi Carlos-

	SAC should work fine on 5 points per row.  That is how it is supposed 
to read incoming data points.  The main thing is that you are running 
READALPHA in the default FREE format, which can handle space-separated 
data columns.

	Try this one-liner to turn 1 column data to five column data.  Note 
that this inserts tabs between columns, and I am not sure if this works 
for READALPHA.  If not, then change out the '\t' at the end of this 
line for some spaces.

   cat TSK.onecol.txt | awk 'BEGIN {x=0}{printf("%d",$1);if (++x==5) 
{printf("\n");x=0;} else {printf("\t")}}'

	-Rob

On Nov 3, 2005, at 10:34 AM, cpena at email.arizona.edu wrote:

> Hello,
>
> I'm generating synthetic earthquakes composed of about 4100 
> acceleration points
> at 0.012 sec intervals using another program and I want to use double
> integration within SAC to generate displacement time series. I've tried
> generating the corresponding ALPHA file for SAC and I'm having 
> problems.
> Specifically, SAC seems to try to read 5 acc pts at once and I'm 
> creating the
> data input in a column format. For example, see below:
>
> Acc pts in column format:
>
> 12
> 23
> 34
> 35
> 11
>
> SAC reads them like this:12   0   0   0   0    (at 0.012 sec intervals)
>                          23   0   0   0   0
>                          34   0   0   0   0
>                          35   0   0   0   0
>                          11   0   0   0   0
>
> Instead as like this:    12  23  34  35  11    (at 0.012 sec intervals)
>
> I've tried to separate the acc pts with commas and even tried to 
> rearrange the
> input in 5 pts per row and SAC will still read the data as shown 
> above. Even if
> this scheme worked, it is impractical to do in a 4100 pt data set.
>
> What do I have to do for SAC to read each acc pt in the column and get 
> rid of
> the "spurios" zero values created by SAC?
>
> Thank you so much for your help
> Carlos Pena
>
>
> _______________________________________________
> sac-help mailing list
> sac-help at iris.washington.edu
> http://www.iris.washington.edu/mailman/listinfo/sac-help
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 2107 bytes
Desc: not available
URL: <http://www.iris.washington.edu/pipermail/sac-help/attachments/20051104/aa8762de/attachment.bin>


More information about the sac-help mailing list