#!/bin/csh
#######################################################################################################################################
# #
# T R A N S F O R M E E D E F O U R I E R D I R E C T E #
# D ' U N C O U P L E D ' I M A G E S S T A N D A R D S : #
# #
# #
# Utilisation : #
# #
# $xci/fftds$Z <nomPR> <nomPI> <nomTF> [<centrer> [<generer_PR_PI_Mo_Ph>]] #
# #
# #
# Author of '$xci/fftds$Z' : #
# #
# Jean-Francois Colonna (LACTAMME, AAAAMMJJhhmmss). #
# #
#######################################################################################################################################
set nomPR=$1
set nomPI=$2
set nomTF=$3
set Centrer=$4
set G_PR_PI_Mo_Ph=$5
setArgum Centrer FAUX
# On ne centre pas a priori (pour des raisons de compatibilite anterieure)... #
setArgum G_PR_PI_Mo_Ph $EXIST
# On genere a priori (pour des raisons de compatibilite anterieure) les images #
# {$PR,$PI,$Mo,$Ph} (introduit le 20030207134830). #
FileTmpB nomTR
FileTmpB nomTI
$xci/acces$X A=$nomPR \
convertir=VRAI \
$formatI | \
$xci/normalise.01$X \
R=$nomTR \
$formatI
# Mise dans [0,1] de la partie Reelle. #
$xci/acces$X A=$nomPI \
convertir=VRAI \
$formatI | \
$xci/normalise.01$X \
R=$nomTI \
$formatI
# Mise dans [0,1] de la partie Imaginaire. #
$xci/RI_J$X AR=$nomTR AI=$nomTI \
standard=FAUX \
R=$nomTF$J \
$formatI
# Conversion images standards (AR=PR=$nomPR,AI=PI=$nomPI) --> image complexe (R=$nomTF$J). #
# le passage au mode "standard=FAUX" a eu lieu le 19990910095209 afin de rendre neutre la #
# la suite d'une transformation directe puis d'une transformation inverse... #
$xci/fft.01$X A=$nomTF$J \
centrer=$Centrer \
TF=$nomTF$TF \
$formatI
# Calcul de la transformee de Fourier ($nomTF$TF) de l'image complexe $nomTF$J. #
$DELETE $nomTF$J
# Puis destruction de l'image complexe ($nomTF$J). #
if ($G_PR_PI_Mo_Ph == $EXIST) then
# Ce test a ete introduit le 20030207134830... #
$xci/J_RIMP$X A=$nomTF$TF \
RR=$nomTF$PR \
RI=$nomTF$PI \
RM=$nomTF$Mo \
RP=$nomTF$Ph \
standard=FAUX \
$formatI
# Puis conversion en quatre images non standards ($nom$PR,$nom$PI,$nom$Mo,$nom$Ph). #
else
endif
FileTmpE nomTR
FileTmpE nomTI