\doxysection{surface\+\_\+generator.\+Surface Class Reference}
\hypertarget{classsurface__generator_1_1_surface}{}\label{classsurface__generator_1_1_surface}\index{surface\_generator.Surface@{surface\_generator.Surface}}
\doxysubsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{classsurface__generator_1_1_surface_a8e46e1b3ac4a3dbe50941bc880179432}{\+\_\+\+\_\+init\+\_\+\+\_\+}} (self, mu\+\_\+array, sigma\+\_\+array, sample\+\_\+length, local\+\_\+parameters)
\item 
\mbox{\hyperlink{classsurface__generator_1_1_surface_ab44a38e00e91dc82f9e5ae2d464d0600}{find\+\_\+coefficients}} (self, func, n\+\_\+coeff, lim, N)
\item 
\mbox{\hyperlink{classsurface__generator_1_1_surface_aca8a023a7d392dd69ef971c413b40339}{compute\+\_\+\+Hermite\+\_\+expansion}} (self, coeff\+\_\+array, tau)
\item 
\mbox{\hyperlink{classsurface__generator_1_1_surface_a8787096c273a876fe76c725df7a59adb}{compute\+\_\+psd}} (self, Z)
\item 
\mbox{\hyperlink{classsurface__generator_1_1_surface_aa9ec8b6a00bcdcb55b20fcfa93def3ae}{generate\+\_\+height\+\_\+pdf}} (self, Z)
\item 
\mbox{\hyperlink{classsurface__generator_1_1_surface_ab4ca5e0a67a71d8cd42c08f5843fbf9b}{correct\+\_\+\+PSD}} (self, Z, target\+\_\+psd)
\item 
\mbox{\hyperlink{classsurface__generator_1_1_surface_ae32aae6daff1ac51e5c469c6c95c78b4}{correct\+\_\+height}} (self, Z\+\_\+h, Z\+\_\+p)
\item 
\mbox{\hyperlink{classsurface__generator_1_1_surface_a439480a7fba54ff195375a0545c1bb02}{generate}} (self, samples, iterations, verbose)
\item 
\mbox{\hyperlink{classsurface__generator_1_1_surface_a16b9de829b56cc9b9fa6c20c20ae6c37}{compute\+\_\+autocorr\+\_\+length}} (self, Z)
\item 
\mbox{\hyperlink{classsurface__generator_1_1_surface_aa4f514636a88199fda36c2e0540e3da6}{save}} (self, project\+\_\+name, file\+\_\+name)
\end{DoxyCompactItemize}
\doxysubsubsection*{Public Attributes}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classsurface__generator_1_1_surface_a0499f56a9fd43c755b57448892a666b1}\label{classsurface__generator_1_1_surface_a0499f56a9fd43c755b57448892a666b1} 
{\bfseries mu\+\_\+array} = mu\+\_\+array
\item 
\Hypertarget{classsurface__generator_1_1_surface_aad556d3a62d6e2e9359b52dcee13ea48}\label{classsurface__generator_1_1_surface_aad556d3a62d6e2e9359b52dcee13ea48} 
{\bfseries sigma\+\_\+array} = sigma\+\_\+array
\item 
\Hypertarget{classsurface__generator_1_1_surface_a51ef0e92578e8fe736ff87250086a55a}\label{classsurface__generator_1_1_surface_a51ef0e92578e8fe736ff87250086a55a} 
int {\bfseries T} = 1
\item 
\Hypertarget{classsurface__generator_1_1_surface_abdb7d0c43b114b58d265bf0545f886ba}\label{classsurface__generator_1_1_surface_abdb7d0c43b114b58d265bf0545f886ba} 
{\bfseries sample\+\_\+length} = sample\+\_\+length
\item 
\Hypertarget{classsurface__generator_1_1_surface_a89809c508f886464fd8d0dadbac3eb27}\label{classsurface__generator_1_1_surface_a89809c508f886464fd8d0dadbac3eb27} 
{\bfseries param\+\_\+local} = local\+\_\+parameters
\item 
\Hypertarget{classsurface__generator_1_1_surface_a425ab248be224115af3d4a6f6f8c3abb}\label{classsurface__generator_1_1_surface_a425ab248be224115af3d4a6f6f8c3abb} 
{\bfseries samples} = None
\item 
\Hypertarget{classsurface__generator_1_1_surface_a659feff4cdc886ae356b1117e72b246d}\label{classsurface__generator_1_1_surface_a659feff4cdc886ae356b1117e72b246d} 
{\bfseries X} = None
\item 
\Hypertarget{classsurface__generator_1_1_surface_a4c3f37ce2d0486a76ed25e27df049bfd}\label{classsurface__generator_1_1_surface_a4c3f37ce2d0486a76ed25e27df049bfd} 
{\bfseries Y} = None
\item 
\Hypertarget{classsurface__generator_1_1_surface_ad8bb6e9c78c6d0b7844de880ac97a2f6}\label{classsurface__generator_1_1_surface_ad8bb6e9c78c6d0b7844de880ac97a2f6} 
{\bfseries Z} = None
\item 
\Hypertarget{classsurface__generator_1_1_surface_a9145088aac70cdbb28b082bb283247f7}\label{classsurface__generator_1_1_surface_a9145088aac70cdbb28b082bb283247f7} 
{\bfseries mesh} = None
\item 
\Hypertarget{classsurface__generator_1_1_surface_ab4aed7fe0c4a36557dc7849a94babddf}\label{classsurface__generator_1_1_surface_ab4aed7fe0c4a36557dc7849a94babddf} 
float {\bfseries sigma\+\_\+T} = None
\item 
\Hypertarget{classsurface__generator_1_1_surface_ad22c79b22217a5b00cb295f891c7c798}\label{classsurface__generator_1_1_surface_ad22c79b22217a5b00cb295f891c7c798} 
{\bfseries epsilon} = epsilon
\item 
\Hypertarget{classsurface__generator_1_1_surface_a00e32d330a78cd130cf44a9ebff9aa3d}\label{classsurface__generator_1_1_surface_a00e32d330a78cd130cf44a9ebff9aa3d} 
{\bfseries gamma} = gamma
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
\begin{DoxyVerb}A class used to represent a 3D surface with stochastic characteristics.

