This file is indexed.

/usr/lib/python2.7/dist-packages/gastablesgui/FannoFlow.py is in gastables 0.3-2.2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
"""
 * Copyright (C) 2008 Varun Hiremath.
 * Copyright (C) 2008 A Venkattraman.
 * Copyright (C) 2008 C Shyam Sundar.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * Authors: Varun Hiremath, Venkattraman A, Shyam Sundar C

"""


from gastables.FannoFlow import FannoFlow
from scipy import arange

def get_allValues_from_M(M, gamma):
    fanno = FannoFlow(gamma)
    VALUES = {}
    VALUES["M"] = M
    VALUES["P/Pstar"] = fanno.get_P_by_Pstar_from_M(M)
    VALUES["T/Tstar"] = fanno.get_T_by_Tstar_from_M(M)
    VALUES["rho/rhostar"] = fanno.get_rho_by_rhostar_from_M(M)
    VALUES["Po/Postar"] = fanno.get_Po_by_Postar_from_M(M)
    VALUES["F/Fstar"] = fanno.get_F_by_Fstar_from_M(M)
    VALUES["4fLmax/D"] = fanno.get_4fLmax_by_D_from_M(M)

    return VALUES


def get_allValues_from_P_by_Pstar(P_by_Pstar,gamma):
	fanno = FannoFlow(gamma)
	return get_allValues_from_M(fanno.get_M_from_P_by_Pstar(P_by_Pstar),gamma)

def get_allValues_from_rho_by_rhostar(rho_by_rhostar,gamma):
	fanno = FannoFlow(gamma)
	return get_allValues_from_M(fanno.get_M_from_rho_by_rhostar(rho_by_rhostar),gamma)

def get_allValues_from_T_by_Tstar(T_by_Tstar,gamma):
	fanno = FannoFlow(gamma)
	return get_allValues_from_M(fanno.get_M_from_T_by_Tstar(T_by_Tstar),gamma)

def get_allValues_from_Po_by_Postar(Po_by_Postar,gamma):
	fanno = FannoFlow(gamma)
    	VALUES = {}
    	SECOND_VALUES = None
    	Mach_Nos = fanno.get_M_from_Po_by_Postar(Po_by_Postar)
	
    	if(type(Mach_Nos) == tuple):
		M1 = Mach_Nos[0]
		M2 = Mach_Nos[1]
		VALUES = get_allValues_from_M(M1, gamma)
		SECOND_VALUES = get_allValues_from_M(M2, gamma)
    	else:
		VALUES = get_allValues_from_M(Mach_Nos, gamma)

    	return VALUES, SECOND_VALUES
	
def get_allValues_from_F_by_Fstar(F_by_Fstar,gamma):
	fanno = FannoFlow(gamma)
    	VALUES = {}
    	SECOND_VALUES = None
    	Mach_Nos = fanno.get_M_from_F_by_Fstar(F_by_Fstar)
	
    	if(type(Mach_Nos) == tuple):
		M1 = Mach_Nos[0]
		M2 = Mach_Nos[1]
		VALUES = get_allValues_from_M(M1, gamma)
		SECOND_VALUES = get_allValues_from_M(M2, gamma)
    	else:
		VALUES = get_allValues_from_M(Mach_Nos, gamma)

    	return VALUES, SECOND_VALUES

def get_allValues_from_4fLmax_by_D(temp,gamma):
	fanno = FannoFlow(gamma)
    	VALUES = {}
    	SECOND_VALUES = None
    	Mach_Nos = fanno.get_M_from_4fLmax_by_D(temp)
	
    	if(type(Mach_Nos) == tuple):
		M1 = Mach_Nos[0]
		M2 = Mach_Nos[1]
		VALUES = get_allValues_from_M(M1, gamma)
		SECOND_VALUES = get_allValues_from_M(M2, gamma)
    	else:
		VALUES = get_allValues_from_M(Mach_Nos, gamma)

    	return VALUES, SECOND_VALUES

def get_plotData_from_M(gamma):
    MRange = arange(0.1,5.01,0.1)
    VALUES = {"M" : MRange, "P/Pstar" : [], "rho/rhostar": [], "T/Tstar" : [], "Po/Postar" : [], "F/Fstar" : [], "4fLmax/D" : [] }
    fanno = FannoFlow(gamma)
    
    for M in MRange:
        VALUES["P/Pstar"].append(fanno.get_P_by_Pstar_from_M(M))
        VALUES["T/Tstar"].append(fanno.get_T_by_Tstar_from_M(M))
	VALUES["rho/rhostar"].append(fanno.get_rho_by_rhostar_from_M(M))
        VALUES["Po/Postar"].append(fanno.get_Po_by_Postar_from_M(M))
        VALUES["F/Fstar"].append(fanno.get_F_by_Fstar_from_M(M))
	VALUES["4fLmax/D"].append(fanno.get_4fLmax_by_D_from_M(M))
    return VALUES