/**********
Copyright © 1996 Norlinvest Ltd. All rights reserved.
Visual Code Model Generator, EDSpice, EDWin, EE Designer, CompCAD,
CAD 1000, CAD ABC and Visionics are trade marks of Norlinvest Ltd.
Copyright © 1983 - 1996.
*
*
Copyright 1990 Regents of the University of California.  All rights reserved.
Author: 1987 Gary W. Ng
**********/

#ifndef NOISEDEFS
#define NOISEDEFS

#include "jobdefs.h"

typedef struct {
    int JOBtype;
    JOB *JOBnextJob;    
    char *JOBname;      
    IFnode output;       
    IFnode outputRef;    
    IFuid input;      
    double NstartFreq;
    double NstopFreq;
    double NfreqDelta;
    double NsavFstp; 
    double NsavOnoise;   
    double NsavInoise;  
    int NstpType;     
    int NnumSteps;
    int NStpsSm; 
} NOISEAN;

typedef struct {
    double freq;
    double lstFreq;
    double delFreq;
    double outNoiz;     
    double inNoise;       
    double GainSqInv;
    double lnGainInv;
    double lnFreq;
    double lnLastFreq;
    double delLnFreq;
    int outNumber;    
    int numPlots;       
    unsigned int prtSummary;
    double *outpVector;  
    GENERIC *NplotPtr; 
    IFuid *namelist;   
} Ndata;

#define LNLSTDENS 0     
#define OUTNOIZ       1                                                               
#define INNOIZ        2     

#define NSTATVARS 3 


#define DECADE 1
#define OCTAVE 2
#define LINEAR 3

#define N_OUTPUT     1
#define N_OUTREF 2
#define N_INPUT      3
#define N_START      4
#define N_STOP       5
#define N_STEPS      6
#define N_PTSPERSUM  7
#define N_DEC        8
#define N_OCT        9
#define N_LIN        10

#define N_DENS    1
#define INT_NOIZ 2
#define N_OPEN       1
#define N_CALC       2
#define N_CLOSE      3
#define SHOTNOISE       1
#define THERMNOISE    2
#define N_GAIN       3

#define N_MINLOG          1E-38      
#define N_MINGAIN         1E-20       
#define N_INTFTHRESH   1E-10 
#define N_INTUSELOG      1E-10 

#define N_MXVLNTH  64


extern int NsetParm();
extern int NaskQuest();
#endif /*NOISEDEFS*/
