00001 puts("Reading titan volumes using rtitan2");
00002 puts("===================================");
00003 puts("");
00004 puts("");
00005 puts("Quick start ");
00006 puts("-----------");
00007 puts("");
00008 puts("Let's suppose that the data disk is mounted on /mnt/osiris. It contains");
00009 puts("continuous recording from an Osiris family data logger (Osiris, Kephren");
00010 puts("etc.). The steps described below apply in exactly the same way if ");
00011 puts("/mnt/osiris is the target directory of the FTP client running in the");
00012 puts("data logger.");
00013 puts("The file 'timelist' contains the list of times to extract:");
00014 puts("YYYY/MM/DD-HH.MM.SS duration");
00015 puts("...");
00016 puts("To build SAC files for each line of timelist, run:");
00017 puts("rtitan2 -sac -tl timelist -disk /mnt/osiris");
00018 puts("That's all. Each .info file contains information about the associated");
00019 puts("SAC file, including timing accuracy estimation.");
00020 puts("");
00021 puts("If the GPS was running on duty cycle, with a sleep time of one hour, a");
00022 puts("free clock drift of 0.3ppm may lead to a 1ms time error. This is not a");
00023 puts("problem if the time drift is interpolated. To use the complete time");
00024 puts("information contained in the data files before extraction, run the");
00025 puts("following commands:");
00026 puts("rtitan2 -time -disk /mnt/osiris");
00027 puts("This will create one or more .dt and .flt files in the current");
00028 puts("directory. These files can now be used for time drift interpolation,");
00029 puts("just run this command in the same working directory (be sure no SAC");
00030 puts("file is in that directory before):");
00031 puts("rtitan2 -sac -tl timelist -disk /mnt/osiris");
00032 puts("The .info files created now refer to the .dt or .flt file used to");
00033 puts("compute the time drift interpolation.");
00034 puts("");
00035 puts("");
00036 puts("Some advices:");
00037 puts("- if the sampling rate is 500Hz or more with a non continuously running");
00038 puts(" GPS, perform a time pass before the data pass;");
00039 puts("- if possible, do not work on single files, prefer using -disk with a");
00040 puts(" timespec option (rtitan2 proposes a wide range of possibilities to");
00041 puts(" define that);");
00042 puts("- try to keep the directory structure when moving or transporting the");
00043 puts(" data;");
00044 puts("- do not work in the data directory structure.");
00045 puts("");
00046 puts("");
00047 puts("Osiris family vs. Titan timing hardware");
00048 puts("-------------------------------------------");
00049 puts("");
00050 puts("Users of Titan family data loggers may use to process data taking into");
00051 puts("account the 'station time reset/reboot' and 'time shift cycling at +/-");
00052 puts("30 seconds'. Using the Osiris and Kephren hardware, the time shift");
00053 puts("cycling does not occur any more since the external time reference is");
00054 puts("absolute. For Osiris and Kephren, it is normal to observe a time shift");
00055 puts("larger than 30s or smaller than -30s. The 'station time reset/reboot'");
00056 puts("events should not be observed as long as the internal battery of the");
00057 puts("data logger is not empty and the power cable is plugged: the internal");
00058 puts("clock is continuously powered by the internal battery, even if the main");
00059 puts("power source fails (for a reasonable time, however). Please report to");
00060 puts("the Osiris and Kephren user manual for details.");
00061 puts("");
00062 puts("");
00063 puts("Titan time correction");
00064 puts("---------------------");
00065 puts("");
00066 puts("The timing process in the Agecodagis digitizers is based on the");
00067 puts("recording of the occurrence of external time pulses generated by a GPS");
00068 puts("receiver or any other time source (DCF, TeleCode...).");
00069 puts("The digitizer clock used to measure the occurrence is based on a TCXO");
00070 puts("crystal that should have a drift not larger than a few ppm.");
00071 puts("When the absolute time of the samples needs to be known, the delay");
00072 puts("between the external time pulse and the internal digitizer clock must be");
00073 puts("estimated and removed from the uncorrected time.");
00074 puts("The external time pulses are expected at the absolute second 0 of each");
00075 puts("minute. The Titan digitizers are not able to absolutely date the time");
00076 puts("pulses, consequently, the time shift between the internal clock and the");
00077 puts("absolute time will always be less than 30 seconds.");
00078 puts("Osiris and Kephren stations on the contrary use the full NMEA data flow");
00079 puts("and thus provide an absolute time for each time pulse.");
00080 puts("This difference explains the processing difference proposed further.");
00081 puts("");
00082 puts("* dft, flt, and dt files:");
00083 puts("When the absolute time of the first sample of a data segment is");
00084 puts("computed, rtitan2 first looks for a dft file in the current directory");
00085 puts("that matches the station processed. If no dft file can be found, rtitan2");
00086 puts("tries to find a flt file with the same criteria (station and time), and");
00087 puts("then, if a flt file does not match, rtitan2 tries a dt file.");
00088 puts("Finally, if dft/flt/dt file can be found, the closest time pulses are");
00089 puts("used to correct the data. A linear interpolation is performed to get the");
00090 puts("time correction to apply. If the linear interpolation cannot be");
00091 puts("performed, the closest time pulse is used.");
00092 puts("The dft/dt files are named according to the first time pulse of the");
00093 puts("file and the station name.");
00094 puts("");
00095 puts("extra_tcorr:");
00096 puts("For compatibility with existing tools, a file named extra_tcorr may be");
00097 puts("used for extra time correction. The file is open in the working");
00098 puts("directory, the format is:");
00099 puts("================================");
00100 puts("drift_file_name1 delta1");
00101 puts("drift_file_name2 delta2");
00102 puts("#comment");
00103 puts("drift_file_name3 delta3");
00104 puts("...");
00105 puts("================================");
00106 puts("drift_file_name is the name of a drift file (dft, flt, or dt). delta is");
00107 puts("the time, in seconds _added_ to correct the start time of the data files");
00108 puts("that have used drift_file_name for the time correction. This is used");
00109 puts("mainly for Titan1 data with delta=+/-N*60.0");
00110 puts("");
00111 puts("FrameSkip:");
00112 puts("For Titan1 only if the FrameSkip bug occurs and should be corrected. The");
00113 puts("file is named FrameSkip.station. station is the station name (use -sta).");
00114 puts("The format of the file is:");
00115 puts("================================");
00116 puts("date1 shift1");
00117 puts("date2 shift2");
00118 puts("#comment");
00119 puts("date3 shift3");
00120 puts("...");
00121 puts("================================");
00122 puts("date1<date2<date3");
00123 puts("shift1 applies from date1, shift2 applies from date2 etc. The shift is");
00124 puts("the error to correct from, thus, -shift is added to the start time of");
00125 puts("the file.");
00126 puts("");
00127 puts("");
00128 puts("Single pass processing");
00129 puts("----------------------");
00130 puts("");
00131 puts("This is recommended for Osiris and Kephren data with continuous GPS or");
00132 puts("low sampling rates.");
00133 puts("");
00134 puts("Just run the data extraction command on the data input. The time");
00135 puts("correction applied on the beginning of the data segment will be based on");
00136 puts("the closest external time pulse (unless a matching dft/dt file lies in");
00137 puts("the current directory).");
00138 puts("");
00139 puts("");
00140 puts("Simple two-pass processing with filtering");
00141 puts("-----------------------------------------");
00142 puts("");
00143 puts("This is recommended for Osiris and Kephren data when the maximum");
00144 puts("time accuracy must be reached.");
00145 puts("");
00146 puts("The first pass is performed with the '-time' option.");
00147 puts("This pass creates .dt and .flt files containing the occurences of the");
00148 puts("external time pulses (several dt/flt pairs of files may be created if a");
00149 puts("time reset occurs). The 'flt' file is a filtered version of the 'dt'");
00150 puts("file.");
00151 puts("The data extraction performed in the same directory will use the flt");
00152 puts("files in order to interpolate the time correction to apply to the data.");
00153 puts("Note that SAC format stores the times down to the ms only.");
00154 puts("");
00155 puts("");
00156 puts("Two-pass processing with filtering/cleaning/smoothing");
00157 puts("-----------------------------------------------------");
00158 puts("");
00159 puts("This is recommended for Titan and Titan-based Mykerinos/SAGE-PC data");
00160 puts("");
00161 puts("The process is the same as the simple two-pass but after the first pass,");
00162 puts("the dt or flt file is edited/smoothed/filtered with a third party");
00163 puts("program such as xdft in order to add missing pulses or remove the wrong");
00164 puts("ones. The new file should be named dft so that it will get a higher");
00165 puts("priority during the second pass.");
00166 puts("");
00167 puts("");
00168 puts("Station log analysis");
00169 puts("--------------------");
00170 puts("");
00171 puts("The station log is extracted from the Titan stream using the '-log'");
00172 puts("option. The log is sent to the standard output, it can be sent to a file");
00173 puts("using a simple redirection:");
00174 puts("");
00175 puts("rtitan2 -log -disk /disk/data > station.log");
00176 puts("");
00177 puts("The output is a text file that can be easily used with any plotting");
00178 puts("software such as gnuplot:");
00179 puts("");
00180 puts("gnuplot> plot '< grep Vbatt station.log' using 2:5 title 'Vbatt'");
00181 puts("");
00182 puts("Field 2 is the raw time and field 5 is the Vbatt value.");
00183 puts("To use a human readable time, use timefmt:");
00184 puts("");
00185 puts("gnuplot> set timefmt '%Y.%m.%d-%H.%M.%S'");
00186 puts("gnuplot> set xdata time");
00187 puts("gnuplot> plot '< grep Vbatt station.log' using 1:5 title 'Vbatt'");
00188 puts("");
00189 puts("");
00190 puts("Output formats");
00191 puts("--------------");
00192 puts("");
00193 puts("rtitan2 is able to write the data streams in various commonly used");
00194 puts("formats: ");
00195 puts("-asc: human and machine readable format; the fixed length header");
00196 puts(" provide the necessary information to identify and date the seismogram;");
00197 puts(" the signal immediately follows the header;");
00198 puts("-sac: SAC format");
00199 puts("-segy: PASSCAL SEGY files (one trace per file).");
00200 puts("-gif: a single GIF file is generated for each time segment");
00201 puts("-wav: wav (Microsoft WAVE format), the frequency is multiplied by ~176");
00202 puts(" and rounded to the closest multiple of 2000 or 22500Hz.");
00203 puts("-mseed: MiniSeed format, header-less.");
00204 puts("-seg2: SEG-2 format.");
00205 puts("-sis: SISMALP format (signed 32bits)");
00206 puts("");
00207 puts("Output data files are named according to the time of the first sample.");
00208 puts("For each data file written, an information file is created and described the");
00209 puts("content of the data file (station name, sampling rate, time corrections");
00210 puts("etc.).");
00211 puts("");
00212 puts("");
00213 puts("Notes about MiniSeed output");
00214 puts("---------------------------");
00215 puts("");
00216 puts("rtitan2 generates header-less SEED data. Data files include only");
00217 puts("blockettes 1000 and 1001. Refer to rdseed documentation to prepend a");
00218 puts("dataless header to build a SEED volume.");
00219 puts("The signal is stored as 32bits integers without compression, or using");
00220 puts("the Steim1 compression (default). rtitan2 tries to interpolate the time");
00221 puts("drift for each block. If the interpolation is not possible (no file");
00222 puts("available), a warning is issued and the observed shift is used.");
00223 puts("");
00224 puts("");
00225 puts("Channel selection (Titan2 data only)");
00226 puts("------------------------------------");
00227 puts("The channels can be selected using a channel list: i,j,k-l means");
00228 puts("channels i, j and k to l (including k and l). Rtitan2 also accepts to");
00229 puts("check channel names against a stream list: stream1,stream2,... The list");
00230 puts("is coma separated. Inclusive streams are ore'd and streams are evaluated");
00231 puts("in the order of the command line. Examples:");
00232 puts("name stream list matches ?");
00233 puts("SHZ HH?,SH?,BH? yes");
00234 puts("SHZ !SHZ no");
00235 puts("SHZ !SHZ,SH? yes");
00236 puts("SHZ SH?,!SHZ no");
00237 puts("");
00238 puts("");
00239 puts("Cache management");
00240 puts("----------------");
00241 puts("");
00242 puts("rtitan2 uses a cache to quickly seek far positions in data inputs.");
00243 puts("When the cache cannot be used, finding a date in a huge data input can");
00244 puts("be very long. When running on a disk or day directory, rtitan2 uses the");
00245 puts("file names to quickly find the required date and time. When running on a");
00246 puts("single huge file or multiple files given with -f, rtitan2 builds a cache");
00247 puts("file when started for the first time and then uses this cache file for");
00248 puts("data extractions. The default cache directory is ~/.titancache");
00249 puts("Note that the cache is not built during data extraction. A first pass");
00250 puts("without data extraction at all or with time shift extraction only should");
00251 puts("be performed:");
00252 puts("rtitan2 [-log] [-time] -f huge_files...");
00253 puts("");
00254 puts("");
00255 puts("Trigger pass");
00256 puts("------------");
00257 puts("");
00258 puts("rtitan2 is able to perform a sta/lta trigger over the data. The");
00259 puts("parameters for the trigger are controlled by the -trig option.");
00260 puts("Data can be low pass and high pass filtered before the trigger. A");
00261 puts("trigger file generated to stdout (unless o= suboption is used). It");
00262 puts("indicates everything about the event (time duration etc.). Using the e=");
00263 puts("suboption, an event file compatible with the -tl option is also");
00264 puts("generated. Thus, after replacing a storage disk in the field, a quick");
00265 puts("analysis of the events recorded by the station can be performed with the");
00266 puts("following commands:");
00267 puts("");
00268 puts("#extract the trigger based on channel 0:");
00269 puts("rtitan2 -chan 0 -trig,e=evtfile,t=5,m=3,s=2 -disk /data/field/disk1");
00270 puts("");
00271 puts("#generate gif images based on the trigger:");
00272 puts("rtitan2 -gif -tl evtfile -disk /data/field/disk1");
00273 puts("");
00274 puts("");
00275 puts("Titan1 data processing");
00276 puts("----------------------");
00277 puts("");
00278 puts("rtitan2 is able to read and process titan1 data.");
00279 puts("Titan1 data are processed just as titan2. rtitan2 includes some basic");
00280 puts("functions for the extraction of usefull data out of a titan1 disk");
00281 puts("containig the siz/ndx/dat files.");
00282 puts("The following command will read the 'data' file and dump the usefull");
00283 puts("data according to the content of 'size.siz' and send the extracted data");
00284 puts("to 'segment.tit':");
00285 puts("rtitan2 -size size.siz -data data.dat > segment.tit");
00286 puts("Note that '-size' must be given _before_ '-data'.");
00287 puts("");
00288 puts("");
00289 puts("In case of data corruption");
00290 puts("--------------------------");
00291 puts("");
00292 puts("When the Titan/Titan2 disk is corrupted and time appears to be non-");
00293 puts("monotonous, rtitan2 does not extract some events when used with -tl.");
00294 puts("");
00295 puts("The local cache must be used:");
00296 puts("0/ remove any local cache in the working directory:");
00297 puts(" rm .LocalTitanCache");
00298 puts("1/ perform a first pass with -localcache");
00299 puts(" rtitan2 -localcache -f /path/to/file1 /path/to/file2");
00300 puts(" (try to use absolute path names)");
00301 puts("2/ perform the data extraction with -localcache");
00302 puts(" rtitan2 -localcache [options] -f /path/to/file1 /path/to/file2");
00303 puts("");
00304 puts("Note that in the case of corrupted disks or files, -sta and -n may be");
00305 puts("usefull.");
00306 puts("");
00307 puts("");
00308 puts("Download and install Titan2Reader");
00309 puts("---------------------------------");
00310 puts("");
00311 puts("The Titan2Reader package can be obtained on the Agecodagis main page, in");
00312 puts("the \"Support and Download/Firmware and software updates\" section. Binary");
00313 puts("linux versions (rpm and static), binary .exe for DOS/Windows and full");
00314 puts("source archive with documentation are available.");
00315 puts("The public CVS server provides the most up-to-date code. The following");
00316 puts("commands can be used to download the code from the CVS server:");
00317 puts("$ cvs -z3 -d:pserver:cvs@agecodagis.com:/home/cvsroot/Ageco login");
00318 puts("press enter on the password prompt.");
00319 puts("$ cvs -z3 -d:pserver:cvs@agecodagis.com:/home/cvsroot/Ageco co Titan2Reader");
00320 puts("");
00321 puts("Any further update from the CVS server is performed by running the");
00322 puts("following command in the Titan2Reader directory:");
00323 puts("$ cvs update");