MAGIC Magic Mailing List
 
 

From: Martin, Mark (Mark.Martin AT jhuapl DOT edu)
Date: Sat Jun 28 2003 - 21:47:10 EDT

  • Next message: aojha: "tclspice: Problem with tclreadline installtion"

     
    This problem does exist in irsim 9.5 as well.  I have come across it,
    though in my case, I knew I could ignore it.
    
    MNM
      
    -----Original Message-----
    From: R. Timothy Edwards
    To: hazhu AT cs DOT ucsd.edu
    Cc: magic-dev AT csl DOT cornell.edu
    Sent: 6/27/2003 9:49 PM
    Subject: Re: Magic and IRSIM
    
    Dear Haikun,
    
    The code problems are clearly from IRSIM (sim.c line 719 in
    version 9.6, maybe around line 705 in 9.5), not magic:
    
        ---------------------
        double lmbd = atof(targv[2]) / 100.0;
              
        if (lmbd != LAMBDA)
        {
            rsimerror(simfname, lineno, "WARNING\7: sim "
                    "file lambda (%.2lfu) != config lambda"
                    " (%.2lfu)\n", lmbd, LAMBDA);
        ---------------------
    
       If lmbd != LAMBDA but the error message reports the same
    number, then probably there's a roundoff error to less than
    the precision shown in the print statement.  Chances are
    good that the problem goes away if you replace
    
        if (lmbd != LAMBDA)
    
    by
    
        if (fabs(lmbd - LAMBDA) < 0.001)
        
    If you're concerned that 1nm resolution isn't good enough,
    you can compare to a smaller number. . .
    
    I don't recall having messed with the code where the problem
    shows up, so I suspect you'll find the same behavior in
    irsim 9.5 and 9.6.
    
    Check the .sim file itself, though, in the comment (first) line;
    make sure that magic is writing out the lambda value 0.01 to the
    correct precision, as the roundoff error might occur in magic (in
    the calculation of EFScale), not IRSIM.
    
    				Regards,
    				Tim
    


  •  
     
    Questions? Contact Rajit Manohar
    cornell logo