* arts-2-1-603

* src/matpack.h:

Include cmath before applying the isnan-isinf-fix for GCC C++11.

git-svn-id: https://www.sat.ltu.se/svn/rt/arts/trunk@8380 aaf1aab0-4228-0410-ad68-8dceda47f409
2013-04-26  Patrick Eriksson  <patrick.eriksson@chalmers.se>

            * arts-2-1-604

            * src/m_cloudradar.cc:
            * src/m_fos.cc:

            * src/m_transmitter.cc:
            * src/m_rte.cc: Adopted all calls of get_ppath_abs.

            * src/rte.cc (get_ppath_abs): Introduced only_sum_abs. This flag
            can be set to true when only summed absorption is needed, that in
            some cases will save considerable amount of memory. Cases where
            this flag must be false is when abs_species jacobians are
            calculated, "abs per species" is aux output and when Faraday is
            aux output.

            * src/rte.cc (get_ppath_trans): Removed obselete comment about
            Faraday.

            * src/m_fos.cc: Further work on reimplementation ...



git-svn-id: https://www.sat.ltu.se/svn/rt/arts/trunk@8381 aaf1aab0-4228-0410-ad68-8dceda47f409
* arts-2-1-605

* src/continua.{cc,h}:

Move definition of constant variables with model data to .cc file.
Reduces header file size by 200kB.

git-svn-id: https://www.sat.ltu.se/svn/rt/arts/trunk@8383 aaf1aab0-4228-0410-ad68-8dceda47f409
* arts-2-1-606

* src/linerecord.{cc,h}:

Added.  Move LineRecord class from absorption.{cc,h} into its own file.
It's a large class and absorption.{h,cc} became very cluttered.
Also moved all method documentation from the cc into the header file.

(LineRecord::ReadFromHitranStream): Rename to ReadFromHitran2001Stream
to be consistent with ReadFromHitran2004Stream.

* src/m_abs.cc (abs_linesReadFromHitranPre2004):
Call lr.ReadFromHitran2001Stream.

* src/absorption.{cc,h}: Remove LineRecord class. Remove unnecessary
includes. Include linerecord.h.

* src/mystring.h:

Moved extract helper function from absorption.cc to here. It is not
specific to absorption and might be handy for other cases.

* src/CMakeLists.txt: Add linerecord.cc to artscore.

git-svn-id: https://www.sat.ltu.se/svn/rt/arts/trunk@8384 aaf1aab0-4228-0410-ad68-8dceda47f409
2013-04-26  Patrick Eriksson  <patrick.eriksson@chalmers.se>

            * arts-2-1-607

            * src/m_fos.cc: Extended, but still not complete. 

            * src/methods.cc: GIN for sensor_responseBackendFrequencySwitching
            had inconsistent names.

            * src/workspace.cc: Introduced fos_scatint_angles and
              fos_iyin_za_angles.



git-svn-id: https://www.sat.ltu.se/svn/rt/arts/trunk@8386 aaf1aab0-4228-0410-ad68-8dceda47f409
* arts-2-1-608

* src/matpack.h: Remove 'using namespace std;' from header. It is bad
practice because it pollutes the global namespace of every file it is
included by. Removing it here makes at least matpack behave nicely.
Still present in arts.h.

* src/array.h src/complex.{cc,h}, src/exceptions.h, src/fastem.cc,
src/file.h, src/gridded_fields.{cc,h}, src/make_array.h,
src/matpack*.{cc,h}, src/mystring.h, src/rational.{cc,h},
src/sourcetext.{cc,h}:

In header files, add prefix std:: to all entities from the std
namespace.

In cc files, it is ok(ish) to use 'using namespace std;'. But it is
preferable to only import what is actually used. This can be done at
the beginning of the file after the include directives,
e.g. 'using std::runtime_error;'.

* src/sourcetext.cc (operator<<): Write to os not cout.

* src/jacobian.h (RetrievalQuantity):

Remove unneeded copy constructor.

Change type of grids argument in constructor from MakeArray<Vector> to
ArrayOfVector.

* src/m_jacobian.cc: Remove unnecessary assignments of
RetrievalQuantity() in variable definitions.

git-svn-id: https://www.sat.ltu.se/svn/rt/arts/trunk@8388 aaf1aab0-4228-0410-ad68-8dceda47f409
* arts-2-1-609

* src/test_complex.cc, src/test_gridded_fields.cc, src/test_linalg.cc
src/test_matpack.cc, src/test_tensor.cc:

Forgot to fix the test_* files in previous commit.

* src/describe.{cc,h}: Use our String class instead of the standard
string. Good example for a type error that went unnoticed before
because std::string was visible everywhere although we don't want to
use it.

