stellarRadiusCP() public method

Provide the cumulative probability that a star of this class will have a stellar radius equal to or lower than that supplied
public stellarRadiusCP ( decimal l ) : decimal
l decimal
return decimal
Beispiel #1
0
        /// <summary>
        /// Calculate additonal information for the star
        /// </summary>
        public void setStellarExtras()
        {
            StarClass starClass = StarClass.FromName(stellarclass);

            if (starClass != null)
            {
                if (solarmass != null)
                {
                    massprobability = StarClass.sanitiseCP(starClass.stellarMassCP((decimal)solarmass));
                }
                if (solarradius != null)
                {
                    radiusprobability = StarClass.sanitiseCP(starClass.stellarRadiusCP((decimal)solarradius));
                }
                if (temperature != null)
                {
                    tempprobability = StarClass.sanitiseCP(starClass.tempCP((decimal)temperature));
                }
                if (age != null)
                {
                    ageprobability = StarClass.sanitiseCP(starClass.ageCP((decimal)age));
                }
                chromaticity = starClass.chromaticity;
            }
        }
Beispiel #2
0
        /// <summary>
        /// Calculate additonal information for the star
        /// </summary>
        public void setStellarExtras()
        {
            StarClass starClass = StarClass.FromName(stellarclass);

            if (starClass != null)
            {
                if (solarmass != null)
                {
                    massprobability = StarClass.sanitiseCP(starClass.stellarMassCP((decimal)solarmass));
                }
                if (solarradius != null)
                {
                    radiusprobability = StarClass.sanitiseCP(starClass.stellarRadiusCP((decimal)solarradius));
                }
                if (temperature != null)
                {
                    tempprobability = StarClass.sanitiseCP(starClass.tempCP((decimal)temperature));
                }
                if (age != null)
                {
                    ageprobability = StarClass.sanitiseCP(starClass.ageCP((decimal)age));
                }
                chromaticity = starClass.chromaticity.localizedName;
            }
            // `estimatedvalue` is only set during scan events.
            if (radius != 0 && radius != null && temperature != 0 && temperature != null)
            {
                // Minimum estimated single-star habitable zone (target black body temperature of 315°K / 42°C / 107°F or less, radius in km)
                estimatedhabzoneinner = StarClass.DistanceFromStarForTemperature(StarClass.maxHabitableTempKelvin, Convert.ToDouble(radius), Convert.ToDouble(temperature));

                // Maximum estimated single-star habitable zone (target black body temperature of 223.15°K / -50°C / -58°F or more, radius in km)
                estimatedhabzoneouter = StarClass.DistanceFromStarForTemperature(StarClass.minHabitableTempKelvin, Convert.ToDouble(radius), Convert.ToDouble(temperature));
            }
            if (distance != null)
            {
                mainstar = distance == 0 ? true : false;
            }
        }