Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OpenSource
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jan Willem Thorbecke
OpenSource
Commits
3235b990
Commit
3235b990
authored
7 years ago
by
Jan Thorbecke
Browse files
Options
Downloads
Patches
Plain Diff
added shift=1 option for fw wavelet in makewave
parent
1b2c2586
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitignore
+2
-0
2 additions, 0 deletions
.gitignore
utils/.DS_Store
+0
-0
0 additions, 0 deletions
utils/.DS_Store
utils/freqwave.c
+21
-1
21 additions, 1 deletion
utils/freqwave.c
with
23 additions
and
1 deletion
.gitignore
+
2
−
0
View file @
3235b990
...
...
@@ -2,6 +2,8 @@
bin/*
*.su
*.bin
*/.DS*
*/*/.DS*
.DS*
Make_include
fdelmodc_cuda.tgz
...
...
This diff is collapsed.
Click to expand it.
utils/.DS_Store
deleted
100644 → 0
+
0
−
0
View file @
1b2c2586
File deleted
This diff is collapsed.
Click to expand it.
utils/freqwave.c
+
21
−
1
View file @
3235b990
...
...
@@ -33,7 +33,7 @@ void hilbertTrans(float *data, int nsam);
void
freqwave
(
float
*
wave
,
int
nt
,
float
dt
,
float
fp
,
float
fmin
,
float
flef
,
float
frig
,
float
fmax
,
float
t0
,
float
db
,
int
shift
,
int
cm
,
int
cn
,
char
*
w
,
float
scale
,
int
scfft
,
int
inverse
,
float
eps
,
int
verbose
)
{
int
iof
,
nfreq
,
nf
,
i
,
j
,
sign
,
optn
,
stored
;
int
it
,
iof
,
nfreq
,
nf
,
i
,
j
,
sign
,
optn
,
stored
;
int
ifmin1
,
ifmin2
,
ifmax1
,
ifmax2
;
float
df
,
fact
,
alfa
,
f
,
max
,
freq
,
att
,
ampl
,
phase
;
float
tt
,
dum
;
...
...
@@ -182,6 +182,26 @@ void freqwave(float *wave, int nt, float dt, float fp, float fmin, float flef, f
cwave
[
j
].
r
=
0
.
0
;
cwave
[
j
].
i
=
0
.
0
;
}
if
(
shift
==
1
)
{
sign
=
1
;
cr1fft
(
cwave
,
rwave
,
optn
,
sign
);
max
=
rwave
[
0
]
*
rwave
[
0
];
for
(
i
=
1
;
i
<
optn
;
i
++
)
{
if
(
rwave
[
i
]
<
0
.
0
)
{
it
=
i
;
break
;}
}
it
=
it
;
dum
=
0
.
0
;
for
(
j
=
0
;
j
<
it
;
j
++
)
dum
+=
fabs
(
rwave
[
j
]);
max
=
dum
;
for
(
i
=
1
;
i
<
optn
/
2
;
i
++
)
{
dum
=
dum
-
fabs
(
rwave
[
i
-
1
])
+
fabs
(
rwave
[
i
+
it
-
1
]);
//fprintf(stderr,"dum=%f i=%d\n", dum, i);
if
((
dum
)
>
(
0
.
03
*
max
*
att
/
it
))
{
t0
=
(
float
)
i
*
dt
;
}
}
}
for
(
iof
=
0
;
iof
<
nfreq
;
iof
++
)
{
f
=
iof
*
df
;
tmp
.
r
=
cwave
[
iof
].
r
*
cos
(
2
.
0
*
M_PI
*
f
*
t0
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment