Welcome, Guest
Username: Password: Remember me

TOPIC: PYTHON : parserSELFIN.getValuePolyplanSLF

PYTHON : parserSELFIN.getValuePolyplanS​LF 9 years 8 months ago #16313

  • jdesombr
  • jdesombr's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 7
Bonjour a tous,

Je cherche utiliser les fonctions python definient dans "python27"

Tout d'abord existe - il une documentation quelque par pour utiliser ses fonctions ?

Je cherche plus précisement a extraire les valeurs d'une variable a un instant pour un plan. J'ai identifié la fonction "getValuePolyplanSLF" qui semble faire ce que je veux. Mais je ne comprend pas ce que sont les arguments "hook" et "tags" ?

getValuePolyplanSLF(hook,tags,time,support,NVAR,NPOIN3,NPLAN,(varsIndexes,varsName))

D'avance merci,
Cordialement,

Jonathan DESOMBRE
The administrator has disabled public write access.

PYTHON : parserSELFIN.getValuePolyplanS​LF 9 years 8 months ago #16334

  • sebourban
  • sebourban's Avatar
  • OFFLINE
  • Administrator
  • Principal Scientist
  • Posts: 814
  • Thank you received: 219
Hello,

Unfortunately the python scripts are still being actively developed and still a moving target. Even though these are available to all users at this stage -- essentially to prepare all users to the python environment itself -- we will only be making lots of publicity when the scripts are ready and in a more stable state. Then a documentation should be ready, and we will most probably make it as a wiki to which everybody can participate in editing.

So you are very brave to use these scripts without "net", but your feedback is welcomed and will be taken in the development.

To answer you question, you can look at where that function is called, for instance in mycast:
data = getValuePolyplanSLF(self.file,self.tags,t,zpo,self.NVAR,self.NPOIN3,self.NPLAN,vars)

where self refer to a SELAFIN object. You can then refer to the SELAFIN class itself to see how these are set.

Hope this helps.
Sébastien.
The administrator has disabled public write access.
The following user(s) said Thank You: jdesombr

PYTHON : parserSELFIN.getValuePolyplanS​LF 9 years 8 months ago #16351

  • jdesombr
  • jdesombr's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 7
Hello Sébastien,

Thank you for your answer. I had not seen the "mycast" file, thanks !
For now, I "tricked" using the function "getVALUES()":

values = slf.getVALUES(t)
#########################################
# CARTOGRAPHIES
# Extraction des donnees du plan "p"
ztri = values[varibales_carto[j]][slf.NPOIN2*(p):slf.NPOIN2*(p+1)]

Best regards,
The administrator has disabled public write access.

PYTHON : parserSELFIN.getValuePolyplanS​LF 9 years 8 months ago #16352

  • sebourban
  • sebourban's Avatar
  • OFFLINE
  • Administrator
  • Principal Scientist
  • Posts: 814
  • Thank you received: 219
very good !

Good luck for the rest.

Sébastien.
The administrator has disabled public write access.

PYTHON : parserSELFIN.getValuePolyplanS​LF 4 years 10 months ago #35159

  • thomas.bockel
  • thomas.bockel's Avatar
Hy,

Any news on this topic?

I would like to export values on specific plans times and variables.

I tried using the getValuePolyplanSLF but couldn't find a solution.

Could someone provide me with a piece of script for this functionnality (T3D)?

Thank you,

Thomas
The administrator has disabled public write access.

PYTHON : parserSELFIN.getValuePolyplanS​LF 4 years 10 months ago #35167

  • Lux
  • Lux's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 96
  • Thank you received: 39
Python scripts are numberous with their pros/cons.
For those I use regularly (which are running with Python 3):
  • PyTelTools: used to read/write/analyze 2D/3D Serafin files => simple to use (not all requirements are necessary if you do not use the GUI) here is a script example reading a 3D file
  • postel : recent and official collaborative initiative to unify Python scripts. Beware it can be complicated to use as it requires you to have Telemac with hermes module compiled

Hope it helps,
Luc
The administrator has disabled public write access.
The following user(s) said Thank You: jeremie, thomas.bockel
Moderators: borisb

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.