comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: Re: Need help with an Iterative solution in IDL (relative newb question)

Re: Need help with an Iterative solution in IDL (relative newb question)
type: item
description: Matt, this isn't anywhere near enough information to provide a coherent and meaningful answer. - What exactly are you trying to do? - What have you tried? - What bits of code are working and not? Cheers, Brian ------------------------------------------------------------ -------------- Brian Larsen Boston University Center for Space Physics http://people.bu.edu/balarsen/Home/IDL
creator: Brian Larsen
date: 2008-08-14T18:50:30-00:00

Re: Need help with an Iterative solution in IDL (relative newb question)
type: item
description: On Aug 14, 11:50 am, Brian Larsen <balar...@gmail.com> wrote: > Matt, > > this isn't anywhere near enough information to provide a coherent and > meaningful answer. > > - What exactly are you trying to do? > - What have you tried? > - What bits of code are working and not? > > Cheers, > > Brian > > ------------------------------------------------------------ -------------- > Brian Larsen > Boston University > Center for Space Physicshttp://people.bu.edu/balarsen/Home/IDL Guess I should be more specific then :) Here is my code (non iterative): a= 3.6e007 ; area of region in meters^2 o= (60*!pi/180) ; fault dip angle in degrees c= 6e-003 ; scaling factor t= 50e003 ; elastic lithosphere thickness in meters v= (a*t) ; volume of region in meters^3 x= 5e003 ; depth of faulting in meters, 5-7km for normal faults, ~30km for thrust faults h= (x/sin(o)) ; depth of faulting in meters u= 3 ; fault aspect ratio: Length/Height(down dip) = 2 or 3 kns=(sin(o)*cos(o)/v) ; horizontal normal strain constant for small faults knl=(c*cos(o)*x^2/v/sin(o)) ; horizontal normal strain constant for large faults kvs=(-sin(o)*cos(o)/v) ; vertical normal strain constant for small faults kvl=(-cos(o)/v) ; vertical normal strain constant for large faults ind_small = where(ar_plan[1,*] lt 2*x) ; select faults such that L < 2x ind_large = where(ar_plan[1,*] ge 2*x) ; select faults such that L > 2x ar_plan_small = ar_plan[*,ind_small] ; place in matrice with identifer ar_plan_large = ar_plan[*,ind_large] ; place in matrice with identifer lc_small= ar_plan_small[1,*] ; select only lengths to sum for small faults lc_large= ar_plan_large[1,*] ; select only lengths to sum for large faults tl_small = total(lc_small^3) ; sum lengths according to kostrov summation, small faults tl_large = total(lc_large) ; sum lengths according to kostrov summation, large faults ens= (kns*c/u)*tl_small ; horizontal normal strain for small faults enl= knl*tl_large ; horizontal normal strain for large faults e_t= ens+enl ; to…
creator: mbweller
date: 2008-08-14T19:56:43-00:00

Re: Need help with an Iterative solution in IDL (relative newb question)
type: item
description: On Aug 14, 9:56 am, mbwel...@gmail.com wrote: > On Aug 14, 11:50 am, Brian Larsen <balar...@gmail.com> wrote: > > > >> Matt, > >> this isn't anywhere near enough information to provide a coherent and >> meaningful answer. > >> - What exactly are you trying to do? >> - What have you tried? >> - What bits of code are working and not? > >> Cheers, > >> Brian > >> ------------------------------------------------------------ -------------- >> Brian Larsen >> Boston University >> Center for Space Physicshttp://people.bu.edu/balarsen/Home/IDL > > Guess I should be more specific then :) > > Here is my code (non iterative): > a= 3.6e007 ; area of region in meters^2 > o= (60*!pi/180) ; fault dip angle in degrees > c= 6e-003 ; scaling factor > t= 50e003 ; elastic lithosphere thickness in meters > v= (a*t) ; volume of region in meters^3 > x= 5e003 ; depth of faulting in meters, 5-7km for normal > faults, ~30km for thrust faults > > h= (x/sin(o)) ; depth of faulting in meters > u= 3 ; fault aspect ratio: Length/Height(down dip) > = 2 or 3 > kns=(sin(o)*cos(o)/v) ; horizontal normal strain constant for small > faults > knl=(c*cos(o)*x^2/v/sin(o)) ; horizontal normal strain > constant for large faults > kvs=(-sin(o)*cos(o)/v) ; vertical normal strain constant for small > faults > kvl=(-cos(o)/v) ; vertical normal strain constant for large > faults > > ind_small = where(ar_plan[1,*] lt 2*x) ; select faults such that L > < 2x > ind_large = where(ar_plan[1,*] ge 2*x) ; select faults such that L> 2x > > ar_plan_small = ar_plan[*,ind_small] ; place in matrice with > identifer > ar_plan_large = ar_plan[*,ind_large] ; place in matrice with > identifer > lc_small= ar_plan_small[1,*] ; select only lengths to sum for > small faults > lc_large= ar_plan_large[1,*] ; select only lengths to sum for > large faults > tl_small = total(lc_small^3) ; sum lengths according to > kostrov summation, small faults > tl_large = total(lc_large) ; sum lengths according to kostrov > summation, large faults > …
creator: Chris[6]
date: 2008-08-14T21:20:18-00:00

