/** @file RemoveNonLinAlgo.cpp @author Brian Magill @date 4/21/2008 $Date:$ $Revision:$ @copyright (©) Copyright 2006 by GATS Inc. 11864 Canon Blvd., Suite 101, Newport News, VA 23606 All Rights Reserved. No part of this software or publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise without the prior written permission of GATS Inc. @brief */ #include #include #include #include #include #include "SOFIE_namespace.h" #include "RemoveNonLinAlgo.h" #include "RemoveNonLin.h" #include "ChannelSignals.h" using namespace std; ChannelSignals RemoveNonLinAlgo::operator()(std::valarray const &time, ChannelSignals const &in, double strong_coef, double weak_coef) const { int gasId = in.getID(); double strong_atten = in.getAttenuation(SOFIE::Strong); double weak_atten = in.getAttenuation(SOFIE::Weak); std::valarray strong = in.getSignal(SOFIE::Strong); std::valarray weak = in.getSignal(SOFIE::Weak); std::valarray diff = in.getSignal(SOFIE::Diff); RemoveNonLin correctStrong(strong_coef, labGain); RemoveNonLin correctWeak(weak_coef, labGain); strong = correctStrong(strong_atten, strong); weak = correctWeak(weak_atten, weak); return ChannelSignals(gasId, strong_atten, weak_atten, strong, weak, diff); }