Welcome, Guest
Username: Password: Remember me

TOPIC: TelemacFile breaks if TOMAWAC spectrum has more than 99 points

TelemacFile breaks if TOMAWAC spectrum has more than 99 points 4 years 7 months ago #35745

  • cyamin
  • cyamin's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 997
  • Thank you received: 234
Hello all,
I have created a spectrum file that contains more than 99 spectrum points. When I try to analyze the spectrum using TelemacFile, I get a "This file does not seem to be a spectrum file" error mainly because after spectrum point 99 the method 'is_a_spectrum_file' fails to match the regex filter 'F[0-9]{2} PT2D[0-9]{6}' with 'varnames'. Point naming after F99 follows the pattern F:1, F:2, F:3 and so on.
The questions are:
  1. Since only two digits are dedicated to spectrum point numbering, why isn't there a check to make sure this is obeyed to avoid unexpected behaviour?
  2. If spectrum point names after F99 don't pose TOMAWAC functionality issue (which so far I believe is true), then 'is_a_spectrum_file' should be adapted accordingly
  3. Is it possible to add third digit be added to spectrum point naming?
  4. Regards,
    Costas
The administrator has disabled public write access.

TelemacFile breaks if TOMAWAC spectrum has more than 99 points 4 years 7 months ago #35746

  • yugi
  • yugi's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 851
  • Thank you received: 244
Hi,

Indeed the check was forgotten.
I was told at the time that the limit was 99.
I'll check in the code what the limit is and match that.
There are 10 types of people in the world: those who understand binary, and those who don't.
The administrator has disabled public write access.

TelemacFile breaks if TOMAWAC spectrum has more than 99 points 4 years 7 months ago #35755

  • yugi
  • yugi's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 851
  • Thank you received: 244
I've pushed a correction for telemac_file that should work with the actual output of tomawac.

Could you give it a try ?

In a second commit (it needs more validation) I will change tomawac naming of spectrum variables to handle more than 99.
There are 10 types of people in the world: those who understand binary, and those who don't.
The administrator has disabled public write access.
The following user(s) said Thank You: cyamin

TelemacFile breaks if TOMAWAC spectrum has more than 99 points 4 years 7 months ago #35760

  • cyamin
  • cyamin's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 997
  • Thank you received: 234
Yep, it works just fine! Looking forward for the 3 digit fix. B)
The administrator has disabled public write access.
Moderators: borisb

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