<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1226" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>It is not working for me. It seems to add to it,
rather then set it.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I just put this at the top of the file
right?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2># lambda set</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>and it sets the options?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Regards,</FONT></DIV>
<DIV><FONT face=Arial size=2>Philip</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=farhi@ill.fr href="mailto:farhi@ill.fr">Emmanuel Farhi</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=pwilk@zenspider.com
href="mailto:pwilk@zenspider.com">pwilk@zenspider.com</A> ; <A
title=neutron-mc@risoe.dk
href="mailto:neutron-mc@risoe.dk">neutron-mc@risoe.dk</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, August 27, 2003 11:07
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [neutron-mc] Generate a source
spectra from exp. file</DIV>
<DIV><BR></DIV>Yes, there is a solution to use an experimental profile for the
simulation source.
<P>First position a normal source (Source_flat or Source_gen, or ...).
<BR>Then, you may use the Filter_gen component (in the optics) to read the
contents a a file, with options="lambda, set weight". Then the first column of
the table is assumed to be the wavelength, and the second should be the flux
to set. <BR>A rebinning/interpolation is done when loading the table. This
will set the weight of neutrons. You may also choose to multiply or add to the
existing weight. <BR>The Filter_gen (McStas v1.7) is a replacement to the old
Flux_adapter.
<P>Just look at the MCSTASLIB/optics/Filter_gen component (or 'mcdoc
Filter_gen').
<P>pwilk wrote:
<BLOCKQUOTE TYPE="CITE"><SPAN class=633424313-26082003><FONT
face=Arial><FONT color=#0000ff><FONT size=-1>Thanks for the quick reply!
I'll give that a go.I think you are right about the zero velocity
neutrons.</SPAN><SPAN class=633424313-26082003></SPAN><SPAN
class=633424313-26082003>I have another quick question for
you: </SPAN><SPAN class=633424313-26082003>Is there an easy way to
simulate a source from a 2D file of (measured) Intensity vs. Wavelength
?</SPAN><SPAN class=633424313-26082003></SPAN><SPAN
class=633424313-26082003>Cheers,</SPAN><SPAN
class=633424313-26082003>Philip</FONT></FONT></FONT></SPAN>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr><FONT face=Tahoma><FONT
size=-1>-----Original Message-----</FONT></FONT> <BR><FONT
face=Tahoma><FONT size=-1><B>From:</B> farhi@ill.fr [<A
href="mailto:farhi@ill.fr">mailto:farhi@ill.fr</A>]</FONT></FONT>
<BR><FONT face=Tahoma><FONT size=-1><B>Sent:</B> Tuesday, August 26, 2003
3:18 PM</FONT></FONT> <BR><FONT face=Tahoma><FONT size=-1><B>To:</B>
pwilk-radiochem@hahnium.com; neutron-mc@risoe.dk</FONT></FONT> <BR><FONT
face=Tahoma><FONT size=-1><B>Subject:</B> Re: sqrt: DOMAIN
error</FONT></FONT></DIV>Hy Philip,
<P>You probably have some zero velocity neutrons or such huge velocities
that the square gets hawfull (before getting the sqrt), else I can not
figure out how the 'sqrt' can fail in the speed in L_monitor.comp. <BR>You
may copy this component locally and change the line #76 so that it tests
the speed norm to be non zero or reasonable value (not huge).
<P>You may also try replacing with the Monitor_nD(options="auto lambda",
filename="...")
<P>Cheers, Emmanuel.
<P>Philip Wilk wrote:
<BLOCKQUOTE TYPE="CITE">Hi,
<P>I am using the new version 1.7
<P>I keep getting "sqrt: DOMAIN error"
<P>Just like I was getting with version 1.6.4 , should I be worried
about this? <BR>It seems to be associated with the wavelength detector
component.
<P>See example output:
<P>Detector: psd_begin_I=75.9887 psd_begin_ERR=0.0701353
<BR>psd_begin_N=3.65191e+06 "p <BR>sd1.dat" <BR>Detector:
lambda_begin_I=75.9887 lambda_begin_ERR=0.0701353
<BR>lambda_begin_N=3.651 <BR>91e+06 "erg1.dat" <BR>Detector:
psd_middle_I=6.2552 psd_middle_ERR=0.017862 <BR>psd_middle_N=1.68387e+06
" <BR>psd2.dat"
<P>sqrt: DOMAIN error <BR>Detector: lambda_middle_I=6.2552
lambda_middle_ERR=0.017862 <BR>lambda_middle_N=1.68 <BR>387e+06
"erg2.dat" <BR>Detector: psd_middle2_I=1.20321
psd_middle2_ERR=0.00418768 <BR>psd_middle2_N=1.08584 <BR>e+06 "psd3.dat"
<BR>Detector: lambda_middle2_I=1.20321 lambda_middle2_ERR=0.00418768
<BR>lambda_middle2_ <BR>N=1.08584e+06 "erg3.dat" <BR>Detector:
psd_end_I=0.65266 psd_end_ERR=0.002805 psd_end_N=389221 "psd4.dat"
<BR>Detector: lambda_end_I=0.65266 lambda_end_ERR=0.002805
lambda_end_N=389221 <BR>"erg4 <BR>.dat"
<P>Cheers, <BR>Philip</P></BLOCKQUOTE><PRE>--
What's up Doc ?
--------------------------------------------
Emmanuel FARHI, <A href="http://www.ill.fr/tas/people/Farhi.html">http://www.ill.fr/tas/people/Farhi.html</A> \|/ ____ \|/
CS-Group ILL4/156, Institut Laue-Langevin (ILL) Grenoble ~@-/ oO \-@~
6 rue J. Horowitz, BP 156, 38042 Grenoble Cedex 9,France /_( \__/ )_\
Work :Tel (33/0) 4 76 20 71 35. Fax (33/0) 4 76 20 76 48 \__U_/</PRE> </BLOCKQUOTE></BLOCKQUOTE><PRE>--
What's up Doc ?
--------------------------------------------
Emmanuel FARHI, <A href="http://www.ill.fr/tas/people/Farhi.html">http://www.ill.fr/tas/people/Farhi.html</A> \|/ ____ \|/
CS-Group ILL4/156, Institut Laue-Langevin (ILL) Grenoble ~@-/ oO \-@~
6 rue J. Horowitz, BP 156, 38042 Grenoble Cedex 9,France /_( \__/ )_\
Work :Tel (33/0) 4 76 20 71 35. Fax (33/0) 4 76 20 76 48 \__U_/</PRE>
</BLOCKQUOTE></BODY></HTML>