The surface is generated based on mu and sigma arrays, which control the shape and
roughness of the surface. This class also handles saving the surface geometry to a file.
\end{DoxyVerb}
 

\doxysubsection{Constructor \& Destructor Documentation}
\Hypertarget{classsurface__generator_1_1_surface_a8e46e1b3ac4a3dbe50941bc880179432}\index{surface\_generator.Surface@{surface\_generator.Surface}!\_\_init\_\_@{\_\_init\_\_}}
\index{\_\_init\_\_@{\_\_init\_\_}!surface\_generator.Surface@{surface\_generator.Surface}}
\doxysubsubsection{\texorpdfstring{\_\_init\_\_()}{\_\_init\_\_()}}
{\footnotesize\ttfamily \label{classsurface__generator_1_1_surface_a8e46e1b3ac4a3dbe50941bc880179432} 
surface\+\_\+generator.\+Surface.\+\_\+\+\_\+init\+\_\+\+\_\+ (\begin{DoxyParamCaption}\item[{}]{self}{, }\item[{}]{mu\+\_\+array}{, }\item[{}]{sigma\+\_\+array}{, }\item[{}]{sample\+\_\+length}{, }\item[{}]{local\+\_\+parameters}{}\end{DoxyParamCaption})}

\begin{DoxyVerb}Initializes the Surface object.

Parameters:
- mu_array: Array of coefficients for the mu parameter of the surface.
- sigma_array: Array of coefficients for the sigma parameter of the surface.
- sample_length: Length of the surface to be generated.
- local_parameters: Additional local parameters associated with the surface.
\end{DoxyVerb}
 

\doxysubsection{Member Function Documentation}
\Hypertarget{classsurface__generator_1_1_surface_a16b9de829b56cc9b9fa6c20c20ae6c37}\index{surface\_generator.Surface@{surface\_generator.Surface}!compute\_autocorr\_length@{compute\_autocorr\_length}}
\index{compute\_autocorr\_length@{compute\_autocorr\_length}!surface\_generator.Surface@{surface\_generator.Surface}}
\doxysubsubsection{\texorpdfstring{compute\_autocorr\_length()}{compute\_autocorr\_length()}}
{\footnotesize\ttfamily \label{classsurface__generator_1_1_surface_a16b9de829b56cc9b9fa6c20c20ae6c37} 
surface\+\_\+generator.\+Surface.\+compute\+\_\+autocorr\+\_\+length (\begin{DoxyParamCaption}\item[{}]{self}{, }\item[{}]{Z}{}\end{DoxyParamCaption})}

\begin{DoxyVerb}Computes the autocorrelation length of the surface.

Parameters:
- Z: The surface height matrix.

