script Module


Uses

  • module~~script~~UsesGraph module~script script anisotropy anisotropy module~script->anisotropy data_arch data_arch module~script->data_arch fftw3 fftw3 module~script->fftw3 files files module~script->files filter filter module~script->filter gnufor gnufor module~script->gnufor miscellaneous miscellaneous module~script->miscellaneous module~analyses analyses module~script->module~analyses module~crest_param crest_param module~script->module~crest_param module~func_acf func_acf module~script->module~func_acf module~skku_profiles skku_profiles module~script->module~skku_profiles pikaia_oop pikaia_oop module~script->pikaia_oop sort_arrays sort_arrays module~script->sort_arrays stat_mom stat_mom module~script->stat_mom surfile surfile module~script->surfile module~analyses->anisotropy module~analyses->data_arch module~analyses->fftw3 module~analyses->files module~analyses->filter module~analyses->miscellaneous module~analyses->module~crest_param module~analyses->module~func_acf module~analyses->stat_mom abbott abbott module~analyses->abbott asfc asfc module~analyses->asfc grad_curv grad_curv module~analyses->grad_curv morpho morpho module~analyses->morpho module~crest_param->data_arch module~crest_param->pikaia_oop module~crest_param->stat_mom module~crest_param->surfile module~func_acf->data_arch module~func_acf->fftw3 module~func_acf->miscellaneous module~func_acf->module~crest_param module~func_acf->stat_mom module~skku_profiles->data_arch module~skku_profiles->module~crest_param module~skku_profiles->pikaia_oop module~skku_profiles->sort_arrays module~skku_profiles->stat_mom

Used by

  • module~~script~~UsedByGraph module~script script program~main main program~main->module~script

Subroutines

private subroutine acf_theo()

Function that returns the theoretical acf PARAM%imp_acf.

Read more…

Arguments

None

private subroutine add_nois()

Function that returns the starting surface of random heights

Read more…

Arguments

None

private subroutine alloc_tabs()

Function that allocates arrays in global variable PARAM

Read more…

Arguments

None

private subroutine apod_acf()

Function that apodize the acf to prevent spectral leakage

Read more…

Arguments

None

private subroutine apod_sur()

Function that apodize the reference surface for acf calculus purposes

Read more…

Arguments

None

private subroutine calc_acf()

Function that returns the autocorrelation function of a surface in PARAM%acf_surf

Read more…

Arguments

None

private subroutine calc_ffh()

Function that returns …

Read more…

Arguments

None

private subroutine calc_ord()

Function that returns the vector PARAM%order that contains the heights order.

Read more…

Arguments

None

private subroutine calc_res_acf(acf_surf, imp_acf, crit_acf, acf__z, w, h)

Function that returns crit_acf the mean absolute difference between theoretical and calculated acfs, above z (usually 0.2 as recommended by iso 25178)

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=R8), intent(in), dimension(1:w, 1:h) :: acf_surf

calculated surface acf

real(kind=R8), intent(in), dimension(1:w, 1:h) :: imp_acf

required surface acf

real(kind=R8), intent(out) :: crit_acf

mean absolute difference between theoretical and calculated acfs

real(kind=R8), intent(in) :: acf__z

plane elevation z where correlation lengths are calculated

integer(kind=I4), intent(in) :: w

surface acf width (points)

integer(kind=I4), intent(in) :: h

surface acf height (points)

private subroutine calc_z_f()

Function that returns PARAM%surf, the surface made of heights with the required statistical moments, in the right order.

Read more…

Arguments

None

private subroutine calc_z_i()

Function that returns the starting surface of random heights

Read more…

Arguments

None

private subroutine def_size()

Geometrical characteristics of the numerical surface

Arguments

None

private subroutine digi_fil()

Function that applies the digital filter to the random heights

Read more…

Arguments

None

private subroutine end_loop()

The loop ends here

Arguments

None

private subroutine end_scri()

End of script

Arguments

None

private subroutine make_msk()

Function that reads a digital surf file and turns it into a mask

Read more…

Arguments

None

private subroutine make_scratches()

This subroutine initializes a real matrix tab of dimensions nx by ny with ones

Read more…

Arguments

None

private subroutine make_tex()

Function that creates a periodic macro-texture: knowing the FFT of an analytical texture

Read more…

Arguments

None

private subroutine nb_procs()

Number of concurrent threads

Arguments

None

private subroutine plt__acf()

Function that calculates the mean absolute difference between the desired Acf and the one obtained. However, the important zone where both should match is above the cut - where the correlation lengths are determined.

Read more…

Arguments

None

private subroutine read_img()

Function that reads a digital surf file and returns the surface in PARAM%surf

Read more…

Arguments

None

public subroutine read_job(job_file)

Function that reads a script file. Keywords are identified and corresponding actions are triggered.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=512), intent(in) :: job_file

job file with macros to execute

private subroutine repr_img()

Function that set parameters for image reproduction

Read more…

Arguments

None

private subroutine save_img(tab)

Function that save an array tab as a digital surf file.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=R8), intent(in), dimension(:,:) :: tab

a surface to save as a .sur file

private subroutine smooth__()

Function that applies a low-pass filter to the surface PARAM%surf

Read more…

Arguments

None

private subroutine spct_sur(file_spct, apod)

Returns the default surface spectrum

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in), optional :: file_spct

txt file containing the surface FFT module

logical(kind=I4), intent(in), optional :: apod

window applied to surface?

private subroutine sta_loop()

Starting the loop

Arguments

None

private subroutine sta_scri()

Start the script reading

Arguments

None

private subroutine sta_theo()

Required statistical moments

Arguments

None

private subroutine stat_sur()

Define surface statistical moments as reference

Read more…

Arguments

None

private subroutine sub_surf()

Function that returns the best subsurface from the final surface.

Read more…

Arguments

None