Exemplo n.º 1
0
		private SpeciesStats StatsByStation(string species, Station st)
		{
			try {
				int speciesCount=0;
				int speciesPictures=0;
				
				foreach(SpeciesObservation sp in SpeciesObservationsInStation(st))
				{
					if(sp.Value==species)
					{
						speciesCount+=sp.Count;
						speciesPictures++;
					}
				}

				SpeciesStats spst=new SpeciesStats(species,speciesCount,speciesPictures);
				
				return spst;
			} catch (Exception ex) {
				throw ex;
			}

		}
Exemplo n.º 2
0
		private SpeciesStats StatsBySpecies(string species, Project currentProject)
		{
			try {
				int speciesCount=0;
				int speciesPictures=0;
				
				double[] activityPaterns = new double[24];
				
				
				foreach (Station st in currentProject.StationsList)
				{
					foreach(Sample smp in st.SamplesList)
					{
						foreach(SpeciesObservation obs in smp.Species_Observations_list)
						{
							if(obs.Value==species)
							{
								speciesCount+=obs.Count;
								speciesPictures++;
								
								activityPaterns[smp.DateTime.Hour]+=smp.DateTime.Hour;
							}
						}
					}
				}
				

				SpeciesStats spst=new SpeciesStats(species,speciesCount,speciesPictures);
				spst.ActivityPatern=activityPaterns;
				
				
				return spst;
				
			} catch (Exception ex) {
				throw ex;
			}

		}