Returns:
- The autocorrelation length as a float.
\end{DoxyVerb}
 \Hypertarget{classsurface__generator_1_1_surface_aca8a023a7d392dd69ef971c413b40339}\index{surface\_generator.Surface@{surface\_generator.Surface}!compute\_Hermite\_expansion@{compute\_Hermite\_expansion}}
\index{compute\_Hermite\_expansion@{compute\_Hermite\_expansion}!surface\_generator.Surface@{surface\_generator.Surface}}
\doxysubsubsection{\texorpdfstring{compute\_Hermite\_expansion()}{compute\_Hermite\_expansion()}}
{\footnotesize\ttfamily \label{classsurface__generator_1_1_surface_aca8a023a7d392dd69ef971c413b40339} 
surface\+\_\+generator.\+Surface.\+compute\+\_\+\+Hermite\+\_\+expansion (\begin{DoxyParamCaption}\item[{}]{self}{, }\item[{}]{coeff\+\_\+array}{, }\item[{}]{tau}{}\end{DoxyParamCaption})}

\begin{DoxyVerb}Evaluates the Hermite expansion for the given coefficients and input values.

Parameters:
- coeff_array: Array of Hermite coefficients.
- tau: Input value or array for evaluating the expansion.

Returns:
- The evaluated Hermite expansion.
\end{DoxyVerb}
 \Hypertarget{classsurface__generator_1_1_surface_a8787096c273a876fe76c725df7a59adb}\index{surface\_generator.Surface@{surface\_generator.Surface}!compute\_psd@{compute\_psd}}
\index{compute\_psd@{compute\_psd}!surface\_generator.Surface@{surface\_generator.Surface}}
\doxysubsubsection{\texorpdfstring{compute\_psd()}{compute\_psd()}}
{\footnotesize\ttfamily \label{classsurface__generator_1_1_surface_a8787096c273a876fe76c725df7a59adb} 
surface\+\_\+generator.\+Surface.\+compute\+\_\+psd (\begin{DoxyParamCaption}\item[{}]{self}{, }\item[{}]{Z}{}\end{DoxyParamCaption})}

\begin{DoxyVerb}Computes the power spectral density (PSD) of the surface Z.

Parameters:
- Z: The surface height matrix.

Returns:
- The power spectral density as a numpy array.
\end{DoxyVerb}
 \Hypertarget{classsurface__generator_1_1_surface_ae32aae6daff1ac51e5c469c6c95c78b4}\index{surface\_generator.Surface@{surface\_generator.Surface}!correct\_height@{correct\_height}}
\index{correct\_height@{correct\_height}!surface\_generator.Surface@{surface\_generator.Surface}}
\doxysubsubsection{\texorpdfstring{correct\_height()}{correct\_height()}}
{\footnotesize\ttfamily \label{classsurface__generator_1_1_surface_ae32aae6daff1ac51e5c469c6c95c78b4} 
surface\+\_\+generator.\+Surface.\+correct\+\_\+height (\begin{DoxyParamCaption}\item[{}]{self}{, }\item[{}]{Z\+\_\+h}{, }\item[{}]{Z\+\_\+p}{}\end{DoxyParamCaption})}

\begin{DoxyVerb}Corrects the height of the surface based on a reference surface.

Parameters:
- Z_h: The target height distribution surface.
- Z_p: The reference surface.

Returns:
- The modified surface with corrected heights.
\end{DoxyVerb}
 \Hypertarget{classsurface__generator_1_1_surface_ab4ca5e0a67a71d8cd42c08f5843fbf9b}\index{surface\_generator.Surface@{surface\_generator.Surface}!correct\_PSD@{correct\_PSD}}
\index{correct\_PSD@{correct\_PSD}!surface\_generator.Surface@{surface\_generator.Surface}}
\doxysubsubsection{\texorpdfstring{correct\_PSD()}{correct\_PSD()}}
{\footnotesize\ttfamily \label{classsurface__generator_1_1_surface_ab4ca5e0a67a71d8cd42c08f5843fbf9b} 
surface\+\_\+generator.\+Surface.\+correct\+\_\+\+PSD (\begin{DoxyParamCaption}\item[{}]{self}{, }\item[{}]{Z}{, }\item[{}]{target\+\_\+psd}{}\end{DoxyParamCaption})}

\begin{DoxyVerb}Adjusts the PSD of the surface to match the target PSD.

Parameters:
- Z: The surface height matrix.
- target_psd: The target power spectral density to match.

