Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Fir.d, what's wrong? (PID unklnown)

110 views
Skip to first unread message

El Berto

unread,
Mar 30, 2015, 6:27:15 AM3/30/15
to earthwo...@googlegroups.com
Hi to all, I've tried to remove DC offset filtering data using fir.d.
I supposed it could be so simple, but....



I used fir.d standard configuration:

MyModId          MOD_FIR         # Module name
InRing           WAVE_RING       # Transport ring to find waveform data on,
OutRing          WAVE_RING       # Transport ring to write output to,



startstop_unix.d:
#
 Process          "fir fir.d"
 Class/Priority    OTHER 0
#



statmgr.d:
Descriptor  fir.desc



pi@raspberrypi ~/ew/run/params $ cat earthworm.d | grep "MOD_FIR"
 Module   MOD_FIR               51
pi@raspberrypi ~/ew/run/params $


My statmgr log file:
UTC_Mon Mar 30 10:13:05 2015  raspberrypi/fir (MOD_FIR) module dead, PID unknown; needs human intervention.



while status give me dead fir module.

My fault or some bug?
Thanks.








Milton Plasencia

unread,
Mar 30, 2015, 6:31:33 AM3/30/15
to earthwo...@googlegroups.com
Check if Module MOD_FIR line exits in earthworm.d file

Milton P. Plasencia Linares



--
--
You received this message because you are subscribed to the Google
Groups "Earthworm Community Forum" group.
 
To post to this group, send an email to earthwo...@googlegroups.com
 
To unsubscribe from this group, send an email to
earthworm_for...@googlegroups.com
 
For more options, visit this group at
http://groups.google.com/group/earthworm_forum?hl=en

---
You received this message because you are subscribed to the Google Groups "Earthworm Community Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to earthworm_for...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Angel Rodriguez

unread,
Mar 30, 2015, 6:46:56 AM3/30/15
to earthwo...@googlegroups.com
Hi,

There is not enough information in the .d, .desc and logs snippets you sent to really know what might be the problem.  

What is the MOS_FIR heartbeat and what is tsec in the desc file? Is restartme uncommented?

The entire .d and .desc help quite a bit.

Saludos,


Angel

www.osop.com.pa/tour/

More doesn't scale forever, except maybe with seismometers.

.

El Berto

unread,
Mar 30, 2015, 6:59:17 AM3/30/15
to earthwo...@googlegroups.com, an...@osop.com.pa

Fir.d:



#
#                     Configuration File for Fir
#
MyModId          MOD_FIR

InRing           WAVE_RING       # Transport ring to find waveform data on,
OutRing          WAVE_RING       # Transport ring to write output to,
                                 # InRing and OutRing may be the same.
HeartBeatInterval     30         # Heartbeat interval, in seconds,
LogFile            1             # 1 -> Keep log, 0 -> no log file
                                 # 2 -> write to module log but not to stderr or
                                 #   stdout
Debug                            # Write out debug messages (optional)

MaxGap              1.5         # Maximum gap, in sample periods, allowed
                                # between trace data points.
                                # When exceeded, channel is restarted.

# Specify the filter frequency response characteristics with two or more
# commands fo the form: Band <f_low> <f_high> <level> <deviation>
#
# where:
#   f_low = low frequency limit of a band
#   f_high = high frequency limit of a band
#   level = desired level of the band: 1 for pass band, 0 for stop band
#   deviation = amount of ripple allowed from desired level
#
# All frequencies must be scaled to the range 0.0 - 1.0, where 1.0
# corresponds to the Nyquist frequency. (Nyquist frequency is half the sample
# rate and is the maximum frequency content that can be in a time series.)
# Note that the sampling rate is not known at configuration time, but will be
# gotten from the trace data packets as they're received at run-time.
# One band must start at 0.0 frequency; one band must end at 1.0 frequency. Any
# number of additional bands may be specified (up to a total of ten bands.)
Band 0.0 0.3 1 0.005
Band 0.4 1.0 0 0.005

# If you want Fir to compute and log its filter coefficients and then
# exit, specify "TestMode".
TestMode

# optional setting to allow a queue buffer size larger than 100 messages, defaults to 100
QueueSize 2000
# optional setting to allow a shorter sleep between ring pollings, defaults to 500
SleepMilliSeconds 50

#
# Specify logos of the messages to grab from the InRing.
# TYPE_TRACEBUF2 is assumed, therefore only module ID and
# installation ID need to be specified
#
GetWavesFrom    INST_WILDCARD MOD_WILDCARD  # TYPE_TRACEBUF2 (assumed)

#
# List SCNL codes of trace messages to fir and their output SCN codes
# Wildcard characters are not allowed here.
#
#         IN-SCNL        OUT-SCNL
GetSCNL 4381 HNZ NI --  4381 HHZ NI --





Fir.desc:


