Likely bug in buildstardb.pl

Report bugs, bug fixes and workarounds here.
Topic author
jdavies
Posts: 65
Joined: 05.12.2008
With us: 15 years 11 months

Likely bug in buildstardb.pl

Post #1by jdavies » 11.12.2008, 07:03

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

ajtribick
Developer
Posts: 1855
Joined: 11.08.2003
With us: 21 years 3 months

Re: Likely bug in buildstardb.pl

Post #2by ajtribick » 11.12.2008, 08:33

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)

ajtribick
Developer
Posts: 1855
Joined: 11.08.2003
With us: 21 years 3 months

Re: Likely bug in buildstardb.pl

Post #3by ajtribick » 12.12.2008, 11:09

Fixed, new versions of stars.dat and stars.txt available from SVN.


Return to “Bugs”