Package skyview.data

Class AngScale

java.lang.Object
skyview.data.AngScale

public class AngScale
extends java.lang.Object
Find an appropriate delta to use for getting grid intervals. This class finds appropriate delta's given the range of the values and the fashion in which it is being displayed, e.g., sexagesimal or decimal. The intent is the the returned intervals can be displayed as exact values.
  • Constructor Summary

    Constructors 
    Constructor Description
    AngScale()  
  • Method Summary

    Modifier and Type Method Description
    static void main​(java.lang.String[] args)  
    double scale​(double delta)
    This function defines an appropriate interval between the grid values, given the absolute value of the range of the interval.
    double[] scaling​(double min, double max)
    Get the desired starting values and scaling interval.
    void setSexagesimal​(boolean flag)
    Do we want sexagesimal coordinates?
    void setTime​(boolean flag)
    Do we want coordinates in time?

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • scale

      public double scale​(double delta)
      This function defines an appropriate interval between the grid values, given the absolute value of the range of the interval. We look at increasingly small candidate values until we find one which will split the range into an appropriate number of intervals.
      Parameters:
      delta - The range of the coordinate.
    • scaling

      public double[] scaling​(double min, double max)
      Get the desired starting values and scaling interval. First we get the delta between values, then we find the first value is 0 modulo the delta.
      Parameters:
      min - The minimum coordinate value.
      max - The maximum coordinate value
      Returns:
      a two element vector giving the starting value and delta to be used. .
    • setSexagesimal

      public void setSexagesimal​(boolean flag)
      Do we want sexagesimal coordinates?
    • setTime

      public void setTime​(boolean flag)
      Do we want coordinates in time?
    • main

      public static void main​(java.lang.String[] args)