Returns:
- The modified surface height matrix with the corrected PSD.
\end{DoxyVerb}
 \Hypertarget{classsurface__generator_1_1_surface_ab44a38e00e91dc82f9e5ae2d464d0600}\index{surface\_generator.Surface@{surface\_generator.Surface}!find\_coefficients@{find\_coefficients}}
\index{find\_coefficients@{find\_coefficients}!surface\_generator.Surface@{surface\_generator.Surface}}
\doxysubsubsection{\texorpdfstring{find\_coefficients()}{find\_coefficients()}}
{\footnotesize\ttfamily \label{classsurface__generator_1_1_surface_ab44a38e00e91dc82f9e5ae2d464d0600} 
surface\+\_\+generator.\+Surface.\+find\+\_\+coefficients (\begin{DoxyParamCaption}\item[{}]{self}{, }\item[{}]{func}{, }\item[{}]{n\+\_\+coeff}{, }\item[{}]{lim}{, }\item[{}]{N}{}\end{DoxyParamCaption})}

\begin{DoxyVerb}Computes the Hermite polynomial coefficients for a given function.

Parameters:
- func: The function to fit.
- n_coeff: The number of Hermite coefficients to compute.
- lim: The range over which to compute the coefficients.
- N: The number of points to use for the fitting.

Returns:
- Hermite coefficients as a numpy array.
\end{DoxyVerb}
 \Hypertarget{classsurface__generator_1_1_surface_a439480a7fba54ff195375a0545c1bb02}\index{surface\_generator.Surface@{surface\_generator.Surface}!generate@{generate}}
\index{generate@{generate}!surface\_generator.Surface@{surface\_generator.Surface}}
\doxysubsubsection{\texorpdfstring{generate()}{generate()}}
{\footnotesize\ttfamily \label{classsurface__generator_1_1_surface_a439480a7fba54ff195375a0545c1bb02} 
surface\+\_\+generator.\+Surface.\+generate (\begin{DoxyParamCaption}\item[{}]{self}{, }\item[{}]{samples}{, }\item[{}]{iterations}{, }\item[{}]{verbose}{}\end{DoxyParamCaption})}

\begin{DoxyVerb}Generates the surface by iteratively correcting its PSD and height distribution.

Parameters:
- samples: Number of samples along each dimension of the surface.
- iterations: Number of iterations for the PSD and height correction.
- verbose: Boolean flag to print details during the surface generation.
\end{DoxyVerb}
 \Hypertarget{classsurface__generator_1_1_surface_aa9ec8b6a00bcdcb55b20fcfa93def3ae}\index{surface\_generator.Surface@{surface\_generator.Surface}!generate\_height\_pdf@{generate\_height\_pdf}}
\index{generate\_height\_pdf@{generate\_height\_pdf}!surface\_generator.Surface@{surface\_generator.Surface}}
\doxysubsubsection{\texorpdfstring{generate\_height\_pdf()}{generate\_height\_pdf()}}
{\footnotesize\ttfamily \label{classsurface__generator_1_1_surface_aa9ec8b6a00bcdcb55b20fcfa93def3ae} 
surface\+\_\+generator.\+Surface.\+generate\+\_\+height\+\_\+pdf (\begin{DoxyParamCaption}\item[{}]{self}{, }\item[{}]{Z}{}\end{DoxyParamCaption})}

\begin{DoxyVerb}Generates the height distribution function for the surface based on mu and sigma arrays.

Parameters:
- Z: The surface height matrix.

Returns:
- The modified surface height matrix with a Gaussian height distribution.
\end{DoxyVerb}
 \Hypertarget{classsurface__generator_1_1_surface_aa4f514636a88199fda36c2e0540e3da6}\index{surface\_generator.Surface@{surface\_generator.Surface}!save@{save}}
\index{save@{save}!surface\_generator.Surface@{surface\_generator.Surface}}
\doxysubsubsection{\texorpdfstring{save()}{save()}}
{\footnotesize\ttfamily \label{classsurface__generator_1_1_surface_aa4f514636a88199fda36c2e0540e3da6} 
surface\+\_\+generator.\+Surface.\+save (\begin{DoxyParamCaption}\item[{}]{self}{, }\item[{}]{project\+\_\+name}{, }\item[{}]{file\+\_\+name}{}\end{DoxyParamCaption})}

\begin{DoxyVerb}Saves the generated surface to STL and SRF files.

Parameters:
- project_name: The name of the project directory.
- file_name: The base name of the files to save.
\end{DoxyVerb}
 

The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
src/surface\+\_\+generator.\+py\end{DoxyCompactItemize}
