Skip to content

Commit

Permalink
Added constants to restrict column density and emissivity ranges.
Browse files Browse the repository at this point in the history
  • Loading branch information
lars2015 committed Jan 9, 2024
1 parent f9eb43a commit 174e2ff
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/jurassic.c
Original file line number Diff line number Diff line change
Expand Up @@ -5007,7 +5007,7 @@ void read_tbl(
continue;

/* Check ranges... */
if (u < 0 || u > UMAX || eps < 0 || eps > 1) {
if (u < UMIN || u > UMAX || eps < EPSMIN || eps > EPSMAX) {
nrange++;
continue;
}
Expand Down
15 changes: 15 additions & 0 deletions src/jurassic.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,16 @@
#define C2 1.43877506
#endif

/*! Minimum emissivity. */
#ifndef EPSMIN
#define EPSMIN 0
#endif

/*! Maximum emissivity. */
#ifndef EPSMAX
#define EPSMAX 1
#endif

/*! Standard gravity [m/s^2]. */
#ifndef G0
#define G0 9.80665
Expand Down Expand Up @@ -228,6 +238,11 @@
#define TSUN 5780.
#endif

/*! Minimum column density [molecules/cm^2]. */
#ifndef UMIN
#define UMIN 0
#endif

/*! Maximum column density [molecules/cm^2]. */
#ifndef UMAX
#define UMAX 1e30
Expand Down

0 comments on commit 174e2ff

Please sign in to comment.