Frequently asked questions

Why an alias ?

the alias property in the astrophysix package is an optional parameter only mandatory within SimulationStudy HDF5 files that are meant to be uploaded on the Galactica simulation database. This optional property can be found in various classes :

These alias properties are used to reference in a unique way the projects, protocols and experiments displayed on the web pages and appear in the URL of your web browser when you wish to visit the page of a given project or simulation. For example, this is the URL of a ORION_FIL_MHD simulation of the ORION project in the STAR_FORM (ProjectCategory.StarFormation) project category :

How can I check validity for Galactica ?

TODO

How to delete object from lists ?

Let us assume that you wish to remove a Snapshot from a Simulation. Then you can use the standard del python operator to remove it :

>>> simu.snapshots
Snapshot list :
+---+---------------------------+--------------------------------------+
| # |           Index           |                 Item                 |
+---+---------------------------+--------------------------------------+
| 0 | My best snapshot !        | 'My best snapshot !' snapshot        |
+---+---------------------------+--------------------------------------+
| 1 | My second best snapshot ! | 'My second best snapshot !' snapshot |
+---+---------------------------+--------------------------------------+
>>> del simu.snapshots[1]
>>> simu.snapshots
Snapshot list :
+---+---------------------------+--------------------------------------+
| # |           Index           |                 Item                 |
+---+---------------------------+--------------------------------------+
| 0 | My best snapshot !        | 'My best snapshot !' snapshot        |
+---+---------------------------+--------------------------------------+

See also

ObjectList example in the API reference.

How to delete files from a Datafile ?

To remove a file from a Datafile, you can use the standard del python operator:

>>> from astrophysix.utils.file import FileType
>>>
>>> power_spectrum_datafile.display_files()
[Power scpectrum] datafile. Attached files :
+-----------+-----------------------------+
| File type |          Filename           |
+-----------+-----------------------------+
| PNG       | spectrum_1.png              |
+-----------+-----------------------------+
| JPEG      | spectrum_with_overlays.jpg  |
+-----------+-----------------------------+
>>>
>>> del power_spectrum_datafile[FileType.PNG_FILE]
>>> power_spectrum_datafile.display_files()
[Power scpectrum] datafile. Attached files :
+-----------+-----------------------------+
| File type |          Filename           |
+-----------+-----------------------------+
| JPEG      | spectrum_with_overlays.jpg  |
+-----------+-----------------------------+

See also