亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? atofmsparticle.java

?? 識別氣溶膠飛行時間質(zhì)譜峰(ATOFMS)
?? JAVA
字號:
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is EDAM Enchilada's ATOFMSParticle class. * * The Initial Developer of the Original Code is * The EDAM Project at Carleton College. * Portions created by the Initial Developer are Copyright (C) 2005 * the Initial Developer. All Rights Reserved. * * Contributor(s): * Ben J Anderson andersbe@gmail.com * David R Musicant dmusican@carleton.edu * Anna Ritz ritza@carleton.edu * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** *//* * Created on Jul 16, 2004 * *  * Window - Preferences - Java - Code Style - Code Templates */package ATOFMS;import java.util.ArrayList;import java.util.LinkedHashMap;import java.util.Map;import java.util.Date;import java.text.DateFormat;/** * @author ritza * Specific to ATOFMS data. */public class ATOFMSParticle {	private final int MAX_BIN_NUMBER;	public String filename;	public Date time;	public float laserPower;	public float digitRate;	public int scatDelay;	public float size;	public int[] posSpectrum;	public int[] negSpectrum;	protected ArrayList<Peak> peakList = null;	public int atomID;	public static PeakParams currPeakParams;	public static CalInfo currCalInfo;		private double autoPosSlope, autoNegSlope, autoPosIntercept,		autoNegIntercept;	public ATOFMSParticle()	{		super();		MAX_BIN_NUMBER = 30000;			}		/** 	 * Sets all variables about the particle.  If autocalibrate is true, then	 * particle is autocalibrated.	 * @param fname - filename	 * @param timestr - time	 * @param lasPow - laser power	 * @param dRate - digit rate	 * @param sDelay - scat delay	 * @param pSpect - pos spectrum	 * @param nSpect - neg spectrum	 */	public ATOFMSParticle(String fname, 						  Date timet, 						  float lasPow,						  float dRate,						  int sDelay,						  int[] pSpect,						  int[] nSpect						  )	{		MAX_BIN_NUMBER = pSpect.length;		filename = fname;		time = timet;		laserPower = lasPow/1000;		if (currCalInfo.sizecal)		{			size = 				currCalInfo.c1 +				currCalInfo.c2*sDelay +				currCalInfo.c3*sDelay*sDelay +				currCalInfo.c4*sDelay*sDelay*sDelay;			if (size < 0)				size = 0;		}		else			size = 0;		posSpectrum = pSpect;		negSpectrum = nSpect;		digitRate = dRate;		scatDelay = sDelay;				if (currCalInfo.autocal)		{			double returnVals[] = new double[2];			returnVals = AutoCalibrator.autoCalibrate(digitRate, 					AutoCalibrator.POS, posSpectrum);			if (returnVals != null)			{				autoPosSlope = returnVals[0];				autoPosIntercept = returnVals[1];			}			else			{				autoPosSlope = currCalInfo.posSlope;				autoPosIntercept = currCalInfo.posIntercept;			}			returnVals = AutoCalibrator.autoCalibrate(digitRate, 					AutoCalibrator.NEG, negSpectrum);			if (returnVals != null)			{				autoNegSlope = returnVals[0];				autoNegIntercept = returnVals[1];			}			else			{				autoNegSlope = currCalInfo.negSlope;				autoNegIntercept = currCalInfo.negIntercept;			}		}	}		/**	 * Gets the particle's peak list.	 */	public ArrayList<Peak> getPeakList()	{		if (peakList!= null)			return peakList;		peakList = new ArrayList<Peak>(20);				int baselines[] = findBaseLines();				getPosPeaks(baselines[0]);		getNegPeaks(baselines[1]);				return peakList;	}		/**	 * Finds the base lines.	 * @return int[2], pos and neg baselines.	 */	private int[] findBaseLines()	{		int baselines[] = new int[2];				baselines[0] = 0;		baselines[1] = 0;				// This calculation does not take into account the last bin		for (int i = MAX_BIN_NUMBER - MAX_BIN_NUMBER/10; i < MAX_BIN_NUMBER; i++)		{			baselines[0] += posSpectrum[i];			baselines[1] += negSpectrum[i];		}		baselines[0] /= MAX_BIN_NUMBER/10;		baselines[1] /= MAX_BIN_NUMBER/10;		return baselines;	}		/**	 * get positive peaks and put them into a sparse peak list.	 * @param baseline	 * @return true if successful	 */	private boolean getPosPeaks(int baseline)	{		int i = 0;		int startLoc = 0;		int endLoc = 0;		int centerIndex = 0;		int peakHeight;		int peakArea;		int temp = 0;		int totalArea = 0;		boolean foundPeak = false;		while (i < MAX_BIN_NUMBER)		{			startLoc = i;						//Set peakHeight and peakArea to zero.			peakHeight = 0;			peakArea = 0;						// if the index is above the baseline find where it 			// goes back below, this range (startLoc-endLoc) is 			// the peak's key			while (i < MAX_BIN_NUMBER && posSpectrum[i] > baseline + currPeakParams.minHeight)			{				foundPeak = true;				endLoc = i;				temp = posSpectrum[i] - baseline;				if (temp > peakHeight)					peakHeight = temp;				i++;			}// while (posSpectrum[i] > baseline)			// We found a peak and its range, now let's find out			// about it.			if (foundPeak == true)			{ 				// This is how MS-Analyze calculates peak centers,				// the main effect of the -1 is that peaks centered				// on even bins get pushed up a bin instead of back one				// from the *.5 value.				centerIndex = startLoc + (endLoc-(startLoc-1))/2;								for (int j = startLoc; j <= endLoc; j++)				{					peakArea = peakArea + posSpectrum[j];				}				peakArea = peakArea - baseline*(endLoc-startLoc+1);				totalArea += peakArea;				double peakLocation = getPosMZ(centerIndex);				peakList.add(new ATOFMSPeak(peakHeight, peakArea, peakLocation));								foundPeak = false;			} // if (foundPeak == true)			else				i++;		} // while (i < MAX_BIN_NUMBER)		int k = 0;						while (k < peakList.size())		{			Peak peak = peakList.get(k);			((ATOFMSPeak)peak).relArea = (float) ((ATOFMSPeak)peak).area/totalArea;			if(((ATOFMSPeak)peak).relArea <= currPeakParams.minRelArea ||					((ATOFMSPeak)peak).area <= currPeakParams.minArea)			{				peakList.remove(k);			}			else				k++;		}		return true;	}		private double getRoundedMZ(double rawMZ) {		double roundedMZ = Math.round(rawMZ);		double error = rawMZ-roundedMZ;		if(error <= currPeakParams.maxPeakError || (-1 * error) < currPeakParams.maxPeakError){			return roundedMZ;		}		return -1;	}	/**	 * Gets neg peaks and puts them into a sparse peaklist.	 * @param baseline	 * @return true on success.	 */	private boolean getNegPeaks(int baseline)	{		int startingListSize = peakList.size();		int i = 0;		int startLoc = 0;		int endLoc = 0;		int centerIndex = 0;		int peakHeight = 0;		int peakArea = 0;		int temp = 0;		int totalArea = 0;		boolean foundPeak = false;		while (i < MAX_BIN_NUMBER)		{			peakHeight = 0;			peakArea = 0;			startLoc = i;			// if the index is above the baseline find where it 			// goes back below, this range (startLoc-endLoc) is 			// the peak's key			//if (negSpectrum[i] < 0)			//	System.out.println(negSpectrum[i]);			while (i < MAX_BIN_NUMBER && negSpectrum[i] > (baseline	               + currPeakParams.minHeight))			{				foundPeak = true;				endLoc = i;				temp = negSpectrum[i] - baseline;				if (temp > peakHeight)					peakHeight = temp;				i++;			}// while (negSpectrum[i] > baseline)			// We found a peak and it's range, now let's find out			// about it.  			if (foundPeak == true)			{				centerIndex = startLoc + (endLoc-(startLoc-1))/2;								peakArea = 0;				for (int j = startLoc; j <= endLoc; j++)				{					peakArea = peakArea + negSpectrum[j];				}				peakArea = peakArea - baseline*(endLoc-startLoc+1);				totalArea += peakArea;								// lets see if we can pre cut a peak from the list				// In an effor to match the MSAnalyze results, I'm 				// reducing total value by the value of the peak as we 				// cut it.  Nevermind.				double peakLocation = getNegMZ(centerIndex);				peakList.add(new ATOFMSPeak(peakHeight, peakArea, peakLocation));								peakHeight = 0;				foundPeak = false;			} // if (foundPeak == true)			else				i++;		} // while (i < MAX_BIN_NUMBER)						int k = startingListSize;		while (k < peakList.size())		{			Peak peak = peakList.get(k);			((ATOFMSPeak)peak).relArea = (float) ((ATOFMSPeak)peak).area/totalArea;			if(((ATOFMSPeak)peak).relArea <= currPeakParams.minRelArea ||					((ATOFMSPeak)peak).area <= currPeakParams.minArea)			{				peakList.remove(k);			}			else				k++;		}				// Calculate the relative areas.		for (int l = startingListSize; l < peakList.size(); l++)		{			Peak peak = peakList.get(l);			((ATOFMSPeak)peak).relArea = (float)((ATOFMSPeak)peak).area/totalArea;			peakList.set(l, peak);		}		return true;	}	/**	 * returns the pos. M/Z value for the given bin	 * @param bin	 * @return m/z value	 */	private double getPosMZ(int bin)	{		double squareThis = 0;		if (currCalInfo.autocal) 			squareThis = autoPosSlope*bin + autoPosIntercept;		else			squareThis = currCalInfo.posSlope*bin + currCalInfo.posIntercept;				return squareThis * squareThis;	}		/**	 * returns the neg. M/Z value for the given bin	 * @param bin	 * @return m/z value	 */	private double getNegMZ(int bin)	{		double squareThis = 0;		if (currCalInfo.autocal)			squareThis = autoNegSlope*bin + autoNegIntercept;		else			squareThis = currCalInfo.negSlope*bin + currCalInfo.negIntercept;				return -(squareThis * squareThis);	}		/**	 * Returns the calibrated positive spectrum of the particle.	 */	public chartlib.DataPoint[] getPosSpectrum()	{		chartlib.DataPoint[] spec = new chartlib.DataPoint[posSpectrum.length];		for( int i=0; i < posSpectrum.length; i++)			spec[i] = new chartlib.DataPoint(getPosMZ(i),posSpectrum[i]);		return spec;	}		/**	 * Returns the calibrated negative spectrum of the particle.	 */	public chartlib.DataPoint[] getNegSpectrum()	{		chartlib.DataPoint[] spec = new chartlib.DataPoint[negSpectrum.length];		for( int i=0; i < negSpectrum.length; i++)		{			spec[i] = new chartlib.DataPoint(-getNegMZ(i),negSpectrum[i]);		}		return spec;	}		public String particleInfoDenseString(DateFormat d) {		return "'" + d.format(time) + "', " + 		laserPower + ", " + size + ", " + scatDelay + ", '" + filename + "'";	}		public ArrayList<String> particleInfoSparseString() {		ArrayList<String> peaks = new ArrayList<String>();		getPeakList();		Map<Integer, Peak> map = new LinkedHashMap<Integer, Peak>();				for (Peak p : peakList) {			// see BinnedPeakList.java for source of this routine			int mzInt; double mz = p.massToCharge;						if (mz >= 0.0)				mzInt = (int) (mz + 0.5);			else				mzInt = (int) (mz - 0.5);						//new Peak(int height, int area, double masstocharge)			if (map.containsKey(mzInt))			{				ATOFMSPeak soFar = (ATOFMSPeak)map.get(mzInt);				map.put(mzInt, 						new ATOFMSPeak(soFar.height + ((ATOFMSPeak)p).height,								soFar.area + ((ATOFMSPeak)p).area,								soFar.relArea + ((ATOFMSPeak)p).relArea,								mzInt));			} else {				map.put(mzInt, new ATOFMSPeak(((ATOFMSPeak)p).height, ((ATOFMSPeak)p).area, ((ATOFMSPeak)p).relArea, mzInt));			}		}		for(Peak peak : map.values()){			peaks.add(((ATOFMSPeak)peak).massToCharge + ", "					+ ((ATOFMSPeak)peak).area + ", " + ((ATOFMSPeak)peak).relArea					+ ", " + ((ATOFMSPeak)peak).height);		}				/*for(Peak peak : peakList){			peaks.add(peak.massToCharge + ", "					+ peak.area + ", " + peak.relArea					+ ", " + peak.height);		}*/		return peaks;		}//	***SLH 	     public String particleInfoDenseStr(DateFormat d) { 	             return  d.format(time) + ", " + laserPower + ", " + size + ", " + scatDelay + "," + filename.trim(); 	     }}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品视频一二三区| 日韩精品一二三四| 亚洲一区二区在线观看视频| 日韩国产欧美一区二区三区| 成人高清免费在线播放| 欧美一区二区三区在线观看视频| 国产精品私房写真福利视频| 久久精品免费看| 精品视频999| 亚洲乱码国产乱码精品精98午夜 | 亚洲免费av网站| 香蕉影视欧美成人| av男人天堂一区| 国产亚洲污的网站| 久久www免费人成看片高清| 一本大道久久a久久精品综合| 久久精品亚洲精品国产欧美kt∨| 亚州成人在线电影| 色欧美片视频在线观看在线视频| 国产日韩视频一区二区三区| 精品一区二区三区的国产在线播放 | 国产美女av一区二区三区| 在线电影欧美成精品| 洋洋成人永久网站入口| 色琪琪一区二区三区亚洲区| 亚洲视频1区2区| 白白色亚洲国产精品| 亚洲国产精品99久久久久久久久| 国产综合色精品一区二区三区| 欧美一级片在线观看| 爽好多水快深点欧美视频| 欧美日韩一区二区三区在线看| 一区二区三区四区不卡在线| 色婷婷亚洲精品| 亚洲综合在线电影| 在线视频你懂得一区二区三区| 一区二区三区在线视频免费| 色琪琪一区二区三区亚洲区| 亚洲成人免费在线| 91精品国产综合久久久久久久| 日日噜噜夜夜狠狠视频欧美人 | 国产成a人亚洲精品| 国产精品丝袜91| 91丝袜美腿高跟国产极品老师| 亚洲国产精品激情在线观看| 欧美日韩视频专区在线播放| 五月天婷婷综合| 欧美一二区视频| 国产美女主播视频一区| 中文字幕中文字幕一区二区| 色www精品视频在线观看| 亚洲激情六月丁香| 91精品国产综合久久精品| 麻豆国产精品官网| 欧美国产日韩亚洲一区| 91久久精品一区二区| 日韩国产在线一| 久久精品一二三| 欧美中文字幕一区二区三区亚洲| 日本成人在线网站| 欧美经典一区二区| 欧美性感一类影片在线播放| 青青草伊人久久| 国产日韩欧美精品一区| 在线视频你懂得一区二区三区| 欧美aaa在线| 国产精品久久久久久久久久久免费看 | 欧美成人精品1314www| 国产成人av电影在线| 一区二区三国产精华液| 精品久久久久久久久久久久久久久| 不卡一区二区在线| 午夜国产精品一区| 国产女主播视频一区二区| 欧美性色黄大片手机版| 国产精品亚洲第一| 午夜久久久久久| 国产精品乱码人人做人人爱| 6080yy午夜一二三区久久| av动漫一区二区| 亚洲精品va在线观看| 男人操女人的视频在线观看欧美| 国产精品久久毛片| 日韩欧美成人一区二区| 在线观看国产91| 国产91色综合久久免费分享| 日韩av在线免费观看不卡| 国产精品电影一区二区| 欧美电影免费观看高清完整版在线 | 亚洲成人黄色影院| 国产精品灌醉下药二区| 久久亚洲精品小早川怜子| 欧美男人的天堂一二区| 91国产视频在线观看| 国产成人欧美日韩在线电影| 久久精品99久久久| 午夜久久久久久久久久一区二区| 亚洲欧美激情小说另类| 亚洲国产精品精华液2区45| 欧美刺激脚交jootjob| 欧美美女直播网站| 色婷婷av一区二区三区软件| 亚洲国产精品t66y| 国产不卡视频在线播放| 一区二区三区精品视频| 日韩片之四级片| 成人免费视频国产在线观看| 一区二区三区蜜桃网| 欧美成人精品二区三区99精品| 国产成人av网站| 亚洲福利视频三区| 2020国产精品| 精品视频1区2区3区| 国产一区二区三区四区五区美女| 亚洲人快播电影网| 日韩免费在线观看| 91精品福利视频| 国产综合色产在线精品| 亚洲一区中文在线| 久久久久久久久久久99999| 欧美亚洲精品一区| 成人免费av资源| 美国av一区二区| 亚洲最大成人综合| 中文字幕精品一区二区精品绿巨人 | 中文字幕不卡在线| 国产精品色眯眯| 亚洲人精品午夜| 亚洲福利电影网| 免费高清在线视频一区·| 美日韩黄色大片| 国产精品中文字幕欧美| 成人动漫一区二区| 91行情网站电视在线观看高清版| 欧美自拍偷拍一区| 日韩三级精品电影久久久 | 欧美日本一道本| 日韩区在线观看| 国产精品久久久久久一区二区三区| 日韩毛片高清在线播放| 日韩极品在线观看| 国产一区二区91| 97久久久精品综合88久久| 欧美色偷偷大香| www国产成人| 一区二区三区四区在线免费观看| 亚洲成av人片一区二区三区| 久久99精品久久久久| www.亚洲人| 91精品在线免费观看| 国产日韩欧美精品一区| 一区二区三区精密机械公司| 久久爱www久久做| 色999日韩国产欧美一区二区| 欧美一区二区三区日韩视频| 国产精品久久久久aaaa| 婷婷久久综合九色综合绿巨人| 国产精品一卡二卡在线观看| 91成人国产精品| 久久久久国产一区二区三区四区| 亚洲精品国产精华液| 久色婷婷小香蕉久久| 在线视频观看一区| 久久中文娱乐网| 日韩国产在线观看一区| 99久久综合精品| 欧美成人三级在线| 亚洲国产成人tv| av欧美精品.com| 久久网站最新地址| 首页综合国产亚洲丝袜| 97久久精品人人澡人人爽| 精品免费日韩av| 日韩影院精彩在线| 91色综合久久久久婷婷| 国产女人18毛片水真多成人如厕| 日本特黄久久久高潮| 91免费在线看| 亚洲欧美在线视频| 国产成人综合在线| 欧美成人一区二区三区在线观看| 亚洲午夜免费电影| 99久久免费国产| 国产精品久久久久久久久久免费看| 久久99精品久久久久久国产越南| 51精品视频一区二区三区| 依依成人综合视频| 91日韩精品一区| 最新日韩av在线| 91在线精品一区二区三区| 国产欧美1区2区3区| 国产乱子轮精品视频| 欧美成va人片在线观看| 91成人免费在线视频| 26uuu精品一区二区| 极品少妇xxxx精品少妇| 欧美喷水一区二区| 日韩电影在线免费看| 69成人精品免费视频| 免费观看在线综合色|