git-svn-id: https://www.sat.ltu.se/svn/rt/arts/trunk@8389 aaf1aab0-4228-0410-ad68-8dceda47f409
2013-04-28  Patrick Eriksson  <patrick.eriksson@chalmers.se>

            * arts-2-1-610

            * src/m_fos.cc: A complete version. So far only 1D only, and just
            a few rudimentary checks made.

            * src/doit.h: Included rte_step_doit.

            * src/doit.cc (rte_step_doit): Removed some inactive old lines.



git-svn-id: https://www.sat.ltu.se/svn/rt/arts/trunk@8390 aaf1aab0-4228-0410-ad68-8dceda47f409
* arts-2-1-611

* src/matpack*.{h,cc}:

(Sparse):
Don't use pointer variables for the members mdata, mrowind and
mcolptr.
Several advantages: No custom memory management needed -> Copy
constructor, copy assignment operator and destructor removed. Code is
much more readable.
(mult, transpose): Non-const iterators were used to loop over elements
of the const input parameter.

(*Iterator*):
Remove copy constructor from all Iterator classes. The implicit one
generated by the compiler does just fine. And in C++11 the
presence of a custom copy constructor will prevent the generation of
an implicit move constructor. Might give better performance.

(Vector, Matrix, TensorX):
Change the argument type of the assignment operator from a const
reference to a call by value. This way, we can let the copy
constructor do the work instead of duplicating its initialization code
in the assignment op. Additionally, with this implementation, the copy
assignment operator will also work as a move assignment operator in
C++11. And this implementation is exception safe. With the previous
one, if the copy operation failed, the current object was left in an
undetermined state.
Add swap function to swap two objects.

* src/xml_io_basic_types.cc: Adapt for Sparse changes.

* src/matpack.h: Include debug.h

* src/debug.h: Include iostream, add some std::.

* controlfiles/instruments/odinsmr/yREFERENCE*.xml: Add ref values.

* controlfiles/instruments/odinsmr/TestOdinSMR*.arts:

Compare y against reference.

* src/m_fos.cc (fos):

Add explicit cast to Numeric for 'nin' in division to silence compiler
warning.

git-svn-id: https://www.sat.ltu.se/svn/rt/arts/trunk@8391 aaf1aab0-4228-0410-ad68-8dceda47f409
* arts-2-1-611

* src/lineshapes.cc: Made the lorentz function slower by calculating the
phase shape function as well, which is necessary for Zeeman and line mixing.

* src/absorption.cc (xsec_species_line_mixing_2nd_order): Fixed error in the
mathematics that ignored the first-order line-mixing. Also, it only accepts
calculations if the specified line-shape returns the phase, as this is 
necessary for line-mixing. Also, now takes data in SI units. The data
will soon be added to arts-xml-data.

-- This line, and those below, will be ignored--

M    ChangeLog
M    src/lineshapes.cc
M    src/absorption.cc


git-svn-id: https://www.sat.ltu.se/svn/rt/arts/trunk@8392 aaf1aab0-4228-0410-ad68-8dceda47f409
	* arts-2-611

	src/m_sensor.cc: removed the check if the f)grid is inside the sensor_reponse_function. This is apparentky obsolete. 

	The following lines were removed.
	
     	else // Finding the minimum or maximum will result in assertion if empty
    { 
      // We allow f_backend to be unsorted, but must be inside sensor_response_f_grid
      if( min(f_backend) < min(sensor_response_f_grid) )
        {
          os << "At least one value in *f_backend* (" << min(f_backend) 
             << ") below range\ncovered by *sensor_response_f_grid* ("
             << min(sensor_response_f_grid) << ").\n";
          error_found = true;
        }
      if( max(f_backend) > max(sensor_response_f_grid) )
        {
          os << "At least one value in *f_backend* (" << max(f_backend) 
             << ") above range\ncovered by *sensor_response_f_grid* ("
             << max(sensor_response_f_grid) << ").\n";
          error_found = true;
        }
    }


git-svn-id: https://www.sat.ltu.se/svn/rt/arts/trunk@8393 aaf1aab0-4228-0410-ad68-8dceda47f409
* arts-2-1-614

* ChangeLog: Fix version numbers in previous two commits.

git-svn-id: https://www.sat.ltu.se/svn/rt/arts/trunk@8394 aaf1aab0-4228-0410-ad68-8dceda47f409
2013-04-29  Patrick Eriksson  <patrick.eriksson@chalmers.se>

            * arts-2-1-615

            * src/m_rte.cc (iyEmissionStandard): Added Transmission as aux var.

            * src/methods.cc: Polishing of escription of Transmission and
            Optical dept aux variables

            * ChangeLog: Slight edit of message for 2-1-613 to make clear that
            the comment refers to a specific method, and not generally for the
            file.



