Draw the stars of catalog (found with find_data_file; '' for none)
with magnitudes from min_mag to max_mag (default -2 to 8), at most
max_stars (default 10000), sized from min_size to max_size window
units (default 1 to 10) by brightness, the smallest dimmed to
min_dim_ratio (0 to 1, default 0.5) of their color (OpenFrames'
setSkySphereStarData). Returns false if the catalog cannot be read or the
limits are invalid (min_mag > max_mag, max_stars < 1, min_size >
max_size, a ratio outside 0 to 1).
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Source Code
logical function set_star_data(self,catalog,min_mag,max_mag,max_stars,min_size,max_size,min_dim_ratio)&result(ok)class(SkySphere),intent(inout)::selfcharacter(len=*),intent(in)::catalog!! star catalog file; '' for nonereal(wp),intent(in),optional::min_mag,max_mag!! apparent magnitudesreal(wp),intent(in),optional::min_size,max_size!! window unitsreal(wp),intent(in),optional::min_dim_ratio!! 0 to 1integer,intent(in),optional::max_stars!! the most stars drawn (default 10000; >= 1)real(wp)::mags(2),sizes(2),diminteger::nmags=[self%min_mag,self%max_mag]if(present(min_mag))mags(1)=min_magif(present(max_mag))mags(2)=max_magsizes=[self%min_size,self%max_size]if(present(min_size))sizes(1)=min_sizeif(present(max_size))sizes(2)=max_sizedim=self%min_dimif(present(min_dim_ratio))dim=min_dim_ration=self%max_starsif(present(max_stars))n=max_starsok=mags(1)<=mags(2).and.n>=1.and.sizes(1)<=sizes(2).and.dim>=0.0_wp.and.dim<=1.0_wpif(.not.ok)returnself%min_mag=mags(1)self%max_mag=mags(2)self%min_size=sizes(1)self%max_size=sizes(2)self%min_dim=dimself%max_stars=nself%catalog=trim(catalog)self%n_stars=0if(len_trim(catalog)>0)ok=read_stars(self)if(c_associated(self%root))call make_star_node(self)end function set_star_data