GWtool
Gravitational-wave tool
 All Classes Files Functions Variables Pages
gw_eta2q.f90
Go to the documentation of this file.
1 !> \file gw_eta2q.f90 Compute the symmetric mass ratio eta from the asymmetric mass ratio q
2 
3 !
4 ! GWtool: Simple tools for working with gravitational waves
5 ! http://gwtool.sourceforge.net/
6 !
7 !
8 ! Copyright 2007-2013 AstroFloyd - astrofloyd.org
9 !
10 !
11 ! This file is part of GWtool.
12 !
13 ! GWtool is free software: you can redistribute it and/or modify
14 ! it under the terms of the GNU General Public License as published by
15 ! the Free Software Foundation, either version 3 of the License, or
16 ! (at your option) any later version.
17 !
18 ! GWtool is distributed in the hope that it will be useful,
19 ! but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ! GNU General Public License for more details.
22 !
23 ! You should have received a copy of the GNU General Public License
24 ! along with GWtool. If not, see <http://www.gnu.org/licenses/>.
25 
26 
27 
28 !***********************************************************************************************************************************
29 !> \brief Compute the symmetric mass ratio eta from the asymmetric mass ratio q
30 
31 program gw_eta2q
32  use sufr_kinds, only: double
33  use sufr_system, only: syntax_quit
34 
35  implicit none
36  real(double) :: eta, q,x
37  character :: tmpstr*(99)
38 
39  if(command_argument_count().eq.1) then
40  call get_command_argument(1,tmpstr)
41  read(tmpstr,*) eta
42  else
43  call syntax_quit('<eta>', 0, 'This program computes the symmetric mass ratio eta from the asymmetric mass ratio q')
44  end if
45 
46  x = sqrt( max(min( 1.d0 - 4*eta,1.d0 ),0.d0) )
47  q = (1.d0 - x) / (1.d0 + x)
48 
49  write(6,'(/,A,F15.8,/)') ' q: ', q
50 
51 end program gw_eta2q
52 !***********************************************************************************************************************************
53 
program gw_eta2q
Compute the symmetric mass ratio eta from the asymmetric mass ratio q.
Definition: gw_eta2q.f90:31