git-svn-id: https://www.sat.ltu.se/svn/rt/arts/trunk@8395 aaf1aab0-4228-0410-ad68-8dceda47f409
	* arts-2-1-616

	* Implemented frequency interpolation in lookup table extraction,
	to allow for more elegant Doppler shift treatment.

        * src/gas_abs_lookup.{h,cc}
	(GasAbsLookup:fgp_default): Added this new member, which holds the
	trivial frequency grid positions (without frequency interpolation).
	(GasAbsLookup::Adapt): Initialize fgp_default.
	(GasAbsLookup::Extract): Implemented frequency
	interpolation. Required significant reorganization. The new
	philosophy is to first determine grid positions for all
	dimensions, including trivial grid positions in case a dimension
	should not be interpolated. Then the code for the interpolation
	itself (calculate weights and interpolate) can be the same for all
	cases. So, overall messiness somewhat reduced.

        * src/rte.cc
	(get_ppath_abs): Get rid of rtp_doppler, directly pass ppath_f
	to propmat_clearsky_agendaExecute.
	(get_ppath_f): Inverted the sign of the Doppler shift. For
	absorption features to shift to higher frequencies, the
	calculation grid for the absorption calculation has to be shifted
	to lower frequencies. With this change, the TestWinds control file
	gives the same result as before. Patrick, please confirm my change.

        * src/montecarlo.cc: Adapted.

        * src/disort.cc: Adapted.

        * src/doit.cc: Adapted. Also removed or commented-out some cout
	command that seem to be old debugging remnants.

        * src/interpolation_poly.cc (gridpos_poly): Implemented nearest
	neighbour interpolation (interpolation order 0). This is very
	handy, because it can be used to make interpolation code robust to
	the case that a particular dimension should not be interpolated at all.

        * src/test_interpolation.cc: Test the new order 0 interpolation.

        * src/main.cc
	(arts_mod_time): Added "compiled" to give some
	indication what the date/time means.
	(main): Added a copy of the command line to the report output. My
	main reason is that I wanted see the name of the control file from
	the report file. But perhaps also useful to see what other
	switches were used.

        * src/workspace.cc (rtp_doppler): Removed. Bye-bye.

        * src/methods.cc (propmat_clearskyAddFromLookup)
	(propmat_clearskyAddOnTheFly, propmat_clearskyAddZeeman): Removed
	input argument rtp_doppler. Updated documentation.

        * src/agendas.cc (propmat_clearsky_agenda): Removed input argument
	rtp_doppler.

        * src/m_abs.cc (propmat_clearskyAddOnTheFly): Removed input argument
	rtp_doppler and code handling it.

        * src/m_zeeman.cc (propmat_clearskyAddZeeman): Removed input argument
	rtp_doppler and code handling it.

        * src/m_abs_lookup.cc
	(abs_lookupCalc): Initialize fgp_default.
	(propmat_clearskyAddFromLookup): Added input argument
	abs_f_interp_order. Considerably simplified the function itself,
	since more work is now done in GasAbsLookup::Extract.
	(abs_mat_fieldCalc): Adapted. Also renamed all
	ampsXXX variables back to absXXX. This method still takes Doppler
	shift as input (it is just used for plotting and testing purposes,
	where this is handy). It constructs a new frequency grid and
	calls propmat_clearsky_agendaExecute with it. A remark: It would
	make sense to get rid of the Stokes dimension in
	abs_mat_field. abs_mat_fieldCalc can anyway not handle effects
	that would cause polarization, so only the (1,1) element of the
	absorption matrix (propmat_clearsky) is of interest here. And then
	revert both to their old names (abs_field and abs_fieldCalc).
	(calc_lookup_error): Adapted.

        * controlfiles/artscomponents/absorption/TestAbsDoppler.arts:
	Adapted and tested.

        * controlfiles/artscomponents/doit/TestDOIT.arts: Cosmetics.

        * controlfiles/artscomponents/wfuns/TestWfuns.arts: Set
	abs_f_interp_order to 1, to avoid runtime error with wind
	Jacobians.



git-svn-id: https://www.sat.ltu.se/svn/rt/arts/trunk@8396 aaf1aab0-4228-0410-ad68-8dceda47f409
* arts-2-1-617

* src/m_rte.cc (iyMC):

Fix parallelization of frequency loop. There is no further
parallization in the MonteCarlo code, therefore it is best to
parallelize for nf>1 instead of nf>max_threads.

git-svn-id: https://www.sat.ltu.se/svn/rt/arts/trunk@8397 aaf1aab0-4228-0410-ad68-8dceda47f409