Compare commits

...

4 Commits

Author SHA1 Message Date
tTh 49183e4153 put wavmetrics in modules dir 2024-02-07 00:50:27 +01:00
tTh 3da1022e8f cleaning the makebloub, again 2024-02-07 00:49:20 +01:00
tTh c32db90e10 cleaning the makebloub 2024-02-07 00:48:15 +01:00
tTh d1b7218b21 bla 2024-02-07 00:39:00 +01:00
6 changed files with 58 additions and 52 deletions

View File

@ -7,7 +7,7 @@ all: genbloubs movebloubs exportbloubs mergebloubs \
# ------------------------------------------------------------
GFOPT = -Wall -Wextra -g -time -I../Modules
OBJS = bloubspace.o povstuff.o mathstuff.o
OBJS = bloubspace.o povstuff.o
MYLIB = '../Modules/libtth90modules.a'
# ------------------------------------------------------------
@ -37,9 +37,6 @@ bloubspace.o: bloubspace.f90 Makefile
povstuff.o: povstuff.f90 Makefile
gfortran $(GFOPT) -c $<
mathstuff.o: mathstuff.f90 Makefile
gfortran $(GFOPT) -c $<
# ------------------------------------------------------------
genbloubs: genbloubs.f90 Makefile $(OBJS)

View File

@ -6,7 +6,7 @@
GFOPT = -Wall -Wextra -g -I.
all: chkpixels trnd t
all: chkpixels trnd
# ---------------------------------------------------------
@ -31,17 +31,22 @@ mathstuff2.o: mathstuff2.f90 Makefile
noisepictures.o: noisepictures.f90 Makefile
gfortran $(GFOPT) -c $<
wavmetrics.o: wavmetrics.f90 Makefile
gfortran $(GFOPT) -c $<
#----------------------------------------------------------
# making a fluffy archive
#
OBJECTS = spitpgm.o pixrgb.o \
centermag.o dummy.o \
trials.o mathstuff2.o \
noisepictures.o
noisepictures.o wavmetrics.o
libtth90modules.a: $(OBJECTS) Makefile
$(AR) rs $@ $?
# please explain the 'ar' command line
#----------------------------------------------------------
# programmes de testouille
#

View File

@ -11,8 +11,7 @@ Write gray level 2d buffer (aka picture) to disk in the NetPNM format.
### pixrgb
Write 8 bits or 16 bits RGB pictures to PNM format.
**Warning!** The width of the picture MUST be a multiple of 4 !
The width of the picture MUST be a multiple of 4 !
### trials

View File

@ -6,15 +6,15 @@ module mathstuff2
implicit none
contains
! ----------------------------------------------------------------
! really quick'n'dirty hack
! not really tested yet...
! ----------------------------------------------------------------
! really quick'n'dirty hack
! not really tested yet...
subroutine init_random_seed()
integer, dimension(3) :: tarray
integer :: t3, foo
real :: dummy
call itime(tarray)
t3 = 3600*tarray(1) + 60*tarray(2) + tarray(3)
! write(0, '(A,3I3,A,I6)') "sranding: ", tarray, " --> ", t3
@ -28,8 +28,10 @@ module mathstuff2
end subroutine
! ----------------------------------------------------------------
! ----------------------------------------------------------------
!-
!- May be I can make some generic procedures ?
!-
logical function diff_sign(a, b)
integer, intent(in) :: a, b
@ -45,8 +47,6 @@ logical function diff_sign(a, b)
diff_sign = .FALSE.
end function
! ----------------------------------------------------------------
! ----------------------------------------------------------------
end module mathstuff2

View File

@ -1,35 +0,0 @@
program t
use centermag
implicit none
type(t_centermag) :: cmag
print *, '====== programme de test ======'
cmag%wscr = 800
cmag%hscr = 600
call essai_centermag(cmag)
print *
STOP ': PAF LE CHIEN ?'
! --------------
contains
! --------------
subroutine essai_centermag(cm)
type(t_centermag), intent(in) :: cm
real :: rx, ry
call print_centermag (cm)
print *
call centermag_scr2real(1, 1, rx, ry)
print *, 'to real :', rx, ry
end subroutine
! --------------
end program

40
Modules/wavmetrics.f90 Normal file
View File

@ -0,0 +1,40 @@
! new: Thu Jan 4 00:08:04 UTC 2024
module wavmetrics
use mathstuff2
implicit none
type wavmetric
integer :: num
real :: freql, freqr
integer :: maxl, maxr
end type
type intsample
integer :: left, right
end type
contains
!-------------------------------------------------------------
subroutine compute_wavmetric(samples, start, size, metrics)
type(intsample), intent(in) :: samples(:)
integer, intent(in) :: start, size
type(wavmetric), intent(out) :: metrics
end subroutine
!-------------------------------------------------------------
subroutine display_wavmetrics(metrics)
type(wavmetric), intent(in) :: metrics
end subroutine
!-------------------------------------------------------------
!-------------------------------------------------------------
end module