#define		MOSTPREFIXES	10000		// allow for up to 10000 prefixes
#define		MOSTINSTANCES	1000		// allow for up to  1000 instances per prefix		
#define		MOSTASSAYS		  50		// allow for up to    50 assays per instance
#define		MOSTHEIGHTS		 100		// allow for up to   100 measurement heights

typedef struct tagASSAY					// information pertaining to an assay of an instance 
			{
	int		assayID ;					// ID number of this assay

	double	xlopole ;					// low pole x in current units
	double	ylopole ;					// low pole y in current units
	double	xhipole ;					// high pole x in current units
	double	yhipole ;					// high pole y in current units
	double	ipd ;						// inter pole distance in current units
	double	tilt ;						// tilt-from-vertical of bud axis, in radians 
	int		heights ;					// number of measure heights used
	int		growth ;					// measurement mode: growth or linear
	double	firstfrac ;					// fraction of ipd from mid-height to the next up
	double	 diam[MOSTHEIGHTS] ;		// whole widths (diameters) at heights
	double	 left[MOSTHEIGHTS] ;		// left  radii at heights
	double  right[MOSTHEIGHTS] ;		// right radii at heights

			} ASSAY, * LPASSAY ;

LPASSAY pAssay ;

typedef struct tagINSTANCE				// information pertaining to an instance
			{
	int		instanceID ;				// ID number of this instance

	char	imagepath[256] ;			// path to the instance's image
	char	friendlydate[80] ;			// instance's civil date
	char	friendlytime[80] ;			// instance's time of day to the second
	char	comment[512] ;				// comment on this instance
	int		assays ;					// number of assays of this instance
    ASSAY	assay[MOSTASSAYS] ;			// assay information 
			} INSTANCE, * LPINSTANCE ;

LPINSTANCE pInstance ;

typedef struct tagPREFIX		// per prefix (Bud) information, common to all instances with the prefix 
			{
	int		prefixID ;					// ID number of this prefix

	char	prefix[100] ;				// the prefix string (Bud ID)
	char	friendlyplace[256] ;		// the friendly place
	char	comment[512] ;				// general comment on this prefix (Bud)
	double	latitude ;					// the bud's latitude
	double	longitude ;					// the bud's longitude
	int		instances ;					// number of instances
  INSTANCE	instance[MOSTINSTANCES] ;	// instance information
			} PREFIX, * LPPREFIX ;

LPPREFIX pPrefix ;