#
#            Descriptor File for the fir module
#
#    This file specifies when error messages are to be reported via
#    email and pager.  All errors are logged in statmgr's daily log
#    files.  The name of this file must be entered in statmgr's
#    configuration file with a <Descriptor> command.
#    (example:  Descriptor "export_generic.desc" )
#    The pager group name and a list of email recipients are listed
#    in statmgr's configuration file.
#
#    Comment lines in this file are preceded by #.
#
#    Parameters:
#
#    <modName> is a text string included in each reported error message.
#
#    <modId> is the module id number as specified in the file
#    earthworm.h.
#
#    <instId> is the installation id number as specified in the file
#    earthworm.h.
#
#
modName  fir
modId    MOD_FIR
instId   INST_UNKNOWN
[...]
tsec: 60  page: 0  mail:  100
#
#
# Uncomment the "restartMe" line to enable automatic restart of this
# process by statmgr/startstop.  statmgr will issue a TYPE_RESTART message
# for this process_id if it declares the patient dead.
#
restartMe
#
#
#    A list of possible errors follows.


On fir log file onli coefficients, no errors or warnings.

startstop log:

-------------------------------------------------------
startstop_unix: startup at UTC_20150330_10:55:39
This program is using the non-MT-Safe version of logit.
-------------------------------------------------------
startstop: Read command file <startstop_unix.d>
20150330_UTC_10:55:39  Earthworm starting at local time: Mon Mar 30 10:55:39 2015

20150330_UTC_10:55:39 startstop: process <statmgr> <22167> started.
20150330_UTC_10:55:39 startstop: process <copystatus> <22168> started.
20150330_UTC_10:55:39 startstop: process <wave_serverV> <22169> started.
20150330_UTC_10:55:39 startstop: process <copystatus> <22170> started.
20150330_UTC_10:55:39 startstop: process <k2ew_tty> <22171> started.
20150330_UTC_10:55:39 startstop: process <ringserver> <22172> started.
20150330_UTC_10:55:39 startstop: process <ew2ringserver> <22173> started.
20150330_UTC_10:55:39 startstop: process <carlstatrig> <22174> started.
20150330_UTC_10:55:39 startstop: process <carlsubtrig> <22175> started.
20150330_UTC_10:55:39 startstop: process <trig2disk> <22176> started.
20150330_UTC_10:55:39 startstop: process <fir> <22177> started.


statmeg log:


---------------------------------------------------
# Descriptor file #9
# Module description:
 modName    fir
 modId      51
 instId     255
 system     raspberrypi
# Module-specific pagegroups (0):
# Module-specific email recipients (0):
# Heartbeat:
 tsec: 60 page: 0 mail: 100
# Errors:
 err: 0 nerr: 1 tsec: 0 page: 0 mail: 0
 text: "Missed msg(s) in shared memory."
 err: 1 nerr: 1 tsec: 0 page: 0 mail: 0
 text: "Retreived msg too long for internal buffer."
 err: 2 nerr: 1 tsec: 0 page: 0 mail: 0
 text: "transport.h tracking limit exceeded."
 err: 3 nerr: 1 tsec: 0 page: 0 mail: 10
 text: "Call to the filter routine failed."
---------------------------------------------------

       *****  Start Message Log  *****
20150330_UTC_10:55:41 Attaching to RING: WAVE_RING 1000 1024
20150330_UTC_10:55:41 Attaching to RING: PICK_RING 1005 1024
20150330_UTC_10:55:41 Attaching to RING: HYPO_RING 1015 1024
UTC_Mon Mar 30 10:55:41 2015  raspberrypi/statmgr Program starting. Page sent.
UTC_Mon Mar 30 10:55:54 2015  raspberrypi/CarlStaTrig carlstatrig: Message received(i255 m71 t19); missed some
 Page sent.
UTC_Mon Mar 30 10:55:54 2015  raspberrypi/CarlStaTrig carlstatrig: Message received(i255 m71 t19); missed some

UTC_Mon Mar 30 10:56:42 2015  raspberrypi/fir (MOD_FIR) module dead, PID unknown; needs human intervention.



Here in my earthworm.d:


 Module   MOD_EXPORT_SCN_ACTV   48
 Module   MOD_EXPORT_SCN_PRI    49
 Module   MOD_FILE2EW           50
 Module   MOD_FIR               51
 Module   MOD_GAPLIST           52
 Module   MOD_GCF2EW            53




 

Milton Plasencia

unread,
Mar 30, 2015, 7:06:07 AM3/30/15
to earthwo...@googlegroups.com
Check the statmgr.d if there is the line with:

Descriptor Fir.desc

Cheers,

* * * * * * * * * * * * * * * * * * * * * * *
Milton P. PLASENCIA LINARES

Centro di Ricerche Sismologiche (CRS)
OGS - Istituto Nazionale di Oceanografia e di Geofisica Sperimentale 

Borgo Grotta Gigante 42/C
(34010) Sgonico - Trieste - Italia
Tel: +39 040 2140 141 (Udine)
Tel: +39 040 2140 256 (Trieste)
Cel.: +39 331 6481 935


