#ifndef REMOVE_NONLINEARITY_4_18_2008 #define REMOVE_NONLINEARITY_4_18_2008 /** @class RemoveNonLin.h @author Brian Magill @creation date 4/18/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 Remove nonlinearity from a detector signal */ #include class RemoveNonLin { private: double nonlin_coef; double cal_gain; public: RemoveNonLin():nonlin_coef(0.0), cal_gain(0.0) { } RemoveNonLin(double nl, double gain = 0.83):nonlin_coef(nl), cal_gain(gain) { } RemoveNonLin(RemoveNonLin const &rhs): nonlin_coef(rhs.nonlin_coef), cal_gain(rhs.cal_gain) { } RemoveNonLin const & operator = (RemoveNonLin const &rhs) { if (this == &rhs) return *this; nonlin_coef = rhs.nonlin_coef; cal_gain = rhs.cal_gain; return *this; }; ~RemoveNonLin() { } std::valarray operator()(double gain, std::valarray const &in) const; }; #endif