DataFieldModel¶
- class persalys.DataFieldModel(*args)¶
- Defines field evaluation from external data and mesh. - Parameters:
- namestr
- Name 
- meshModelMeshModel
- Mesh model indexing data 
- processSampleProcessSample
- Field data, (optional) 
 
 - Methods - Accessor to the object's name. - getId()- Accessor to the object's id. - Accessor to the underlying implementation. - Mesh model accessor. - getName()- Accessor to the object's name. - Process sample accessor. - Process sample accessor. - Python script accessor. - importProcessSample(*args)- Data import method. - isValid()- Python script accessor. - setMeshModel(meshModel)- Mesh model accessor. - setName(name)- Accessor to the object's name. - setProcessSample(processSample)- Process sample accessor. - setSampleAsProcessSample(sample)- Process sample accessor. - Examples - >>> import persalys >>> import openturns as ot >>> meshModel = persalys.GridMeshModel([persalys.Variable('t', 'date')], ot.Interval([1], [12]), [12]) >>> model = persalys.DataFieldModel('myModel', meshModel) >>> fileName = 'sample.csv' >>> sample = ot.Normal(12).getSample(30) >>> sample.exportToCSVFile(fileName) >>> model.importProcessSample(fileName, persalys.Tools.Columns) - __init__(*args)¶
 - getClassName()¶
- Accessor to the object’s name. - Returns:
- class_namestr
- The object class name (object.__class__.__name__). 
 
 
 - getId()¶
- Accessor to the object’s id. - Returns:
- idint
- Internal unique identifier. 
 
 
 - getImplementation()¶
- Accessor to the underlying implementation. - Returns:
- implImplementation
- A copy of the underlying implementation object. 
 
 
 - getName()¶
- Accessor to the object’s name. - Returns:
- namestr
- The name of the object. 
 
 
 - getProcessSample()¶
- Process sample accessor. - Returns:
- processSampleProcessSample
- Process sample containing field data. 
 
- processSample
 
 - getProcessSampleAsSample()¶
- Process sample accessor. - Returns:
- sampleSample
- Sample (dimension n-vertices, size n-trajectories) containing field data. 
 
- sample
 
 - getPythonScript()¶
- Python script accessor. - Returns:
- scriptstr
- Python script to replay the model. 
 
 
 - importProcessSample(*args)¶
- Data import method. - Parameters:
- fileNamestr
- Name of the file containing field data. 
- orderint
- Wether data is mesh-indexed as lines or columns in the file (optional, default : persalys.Tools.Columns) 
 
 
 - isValid()¶
- Python script accessor. - Returns:
- isValidbool
- Wether the model data is valid or not. It must contain only valid numerical values and data must be correctly indexed on the mesh model. 
 
 
 - setName(name)¶
- Accessor to the object’s name. - Parameters:
- namestr
- The name of the object. 
 
 
 - setProcessSample(processSample)¶
- Process sample accessor. - Parameters:
- processSampleProcessSample
- Process sample containing field data. 
 
- processSample
 
 