ASAIN (Antarctic Seismographic Argentinean Italian Network)
*********************************











El Berto

unread,
Mar 30, 2015, 8:07:57 AM3/30/15
to earthwo...@googlegroups.com
Si, nello statmgr.d c'è già:

Descriptor  fir.desc

Angel Rodriguez

unread,
Mar 30, 2015, 8:44:59 AM3/30/15
to earthwo...@googlegroups.com
Hi,

Those files look ok. Can you run the fir module from the command line while your ew is running and see what messages you get.

angel

www.osop.com.pa/tour/

More doesn't scale forever, except maybe with seismometers.



On Mon, Mar 30, 2015 at 7:07 AM, El Berto <elb...@infinito.it> wrote:
Si, nello statmgr.d c'è già:

Descriptor  fir.desc

El Berto

unread,
Mar 30, 2015, 11:32:21 AM3/30/15
to earthwo...@googlegroups.com, an...@osop.com.pa
It seems to be ok now,

original code in fir.d:

GetWavesFrom    INST_WILDCARD MOD_WILDCARD  # TYPE_TRACEBUF (assumed)

actual code in fir.d:

GetWavesFrom    INST_WILDCARD MOD_WILDCARD  TYPE_TRACEBUF2  #

Thanks, Milton.


By the way, which would be best filter values to remove DC component?
 
Band 0.0 0.01 1 0.05
Band 0.03 1.0 0 0.05





James C. Pechmann

unread,
Mar 30, 2015, 2:27:57 PM3/30/15
to earthwo...@googlegroups.com
I'm not sure what the best filter is to remove the DC component. It
depends to some extent on your sensors and your frequency band of
interest. In any case, the filter parameters given in your email will
not do what you want because they specify a lowpass filter that starts
to roll off at 0.01 times the Nyquist frequency and reaches the stop
band at 0.03 times the Nyquist frequency.

For a better description of the Fir module than the one on the Wiki,
see the 2008 post to the Earthworm Forum by Pete Lombard (search for
"Fir help" on the Google Groups page).

--Jim


> From earthworm_forum+bncBDRMVK...@googlegroups.com Mon Mar 30 09:32:26 2015
> Date: Mon, 30 Mar 2015 08:32:21 -0700 (PDT)
> From: El Berto <elb...@infinito.it>
> To: earthwo...@googlegroups.com
> Cc: an...@osop.com.pa
> Subject: Re: [Earthworm Forum] Re: Fir.d, what's wrong? (PID unklnown)

Jean-Marie SAUREL

unread,
Mar 31, 2015, 3:22:38 AM3/31/15
to earthwo...@googlegroups.com
Hello,

One thing to take into consideration also when you design your filter
(because when you specify the boundaries, it is in reality what you are
doing) is to not specify too sharp bands.

I mean the end of the stop band and the beginning of the start band
mustn't be too close and the stop band ripple mustn't be too small.
If this is the case, the generated filter might have too many
coefficients and be instable (I've seen this several times).

Maybe a recommendation would that the resulting filter doesn't have much
more than 100 coefficients (check at the beginning of the log files, the
modules says how many coefficients it generated).

Regards.

Jean-Marie SAUREL.
--
--------------------------------------
ICG-CARIBE-EWS Working Group 1 chair

Institut de Physique du Globe de Paris
Observatoires Volcanologiques
1 rue Jussieu
75238 Paris Cédex 05
+33(0)183957437
France

cellectronic

unread,
Jun 21, 2023, 8:38:48 AM6/21/23
to Earthworm Community Forum
Hello 
With regard to the above statement  

" Maybe a recommendation would that the resulting filter doesn't have much
more than 100 coefficients (check at the beginning of the log files, the
modules says how many coefficients it generated).
"

Would that value of "not much more than 100 coefficients"  be for each channel or the total that the FIR module is processing ?
So if you were to FIR 2 channels would an acceptable value of approx 200 coefficients be ok ?

The reason I ask is, I have 4 channels going to the FIR module which is producing 488 coefficients. good or bad ? 
 Many thanks

cellectronic

unread,
Jun 21, 2023, 8:41:23 AM6/21/23
to Earthworm Community Forum
 Sorry that is I have 9 channels, not 4 as stated above,
Thanks 

Victor Preatoni

unread,
Jun 26, 2023, 10:17:07 AM6/26/23
to Earthworm Community Forum
Hi,

to configure a band-pass FIR I use the following bands. You can adjust it to  your needs:
Screenshot_20230626_105524.png

But as Jean-Marie said, it is important to check real response. So after configuring your FIR and starting module, check fir log file to see the generated coefficients. You will find it after the "Filter coefficients:" line.
Then, put those coefficients on a FIR plotter script (Matlab, Python, etc) to plot the response and check it suit your needs. Eg.:
Screenshot_20230626_111537.png
Reply all
Reply to author
Forward
0 new messages