This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <% | |
| require 'fort' | |
| TYPES\ | |
| = ::Fort::Type::Logical.multi_provide(dim: (1..7))\ | |
| + ::Fort::Type::Integer.multi_provide(dim: (1..7))\ | |
| + ::Fort::Type::Real.multi_provide(dim: (1..7))\ | |
| + ::Fort::Type::Complex.multi_provide(dim: (1..7))\ | |
| + ::Fort::Type::Character.multi_provide(dim: (1..7)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| subroutine conv_iso_s(x, y, z) | |
| ! z = x*y のコンボリューションを計算する. | |
| ! x, y, z 全てのサンプリング間隔が等しいことを暗に仮定している. | |
| ! さらに言えば,本当はdx倍すべきなのに,していない。 | |
| real, intent(in):: x(:), y(:) | |
| real, intent(out):: z(:) | |
| integer:: nx, ny, nz | |
| nx = size(x(:), 1) | |
| ny = size(y(:), 1) | |
| nz = size(z(:), 1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| import io | |
| import numpy | |
| import jinja2 | |
| import get_tick_configurations | |
| import answer_dat | |
| import moment_tensor |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy | |
| import moment_tensor | |
| class AnswerDat(object): | |
| """ | |
| If you update self.moment_rate_components, please run self.update_moment_rates(). | |
| """ | |
| def __init__(self, path='answer.dat'): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import unittest | |
| import plot_from | |
| class PlotFromTest(unittest.TestCase): | |
| def setUp(self): | |
| pass | |
| def test_mw_from_m0(self): | |
| self.assertAlmostEqual(plot_from.mw_from_m0(1), -9.1/1.5) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy | |
| class Mrtf(object): | |
| def __init__(self, rr, tt, ff, rt, rf, tf): | |
| self.rr = rr | |
| self.tt = tt | |
| self.ff = ff | |
| self.rt = rt | |
| self.rf = rf | |
| self.tf = tf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| program sac_lib_test | |
| use, intrinsic:: iso_fortran_env, only: INPUT_UNIT, OUTPUT_UNIT, ERROR_UNIT | |
| use:: sac_lib | |
| implicit none | |
| type(Sac):: w | |
| Real(kind = SAC_REAL_KIND), allocatable:: body(:) | |
| call set_iftype(w, 'itime') ! required |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #ifndef UTILS_HAVE_ALREADY_LOADED | |
| # define UTILS_HAVE_ALREADY_LOADED | |
| # define USE_UTILS_H use, intrinsic:: iso_fortran_env, only: ERROR_UNIT, OUTPUT_UNIT | |
| # define WHERE_AM_I __FILE__, " ", __LINE__ | |
| # ifdef __GFORTRAN__ | |
| # define quote(x) "x" | |
| # else | |
| # ifdef __INTEL_COMPILER | |
| # define quote(x) #x | |
| # else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #ifndef UTILS_HAVE_ALREADY_LOADED | |
| # define UTILS_HAVE_ALREADY_LOADED | |
| # define USE_UTILS_H use, intrinsic:: iso_fortran_env, only: ERROR_UNIT, OUTPUT_UNIT | |
| # define WHERE_AM_I __FILE__, " ", __LINE__ | |
| # ifdef __GFORTRAN__ | |
| # define quote(x) "x" | |
| # else | |
| # ifdef __INTEL_COMPILER | |
| # define quote(x) #x | |
| # else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module lib_util | |
| use, intrinsic:: iso_fortran_env, only: ERROR_UNIT | |
| implicit none | |
| private | |
| public:: check | |
| interface check | |
| module procedure check_without_value | |