Re: Need help with an Iterative solution in IDL (relative newb question)
type: item
description: On Aug 14, 2:20 pm, Chris <beaum...@ifa.hawaii.edu> wrote: > On Aug 14, 9:56 am, mbwel...@gmail.com wrote: > > > >> On Aug 14, 11:50 am, Brian Larsen <balar...@gmail.com> wrote: > >>> Matt, > >>> this isn't anywhere near enough information to provide a coherent and >>> meaningful answer. > >>> - What exactly are you trying to do? >>> - What have you tried? >>> - What bits of code are working and not? > >>> Cheers, > >>> Brian > >>> ------------------------------------------------------------ -------------- >>> Brian Larsen >>> Boston University >>> Center for Space Physicshttp://people.bu.edu/balarsen/Home/IDL > >> Guess I should be more specific then :) > >> Here is my code (non iterative): >> a= 3.6e007 ; area of region in meters^2 >> o= (60*!pi/180) ; fault dip angle in degrees >> c= 6e-003 ; scaling factor >> t= 50e003 ; elastic lithosphere thickness in meters >> v= (a*t) ; volume of region in meters^3 >> x= 5e003 ; depth of faulting in meters, 5-7km for normal >> faults, ~30km for thrust faults > >> h= (x/sin(o)) ; depth of faulting in meters >> u= 3 ; fault aspect ratio: Length/Height(down dip) >> = 2 or 3 >> kns=(sin(o)*cos(o)/v) ; horizontal normal strain constant for small >> faults >> knl=(c*cos(o)*x^2/v/sin(o)) ; horizontal normal strain >> constant for large faults >> kvs=(-sin(o)*cos(o)/v) ; vertical normal strain constant for small >> faults >> kvl=(-cos(o)/v) ; vertical normal strain constant for large >> faults > >> ind_small = where(ar_plan[1,*] lt 2*x) ; select faults such that L >> < 2x >> ind_large = where(ar_plan[1,*] ge 2*x) ; select faults such that L> 2x > >> ar_plan_small = ar_plan[*,ind_small] ; place in matrice with >> identifer >> ar_plan_large = ar_plan[*,ind_large] ; place in matrice with >> identifer >> lc_small= ar_plan_small[1,*] ; select only lengths to sum for >> small faults >> lc_large= ar_plan_large[1,*] ; select only lengths to sum for >> large faults >> tl_small = total(lc_small^3) ; sum lengths according to >> kostrov summati…
creator: mbweller
date: 2008-08-15T00:45:09-00:00

