-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add import data tutorials to the main tutorials section #1933
base: doc/new-tutorials-section
Are you sure you want to change the base?
Add import data tutorials to the main tutorials section #1933
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## doc/new-tutorials-section #1933 +/- ##
=============================================================
- Coverage 88.02% 86.98% -1.05%
=============================================================
Files 83 83
Lines 9963 9973 +10
=============================================================
- Hits 8770 8675 -95
- Misses 1193 1298 +105
|
@@ -15,19 +15,12 @@ From user input | |||
:padding: 2 | |||
:margin: 2 | |||
|
|||
.. grid-item-card:: Import data from csv file | |||
:link: ref_tutorials | |||
.. grid-item-card:: Manual input data on DPF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.. grid-item-card:: Manual input data on DPF | |
.. grid-item-card:: Use custom data |
:text-align: center | ||
|
||
Learn how to represent your manual input data in a DPF data storage structure | ||
Learn how to represent your manual input data in a DPF data storage structures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Learn how to represent your manual input data in a DPF data storage structures | |
Learn how to build DPF data storage structures from custom data |
@@ -0,0 +1,103 @@ | |||
.. _ref_tutorials_represent_data_on_dpf: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.. _ref_tutorials_represent_data_on_dpf: | |
.. _ref_tutorials_field_with_custom_data: |
.. grid-item-card:: Import data from csv file | ||
:link: ref_tutorials | ||
.. grid-item-card:: Manual input data on DPF | ||
:link: ref_tutorials_represent_data_on_dpf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:link: ref_tutorials_represent_data_on_dpf | |
:link: ref_tutorials_field_with_custom_data |
======================== | ||
Manual input data on DPF | ||
======================== |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
======================== | |
Manual input data on DPF | |
======================== | |
======================= | |
Load custom data in DPF | |
======================= |
.. |data| replace:: :attr:`Field.data<ansys.dpf.core.field_base._FieldBase.data>` | ||
.. |scoping| replace:: :attr:`Field.scoping<ansys.dpf.core.field_base._FieldBase.scoping>` | ||
|
||
This tutorial shows how to represent your manual input data in a DPF data storage structures. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This tutorial shows how to represent your manual input data in a DPF data storage structures. | |
This tutorial shows how to represent your custom data in DPF data storage structures. |
When handling data DPF uses |FieldsContainer| and |Field| to store and return it. The |Field| is a DPF array | ||
and a collection of |Field| is called |FieldsContainer|. For more information on how the data is structure | ||
in a |Field| and how the DPF data storage structures works check the :ref:`ref_tutorials_data_structures` | ||
tutorial section. | ||
|
||
Here we will create some 3d vector |Field|, where the data comes from lists. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When handling data DPF uses |FieldsContainer| and |Field| to store and return it. The |Field| is a DPF array | |
and a collection of |Field| is called |FieldsContainer|. For more information on how the data is structure | |
in a |Field| and how the DPF data storage structures works check the :ref:`ref_tutorials_data_structures` | |
tutorial section. | |
Here we will create some 3d vector |Field|, where the data comes from lists. | |
DPF uses |Field| and |FieldsContainer| objects to handle data. The |Field| is a homogeneous array | |
and a |FieldsContainer| is a labeled collection of |Field|. | |
For more information on DPF data structures such as the |Field| and their use check the :ref:`ref_tutorials_data_structures` tutorials section. | |
Here we show how to create a 3d vector |Field| from data stored in Python lists. |
We need a part on how to do that with numpy
arrays.
Defining the fields | ||
------------------- | ||
|
||
To manually import data on DPF you have to create the structure to store it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To manually import data on DPF you have to create the structure to store it. | |
To import custom data into DPF you first have to create the structure to store it. |
Defining the fields | ||
------------------- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Defining the fields | |
------------------- | |
Create DPF fields | |
----------------- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@luisaFelixSalles I would personally use five sections for this tutorial:
- a first section where we just define the custom data used later
- a second section on how to create a field -> we need to show more here on how to set the proper nature, size and dimensionality. This is crucial to properly set the data later so even if it is already in another tutorial I would still explain the basics here. Also show the field_factory, the fact you can create unitary fields, fields with a given value everywhere, etc. With have helpers so should mention them here.
- a third section where we show how to set data arrays directly, and how to set the scoping for that array
This is the most important as people rarely only add three data points. There are steps missing in this third section however on setting the data property. The scoping is undefined in this case, so it needs to also be built and set. - a fourth section where we show how to append data or change data for a specific entity id
- a final section on how to create the fields_container based on the fields as you showed with the helper. Mention the fields_container factory etc, without going into too much detail if there is another tutorial for that. To me this is a last step as not everyone will need to create a collection for the fields.
Add the import data tutorials
List of tutorials:
Preview on how it renders
Import data section main page
Manual input data on DPF
Import a result file in DPF
Extract and explore results metadata
Extract and explore results data
Narrow down data