Page 1 of 1

Likely bug in buildstardb.pl

Posted: 11.12.2008, 07:03
by jdavies
I'm looking at the buildstardb.pl file in the src/tools/stardb folder. I just now performed an SVN UPDATE to ensure that I have the current version. There appears to be a bug on line 677 of the file where you are parsing the luminosity of the star. The parser previously read in the "I" character and then on line 676 recognized the "V" chacater. The luminosity on line 677 should be set to "IV" but instead it is set to "V". Here is the code snippet from the file.

Code: Select all

} elsif($state eq 'LumClassIState') {
         if($c eq 'I') {
            $state = 'LumClassIIState';
         } elsif($c eq 'V') {
            $lumClass = $SC_LumClass{'V'};  <---- BUG
            $state = 'EndState';
         } elsif($c eq 'a') {
            $state = 'LumClassIaState';
         } elsif($c eq 'b') {
            $lumClass = $SC_LumClass{'Ib'};
            $state = 'EndState';
         } elsif($c eq '-') {
            $state = 'LumClassIdashState';
         } else {
            $lumClass = $SC_LumClass{'Ib'};
            $state = 'EndState';
         }
         $i++;
      }

- Jeff

Re: Likely bug in buildstardb.pl

Posted: 11.12.2008, 08:33
by ajtribick
Thanks for the bug report. I'll upload fixed versions of this script and the star database later today.

(I think I missed this one because I forgot that Beta Hydri and Delta Pavonis, which I used as my "test subgiants" are overloaded in nearstars.stc)

Re: Likely bug in buildstardb.pl

Posted: 12.12.2008, 11:09
by ajtribick
Fixed, new versions of stars.dat and stars.txt available from SVN.