Re: Need help with an Iterative solution in IDL (relative newb question)
type: item
description: On Aug 14, 2:45 pm, mbwel...@gmail.com wrote: > On Aug 14, 2:20 pm, Chris <beaum...@ifa.hawaii.edu> wrote: > > > >> On Aug 14, 9:56 am, mbwel...@gmail.com wrote: > >>> On Aug 14, 11:50 am, Brian Larsen <balar...@gmail.com> wrote: > >>>> Matt, > >>>> this isn't anywhere near enough information to provide a coherent and >>>> meaningful answer. > >>>> - What exactly are you trying to do? >>>> - What have you tried? >>>> - What bits of code are working and not? > >>>> Cheers, > >>>> Brian > >>>> ------------------------------------------------------------ -------------- >>>> Brian Larsen >>>> Boston University >>>> Center for Space Physicshttp://people.bu.edu/balarsen/Home/IDL > >>> Guess I should be more specific then :) > >>> Here is my code (non iterative): >>> a= 3.6e007 ; area of region in meters^2 >>> o= (60*!pi/180) ; fault dip angle in degrees >>> c= 6e-003 ; scaling factor >>> t= 50e003 ; elastic lithosphere thickness in meters >>> v= (a*t) ; volume of region in meters^3 >>> x= 5e003 ; depth of faulting in meters, 5-7km for normal >>> faults, ~30km for thrust faults > >>> h= (x/sin(o)) ; depth of faulting in meters >>> u= 3 ; fault aspect ratio: Length/Height(down dip) >>> = 2 or 3 >>> kns=(sin(o)*cos(o)/v) ; horizontal normal strain constant for small >>> faults >>> knl=(c*cos(o)*x^2/v/sin(o)) ; horizontal normal strain >>> constant for large faults >>> kvs=(-sin(o)*cos(o)/v) ; vertical normal strain constant for small >>> faults >>> kvl=(-cos(o)/v) ; vertical normal strain constant for large >>> faults > >>> ind_small = where(ar_plan[1,*] lt 2*x) ; select faults such that L >>> < 2x >>> ind_large = where(ar_plan[1,*] ge 2*x) ; select faults such that L> 2x > >>> ar_plan_small = ar_plan[*,ind_small] ; place in matrice with >>> identifer >>> ar_plan_large = ar_plan[*,ind_large] ; place in matrice with >>> identifer >>> lc_small= ar_plan_small[1,*] ; select only lengths to sum for >>> small faults >>> lc_large= ar_plan_large[1,*] ; select only lengths to sum for…
creator: Chris[6]
date: 2008-08-15T02:25:43-00:00

Re: Need help with an Iterative solution in IDL (relative newb question)
type: item
description: Chris writes: > Posting it here > actually makes me feel a little dirty. I hope David Fanning doesn't > see it... I saw it, but since this case looks hopeless anyway, this is unlikely to be the cause of death. :-) Cheers, David -- David Fanning, Ph.D. Fanning Software Consulting, Inc. Coyote's Guide to IDL Programming: http://www.dfanning.com/ Sepore ma de ni thui. ("Perhaps thou speakest truth.")
creator: David Fanning
date: 2008-08-15T02:55:02-00:00

Re: Need help with an Iterative solution in IDL (relative newb question)
type: item
description: On Aug 14, 7:25 pm, Chris <beaum...@ifa.hawaii.edu> wrote: > On Aug 14, 2:45 pm, mbwel...@gmail.com wrote: > > > >> On Aug 14, 2:20 pm, Chris <beaum...@ifa.hawaii.edu> wrote: > >>> On Aug 14, 9:56 am, mbwel...@gmail.com wrote: > >>>> On Aug 14, 11:50 am, Brian Larsen <balar...@gmail.com> wrote: > >>>> > Matt, > >>>> > this isn't anywhere near enough information to provide a coherent and >>>> > meaningful answer. > >>>> > - What exactly are you trying to do? >>>> > - What have you tried? >>>> > - What bits of code are working and not? > >>>> > Cheers, > >>>> > Brian > >>>> > ------------------------------------------------------------ -------------- >>>> > Brian Larsen >>>> > Boston University >>>> > Center for Space Physicshttp://people.bu.edu/balarsen/Home/IDL > >>>> Guess I should be more specific then :) > >>>> Here is my code (non iterative): >>>> a= 3.6e007 ; area of region in meters^2 >>>> o= (60*!pi/180) ; fault dip angle in degrees >>>> c= 6e-003 ; scaling factor >>>> t= 50e003 ; elastic lithosphere thickness in meters >>>> v= (a*t) ; volume of region in meters^3 >>>> x= 5e003 ; depth of faulting in meters, 5-7km for normal >>>> faults, ~30km for thrust faults > >>>> h= (x/sin(o)) ; depth of faulting in meters >>>> u= 3 ; fault aspect ratio: Length/Height(down dip) >>>> = 2 or 3 >>>> kns=(sin(o)*cos(o)/v) ; horizontal normal strain constant for small >>>> faults >>>> knl=(c*cos(o)*x^2/v/sin(o)) ; horizontal normal strain >>>> constant for large faults >>>> kvs=(-sin(o)*cos(o)/v) ; vertical normal strain constant for small >>>> faults >>>> kvl=(-cos(o)/v) ; vertical normal strain constant for large >>>> faults > >>>> ind_small = where(ar_plan[1,*] lt 2*x) ; select faults such that L >>>> < 2x >>>> ind_large = where(ar_plan[1,*] ge 2*x) ; select faults such that L> 2x > >>>> ar_plan_small = ar_plan[*,ind_small] ; place in matrice with >>>> identifer >>>> ar_plan_large = ar_plan[*,ind_large] ; place in matrice with >>>> identifer >>>> lc_small= ar_plan_small[1,…
creator: mbweller
date: 2008-08-15T04:54:45-00:00

Re: Need help with an Iterative solution in IDL (relative newb question)
type: item
description: On Aug 14, 6:54 pm, mbwel...@gmail.com wrote: > On Aug 14, 7:25 pm, Chris <beaum...@ifa.hawaii.edu> wrote: > >> On Aug 14, 2:45 pm, mbwel...@gmail.com wrote: > >>> On Aug 14, 2:20 pm, Chris <beaum...@ifa.hawaii.edu> wrote: > >>>> On Aug 14, 9:56 am, mbwel...@gmail.com wrote: > >>>> > On Aug 14, 11:50 am, Brian Larsen <balar...@gmail.com> wrote: > >>>> > > Matt, > >>>> > > this isn't anywhere near enough information to provide a coherent and >>>> > > meaningful answer. > >>>> > > - What exactly are you trying to do? >>>> > > - What have you tried? >>>> > > - What bits of code are working and not? > >>>> > > Cheers, > >>>> > > Brian > >>>> > > ------------------------------------------------------------ -------------- >>>> > > Brian Larsen >>>> > > Boston University >>>> > > Center for Space Physicshttp://people.bu.edu/balarsen/Home/IDL > >>>> > Guess I should be more specific then :) > >>>> > Here is my code (non iterative): >>>> > a= 3.6e007 ; area of region in meters^2 >>>> > o= (60*!pi/180) ; fault dip angle in degrees >>>> > c= 6e-003 ; scaling factor >>>> > t= 50e003 ; elastic lithosphere thickness in meters >>>> > v= (a*t) ; volume of region in meters^3 >>>> > x= 5e003 ; depth of faulting in meters, 5-7km for normal >>>> > faults, ~30km for thrust faults > >>>> > h= (x/sin(o)) ; depth of faulting in meters >>>> > u= 3 ; fault aspect ratio: Length/Height(down dip) >>>> > = 2 or 3 >>>> > kns=(sin(o)*cos(o)/v) ; horizontal normal strain constant for small >>>> > faults >>>> > knl=(c*cos(o)*x^2/v/sin(o)) ; horizontal normal strain >>>> > constant for large faults >>>> > kvs=(-sin(o)*cos(o)/v) ; vertical normal strain constant for small >>>> > faults >>>> > kvl=(-cos(o)/v) ; vertical normal strain constant for large >>>> > faults > >>>> > ind_small = where(ar_plan[1,*] lt 2*x) ; select faults such that L >>>> > < 2x >>>> > ind_large = where(ar_plan[1,*] ge 2*x) ; select faults such that L> 2x > >>>> > ar_plan_small = ar_plan[*,ind_small] ; place in matrice with >>>>…
creator: Chris[6]
date: 2008-08-15T07:54:05-00:00

Re: Need help with an Iterative solution in IDL (relative newb question)
type: item
description: > ind_small = where(ar_plan[1,*] lt 2*x,count) ; select faults such > if count ge 0 then ar_plan_small=ar_plan[*,ind_small] else > but I'm still getting the same error, I'm sure I have the syntax > wrong. Unfortunately I'm not quite at the level to trouble shoot this > myself, confidently. well, this is a very easy problem indeed, that every beginner can solve. Read your code and think of what it does. 1) where(..., count). So, if you have 1 valid subscript, what should the value of count be? What if you have NO valid subscript? Could 'count' be negative? 2) if count ge 0. So you deal with 0 or positive values. Again, what does a count of 0 mean? 3) ar_plan[*,ind] What would it do if count = 0 (and therefore ind = -1) Jean
creator: Jean H.
date: 2008-08-15T16:44:53-00:00